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
A[] = { 28, 39, 48, 27, 9, 88, 11, 4, 7} // Global variable, disregard bad programming practices | |
Function Split(int low, int hi){ // Adding brackets because not only am I used to java, it should help readability | |
if (hi - low) < 2 then | |
return array of elements from [low, hi] | |
mid = (hi + low) / 2 | |
B[] = split(low, mid-1) // Either I do mid-1 or mid+1, the results seem the same | |
C[] = split(mid, hi) // Same problems as above | |
D[] = Merge(B[], C[]) | |
return D[] |
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 <stddef.h> | |
#include <stdio.h> | |
#include <signal.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/un.h> | |
#include <unistd.h> | |
#include "client.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
/* | |
* File: main.c | |
* Author: theif519 | |
* | |
* Created on March 27, 2015, 11:45 AM | |
*/ | |
#include <stddef.h> | |
#include <stdio.h> | |
#include <signal.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
/* | |
* File: client.h | |
* Author: theif519 | |
* | |
* Created on March 27, 2015, 1:37 PM | |
*/ | |
#ifndef CLIENT_H | |
#define CLIENT_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
/* | |
* File: server.h | |
* Author: theif519 | |
* | |
* Created on March 27, 2015, 1:27 PM | |
*/ | |
#ifndef SERVER_H | |
#define SERVER_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
#include "String_Utils.h" | |
#define BUF_SIZE 50 | |
int main(void){ | |
size_t iteration = 0; | |
char **array = malloc(sizeof(char *)); | |
char *temp = malloc(BUF_SIZE); | |
while(1) | |
{ | |
array[iteration] = malloc(BUF_SIZE); | |
memset(temp, 0, BUF_SIZE); |
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
01:14:39 PM: [VERBOSE](./Data_Structures/Linked_List/Linked_List.c:25) List_One: { 0, 5, 12, 6, 16, } Size: 5 | |
01:14:39 PM: [VERBOSE](./Data_Structures/Linked_List/Linked_List.c:25) List_One: { 0, 5, } Size: 2 | |
01:14:39 PM: [VERBOSE](./Data_Structures/Linked_List/Linked_List.c:25) List_One: { 0, } Size: 1 | |
01:14:39 PM: [VERBOSE](./Data_Structures/Linked_List/Linked_List.c:25) List_Two: { 5, } Size: 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
01:17:37 PM: [VERBOSE](./Data_Structures/Linked_List/Linked_List.c:25) List_One: { 0, 2, 18, 21, 28, } Size: 5 | |
01:17:37 PM: [VERBOSE](./Data_Structures/Linked_List/Linked_List.c:25) List_One: { 0, 2, } Size: 2 | |
01:17:37 PM: [VERBOSE](./Data_Structures/Linked_List/Linked_List.c:25) List_One: { 0, } Size: 1 | |
01:17:37 PM: [VERBOSE](./Data_Structures/Linked_List/Linked_List.c:25) List_Two: { 2, } Size: 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
/* | |
Interface which every GameObject must implement. | |
*/ | |
public interface GameObject { | |
// Called when an object needs to be updated. | |
void update(); | |
// Called when a collision was detected. The obj argument is the other object it collided with. | |
void onCollision(GameObject obj); | |
} |
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
public class RecorderService extends Service { | |
/** | |
* Enumerations used to describe the current state of the object, even | |
* having a direct string representation. For this example, my fragment has a | |
* text-view which is updated with each state change. | |
*/ | |
public enum RecorderState { | |
DEAD("Dead"), | |
ALIVE("Alive"), |
OlderNewer