Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher McKay Cj1m

  • Glasgow, United Kingdom
View GitHub Profile
View gist:5f38b87f9b0d39aedfe994fb883f0148
a23 = np.matrix([math.cos(link2_angle[0]), 0, math.sin(link2_angle[0]), 0],
[0, 1, 0, 0],
[-math.sin(link2_angle[0]), 0, math.cos(link2_angle[0]), 0],
[0,0,0,1])
a34 = np.matrix([1,0,0,0],
[0, math.cos(link3_angle[1]), -math.sin(link3_angle[1]), 0],
[0, math.sin(link3_angle[1]), math.cos(link3_angle[1]), 3],
[0,0,0,1])
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.