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
4b3f97696450e1c22a2e06c79d08e35da58d7d48
C++
LasseD/uva
/P143.cpp
UTF-8
4,407
3.1875
3
[]
no_license
#include <iostream> #include <stdio.h> #include <cmath> #include <iomanip> struct Real; typedef std::pair<Real,Real> Point; typedef std::pair<Point,Point> Line; typedef long long ll; #define XX first #define YY second #define p1 first #define p2 second ll gcd(ll a, ll b) { ll c; while(a != 0) { c = a; ...
true
4fc994f396182fcacb1ea02cbe7389e06c69eb2e
C++
Tardigrade-nx/Tatanga
/src/sdlutils.cpp
UTF-8
4,278
2.796875
3
[]
no_license
#include <iostream> #include <SDL2/SDL_image.h> #include "sdlutils.h" #include "def.h" #ifdef __SWITCH__ #include "switch.h" #endif //------------------------------------------------------------------------------ // Init SDL bool SDLUtils::Init() { INHIBIT(std::cout << "SDLUtils::Init()" << std::endl;) // Init...
true
d4ab848dd51a692f6413577d5e31aa42d28e5a8f
C++
henrythasler/legendary-dashboard
/lib/text/wisdom.h
UTF-8
28,421
2.703125
3
[ "MIT" ]
permissive
#if defined(ESP8266) || defined(ESP32) #include <pgmspace.h> #else #include <avr/pgmspace.h> #endif // Latin-1 character codes // ä: "\xe4" // ü: "\xfc" // ö: "\xf6" // Ä: "\xc4" // Ö: "\xd6" // Ü: "\xdc" // ß: "\xdf" const std::vector<String> wisdomTexts PROGMEM = { // Bullshit Bingo "Bingo 1: It works on my...
true
31b130db6cfd8f0acc66ccd4cd3f4ec52147efc2
C++
pastman/arduino_examples
/Example_Analog.ino
UTF-8
716
2.734375
3
[]
no_license
#define ANALOG 0 #define DIGITAL0 0 #define DIGITAL1 1 #define DIGITAL2 2 void setup() { Serial.begin(9600); pinMode(ANALOG, INPUT); pinMode(DIGITAL0, OUTPUT); pinMode(DIGITAL1, OUTPUT); pinMode(DIGITAL2, OUTPUT); } void loop() { int light = analogRead(ANALOG); Serial.println(light); if (...
true
6e0e807376bf3d3f1fbc0f9fde4f39ab66ce272d
C++
alissastanderwick/OpenKODE-Framework
/01_Develop/libXMCocos2D/Source/kazmath/plane.cpp
UTF-8
5,612
2.5625
3
[ "MIT" ]
permissive
/* ----------------------------------------------------------------------------------- * * File plane.cpp * Ported By Young-Hwan Mun * Contact xmsoft77@gmail.com * * ----------------------------------------------------------------------------------- * * Copyrigh...
true
e8e47c3ea811b3c399f45efd57e63da6dd847e7b
C++
shanta3220/Light-OJ
/1015 - Brush (I).cpp
UTF-8
447
2.609375
3
[]
no_license
#include <iostream> #include<math.h> using namespace std; int main() { int n,t,j=1, ng,s=0; cin>>t; while(t--){ cin>>n; int a[n]; for(int k=0; k<n;k++ ) { cin>>a[k]; if(a[k]<0){ a[k]=pow(a[k],2); a[k]=pow(a[k],0.5); s+=a[k]; ng+=a[k]; ...
true
380579ed09e67097a066ed79cdf7ba93ac2a201a
C++
yaoReadingCode/VS2015project
/game/game/Minesweeper.cpp
GB18030
10,993
3.1875
3
[]
no_license
#include"Minesweeper.h" //ͷļ #include<cstdlib> #include<ctime> #include<iostream> #include<conio.h> #include <fstream> using namespace std; //״̬λ #define BOMB 9 //BOMBʾλը #define MA...
true
e44a16ba348ba9a8082981d6ac5e0a796f0c8d7a
C++
multifacs/Journal
/Journal/Source.cpp
UTF-8
461
3.4375
3
[]
no_license
#include <iostream> #include <string> using namespace std; class Student { public: string name; int group; int grade[10]; }; void fillStud(int n, Student *&mas) { mas = new Student[n]; for (int i = 0; i < n; i++) { cin >> mas[i].name >> mas[i].group; } } int main() { string subject[5] = { "Math", "IT", "...
true
c1c5ecd7366260975bdbce3375dc9c917506ea7b
C++
yyuanl/coding_exercise
/0001_剑指offer/0007_旋转数组的最小值/c++/main.cpp
UTF-8
580
3.640625
4
[]
no_license
#include<iostream> #include<vector> using namespace std; int minNumberInRotateArray(const vector<int> &rotateArray){ // 顺序查找 O(N) if(rotateArray.size() == 0) return 0; for(int index1 = 0, index2 = 1;index2 < rotateArray.size(); index2 ++ ){ if(rotateArray[index1] > rotateArray[index2]){ ...
true
b4b343bc91622bae92c2cf081ed0b26dfec8a3d0
C++
lsils/mockturtle
/lib/percy/percy/printer.hpp
UTF-8
3,112
2.796875
3
[ "MIT" ]
permissive
#pragma once #include <kitty/dynamic_truth_table.hpp> #include <fmt/format.h> #include <string> #include <utility> #include <unordered_map> #include <map> namespace percy { template<typename ResultType> class printer { public: explicit printer( chain const& c ); ResultType operator()() const; }; template<> c...
true
4c3a2c74eabc9c730600fa6c2883a758fd1c66f5
C++
ttyang/sandbox
/sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/Syncable/Syncable_Light.h
UTF-8
1,062
2.796875
3
[ "BSL-1.0" ]
permissive
#pragma once //#include <boost/utility/enable_if.hpp> //#include "Syncable/Syncable_ModeledBy.h" typedef int tUuid; typedef int tTime; template<class Model> tUuid uuid(Model const& object) { return object.uuid(); } template<class Model> tTime time(Model const& object) { return object.time(); } template<clas...
true
e75457080c4b5d2898237d12abbdbe0d0f934336
C++
lintcoder/leetcode
/src/566.cpp
UTF-8
747
3
3
[]
no_license
vector<vector<int>> matrixReshape(vector<vector<int>>& nums, int r, int c) { int row = nums.size(); if (row == 0) return nums; int col = nums[0].size(); if (row * col != r * c || (row == r && col == c)) return nums; vector<vector<int> > res; ...
true
fc888583ebdb08d08613082639d6ea74478c546b
C++
matthew-h-shaw/FollowMe
/FollowMe/FollowMe.cpp
UTF-8
9,014
2.578125
3
[]
no_license
#include "FollowMe.h" FollowMe::FollowMe() { srand((int)time(0)); setImmediateDrawMode(false); } FollowMe::~FollowMe() { } void FollowMe::onTimer(UINT nIDEvent) { if (nIDEvent == ANIMATION) { if (animationCounter < 51) { switch (animation) { case FollowMe::left: spriteX -= 1; break; c...
true
49d499c0afc0a6693013aa41025ba3b90347b498
C++
mja1110/Arduino-and-library
/Arduino/Arduino11_HW2_BT1_LeHuuTruong.ino/Arduino11_HW2_BT1_LeHuuTruong.ino.ino
UTF-8
401
2.90625
3
[]
no_license
int number; void setup() { Serial.begin(9600); pinMode(13, OUTPUT); } void loop() { if (Serial.available()) { String data = Serial.readString(); number = data.toInt(); if (number > 0 && number < 49) { digitalWrite(13, LOW); Serial.println(number); } if(number>50 && number<1...
true
68b1b378c41bfd3259d86c2bda1bbddb2acb4a88
C++
pawelwojtowicz/ecuApp
/Src/CSM/ICSMBuilder.h
UTF-8
885
2.734375
3
[]
no_license
#ifndef CSM_ICSMBUILDER_H #define CSM_ICSMBUILDER_H #include <GlobalTypes.h> namespace CSM { class ICSMBuilder { protected: ICSMBuilder() {}; virtual ~ICSMBuilder() {}; public: virtual void AddState(const std::string& parent, const std::string& stateName, const std::string& enterActionNa...
true
1402733f0000d9ff30c7b5e21970ee196e6c712c
C++
ChuckHalmond/qt-patients
/Model/ResourceType.cpp
UTF-8
404
2.75
3
[]
no_license
#include "ResourceType.h" /* Constructors & destructor */ ResourceType::ResourceType() { } ResourceType::~ResourceType() { } /* Getters */ int ResourceType::getId() const { return id; } QString ResourceType::getLabel() const { return label; } /* Setters */ void ResourceType::setId(int id) { this->...
true
1df9acdba2ef51d58dae4dc4f8133b2f2bac557b
C++
RioRocker97/DistractMyselfFrom_Crypto
/C++/Intermediate/Inheritance_Sub class_Type of class inheritance.cpp
UTF-8
377
2.75
3
[]
no_license
#include<iostream> #include"TankWithSub.h" int main() { Tank standard; heavy T29; std::cout<<T29.getTankName()<<std::endl; T29.setName("T29"); standard.setName("Default"); std::cout<<T29.getTankName()<<" "<<T29.showTypeTank()<<std::endl; std::cout<<standard.getTankName()<<" "<<st...
true
7ce4de306e4e240917a9a9608e2caeaa7778ae88
C++
ktekchan/Summer
/Recursion/knapsack.cpp
UTF-8
774
4.03125
4
[]
no_license
/* * Khushboo Tekchandani * Given weights and values of n items, put these items in a knapsack of * capacity W to get the maximum total value in the knapsack. * * Start from the back. If last item weight > w, then that cannot be included * else two cases, max (nth val included, nth value not included) */ #inclu...
true
47832aabb348580b26298a9b3d31972305314543
C++
blaneart/cpppool
/day08/ex01/span.cpp
UTF-8
1,718
3.375
3
[]
no_license
#include "span.hpp" span::span(unsigned int n) { this->n = n; this->length = 0; } span::span(const span& other) { this->n = other.n; this->length = other.length; this->vec = other.vec; } span& span::operator=(const span& other) { this->n = other.n; this->length = other.length; this->vec = other.vec; return ...
true
8f59ffa79e62d735f0ee37568c38452840e3562e
C++
RolloCriterion/Hangman-Game
/mainHungman.cpp
UTF-8
2,580
3.53125
4
[]
no_license
#include <iostream> #include <string> #include "headerHungman.h" void PrintIntro(); void PlayGame(); std::string GetValidGuess(); void PrintSummary(); bool AskToPlayAgain(); headerHungman Game; int main () { PrintIntro(); do { Game.Reset(); Game.GetSecretWord(); PlayGame(); } while (AskToPlay...
true
44476b9044256c58e8ed569ed793df527bd49d0c
C++
fenneishi/conPerfor
/sequPerfor/conTime.h
UTF-8
10,117
3.09375
3
[]
no_license
/* 模板参数有三种类型 偏特化的理解 不定长模板参数的偏特化方式 模板模板参数的偏特化方式 */ #if !defined(CONTime_H_) #define CONTime_H_ #include <fstream> #include <iostream> #include <string> #include <memory> //std::allocator() #include <ctime> //clock() #include <utility> //pair<key,T>(...) #include <functional> //std::less<int> #include <initializer_lis...
true
20cee77468790781abc6dcde6504ecd229bee74e
C++
jefersonla/robozino
/utils/old_code/teste.ino
UTF-8
9,955
2.859375
3
[ "MIT" ]
permissive
/*Libraries*/ //#include <Ultrasonic.h> /* Define Matrix Grid */ #define n 3 #define a (n * 15) #define m (n + 2) int grid[m][m]; int heuristic[n][n]; /*Inserir uma interface gráfica para visualização do A-Star */ int processing[n][n]; int numerador = 0; int iD; /* MAKE IT STOP */ int fim = 0; int c...
true
fdc63d06465d85d3fae42e072ff5d0698d7a5b31
C++
BlitzModder/dava.engine
/Modules/TArc/Sources/TArc/Qt/QtSize.h
UTF-8
232
2.640625
3
[]
permissive
#pragma once #include <Base/Any.h> #include <QSize> namespace DAVA { template <> struct AnyCompare<QSize> { static bool IsEqual(const Any& v1, const Any& v2) { return v1.Get<QSize>() == v2.Get<QSize>(); } }; }
true
ae01734f455d41d4e2e1b0f2ffb3c265c1c69bac
C++
chasejohnson3/Recent-Programming-Projects
/Spring 2017 Ventures/StringPractice/main.cpp
UTF-8
204
2.859375
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main() { string words; cout << "Give me a few words, please." << endl; getline(cin, words); cout << words; return 0; }
true
710376e887b1ec799dcdd088d74dae8aba7385ab
C++
dhkim0821/Humanoid_2018
/RobotSystems/Valkyrie/Valkyrie_Definition.h
UTF-8
2,209
2.515625
3
[]
no_license
#ifndef VALKYRIE_DEFINITION #define VALKYRIE_DEFINITION namespace valkyrie_joint{ constexpr int virtual_X = 0; constexpr int virtual_Y = 1; constexpr int virtual_Z = 2; constexpr int virtual_Rx = 3; constexpr int virtual_Ry = 4; constexpr int virtual_Rz = 5; constexpr int leftHipYaw...
true
91ade7d2238ee4b090663dd91d7572cac4f2d133
C++
taggelos/JobExecutor
/fileUtil.cpp
UTF-8
3,840
3.34375
3
[]
no_license
//Function Definitions #include "fileUtil.h" void paramError(char * programName ,const char * reason){ //Display the problem cerr << reason << ", please try again." << endl; //Show the usage and exit. cerr << "Usage : " << programName << " -d <DOCUMENT> [-w <NUMBER OF WORKERS>]" << endl; exit(1); } //Print Forma...
true
13ec633c69e03e8eb62997b72cd993b01234d17b
C++
realn/Trader
/kikiGui/GUIPanel.h
UTF-8
948
2.53125
3
[]
no_license
#pragma once #include <memory> #include "GUIRect.h" #include "GUIWidgetContainer.h" namespace gui { class CPanel : public CRect , public CWidgetContainer { protected: glm::vec2 mContentPos; public: CPanel(cb::string const& id, glm::vec4 const& backColor = glm::vec4(0.0f, 0.0f, 0...
true
bb74ed8163d6c800d74be4b9a6d60f79642aec98
C++
anoriar/MatrixEigenValues
/CharPolynomial/Matrix.h
UTF-8
288
2.546875
3
[]
no_license
#pragma once #include "FileReader.h" class Matrix { public: Matrix(int size); ~Matrix(); void Matrix::PutElem(int i, int j, double elem); double Matrix::GetElem(int i, int j); int Matrix::GetSize(); void Matrix::Print(); private: int size; vector<vector<double>> matrix; };
true
b183cdb7fe4a2690416e68025b3366086f0793c1
C++
lefunal/cursoProgramacionComputadores
/ejercicios/e12-funcionesRecursivas/factorial-exp.cpp
UTF-8
5,103
3.53125
4
[]
no_license
// Esqueleto de C++ # include <iostream> // Input/Output Stream: cin, cout etc. # include <fstream> // Para leer y escribir en archivos. # include <cmath> // math.h: pow(x,y), fabs(x), abs(x), cos(x), sin(x), acos(x), exp(x), log(x), log10(x) etc. # include <iomanip> // Input/output manipulators ...
true
54ec3ba760213487dea854527c3bdb7db7e982ec
C++
Andrey246/POO-TEMA1
/TEMA2/Premiu.cpp
UTF-8
651
2.828125
3
[]
no_license
#include <Premiu.h> Premiu::Premiu(std::string nume, std::string data_acordarii) { this->nume_premiu = nume; this->data_acordarii = data_acordarii; } Premiu::Premiu(const Premiu& premiu) { this->nume_premiu = premiu.nume_premiu; this->data_acordarii = premiu.data_acordarii; } Premiu& Premiu...
true
0487b2848f0d88382e1a56af2ea23e90d9f02c6f
C++
TUM-I5/MolSim
/src/outputWriter/XYZWriter.cpp
UTF-8
1,001
2.546875
3
[]
no_license
/* * XYZWriter.cpp * * Created on: 01.03.2010 * Author: eckhardw */ #include "outputWriter/XYZWriter.h" #include <iomanip> #include <sstream> namespace outputWriter { XYZWriter::XYZWriter() = default; XYZWriter::~XYZWriter() = default; void XYZWriter::plotParticles(std::list<Particle> particles, ...
true
3ab46cb94a2298e30ac33e09af965c097329a214
C++
KratosMultiphysics/Kratos
/kratos/mpi/utilities/mpi_search_utilities.h
UTF-8
15,116
2.578125
3
[ "BSD-3-Clause" ]
permissive
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #...
true
48e8849f6ef7a17117ac5bbae27c60376b7efe98
C++
adjasont/CS303_Project2
/Project2/Project2/Floor.h
UTF-8
1,000
3.71875
4
[]
no_license
#pragma once #include <iostream> #include "Person.h" #include <queue> using namespace std; class Floor { private: int floor_number; queue<Person> peeps; public: Floor() { ; } void setFloor(int floorNum) { floor_number = floorNum; } void push(Person peep) { peeps.push(peep); } int getFloorNum() const { return flo...
true
a60c3364f8ed5eda12e348c1b0fcf8156bb64435
C++
truongpt/warm_up
/practice/cpp/misc/smallest_integer_divisible_k.cpp
UTF-8
844
3.890625
4
[]
no_license
/* - Problem: https://leetcode.com/problems/smallest-integer-divisible-by-k/ - Solution: - K = 3 - 111 - 111 = 11 * 10 + 1 We only need to store remainders modulo K. */ #include <iostream> #include <unordered_set> using namespace std; int smallestIntDivByK(int K) { if (!(K % 2) || !(K % 5)) ...
true
39d4e0595134443ef2f6d30e2e178fd53eb7e782
C++
lamarrr/STX
/include/stx/scheduler/timeline.h
UTF-8
9,903
2.6875
3
[ "MIT" ]
permissive
#pragma once #include <algorithm> #include <chrono> #include <iostream> #include <thread> #include <utility> #include "stx/async.h" #include "stx/config.h" #include "stx/scheduler/thread_slot.h" #include "stx/task/id.h" #include "stx/task/priority.h" #include "stx/vec.h" STX_BEGIN_NAMESPACE using TimePoint = std::c...
true
eae8edf75d6890de89a3a6ec2523b932dd176049
C++
Shree987/WinterOfCP
/Chapter 3 - March 2021/Day 23/3Sum With Multiplicity.cpp
UTF-8
1,201
3
3
[]
no_license
/* Author : Shreeraksha R Aithal Problem name : 3Sum With Multiplicity Problem link : https://leetcode.com/problems/3sum-with-multiplicity/ Difficulty : Medium Tags : Two Pointers */ #define mod 1000000007 class Solution { public: int threeSumMulti(vector<int>& arr, int target) { long long answer = 0; ...
true
683f2b4e3230b50634f054dd8506506eef8f64a7
C++
casperwang/OJproblems
/UVa judge/#10200_Prime Time.cpp
UTF-8
943
2.65625
3
[]
no_license
#include <iostream> #include <cstdio> #include <cmath> #include <vector> #define N 10000 using namespace std; int a, b; bool not_prime[N+5]; bool make_prime[N+5]; vector <int> primes; int main() { for (int i = 2; i <= 100; i++) { if (!not_prime[i]) { for (int j = i*i; j <= N; j+=i) { not_prime[j] ...
true
9a5c08b4432e63425db95dcf9c2450d34bf2fa69
C++
pokachopotun/everythingWrongWithPinocchio
/cpp_examples/shared_ptr_aliasing.cpp
UTF-8
421
3.234375
3
[]
no_license
#include <vector> #include <iostream> #include <memory> using namespace std; struct My { My(size_t size) : A(size) { for (size_t i = 0; i < size; ++i) { A[i] = static_cast<int>(i); } } vector<int> A; }; int main() { shared_ptr<int> a; { auto ptr = make_shared<M...
true
7bc74362205911978c857796f5c18bb5b20a5454
C++
sinianyutian/offer
/Offer/面试题35:第一个只出现一次的字符.cpp
GB18030
1,715
4.28125
4
[]
no_license
/* * * 35һֻһεַ * һַ(1<=ַ<=10000ȫĸ)ҵһֻһεַ,λ * */ #include <string> using namespace std; int FirstNotRepeatingChar(string str) { //ֵж if (!str.size()) { return 0; } //ַhash const int size = 256; unsigned int hash_table[256]; for (int i = 0; i < size; i++) { hash_table[i] = 0; } //ͳַַ for (auto ch : str...
true
3cd323c82e650de06ebebf65f41197d0b3604cf1
C++
MensInvictaManet/superbingo_cocos
/Classes/LinkedList.cpp
UTF-8
1,520
3.484375
3
[ "MIT" ]
permissive
////#include "LinkedList.h" // //template<class T> //LinkedList<T>::LinkedList(void) //{ // pHead = NULL; // pTail = NULL; // nElements = 0; //} // //template<class T> //LinkedList<T>::~LinkedList(void) //{ // for(int i = 0; i < nElements; i++) // { // pop_back(); // } // // pHead = NULL; // pTail = NULL; //} // //tem...
true
fa7825707fda399fa740d3b50232460bccce099a
C++
Xnco/Data-Structures-and-Algorithms
/TitleProject_Cpp/0067_二进制求和.cpp
UTF-8
2,021
3.578125
4
[]
no_license
 #pragma region 67_二进制求和 /* 给定两个二进制字符串,返回他们的和(用二进制表示)。 输入为非空字符串且只包含数字 1 和 0。 示例 1: 输入: a = "11", b = "1" 输出: "100" 示例 2: 输入: a = "1010", b = "1011" 输出: "10101" 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/add-binary 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 */ class Solution { public: // 一位一位算 //Runtime: 4 ms,...
true
53591eb63ded6510d6480a66e16ea230df126d5c
C++
justinm1093/paC-man
/Source/GameCode/GhostRed.cpp
UTF-8
4,337
2.515625
3
[]
no_license
#define GHOST_RED_CPP #include <stdio.h> #include <windows.h> // Header File For Windows #include <gl\gl.h> // Header File For The OpenGL32 Library #include <gl\glu.h> // Header File For The GLu32 Library #include <assert.h> #include "..\\Framework\\baseTypes.h" #include <map> #inc...
true
3ac0a190f6950102b51a474cd88f36f85c9cb16c
C++
PoojaRani24/Arena
/Backtacking/N-Queen, print all solutions.cpp
UTF-8
1,070
3.265625
3
[]
no_license
//N-Queen Problem, printing all the solutions #include<bits/stdc++.h> using namespace std; void printsol(bool b[][100],int n){ static int k=1; cout<<k<<":"; cout<<endl; k++; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cout<<b[i][j]<<" "; } cout<<endl; } cout<<endl; } bool is_safe(bool b[][100],int n...
true
4b8858dd4a73c3dad3f747c8a11536827b5294b6
C++
joyce103/ITSA
/標準體重.cpp
UTF-8
309
2.765625
3
[]
no_license
#include<iostream> #include<cstdlib> #include<iomanip> using namespace std ; int main () { double tall ; double w ; int s ; while(cin >> tall >> s){ if(s==1){ w=(tall-80)*0.7 ; } else if (s==2) { w=(tall-70)*0.6 ; } cout << fixed << setprecision(1) << w << endl ; } return 0 ; }
true
3727c9f280df5158a59d18bef7f9f0e5775625c3
C++
lantian-fz/test_cpp
/test_156/test_156/main.cpp
GB18030
1,147
3.484375
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS 1 //-67. //ַǵĺͣöƱʾ //Ϊ ǿ ַֻ 1 0 //: a = "11", b = "1" //: "100" // //: a = "1010", b = "1011" //: "10101" //ʾ //ÿַַ '0' '1' ɡ //1 <= a.length, b.length <= 10^4 //ַ "0" Ͷǰ㡣 #include <iostream> #include <string> #include <algorithm> using namespace std; string addBinary(string a, stri...
true
b2a7cf39039f05ca44ce2c4f38cd374bf56abe14
C++
wiranegara777/dasprog
/contest4.cpp
UTF-8
347
2.78125
3
[]
no_license
#include <iostream> using namespace std; // int fpb(a,b) { // if (b==0) return a; // else return fpb(b, a%b); // } int main(){ int a,b,c; int count=0; cin>>a>>b>>c; while(a!=-99){ if( a > 0 && b > 0){ count++; } cin>>a; if(a == -99){break;} cin>>b>>c; } ...
true
cd8602cc542a430fd058b1008a90abac15e85357
C++
Lazik10/CPP-In-21-Days
/src/String.h
UTF-8
766
3.4375
3
[]
no_license
#pragma once #include <iostream> #include <string.h> class String { public: // Constructors String(); String(const char* const string); // Copy constr String(const String& string); // Destructor ~String(); // Overloaded operators char& operator[](unsigned short indentation); c...
true
50a64dc6bf2da7c1a0f93b17c141cac77c61b152
C++
NoahBGriffin/LoanIt
/LoanIt/SaveLoad.cpp
UTF-8
3,731
3.25
3
[]
no_license
#include "SaveLoad.h" /** * Saves the LoanIt information to an external text file named "LoanItSaveData.txt" * @param itemList the list of all the items in LoanIt * @param loanList the list of all the loans in LoanIt */ void Save(vector<Item> itemList, vector<Loan> loanList) { string loaned; Item loa...
true
b4cd4803e3c862574169d08d432c0ccbf7db9159
C++
marcelloak/ball-breaker
/Main/main.cpp
UTF-8
21,889
2.640625
3
[]
no_license
//Assignment 2 //COMP 369 //Ball Breaker Game //By Marcello Kuenzler //3140074 //December 19, 2019 #include <string> #include <vector> #include "sprite.h" #include "datafile.h" #include <allegro.h> //Define basic stats #define WHITE makecol(255, 255, 255) #define BLACK makecol(0, 0, 0) #define RED mak...
true
0c658a5c0b48899cba34fc4f54e067fc63d3f1aa
C++
QiangAI/AI_CPlus
/山东大学/Day05资料/qmake_proj/guis/frame.cpp
UTF-8
1,059
2.515625
3
[ "Apache-2.0" ]
permissive
#include "frame.h" #include <iostream> MainFrame::MainFrame(): ui(new Ui::Camera()), dev(new CameraDev()){ ui->setupUi(this); // 启动多线程 dev->start(); // 绑定后信号与槽 QObject::connect(dev, SIGNAL(sig_video(cv::Mat)), this, SLOT(show_video(cv::Mat))); } MainFrame::~MainFrame(){ delete ...
true
153275858e3eadaa71d982f1422a7d4cbd438358
C++
BobDeng1974/openGeeL
/openGeeL/renderer/texturing/textureparams.h
UTF-8
922
2.59375
3
[]
no_license
#ifndef TEXTUREPARAMETERS_H #define TEXTUREPARAMETERS_H #include "texturetype.h" namespace geeL { class TextureParameters { public: TextureParameters(); TextureParameters(FilterMode filterMode, WrapMode wrapMode = WrapMode::Repeat, AnisotropicFilter aFilter = AnisotropicFilter::None); TextureParameters(...
true
e234e66465c43ac354e7420c1808352865f67535
C++
chenyuxiangg/dayly_practice-by-lion
/龟兔赛跑.cpp
GB18030
2,641
3.140625
3
[]
no_license
/* *Ŀƣģ *ߣMr.c *ڣ2017211 */ #include<stdio.h> double tspeek;//ڹٶ double rspeek;//ӵٶ double xtime;//˯ʱ double lng;//ȫ /* *ܣǰ׼ȥϢ *룺 * */ void init()//Ϸʼ { printf("ڹٶȣ\n"); scanf_s("%lf", &tspeek);//ǵڶȫֱĽҪIJ printf("ӵٶȣ\n"); scanf_s("%lf", &rspeek); printf("˯ʱ䣺\n"); scanf_s("%lf", &xtime); printf("ȫ\n"); scanf_s("...
true
41cacb1baa87e78c758c875a69fa444020fa61c7
C++
Thhethssmuz/mmm
/test/vec/func/trig.cpp
UTF-8
4,912
3.34375
3
[ "MIT" ]
permissive
#include <catch.hpp> #include <mmm.hpp> using namespace mmm; TEST_CASE("vector relational function radians", "[vec][rel]") { SECTION("scalar") { REQUIRE(radians(90) == Approx(1.5708)); REQUIRE(radians(90.f) == Approx(1.5708)); REQUIRE(radians(90.0) == Approx(1.5708)); REQUIRE(radians(90.l) == Appro...
true
3323b4f6f3233d5126ab13bdb2e3e4151556ef07
C++
derrick0714/infer
/vn/arl/src/symptoms/PeerToPeer/PeerToPeerConfiguration.cpp
UTF-8
3,025
2.59375
3
[]
no_license
/* * File: PeerToPeerConfiguration.cpp * Author: Mike * * Created on December 10, 2009, 10:32 PM */ #include <boost/lexical_cast.hpp> #include <iostream> #include "PeerToPeerConfiguration.h" #include "PeerToPeerParams.h" #include "../IPsubnet.h" namespace vn { namespace arl { namespace symptom { P...
true
a446184f32489e9d5e5328123d8eaa7384c12804
C++
lodow/bomberman
/include/ACamera.hpp
UTF-8
950
2.515625
3
[]
no_license
#ifndef ACAMERA_H # define ACAMERA_H # include <Input.hh> # include <Clock.hh> # include <glm/glm.hpp> # include <glm/gtc/matrix_transform.hpp> # include "config.h" class ACamera { public: ACamera(const glm::vec3& pos = glm::vec3(0.0, 0.0, -10.0), const glm::vec3& forward = glm::vec3(0.0, 0.0, 0.0)); virtual ~A...
true
d9a706bed2229072461436349f649bf7b8909d1a
C++
KajiyaRyusei/WashFront
/ms_project/Source/World/grid_2D.h
SHIFT_JIS
1,942
3.03125
3
[]
no_license
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // // 2Diq // // Created by Ryusei Kajiya on 20151028 // //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //***************************************************************************** // dCN[hh~ #pragma on...
true
555c360e5a325a19a9085e48ac73552f39cef0aa
C++
moevm/oop
/8304/sanizayyad/codes/sources/LogicService/mediator.cpp
UTF-8
2,719
2.734375
3
[]
no_license
#include "mediator.hpp" #include "BattleField.hpp" #include "unit.hpp" #include "poisonobject.hpp" #include "proxy.hpp" using namespace unit; Mediator::Mediator(std::shared_ptr<BattleField> battleField, std::shared_ptr<Proxy> proxyLog) { this->battleField = battleField; this->proxyLog = proxyLog; } bool Medi...
true
01293d5894665498112518962b76248c537a68d2
C++
emtiajium/practice
/Maksud Vai/TOP Coder Algorithm Code/DP/welcometocodejam.cpp
UTF-8
896
2.96875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; char str[]="welcome to code jam"; int google(string str1); int main() { string str; int val,test,Case=1; scanf("%d\n",&test); while(test--) { getline(cin,str); val=google(str); printf("Case #%d: %04d\n",Case++,val); } return...
true
f6804574ee33744b2c8f5803fb6f46684a066bcc
C++
GuMiner/Fractal
/ObjectLoader.cpp
UTF-8
2,639
2.875
3
[ "MIT" ]
permissive
#include <algorithm> #include <sstream> #include <imgui\imgui.h> #include "WireCube.h" #include "InfiniteGrid.h" #include "ObjectLoader.h" ObjectLoader::ObjectLoader(GeometryGenerationScheduler* scheduler) : objects(), objectCreationMap(), objectCreationNames(), selectedObjectToCreate(0), selectedObject(0)...
true
9a895d721820b68ff2ae5bc81c80e209497893b0
C++
stavrossk/Common-Oblivion-Engine-Framework
/Utilities/ITypes.h
UTF-8
12,095
2.59375
3
[]
no_license
/************************************** NOTE ******************************************* This file has been imported as-is from the 'common' subproject of OBSE v0019 All credit for this code goes to the OBSE team */ #pragma once #pragma warning(disable: 4221) #include <cmath> typedef unsigned char U...
true
3bb54d9de8200c85ed411c1b28644e17d0710c7e
C++
Gowtham-369/InterviewBitMasterSolutions
/Arrays/merge_overlapping_intervals.cpp
UTF-8
2,892
3.515625
4
[]
no_license
/** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : start(0), end(0) {} * Interval(int s, int e) : start(s), end(e) {} * }; */ bool mycomp(Interval &a, Interval &b) { return a.start < b.start; } void MergeIntervals(vector<Interval> &inter...
true
3892d3c6486bd321407d398979ef42244f5911f6
C++
bhavyada/AlgorithmsTest
/FindArrIndexEqVal/src/FindArrIndexEqVal.cpp
UTF-8
1,192
3.40625
3
[]
no_license
//============================================================================ // Name : ArrIndexEqVal.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #inc...
true
a1419a72e02049c33931d90055bfafe6e5df234f
C++
Peter-Moldenhauer/CPP-Projects-Built-For-Fun
/sizeofFunction/sizeofFunction.cpp
UTF-8
1,653
4.4375
4
[]
no_license
/***************************************************************************** *Name: Peter Moldenhauer *Date: 8/19/16 *Description: This program demonstrates the use of the sizeof function. The sizeof function determines the size of something (array, variable, etc) in bytes. The sizeof function is used a lot when work...
true
6a4c21e6ca17b67bd49f703d5943b4f806e84a18
C++
surendravarma1998/my_first
/friendclass.cpp
UTF-8
227
2.953125
3
[]
no_license
#include<iostream> using namespace std; class A{ private: int a; public: A(){a=0;} friend class B; }; class B{ private: int b; public: void showA(A& x) { cout<<"A::a= "<<x.a; } }; int main() { A a; B b; b.showA(a); return 0; }
true
67adc58c929cc14bf1e0fe3e006a2d6e1fc0bd95
C++
n-n-n/cs-basics
/data_strucrure/binary_tree/heap.cpp
UTF-8
2,870
3.84375
4
[]
no_license
/* Heap / Priority Queue. Definition: - Complete binary tree. (using the array representation) - The values stored in a heap are PARTIALLY ORDERED. Two variants. - MAX-heap : a value in a node is greater than or equal to its chirdren. the root is maximum. - MIN_heap : a value in a node is less than or eqaul to its ch...
true
6f9bedf78228bfc53cfdb426c05c1f0abc19a977
C++
yupengfei8421/SLAM
/src/down_sampling.cpp
UTF-8
1,021
2.625
3
[]
no_license
#include <pcl/io/pcd_io.h> #include <pcl/filters/voxel_grid.h> int main(int argc, char** argv) { // Objects for storing the point clouds. pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>); pcl::PointCloud<pcl::PointXYZ>::Ptr filteredCloud(new pcl::PointCloud<pcl::PointXYZ>); ...
true
9e0b10b86e4839ea6f986bd99c7e8d3786d6efa2
C++
shhavel/arduino_car
/Exp02_IRremote_Buttons.ino
UTF-8
760
2.578125
3
[]
no_license
#include <IRremote.h> int RECV_PIN = 9; IRrecv irrecv(RECV_PIN); decode_results results; void setup() { Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver } void loop() { if (irrecv.decode(&results)) { switch(results.value) { case 0x20DF00FF: Serial.println("MOVE FORWARD"); ...
true
9c9162cc79345f0867ff1313ac8c6ce8249616e8
C++
Eudaemonal/cs6771_class_note
/wk2102/test.cpp
UTF-8
502
2.796875
3
[]
no_license
/* Copyright (c) 2016-2017 Eudaemon <eudaemonal@gmail.com> */ #include <iostream> #include <string> #include "test.hpp" /* Not work for blank name(heading space), get_line to get space */ using namespace std; int main(int argc, char* argv[]){ std::string name, greeting; std::cout << "Please enter your first nam...
true
8b638a9d26344ba30714c5b2bfe5e0b2b12559da
C++
zhanglei1949/LeetCodeSolution
/86-Partition List/86-Partition List.cpp
UTF-8
1,855
3.5625
4
[]
no_license
#include<iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x): val(x),next(NULL){} }; ListNode* partition(ListNode* head, int x) { //the idea is to iteratively move the elements larger than x to the back; ListNode *new_head = new ListNode(-1); ListNode *tmp...
true
54efc40cda24a6af83892c02bf33dbf578d136cc
C++
Alexandre-Tavares/other-works
/cs435 - mathhammer.h
UTF-8
15,034
2.75
3
[]
no_license
#include <iostream> #include <windows.h> #include <cstdlib> #include <time.h> using namespace std; HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); // handle to screen for colors int diceroll_generator(); int To_Wound_melee (int StrenghtVToughnessArray[][10]); int To_Hit_weaponskill_Melee (int WSArray[]...
true
dc66e2f5dd544d9691b4810450cf76b7955e04ef
C++
aniec07/ChessBase
/chess_base/WORKING_VERSION_2.1/ChessBaseTracer/chessPieceFunctions.cpp
UTF-8
474
2.96875
3
[]
no_license
char chessPiece::getColor() { return color; } string chessPiece::getType() { return type; } int chessPiece::getRow() { return (position.row); } char chessPiece::getColumn() { return (position.column); } chessPiece::chessPiece(cell pos, string name, char col) { position.row = pos.row; position.column = pos.col...
true
993fafb525e6b1036edd6d7316762bb63822fa4e
C++
rvillegasm/NuMath
/src/interpolation/newtonInterp.cpp
UTF-8
1,464
3.046875
3
[ "MIT" ]
permissive
#include "newtonInterp.h" #include <vector> #include <string> namespace numath{ namespace interpolation { std::string newton(std::vector<numath::Point> &points) { const unsigned int N = points.size(); double table[N][N]; std::string result = ""; ...
true
13316dc0c3fce856b50803d0805e5a1003c453a5
C++
aleksejleskin/RetroRocketRampage
/SmallBoxStudios/Glyph.h
UTF-8
1,159
2.515625
3
[]
no_license
#ifndef INLCUDE_GUARD_GLYPH_H #define INLCUDE_GUARD_GLYPH_H #include "CellShaderObject.h" #include "PhysicsObject.h" using namespace std; class Glyph : public PhysicsObject { public: Glyph(); Glyph( string filename, float yaw, float pitch, float roll, float scale, bool physics ); ~Glyph(); bool LoadContent(str...
true
f01ca3a1eaf034f0c45a14b28386bbf6ceb9ae8a
C++
leomaurodesenv/contest-codes
/contests/uri/uri-1251.cpp
ISO-8859-1
1,660
2.75
3
[ "MIT" ]
permissive
/* * Problema: Diga-me a Frequncia * https://www.urionlinejudge.com.br/judge/pt/problems/view/1251 */ #include <iostream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <numeric> #include <string> #include <sstream> #include <iomanip> #include <locale> #include <bitset> #include <map> #include <vector...
true
f59b71857fd60b0e5661be6406377f6bcad0c3d5
C++
faxinwang/cppNotes
/othes/io/02使用read和write函数读写二进制文件.cpp
GB18030
643
2.828125
3
[]
no_license
#include<fstream> #include<string.h> #include<iostream> using namespace std; //istream& read(unsigned char* buf,int num) //ostream& write(const unsigned char *buf,int num) int main2(){ ofstream fout("test.txt"); if(!fout){ cout<<"ļдʧ!"; return 1; } int a=123,b=0; char str[]="ļд˫ַ!",str2[50]; fout.write((...
true
267b834e330430931a9464e85dc91be230093f64
C++
SubhamKhinchi/CPP
/LinkedList/DeleteNthNode.cpp
UTF-8
1,136
3.75
4
[]
no_license
#include <bits/stdc++.h> using namespace std; struct Node{ int data; Node* next; }; void insert(Node** head, int k){ Node* temp = new Node(); temp->data = k; temp->next = *head; *head = temp; } Node* deletenode (Node** head, int key){ //if head has to be deleted. if((*he...
true
443c0a15d8c877068bbe7b666dd462a5d61c7b03
C++
genc-ahmeti/personal-projects
/C++ Projects/Visual C++ Projects/Testübungen/Testübungen/CB_Letter Count.cpp
UTF-8
1,005
3.078125
3
[]
no_license
//#include <iostream> //#include <vector> //# include <string> //using namespace std; // //string MultipleLetters(string satz) //{ // vector <string> wort (10); // int i = 0; // int merk = -1; // satz[0] = tolower(satz[0]); // // for(int n = 0; n <= satz.length(); n++) // { // while(n < satz.length() && satz[n] !=...
true
5289de70a62b23398d8a59ddfb517372018a1d4e
C++
garbb/tomtom.gps.auto.on
/old/1/tomtom.gps.auto.on/tomtom.gps.auto.on.ino
UTF-8
1,404
3.0625
3
[]
no_license
// The TomTom Mkii Bluetooth GPS receiver does not automatically turn on when power is applied via its charging port. // The power button must be held for approximately 1 second to turn it on. // This program is intented to be used with an ardunio with an I/O pin connected to one of the leads of the power button // to ...
true
e3f7bbf9e125dc9d3ea3e570acbcf8e00a5f89b2
C++
hail-pas/leetcode
/0004-median-of-two-sorted-arrays.cpp
UTF-8
1,679
3.328125
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> class Solution { public: double findMedianSortedArrays(const std::vector<int>& nums1, const std::vector<int>& nums2) { if (nums1.size() == 0 and nums2.size() == 0) return 0.0; if (nums1.size() < nums2.size()) { return findMedian...
true
694ef64cd659d43e5687cebd00e084170e6393e2
C++
sgumhold/cgv
/libs/rect_pack/RectangleBinPack/ShelfNextFitBinPack.h
ISO-8859-1
849
3
3
[ "LicenseRef-scancode-public-domain" ]
permissive
/** @file ShelfNextFitBinPack.h @author Jukka Jylnki @brief Implements the naive Shelf Next Fit bin packer algorithm. This algorithm is not recommended for real use at all - its only advantage is that it consumes only a constant amount of memory, whereas the other packers in this library use at least a linear am...
true
154aa87247ff22a385c51b02684e6021b4d74034
C++
MathProgrammer/LeetCode
/Contests/Weekly Contest 342/Programs/Minimum Number of Operations to Make All Array Elements Equal to 1.cpp
UTF-8
1,433
2.890625
3
[]
no_license
class Solution { public: int minOperations(vector<int>& nums) { int frequency_1 = 0; int g = 0; for(int n : nums) { g = __gcd(g, n); frequency_1 += (n == 1); } if(g != 1) { return -1; } if(f...
true
648534542a6b1a239e22e81a87b60c560c6b22a8
C++
AntI-HI/CSE241-HomeWorks
/HW3/main.cpp
UTF-8
3,809
3.296875
3
[]
no_license
#include "hex.h" using namespace std; int main(int argc, char *argv[]){ cout << endl << "Welcome to Drive File. " << endl << endl; cout << "/////////////////////////////////////////////////////////////////" << endl; cout << endl << "First and Second GAME" << endl << endl; cout << "//////////////////...
true
ce1512de42cdce4d7739d4b847f731a96b1243ec
C++
TzuChieh/Photon-v2
/Engine/Source/SDL/SdlDependencyResolver.h
UTF-8
1,666
2.78125
3
[ "MIT" ]
permissive
#pragma once #include "SDL/sdl_fwd.h" #include "Utility/TSpan.h" #include <string> #include <string_view> #include <unordered_map> #include <vector> #include <cstddef> #include <queue> #include <optional> namespace ph { class SdlDependencyResolver final { public: SdlDependencyResolver(); /*! @brief Submit resour...
true
ca7f7a668e752a495df6215e0895b807f3202596
C++
AdityaRJha/data_structure_n_algo
/array2.cpp
UTF-8
2,338
3.6875
4
[]
no_license
#include<iostream> using namespace std; struct Pair { int min; int max; }; Pair minmax(int arr[], int n) { Pair send; send.max = send.min = arr[0]; while(n) { if(arr[n -1] > send.max) send.max = arr[n -1]; if(arr[n-1] < send.min) send.min = arr[n-1]; ...
true
01d053b8d4f10d4a5ecfc9c3b619a1818cc7d121
C++
mcagriardic/Blackjack-cpp
/BlackJack.cpp
UTF-8
16,369
2.765625
3
[]
no_license
#include "BlackJack.h" extern BlackJack* blackjack; BlackJack::BlackJack(const int& _playerCount, const int& _noOfDeck) : playerCount(_playerCount), noOfDecks(_noOfDeck) { setFSM(); setPlayers(); }; BlackJack::~BlackJack() { for (Participants* obj : participants) delete obj; participants.clear(); d...
true
b6c993a8e7c35a7e5480a91853679fe31ca6c628
C++
asserty308/TeamProject2014
/Project/Source/Client/MainMenuState.h
UTF-8
681
2.515625
3
[]
no_license
#pragma once #include "Gamestate.h" #include "Game.hpp" #include "Sprite.hpp" #include <sstream> #include <iostream> #include <string> enum MenuState { SPLASH_SCREEN, PROMPTING_NAME, PROMPTING_IP, PROMPTING_PORT, PROMPTING_CL_PORT }; class MainMenuState : public Gamestate { private: std::string name, ip, port, cl...
true
650d7352efa2c3cba1aa46bf3cb2bee9b3330519
C++
maxenergy/graduation-design
/singlenet-tflite-class/mbase64/base64Class.cpp
UTF-8
5,471
3.03125
3
[ "Apache-2.0" ]
permissive
// // Created by axv on 2021/6/11. // #include "base64Class.h" namespace gj{ uint32_t encode_len_record=0; uint8 * base64Class::encoder(const uint8 *text, uint32_t text_len) { //计算解码后的数据长度 //由以上可知 Base64就是将3个字节的数据(24位),拆成4个6位的数据,然后前两位补零 //将其转化为0-63的数据 然后根据编码字典进行编码 int enco...
true
e798edee9eac5cf141713b0ef28339d71f27ae2a
C++
rheineke/cpp-iem
/src/iem/order.hpp
UTF-8
2,787
2.59375
3
[ "MIT" ]
permissive
// Copyright 2014 Reece Heineke<reece.heineke@gmail.com> #ifndef CPPIEM_IEM_ORDER_HPP_ #define CPPIEM_IEM_ORDER_HPP_ #include <string> #include <vector> #include "boost/pool/pool_alloc.hpp" #include "iem/contract.hpp" #include "iem/pricetimelimit.hpp" #include "iem/side.hpp" namespace iem { using RequestCode = std...
true
69714ae6a796ce3845ce9fce7f0c18c3fba0535a
C++
samatt/codeLab
/codeLabGravityForces/src/Attractor.cpp
UTF-8
776
3
3
[]
no_license
// // Attractor.cpp // codeLabGravityForces // // Created by Surya on 23/02/13. // // #include "Attractor.h" #include "ofConstants.h" Attractor:: Attractor(){ location.set(ofGetWidth()/2,ofGetHeight()/2); mass = 50; G=0.01; } void Attractor::display(){ ofSetColor(175,200); ofCircle(location.x, ...
true
25220a8b8caeadcef66a35354fe4d66164233da0
C++
sakhnik/aoc2016
/21.cpp
UTF-8
4,595
3.390625
3
[]
no_license
#include <iostream> #include <sstream> #include <fstream> #include <cassert> #include <algorithm> #include <vector> using namespace std; void Swap(string &s, int X, int Y) { swap(s[X], s[Y]); } void Swap(string &s, char A, char B) { swap(s[s.find(A)], s[s.find(B)]); } void RoL(string &s, int X) { rotate(begin(s)...
true
1eabd1dd7ca845e6d69798e4b2b5181b587bf8ad
C++
vserret/cppLyA
/src/histo2d.cc
UTF-8
1,316
3.09375
3
[]
no_license
#include <iostream> #include "histo2d.h" #include <math.h> /* for floor */ #include <string.h> /* for memset*/ using namespace std; Histo2d::Histo2d(int nnx, const double& mminx, const double& mmaxx, int nny, const double& mminy, const double& mmaxy) { nx = nnx; ny = nny; minx = mminx; miny = mminy; if (mma...
true
cfa9a3732fd3b05fad648ec2c6d5f71cbb1cac53
C++
MNL82/oakmodelview
/Lib/OakXML/XMLServiceFunctions.h
UTF-8
1,295
2.578125
3
[ "MIT" ]
permissive
/** * oakmodelview - version 0.1.0 * -------------------------------------------------------- * Copyright (C) 2017, by Mikkel Nøhr Løvgreen (mikkel@oakmodelview.com) * Report bugs and download new versions at http://oakmodelview.com/ * * This library is distributed under the MIT License. * See accompanying file ...
true
0bf959f20483f96f0e38bf54cd28d3dcbc83ef78
C++
KnewHow/TinyPathTracing
/src/main.cpp
UTF-8
2,762
2.609375
3
[]
no_license
#include <iostream> #include <thread> #include <chrono> #include "Vector.hpp" #include "common/Tools.hpp" #include "material/Material.hpp" #include "geometry/Sphere.hpp" #include "geometry/Triangle.hpp" #include "geometry/MeshTriangle.hpp" #include "Scene.hpp" #include "Renderer.hpp" int main() { int width = 784...
true
1dac9b7100398c325b2ef38320b8f98444ac344d
C++
linouk23/leetcode
/278.cpp
UTF-8
613
3.03125
3
[]
no_license
// 278. First Bad Version - https://leetcode.com/problems/first-bad-version #include <bits/stdc++.h> using namespace std; // Forward declaration of isBadVersion API. bool isBadVersion(int version); class Solution { public: int firstBadVersion(int n) { long long L = 1LL - 1; long long R = 1LL * n...
true
2666411bc5a8cfe307a78f777166e014c4178ea0
C++
utkd/lightcrawl
/src/utils.cpp
UTF-8
1,178
3.3125
3
[]
no_license
/* LightCrawl 1.0 Simple crawler to casually fetch web pages for text processing Author: Utkarsh Desai utils.cpp */ #include "utils.h" /* Function: getLinesFromFile Reads lines from a file and stores them in a vector Arguments: inputFile - An ifstream object corresponding to the input f...
true
cdeff06a10f41f2f46bb6f31ec45969d957f4408
C++
ucbrise/confluo
/libconfluo/src/archival/io/incremental_file_writer.cc
UTF-8
2,989
2.78125
3
[ "Apache-2.0" ]
permissive
#include "archival/io/incremental_file_writer.h" namespace confluo { namespace archival { incremental_file_writer::incremental_file_writer(const std::string &path, const std::string &file_prefix, size_t max_file_size) ...
true
1eaf687017601fe8521acce0aa7e6d6f40c4f5c6
C++
k0204/loli_profiler
/include/timeprofiler.h
UTF-8
606
2.75
3
[ "BSD-3-Clause", "CC-BY-4.0", "MIT", "Apache-2.0", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#ifndef TIMEPROFILER_H #define TIMEPROFILER_H #include <chrono> #include <vector> #include <QDebug> #include <QString> using sclock = std::chrono::steady_clock; struct TimerProfiler{ TimerProfiler(const QString &msg) : msg_(msg) { startTime_ = sclock::now(); } ~TimerProfiler() { auto ms =...
true
0844d0ef1938ad65953af407e9aff6f897eb5a35
C++
NishantRaj/program_files
/tsta.cpp
UTF-8
912
2.640625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair < int , int > #define pb push_back #define mp make_pair #define MOD 1000000007 #define ULL unsigned long long int ways(int N){ int total_ways = 0; if (N == 1) return 1; for (int i = 1 ; i<= N ; i++){ if (i ...
true
7c44686b56de21a0bfa50daf84749289c4129fb4
C++
yanmendes/bigdawg
/src/main/cmigrator/src/data-formatter/csv/csv.h
UTF-8
632
2.734375
3
[ "BSD-3-Clause" ]
permissive
#ifndef CSV_H #define CSV_H #include <string> #include "../format/format.h" #include "../common/formatterExceptions.h" class Csv: public Format { public: const static char defaultDelimiter; ~Csv() { } /** * Initialize the Csv formatter. * * @mode read or write (mode how to open the file) * @fileName the...
true
c687f8c6952231e89e57cdaf4996122ff1354033
C++
PeyWn/TDTS07
/lab1/main.cc
UTF-8
1,515
2.515625
3
[]
no_license
#include <systemc.h> #include "generator.h" #include "controller.h" #include "sensor.h" int sc_main(int argc, char **argv) { /* sc_set_default_time_unit(1, SC_SEC); sc_set_time_resolution(1, SC_MS); */ assert(argc == 7); sc_time sim_time(atof(argv[1]), SC_SEC); char *northfile = argv[2]; char *southf...
true