repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
ZengYao0206/GraphicsTest
GraphicsTest/CircleViewController.h
<reponame>ZengYao0206/GraphicsTest<gh_stars>0 // // CircleViewController.h // GraphicsTest // // Created by ZengYao on 16/7/27. // Copyright © 2016年 zengyao. All rights reserved. // #import <UIKit/UIKit.h> @interface CircleViewController : UIViewController @end
ZengYao0206/GraphicsTest
GraphicsTest/UIColor+YW.h
<reponame>ZengYao0206/GraphicsTest<filename>GraphicsTest/UIColor+YW.h // // UIColor+Common.h // HappyShare // // Created by <NAME> on 13-3-14. // Copyright (c) 2013年 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIColor (YW) /** * @brief 获取颜色对象 * * @param string 颜色描述字符串,带“#”开头 * * @r...
ZengYao0206/GraphicsTest
GraphicsTest/GraphicViewController.h
// // GraphicViewController.h // GraphicsTest // // Created by yiyaowang on 15/10/20. // Copyright © 2015年 zengyao. All rights reserved. // #import <UIKit/UIKit.h> #import "OBAWeekHistogramView.h" #import "OBHistogramView.h" #import "OBDrawThreeFoldView.h" #import "OBCircleProgressView.h" @interface GraphicViewCon...
ZengYao0206/GraphicsTest
GraphicsTest/OBDataFormator.h
// // OBDataFormator.h // Oband // // Created by Oband on 14-7-30. // Copyright (c) 2014年 Oband Tech. All rights reserved. // #import <Foundation/Foundation.h> @interface OBDataFormator : NSObject +(NSString*) stringDate:(NSDate *) date format:(NSString *) format; +(NSDate *) datepartWithoutTime:(NSDate *)date; +...
ZengYao0206/GraphicsTest
GraphicsTest/PageViewController.h
// // PageViewController.h // GraphicsTest // // Created by yiyaowang on 15/10/20. // Copyright © 2015年 zengyao. All rights reserved. // #import <UIKit/UIKit.h> #import "RootViewController.h" @interface PageViewController : UIViewController<UIScrollViewDelegate> { UIScrollView* pageScrollview; UIPageC...
ZengYao0206/GraphicsTest
GraphicsTest/OBAWeekHistogramView.h
// // OBAWeekHistogramView.h // Oband // // Created by oband on 14-8-1. // Copyright (c) 2014年 Oband Tech. All rights reserved. // #import <UIKit/UIKit.h> #import "OBHistogramView.h" @interface OBAWeekHistogramView : UIView @property (nonatomic,strong) UILabel *title; @property (nonatomic,strong) UILabel ...
ZengYao0206/GraphicsTest
GraphicsTest/OBCircleProgressView.h
<filename>GraphicsTest/OBCircleProgressView.h // // OBCircleProgressView.h // Oband // // Created by oband on 14-7-31. // Copyright (c) 2014年 Oband Tech. All rights reserved. // #import <UIKit/UIKit.h> @interface OBCircleProgressView : UIView //标题-总摄入卡路里 @property (nonatomic,retain) UILabel *titleLable; //摄入能量总...
ZengYao0206/GraphicsTest
GraphicsTest/OBPNBar.h
<gh_stars>0 // // PNBar.h // PNChartDemo // // Created by yiyaowang on 10/19/15. // Copyright (c) 2015年 zengyao. All rights reserved. // #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> @interface OBPNBar : UIView @property (nonatomic) float grade; @property (nonatomic,strong) CAShapeLayer * chartLine;...
ZengYao0206/GraphicsTest
GraphicsTest/InvestCircleView.h
<gh_stars>0 // // InvestCircleView.h // Phyt // // Created by RiQiangWang on 2016/7/26. // Copyright © 2016年 Shipeng. All rights reserved. // #import <UIKit/UIKit.h> @interface InvestCircleView : UIView @property (nonatomic, assign) CGFloat progress; @property (nonatomic, assign) CGFloat returnRate; @property (...
ZengYao0206/GraphicsTest
GraphicsTest/RootViewController.h
// // RootViewController.h // GraphicsTest // // Created by yiyaowang on 15/10/20. // Copyright © 2015年 zengyao. All rights reserved. // #import <UIKit/UIKit.h> @interface RootViewController : UIViewController<UITableViewDataSource,UITableViewDelegate> @end
ZengYao0206/GraphicsTest
GraphicsTest/OBPNColor.h
// // PNColor.h // PNChart // // Created by kevin on 13-6-8. // Copyright (c) 2013年 kevinzhow. All rights reserved. // #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> /* * System Versioning Preprocessor Macros */ #define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) #define PNGrey [U...
ZengYao0206/GraphicsTest
GraphicsTest/OBHistogramView.h
// // OBHistogramView.h // Oband // // Created by oband on 14-8-1. // Copyright (c) 2014年 Oband Tech. All rights reserved. // #import <UIKit/UIKit.h> @interface OBHistogramView : UIView @property (nonatomic,assign) int numberDay; @property (nonatomic,strong) UIColor *highColor; @property (nonatomic,strong) UIC...
ZengYao0206/GraphicsTest
GraphicsTest/OBDrawThreeFoldView.h
<reponame>ZengYao0206/GraphicsTest // // DrawThreeFoldView.h // 绘图测试 // // Created by apple on 14-5-8. // Copyright (c) 2014年 apple. All rights reserved. //--------画三条折线的View----------------- //NSArray *arr = @[@"8000",@"8000",@"7000",@"2500",@"6000",@"3500",@"8000",@"8000",@"7000",@"2500",@"6000",@"3500",@...
ZengYao0206/GraphicsTest
GraphicsTest/OBDrawLineChartView.h
<filename>GraphicsTest/OBDrawLineChartView.h // // DrawLineChartView.h // 绘图测试 // // Created by apple on 14-5-8. // Copyright (c) 2014年 apple. All rights reserved. //-------画一条折线的View #import <UIKit/UIKit.h> @interface OBDrawLineChartView : UIView //需要画的数值 @property (nonatomic, retain) NSArray *dataArr; //得多...
JamesCreaton/BasicGeneticAlgorithm
project2D/GA.h
#pragma once #include "Population.h" #include <random> #define CROSSOVER_RATE 0.7 #define MUTATION_RATE 0.1 #define POP_SIZE 10 #define MAX_ALLOWABLE_GENERATIONS 65 #define CHROMO_LENGTH 2 #define GENE_LENGTH 6 class GA { public: GA(b2Vec2 Target); ~GA(); void CalculateSuccess(Person* a_person); struct Chromo...
JamesCreaton/BasicGeneticAlgorithm
project2D/Box.h
<filename>project2D/Box.h #pragma once #include <box2d.h> #include <Renderer2D.h> #include <glm\glm.hpp> class Box { public: Box(); ~Box(); void init(b2World* world, const glm::vec2& position, const glm::vec2& dimensions); void Draw(aie::Renderer2D* renderer); b2Body* GetBody() { return m_body; } b2Fixture* Ge...
JamesCreaton/BasicGeneticAlgorithm
project2D/Application2D.h
#pragma once #include "Application.h" #include <glm\glm.hpp> #include <glm\ext.hpp> #include "Box.h" #include "Ground.h" #include <Renderer2D.h> #include <vector> #include "GA.h" #include "Person.h" #include "Sphere.h" #include "Target.h" #include <Font.h> using glm::vec2; using glm::vec3; using glm::vec4; class Ap...
JamesCreaton/BasicGeneticAlgorithm
project2D/FooDraw.h
#pragma once #include <box2d.h> class FooDraw : public b2Draw { public: FooDraw(); ~FooDraw(); void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) {} void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) {} void DrawCircle(const b2Vec2& center, float...
JamesCreaton/BasicGeneticAlgorithm
project2D/Rigidbody.h
#pragma once #include "PhysicsObject.h" class Rigidbody : public PhysicsObject { public: Rigidbody(); Rigidbody(ShapeType shapeID, glm::vec2 position, glm::vec2 velocity, float rotation, float mass); ~Rigidbody(); virtual bool fixedUpdate(glm::vec2 gravity, float timeStep); virtual void debug(); void applyF...
JamesCreaton/BasicGeneticAlgorithm
project2D/PhysicsObject.h
#pragma once #include <glm\glm.hpp> using glm::vec2; using glm::vec3; enum ShapeType { PLANE = 0, SPHERE = 1, BOX = 2, }; class PhysicsObject { protected: PhysicsObject(ShapeType a_shapeID) : m_shapeID(a_shapeID) {} PhysicsObject(); ~PhysicsObject(); public: virtual bool fixedUpdate(glm::vec2 gravity, fl...
JamesCreaton/BasicGeneticAlgorithm
project2D/Population.h
<reponame>JamesCreaton/BasicGeneticAlgorithm #pragma once #include <vector> #include <list> #include "Person.h" class Population { public: Population(); Population(int populationSize); ~Population(); void GenerateNewPopulation(); std::vector<Person*>* GetPeople(); //std::list<Person*> GetPeople(); protected...
JamesCreaton/BasicGeneticAlgorithm
project2D/Person.h
<gh_stars>0 #pragma once #include <vector> #include <Box2D.h> #include <Renderer2D.h> #include <glm/glm.hpp> #include <glm\ext.hpp> class Person { public: Person(); ~Person(); void init(b2World* world, const glm::vec2& position, const glm::vec2& dimensions); void Update(float dt); void Draw(aie::Renderer2D* re...
victorhydecode/WeightedRandom
WeightedRandom/WeightedRandom.h
<filename>WeightedRandom/WeightedRandom.h<gh_stars>1-10 // // WeightedRandom.h // WeightedRandom // // Created by <NAME> on 17/01/2018. // Copyright © 2018 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for WeightedRandom. FOUNDATION_EXPORT double WeightedRandomVersio...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/FindLines.h
<gh_stars>0 #ifndef tp_image_utils_functions_FindLines_h #define tp_image_utils_functions_FindLines_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/Point.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //###########################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/DrawMask.h
<gh_stars>0 #ifndef tp_image_utils_functions_DrawMask_h #define tp_image_utils_functions_DrawMask_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ColorMap.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //##########################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/SignedDistanceField.h
#ifndef tp_image_utils_functions_SignedDistanceField_h #define tp_image_utils_functions_SignedDistanceField_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //#####################################################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/ConvolutionMatrix.h
#ifndef tp_image_utils_functions_ConvolutionMatrix_h #define tp_image_utils_functions_ConvolutionMatrix_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //#########################################################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/Bitwise.h
#ifndef tp_image_utils_functions_Bitwise_h #define tp_image_utils_functions_Bitwise_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //################################################################################################## enum Logic...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/Globals.h
<reponame>omi-lab/tp_image_utils_functions #ifndef tp_image_utils_functions_Globals_h #define tp_image_utils_functions_Globals_h #include "tp_utils/Globals.h" //################################################################################################## //! A module of image manipulation functions. namespace tp...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/NoiseField.h
<reponame>omi-lab/tp_image_utils_functions<gh_stars>0 #ifndef tp_image_utils_functions_EdgeDetect_h #define tp_image_utils_functions_EdgeDetect_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //#################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/AlignImages.h
#ifndef tp_image_utils_functions_AlignImages_h #define tp_image_utils_functions_AlignImages_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" #include "tp_image_utils/Point.h" namespace tp_image_utils_functions { //###################################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/ExtractRect.h
<filename>inc/tp_image_utils_functions/ExtractRect.h #ifndef tp_image_utils_functions_ExtractRect_h #define tp_image_utils_functions_ExtractRect_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/Point.h" #include "tp_image_utils/Grid.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_ut...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/DeNoise.h
#ifndef tp_image_utils_functions_DeNoise_h #define tp_image_utils_functions_DeNoise_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //################################################################################################## struct Byt...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/FillConcaveHull.h
#ifndef tp_image_utils_functions_FillConcaveHull_h #define tp_image_utils_functions_FillConcaveHull_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //#############################################################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/AddBorder.h
#ifndef tp_image_utils_functions_AddBorder_h #define tp_image_utils_functions_AddBorder_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" #include "tp_utils/TPPixel.h" namespace tp_image_utils_functions { //############################################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/NormalizeBrightness.h
<reponame>omi-lab/tp_image_utils_functions #ifndef tp_image_utils_functions_NormalizeBrightness_h #define tp_image_utils_functions_NormalizeBrightness_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ColorMap.h" namespace tp_image_utils_functions { //#########################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/SlotFill.h
#ifndef tp_image_utils_functions_SlotFill_h #define tp_image_utils_functions_SlotFill_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //################################################################################################## struct S...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/DrawShapes.h
<filename>inc/tp_image_utils_functions/DrawShapes.h #ifndef tp_image_utils_functions_DrawShapes_h #define tp_image_utils_functions_DrawShapes_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ColorMap.h" #include "tp_image_utils/Point.h" #include "tp_image_utils/Grid.h" #include <stdint.h> #in...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/EdgeDetect.h
<reponame>omi-lab/tp_image_utils_functions<gh_stars>0 #ifndef tp_image_utils_functions_EdgeDetect_h #define tp_image_utils_functions_EdgeDetect_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //#################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/ToPolar.h
<gh_stars>0 #ifndef tp_image_utils_functions_ToPolar_h #define tp_image_utils_functions_ToPolar_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //#################################################################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/ReduceColors.h
#ifndef tp_image_utils_functions_ReduceColors_h #define tp_image_utils_functions_ReduceColors_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //################################################################################################## /...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/ToFloat.h
<reponame>omi-lab/tp_image_utils_functions<gh_stars>0 #ifndef tp_image_utils_functions_ToFloat_h #define tp_image_utils_functions_ToFloat_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ColorMap.h" namespace tp_image_utils_functions { //######################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/FindPixelGrid.h
#ifndef tp_image_utils_functions_FindPixelGrid_h #define tp_image_utils_functions_FindPixelGrid_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" #include "tp_image_utils/Grid.h" namespace tp_image_utils_functions { //################################################################...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/ExtractPolygons.h
<filename>inc/tp_image_utils_functions/ExtractPolygons.h #ifndef tp_image_utils_functions_ExtractRect_h #define tp_image_utils_functions_ExtractRect_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" #include "tp_math_utils/Polygon.h" namespace tp_image_utils_functions { //########...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/DrawLine.h
<reponame>omi-lab/tp_image_utils_functions #ifndef tp_image_utils_functions_DrawLine_h #define tp_image_utils_functions_DrawLine_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ColorMap.h" #include <stdint.h> #include <utility> #include <vector> namespace tp_image_utils_functions { //#####...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/ToHue.h
#ifndef tp_image_utils_functions_ToHue_h #define tp_image_utils_functions_ToHue_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //################################################################################################## //! Extract the...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/PixelManipulation.h
#ifndef tp_image_utils_functions_PixelManipulation_h #define tp_image_utils_functions_PixelManipulation_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" #include "tp_image_utils/ColorMap.h" namespace tp_image_utils_functions { /*! All input and output values are floating point in t...
omi-lab/tp_image_utils_functions
inc/tp_image_utils_functions/CellSegment.h
#ifndef tp_image_utils_functions_CellSegment_h #define tp_image_utils_functions_CellSegment_h #include "tp_image_utils_functions/Globals.h" #include "tp_image_utils/ByteMap.h" namespace tp_image_utils_functions { //################################################################################################## en...
gonzus/dparser
scan.h
/* Copyright 2002-2004 <NAME>, All Rights Reserved */ #ifndef _scan_H_ #define _scan_H_ typedef struct ShiftResult { struct SNode *snode; D_Shift *shift; d_loc_t loc; } ShiftResult; int scan_buffer(d_loc_t *loc, D_State *st, ShiftResult *result); #endif
gonzus/dparser
read_binary.c
<gh_stars>0 /* Copyright 2002-2008 <NAME>, All Rights Reserved */ #include "d.h" #include "util.h" #include "dparse_tables.h" #include "read_binary.h" static void read_chk(void *ptr, size_t size, size_t nmemb, FILE *fp, unsigned char **str) { if (fp) { if (fread(ptr, size, nmemb, fp) != nmemb) d_fail("error r...
gonzus/dparser
d.h
<filename>d.h /* Copyright 2002-2004 <NAME>, All Rights Reserved */ #ifndef _d_H_ #define _d_H_ #define __USE_MINGW_ANSI_STDIO 1 #ifdef MEMWATCH #define MEMWATCH_STDIO 1 #include "../../src/memwatch-2.67/memwatch.h" #define MEM_GROW_MACRO #endif #include <assert.h> #include <stdarg.h> #include <stdlib.h> #include <s...
gonzus/dparser
sample_parser.c
<reponame>gonzus/dparser /* Copyright 2002-2004 <NAME>, All Rights Reserved */ #include "d.h" #include "util.h" #include "dsymtab.h" #include "dparse_tables.h" #include "dparse.h" #include "gram.h" #include "scan.h" #include "parse.h" #include "arg.h" #define SIZEOF_MY_PARSE_NODE 100 /* permit test cases up to this...
gonzus/dparser
lex.c
/* Copyright 2002-2004 <NAME>, All Rights Reserved */ #include "d.h" #include "util.h" #include "dparse_tables.h" #include "gram.h" #include "lr.h" #include "lex.h" typedef struct NFAState { uint index; Vec(struct NFAState *) chars[256]; Vec(struct NFAState *) epsilon; Vec(Action *) accepts; Vec(Action *)...
gonzus/dparser
util.c
/* Copyright 2002-2006 <NAME>, All Rights Reserved */ #include "d.h" #include "util.h" uint d_prime2[] = {1, 3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573...
gonzus/dparser
scan.c
<filename>scan.c /* Copyright 2002-2004 <NAME>, All Rights Reserved */ #include "d.h" #include "dparse_tables.h" #include "scan.h" int scan_buffer(d_loc_t *aloc, D_State *parse_state, ShiftResult *results) { d_loc_t loc = *aloc, last_loc = *aloc; char *s = loc.s; int col = loc.col, line = loc.line; int nres...
yelite/RoomMonitor
sensors/DHT/main.c
#include <stdio.h> #include <pcduino/Arduino.h> #define DHTLIB_OK 0 #define DHTLIB_ERROR_CHECKSUM -1 #define DHTLIB_ERROR_TIMEOUT -2 typedef struct return_value { int flag; uint8_t temp; uint8_t hum; } dht_data; dht_data readDHT(int pin) { dht_data val; // BUFFER TO RECEIVE uint8_t bits[5]; uint8_t cnt = 7...
yelite/RoomMonitor
sensors/BMP/Wire.h
/* TwoWire.h - TWI/I2C library for Wiring */ #ifndef TwoWire_h #define TwoWire_h #include <inttypes.h> #include "pcduino/Stream.h" #define BUFFER_LENGTH 32 class TwoWire : public Stream { private: static int i2c_handle; static uint8_t rxBuffer[]; static uint8_t rxBufferIndex; static uint8_t rxBu...
yelite/RoomMonitor
sensors/LightSensor/main.c
<gh_stars>0 #include <pcduino/Arduino.h> void setup() { if (argc != 2) { printf("usage: %s GPIOpin#\n", argv[0]); printf("example: %s 4 - Read from an light sensor connected to GPIO #4\n", argv[0]); exit(1); } int pin = atoi(argv[1]); int rv = analogRead(pin); printf("Voltage(mV): \n%d\n", rv); } void lo...
hl4080/RDMA-Tutorial
debug.h
<reponame>hl4080/RDMA-Tutorial /* * code from : http://c.learncodethehardway.org/book/ex20.html */ #ifndef DEBUG_H_ #define DEBUG_H_ #include <stdio.h> #include <errno.h> #include <string.h> #define LOG_HEADER "\n================ %s ================\n" #define LOG_SUB_HEADER "\n************ %s ************\n" ...
hl4080/RDMA-Tutorial
setup_ib.c
<gh_stars>100-1000 #include <arpa/inet.h> #include <unistd.h> #include <malloc.h> #include "sock.h" #include "ib.h" #include "debug.h" #include "config.h" #include "setup_ib.h" struct IBRes ib_res; int connect_qp_server () { int ret = 0, n = 0, i = 0; int num_peers = config_info.num...
hl4080/RDMA-Tutorial
config.c
<gh_stars>100-1000 #include <stdlib.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <sys/utsname.h> #include "debug.h" #include "config.h" struct ConfigInfo config_info; /* remove space, tab and line return from the line */ void clean_up_line (char *line) { char *i = line; char *j = li...
hl4080/RDMA-Tutorial
server.h
#ifndef SERVER_H_ #define SERVER_H_ int run_server (); #endif /* server.h */
hl4080/RDMA-Tutorial
sock.c
<filename>sock.c #define _GNU_SOURCE #include <sys/socket.h> #include <netdb.h> #include <arpa/inet.h> #include <unistd.h> #include <string.h> #include "debug.h" #include "sock.h" ssize_t sock_read (int sock_fd, void *buffer, size_t len) { ssize_t nr, tot_read; char *buf = buffer; // avoid pointer arithmetic ...
hl4080/RDMA-Tutorial
config.h
#ifndef CONFIG_H_ #define CONFIG_H_ #include <stdbool.h> #include <inttypes.h> enum ConfigFileAttr { ATTR_SERVERS = 1, ATTR_CLIENTS, ATTR_MSG_SIZE, ATTR_NUM_CONCURR_MSGS, }; struct ConfigInfo { int num_servers; int num_clients; char **servers; /* list of servers */ char **c...
hl4080/RDMA-Tutorial
client.h
#ifndef CLIENT_H_ #define CLIENT_H_ int run_client (); #endif /* client.h */
hl4080/RDMA-Tutorial
setup_ib.h
<filename>setup_ib.h #ifndef SETUP_IB_H_ #define SETUP_IB_H_ #include <infiniband/verbs.h> struct IBRes { struct ibv_context *ctx; struct ibv_pd *pd; struct ibv_mr *mr; struct ibv_cq *cq; struct ibv_qp **qp; struct ibv_srq *srq; struct ibv_port_attr port_attr; struct...
thomascrmbz/cpp-chatapp
src/client/command_handler.h
<gh_stars>0 #pragma once #include "chat_server.h" #include "chat_ui.h" #include <string> #include <vector> #include <sstream> #include <iterator> namespace ChatApp { class CommandHandler { public: static void handle(std::string command, std::vector<std::string> args, ChatApp::ChatUI * chat_ui, ChatApp:...
thomascrmbz/cpp-chatapp
src/server/user.h
<filename>src/server/user.h #pragma once #include <string> #include <websocket_server.h> namespace ChatApp { class User { public: User(std::string username, WebSocket::Connection * connection); public: std::string get_username(void); WebSocket::Connection * get_connection(void); pu...
thomascrmbz/cpp-chatapp
src/client/chat_ui.h
#pragma once #include <string> #include <functional> #include <vector> namespace ChatApp { class ChatUI { public: ChatUI(void); ~ChatUI(); public: std::string ask_ip(void); std::string ask_username(void); public: void print_global_message(std::string username, std::stri...
thomascrmbz/cpp-chatapp
src/client/helper.h
<gh_stars>0 #pragma once #include <string> #include <vector> class Helper { public: static char getch(void); static std::string trim_string(std::string str); static std::vector<std::string> string_to_vector(std::string str); };
thomascrmbz/cpp-chatapp
src/client/chat_server.h
<reponame>thomascrmbz/cpp-chatapp<filename>src/client/chat_server.h<gh_stars>0 #pragma once #include <string> #include <functional> #include <websocket_client.h> namespace ChatApp { class ChatServer { public: ChatServer(std::string ip); ~ChatServer(); public: void set_username(std::stri...
jamshark70/pure-data
src/s_midi_pm.c
<filename>src/s_midi_pm.c /* Copyright (c) 1997-2003 <NAME>, <NAME>, <NAME>, * <NAME>, <NAME>, and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. this file calls portmidi to do MIDI I/O for MSW and Mac OSX. */ #in...
jamshark70/pure-data
src/s_file.c
/* Copyright (c) 1997-2004 <NAME>. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* * this file implements a mechanism for storing and retrieving preferences. * Should later be renamed "preferences.c" or something. * ...
jamshark70/pure-data
src/d_soundfile.h
<reponame>jamshark70/pure-data<filename>src/d_soundfile.h /* Copyright (c) 2019 <NAME>. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* soundfile formats and helper functions */ #pragma once #include "m_pd.h" #ifdef HA...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/bnxt/bnxt_cpr.h
<filename>kdns/dpdk-17.02/drivers/net/bnxt/bnxt_cpr.h<gh_stars>100-1000 /*- * BSD LICENSE * * Copyright(c) Broadcom Limited. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: ...
vicharl/containerdns
kdns/src/local_udp_process.h
<gh_stars>100-1000 #ifndef _LOCAL_UDP_PROCESS_H_ #define _LOCAL_UDP_PROCESS_H_ #include <arpa/inet.h> #include "db_update.h" int local_udp_process_init(void); int local_udp_domian_databd_update(struct domin_info_update *update); int local_udp_zones_reload(char *del_zones, char *add_zones); #endif /* _LOCAL_UDP_PR...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/virtio/virtio_user/virtio_user_dev.h
/*- * BSD LICENSE * * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source cod...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/thunderx/base/nicvf_plat.h
<filename>kdns/dpdk-17.02/drivers/net/thunderx/base/nicvf_plat.h /* * BSD LICENSE * * Copyright (C) Cavium networks Ltd. 2016. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributio...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/i40e/rte_pmd_i40e.h
<filename>kdns/dpdk-17.02/drivers/net/i40e/rte_pmd_i40e.h /*- * BSD LICENSE * * Copyright (c) 2017 Intel Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * R...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/sfc/sfc_tx.h
/*- * Copyright (c) 2016 Solarflare Communications Inc. * All rights reserved. * * This software was jointly developed between OKTET Labs (under contract * for Solarflare) and Solarflare Communications, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted pro...
vicharl/containerdns
kdns/src/rate_limit.c
/* * rate_limit.c */ #include <rte_common.h> #include <rte_eal.h> #include <rte_malloc.h> #include <rte_mempool.h> #include <rte_hash.h> #include <rte_mbuf.h> #include <rte_meter.h> #include <rte_cycles.h> #include <arpa/inet.h> #include "kdns.h" #include "dns-conf.h" #include "rate_limit.h" #if defined(RTE_MACHIN...
vicharl/containerdns
kdns/dpdk-17.02/lib/librte_eal/linuxapp/eal/eal_interrupts.c
<filename>kdns/dpdk-17.02/lib/librte_eal/linuxapp/eal/eal_interrupts.c<gh_stars>100-1000 /*- * BSD LICENSE * * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provi...
vicharl/containerdns
kdns/src/metrics.h
<gh_stars>100-1000 #ifndef _METRICS_H_ #define _METRICS_H_ #include <stdio.h> #include <time.h> #include "webserver.h" typedef struct metrics_metrics { uint64_t minTime; uint64_t maxTime; uint64_t timeSum; uint64_t metrics[4]; } metrics_metrics_st; uint64_t time_now_usec(void); int metrics_host_relo...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/i40e/i40e_rxtx_vec_sse.c
<filename>kdns/dpdk-17.02/drivers/net/i40e/i40e_rxtx_vec_sse.c /*- * BSD LICENSE * * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following con...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/enic/enic_rxtx.c
<gh_stars>100-1000 /* Copyright 2008-2016 Cisco Systems, Inc. All rights reserved. * Copyright 2007 Nuova Systems, Inc. All rights reserved. * * Copyright (c) 2014, Cisco Systems, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted pr...
vicharl/containerdns
kdns/dpdk-17.02/lib/librte_ether/rte_flow_driver.h
<filename>kdns/dpdk-17.02/lib/librte_ether/rte_flow_driver.h /*- * BSD LICENSE * * Copyright 2016 6WIND S.A. * Copyright 2016 Mellanox. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * R...
vicharl/containerdns
kdns/dpdk-17.02/app/test-crypto-perf/cperf_test_throughput.c
<gh_stars>100-1000 /*- * BSD LICENSE * * Copyright(c) 2016-2017 Intel Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must ...
vicharl/containerdns
kdns/dpdk-17.02/app/test-pmd/csumonly.c
<filename>kdns/dpdk-17.02/app/test-pmd/csumonly.c /*- * BSD LICENSE * * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. * Copyright 2014 <NAME>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that th...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/qede/qede_rxtx.c
/* * Copyright (c) 2016 QLogic Corporation. * All rights reserved. * www.qlogic.com * * See LICENSE.qede_pmd for copyright and licensing details. */ #include "qede_rxtx.h" static bool gro_disable = 1; /* mod_param */ static inline int qede_alloc_rx_buffer(struct qede_rx_queue *rxq) { struct rte_mbuf *new_mb =...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/ixgbe/ixgbe_fdir.c
/*- * BSD LICENSE * * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source cod...
vicharl/containerdns
kdns/core/radtree.c
/* * radtree.c * radtree -- generic radix tree for binary strings. * * Copyright (c) 2001-2006, NLnet Labs. * * */ #include <assert.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <time.h> #include <stdio.h> #include <ctype.h> #include "radtree.h" #include "util.h" struct radtree* rad...
vicharl/containerdns
kdns/deps/libmicrohttpd/src/examples/demo_https.c
<filename>kdns/deps/libmicrohttpd/src/examples/demo_https.c /* This file is part of libmicrohttpd Copyright (C) 2013 <NAME> (and other contributing authors) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as publi...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/sfc/sfc_rx.c
/*- * Copyright (c) 2016 Solarflare Communications Inc. * All rights reserved. * * This software was jointly developed between OKTET Labs (under contract * for Solarflare) and Solarflare Communications, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted pro...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/thunderx/base/nicvf_bsvf.h
<filename>kdns/dpdk-17.02/drivers/net/thunderx/base/nicvf_bsvf.h<gh_stars>100-1000 /* * BSD LICENSE * * Copyright (C) Cavium networks Ltd. 2016. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
vicharl/containerdns
kdns/dpdk-17.02/examples/ipsec-secgw/esp.c
/*- * BSD LICENSE * * Copyright(c) 2016 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code mus...
vicharl/containerdns
kdns/dpdk-17.02/lib/librte_vhost/vhost.c
/*- * BSD LICENSE * * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source cod...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/i40e/i40e_rxtx_vec_neon.c
/*- * BSD LICENSE * * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * Copyright(c) 2016, Linaro Limited * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: *...
vicharl/containerdns
kdns/dpdk-17.02/drivers/net/qede/base/ecore_sp_commands.c
/* * Copyright (c) 2016 QLogic Corporation. * All rights reserved. * www.qlogic.com * * See LICENSE.qede_pmd for copyright and licensing details. */ #include "bcm_osal.h" #include "ecore.h" #include "ecore_status.h" #include "ecore_chain.h" #include "ecore_spq.h" #include "ecore_init_fw_funcs.h" #include "ecore...
vicharl/containerdns
kdns/src/domain_update.h
#ifndef __DOMAIN_UPDATE_H__ #define __DOMAIN_UPDATE_H__ #include "db_update.h" #define DNS_STATUS_INIT "init" #define DNS_STATUS_RUN "running" void domian_info_exchange_run(uint16_t web_port, int ssl_enable, char *key_pem_file, char *cert_pem_file); int domain_list_del_zones(char *del_zones); void domain_in...
vicharl/containerdns
kdns/src/hashMap.h
<filename>kdns/src/hashMap.h #ifndef _DNSHASHMAP_H_ #define _DNSHASHMAP_H_ #define HASH_NODE_FIND 1 typedef struct hashNode_ { char *key; void *data; int fingerprint; struct hashNode_ *next; } hashNode; typedef struct hashMap_ { hashNode **hashBuckets; rte_rwlock_t *locks; unsigned int ...