This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! Basic vector maths | |
const std = @import("std"); | |
const base = @import("base.zig"); | |
const mem = std.mem; | |
const time = std.time; | |
const math = std.math; | |
const Random = std.rand.Random; | |
const ArrayList = std.ArrayList; | |
const Allocator = mem.Allocator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void printQuery(String query, Object ... params) { | |
System.out.println(query); | |
jdbc.query(query, params, new RowMapper<Object>() { | |
private List<String> columnNames; | |
@Override | |
public Object mapRow(ResultSet rs, int i) throws SQLException { | |
loadColumnNames(rs); | |
System.out.println(" row: " + i); | |
for(String name : columnNames) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// go to page http://dev-server.ruuvitracker.fi/api/v1-dev/events | |
var ws = new WebSocket("ws://dev-server.ruuvitracker.fi/api/v1-dev/websocket"); | |
ws.onmessage=function(e){console.info("msg" , JSON.parse(e.data));}; | |
ws.send(JSON.stringify({subscribe: "trackers", ids: [9]})); |