Passing and receiving array object between Node.js and C++ binding
$ g++ -dynamiclib -o mylib.dylib main.cpp
$ node index.js
[matrix size: 100x100; n_nonzero: 4; density: 0.04%]
(1, 1) 2.0000
# EditorConfig helps developers define and maintain consistent | |
# coding styles between different editors and IDEs | |
# editorconfig.org | |
root = true | |
[*] | |
end_of_line = lf | |
charset = utf-8 |
/** | |
* OpenCV video streaming over TCP/IP | |
* Client: Receives video from server and display it | |
* by Steve Tuenkam | |
*/ | |
#include "opencv2/opencv.hpp" | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> |
var ref = require('ref'); | |
module.exports = BufferType; | |
/** | |
* Fixed length "Buffer" type, for use in Struct type definitions. | |
* | |
* Optionally setting the `encoding` param will force to call | |
* `toString(encoding)` on the buffer returning a String instead. | |
*/ |
# Block Skype ads | |
127.0.0.1 *.msads.net | |
127.0.0.1 *.msecn.net | |
127.0.0.1 *.rad.msn.com | |
127.0.0.1 a.ads2.msads.net | |
127.0.0.1 ac3.msn.com | |
127.0.0.1 ad.doubleclick.net | |
127.0.0.1 adnexus.net | |
127.0.0.1 adnxs.com | |
127.0.0.1 ads1.msn.com |
When npm installs native node modules it uses node-gyp
to compile code. This is the seam node uses for targeting different operating systems, e.g. OS X
, linux
, Windows
etc.
By default node-gyp
compiles using one core and if you have more than one you probably want to utilize that power to speed up compile time. The way node-gyp
handles this is by using the JOBS
environment variable, which sets the jobs
variable here. This piece of code then checks the value of jobs
to determine how many cores to use.
Note that if the value of JOBS
is max
then all cores will be used. So lets try this on leveldown
. First lets check that JOBS
isn't set yet:
lms@ux301|01:34|~/src/leveldb-repos/leveldown (master) $ echo $JOBS
<?php | |
$I = new RedirectsTester($scenario); | |
$I->wantTo('check 301 redirects are working'); | |
// First, test /login/ page gets rewritten to https:// | |
$I->seePermanentRedirectToHttpsFor('login/'); | |
$I->seePermanentRedirectToHttpsFor('login/?redirect_to=foo'); |
#!/bin/bash | |
# AUTHOR: (c) Rob W 2012, modified by MHC (http://askubuntu.com/users/81372/mhc) | |
# NAME: GIFRecord 0.1 | |
# DESCRIPTION: A script to record GIF screencasts. | |
# LICENSE: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html) | |
# DEPENDENCIES: byzanz,gdialog,notify-send (install via sudo add-apt-repository ppa:fossfreedom/byzanz; sudo apt-get update && sudo apt-get install byzanz gdialog notify-osd) | |
# Time and date | |
TIME=$(date +"%Y-%m-%d_%H%M%S") |
// | |
// Copyright (c) 2014 Sean Farrell | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// |
To remove a submodule you need to: