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
void silnia(int num){ | |
if(num == 1) | |
return 1; | |
else | |
return num*silnia(num-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
private void FindByRecursion(XElement element, string xmlPath) | |
{ | |
var q = element.Elements(); | |
if (q.Count() == 0) | |
return; | |
foreach (var xElement in q) | |
{ | |
string newXmlPath = xmlPath + "/" + xElement.Name; | |
string attribute = "["; |
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
#pragma once | |
#include <string> | |
#include <vector> | |
class WordGenerator | |
{ | |
public: | |
virtual std::string generateNext(); | |
std::string getCurrent(); | |
WordGenerator(char* range) | |
{ |
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 "WordGenerator.h" | |
#include <algorithm> | |
void WordGenerator::createAlphabet(char* range) | |
{ | |
char start,end; | |
while(*range != '\0') //Koniec stringu | |
{ | |
if(*(range+1) == '-'){ | |
alphabet.push_back(*range); //Wpisywanie danych które sa swobodne |
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
int main(void) | |
{ | |
char *s = "hello world"; | |
*s = 'H'; | |
} |
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
+++++[>++>++++++++<<-]>>++>+++++[[>+>+<<-]>>[<<+>>-]<[-<<.>>]<<<.>>-] |
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
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; | |
} |
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
class PlatformsRow | |
{ | |
public PlatformsRow(bool[] platformSettings) | |
{ | |
if (platformSettings.Length != ROW_LENGTH) | |
{ | |
throw new ArgumentException(); | |
} | |
this.platformSettings = platformSettings; | |
} |
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
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) |
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 <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): "); |
OlderNewer