repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
notjosh/NTJBilateralCIFilter
NTJBilateralCIFilteriOSDemo/ViewController.h
<reponame>notjosh/NTJBilateralCIFilter<filename>NTJBilateralCIFilteriOSDemo/ViewController.h // // ViewController.h // NTJBilateralCIFilteriOSDemo // // Created by <NAME> on 17/10/17. // Copyright © 2017 nojo inc. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end ...
notjosh/NTJBilateralCIFilter
NTJBilateralCIFilterDemo/ViewController.h
<filename>NTJBilateralCIFilterDemo/ViewController.h // // ViewController.h // NTJBilateralCIFilterDemo // // Created by <NAME> on 6/06/2016. // Copyright © 2016 nojo inc. All rights reserved. // #import <Cocoa/Cocoa.h> @interface ViewController : NSViewController @end
lahoising/MobRend
include/mobrend/texture.h
#ifndef _MR_TEXTURE_H_ #define _MR_TEXTURE_H_ #include <inttypes.h> #include <unordered_map> #include <mobrend/asset_manager.h> #include <mobrend/image_loader.h> namespace mr { class Texture { public: enum Format { TEXTURE_FORMAT_RGB, TEXTURE_FORMAT_RGBA, TEXTURE_FORMAT_DEPTH, ...
lahoising/MobRend
include/mobrend/opengl/vertex_buffer.h
#ifndef _MR_GL_VERTEX_BUFFER_H_ #define _MR_GL_VERTEX_BUFFER_H_ #include <mobrend/vertex_buffer.h> #include <mobrend/vertex_layout.h> namespace mr { class GlVertexBuffer : public VertexBuffer { public: GlVertexBuffer(VertexBuffer::CreateParams &params); virtual ~GlVertexBuffer() override; virtual voi...
lahoising/MobRend
include/mobrend/shader.h
<gh_stars>0 #ifndef _MR_SHADER_H_ #define _MR_SHADER_H_ #include <glm/glm.hpp> #include <mobrend/asset_manager.h> namespace mr { class Texture; class UniformBuffer; class Shader { public: typedef struct create_params_s { char vertFilePath[MR_MAX_PATH]; char fragFilePath[MR_MAX_PATH]; ...
lahoising/MobRend
include/mobrend/opengl/renderer.h
<gh_stars>0 #ifndef _MR_GL_RENDERER_H_ #define _MR_GL_RENDERER_H_ #ifdef MOBREND_GL_RENDERING #include <glad/glad.h> #include <mobrend/renderer.h> #include <mobrend/vertex_layout.h> namespace mr { class GlRenderer : public Renderer { public: GlRenderer(); virtual ~GlRenderer() override; virtual void ...
lahoising/MobRend
include/mobrend/uniform_buffer.h
<reponame>lahoising/MobRend #ifndef _MR_UNIFORM_BUFFER_H_ #define _MR_UNIFORM_BUFFER_H_ #include <inttypes.h> #include <mobrend/buffer.h> namespace mr { class UniformBuffer : public Buffer { public: struct CreateParams { uint32_t bufferSize; uint32_t binding; }; public: static Un...
lahoising/MobRend
include/mobrend/framebuffer.h
<reponame>lahoising/MobRend #ifndef _MR_FRAMEBUFFER_H_ #define _MR_FRAMEBUFFER_H_ #include <vector> #include <mobrend/texture.h> namespace mr { enum FramebufferUsage { FRAMEBUFFER_USAGE_READ_WRITE, FRAMEBUFFER_USAGE_READ, FRAMEBUFFER_USAGE_WRITE }; class Framebuffer { public: enum AttachmentType ...
lahoising/MobRend
include/mobrend/asset_manager.h
#ifndef _MR_ASSET_MANAGER_H_ #define _MR_ASSET_MANAGER_H_ #include <vector> #include <cstring> #include <string> #include <inttypes.h> #define MR_MAX_PATH 260 namespace mr { class AssetManager { public: ~AssetManager(){} /// TODO: replace std::vector<char> to a data type that doesn't allocate in heap ...
lahoising/MobRend
include/mobrend/glfw/window.h
<reponame>lahoising/MobRend<gh_stars>0 #ifndef _MR_GLFW_WINDOW_H_ #define _MR_GLFW_WINDOW_H_ #ifdef MOBREND_GLFW_WINDOW #define GLFW_INCLUDE_NONE #include "GLFW/glfw3.h" #include <mobrend/window.h> namespace mr { class GlfwWindow : public Window { public: GlfwWindow(Window::CreateParams createParams); vi...
lahoising/MobRend
include/mobrend/index_buffer.h
<reponame>lahoising/MobRend #ifndef _MR_INDEX_BUFFER_H_ #define _MR_INDEX_BUFFER_H_ #include <inttypes.h> #include <mobrend/buffer.h> namespace mr { class IndexBuffer : public Buffer { public: typedef struct { const uint32_t *data; uint32_t elementCount; } CreateParams; public: s...
lahoising/MobRend
include/mobrend/opengl/index_buffer.h
<filename>include/mobrend/opengl/index_buffer.h #ifndef _MR_GL_INDEX_BUFFER_H_ #define _MR_GL_INDEX_BUFFER_H_ #include <mobrend/index_buffer.h> namespace mr { class GlIndexBuffer : public IndexBuffer { public: GlIndexBuffer(IndexBuffer::CreateParams &params); virtual ~GlIndexBuffer() override; virtua...
lahoising/MobRend
include/mobrend/model.h
#ifndef _MR_MODEL_H_ #define _MR_MODEL_H_ #include <vector> #include <string> #include <mobrend/mesh.h> namespace mr { class Model { public: static Model *Load(const char *filepath); Model(); Model(const std::vector<Mesh*> &meshes); ~Model(); const std::vector<Mesh*> &GetMeshes(){ return thi...
lahoising/MobRend
include/mobrend/opengl/uniform_buffer.h
#ifndef _MR_GL_UNIFORM_BUFFER_H_ #define _MR_GL_UNIFORM_BUFFER_H_ #include <mobrend/uniform_buffer.h> namespace mr { class GlUniformBuffer : public UniformBuffer { public: GlUniformBuffer(const UniformBuffer::CreateParams &params); virtual ~GlUniformBuffer() override; virtual void Bind() const overri...
lahoising/MobRend
include/mobrend/observer_camera.h
<reponame>lahoising/MobRend #ifndef _MR_OBSERVER_CAMERA_H_ #define _MR_OBSERVER_CAMERA_H_ #include <glm/glm.hpp> #include <mobrend/camera.h> namespace mr { class ObserverCamera { public: ObserverCamera() : camera(Camera()), focusPoint(glm::vec3(0.0f, 0.0f, 0.0f)) {} void Update(); void SetFo...
lahoising/MobRend
include/mobrend/gui.h
#ifndef _MR_GUI_H_ #define _MR_GUI_H_ #include <mobrend/renderer.h> namespace mr { class Gui { public: typedef struct { void *windowHandle; struct Renderer::gui_init_info_s *rendererInitInfo; } CreateParams; public: Gui(CreateParams params); ~Gui(); void BeginFrame(); ...
lahoising/MobRend
include/mobrend/camera.h
<gh_stars>0 #ifndef _MR_CAMERA_H_ #define _MR_CAMERA_H_ #include <glm/glm.hpp> #include <glm/gtc/quaternion.hpp> namespace mr { class Camera { public: enum Type : int { PERSPECTIVE, ORTHOGRAPHIC }; typedef struct { float fov; float aspectRatio; float n...
lahoising/MobRend
include/mobrend/image_loader.h
#ifndef _MR_IMAGE_LOADER_H_ #define _MR_IMAGE_LOADER_H_ namespace mr { typedef struct { int width, height; int nrChannels; } ImageData; class ImageLoader { public: static unsigned char *Load(const char *filepath, ImageData *dataOutput, bool inverted = true); static void DeleteImage(unsigned char ...
lahoising/MobRend
include/mobrend/opengl/texture.h
#ifndef _MR_GL_TEXTURE_H_ #define _MR_GL_TEXTURE_H_ #include <mobrend/image_loader.h> #include <mobrend/texture.h> namespace mr { class GlTexture : public Texture { public: GlTexture(const Texture::LoadParams &params); GlTexture(const Texture::CreateParams &params); void GenerateTexture(const Texture...
lahoising/MobRend
include/mobrend/fps_camera.h
<gh_stars>0 #ifndef _MR_FPS_CAMERA_H_ #define _MR_FPS_CAMERA_H_ #include <mobrend/camera.h> namespace mr { class FPSCamera { public: FPSCamera() : camera(Camera()), yaw(0.0f), pitch(0.0f), movementSpeed(0.7f), sensitivity(0.01f) {} void Update(); public: Camera camera; float movementSpee...
lahoising/MobRend
include/mobrend/material.h
#ifndef _MR_MATERIAL_H_ #define _MR_MATERIAL_H_ namespace mr { class Material { }; } // namespace mr #endif
lahoising/MobRend
include/mobrend/light.h
<gh_stars>0 #ifndef _MR_LIGHT_H_ #define _MR_LIGHT_H_ #include <glm/glm.hpp> #include <glm/gtc/quaternion.hpp> namespace mr { class Shader; /// ================== BASE LIGHT =================== class Light { public: enum Type : int { AMBIENT = 0, POINT, DIRECTIONAL, SPOTLI...
lahoising/MobRend
include/mobrend/renderer.h
<filename>include/mobrend/renderer.h<gh_stars>0 #ifndef _MR_RENDERER_H_ #define _MR_RENDERER_H_ #include <inttypes.h> namespace mr { class Mesh; class Model; enum TopologyType { TOPOLOGY_TRIANGLES = 0, TOPOLOGY_WIREFRAME, TOPOLOGY_POINTS, }; enum RenderObjectType { RENDER_OBJECT_NONE = 0, RENDE...
lahoising/MobRend
include/mobrend/input_event.h
#ifndef _MR_INPUT_EVENT_H_ #define _MR_INPUT_EVENT_H_ namespace mr { class Window; enum InputEventType { UNKNOWN = 0, KEY_EVENT, MOUSE_POSITION, WINDOW_CLOSE }; enum KeyCode { KEY_UNKNOWN = 0, KEY_Q, KEY_W, KEY_E, KEY_R, KEY_T, KEY_Y, KEY_U, KEY_I, KEY_O, KEY_P, KEY_A, KEY_S, KEY_D, KEY_F...
lahoising/MobRend
include/mobrend/application.h
<reponame>lahoising/MobRend #ifndef _MR_APPLICATION_H_ #define _MR_APPLICATION_H_ #include <mobrend/window.h> #include <mobrend/renderer.h> #include <mobrend/gui.h> namespace mr { class Program { public: virtual void OnStart() = 0; virtual void OnUpdate() = 0; virtual void OnRender(Renderer *renderer) = 0...
lahoising/MobRend
include/mobrend/opengl/framebuffer.h
<gh_stars>0 #ifndef _MR_GL_FRAMEBUFFER_H_ #define _MR_GL_FRAMEBUFFER_H_ #include <vector> #include <mobrend/framebuffer.h> #include <mobrend/opengl/texture.h> namespace mr { class GlFramebuffer : public Framebuffer { public: struct GlAttachment { union { unsigned int renderObj...
lahoising/MobRend
include/mobrend/buffer.h
#ifndef _MR_BUFFER_H_ #define _MR_BUFFER_H_ namespace mr { class Buffer { public: virtual ~Buffer() = 0; virtual void Bind() const = 0; virtual void Unbind() const = 0; }; } // namespace mr #endif
lahoising/MobRend
include/mobrend/mesh.h
<reponame>lahoising/MobRend #ifndef _MR_MESH_H_ #define _MR_MESH_H_ #include <unordered_map> #include <string> #include <mobrend/buffer.h> #include <mobrend/vertex_layout.h> #include <mobrend/vertex_buffer.h> #include <mobrend/index_buffer.h> #include <mobrend/texture.h> namespace mr { class Mesh { public: typed...
lahoising/MobRend
include/mobrend/input.h
<reponame>lahoising/MobRend #ifndef _MR_INPUT_H_ #define _MR_INPUT_H_ #include <glm/glm.hpp> #include <mobrend/input_event.h> #define INPUT_STATE_KEY_EVENT_NUM 512 namespace mr { typedef struct { WindowCloseEvent windowClose; KeyEvent keys[INPUT_STATE_KEY_EVENT_NUM]; MousePositionEvent mousePosition; } ...
lahoising/MobRend
include/mobrend/vertex_buffer.h
<gh_stars>0 #ifndef _MR_VERTEX_BUFFER_H_ #define _MR_VERTEX_BUFFER_H_ #include <cinttypes> #include <mobrend/buffer.h> #include <mobrend/vertex_layout.h> namespace mr { class VertexBuffer : public Buffer { public: typedef struct { const void *data; std::size_t bufferSize; const VertexLa...
lahoising/MobRend
include/mobrend/vertex_layout.h
#ifndef _MR_VERTEX_LAYOUT_H_ #define _MR_VERTEX_LAYOUT_H_ #include <inttypes.h> #include <vector> // #include <initializer_list> namespace mr { enum AttributeType { ATTRIBUTE_TYPE_FLOAT }; typedef struct { AttributeType type; uint32_t count; } Attribute; class VertexLayout { public: VertexLayou...
lahoising/MobRend
include/mobrend/window.h
<filename>include/mobrend/window.h #ifndef _MR_WINDOW_H_ #define _MR_WINDOW_H_ #include <inttypes.h> #include <unordered_map> #include <string> #include <mobrend/input.h> namespace mr { class Window { public: static constexpr int WINDOW_NAME_MAX_LEN = 64; typedef struct { uint32_t width = 800; ...
lahoising/MobRend
include/mobrend/uniform_layout.h
#ifndef _MR_UNIFORM_LAYOUT_H_ #define _MR_UNIFORM_LAYOUT_H_ #include <unordered_map> #include <string> namespace mr { enum UniformType { UNIFORM_TYPE_BOOL, UNIFORM_TYPE_BOOL2, UNIFORM_TYPE_BOOL3, UNIFORM_TYPE_BOOL4, UNIFORM_TYPE_INT, UNIFORM_TYPE_INT2, UNIFORM_TYPE_INT3, UNIFORM_TYPE_...
lahoising/MobRend
include/mobrend/opengl/shader.h
#ifndef _MR_GL_SHADER_H_ #define _MR_GL_SHADER_H_ #include <unordered_map> #include <vector> #include <inttypes.h> #include <mobrend/shader.h> namespace mr { class GlShader : public Shader { public: GlShader(Shader::CreateParams params); virtual ~GlShader() override; virtual void Bind() override; vir...
tenzen-y/intel-extension-for-pytorch
torch_ipex/csrc/cpu/dbl/RNN.h
<reponame>tenzen-y/intel-extension-for-pytorch #pragma once #include <ATen/Tensor.h> #include "cpu/dil/dil.hpp" #include <vector> namespace torch_ipex { namespace cpu { namespace dbl { namespace rnn { std::vector<at::Tensor> mkldnn_rnn_layer(const at::Tensor& input, const at::Tensor& w1, const at::Tensor& w2, ...
tenzen-y/intel-extension-for-pytorch
torch_ipex/csrc/cpu/CustomOPs.h
#pragma once #include "DevOPs.h" #include "aten/aten.hpp" #include "dbl/Common.h" #include "dil/dil.hpp" #include "torch_ipex/csrc/aten_ipex_bridge.h" #include "torch_ipex/csrc/utils.h" #include "ShadeDataContext.h" #include <ATen/Tensor.h> #include <c10/util/Optional.h> #include <torch/csrc/autograd/custom_function.h...
tenzen-y/intel-extension-for-pytorch
torch_ipex/csrc/ipex_tensor_impl.h
<gh_stars>0 #pragma once #include <ATen/Tensor.h> #include <ATen/TensorUtils.h> #include <c10/core/Storage.h> #include <c10/core/TensorImpl.h> #include <memory> namespace torch_ipex { class IPEXTensorImpl : public c10::TensorImpl { public: explicit IPEXTensorImpl(at::Storage storage, at::DispatchKey type_id, at:...
genichin/esp-idf_for_ebell
components/efuse/include/esp_efuse.h
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD // // 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 a...
genichin/esp-idf_for_ebell
components/esp_wifi/include/esp_private/wifi_os_adapter.h
// Copyright 2018 Espressif Systems (Shanghai) PTE LTD // // 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...
magic-mouse/NavComData
NavComData.h
<reponame>magic-mouse/NavComData /* NavComData - Library for controlling information for flight simulation navigation and communication. Created by <NAME>, December, 2019 Released into the public domain. */ #ifndef Morse_h #define Morse_h #include "Arduino.h" class NavComData { public: Nav...
Legendexo/Control-car
rf.h
<reponame>Legendexo/Control-car #pragma once #define DEFAULT_FREQ 40684300 #define DEFAULT_SAMPLE_RATE 2000000 #define DEFAULT_SYMBOL_RATE 2018 struct global_args_t { int FREQ; int SAMPLE_RATE; int SYMBOL_RATE; }; extern struct global_args_t rf_global_args; enum Direction { fwd, fwd_left, fwd_right,...
anilallewar/iOS9-Swift2-Uber-Clone
Uber-Bridging-Header.h
<gh_stars>10-100 // // Uber-Bridging-Header.h // Uber // // Created by <NAME> on 12/16/15. // Copyright © 2015 Parse. All rights reserved. // #ifndef Uber_Bridging_Header_h #define Uber_Bridging_Header_h #import <FBSDKCoreKit/FBSDKCoreKit.h> #import <ParseFacebookUtilsV4/PFFacebookUtils.h> #endif /* Uber_Bridgin...
ctuu/rxcpp
include/rx.h
<gh_stars>1-10 #ifndef CTUU_RX_H_ #define CTUU_RX_H_ #include "async_subject.h" #include "replay_subject.h" #include "behavior_subject.h" #include "subject.h" #include "observable.h" #include "subscriber.h" #include "functor.h" #include "of.h" namespace rx { } // namespace rx #endif
ctuu/rxcpp
src/subject.h
<reponame>ctuu/rxcpp #ifndef CTUU_RX_SUBJECT_H_ #define CTUU_RX_SUBJECT_H_ #include <any> #include <list> #include <memory> #include "observable.h" namespace rx { using subscri_list = std::list<subscriber>; template <typename T> class subject : public observable { private: protected: std::any thrown_error = NULL...
ctuu/rxcpp
src/replay_subject.h
<filename>src/replay_subject.h<gh_stars>1-10 #ifndef CTUU_RX_REPLAY_SUBJECT_H_ #define CTUU_RX_REPLAY_SUBJECT_H_ #include <list> #include "subject.h" namespace rx { template <typename T> class replay_subject : public subject<T> { protected: int buffer_size; std::list<T> events; void _subscribe(const sub...
ctuu/rxcpp
src/subscriber.h
<reponame>ctuu/rxcpp #ifndef CTUU_RX_SUBSCRIBER_H_ #define CTUU_RX_SUBSCRIBER_H_ #include "functor.h" namespace rx { class subscriber { functor _next, _error, _complete; public: template <typename A, typename B = std::nullptr_t, typename C = std::nullptr_t> subscriber(A _next, B _error = nullptr, C _com...
ctuu/rxcpp
src/of.h
#ifndef CTUU_RX_OF_H_ #define CTUU_RX_OF_H_ #include <initializer_list> #include "observable.h" namespace rx { template <typename T> observable of(std::initializer_list<T> &&list) { return observable([list](auto &subscriber) { for (auto i : list) subscriber.next(i); subscriber.complet...
ctuu/rxcpp
src/async_subject.h
<gh_stars>1-10 #ifndef CTUU_RX_ASYNC_SUBJECT_H_ #define CTUU_RX_ASYNC_SUBJECT_H_ #include <list> #include "subject.h" namespace rx { template <typename T> class async_subject : public subject<T> { protected: T value; void _subscribe(const subscriber &subscriber) { if (this->has_error) ...
ctuu/rxcpp
src/functor.h
<reponame>ctuu/rxcpp<gh_stars>1-10 #ifndef CTUU_RX_FUNCTOR_H_ #define CTUU_RX_FUNCTOR_H_ #include <any> #include <functional> #include <type_traits> namespace rx::detail { template <typename T> struct deduce_type; template <typename RETURN_TYPE, typename CLASS_TYPE, typename... Args> struct deduce_type<RETURN_TYPE ...
ctuu/rxcpp
src/observable.h
<reponame>ctuu/rxcpp #ifndef CTUU_RX_OBSERVABLE_H_ #define CTUU_RX_OBSERVABLE_H_ #include <functional> #include "subscriber.h" namespace rx { using subscriber_function = std::function<void(const subscriber &)>; class observable { private: subscriber_function __subscribe; protected: virtual void _subscribe(...
ctuu/rxcpp
src/behavior_subject.h
#ifndef CTUU_RX_BEHAVIOR_SUBJECT_H_ #define CTUU_RX_BEHAVIOR_SUBJECT_H_ #include "subject.h" namespace rx { template <typename T> class behavior_subject : public subject<T> { protected: T prev_value; void _subscribe(const subscriber &subscriber) { subject<T>::_subscribe(subscriber); subs...
jtenner/lucet
lucet-runtime/tests/c_api.c
#include <stdbool.h> #include <stdio.h> #include "lucet.h" bool lucet_runtime_test_expand_heap(struct lucet_dl_module *mod) { struct lucet_region * region; struct lucet_alloc_limits limits = { .heap_memory_size = 4 * 1024 * 1024, .heap_address_space_size = 8 * 1024 * 1024, ....
jtenner/lucet
lucet-idl/tests/example_driver.c
#include <stdlib.h> #include <assert.h> #include "example.h" int main (int argc, char *argv[]) { enum color c1 = COLOR_RED; colour c2 = COLOR_BLUE; col c3 = COLOR_GREEN; struct st s = { .a = 0, .b = 123, .c = COLOR_RED, }; return 0; }
swig-fortran/flibcpp
test/fassert.h
<filename>test/fassert.h #define ASSERT(COND) \ if(.not.(COND))then;print*,"Failure:",__LINE__;stop 1;end if
LiuShulong/sltlocaltools
test/fixtures/find/ViewController.h
##define name1 @"我是接口d";
eda-ricercatore/scafati-presentazioni
ieee-amp/simple-simon/src/memory_game_code.c
#define PLAYER_WAIT_TIME 2000 // The time allowed between button presses - 2s byte sequence[100]; // Storage for the light sequence byte curLen = 0; // Current length of the sequence byte inputCount = 0; // The number of times that the player has pressed a (correct) button in a giv...
kmongo/linked_list
algo.c
<gh_stars>0 #include <stdio.h> #include <stdlib.h> #define FALSE 0 #define TRUE 1 int power3(int val){ int temp = val; while (temp%3 == 0) temp = temp / 3; // printf("power3=%d\n", temp); if (temp == 1) return TRUE; else return FALSE; } int div2(int val){ int temp = val; while (temp%2 == 0) ...
kmongo/linked_list
queue_linked.c
<gh_stars>0 #include <stdio.h> #include <stdlib.h> typedef struct Node{ int val; struct Node* next; }Node; Node *front = NULL; Node *rear = NULL; void enQueue(int val){ Node *temp = (Node*)malloc(sizeof(Node)); temp->val = val; temp->next = NULL; if(front == NULL && rear == NULL){ front = rear = temp; retur...
kmongo/linked_list
stack_linked.c
#include <stdio.h> #include <stdlib.h> typedef struct Node{ int val; struct Node *next; }Node; Node* Push(Node *p, int val){ Node *temp = (struct Node*)malloc(sizeof(struct Node)); temp->val = val; temp->next = p; p = temp; return p; } Node* Pop(Node *p){ if(p == NULL) return; Node *temp = p; p = p->next;...
kmongo/linked_list
qsort.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #define MAX 10 #define SWAP(x,y) {int t; t = x; x = y; y = t;} int partition(int[], int, int); void quickSort(int[], int, int); int main(void) { srand(time(NULL)); int number[MAX] = {0}; printf("排序前:"); int i; for(i = 0; i < MAX; i++) { number[...
kmongo/linked_list
likedlist.c
<gh_stars>0 #include <stdio.h> #include <stdlib.h> typedef struct Node{ int val; struct Node* next; }Node; Node *head = NULL; void insertToTail(int val){ Node* temp = (Node*)malloc(sizeof(Node)); temp->val = val; temp->next = NULL; if(head == NULL){ temp->next = head; head = temp; return; } Node *temp2...
kmongo/linked_list
sqrt.c
<gh_stars>0 #include <stdio.h> #include <stdlib.h> int main(){ double x = 1; double num = 121; double y = 1.0 / 2 * (x + num/x); while(fabs(y-x) > 1e-5){ x = y; y = 1.0 / 2 * (x + num/x); } printf("%.3lf\n",y); }
TokyoRobotics/choreonoid
src/BodyPlugin/KinematicBodyItemSet.h
<filename>src/BodyPlugin/KinematicBodyItemSet.h #ifndef CNOID_BODY_PLUGIN_KINEMATIC_BODY_ITEM_SET_H #define CNOID_BODY_PLUGIN_KINEMATIC_BODY_ITEM_SET_H #include <cnoid/KinematicBodySet> #include "exportdecl.h" namespace cnoid { class BodyItem; class CNOID_EXPORT KinematicBodyItemSet : public KinematicBodySet { publ...
TokyoRobotics/choreonoid
src/Body/KinematicBodySet.h
#ifndef CNOID_BODY_KINEMATIC_BODY_SET_H #define CNOID_BODY_KINEMATIC_BODY_SET_H #include "LinkKinematicsKit.h" #include <cnoid/GeneralId> #include <cnoid/ConnectionSet> #include <functional> #include "exportdecl.h" namespace cnoid { class CNOID_EXPORT KinematicBodySet : public ClonableReferenced { public: Kinema...
LEGaTO-SmartMirror/darknet-ompss
src/gettimeofday.c
<reponame>LEGaTO-SmartMirror/darknet-ompss #ifdef _WIN32 #include "gettimeofday.h" int gettimeofday(struct timeval* tp, struct timezone* tzp) { static const uint64_t EPOCH = ((uint64_t)116444736000000000ULL); SYSTEMTIME system_time; FILETIME file_time; uint64_t time; GetSystemTime(&system_time); SystemTi...
LEGaTO-SmartMirror/darknet-ompss
src/yolo_layer.h
<reponame>LEGaTO-SmartMirror/darknet-ompss #ifndef YOLO_LAYER_H #define YOLO_LAYER_H //#include "darknet.h" #include "layer.h" #include "network.h" #ifdef __cplusplus extern "C" { #endif layer make_yolo_layer(int batch, int w, int h, int n, int total, int *mask, int classes, int max_boxes); void forward_yolo_layer(co...
LEGaTO-SmartMirror/darknet-ompss
src/layer.c
<gh_stars>0 #include "layer.h" #include "dark_cuda.h" #include <stdlib.h> void free_sublayer(layer *l) { if (l) { free_layer(*l); free(l); } } void free_layer(layer l) { free_layer_custom(l, 0); } void free_layer_custom(layer l, int keep_cudnn_desc) { if (l.share_layer != NULL) return...
LEGaTO-SmartMirror/darknet-ompss
src/gettimeofday.h
#ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <winsock2.h> #include <stdint.h> #include <time.h> #include "darknet.h" #define CLOCK_REALTIME (1) #define BILLION (1E9) #ifndef timersub #define timersub(a, b, result) \ do { ...
TwoFlyLiu/ecanspy3
ecanspy3/aboutecanspy3.h
#ifndef ABOUTECANSPY3_H #define ABOUTECANSPY3_H #include <QDialog> namespace Ui { class AboutEcanSpy3; } class AboutEcanSpy3Diaglog : public QDialog { Q_OBJECT public: explicit AboutEcanSpy3Diaglog(QWidget *parent = 0); ~AboutEcanSpy3Diaglog(); private slots: void on_okPushButton_...
TwoFlyLiu/ecanspy3
ecanspy3/status/statuswidget.h
<filename>ecanspy3/status/statuswidget.h #ifndef STATUSWIDGET_H #define STATUSWIDGET_H #include <QWidget> #include "UsbCanUtil.h" QT_BEGIN_NAMESPACE class QLabel; class QCheckBox; class QHBoxLayout; class QVBoxLayout; class QTimer; QT_END_NAMESPACE class StatusWidget : public QWidget { Q_OBJECT ...
TwoFlyLiu/ecanspy3
ecanspy3/base/titletableviewwidget.h
<reponame>TwoFlyLiu/ecanspy3 #ifndef TITLETABLEVIEWWIDGET_H #define TITLETABLEVIEWWIDGET_H #include <QWidget> #include <QLabel> #include <QTableView> #include <QVBoxLayout> class TitleTableViewWidget : public QWidget { Q_OBJECT public: TitleTableViewWidget(QWidget *parent = nullptr); void i...
TwoFlyLiu/ecanspy3
ecanspy3/send/signaltablemodel.h
<reponame>TwoFlyLiu/ecanspy3<filename>ecanspy3/send/signaltablemodel.h #ifndef SIGNALTABLEMODEL_H #define SIGNALTABLEMODEL_H #include <QList> #include <QPair> #include <QPushButton> #include <QAbstractTableModel> #include <dbc4cpp/parser.h> #include "UsbCanUtil.h" class SignalTableModel : public QAbstra...
TwoFlyLiu/ecanspy3
ecanspy3/mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include "base/mainwindowbase.h" #include "database/databasewidget.h" #include "receive/filterwidget.h" #include "send/sendwidget.h" #include <dbc4cpp/parser.h> #include "settings/themesettingdialog.h" namespace Ui { class MainWindow; } QT_BEGIN_NAMESPACE cl...
TwoFlyLiu/ecanspy3
ecanspy3/base/mainwindowbase.h
<filename>ecanspy3/base/mainwindowbase.h<gh_stars>1-10 #ifndef MAINWINDOWBASE_H #define MAINWINDOWBASE_H #include <QMainWindow> #include <QDockWidget> #include <QList> class MainWindowBase : public QMainWindow { Q_OBJECT public: explicit MainWindowBase(QWidget *parent = nullptr); protected: ...
TwoFlyLiu/ecanspy3
ecanspy3/settings/themesettingdialog.h
<filename>ecanspy3/settings/themesettingdialog.h<gh_stars>1-10 #ifndef THEMESETTINGDIALOG_H #define THEMESETTINGDIALOG_H #include <QDialog> #include <QMap> #include <QString> #include <QRadioButton> namespace Ui { class ThemeSettingDialog; } QT_BEGIN_NAMESPACE class QLabel; QT_END_NAMESPACE class Th...
TwoFlyLiu/ecanspy3
dbc4cpp/parser.h
<reponame>TwoFlyLiu/ecanspy3 #ifndef PARSER_H #define PARSER_H #include "dbc4cpp_global.h" #include "builder.h" #include <QStringList> #include <QTextStream> BEGIN_DBC4CPP_NAMESPACE /*! * \brief Parser定义了解析接口 */ struct Parser { virtual ~Parser() {} /*! * \brief parse 解析指定文件 ...
TwoFlyLiu/ecanspy3
ecanspy3/send/sendmessagewidget.h
#ifndef SENDMESSAGEWIDGET_H #define SENDMESSAGEWIDGET_H #include "base/titletableviewwidget.h" #include "send/txmessagetablemodel.h" #include "send/checkedbuttondelegate.h" #include <dbc4cpp/parser.h> #include <QPushButton> #include <QList> #include <QComboBox> #include <QLineEdit> #include <QSortFilterPr...
TwoFlyLiu/ecanspy3
ecanspy3/receive/filterwidget.h
<reponame>TwoFlyLiu/ecanspy3<filename>ecanspy3/receive/filterwidget.h #ifndef FILTERWIDGET_H #define FILTERWIDGET_H #include "base/titletableviewwidget.h" #include "receive/filtertablemodel.h" #include <dbc4cpp/parser.h> #include <QPushButton> #include <QVBoxLayout> #include <QCheckBox> #define SYNC_DOCUM...
TwoFlyLiu/ecanspy3
ecanspy3/settings/projectfile.h
<reponame>TwoFlyLiu/ecanspy3 #ifndef PROJECTFILE_H #define PROJECTFILE_H #include "database/dbctablemodel.h" #include "receive/filtertablemodel.h" #include <QObject> #include <QtXml> #include <dbc4cpp/parser.h> #define DBC_MODEL_NAME_TRANSMIT "transmit" #define DBC_MODEL_NAME_RECEIVE "receive" ...
TwoFlyLiu/ecanspy3
ecanspy3/database/databasewidget.h
#ifndef DATABASEWIDGET_H #define DATABASEWIDGET_H #include <QWidget> #include <QTableView> #include <QAction> #include <QMenu> #include <QPushButton> #include <QVBoxLayout> #include <QButtonGroup> #include <dbc4cpp/parser.h> #include "dbctablemodel.h" class DatabaseWidget : public QWidget { Q_O...
TwoFlyLiu/ecanspy3
ecanspy3/receive/receivemessagetreemodel.h
<reponame>TwoFlyLiu/ecanspy3<filename>ecanspy3/receive/receivemessagetreemodel.h #ifndef RECEIVEMESSAGETABLEMODEL_H #define RECEIVEMESSAGETABLEMODEL_H #include <QAbstractItemModel> #include <dbc4cpp/parser.h> #include "UsbCanUtil.h" #include "filtertablemodel.h" #include <QList> #include <QTime> #include ...
TwoFlyLiu/ecanspy3
ecanspy3/utils/signalaccesstest.h
#ifndef SIGNALACCESSTEST_H #define SIGNALACCESSTEST_H #define SIGNAL_ACCESS_TEST_ENABLED (0) #if SIGNAL_ACCESS_TEST_ENABLED int signalAccessorTest(void); #endif //SIGNAL_ACCESS_ENABLED #endif // SIGNALACCESSTEST_H
TwoFlyLiu/ecanspy3
ecanspy3/utils/signalaccessor.h
#ifndef SIGNALACCESSOR_H #define SIGNALACCESSOR_H #include "dbc4cpp/parser.h" #include "UsbCanUtil.h" #include <stdint.h> namespace SignalAccessor { quint64 getSignalValue(const CAN_OBJ *obj, const Signal *signal); void setSignalValue(CAN_OBJ *obj, Signal *signal, quint64 value); QString getS...
TwoFlyLiu/ecanspy3
dbc4cpp/dbc4cpp_config.h
#ifndef DBC4CPP_CONFIG_H #define DBC4CPP_CONFIG_H #ifdef USE_DBC4CPP_NAMESPACE #define BEGIN_DBC4CPP_NAMESPACE namespace { #define END_DBC4CPP_NAMESPACE } #else #define BEGIN_DBC4CPP_NAMESPACE #define END_DBC4CPP_NAMESPACE #endif #endif // DBC4CPP_CONFIG_H
TwoFlyLiu/ecanspy3
ecanspy3/receive/filtertablemodel.h
#ifndef FILTERTABLEMODEL_H #define FILTERTABLEMODEL_H #include <QAbstractTableModel> #include <QStringList> #include "UsbCanUtil.h" struct CanObjFilter { virtual ~CanObjFilter() {} virtual bool filterCanObj(const CAN_OBJ &canObj) = 0; }; class FilterTableModel : public QAbstractTableModel, publ...
TwoFlyLiu/ecanspy3
dbc4cpp/dbc4cpp_global.h
<reponame>TwoFlyLiu/ecanspy3 #ifndef DBC4CPP_GLOBAL_H #define DBC4CPP_GLOBAL_H #include <QtCore/qglobal.h> #if defined(DBC4CPP_LIBRARY) # define DBC4CPPSHARED_EXPORT Q_DECL_EXPORT #else # define DBC4CPPSHARED_EXPORT Q_DECL_IMPORT #endif #include "dbc4cpp_config.h" #endif // DBC4CPP_GLOBAL_H
TwoFlyLiu/ecanspy3
ecanspy3/base/titletreeviewwidget.h
<reponame>TwoFlyLiu/ecanspy3 #ifndef TITLETREEVIEWWIDGET_H #define TITLETREEVIEWWIDGET_H #include <QWidget> #include <QLabel> #include <QTreeView> #include <QVBoxLayout> class TitleTreeViewWidget : public QWidget { Q_OBJECT public: explicit TitleTreeViewWidget(QWidget *parent = nullptr); vo...
TwoFlyLiu/ecanspy3
ecanspy3/database/dbctablemodel.h
#ifndef DBCMESSAGETABLEMODEL_H #define DBCMESSAGETABLEMODEL_H #include <QAbstractTableModel> #include <QString> #include <dbc4cpp/parser.h> #define SEND_MESSAGE_UNIQUE_ENABLED (1) class DBCTableModel : public QAbstractTableModel { Q_OBJECT public: enum { COLUMN_COUNT = 6 };...
TwoFlyLiu/ecanspy3
ecanspy3/receive/receivewidget.h
<reponame>TwoFlyLiu/ecanspy3 #ifndef RECEIVEWIDGET_H #define RECEIVEWIDGET_H #include <QWidget> #include <QSplitter> #include "filterwidget.h" #include "receivemessagewidget.h" class ReceiveWidget : public QWidget { Q_OBJECT public: explicit ReceiveWidget(QWidget *parent = nullptr); void ...
TwoFlyLiu/ecanspy3
ecanspy3/settings/canconfigdialog.h
<gh_stars>1-10 #ifndef CANCONFIGDIALOG_H #define CANCONFIGDIALOG_H #include <QDialog> namespace Ui { class CanConfigDialog; } class CanConfigDialog : public QDialog { Q_OBJECT public: explicit CanConfigDialog(QWidget *parent = 0); ~CanConfigDialog(); QString getBaurate(); privat...
TwoFlyLiu/ecanspy3
dbc4cpp/dbc4cpp.h
<reponame>TwoFlyLiu/ecanspy3 #ifndef DBC4CPP_H #define DBC4CPP_H #include "dbc4cpp_global.h" #include "parser.h" #endif // DBC4CPP_H
TwoFlyLiu/ecanspy3
ecanspy3/utils/mmtimer.h
#ifndef MMTIMER_H #define MMTIMER_H #include <windows.h> #include <mmsystem.h> #include <QObject> class MMTimer : public QObject { Q_OBJECT public: friend void WINAPI CALLBACK mmtimer_proc(uint, uint, DWORD_PTR user, DWORD_PTR, DWORD_PTR); explicit MMTimer(int interval, QObject *parent=nul...
TwoFlyLiu/ecanspy3
dbc4cpp/context.h
<reponame>TwoFlyLiu/ecanspy3<gh_stars>1-10 #ifndef CONTEXT_H #define CONTEXT_H #include "dbc4cpp_global.h" #include <QString> BEGIN_DBC4CPP_NAMESPACE /*! * \brief Context类保存解析过程中的上下文 */ class Context { public: enum State{ STATE_OK = 0, //!< 当内部解析都正确的时候,为此状态 STATE_ERR...
TwoFlyLiu/ecanspy3
ecanspy3/send/sendwidget.h
#ifndef SENDWIDGET_H #define SENDWIDGET_H #include <QWidget> #include <QSplitter> #include <QTableView> #include "sendmessagewidget.h" #include "signalwidget.h" class SendWidget : public QWidget { Q_OBJECT public: explicit SendWidget(QWidget *parent = nullptr); void initMessageTableView(...
TwoFlyLiu/ecanspy3
ecanspy3/send/txmessagetablemodel.h
<gh_stars>1-10 #ifndef TXMESSAGETABLEMODEL_H #define TXMESSAGETABLEMODEL_H #include <QAbstractTableModel> #include <can/ECanVci.H> #include <QList> #include <QString> #include <dbc4cpp/parser.h> #define TX_MESSAGE_TABLE_VIEW_COLUMN_INDEX_NAME (0) #define TX_MESSAGE_TABLE_VIEW_TX_EN (...
TwoFlyLiu/ecanspy3
ecanspy3/receive/receivemessagewidget.h
#ifndef RECEIVEMESSAGEWIDGET_H #define RECEIVEMESSAGEWIDGET_H #include "base/titletreeviewwidget.h" #include "receive/receivemessagetreemodel.h" #include "receive/receivemessagefilterproxymodel.h" #include "utils/scrollingfile.h" #include <QTimer> #include <QPushButton> #define RECEIVE_FILTER_PROXY_ENABLE...
TwoFlyLiu/ecanspy3
ecanspy3/statistic/statisticswidget.h
<reponame>TwoFlyLiu/ecanspy3<filename>ecanspy3/statistic/statisticswidget.h #ifndef STATISTICSWIDGET_H #define STATISTICSWIDGET_H #include <QWidget> class StatisticsWidget : public QWidget { Q_OBJECT public: explicit StatisticsWidget(QWidget *parent = nullptr); signals: public slots: }; #en...
TwoFlyLiu/ecanspy3
ecanspy3/send/checkedbuttondelegate.h
<reponame>TwoFlyLiu/ecanspy3<gh_stars>1-10 #ifndef CHECKEDBUTTONDELEGATE_H #define CHECKEDBUTTONDELEGATE_H #include <QStyledItemDelegate> class CheckedButtonDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit CheckedButtonDelegate(QObject *parent = nullptr); void setCheckedButotn...
TwoFlyLiu/ecanspy3
ecanspy3/log/logwidget.h
#ifndef LOGWIDGET_H #define LOGWIDGET_H #include <QWidget> class LogWidget : public QWidget { Q_OBJECT public: explicit LogWidget(QWidget *parent = nullptr); signals: public slots: }; #endif // LOGWIDGET_H
TwoFlyLiu/ecanspy3
dbc4cpp/builder.h
#ifndef BUILDER_H #define BUILDER_H #include "dbc4cpp_global.h" #include <QString> #include <QList> #include "entities.h" #include "context.h" BEGIN_DBC4CPP_NAMESPACE struct Builder { struct ValueTableEntry { qint32 value; QString desc; }; virtual ~Builder() {} ...