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
ffc562d8f073fca00de613754328b46fcb9b1e4c
C++
killiad/chrono-star-coupling
/Terrain/TerrainCreator.h
UTF-8
702
2.640625
3
[]
no_license
#ifndef TERRAIN_CREATOR_H #define TERRAIN_CREATOR_H #include <memory> #include "chrono_vehicle/tracked_vehicle/vehicle/TrackedVehicle.h" #include "chrono_vehicle/ChTerrain.h" #include "chrono_vehicle/ChVehicleModelData.h" namespace chrono{ namespace vehicle{ class TerrainCreator{ public: TerrainCreat...
true
015501501e0735d6869fb1397329e45f5fa92b2c
C++
sudipta02/DSA
/Assignment_2_classplus.cpp
UTF-8
1,427
2.5625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; bool visited[100005]; vector<int> a[100005]; unordered_map<int, int> map_ans; void dfs(int s, int &x, int count){ visited[s] = 1; map_ans[s]++; int i, j, k = a[s].size(); count++; for(int i = 0; i < k; i++){ j = a[s][i]; if(!vi...
true
a78ac62561c825560042b7f4871fa6a613770dfc
C++
geoo993/ComputerGraphicsWithOpenGL
/src/window/GameWindow.cpp
UTF-8
32,469
2.671875
3
[]
no_license
#include "GameWindow.h" #define SIMPLE_OPENGL_CLASS_NAME "simple_openGL_class_name" CGameWindow::CGameWindow(const CGameWindow &other) { this -> m_appName = other.m_appName; this -> m_width = other.m_width; this -> m_height = other.m_height; this -> m_fullscreen = other.m_fullscreen; } CGameWindow &C...
true
b129b52ee1cd6898a6a3e5e3e234c2650984a032
C++
avshab/KochSnowflakes
/KochSnowflakes/src/KochTriangle.h
UTF-8
883
2.828125
3
[]
no_license
#pragma once #include "KochSegment.h" #include "RandomAS.h" class KochTriangle { public: KochTriangle( const KochSegment& s1, const KochSegment& s2, const KochSegment& s3, int iter_order ); KochTriangle( const BasePoint& p1, const BasePoint& p2, const BasePoint& p3, int iter_order ); KochTriangle(){}; ...
true
fee49cdd2f4f2e8aba2cbe9ef63962951fa7e20f
C++
navidkpr/Competitive-Programming
/CodeForces/kbl_didi_ridi/518/A[ Vitaly and Strings ].cpp
UTF-8
933
3.15625
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; string s1[3]; int main() { string s, t; cin >> s >> t; int n = s.size(); for (int i = 0; i < n; i++) if (s[i] == t[i]) continue; else if (s[i] < t[i]) break; else { cout << "No such string" << endl; return 0; } for (int i = n -...
true
faba03dbc8df3d58252f7a71ad046dff9317bf45
C++
alesegdia/ecscpp
/src/lib/ecs/system/System.h
UTF-8
455
2.703125
3
[]
no_license
#ifndef __SYSTEM_H__ #define __SYSTEM_H__ #include <memory> #include <ecs/entity/EntityObserver.h> class GameWorld; /** * @brief The System class represents a piece of logic to be executed * on each world step. Systems will be executed on insert order, but * a scheduer could be done to delegate this task. */ cla...
true
a7236b97781f861f40b89c6f99bb9a6dcfb4b68a
C++
shenyute/self-practice
/cpp/trace_monitor_use.cpp
UTF-8
503
2.71875
3
[]
no_license
#include "trace_monitor.h" #include <stdio.h> #include <unistd.h> int main() { TraceMonitor monitor; // block open system call, you can reference syscallent.h std::set<int> blockCalls = {2}; monitor.BlockSysCall(blockCalls); monitor.StartTrace(); printf("child start\n"); FILE* fp = fopen("oo", "w"); fo...
true
52c5f01bad4a360174bfaf4da80330844c0fa44f
C++
mariosbikos/ShipSimulation
/ShipSimulationProject/ShipSimulationProject/Ships/Ship.h
UTF-8
1,163
2.75
3
[ "MIT" ]
permissive
#pragma once #include <iostream> #include <string> #include <vector> enum ShipType : int; enum MoveDirection : int; class GridPoint; class OceanMap; class Position2D; using namespace std; class Ship { public: Ship(); virtual ~Ship(); void SetupOceanMap(OceanMap* InOceanMap); void Action(); void Move(); sta...
true
c836409f9d2dd0347cd3f40dd15622547def4ddc
C++
shenxin-karl/MinSTL
/heap_algorithm.hpp
UTF-8
6,203
2.8125
3
[]
no_license
#ifndef HEAP_ALGORITHP_HPP #define HEAP_ALGORITHP_HPP #include "iterator.hpp" #include <utility> namespace sx { template<typename RandomIterator> void push_heap(RandomIterator const &, RandomIterator const &); template<typename RandomIterator, typename Compare> void push_heap(RandomIterator const &, RandomIterato...
true
b3c0174945054f59a4b5eaed0566cc70dbd6b666
C++
Redestroy/MRS
/Simulations/MRS_Spacial_Tasks/Default_world/controllers/EPuck_Robot/SerialCommunication.cpp
UTF-8
2,649
2.5625
3
[]
no_license
#include "SerialCommunication.h" int SerialCommunication::DEVICE_NUMBER = 0; SerialCommunication::SerialCommunication() : CommunicationDevice(DEVICE_NUMBER) { emiter = nullptr; reciever = nullptr; isMaster = false; DEVICE_NUMBER++; } SerialCommunication::SerialCommunication(webots::Robot * robot) : Communication...
true
9d2c0d2189fb4f16b6860d421032bf4127b9c45a
C++
aldebjer/pysim
/pysim/cppsource/CppSimulation.cpp
UTF-8
7,442
2.578125
3
[ "BSD-3-Clause" ]
permissive
#include "CppSimulation.hpp" #include <boost/numeric/odeint.hpp> #include <functional> #include <algorithm> #include <vector> #include <exception> namespace pysim{ struct EarlyBreakException : public std::exception { virtual const char* what() const throw() { return "A comparison resulted in an early bre...
true
290392db5a1d75218b8b9a7848a294114f23b9c4
C++
davidwahbi-playrix/practice_game
/GameTestProj/GameTestProj/Profile.cpp
UTF-8
1,568
2.609375
3
[]
no_license
#include "Profile.h" Profile::Profile() { _currentLevel = 1; } Profile::~Profile() { } void Profile::NewGame(bool &running) { if (_currentLevel == FIRSTLEVEL) { _levelLoader.LoadPlayer2(_smartPlayer); } else { if (_currentLevel < MAXLEVEL) { _levelLoader.SetPlayerStartPos2(_currentLevel, _smartPlayer)...
true
699ad4f697f59d208e10450ae453a2041dcf085f
C++
m80126colin/Judge
/before2020/TIOJ/TIOJ 1016.cpp
UTF-8
1,174
2.6875
3
[]
no_license
#include <iostream> #include <string> using namespace std; bool ox[18]; int out,base[2][4]; inline void clear() { int i; for (i=0;i<3;i++) base[(out/3)&1][i]=0; return; } inline void home() { int i; base[(out/3)&1][3]++; for (i=0;i<3;i++) base[(out/3)&1][3]+=base[(out/3)&1][i]; clear(); ret...
true
094bc44bc3c06abe2c351891801b9c620b6362d5
C++
BSU2016gr09/ShavekoIvan
/first_term/2-2.cpp
UTF-8
1,318
3.703125
4
[]
no_license
#include <iostream> using namespace std; void createArray(int a[], int N) // Массив целых чисел размера N проинициализировать случайными числами из промежутка от -N до N. Циклически сдвинуть элементы массива вправо на 1 элемент (последний элемент станет первым, 1-й станет 2-м, 2-й станет 3-м и т.д.) потом циклически сд...
true
94b54d2d20e31cb4a0c4924792baa5c7517eea88
C++
srl-ethz/3d-soft-trunk-contact
/JugglerOptiTrackMbedEsconSolution/SerialCommunicatorClassTest/main.cpp
UTF-8
778
2.59375
3
[]
no_license
#include <string> #include <iostream> #include <cstdio> #include <thread> // std::this_thread::sleep_for #include <chrono> // std::chrono::seconds //#include <windows.h> //#include <math.h> #include "SerialCommunicator.h" int main() { SerialCommunicator serialComm; float rpmMeasured = 0; float rp...
true
93a9c7193cd4068a6ce0d050571d05a86179b787
C++
josephbradleyCS/CS515
/3P/image.cpp
UTF-8
6,983
3.140625
3
[]
no_license
#include <iostream> // cout, cerr #include <fstream> // ifstream #include <sstream> // stringstream #include <string.h> using namespace std; int main(int argc, char ** argv) { if (argc != 4) { cout << "Usage: image <input image> <neg image> <rotate image>" << endl; exit(1); } stringstream ...
true
fca84c2ef951c2db5c31dea5fc5071122b04cee8
C++
win18216001/tpgame
/GServerEngine/Public/BaseEntity.h
UTF-8
294
2.828125
3
[]
no_license
#pragma once class CBaseEntity { public: CBaseEntity( int id ) { SetId( id ); } virtual ~CBaseEntity(void); virtual void Update() = 0; int GetId()const { return m_id ; } private: static long m_iNextValidId; int m_id; void SetId( int val ); };
true
1ef175599f814d77cd23cc81892d4e8697847776
C++
jlandy99/naturalSelectionSim
/Orgs.hpp
UTF-8
2,538
3.265625
3
[]
no_license
// // Org.hpp // naturalSelectionSim // // Created by John Landy on 4/30/19. // Copyright © 2019 John Landy. All rights reserved. // #ifndef Orgs_hpp #define Orgs_hpp #include <stdio.h> #include <vector> #include <cstdlib> #include <iostream> // Class containing the group of organisms and their interactions clas...
true
759865bc704424035f45eb4119cc3ed5aa88933d
C++
tempbottle/stunclient
/stun/Discovery.cpp
UTF-8
11,489
2.71875
3
[]
no_license
// // Discovery.cpp // ppio // // Created by Maoxu Li on 2/11/12. // Copyright (c) 2012 PPEngine. All rights reserved. // #include "Discovery.h" #include <stun/Buffer.h> #include <iostream> STUN_BEGIN Discovery::Discovery(const std::string& host, unsigned short port, int timeout) : _host(host) , _port(port) , _t...
true
1b4f7a8f34fe9b27e671e79395ed31e8740bb350
C++
fallen/NetBSD6
/regress/usr.bin/c++/static_destructor/static_destructor.cc
UTF-8
617
2.9375
3
[]
no_license
/* $NetBSD: static_destructor.cc,v 1.1 2007/09/17 17:37:49 drochner Exp $ */ /* * Tests proper order of destructor calls * (must be in reverse order of constructor completion). * from the gcc mailing list */ #include <iostream> using namespace std; class A { public: int i; A(int j) : i(j) { cout << "const...
true
c50866a00c9e0a6e41fe4fb02ea1d3a2874fde53
C++
Siwwyy/3_Studying_Year
/ADVANCED_PROGRAMMING_II/!C++/zadanie6_fabryka_finalna/zadanie6_fabryka_finalna/_MORSE_BEEP.h
UTF-8
4,441
2.75
3
[ "LicenseRef-scancode-other-permissive", "MIT" ]
permissive
// _MORSE_BEEP_H_ standard header /* * Copyright (c) by Damian Andrysiak. All rights reserved. * *** WERSJA FINALNA *** * *** Koniec: 04/01/2019 *** * Klasa ma za zadanie: * 1. Klasa pochodna po klasie Morse Base * 2. Produktem klasy jest mors dzwiekowy */ #ifndef _MORSE_BEEP_H_ #define...
true
0a7f6f0432377b5fee8dc7f28210eb6225f34577
C++
AnabaenaQing/Source-Code_ShaderX_GPU-Pro_GPU-Zen
/GPU Pro1/02_Geometry Manipulation/02_Rule-based Geometry/RuleBasedGeometry/ModuleOperation.h
UTF-8
3,821
2.6875
3
[ "MIT" ]
permissive
/* ********************************************************************** * Demo program for * Rule-based Geometry Synthesis in Real-time * ShaderX 8 article. * * @author: Milan Magdics * * Redistribution and use in source and binary forms, with or without * modification, are permitted for any non-commercial pr...
true
656aa3837abcd0075c8719fa6275404031642a7e
C++
Renleilei1992/Live_platform
/Junk/PracticeCpp/func14_addNum.cpp
UTF-8
336
2.78125
3
[]
no_license
#include <iostream> #include <cstdlib> using namespace std; int main(int argc,char **argv) { int i = 10; int j = 0; cout<<"Plz input the num: "; cin>>j; int ans = j/i; cout<<"Answer= ["<<ans<<"]"<<endl; ans = 11%1; cout<<"Answer= ["<<ans<<"]"<<endl; ans = -1078; cout<<"abs(ans)= ["<<abs(ans)<<"]"<<endl...
true
ad1476bfc5059d4151da9ac546e995c25648ac93
C++
oceancx/mhxy
/include/Astar.h
WINDOWS-1252
811
2.609375
3
[]
no_license
#pragma once #include "GameMap.h" #include <string> #include <list> class Astar { public: struct MapNode { int x, y; int F, G, H; MapNode* parant; }; Astar(); ~Astar(); MapNode *mPs, *mPe; std::list<MapNode*> mOpenList; std::list<MapNode*> mCloseList; // J K L I int dir_x[8] = { 0, 1, 0, -1, 1...
true
cee6df019bc4bcf73c5c6cad551e7482032bb426
C++
pgoodman/Grail-Plus
/grail/include/cfg/compute_follow_set.hpp
UTF-8
2,442
2.53125
3
[ "MIT" ]
permissive
/* * compute_follow_set.hpp * * Created on: Jan 25, 2012 * Author: petergoodman * Version: $Id$ */ #ifndef Grail_Plus_COMPUTE_FOLLOW_SET_HPP_ #define Grail_Plus_COMPUTE_FOLLOW_SET_HPP_ #include <cassert> #include <vector> #include "fltl/include/CFG.hpp" namespace grail { namespace cfg { /// com...
true
65ec6b3b2604f9bd5f0ca8afbb893864f501cf91
C++
tarunluthra123/Competitive-Programming
/CP Online - CB/Recursion/N-Queen Hard.cpp
UTF-8
889
3.46875
3
[]
no_license
/* N-QUEEN HARD You are given an empty chess board of size N*N. Find the number of ways to place N queens on the board, such that no two queens can kill each other in one move. A queen can move vertically, horizontally and diagonally. Input Format: A single integer N, denoting the size of chess board. Constraints: 1 ...
true
e54dc2f55a3b9af53d202a9119be9e3b1e43c30b
C++
jinsub1999/cppAlgorithm
/programmers/MonthlyCodeChallS2/2/3.cpp
UTF-8
2,874
2.9375
3
[]
no_license
#include <string> #include <vector> #include <iostream> #include <stack> #include <queue> #include <algorithm> using namespace std; vector<string> solution(vector<string> s) { vector<string> answer; for (auto elem : s) { string prev = ""; stack<char> St; stack<char> Qu; i...
true
e97ddda3f97dff8e4eb01e713846b4d9a23445ec
C++
salmandotexe/Codeforces
/George and Accommodation.cpp
UTF-8
266
2.75
3
[]
no_license
//https://codeforces.com/problemset/problem/467/A #include <iostream> using namespace std; int main() { int n,a,b; cin >> n; int res=0; while(n--) { cin >> a >> b; if(b-a>=2) res++; } cout << res << endl; }
true
8dae9e3c5e0335d8ba10972bc24280a08fb0da79
C++
muktadirkhan889/cp-practice
/leetcode/number-of-steps-to-reduce-a-number-to-zero.cpp
UTF-8
566
3.703125
4
[]
no_license
/* https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero */ // Recursive class Solution { public: int numberOfSteps (int num) { if(num==0) { return 0; } return 1 + numberOfSteps(num%2==0 ? num/2 : num-1); } }; // Iterative class Solution { public: in...
true
8445c1f675f43d7aa3f50f63da56811614ee35cd
C++
Meeeeeow/Sorting_Algorithms
/Codeforces-800/BoringApartments.cpp
UTF-8
410
2.625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main(void) { int t; cin>>t; while(t--) { string s; int sum =0; cin>>s; if(s.size()<4) { sum +=((s[0]-'0')-1)*10; for(int i=1;i<=s.size();i++) sum+=i; cout<<sum<<en...
true
11f9ac60bc1440e45f89ced2c4247c7cedcc6de0
C++
xusx1024/cpp-learning
/练习/4.9练习.cpp
UTF-8
1,454
3.515625
4
[]
no_license
#include <iostream> using namespace std; int main() { /* 4.28 cout << "int:"<< sizeof(int) << endl; cout << "char:"<< sizeof(char) << endl; cout << "long:"<< sizeof(long) << endl; cout << "short:"<< sizeof(short) << endl; cout << "double:"<< sizeof(double) << endl; cout <<...
true
0fbc8f210d134ba954d38f4f9f17fd3020212bc8
C++
momchiltues19/Classroom
/oop/copy_constructor.cpp
UTF-8
1,603
3.59375
4
[]
no_license
#include <iostream> #include <exception> using namespace std; class Stack { const static int chunk_ = 2; int size_; int *data_; int top_; public: Stack() : size_(chunk_), data_(new int[chunk_]), top_(-1) {} Stack(const Stack& other) : top_(other.top_), size_(other.size_), data_(new int[size_]) { cout ...
true
86c167bdc50defadf7d967545a2e580c80e7e0dd
C++
yenluu2506/C
/LapTrinhC/Quan Ly Sinh Vien KTX.cpp
UTF-8
9,683
2.703125
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> #include<windows.h> /*struct Sinhvien { char masinhvien[30]; char hoten[30]; char gioitinh[40]; char noisinh[30]; int namsinh; int sohopdong; }; void nhap(Sinhvien* sinhvien); void xuat(Sinhvien* sinhvien); void nhap(Sinhv...
true
58d970da7e015b570068fd5656c299c9cf4a5d10
C++
malharDeshpande/bu-met
/cs789/lib/BigUnsigned.h
UTF-8
2,250
3.359375
3
[]
no_license
#ifndef TGL_BIGUNSIGNED_H #define TGL_BIGUNSIGNED_H #include <ostream> #include <vector> #include <string> namespace tgl { /// Describe an unsigned of many many digits class BigUnsigned { public: enum Comparison { less = -1, equal = 0, greater = 1 }; // Default constructor BigUnsigned(); ...
true
a4cd423e9e31449d4ba95577dd0ea486166e5f0d
C++
rdmytruk/BasicGame
/BasicGame/RenderContext.cpp
UTF-8
6,322
2.546875
3
[ "MIT" ]
permissive
#include "RenderContext.h" #include <GL/glew.h> #include <GL\wglew.h> #include "WindowsWrapper.h" RenderContext::RenderContext() { this->glrc = nullptr; this->hdc = nullptr; this->hinstance = nullptr; this->hwnd = nullptr; } bool RenderContext::CreateApplicationWindow(glm::ivec2 position, glm::ivec2 resolution) {...
true
06b5c870fe508a892384fc08d39d985e42234b31
C++
Igoresku/Hermes
/src/Job_Queue.cpp
UTF-8
1,229
2.796875
3
[]
no_license
// // Created by Igor Duric on 11/25/19. // #include "../include/Job_Queue.h" Job_Queue::Job_Queue() { pthread_mutex_init(&mutex, nullptr); pthread_cond_init(&not_empty, nullptr); } /// Job_Queue : END void Job_Queue::Add_Job(Job* job) { RAII scope_key(&mutex); auto new_job = new Job_List_Element(jo...
true
9794c7030cca1d14ad6e70b7ede4e17f87d8e753
C++
Nguyenxuanthuan2409/BT_CSLT
/Bangcuuchuong2.cpp
UTF-8
245
2.65625
3
[]
no_license
// ct in bang cuu chuong 2 #include<iostream> #include <iomanip> using namespace std; int main () { int d = 10; int r = 5; for ( int i = 1; i<= 10; i++) { cout << " 2 x " << i << " = " << 2 * i << endl; } system ("pause"); return 0; }
true
3eb379279f850afde8539d834c99ee3a005e16ef
C++
NaufalF121/New-folder
/pemilu.cpp
UTF-8
477
3.046875
3
[]
no_license
#include <iostream> using namespace std; class gfg { public : unsigned long long gcd(unsigned long long a, unsigned long long b){ if (a == 0) return b; return gcd(b % a, a); } // Function to return LCM of two numbers unsigned long long lcm(unsigned long long a, unsigned long ...
true
09f47449fb9dba3b799a8ad50aebacf01dbe0567
C++
Aarati21/Leetcode
/148.cpp
UTF-8
705
3.09375
3
[]
no_license
/*148. Sort List Medium 2468 121 Add to List Share Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Input: -1->5->3->4->0 Output: -1->0->3->4->5*/ class Solution { public: ListNode* sortList(ListNode* head) { multise...
true
8a9da67296d7ebab779ad028777d76bdd12bb979
C++
fzls/OJ
/PAT/Advanced/1022/1022/source.cpp
UTF-8
11,977
2.640625
3
[]
no_license
/* +---------------------------------------------------------- * * @authors: 风之凌殇 <fzls.zju@gmail.com> * @FILE NAME: source.cpp * @version: v1.0 * @Time: 2016-02-25 15:33:52 * @Description: Logo 风之凌殇 [编辑资料] [登出] 主页 题目集 基本信息 题目列表 提交列表 排名 帮助 1022. Digital Library (30) 时间限制 1000 ms 内存限制 65536 kB 代码长度限制 160...
true
d2015d252be4066fc6de2c63216b921896ad2c33
C++
fredsmalley/biolab
/src/search.cpp
UTF-8
2,230
2.65625
3
[]
no_license
#include "search.h" #include "util.h" #include <iostream> void pgp_search::set_patterns() { string pattern = "State:</t[d|h]><td>"; patterns.push_back(pattern + "([[:alpha:] ]+)" + "</td>"); //string pattern = "State:"; //patterns.push_back(pattern); } void pgp_search::set_files() { string id_file_name = "....
true
c6229d81d9052c10d8654c3d5d47f23670805eea
C++
Acka1357/ProblemSolving
/BeakjoonOJ/14000/14188_Elections.cpp
UTF-8
768
2.625
3
[]
no_license
// // Created by Acka on 2017. 9. 11.. // #include <stdio.h> #include <memory.h> int e[1000]; double p[1001], d[1001][2002]; int main() { int N; while(scanf("%d", &N) == 1){ if(N == 0) break; for(int i = 1; i <= N; i++) scanf("%lf %d", &p[i], &e[i]); memset(d, 0, (N + 1) * si...
true
9e8232da5b920c75182e01e356c1d601ccb70852
C++
mkhasan/time_gap
/src/time_gap.cpp
UTF-8
2,121
3.34375
3
[]
no_license
#include <iostream> #include <time.h> #include <sys/time.h> #include <vector> #include <boost/algorithm/string.hpp> #include <assert.h> using namespace std; void print_time(char *str); int StrToTime(const string str, struct tm * tm); int Gap(const struct tm &, const struct tm &); int main(int argc, char * argv[])...
true
9de86e95d65dda17463d84a6b3b221b914eea6d1
C++
pabern/Wheezy
/Wheezy/MainWindow.cpp
UTF-8
2,593
2.875
3
[]
no_license
#include "MainWindow.hpp" using namespace std; MainWindow::MainWindow() { // Attributes of main window setWindowTitle("Welcome to Wheezy !"); // setFixedSize(1500,750); // Menus // Character creation menu menuChar = menuBar()->addMenu("Character"); // QAction *actionNewChar = new QAction...
true
90a6d609510cec18db340ce7037497dc840b8062
C++
TheBossBaby/My-Journey-Of-C-pp
/Chapter III/Exercise/DigitToSpellingConverter/DigitToSpellingConverter/Source.cpp
UTF-8
1,643
4.40625
4
[]
no_license
//This C++ programe converts digit like 0,1 .... 9 to there respective spelled word like zero, one, ...... nine //and vice-versa #include"std_lib_facilities.h" //This function takes a digit and convert it to its spelling string digit_to_spelling(int input_digit, vector <string> spelled_digit) { int i{ -1 }; //Used f...
true
4a2d71afc2783dd6d016fc32baac196f919dc33d
C++
LiuJiLan/LeetCodeStudy
/LC_105. 从前序与中序遍历序列构造二叉树/#-1.1_LC官方思路探索.cpp
UTF-8
1,230
3.203125
3
[]
no_license
//2020.10.08_#-1.1_LC官方思路探索 //未完成 struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { private: TreeNode * inConstruct(int rootVal, vector<int> leftSubTree, vector<int> rightSubTree) { TreeNode * root = new Tre...
true
31a95e418be6b48b2eb6999b51fe4a1bdcb1f5c5
C++
basti-shi031/LeetcodeCpp
/Ex82_Remove_Duplicates_from_Sorted_List_II.cpp
UTF-8
911
2.953125
3
[]
no_license
// // Created by Basti031 on 2019/11/19. // #include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode *deleteDuplicates(ListNode *head) { if(head==NULL || head->next==NULL) r...
true
3a540df5c0c3d6637cec535597097a46b6d79056
C++
HulinCedric/cpp-course
/_Packages/_Maths/DemiDroite/T_DemiDroite_N4_1.cpp
UTF-8
1,520
2.59375
3
[ "MIT" ]
permissive
// // IUT de Nice / Departement informatique / Module APO-C++ // Annee 2008_2009 - Package _Maths // // Classe DemiDroite - Tests unitaires de la methode support // (Cas nominaux) // // Auteur : A. Thuaire // #include "DemiDroite.h" #include "T:\_Tests\Tests\Tests.h" void main () { ...
true
3491f477e1758ad23f952b5a20f94a8c346a317c
C++
Mehran2013T/Sudoku-GUI
/Sudoku/core/DigitExtractor.h
UTF-8
1,888
2.65625
3
[]
no_license
#pragma once #include <opencv2\core\core.hpp> #include <boost\optional.hpp> #include <boost\serialization\nvp.hpp> using namespace cv; using boost::optional; class DigitExtractor { public: DigitExtractor(void); ~DigitExtractor(void); optional<Mat> ExtractDigit(unsigned int col, unsigned int row, unsi...
true
7b825f9e1a6486f838e7ecff2cd56b1a9a72e38f
C++
pavelsimo/ProgrammingContest
/uva/11799_Horror_Dash/P11799.cpp
UTF-8
433
2.578125
3
[]
no_license
/* @BEGIN_OF_SOURCE_CODE */ /* @JUDGE_ID: 11799 C++ "Ad Hoc" */ #include <iostream> #include <algorithm> using namespace std; int main(int argc, char *argv[]) { int TC, n, x, ans; scanf("%d",&TC); for(int tc=1; tc<=TC; ++tc) { ans=0; scanf("%d",&n); for(int i = 0; i < n; ++i) { scanf("%d",&...
true
6ad1c29e937e2a5f2491f450b98cfe170bd6ef2c
C++
ckargus/CIS200-CPP2
/Program_04/Source.cpp
UTF-8
921
3.453125
3
[]
no_license
#include<iostream> #include "LeakeyStack.h" #include "LinkedLeakyStack.h" using namespace std; int main() { LinkedLeakyStack<int> test(15); cout << "Linked Leaky stack with 20 pushs" << endl; for (int i = 0; i < 20; i++) { test.push(i); } while(!test.isEmpty()) { cout << test.peek() << endl; test.pop(); ...
true
7c47c33efff0c8059ba8d96140bc924f5e081fe6
C++
PetarSam/PostBoxAlert-IoT_Project
/MailAlert-IoT.ino
UTF-8
834
2.71875
3
[]
no_license
#include <SoftwareSerial.h> SoftwareSerial mySerial(3, 2); // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); mySerial.begin(9600); Serial.println("Initializing..."); delay(1000); mySerial.println("AT"); /...
true
1785d2d89f7e2c9172fb49dfa47526d109afc225
C++
babypuma/leetcode
/ImplementQueueusingStacks/implement_queue_using_stacks.h
UTF-8
1,739
4.0625
4
[]
no_license
/* * Author : Jeremy Zhao * Email : jqzhao@live.com * Date : 2015/07/10 * * Source : https://leetcode.com/problems/implement-queue-using-stacks/ * Problem: Implement Queue using Stacks * Description: * Implement the following operations of a queue using stacks. * * push(x) -- Push element x to the back o...
true
800bed72042769447b09e5c93c27467c8d4f07fa
C++
kimhaingvan/source-code-C-
/nam1/BTTH_CSLT/BTTH3_TR125.CPP/B2_P2_N1_N2.cpp
UTF-8
367
3.078125
3
[]
no_license
#include <iostream> using namespace std; int main() { int n1,n2,tong=0; cout << "Nhap vao so nguyen n1: "; cin >> n1; cout << "Nhap vao so nguyen n2: "; cin >> n2; while (n1 < n2) { if (n1 % 2 == 1) { cout <<n1 <<endl; } else if (n1 % 2 == 0) { tong += n1; } n1 =n1+ 1; } cout << "Tong ...
true
34e14f807c51fc33f2335621e6baa7d4a8bb4b04
C++
orihehe/Codeforces
/Codeforces Round #563 (Div. 2)/D - Ehab and the Expected XOR Problem.cpp
UTF-8
813
3.25
3
[]
no_license
/* 0이 안 나오게 하려면 1 2 1 4 1 2 1 이런 꼴이 최대를 만들 수 있다. x또한 나오지 않도록 해야하니 x가 2^n보다 작다면 켜진 비트 하나를 제외하고 같은 꼴로 출력해준다. */ #include <cstdio> #include <vector> using namespace std; /* 🐣🐥 */ int arr[19]; vector<int> vec; void prt(int cur) { if (cur == -1) return; prt(cur - 1); printf("%d ", vec[cur]); prt(cur - 1); } int main...
true
0633fdde4a42e989fdd14435ddc39a502ede83fa
C++
GarlandChaos/TessellationOpenGL
/Garland/Mesh.cpp
UTF-8
3,518
3.015625
3
[]
no_license
#include "Mesh.h" #include <iostream> Mesh::Mesh() { } Mesh::~Mesh() { } void Mesh::increaseVerticesCount() { verticesCount++; } vector<glm::vec3> Mesh::getVertices(Group group) { vector<glm::vec3> verts; for (int i = 0; i < group.getFaces().size(); i++) { for (int j = 0; j < group.getFaces()[i].getVerti...
true
91a46e79bf08f32db1b16d9b4c1b6efcbdf0f4ba
C++
jpdean/basix
/cpp/basix/dof-transformations.h
UTF-8
1,561
2.875
3
[ "MIT" ]
permissive
// Copyright (c) 2020 Chris Richardson & Matthew Scroggs // FEniCS Project // SPDX-License-Identifier: MIT #pragma once #include <vector> /// Functions to help with the creation of DOF transformation and /// direction correction. namespace basix::doftransforms { /// Reflect the DOFs on an interval /// @param deg...
true
78cbb81957ec2e51dc7437f032005b8f3d84d865
C++
stacyj929/INFO450FavoriteThing
/MyFavoriteThing/FavoriteList.cpp
UTF-8
1,294
3.359375
3
[]
no_license
#include "stdafx.h" #include "FavoriteList.h" #include <iostream> using namespace std; FavoriteList::FavoriteList() { listSize = 0; } FavoriteList::~FavoriteList() { } bool FavoriteList::isUnique(FavoriteItem movieEntry) { for (int i = 0; i < listSize; i++) { if (movieEntry.getFavoriteItem() == movieArray[i].g...
true
00a73109c9378a86863f162096a2edcb84cd8040
C++
jJayyyyyyy/OJ
/LeetCode/_1001_1100/P1021_Remove_Outermost_Parentheses.cpp
UTF-8
731
3.15625
3
[]
no_license
/* https://leetcode.com/problems/remove-outermost-parentheses/description/ 移除最外层的括号 同类题目 P1021 参考思路 https://leetcode.com/problems/remove-outermost-parentheses/discuss/270022/JavaC++Python-Count-Opened-Parenthesis */ #include <iostream> #include <string> using namespace std; const static auto c = []() { std::ios::sy...
true
e3232aa369e3a6e3b1fa8eea098db1c8ee026f5b
C++
danoconnor/RayTracer
/RayTracer/RayTracer/Sphere.h
UTF-8
1,383
3.0625
3
[]
no_license
#pragma once #include "stdafx.h" #include "Vector.h" #include "Windows.h" namespace RayTracer { class Sphere { public: Sphere(Vector center, float radius, COLORREF color, float alpha, float refraction, float reflectivity); Sphere(Vector center, float radius, const cimg_library::CImg<unsigned char> &texture,...
true
e5154d4794298c29ab53ae099b24513436d61051
C++
Faulty-Chow/MineHelper
/Source/Cell.h
UTF-8
527
3.171875
3
[]
no_license
#ifndef _CELL_H_ #define _CELL_H_ #include <assert.h> #include "Constants.h" //! cell class class Cell{ private: int m_x; int m_y; CellState m_state; bool haveValue; public: Cell(int x, int y):m_x(x),m_y(y),m_state(Unknow),haveValue(true){} int getX()const{ return m_x;} int getY()const{ return m_y;} CellStat...
true
a56db6caac975a1309073ef733939634e37d9cb8
C++
MatejSakmary/PGR_semestral_linux
/src/bezier.cpp
UTF-8
596
2.828125
3
[]
no_license
// // Created by matejs on 12/05/2021. // #include "bezier.h" glm::vec3 Bezier::getPosition(float t) { glm::vec3 position; if(!cubic){ position = (float)(glm::pow(1 - t, 2)) * from + (float)((1 - t) * 2 * t) * firstControlPoint + (float)(t * t) * to; } else{ ...
true
f5dae9a656ad9423a346d14c26bd3c6906f38e8b
C++
MMG1970/Arduino
/control_Display/control_Display.ino
UTF-8
1,134
2.640625
3
[]
no_license
#include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> //si tu display no usa pin reset, aquí pon -1 para no desperdiciar un pin de tu arduino Adafruit_SSD1306 display(-1); void setup(){ Serial.begin(9600); //Inicio el display para la AxAA dirección display.begin(S...
true
6ecc97d208c1b8421bd6b78a643ce24fcaa01201
C++
i-RIC/prepost-gui
/libs/misc/colorcontainer.h
UTF-8
1,401
2.546875
3
[ "MIT" ]
permissive
#ifndef COLORCONTAINER_H #define COLORCONTAINER_H #include "xmlattributecontainer.h" class QColor; class MISCDLL_EXPORT ColorContainer : public XmlAttributeContainer { public: /// @name Constructors and Destructor //@{ ColorContainer(const QString& name); ColorContainer(const QString& name, const ...
true
45ef4f3f179017df2fbb564d20abe95f8df0d14f
C++
jibee/STpp
/lib/PseudoPWMDisplay.cpp
UTF-8
1,710
2.625
3
[]
no_license
#include <PseudoPWMDisplay.hpp> #include <Irq.h> PseudoPWMDisplay::PseudoPWMDisplay(): m_current_pixel_weight(0), m_current_scanline(0), m_current_pseudo_pwm_counter(0) { } PseudoPWMDisplay::~PseudoPWMDisplay() { } void PseudoPWMDisplay::tick() { if(m_active) { m_current_pseudo_pwm_counter--; i...
true
0455d597605355571c1016ffbb7b604510ad2adc
C++
Maksemilian/dfs
/src/dfs_sync/sync_calc_delta_pps.h
UTF-8
2,689
2.65625
3
[]
no_license
#ifndef SYNC_CALC_DALTA_PPS_H #define SYNC_CALC_DALTA_PPS_H #include "radio_channel.h" #include <iostream> #include <qglobal.h> using namespace std; using namespace proto::receiver; /*! \addtogroup sync */ ///@{ /*! * \brief Класс для определения межканального смещения по шкале времени, * измеряемого количес...
true
947206df27450fb1653466d55a1dead49b6376b6
C++
alexrush1/ilovelabs2
/C++/1_lab(tritset)/tests.cpp
UTF-8
4,563
3.234375
3
[]
no_license
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include "tritset.h" TEST_CASE("Creating tritset") { tritset set(0); REQUIRE(set.capacity() == 0); REQUIRE(set.trit_capacity() == 0); REQUIRE_THROWS_AS(tritset(-1), std::invalid_argument); tritset set1(100); REQUIRE(set1.capacity() == 25); REQUIRE(s...
true
606d15bfe1aade3e991edcc519ba114cf31b5e1d
C++
svilchez0/hello-world
/hw02.cpp
UTF-8
2,434
3.59375
4
[]
no_license
/******************************************************************************* * AUTHOR : Samuel Vilchez * STUDENT ID : 1078959 * HOMEWORK #2 : Deck of Cards * CLASS : CS1C * SECTION : MTWTh 4:30 - 7:25pm * DUE DATE : 6/14/2018 ***************************************...
true
cb3e14400e134ce7b9b545033d2d0f29ba0083e5
C++
utec-cs-aed-2021-2/circular-array-erosCarhuancho
/stack.h
UTF-8
411
3.203125
3
[]
no_license
#include "circulararray.h" template <typename T> class StackArray : public CircularArray<T> { public: StackArray(){StackArray(0);} StackArray(int _capacity){ this->array = new T[_capacity]; this->capacity = _capacity; this->front = this->back = -1; } void push(T data){ this->p...
true
eb0336e9bf52a128772724c567b5a5b91728b187
C++
JRazek/lorem_ipsum
/gamefiles/Classes/headers/Map.h
UTF-8
1,111
2.71875
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include "Configurable.h" class Map: public Configurable{ std::map <std::string, std::string> settings; const std::string map_directory_pattern = "map";//+id this is how the catalogs are called like. for example gamefiles/maps/map1 const std::string map_name_...
true
cd10bec1882641674f2375a24605695bdcb7a0e6
C++
longqun/crpc
/crpc/trie.h
GB18030
2,613
3.234375
3
[]
no_license
#ifndef CRPC_TRIE_H_ #define CRPC_TRIE_H_ #include <unordered_map> template <typename T, typename Value> class Trie { public: struct TrieNode { //Ƿһڵ bool is_word; Value value; std::unordered_map<T, TrieNode*> trie_map; }; Trie() {} void in...
true
fce825511418fc2b2203ea53f545eebf3e0d4521
C++
kiminh/SimRank-1
/APS/link_cut.cpp
UTF-8
3,712
3.109375
3
[ "MIT" ]
permissive
#include <iostream> #include <utility> #include <vector> #include "link_cut.h" using namespace std; int depth(Node *x) { access(x); return x->sz - 1; } Node *lca(Node *x, Node *y) { access(x); return access(y); } void link(Node *x, Node *y) { access(x); access(y); x->l = y; y->p = x...
true
bb1da6f2094c01e8b3921379965ac1ca9d3a0f05
C++
mikechen66/CPP-Programming
/CPP-Programming-Language/chapter10-expression/ex07/error.cpp
UTF-8
222
2.75
3
[]
no_license
#include "error.h" // Prints a syntax error message void Error::skip(istream* input) { while(char ch = static_cast<char>(input->get())) { if(ch == '\n' || ch == ';') return; } }
true
6a97c2ba8947c2137b20228ff42ccac95c5e959e
C++
marinov98/Statistical_Calculator
/src/correlation.hpp
UTF-8
951
2.625
3
[]
no_license
/* ######################## Name: Marin Pavlinov Marinov file: correlation.hpp purpose: correlation header file. Calculates slope, y-intercept, LSRL line and Correlation Coefficient ######################## */ #include "basics.hpp" #include <iostream> #include <vector> // printing functions void displayDatasetXY(co...
true
1097643412058c470bc78d900e40f232c6e48d94
C++
szqh97/test
/cpp/designpattern/AbstractFactory/AbstractFactory.h
UTF-8
1,221
2.765625
3
[]
no_license
#ifndef _AbstractFactory_H_ #define _AbstractFactory_H_ #include "Product.h" class AbstractProductA; class AbstractProductB; class AbstracFactory { public: AbstracFactory (); virtual ~AbstracFactory (); virtual AbstractProductA* createProd...
true
de2170a8e5ffeccf33056930f4226f362d991b4e
C++
Guurkha/projekt
/tictac/tictac/State.hpp
WINDOWS-1250
468
2.515625
3
[]
no_license
#pragma once namespace Sonar { class State { public: virtual void Init() = 0; //initialize the state virtual void HandleInput() = 0; //all input in particular state virtual void Update(float dt) = 0; //anything input from user -> np jak klawisz czy cos virtual void Draw(float dt) = 0; //after ingp...
true
b281345c51246ba1e45c57284382ad0a197a0830
C++
wozenwho/networkingExample
/TCPTest/tcpserver.cpp
UTF-8
1,957
2.921875
3
[]
no_license
#include "tcpserver.h" #define SERVER_TCP_PORT 9999 // Default port #define BUFLEN 1200 //Buffer length #define MAX_NUM_CLIENTS 30 #define TRUE 1 #define FALSE 0 TCPServer::TCPServer() { } /** * * * */ int32_t TCPServer::initializeSocket (short port) { struct sockaddr_in server; if ((tcpSocket =...
true
1b8696832a48c5fd3b11a34e2aa22afec79b1c3a
C++
NikitaBannikow/AiG4sem_2
/Implementation.cpp
UTF-8
9,496
3.03125
3
[]
no_license
// This program was made by Bannikov Nikita, group 9309 #include "Header.h" #include<iostream> #include<algorithm> #include<cmath> bool compareByCountDescend(const _Character& sym_a, const _Character& sym_b) { return (sym_a->count > sym_b->count); } bool compareByCountAscend(const _Character& sym_a, co...
true
6ff5cc91e010e54bd205aaf4d65b295008fadcc7
C++
Astru43/school
/lab2_t1/lab2_t1.ino
UTF-8
1,012
2.53125
3
[]
no_license
#define LED 12 // volatile byte count=00; //sekunnit volatile byte count2=00; //minuutit volatile byte count3=00; //tunnit void setup() { Serial.begin(9600); Serial.print("Timer int test \n"); pinMode(LED, OUTPUT); noInterrupts(); // disable all interrupts TCCR1A = 0; TCCR1B = 0; TCNT1 = 0; OCR1A = 62500; // ...
true
2a2a483bbc8bc978fe08cb70852d85578feb3bfc
C++
purvasingh96/HackerRank-solutions
/algorithm/Hashing/10. distinct elements in every window.cpp
UTF-8
535
2.859375
3
[]
no_license
#include<iostream> #include<map> using namespace std; int main(){ int n, i, k; cin>>k; cin>>n; int a[n]; for(i=0;i<n;i++){ cin>>a[i]; } map<int, int> m; int dc=0; int j; for(j=0;j<k;j++){ if(m[a[j]]==0){ dc++; } m[a[j]]+=1; } cout<<dc<<"\n"; for(j=k;j<n;j++){ if(m[a[j-k...
true
9a01185cd8db598572ceedd705144b586d544df4
C++
ndlwill1020/OBB4cocos2dx3.2
/Classes/OBB.hpp
UTF-8
3,886
2.734375
3
[]
no_license
// // OBB.hpp // OBBDemo // // Created by macuser on 16/6/6. // 参考博客:http://blog.csdn.net/tom_221x/article/details/38457757 // #ifndef OBB_hpp #define OBB_hpp #include "cocos2d.h" USING_NS_CC; //弧度 radian //半径 radius /* 把2个矩形的半径距离投影到检测轴上 把2个矩形的中心点连线投影到检测轴上 判断2个矩形的中心连线投影和2个矩形的半径投影之和的大小 */ //向量概念: //单位向量是指模等...
true
c6b95ac19aa6e46105f344f686b208fe44a1b766
C++
VolodiaPG/penguin
/src/game_logic/AbstractGame.hpp
UTF-8
1,803
3.203125
3
[]
no_license
#ifndef ABSTRACT_GAME_HPP_ #define ABSTRACT_GAME_HPP_ #include <vector> #include "utils/Move.hpp" namespace game { template <class, class, class> class AbstractBoard; template <class CellT, class PlayerT, class PawnT> class AbstractGame { public: AbstractBoard<CellT, PlayerT, PawnT> *board; e...
true
a4fcf0f19ef3a6cc05575847f3b96583e17de112
C++
cavapoo2/modern_cpp_book_stuff
/algorithm/codility/prefixModSum.cpp
UTF-8
280
2.625
3
[]
no_license
//not sure if its fully tested but got 100% on codility int solution(int A, int B, int K) { if(A == B) return (A % K) == 0 ? 1 : 0; if (B < K) return 0; while(A % K != 0 && A < B) { A++; } int diff = B-A; int r = diff / K; return r + 1; }
true
a4c2a2e956c23850d6e53ba419ac9a151e7a91a2
C++
lowkey42/BanishedBlaze
/src/core/ecs/entity_handle.hpp
UTF-8
5,680
2.65625
3
[ "MIT" ]
permissive
/** Handle (unique versioned id) of an entity + generator ******************** * * * Copyright (c) 2016 Florian Oetke * * This file is distributed under the MIT License * * ...
true
49207545b05c8f02f3b224168189bcfe50c7d031
C++
drexxcbba/ITMOCOURSE_CP
/SegTreeSum.cpp
UTF-8
2,294
3.1875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; // Segment Tree structure struct segtree{ int size; vector<long long> sums; void init(int n){ //Initializing this Segment Tree empty size = 1; while(size < n) size *= 2; sums.assign(2 * size, 0LL); } void build(vector<long long> &a, int c...
true
77cfced2b0bd77c292e871d32350705bfd7983c1
C++
sahininayanthara/median
/Untitled11.cpp
UTF-8
466
3.328125
3
[]
no_license
#include <stdio.h> int main() { int i,j,n,x,array[100]; float f; printf("Enter total number of elements\n"); scanf("%d",&n); printf("Enter elements of the array\n"); for(i=0;i<n;i++){ scanf("%d",&array[i]); } for(i=0;i<n-1;i++){ for(j=i+1;j<n;j++){ if(array[i]>array[j]){ x=array[i]; array[i]=arra...
true
75c3428a186b958255e7fb1bfeec880add955b66
C++
llenroc/leetcode-ac
/cpp-leetcode/leetcode448-find-all-numbers-disappeared-in-an-array.cpp
UTF-8
626
3.140625
3
[ "MIT" ]
permissive
#include<algorithm> #include<vector> #include<unordered_set> #include<iostream> using namespace std; class Solution { public: vector<int> findDisappearedNumbers(vector<int>& nums) { unordered_set<int> se(nums.begin(), nums.end()); int i = 0; int n = nums.size(); // 原始的size vector<in...
true
d4fcf48a649a91865b66027eee7620c9b385f5a3
C++
Escapist0516/SEU_LEX-YACC
/seu_yacc/construct_table.cpp
GB18030
7,071
3.03125
3
[]
no_license
/* construct_table.cpp */ /* ﷨ 룺һķG' G'lr﷨ĺactiongoto 1G'lrdfa 2﷨״̬iIiõ״̬i﷨Ĺȷ 1[A->xaBb]IiУgotoIia=Ijôaction[i,a]Ϊ"j"aһս 2[A->x,a]IiУA!=S'ôaction[i,a]Ϊ"ԼA->x" 3[S'->S$]IiУaction[i,$]Ϊ"" 3״̬iڸսgotogotoIiA=Ijôgoto[i,A]=j 4δõΪerror 5ʼ״̬ǰ[S'->S$]״̬ */ #include "construct_table.h" void construct_table( in...
true
96fe2b99233fbe050c2e42f32265741ebcfaef54
C++
flashpoint493/shiny-octo-archer
/PlaceDescriptionService/PlaceDescriptionService/AddressExtractorTest.cpp
UTF-8
1,850
3.21875
3
[]
no_license
#include "gmock/gmock.h" #include "AddressExtractor.h" #include <algorithm> #include <string> using namespace std; using namespace testing; class AnAddressExtractor: public Test { public: AddressExtractor extractor; }; //as originally written, the matcher IsEmpty() collides with a built in matcher of gmock MATCHE...
true
5d5b1aa6ca75ae01ec5e6b755e1a50344d393cdc
C++
author-tiffany/Computer-Programming-Projects
/HW5_EX2.cpp
UTF-8
5,660
3.578125
4
[]
no_license
// Author: Tiffany Lourdraj // Course: CS1336 // Date: September 23th 2018 // Assignment: Lecture lesson #5 Exercise #2 // Compiler: Apple Xcode // Description: You will be calculating the number of seconds it will take for sound to travel though a medium. // #include <iostream> #include <iomanip> #include<math...
true
68c6a8ece45c12e6ec33df22b27d15dfd91682cd
C++
sid1980/CylinderOSG
/Figure.cpp
UTF-8
443
3
3
[]
no_license
#include "Figure.h" void Figure::setPosition(vec p) { position = p; } void Figure::setRotation(double angle, vec p) { rotation.push_back(angle); for (double d : p.v) { rotation.push_back(d); } } void Figure::setColor(vec c) { color = c; } vec Figure::getColor() { return color; } ...
true
7a8b510007a21fe3c9d75e2df89380d27c03a974
C++
uttam-bhanu/STL
/map/map.cpp
UTF-8
581
3.328125
3
[]
no_license
#include <map> using namespace std; int main() { map<int, string> m; m.insert(pair<int,string> (1, "jhon")); m.insert(pair<int,string> (2, "rahul")); m.insert(pair<int,string> (3, "ravi")); map<int, string>::iterator itr; for(itr = m.begin(); itr != m.end(); itr++) std::c...
true
7e27e3eb8493522de0ffd99af2535050366a9c8a
C++
Kevin-WangXing/CDMA_myself
/insert_celldlg.cpp
GB18030
3,600
2.609375
3
[]
no_license
#include <QGridLayout> #include <QHBoxLayout> #include <QMessageBox> #include <QDate> #include "insert_celldlg.h" insert_cellDlg::insert_cellDlg(QWidget *parent) : QDialog(parent) { cellidlabel = new QLabel; cellidlabel->setText(tr("վ")); cellid = new QLineEdit; cellnamelabel = new QLabel; cel...
true
558481f2c24d2154a6061188ac6e0bbd8f6538f7
C++
MasterJH5574/CS158-DS-Project
/vector/data/three/code.cpp
UTF-8
1,188
3.03125
3
[]
no_license
#include "vector.hpp" #include "class-integer.hpp" #include "class-matrix.hpp" #include "class-bint.hpp" #include <iostream> #include <fstream> #include <string> void TestInteger() { std::cout << "Test for classes without default constructor..." << std::endl; sjtu::vector<Integer> vInt; for (int i = 1; i...
true
d62902327f2b60025df546718429f622354bb5a6
C++
mwindson/leetcode
/src/cpp/313.super-ugly-number.cpp
UTF-8
1,746
3.53125
4
[]
no_license
/* * @lc app=leetcode id=313 lang=cpp * * [313] Super Ugly Number * * https://leetcode.com/problems/super-ugly-number/description/ * * algorithms * Medium (45.77%) * Likes: 1612 * Dislikes: 304 * Total Accepted: 108.5K * Total Submissions: 236.6K * Testcase Example: '12\n[2,7,13,19]' * * A super u...
true
e7793df0989d5ad910bd2807a806407ece33938d
C++
Tanjoodo/6502emu
/6502emu/register_procedures.cpp
UTF-8
1,678
2.671875
3
[ "MIT" ]
permissive
#include "register_procedures.h" #include "global_registers.h" using namespace reg; void _setBit(bool value, int bit_num) { if (value) Status = Status | (1 << bit_num); else Status = Status & ~(1 << bit_num); } bool _getBit(int bit_num) { uint8_t temp_s = Status; temp_s = temp_s >> bit_num; return temp_s & 1...
true
e4d4672200fe70c2b6f4ed2f55515ba1bfd3dfa7
C++
xyztiger/CodeForces
/ACM-ICPC/2020-NARPC/B.cpp
UTF-8
365
2.625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; vector<int> & dynamicProgram(vector<int> & dp) { } int main() { int s, p, m, n; cin >> s >> p >> m >> n; vector<int> days; for (int i = 0; i < n; i++) { int d; cin >> d; days.push_back(d); } int vector<int> dp(n, 0); if (s < p) { dp[0] = s;...
true
6992ad79b1576db5bb83603cdd42cdf6917d2845
C++
shahar2112/Master-Minions
/include/dispatcher.hpp
UTF-8
4,502
3.109375
3
[]
no_license
/******************************************************************************/ /* Dispatcher implementation */ /* Author - Dean Oron */ /* Date - */ /******************************************************************************/ #ifndef __ILRD_RD8586...
true
8803da2c2259272e1ec5e78b86fe04d63e9d4d64
C++
wakuwinmail/my_shojin
/AtCoder/ABC/116/A.cpp
UTF-8
170
2.671875
3
[]
no_license
#include <iostream> #include <algorithm> int main(){ int a,b,c; std::cin>>a>>b>>c; std::cout<<a*b*c/(std::max(std::max(a,b),c)*2)<<std::endl; return 0; }
true
99b429a881d38a5711cfa6551db17fd4d61c5a38
C++
darkraven74/cg
/tests/convex.cpp
UTF-8
2,788
2.5625
3
[]
no_license
#include <gtest/gtest.h> #include <boost/assign/list_of.hpp> #include <cg/operations/convex.h> #include <cg/convex_hull/graham.h> #include <misc/random_utils.h> #include "random_utils.h" using namespace util; TEST(convex, 1) { using cg::point_2; std::vector<point_2> pts = boost::assign::list_of(point_2(0, 0...
true