blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
117
path
stringlengths
3
268
src_encoding
stringclasses
34 values
length_bytes
int64
6
4.23M
score
float64
2.52
5.19
int_score
int64
3
5
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
text
stringlengths
13
4.23M
download_success
bool
1 class
2d522baf43293a7e39cb56abb915aa7d883b6bbf
C++
OscarMeyer/DD2380-Artificial-Intelligence
/HMM1/matrix_pre/matrix_start.cpp
UTF-8
602
3.421875
3
[]
no_license
#include <iostream> using namespace std; int main() { /*Test matrix*/ int m[3][3] = { {1,2,3}, {4,5,6}, {7,8,9} }; int i; cout << "Please enter int: "; cin >> i; cout << "Value: " << i << "\n"; cout << "Double: " << i*2 << "\n"; cou...
true
7f270a6f703e1965711822ec2ffa8d5091e2e691
C++
EXPmaster/CouseProjectC
/task8/7.cpp
UTF-8
1,966
3.03125
3
[]
no_license
#if 0 #include <stdio.h> #include <stdlib.h> #include <string.h> void fun(char *str, int *number, char *target); char *s_gets(char *); int main() { int number = 0; char str[100], target[100]; s_gets(str); fun(str, &number, target); printf("%s\n%d\n", target, number); return 0; } char *s_ge...
true
5009ab3a0f3c968dd9db43dfc86b15c3d35d5c75
C++
AnabaenaQing/Source-Code_ShaderX_GPU-Pro_GPU-Zen
/GPU Pro4/02_Rendering/06_Progressive Screen-space Multi-channel Surface Voxelization/src/cglib/utils.cpp
UTF-8
242
3.328125
3
[ "MIT" ]
permissive
#include <math.h> int exp2i (int val) { int i, p2 = 1; for (i = 0; i < val; i++) p2 <<= 1; return p2; } int getPowerOfTwo (int val) { int p2 = 1; while (p2 < val) p2 <<= 1; return p2; }
true
05bdba0722ef454528872cabe6ed67c304e49508
C++
divyagar/SportsQuiz
/sports_quiz.cpp
UTF-8
3,171
2.84375
3
[]
no_license
#include <iostream> using namespace std; #include <string> #include <algorithm> #include <bits/stdc++.h> #include <stdio.h> #include <conio.h> #include <thread> #include <chrono> #include <mutex> #include <condition_variable> class countries{ string country; vector<string> sports; int total_sports; pub...
true
0e6865574755f5143a0293548fa8c0b27d7d5d4b
C++
novikov-ilia-softdev/thinking_cpp
/tom_1/chapter_03/13/printbinary.cpp
UTF-8
180
3.09375
3
[]
no_license
#include <iostream> void printBinary( const unsigned char val) { for( int i = 7; i >= 0; i--) { if( val bitand (1 << i)) std::cout << "1"; else std::cout << "0"; } }
true
5e8bcd6d4e4eb75a6ff88ce9c7acd3abdd10ebad
C++
IGME-RIT/VkHitboxes
/Code/Texture.h
UTF-8
529
2.84375
3
[]
no_license
#pragma once #include "BufferCPU.h" #include "TextureGPU.h" #include "Demo.h" // forward declaration class Demo; class Texture { public: int width; int height; // Texture data BufferCPU* textureCPU; TextureGPU* textureGPU; Texture(char* file); ~Texture(); static uint32_t CountMips(uint32_t width, uint32_t ...
true
6b4a872cbd938b39f28076f0711f267a55c1d934
C++
Jorgitou98/Acepta-el-Reto
/Soluciones/AceptaElReto583EncuestaComprometedora.cpp
UTF-8
364
2.5625
3
[]
no_license
#include <iostream> using namespace std; int main() { cin.sync_with_stdio(false); cin.tie(nullptr); int num_casos; cin >> num_casos; for (int i = 0; i < num_casos; ++i) { int comp, no_comp; cin >> comp >> no_comp; int mitad = (comp + no_comp) / 2; comp -= mitad; cout << ((long long int)comp...
true
125c9d8be3c67a33f2dcf110ca9ecafade1591fe
C++
alexandervanrenen/Gamera-Database
/src/external_sort/MergeSort.hpp
UTF-8
8,414
2.515625
3
[]
no_license
#pragma once #include <iostream> #include <algorithm> #include <sys/stat.h> #include "common/Config.hpp" #include "SortIterator.hpp" #include "btree/IndexKeyComparator.hpp" #include "btree/IndexKeySchema.hpp" #include "btree/IndexKey.hpp" #include "TempFile.hpp" #include "Chunk.hpp" namespace dbi { uint64_t filesi...
true
4db404c98d4db4f411697db7ec004d34896f0a88
C++
eliasm2/problem-solving
/Treinos/2011-07-13-MidAtlantic2007/not AC/G-Bulls.cpp
UTF-8
725
2.53125
3
[]
no_license
#include <string> #include <set> #include <sstream> #include <iostream> #include <vector> using namespace std; vector<vector<int> > vet; vector<vector<int> > pos; int N, L; int solve(int pos = 0) { int bulls = vet[pos][N-2]; int cows = vet[pos][N-1]; } int main() { ios::sync_with_stdio(false); cin >> N; ...
true
971bad0c73cdf57d86f6dc2fec9a7ecf3a06743c
C++
professor-oats/majo_raytracer
/vec3.h
UTF-8
4,240
3.65625
4
[]
no_license
#ifndef VEC3_H #define VEC3_H #include <cmath> #include <iostream> using std::sqrt; using std::fabs; // Will be using double cause low end specs class vec3 { public: vec3() : e{0,0,0} {} //creating vec3 constructor for a vector e... vec3(double e0, double e1, double e2) : e{e0, e1, e2} {} //initializing vec3...
true
6e5d73c1b0de278dc21eca18ad48862ad17c5781
C++
CDOTAD/ArrowShoot
/Classes/ArrowShoot/PauseLayer.cpp
UTF-8
3,934
2.5625
3
[]
no_license
#include"PauseLayer.h" #include"MainScene.h" int PauseLayer::step = 1; Scene* PauseLayer::CreateScene(){ auto scene = Scene::create(); auto layer = PauseLayer::create(); scene->addChild(layer); return scene; } bool PauseLayer::init(){ if (!Layer::create()){ return false; } Size visibleSi...
true
89e66c22641070eb007de3aecd34e81ad98dac0b
C++
Slava/competitiveProgramming
/more-source/cycle/loop/ave(undef2).cpp
UTF-8
352
2.859375
3
[]
no_license
#include <iostream.h> int main () { int nrMark,mark,total; float ave; //cout<<"Enter first mark [0-100] : "; //cin>>mark; total=0; nrMark=0; while (mark!=0){ cout<<"Enter next mark [1-100] or 0 to finish : "; cin>>mark; total=total+mark; nrMark++; } nrMark--; ave=(float)total/nrMark; cout<<"Average is...
true
620d511a56ae2882dfae330d6c2e00a65b120209
C++
Nauja/ue4-richtextblocktooltip-sample
/Source/Sample/SampleRichTextBlockTooltipDecorator.cpp
UTF-8
1,974
2.71875
3
[ "MIT" ]
permissive
#include "SampleRichTextBlockTooltipDecorator.h" #include "Widgets/SToolTip.h" #include "Widgets/Text/STextBlock.h" // Class charged of creating the inline tooltip class FSampleRichInlineTooltip : public FRichTextDecorator { public: FSampleRichInlineTooltip(URichTextBlock* InOwner, const FTextBlockStyle& InTextStyl...
true
5e86f9eb38673855bb2323831bbfec745519bd7e
C++
Siwwyy/MY_PROJECTS
/!C++/Sorting/sortingg/sorting/Single_Element.h
UTF-8
2,024
2.984375
3
[]
no_license
// _SINGLE_ELEMENT_H_ standard header /* * Copyright (c) by Damian Andrysiak. All rights reserved. * *** WERSJA FINALNA *** * *** Koniec: 2/12/2018 *** * Klasa ma za zadanie: * 1. */ #ifndef _SINGLE_ELEMENT_H_ #define _SINGLE_ELEMENT_H_ #pragma once /* SPACE FOR INCLUDING */ //Compiler fi...
true
7163c30a8edae1795203d5834f06bef40727198f
C++
REPOmAN2v2/Cursed-engine
/engine/Menu/Items/MenuItemList.cpp
UTF-8
1,195
2.796875
3
[ "MIT" ]
permissive
#include <utility> #include "engine/Config/Globals.hpp" #include "engine/Keys.hpp" #include "engine/Menu/Items/MenuItemList.hpp" #include "engine/window.hpp" MenuItemList::MenuItemList( const char *label, unsigned id, MenuItem::Type type, std::vector<std::string> list, std::string def): MenuItem(label, id, type),...
true
7d70a46dfca8364fa63d8697836bc9cf5d60ec2a
C++
Taka-Kazu/spline_interpolation
/src/test.cpp
UTF-8
610
2.59375
3
[ "MIT" ]
permissive
#include "spline_interpolation/b_spline.h" int main(void) { spline_interpolation::BSpline bs; std::vector<Eigen::VectorXd> points; points.push_back(Eigen::Vector2d(0, 0)); points.push_back(Eigen::Vector2d(1, 0)); points.push_back(Eigen::Vector2d(1, 1)); points.push_back(Eigen::Vector2d(0, 1)); ...
true
71e909ed60fba14dbd40066b605d62e77823a5ce
C++
caballeto/mcc
/src/TypeChecker.cc
UTF-8
33,102
2.96875
3
[]
no_license
// // Created by vladyslav on 03.02.20. // #include "ErrorReporter.h" #include "TypeChecker.h" #include "Visitor.h" namespace mcc { // Rewrite ErrorReporter to support different error reporting // Implement type checking for new types (short, int, long, void) // Implement code generation for new types // testing ro...
true
b65d02798fc5c52f366bb7e21322cae7d5981e3c
C++
Gacaar/Tradutor-Ligador-IA32
/src/pre_processador.cpp
UTF-8
10,454
2.671875
3
[]
no_license
/* Passagem zero do montador, retira espacos, tabs e quebras de linha desnecessarios. Processa as diretivas de pre-processamento EQU e IF e MACRO Recebe o arquivo <nome>.asm contendo o codigo do usuario. Gera um arquivo pre-processado <nome>.pre salvo em /out Erros detectados (somente relacionados com diretivas de p...
true
f74b42f7b2f1767b1ddd769756721d9d95244191
C++
fayeseh/G4Project_Pacman
/Pacman AI/DNA.cpp
UTF-8
2,317
3.0625
3
[]
no_license
#include <iostream> #include <vector> #include "DNA.h" #include "Network.h" #include "Neuron.h" using namespace std; DNA::DNA(vector<unsigned> &topo) { neuralNetwork = new Network(topo); } //function to get network from weights Network* DNA::weightsToNetwork(vector<double> weights, vector<unsigned>topology) { ...
true
5da9c8b9fa0ce9ba017c450bc0dc48057f884abc
C++
andres-fernandez-fuks/taller_wolfenstein3D
/server_src/game/colission_handler.cpp
UTF-8
3,587
2.546875
3
[]
no_license
#include "server/game/colission_handler.h" #include <iostream> #include <cmath> #include "server/utils/positions_calculator.h" #include <set> #define UNITS_TO_CHECK 45 #define DISTANCE_TO_DOOR 110 ColissionHandler::ColissionHandler(Map& _map) : map(_map) {} Coordinate ColissionHandler::moveToPosition(const Coordinat...
true
c3df035e547a691afdf2eb948d7690b7c024d2ae
C++
stoneageartisans/tbw
/src/properties.cpp
UTF-8
538
2.890625
3
[]
no_license
#include "properties.h" Properties::Properties() { initialize(); } Properties::~Properties() { // TODO } void Properties::clear() { for(int i = 0; i < size; i ++) { values[i] = 0; } } int Properties::getValue(int KEY) { return values[KEY]; } int Properties::getSize() { return si...
true
d495bae122bfb65e54b84593816133679a33b014
C++
Duisterhof/swarmulator
/sw/simulation/controllers/PSO/PSO.h
UTF-8
3,955
2.625
3
[]
no_license
#ifndef PSO_H #define PSO_H #include <stdio.h> #include <iostream> #include "controller.h" #include "auxiliary.h" #include "omniscient_observer.h" class laser_ray { public: int num_walls; //number of walls that the laser ray intersects with float heading; //heading in ENU frame Point start_pos; //start position...
true
9509c8f1a4cbc96e78b0e145bda6b6191e361dbb
C++
IgorL123/clab3
/Set.hpp
UTF-8
2,587
3.296875
3
[]
no_license
#ifndef SET_HPP #define SET_HPP #include <iostream> #include <vector> #include "BST.hpp" template <typename Type> class set // хыуеъ { private: BinarySearchTree<Type> item; public: set() { item = BinarySearchTree<Type>(); } void add(Type value) { if (!search(value)){ item....
true
b83a76c2b079f459e568f188d277bd07155238c7
C++
FaiScofield/learn_dsa
/dsa/core/UniPrint/UniPrint.cc
UTF-8
21,683
2.734375
3
[]
no_license
#include "UniPrint.h" /****************************************************************************************** * 基本类型 ******************************************************************************************/ //template <typename T> //void UniPrint::p(const Vector<T>& V) //{ // if (V.empty()) // return...
true
c6975ab6b1613a14eb9f505bdf3bf341cfa07c11
C++
ASquaredM/2D-Snake-Game
/src/startMenu.cpp
UTF-8
617
2.578125
3
[]
no_license
#include <iostream> #include <thread> #include "startMenu.h" #include "SDL.h" StartMenu::StartMenu(std::size_t grid_width, std::size_t grid_height) : grid_width(grid_width), grid_height(grid_height) {} std::unique_ptr<Game> StartMenu::Run(Renderer &renderer, std::size_t target_frame_duration){ ...
true
40a560c3dba893a681b9bbcc68f23443c717332d
C++
ThomasCorcoral/Smart-Pointers
/testPointers.cc
UTF-8
5,181
3.046875
3
[]
no_license
#include <gtest/gtest.h> #include "Shared.h" #include "Weak.h" #include "Unique.h" namespace{ struct test_vec{ int x; int y; }; } TEST(UniqueTests, DefaultCreation){ sp::Unique<int> unique; EXPECT_FALSE(unique.exists()); } TEST(UniqueTests, CreationWithValue){ sp::Unique<int> unique(new int(42...
true
323dc9b2a2dce4886d48614f9797202abf6228aa
C++
deeepeshthakur/CodeFiles
/HackerRank/Strings/DnaModified.cpp
UTF-8
2,934
2.921875
3
[]
no_license
#include <string> #include <cstdio> #include <vector> #include <iostream> #include <climits> using namespace std; int main(){ int n; cin >> n; vector<string> raw_genes(n); for(int genes_i = 0; genes_i < n; genes_i++){ cin >> raw_genes[genes_i]; } vector<int> raw_health(n); for(int h...
true
013f6cfd37b3410d93f331b6774644a1ff23693f
C++
cloudsangwon/programmers
/백준/2493_탑.cpp
UTF-8
562
2.546875
3
[]
no_license
#include<iostream> #include<stack> #include<vector> #include<string> #include<algorithm> #include<cstring> #include<queue> #include<set> #include<cmath> using namespace std; int val; stack<pair<int, int>> st; int main(void) { cin.tie(0); ios_base::sync_with_stdio(false); int N; cin >> N; for (int i = 1; i <= N; i+...
true
9ac9d05e2955ac72e607df1a6422fc63be92f08c
C++
better-712/Compilers-project
/spl_project2/information.hpp
UTF-8
861
2.609375
3
[]
no_license
// // Created by 10578 on 2019/11/17. // #ifndef __INFORMATION_HPP__ #define __INFORMATION_HPP__ namespace SPL { /* Forward Declaration */ class Type; class Scan_Info { public: std::string lexeme; int line_no; Scan_Info(std::string lexeme, int line) : lexeme{lexeme}, line_no{...
true
0fc780427fae5fe539b5312fd89638cdc4409b74
C++
sency90/allCode
/jongmanbook/divide-edges.cc
UTF-8
1,115
2.75
3
[]
no_license
#include <cstdio> #include <vector> #include <string> #define TREE 0 #define FORD 1 #define BACK 2 #define CROSS 3 using namespace std; typedef pair<int,int> pii; const int inf = 0x3f3f3f3f; vector<pii> ed[4]; vector<int> v[7], discov(7); bool fin[7]; string s[4]={"Tree Edges", "Forward Edges", "Back Edges", "Cross Edg...
true
4223887d042310fa944d54d92b978744ff6c7892
C++
1998factorial/leetcode
/weekly contest/contest115/prisonsByDays.cpp
UTF-8
509
2.671875
3
[]
no_license
class Solution { public: vector<int> prisonAfterNDays(vector<int>& cells, int N) { vector<int> ans; ans = cells; int mod = ((N-1) % 14) + 1; for(int i = 0; i < mod; i++){ for(int j = 0; j < 8; j++){ if(j == 0 || j == 7)ans[j] = 0; else{ ...
true
5fc54f0b03c6f861ad9d7d03926fb9df371bd067
C++
Svxy/The-Simpsons-Hit-and-Run
/game/code/input/RealController.h
UTF-8
4,555
2.703125
3
[]
no_license
/****************************************************************************** File: RealController.h Desc: Interface for the RealController class. - RealController essentially is a physical controller class. - a wrapper around IRadController. Date: May...
true
33d0edee86a0c1e42eee9ab090a0c783c0011d1a
C++
zhouhuahui/OSExperiment
/1_1.cpp
UTF-8
1,761
3.234375
3
[]
no_license
/*基于fork()系统调用,实现两个生产者和两个消费者的程序 */ #include "sys/types.h" #include "sys/file.h" #include "sys/wait.h" #include "unistd.h" #include "stdio.h" #include "string.h" #include "stdlib.h" using namespace std; char r_buf[4]; /*读缓冲*/ char w_buf[4]; /*写缓冲*/ int pipe_fd[2]; /*pipe_fd[0]是读,pipe_fd[1]是写*/ pid_t pid1, pid2, pid3, ...
true
4c7bfc8d99c076c5105cbd7778a26f30d2a5203f
C++
WOWO5/Code_Wearhouse
/Experiment/6/1.cpp
UTF-8
247
3.125
3
[]
no_license
#include <iostream> using namespace std; int main() { int a[10] = { 0,1,2,3,4,5,6,7,8,9 }; int *p = &a[0], *q = &a[9]; cout << *p << ' '; cout << *(++p) << endl; cout << *q << ' '; cout << *(--q) << endl; cout << q - p << endl; return 0; }
true
f1ba77807c242fa06aff3f2a5a807e1f05279178
C++
fusion809/CSC2402_Revision
/ODE.h
UTF-8
14,337
3.390625
3
[]
no_license
// Used to write to file #include <fstream> // Required for system call later #include <stdio.h> #include <stdlib.h> #include <sstream> #include <vecOps.h> #include <input.h> // Load required namespace using namespace std; /** * Solution object class. */ class solClass { public: // Simplest constructor ...
true
77066e211ed9b53e4ee7ae16a544b228dd749499
C++
nya3jp/icfpc2015
/simulator/game.h
UTF-8
5,747
2.71875
3
[]
no_license
#ifndef GAME_H_ #define GAME_H_ #include <iostream> #include <vector> #include <glog/logging.h> #include "board.h" #include "common.h" #include "unit.h" #include "rand_generator.h" struct Bound { int top, bottom, left, right; }; class GameData { public: GameData(); int id() const { return id_; } const std...
true
8b42e8fa4f84ab8c382dacc0035c7e5697e96990
C++
jer22/OI
/hdu/bestcoder64div1/B/b.cpp
UTF-8
951
2.625
3
[]
no_license
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <vector> using namespace std; int T; long long n; long long t[60]; void init() { t[1] = 1; int id = 1; long long j = 2; while (j < 10000000000000000ll) { j <<= 1; id++; t[id] = (t[id - 1] << 1) + (j >> 1); } } int get(...
true
9af866a5253716bca9a12c2870df4e872e7f383d
C++
mikolalysenko/Ludum-Dare-21
/src/menu.cc
UTF-8
2,393
2.875
3
[]
no_license
#include "menu.h" #include "text.h" #include "sound.h" #include <GL/glfw.h> Menu::Menu(const char* t) { title = t; } void Menu::set_esc_option(int i) { escoption = i; } void Menu::activate_esc_option() { curoption = escoption; select_option(); } void Menu::next_option() { curoption++; if(curoption >= optio...
true
884c8ab97ebcbbb681fe1ed7a98c1c4912d4dfb3
C++
justkrismanohar/TA_Tools
/COMP2603Marker/comp1602-copiers/Lauryn_Micoo_213949_assignsubmission_file_.cpp
UTF-8
3,766
2.8125
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; bool isPerfectNum(int n){ int i, sum=0; for(i=1;i<n;i=i+1){ if(n%i==0) sum=sum+i; } if(sum==n) return true; else return false; } bool isPrime(int n){ int i; for(i=2;i<=n/2;i=i=i+1){ if(n%i==0) return false; } return true; } bool isPerfectSq(i...
true
a8675b82fb78f8621aa4249715d752792aa39c0d
C++
RedRyanD/Shapes
/inc/Shape.h
UTF-8
608
2.96875
3
[]
no_license
#ifndef SHAPE_H #define SHAPE_H class Shape { protected: //acess granted to chidren double Height; double Width; private: //no access public: //access to everyone static int NumOfShapes; //static makes value the same for all instances Shape(double lenght); Shape(double height, double width); ...
true
cb33cc067fb9e825d6cc03e2aa6368ea652c9079
C++
aryan619348/DataStructures
/stacks_infix_postfix/evaluate_postfix.cpp
UTF-8
2,956
3.734375
4
[]
no_license
#include <iostream> #include <stack> #include <math.h> #include "convert_prefix.h" #define MAX 10 using namespace std; string question(string detect); int num_variables_postfix(string postfix); float compute_postfix(string postfix, float variable_values[]); float calc(float top, float below_top, char op); int main() { ...
true
3687a23b481a77fd96bb13abda47bd05b371bf23
C++
algoriddle/cp
/uva/11727.cc
UTF-8
423
3.078125
3
[ "MIT" ]
permissive
#include <iostream> #include <utility> using namespace std; int main() { ios::sync_with_stdio(false); int t; cin >> t; for (int i = 1; i <= t; i++) { int a, b, c; cin >> a >> b >> c; if (a > b) { swap(a, b); } cout << "Case " << i << ": "; if (c < a) { cout << a; } else...
true
7df4ff57fdc8afce620910869d5c27c64bba1581
C++
atafoa/oopSamples
/Homework 7/bonus_1/aaa2575_Extendable_Arm.h
UTF-8
466
2.71875
3
[]
no_license
#ifndef EXTENDABLE_ARM_H #define EXTENDABLE_ARM_H #include "aaa2575_Arm_Robot.h" using namespace std; class Extendable_Arm : public virtual Arm_Robot { public: Extendable_Arm(int mn, string n, int bl, int l, int wl, int el, robotType t) : extend_length(el), is_extended(false), Robot(mn, n, bl, t), Arm_Robot(mn, n...
true
67b42838314d0a5a4fa4680605caff2de11f64f7
C++
hennesseyr14/EECS-183
/Project 1/Project 1/cupcakes.cpp
UTF-8
6,499
3.703125
4
[]
no_license
/** * cupcakes.cpp * * Ryan Hennessey * rjhenn * * EECS 183: Project 1 * Fall 2017 * * Calculates the number of batches of cupcakes, ingredient amounts, and cost. */ #include <iostream> #include <cmath> #include <string> using namespace std; /** * Pluralizes a word if needed. * * Requires: singular is t...
true
9b2615d0a35d345155e3524f9d16d4cf895212b5
C++
AdityaAgarwal436/daa-lab
/Week-5/Ques-1/counting_sort.cpp
UTF-8
675
2.546875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int t,n; cin>>t; while(t--) { cin>>n; char a[n]; int freq[26]={0}; for(int i=0;i<n;i++) { cin>>a[i]; } for(int i=0;i<n;i++) { freq[a[i]-'a...
true
307d4edc23dbad5f56f03477ca6cff0dc45b980e
C++
arpawar/RayTracer
/src/RayTracer.h
UTF-8
2,128
3.40625
3
[ "BSD-3-Clause" ]
permissive
/* This code performs point membership of 3D structured grid points that embed the geometry. For the 3D structured grid we perform test to check which grid points lie inside/outside the geometry. For each point in the grid a ray starts from the grid point and in the x-direction to check for intersection with the geomet...
true
187e4a08af0eb0ce46d6a19d692652e49aa5af2f
C++
dianatalpos/Object-Oriented-Programming
/Examen/Model.cpp
UTF-8
824
2.546875
3
[]
no_license
#include "Model.h" #include <QBrush> Model::Model(Repository& repo) : repo{repo} { } void Model::notify() { emit layoutChanged(); } QVariant Model::data(const QModelIndex & index, int role) const { int row = index.row(); int column = index.column(); if (role == Qt::DisplayRole) { if (c...
true
a34f83cbfd8e2c4c73256df5657e43b001d9534c
C++
ammyblabla/practicumProject
/piezo/piezo.ino
UTF-8
447
2.734375
3
[]
no_license
void setup() { pinMode(PIN_PC3, INPUT); pinMode(PIN_PC4, INPUT); Serial.begin(9600*2); } void loop() { printf("accelero: "); Serial.println(accel()); printf("piezo: "); Serial.println(piezo()); } int accel() { return analogRead(PIN_PC3); } float piezo() { int piezoADC = analogRead(PIN_PC4); return ...
true
11f83747f6a369f371aa5139b0c1b99853f34a51
C++
nocro/plot
/global/hist.hpp
UTF-8
811
2.53125
3
[]
no_license
#pragma once #include "settings.hpp" #include <time.h> class Hist { public: Hist(std::vector<std::vector<double>> datas, std::vector<std::string> labels, std::vector<std::string> clusters = std::vector<std::string>()); // Hist(std::vector<int> datas); // Hist(std::vector<double> datas, std::vector<std::...
true
ad481d191f297410ce03739ac25d3f5cea4161c6
C++
midiway/Shared-WTL
/CoreEngine/GUI/Manager.h
UTF-8
2,809
2.546875
3
[]
no_license
#pragma once #include "Worker.h" #include "Adapter.h" #include "EngineController.h" // Manager base - no adapter class CManager : public CWorker { protected: CManager(); bool PrinterFilter(Log::LogLine&); // Interface protected: // static ones - these checks can be made at ANY place static void ASSERT_ThreadUI...
true
a27137d6f3fa343b556bec71e0b0fa9f03b6199e
C++
CS6/myArduino
/IP_W5100/IP_W5100.ino
UTF-8
2,671
2.953125
3
[]
no_license
/* OpenJumper WebServer Example 建立一個顯示傳感器信息的Arduino服務器 [url= http://www.openjumper.com/ ] http://www.openjumper.com/ [/url] [url= http://x.openjumper.com/ethernet/ ] http://x.openjumper.com/ethernet/[/url] */ #include <SPI.h> #include <Ethernet.h> // 設定MAC地址、IP地址 // IP地址需要參考你的本地網絡設置 byte mac[] = { 0xDE, 0xAD, 0xB...
true
d776a8d53402a2b2ea9843703e02f123e96e0da9
C++
orh92/TextEditorAdvancedCPP
/Document.cpp
UTF-8
3,981
3.328125
3
[]
no_license
#include "Document.h" #include <iostream> using namespace std; Document::Document() { this->documentLines = vector<string>(); this->currentLineIndex = 0; } Document::~Document() {} void Document::printLineByNum(int num) { if (!documentLines.empty()) { cout << num << "\t" << documentLines.at(n...
true
1af2454e695f6b11c2021a6dd8474bd9769792b6
C++
lihao814386741/TeamWork
/LeetCode/Liang/260SingleNumberIII.cpp
UTF-8
591
2.9375
3
[]
no_license
class Solution { public: vector<int> singleNumber(vector<int>& nums) { assert(nums.size() >= 2); int aXORb = 0; // Use 0 is fine. for (int i = 0; i < nums.size(); ++i) { aXORb ^= nums.at(i); } int lastDiff = (aXORb & (aXORb - 1)) ^ aXORb; int first = 0, se...
true
079e016e928d9ed036d0995206a8627914b81446
C++
Myway3D/Myway3D
/ThirdParty/EMotionFX/Source/MeshDeformer.h
UTF-8
3,368
2.75
3
[]
no_license
/* * EMotion FX 2 - Character Animation System * Copyright (c) 2001-2004 Mystic Game Development - http://www.mysticgd.com * All Rights Reserved. */ #ifndef __MESHDEFORMER_H #define __MESHDEFORMER_H // include the Core system #include "../Core/Source/MCore.h" #include "MemoryCategories.h" namespac...
true
99bef536169d19f7bc0e80cb701d5f68cbdfee69
C++
lucas54neves/gcc224-ialg
/Lista de desafios/Questão 01/exercicio1.cpp
UTF-8
481
3.40625
3
[]
no_license
#include <iostream> using namespace std; int main () { int largura, altura, xMouse, yMouse; float xConvertido, yConvertido, larguraCentro, alturaCentro; cin >> largura; cin >> altura; cin >> xMouse; cin >> yMouse; larguraCentro = largura / 2.0; alturaCentro = altura / 2.0; xConvertido = (xMouse - larguraCe...
true
0d92dc4ae125f8c3f3ef4b9e2aac8b5989976b14
C++
Malpp/zombie_game
/zombie/collidable.h
UTF-8
894
2.828125
3
[]
no_license
#pragma once #include "stdafx.h" #include "drawable.h" class Collidable : public Drawable { public: Collidable(sf::Vector2f& pos, float angle, sf::Texture* texture, float collide_size_radius) : Drawable(pos, angle, texture) { collide_radius = collide_size_radius; debug_circle_collision = sf::CircleShape( colli...
true
870b062c5cd187fc8bbb9721bed4f18e5fc8819d
C++
CodeSquadPie/Lost-castle
/Lost castle/Lost castle/map.cpp
UTF-8
4,656
2.96875
3
[]
no_license
#include "map.h" map::map() { std::cout << "Created map object." << std::endl; } map::~map() { std::cout << "Destroyed map object." << std::endl; } std::string map::file_location_concatination(char* file_dirrectory, const char *file_name_char) { std::string file_location_string = file_dirrectory; std...
true
afcc59ec1447689a17eb767ed23f5372d573494c
C++
muuuuuua/leetcode
/hIndexII.cpp
UTF-8
830
3.734375
4
[]
no_license
/** * 275. H-Index II */ #include "inc/common.h" int binaryFind(vector<int>& citations, int l, int r) { if(l == r) { if(citations[l] >= citations.size()-l) return l; else return citations.size(); } int mid = (l+r)/2; if(citations[mid] >= citations.size()-mid) {...
true
6f5c8cb3f8b756d5ec590f29aa194adaac703f94
C++
wlddxxmmsg/hello-world
/超级楼梯.cpp
UTF-8
222
2.578125
3
[]
no_license
#include <stdio.h> int d[41]; int main() { int a,n; d[2] = 1; d[3] = 2; for(int i = 4 ; i <= 40 ; i++) d[i] += d[i-1]+d[i-2]; scanf("%d",&a); while(a--) { scanf("%d",&n); printf("%d\n",d[n]); } }
true
2fd69d74011d9f95a2dd2e6f7eb5228852fcf334
C++
turtle11311/Codes
/Accepted/NPSC/b222. A. 犯人的編號.cpp
UTF-8
477
2.859375
3
[]
no_license
#include <iostream> using namespace std; int main () { char a1, a2, a3, a4, g1, g2, g3, g4; int n, A, B; while (cin >> a1 >> a2 >> a3 >> a4) { cin >> n; while (n--) { cin >> g1 >> g2 >> g3 >> g4; A = (a1==g1) + (a2==g2) + (a3==g3) + (a4==g4); B = (a1==g2) + (a1==g3) + (a1==g4) + (a2=...
true
274456f402a4b982deb21ca3eeeac5f62ee2cbad
C++
ITblueboy/C-
/String2.h
UTF-8
667
2.953125
3
[]
no_license
#pragma once #include<unistd.h> #include<string.h> class String { public: String(const char* str) :_str(new char[strlen(str)+1]) { strcpy(_str,str); } String(const String& s) { _str=new char[strlen(s._str)+1]; strcpy(_str,s._str); } String& operator=(const String&...
true
74f44fbf7d393da5458bf5402693da5d34f1517e
C++
liuyaqiu/LeetCode-Solution
/304-Range-Sum-Query-2D-Immutable.cpp
UTF-8
2,028
3.875
4
[]
no_license
#include <iostream> #include <vector> using namespace std; /* * Range Sum Query 2D - Immutable * Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2). * * Range Sum Query 2D * The above rectangle (with the re...
true
a530ce4c26e2f17683a815c53a6245471b0b14a5
C++
GDMiao/Class8
/Class8Online/CNetwork/Protocols/UserEnter.h
UTF-8
1,542
2.546875
3
[ "MIT" ]
permissive
#ifndef __GNET_USERENTER_H #define __GNET_USERENTER_H #include "rpcdefs.h" #include "state.hxx" #include "UserInfo.h" namespace GNET { class UserEnter : public GNET::Protocol { public: enum { PROTOCOL_TYPE = 1001 }; int64_t receiver; int64_t cid; int64_t classid; int device; char netisp; User...
true
b71eab15ba3c261782865a651e8a177b3b82fd01
C++
ooici/port_agent
/src/network/tcp_comm_listener.cxx
UTF-8
14,201
2.59375
3
[]
no_license
/******************************************************************************* * Class: TcpCommListener * Filename: tcp_comm_listener.cxx * Author: Bill French (wfrench@ucsd.edu) * License: Apache 2.0 * * Manage a TCP listener. * * Usage: * * TCPCommListener ts; * * // Statically assign the port. If not ...
true
648217af0240111cecc981ce8e2abbf5ddc32495
C++
Shibabrat/Tutorials
/10-days-statistics/least-sq-reg.cpp
UTF-8
1,096
2.8125
3
[]
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <iomanip> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n = 5; int tempMath, tempStat; double b, a; // coefficients for linear ...
true
19000a76b0f1e4277bc31a4b67bc2446bfa0d658
C++
Progsapien/CourseWork
/data/vegetable.cpp
UTF-8
683
2.921875
3
[]
no_license
#include "data/vegetable.h" Vegetable::Vegetable() { this->_weight = 0; this->_calories = 0; this->_title = ""; } // get double Vegetable::weight() { return this->_weight; } double Vegetable::calories() { return this->_calories; } QString Vegetable::title() { return this...
true
5e4bd8781083fee73b2c175408e5fd5194a15e0c
C++
gregkrsak/unlib
/unlib/scaling.hpp
UTF-8
8,428
2.90625
3
[ "BSL-1.0" ]
permissive
#ifndef UNLIB_SCALING_HPP #define UNLIB_SCALING_HPP /* * scaling.hpp * * Copyright sbi http://stackoverflow.com/users/140719 * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * */ #include <cstdint> ...
true
a87c4ef76d08f1351f2af200f332e4f3aeab0d33
C++
ferasalsabaa/programmiersprachen-aufgabenblatt-3
/source/circle.cpp
UTF-8
1,814
3.203125
3
[ "MIT" ]
permissive
#define CATCH_CONFIG_RUNNER #include "circle.hpp" #include "vec2.hpp" #include <cmath> #include <iostream> Circle::Circle() : radius_{0.0f} , center_{0.0f,0.0f} , name_{"circle"} , color_circle_{0.0f,0.0f,0.0f} {} Circle::Circle(float radius , Vec2 const& center , Color const& color_circle) : radius_{radius}, center...
true
55a3f14e3891f3876a87f9829dbcdd3f78072ef8
C++
mariored22/SEGroupProject
/RandomTests/obstack.cpp
UTF-8
1,923
3.4375
3
[]
no_license
#include<vector> #include<iostream> using namespace std; class IntStack{ public: vector<int> stack; int upper; int SIZE=16; int minimumsize =1<<(SIZE-1); IntStack(){ IntStack(SIZE); } IntStack(int SIZE){ stack.reserve(SIZE); clear(); } int getupper() { return upper; } int setupper(int upper) ...
true
36cae729d6e8a8935378afb7af03980f4c7e66a5
C++
AnujKumarsla/C-
/Cpp/C++/Sort_Algo/04MergeSortTest.cpp
UTF-8
1,642
3.578125
4
[]
no_license
#include<iostream> #include<conio.h> using namespace std; void swap(int *a, int *b){ int temp=*a; *a=*b; *b=temp; } void merge(int arr[], int left[], int right[], int start, int Lend, int Rend){ int Aindex=0, Lindex=0, Rindex=0; while(Lindex <= Lend && Rindex <= Rend){ if(left[Lindex]<rig...
true
dc5a4df60e2aadf4bae85de9844b8bd12a66c42e
C++
Soukhya7834/Coding-LeetCode-
/824. Goat Latin.cpp
UTF-8
829
3.046875
3
[]
no_license
class Solution { public: string toGoatLatin(string S) { unordered_set<char> vowel({'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'}); istringstream iss(S); string res, w; int i=0, j; while(iss >> w){ res += ' ' + ( vowel.count(w[0]) == ...
true
2b1514213de7f1017fc6f8a6256d76bc995cbc40
C++
loreStefani/ArkanoidClone
/Engine/Mesh.h
UTF-8
5,169
3.171875
3
[ "MIT" ]
permissive
#pragma once #include <vector> #include <utility> #include "MathCommon.h" #include <cassert> namespace ArkanoidEngine { class Mesh { public: //ctors explicit Mesh() = default; //dtor ~Mesh() = default; //copy Mesh(const Mesh&) = default; Mesh& operator=(const Mesh&) = default; //move Mesh(Mesh&...
true
f08030dd0f25165be04d1d00e751f46f9aa6de9b
C++
respu/caney
/components/std/include/caney/std/enum_helper.hpp
UTF-8
1,724
3.703125
4
[ "MIT" ]
permissive
#pragma once #include <type_traits> namespace caney { inline namespace stdv1 { /* * convert enum value to underlying integer type * * unless given in enum declaration the underlying type is implementation * defined */ template<typename Enum> constexpr typename std::underlying_type<Enum>::type f...
true
9225ac75c3aaaa9dd534c2a1c8d9e14635a521ff
C++
kejdikopaci/CardGame
/src/SpellCard.hpp
UTF-8
1,889
2.90625
3
[]
no_license
//------------------------------------------------------------------------------ // SpellCard.hpp //------------------------------------------------------------------------------ #ifndef SPELLCARD_HPP #define SPELLCARD_HPP #include "Card.hpp" #include "string" //-------------------------------------------------------...
true
229b5a72b8814cdf1e162787f25bebf04d434923
C++
WonseokLee/danhobak
/GAssn2/GAssn1/GameObject.cpp
UTF-8
2,498
2.84375
3
[ "Apache-2.0" ]
permissive
#include "GameObject.h" #include <GL/freeglut.h> GameObject::GameObject( GameObject* parent, Vector2& position, double rotation, Vector2& scale ) : parent( parent ), position( position ), rotation( rotation ), scale( scale ) { } GameObject::~GameObject() { for each( auto child in children ) { delete...
true
df56e7d7c0ed7c42f3c4b237a00598b73baf6ee2
C++
SarthakBhatia2018/topicwisegfg
/Arrays/arr_pair.cpp
UTF-8
412
3.109375
3
[]
no_license
#include <iostream> #include <map> using namespace std; int main() { int arr[] = {1, 2, 3, 4, 5, 6, 7}; int n = sizeof(arr) / sizeof(arr[0]); int k = 13; map<int, int> m; for (int i = 0; i < n; ++i) { if (m.find(k - arr[i]) != m.end()) { cout << "Found"; ...
true
508b4444368aed91fff271b30d76b7fde3260aaa
C++
SakritiDixit/ProgrammingHub
/nth_fibonacci_number.cpp
UTF-8
238
3.03125
3
[ "MIT" ]
permissive
#include<iostream> using namespace std; int fib(int n) { int i; f[0] = 0; f[1] = 1; for (i = 2; i <= n; i++) { f[i] = f[i-1] + f[i-2]; } return f[n]; } int main () { int n; cin>>n; cout<< fib(n)<<endl; return 0; }
true
970d90b491904445545618553188d4e254c4db53
C++
minaminao/algorithms
/DataStructures/SparseTable.cpp
UTF-8
699
2.640625
3
[]
no_license
// Verified: https://codeforces.com/contest/689/submission/62583075 struct SparseTable { int n; int lg_n; vector<int> a; vector<vector<int>> mini; vector<int> lg; // O(n log n) SparseTable(const vector<int> &a) :a(a), n(a.size()), lg(n + 1), lg_n(log2(n) + 1), mini(lg_n, vector<int>(n)) { for (int i = 2; i <= ...
true
3c61df0771a57ecedbd045d35678ac35e260b3a9
C++
ajalsingh/PFMS-A2020
/tutorials/week07/examples/ex03/radar.cpp
UTF-8
1,681
3.203125
3
[]
no_license
#include <iostream> #include <stdlib.h> #include "radar.h" #include <vector> #include <chrono> #include <thread> Radar::Radar(): scanningTime_(100),ready_(false){ //Generate first random value std::random_device rd; generator_= new std::mt19937(rd()); value_ = new std::uniform_real_distribution<double>(0.1...
true
8751835a421d3c0a51ae922433e6396044546cb5
C++
Jinxiaohai/DataStructureAndAlgorithm
/old/hanoiUseRecursive/towersofhanoi.cpp
UTF-8
335
2.6875
3
[]
no_license
#include <iostream> #include "functionhead.h" long int totalStep = 0; void towersOfHanoi(int n, int x, int y, int z) { if (n > 0) { towersOfHanoi(n - 1, x, z, y); std::cout << "Move top disk from tower " << x << " to top of tower" << y << std::endl; ++totalStep; towersOfHanoi(n - 1, z...
true
1855f6fc5912d483f53bc8ad5ae60bd19c283305
C++
smiegrin/Splunk
/MainMenu.cpp
UTF-8
2,000
2.546875
3
[]
no_license
#include "MainMenu.h" #include "Button.h" #include "ResourceManager.h" #include "GameScreen.h" #include <math.h> MainMenu::MainMenu() { playButton = Button(325,400,150,50,sf::Color(97,56,11),"New"); loadButton = Button(325,280,150,50,sf::Color(97,56,11),"Load"); title = sf::Text(); title.setString("Spl...
true
b78ef82fd94474f7a55b257b30ee5b58ade3321b
C++
anas-01/PointersAndAddress
/PointersAndAddress/main.cpp
UTF-8
1,243
3.71875
4
[]
no_license
#include<iostream> #include<string> using namespace std; int main() { int givenInt = 32; float givenFloat = 64.212; double givenDouble = 4.76545; string givenString = "Hey look at me! I know pointers!"; char givenChar = '*'; int* pointerToInt = &givenInt; float* pointerToFloat = &givenFloat; double* pointer...
true
f9215502e67739c1250eb77b2b3054cdca231b95
C++
Masters-Akt/CS_codes
/DSA/patterns/p4.cpp
UTF-8
352
2.515625
3
[]
no_license
//Halp Pyramid after 180 degrees rotation /* * * * * * * * * * * * * * * * */ #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(j<=n-i) cout<<" "; else cout<<"* "; } c...
true
85df5bc028d9190813eb29c1d251ef88571d84df
C++
antoinechalifour/Cpp_TP2
/Point.h
ISO-8859-2
576
3.3125
3
[]
no_license
#ifndef POINT_H_INCLUDED #define POINT_H_INCLUDED class Point{ private : double x; double y; double z; char* label; public: //Constructeurs Point(); Point(double x, double y, double z, char* label); Point(const Point& p); ~Point(); //Operateurs Point& operator=(con...
true
3745ef2f720a5844a18481414bd4148651caff09
C++
ankurshaswat/Starlings
/boids_examples/flocking/flocking/src/engineUtils.cpp
UTF-8
2,767
2.734375
3
[ "MIT" ]
permissive
/******************************************************************** * @file engineUtils.cpp * @author Erik Larsson * @version 1.0 * @section DESCRIPTION * *********************************************************************/ #include "engineUtils.h" using namespace std; GLuint loadShader(const char* vertexFile, co...
true
81de0b8e4fb6dc846353a44943c1dd4b2db0a7ea
C++
xmil9/towers
/deps/spiel/lap_clock.h
UTF-8
1,405
3.09375
3
[ "MIT" ]
permissive
// // Nov-2020, Michael Lindner // MIT license // #pragma once #include <chrono> namespace sp { /////////////////// // Clock to measure repeated events. template <typename T, typename Unit = std::chrono::milliseconds> class LapClock { public: using TimePoint = std::chrono::steady_clock::time_point; using Unit...
true
3ec01c1a8364d9e885ad3fe8c1cdea6b6759c3d9
C++
RolandQuest/CppGLEngine
/includes/core/camera/camera.h
UTF-8
663
2.65625
3
[]
no_license
#pragma once #include "glm/glm.hpp" namespace fml { class camera { private: glm::vec3 _position; glm::vec3 _direction; glm::vec3 _up; glm::vec3 _right; public: camera() = default; camera( const glm::vec3& position, const glm::vec3& direction ); virtual ~camera() = default; ...
true
6a36458bea10b858ad5e073570cc00d00dd5602e
C++
machavesperez/-articleStoreManagement
/Chaves_Perez_MiguelAngel/P1/fecha.hpp
UTF-8
1,433
2.875
3
[]
no_license
#ifndef Fecha_H_ #define Fecha_H_ #include <iostream> #include <cstdlib> #include <cstdio> #include <ctime> class Fecha { public: class Invalida { public: Invalida(const char* error): error_(error){} const char* por_que()const {return error_;} private: const char* error_; }; explicit Fecha(int dia=0, in...
true
10db88299f446f5572ccfe0d16ec4955b22533d4
C++
adi-g15/DiskArray
/example/main.cpp
UTF-8
1,669
3.125
3
[ "Unlicense" ]
permissive
#define DISKARRAY_DEBUG #define DISKARRAY_KEEP_FILES #define DISKARRAY_LOG_SAVES // "Above defines not needed; Include order doesn;t matter" #include <DiskArray/diskarray.hpp> #include "bigobject.pb.h" using namespace diskarray; int main() { DiskArray<bigobject> arr; for (auto i = 0; i < 3; i++) { ...
true
9e76037f44e3c178d41225299eede9c62a9e8973
C++
nkryuchkov/matrix_simple
/matrix.h
UTF-8
5,125
2.96875
3
[]
no_license
#ifndef MATRIX_H #define MATRIX_H #include <fstream> #include <sstream> #include <string> #include <iomanip> #include <cmath> #include <cstdlib> #define OUT_WIDTH 1 using namespace std; template <class T, int M, int N = M> class Matrix { public: Matrix() { p_ = new T*[M]; for (int i = 0; i < M; i++) { p...
true
0a916e96bfa0c711a9f3124fd3a6943758056215
C++
ParadoxGameConverters/CK2ToEU4
/CK2ToEU4/Source/Mappers/RegionMapper/Area.h
UTF-8
646
2.71875
3
[ "MIT" ]
permissive
#ifndef EU4_AREA_H #define EU4_AREA_H #include "Parser.h" #include <map> #include <memory> namespace EU4 { class Province; } namespace mappers { class Area: commonItems::parser { public: explicit Area(std::istream& theStream); [[nodiscard]] const auto& getProvinces() const { return provinces; } [[nodiscard]] bo...
true
561b0e6589f74435ebb0a60ccfa866388013325d
C++
gwgrisk/msc-hull-snowglobe
/Snowglobe/Snowglobe/InputMgr.h
UTF-8
4,313
2.6875
3
[]
no_license
#pragma once #include <AntiMatter\precision.h> #include <AntiMatter\Singleton.h> class KeyData { public: enum KeyState { KeyUp, KeyDown }; private: KeyState m_Up; KeyState m_Down; KeyState m_Forward; KeyState m_Back; KeyState m_Left; KeyState m_Right; KeyState m_Use; KeyState m_Sp...
true
6eb7b54a8486013c3ac55b4206a8f59f45fdb614
C++
zxch3n/Leetcode
/93/main.cpp
UTF-8
1,373
2.953125
3
[]
no_license
class Solution { private: bool isValid(string s){ if (s.size() == 0 || (s[0] == '0' && s.size() != 1)) return false; if (s.size() < 3) return true; if (s[0] < '2') return true; if (s[0] > '2') return false; if ...
true
6df01b1d24c9dabe2fe90b8b27f57d82ed8ee07f
C++
correderadiego/robotBipedFirmwareTest
/test/plenLibrary/logic/controller/parser/ParserControllerControllerCommandTest.cpp
UTF-8
8,232
2.640625
3
[]
no_license
/* * ParserControllerControllerCommandTest.h * * Created on: 22 abr. 2020 * Author: Diego */ #ifndef TEST_PLENLIBRARY_LOGIC_CONTROLLER_PARSER_PARSERCONTROLLERCONTROLLERCOMMANDTEST_CPP_ #define TEST_PLENLIBRARY_LOGIC_CONTROLLER_PARSER_PARSERCONTROLLERCONTROLLERCOMMANDTEST_CPP_ #include "gtest/gtest.h" #incl...
true
a9e62b75750026a1b43bec86d3f2ee7c438f326e
C++
GuelorEmanuel/Team-Tech-Support
/D4/cupid/Storage/project.h
UTF-8
840
2.734375
3
[]
no_license
#ifndef PROJECT_H #define PROJECT_H #include "storage.h" #include <QString> #include <vector> class Student; class Project { public: virtual ~Project()=0; virtual int getId() const = 0; virtual void setId(int value) = 0; virtual int getMinTeamSize() const = 0; virtual void setMinTeamSize(int value...
true
db0b887f5f2c904121d9d68e16144bd88ec1951d
C++
elishatofunmi/miscellaneous
/c++ programs/recursion.cpp
UTF-8
299
3.65625
4
[]
no_license
#include <iostream> #include <cmath> using namespace std; int factorial_final(int x){ if (x==1){ return 1; }else{ return x*factorial_final(x-1); } } int main() { int solution; solution = factorial_final(5); cout << "Answer of this is: "<<solution<<endl; }
true
610b9b66d3cb644058d671afbeef2b3fa2b3c4f4
C++
neuralfirings/flashbutton
/flash_arduino/flash_arduino.ino
UTF-8
2,217
2.8125
3
[]
no_license
/* * Simple HTTP get webclient test */ #include <ESP8266WiFi.h> // Your Settings const char* ssids[] = {"Superplexus", "Guest", "Nancy's iPhone"}; const char* passwords[] = {"WolfBabyDog", "", "WolfBabyDog"}; const char* host = "www.nyl.io"; const char* url = "/espbuttonpress.php"; // The program void setup() {...
true
7047d8e9c1ce20c0b158ec7732b338985257ab45
C++
cubeman99/SEAL
/src/utilities/FileUtility.cpp
UTF-8
805
3.15625
3
[ "MIT" ]
permissive
#include "FileUtility.h" bool FileUtility::OpenAndGetContents(const std::string& fileName, std::string& outContents) { // Open the file. FILE* m_file = fopen(fileName.c_str(), "r"); if (m_file == nullptr) return false; // Determine the file size. if (fseek(m_file, 0, SEEK_END) != 0) return false; long file...
true
00c0b91839aa24b6957f4566920a003b2fca2327
C++
fadal2002/Weather-Smart-Device
/SSDCourseWork17068266/weatherData.h
UTF-8
829
2.828125
3
[]
no_license
#ifndef OBSERVER_PATTERN_WEATHERDATA #define OBSERVER_PATTERN_WEATHERDATA #include <vector> #include <algorithm> #include <iostream> #include "subject.h" #include "Observer.h" class WeatherData : public Subject { private: vector<Observer *> observers; //vector that will store all the observers float temperature = ...
true
0a00d718fa2a227de082324dbbf7edfb4925a237
C++
Sujay-Shah/Eggnapped
/TetraiderEngine/Source/SpawnOnHealthZero.h
UTF-8
2,113
2.875
3
[]
no_license
/* Start Header ------------------------------------------------------- Copyright (C) 2018 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited. Author: <Moodie Ghaddar> - End Header ------------------...
true