Skip to content

Instantly share code, notes, and snippets.

View wsdookadr's full-sized avatar
🎯
Focusing

Stefan Corneliu Petrea wsdookadr

🎯
Focusing
  • Nowhere
  • Nowhere
View GitHub Profile
<html>
<head>
<title>Value vs. Reference</title>
</head>
<body>
<table>
<tbody>
<tr>
<td><input type="button" value="to_input" class="lupa" /></td>
<td><span atr="a">1</span></td>
<html>
<head>
<title>Value vs. Reference</title>
</head>
<body>
<table>
<tbody>
<tr>
<td><input type="button" value="to_input" class="lupa" /></td>
<td><span atr="a">1</span></td>
==7083== Memcheck, a memory error detector
==7083== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==7083== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==7083== Command: perl -e
==7083==
==7083==
==7083== HEAP SUMMARY:
==7083== in use at exit: 121,395 bytes in 539 blocks
==7083== total heap usage: 674 allocs, 135 frees, 134,395 bytes allocated
==7083==
==7102== Memcheck, a memory error detector
==7102== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==7102== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==7102== Command: ls
==7102==
==7102==
==7102== HEAP SUMMARY:
==7102== in use at exit: 13,803 bytes in 14 blocks
==7102== total heap usage: 49 allocs, 35 frees, 49,070 bytes allocated
==7102==
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@wsdookadr
wsdookadr / node-and-npm-in-30-seconds.sh
Created July 5, 2011 06:01 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
#!/usr/bin/perl
use strict;
use warnings;
use Parse::Yapp;
use Data::Dumper;
my $grammar=join('',<DATA>);
my $parser_generator = Parse::Yapp->new( input => $grammar );
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#define MAXN 300
#define min(a,b) ( (a<b)?(a):(b) )
#define max(a,b) ( (a>b)?(a):(b) )
int solve(int n) {
int T[MAXN];
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
/*
* Minimalistic testing "framework"
*
*/
#include <iostream>
using namespace std;
int main() {
int n = 23;
//int* v = new int[n];
int v[] = {8,3,1,5,39,20,21,100,123,22,55,62,72,54,1,3,2,6,3,5,29,10};
/*
*cout<<"vectorul ";