(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
copy/delete word under cursor in Vim | |
yw / byw | |
Assuming that the cursor is at the first character of the word simply do this in command mode: | |
yw | |
y is for yank and w is for word. | |
Other ways of doing the same thing which are not as efficient: | |
vey | |
the v starts visual select mode. e tells vim to move to end of word. y yanks or copies the word. to delete replace y with x. |
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(-) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
//Erweiterte JSON, die auch spezielle Objekte parst und zu JSON umwandelt: | |
//Objekte, die sich selbst enthalten | |
//Objekte, die Funktionen enthalten | |
var JSONE = {}; | |
JSONE.to = {}; | |
JSONE.to.removeCycle = function(obj,already = [],lvl = 1,path="PATH#obj"){ | |
if(typeof obj === "object") | |
{ | |
for(var i in already) | |
{ |
I have following object:
var cities={10:'Tashkent', 14:'Karakalpakiya', 16:'Andijan'};
I want sort it by city names, so after sort it should be:
var cities={16:'Andijan', 14:'Karakalpakiya', 10:'Tashkent'};
But I can't sort object properties, instead can convert object into array, then sort items.
#include <IOKit/IOTypes.h> | |
#include <IOKit/IOKitLib.h> | |
#include <CoreSurface/CoreSurface.h> | |
#include <stdio.h> // For mprotect | |
#include <sys/mman.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif |
//To run Q.js examples: | |
// 1. Open a new browser tab in Chrome and turn on developer toolbar (or open any http site). | |
// 2. Copy/Paste this gist in the console and hit enter to run the snippets. | |
// Based on the inspiration from samples @ https://github.com/kriskowal/q | |
//////////////////////////////////////////////////////////////////// | |
//////////////////////////////////////////////////////////////////// |
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. |
function toHex(s) { | |
// utf8 to latin1 | |
var s = unescape(encodeURIComponent(s)) | |
var h = '' | |
for (var i = 0; i < s.length; i++) { | |
h += s.charCodeAt(i).toString(16) | |
} | |
return h | |
} |