- Header Kernel - GCC
sudo apt-get install linux-headers
- Pacotes essenciais
$m = new MongoClient(); // connect to local mongodb | |
$db = $m->products; //select 'mongo database' named products | |
$clothing_col = $db->clothing; //create a collection from the 'table' clothing | |
//create the aggregation | |
//create the Match on clothing-category = shoes or brand = nike | |
$ops = array( | |
array( | |
'$match' => | |
array('$or' => |
print "Hola" | |
estado= None | |
y= None | |
while 1: | |
A= input ("Dame el valor de A") | |
B= input ("Dame el valor de B") | |
if A==1: |
#! /bin/bash | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
var myApp = angular.module('myApp', []); | |
myApp.directive('googleplace', function() { | |
return { | |
require: 'ngModel', | |
link: function(scope, element, attrs, model) { | |
var options = { | |
types: [], | |
componentRestrictions: {} | |
}; |
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
var util = require('util'), | |
net = require('net'); | |
fs = require('fs'); | |
vm = require('vm'); | |
repl = require('repl'); | |
var socket = new net.Socket(); | |
socket.setNoDelay(true); | |
socket.setEncoding('ascii'); |
var ipp = require('ipp'); //get it from there - https://npmjs.org/package/ipp - $npm install ipp | |
var request = require('request'); //get it from there - https://npmjs.org/package/request - $npm install request | |
var fs = require('fs'); | |
function getPrinterUrls(callback) { | |
var CUPSurl = 'http://localhost:631/printers';//todo - change of you have CUPS running on other host | |
request(CUPSurl, function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
var printersMatches = body.match(/<TR><TD><A HREF="\/printers\/([a-zA-Z0-9-^"]+)">/gm);//i know, this is terrible, sorry( | |
var printersUrls = []; |
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function PV(rate, periods, payment, future, type) { | |
// Initialize type | |
var type = (typeof type === 'undefined') ? 0 : type; | |
// Evaluate rate and periods (TODO: replace with secure expression evaluator) | |
rate = eval(rate); | |
periods = eval(periods); |