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
'use strict'; | |
const stream = require('stream'); | |
const fs = require('fs'); | |
const tty = require('tty'); | |
const util = require('util'); | |
//use node.js' child process to spawn and set baudrates | |
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 <stdlib.h> | |
#include <stdint.h> | |
#include <stddef.h> | |
typedef void * (* class_ctor_t)(void *); | |
typedef struct Class Class_t; | |
typedef struct ClassImpl |
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 <stdbool.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define ASIZE 50 | |
char arr[(ASIZE + 1)]; | |
bool k_cmp_chr(char c1, char c2) | |
{ |
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 <sys/select.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
void fd_set_v2(unsigned int fd, | |
fd_set *fds, | |
unsigned int *max_fd) | |
{ | |
if(!(fds && max_fd)) return; |
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
//Jan 4 2009 | |
#include <netdb.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int send_datagram(char* dstaddr, int dstport, char* buffer) { |
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 <stdlib.h> | |
#include <stdarg.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#undef DEBUG_VERBOSE | |
void debug_print(char *fmt, ...) |
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
//convenient method when working with nibs.. | |
//should be used within a view controller subclass | |
//name your nib the same as your view controller class name | |
//this will load it given it's in the main bundle, and | |
//it will append a child to the view in context (inView:) | |
//if view is nil, obviously it will not add a subview | |
//but the view controller will still be added as a child. | |
//did not bother to implement as a UIViewController category, | |
//minor error testing but worked without issue for my intended use. |
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
//simple btree done as an exmaple | |
//not all null pointers checked, incomplete EXAMPLE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#define myassert(x, y) printf(y); assert(x); | |
//btree consists of a search, insert and delete. |
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
/** | |
* @author tjhv | |
* @version 1.2, 09/18/2008 | |
* @since 1.0 | |
*/ | |
import java.nio.ByteBuffer; | |
import java.nio.channels.FileChannel; | |
import java.nio.channels.ServerSocketChannel; |
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
//jan 21 2009 | |
<?php | |
class Client | |
{ | |
var $server; | |
function server($dstaddr=NULL) | |
{ | |
if (!$dstaddr) | |
{ |
OlderNewer