Skip to content

Instantly share code, notes, and snippets.

A = (Complex **) malloc(sizeof(Complex*) * n); // Alokowanie macierzy, wysokosc (tablica wskaznikow)
for(k=0; k<=n; k++)
*(A+k) = (Complex*) malloc(sizeof(Complex) * (m+1)); // Dolaczenia do kazdego elementu tablicy wskanikow, m wskaznikow
class Texter
def initialize(tekst)
@str = tekst
@tablica = findChangeIndexes
end
attr_reader :str, :tablica
def findChangeIndexes
wynik = []
#include <stdlib.h>
#include <stdio.h>
char* readline(FILE* f)
{
/*
* calloc is like malloc, except it allocates cleared memory
* so you don't have random bytes in the memory space
*/
char* line = (char*) calloc(0, sizeof(char) );;
POST /pins/save HTTP/1.1
Host: nasza-klasa.pl
Proxy-Connection: keep-alive
Referer: http://nasza-klasa.pl/profile/28525834/gallery/album/2/1
Origin: http://nasza-klasa.pl
X-Request: JSON
Local-Timestamp: 1274274914
X-Requested-With: XMLHttpRequest
isAjaxy: very
Content-type: application/x-www-form-urlencoded; charset=UTF-8
## Czasy dzialania algorytmow: Dijkstra oraz Bellman-Ford
## Dijkstra:
#graf rzadki
Liczba krawedzi= 2572
Liczba wierzcholkow= 100
CZAS = 0 s
plik = File.open("intel.hex", "r")
hex = plik.readlines
binfile = []
hex.each do |line|
adress = line[3..6]
type = line[7..8]
data = line[9..40]
checksum = line[41..42]
VAR
a b c
START
a:=0;
b:=5;
c:=7;
IF a<b THEN
PRINT 1;
ELSE
generujKod("ZERO", -1);
context_check("STORE", "xA");
context_check("LOAD", $1);
context_check("STORE", "xB");
context_check("LOAD", $3);
context_check("STORE", "xC");
context_check("LOAD", "#jeden");
context_check("STORE", "xD");
context_check("ADD", "xD");
context_check("SUB", "xB");
generujKod("ZERO", -1);
context_check("ADD", $3);
generujKod("JZ", generujEtykiete()+32);
context_check("STORE", "xB");
context_check("LOAD", $1);
context_check("STORE", "xA");
context_check("LOAD", "#jeden");
context_check("STORE", "xD");
context_check("LOAD", $3);
context_check("STORE", "xC");
gen_code("ZERO", -1);
is_declare("STORE", "xB");
is_declare("LOAD", $1);
is_declare("STORE", "xA");
is_declare("LOAD", "#jeden");
is_declare("STORE", "xD");
is_declare("LOAD", $3);
is_declare("STORE", "xC");
is_declare("ADD", "xC");
is_declare("SUB", "xA");