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
.equ DDRB, 0x04 | |
.equ PORTB, 0x05 | |
.equ TCCR0B, 0x25 | |
.equ TCNT0, 0x26 | |
.equ TIMSK0, 0x6e | |
.equ SPL, 0x3d | |
.equ SPH, 0x3e |
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 <unistd.h> | |
#include <sys/wait.h> | |
#include <sys/types.h> | |
#include <stdio.h> | |
pid_t children[10]; | |
int n_children = 0; | |
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
import java.util.ArrayList; | |
public class Duel { | |
private static ArrayList<Duelist> duelists; | |
private static int nDuels = 10000; | |
/* | |
* main(): entry point of application. |
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
/* problema 3 - liste */ | |
/* gcc trei.c -o trei -Wall -Wextra -ansi -g3 */ | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct categorie | |
{ |
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
/* problema 2 - liste */ | |
/* gcc doi.c -o doi -Wall -Wextra -ansi -g3 */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct obiect | |
{ | |
int data; |
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
/* problema 1 - liste */ | |
/* gcc unu.c -o unu -Wall -Wextra -ansi -g3 */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define DIM 3 | |
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
/* | |
* hashtable.c | |
* A straightforward, and apparently memory safe, hash table implementation; | |
* it seems to work even with as low as two buckets! | |
* | |
* This code is Public Domain. | |
* | |
* TODO: | |
* - use unsigned int for sizes |
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
/* TODO: | |
* how to handle collisions? | |
* how probable are collisions for relatively small tables? | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.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
local Entity = {} | |
Entity.__index = Entity | |
function Entity.new( name ) | |
assert( type( name ) == "string" ) | |
local e = {} | |
setmetatable( e, Entity ) |
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> | |
typedef struct | |
{ | |
char *name; | |
int damage, accuracy; | |
int ammo; | |
} weapon_t; |
NewerOlder