xset r rate 170 77 setxkbmap -layout "us,ru" -option "grp:caps_toggle" -option "grp_led:scroll" -option "compose:ralt"
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
1. The texture target needs to be GLES20.GL_TEXTURE_EXTERNAL_OES instead of GL_TEXTURE_2D, e.g. in the glBindTexture calls and glTexParameteri calls. | |
2. In the fragment shader define a requirement to use the extension: | |
#extension GL_OES_EGL_image_external : require | |
3. For the texture sampler used in the fragment shader, use samplerExternalOES instead of sampler2D. | |
Everything below here is all in the C code, no more Java. | |
4. In the C code, use glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, eglImage) to specify where the data is, instead of using glTexImage2D family of functions. |
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
dispatch_queue_t gcdTimerQueue; | |
dispatch_source_t gcdTimer; | |
gcdTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, gcdTimerQueue); | |
if (gcdTimer) { | |
uint64_t seconds = 30ull; | |
uint64_t interval = seconds * NSEC_PER_SEC; | |
uint64_t leeway = 1ull * NSEC_PER_SEC; | |
__block typeof(self) _self = self; | |
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
/** | |
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns. | |
**/ | |
// Constructor. | |
var Interface = function (name, methods) { | |
if (arguments.length != 2) { | |
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2."); | |
} | |
this.name = name; |
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
// Because closure is not A variable, but ALL OF THEM in dict (i.e., str, doSomethingWithStr, logIt). | |
// Referencing logIt in setInterval(logIt, 100) long lasts not only logIt, but also all another vars - | |
// for the lexical scope to be consistent. | |
var run = function () { | |
var str = new Array(1000000).join('*'); | |
var doSomethingWithStr = function () { | |
if (str === 'something') | |
console.log("str was something"); | |
}; |
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
Актор потребляет ресурсы: | |
CPU | |
Память | |
Uplink/Downlink bandwidth | |
Ресурсы предоставляет актор верхнего уровня (владеющий контейнер) | |
двумя способами: а) из собственных ресурсов (отнимая/резервируя их из своего пула). | |
Связывающийся с другими акторами актор явным образом задаёт максимально возможную скорость, | |
с которой он будет передавать сообщения по разным исходящим каналам, которые у него есть. | |
б) актор может иметь связь с актором другого уровня, который предоставит ресурсы. |
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
# include <sys/types.h> | |
# include <sys/socket.h> | |
# include <ifaddrs.h> | |
# include <arpa/inet.h> | |
# include <netinet/in.h> | |
// Bad dirty quick functions written by hot fingers: | |
char* ipToStr(sockaddr* addr) { | |
static char ip[32]; |
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
From ae279bfe194b1b17a6dc18e0720e61d253414154 Mon Sep 17 00:00:00 2001 | |
From: "Daniel St. Jules" <[email protected]> | |
Date: Thu, 8 May 2014 18:59:20 -0400 | |
Subject: [PATCH] Replace faye-websocket-node with ws | |
--- | |
package.json | 4 ++-- | |
src/trans-websocket.coffee | 15 +++++++-------- | |
2 files changed, 9 insertions(+), 10 deletions(-) |
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
ini_set('xdebug.scream', true); | |
ini_set('display_errors', true); | |
error_reporting(E_ALL); | |
ini_set('scream.enabled', true); |
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
// You would use this object as follows: | |
var xhr = XHRFactory.getInstance(); | |
var url = "http://www.xyz.com/someresource/...."; | |
// do the operation | |
xhr.open("GET", url, true); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState==4) { | |
// if "OK" | |
if (xhr.status==200) { |