Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <string.h>
const int ile = 5000;
int
main (int argc, char *argv[])
{
char tablica[20];
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
char imie[50];
int i, tr=0;
char* znaki;
char c;
znaki = argv[1];
@wbzyl
wbzyl / chiny.c
Created April 18, 2012 12:47
do poprawy
/* gcc -Wall chiny.c */
/*
chiny.c: In function ‘tlumacz_zdanie’:
chiny.c:85:23: error: subscripted value is neither array nor pointer nor vector
chiny.c:87:11: warning: passing argument 1 of ‘strlen’ makes pointer from integer without a cast [enabled by default]
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘char’
chiny.c:88:11: warning: passing argument 2 of ‘strncmp’ makes pointer from integer without a cast [enabled by default]
/usr/include/string.h:146:12: note: expected ‘const char *’ but argument is of type ‘char’
chiny.c:89:13: warning: passing argument 2 of ‘strcat’ makes pointer from integer without a cast [enabled by default]
@wbzyl
wbzyl / slownik.c
Created April 25, 2012 12:41
Wczytywanie słów do tablicy.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_WORDS 1000000
void pobierz_slownik(char *slownik[], int *size);
int main(int argc, char *argv[]) {
int size;
@wbzyl
wbzyl / chiny3.c
Created April 25, 2012 12:44
Piszemy po chińsku.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_WORDS 1000000
void pobierz_slownik(char *slownik[], int *size);
void usun_spacje(char *zdanie);
void wypisz_zdanie(char *zdanie);
@wbzyl
wbzyl / remove_comments.c
Created April 25, 2012 12:58
Usuwanie komentarzy.
/*
Pliki tymczasowe oraz korzystanie z plików w C.
1. Zadeklaruj zmienną typu FILE *
FILE *infile, *outfile;
2. Otwórz plik (do czytania, do zapisywania)
infile = fopen("in.txt","r");
@wbzyl
wbzyl / MathJax-jQuery.html
Created May 6, 2012 20:09 — forked from hidsh/MathJax-jquery.html
mathjax interactive preview
<html>
<head>
<meta charset=utf-8>
<title>Live Preview of MathJax Type Setting</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]] } });
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
@wbzyl
wbzyl / latency.txt
Created May 31, 2012 13:23 — forked from jboner/latency.txt
Latency numbers every programmer should know
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
@wbzyl
wbzyl / meteor-handlebars.js
Created June 16, 2012 17:17
Meteor v. Handlebars templates
// npm install handlebars
var Handlebars = require('handlebars');
var source = "<ul>{{#colors}}\n <li>{{name}}{{/colors}}\n</ul>";
var template = Handlebars.compile(source);
var data = { "colors": [
{ "name": "green" },
{ "name": "green" },
{ "name": "blue" }
]};
@wbzyl
wbzyl / index.html
Created June 25, 2012 19:17 — forked from mbostock/.block
Rounded Rectangles (D3.js) / http://bl.ocks.org/2990659
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script>
</head>
<body>
<script type="text/javascript">
var mouse = [480, 250],
count = 0;