A Pen by Andy Novocin on CodePen.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
<ul id="stuffhere"> | |
</ul> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>WebSocket Test</title> | |
</head> | |
<body> | |
<h1>Hi there</h1> | |
<input type="text" id="msg"/> | |
<button type="button" id="send">Click to Send</button> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>WebSocket Test</title> | |
</head> | |
<body> | |
<ul id="msgs"> | |
</ul> | |
<script> |
This file contains hidden or 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
#include <functional> | |
#include <mutex> | |
#include <set> | |
#include <thread> | |
#include <websocketpp/config/asio.hpp> | |
#include <websocketpp/server.hpp> | |
typedef websocketpp::server<websocketpp::config::asio> server; |
This file contains hidden or 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
#include <iostream> | |
#include <websocketpp/config/asio.hpp> | |
#include <websocketpp/server.hpp> | |
typedef websocketpp::server<websocketpp::config::asio> server; | |
void on_message(websocketpp::connection_hdl hdl, server::message_ptr msg) { | |
std::cout << msg->get_payload() << std::endl; | |
} |
This file contains hidden or 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
#include <stdio.h> | |
#include <sqlite3.h> | |
#include <string> | |
#include <vector> | |
#include <iostream> | |
using namespace std; | |
static int callback(void *outputPtr, int argc, char **argv, char **azColName){ | |
int i; | |
vector<string> *list = reinterpret_cast<vector<string>*>(outputPtr); |
This file contains hidden or 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
import numpy as np | |
TWOSPIN_SLOW = (np.array([ | |
85. , 85.16270338, 85.32540676, 85.48811014, | |
85.65081352, 85.8135169 , 85.97622028, 86.13892365, | |
86.30162703, 86.46433041, 86.62703379, 86.78973717, | |
86.95244055, 87.11514393, 87.27784731, 87.44055069, | |
87.60325407, 87.76595745, 87.92866083, 88.09136421, | |
88.25406758, 88.41677096, 88.57947434, 88.74217772, | |
88.9048811 , 89.06758448, 89.23028786, 89.39299124, |
This file contains hidden or 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
[0, 0, 2, 1, 1, 1, 2, 0, 2] 1 | |
[0, 0, 2, 1, 1, 2, 0, 2, 1] 2 | |
[0, 0, 2, 1, 1, 2, 1, 0, 2] 3 | |
[0, 0, 2, 1, 2, 0, 2, 1, 1] 4 | |
[0, 0, 2, 1, 2, 1, 0, 2, 1] 5 | |
[0, 0, 2, 1, 2, 1, 1, 0, 2] 6 | |
[0, 0, 2, 2, 0, 2, 1, 1, 1] 7 | |
[0, 0, 2, 2, 1, 0, 2, 1, 1] 8 | |
[0, 0, 2, 2, 1, 1, 0, 2, 1] 9 | |
[0, 0, 2, 2, 1, 1, 1, 0, 2] 10 |