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
/* | |
* Sommare gli elementi di un vettore A con puntatori e funzioni ricorsive. | |
* Domenico Luciani aka DLion anno 2013 Facoltà di Scienze Informatiche, 1° anno. | |
* 20/02/2013 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
void stampa(int*,int); |
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 scambia(int*,int*); | |
void stampa(int*,int); | |
void crea(int*,int); | |
void quicksort(int*,int,int); | |
int main() | |
{ |
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 <time.h> | |
#define DIM 100 | |
void randomico(int *A) | |
{ | |
int i; | |
srand(time(NULL)); |
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 <plib/js.h> | |
int main() | |
{ | |
jsJoystick *js[1]; | |
float *assi[1]; | |
int j; | |
jsInit(); |
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
<?php | |
function trova_data_fiscale($codice) | |
{ | |
$mesi = array('A' => '01', 'B' => '02', 'C' => '03', 'D' => '04', 'E' => '05', 'H' => '06', 'L' => '07', 'M' => '08', 'P' => '09', 'R' => '10', 'S' => '11', 'T' => '12'); | |
$dati_finali = array(); | |
$data_presa = substr(strtoupper($codice),6,5); | |
$anno = substr($data_presa,0,2); | |
$mese = substr($data_presa,2,1); | |
$giorno = strval(substr($data_presa,3,2)); | |
if($giorno >= 40) |
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
<?php | |
public function checkURL($url) { | |
$reg = '%^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@|\d{1,3}(?:\.\d{1,3}){3}|(?:(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)(?:\.(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)*(?:\.[a-z\x{00a1}-\x{ffff}]{2,6}))(?::\d+)?(?:[^\s]*)?$%iu'; | |
$url = htmlspecialchars(trim($url)); | |
if(preg_match($reg,$url)) | |
return true; | |
else | |
{ |
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
#!/bin/bash | |
# Autori: | |
# | |
# P @Pinperepette | |
# H @HackerRedenti | |
# # @b4d_tR1p | |
# 0 @Th3Zer0 | |
# S @Stabros | |
######################################################################### |
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
xrandr --output HDMI-1 --mode 1360x768 --right-of LVDS-1 |
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
/* | |
Si crei un file di testo di nome vettore.txt contenente nella prima riga un intero positivo N e nelle consecutive N righe un intero. | |
Si crei un array dinamico V di dimensione N contenente gli N interi definiti nelle ultime N righe del file. | |
--------------------------------------------DONE------------------------------------------------------------ | |
Si costruisca l’albero binario di ricerca A contenente gli interi del vettore V inserendoli da quello in posizione 0 a quello in posizione N-1. | |
-------------------------------------------DONE------------------------------------------------------------------------------------------------ | |
Si scriva una funzione ricorsiva che, dato l’ albero binario di ricerca A e un intero k,restituisca il numero di nodi di A con etichetta maggiore di k. | |
Tale funzione deve restituire utilizzando le proprietà dell’ABR, ovvero evitando di esaminare tutti i nodi dell’albero. | |
------------------------------------------DONE--------------------------------------------------------------- |
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
/* | |
* Compito d'esame: | |
* Autore: Domenico Luciani | |
* Scrivere un programma che legga da tastiera una mat rice quadrata binaria. | |
* Scrivere una funzione in C che stabilisca se la matrice è costituita da cornici di zero che si | |
* alternano rispettivamente a partire dalla cornice esterna composta da tutti zero. | |
* Es: Le matrici | |
* 1 1 1 1 1 1 1 e 0 0 0 0 0 | |
* 1 0 0 0 0 0 1 0 1 1 1 0 | |
* 1 0 1 1 1 0 1 0 1 1 1 0 |