repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
ooooo-youwillsee/leetcode
0118-Pascals-Triangle/cpp_0118/Solution1.h
<reponame>ooooo-youwillsee/leetcode // // Created by ooooo on 2020/1/6. // #ifndef CPP_0118_SOLUTION1_H #define CPP_0118_SOLUTION1_H #include <iostream> #include <vector> using namespace std; class Solution { public: vector<vector<int>> generate(int numRows) { if (numRows == 0) return {}; vector<...
MihawkHu/Android_scheduler
kernel/goldfish/include/generated/compile.h
<reponame>MihawkHu/Android_scheduler<gh_stars>1-10 /* This file is auto generated, version 74 */ /* PREEMPT */ #define UTS_MACHINE "arm" #define UTS_VERSION "#74 PREEMPT Tue May 24 16:58:10 CST 2016" #define LINUX_COMPILE_BY "mihawk" #define LINUX_COMPILE_HOST "GG" #define LINUX_COMPILER "gcc version 4.9 20150123 (pre...
MihawkHu/Android_scheduler
psinfo/psinfo.c
/* This program is used to print the process information. The result will display by a chart. The meanings of each row are process name, process pid, process scheduler policy, process priority, process normal priority, process real time priority To implement this program, I use the syscall that I wrote in pro...
MihawkHu/Android_scheduler
cas/cas.c
/* This program is used to change the scheduler of processes. According to different parameter, this program can change the scheduler of one process itself or all descendants of it. You can also appoint priority of the process. To implement this program, I use the syscall that I write in the first project. But this t...
MihawkHu/Android_scheduler
test/test.c
/* This program is a easy time cost program. It is used to compete with processtest. The print value of this program is the execution time of itself. */ #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <time.h> #include <math.h> int main() { double tt = clock(); // some calculation to c...
MihawkHu/Android_scheduler
sys_mycall/sys_mycall.c
/* This program add a new system call to the avd. It is similar with the system call that I write in project 1. The difference is that I add more information included process priorities and scheduler policy. Type #insmod sys_mycall.ko# in adb shell and then you can use this system call. */ #include <linux/init.h> #i...
MihawkHu/Android_scheduler
kernel/goldfish/include/generated/autoconf.h
/* * * Automatically generated file; DO NOT EDIT. * Linux/arm 3.4.67 Kernel Configuration * */ #define CONFIG_RING_BUFFER 1 #define CONFIG_NF_CONNTRACK_H323 1 #define CONFIG_HAVE_ARCH_SECCOMP_FILTER 1 #define CONFIG_KERNEL_GZIP 1 #define CONFIG_INPUT_KEYBOARD 1 #define CONFIG_IP_NF_TARGET_REDIRECT 1 #define CONFIG...
jweinst1/GoldScript
test/test_gs-item.c
#include "gs-item.h" #include <stdlib.h> static unsigned failures = 0; #define CHECK(cond) if(!(cond) && ++failures) \ fprintf(stderr, "FAILURE: expression '%s', line %u\n", #cond, (unsigned)__LINE__) static void test_golds_item_new_num(void) { golds_item_t* i1; i1 = golds_item_new_num(45.6); ...
jweinst1/GoldScript
src/gs-linked.h
#ifndef SRC_GOLDSCRIPT_LINKED_H #define SRC_GOLDSCRIPT_LINKED_H #include "gs-memory.h" /** * @file This file provides an inheritable interface of a singly linked list. */ #define GOLDSCRIPT_LINKED_SYMBOL __gs_link #define GOLDSCRIPT_LINKED_HEAD \ int type; \ struct GOLDSCRIPT_LINKE...
jweinst1/GoldScript
src/gs-parse.c
<filename>src/gs-parse.c #include "gs-parse.h" #define CASES_WHITE_SPACE \ case ' ': \ case '\n': \ case '\t': static golds_item_t* _golds_parse_item(golds_parser_t* prs) { golds_item_t* parsed = NULL; while(!prs->stop && !prs->has_err) { switch(*(prs->data)) ...
jweinst1/GoldScript
src/compiler-info.h
#ifndef SRC_GOLDSCIRPT_COMPILER_INFO_H #define SRC_GOLDSCIRPT_COMPILER_INFO_H #if defined(__STDC__) # if defined(__STDC_VERSION__) # if (__STDC_VERSION__ >= 199409L) # if (__STDC_VERSION__ >= 199901L) # if (__STDC_VERSION__ >= 201112L) # define GOLDSCRIPT_CVERS_11 # else //...
jweinst1/GoldScript
test/test_gs-memory.c
#include "gs-memory.h" #include <stdlib.h> static unsigned failures = 0; #define CHECK(cond) if(!(cond) && ++failures) \ fprintf(stderr, "FAILURE: expression '%s', line %u\n", #cond, (unsigned)__LINE__) static void test_golds_mem_alloc(void) { void* p1 = NULL; void* p2 = NULL; p1 = golds_mem_mall...
jweinst1/GoldScript
src/gs-linked.c
#include "gs-linked.h" size_t golds_linked_len(golds_linked_t* lst) { size_t total = 0; while(lst != NULL) { total++; lst = lst->next; } return total; } void golds_linked_put(golds_linked_t* lst, golds_linked_t* item) { if(lst != NULL) { if(lst->next != NULL) { ...
jweinst1/GoldScript
src/gs-parse.h
<reponame>jweinst1/GoldScript<filename>src/gs-parse.h #ifndef SRC_GOLDSCRIPT_PARSE_H #define SRC_GOLDSCRIPT_PARSE_H #include "gs-item.h" #define GOLDSCRIPT_PARSER_MAX_ERR_LEN 256 /** * @brief Acts as a parser container and state based object. */ typedef struct { char err_mes[GOLDSCRIPT_PARSER_MAX_ERR_LEN]; ...
jweinst1/GoldScript
src/gs-memory.h
<reponame>jweinst1/GoldScript #ifndef SRC_GOLDSCRIPT_MEMORY_H #define SRC_GOLDSCRIPT_MEMORY_H #include <stdio.h> #include <stdlib.h> #include <string.h> #define GOLDSCRIPT_MEM_ERR_EXIT 3 /** * @brief Cross platform macro for advancing a void pointer. */ #define GOLDSCRIPT_MEM_ADV(ptr, amnt) ((unsigned char*)(ptr) +...
jweinst1/GoldScript
src/gs-item.h
<reponame>jweinst1/GoldScript #ifndef SRC_GOLDSCRIPT_ITEM_H #define SRC_GOLDSCRIPT_ITEM_H #include "gs-memory.h" #ifndef GOLDSCRIPT_MAX_STR_LEN #define GOLDSCRIPT_MAX_STR_LEN 25 #endif typedef enum { GOLDS_ITEM_TYPE_BOOL, GOLDS_ITEM_TYPE_NUMBER, GOLDS_ITEM_TYPE_STR, GOLDS_ITEM_TYPE_LST_RULE, GOLD...
jweinst1/GoldScript
src/gs-memory.c
#include "gs-memory.h" #define _GOLDSCRIPT_MEM_CHECK(ptr, caller) if((ptr) == NULL) { \ fprintf(stderr, "Memory Error: Got NULL on call to '%s', exiting.\n", caller);\ exit(GOLDSCRIPT_MEM_ERR_EXIT);\ } void* golds_mem_malloc(size_t size) { void* ptr = malloc(size); _GOLDSCRIPT_MEM_CHECK(ptr, "goldscript_mem_mallo...
jweinst1/GoldScript
src/gs-item.c
<reponame>jweinst1/GoldScript<gh_stars>0 #include "gs-item.h" #include <assert.h> golds_item_t* golds_item_new_bool(int boolean) { golds_item_t* item = golds_mem_calloc(sizeof(golds_item_t)); item->type = GOLDS_ITEM_TYPE_BOOL; item->val._boolean = boolean; item->next = NULL; return item; } golds_...
zonca/aptpac
C-edition/src/main.c
<reponame>zonca/aptpac<gh_stars>0 /********************* MIT License Copyright (c) 2021 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation th...
CISVVC/cis208-expression-project-Sprigg-Matthew
main.c
<gh_stars>0 /* * file: main.c * main C program that uses assembly routine in prog.asm * to create executable: * gcc: gcc -m32 -o main main.c asm_main.o asm_io.o */ #include "cdecl.h" #include <stdio.h> #define A 2471 #define B 626 #define C 200 #define D 333 int PRE_CDECL asm_main( int a, int b, int c, int d) ...
NemoChenTW/Sample-FunctionPassing
LiveMsgTool/LiveMsgTool.h
<gh_stars>0 /* * LiveMsgTool.h * * Created on: 2015年12月15日 * Author: nemo */ #ifndef LIVEMSGTOOL_LIVEMSGTOOL_H_ #define LIVEMSGTOOL_LIVEMSGTOOL_H_ #include <string> #include <iostream> using namespace std; class LiveMsgTool { private: string msgEntry; string msgExit; public: LiveMsgTool(); virtual ~L...
NemoChenTW/Sample-FunctionPassing
MiTACCSC/MiTACCSC.h
/* * MiTACCSC.h * * Created on: 2015年12月15日 * Author: nemo */ #ifndef MITACCSC_MITACCSC_H_ #define MITACCSC_MITACCSC_H_ #include <stddef.h> #include <iostream> #include <functional> using namespace std; class MiTACCSC { private: function<void(void)> funPtr; public: MiTACCSC(); virtual ~MiTACCSC(); v...
ken0x0a/rust-mac-app-examples
6-create-rust-lib-in-cocoa-app/app/BridgingHeader.h
// // BridgingHeader.h // RustPack // // Created by Delisa on 11/15/16. // Copyright © 2016 <NAME>. All rights reserved. // #ifndef BridgingHeader_h #define BridgingHeader_h #include "cruncher.h" #endif /* BridgingHeader_h */
ken0x0a/rust-mac-app-examples
6-create-rust-lib-in-cocoa-app/src/cruncher.h
<gh_stars>100-1000 // // cruncher.h // RustPack // // Created by Delisa on 11/15/16. // Copyright © 2016 <NAME>. All rights reserved. // #ifndef cruncher_h #define cruncher_h #include <stdint.h> int32_t square(int32_t num); int32_t cube(int32_t num); #endif /* cruncher_h */
UsrLightmann/MsgSwap
Tweak/MsgSwapFooter.h
<filename>Tweak/MsgSwapFooter.h #import <UIKit/UIKit.h> // https://stackoverflow.com/a/5337804 #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) @interface IMBalloonPlugin : NSObject @end @interface IMBalloonPlugin...
NSBum/si7021_test
main/main.c
<filename>main/main.c // FreeRTOS includes #include "freertos/FreeRTOS.h" #include "freertos/task.h" // I2C driver #include "driver/i2c.h" // Error library #include "esp_err.h" #include "nvs_flash.h" #include "esp_log.h" #include "esp_system.h" #include <stdio.h> #include "si7021.h" #define I2C_SDA 21 // GPIO_NUM_...
NSBum/si7021_test
components/si7021/si7021.h
<reponame>NSBum/si7021_test /* * HTU21D Component * * esp-idf component to interface with HTU21D humidity and temperature sensor * by TE Connectivity (http://www.te.com/usa-en/product-CAT-HSC0004.html) * * <NAME>, www.lucadentella.it */ // Error library #include "esp_err.h" // I2C driver #include "driver/i2c...
DMDavid/DMPieChart
DMPieChart/DMPieChart/DMPieChart/DMPieChartView.h
// // DMPieChartView.h // DMPieChart // // Created by David on 16/5/22. // Copyright © 2016年 OrangeCat. All rights reserved. // #import <UIKit/UIKit.h> #import "DMPieChartModel.h" @class DMPieChartView; @protocol DMPieChartViewDelegate <NSObject> - (void)pieView:(DMPieChartView *)pieView didSelectSectionAtIndex:...
DMDavid/DMPieChart
DMPieChart/DMPieChart/ViewController.h
// // ViewController.h // DMPieChart // // Created by David on 16/5/22. // Copyright © 2016年 OrangeCat. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
DMDavid/DMPieChart
DMPieChart/DMPieChart/DMPieChart/DMPieChartModel.h
// // DMPieChartModel.h // DMPieChart // // Created by David on 16/5/22. // Copyright © 2016年 OrangeCat. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> @interface DMPieChartModel : NSObject @property(nonatomic, copy) NSString *name; @property(nonatomic, strong) NSNumber *value;...
2bbb/ofxTMP
src/ofxTMPVersionMacro.h
<filename>src/ofxTMPVersionMacro.h<gh_stars>0 // // ofxTMPVersionMacro.h // // Created by ISHII 2bit on 2016/04/28. // // #pragma once #include "ofConstants.h" #define OFX_MAKE_OF_VERSION(major, minor, patch) (major * 10000 + minor * 100 + patch) #define OFX_OF_VERSION OFX_MAKE_OF_VERSION(OF_VERSION_MAJOR, OF_VERSI...
2bbb/ofxTMP
src/ofxTMPFunctionTraits.h
// // ofxTMPFunctionTraits.h // ofxTMPExample // // Created by ISHII 2bit on 2016/04/28. // // #include <type_traits> #include <tuple> #include <functional> namespace ofx { namespace TMP { namespace function_info { namespace detail { template <typename ret, typename ... argu...
2bbb/ofxTMP
src/ofxTMPAlias.h
// // ofxTMPAlias.h // // Created by ISHII 2bit on 2016/04/29. // // #pragma once namespace ofx { namespace TMP { template <typename> struct alias {}; namespace detail { template <typename T> struct remove_alias { using type = T; }; template <...
2bbb/ofxTMP
src/ofxTMPTypeTraits.h
// // ofxTMPTypeTraits.h // // Created by ISHII 2bit on 2016/04/28. // // #pragma once #include <type_traits> #include <array> namespace ofx { namespace TMP { struct default_traits { static constexpr size_t size = 1; static constexpr bool has_subscript_operator = false; ...
2bbb/ofxTMP
src/ofxTMPSequence.h
// // ofxTMPSequence.h // // Created by ISHII 2bit on 2016/04/28. // // #pragma once namespace ofx { namespace TMP { namespace sequences { template <typename type, type ... ns> struct integer_sequence { using value_type = type; static constexpr std...
2bbb/ofxTMP
src/ofxTMP.h
// // ofxTMP.h // // Created by ISHII 2bit on 2015/11/19. // // #pragma once #include "ofxTMPUtils.h" #include "ofxTMPVersionMacro.h" #include "ofxTMPTypeTraits.h" #include "ofxTMPFunctionTraits.h" #include "ofxTMPSequence.h" #include "ofxTMPAlias.h" namespace ofxTMP = ofx::TMP;
2bbb/ofxTMP
src/ofxTMPUtils.h
// // ofxTMPUtils.h // // Created by ISHII 2bit on 2016/04/28. // // #pragma once #include <type_traits> #include <tuple> #include <functional> #if __cplusplus < 201103L # error all you need is C++11 (or later) #elif __cplusplus < 201402L # define bbb_is_cpp11 true # define bbb_is_cpp14 false #else # defin...
yozoe/PullToRefreshKit
PullToRefreshKit/PullToRefreshKit.h
<gh_stars>100-1000 // // PullToRefreshKit.h // PullToRefreshKit // // Created by Leo on 2017/6/30. // Copyright © 2017年 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for PullToRefreshKit. FOUNDATION_EXPORT double PullToRefreshKitVersionNumber; //! Project version string for P...
Bennygmate/Deep-Learning
deep learning/neural_networks/Convolution.h
//Bennygmate #include "TMatrix.h" namespace neurons{ class Conv_1d { private: mutable TMatrix<> m_diff_to_w; Shape m_input_sh; Shape m_weights_sh; lint m_stride; public: Conv_1d(const Shape & input_shape, const Shape & weights_shape, lint stride = 1); C...
Bennygmate/Deep-Learning
deep learning/neural_networks/NN.h
// Bennygmate #include "TMatrix.h" #include "Functions.h" #include "NN_layer.h" #include "Dataset.h" #include <iostream> #include <random> class NN { private: std::uniform_int_distribution<size_t> m_train_distribution; std::uniform_int_distribution<size_t> m_test_distribution; protected: double m_l_rate; ...
Bennygmate/Deep-Learning
deep learning/neural_networks/NN_layer.h
<reponame>Bennygmate/Deep-Learning //Bennygmate #include "TMatrix.h" namespace neurons { class NN_layer_op; class NN_layer { public: static const std::string NN; static const std::string FCNN; static const std::string CNN; static const std::string RNN; protected: ...
Bennygmate/Deep-Learning
deep learning/facial_recognition/network.h
<gh_stars>0 //Bennygmate #include "Mnist.h" #include "CIFAR_10.h" #include "PGM.h" #include "Conv_NN.h" #include "Simple_NN.h" #include "Multi_Layer_NN.h" #include "Conv_Pooling_NN.h" #include <memory> std::string dataset_dir = "../../../../"; std::shared_ptr<dataset::Dataset> data_set; std::string argv_dataset_typ...
Bennygmate/Deep-Learning
deep learning/neural_networks/CNN_layer.h
<filename>deep learning/neural_networks/CNN_layer.h<gh_stars>0 //Bennygmate #include "Functions.h" #include "Traditional_NN_layer.h" #include "Convolution.h" namespace neurons { class CNN_layer : public Traditional_NN_layer { private: Conv_2d m_conv2d; public: static std::string from_b...
Rasmustex/snek
src/main.c
<gh_stars>0 #include "../include/snek.h" #include <locale.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <ncurses.h> #include <time.h> #define MOVEMENT_TIMEOUT 150 // TODO: Enable drawing a smaller box as the game window, as terminal emulators can be quite large int main() { srand(time(0...
Rasmustex/snek
src/snek.c
<filename>src/snek.c #include "../include/snek.h" #include <stdlib.h> #include <curses.h> #include <stdbool.h> snek* init_snek( int y, int x, snek* next, snek* prev ) { snek* s = (snek*)malloc( sizeof(snek) ); s->y = y; s->x = x; s->next = next; s->prev = prev; return s; } void clean_snek( sne...
Rasmustex/snek
src/draw.c
#include "../include/snek.h" #include <curses.h> #include <stdlib.h> void draw_snek( snek* head ) { move( head->y, head->x ); addch('@'); snek* s = head->next; snek* next; while( s ) { next = s->next; move( s->y, s->x ); addch('#'); s = next; } return; } voi...
Rasmustex/snek
include/snek.h
#ifndef SNEK_H #define SNEK_H #ifdef __cplusplus extern "C" { #endif typedef struct sn snek; struct sn { int x, y; snek *next, *prev; }; typedef enum { M_UP = 0b00, M_DOWN = 0b01, M_RIGHT = 0b10, M_LEFT = 0b11 } direction; snek* init_snek( int...
ULL-ESIT-IB-2020-2021/ib-practica10-funciones-doxygen-JonayVE-ull
src/cripto.h
/** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @author <NAME> * @date 16.dic.2020 * @brief This file declares the "Help Text" constant and two functions * */ #include <iostream> const std::string kHelpText = "./crip...
esperancija/dragonpilot
panda/board/safety/safety_mitsubishi.h
// global torque limit const int MITSUBISHI_MAX_TORQUE = 1500; // max torque cmd allowed ever // rate based torque limit + stay within actually applied // packet is sent at 100hz, so this limit is 1000/sec const int MITSUBISHI_MAX_RATE_UP = 10; // ramp up slow const int MITSUBISHI_MAX_RATE_DOWN = 25; ...
nwpu-basketball-robot/basketball_2018
basketball_base_serial/include/basketball_base_serial/SerialPort.h
/* * SerialPort.h * * Created on: 2012-4-8 * Author: startar */ #ifndef SERIALPORT_H_ #define SERIALPORT_H_ #include <ros/ros.h> #include <inttypes.h> #include <vector> #include <queue> #include <boost/asio.hpp> #include <boost/function.hpp> #include <boost/smart_ptr.hpp> #include <boost/thread.hpp> #inclu...
nwpu-basketball-robot/basketball_2018
basketball_move/include/robot_move_pkg/move_srv.h
#include "ros/ros.h" #include "basketball_msgs/move_to_point.h" #include "basketball_msgs/robot_rotate.h" #include "basketball_msgs/focus_target.h" #include "basketball_msgs/robot_state.h" #include "geometry_msgs/Twist.h" #include "tf/tf.h" #include "tf/transform_listener.h" #include "nav_msgs/Odometry.h" #include <mut...
nwpu-basketball-robot/basketball_2018
basketball_base_serial/include/basketball_base_serial/SerialNode.h
<filename>basketball_base_serial/include/basketball_base_serial/SerialNode.h #ifndef SERIALNODE_H #define SERIALNODE_H #include <ros/ros.h> #include <basketball_msgs/robot_message.h> #include <basketball_msgs/robot_state.h> #include <basketball_base_serial/SerialPort.h> #include <boost/shared_ptr.hpp> #include <boost/...
intmian/hexo_GUI
hexo_GUI/GeneratedFiles/ui_hexo_GUI.h
<filename>hexo_GUI/GeneratedFiles/ui_hexo_GUI.h /******************************************************************************** ** Form generated from reading UI file 'hexo_GUI.ui' ** ** Created by: Qt User Interface Compiler version 5.9.6 ** ** WARNING! All changes made in this file will be lost when recompiling UI ...
intmian/hexo_GUI
hexo_GUI/hexo_GUI.h
<reponame>intmian/hexo_GUI<gh_stars>0 #pragma once #include <QtWidgets/QMainWindow> #include "ui_hexo_GUI.h" #include "qmessagebox.h" #include <string> using namespace std; class hexo_GUI : public QMainWindow { Q_OBJECT public: hexo_GUI(QWidget *parent = Q_NULLPTR); private: Ui::hexo_GUIClass ui; void ChangeT...
intmian/hexo_GUI
hexo_GUI/Tool.h
<filename>hexo_GUI/Tool.h #pragma once #include <string> #include "qmessagebox.h" #include <cstdio> enum message_Type { WARNING = 0, QUESTION = 1, ABOUT = 2, INFORMATION = 3 }; class Tool { public: private: }; class Easy_message_box//解决中文乱码,并将按钮本土化 { public: /*WARNING QUESTION INFOMATION ABOUT 输入得非二...
GhostVaibhav/Todos
include/sha256.h
/* * __ ___ __ ____ __ __ * / |/ /__ _____/ /__ / _// /_/ / * / /|_/ / _ `/ __/ '_/_/ / / __/_/ * /_/ /_/\_,_/_/ /_/\_\/___/ \__(_) * * MIT License * * Copyright (c) 2021 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * ...
GhostVaibhav/Todos
include/panel.h
/* * __ ___ __ ____ __ __ * / |/ /__ _____/ /__ / _// /_/ / * / /|_/ / _ `/ __/ '_/_/ / / __/_/ * /_/ /_/\_,_/_/ /_/\_\/___/ \__(_) * * MIT License * * Copyright (c) 2021 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * ...
GhostVaibhav/Todos
include/structure.h
<gh_stars>1-10 /* * __ ___ __ ____ __ __ * / |/ /__ _____/ /__ / _// /_/ / * / /|_/ / _ `/ __/ '_/_/ / / __/_/ * /_/ /_/\_,_/_/ /_/\_\/___/ \__(_) * * MIT License * * Copyright (c) 2021 <NAME> * * Permission is hereby granted, free of charge, to any person obtain...
AdelardBanza/SingleTestHarness
Project1/Project1/TestLogger.h
#ifndef TEST_LOGGER_H #define TEST_LOGGER_H /////////////////////////////////////////////////////////////////////////////// // TestLogger.h - TestLogger class definition // // ver 1.0 // // Language: C++, Visual Studio 2...
AdelardBanza/SingleTestHarness
Project1/Project1/Assertion.h
<reponame>AdelardBanza/SingleTestHarness<filename>Project1/Project1/Assertion.h<gh_stars>0 #ifndef ASSERTION_H #define ASSERTION_H /////////////////////////////////////////////////////////////////////////////// // Assertion.h - Assertion class definition // // ver 1.0 ...
AdelardBanza/SingleTestHarness
Project1/Project1/TestHarness.h
<filename>Project1/Project1/TestHarness.h #ifndef TESTHARNESS_H #define TESTHARNESS_H /////////////////////////////////////////////////////////////////////////////// // TestHarness.h - TestHarness class definition // // ver 1.0 ...
LeoNavel/usrsctp
usrsctplib/netinet/sctp_usrreq.c
<filename>usrsctplib/netinet/sctp_usrreq.c /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2012, by <NAME>. All rights reserved. * Copyright (c) 2008-2012, by <NAME>. All rights reserved. * * Redistribution and use in sourc...
kgn/BBlock
Categories/UIKit/UIKit+BBlock.h
// // UIKit+BBlock.h // BBlock // // Created by <NAME> on 10/20/13. // Copyright 2013 <NAME>. All rights reserved. // #import "UIActionSheet+BBlock.h" #import "UIAlertView+BBlock.h" #import "UIControl+BBlock.h" #import "UIGestureRecognizer+BBlock.h" #import "UIImage+BBlock.h" #import "UITextField+BBlock.h"
kgn/BBlock
Categories/UIKit/UIAlertView+BBlock.h
// // UIAlertView+BBlock.h // BBlock // // Created by <NAME> on 5/14/12. // Updated by <NAME> on 6/4/12. // #import <UIKit/UIKit.h> @interface UIAlertView(BBlock) typedef void (^UIAlertViewBBlock)(NSInteger buttonIndex, UIAlertView *alertView); - (void)setCompletionBlock:(UIAlertViewBBlock)block; - (instancety...
kgn/BBlock
Categories/UIKit/CADisplayLink+BBlock.h
// // CADisplayLink+BBlock.h // BBlock // // Created by <NAME> on 4/23/14. // Copyright (c) 2014 <NAME>. All rights reserved. // @import QuartzCore; @interface CADisplayLink(BBlock) typedef void (^BBlockCADisplayLinkBlock)(CADisplayLink *displayLink); + (instancetype)displayLinkWithBlock:(BBlockCADisplayLinkBlo...
kgn/BBlock
Categories/StoreKit/SKProductsRequest+BBlock.h
// // SKProductsRequest+BBlock.h // BBlock // // Created by <NAME> on 8/7/12. // Copyright (c) 2012 <NAME>. All rights reserved. // #import <StoreKit/StoreKit.h> @interface SKProductsRequest(BBlock) typedef void (^SKProductsRequestBBlock)(SKProductsResponse *response, NSError *error); /// Request a StoreKit res...
kgn/BBlock
Categories/StoreKit/SKStoreProductViewController+BBlock.h
<filename>Categories/StoreKit/SKStoreProductViewController+BBlock.h // // SKStoreProductViewController+BBlock.h // BBlock // // Created by <NAME> on 5/23/13. // Copyright (c) 2012 <NAME>. All rights reserved. // #import <StoreKit/StoreKit.h> @interface SKStoreProductViewController(BBlock) typedef void (^SKStoreP...
kgn/BBlock
Categories/StoreKit/StoreKit+BBlock.h
<gh_stars>10-100 // // StoreKit+BBlock.h // BBlock // // Created by <NAME> on 10/20/13. // Copyright 2013 <NAME>. All rights reserved. // #import "SKProductsRequest+BBlock.h" #import "SKStoreProductViewController+BBlock.h"
kgn/BBlock
Categories/UIKit/UITextField+BBlock.h
<reponame>kgn/BBlock // // UITextField+BBlock.h // SignNow // // Created by <NAME> on 11/16/12. // Copyright (c) 2012 SignNow. All rights reserved. // #import <UIKit/UIKit.h> @interface UITextField(BBlock) typedef BOOL (^UITextFieldShouldReturnBBlock)(UITextField *textField); - (void)textFieldShouldReturnWithBl...
kgn/BBlock
Categories/UIKit/UIGestureRecognizer+BBlock.h
// // UIGestureRecognizer+BBlock.h // BBlock // // Created by <NAME> on 12/29/11. // Copyright (c) 2011-12 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIGestureRecognizer(BBlock) typedef void (^UIGestureRecognizerBBlock)(id gestureRecognizer); - (instancetype)initWithBlock:(UIGestureRecogn...
kgn/BBlock
Categories/UIKit/UIImage+BBlock.h
// // UIImage+BBlock.h // BBlock // // Created by <NAME> on 3/21/12. // Copyright (c) 2012 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> // Helper method for creating unique image identifiers #define BBlockImageIdentifier(fmt, ...) [NSString stringWithFormat:(@"%@%@" fmt), \ NSStringFromClass([self ...
kgn/BBlock
Categories/UIKit/UIActionSheet+BBlock.h
// // UIActionSheet+BBlock.h // BBlock // // Created by <NAME> on 6/4/12. // Copyright (c) 2012 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIActionSheet(BBlock) typedef void (^UIActionSheetBBlock)(NSInteger buttonIndex, UIActionSheet *actionSheet); - (void)setCompletionBlock:(UIActionShe...
kgn/BBlock
Categories/UIKit/UIControl+BBlock.h
// // UIControl+BBlock.h // BBlock // // Created by <NAME> on 7/16/12. // Copyright (c) 2012 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIControl(BBlock) // WARNING: this category is under developement and is not yet suitable for production typedef void (^BBlockUIControlBlock)(id control...
EdisonCat/CCvoltageR
CCVRonVisualStudio/LiquidCrystal.h
<gh_stars>1-10 /* This is not the real LiquidCrystal.h, it is used to ensure that you can successfully debug on Visual Studio */ #ifndef LCD_H #define LCD_H #include <iostream> using namespace std; class LiquidCrystal { public: void print(string message) { } void print(float message) { } void begin(int length,...
EdisonCat/CCvoltageR
CCVRonVisualStudio/Arduino.h
/* This is not the real Arduino.h, it is used to ensure that you can successfully debug on Visual Studio */ #ifndef ARDUINO_H #define ARDUINO_H void pinMode(int, bool); void digitalWrite(int, bool); int digitalRead(int); int analogRead(int); void analogWrite(int, bool); void delay(int); void delayMicroseconds(int); flo...
EdisonCat/CCvoltageR
CCVRonVisualStudio/chopping-controlled_voltage_regulator.h
<gh_stars>1-10 #ifndef CHOPPING_CONTROLLED_VOLTAGE_REGULATOR_H #define CHOPPING_CONTROLLED_VOLTAGE_REGULATOR_H #include "LiquidCrystal.h" #include "Arduino.h" /* Set up your pins here */ const int pinFlag = 10; const int pinCurrentV = A5; const int pinSwitch1 = 8; const int pinSwitch2 = 9; const int pinLCDVCC = 1; co...
aleks-dimoski/ASCII_graphics
ASCII_graphics/imageLoader.h
<reponame>aleks-dimoski/ASCII_graphics<filename>ASCII_graphics/imageLoader.h #pragma once #include <string> using namespace std; class imageLoader { private: public: imageLoader(); int getImage(string filepath); int sendImage(string filepath); };
aleks-dimoski/ASCII_graphics
ASCII_graphics/ASCII_graphics.h
#pragma once class ASCII_graphics { private: public: ASCII_graphics(); int run(); char determineChar(double); };
JHG777000/builder
examples/example5/foo2/include/foo2.h
<filename>examples/example5/foo2/include/foo2.h void foo2( void ) ;
JHG777000/builder
examples/example5/foo2/src/foo2.c
<filename>examples/example5/foo2/src/foo2.c #include <stdio.h> #include <stdlib.h> #include <foo2.h> void foo2( void ) { printf("Hello World!!!!, from foo2.\n") ; }
wu0607/2020-Spring-ME759-FinalProject
cpu/md5.h
#include <cstring> #include <iostream> class MD5 { public: MD5(const std::string& text); void pipeline(const unsigned char *buf, int length); void pipeline(const char *buf, int length); std::string hex2String() const; private: void processBlock(const unsigned char block[64]); static void padding(unsigned ...
wu0607/2020-Spring-ME759-FinalProject
cpu/util.h
<reponame>wu0607/2020-Spring-ME759-FinalProject<filename>cpu/util.h #include <iostream> #include <vector> #define PASSWORD_LEN 5 #define CONST_CHARSET "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" #define CONST_CHARSET_LENGTH (sizeof(CONST_CHARSET) - 1) using namespace std; // variable extern vecto...
SXDgit/ZBTools
ZBTools/Classes/ZBTestModule/ZBTest.h
<gh_stars>0 // // ZBTest.h // ZBTest // // Created by Zuobian on 2019/9/14. // Copyright © 2019 admin. All rights reserved. // #import <Foundation/Foundation.h> @interface ZBTest : NSObject - (NSString *)getTestString; @end
SXDgit/ZBTools
Example/Pods/Target Support Files/ZBTools/ZBTools-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 #import "Manager.h" #import "ZBTest.h" FOUNDATION_EXPORT double ZBToolsVersionNumber; FOUNDATION_EXPORT const unsigned char ...
SXDgit/ZBTools
Example/ZBTools/ZBAppDelegate.h
// // ZBAppDelegate.h // ZBTools // // Created by SXDgit on 07/02/2020. // Copyright (c) 2020 SXDgit. All rights reserved. // @import UIKit; @interface ZBAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
SXDgit/ZBTools
Example/ZBTools/ZBViewController.h
<filename>Example/ZBTools/ZBViewController.h<gh_stars>0 // // ZBViewController.h // ZBTools // // Created by SXDgit on 07/02/2020. // Copyright (c) 2020 SXDgit. All rights reserved. // @import UIKit; @interface ZBViewController : UIViewController @end
sh1r4s3/mic
src/microcode.h
#include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include "misc.h" #include "mir.h" struct microcode { struct mir *cmd; int n_cmds; }; struct microcode *microcode_create(int n_cmds); void microcode_free(struct microc...
sh1r4s3/mic
src/shift.h
<gh_stars>0 void shift_sll8(char *line, int size); void shift_sra1(char *line, int size);
sh1r4s3/mic
src/alu.c
#include "alu.h" struct ALU *alu_create(unsigned short units) { struct ALU *alu = (struct ALU *)malloc(sizeof(struct ALU)); if (!alu) ERR("Can't allocate memory for ALU"); memset(alu, 0, sizeof(struct ALU)); alu->n_units = units; alu->unit = (struct ALU_unit *)calloc(units, sizeof(struct A...
sh1r4s3/mic
src/shift.c
#include "shift.h" void shift_sll8(char *line, int size) { if (!line) return; if (size > 8) { for (int i = size - 9; i >= 0; --i) { line[i + 8] = line[i]; line[i] = 0; } } else { for (int i = 0; i < size; ++i) { ...
sh1r4s3/mic
src/register.h
#include <stdlib.h> #include <string.h> #include "misc.h" struct reg { char *data; const char *name; int bits; }; struct reg *reg_create(int bits, const char *name); void reg_free(struct reg *r);
sh1r4s3/mic
src/alu.h
<reponame>sh1r4s3/mic<filename>src/alu.h #include <stdlib.h> #include <string.h> #include "misc.h" /* * This structures describes a state of a simple ALU module. * docs/ALU.md describes the circuit. */ struct ALU_unit { // Input lines char a, b; // Output lines char output; char carry_out; }; ...
sh1r4s3/mic
src/memory.c
<reponame>sh1r4s3/mic #include "memory.h" struct memory *memory_create(int words) { struct memory *m = (struct memory *)malloc(sizeof(struct memory)); if (!m) ERR("Can't allocate memory for struct memory"); m->data = (int8_t *)calloc(words, sizeof(int32_t)); if (!m->data) ERR("Can't all...
sh1r4s3/mic
src/microcode.c
#include "microcode.h" struct microcode *microcode_create(int n_cmds) { struct microcode *mcode = (struct microcode *)malloc(sizeof(struct microcode)); if (!mcode) ERR("Can't allocate memory for microcode"); mcode->cmd = (struct mir *)calloc(n_cmds, sizeof(struct mir)); if (!mcode->cmd) ...
sh1r4s3/mic
src/register.c
#include "register.h" struct reg *reg_create(int bits, const char *name) { struct reg *r = (struct reg *)malloc(sizeof(struct reg)); if (!r) ERR("Can't allocate memory for struct reg %s", name); r->data = (char *)calloc(bits, sizeof(char)); if (!r->data) ERR("Can't allocate memory for r...
sh1r4s3/mic
src/misc.h
<gh_stars>0 #include <stdio.h> // Emit log message #define ERR(format, ...) \ { \ fprintf(stderr, __FILE__ ":%d / " format "\n", __LINE__, ##__VA_ARGS__); \ exit(-1); \ }
sh1r4s3/mic
src/memory.h
<filename>src/memory.h #include <stdlib.h> #include <string.h> #include "misc.h" struct memory { char in; // rd, wr, fetch int addr; int size; int8_t *data; }; enum memory_instruction {rd = 0, wr = 1, fetch = 2}; struct memory *memory_create(int words); void memory_free(struct memory *m); int memory_...
sh1r4s3/mic
src/mir.h
<filename>src/mir.h struct mir { int next_address; char jam; char alu; int c; char mem; int b; };
scoder/acora
acora/acora_defs.h
#ifndef HAS_ACORA_DEFS_H #define HAS_ACORA_DEFS_H #if PY_VERSION_HEX <= 0x03030000 && !(defined(CYTHON_PEP393_ENABLED) && CYTHON_PEP393_ENABLED) #define PyUnicode_IS_READY(op) (0) #define PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define PyUnicode...
jlmonge/cs153-xv6
l2-inher.c
<filename>l2-inher.c #include "types.h" #include "stat.h" #include "user.h" #include "stddef.h" int main(int argc, char *argv[]) { if (argc != 2) { printf(1, "Usage: l2-inher <priority>\n"); } else { int pid = getpid(); int priority = atoi(argv[1]); int status; prin...