example adapted to demonstrate answer to http://stackoverflow.com/questions/14246768/d3js-how-to-scroll-or-tween-properties/
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
// see: http://doc.qt.io/qt-5/qnetworkreply.html | |
switch(request->error()) { | |
case QNetworkReply::ConnectionRefusedError: // the remote server refused the connection (the server is not accepting requests) | |
case QNetworkReply::RemoteHostClosedError: // the remote server closed the connection prematurely, before the entire reply was received and processed | |
case QNetworkReply::HostNotFoundError: // the remote host name was not found (invalid hostname) | |
case QNetworkReply::TimeoutError: // the connection to the remote server timed out | |
case QNetworkReply::OperationCanceledError: // the operation was canceled via calls to abort() or close() before it was finished. | |
case QNetworkReply::SslHandshakeFailedError: // the SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. | |
case QNetworkReply::TemporaryNetworkFailureError: // the connection was broken due to disconnection from the network, however the system has initiated roaming to another |
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
var id = Entities.addEntity({ | |
lifetime: 600, | |
type: 'Shape', | |
shape: 'Icosahedron', | |
position: MyAvatar.position, | |
dimensions: Vec3.ONE, | |
color: { red: 255, green: 0, blue: 255 }, | |
collisionless: true, | |
script: Script.resolvePath('testDifferentMouseMoveEvents.js') | |
}); |
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
print('hostname: ', location.hostname); | |
print('logged in: ', Account.isLoggedIn()); | |
print('username: ', Account.getUsername()); | |
print('canAdjustLocks: ', Entities.canAdjustLocks()); | |
print('canRez: ', Entities.canRez()); | |
print('canRezTmp: ', Entities.canRezTmp()); | |
var lifetimes = [ undefined, -1, 0, 1, 3, 5, 3600, 3601 ]; | |
function rez(lifetime) { |
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
observeModeChanges(); // defined below | |
// -------------------------------------------------------------- | |
// hear from your Avatar's perspective | |
MyAvatar.audioListenerMode = MyAvatar.audioListenerModeHead; | |
// -------------------------------------------------------------- | |
// hear from the Camera's perspective | |
MyAvatar.audioListenerMode = MyAvatar.audioListenerModeCamera; |
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
<?php | |
echo "hello world!<br />" |
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
// Answer to http://github.com/ry/http-parser/issues/#issue/1 | |
// UNTESTED | |
struct line { | |
char *field; | |
size_t field_len; | |
char *value; | |
size_t value_len; | |
}; |
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
var glm = require('./build/glm-three.min.js'); | |
this.mrot = this.mrot || | |
glm.angleAxis(glm.radians(45.0), glm.vec3(0,1,0)); | |
var m1 = glm.mat4(1.0); | |
var m2 = glm.mat4(2.0); | |
var m3 = m1['*'](m2); |
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
mat4 rotationMatrix(vec3 axis, float angle); | |
void main(void) | |
{ | |
mat4 mrot = rotationMatrix(vec3(0.0,1.0,0.0), radians(45.0)); | |
mat4 m1 = mat4(1.0); | |
mat4 m2 = mat4(2.0); | |
mat4 m3 = m1 * m2; |
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
#define GLM_FORCE_RADIANS 1 | |
#include <glm/glm.hpp> | |
#include <glm/ext.hpp> | |
static auto mrot = glm::angleAxis(glm::radians(45.0f), glm::vec3(0,1,0)); | |
auto m1 = glm::mat4(1.0f); | |
auto m2 = glm::mat4(2.0f); |
NewerOlder