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 argc, char* argv[]) | |
{ | |
int single_byte = getchar(); | |
while (single_byte != EOF) { | |
single_byte = getchar(); | |
printf("getchar() != EOF is %d.\n", single_byte != EOF); |
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
// That sounds working | |
// ... | |
// ... | |
if (y1 > y2) | |
printf("Date %2.2d/%2.2d/%2.2d is earlier.\n",d2,m2,y2); | |
else if (y1 == y2) { | |
if (m1 > m2) | |
printf("Date %2.2d/%2.2d/%2.2d is earlier.\n",d2,m2,y2); |
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> | |
#define IN 1 // Reading *inside* a word | |
#define OUT 0 // Reading *outside* a word | |
int | |
main() | |
{ | |
int state = OUT; |
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> | |
#define MAXLINE 1000 // Maximum input line size | |
int get1line(char line[], int maxline); | |
void copy(char to[], char from[]); | |
// Print longest input line | |
int | |
main() | |
{ |
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
char * get_line_from_instream(void) { | |
char * line = malloc(100), * linep = line; | |
size_t lenmax = 100, len = lenmax; | |
int c; | |
if (line == NULL) | |
return NULL; | |
for (;;) { | |
c = fgetc(stdin); |
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
@Override | |
public Iterator<Giocatore> iterator() { | |
class IteratorOverGiocatores implements Iterator<Giocatore> { | |
private int currentIndex = 0; | |
@Override | |
public boolean hasNext() { | |
return (currentIndex < rosa.size() && !rosa.isEmpty()); | |
} | |
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
/** | |
* Questa classe non e' stata utilizzata davvero. | |
*/ | |
public abstract class AbstractFilter implements Filter { | |
/* | |
public StringBuffer process(String in) { | |
return process(new StringBuffer(in)); | |
} | |
public StringBuffer process(StringBuffer in); |
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
[ x for x in [1, 2, 3] and [4, 5, 6] ] == [ 1, 2, 3, 4, 5, 6 ] |
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
@transact_ro | |
def get_receiver_logs(store, receiver_id, language=GLSetting.memory_copy.default_language): | |
receiver = store.find(Receiver, Receiver.id == receiver_id).one() | |
rlogs = receiver.user.access_log | |
return rlogs | |
class ReceiverLogs(BaseHandler): | |
#@... | |
def get(self): |
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
;; triangleNumbers.asm | |
.text | |
.globl main | |
main: | |
;; Push $ra onto the stack ... | |
subu $sp, $sp, 4 | |
sw $ra, 0($sp) |
OlderNewer