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
<?php | |
/** | |
* Osztálygyűlytemény HTML generálásra | |
* | |
* Szigorúan PoC, produktív környezetben valószínűleg használhatatlan | |
* | |
* | |
* @category HtmlGenerator | |
* @package Generator | |
* @license New BSD License |
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
/** | |
* A Weblabor számára egységtesztelés témakörben írt cikk első része | |
* | |
* @author erenon | |
* @alias WL-Testme | |
* @license New BSD | |
* | |
*/ | |
PHP osztályok egységtesztelése |
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
PHP osztályok egységtesztelése II | |
================================= | |
Cikkünk első részében megismerkedtünk az egységtesztelés alapjaival, felmértük a fontosságát, ismertettük előnyeit és hátrányait. A folytatásban bemutatásra kerül egy egyszerű teszteset szervezés, valamint átfogóbban tárgyaljuk a könnyen tesztelhető kód főbb jellemzőit. | |
[h3]Tesztesetek szervezése[/h3] | |
Az előző részben bemutatott tesztkódot a következőképpen futtatuk: | |
[colorer=cmd]$ phpunit arithmetic-test.php |
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
/** | |
* Betuszuro | |
* | |
* Beker ket szot, es kiirja azokat a karaktereket, | |
* melyek csak az elsoben szerepelnek | |
* | |
* @todo source_unique and source_filter violates DRY. | |
*/ | |
#include <stdio.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
#include <stdio.h> | |
#include <math.h> | |
int main(){ | |
int a,b; | |
double c; | |
a=1; | |
for(a=1;a<10000;a++) { | |
for(b=a;b<10000;b++) { |
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> | |
int main(){ | |
int m, m2, in, part, addm; | |
m=1; | |
m = m<<16; | |
m -= 1; | |
m2 = 1; | |
m2 = m2<<8; | |
m2 -= 1; |
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> | |
#include <stdlib.h> | |
int *evszamok(char k[], int *meret) { | |
int i=0, j=0, state=0, evszam = 0, m=0, cm=0; | |
int *evszamok = NULL, *evszamok2 = NULL; | |
while(k[i]){ | |
switch(state){ | |
case 1: //1 jegy? |
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> | |
#include <stdlib.h> | |
struct ablak { | |
int a; | |
int b; | |
int c; | |
int d; | |
char e[50]; | |
}; |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
char *filter(char *source, char *haystack) { | |
int i,j; | |
int nlen, cur, filter_flag; | |
char *nstr; | |
nlen = 0; |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
char *trim(char *str) { | |
int i=0, spbefore=0, slen=0, spafter=0; | |
char *newstr; | |
slen = strlen(str); | |
OlderNewer