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
ca4db0c46c08f048b3d8e3c14a01e3f765e76e17
C++
black-square/id2type-cast
/id2type_cast/detail/table_impl.hpp
UTF-8
4,935
2.609375
3
[]
no_license
#ifndef ID2TYPE_CAST_TYPE_TABLE_IMPL_HPP #define ID2TYPE_CAST_TYPE_TABLE_IMPL_HPP #include <cassert> #include "./pp_repeat.hpp" namespace i2tc { namespace detail { template<class Functor, class TypeList, class Base> class table_impl { public: typedef Functor &functor_ref; typedef typename Functo...
true
86d16197e05aa4de895b94669523508542b9f198
C++
AlexisLeveque/abstract_VM
/OpInt8.hpp
UTF-8
1,031
2.984375
3
[]
no_license
// // Created by PC on 01/07/2018. // #ifndef ABSTRACT_VM_INT8_HPP #define ABSTRACT_VM_INT8_HPP #include "IOperand.hpp" class OpInt8 : public IOperand{ public: OpInt8(std::string); OpInt8(OpInt8 const &src); OpInt8 &operator=(OpInt8 const &rhs); virtual ~OpInt8(void); virtual int getPrecision( void ) cons...
true
9f68bc0fe73220f80a6bc47074b198dbd7ebcb4a
C++
andrewchik0/T05ANIM
/src/anim/rnd/res/textures.h
UTF-8
3,485
2.765625
3
[]
no_license
/* FILE NAME : textures.h * PROGRAMMER : AV6 * LAST UPDATE : 24.07.2021. * PURPOSE : Animation project. * Animation system. * Render system. * Materials class declaration. */ #ifndef __textures_h_ #define __textures_h_ #include <fstream> #include ...
true
53cdc70ea5abcd13ec991e6fb6061e0d6ad891d0
C++
zhiltsov-max/tower-defense
/modules/Core/math.cpp
UTF-8
271
2.546875
3
[]
no_license
#include "math.h" #include <cstdlib> double rnd(double min, double max) { return min + double(std::rand()) / RAND_MAX * (max - min); } int rand(int max, int min) { if (max - min == 0) { return min; } return min + std::rand() % (max - min); }
true
1eae323a176319e1b8ebfabb668509af7fff3476
C++
julimueller/dtld_parsing
/c++/driveu_dataset/include/driveu_vehicle_data.h
UTF-8
1,549
2.84375
3
[]
no_license
#ifndef DRIVEU_DATASET_DRIVEU_VEHICLE_DATA_H_ #define DRIVEU_DATASET_DRIVEU_VEHICLE_DATA_H_ #include <jsoncpp/json/json.h> class VehicleData { private: /// velocity in meters/second double m_velocity_; /// yaw_rate in rad/s double m_yaw_rate_; /// GPS longitude double m_longitude_; /// GPS...
true
bd5e0e7d2c063e823950a0b650fd523a9810f144
C++
rohantalesara/cpp-events
/MyTimedStream.cpp
UTF-8
875
3.015625
3
[]
no_license
#include "MyTimedStream.h" #define DEFAULT_TIMER_INTERVAL 1000 MyTimedStream::MyTimedStream() : isRunning(false), millisecondsInterval(DEFAULT_TIMER_INTERVAL) { } MyTimedStream::~MyTimedStream() { } bool MyTimedStream::Start(unsigned int millisecondsInterval) { if (isRunning) { return false; } isRunning = ...
true
5a42ad9b380bbe778c9ebb7a5e5ce85e00753924
C++
yejoons2022/C
/04_printf_scanf_for.cpp
UHC
217
2.78125
3
[]
no_license
# include <stdio.h> main() { int i; int k; printf("k Էϼ. \n"); scanf ("%d", &k); for (i = 0; i < k; i++) { printf ("%d ݺ \n", i); } printf ("ݺ !!!!!"); }
true
6e5356272393ed748ed6edd4de370991d1525e9c
C++
privateos/misc
/c++/cprimer/func.cpp
UTF-8
1,490
2.96875
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <iterator> #include <algorithm> #include <list> #include <set> #include <cstdlib> #include <functional> #include <numeric> using namespace std; template <typename T> void printVector(const vector<T> &v) { typename vector<T>::const_iterator it; fo...
true
b228240d653ea35c66edc75846cc9247b8135710
C++
pateljainilanilbhai/cpp_programs
/date.cpp
UTF-8
509
3.6875
4
[]
no_license
#include<iostream> using namespace std; class date { int dd,mm,yyyy; public: getdata() { cout<<"enter date in dd mm yyyy format:"; cin>>dd>>mm>>yyyy; } putdata() { cout<<dd<<":"<<mm<<":"<<yyyy<<endl; } friend swapdates(date &a,date &b) { date t; t=...
true
b4c432c7fbbf9e1b272b6f5c11ea5f2464aa6092
C++
SethKasmann/Spirit
/spirit/gfx/inputhandler.cpp
UTF-8
1,005
2.625
3
[]
no_license
#include "inputhandler.h" #include <SDL2/SDL.h> namespace spirit { InputHandler *InputHandler::_self = nullptr; InputHandler::InputHandler() { // Add the SDL even watch. Since the function pointer has to be // a static member, _self will act as a way to refer to the input // handler object. _self = this; //...
true
a2242c44cb496c725c9b52b80b1fd48226237a7e
C++
rocksat/Quad3DR
/quad_planner/src/rendering/triangle_mesh.cpp
UTF-8
30,086
2.828125
3
[ "MIT" ]
permissive
//================================================== // triangle_mesh.cpp // // Copyright (c) 2016 Benjamin Hepp. // Author: Benjamin Hepp // Created on: Aug 20, 2016 //================================================== #include <quad_planner/rendering/triangle_mesh.h> #include <quad_planner/rendering/utilities.h> ...
true
b8f131cd18d8572298b4ce0e23a0fb3ff65eaf55
C++
shumhingping/PAT
/Advanced level/1059 Prime Factors(25).cpp
UTF-8
1,927
3.46875
3
[]
no_license
1059 Prime Factors(25 分) Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1*k1*p2^k2*⋯*pm^km. Input Specification: Each input file contains one test case which gives a positive integer N in the range of long int. Output Specification: Factor N in the f...
true
9bc6705ade3ae4ca8e0c9bb5037bddef5d4cf40f
C++
jungahshin/algorithm
/c:c++/programmers_메뉴리뉴얼.cpp
UTF-8
3,230
3.234375
3
[]
no_license
#include <string> #include <vector> #include <iostream> #include <algorithm> #include <map> using namespace std; int bits[21] = {0, }; map<string, int> kind; map<string, int> m; vector<string> v[11]; int visited[11] = {0, }; bool cmp(const pair<int, string>&a, const pair<int, string> &b){ return a.first>b.fir...
true
c5e685aad8621f1301ffffb26975b56c4d520521
C++
danfitz7/lab5
/lab5/lab5.cpp
UTF-8
2,052
3.21875
3
[]
no_license
/* CS 2302 LAB5 Daniel Fitzgerald 2/24/14 Simulating Packet Transmissions in C++ */ #include "lab5.h" //used for input and string manipulation #include <iostream> /*#include <string> #include <iomanip> #include <cctype> #include <sstream>*/ //used for data structure #include "LinkedList.h" #include "event.h" using ...
true
31aa29bb55aaf0c00425d96223c3b2ae01fedbbb
C++
polyteh/QMediaPlayerExample
/VSurface.cpp
UTF-8
751
2.703125
3
[]
no_license
// // Created by Oleksiy Grechnyev on 5/30/19. // #include <iostream> #include "VSurface.h" bool VSurface::present(const QVideoFrame &frame) { Q_UNUSED(frame); // Handle the frame and do your processing using namespace std; QVideoFrame q = frame; int h = q.height(), w = frame.width(); // cout ...
true
5cd6635eeb24094b6b218ae2d2f1bde84d0a0ff3
C++
nealwu/UVa
/volume107/10719 - Quotient Polynomial.cpp
UTF-8
1,048
2.625
3
[]
no_license
#include <iostream> #include <sstream> #include <cstdio> using namespace std; int flag; inline int readchar() { const int N = 1048576; static char buf[N]; static char *p = buf, *end = buf; if(p == end) { if((end = buf + fread(buf, 1, N, stdin)) == buf) return EOF; p = buf; } retu...
true
174238e534801364aa95f7a1fff4683a76140f97
C++
dawid97/MASM-C-Cpp-Projects
/Space Invaders/Space Invaders/Shield.cpp
UTF-8
916
3.015625
3
[]
no_license
#include "Shield.h" Shield::Shield(int hp,sf::Vector2f position,sf::Vector2f scale,std::string shieldTex) { this->hp = hp; try { this->shieldTex = std::shared_ptr<sf::Texture>(new sf::Texture); if (!this->shieldTex->loadFromFile(shieldTex)) throw LoadingError("shield texture loading error"); } catch (L...
true
20600fa94a82327ab6530393889eeb500cfed2d1
C++
pkbigmarsh/tic-tac-toe-cubed
/tictactoegame/Matrix.cpp
UTF-8
2,839
3.40625
3
[]
no_license
#include "Matrix.h" #include "Point.h" #include "MyUtils.h" Matrix::Matrix() { for(int i = 0; i < 4; i ++) for(int j = 0; j < 4; j ++) m[i][j] = 0; Matrix::setTransformation(); } Matrix::Matrix(float * r0, float * r1, float * r2, float * r3) { for(int i = 0; i < 4; i ++) { m[0][i] = r0[i]; m[1][i] = r1[i...
true
e492d38538fce8efe528d3c71dcb3d655af15f05
C++
JohanF26/cs240
/CA3jferrer4/1CA3/Driver.cpp
UTF-8
13,562
2.9375
3
[]
no_license
#include <iostream> #include <stdlib.h> #include "FBLUser.h" #include "FBLUserLL.h" #include "FBLUserNode.h" using namespace std; int main(int argc, char *argv[]){ cout << "Facebook Lite Version" << "\n---------------" << endl; FBLUserLL* userList = new FBLUserLL(); string command; //it is not possibl...
true
ab2ac36777bb2408bf90d22fb7c8a2c6b66ee1c0
C++
Marbax/programming
/HW_itstep/strings/test.cpp
UTF-8
459
2.828125
3
[]
no_license
#include <iostream> #include <locale> #include <string> using namespace std; int main() { string text="plan kuril plan tupil"; string x = "plan"; // slovo pod zamenu string y = "bleep"; // slovo zmenitel //cin >> text; size_t pos; while (pos = text.find(x) != std::string::npos) { ...
true
04397abf97af29e7dcff471fbc6359cd0790eb55
C++
jinbeomdev/daily-algorithm-problems
/[BOJ]10473/[BOJ]10473/Source.cpp
UTF-8
1,389
2.71875
3
[]
no_license
#include <cstdio> #include <cmath> #include <vector> #include <queue> #include <utility> using namespace std; typedef pair<double, int> P; const double V = 5.0; inline double GetDistance(double x1, double y1, double x2, double y2) { return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2)); } int n; double x[102]; double y[1...
true
b93112f2f3af9d8a3b2cbb0424d41898cec0bacb
C++
JohnBurchell/Learning
/C++/Books/TCPPL4/X.13/ex13.cpp
UTF-8
10,177
3.171875
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include <array> #include <queue> #include <cstdint> using namespace std; /* ------------------------------------------------------------------------------------------------------ Ex1 ------------------------...
true
91af96d0b2d134fc5b08b11c75af26e1d6a454b8
C++
jan-auer/database
/database/schema/SchemaManager.cpp
UTF-8
2,013
2.546875
3
[]
no_license
// // SchemaManager.cpp // database // // Created by Jan Michael Auer on 10/05/14. // Copyright (c) 2014 LightningSQL. All rights reserved. // #include <cstdio> #include <sstream> #include "utils/Serialize.h" #include "SchemaManager.h" namespace lsql { SchemaManager::SchemaManager(BufferManager& bufferManager)...
true
429b864f0f5e40a647d3a0ac0ef67b32c84feb64
C++
jastadj/john
/include/map.hpp
UTF-8
1,506
2.703125
3
[]
no_license
#ifndef CLASS_MAP #define CLASS_MAP #include <string> #include <vector> #ifdef NCURSES #include <ncurses.h> #else #include "curses.h" #endif #include "tools.hpp" #include "glyph.hpp" #include <tinyxml2.h> using namespace tinyxml2; // forward declaration class Item; class Actor; class Tile { public: Tile(); ...
true
799e21042b85878d2f9bc5b0ae1ef66be03a737a
C++
kaustubhsh/CPP
/9_Pointers/4.cpp
UTF-8
444
3.359375
3
[]
no_license
// Example of Pointer to Array #include <iostream> #include <conio.h> //#include <stdio.h> using namespace std; int main() { int a[5]; int *p=&a[0]; // OR // int *p=a; cout<<"Enter 5 elements in array:"<<endl; for(int i=0;i<5;i++) { cin>>p[i]; } for(int i=0;i<5;i++) { cou...
true
516cea94ab290d9859c96cba5ce3c0a35139f9c0
C++
sprnik/labs
/2_курс/технологии_программирования/3/3-4,3-5.cpp
UTF-8
239
2.96875
3
[]
no_license
#include <stdio.h> #include <cmath> int main() { double x; int n; long double xn; printf("Enter x and n separated by space or enter.\n"); scanf("%lf %d", &x, &n); xn = pow(x, n); printf("x^n = %llf\n", xn); return 0; }
true
f50ec4b2927d90bb4420836d7b5bc708fd2baca0
C++
ctrlMarcio/FEUP-AEDA
/tp07_binary_trees/src/game/game.h
UTF-8
1,610
3.546875
4
[]
no_license
#ifndef AEDA1920_FP07_GAME_H #define AEDA1920_FP07_GAME_H #include "circle.h" #include "../binary_tree/binary_tree.h" /** * Represents a game that stores a board of circles, as a binary trees, where players throw balls at and those slide until a leaf circle. * The score of the player corresponds to the sc...
true
44c9b7dfa9463d9bcb2fd661181c1479c0b7c019
C++
huang-br/School
/cs161/summer2016/in_class/activitiy.cpp
UTF-8
946
3.5625
4
[]
no_license
#include <iostream> #include <cstdlib> using namespace std; int SumRow(int[4][4]); void fillArray(int[4][4]); void arrayPrint(int[4][4]); int main() { srand(time(NULL)); int array[4][4]; fillArray(array); arrayPrint(array); int row = SumRow(array); cout << "The row with the biggest sum is: " << row << endl; ...
true
8e142620f4d88a602e4c4bce6bf0751c9e42d7b2
C++
BenBrewerBowman/Cpp_Practice_Problems
/MonsterGenerator/monster.cpp
UTF-8
1,850
3.4375
3
[]
no_license
#include <iostream> #include <ctime> // for time() #include <cstdlib> // for rand() and srand() #include <string> #include "monster.h" // monster and gen monster classes Monster::Monster(MonsterType type, std::string name, std::string roar, int hitPoints): m_type(type), m_name(name), m_roar(roar), m_hitPoints(hitPoint...
true
86c05708ad8e46b8b1d190c2eee621fea04d6485
C++
stefania-tsvetkova/FMI-OOP
/Practicum/Homework4/Source files/PendulumCard.cpp
UTF-8
2,142
3.21875
3
[ "MIT" ]
permissive
/** * Solution to homework assignment 4 * Object Oriented Programming Course * Faculty of Mathematics and Informatics of Sofia University * Summer semester 2020/2021 * * @author Stefania Tsvetkova * @idnumber 62573 * @task 1 * @compiler VC */ #include "PendulumCard.hpp" #include "HelperFunctions.h" #include <algorith...
true
eb9a36164ba84e7236468307aa172ba2fe675bc4
C++
Lectem/imgui_xplatform_demo
/source/main.cpp
UTF-8
3,863
2.59375
3
[]
no_license
// ImGui - standalone example application for SDL2 + OpenGL ES 2 + Emscripten #include <imgui.h> #include <stdio.h> #include <SDL.h> #ifdef __EMSCRIPTEN__ #include <emscripten.h> #include "imgui_impl_sdl_emscripten.h" #include "SDL_opengles2.h" #else #include "imgui_impl_sdl.h" #include <SDL_opengl.h> #endif bool g_...
true
cee8dd5b42ce4ec0bd37ae25a0ba2c78f821b309
C++
Zerphed/computer-graphics-course
/2012/assignment_4/code/src/four/Sampler.cpp
UTF-8
2,326
3.28125
3
[]
no_license
#include "Sampler.h" #include <cstdlib> Sampler::Sampler( int nSamples ) : m_nSamples( nSamples ) { } // virtual Sampler::~Sampler() { } Sampler* Sampler::constructSampler( Args::SamplePatternType t, int numsamples ) { if( t == Args::Pattern_Uniform ) { return new UniformSampler( numsamples ); } else ...
true
0a6a9a7b57c0819392a2cf64978ef481a3296198
C++
pingsoli/cpp
/tutorials/effective_cpp/chapter04/19.cpp
UTF-8
408
2.625
3
[]
no_license
/////////////////////////////////////////////////////////////////////////////// // // Item 19: Treat class design as type design. // // Class design is type design. Before defining a new type, be sure to consider // all the issues discussed in this item. // //////////////////////////////////////////////////////////////...
true
cd595e3c4e868cfbd6cfc20cac855ddd9e80fda5
C++
mehra-deepak/CN-DS-ALGO
/Linked List/Split_Circlular_Linked_List_Into_Two_Halves.cpp
UTF-8
737
3.625
4
[]
no_license
/* Split circular Linked List in two halves, if there are odd element than first list should contain one extra node */ void splitIntoTwo(Node*head); { Node *head1; Node* head2; if(head==NULL) { return; } Node *slow= head; Node *fast = head; while(fast->next!= h...
true
b6fdc815dc46b15d31575f0a42e4676e9acd2689
C++
Shair17/exercises-university
/1.secuenciales-y-estructuras-de-control/e-54.cpp
UTF-8
1,969
3.671875
4
[]
no_license
/** * Una persona debe realizar un muestreo con 50 personas para determinar * el promedio de peso de los niños, jóvenes, adultos y viejos que existen * en su zona habitacional. * Se determinan las categorías con base en la siguiente tabla: * * CATEGORÍA EDAD * Niños 0 - 12 ...
true
b731f25add2646c8f30983d8fc2c3c8e2370cb91
C++
minh-d-nguyen/Miscellaneous-Coding-Problems
/subtract_list_recursive.cpp
UTF-8
1,318
3.953125
4
[]
no_license
/* Problem: Given a singly linked list, modify the value of first half nodes such that : 1st node’s new value = the last node’s value - first node’s current value 2nd node’s new value = the second last node’s value - 2nd node’s current value, and so on … Solution approach: Use recursion, when the function returns uti...
true
647e8492a2f329b9c32858816c4697385f3e0e28
C++
Elikar-KM/Avanguard
/Avanguard/AvanguardDefence/MemoryStorage.cpp
UTF-8
1,475
2.890625
3
[]
no_license
#include "stdafx.h" #include "MemoryStorage.h" size_t inline AlignDown(size_t Value, size_t Factor) { return Value & ~(Factor - 1); } size_t inline AlignUp(size_t Value, size_t Factor) { return AlignDown(Value - 1, Factor) + Factor; } MemoryStorage::MemoryStorage() { ReloadMemoryRegions(); } MemoryStora...
true
93ff2f4fabb883f130123094c021df63d75e26f2
C++
smartboxchannel/Arduino
/libraries/SHT31/SHT31.h
UTF-8
1,159
2.640625
3
[ "MIT" ]
permissive
// // FILE: SHT31.h // AUTHOR: Rob Tillaart // VERSION: 0.1.2 // DATE: 2019-02-08 // PURPOSE: Class for SHT31 I2C temperature humidity sensor // https://www.adafruit.com/product/2857 // URL: https://github.com/RobTillaart/Arduino.git // // Released to the public domain // #ifndef SHT31_h #define SH...
true
d4e203a38b0aa8e8e7b6ae19d2f1368dd02e5e87
C++
ai5/gpsfish
/osl/std/test/progress/effect5x3.t.cc
UTF-8
5,255
2.546875
3
[]
no_license
/* effect5x3.t.cc */ #include "osl/progress/effect5x3.h" #include "consistencyTest.h" #include "osl/csa.h" #include "osl/oslConfig.h" #include <boost/test/unit_test.hpp> #include <fstream> #include <string> #include <iostream> using namespace osl; using namespace osl::progress; BOOST_AUTO_TEST_CASE(ProgressEffect5x3...
true
26e68cb175e8184af95142273f9b79032e968dae
C++
mHagemann/Conyolocy
/opdrachten(8)/opdrachten/fatXXdump/lfnent.cc
UTF-8
367
2.578125
3
[]
no_license
// vim:sw=4:ai:aw:ts=4: /** @file lfnent.cc * The implementation of struct lfnent. */ #include "lfnent.h" // The function to calculate the checksum of the // DOS 8+3 filename belonging to an LFN entry. byte lfnent::l_checksum(const byte *dosName) { byte sum = 0; for (int i = (8+3) ; i ; --i) sum = ((sum & 1) <...
true
35819a287788307051ca3dc2dae07e5eb602b30a
C++
avadapal/Combinatorial-Min-Cost-Flow
/src/simple_solver.h
UTF-8
18,117
2.578125
3
[]
no_license
#include<iostream> #include<queue> #include<vector> #include<algorithm> #include "graph.h" #include <boost/random/mersenne_twister.hpp> #include <boost/random/discrete_distribution.hpp> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include "random.h" using namespace std; Random rg; template< type...
true
3b2e391b5f5f78eea1135ea58b741c36dece8a60
C++
DKalenscher/projects
/C++/playerRoster.cpp
UTF-8
4,443
3.578125
4
[]
no_license
#include <iostream> #include <string> #include <fstream> using namespace std; struct baseballPlayer { string nameFirst; string nameLast; int homerun; int hits; }; void getPlayerData(baseballPlayer roster[],const int RosterSize); void printPlayerData(baseballPlayer roster[], const int RosterSize); int searchRoster(b...
true
d89dbab908e4ca19d4953e3627b422e9af422103
C++
mCRL2org/mCRL2
/libraries/data/include/mcrl2/data/detail/prover/bdd_simplifier.h
UTF-8
2,209
2.953125
3
[ "BSL-1.0" ]
permissive
// Author(s): Luc Engelen // Copyright: see the accompanying file COPYING or copy at // https://github.com/mCRL2org/mCRL2/blob/master/COPYING // // 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) // /// \file mcrl2/...
true
300b6d7f95bcf45e4edab9903358009965ab2d7e
C++
willian-m/ToyStar
/src/sph_math.cxx
UTF-8
4,827
2.953125
3
[]
no_license
#include "sph_math.h" //Norms const double SPHMath::norm3D = 1./(4.*M_PI); const double SPHMath::norm2D = 5./(14.*M_PI); const double SPHMath::norm1D = 1./6.; SPHMath::SPHMath(){}; double SPHMath::kernel_spline(Vec3 ri, Vec3 rj, double h){ double q = SPHMath::distance(ri, rj)/h; double norm = norm3D/std::pow...
true
fbd6cc9f8b449851c4f40932e83aa43be9aabc9c
C++
MnSakibOvi/competitive-programming
/light OJ/Hidden Secret!.cpp
UTF-8
1,584
2.8125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; cin.ignore(); for(int k=1; k<=t; k++) { map<char,int>mp,mp2; map<char, int>::iterator itr; string str,str2; getline(cin,str); getline(cin,str2); transform(str.begin(), str.end...
true
fb4503faf6ebf658e69b675d380bf6c99e3a5beb
C++
windhooked/arduino_TM1638_DRO
/TM1638_DRO.ino
UTF-8
7,460
2.765625
3
[]
no_license
#include <Encoder.h> #include <TM1638.h> /* [] [] [] [] [] [] [] [] X Y Z S CLR PUSH POP CALC ( Buttons ) Normal mode ( x,y,z,s leds remain green when selected; clear, push , pop flash green, calc goes red and stays red for calc operation ) Pressing X,Y,Z,S will show the current encoder value for x,y,z axis and spi...
true
cdbcbb235ec57962c8f3f0a14dd53671e9bfd005
C++
TenYearsADream/TeachingBox
/TeachingBox_UnitTests/TDynamicTests.cpp
UTF-8
1,874
3
3
[]
no_license
#include "TDynamicTests.h" void TDynamicTests::SetUp() { tDynamicConstraint value{ 1, 2, 3, 4, 5, 6 }; m_variate = new TDynamic("a", "b", value); } void TDynamicTests::TearDown() { delete m_variate; } void TDynamicTests::ExpectVariate(QDataStream& dataStream) { TDynamic variate(dataStream); EXPECT_STREQ(va...
true
11808c8de5dee2f386eeedf0b4890e599529e5eb
C++
charles-pku-2013/CodeRes_Cpp
/Templates/Example_Code/examples/exprtmpl/exprops1.hpp
UTF-8
2,201
2.75
3
[]
no_license
/* The following code example is taken from the book * "C++ Templates - The Complete Guide" * by David Vandevoorde and Nicolai M. Josuttis, Addison-Wesley, 2002 * * (C) Copyright David Vandevoorde and Nicolai M. Josuttis 2002. * Permission to copy, use, modify, sell and distribute this software * is granted provi...
true
69d9b6872f3124c27ef0532453694e518e93a4b7
C++
thomaszhang/coding-challenges
/cpp/majority_element.cpp
UTF-8
789
3.484375
3
[]
no_license
// O(N), updating count via hash map and tracking most common element class Solution { public: int majorityElement(vector<int>& nums) { unordered_map<int, int> elementCount; int majorityCount = -1; int majorityElement = 0; for (int i = 0; i < nums.size(); i++) { if (eleme...
true
0fb3adc5a11cb30b5a402ae9607a0a52256b28d8
C++
jackonelli/LineSweeper
/src/Graph.hpp
UTF-8
1,487
2.90625
3
[]
no_license
#ifndef GRAPH_H #define GRAPH_H #include "nlohmann/json.hpp" #include <vector> #include <string> #include <unordered_map> using json = nlohmann::json; class Graph { public: explicit Graph(std::string& graphFilePath_); Graph(); ~Graph(); void GraphFromFile(); void GraphFromFile(const std::string& ...
true
0efb10d8bb386842cccf4e98fdcb37c17223b009
C++
hdp1213/pc_multinest
/include/Parameter.hpp
UTF-8
1,513
2.5625
3
[]
no_license
#ifndef PARAMETER_H #define PARAMETER_H #include <assert.h> #include <forward_list> #include "params/tau_degen_fixed_lcdm_nuisance.hpp" // Transformation function typedef typedef double (*trans_t)(double); inline double identity(double x) {return x;}; // Free flat priors extern double g_min[FREE_PARAM_AMT]; extern ...
true
0b3040a7173ebba64d909ee51b2c90c8f58c5479
C++
PatrickFairbanks/RFID-reader
/XInC2_uC_Documentation/Examples/Sample_Wireless_Template/inc/InputPin.h
UTF-8
1,031
2.828125
3
[]
no_license
/* Author: Sam Cristall * License: GPLv3 */ #ifndef SKAA_COMMON_PIN_H #define SKAA_COMMON_PIN_H #include "Port.h" #include "Utility.h" INTERFACE(IInputPin) { public: bool Get() { return STATIC_DISPATCH(GetImpl()); } bool IsHigh() { return Get(); } bool IsLow() { return !Get(); } }; template <typename Port> c...
true
ecb04b51fd9f5ca1cb974e653dd7850f76c7222c
C++
PeterUherek/TicTacToe
/NewGame.cpp
UTF-8
1,662
2.828125
3
[]
no_license
#include "stdafx.h" #include "NewGame.h" #include "InputManager.h" NewGame::NewGame() {} NewGame::~NewGame() {} void NewGame::buildBoard() { int opt = context->GetOption(); context->setDesk(opt * mCoeficientSizeofDesk, opt * mCoeficientSizeofDesk); } void NewGame::createAIPlayer() { boost::shared_ptr<AIUser> u...
true
3689fdd5c1a3646b4e398c7eb8c0761e0e3f5777
C++
stomachacheGE/leetcode
/128.最长连续序列.cpp
UTF-8
2,460
3.421875
3
[]
no_license
/* * @lc app=leetcode.cn id=128 lang=cpp * * [128] 最长连续序列 */ // @lc code=start class DSU { public: DSU(int N) { // 提前预留空间避免频繁内存分配 parent.reserve(N); } void Add(int x) { // 添加一个节点 parent[x] = x; } void Union(int x, int y) { // 合并两个节点 int rootx = Find(x); int rooty...
true
8e1cfdd3cc2466727bc96bdd1d530b576914bd80
C++
copies/tgff
/RVector.h
UTF-8
7,229
2.828125
3
[]
no_license
// Copyright 2008 by Robert Dick. // All rights reserved. #ifndef R_VECTOR_H_ #define R_VECTOR_H_ /*###########################################################################*/ #ifdef ROB_DEBUG # include <iostream> # include <typeinfo> #endif #include "RStd.h" #include "Interface.h" #include <iosfwd> #include <vec...
true
f724062fb42f817828ccd1c2fcc725d856f9a980
C++
franklinted/work
/code/c++/10.2.cpp
UTF-8
1,030
3.625
4
[ "Apache-2.0" ]
permissive
/************************************************************************* * File Name: 10.2.cpp * Author: Franklin * Mail: stranger_2000@163.com * Created Time: 2017-09-04 ************************************************************************/ #include<iostream> using namespace std; class Fish { p...
true
de87163c105d952d49d287642c1315a50f23b7ac
C++
li-xiao-nan/mediakit
/src/media/base/audio_frame.h
UTF-8
790
2.578125
3
[]
no_license
#ifndef MEDIA_BASE_AUDIO_FRAME_H #define MEDIA_BASE_AUDIO_FRAME_H #include <stdint.h> #include <vector> namespace media { class AudioFrame { public: AudioFrame(unsigned char* data, int data_size, int64_t pts); ~AudioFrame(); int data_size(); int UnReadDataSize(); void EnableSpeedData() { use_speed_data_ = ...
true
94797d24c2d0a111faed35c9187b4567126fc303
C++
pbrendel/PersistentKernels
/qualityFunction.cpp
UTF-8
5,548
2.875
3
[]
no_license
// pbrendel (c) 2013-21 #include "qualityFunction.h" void QualityFunction1::Init( const PersistenceData &persistenceData, uint filtrationsCount ) { m_min = filtrationsCount; m_max = 0; for ( PersistenceData::ConstIterator i = persistenceData.Begin(); i != persistenceData.End(); ++i ) { const ...
true
17913d4bd0e581c657687f00207e3b1f7c3f957a
C++
C7C8/nball-sim
/Hydra-Engine/utility/Timer.h
UTF-8
1,032
3.03125
3
[ "MIT" ]
permissive
#include <SDL2/SDL.h> namespace Hydra { class Timer { public: Timer(unsigned int interval = 0); //!< Allows time interval to be set upon construction. unsigned int getTime() const; //!< Gets the time since the timer was started. void start(); ...
true
b0decc1189a3e219f4179481828b89cbe932112f
C++
Afinogen/model_of_production_the_product
/src/function_libsmo.cpp
WINDOWS-1251
21,873
2.625
3
[]
no_license
/* * function_libsmo_init.cpp * * Created on: 16.03.2013 * Author: Afinogen */ #include "function_libsmo.h" Source *g_source_a; // Source *g_source_b; // Source *g_source_c; // Source *g_source_d; // D Source *g_source_e; // E Source *g_source_f; // F Source *g_source_g; // G Source...
true
65ca6067bd1b3082ae45bdfc38ef3f7ae6baebbc
C++
AfikAharon/AirplaneSimulator
/Expressions/CommandExpression.h
UTF-8
1,573
3.125
3
[]
no_license
#ifndef COMMANDEXPRESSION_H #define COMMANDEXPRESSION_H #include "Expression.h" #include "../Commands/Command.h" /** * CommandExpression class: The CommandExpression class is the object * adapter */ class CommandExpression : public Expression { private: Command *command; vector<string> *parameters; in...
true
2a74e9986ad363cfcb8bdb55d82af59fa35d9e16
C++
Nusrat15-12999/Final_lab
/Graph.cpp
UTF-8
868
2.828125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> PII ; //vector<string> int main() { freopen("123.txt", "r", stdin); int vertex; int edge; cin >> vertex >> edge ; vector<PII> v[vertex]; for(int i=0; i<edge; i++) { ...
true
cf6f46a0dccf27171e9256a24065b50ab1b0d85d
C++
tybins99/CRYPTANALYSIS.ElGammal_IndexCalculus
/LIB/argv_259.cpp
UTF-8
3,521
2.875
3
[]
no_license
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@ FILE: argv_259.cpp // @@ // @@ DESCRIPTION: // @@ This argv_1396 contains the argv_1139 structure and // @@ function that are necessary for the plugins // @@ to work. // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@...
true
9efbc659963edec817196b2d08a9c376982af93b
C++
GameDevNoobs/Marrakech
/Marrakesh/source/Managers/TextureLoader.h
UTF-8
684
2.53125
3
[]
no_license
#pragma once #include "../../Util/include/Singleton.h" #include "../../Util/include/Defines.h" class Texture; class TextureLoader : public Singleton<TextureLoader> { public: TextureLoader(); ~TextureLoader(); int LoadTextures(const char * filepath); SharedPtr<Texture> GetTextureById(unsigned short id, b...
true
0687236bb9fa99cc7825f95878e52500bc976fb5
C++
jjzhang166/ServiceGalaxy
/pubocci/src/database.cpp
UTF-8
8,060
2.859375
3
[]
no_license
/** * @file database.cpp * @brief The implement of the database class. * * @author Dejin Bao * @author Former author list: Genquan Xu * @version 3.5 * @date 2005-11-15 */ #include "database.h" namespace ai { namespace sg { using namespace oracle::occi; using namespace std; /** * @fn util::database::databa...
true
009737188f778f2eecce18b2b878b62c52de07e6
C++
khanhvu207/competitiveprogramming
/Olympiad/CST 2019/Thầy Minh/30-11-2018/tetris.cpp
UTF-8
1,274
2.515625
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int n, p, a[255], b[255], c[255]; long long kpowm[255][10], dp[255][255][255]; void precalc() { for (int k = 1; k <= 250; ++k) for (int m = 0; m <= 5; ++m) kpowm[k][m] = (m < 1 ? 1ll : kpowm[k][m - 1] * k * 1ll); } ...
true
c78d09406837bdd0b840d08d0427ac1de3847ee3
C++
groundwater/anarch
/src/util/lock.hpp
UTF-8
678
2.84375
3
[]
no_license
#ifndef __ANARCH_UTIL_LOCK_HPP__ #define __ANARCH_UTIL_LOCK_HPP__ #include <ansa/lock> namespace anarch { /** * A lock only to be used in critical sections. */ class CriticalLock : public ansa::Lock { public: typedef ansa::Lock super; virtual void Seize(); virtual void Release(); virtual void SeizeYielding...
true
c76d10e43e02781b82547e9f4a249d81a44aa1b6
C++
lmontegrande/Poker
/Poker/Main.cpp
UTF-8
13,580
3.125
3
[]
no_license
#include <iostream> #include <string> #define _CRTDBG_MAP_ALLOC #define _CRTDBG_MAP_ALLOC_NEW #include <cstdlib> #include <crtdbg.h> #ifdef _DEBUG #ifndef DBG_NEW #define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ ) #define new DBG_NEW #endif #endif using namespace std; // The Card Struct struct Card { ...
true
0d91baa0541c91ef46a60f7daca85210f16cbdb0
C++
cotestatnt/menu_lcd
/menu_lcd2.ino
UTF-8
10,396
2.609375
3
[ "MIT" ]
permissive
#include <EEPROM.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> #include <RotaryEncoder.h> #define ROW 4 #define COL 20 LiquidCrystal_I2C lcd(0x27, COL, ROW); #define CLK 3 #define DT 2 #define SW 4 RotaryEncoder encoder(CLK, DT); // Definizione delle uscite const byte OutLED = 13; bo...
true
5123eea4dff39906c6b28370aefb58e082152e8e
C++
mox692/mos
/kernel/paging.cpp
UTF-8
1,437
2.609375
3
[ "Apache-2.0" ]
permissive
#include "paging.hpp" #include <array> #include "asmfunc.h" namespace { const uint64_t kPageSize4K = 4096; const uint64_t kPageSize2M = 512 * kPageSize4K; const uint64_t kPageSize1G = 512 * kPageSize2M; alignas(kPageSize4K) std::array<uint64_t, 512> pml4_table; alignas(kPageSize4K) std::array<uint64_t, 51...
true
ed64691b3c2554bef07b06b283371258306dde73
C++
acgist/demo
/c++/plus/src/file/Poi.cpp
UTF-8
543
2.953125
3
[ "BSD-3-Clause" ]
permissive
#include <iostream> void setInt(void** number) { // int a = 10; static int a = 10; *number = &a; // *number = &a; // **number = 10; } void setIntEx(int** number) { **number = 10; } void setIntExx(int* number) { setIntEx(&number); } int main(int argc, char const *argv[]) { int* p = nu...
true
efd6ad6e8cc38e1f53a80d51b233756337dd76b1
C++
minsang0850/Program_Solving
/Baekjun/DynamicProgramming1/boj_1912.cpp
UTF-8
433
2.640625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int n; vector<int> v; int sum[100000]; int main(){ cin>>n; int answer; for(int i=0; i<n; i++){ int tmp; cin>>tmp; v.push_back(tmp); } answer=v[0]; for(int i=1; i<n; i++){ if(v[i-1]>0 && v[i]+v[i-1]>0) ...
true
1885da348e4e2c0f6a7ff91d37fc8ed88ef7de29
C++
A-STAR0/hackerrank-solutions-1
/Algorithms/Implementation/non-divisible-subset.cpp
UTF-8
583
2.75
3
[ "MIT" ]
permissive
#include <vector> #include <iostream> #include <algorithm> int main() { int n,k; std::cin >> n >> k; std::vector<int> k_counts(k, 0); for (int i = 0,tmp; i < n; i++) { std::cin >> tmp; k_counts[tmp % k]++; } int count = (k_counts[0] != 0 ? 1 : 0); int term = (k % 2 == 0 ? ...
true
4cf1b80d4dd3937205249cc697f6db347b573907
C++
msdmazarei/cpp-msd-freetype
/BookReader/MsdRandomReader.hpp
UTF-8
3,194
2.703125
3
[ "BSD-2-Clause" ]
permissive
#ifndef _MSD_RANDOM_READER_ #define _MSD_RANDOM_READER_ #include "typedefs.hpp" #include "utils/jsreader.hpp" #include <string.h> class MsdRandomReader { public: virtual DWORD getByteLength() = 0; virtual Tuple<DWORD, BYTE *> read(DWORD from, DWORD len) = 0; ~MsdRandomReader(){}; }; typedef Tuple<DWORD, BYTE *...
true
a5a87c59066926de3c89521c0c62bbf27280a8fb
C++
fishy15/competitive_programming
/online/cf/499/planexp.cpp
UTF-8
1,352
3.046875
3
[]
no_license
#include <iostream> #include <fstream> #include <vector> #include <algorithm> using namespace std; int n, m; int index1; vector<int> nums; bool works(int days); int main() { cin.tie(0); ios::sync_with_stdio(0); cin >> n >> m; vector<int> pack; for (int i = 0; i < m; i++) { int x; cin >> x; ...
true
0d27686effc5743e97e1c4472b9668ec1092bd63
C++
MyNameIsTaeYeong/Problem-Solving
/BOJ/BOJ_14226.cpp
UTF-8
1,544
2.984375
3
[]
no_license
#include <iostream> #include <vector> #include <queue> using namespace std; bool visited[2500][2500]; int main() { int s; cin >> s; visited[1][0] = true; visited[1][1] = true; vector<int> start(3); start[0] = 1; start[1] = 1; start[2] = 1; queue< vector<int> > q; q.push(...
true
54087b2a801938daf6b6926b352a66e211cb9499
C++
brightnesss/exercise-of-code
/526.cpp
UTF-8
1,287
3.734375
4
[]
no_license
//leetcode No.526 Beautiful Arrangement /* * Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of the following is true for the ith position (1 ≤ i ≤ N) in this array: * The number at the ith position is divisible by i....
true
534ee23feb3962a116e9ef1b97f4235a86e05dc3
C++
guijiangheng/minpt
/include/minpt/microfacets/trowbridge.h
UTF-8
917
2.609375
3
[]
no_license
#pragma once #include <minpt/core/microfact.h> namespace minpt { class TrowbridgeReitzDistribution : public MicrofacetDistribution { public: static float roughnessToAlpha(float roughness) { roughness = std::max(roughness, 0.001f); auto x = std::log(roughness); auto x2 = x * x; return 1.62142f + 0.8...
true
1dacb6273d2fdda2b71ee3fbd09c10c0e8f83d5e
C++
453183415/web
/myweb/base/IoRead.cpp
UTF-8
1,947
2.59375
3
[]
no_license
/* * Ioread.cpp * * Created on: 2015年10月25日 * Author: zjl */ #include"IoRead.h" #include<cstdio> #include<cstdlib> #include<unistd.h> #include<cstring> #include<cerrno> namespace { const int MAX_LENGTH = 8192; struct rio_t{ int rio_fd; int rio_cnt; char *rio_bufptr; char rio_buf[MAX_LENGTH]; }; void un...
true
5830aae5661456a2840990a150877ea3c037d9aa
C++
david2du/david_training
/sng/test/10-1-1.cpp
UTF-8
4,079
2.6875
3
[]
no_license
#include <stdio.h> #include <conio.h> #include <time.h> #include <windows.h> #include <iostream> using namespace std; int x = 12, y = 7; void gotoxy(int x, int y) { HANDLE hout = GetStdHandle(STD_OUTPUT_HANDLE); COORD pos; pos.X = x; pos.Y = y; SetConsoleCursorPosition(hout, pos); } void queen(in...
true
5cb97193ca2febac9a13a24fe4725b008f6d9976
C++
feng1o/cppEssential
/文件操作/3.读取一行提取数字.cpp
GB18030
1,381
3.234375
3
[]
no_license
#if 0 // http://www.cnblogs.com/TenosDoIt/p/3724234.html ڵһǿcc++ַ c FILE *fp = fopen("input.txt", "r"); char buf[10000]; while (fgets(buf, 10000, fp)) { //buf } c++ ifstream infile("input.txt"); string s; while (getline(infile, s)) { //sн } ǽʱ䣬ַʱ˵getlinefgetsЧʻͬ ڵڶһַнṩ3з, Ϊ˼򵥣ֻǷشַнûаǴ 1ַistringstrea...
true
03e8db4aae1245944ba652979ce51fb7dc623ed6
C++
yuancong1198/Design-patter-And-QT
/ObserverModelDemo/demo.h
GB18030
1,701
3.75
4
[]
no_license
#pragma once #include <iostream> #include <list> using namespace std; //۲ߣObserver)ΪЩĿ귢ıʱҪ֪ͨĶһ½ӿڡ class Observer { public: virtual void OnSystem(int) = 0 ; }; //Ŀ(Subject) : Ŀ֪Ĺ۲ߣ۲߹۲ͬһĿꡣ class Subject { public: //ṩעɾ۲߶Ľӿڡ virtual void Attach(Observer*) = 0; virtual void Detach(Observer*) = 0; vir...
true
4c177f3aa9fc1f6b8f7cc10275afd5d316e336d8
C++
vishnujayvel/SPOJ-1
/EXPRESS.cpp
UTF-8
791
2.65625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
/* USER: zobayer TASK: EXPRESS ALGO: breadth first search */ #include <cstdio> #include <cctype> #include <cstdlib> using namespace std; struct Node { int r, l; }; const int MAXLEN = 10001; char post[MAXLEN], res[MAXLEN]; Node tree[MAXLEN]; int Q[MAXLEN], S[MAXLEN]; int main() { int t, i, st, en, tp, a, b; t = at...
true
a5ff005342f8543213ec376446dd7825e72b78b4
C++
UdeS-GRO/S3APP6r-GRO300
/prob/identificationQt/serialprotocol.h
UTF-8
499
2.53125
3
[]
no_license
#ifndef SERIALPROTOCOL_H #define SERIALPROTOCOL_H #include <QObject> #include <QSerialPort> // Classe permettant de cree une communication serielle class SerialProtocol : public QObject{ Q_OBJECT public: explicit SerialProtocol(QString , qint32 ); ~SerialProtocol(); void sendMessage(QString msg); si...
true
af01fd418e301742719dd08c81b6ac3355c62b7c
C++
tomlerendu/Slug-Runner
/Game/Level.cpp
UTF-8
170
2.578125
3
[]
no_license
#include "Level.h" void Level::addObject(LevelObject object) { objects.push_back(object); } std::vector<LevelObject> Level::getObjects() { return objects; }
true
f55c3faae0aacf8a161f39d3163f7dbedc8dce0f
C++
TallerDeLenguajes1/trabajo-practico-nro1-AndresGonzales
/tp1_1.cpp
UTF-8
1,445
3.953125
4
[]
no_license
/*i) Declare un puntero en el procedimiento principal que apunte a una variable de algún tipo y devuelva por pantalla: (1) El contenido del puntero (2) La dirección de memoria almacenada por el puntero. (3) la dirección de memoria de la variable. (4) la dirección de de memoria del puntero. (5) el tamaño de memoria...
true
493b8723979303ae4010a4d2a4bf9174479737f9
C++
Chaitanya150895/oops1
/cpp/cao/pr20.cpp
UTF-8
416
4.125
4
[]
no_license
//using paremetrized constructor #include<iostream> class Point { int x, y; public: Point (int a, int b) //inline parametrized constructor definition { x = a; y = b; } void display() { cout<<"("<<x<<","<<y<<")\n"; } }; int main() { Point p1(1, 1); //invokes parametrized constructor Point p2(5...
true
efe2e99d105b96c3305705c5fca8e8e049492284
C++
wzchua/graphic
/GlobalIllumination/main.cpp
UTF-8
2,025
2.703125
3
[ "Apache-2.0" ]
permissive
#include <glad/glad.h> #include <GLFW/glfw3.h> #include <string> #include <cstdlib> #include "Renderer.h" #include "Scene.h" // settings const unsigned int SCR_WIDTH = 800; const unsigned int SCR_HEIGHT = 600; std::string filepath; static void WaitForEnterKeyBeforeExit(void) { fflush(stdin); getchar(); } in...
true
2a0317a8e43ce4472340fa7f3477a75269fabc33
C++
TravisOnline/pathsolver
/PathSolver.cpp
UTF-8
18,788
3.53125
4
[]
no_license
#include "PathSolver.h" #include <iostream> PathSolver::PathSolver(){ } PathSolver::~PathSolver(){ } void PathSolver::forwardSearch(Env env){ //Intialize the open and closed list of nodes to be used with the pathfinder program nodesOpenList = new NodeList(); nodesExplored = new NodeList(); //I...
true
d752fb0fde8e7606bad7cb49ab412a1b8efad466
C++
Prydainian/AOSResearch2018
/amrex-master/Src/GeometryShop/AMReX_RefinementCriterion.H
UTF-8
4,396
2.796875
3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#ifndef _REFINEMENTCRITERION_H_ #define _REFINEMENTCRITERION_H_ #include "AMReX_IndexTM.H" #include "AMReX_CutCellMoments.H" /// /** This is the base class for refinement criterion used for the subdivision of cells in geometry generation. If the result if "doRefine()" is true, the cell is subdivided in th...
true
e65c18adce2965831bc9d0d5d497c863d2013813
C++
NaxxoBG/SAR_repo
/Assignment_1/Assignment_5/Monkeyy.h
UTF-8
224
2.640625
3
[]
no_license
#pragma once #include <string> class Monkeyy { public: Monkeyy(std::string name, int hungerLevel); void feed(); int getHungerLevel() const; std::string getName() const; private: int hungerLevel; std::string name; };
true
e70f18a1f7d69ae1f9003936872c01f56e1f204a
C++
Birdy-C/homework_computeranimation
/FFD/Code/points.cpp
UTF-8
1,355
2.78125
3
[]
no_license
//Birdy 17.10.10 #include "points.h" Points::Points(QGraphicsScene *mscene):count(0) { scene = mscene; group_line = new QGraphicsEllipseItem; scene->addItem(group_line); pen.setWidth(5); pen.setCapStyle(Qt::RoundCap); pen.setColor(QColor(180,180,255,200)); } Points::~Points() { delete ...
true
b3dcaaae86493b80066898c56a854344915054a9
C++
jeroennelis/Engine
/Engine/src/Engine/LayerStack.h
UTF-8
733
2.984375
3
[ "Apache-2.0" ]
permissive
#pragma once #include "Engine/Core.h" #include "Layer.h" namespace Engine { class ENGINE_API LayerStack { public: LayerStack(); ~LayerStack(); /** * Layers wil be pushed into the list at the position m_LayerInsert * Overlays will always be pushed into the list after the layers * This insures the ...
true
8c9ac44818b5eacc3dd8ad492b806448c9d37f22
C++
LucasM127/Pentominos
/Level.hpp
UTF-8
2,111
2.828125
3
[]
no_license
#ifndef PENTAMINO_LEVEL_HPP #define PENTAMINO_LEVEL_HPP #include <string> #include <vector> #include <fstream> //128 bytes at a time struct LevelData { uint8_t nameLength; char name[45]; uint8_t numPieces; uint8_t ids[15]; uint8_t width, height; uint32_t data[16]; }; //45 chars wide //can stor...
true
45c21ced325817ab15db4ccc6ce3706a845d9661
C++
Lmmmmm/AOJ
/AtCoder_Beginner_Contest_159/D-Banned_K.cpp
UTF-8
644
2.796875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; using lint = long long int; int main() { int N; cin >> N; vector<int> A(N); for(auto &x:A)cin>>x; map<int, lint> cnt; for (auto x : A) cnt[x]++; lint ret = 0; //求出从N个球中找到整数相等的不同的两个球(在code里意思是index一样的value有多大) for (auto p : cnt) r...
true
d89992108064fd2885700fc92c89a2bd2640104f
C++
hofin34/testing_cpp
/Functions.h
UTF-8
327
2.921875
3
[]
no_license
#pragma once #include <math.h> class Functions{ public: static double squareRoot(const double a) { double b = sqrt(a); if(b != b) { // nan check return -1.0; }else{ return sqrt(a); } } static int addInt(const int a, const int b){ return a+b; ...
true
f16bb97dcc06dd7a60c9e91b283d86daff6e72ce
C++
haydnscarlett/HH
/Source/Item.cpp
UTF-8
2,567
3.328125
3
[]
no_license
// // Created by haydn on 26/10/2018. // #include "Item.h" /** * @brief Default Constructor. * @details */ Item::Item() { item = ""; examinable= false; examination = ""; locationNumber = -1; hidden= false; ableToTake = false; } /** * @brief Override Constructor. * @details creates...
true
b61063498cf3029f2746ca0c060cbbfbfb1d8d7e
C++
DavidFarinango12/Simulacion5.3
/FarinangoRafael_SIMULACION5.3_SE.ino
UTF-8
652
2.78125
3
[]
no_license
/* *CAPITULO V: FUNCIONES ESPECIALES *CODIGO 21: RUTINA DE REINICIO *OBJETIVO: REINICIAR EN DETERMINADO TIEMPO POR MEDIO DE WDT Y EEPROM *NOMBRE: RAFAEL FARINANGO */ #include <avr/wdt.h> //librearia wdt #include <EEPROM.h> int i; void setup() { Serial.begin(9600); Serial.println("DESPIERTO"); attachIn...
true
243dcc457386f2d61e943948fb9da48bdd8a623d
C++
ProAlgos/ProAlgos-Cpp
/cpp/include/algorithm/sorting/insertion_sort.hpp
UTF-8
1,195
4.03125
4
[ "MIT" ]
permissive
/* Insertion sort -------------- A simple sorting algorithm that builds the final sorted list of value one item at a time. It is more efficient than most other quadratic-time algorithms. Time complexity --------------- O(N^2), where N is the number of elements. Space complexity ---...
true
929cb21826858d29bda7d1649709f27acd79ff8d
C++
faribaK/Catmull-s-Hidden-Surface-Algorithm-
/Source/Project2/osuVector.h
UTF-8
1,240
2.78125
3
[]
no_license
#ifndef OSU_VECTOR_DEFINED #define OSU_VECTOR_DEFINED class osuVector4 { public: osuVector4(); osuVector4(double d0, double d1, double d2, double d3); ~osuVector4(); //--------------------------------------------------- //index operators double &operator[](unsigned int i); double operator[](unsigned int i) c...
true