repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
Drengr-Engine/Drengr
Engine/src/core/graphics/cameras/Camera.h
#pragma once #include <glad/glad.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <glm/gtx/rotate_vector.hpp> #include <glm/gtx/vector_angle.hpp> #include "../assets/Shader.h" namespace Drengr { class Camera { public: // Stores th...
Drengr-Engine/Drengr
Engine/src/core/windows/ui/UI.h
<filename>Engine/src/core/windows/ui/UI.h #pragma once #include "../Window.h" #include "UiWindows.h" #include <imgui/imgui_internal.h> #include <core/graphics/assets/Texture.h> #include <fstream> #include <vector> namespace Drengr { namespace UI { class UIManager { public: UIManager(); virtual ~UIManag...
Drengr-Engine/Drengr
Engine/src/core/windows/Window.h
#pragma once #include <debug/Debugger.h> #include <glad/glad.h> #include <GLFW/glfw3.h> namespace Drengr{ class Window { public: Window(); ~Window(); static bool Create(const char* windowTitle, int m_width, int m_height, bool maximized = true); static bool ShouldClose(); static void SwapBuffers(); st...
Drengr-Engine/Drengr
Engine/src/core/windows/ui/EditorWindow.h
<filename>Engine/src/core/windows/ui/EditorWindow.h #pragma once #include "UiWindow.h" namespace Drengr { namespace UI { class EditorWindow : public UIWindow { // Inherited via UIWindow virtual void Draw() override; }; } }
Drengr-Engine/Drengr
Engine/src/core/graphics/assets/Texture.h
#pragma once #include "Shader.h" #include "stbi_image/stbi_image.h" namespace Drengr { class Texture { public: Texture(const char* img_filePath, const char* textureType, unsigned int insertSlot, GLenum format = GL_RGBA, GLenum pixelFormat = GL_UNSIGNED_BYTE); void AssignTextureUnit(Shader& shader, const char* u...
Drengr-Engine/Drengr
Engine/src/core/graphics/assets/Mesh.h
#pragma once #include "../buffers/VertexArrayObject.h" #include "../buffers/ElementBuffer.h" #include "../cameras/Camera.h" #include "Texture.h" namespace Drengr { class Mesh { public: Mesh(std::vector<Vertex>& vertices, std::vector<unsigned int>& indices, std::vector<Texture>& textures); VertexArrayObject v...
Drengr-Engine/Drengr
Engine/src/data structures/Vector.h
#pragma once namespace Drengr { // basic vector implementation template<typename T> class Vector { public: Vector(int capacity = 0) : m_capacity(0), m_size(0), m_data(nullptr), b_ptr(0), f_ptr(0) { if (capacity != 0)Resize(capacity); } Vector& operator[](int& offset){ return m_data[offset]; } virtual ...
Drengr-Engine/Drengr
Engine/src/core/graphics/assets/Shader.h
<filename>Engine/src/core/graphics/assets/Shader.h #pragma once #include <glad/glad.h> #include <string> #include <fstream> #include <sstream> #include <iostream> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> namespace Drengr { class Shader { public: Shader(const char* v_path, const c...
Drengr-Engine/Drengr
Engine/src/core/graphics/buffers/ElementBuffer.h
#pragma once #include <glad/glad.h> #include <vector> namespace Drengr { class ElementBuffer { public: ElementBuffer(std::vector<unsigned int> indices); void Bind(); void Unbind(); void Delete(); private: unsigned int m_ID; }; }
Drengr-Engine/Drengr
Engine/src/core/windows/ui/UIWindows.h
<reponame>Drengr-Engine/Drengr #pragma once // -- STOP -- // THIS FILE SHOULD ONLY INCLUDE WINDOWS TO INCLUDE TO THE // UI MANAGER SO THAT THEY CAN BE SAFELY USED #include "UiWindow.h" #include "EditorWindow.h" #include "InspectorWindow.h"
Drengr-Engine/Drengr
Engine/src/debug/Debugger.h
<gh_stars>0 #pragma once #include <iostream> #include <string> #include <sstream> namespace Drengr { enum class LogPriority { INFO, // normal logs WARNING, // compiler warnings to be sent to the developer CRITICAL, // could be breaking FATAL // need to be breaking }; class Debugger { public: s...
fed-v/HarvardX_CS50x3
pset1/mario.c
<reponame>fed-v/HarvardX_CS50x3 #include <cs50.h> #include <stdio.h> int main(void){ // INIT VARIABLES int flag = 1; int height = 0; printf("Height: "); height = GetInt(); //GET PYRAMID HEIGHT FROM USER do{ // CONTROL EXIT CODE OF 0 if(height==0){ ...
fed-v/HarvardX_CS50x3
pset3/pset4/breakout.c
<gh_stars>0 // // breakout.c // // Computer Science 50 // Problem Set 4 // // standard libraries #define _XOPEN_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // Stanford Portable Library #include "gevents.h" #include "gobjects.h" #include "gwindow.h" // height and width of game'...
fed-v/HarvardX_CS50x3
pset2/caesar.c
#include <cs50.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> int main(int argc, string argv[]){ //ERROR CONTROL if(argc != 2 ) { printf("Please include one and only one positive int\nafter calling ceasar!\n"); return 1; } ...
fed-v/HarvardX_CS50x3
pset2/vigenere.c
<reponame>fed-v/HarvardX_CS50x3 #include <cs50.h> #include <stdio.h> #include <string.h> #include <ctype.h> int main(int argc, string argv[]){ //ERROR CONTROL if(argc != 2 ) { printf("Please include one and only one string key!\n"); return 1; } //GET KEY ...
fed-v/HarvardX_CS50x3
pset1/greedy.c
<gh_stars>0 #include <cs50.h> #include <stdio.h> #include <math.h> float change; int coins=0; int main(void){ //INITIALIZE FUNCTION & PROMPT CHANGE void countCoins(int cents); printf("How much is your change?\n "); change = GetFloat(); //CONTROL CHANGE IS VALID do{ if(...
fed-v/HarvardX_CS50x3
pset2/initials.c
#include <cs50.h> #include <stdio.h> #include <string.h> #include <ctype.h> int main() { //printf("What is you name?"); string name = GetString(); printf("%c", toupper(name[0])); for(int i=0; i<strlen(name); i++) { if(name[i] == ' ') { if(name[i+1]...
Goyaya/GYComponents
GYComponents/Foundation/NSTimer+GYKit.h
<reponame>Goyaya/GYComponents // // NSTimer+GYComponent.h // // // Created by 高洋 on 2018/5/12. // Copyright © 2018年 gaoyang. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN typedef void(^GYTimerBlock) (void); /// timer--strong-->middleRole--weak-->target /// ensure your target...
Goyaya/GYComponents
Example/Pods/Target Support Files/GYComponents/GYComponents-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 "GYComponentsHeader.h" #import "GYRunLoopObserver.h" #import "NSTimer+GYKit.h" #import "GYAVPlayController.h" #import...
Goyaya/GYComponents
Example/GYComponents/GYLifeCycleViewController.h
<reponame>Goyaya/GYComponents<gh_stars>0 // // GYLifeCycleViewController.h // GYComponents_Example // // Created by gaoyang on 2019/10/28. // Copyright © 2019 goyaya. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface GYLifeCycleViewController : UIViewController @end NS_ASSUME_N...
Goyaya/GYComponents
GYComponents/Foundation/GYRunLoopObserver.h
// // GYRunLoopObserver.h // // // Created by 高洋 on 2019/5/31. // Copyright © 2019 Zhibai. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @class GYRunLoopObserver; typedef void(^GYRunLoopObserverCallback)(GYRunLoopObserver *observer, CFRunLoopActivity activity); @interface GYR...
Goyaya/GYComponents
Example/GYComponents/GYCollectionViewDivisionLayoutViewController.h
// // GYCollectionViewDivisionLayoutViewController.h // GYComponents_Example // // Created by 高洋 on 2019/9/11. // Copyright © 2019 goyaya. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface GYCollectionViewDivisionLayoutViewController : UIViewController @end NS_ASSUME_NONNULL_EN...
Goyaya/GYComponents
GYComponents/UI/GYCollectionViewDivisionLayout.h
// // GYCollectionViewDivisionLayout.h // iOS Knowledge Architecture // // Created by 高洋 on 2019/8/13. // Copyright © 2019 Gaoyang. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @class GYCollectionViewDivisionLayout; @protocol GYCollectionViewDivisionLayoutDataSource <UICollectionViewD...
Goyaya/GYComponents
Example/GYComponents/GYFeaturesTableViewController.h
// // GYFeaturesTableViewController.h // GYComponents_Example // // Created by 高洋 on 2019/9/10. // Copyright © 2019 goyaya. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface GYFeaturesTableViewController : UITableViewController @end NS_ASSUME_NONNULL_END
Goyaya/GYComponents
GYComponents/Dependence/GYComponentsHeader.h
<filename>GYComponents/Dependence/GYComponentsHeader.h // // GYComponentsHeader.h // GYComponents // // Created by 高洋 on 2019/7/28. // #ifndef GYComponentsHeader_h #define GYComponentsHeader_h /** frome YYKit! Add this macro before each category implementation, so we don't have to use -all_load or -force_load ...
Goyaya/GYComponents
Example/GYComponents/GYAppDelegate.h
<gh_stars>0 // // GYAppDelegate.h // GYComponents // // Created by goyaya on 07/28/2019. // Copyright (c) 2019 goyaya. All rights reserved. // @import UIKit; @interface GYAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
Goyaya/GYComponents
GYComponents/Media/GYAVPlayController.h
<reponame>Goyaya/GYComponents // // GYAVPlayController.h // GYComponents // // Created by gaoyang on 2019/10/18. // #import <Foundation/Foundation.h> #import <CoreMedia/CMTime.h> NS_ASSUME_NONNULL_BEGIN @class GYAVPlayController, AVPlayerItem, AVAsset; @protocol GYAVPlayControllerDelegate <NSObject> @optional /...
Goyaya/GYComponents
GYComponents/UI/GYPageViewController.h
<reponame>Goyaya/GYComponents<gh_stars>0 // // GYPageViewController.h // iOS Knowledge Architecture // // Created by 高洋 on 2019/7/29. // Copyright © 2019 Gaoyang. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @class GYPageViewController; /** scroll direction */ typedef NS_ENUM(int, G...
Yu2erer/Memory_Pool
YY_Allocator.h
// // Created by Yuerer on 2019/11/7. // #ifndef YY_ALLOCATOR_H #define YY_ALLOCATOR_H namespace YY { static const int ALIGN = 8; static const int MAX_BYTES = 128; static const int FREE_LIST_NUMS = MAX_BYTES / ALIGN; // 16 class Alloc { public: static void *allocate(size_t n) { ...
sabersensen/Aspects
Aspects.h
<filename>Aspects.h // // Aspects.h // Aspects - A delightful, simple library for aspect oriented programming. // // Copyright (c) 2014 <NAME>. Licensed under the MIT license. // Aspects 主要是给view controller 使用 而不是用于高频率hook 比如每秒1000次 #import <Foundation/Foundation.h> /** hook执行时期 - AspectPositionAfter: 原方法执行完之...
amrshennawi/fbthrift
thrift/lib/cpp2/protocol/BinaryProtocol-inl.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...
amrshennawi/fbthrift
thrift/lib/py3/tablebased/Serializer.h
<gh_stars>0 /* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 requir...
amrshennawi/fbthrift
thrift/lib/cpp2/transport/rocket/framing/Parser.h
<reponame>amrshennawi/fbthrift /* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 ...
amrshennawi/fbthrift
thrift/lib/cpp2/transport/rocket/framing/Parser-inl.h
<filename>thrift/lib/cpp2/transport/rocket/framing/Parser-inl.h<gh_stars>1-10 /* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 * * ...
amrshennawi/fbthrift
thrift/lib/cpp2/Adapt.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...
amrshennawi/fbthrift
thrift/lib/cpp2/transport/rocket/client/RocketClient.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...
amrshennawi/fbthrift
thrift/compiler/test/fixtures/doctext/gen-cpp2/module_constants.h
<reponame>amrshennawi/fbthrift /** * Autogenerated by Thrift for src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #pragma once #include <thrift/lib/cpp2/gen/module_constants_h.h> #include "thrift/compiler/test/fixtures/doctext/gen-cpp2/module_types...
amrshennawi/fbthrift
thrift/compiler/test/fixtures/frozen-struct/gen-cpp2/module_types.h
/** * Autogenerated by Thrift for src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #pragma once #include <thrift/lib/cpp2/gen/module_types_h.h> #include "thrift/compiler/test/fixtures/frozen-struct/gen-cpp2/include1_types.h" #include "thrift/compi...
amrshennawi/fbthrift
thrift/compiler/test/fixtures/adapter/gen-cpp2/module_for_each_field.h
/** * Autogenerated by Thrift for src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #pragma once #include "thrift/compiler/test/fixtures/adapter/gen-cpp2/module_metadata.h" #include <thrift/lib/cpp2/visitation/for_each.h> namespace apache { namespac...
amrshennawi/fbthrift
thrift/compiler/test/fixtures/visitation/gen-cpp2/module_constants.h
<reponame>amrshennawi/fbthrift /** * Autogenerated by Thrift for src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #pragma once #include <thrift/lib/cpp2/gen/module_constants_h.h> #include "thrift/compiler/test/fixtures/visitation/gen-cpp2/module_ty...
fatdrop/cordova-kuya-download
src/ios/KuyaDownload.h
#import <Cordova/CDVPlugin.h> #import <Cordova/CDVPluginResult.h> #import <Foundation/Foundation.h> #import "ASIHTTPRequestDelegate.h" #import "ASIProgressDelegate.h" @interface KuyaDownload : CDVPlugin { NSMutableDictionary* delegates; int download_id; } @property int download_id; @property (retain) NSMutabl...
masterwebdev/cordova-plugin-camera-video
src/ios/VideoTemperatureAndTint.h
<reponame>masterwebdev/cordova-plugin-camera-video #import <AVFoundation/AVFoundation.h> @interface VideoTemperatureAndTint: NSObject @property (nonatomic) NSString* mode; @property (nonatomic) float minTemperature; @property (nonatomic) float maxTemperature; @property (nonatomic) float tint; @end
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/Controller/ZQSearchNormalViewController.h
<filename>ZQSearchController/Classes/ZQSearch/Controller/ZQSearchNormalViewController.h // // ZQSearchNormalViewController.h // ZQSearchController // // Created by zzq on 2018/9/25. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> #import "ZQSearchConst.h" @interface ZQSearchNormalViewCon...
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/View/ZQSearchEditBaseCell.h
// // ZQSearchEditBaseCell.h // ZQSearchController // // Created by zzq on 2018/9/26. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> #import "ZQSearchConst.h" @protocol searchEditCellProtocol<NSObject> - (void)uploadCellWithData:(id)data; @end @interface ZQSearchEditBaseCell : UITabl...
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/ZQSearchConst.h
<filename>ZQSearchController/Classes/ZQSearch/ZQSearchConst.h // // ZQSearchConst.h // ZQSearchController // // Created by zzq on 2018/9/26. // Copyright © 2018年 zzq. All rights reserved. // #ifndef ZQSearchConst_h #define ZQSearchConst_h #import <UIKit/UIKit.h> static NSString *ZQSearchHistorys = @"ZQSearchHist...
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/View/ZQSearchNormalCell.h
// // ZQSearchNormalCell.h // ZQSearchController // // Created by zzq on 2018/9/25. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> @interface ZQSearchNormalCell : UICollectionViewCell @property (nonatomic, assign) BOOL heightLight; @property (nonatomic, copy) NSString *title; @end
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/Controller/ZQSearchViewController.h
// // ZQSearchViewController.h // ZQSearchController // // Created by zzq on 2018/9/20. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> #import "ZQSearchConst.h" typedef NS_ENUM(NSUInteger, ZQSearchBarStyle) { ZQSearchBarStyleNone, ZQSearchBarStyleCannel, ZQSearchBarStyleBack...
rabbitmouse/ZQSearchController
Example/Demo/searchEditModel.h
// // searchEditModel.h // ZQSearchController // // Created by zzq on 2018/9/26. // Copyright © 2018年 zzq. All rights reserved. // #import <Foundation/Foundation.h> #import "ZQSearchConst.h" @interface searchEditModel : NSObject<ZQSearchData> @property (nonatomic, assign) SearchEditType editType; @property (non...
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/View/ZQSearchEditNormalCell.h
// // ZQSearchEditNormalCell.h // ZQSearchController // // Created by zzq on 2018/9/26. // Copyright © 2018年 zzq. All rights reserved. // #import "ZQSearchEditBaseCell.h" #import "ZQSearchConst.h" @interface ZQSearchEditNormalCell : ZQSearchEditBaseCell @end
rabbitmouse/ZQSearchController
Example/Demo/ResultFuzzyViewController.h
// // ResultFuzzyViewController.h // ZQSearchController // // Created by zzq on 2018/9/28. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> @interface ResultFuzzyViewController : UIViewController @end
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/Controller/ZQSearchEditViewController.h
<gh_stars>100-1000 // // ZQSearchEditViewController.h // ZQSearchController // // Created by zzq on 2018/9/26. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> #import "ZQSearchConst.h" @interface ZQSearchEditViewController : UIViewController @property (nonatomic, strong) NSArray<ZQSearc...
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/View/ZQSearchCollectionReusableView.h
<reponame>rabbitmouse/ZQSearchController // // ZQSearchCollectionReusableView.h // ZQSearchController // // Created by zzq on 2018/9/25. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> typedef void(^emptyBlock)(void); @interface ZQSearchCollectionReusableView : UICollectionReusableView ...
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/Layout/ZQSearchNormalLayout.h
// // ZQSearchNormalLayout.h // ZQSearchController // // Created by zzq on 2018/9/25. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> @interface ZQSearchNormalLayout : UICollectionViewFlowLayout @property (nonatomic) CGFloat maximumInteritemSpacing; @end
rabbitmouse/ZQSearchController
ZQSearchController/Classes/ZQSearch/Category/UIColor+ZQSearch.h
<filename>ZQSearchController/Classes/ZQSearch/Category/UIColor+ZQSearch.h // // UIColor+ZQSearch.h // ZQSearchController // // Created by zzq on 2018/9/25. // Copyright © 2018年 zzq. All rights reserved. // #import <UIKit/UIKit.h> @interface UIColor (ZQSearch) + (UIColor *)colorWithHexString:(NSString *)color alp...
Krozark/lab
ideas/shadows/Constructs.h
<reponame>Krozark/lab #ifndef CONSTRUCTS_H #define CONSTRUCTS_H #include <iostream> class Point2i { public: int x, y; Point2i(const int &X, const int &Y); Point2i(); bool operator==(Point2i &other) const; }; class Point2f { public: float x, y; ...
Krozark/lab
ideas/shadows/AllInclude.h
#ifndef ALL_INCLUDE #define ALL_INCLUDE #include "SFMLOpenGL.h" #include "Utilities.h" #include "Light.h" #include "LightSystem.h" #include "ConvexHull.h" #endif
Krozark/lab
ideas/shadows/Utilities.h
<reponame>Krozark/lab<gh_stars>0 #ifndef UTILITIES_H #define UTILITIES_H #include <fstream> #include <sstream> const float PI = 3.14159265f; template <class T> std::string toString(const T& t); // NOTE: You should probably do some checks to ensure that // this string contains only numbers. If the string...
Krozark/lab
ideas/shadows/ConvexHull.h
<filename>ideas/shadows/ConvexHull.h #ifndef CONVEX_HULL_H #define CONVEX_HULL_H #include "SFMLOpenGL.h" #include "Utilities.h" #include "Constructs.h" #include <vector> struct ConvexHullVertex { Point2f position; // Other information can be added later }; class ConvexHull { public: std::vecto...
Krozark/lab
ideas/shadows/SFMLOpenGL.h
#ifndef SDLOPENGL #define SDLOPENGL #include <SFML/OpenGL.hpp> #include <GL/glu.h> #include <SFML/Graphics.hpp> #include "Constructs.h" extern unsigned int window_width, window_height, window_bpp; struct TextureDesc { int width, height; GLuint hTexture; ~TextureDesc() { glDele...
Krozark/lab
ideas/python-android/stt/data/vosk/vosk_api.h
# 1 "data/vosk/vosk_api.h" # 1 "<built-in>" # 1 "<command-line>" # 31 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 32 "<command-line>" 2 # 1 "data/vosk/vosk_api.h" # 27 "data/vosk/vosk_api.h" typedef struct VoskModel VoskModel; typedef struct VoskSpkModel VoskSpkModel; typedef struct VoskRecogni...
Krozark/lab
ideas/shadows/Light.h
#ifndef LIGHT_H #define LIGHT_H #include "SFMLOpenGL.h" #include "Utilities.h" #include "Constructs.h" const float ambientLight = 0.3f; class Light { public: float intensity; float radius; float depth; Vec2f center; Light(); ~Light(); void renderLightAlpha(); }; #endif
Krozark/lab
ideas/shadows/LightSystem.h
#ifndef LIGHTSYSTEM_H #define LIGHTSYSTEM_H #include "Light.h" #include "ConvexHull.h" #include <vector> void MaskShadow(Light* light, ConvexHull* convexHull, float depth); class LightSystem { private: std::vector<Light*> lights; std::vector<ConvexHull*> convexHulls; bool enabled; public: Lig...
JetLennit/Othello
include/game.h
<filename>include/game.h<gh_stars>1-10 #ifndef GAME_H #define GAME_H #include "SDL.h" #include "board.h" const int X_OFFSET = 0; const int Y_OFFSET = 20; const int SCALE = 80; class Game { public: bool checkInput(); void update(); void draw(); bool checkInputSDL(int x, int y); ...
JetLennit/Othello
include/board.h
<reponame>JetLennit/Othello #ifndef BOARD_H #define BOARD_H #include <vector> const int DIRECTIONS[8][2] = { {-1, -1}, { 0, -1}, { 1, -1}, {-1, 0}, { 1, 0}, {-1, 1}, { 0, 1}, { 1, 1} }; struct legal_play { int x = 0; int y = 0; bool directions[8] = {}; }; class Board...
ofbear/source_guard
source_guard/source_guard.c
<reponame>ofbear/source_guard /* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2018 The PHP Group ...
ofbear/source_guard
source_guard/php_source_guard.h
/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2018 The PHP Group | +--------------...
weebcyberpunk/tictactoe
bot_l_patterns.c
#include<stdio.h> int bot_l_patterns(char game[9]) { /* * A quick explain: L pattern is how I call * something like this: * * _/O/_ * _/_/O * _/_/_ * * The problem is that if O puts on 3, it'll * have two ways to win. Bot should avoid that */ // again, if 10 no l pattern int house = 10; // w...
weebcyberpunk/tictactoe
tictacbot.c
<filename>tictacbot.c<gh_stars>0 #include<stdio.h> #include<stdlib.h> #include<string.h> int print_game(char game[9]); char finish(char game[9]); int bot(char game[9], int bot_game[9], int round); int tictacbot() { char game[9] = { 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b' }; int bot_game[9]; char player = 'O';...
weebcyberpunk/tictactoe
bot.c
#include<stdio.h> #include<stdlib.h> int bot_search_won(char game[9]); int bot_search_player_won(char game[9]); int bot_think(char game[9]); int bot_horse_patterns(char game[9]); int bot_l_patterns(char game[9]); int bot_diagonals(char game[9]); int bot_attack(char game[9]); int bot(char game[9], int bot_game[9], int...
weebcyberpunk/tictactoe
print_game.c
#include<stdio.h> int print_game(char game[9]) { char view[9] = { '_', '_', '_', '_', '_', '_', '_', '_', '_' }; char num[9] = { '1', '2', '3', '4', '5', '6', '7', '8', '9' }; // if house is dialed for(int control = 0; control < 9; control++) { if (game[control] != 'b') { view[control] = game[control]; nu...
weebcyberpunk/tictactoe
bot_search_won.c
#include<stdio.h> int bot_search_won(char game[9]) { // if house == 10 no won int house = 10; // with 0 if (game[0] == 'X') { // 0-1-2 if ((game[1] == 'X') && (game[2] == 'b')) house = 2; if ((game[2] == 'X') && (game[1] == 'b')) house = 1; // 0-4-8 if ((game[4] == 'X') && (game[8] == 'b')) house = 8...
weebcyberpunk/tictactoe
bot_horse_patterns.c
<reponame>weebcyberpunk/tictactoe #include<stdio.h> int bot_horse_patterns(char game[9]) { /* * A quick explain: horse patterns are what I call when * the O puts the pieces like this: * * O/_/_ * _/_/O * _/_/_ * * The problem is that, in this example, if O puts on 3, * it'll have two options to win...
weebcyberpunk/tictactoe
bot_attack.c
#include<stdio.h> int bot_attack(char game[9]) { int house = 10; if (game[4] == 'X') { if (game[0] == 'b') house = 0; else if (game[2] == 'b') house = 2; else if (game[6] == 'b') house = 6; else if (game[8] == 'b') house = 8; } return(house); }
weebcyberpunk/tictactoe
finish.c
#include<stdio.h> char finish(char game[9]) { // if b no one won, if won so x or o, for each player. If t, tie char finish = 'b'; // test for finish in 0-1-2, 0-3-6 and 0-4-8 if (game[0] != 'b') { if ( ((game[0] == game[1]) && (game[0] == game[2])) || ((game[0] == game[3]) && (game[0] == game[6])) || ...
weebcyberpunk/tictactoe
bot_diagonals.c
<reponame>weebcyberpunk/tictactoe #include<stdio.h> int bot_diagonals(char game[9]) { /* * Quick explain: diagonals are like this: * * O/_/_ * _/_/_ * _/_/O * * The problem is that if the player dial * 2 or 6 he'll have two ways to win. * * Avoiding this is more complicated. Any * game situatio...
weebcyberpunk/tictactoe
help.c
<filename>help.c #include<stdio.h> int help() { FILE *help; help = fopen("/usr/share/tictactoe/help.txt", "r"); if (help == NULL) { printf("no help file on /usr/share/tictactoe/help.txt\n"); return(1); } for (;;) { char c = getc(help); if (c == EOF) break; printf("%c", c); } printf("\n"); fcl...
rahulyesantharao/batch-dynamic-kdtree
include/kdtree/binary-heap-layout/bhlkdtree.h
<reponame>rahulyesantharao/batch-dynamic-kdtree #ifndef BHLKDTREE_H #define BHLKDTREE_H #include "parlay/parallel.h" #include "parlay/sequence.h" #include "../shared/kdnode.h" #include "../shared/kdtree.h" #include "../shared/utils.h" #include "../shared/macro.h" inline bool buildInParallel(size_t num_points) { ret...
rahulyesantharao/batch-dynamic-kdtree
include/kdtree/shared/knnbuffer.h
<filename>include/kdtree/shared/knnbuffer.h #ifndef KDTREE_SHARED_KNNBUFFER_H #define KDTREE_SHARED_KNNBUFFER_H // TAKEN with slight modifications FROM // https://github.mit.edu/yiqiuw/pargeo/blob/master/knnSearch/kdTree/kdtKnn.h Later, need to merge + // refer to that rather than copying here #include <common/geometr...
rahulyesantharao/batch-dynamic-kdtree
test/log-tree/LT2DDeleteTest.h
#ifndef TEST_LOGTREE_LT2DDELETETEST_H #define TEST_LOGTREE_LT2DDELETETEST_H #include <gtest/gtest.h> #include "common/geometryIO.h" #include <kdtree/log-tree/logtree.h> class Bulk { public: static constexpr bool bulk = true; }; class NotBulk { public: static constexpr bool bulk = false; }; typedef point<2> poi...
rahulyesantharao/batch-dynamic-kdtree
include/kdtree/shared/bloom.h
#ifndef KDTREE_SHARED_BLOOM_H #define KDTREE_SHARED_BLOOM_H #define XXH_PRIVATE_API #include <common/geometry.h> #include <parlay/parallel.h> #include <parlay/sequence.h> #include <xxHash/xxhash.h> #define ATOMIC_BUCKETS //#define BIT_VECTOR template <int dim> class BloomFilter { static constexpr int NUM_ARRAYS = ...
rahulyesantharao/batch-dynamic-kdtree
include/kdtree/shared/dual.h
<reponame>rahulyesantharao/batch-dynamic-kdtree #ifndef DUAL_H #define DUAL_H #include "../cache-oblivious/cokdtree.h" #include "../log-tree/logtree.h" #ifdef PRINT_DKNN_TIMINGS #include "common/get_time.h" #endif // Top-level wrappers for calling dual knn template <int dim, class objT, bool parallel, bool coarsen> ...
rahulyesantharao/batch-dynamic-kdtree
test/log-tree/LT2DStructureTest.h
#ifndef TEST_LOGTREE_LT2DSTRUCTURETEST_H #define TEST_LOGTREE_LT2DSTRUCTURETEST_H #include <gtest/gtest.h> #include "common/geometryIO.h" #include <kdtree/log-tree/logtree.h> typedef point<2> pointT; pointT constructPoint(double d) { constexpr int dim = 2; double point_buf[dim]; for (int k = 0; k < dim; k++) {...
rahulyesantharao/batch-dynamic-kdtree
benchmark/utils.h
#ifndef BENCHMARK_UTILS_H #define BENCHMARK_UTILS_H #include "parlay/random.h" #include <random> // --- Taken from parlaylib --- // Use this macro to avoid accidentally timing the destructors // of the output produced by algorithms that return data // // The expression e is evaluated as if written in the context // a...
rahulyesantharao/batch-dynamic-kdtree
utils/external/old_pargeo/include/common/IO.h
<filename>utils/external/old_pargeo/include/common/IO.h<gh_stars>1-10 // This code is part of the Problem Based Benchmark Suite (PBBS) // Copyright (c) 2011 <NAME> and the PBBS team // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files ...
rahulyesantharao/batch-dynamic-kdtree
test/binary-heap-layout/BHL2DStructureTest.h
#ifndef TEST_BINARYHEAPLAYOUT_BHLSTRUCTURE2D_H #define TEST_BINARYHEAPLAYOUT_BHLSTRUCTURE2D_H #include <gtest/gtest.h> #include "common/geometryIO.h" #include <kdtree/binary-heap-layout/bhlkdtree.h> #include <kdtree/shared/macro.h> #include "../shared/BasicStructure.h" template <typename Tree> class BHL2DStructureT...
rahulyesantharao/batch-dynamic-kdtree
include/kdtree/cache-oblivious/utils.h
<filename>include/kdtree/cache-oblivious/utils.h #ifndef COKD_UTILS_H #define COKD_UTILS_H #include "parlay/parallel.h" #include "parlay/sequence.h" #include "parlay/primitives.h" #include "../shared/utils.h" void funnelSort() { // TODO: cache-oblivious sorting } // kd-tree structure template <bool coarsen> inline...
rahulyesantharao/batch-dynamic-kdtree
test/shared/BasicStructure.h
#ifndef TEST_SHARED_BASICSTRUCTURE2D_H #define TEST_SHARED_BASICSTRUCTURE2D_H #include <gtest/gtest.h> #include "common/geometryIO.h" template <class T> static auto KEEP_EVEN(const parlay::sequence<T>& seq) { // construct the points to delete auto num_even = (seq.size() + 1) / 2; parlay::sequence<T> to_remove(n...
rahulyesantharao/batch-dynamic-kdtree
include/kdtree/shared/macro.h
<reponame>rahulyesantharao/batch-dynamic-kdtree<gh_stars>1-10 #ifndef KDTREE_SHARED_MACRO_H #define KDTREE_SHARED_MACRO_H //#define PRINT_CONFIG //#define PRINT_LOGTREE_TIMINGS //#define PRINT_DKNN_TIMINGS //#define PRINT_INSERT_TIMINGS //#define PRINT_DELETE_TIMINGS //#define PRINT_KDTREE_TIMINGS //#define PRINT_COKD...
rahulyesantharao/batch-dynamic-kdtree
include/kdtree/shared/utils.h
#ifndef KDTREE_SHARED_UTILS_H #define KDTREE_SHARED_UTILS_H #include "parlay/parallel.h" #include "parlay/sequence.h" #include "parlay/primitives.h" #include "parlay/monoid.h" #include "parlay/delayed_sequence.h" #include "macro.h" #ifdef DEBUG #define DEBUG_MSG(str) \ do { ...
valandro/pdp-ufrgs
ex03/pi.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define MAX_THREADS 4 static long steps = 1000000000; double step; int main (int argc, const char *argv[]) { int i,j; double x; double pi, sum = 0.0; double start, delta; step = 1.0/(double) steps; for (j=1; j<= MAX_THREADS; j++) { ...
valandro/pdp-ufrgs
ex03/matrix.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define MAX_THREADS 3 void mm_omp(double *A, double *B, double *C, int n) { { int i, j, k; #pragma omp parallel for private(i,j,k) shared(A,B,C) for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { double dot = 0; #pragma omp parallel f...
framefreeze/HangDriver
GUI_Qt/mainwindow.h
<reponame>framefreeze/HangDriver #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QPaintEvent> #include <QTimer> #include <QPainter> #include <QPixmap> #include <QLabel> #include <QImage> #include <opencv2/opencv.hpp> using namespace cv; namespace Ui { class MainWindow; } class MainWindow ...
ChenThree/GraspNetReal
pointnet2/_ext_src/include/cylinder_query.h
<gh_stars>1-10 // Author: chenxi-wang #pragma once #include <torch/extension.h> at::Tensor cylinder_query(at::Tensor new_xyz, at::Tensor xyz, at::Tensor rot, const float radius, const float hmin, const float hmax, const int nsample);
ChenThree/GraspNetReal
knn/src/cpu/vision.h
#pragma once #include <torch/extension.h> void knn_cpu(float* ref_dev, int ref_width, float* query_dev, int query_width, int height, int k, float* dist_dev, long* ind_dev, long* ind_buf);
ng-labo/sqlite-maxminddb
sqlite3_maxminddb.c
<reponame>ng-labo/sqlite-maxminddb /* ** ** This SQLite extension implements asn(), org(), cc() functions. ** ** ipmask(), ip6mask() help you translate to prefixes easily. */ #include <sqlite3ext.h> SQLITE_EXTENSION_INIT1 #include <stdlib.h> #include <assert.h> #include <string.h> #ifdef _WIN32 #define HOMEENVNAME "H...
RonxBulld/anvm
src/Cpu.h
#pragma once #include "String.h" class Cpu { private: unsigned int rp, rf, rs, rb, r0, r1, r2, r3; unsigned int *(regs[8]); unsigned char *vmem; StringManager *StrMan; unsigned int DataPtr; void CoreDump(); bool GetFlag(unsigned char Flag); void PutFlag(unsigned char Flag); bool RunUnit(); void CoreCrash(co...
RonxBulld/anvm
src/Screen.h
#pragma once typedef struct Point { int x; int y; } Point; typedef struct Rect { int x; int y; int w; int h; } Rect; typedef uint32_t Uint32; typedef uint8_t Uint8; struct SDL_Window; struct SDL_Surface; struct SDL_Point; struct SDL_Renderer; struct SDL_PixelFormat; struct SDL_RWops; class Screen { private: ...
RonxBulld/anvm
src/anvm.h
<gh_stars>1-10 #pragma once #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #define MEMSIZE (2*1024*1024) #define VERSION "anvm 0.03 [by:Rex]" #define DEFAULTBIN "test.bin" #include "Cpu.h" #include "Screen.h" #include "Input.h" #include "Gpu.h" #include "Storage.h" #include "ErrorLog....
RonxBulld/anvm
src/Input.h
<gh_stars>1-10 #pragma once #include <string> #include <vector> class Line { public: Point PrintPosition; string LineText; }; class Keyboard { private: unsigned char *GetKeyString(); vector<Line*> *InputBuffer; int InputNewline(Point Ptr, int ScnWidth, int CharWidth); public: Keyboard(); ~Keyboard(); unsigne...
RonxBulld/anvm
src/String.h
#pragma once #include <vector> #include <list> #include <string> using namespace std; class StringManager { private: string **StringPool; unsigned int PoolSize; inline bool EffectiveHandle(unsigned int Handle); public: StringManager(); ~StringManager(); unsigned int CreateString(); unsigned int ToInt(unsigne...