repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
haribo0915/Judge-Girl
Judger/CC-Profiler-Sandbox/profiler.h
#ifndef JUDGER_PROFILER_H #define JUDGER_PROFILER_H #include <sys/types.h> #include <stdio.h> // (ver >> 16) & 0xff, (ver >> 8) & 0xff, ver & 0xff -> real version #define VERSION 0x020101 #define UNLIMITED -1 #define LOG_ERROR(error_code) LOG_FATAL(submission_id, log_fp, "Error: "#error_code); #define ERROR_EXIT(...
haribo0915/Judge-Girl
Judger/judgeCases/10017/AC/submitted/a.c
#include <stdio.h> #include <stdlib.h> int pos[2][50000][2]; int main(void) { int n; scanf("%d", &n); for (int i=0; i<n; i++) { int x1, x2, y1, y2; scanf("%d%d", &x1, &y1); scanf("%d%d", &x2, &y2); pos[0][i][0]=x1, pos[0][i][1]=y1; pos[1][i][0]=x2, pos[1][i][1]=y2; ...
haribo0915/Judge-Girl
Judger/CC-Profiler-Sandbox/profiler.c
#define _GNU_SOURCE #define _POSIX_SOURCE #include <libgen.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sched.h> #include <signal.h> #include <pthread.h> #include <errno.h> #include <unistd.h> #include <sys/wait.h> #include <sys/time.h> #include <sys/resource.h> #include <sys/types.h> #incl...
haribo0915/Judge-Girl
Commons/src/test/resources/test/B/main.c
#include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <assert.h> #ifdef __APPLE__ #include <OpenCL/opencl.h> #else #include <CL/cl.h> #endif #define MAX_GPU (0x8) #define MAX_SOURCE_SIZE (0x100000) #define DEVICENUM (0x2) #define MAX_INPUT (20000) int main(void) { // Create the two input vecto...
haribo0915/Judge-Girl
Commons/src/test/resources/test/A/debug.c
<filename>Commons/src/test/resources/test/A/debug.c<gh_stars>10-100 #define CL_USE_DEPRECATED_OPENCL_2_0_APIS #include <stdio.h> #include <assert.h> #include <CL/cl.h> #define MAXGPU 10 #define MAXK 1024 #define N (1024 * 1024) /* main */ int main(int argc, char *argv[]) { // printf("Hello, OpenCL\n"); cl_int s...
4dot/Arumdaun
Arumdaun/Util/Bridging-Header.h
// // Use this file to import your target's public headers that you would like to expose to Swift. // #ifndef Bridging_Header_h #define Bridging_Header_h #import <CCBottomRefreshControl/UIScrollView+BottomRefreshControl.h> #import "Woopra/WTracker.h" #endif
xueyang97/umz201-hardwaretest-linux
testcmd/play.h
<gh_stars>0 #ifndef __PLAY_H__ #define __PLAY_H__ #include "test.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <termios.h> #include <errno.h> #include <limits.h> #include <asm/ioctls.h> #include <time.h> #include <pthread...
xueyang97/umz201-hardwaretest-linux
lib/libiom.h
#ifndef __LIBIOM_H_ #define __LIBIOM_H_ #include "../src/shell.h" #ifndef __STRING #define __STRING #x #endif #define __STRING_NAME(x) __STRING(x) int printfs(const char *fmt, ...); int vsprintfs(char *buffer, const char *fmt, ...); int systems(char *cmd); #endif /* !__LIBIOM_H_ */
xueyang97/umz201-hardwaretest-linux
qmi/modemtool.h
<reponame>xueyang97/umz201-hardwaretest-linux #ifndef __MODEMTOOL_H__ #define __MODEMTOOL_H__ #include "../lib/libiom.h" int main_t(int argc, const char *argv[]); extern int qmi_test_imei(int argc, char *argv[]); extern int qmi_test_lte(int argc, char *argv[]); #endif /* !__MODEMTOOL_H__ */
xueyang97/umz201-hardwaretest-linux
lib/libsystem.c
#include "libsystem.h" struct pid_tl { pid_t pid; struct pid_tl *next; }; struct pid_tl *haed_pid = NULL; static int pid_add_new(struct pid_tl **pidl, int pid) ; static int pid_delete(struct pid_tl **pidl, int pid) ; int systemos(const char *cmdstring) { pid_t pid; int status; if (cmdstring == N...
xueyang97/umz201-hardwaretest-linux
testcmd/serial.c
#include "serial.h" int usart_test(int argc, char *argv[]) { if (argc == 1 || argc > 3) { printfs("parameters error. example : %s /dev/ttyUSB0 [times]\n", __STRING_NAME(USART_CMD_NAME)); return 1; } int usartfd; if ((usartfd = libuart_open(argv[1])) < 0) { retu...
xueyang97/umz201-hardwaretest-linux
lib/libuart.c
#include "libuart.h" static void __libuart_set_baudrate(int fd, struct termios *operate, int baudrate); static void __libuart_set_termios_bits(struct termios *operate, int bits); static void __libuart_set_termios_parity(struct termios *operate, int parity); static void __libuart_set_termios_stop(struct termios *operat...
xueyang97/umz201-hardwaretest-linux
src/shell_ext.h
/** * @file shell_ext.h * @author Letter (<EMAIL>) * @brief shell extensions * @version 3.0.0 * @date 2019-12-31 * * @Copyright (c) 2019 Letter * */ #ifndef __SHELL_EXT_H__ #define __SHELL_EXT_H__ #include "shell.h" /* 定义键盘按键的键值 大端模式 */ #define SHELL_KEY_VALUE_UP <KEY> #define SHELL_KEY_VALUE_DOWN ...
xueyang97/umz201-hardwaretest-linux
testcmd/usbnum.c
<filename>testcmd/usbnum.c #include "usbnum.h" int test_usbnum(int argc, char *argv[]) { if (argc != 2) { printfs("parameters error. example : %s num(4)\n", __STRING_NAME(USBNUB_CMD_NAME)); return 1; } char buffer[1024*2]; int usbnum = 0, retval = 0; if ((retval = s...
xueyang97/umz201-hardwaretest-linux
src/terminal.c
<reponame>xueyang97/umz201-hardwaretest-linux #include "terminal.h" int printfColor(Shell *shell, char *color, const char *fmt, ...) { SHELL_ASSERT(shell, return 0); char buffer[SHELL_PRINT_BUFFER]; // int buffer_length = 0; shellWriteString(shell, color); va_list vargs; va_start(vargs, fmt...
xueyang97/umz201-hardwaretest-linux
testcmd/play.c
#include "play.h" static int __speaker_play_on(void *wav); static int __speaker_running = 0; pthread_t play_p; int test_speaker(int argc, char *argv[]) { if (argc != 3) { printfs("parameters error. example : %s /sdcard/play.wav on/off\n", __STRING_NAME(PLAY_CMD_NAME)); return 1; ...
xueyang97/umz201-hardwaretest-linux
lib/libsystem.h
#ifndef __LIBSYSTEM_H__ #define __LIBSYSTEM_H__ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <sys/wait.h> #include <errno.h> int systemos(const char *cmdstring); int systemosp(const char *cmdstring, char *buf, s...
xueyang97/umz201-hardwaretest-linux
src/shell_cmd_list.c
<reponame>xueyang97/umz201-hardwaretest-linux<filename>src/shell_cmd_list.c /** * @file shell_cmd_list.c * @author Letter (<EMAIL>) * @brief shell cmd list * @version 3.0.0 * @date 2020-01-17 * * @copyright (c) 2020 Letter * */ #include "shell.h" #include "shell_ext.h" #if SHELL_USING_CMD_EXPORT != 1 exte...
xueyang97/umz201-hardwaretest-linux
testcmd/test.h
<reponame>xueyang97/umz201-hardwaretest-linux #ifndef __TEST_H_ #define __TEST_H_ #include "../lib/libiom.h" #include "../lib/libuart.h" #include "../lib/libsystem.h" #include "../lib/libstring.h" #include "serial.h" #define USART_CMD_NAME testuart #define USART_TEST_STRING "testuart" #define USART_TEST_LENGTH...
xueyang97/umz201-hardwaretest-linux
main.c
<reponame>xueyang97/umz201-hardwaretest-linux<gh_stars>0 #include "./src/shell.h" #include <stdio.h> #include <stdint.h> #include <string.h> #include <termios.h> #include <unistd.h> #include <errno.h> Shell shell; char shellBuffer[1024]; #if SHELL_TERMINAL_IO_MODE == 0 int terminal_init(void *arg) { return 0; } ...
xueyang97/umz201-hardwaretest-linux
src/terminal.h
#ifndef __TERMINAL__ #define __TERMINAL__ #include <stdio.h> #include <stdarg.h> #include <string.h> #include <stdint.h> #include <termios.h> #include <unistd.h> #include <errno.h> #include "shell.h" #define NONE "\e[0m" #define BLACK "\e[0;30m" #define L_BLACK "\e[1;30m" ...
xueyang97/umz201-hardwaretest-linux
testcmd/serial.h
#ifndef __SERIAL_H_ #define __SERIAL_H_ #include "../lib/libiom.h" #include "../lib/libuart.h" #include "test.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <termios.h> #include <errno.h> #include <limits.h> #include <asm/...
xueyang97/umz201-hardwaretest-linux
testcmd/usbnum.h
#ifndef __USBNUME_H__ #define __USBNUME_H__ #include "test.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <termios.h> #include <errno.h> #include <limits.h> #include <asm/ioctls.h> #include <time.h> #include <pthread.h> #i...
xueyang97/umz201-hardwaretest-linux
lib/libuart.h
<gh_stars>0 #ifndef __LIBUART_H__ #define __LIBUART_H__ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <termios.h> #include <errno.h> #include <limits.h> #include <asm/ioctls.h> #include <time.h> #include <pthread.h> #include ...
xueyang97/umz201-hardwaretest-linux
qmi/modemtool.c
<reponame>xueyang97/umz201-hardwaretest-linux #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <pthread.h> #include <time.h> #include <stdbool.h> #include <qmi.h> #include <string.h> #include "qmi_client.h" #include "qmi_client_instance_defs.h" #include "qmi_cci_target_ext.h" #in...
xueyang97/umz201-hardwaretest-linux
cmd/hello.c
<filename>cmd/hello.c #include "hello.h" int hello(int argc, char *argv[]) { for (int i = 0; i < argc; i++) { printfs("param[%d] = %s\n", i, argv[i]); } return 0; }
xueyang97/umz201-hardwaretest-linux
lib/libiom.c
#include "libiom.h" int printfs(const char *fmt, ...) { Shell *shell = shellGetCurrent(); SHELL_ASSERT(shell, return 0); char buffer[SHELL_PRINT_BUFFER]; va_list vargs; va_start(vargs, fmt); vsnprintf(buffer, SHELL_PRINT_BUFFER - 1, fmt, vargs); va_end(vargs); return (int)shellWr...
xueyang97/umz201-hardwaretest-linux
lib/libstring.c
<filename>lib/libstring.c<gh_stars>0 #include "libstring.h" int findstr(const char *str, const char *substr) { int count = 0,i,j,check; int len = strlen(str); int sublen = strlen(substr); for(i = 0; i < len; i++) { check = 1; for(j = 0; j + i < len && j < sublen; j++) { ...
xueyang97/umz201-hardwaretest-linux
cmd/hello.h
<filename>cmd/hello.h #ifndef __HELLO_H_ #define __HELLO_H_ #include "../lib/libiom.h" extern int hello(int argc, char *argv[]); #endif /* !__HELLO_H_ */
xueyang97/umz201-hardwaretest-linux
qmi/dtiot_hal_qmi.h
/* * @Author: chuen.hce * @Date: 2020-07-23 14:40:22 * @LastEditTime: 2020-07-28 22:04:30 * @LastEditors: Please set LastEditors * @Description: bt hal interface * @FilePath: dtiot_hal_bt.h */ #ifndef __DT_HAL_FOURTH_GENERATION__ #define __DT_HAL_FOURTH_GENERATION__ #if defined(__cplusplus) /* If this is a...
xueyang97/umz201-hardwaretest-linux
qmi/dtiot_hal_qmi.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <pthread.h> #include <time.h> #include <stdbool.h> #include <qmi.h> #include <string.h> #include <cutils/properties.h> #include "common_log.h" #include "qmi_client.h" #include "qmi_client_instance_defs.h" #include "qmi_cci_target_e...
xueyang97/umz201-hardwaretest-linux
lib/libstring.h
#ifndef __LIBSTRING_H_ #define __LIBSTRING_H_ #include "../src/shell.h" #include <string.h> int findstr(const char *str, const char *substr); #endif /* !__LIBSTRING_H_ */
Daniel-McCarthy/Net-Hash
Source/Non-Net/C++/Hash/Hasher/FNV.h
<reponame>Daniel-McCarthy/Net-Hash<filename>Source/Non-Net/C++/Hash/Hasher/FNV.h #pragma once static class FNV { public: static const unsigned int fnv032Prime = 16777619; static const unsigned int fnv132Prime = 16777619; static const unsigned int fnv132Offset = 0x811C9DC5; static int fnv0_32Hash(unsigned char me...
blackyau/Learn_C
linked_double_loop.c
// 双向循环链表 #include<stdio.h> #include<stdlib.h> typedef struct node { struct node* prior; int value; struct node* next; }node; static node head_data; static node* head = &head_data; // 定义head全局指针 // 在L链表中的index位置插入值为data的节点,now_index为传入节点的下标位置,如果不带则默认传入的是头节点 void insert(node* L, int index, int data, int now_index)...
blackyau/Learn_C
tree_search.c
<filename>tree_search.c // 查找二叉树(左子树中的每个节点的值,都要小于这个节点的值,而右子树节点的值都大于这个节点的值) #include<stdio.h> #include<stdlib.h> #include<math.h> typedef struct node { struct node* left; int value; struct node* right; }node; static struct node head_data = {NULL, 33, NULL}; // 初始化 head static node* head = &head_data; // 初始化 head 指针...
blackyau/Learn_C
linked_single_init_head.c
//单链表 初始化 头节点 #include <stdio.h> #include <stdlib.h> typedef struct { // 定义链表结构体 int value; // 该节点的值 struct node* next; // 下一节点 } node; void main() { node* head = (node*)malloc(sizeof(node)); // 初始化头节点 node* a = head; // 使用头节点的指针,初始化指针 a // 为了保持头节点不改变,所以下面的操作都用指针 a 进行 for (int i = 1; i < 5; i++) { node* temp ...
blackyau/Learn_C
sort_select.c
#include<stdio.h> void sort_select(int list[], int n); void main() { int list[6] = { 4, 5, 6, 1, 3, 2 }; for (int i = 0; i < 6; i++) printf("%d ", list[i]); sort_select(list, 6); printf("\n"); for (int i = 0; i < 6; i++) printf("%d ", list[i]); } // 在未排序区域中寻找一个最小的,放在排序区域的最后面 // 选择排序,传入数组和长度 void sort_select(int...
blackyau/Learn_C
linked_loop.c
<reponame>blackyau/Learn_C // 单链表 循环链表 #include<stdio.h> #include<stdlib.h> struct node { int value; struct node* next; }; int insert(struct node* head, int index, int in); // 在值为 index 的节点后面插入值为 in 的节点,返回 1 为插入成功,0 为未插入 int rm(struct node* head, int index); // 删除值为 index 的节点,1 为成功删除一个节点,0 为未删除任何节点 void show(struct ...
blackyau/Learn_C
sort_insert.c
<gh_stars>0 // 插入排序 #include<stdio.h> void sort_insert(int list[], int n); // n为长度 void main() { int n = 6; int list[6] = { 4, 5, 6, 1, 3, 2 }; for (int i = 0; i < n; i++) printf("%d ", list[i]); printf("\n"); sort_insert(list, n); for (int i = 0; i < n; i++) printf("%d ", list[i]); } // 将数组分为两部分:已排序区域、未排序...
blackyau/Learn_C
sort_shell.c
<reponame>blackyau/Learn_C // 希尔排序 #include<stdio.h> void sort_shell(int list[], int n); void main() { int list[16] = { 10, 14, 73, 25, 23, 13, 27, 94, 33, 39, 25, 59, 94, 65, 82, 45 }; for (int i = 0; i < 16; i++) printf("%d ", list[i]); sort_shell(list, 16); printf("\n"); for (int i = 0; i < 16; i++) printf("%...
blackyau/Learn_C
sort_merge.c
<gh_stars>0 // 归并排序 #include<stdio.h> #include<stdlib.h> #include<string.h> void sort_merge(int list[], int n); // 初始化入口 void sort_merge_c(int a[], int p, int r); // 递归调用函数 void merge(int arr[], int p, int q, int r); // 合并函数 void main() { int list[6] = { 1, 5, 6, 2, 3, 4 }; for (int i = 0; i < 6; i++) printf("%d ",...
blackyau/Learn_C
sort_quick.c
#include<stdio.h> // 快速排序 // 取任意一位数(本程序中为最后一位)将比它小的数放在左边,比它大的数放在右边 void sort_quick(int a[], int n); // 快速排序入口函数 void sort_quick_c(int a[], int p, int r); // 递归函数 int partition(int a[], int p, int r); // 分区函数 void show(int a[], int n); // 打印整个数组 void swap(int* a, int* b); // 交换两个指针的值 main() { int list[7] = { 8, 10, 2...
blackyau/Learn_C
linked_single_find_del.c
<filename>linked_single_find_del.c //单链表 查找数值 删除指定值的节点 #include<stdio.h> #include<stdlib.h> struct node{ int value; struct node* next; }; //先写函数原型,后面再写函数定义(主体) struct node* find_index(struct node* head, int index); // 传入头节点指针和要查找的值,返回匹配的节点指针 void rm(struct node* head, int value); // 传入头节点指针和要删除的值 void show(struct n...
blackyau/Learn_C
queue_array.c
<gh_stars>0 // 顺序队列 #include<stdio.h> static int items[6]; static int n=6; // 队列长度 static int head = 0; static int tail = 0; int enqueue(int data); // 入队 int dequeue(); // 出队 void show(); // 打印整个数组,用来观察内部数据变化 void main() { for (int i = 0; i < n; i++) { enqueue(i); } show(); printf("dequeue num:"); for (int i ...
blackyau/Learn_C
tree_order.c
// 数的前序、中序、后续遍历 #include<stdio.h> #include<stdlib.h> typedef struct node { struct node* left; struct node* right; char value; }node; void initTree(node* root, int data, int chilData); // 初始化根和左右子树 void preOrder(node* root); // 前序遍历 void inOrder(node* root); // 中序遍历 void pastOrder(node* root); // 后序遍历 void countLea...
blackyau/Learn_C
tree_huffman.c
<gh_stars>0 // Huffman 树 #include<stdio.h> #include<stdlib.h> #define SIZE 6 typedef struct node { char key; // 字符 int weight; // 权重 struct node* father; // 父节点 struct node* left; // 左节点 struct node* right; // 右节点 }node; // 创建 Huffman 树,返回头节点。传入参数依次为:节点指针数组、字符数组、权重数组、数组长度 node* create(node* node_list[], char key...
blackyau/Learn_C
linked_double.c
<filename>linked_double.c // 双向链表 // TODO 任意位置插入 删除 #include<stdio.h> #include<stdlib.h> typedef struct Node { struct Node* prior; int value; struct Node* next; }Node; static Node head_data; static Node* head = &head_data; // 头节点全局变量 static int now = 0; // 从head开始数起,当前指针指向第几个节点 Node* InitNode(Node *L, int data); //...
blackyau/Learn_C
stack_array.c
// 顺序栈 数组 #include<stdio.h> static int items[6]; // 用来装数据 static int len = 6; // 数组的长度 static int count = 0; // 数组中有多少个数据 int push(int data); // 向栈内插入data,返回0则失败,非0则成功 int pop(); // 返回栈顶的数 void main() { // len+1是为了模拟溢出时的处理是否正常 for (int i = 0; i < len+1; i++) { printf("%d ", push(i)); } printf("\n"); for (int ...
blackyau/Learn_C
sort_bubble.c
<filename>sort_bubble.c // 冒泡排序 #include<stdio.h> #define LEN 7 void sortBubble(int array[], int len); void main() { int array[LEN] = {4, 5, 6, 3, 2, 1}; for (int i = 0; i < LEN; i++) { printf("%d ", array[i]); } printf("\n"); sortBubble(array, LEN); for (int i = 0; i < LEN; i++) { printf("%d ", array[i]); ...
blackyau/Learn_C
stack_linked.c
<gh_stars>0 // 链式栈 #include<stdio.h> #include<stdlib.h> typedef struct node { int value; struct node* next; }node; int push(node* stack, int data); // 向stack节点后面添加一个值为data的节点,返回0失败,非0成功 int pop(node* stack); // 弹出栈顶的值,如果为0则弹出失败,非零则成功 void main() { node* stack = (node*)malloc(sizeof(node)); stack->next = NULL; f...
blackyau/Learn_C
queue_linked.c
// 链式队列 #include<stdio.h> #include<stdlib.h> typedef struct node { int value; struct node* next; }node; // 初始化 static node tail_data = { 0, NULL }; static node head_data = { 0, &tail_data }; static node* head = &head_data; static node* tail = &tail_data; void enqueue(int data); // 入队 int dequeue(int *data); // 出队 ...
tmsavage/OperatingSystems_PA2
userTester.c
<filename>userTester.c<gh_stars>0 #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <unistd.h> static char *buffer; int main() { buffer = malloc(sizeof(char)*1024); int readerInt; int writerInt; char str[1024]; size_t numByt...
tmsavage/OperatingSystems_PA2
part2Device.c
<reponame>tmsavage/OperatingSystems_PA2 #include<linux/init.h> #include<linux/module.h> #include<linux/fs.h> #include<linux/slab.h> #include<linux/uaccess.h> #define BUFFER_SIZE 1024 static int openCounter = 0; static int closeCounter = 0; static char *device_buffer; ssize_t pa2_char_driver_read (struct file *pfil...
WangTonio/bbb
Classes/Bubble.h
<reponame>WangTonio/bbb // // PhysicsBody.h // BubbleBlitz // // Created by <NAME> on 6/7/11. // Copyright 2011 Student: UC Merced. All rights reserved. // #import "cocos2d.h" #import "Box2D.h" enum bubble_colors { RED_BUBBLE, BLUE_BUBBLE }; @interface Bubble : CCNode { CCSprite* sprite; b2Body* b; ...
WangTonio/bbb
Classes/GameConfig.h
// // GameConfig.h // BubbleBlitz // // Created by <NAME> on 12/31/10. // Copyright Student: UC Merced 2010. All rights reserved. // #ifndef __GAME_CONFIG_H #define __GAME_CONFIG_H // // Supported Autorotations: // None, // UIViewController, // CCDirector // #define kGameAutorotationNone 0 #define kGameAutorot...
WangTonio/bbb
Classes/IntegerNode.h
#import <Foundation/Foundation.h> @class IntegerNode; @interface IntegerOperator: NSObject { IntegerNode *leftOperand,*rightOperand; NSString *opString; } - (id) initNode:(IntegerNode*) node; - (NSString *) getResultString; @end @interface IntegerNode : NSObject { int depth; int val; IntegerNod...
WangTonio/bbb
Classes/RootViewController.h
<filename>Classes/RootViewController.h // // RootViewController.h // BubbleBlitz // // Created by <NAME> on 12/31/10. // Copyright Student: UC Merced 2010. All rights reserved. // #import <UIKit/UIKit.h> @interface RootViewController : UIViewController { } @end
WangTonio/bbb
Classes/SoundLayer.h
// // HelloWorldScene.h // SolAPG // // Created by <NAME> on 10/25/10. // Copyright Student: UC Merced 2010. All rights reserved. // // When you import this file, you import all the cocos2d classes #import "cocos2d.h" #import "CDAudioManager.h" enum sounds { POP_SOUND = 0, PUNCH_SOUND, EXPLOSION_SOU...
WangTonio/bbb
Classes/WavePool.h
<gh_stars>0 // // WavePool.h // BubbleBlitz // // Created by <NAME> on 1/22/11. // Copyright 2011 Student: UC Merced. All rights reserved. // #import "cocos2d.h" @interface Wave : NSObject { CGPoint origin; int radius; int height; int waveWidth; int maxRadius; //this is the maximum size of the ripple ...
WangTonio/bbb
Classes/BubbleBlitzAppDelegate.h
// // BubbleBlitzAppDelegate.h // BubbleBlitz // // Created by <NAME> on 12/31/10. // Copyright Student: UC Merced 2010. All rights reserved. // #import <UIKit/UIKit.h> @class RootViewController; @interface BubbleBlitzAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; RootViewController *view...
WangTonio/bbb
Classes/BonusLabel.h
<reponame>WangTonio/bbb // // BonusLabel.h // BubbleBlitz // // Created by <NAME> on 6/10/11. // Copyright 2011 Student: UC Merced. All rights reserved. // #import <Foundation/Foundation.h> #import "cocos2d.h" @interface BonusLabel : CCNode { CCLabelTTF* bonusLabel; float labelScale; } -(id)initWithP...
WangTonio/bbb
Classes/SettingScene.h
<reponame>WangTonio/bbb<filename>Classes/SettingScene.h<gh_stars>0 // // MenuScene.h // BubbleBlitz // // Created by <NAME> on 1/28/11. // Copyright 2011 Student: UC Merced. All rights reserved. // #import "cocos2d.h" // HelloWorld Layer @interface SettingScene : CCLayer { bool first; CCSprite* background; C...
WangTonio/bbb
Classes/MatchObject.h
// // Bubble.h // BubbleBlitz // // Created by <NAME> on 12/31/10. // Copyright 2010 Student: UC Merced. All rights reserved. // #import "cocos2d.h" #import "Box2D.h" #import "IntegerNode.h" //the MatchObject (not the best name I know) is represents one value to match it handles the touches and contains a group o...
WangTonio/bbb
Classes/GameLogic.h
<reponame>WangTonio/bbb // // GameLogic.h // BubbleBlitz // // Created by Kelvin on 6/25/11. // Copyright 2011 __MyCompanyName__. All rights reserved. // //#import "cocos2d.h" enum operators { ADDITION, SUBTRACTION, MULTIPlICATION, DIVISION, REMAINDER, FRACTION }; @interface GameLogic : N...
WangTonio/bbb
Classes/ToggleMenu.h
// // ToggleMenu.h // BubbleBlitz // // Created by <NAME> on 1/30/11. // Copyright 2011 Student: UC Merced. All rights reserved. // #import "cocos2d.h" @interface ToggleMenu : CCMenuItem { bool toggleOn; CCLabelTTF* label; NSString* labelString; } -(id)initWithString:(NSString*)string target:(id)t selector:(...
WangTonio/bbb
Classes/GameScene.h
// // HelloWorldScene.h // BubbleBlitz // // Created by <NAME> on 12/31/10. // Copyright Student: UC Merced 2010. All rights reserved. // // When you import this file, you import all the cocos2d classes #import "cocos2d.h" #import "Box2D.h" #import "GLES-Render.h" #import "GameConfig.h" #import "GameLogic.h" //P...
WangTonio/bbb
Classes/explosion.h
// // explosion.h // SolAPG // // Created by <NAME> on 10/31/10. // Copyright 2010 Student: UC Merced. All rights reserved. // #import "cocos2d.h" //! An explosion particle system @interface BlockExplosion : ARCH_OPTIMAL_PARTICLE_SYSTEM { } -(id)initAtPosition:(CGPoint)p; +(id)explosionAtPosition:(CGPoint)p ; @...
WangTonio/bbb
Classes/ValueMenu.h
<reponame>WangTonio/bbb // // ValueMenu.h // BubbleBlitz // // Created by <NAME> on 1/30/11. // Copyright 2011 Student: UC Merced. All rights reserved. // #import "cocos2d.h" @interface ValueMenu : CCMenuItem { } @end
Chandler-Lu/learning-data-structure
Huihui/Chapter 5/PreOrderTraverseTree.c
/* * @Description: 二叉树非递归先序遍历 * @version: 1.2 * @Author: <NAME> * @Date: 2019-08-23 00:03:56 * @LastEditTime: 2019-09-04 20:12:28 */ #include <stdio.h> #include <stdlib.h> #define MAXSIZE 15 #define OK 1 #define ERROR 0 typedef struct TreeNode { char data; struct TreeNode *lchild, *rchild; } TreeNode; typ...
Chandler-Lu/learning-data-structure
Huihui/Chapter 1/LearnTypedefStruct.c
<reponame>Chandler-Lu/learning-data-structure<gh_stars>1-10 #include <stdint.h> #include <stdio.h> int main(int argc, char *argv[]) { struct A { int num_1; } A1, *A1_p; typedef struct B { int num_2; } B1, *B1_p; B1 b1; // 此处 b1 与 A1 等价 printf("%lu\n", sizeof(A1)); printf("%lu\n", sizeof(B1)...
Chandler-Lu/learning-data-structure
Huihui/Chapter 7/BinaryInsertionSort.c
<reponame>Chandler-Lu/learning-data-structure<filename>Huihui/Chapter 7/BinaryInsertionSort.c /* * @Description: 折半插入排序(Binary Insertion Sort) * @version: 1.0 * @Author: <NAME> * @Date: 2019-10-05 20:40:42 * @LastEditTime: 2019-10-06 00:58:17 */ #include <stdio.h> #include <stdlib.h> void BinaryInsertionSort(in...
Chandler-Lu/learning-data-structure
Huihui/Chapter 3/SqQueue_Circular.c
/* * @Description: 循环队列(顺序表示) * @version: 1.0 * @Author: <NAME> * @Date: 2019-09-02 17:46:08 * @LastEditTime: 2019-09-02 18:13:12 */ #include <stdio.h> #include <stdlib.h> #define MAXSIZE 15 #define OK 1 #define ERROR 0 #define TRUE 1 #define FALSE 0 typedef struct SqQueue { int front, rear; int data[MAXSI...
Chandler-Lu/learning-data-structure
Huihui/Chapter 5/HappyMagpie.c
/* * @Description: 七夕快乐 * @version: 9.99 * @Author: <NAME> * @Date: 2018-03-09 10:59:39 * @LastEditTime: 2019-08-07 23:48:36 */ #include <stdio.h> #include <stdlib.h> typedef struct Node { char data; struct Node *lchild, *rchild; } Node; Node* init(char data) { Node *node = (Node *)malloc(sizeof(Node)); no...
Chandler-Lu/learning-data-structure
Huihui/Chapter 7/InsertionSort.c
/* * @Description: 直接插入排序(Insertion Sort) * @version: 1.0 * @Author: <NAME> * @Date: 2019-09-23 18:04:14 * @LastEditTime: 2019-09-23 18:07:29 */ #include <stdio.h> #include <stdlib.h> void InsertSort(int *, int); int main(int argc, char *argv[]) { int raw[] = {-15, 2, 6, 3, 8, 25, 108, 35, 919, 503}; int l...
Chandler-Lu/learning-data-structure
Huihui/Chapter 3/SqQueue.c
<filename>Huihui/Chapter 3/SqQueue.c /* * @Description: Sq-Queue(存在假溢出) * @version: 1.0 * @Author: <NAME> * @Date: 2019-08-11 23:44:40 * @LastEditTime: 2019-08-12 00:03:00 */ #include <stdio.h> #include <stdlib.h> #define ERROR 0 #define TRUE 1 #define MAXSIZE 10 typedef struct SqQueue { int data[MAXSIZE]; ...
Chandler-Lu/learning-data-structure
Huihui/Chapter 3/SqStack.c
/* * @Description: Sq-Stack * @version: 1.0 * @Author: <NAME> * @Date: 2019-08-08 22:21:15 * @LastEditTime: 2019-08-12 00:03:21 */ #include <stdio.h> #include <stdlib.h> #define ERROR 0 #define TRUE 1 #define MAXSIZE 20 typedef struct Stack { int top; int data[MAXSIZE]; } SqStack; int push(SqStack *, int)...
Chandler-Lu/learning-data-structure
Huihui/Chapter 2/Homework/01_FirstMissingPositive.c
/* * @Description: Huihui-Chapter 2-Homework-01 * @version: 1.0 * @Author: <NAME> * @Date: 2019-07-16 15:53:35 * @LastEditTime: 2019-07-17 09:12:49 */ #include <stdio.h> #include <stdlib.h> int FirstMissingPositive(int *, int); void swap(int *, int *); int main(int argc, char *argv[]) { // Test 1 int arr_1...
Chandler-Lu/learning-data-structure
Huihui/Chapter 2/Sequenatial List/UseReallocExpand.c
#include <stdio.h> #include <stdlib.h> #define ERROR 0 #define OK 1 #define OVERFLOW 0 typedef struct SqList { int length, size; int *data; } SqList; void init(SqList *SqList, int size) { SqList->data = (int *)malloc(sizeof(int) * size); if (!SqList->data) { exit(OVERFLOW); } SqList->length = 0; Sq...
Chandler-Lu/learning-data-structure
Huihui/Chapter 1/MemeRecursion.c
// 程序调用自身的编程技巧成为递归 (recursion) #include <stdio.h> void Recursion (int); int main(int argc, char *argv[]) { printf("吓得我抱起了"); Recursion(2); } void Recursion (int depth) { if (depth == 0) { printf("我的小鲤鱼"); printf("的我"); return; } printf("抱着"); Recursion(--depth); printf("的我"); }
Chandler-Lu/learning-data-structure
Huihui/Chapter 4/GetNext.c
/* * @Description: KMP algorithm - Get Next Array * @version: 1.1 * @Author: <NAME> * @Date: 2019-07-27 11:28:13 * @LastEditTime: 2019-08-06 11:47:23 */ #include <stdio.h> #include <stdlib.h> #include <string.h> void GetNext(char *, int *); int main(int argc, char *argv[]) { char p[] = "abababca"; int *nex...
Chandler-Lu/learning-data-structure
Huihui/Chapter 3/LinkQueue.c
<reponame>Chandler-Lu/learning-data-structure /* * @Description: 队列(链式表示) * @version: 1.0 * @Author: <NAME> * @Date: 2019-09-02 19:39:57 * @LastEditTime: 2019-09-02 21:23:26 */ #include <stdio.h> #include <stdlib.h> #define MAXSIZE 15 #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBL...
Chandler-Lu/learning-data-structure
Huihui/Exercise/P125-5-02.c
<gh_stars>1-10 /* * @Description: 2017-武汉科技大学(856)-算法设计 02 [整数 1 到 n 从小到大依次进栈,期间可以出栈,检查一序列是否为正确出栈序列] * @version: 1.0 * @Author: <NAME> * @Date: 2019-09-04 17:25:01 * @LastEditTime: 2019-09-04 20:22:17 */ #include <stdio.h> #include <stdlib.h> #define MAXSIZE 15 #define TRUE 1 #define FALSE 0 #define OK 1 #defin...
Chandler-Lu/learning-data-structure
Huihui/Chapter 4/kmp.c
<gh_stars>1-10 /* * @Description: Knuth–Morris–Pratt algorithm * @version: 1.0 * @Author: <NAME> * @Date: 2019-10-06 22:59:43 * @LastEditTime: 2019-10-07 00:49:16 */ #include <stdio.h> #include <string.h> #define SIZE 20 int kmp(char *, char *); int main(int argc, char *argv[]) { char S[SIZE] = "ABABBAAABAB...
Chandler-Lu/learning-data-structure
Huihui/Chapter 2/Homework/03_FindMinElemAndDelete.c
/* * @Description: Huihui-Chapter 2-Homework-03 * @version: 1.2 * @Author: <NAME> * @Date: 2019-07-17 18:29:53 * @LastEditTime: 2019-07-18 14:16:08 */ #include <stdio.h> #include <stdlib.h> #define OVERFLOW 0 typedef struct LNode { int data; struct LNode *next; } LNode, *LinkList; LinkList CreateLinkList(...
Chandler-Lu/learning-data-structure
Huihui/Exercise/P125-5-03.c
/* * @Description: 2017-武汉科技大学(856)-算法设计 03 [二叉树的层序遍历求高度] * @version: 1.0 * @Author: <NAME> * @Date: 2019-09-04 17:52:34 * @LastEditTime: 2019-09-04 20:14:46 */ #include <stdio.h> #include <stdlib.h> #define MAXSIZE 15 #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVE...
Chandler-Lu/learning-data-structure
Huihui/Chapter 5/BinaryTreeTraverse.c
/* * @Description: 二叉树的三种递归及其非递归遍历 * @version: 1.0 * @Author: <NAME> * @Date: 2019-09-01 17:51:14 * @LastEditTime: 2019-09-04 20:16:53 */ #include <stdio.h> #include <stdlib.h> #define MAXSIZE 15 #define OK 1 #define ERROR 0 typedef char ELEMTYPE; /* Declare Struction */ typedef struct TreeNode { ELEMTYPE d...
Chandler-Lu/learning-data-structure
Huihui/Chapter 7/Quicksort.c
<gh_stars>1-10 /* * @Description: 快速排序(Quick Sort) * @version: 1.0 * @Author: <NAME> * @Date: 2019-11-20 17:03:36 * @LastEditTime: 2019-11-20 19:43:14 */ #include <stdio.h> #include <stdlib.h> void Quicksort(int *, int, int); int main(int argc, char *argv[]) { int raw[] = {-15, 2, 6, 3, 8, 25, 108, 35, 919, ...
hungrybluedev/bump
include/bump/bump.h
<filename>include/bump/bump.h #ifndef BUMP_H #define BUMP_H #include <stdio.h> #include <stdlib.h> typedef struct version_struct { size_t major; size_t minor; size_t patch; } Version; typedef struct line_state_struct { const char *input; char *output; size_t input_index; size_t output_index; size_t l...
hungrybluedev/bump
src/bump/bump.c
<filename>src/bump/bump.c #include <bump/bump.h> #include <bump/fileutil.h> #include <ctype.h> #include <errno.h> #include <inttypes.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <string.h> char *initialize_version(Version *version, const size_t major, const size_t minor, const size_t patch) ...
hungrybluedev/bump
test/src/run-tests.c
#include <stdio.h> #include <bump/bump.h> #include <bump/version.h> #include <munit.h> #define MAX_LINE_WIDTH 256 /* * * UNIT TEST FUNCTIONS * =================== * * All unit tests are of the form: * * MunitResult <test_name>(const MunitParameter params[], * void *user_data_or_fixtu...
hungrybluedev/bump
src/main.c
#include <bump/bump.h> #include <bump/fileutil.h> #include <bump/version.h> #include <ctype.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_LINE_LENGTH 511 #define INCORRECT_USAGE "Incorrect usage. Type bump --help for more information." #define INTERMEDIATE_FILE "interme...
hungrybluedev/bump
include/bump/fileutil.h
<reponame>hungrybluedev/bump<gh_stars>1-10 #ifndef BUMP_FILEUTIL_H #define BUMP_FILEUTIL_H #include <stdio.h> #include <stdbool.h> bool file_is_valid(const char *input_path, const char *mode); char *read_line(FILE *input, char *buffer, size_t *length, size_t limit); #endif//BUMP_FILEUTIL_H
hungrybluedev/bump
src/bump/fileutil.c
<reponame>hungrybluedev/bump<gh_stars>1-10 #include <bump/fileutil.h> #include <memory.h> #include <stdbool.h> #include <stdio.h> bool file_is_valid(const char *input_path, const char *mode) { FILE *input_file = fopen(input_path, mode); bool result = input_file != NULL; if (result) { if (ferror(input_file)) ...
hungrybluedev/bump
include/bump/version.h
<gh_stars>1-10 #ifndef VERSION_H #define VERSION_H #define BUMP_VERSION "0.1.4" #endif//VERSION_H
Intuz-production/Push-Helper-iOS
INPushNotification/Pods/Target Support Files/FirebaseInAppMessagingDisplay/FirebaseInAppMessagingDisplay-umbrella.h
<filename>INPushNotification/Pods/Target Support Files/FirebaseInAppMessagingDisplay/FirebaseInAppMessagingDisplay-umbrella.h #ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif ...
YaoJuan/CYLTabBarController
Example/Classes/Module/SameCity/CYLDetailsViewController.h
<filename>Example/Classes/Module/SameCity/CYLDetailsViewController.h // // CYLDetailsViewController.h // CYLTabBarController // // v1.16.0 Created by <NAME> on 11/8/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface CYLDetailsViewController : UIViewController @end
f00f/shake-o-meter-arduino
DataRecorder.h
<gh_stars>0 // ------------ // Arduino firmware to detect vibrations of a laundry machine - and when it's finished. // License: MIT // Github: https://github.com/f00f/shake-o-meter-arduino // ------------ #if !defined(DataRecorder_h) #define DataRecorder_h #if ARDUINO >= 100 #include "Arduino.h" #else #include...
SteveNguyen/Firmware
src/drivers/px4fmu/fmu_params.c
<reponame>SteveNguyen/Firmware<filename>src/drivers/px4fmu/fmu_params.c /** * @file fmu_params.cpp * * Parameters defined by the fmu module. * */ #include <px4_config.h> #include <parameters/param.h> /** * rotor_0[0] * * @group Geometry */ PARAM_DEFINE_FLOAT(ROTOR_0_0, 0.0); /** * rotor_0[1] * * @group ...
SteveNguyen/Firmware
src/examples/px4_communication_app/px4_recpt_start_daemon.c
/**************************************************************************** * * Copyright (C) 2014 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistri...
SteveNguyen/Firmware
src/examples/px4_communication_app/px4_recpt_app.c
<filename>src/examples/px4_communication_app/px4_recpt_app.c<gh_stars>0 /**************************************************************************** * * Copyright (c) 2012-2016 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are p...