Skip to content

Instantly share code, notes, and snippets.

Christopher McKay Cj1m

  • Glasgow, United Kingdom
Block or report user

Report or block Cj1m

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Using recursion
public void runTimer(){
if(snake.isAlive()){
ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
executor.schedule(runTimer(), 1, TimeUnit.SECONDS);
executor.shutdown();
}
}
View gist:2812c0416e0a7a58439d9f02702648f5
$('#swimmer-submit').on('click', function(e) {
e.preventDefault();
var values = {
swimmer : {
swimmer_forename: $('input[name="swimmer_forename"]').val(),
swimmer_surname: $('input[name="swimmer_surname"]').val(),
swimmer_dob: $('input[name="swimmer_dob"]').val(),
swimmer_gender: $('select[name="swimmer_gender"]').val(),
}
};
You can’t perform that action at this time.