Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
#include <v8.h> | |
#include <node.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
using namespace node; | |
using namespace v8; | |
struct Test_req | |
{ |
// check the same elements from 2 arrays. | |
function compare(a, b){ | |
var set = []; | |
var i = 0, j = 0; | |
var jHit = -1; | |
while (i < a.length && j < b.length) { | |
if (a[i]==b[j]){ | |
set.push(a[i]); |
If the title of this post made perfect sense to you, then you’re way ahead of me. But just in case, we’d best recap. Neal Whitman wrote a good article at Grammar Girl recently on the possible origins of because as a standalone preposition. This helpful passage from Whitman sets out the context:
In Standard English, the word “because” can be used two ways. One of them is to introduce a clause, as in “Aardvark was late because he was waiting for the repairman to show up.” Used this way, “because” is a subordinating conjunction. The other is to team up with “of” to form what’s called a compound preposition. For example, “Aardvark was late because of heavy traffic.” In the past three or four years, though, a new usage for “because” has been developing.
The new usage – older than 3–4 years, mind – is what Laura Bailey and Mark Liberman, respectively, have referred to as “because+noun” and “because NOUN”. Liberman says the idiom usually seems to imply “that
var tls = require('tls'); | |
var hostname = 'imap.qq.com'; | |
var port = 993; | |
var option = { | |
rejectUnauthorized: false | |
} | |
var cleartextStream = tls.connect(port, hostname, option); | |
var step = 0; |
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle | |
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse | |
service network restart | |
# vi-style | |
vi /etc/sysctl.conf | |
/sbin/sysctl -p // this command is for saving result |
exports.port = 10010; | |
var net = require('net'); | |
var tls = require('tls'); | |
var j = 0; | |
var k = 0; | |
function createTCP () { | |
var start = Date.now(); |
char *imap_recv(int fd, size_t size) { | |
size_t cursor = 0; | |
int rc; | |
char *buffer = (char *)malloc(sizeof(char)*size); | |
char *result = (char *)malloc(sizeof(char)*size); | |
while (rc = recv(fd, buffer, size, 0)) { | |
// if a message is less than the current size, it will return more data for fill in this pool. so I use \0 to avoid it. | |
buffer[rc] = '\0'; |
function plus(count) { | |
var s = 'apple'; | |
var start = Date.now(); | |
var result = ''; | |
for (var i=0; i<count; i++) result += s; | |
console.log(Date.now()-start) | |
} | |
function concat(count) { | |
var s = 'apple'; |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <pthread.h> | |
#include "uv.h" |