This file contains 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 stampa_M(int **M,int g) | |
{ | |
int i,j; | |
puts("\n -- Stampa --"); | |
for(i=0; i < g; i++) | |
{ |
This file contains 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> | |
typedef struct lista | |
{ | |
int dato; | |
struct lista *next; | |
}lista; | |
lista* crea(lista* p,int n) |
This file contains 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> | |
#define MAX 10 | |
typedef struct ABR | |
{ | |
int label; | |
struct ABR *sx,*dx; | |
}ABR; |
This file contains 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> | |
int accoppiata(int **M,int g) | |
{ | |
int n,i, | |
somma_r = 0, | |
somma_c = 0; | |
for(n=0; n < g; n++) |
This file contains 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
/* | |
* Domenico Luciani | |
* [email protected] | |
* Olimex Weekend Challenge #21 Words Puzzle | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> |
This file contains 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
; Data una matrice quadrata di interi a 16bit, stampi a video "Vero" se la somma degli elementi della diagonale principale di M coincide con | |
; la somma degli elementi della diagonale secondaria e stampi "Falso" altrimenti. | |
section .data | |
M dw 7,15,3,10,4,2,1,11,7,2,0,56,1,21,4,5 | |
dim equ $-M | |
N equ 4 | |
V db "Vero", 10 | |
dim_V equ $-V | |
F db "Falso", 10 | |
dim_F equ $-F |
This file contains 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); |
This file contains 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 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 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 ); |