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
/********************** | |
* superDrEvalBros.js * | |
********************** | |
* | |
* You're still here?! Well, Dr. Eval, let's see | |
* how well you can operate with one less dimension. | |
* | |
* Give up now. Unless you have a magic mushroom | |
* up your sleeve, it's all over. | |
*/ |
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
/*************** | |
* pointers.js * | |
*************** | |
* | |
* You! How are you still alive? | |
* | |
* Well, no matter. Good luck getting through this | |
* maze of rooms - you'll never see me or the Algorithm again! | |
*/ |
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
/* | |
* robotMaze.js | |
* | |
* The blue key is inside a labyrinth, and extracting | |
* it will not be easy. | |
* | |
* It's a good thing that you're a AI expert, or | |
* we would have to leave empty-handed. | |
*/ |
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 func(int number){ | |
long result = number * 0x4EC4EC4F; | |
int higher = result >> 34; | |
int lower = result & 0x00000000FFFFFFFF; | |
lower = lower >> 31; | |
return higher - lower; | |
} |
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 removeDot(char *str){ | |
int size = strlen(str); | |
char *memory = malloc(size); | |
memset(memory,0,size); | |
int i,j; | |
for( i=0;j=0;i<size;i++){ | |
if( str[i] != "." ){ | |
memory[j++] = str[i]; | |
} |
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 read_msg_from_socket(int sock_fd,struct sm_msg *msg){ | |
char buffer[sizeof(struct sm_msg)] = {}; | |
size_t buffer_len = 0; | |
int nbytes = 0; | |
if( NULL == msg ){ | |
return -1; | |
} | |
do{ | |
nbytes = recv(sock_fd,buffer + buffer_len,sizeof(struct sm_msg) - buffer_len,MSG_WAITALL); |
NewerOlder