repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
Kepler-Br/Wolfenstein-clone
world.h
// // Created by kepler-br on 6/12/20. // #ifndef WOLFENSTEIN_WORLD_H #define WOLFENSTEIN_WORLD_H #include "types.h" #include <glm/vec2.hpp> class World { private: Block *world; size_t world_length; glm::ivec2 world_dimensions; int block_size = 512; public: World(); const size_t &get_world_l...
Kepler-Br/Wolfenstein-clone
player.h
// // Created by kepler-br on 6/6/20. // #ifndef WOLFENSHETIN_PLAYER_H #define WOLFENSHETIN_PLAYER_H #include <glm/vec2.hpp> #include "lookup_table.h" class Player { int x_view_angle = 0; int y_view_angle = 0; int distance_to_projection_plane = 270; int height = 512; int speed = 128*16; int r...
Kepler-Br/Wolfenstein-clone
framebuffer.h
<filename>framebuffer.h #ifndef FRAMEBUFFER_H #define FRAMEBUFFER_H #include <glm/vec2.hpp> #include <stdexcept> #include "types.h" #include "sdl_wrapper.h" class Framebuffer { public: glm::ivec2 resolution; glm::ivec2 center; size_t pixel_count; uint32_t *pixels; bool is_locked = false; SDL_T...
Kepler-Br/Wolfenstein-clone
state_base.h
<reponame>Kepler-Br/Wolfenstein-clone<gh_stars>0 #ifndef WOLFENSHETIN_STATE_BASE_H #define WOLFENSHETIN_STATE_BASE_H class Main_loop; class State_base { protected: Main_loop &main_loop; State_base* prev_state; public: State_base(Main_loop &main_loop) : main_loop(main_loop) , prev_state(nullptr) ...
Kepler-Br/Wolfenstein-clone
sdl_wrapper.h
// // Created by kepler-br on 6/2/20. // #ifndef WOLFENSHETIN_SDL_WRAPPER_H #define WOLFENSHETIN_SDL_WRAPPER_H #include <SDL2/SDL.h> #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include "types.h" class Sdl_wrapper { private: SDL_Window *window = nullptr; SDL_Renderer* renderer = nullptr; glm::ivec2 r...
Kepler-Br/Wolfenstein-clone
lookup_table.h
<filename>lookup_table.h // // Created by kepler-br on 6/12/20. // #ifndef WOLFENSTEIN_LOOKUP_TABLE_H #define WOLFENSTEIN_LOOKUP_TABLE_H #include <cmath> class Lookup_table { float *cos_table = nullptr; float *icos_table = nullptr; float *sin_table = nullptr; float *isin_table = nullptr; float *t...
Kepler-Br/Wolfenstein-clone
texture.h
<reponame>Kepler-Br/Wolfenstein-clone // // Created by kepler-br on 6/10/20. // #ifndef WOLFENSHETIN_TEXTURE_H #define WOLFENSHETIN_TEXTURE_H #include <string> #include <glm/vec2.hpp> #include "types.h" class Texture_loader; class Texture { private: friend Texture_loader; bool transparent; bool wrap = ...
Kepler-Br/Wolfenstein-clone
world_renderer.h
#ifndef RENDERER_H #define RENDERER_H #include "world.h" #include "sdl_wrapper.h" #include "player.h" #include "raycaster.h" #include "texture_holder.h" #include "render_thread.h" #include "framebuffer.h" #include <condition_variable> #include <atomic> #include <thread> #include <queue> class World_renderer { Wo...
Kepler-Br/Wolfenstein-clone
raycaster.h
<reponame>Kepler-Br/Wolfenstein-clone<gh_stars>0 #ifndef RAYCASTER_H #define RAYCASTER_H #include "world.h" #include "lookup_table.h" class Raycaster { const World &world; Lookup_table &lookup; public: Raycaster(const World& world, Lookup_table &lookup_table); Ray cast(glm::vec2 position, int degree);...
Youngmaster27/libfio
include/exotic/fio/fs.h
<gh_stars>0 /** \copyright MIT License Copyright (c) 2020, <NAME> \author <NAME> <<EMAIL>> \date 07 April 2020 \file xconf.h */ #ifndef EXOTIC_FS_H #define EXOTIC_FS_H #ifdef __cplusplus extern "C" { #endif #include <exotic/xtd/xcommon.h> /*#include <exotic/xtd/xstring.h>*/ #ifdef _WIN32 #include <...
Youngmaster27/libfio
test/filesystem/test_fs.c
/*!gcc {0} -I. -I../../include/ -I../../libxtd/include/ -I../include/ -I../../../libcester/include -o out; ./out */ /*!g++ -ansi -pedantic-errors {0} -I. -I../../include/ -I../../../libxtd/include/ -I../include/ -I../../../libcester/include -o out; ./out */ /*!gcc {0} -I. -I../../include/ -I../../../libcester/include -...
Youngmaster27/libfio
test/crash_test.c
/*!gcc {0} -I. -I../../include/ -I../../libxtd/include/ -I../../../libcester/include -I../include/ -o out; ./out */ #include <stdio.h> #include <exotic/fio/fs.h> #define METAREF_USING_ELSE(body, alt_body) \ if (_status == 0) {\ body\ } else {\ alt_body\ }\ #define METAREF_USING(signature,...
Youngmaster27/libfio
test/filesystem/test_file_io.c
<gh_stars>0 /*!gcc {0} -I. -I../../include/ -I../../libxtd/include/ -I../include/ -I../../../libcester/include -o out; ./out */ /*!g++ -ansi -pedantic-errors {0} -I. -I../../include/ -I../../../libxtd/include/ -I../include/ -I../../../libcester/include -o out; ./out */ /*!gcc {0} -I. -I../../include/ -I../../../libcest...
Youngmaster27/libfio
test/empty_c_file.c
#ifndef EMPTY_FOR_CMAKE #define EMPTY_FOR_CMAKE int main(int argc, char** argv) { return 0; } #endif
ishine/kaldi-serve
plugins/grpc/protos/kaldi_serve.pb.h
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: kaldi_serve.proto #ifndef GOOGLE_PROTOBUF_INCLUDED_kaldi_5fserve_2eproto #define GOOGLE_PROTOBUF_INCLUDED_kaldi_5fserve_2eproto #include <limits> #include <string> #include <google/protobuf/port_def.inc> #if PROTOBUF_VERSION < 3011000 #error This...
smbolton/stm32f3-oscilloscope
src/old_c/_rust.h
<reponame>smbolton/stm32f3-oscilloscope // functions defined in Rust #ifndef _RUST_H #define _RUST_H #include <stdlib.h> #include <stdint.h> extern void delay_ms(unsigned int); extern void st7735_send_cmd(const uint8_t cmd); extern void st7735_send_data(const uint8_t data); extern void st7735_fill_rect(int16_t x, int...
smbolton/stm32f3-oscilloscope
src/old_c/ST7735.c
<filename>src/old_c/ST7735.c /*************************************************** * This is a library for the Adafruit 1.8" SPI display. * * This library works with the Adafruit 1.8" TFT Breakout w/SD card * ----> http://www.adafruit.com/products/358 * as well as Adafruit raw 1.8" TFT display * ----> http:/...
smbolton/stm32f3-oscilloscope
src/old_c/ST7735.h
/*************************************************** This is a library for the Adafruit 1.8" SPI display. This library works with the Adafruit 1.8" TFT Breakout w/SD card ----> http://www.adafruit.com/products/358 as well as Adafruit raw 1.8" TFT display ----> http://www.adafruit.com/products/618 Check out th...
marifoo/uTimer
helpers.h
#ifndef HELPERS #define HELPERS #include <QtGlobal> #include <QString> #include <QDateTime> #include <QPushButton> #include <QColor> qint64 convMinToMsec(const int &minutes); QString convMSecToTimeStr(const qint64 &time); void toggleButtonColor(QPushButton * const button, const QColor &color); QString convMinAndS...
marifoo/uTimer
lockstatewatcher.h
<reponame>marifoo/uTimer #ifndef LOCKSTATEWATCHER_H #define LOCKSTATEWATCHER_H #include <QWidget> #include <Windows.h> #include <QElapsedTimer> #include <deque> #include <memory> #include <QString> #include "settings.h" #include "types.h" class LockStateWatcher : public QWidget { Q_OBJECT private: const Settings ...
marifoo/uTimer
settings.h
<gh_stars>0 #ifndef SETTINGS_H #define SETTINGS_H #include <QtGlobal> #include <QSettings> #include <QString> class Settings { private: QSettings sfile_; int backpause_min_; bool autopause_enabled_; bool autostart_timing_; bool start_minimized_; bool start_pinned_to_top_; bool warning_nopause_; bool warning_a...
marifoo/uTimer
logger.h
<filename>logger.h #ifndef LOGGER_H #define LOGGER_H #include <QString> #include <QFile> class Logger { QFile *logfile_; Logger(); void log(const QString & text); public: static void Log(const QString & text); ~Logger(); }; #endif // LOGGER_H
marifoo/uTimer
types.h
<filename>types.h #ifndef TYPES_H #define TYPES_H enum class Button {Start, Pause, Stop}; enum class LockEvent {None, Unlock, Lock, LongOngoingLock}; #endif // TYPES_H
marifoo/uTimer
mainwin.h
<reponame>marifoo/uTimer #ifndef MAINWIN_H #define MAINWIN_H #include <QMainWindow> #include <QSystemTrayIcon> #include <QString> #include "contentwidget.h" #include "settings.h" #include "types.h" class MainWin : public QMainWindow { Q_OBJECT private: ContentWidget *content_widget_; QSystemTrayIcon *tray_icon_; ...
marifoo/uTimer
timetracker.h
#ifndef TIMETRACKER_H #define TIMETRACKER_H #include <QObject> #include <QtGlobal> #include <QElapsedTimer> #include <vector> #include <memory> #include "settings.h" #include "types.h" class TimeTracker : public QObject { Q_OBJECT private: enum class Mode {Activity, Pause, None}; const Settings & settings_; QEl...
marifoo/uTimer
contentwidget.h
#ifndef CONTENTWIDGET_H #define CONTENTWIDGET_H #include <QWidget> #include <QVBoxLayout> #include <QHBoxLayout> #include <QLabel> #include <QString> #include <QPushButton> #include "settings.h" #include "types.h" class ContentWidget : public QWidget { Q_OBJECT private: Settings & settings_; QVBoxLayout *rows_; ...
Lehamber/a
CT_Project/shaderProgram.h
<reponame>Lehamber/a #pragma once #include <QMatrix4x4> #include <QOpenGLShaderProgram> #include <QOpenGLShader> #include <QVector4D> #include <QVector3D> #include <string> #include <fstream> #include <sstream> #include <iostream> using namespace std; class shaderProgram { private: const char * vertexPath; const ...
Lehamber/a
CT_Project/stdafx.h
<reponame>Lehamber/a<filename>CT_Project/stdafx.h #include <QtWidgets>
Lehamber/a
CT_Project/ReadSTLFile.h
<filename>CT_Project/ReadSTLFile.h #pragma once #include <vector> #include <QVector3D> using namespace std; class ReadSTLFile { public: bool ReadFile(const char *cfilename); int NumTri(); vector<QVector3D> getPointList(); vector<QVector3D> getVectorList(); private: vector<QVector3D> pointList; vector<QVector3D>...
Lehamber/a
CT_Project/MyGLWidget.h
#ifndef MYGLWIDGET_H #define MYGLWIDGET_H #include <QWidget> #include <QOpenGLWidget> #include <QDebug> #include <QOpenGLFunctions_3_3_Core> #include <QOpenGLTexture> #include <QVector3D> #include <QKeyEvent> #include <QTime> #include "shaderProgram.h" #include "camera.h" const GLfloat WHEELSENSITIVITY = 0.001f;...
delock/minigo
cc/dual_net/inference_cache.h
<gh_stars>0 // Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
delock/minigo
cc/logging.h
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
EasternJournalist/mathS
mathS/include/LBAssembler.h
<reponame>EasternJournalist/mathS<filename>mathS/include/LBAssembler.h #pragma once /* In this file, we introduce methods that use lambda expression to assemble a NMathFunction(numeric math function) with given MathObject. Also, the NMathFunction can be converted into a cpp function if you wish. */ namespace mathS...
xiaorancs/shell-tour
MachineVallige/fish-algo/include/vector.h
<reponame>xiaorancs/shell-tour<filename>MachineVallige/fish-algo/include/vector.h<gh_stars>0 /** * Author: xiaoran * Time: 2020-10-28 20:00 * Email: <EMAIL> */ #ifndef FISH_ALGO_INCLUDE_VECTOR_H #define FISH_ALGO_INCLUDE_VECTOR_H #include <stdint.h> #include <string.h> #include <stdlib.h> #include <assert.h> na...
xiaorancs/shell-tour
FishML/FishML/data/dataframe.h
/******************************************************* * Copyright (C) 2020 All rights reserved. * * File: dataframe.h * Author: xiaoran (<EMAIL>) * Date: 2020/09/10 14:54:56 * ******************************************************/ #ifndef FISHML_DATA_DATAFRAME_H #define FISHML_DATA_DATAFRAME_H #include <...
xiaorancs/shell-tour
MachineVallige/fish-algo/include/list.h
<reponame>xiaorancs/shell-tour /** * Author: xiaoran * Time: 2020-10-28 20:00 * Email: <EMAIL> */ #ifndef FISH_ALGO_INCLUDE_LIST_H #define FISH_ALGO_INCLUDE_LIST_H #include <stdint.h> #include <string.h> #include <stdlib.h> #include <assert.h> namespace fish { template<class T> struct ListNode { T data; ...
xiaorancs/shell-tour
FishML/FishML/common/status.h
/******************************************************* * Copyright (C) 2020 All rights reserved. * * File: status.h * Author: xiaoran (<EMAIL>) * Date: 2020/09/10 15:58:56 * ******************************************************/ #ifndef FISHML_COMMON_STATUS_H #define FISHML_COMMON_STATUS_H namespace fishm...
xiaorancs/shell-tour
FishML/FishML/common/utils.h
<reponame>xiaorancs/shell-tour /******************************************************* * Copyright (C) 2020 All rights reserved. * * File: utils.h * Author: xiaoran (<EMAIL>) * Date: 2020/09/10 17:47:54 * ******************************************************/ #ifndef FISHML_COMMON_UTILS_H #define FISHML_COMM...
malmerey/fbthrift
thrift/compiler/test/fixtures/includes/gen-cpp2/MyServiceAsyncClient.h
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <folly/futures/Future.h> #include <thrift/lib/cpp/TApplicationException.h> #include <thrift/lib/cpp2/async/AsyncClient.h> #include <thrift/lib/cpp2/async/FutureRequest.h> #incl...
malmerey/fbthrift
thrift/lib/cpp2/transport/rocket/client/RocketStreamServerCallback.h
/* * Copyright 2019-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
malmerey/fbthrift
thrift/lib/cpp2/gen/client_cpp.h
/* * Copyright 2019-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
malmerey/fbthrift
thrift/compiler/test/fixtures/basic/gen-cpp2/MyServiceEmpty.h
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <folly/futures/Future.h> #include <thrift/lib/cpp/TApplicationException.h> #include <thrift/lib/cpp2/ServiceIncludes.h> #include <thrift/lib/cpp2/async/FutureRequest.h> #includ...
malmerey/fbthrift
thrift/lib/cpp2/async/ReconnectingRequestChannel.h
/* * Copyright 2018-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
malmerey/fbthrift
thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/ReturnService.h
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <folly/futures/Future.h> #include <thrift/lib/cpp/TApplicationException.h> #include <thrift/lib/cpp2/ServiceIncludes.h> #include <thrift/lib/cpp2/async/FutureRequest.h> #includ...
malmerey/fbthrift
thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/EmptyServiceAsyncClient.h
<reponame>malmerey/fbthrift<filename>thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/EmptyServiceAsyncClient.h<gh_stars>0 /** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <folly/futures/Future.h> #include <thrift/lib/cpp...
malmerey/fbthrift
thrift/compiler/test/fixtures/optionals/gen-cpp2/module_types.h
<reponame>malmerey/fbthrift /** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <folly/Optional.h> #include <thrift/lib/cpp2/GeneratedHeaderHelper.h> #include <thrift/lib/cpp2/Thrift.h> #include <thrift/lib/cpp2/gen/module_types...
malmerey/fbthrift
thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/module_data.h
<reponame>malmerey/fbthrift /** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <array> #include <cstddef> #include <thrift/lib/cpp/Thrift.h> #include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/module_types.h" names...
malmerey/fbthrift
thrift/compiler/test/fixtures/basic-enum/gen-cpp2/module_constants.h
<gh_stars>0 /** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <thrift/lib/cpp2/protocol/Protocol.h> #include "thrift/compiler/test/fixtures/basic-enum/gen-cpp2/module_types.h" namespace test { namespace fixtures { namespace ...
malmerey/fbthrift
thrift/compiler/test/fixtures/exceptions/gen-cpp2/RaiserAsyncClient.h
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <folly/futures/Future.h> #include <thrift/lib/cpp/TApplicationException.h> #include <thrift/lib/cpp2/async/AsyncClient.h> #include <thrift/lib/cpp2/async/FutureRequest.h> #incl...
malmerey/fbthrift
thrift/compiler/test/fixtures/basic-enum/gen-cpp2/module_data.h
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #pragma once #include <array> #include <cstddef> #include <thrift/lib/cpp/Thrift.h> #include "thrift/compiler/test/fixtures/basic-enum/gen-cpp2/module_types.h" namespace test { namespace fixtures ...
malmerey/fbthrift
thrift/lib/cpp2/protocol/JSONProtocol-inl.h
<reponame>malmerey/fbthrift<filename>thrift/lib/cpp2/protocol/JSONProtocol-inl.h /* * Copyright 2004-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:/...
hhromic/e131-viewer
src/show_usage.c
<reponame>hhromic/e131-viewer /** * E1.31 (sACN) viewer * <NAME> - http://github.com/hhromic * * Copyright 2016 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:/...
hhromic/e131-viewer
src/write_console.c
/** * E1.31 (sACN) viewer * <NAME> - http://github.com/hhromic * * Copyright 2016 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICEN...
hhromic/e131-viewer
src/main.c
<filename>src/main.c /** * E1.31 (sACN) viewer * <NAME> - http://github.com/hhromic * * Copyright 2016 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
Seanwanq/clearnings
sourcecode/CPP/CLASS/CLASS1/Student.h
<reponame>Seanwanq/clearnings<filename>sourcecode/CPP/CLASS/CLASS1/Student.h #ifndef STUDENT_H #define STUDENT_H #include <iostream> using namespace std; class Student { private: string _name; string _desc; int _age; public: //构造函数的重载规则和普通函数重载相同 Student(); ~Student(); S...
Seanwanq/clearnings
sourcecode/CPP/CLASS/CLASS1/LandOwnerV3.h
/** * 用来演示封装的基本概念 * */ #ifndef LANDOWNERV3_H #define LANDOWNERV3_H #include <iostream> using namespace std; class LandOwnerV3 { //private: //private可以省略 long score; //积分 解决积分被赋值为负数错误的方法:将成员变量score进行隐藏并封装 int cards[20]; string name; public: LandOwnerV3(); ~L...
Seanwanq/clearnings
sourcecode/CPP/CLASS/CLASS1/LandOwner.h
#ifndef LANDOWNER_H #define LANDOWNER_H #include <iostream> using namespace std; class LandOwner { private: string _nickname; string _gender; int _gold; long _exp; public: LandOwner(); LandOwner(string); LandOwner(string, string, int, long); ~LandOwner(); ...
Seanwanq/clearnings
sourcecode/C/structure/class4/Hero.h
<gh_stars>1-10 #ifndef HERO_H #define HERO_H #include <stdio.h> #include <stdlib.h> typedef struct _myTime { int year; int month; int day; } MyTime; typedef struct _hero { char * name; char * sex; char * job; int life; ...
Seanwanq/clearnings
sourcecode/C/structure/class4/main.c
<gh_stars>1-10 #include <stdio.h> #include <stdlib.h> #include "Hero.h" //extern Hero heros[100]; int main() { //printf ("%s\n", heros[0].name); Input(); Show(); return 0; }
Seanwanq/clearnings
sourcecode/C/structure/class3/Hero.c
<gh_stars>1-10 #include "Hero.h" /* typedef struct _hero { int id; char * name; char * sex; Job job; double hp; double speed; //attack speed Ability ability; //special ability PubTime pubTime; } Hero; */ Hero heros[5]; J...
Seanwanq/clearnings
sourcecode/C/structure/class4/Hero.c
<gh_stars>1-10 #include "Hero.h" Hero heros[100] = { {"DIO", 'M', "Soldier", 100, 200.00, "The World!", {2017, 3, 1}}, {"JOJO", 'M', "Soldier", 102, 202.00, "The World!", {2018, 3, 2}}, {"Neja", 'F', "Wizard", 50, 201.00, "Real Fire", {1999, 1, 2}}, }; int count = 3; //the number of heros ...
010pe/ofxFirstPersonCamera
src/ofxFirstPersonCamera.h
#pragma once #include "ofMain.h" class ofxFirstPersonCamera : public ofCamera { public: ofxFirstPersonCamera(); ~ofxFirstPersonCamera(); bool isControlled(); void toggleControl(); void enableControl(); void disableControl(); int keyUp; int keyDown; int keyLeft; int keyRight...
vmi/cocot
l10n_cjk_uni.h
<filename>l10n_cjk_uni.h<gh_stars>10-100 /* * Localization for CJK Language with Unicode * * Copyright (c) 2004 <NAME> * All rights reserved. */ #ifndef L10N_CJK_UNI_H #define L10N_CJK_UNI_H int l10n_cjk_uni_skip(const char **spp, size_t *scp); #endif /* L10N_CJK_UNI_H */
vmi/cocot
l10n_cjk_uni_table.h
<reponame>vmi/cocot #ifndef L10N_CJK_UNI_TABLE_H #define L10N_CJK_UNI_TABLE_H #define CJK_WIDTH_LENGTH (0x10000 / 32) extern unsigned long cjk_width[CJK_WIDTH_LENGTH]; #endif /* L10N_CJK_UNI_TABLE_H */
vmi/cocot
cocot.c
/* * cocot - COde COnverter on Tty * * Copyright (c) 2002, 2004, 2005, 2008 <NAME> * All rights reserved. */ #if HAVE_CONFIG_H # include <config.h> #endif #include <stdio.h> #if HAVE_STDLIB_H # include <stdlib.h> #endif #if HAVE_UNISTD_H # include <unistd.h> #endif #if HAVE_UTMP_H # include <utmp.h> #endif #...
vmi/cocot
sigwinch.h
<reponame>vmi/cocot /* * Register & Remove SIGWINCH handler * * Copyright (c) 2002 <NAME> * All rights reserved. */ #ifndef SIGWINCH_H #define SIGWINCH_H int reg_sigwinch(int fd); int rm_sigwinch(void); #endif /* SIGWINCH_H */
vmi/cocot
l10n_cjk_uni.c
/* * Localization for CJK Language with Unicode * * Copyright (c) 2004, 2005 <NAME> * All rights reserved. */ #if HAVE_CONFIG_H # include <config.h> #endif #if HAVE_SYS_TYPES_H # include <sys/types.h> #endif #if HAVE_ICONV_H # include <iconv.h> #endif #include <errno.h> #include "l10n_cjk_uni.h" #include "l10...
vmi/cocot
suspend.c
<reponame>vmi/cocot #if HAVE_CONFIG_H # include <config.h> #endif #include "errno.h" #if HAVE_SIGNAL_H # include <signal.h> #endif #if HAVE_STRING_H # include <string.h> #endif #if HAVE_UNISTD_H # include <unistd.h> #endif #include "init.h" int do_tstp = 0; static struct sigaction oact; void sigtstp(int unused)...
vmi/cocot
debug.h
#ifndef DEBUG_H #define DEBUG_H #if DEBUG #include <stdio.h> extern FILE *debug; #endif #endif /* DEBUG_H */
vmi/cocot
sigwinch.c
<reponame>vmi/cocot /* * Register & Remove SIGWINCH handler * * Copyright (c) 2002 <NAME> * All rights reserved. */ #if HAVE_CONFIG_H # include <config.h> #endif #if HAVE_UNISTD_H # include <unistd.h> #endif #if HAVE_TERMIOS_H # include <termios.h> #endif #if HAVE_SIGNAL_H # include <signal.h> #endif #if HAV...
vmi/cocot
init.h
<reponame>vmi/cocot<filename>init.h #ifndef INIT_H #define INIT_H struct termios; struct winsize; void init(int *mfd_p, int *sfd_p); void init_tty(int mfd, struct termios *term_p, struct winsize *win_p); void reset_tty(void); void fatal(const char *fmt, ...); #endif /* INIT_H */
vmi/cocot
loop.c
/* * Main Loop * * Copyright (c) 2002, 2004 <NAME> * All rights reserved. */ #if HAVE_CONFIG_H # include <config.h> #endif #if HAVE_UNISTD_H # include <unistd.h> #endif #if HAVE_SYS_TYPES_H # include <sys/types.h> #endif #if HAVE_SYS_TIME_H # include <sys/time.h> #endif #if HAVE_STRING_H # include <string.h...
vmi/cocot
l10n_ja.h
<filename>l10n_ja.h /* * Localization for Japanese Language * * Copyright (c) 2002 <NAME> * All rights reserved. */ #ifndef L10N_JA_H #define L10N_JA_H #if HAVE_SYS_TYPES_H # include <sys/types.h> #endif void * l10n_ja_open(int dec_jis); int l10n_ja_close(void *ja); size_t l10n_ja_eucj2sjis(void *ja, co...
vmi/cocot
ccio.c
/* * I/O with Code Convertion * * Copyright (c) 2002, 2004, 2005 <NAME> * All rights reserved. */ #if HAVE_CONFIG_H # include <config.h> #endif #if HAVE_STRING_H # include <string.h> #endif #if HAVE_UNISTD_H # include <unistd.h> #endif #include <errno.h> #include "l10n_ja.h" #include "l10n_cjk_uni.h" #includ...
vmi/cocot
suspend.h
extern int do_tstp; void sigtstp(int); int reg_sigtstp(void); int rm_sigtstp(void); void do_suspend(void); void setfg(void);
vmi/cocot
loop.h
/* * Main Loop * * Copyright (c) 2002 <NAME> * All rights reserved. */ #ifndef LOOP_H #define LOOP_H #include <stdio.h> void loop(int mfd, FILE *fp, char *term_input_code, char *term_output_code, char *proc_input_code, char *proc_output_code, int dec_jis); #endif /* LOOP_H */
vmi/cocot
init.c
<gh_stars>10-100 /* * Initialize & Finalize * * Copyright (c) 2002 <NAME> * All rights reserved. */ #if HAVE_CONFIG_H # include <config.h> #endif #include <stdio.h> #if HAVE_STDLIB_H # include <stdlib.h> #endif #include <stdarg.h> #if HAVE_UNISTD_H # include <unistd.h> #endif #if HAVE_TERMIOS_H # include <te...
vmi/cocot
ccio.h
/* * I/O with Code Convertion * * Copyright (c) 2002, 2004 <NAME> * All rights reserved. */ #ifndef CCIO_H #define CCIO_H #include <stdio.h> #if HAVE_ICONV_H # include <iconv.h> #endif typedef enum CCIO_STATUS { CCIO_ERROR = -1, CCIO_SUCCESS = 0, CCIO_EOF = 1, } CCIO_STATUS; /* 2^12 = 409...
vmi/cocot
l10n_cjk_uni_table.c
#include "l10n_cjk_uni_table.h" unsigned long cjk_width[CJK_WIDTH_LENGTH] = { 0x00000800, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xf7df6592, 0xc1810040, 0x578d3743, 0x080a0002, 0x810e08c0, 0x000c2f17, 0x000008c0, 0x00000000, 0x00000000, 0x15554000, 0x00000000, 0x00000000, 0x00000000, 0x000...
rubychan/shootout
example-code/c.c
#include "ruby.h" #include "util.h" #include "st.h" VALUE rb_cArray; static ID id_cmp; #define ARY_DEFAULT_SIZE 16 #define ARY_MAX_SIZE (LONG_MAX / sizeof(VALUE)) void rb_mem_clear(mem, size) register VALUE *mem; register long size; { while (size--) { *mem++ = Qnil; } } static inline void memfill(m...
Montimage/mmt-probe
test/perf/dpdk_alloc_perf.c
/* * dpdk_alloc_perf.c * * Created on: Aug 24, 2018 * by: <NAME> */ #include <stdio.h> #include <string.h> #include <stdint.h> #include <errno.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_launch.h> #include <rte_eal.h> #include <rte_per...
Montimage/mmt-probe
src/modules/dpi/reconstruct/ftp/ftp_reconstruct.h
/* * ftp_reconstruct.h * * Created on: May 29, 2018 * by: <NAME> * * Reconstruct data from FTP session. */ #ifndef SRC_MODULES_DPI_RECONSTRUCT_FTP_FTP_RECONSTRUCT_H_ #define SRC_MODULES_DPI_RECONSTRUCT_FTP_FTP_RECONSTRUCT_H_ #include <mmt_core.h> #include "../../../../configure.h" typedef struct ftp...
Montimage/mmt-probe
src/modules/packet_capture/dpdk/spsc_ring.h
<reponame>Montimage/mmt-probe<filename>src/modules/packet_capture/dpdk/spsc_ring.h<gh_stars>1-10 /* * sp_sc_ring.h * * Created on: Sep 28, 2018 * by: <NAME> */ #ifndef SRC_MODULES_PACKET_CAPTURE_DPDK_SPSC_RING_H_ #define SRC_MODULES_PACKET_CAPTURE_DPDK_SPSC_RING_H_ #include <stdint.h> #include <stdbool...
Montimage/mmt-probe
src/modules/output/output.c
/* * output.c * * Created on: Dec 18, 2017 * by: <NAME> */ #include <stdarg.h> #include <pthread.h> #include "../../configure.h" #include "output.h" #include "../../lib/string_builder.h" #include "../../lib/malloc.h" #include "../../lib/memory.h" #include "file/file_output.h" #include "kafka/kafka_out...
Montimage/mmt-probe
src/lib/limit.h
/* * limit.h * * Created on: Dec 19, 2017 * by: <NAME> * This file enable/disable some macro when compiling MMT-Probe. */ #ifndef SRC_LIB_LIMIT_H_ #define SRC_LIB_LIMIT_H_ //maximal length of an absolute path #define MAX_LENGTH_FULL_PATH_FILE_NAME 255 #define MAX_LENGTH_REPORT_MESSAGE 3000 //TOD...
Montimage/mmt-probe
src/modules/dpi/reassembly/tcp_reassembly.c
<filename>src/modules/dpi/reassembly/tcp_reassembly.c<gh_stars>1-10 /* * tcp_reassembly.c * * Created on: Jun 15, 2018 * by: <NAME> */ #include "tcp_reassembly.h" #include <tcpip/mmt_tcpip.h> #include "../../../lib/memory.h" struct tcp_reassembly_struct{ tcp_session_payload_callback_t callback; void ...
Montimage/mmt-probe
src/modules/dpi/report/query/operator_stack.h
/* * operator_stack.h * * Stack of operators * * Created on: Apr 5, 2022 * Author: nhnghia */ #ifndef SRC_MODULES_DPI_REPORT_QUERY_OPERATOR_STACK_H_ #define SRC_MODULES_DPI_REPORT_QUERY_OPERATOR_STACK_H_ #include "operator.h" typedef struct _query_operator_stack query_operator_stack_t; data_types_t qu...
Montimage/mmt-probe
src/modules/packet_capture/pcap/lock_free_spsc_ring.c
/* * lock_free_spsc_ring.c * * Created on: 31 mars 2016 * by: <NAME> * * An implementation of Lamport queue without lock * based on https://github.com/blytkerchan/Lamport */ #include <stdlib.h> #include <stdatomic.h> #include "lock_free_spsc_ring.h" void queue_free( lock_free_spsc_ring_t *q ){ if( q...
Montimage/mmt-probe
src/modules/dpi/reassembly/tcp_reassembly.h
/* * tcp_reassembly.h * * Created on: Jun 8, 2018 * by: <NAME> */ #ifndef SRC_MODULES_DPI_REASSEMBLY_TCP_REASSEMBLY_H_ #define SRC_MODULES_DPI_REASSEMBLY_TCP_REASSEMBLY_H_ #include <stdbool.h> #include <mmt_core.h> typedef struct tcp_reassembly_struct tcp_reassembly_t; typedef void (*tcp_session_payl...
Montimage/mmt-probe
src/_old/pcap_capture.c
/* * pcap_capture.c * * Created on: Mar 29, 2017 * Author: montimage */ #include <pcap.h> #include <pthread.h> #include "mmt_core.h" #include "processing.h" #include "lib/packet_hash.h" #include "lib/data_spsc_ring.h" #include "lib/optimization.h" #include "lib/system_info.h" #include <netinet/tcp.h> #inclu...
Montimage/mmt-probe
src/modules/output/redis/redis.h
/* * redis.h * * Created on: May 29, 2018 * by: <NAME> */ #ifndef SRC_MODULES_OUTPUT_REDIS_REDIS_H_ #define SRC_MODULES_OUTPUT_REDIS_REDIS_H_ #include "../../../configure.h" typedef struct redis_output_struct redis_output_t; redis_output_t *redis_init( const redis_output_conf_t * ); void redis_releas...
Montimage/mmt-probe
src/modules/dynamic_conf/agency.c
<gh_stars>1-10 /* * agency.c * * Created on: May 16, 2018 * by: <NAME> */ #include <stdlib.h> #include <errno.h> #include <string.h> #include <unistd.h> #include "agency.h" #include "mmt_bus.h" #include "command.h" #include "server.h" #include "../../context.h" #include "../../lib/log.h" #include "../...
Montimage/mmt-probe
src/modules/dynamic_conf/agency.h
/* * agency.h * * Created on: May 16, 2018 * by: <NAME> * * This agency must be embedded inside the processing process to receive control commands from control process */ #ifndef SRC_MODULES_DYNAMIC_CONF_AGENCY_H_ #define SRC_MODULES_DYNAMIC_CONF_AGENCY_H_ #include <stdbool.h> /** * In this functi...
Montimage/mmt-probe
src/modules/dpi/report/query_based_report.c
<filename>src/modules/dpi/report/query_based_report.c /* * query_based_report.c * * Created on: Mar 31, 2022 * Author: nhnghia */ #include <mmt_core.h> #include <stdbool.h> #include "../dpi_tool.h" #include "../../output/output.h" #include "../../../lib/malloc_ext.h" #include "../../../lib/hash.h" #include "...
Montimage/mmt-probe
src/_old/attributes_extraction.c
/* * attributes_extraction.c * * Created on: Dec 28, 2016 * Author: montimage */ #include <stdio.h> #include <string.h> #include <math.h> #include <time.h> #define __STDC_FORMAT_MACROS #include <inttypes.h> #include "mmt_core.h" #include "tcpip/mmt_tcpip.h" #include "processing.h" /** * FTP command struct...
Montimage/mmt-probe
test/perf/gettimeofday2.c
<gh_stars>1-10 /* * gettimeofday2.c * * Created on: Oct 5, 2018 * Author: nhnghia * * Build with -lrt */ #define _POSIX_C_SOURCE 200112L #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <sys/time.h> int main() { struct timespec tv_start, tv_end; struct...
Montimage/mmt-probe
src/modules/dpi/lte/topology_report.h
<gh_stars>1-10 /* * topology_report.h * * Created on: Dec 13, 2018 * by: Huu-Nghia * * Report elements to be added or removed from the current topology of LTG-5G network */ #ifndef SRC_MODULES_DPI_LTE_TOPOLOGY_REPORT_H_ #define SRC_MODULES_DPI_LTE_TOPOLOGY_REPORT_H_ #include <stdlib.h> #include <std...
Montimage/mmt-probe
src/_old/processing.h
#ifndef PROCESSING_H #define PROCESSING_H #ifdef __cplusplus extern "C" { #endif //#define _GNU_SOURCE #include "lib/data_spsc_ring.h" #include "mmt_core.h" #include "tcpip/mmt_tcpip_protocols.h" #include <sysrepo.h> #include <semaphore.h> #include "rdkafka.h" #include <stdatomic.h> #ifndef __USE_GNU #define __USE_GN...
Montimage/mmt-probe
src/configure_override.c
<filename>src/configure_override.c /* * configure_override.c * * Created on: Apr 23, 2018 * by: <NAME> */ #include "lib/log.h" #include "lib/malloc.h" #include "lib/memory.h" #include "configure_override.h" static bool _parse_bool( const char *value ){ if( IS_EQUAL_STRINGS( value, "true" ) ) return...
Montimage/mmt-probe
src/modules/routine/routine.h
<reponame>Montimage/mmt-probe /* * routine.h * * Created on: Dec 22, 2017 * by: <NAME> */ #ifndef SRC_MODULES_ROUTINE_ROUTINE_H_ #define SRC_MODULES_ROUTINE_ROUTINE_H_ #include "../../context.h" typedef struct routine_struct routine_t; routine_t *routine_create_and_start( probe_context_t * ); void r...