repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
Elendeer/homework
dataStructure/4th(BinaryTree)/inc/BinaryTree.hpp
<filename>dataStructure/4th(BinaryTree)/inc/BinaryTree.hpp #ifndef __BINARY_TREE__ #define __BINARY_TREE__ #include <iostream> class BinaryTreeNode; // alias of class BinaryTreeNode. using Node = BinaryTreeNode; class BinaryTreeNode { private: int m_data; Node * m_left; Node * m_right; public: BinaryTreeNod...
Elendeer/homework
dataStructure/5th(Graphic)/simplified_version/adjTab-adjMatrix.cpp
#include <iostream> #include <cstring> using namespace std; const int N = 1e5 + 10; int h[N], e[N], ne[N], w[N], idx; void add(int a, int b, int c) { e[idx] = b, w[idx] = c, ne[idx] = h[a], h[a] = idx ++ ; } int main() { memset(h, -1, sizeof h ); add(1, 2, 0); add(1, 3, 0); add(2, 8, 0); add(1, 4, 0); add...
Elendeer/homework
dataStructure/3rd(Stack&Queue)/appsOfStack/lineEdit/main.cpp
<reponame>Elendeer/homework /********************************************* * @Author : Daniel_Elendeer * @Date : 2020-10-13 13:00:24 * @LastEditors : Daniel_Elendeer * @LastEditTime : 2020-10-14 17:15:25 * @Description : *********************************************/ #include <iostream> #include "...
Elendeer/homework
dataStructure/3rd(Stack&Queue)/Stack/src/Stack.cpp
/********************************************* * @Author : Daniel_Elendeer * @Date : 2020-10-10 09:37:07 * @LastEditors : Daniel_Elendeer * @LastEditTime : 2020-10-13 13:01:19 * @Description : *********************************************/ #include "./../inc/Stack.hpp" #include <iostream> Stack:...
Elendeer/homework
dataStructure/5th(Graphic)/src/Graphic.cpp
#include "../inc/Graphic.hpp" #include <iostream> /****** AdjNode Class ******/ AdjNode::AdjNode(int num, int weight) : m_num(num), m_weight(weight) {} AdjNode::~AdjNode() {} int AdjNode::getNum() const { return m_num; } int AdjNode::getWeight() const { return m_weight; } /****** Graphic Class ******/ Graphic::...
Elendeer/homework
dataStructure/3rd(Stack&Queue)/appsOfStack/calculator/src/main.cpp
<gh_stars>1-10 #include <iostream> #include "./../inc/Calculator.hpp" int main() { using namespace std; Calculator A; cout << "=========================================================" << endl; cout << "+\tA very simple calculate wrote with stack.\t+" << endl; cout << "+\tYou can use '+', '-', '*', '/', '(', a...
Elendeer/homework
dataStructure/CAnalyse/src/AddressParser.cpp
<gh_stars>1-10 /********************************************* * @Author : Daniel_Elendeer * @Date : 2020-12-30 15:50:09 * @LastEditors : Daniel_Elendeer * @LastEditTime : 2021-01-01 17:12:31 * @Description : *********************************************/ #if defined(WIN32) || defined(_WIN32) || de...
Elendeer/homework
dataStructure/CAnalyse/src/GNU/isDir.cpp
<gh_stars>1-10 #ifdef __linux__ #include "../../inc/AddressParser.hpp" // For struct stat and stat(...). #include <sys/stat.h> bool AddressParser::isDir(string path) { struct stat file_stat; if ((stat(path.c_str(), &file_stat) == 0) && (file_stat.st_mode & S_IFDIR)) { return true; } return false; } #endi...
Elendeer/homework
dataStructure/template/Stack.hpp
#ifndef _STACK_HPP_ #define _STACK_HPP_ #include <iostream> /***** Declaration *****/ template <typename T> class Stack { private: // pointer of stack array. T* m_stack; // index of top element. int m_top; public: Stack(); Stack(std::initializer_list<T> list); Stack(int len); ~Stack(); // Basic operation...
Elendeer/homework
dataStructure/CAnalyse/inc/FileReader.hpp
/********************************************* * @Author : Daniel_Elendeer * @Date : 2020-12-30 15:50:09 * @LastEditors : Daniel_Elendeer * @LastEditTime : 2021-01-03 20:14:22 * @Description : *********************************************/ #ifndef __FILE_READER_HPP__ #define __FILE_READER_HPP__ #...
ptrk00/Simple-LBM-CUDA
src/render.cpp
#include "render.h" #include <glut/glut.h> #include "grid.h" #define __MULTI_ITER_PER_RENDER__ void initialize() { glClearColor(0.0, 0.0, 0.0, 1.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-10, 800 + 10, -10, 600 + 10, -200.0, 200.0); glMatrixMode(GL_MODELVIEW); } /* functio...
ptrk00/Simple-LBM-CUDA
src/main.cpp
#include "grid.h" #include "glut/glut.h" #include "render.h" int main(int argc, char** argv) { // init GLUT and create Window glutInit(&argc, argv); glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA); glutInitWindowPosition(100, 100); glutInitWindowSize(800, 600); glutCreateWindow("LGA"); // register ...
macmade/PosixSpawn
PosixSpawn/main.cpp
/******************************************************************************* * The MIT License (MIT) * * Copyright (c) 2021 <NAME> - www.xs-labs.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal ...
arabyads/pdo_snowflake
libsnowflakeclient/include/snowflake/Statement.hpp
<reponame>arabyads/pdo_snowflake /* * Copyright (c) 2018-2019 Snowflake Computing, Inc. All rights reserved. */ #ifndef SNOWFLAKECLIENT_SNOWFLAKESTATEMENT_HPP #define SNOWFLAKECLIENT_SNOWFLAKESTATEMENT_HPP #include <string> #include "client.h" #include "Connection.hpp" #include "Column.hpp" #include "Param.hpp" na...
Tejas-Shastha/tejas
src/feeder_straight_1D.cpp
/// /// if force € [0, FORCE_F_1_2_THRESH] then state 1 : lower cup /// if force € (FORCE_F_1_2_THRESH, FORCE_F_2_3_THRESH] then state 2 : do nothing /// if force € (FORCE_F_2_3_THRESH, MAX] then state 3 : raise cup /// /// Fallback velocity functions /// Vel.x Vel.y /// -180 to -9...
Tejas-Shastha/tejas
src/feeder_position_control.cpp
#include "ros/ros.h" #include "std_msgs/String.h" #include "geometry_msgs/PoseStamped.h" #include "mutex" #include "angles/angles.h" #include "geometry_msgs/Vector3.h" #include "geometry_msgs/Quaternion.h" #include "tf/transform_datatypes.h" #include "tf/transform_listener.h" #include <hri_package/Sens_Force.h> #inc...
Tejas-Shastha/tejas
src/robot_control.cpp
#include <ros/ros.h> #include <geometry_msgs/TwistStamped.h> #include <geometry_msgs/PoseStamped.h> #include <kinova_msgs/PoseVelocity.h> #include <kinova_msgs/ArmPoseAction.h> #include <kinova_msgs/ArmPoseGoal.h> #include <kinova_msgs/ArmJointAnglesAction.h> #include <kinova_msgs/ArmJointAnglesGoal.h> #include <mutex>...
Tejas-Shastha/tejas
src/feeder_policy_drive.cpp
/// /// if force € [0, FORCE_F_1_2_THRESH] then state 1 : lower cup /// if force € (FORCE_F_1_2_THRESH, FORCE_F_2_3_THRESH] then state 2 : do nothing /// if force € (FORCE_F_2_3_THRESH, MAX] then state 3 : raise cup /// /// Fallback velocity functions /// Vel.x Vel.y /// -180 to -9...
Tejas-Shastha/tejas
src/data_extractor.cpp
#include "ros/ros.h" #include "std_msgs/String.h" #include "geometry_msgs/PoseStamped.h" #include "mutex" #include "angles/angles.h" #include <stdio.h> #include <fstream> #include "sstream" #include "geometry_msgs/Vector3.h" #include "geometry_msgs/Quaternion.h" #include "tf/transform_datatypes.h" #include "tf/transfo...
Tejas-Shastha/tejas
src/feeder_gmm.cpp
/// /// if force € [0, FORCE_F_1_2_THRESH] then state 1 : lower cup /// if force € (FORCE_F_1_2_THRESH, FORCE_F_2_3_THRESH] then state 2 : do nothing /// if force € (FORCE_F_2_3_THRESH, MAX] then state 3 : raise cup /// /// Fallback velocity functions /// Vel.x Vel.y /// -180 to -90...
Tejas-Shastha/tejas
src/data_extractor_gmm.cpp
<filename>src/data_extractor_gmm.cpp<gh_stars>0 #include "ros/ros.h" #include "std_msgs/String.h" #include "geometry_msgs/PoseStamped.h" #include "mutex" #include "angles/angles.h" #include <stdio.h> #include <fstream> #include "sstream" #include "geometry_msgs/Vector3.h" #include "geometry_msgs/Quaternion.h" #include...
Tejas-Shastha/tejas
src/feeder_sideways.cpp
#include "ros/ros.h" #include "std_msgs/String.h" #include "geometry_msgs/PoseStamped.h" #include "mutex" #include "angles/angles.h" #include "geometry_msgs/Vector3.h" #include "geometry_msgs/Quaternion.h" #include "tf/transform_datatypes.h" #include "tf/transform_listener.h" #include <hri_package/Sens_Force.h> #inc...
Tejas-Shastha/tejas
src/quaternion_tester.cpp
#include <ros/ros.h> #include "geometry_msgs/Quaternion.h" #include "tf/transform_datatypes.h" #include "angles/angles.h" void getRPYFromQuaternionMSG(geometry_msgs::Quaternion orientation, double& roll,double& pitch, double& yaw) { tf::Quaternion quat; tf::quaternionMsgToTF(orientation,quat); quat.normalize(); ...
Tejas-Shastha/tejas
src/position_drive.cpp
<gh_stars>0 #include "ros/ros.h" #include "geometry_msgs/PoseStamped.h" #include "geometry_msgs/Quaternion.h" #include "angles/angles.h" #include "mutex" #include "std_msgs/String.h" #include "tf/transform_listener.h" #include "tf/transform_datatypes.h" #include <actionlib/client/simple_action_client.h> #include <kino...
Tejas-Shastha/tejas
src/tf_caster.cpp
<reponame>Tejas-Shastha/tejas #include "ros/ros.h" #include "geometry_msgs/PoseStamped.h" #include "mutex" #include "std_msgs/String.h" #include "tf/transform_listener.h" #include <actionlib/client/simple_action_client.h> #include <kinova_msgs/PoseVelocity.h> #define END_EFF_FRAME "j2s7s300_end_effector" #define BASE...
Tejas-Shastha/tejas
src/velocity_test.cpp
/// DRIVE FOR DURATION #include "ros/ros.h" #include "geometry_msgs/TwistStamped.h" #include "geometry_msgs/PoseStamped.h" #include "mutex" #include "kinova_msgs/PoseVelocity.h" geometry_msgs::PoseStamped current_pose; std::mutex pose_lock; void poseGrabber(geometry_msgs::PoseStamped::ConstPtr pose) { pose_lock.l...
Tejas-Shastha/tejas
src/velocity_drive.cpp
/// DRIVE TO POSE #include "ros/ros.h" #include "geometry_msgs/TwistStamped.h" #include "geometry_msgs/PoseStamped.h" #include "geometry_msgs/Quaternion.h" #include "mutex" #include "kinova_msgs/PoseVelocity.h" #include "tf/transform_datatypes.h" #include "angles/angles.h" #define VEL_LIN_MAX 0.04 #define VEL_ANG_MA...
DuffsDevice/cpp-amortizer
test.cpp
#include "amortizer.h" #include <iostream> #include <string> #include <vector> #include <cmath> using namespace std; // Convert integer to binary string in reverse order (LSB left) string dec2binrev(int a) { string binary; int mask = 1; for(int i = 0; i < 31; i++) { if((mask&a) >=...
Regenhardt/Librelancer
src/pangogame/src/pangorender.cpp
// MIT License - Copyright (c) <NAME> // This file is subject to the terms and conditions defined in // LICENSE, which is part of this source code package #include "pg_internal.h" #include "stb.h" struct CacheRenderer { PangoRenderer parent; PGRenderContext *ctx; PGBuiltText *built; int colorset; float re...
Kishin14/ucc-devops
raizParte1.cpp
<filename>raizParte1.cpp<gh_stars>0 #include <stdio.h> #include <math.h> #include <iostream> using namespace std; //Area del circulo //Funcion para sacar la raiz cuadrada float raizCuadrada(float numero) { cout << "La raiz cuadrada de " << numero << " es: " << sqrt(numero) << endl; return 0; } int areaCirculo(doub...
Kishin14/ucc-devops
my_program.cpp
#include <stdio.h> #include <math.h> #include <iostream> using namespace std; int main() { int iValor = 0; int iContador = 0; cout << "Ingrese un valor para calcular una suma"; cin >> iValor; cout << "Ha ingresado: " << iValor <<endl; for (int i = 1; i<= iValor; i++) { iContador += i; } cout << "El resulta...
Kishin14/ucc-devops
geometria.cpp
<reponame>Kishin14/ucc-devops #include <stdio.h> #include <math.h> #include <iostream> using namespace std; //Area del circulo int areaCirculo(double radioP) { double PI = 3.14159265358979323846; double area = 0.0; cout << "El radio ingresado del circulo es: " << radioP << endl; area = pow(radioP, 2) * PI; cout <...
Kishin14/ucc-devops
raizParte2.cpp
int areaCuadrado(double lado) { double area = 0.0; cout << "El lado ingresado del cuadrado es: " << lado << endl; area = lado * lado; cout << "El area del cuadrado es: " << area << endl; raizCuadrada(area); return 0; } int main() { cout << "-- Calculadora de areas --" << endl; cout << "-----------------------...
Kishin14/ucc-devops
hilo.cpp
#include <stdio.h> #include <cstdlib> #include <iostream> #include <unistd.h> using namespace std; int main() { int iValor = 10; int iContador = 1; double dSleep = 0; cout << "-------------------------- PROMGRAMA HILO ----------------------------" << endl; for (int i = 1; i <= iValor; i++) { dSleep = 1 - (1/...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/isothermal_line.hpp
#ifndef EOS_ISOTHERMAL_LINE_HPP #define EOS_ISOTHERMAL_LINE_HPP #include <eos/cubic_eos_traits.hpp> namespace eos { template <typename Eos> class IsothermalLine { public: using Scalar = typename CubicEosTraits<Eos>::Scalar; /// @param[in] t Temperature /// @param[in] a Attraction parameter /// @param[in] b...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/thermodynamic_constants.hpp
#ifndef EOS_THERMODYNAMIC_CONSTANTS_HPP #define EOS_THERMODYNAMIC_CONSTANTS_HPP #include <type_traits> namespace eos { /// @{ /// @name Thermodynamic constants /// /// The following definitions are based on the International System of Units(SI) /// 9th edition 2019. /// @brief Gas constant [J/mol-K] template <typen...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/mathematical_constants.hpp
#ifndef EOS_MATHEMATICAL_CONSTANTS_HPP #define EOS_MATHEMATICAL_CONSTANTS_HPP #include <cmath> #include <type_traits> namespace eos { template <typename T> inline constexpr auto sqrt_two() noexcept -> std::enable_if_t<std::is_floating_point_v<T>, T> { #ifndef M_SQRT2 #error M_SQRT2 is not defined! #endif retur...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/test/cubic_eos_test.cpp
#include <gsl/gsl_poly.h> #include <gtest/gtest.h> #include <array> #include <eos/soave_redlich_kwong_eos.hpp> #include <eos/van_der_waals_eos.hpp> #include <eos/peng_robinson_eos.hpp> #include <vector> class CubicEquationSolver { public: std::vector<double> operator()(const std::array<double, 3>& a) const { s...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/soave_redlich_kwong_eos.hpp
<reponame>hantar97404/Ecuaciones-cubicas-de-estado- #ifndef EOS_SOAVE_REDLICH_KWONG_EOS_HPP #define EOS_SOAVE_REDLICH_KWONG_EOS_HPP #include <eos/cubic_eos_base.hpp> namespace eos { template <typename Scalar> class SoaveRedlichKwongEos; template <typename Scalar_> struct CubicEosTraits<SoaveRedlichKwongEos<Scalar_>...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/cubic_eos_state.hpp
<reponame>hantar97404/Ecuaciones-cubicas-de-estado-<filename>cpp/include/eos/cubic_eos_state.hpp #ifndef EOS_CUBIC_EOS_STATE_HPP #define EOS_CUBIC_EOS_STATE_HPP #include <eos/cubic_eos_traits.hpp> #include <vector> namespace eos { template <typename Eos> struct CubicEosState { public: using Scalar = typename Cubi...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/cubic_eos_traits.hpp
<gh_stars>1-10 #ifndef EOS_CUBIC_EOS_TRAITS_HPP #define EOS_CUBIC_EOS_TRAITS_HPP namespace eos { template <typename Eos> struct CubicEosTraits {}; } // namespace eos #endif // EOS_CUBIC_EOS_TRAITS_HPP
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/peng_robinson_eos.hpp
<reponame>hantar97404/Ecuaciones-cubicas-de-estado-<gh_stars>1-10 #ifndef EOS_PENG_ROBINSON_EOS_HPP #define EOS_PENG_ROBINSON_EOS_HPP #include <eos/cubic_eos_base.hpp> #include <eos/mathematical_constants.hpp> namespace eos { template <typename Scalar> class PengRobinsonEos; template <typename Scalar_> struct Cubic...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/van_der_waals_eos.hpp
#ifndef EOS_VAN_DER_WAALS_EOS_HPP #define EOS_VAN_DER_WAALS_EOS_HPP #include <array> #include <cmath> #include <eos/cubic_eos_base.hpp> namespace eos { template <typename Scalar> class VanDerWaalsEos; template <typename Scalar_> struct CubicEosTraits<VanDerWaalsEos<Scalar_>> { using Scalar = Scalar_; static con...
hantar97404/Ecuaciones-cubicas-de-estado-
cpp/include/eos/cubic_eos_base.hpp
#ifndef EOS_CUBIC_EOS_BASE_HPP #define EOS_CUBIC_EOS_BASE_HPP #include <eos/cubic_eos_state.hpp> #include <eos/cubic_eos_traits.hpp> #include <eos/isothermal_line.hpp> #include <eos/thermodynamic_constants.hpp> namespace eos { template <typename Derived> class CubicEosBase { public: using Scalar = typename CubicE...
zachkrall/art-loop-examples
openFrameworks/ofApp.cpp
<filename>openFrameworks/ofApp.cpp #include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ } //-------------------------------------------------------------- void ofApp::update(){ } //-------------------------------------------------------------- void ofApp::draw(){...
zachkrall/art-loop-examples
openFrameworks/main.cpp
<reponame>zachkrall/art-loop-examples<filename>openFrameworks/main.cpp<gh_stars>0 #include "ofMain.h" #include "ofApp.h" //======================================================================== int main( ){ // artloop uses a vertical screen display ofSetupOpenGL(1080,1920,OF_FULLSCREEN); ofRunApp(new ofApp); }...
A-Schmid/ScreenshotMatcher
main.cpp
<reponame>A-Schmid/ScreenshotMatcher // source: https://docs.opencv.org/3.4/d7/dff/tutorial_feature_homography.html // or: https://github.com/opencv/opencv/blob/3.4/samples/cpp/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.cpp #include <iostream> #include "opencv2/core.hpp" #ifdef HAV...
wisehackermonkey/20200307_weather_station_portable
arduino_code/save_data_to_sd_card_v3/Logger.cpp
/* SD card writing wrapper around the SD.h library to write logs to and sd card Created by <NAME>, 2020/03/07 Released into the public domain. */ #include "Arduino.h" #include "Logger.h" Logger::Logger(String filename, int _SD_CARD_SELECT_PIN, int _SD_CARD_WRITE_LED) { SD_CARD_SELECT_PIN = _SD_CARD_SELE...
wisehackermonkey/20200307_weather_station_portable
arduino_code/temp_plus_lora_radio_v2/TempatureSensor.cpp
<gh_stars>0 #include "Arduino.h" #include "TempatureSensor.h" #include "SimpleDHT_LOCAL_VERSION.h" TempatureSensor::TempatureSensor(int pin) { pinMode(pin, OUTPUT); _pin = pin; //instancate temperature sensor, and set to local variable SimpleDHT11 dht11; tempsensor = dht11; } int TempatureSensor::read(){ ...
wisehackermonkey/20200307_weather_station_portable
arduino_code/water_level_sensor_v3/WaterSensor.cpp
//water sensor level library // by <NAME> // 20200315 //simple water sensor reading library //basically a wrapper for analogRead(A0) //where A0 is the pin used by the water sensor //connected to the arduino #include "Arduino.h" #include "WaterSensor.h" //what im going for interms of the api //WaterSensor watersens...
kenavolic/mvm
tests/vm_test.cpp
<filename>tests/vm_test.cpp // Copyright 2019 <NAME> <<EMAIL>> // // 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 re...
kenavolic/mvm
tests/instr_set_test.cpp
// Copyright 2019 <NAME> <<EMAIL>> // // 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 ...
kenavolic/mvm
tests/typestring_test.cpp
<gh_stars>10-100 // Copyright 2019 <NAME> <<EMAIL>> // // 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...
kenavolic/mvm
tests/list_test.cpp
<gh_stars>10-100 // Copyright 2019 <NAME> <<EMAIL>> // // 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...
kenavolic/mvm
tests/reflect_test.cpp
// Copyright 2019 <NAME> <<EMAIL>> // // 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 ...
kenavolic/mvm
tests/program_test.cpp
// Copyright 2019 <NAME> <<EMAIL>> // // 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 ...
kenavolic/mvm
examples/mini/main.cpp
// Copyright 2019 <NAME> <<EMAIL>> // // 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 ...
kenavolic/mvm
examples/exta/main.cpp
// Copyright 2019 <NAME> <<EMAIL>> // // 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 ...
kenavolic/mvm
tests/num_parse_test.cpp
// Copyright 2019 <NAME> <<EMAIL>> // // 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 ...
kenavolic/mvm
tests/meta_test.cpp
// Copyright 2019 <NAME> <<EMAIL>> // // 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 ...
vansweej/metaballs
cuda/benchmark/src/criterion_test.cpp
<gh_stars>0 #include <criterion/criterion.hpp> BENCHMARK(Simple_test) { SETUP_BENCHMARK( const auto size = 100; std::vector<int> vec(size, 0); // vector of size 100 ) // Code to be benchmarked // merge_sort(vec.begin(), vec.end(), std::less<int>(), size); TEARDOWN_BENCHMARK( vec.clear(); )...
99611400/computerGraphics
src/DiamondAndLinebyQt+glfwOnLinux/Diamond.cpp
<reponame>99611400/computerGraphics // // Created by yhn on 6/5/21. // #include "Diamond.h" #include "math.h" #define PI 3.1415926 #include "iostream" Diamond::Diamond(QWidget *parent,float scale,int pointNum) { total = pointNum; this->scale = scale; } Diamond::~Diamond() { } void Diamond::initializeGL() { ...
99611400/computerGraphics
src/DiamondandLinebyQt+glfwOnWindows/PolygonMine_copy.cpp
<reponame>99611400/computerGraphics // // Created by yhn on 6/21/2021. // #include "PolygonMine.h" PolygonMine::PolygonMine(QWidget *parent) { width = parent->width(); height = parent->height(); linesVector = new vector<QPoint>; } PolygonMine::~PolygonMine() { } void PolygonMine::initializeGL() { ...
99611400/computerGraphics
src/DiamondandLinebyQt+glfwOnWindows/ColorCube.cpp
// // Created by yhn on 7/2/2021. // #include "ColorCube.h" ColorCube::ColorCube(QWidget *parent) { width = parent->width(); height = parent->height(); } ColorCube::~ColorCube() { } void ColorCube::initializeGL() { initializeOpenGLFunctions(); glClearColor(32/255.0,158/255.0,40/255.0, 1); ini...
99611400/computerGraphics
src/glfwOnWindows/besaier.cpp
<filename>src/glfwOnWindows/besaier.cpp #include <chrono> #include <iostream> #include <opencv2/opencv.hpp> std::vector<cv::Point2f> control_points; cv::Point2f lerp_v2f(const cv::Point2f& a, const cv::Point2f& b, float t) { return a + (b - a) * t; } cv::Point2f recursive_bezier(const std::vector<cv::Point2...
99611400/computerGraphics
src/DiamondandLinebyQt+glfwOnWindows/Line.cpp
// // Created by yhn on 2021/6/8. // #include "Line.h" #include <QMouseEvent> #include <iostream> Line::Line(QWidget *parent) { linesVector = new vector<QPoint>(); width = parent->width(); height = parent->height(); } Line::~Line() { } void Line::initializeGL() { initializeOpenGLFunctions(); //...
99611400/computerGraphics
src/glfwOnWindows/lineCut.cpp
<filename>src/glfwOnWindows/lineCut.cpp /*INTRODUCTION // Mouse: // - LEFT button: // 1. draw a new line // 2. choose the endpoint to modify a line // - RIGHT button: // clip the lines // Keyboard: // - SPACE: // clear the window // - DELETE: // keep the clipped lines(black ones) stay, remove the redundant pa...
99611400/computerGraphics
src/QttTestOnWindows/mainwindow.cpp
#include "mainwindow.h" #include "./ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); QMenuBar * menubar = menuBar(); QMenu *file = menubar->addMenu("文件"); QAction *exit = file->addAction("退出"); QMenu *draw = menub...
99611400/computerGraphics
src/glfwOnWindows/sixEdgeFigure.cpp
<filename>src/glfwOnWindows/sixEdgeFigure.cpp<gh_stars>1-10 // // Created by yhn on 6/21/2021. // #include<iostream> #define GLEW_STATIC//静态链接库 #include<GL/glew.h> #include<GLFW/glfw3.h> const GLchar* vertexShaderSource = "#version 330 core\n" "layout (location = 0) in vec3 position...
99611400/computerGraphics
src/DiamondAndLinebyQt+glfwOnLinux/mainwindow.cpp
#include <QMessageBox> #include <QInputDialog> #include <QFormLayout> #include <QDialogButtonBox> #include "mainwindow.h" #include "./ui_mainwindow.h" #include "QTimer" #include "iostream" #include "QPushButton" #include "QLabel" #include "Diamond.h" #include "Line.h" MainWindow::MainWindow(QWidget *parent) :...
99611400/computerGraphics
src/DiamondAndLinebyQt+glfwOnLinux/Diamond_dynamic.cpp
<reponame>99611400/computerGraphics //#include "Diamond_dynamic.h" //#define PI 3.1415926535 //#include "math.h" //#include "iostream" //#include "QTimer" //#include <GLFW/glfw3.h> //Diamond_dynamic::Diamond_dynamic(QWidget *parent,float radius,int pointNum) // : QOpenGLWidget(parent) //{ // total = pointNum...
99611400/computerGraphics
src/DiamondandLinebyQt+glfwOnWindows/PointMine.cpp
// // Created by yhn on 6/22/2021. // #include "PointMine.h" PointMine::PointMine(QWidget *parent) { width = parent->width(); height = parent->height(); pointsVector = new vector<QPoint>; } PointMine::~PointMine() { } void PointMine::initializeGL() { initializeOpenGLFunctions(); glClearColo...
seven-eXe/GDHACK
GeometryDashHack/Entry.cpp
#include "Entry.hpp" cInfo* INFO = new cInfo(); DWORD GetProcId(const char* procname) { PROCESSENTRY32 pe; HANDLE hSnap; pe.dwSize = sizeof(PROCESSENTRY32); hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); if (Process32First(hSnap, &pe)) { do { if (strcmp(pe.szExeFile, procname) ==...
seven-eXe/GDHACK
GeometryDashHack/cheatFuncs.hpp
<filename>GeometryDashHack/cheatFuncs.hpp #pragma once #include "Entry.hpp" void cheatFuncNoclip(); void cheatFuncMusicHack(); char* cheatGetPlayerName(); void cheatFuncMusicLimit(); void cheatFuncJumpHack(); void cheatFuncPracticeMusicHack(); void cheatFuncUnlockAllIcons(); void cheatFuncPatchFuckingAntic...
seven-eXe/GDHACK
GeometryDashHack/cheatFuncs.cpp
<reponame>seven-eXe/GDHACK #include "cheatFuncs.hpp" struct stFuncStates { bool noclip; bool noMusicLimit; bool JumpHack; bool cheatPracticeMusicHack; bool cheatUnlockAllIcons; bool cheatPatchFuckingAc; bool cheatUnlockAllLevels; bool cheatShopHack; bool cheatUnlockSecretLvl; } fs; void cheatFu...
seven-eXe/GDHACK
GeometryDashHack/Entry.hpp
<reponame>seven-eXe/GDHACK<filename>GeometryDashHack/Entry.hpp #pragma once #include <iostream> #include <windows.h> #include <string> #include <TlHelp32.h> #include "cheatFuncs.hpp" struct cInfo { HANDLE hProcess; uintptr_t baseAddress; DWORD PlayerPTR; }; extern cInfo* INFO; #define GEOMETRY_...
zendive/data-variance-visualizer
DlgMain.cpp
#include <tchar.h> #include <io.h> #include <process.h> // _beginthread(...), _endthread() #include ".\dlgmain.h" #include <math.h> #include "resource.h" #undef THIS #define THIS ((CDlgMain*)CDlgMain::This) CDlgMain* CDlgMain::This = NULL; const char CDlgMain::s_achBitSet[CDlgMain::s_uiBitSetLength...
zendive/data-variance-visualizer
MyAPIDialog.cpp
<reponame>zendive/data-variance-visualizer<filename>MyAPIDialog.cpp // // <NAME> 4-BYTE (C)Copyright 2005 // Basic dialog window base class // "MyAPIDialog.cpp" // #pragma once #include "MyAPIDialog.h" #undef CLASSNAME #undef THIS #define CLASSNAME CMyAPIDialog #define THIS ((CLASSNAME*)CLASSNAME::This) // init s...
zendive/data-variance-visualizer
ComboWnd.cpp
#include <tchar.h> #include ".\combownd.h" //#using <mscorlib.dll> CComboWnd::CComboWnd(CMyAPIWnd *_wnd, UINT _IDD) :CMyAPIWnd(/*parentwnd*/_wnd->m_hWnd, _wnd->m_hInstance, _IDD) { m_ret = 0; m_indx = 0; } CComboWnd::~CComboWnd(void) { } // CB_, CBS_ UINT CComboWnd::Get() { m_indx = (UINT)SendDlgItem...
zendive/data-variance-visualizer
winmain.cpp
// Author: <NAME> // Project: Rainbyte #define _INC_OLE #include <windows.h> #include <tchar.h> #undef _INC_OLE #include "resource.h" #include "DlgMain.h" int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE /*_hPrevInstance*/ , LPSTR /*_lpCmdLine*/, int /*_nCmdShow*/) { CDlgMain *pDl...
zendive/data-variance-visualizer
CProgressBar.cpp
// <NAME> // WorkTimeController // "CProgressBar.cpp" #pragma once #include "CProgressBar.h" // CONSTRUCTOR: CProgressBar::CProgressBar(CMyAPIDialog* _dlg) { m_dlg = _dlg; m_h = NULL; m_uCurPos = 0; } // DESTRUCTOR: CProgressBar::~CProgressBar() { Destroy(); } // create progress bar on specified coor...
akiyosi/tree-sitter
test/fuzz/fuzzer.cc
#include <cassert> #include <fstream> #include "tree_sitter/api.h" extern "C" const TSLanguage *TS_LANG(); static TSQuery *lang_query; extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { if(TS_LANG_QUERY_FILENAME[0]) { // The query filename is relative to the fuzzing binary. Convert it // to an ...
mattgil23/test01
darkroom_rqt/include/darkroom_rqt/darkroom_rqt.hpp
<filename>darkroom_rqt/include/darkroom_rqt/darkroom_rqt.hpp<gh_stars>0 /* BSD 3-Clause License Copyright (c) 2018, Roboy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...
mattgil23/test01
darkroom/include/darkroom/PoseEstimatorMultiLighthouse.hpp
<filename>darkroom/include/darkroom/PoseEstimatorMultiLighthouse.hpp /* BSD 3-Clause License Copyright (c) 2018, Roboy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:...
mattgil23/test01
darkroom_arduino/darkroom_mkr/wirelessLove.cpp
#include "wirelessLove.hpp" const char TestBuffer[] ="Hello World"; const int timestampSize = 2; WirelessLove::WirelessLove(const char* SSID, const char* PASSWD, IPAddress &broadcastIP): broadcastIP(broadcastIP){ uint32_t timoutCounter = 0; // check for presence of the WiFiShield: if(WiFi.status()...
mattgil23/test01
darkroom/src/InYourGibbousPhase2.cpp
<gh_stars>10-100 #include "darkroom/InYourGibbousPhase2.hpp" namespace InYourGibbousPhase2 { InYourGibbousPhase2::InYourGibbousPhase2( int trajectoryPoints) : Functor<double>(110, 50), trajectoryPoints(trajectoryPoints) { } int InYourGibbousPhase2::operator()(const VectorXd &x, VectorXd &fvec) ...
mattgil23/test01
darkroom_arduino/darkroom_esp8266/wirelessLove.cpp
#include "wirelessLove.hpp" const char TestBuffer[] ="Hello World"; const int timestampSize = 2; WirelessLove::WirelessLove(const char* ssid, const char* passwd, IPAddress &broadcastIP): broadcastIP(broadcastIP){ Serial.println(); Serial.println(); Serial.print("Connecting to "); Serial.println(ssid); ...
mattgil23/test01
darkroom/src/gazebo/DarkRoomVisualPlugin.cpp
<filename>darkroom/src/gazebo/DarkRoomVisualPlugin.cpp<gh_stars>10-100 #include "darkroom/gazebo/DarkRoomVisualPlugin.hpp" namespace gazebo { namespace rendering { //////////////////////////////////////////////////////////////////////////////// // Constructor DarkRoomVisualPlugin::Dark...
mattgil23/test01
darkroom/src/LighthouseSimulator.cpp
<reponame>mattgil23/test01 #include <darkroom/LighthouseSimulator.hpp> LighthouseSimulator::LighthouseSimulator(int id, vector<fs::path> &configFile) : id(id) { if (!ros::isInitialized()) { int argc = 0; char **argv = NULL; ros::init(argc, argv, "LighthouseSimulator", ros:...
mattgil23/test01
darkroom_arduino/darkroom_mkr/wirelessLove.hpp
/* BSD 3-Clause License Copyright (c) 2017, Roboy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyrigh...
mattgil23/test01
darkroom/include/darkroom/LighthouseEstimator.hpp
/* BSD 3-Clause License Copyright (c) 2018, Roboy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyrigh...
mattgil23/test01
darkroom_arduino/darkroom_mkr/sensor.hpp
<gh_stars>10-100 #ifndef SENSOR_H #define SENSOR_H /* (GCLK_SOURCE / GCLK_DIVIDE) / (PRESCALER + REGISTER COUNTS) = OVERFLOW FREQUENCE OF TCX * (48Mhz / GCLK_DIVID) / PRESCALER + 2^16) = 2^16µS means * Currenlty setted up to 1MHZ which equals count stamps of 1µS */ void initCounter() { // divides the source ...
mattgil23/test01
darkroom/include/darkroom/gazebo/ImuModelPlugin.hpp
#pragma once #include <ros/ros.h> #include <gazebo/gazebo.hh> #include <gazebo/common/Plugin.hh> #include <gazebo/physics/physics.hh> #include <gazebo/common/common.hh> #include <Eigen/Dense> #include <sensor_msgs/Imu.h> #include <chrono> using namespace Eigen; using namespace gazebo; using namespace std; using names...
mattgil23/test01
darkroom/src/testMe.cpp
<filename>darkroom/src/testMe.cpp #include "stdafx.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include "optimization.h" using namespace alglib; // non-linear minimization with constraints void function1_func(const real_1d_array &x, double &func, void *ptr) { // // this callback calculates f(...
mattgil23/test01
darkroom_rqt/src/darkroom_rqt.cpp
#include <darkroom_rqt/darkroom_rqt.hpp> tf::Transform RoboyDarkRoom::lighthouse1; tf::Transform RoboyDarkRoom::lighthouse2; tf::Transform RoboyDarkRoom::simulated_object_lighthouse1; tf::Transform RoboyDarkRoom::simulated_object_lighthouse2; tf::Transform RoboyDarkRoom::tf_world; tf::Transform RoboyDarkRoom::tf_map; ...
mattgil23/test01
darkroom/src/gazebo/LighthouseVisualPlugin.cpp
#include "darkroom/gazebo/LighthouseVisualPlugin.hpp" namespace gazebo { namespace rendering { int LighthouseVisualPlugin::instance_counter = 1; //////////////////////////////////////////////////////////////////////////////// // Constructor LighthouseVisualPlugin::LighthouseV...
mattgil23/test01
darkroom/include/darkroom/LighthouseSimulator.hpp
/* BSD 3-Clause License Copyright (c) 2018, Roboy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyrigh...
mattgil23/test01
darkroom_rqt/src/main.cpp
<filename>darkroom_rqt/src/main.cpp<gh_stars>0 #include <QApplication> #include <QtQuick/QQuickView> #include <QBoxLayout> #include <QWidget> #include <QTableView> #include <QPushButton> #include <QRadioButton> #include <QScrollArea> #include <QLineEdit> #include <iostream> #include <fstream> #include <cstdlib> usin...
mattgil23/test01
darkroom/include/darkroom/Utilities.hpp
/* BSD 3-Clause License Copyright (c) 2018, Roboy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyrigh...
mattgil23/test01
darkroom/src/gazebo/ImuModelPlugin.cpp
#include "darkroom/gazebo/ImuModelPlugin.hpp" ImuModelPlugin::ImuModelPlugin() { if (!ros::isInitialized()) { int argc = 0; char **argv = NULL; ros::init(argc, argv, "ImuModelPlugin", ros::init_options::NoSigintHandler | ros::init_options::AnonymousName); } nh = ro...