This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| void stampaVettore(int *v, int N) | |
| { | |
| int i; | |
| for(i=0; i < N; i++) | |
| printf("%d ", v[i]); | |
| putchar('\n'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create rete[3] | |
| rete[0] {pt3dclear() | |
| pt3dadd(-12.5, 0, 0, 5) | |
| pt3dadd(-7.5, 0, 0, 5) | |
| } | |
| rete[1] {pt3dclear() | |
| pt3dadd(-2.5, 0, 0, 5) | |
| pt3dadd(2.5, 0, 0, 5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load_file("rete.hoc") | |
| celsius=35 | |
| objref stim[3], ns, nc[4] | |
| access soma[0] | |
| ns = new NetStim() | |
| ns.start=10 | |
| ns.number=1 | |
| ns.interval=50 | |
| ns.noise=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Autore: Domenico Luciani | |
| * Data: 28/02/14 | |
| * Esercizio: 2 | |
| * CFU: 9 | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Import mixins | |
| var myModule = (function ( JQ, _ ) { | |
| function privateMethod1() { | |
| JQ(".container").html("test"); | |
| } | |
| function privateMethod2() { | |
| console.log( _.min([10, 5, 100, 2, 1000]) ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var basketModule = (function () { | |
| //Privates | |
| var basket = []; | |
| function doSomethingPrivate() { | |
| // | |
| } | |
| function doSomethingElsePrivate() { | |
| //... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myNamespace = (function () { | |
| var myPrivateVar, myPrivateMethod; | |
| //Private counter variable | |
| myPrivateVar = 0; | |
| //Private function which logs any arguments | |
| myPrivateMethod = function( foo ) { | |
| console.log( foo ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/wait.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #define N 10 | |
| int main(int argc, char **argv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Scrivere un programma multi processo in linguaggio C: | |
| * | |
| * 1. un processo padre che sia responsabile della generazione di una matrice | |
| * M(m,n) di interi a 16bit casuali, inoltre le dimensioni saranno date in input e la dimensione m della matrice deve essere pari. | |
| * | |
| * 2. Due processi figli che abbiano il compito di calcolare un vettore somma. | |
| * Ciascun elemento del vettore di ciascun figlio conterrà la somma di tutti | |
| * i valori della riga della matrice. | |
| * Infine i due vettori saranno restituiti al padre per il calcolo delle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express') | |
| , routes = require('./routes') | |
| , http = require('http'); | |
| var app = express(); | |
| var server = app.listen(3000); |