Skip to content

Instantly share code, notes, and snippets.

View soltys's full-sized avatar

Paweł Sołtysiak soltys

View GitHub Profile
class Pracownik extends Osoba
// dziedziczenie po klasie
class Samochód implements Pojazd, Towar
// dziedziczenie po kilku interfesjach
class Chomik extends Ssak implements Puchate, DoGłaskania
// dziedziczenie po klasie i kilku interfejsach
/* matrix-omp.cpp */
const int size = 1000;
float a[size][size];
float b[size][size];
float c[size][size];
int main()
{
// Initialize buffers.
@soltys
soltys / poor_man_grep.py
Created February 17, 2014 14:16
List all files with extension which not contain string
import os
for file in os.listdir("."):
if file.endswith(".HTM"):
f = open(file)
if f.read().find("successfully") == -1:
print file
f.close()
@soltys
soltys / kck_zima_2013.md
Created January 21, 2013 21:28
KCK pytania odpowiedzi 2013

###Zmysły człowieka uporządkowane pod względem ilości receptorów - majeląco: wzrok, węch, dotyk, smak

###do cech sygnału mowy w dziedzinie czasu nie należy częstotliwośc podstawowa tony krtaniowego

###nie jest prawdziwe stwierdzenie, że: brak odpowiedzi

###Steve Jobs był propagatorem obowiązującej dziś ideei:

@soltys
soltys / systemy_internetowe.md
Last active December 10, 2015 17:48
Pytania i odpowiedzi do pytań z systemów internetowych

Dwie różnice pomiędzy POST i GET

GET wykorzystuje adres URL do przesyłania parametrów do zapytania strony WWW. Zapytanie GET posiada puste ciało zapytania

POST przesyła parametry poprzez ciało zapytania.

A POST request is different from a GET request in the following ways (from: http://www.jmarshall.com/easy/http/):

  • There's a block of data sent with the request, in the message body. There are usually extra headers to describe this message body, like Content-Type: and Content-Length:.
  • The request URI is not a resource to retrieve; it's usually a program to handle the data you're sending.
using System;
public class Person : BindableBase
{
private string _name;
public string Name
{
get
{
return _name;
}
#include <stdio.h>
#include <ctype.h>
int is_leap_year(int year);
int day_of_year(int day, int month, int year);
int main() {
int day = 0, month = 0, year = 0;
printf("Podaj date (dd/mm/rrrr): ");
unsigned char a,b; //char'y są 8 bitowe (patrz treść zadania)
unsigned short int wynik = 0; // short int 16 bitowy (patrz treść zadania)
a=12; //Ustawiamy dwie wartości które chcemy przemnożyć
b=8;
//Rozpoczynamy wstawkę assemblerową
_asm
{
mov dx,0 //kolejne sumy a << coś będziemy przechowywać w dx (patrz wzór)
mov bl, b //kopiujemy do bl wartość zmiennejb
mov cl, 0x00 //cl będzie przechowywać wykładnik potęgi 2 (patrz wzór)
class PlatformsRow
{
public PlatformsRow(bool[] platformSettings)
{
if (platformSettings.Length != ROW_LENGTH)
{
throw new ArgumentException();
}
this.platformSettings = platformSettings;
}
@soltys
soltys / gist:1798415
Created February 11, 2012 10:12
IsolatedStorageHelpers
namespace Soltys.Library.WindowsPhone
{
public static class IsolatedStorageHelpers
{
public static void SetValue<T>(this IsolatedStorageSettings storage,string key, T value)
{
if (storage.Contains(key))
{
storage[key] = value;
}