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
217db0aeb2febeda11d84f7a4e912efcebaaf26b
C++
YegangWu/Alogirthms
/kd-tree/rectangle.h
UTF-8
404
2.59375
3
[]
no_license
#ifndef INCLUDE_RECTANGLE_H #define INCLUDE_RECTANGLE_H #include "kd_tree.h" struct Node; class Rectangle { public: Rectangle(double xLow, double yLow, double xHigh, double yHigh); bool less(Node& node) const; bool greater(Node& node) const; bool inbetween(Node& node) const; bool contain(Node& node) const;...
true
ca725a3549c49414bb7af357c277285e5e360b37
C++
kmcnelly/TicTacToe-Gomoku-GameBoard
/TicTacToe.h
UTF-8
966
2.859375
3
[]
no_license
// TicTacToe.h : Declares TicTaceToeGame class w/ methods and instances. Also, overloaded << #pragma once //link other files #include <vector> #include <iostream> #include <fstream> #include <sstream> #include "Base.h" using namespace std; class TicTacToeGame: public GameBase { private: enum board { max_heig...
true
2082107b8556e71af42e12b1ba91f9273e165ae8
C++
timepp/superword
/SuperWord/Word.h
GB18030
5,790
2.84375
3
[]
no_license
// Word.h: interface for the CWord class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_WORD_H__F479280B_4102_4280_8D54_469EDEE875F6__INCLUDED_) #define AFX_WORD_H__F479280B_4102_4280_8D54_469EDEE875F6__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VE...
true
eb8d9bf9526445d7c290fa41eccf18e40361f0ea
C++
shnoh171/problem-solving
/backjoon-online-judge/1074-z/z.cpp
UTF-8
711
3.265625
3
[]
no_license
#include <iostream> using namespace std; // https://www.acmicpc.net/problem/1074 int NthVisit(int n, int r, int c); int main() { ios_base::sync_with_stdio(false); int n, r, c; cin >> n >> r >> c; cout << NthVisit(n, r, c) << "\n"; return 0; } int NthVisit(int n, int r, int c) { if (n == 0) return 0; if (...
true
bcb3e57adf45c7bcc4c75b72355262f006e73e81
C++
ziomal9191/git2
/test.cpp
UTF-8
384
3.03125
3
[]
no_license
#include <iostream> #include "add.h" #include "multiply.h" #include "pow.h" void areEquals(double expected, double got){ if(expected != got){ std::cout << "Expected = " << expected << "but got value" << got << "\n"; } } int main(){ areEquals(4, pow(2.0, 2)); areEquals(4, add(2,2)); areEquals(16, multiply(...
true
df70a6d78cd3f87db0272423112aa3a60bbb1026
C++
aamshukov/frontend
/framework/core/text.cpp
UTF-8
10,764
2.546875
3
[ "MIT" ]
permissive
//.............................. // UI Lab Inc. Arthur Amshukov . //.............................. #include <core\pch.hpp> #include <core\noncopyable.hpp> #include <core\domain_helper.hpp> #include <core\status.hpp> #include <core\logger.hpp> #include <core\unicode.hpp> #include <core\text.hpp> BEGIN_NAMESP...
true
e04b616780c01cc712fbe5dc35ed68cdf3df0146
C++
silverspace/samsara-sdks
/openapi-generator/cpp-tizen/src/AddressGeofencePolygon.h
UTF-8
1,708
2.796875
3
[]
no_license
/* * AddressGeofence_polygon.h * * Information about a polygon geofence. This field is only populated if the geofence is a polygon. */ #ifndef _AddressGeofence_polygon_H_ #define _AddressGeofence_polygon_H_ #include <string> #include "AddressGeofence_polygon_vertices.h" #include <list> #include "Object.h" /** \...
true
e6c43a26a780d3b89a0a8a24e27a46dfaf478e7e
C++
zhenl010/zhenl010
/practice/ExistRouteBetween/ExistRouteBetween/skip_list_set.h
UTF-8
8,344
3.3125
3
[]
no_license
#ifndef SKIP_LIST_SET_H_ #define SKIP_LIST_SET_H_ #include <cassert> #include <iterator> #include "rand_height_generator.h" namespace augment_data_structure { ////////////////////////////////////////////////////////////////////////// // TEMPLATE STRUCT less template<class ComparableType> struct DefaultLess { // func...
true
e8d30857d4e3bd723d571938956ad5d59136e961
C++
wevsty/RDPBlocker
/RDPBlocker/random_utils.cpp
UTF-8
598
3.125
3
[ "MIT" ]
permissive
#include "random_utils.h" std::string random_string(const unsigned int count, const std::string& chars_table) { std::string buffer; if (chars_table.empty()) { return buffer; } std::size_t max_table_index = chars_table.size() - 1; std::random_device rd; std::default_random_engine rng...
true
d823f458ec089efdac97acdd0e5ded9122f083b3
C++
myrrlyn/SeniorDesign
/SeniorDesign/Pilot.cpp
UTF-8
3,798
2.609375
3
[]
no_license
#include "Pilot.hpp" #include <Arduino.h> #include <stdint.h> #define PILOT_ACCEL_CLOCK 0x0028 Pilot::Pilot(pilot_motor_info_t* left, pilot_motor_info_t* right) { this->left = left; this->right = right; running = false; activity = all_stop; } void Pilot::init() { // Set up Timer 3 // We are using this as a ...
true
e1def6409e7a6c0f5e124a359d16d769e1047563
C++
ShahadatShipon/Solution-Euler-Project-Problem
/1Multi3&5.cpp
UTF-8
216
2.53125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { long long sum=0; for(int i=0;i<1000;i++){ if(i%3==0 || i%5==0){ sum+=i; } } cout << sum <<endl; }
true
2be3091c0934d1626c504cbb964a9d577ba076c7
C++
md143rbh7f/competitions
/acm-icpc/mid-atlantic-usa/08/close_enough.cpp
UTF-8
381
3.0625
3
[]
no_license
#include <iostream> using namespace std; inline double sub( int x ) { return x ? x - 0.5 : 0; } int main() { while(1) { int a, b, c, d; cin >> a >> b >> c >> d; if( !a && !b && !c && !d ) break; double lo = 9 * sub(b) + 4 * ( sub(c) + sub(d) ); double hi = 9 * ( b + 0.5 ) + 4 * ( c + d + 1 ); cout << (...
true
0659601cac71acf09276bf11d6f98d453f851395
C++
clqsrc/os_public
/public_function.cpp
GB18030
39,920
2.65625
3
[]
no_license
#include "stdafx.h" #include "os.h" #include "thread_api.h" #include "thread_lock.h" #include <iostream> #include <vector> #include <string> #include <map> #include "file_system.h" #include "public_function.h" //-------------------------------------------------- //Ҫ md5.h #ifdef __USE_MD5__ #include "md5.h" #endif /...
true
e7fbde90efa97b5aa426764ddde8af7fb4e07dca
C++
jdmack/school-gfx
/src/light.cpp
UTF-8
3,031
2.90625
3
[]
no_license
#include <iostream> #include <stdlib.h> #include "GL/glut.h" #include "light.h" #include "matrix4.h" Light::Light() { number_ = 0; enabled_ = false; set_position(0.0, 0.0, 1.0, 1.0); set_ambient(0.0, 0.0, 0.0, 1.0); set_diffuse(1.0, 1.0, 1.0, 1.0); set_specular(1.0, 1.0, 1.0, 1.0); cons...
true
eece762cbe511d6580234df609fe4f69d56fb501
C++
lkramer37/CS302-Data-Structures
/PA09/PA09.3/Heap.cpp
UTF-8
8,023
3.640625
4
[]
no_license
//Heap.cpp #include <iostream> #include <cmath> #include "Heap.h" using namespace std; /** @brief Default and Basic Constructor @param maxNumber Maximum heap size @post Creates an empty heap. Allocates enough memory for a heap containing maxNumber data items */ template < typename DataType, typename KeyType, typ...
true
20b14fc9731b5ab3d05ad02a55c4490e5c9dae7b
C++
smmousavi76/chess
/Pieces/Pawn.cpp
UTF-8
2,333
2.859375
3
[]
no_license
#include "Pawn.h" Pawn::Pawn(int owner,int count):Piece(owner) { if(owner == 0)//white { typeId=5; pos.yPos=1; pos.xPos =count; pos.yPos = 1; } else if(owner == 1)//black { typeId=11; pos.xPos =count; pos.yPos = 6; } isFirstMove...
true
7907a38d799617641660e8d6f4009037518be56e
C++
asheplyakov/mutex-internals-talk
/mutex_test.cc
UTF-8
1,554
3.0625
3
[]
no_license
#include <cstdio> #include <cstdlib> #include <functional> #include <mutex> #include <thread> #include <chrono> #include "peterson.h" #ifdef USE_STD_MUTEX typedef std::mutex lock_t; static void lock(std::mutex& lk, int /* id */) { lk.lock(); } static void unlock(std::mutex& lk, int /* id */) { lk.unlock(); } #else ...
true
3aae306af8e587a055bed56241d2c5e3cad17587
C++
Pywwo/rtype
/commons/network/datagram/EnemyDeathDatagram.hpp
UTF-8
1,356
2.53125
3
[]
no_license
/* ** EPITECH PROJECT, 2018 ** rtype ** File description: ** EnemyDeathDatagram.hpp */ /* Created the 24/11/2019 at 17:41 by jbulteau */ #ifndef RTYPE_ENEMYDEATHDATAGRAM_HPP #define RTYPE_ENEMYDEATHDATAGRAM_HPP #include "RtypeDatagram.hpp" /*! * @namespace rtype * @brief Main namespace for all rtype project */ n...
true
d57642dbe249522519e05a0662dc80812b6266fe
C++
GregoryBen/cp-lib
/hash_function.cpp
UTF-8
550
2.515625
3
[]
no_license
struct my_hash { const uint64_t RANDOM = chrono::steady_clock::now().time_since_epoch().count(); static uint64_t splitmix64(uint64_t x) { x += 0x9e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9; x = (x ^ (x >> 27)) * 0x94d049bb133111eb; return x ^ (x >> 31); } size_t operator()(uint64...
true
b03a950b7682242be3294ceb7784e33b5b3e97b6
C++
alvas/ms_interview_100
/leetcode/FizzBuzz.cpp
UTF-8
780
3.171875
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include "NormalData.h" using namespace std; class Solution { public: vector<string> fizzBuzz(int n) { vector<string> res; for (int i = 1; i <= n; ++i) { int a = i % 3, b = i % 5; if (!a && !b) { ...
true
3a67d36a191b6423e80e65ce9d1f71cf0376a082
C++
AlexRogalskiy/Duino
/arduino/microphone_can_you_hear_pin_drop/microphone_can_you_hear_pin_drop.ino
UTF-8
317
2.578125
3
[ "MIT" ]
permissive
// microphone_can_you_hear_pin_drop.ino - print to serial when sound is heard // (c) BotBook.com - Karvinen, Karvinen, Valtokari const int audioPin = A0; void setup() { Serial.begin(115200); } void loop() { int soundWave = analogRead(audioPin); // 1 if (soundWave>600) { // 2 Serial.println("Sound!"); ...
true
3b4422b31e9a4562a348019549108c9d1eb5b950
C++
demetoir/ps-solved-code
/boj/4354 문자열 제곱.cpp
WINDOWS-1252
1,236
2.59375
3
[]
no_license
//4354 ڿ #include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <queue> #include <algorithm> #include <math.h> #include <functional> #include <utility> #define ll long long #define pii pair<int, int> #define si(a) scanf("%d", &(a)) #define sc(a) scanf("%c", &(a)) #define ss(a) scanf("%s...
true
1b88633c7192b3ac363e35c427512d79b30e591d
C++
basbeu/Scorpions-et-gerbilles
/partie6/src/Environment/Wave.cpp
UTF-8
2,699
2.859375
3
[]
no_license
/* * Project : infoSV 2019 * Author : Bastien Beuchat */ #include <Environment/Wave.hpp> #include <Obstacle/Obstacle.hpp> #include <Utility/Vec2d.hpp> #include <Utility/Constants.hpp> #include <Utility/Utility.hpp> #include <Application.hpp> #include <math.h> #include <list> #include <utility> #include <SFML/Grap...
true
8ef56d50a023767961991c85a85c20ede752e4ae
C++
PanYuer/IntermediateCpp
/22B_H_6/Program_6C/LinkedList.hpp
UTF-8
710
3.234375
3
[]
no_license
// Specification file for the LinkedList class // Written By: Pan Yue // IDE: VS Code #ifndef LINKED_LIST_H #define LINKED_LIST_H #include "College.hpp" class LinkedList { private: // Declare a structure for the list struct ListNode { College college; // The value in this node ...
true
df4886aeb6558d0b83497fd9a3682741598d4690
C++
tuxaco/Ajedrez_C
/entrega/Movimiento.cc
UTF-8
943
3.03125
3
[]
no_license
/*Alberto Castillo 53241547-C || Alberto Manuel Cervantes Bañón 74246650-M*/ #include "Movimiento.h" Movimiento Movimiento::movimientoError; Movimiento::Movimiento(){} Movimiento::Movimiento(string s) { if (s.length()==4) { origen=Coordenada(s[1],s[0]); destino=Coordenada(s[3],s[2]); } else { *this=movimi...
true
61b3c97e0c14153ba2959e2cd05998404fcf7ab0
C++
patiwwb/placementPreparation
/Trees/BinaryTrees/printNodesAtKDistance.cpp
UTF-8
663
3.453125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; struct Node{ int data; struct Node *left,*right; Node(int x){ data=x; } }; void printNodesAtKDistance(Node *root,int k){ if(root==NULL)return; if(k==0){ cout<<root->data<<" "; return; } else{ printNodesAtKDistance(root->left,k-1); printNodesAtKDis...
true
c94169fe8a6234e07c4de351b7402d81161bc789
C++
roblapp/uva_online_judge
/UVA939_Genes/main.cpp
WINDOWS-1250
2,602
3.40625
3
[]
no_license
#include <iostream> #include <map> #include <vector> /* Accepted: 0.009s Description: data structures - maps, recursion */ #define read cin #define DOMINANT "dominant" #define RECESSIVE "recessive" #define NON_EXISTENT "non-existent" using namespace std; class Entry { public: vector<string> parents; string ...
true
7baecf21e895fbf800586f1ba3b4a697e0f07d6b
C++
normanlew/CS300-Assignment-4
/LinkedList.h
UTF-8
4,255
3.921875
4
[]
no_license
#ifndef LINKEDLIST_H_ #define LINKEDLIST_H_ #include <iostream> #include <fstream> using namespace std; template <class T> struct node{ T data; node<T>* next; }; template <class T> class LinkedList{ protected: node<T> *head, *last; int count; public: LinkedList(); ...
true
2424ae9792bfa6a62a13003324ff0e5974e8a3e7
C++
indexte/Labs-2sem
/Lab3a/Swap.cpp
UTF-8
106
2.578125
3
[]
no_license
#include"Swap.h" void swapM(Integers & x, Integers & y) { Integers temp = x; x = y; y = temp; }
true
b40b74384640bcbb2b3b270b1199d030823fc2ab
C++
seacmonster/CS-172-Homework
/Ex03_04/Ex03_04/ex03_04.cpp
UTF-8
669
3.921875
4
[]
no_license
//Colin Bondy //EX03-04 //This is like the exercise we did the last day of class with everyone #include <iostream> #include <string> using namespace std; string sort(string &s) { for (int i = s.length() - 1; i >= 1; i--)// Finds the max { char Max = s[0]; int Maxvalue = 0; for (int j = 1; j <= i; j++) { ...
true
ae02affe172d861cf1976925522a70a4314e03ca
C++
Demorro/AMG_Teaching_Repo
/AMG Teaching/TweeningText.cpp
UTF-8
1,390
2.796875
3
[]
no_license
#include "TweeningText.h" TweeningText::TweeningText(sf::Font &font, int textSize, sf::Vector2f position, std::string initialString, bool shouldTweenIn, bool lockedToCamera, Camera *camera) : TweenableElement(shouldTweenIn, position) { text.setFont(font); text.setCharacterSize(textSize); text.setString(initialStr...
true
4a505c13fd976f6cfd11d8ab2813bac9c22210bf
C++
SmirnovaES/mipt-archives
/algorithms 3 sem/C_Floyd/tests/InputTest.cpp
UTF-8
1,220
3.3125
3
[]
no_license
#include <gtest/gtest.h> #include <gmock/gmock.h> #include "Graph.h" using testing::Eq; namespace { class ClassDeclaration2: public testing::Test { public: Graph obj2; ClassDeclaration2 () { obj2; } }; } TEST_F(ClassDeclaration2, InputTest) { std::istringstream ss(...
true
ce35cbe629fceb15fe2b8e7f48f999cbc1a49c57
C++
human-osaka-game-2018/DeepSee-Stars
/DeepSee_Stars/DeepSee_Stars/Device/DirectXDevices/DeviceFactory/DeviceFactory.h
UTF-8
1,315
2.703125
3
[]
no_license
#ifndef DEVICE_FACTORY_H_ #define DEVICE_FACTORY_H_ #include "../../DirectXDevice/DirectXDevice.h" #include "../../DirectXGraphicDevice/DirectXGraphicDevice.h" #include "../../DirectXInputDevice/DirectXInputDevice.h" namespace device { /// <summary> /// デバイス生成クラス /// </summary> class DeviceFactory { public: ...
true
043df1547a48bc4750c58c13f18e641d7633c75e
C++
lbr15/QT_Learn
/Qtimer/Qtimer/mainwindow.cpp
UTF-8
668
2.8125
3
[]
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include "QDebug" #include "QKeyEvent" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); id1=startTimer(1000); //赋值时间 延时1000ms 每过1000ms溢出; } MainWindow::~MainWindow() { delete ui; } v...
true
9e22ab0ceed8f87947a99a4242ec43dbda06b79b
C++
blueskyyun/codeCPP_vs
/OSExperimentSum/OSsimulation/OSsimulation/PCB.h
UTF-8
587
2.578125
3
[]
no_license
#pragma once #include <iostream> #include <string> using std::string; class PCB { private: string processName; //PCB* nextPCB; int runTimeRequest; int priority; char state; public: PCB(); PCB(string pName); PCB(string pName, int runTimeRequest, int priority); string getProcessName(); //vo...
true
86a5a6de68d0540294fc4ae1682119b32b9a6194
C++
RogerGee/traffic-sim
/src/light.cpp
UTF-8
1,838
2.796875
3
[]
no_license
// light.cpp - trafficsim #include "light.h" #include "opengl.h" using namespace trafficsim; light::light(bool on) : green_time(DEFAULT_LIGHTSPEED()), step_counter(0) { if (!on) step_counter = green_time + YELLOW_TIME; } light_state light::get_state() const { if (step_counter < green_time) ret...
true
68010f0c0039048663a0298f7df202cbb365a936
C++
melugoyal/icpc
/faculty_div_powers/gcpc11a.cpp
UTF-8
836
2.9375
3
[]
no_license
#include <iostream> #include <sstream> #include <cmath> #include <vector> #include <string> using namespace std; long dp_fact(long); long rec_fact(long); int main() { int tests = 0; cin >> tests; for (int a = 0; a < tests; a++) { long n = 0; long k = 0; cin >> n; cin >>...
true
843eac3901bc377659ef74dab4bd56032d6efc4c
C++
bebhav/CPP-PIPE-NOWAIT-NonBlocking
/ClientPipe/ClientPipe/PipeHandle.h
UTF-8
456
2.53125
3
[]
no_license
#pragma once #include <iostream> #include <windows.h> class PipeHandel { public: enum class PipeState { ePipeUnknown, ePipeInitComple, ePipeRxTx, }; PipeHandel(wchar_t* name,bool isServer); ~PipeHandel(); bool Connect(); bool SendData(char* data); bool ReadData(char** data); PipeStat...
true
3ccd89dfd8e086e329643eb54cf81c21c20ea150
C++
Aryan22g/Data-Structures-and-Algorithms
/Strings/maxChar.cpp
UTF-8
808
2.78125
3
[]
no_license
#include<iostream> #include<string> #include<algorithm> #include<climits> using namespace std; int main(){ string s="abcacbade"; //bruteforceapproach; // int maxNum=INT_MIN; // for(int i=0; i<s.length(); i++){ // int count=0; // for(int j=i; j<s.length(); j++){ // if(s[i]==s[j]...
true
84386214e14c569e1dc38636ecf2bef866366341
C++
MitchellOsborne/AbyssWatchers
/Abyss Watchers - Server/src/CollisionBox.cpp
UTF-8
1,618
2.8125
3
[]
no_license
#include "CollisionBox.h" CollisionBox::CollisionBox(glm::vec2 a_oPos, glm::vec2 a_oOffset, glm::vec2 a_oSize, BoxType a_eType) { m_oPos = a_oPos; m_oOffset = a_oOffset; m_oSize = a_oSize; m_eType = a_eType; TL = glm::vec2(m_oPos.x - m_oSize.x / 2, m_oPos.y + m_oSize.y / 2); TR = glm::vec2(m_oPos.x + m_oSize.x...
true
d95d629ba6e66f5dc9a75a29fddafac8d847a3a5
C++
bassorama/FH_Aachen
/ADS/Praktikum 2/aufgb 3/queue.h
UTF-8
229
2.71875
3
[]
no_license
// Datum: 10.04.2014 #pragma once class queue { public: int* data; int L; int S; int size; queue(const int elements); ~queue(void); void Push(int item); int Pop(); void Output(); bool isFull(); bool isEmpty(); };
true
553371ee402de18ca168236040ae89a446449f93
C++
ngangwar962/C_and_Cpp_Programs
/tut_on_strings_26_june/same_frequency.cpp
UTF-8
636
2.578125
3
[]
no_license
#include<bits/stdc++.h> #include<iostream> #include<vector> using namespace std; int main() { int i,j,k,l; vector<int> vec; string str; cin>>str; int count[26]={0}; i=0; while(str[i]!='\0') { count[str[i]-'a']++; i++; } for(i=0;i<26;i++) { if(count[i]) { vec.push_back(count[i]); } } sort(vec.b...
true
bb682daa56a849b2da4d1068bc83e1d197ac6c80
C++
wokickic/cpp
/Ch02/Ch02/02_1_3.cpp
UTF-8
666
3.125
3
[]
no_license
// // 02_1_2.cpp // Ch02 // // Created by 이승원 on 2017. 2. 2.. // Copyright © 2017년 wokic. All rights reserved. // #include <iostream> #include <cstdio> using namespace std; void SwapPointer_ref(int *(&ptr1), int *(&ptr2)){ int *ptr = ptr1; ptr1 = ptr2; ptr2 = ptr; } void SwapPointer(int *ptr1, int *p...
true
a4e4713fe3c538d57a5854efe9d17f72020de287
C++
julia-lazariv/Labs
/Lab7/Lab7_1/Lab7_1/Lab7_1.cpp
WINDOWS-1251
3,117
3.296875
3
[ "MIT" ]
permissive
// Lab_7_1.cpp // < > // 7.1. // / . // 15 #include <iostream> #include <iomanip> #include <time.h> #include "windows.h" #include <string> using namespace std; void Create(int** a, const int rowCount, const int colCount, const int Low, const int High); void Print(int** a, const int rowCount, const int co...
true
1caceb8848c1cce5b132dff403cbd6777bdab90f
C++
YigalB1/Train_Road_Blocker_Wemos
/Train_Road_Blocker_Wemos/src/classes.h
UTF-8
4,927
3.328125
3
[]
no_license
#define in_range_const 10 class train_state { public: int state= 0; // the state of the train bool l_flag = false; // from left sensor bool r_flag = false; // from right sensor bool gate_open = false; // activating servo private: int nxt_state = 0; // temp to hold ...
true
2ef0e18230746158902e61fd8e3ab7bb57afed71
C++
tounaishouta/ProjectEuler
/C++/0105.cpp
UTF-8
1,881
3.28125
3
[]
no_license
#include <iostream> #include <fstream> #include <utility> #include <list> #include <set> using namespace std; inline bool is_special(list<int> as) { int n = as.size(); int array[n]; { int i = 0; for (int a : as) { array[i] = a; i++; } for (int i = n; i >...
true
d860e744e64ba9aa8d76babc01e307f8269b4760
C++
PaulC88/GamaGameEngine
/FileIOManager.cpp
UTF-8
1,491
3.09375
3
[]
no_license
#include "FileIOManager.h" #include "LogAndDebug.h" #include <fstream> #include <iostream> #include <iterator> namespace GamaGameEngine { bool FileIOManager::readFileToBuffer(std::string filePath, std::vector<unsigned char>& buffer) { std::ifstream file(filePath, std::ifstream::binary); if (file.fail()) { ...
true
e5f0964c021aa948a51315cd006f14a9f958f573
C++
khyun-kim/SW-expert-academy-study-storage
/JJongSue/D3/2806/solution.cpp
UTF-8
1,865
3.078125
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int find_queen(int y, int x, vector<vector<bool>> &board, int queennum); int main(void) { int testcase_num = 0; scanf("%d", &testcase_num); for (int testcase_i = 1; testcase_i <= testcase_num; testcase_i++) { int queennum = 0; s...
true
843f0059de7a2e11498bed95f42cdb36ef252dc6
C++
dima9777/webdav-client-cpp
/examples/client/list.cpp
UTF-8
1,283
3.015625
3
[ "curl" ]
permissive
#include <webdav/client.hpp> std::ostream resources_to_string(std::vector<std::string> & resources) { std::ostream stream; for (auto resource : resources) { stream << "\t" << "- " << resource << std::endl; } return stream; } int main() { std::map<std::string, std::string> options = ...
true
fccba4a5ccf29971a2a17d3fbfb014de13c497a6
C++
Flock19/LoadMonitor
/Bloc.cpp
ISO-8859-2
2,426
3.140625
3
[]
no_license
#include "Bloc.h" #include "Balance.h" #include "Produits.h" #include <iostream> using namespace std; Bloc::Bloc() { } Bloc::Bloc(Balance& bal, Produits& prod) { this->bal = bal; this->prod = prod; if ((bal.chargeCourante() / prod.valMoyenne()) - int(bal.chargeCourante() / prod.valMoyenne()) >= 0.5) { this->qte....
true
3e7a73303642dddfa64b0bfba7245e801877279d
C++
zaBogdan/problemeInfo
/admiteri_facultati/cluj/2016/problema_2.cpp
UTF-8
218
2.890625
3
[]
no_license
#include <iostream> using namespace std; int virusi(int n,int k){ if(n<k) return 0; if(n%2==0) return virusi(n/2,k)+1; else return virusi(n+1,k)+1; } int main(){ cout << virusi(11,3); return 0; }
true
a899c05ba9825256c4ef874b77a4b6d94cc9c857
C++
nucleus/tracker
/src/GridC.h
UTF-8
701
3.046875
3
[]
no_license
#ifndef GRIDC_H #define GRIDC_H #define GRID_CELLSIZE 16 #include <Candidate.h> #include <list> using namespace std; /*! * Class: GridC. * * This class represents the grid data structure for candidates. */ class GridC { public: GridC(void); GridC(int width, int height); /*! * Function: GetEntr...
true
9bbb16667120149409719e9a5b866d70b5468eda
C++
leannejdong/SparseTensor
/include/matrix.h
UTF-8
2,291
3.28125
3
[ "BSD-2-Clause" ]
permissive
#ifndef SPARSETENSORLIB_LIBRARY_H #define SPARSETENSORLIB_LIBRARY_H #include <utility> #include <iostream> #include <cassert> #include <map> #include <vector> using std::cerr; namespace SparseTensor { template<typename T1, typename T2> class matrix { private: std::map<std::pair<T1,T1>,T2> element_m...
true
195e1d01ca394f1926df62745f0414004961dc62
C++
unbeman/Complex-Number
/ComplexNumber.cpp
UTF-8
2,081
3.3125
3
[]
no_license
// // Created by devernua on 28.09.16. // #include <iostream> using namespace std; #include <cmath> #include "ComplexNumber.h" ComplexNumber::ComplexNumber(const double Re, const double Im, const double eps){ this->Re = Re; this->Im = Im; this->eps = eps; } ComplexNumber::ComplexNumber(const ComplexNumb...
true
3596de9798b5c8bcc0e44bc43ce7b9e8c45a8061
C++
bstatcomp/math
/stan/math/prim/fun/lb_free.hpp
UTF-8
1,139
2.984375
3
[ "BSD-3-Clause", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#ifndef STAN_MATH_PRIM_FUN_LB_FREE_HPP #define STAN_MATH_PRIM_FUN_LB_FREE_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/err.hpp> #include <stan/math/prim/fun/constants.hpp> #include <stan/math/prim/fun/identity_free.hpp> #include <stan/math/prim/fun/log.hpp> #include <cmath> namespace stan { namespa...
true
be0a0b68a06b9ade2570dcb79e6ee39ed2decb5b
C++
michalrzak/AoC2020_Scala
/20_day/task2.cpp
UTF-8
6,013
2.859375
3
[]
no_license
#include <string> #include <fstream> #include <iostream> #include <map> #include <vector> #include <algorithm> std::string getColumn(const std::vector<std::string>& tiles, size_t index){ std::string outp; for (std::string row : tiles) outp += row.at(index); return outp; } std::vector<std::string>...
true
31c3f70b9a62b374972c32c52623f8e814e591f8
C++
sujay170nanj/galaga-cinder
/tests/test_battleship.cc
UTF-8
1,133
2.8125
3
[]
no_license
#include <core/entities/battleship.h> #include <catch2/catch.hpp> using namespace::galaga; TEST_CASE("Generate Battleship hitbox") { Battleship battleship(glm::vec2(100, 100)); REQUIRE(battleship.GenerateRectPosition().getUpperLeft() == glm::vec2(80, 80)); REQUIRE(battleship.GenerateRectPosition().getLowerRig...
true
00a86855ee73d680db16f435d76fd99ad1a29d9e
C++
mikeym88/jeeh-fork
/examples/flash.cpp
UTF-8
815
2.90625
3
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
// Example of how to write to built-in flash memory. #include <jee.h> UartDev< PinA<9>, PinA<10> > console; int printf(const char* fmt, ...) { va_list ap; va_start(ap, fmt); veprintf(console.putc, fmt, ap); va_end(ap); return 0; } Flash mem; int main () { // use a flash page well above the current code...
true
fba994b6869d7e0e5b7033a67ba536dd309f1833
C++
techgarden/waterfall
/Schedule.cpp
UTF-8
1,981
3.265625
3
[]
no_license
#include "Schedule.h" char* days[] = { "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" }; Schedule::Schedule(unsigned int address) { this->address = address; } void Schedule::createAlarms() { for (byte i = 0; i < NUMOFDAYS; i++) { rules[i].createAlarms(); } } void Schedule::t...
true
acdfb923a50ab0f8e28a8c8ec7707ba2e6c7755e
C++
vietthai2512/NetworkProgramming
/Example/Client.cpp
UTF-8
9,393
2.71875
3
[]
no_license
// Task1_Client.cpp : Defines the entry point for the console application. // // Note: I define state block: -1 and state active 1 // #include "stdafx.h" #define _WINSOCK_DEPRECATED_NO_WARNINGS #include <stdio.h> #include <string.h> #include <stdlib.h> #include <WinSock2.h> #include <WS2tcpip.h> #define...
true
68b9aa7b39334111bf54c9bd0ec1f0813c5927d7
C++
Sahil12S/LeetCode
/Cplusplus/mergeKSortedLists.cpp
UTF-8
2,465
3.6875
4
[]
no_license
// USING MIN HEAP /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { struct Compare { bool operator() ( ListNode* l1, ListNode* l2 ) { return l1->val > l2->val; } }; public: ...
true
1760414009778a152bba042a9fa14a2a8384436a
C++
MrPoldi/GRK-Projekt
/src/ParticleEmiterTex.cpp
UTF-8
5,515
2.78125
3
[]
no_license
#include "ParticleEmiterTex.h" #include <cstdlib> #include "Texture.h" //ParticleEmitterTex::ParticleEmitterTex(GLuint* program) //{ // this->program = program; // // this->positionsArr = new float[PARTICLES_COUNT * 4]; // // particles.resize(PARTICLES_COUNT); // for (int i = 0; i < PARTICLES_COUNT; ++i) // { // part...
true
3907943da0a3c936630acaf41a618d0481b4f8a4
C++
Gonefar/PAT-advanced-partly
/pat68.cpp
UTF-8
2,757
3.15625
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <numeric> using namespace std; struct element { int val; int index; }; int mySum(vector <element> proj) { int sum = 0; if( 0 == proj.size() ) { return 0; } else { for( int j = 0; j < proj.size(); j++ ...
true
abcd1017eb220a08b5b03de9c6e5d47b28233860
C++
TackticalDude/algorithmsPlayground
/TOS_Equalizer/src/Equalizer.h
UTF-8
753
2.640625
3
[]
no_license
/* * Equalizer.h * * Created on: Jun 29, 2015 * Author: TackticalDude */ #ifndef EQUALIZER_H_ #define EQUALIZER_H_ #include "Coefficient.h" #include "Queue.h" #include <thread> #include <stdlib.h> #include <iostream> #include <string> /** * @class Equalizer * @brief Makes a thread to ...
true
d5bdf50cac1c4b43196e7af5f49c421ca8ec9973
C++
herzfactory/AlgospotRepository
/CPP/WeeklyCalendar.cpp
UTF-8
1,636
3.375
3
[]
no_license
#include <cstdio> #include <cstring> const int DAY_OF_WEEK = 7; int lastDayOfMonth[] = {28, 30, 31}; char dayOfTheWeek[][10] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; void __fpurge() { while (getchar() != '\n'); } int* createWeeklyCalendar(int sunday, int last, int current) {...
true
d0943333b8408bb066a9e212b8af147b00772440
C++
ArtyomAdov/learning_sibsutis
/learning/thirdparty/OS/Лабораторная №13/p2.cpp
UTF-8
657
2.515625
3
[]
no_license
#include <windows.h> #include <stdio.h> #include <string.h> int main(int argc, char* argv[]) { char buff[80]; fprintf(stdout, "<HTML>"); fprintf(stdout, "<BODY bgcolor=#FFDD00>"); fprintf(stdout, "<CENTER><TABLE>"); while (fgets(buff,80,stdin)) { char *p = strchr(buff, '\n'); if (p) ...
true
40c6d5142b2b5ea39dc82c5ee79c432533387649
C++
a5batra/LeetCode-Solutions-in-C-plus-plus
/shuffleAnArray.cpp
UTF-8
1,352
4.03125
4
[]
no_license
// // Created by Ankit Batra on 7/20/21. // /* Given an integer array nums, design an algorithm to randomly shuffle the array. * All permutations of the array should be equally likely as a result of the shuffling. * Implement the Solution class: * Solution(int[] nums) Initializes the object with the integer array n...
true
03d80fb2fa0be308b63809a84f5fa8e08c408a25
C++
victor-timoshin/Switch
/src/Switch.Core/include/Switch/System/Threading/Tasks/Parallel.hpp
UTF-8
2,923
3.09375
3
[ "MIT" ]
permissive
/// @file /// @brief Contains Switch::System::Threading::Tasks::Parallel class. #pragma once #include "Task.hpp" /// @brief The Switch namespace contains all fundamental classes to access Hardware, Os, System, and more. namespace Switch { /// @brief The System namespace contains fundamental classes and base classes...
true
ead394d5813accad3bccdf6dfc00b6c4e982a5e3
C++
vinaymenda/ignou-assignments
/mcs-21/ques-1.cpp
UTF-8
2,277
4.21875
4
[]
no_license
/* Write an algorithm that accepts a Tree as input and converts it into a Binary Tree and then prints all the leaf nodes that are part of both Tree and Binary Tree */ #include <stdio.h> #include <stdlib.h> struct node { int value; struct node *left; struct node *right; }; struct node* insert(struct node *curr...
true
4a12566776b76b2a70436188865ca8afb1d0f545
C++
shreysingla11/ssl-project
/Backend/Parser/submissions/Assignment 12/88.cpp
UTF-8
4,038
3.234375
3
[]
no_license
#include <iostream> #include <list> #include <vector> using namespace std; // Graph class represents a directed graph using adjacency list representation class Graph { public: int V; // No. of vertices vector<int> *adj; // Pointer to an array containing adjacency lists vector<int> *inv_adj; ...
true
bd7f502e930097adbacc495d241f5881f2475f1e
C++
lailianqi/-My_leetcode
/leetcode/316.h
UTF-8
2,901
3.390625
3
[]
no_license
#include <string> #include <deque> #include <algorithm> #include <vector> using namespace std; // https://segmentfault.com/a/1190000004188227 // http://www.cnblogs.com/7z7chn/p/6341453.html // https://discuss.leetcode.com/topic/31404/a-short-o-n-recursive-greedy-solution?page=1 /* Example: Given "bcabc" Return "abc" Gi...
true
b50d50a73ac5d1fc03be5b03afca8e1fd605378b
C++
alejoOxono/codeabbey-external-solutions
/184-matches-picking/184-matches-picking.cpp
UTF-8
2,013
3.125
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <assert.h> int main(int argc, char const *argv[]) { unsigned long N; int rc; errno = 0; rc = scanf(" %lu ", &N); if(rc != 1) { perror("failed to read input"); exit(-1); } errno = 0; unsigned long* result;...
true
6b4fa26d6a9f6425f91c20819416499e70c5f5f4
C++
wabisoft/waves
/src/level_io.cpp
UTF-8
1,973
2.546875
3
[]
no_license
#include "level_io.hpp" #include "json.hpp" #include "logging.hpp" #include "serialize.hpp" #include "stage.hpp" #include "system.hpp" bool LevelIO::open(Stage& stage, std::string& message) { Stage s_ = {}; SerializeError e; if(!loadStageFromFile(filename, s_, e)) { message = "Failed to load file: " + filename ...
true
00e11155a8060e151f14db8086792d0c562ccc0f
C++
I4I13I92/CppReview
/Tutorials/DS/Queue.cpp
UTF-8
4,300
3.953125
4
[]
no_license
#include <iostream> #include "Queue.h" Queue::Queue() { this->front = 0; //set the front/back to the first element this->back = 0; this->nodes = new int[8]; //set the intitial capacity of the queue to 8 this->length = 0; //variable to keep track of elements used of queue this->capacity = 8; //keep track of...
true
05bd76e23a13ed8973cdf9a785537325844ed0c6
C++
dsbabkov/MeshTranslator
/source/GeometryReader.cpp
UTF-8
623
2.6875
3
[]
no_license
#include "GeometryReader.h" #include <fstream> using namespace std; GeometryReader::GeometryReader(const string &fileName) : is_{make_unique<ifstream>(fileName)} { } bool GeometryReader::isOpen() const { return is_->is_open(); } void GeometryReader::skipCast() { int nodeCount = -1; int elementCount ...
true
48271707a6eb6e4da28c49ea586b591fe535491b
C++
khml/cyan
/cyan/include/cyan/impl/code_block.hpp
UTF-8
2,730
3.15625
3
[ "MIT" ]
permissive
/** * @file code_block.hpp * @brief impl CodeBlock template functions * @author KHML */ #ifndef CYAN_IMPL_CODE_BLOCK_HPP #define CYAN_IMPL_CODE_BLOCK_HPP namespace cyan { template<typename Control> CodeBlock& CodeBlock::includeCtrl(const Control& control) { mergeVector(lines, control.codeGen(0...
true
bef91892fa6d0abfdb0cb44d136907642a4774b6
C++
miney727/Baekjoon
/동적 계획법 1/1932_정수 삼각형/b.1932.cc
UTF-8
836
3.34375
3
[]
no_license
#include <iostream> #include <algorithm> //max함수 사용 using namespace std; int arr[500][500]; int hab[500][500]; //동적계획법 void tri(int n) { hab[0][0] = arr[0][0]; for (int i = 1; i < n; i++) { for (int j = 0; j <= i; j++) { if (j == 0) //삼각형 왼쪽 끝 { hab[i][j] = arr[i][j] + hab[i - 1][j]; } else if...
true
598277121fb45f029228ceb933679f0c74b4689c
C++
KaiPeng21/ECE368
/Project/dialog_auto.cpp
UTF-8
15,494
2.703125
3
[]
no_license
#include "dialog_auto.h" #include "ui_dialog_auto.h" #include <iostream> #include <QKeyEvent> #include <QPainter> #include <QString> #include <QTextDocument> #include <QDebug> #include <QTimer> #include <QTime> dialog_auto::dialog_auto(QWidget *parent) : QDialog(parent)//, //ui(new Ui::dialog_au...
true
4656391b3c75cafd4dd683838890decb4cb9e904
C++
jason950374/VLSI-testing-hw2
/Project1/GaloisField.cpp
UTF-8
294
2.578125
3
[]
no_license
#include "GaloisField.h" GaloisField::GaloisField(bool value){ this->value = value; } GaloisField GaloisField::operator*(const GaloisField & m2){ return GaloisField(value && m2.value); } GaloisField GaloisField::operator+(const GaloisField & m2){ return GaloisField(value != m2.value); }
true
40ac36cdd01dc99be056b7e7310cf1b9bbc24af2
C++
WayfireWM/wf-utils
/wayfire/lexer/literal.hpp
UTF-8
406
2.59375
3
[ "MIT" ]
permissive
#ifndef LITERAL_HPP #define LITERAL_HPP #include "wayfire/variant.hpp" #include <string> namespace wf { /** * @brief parse_literal Static helper method to parse a literal from a text fragment. * * @param[in] s The text fragment to convert to a literal value. * * @return The converted literal value. */ variant_...
true
153615d91d70349e7901cd7d5e62d0e97adb85ab
C++
TheUnicum/CTN_05_Hardware_3D_DirectX
/CTN_05_Hardware_3D_DirectX/src/ChiliMath.h
UTF-8
836
3.4375
3
[ "Apache-2.0" ]
permissive
#pragma once #include <math.h> constexpr float PI = 3.14159265f; constexpr double PI_D = 3.1415926535897932; template <typename T> constexpr auto sq(const T& x) noexcept { return x * x; } template<typename T> T wrap_angle(T theta) noexcept { constexpr T twoPi = (T)2 * (T)PI_D; const T mod = (T)fmod(theta, twoPi);...
true
ec3cf673e2643b3e6f8c364aff863685b5878f6d
C++
ponasenko-rs/metaprogramming-seminars
/functor.h
UTF-8
2,066
2.921875
3
[]
no_license
#pragma once #include <memory> #include "typelist.h" #include "tuple.h" namespace functor { template <int args_left, typename Result, typename Tuple, typename Invoker, typename... CollectedArgs> traits::EnableIfT<args_left != 0, Result> InvokeTupleArgs(Invoker invoker, Tuple tuple, ...
true
1a0fa279b05b9fff9b18b5ea828a3b463c537dcf
C++
mingdaz/leetcode
/_includes/leet040/leet040.cpp
UTF-8
967
2.984375
3
[ "MIT" ]
permissive
class Solution { public: vector<vector<int>> combinationSum2(vector<int>& a, int target) { sort(a.begin(),a.end()); vector<vector<int>> res; vector<int> path; helper(res,path,a,0,target); return res; } void helper(vector<vector<int>>& res, vector<int>& path, ...
true
ab73a40d084cc0096aa5e8046ff5f288a5da3d13
C++
Thomas2511/Rush00
/Game.hpp
UTF-8
650
2.6875
3
[]
no_license
#ifndef GAME_HPP # define GAME_HPP # include "Player.hpp" # include "CollisionChecker.hpp" # include "EnemySpawner.hpp" class Game { public: Game( void ); Game( Window const & win ); Game(Game const & src); ~Game( void ); Game & operator=(Game const & rhs); char getStatus() const; void refresh()...
true
3e7b0271710dd91239abd75c1736d690a5660821
C++
emil-e/rapidcheck
/include/rapidcheck/shrink/Shrink.h
UTF-8
1,622
3.0625
3
[ "BSD-2-Clause" ]
permissive
#pragma once #include "rapidcheck/Seq.h" namespace rc { namespace shrink { /// Tries to shrink the given container by removing successively smaller /// consecutive chunks of it. /// /// `Container` must support the following: /// - `RandomAccessIterator begin(Container)` /// - `RandomAccessIterator end(Container)` /...
true
6fc5461281a49bacd7b7eaee4a45b883903b5193
C++
DakkyDaWolf/OpenGL
/source/Library.Shared/ServiceContainer.cpp
UTF-8
560
2.5625
3
[ "MIT" ]
permissive
#include "pch.h" #include "ServiceContainer.h" using namespace std; namespace Library { ServiceContainer GlobalServices; void ServiceContainer::AddService(RTTI::IdType typeID, void* service) { mServices.insert(pair<RTTI::IdType, void*>(typeID, service)); } void ServiceContainer::RemoveService(RTTI::IdType ty...
true
fc38137acc4ecb37b42c801d492afd500ef91765
C++
goyeer/complete-cpp-developer-course
/course-source-files/section 4/VectorPractice/main.cpp
UTF-8
412
3.421875
3
[]
no_license
#include <iostream> #include <vector> #include <string> using namespace std; int main() { vector<string> names; names.push_back("Jackson"); names.push_back("Hoppy"); names.push_back("Orange"); names.push_back("Rozie"); names.push_back("Phillip"); names.insert(names.begin() + 2, "John Baugh"); ...
true
c155a03e6863ec8054271b691f5bddb321d8c561
C++
fafaovo/Binarytree
/二叉树非递归前序遍历.cpp
UTF-8
760
3.46875
3
[]
no_license
class Solution { public: void pre(TreeNode* root,vector<int> &arr_int) { stack<TreeNode*> Treestack; //用栈容器来遍历 if(root == nullptr) return; Treestack.push(root); while(!Treestack.empty()) { TreeNode* node = Treestack.top(); Treestack.pop...
true
40674e6bf879f5fc3bdcc7422da1ea4f27c6df08
C++
vector8/2D-Animation-TIME
/SproutPlugin/include/PcPhysicalPoint3D.hpp
UTF-8
2,401
3.140625
3
[]
no_license
#ifndef PC_PHYSICAL_POINT_3D_H #define PC_PHYSICAL_POINT_3D_H #include "HpPcApi.hpp" #include "PcString.hpp" #include "PcException.hpp" namespace hp { namespace pc { /// <summary> /// The class PcPhysicalPoint3D represents a 3D physical point, that is, a 3D representation /// of a physical point in the re...
true
1b2badd5f12583464c26aa605b5448f82f25cf8b
C++
victorcolombo/caderno
/code/hld.cpp
UTF-8
1,166
2.890625
3
[]
no_license
/* * nxt[i] = vértice mais alto da chain de i * p[i] = parente de i * query(in[a], in[b]) é a query entre os nós a e b na mesma chain (a mais alto que b) * Cuidado entre queries em vértices vs arestas! (limites inclusivos e exclusivos) */ int sz[MAXV]; vector<int> g[MAXV]; void dfs_sz(int v = 0) { sz[v] = 1;...
true
09a2cfa4e0d182d3339348dfd592507de46dd694
C++
nonanona/garbage_storage
/fonttest/src/gui.h
UTF-8
1,088
2.75
3
[]
no_license
#pragma once #include <goocanvas.h> #include <string> #include "glyf.h" class Gui { public: Gui(int w, int h) : Gui(w, h, 0, 0) {} Gui(int w, int h, int cx, int cy) : Gui(w, h, cx, cy, 1.0, 0) {} Gui(int w, int h, int cx, int cy, float scale, int margin); void drawPath(const std::string& command, const std:...
true
e853957cb42874cc7998c4e9fbce64166d5e040a
C++
wenqf11/LeetCode
/C++/40. Combination Sum II/solution.h
UTF-8
891
3.046875
3
[ "MIT" ]
permissive
#pragma once #include<vector> #include<string> #include<climits> #include<algorithm> #include<stack> #include<unordered_map> #include<sstream> using namespace std; class Solution { public: vector<vector<int>> ans; vector<vector<int>> combinationSum2(vector<int>& candidates, int target) { sort(candidates.begin(),...
true
378bc97b60a85a2fc4ab4b5c09344de6ad19cf8c
C++
Zeyu-Wang-MP/Kernel-course-project
/virtual memory management/vm_OS.h
UTF-8
6,845
2.921875
3
[]
no_license
/* * vm_OS.h * * Helper functions and variables */ #ifndef _VM_HELPER_H_ #define _VM_HELPER_H_ #include "vm_arena.h" #include "vm_pager.h" #include <vector> #include <unordered_map> #include <list> #include <unordered_set> #include <string> struct OS_page_entry { OS_page_entry(page_table_entry_t* const en...
true
bbcef78fd8e853d0f70c1b3d99930138a64d400d
C++
1A-OneAngstrom/SAMSON-Developer-Tutorials
/PyBindTutorial/external/SAMSON-SDK-wrappers/include/SBDTypePhysicalMatrix66Wrapper.hpp
UTF-8
20,246
2.796875
3
[ "BSD-3-Clause" ]
permissive
#pragma once #include "SBDQuantityWrapper.hpp" #include "SBDTypePhysicalVector3Wrapper.hpp" #include "SBDTypePhysicalVector6Wrapper.hpp" #include "SBDTypePhysicalMatrix33Wrapper.hpp" #ifdef UNITSFORPYTHON #include <string> #include <iostream> #include <vector> #include "SBDTypePhysicalMatrix66.hpp" #include "SBDQua...
true
b7601021539c1e075371c6ab65158f777ff8825b
C++
darshan-kavathe/Broken-Heroes-of-the-Feral-Vale
/hero/role.h
UTF-8
763
3.203125
3
[]
no_license
// // Created by Darshan Kavathe on 3/1/2018. // #ifndef PROJECT_1_ROLE_H #define PROJECT_1_ROLE_H #include "iostream" //using std::string namespace hero{ class Role{ public: //Their type. enum Type { FIGHTER, HEALER, TANK }; //Create the role. //@param Type type...
true
55251fcddd0843eef8674ef4e8d0c14c156d24e1
C++
valeclere/TP4
/Rectangle.cpp
UTF-8
565
3.328125
3
[]
no_license
#include "Rectangle.hpp" Rectangle::Rectangle(): Forme(Point(0,0),0,0) { std::cout << "Creation Rectangle" << std::endl; } Rectangle::Rectangle(int x, int y, int w, int h): Forme(Point(x,y), w,h) { std::cout << "Creation Rectangle" << std::endl; } std::string Rectangle::toString(void) const{ std::string ...
true
8bb462540d5c937a9a40cd49454ed70bab8551a8
C++
alisson002/Estrutura-de-dados
/Lista 2/Q2/main.cpp
UTF-8
820
3.53125
4
[]
no_license
#include <iostream> using namespace std; int separarNumeros(int numero){ while(numero>=10){ numero-=10; } return numero; } int main() { int numero,vet[100],x=0,a,j,cond=true,i=0; cout<<"Insira um numero: "; cin>>numero; while(numero>0){ vet[x] = separarNum...
true
e3e19f5dda50a8d391bb57e743c1dc322cf27b5f
C++
mgh3326/baekjoon_algorithm
/12_큐 사용하기/큐/큐/소스.cpp
UHC
1,815
3.265625
3
[]
no_license
#include<iostream> #include<string> #include <vector> #include <queue> using namespace std; int main(void) { // 200Ʈ ڿ Ǵ 迭 // 迭 ˸ NULL 1 ʿϱ⿡ 200 + 1 = 201 int num; scanf("%d", &num); queue<int> que; // default deque ̳ //queue<int, vector<int>> que; vector ̳ʸ ̿Ͽ queue ̳ for (int i = 0; i < num; i++) ...
true
c5908fe957e8a3262e2a2f9db552c88a9ad60a51
C++
fickleview/Bridge
/Temperature.ino
UTF-8
7,477
2.625
3
[]
no_license
// Last modified 2014-12-10 // Should not be modified // DS18B20 OneWire ds18b20(DS18B20_PIN); // OneWire is a Dallas Semiconductor library // DS18B20 Statemachine implementation // SM_DS18B20.Set(M_start_DS18B20); // Do that when you want to collect temps State SM_start_DS18B20() { //*DS18B20addr // Start us...
true
6691bde56c7c0252bd625df307b8d502b2f30985
C++
sandwichboyyyy/Experiment_2_Summer
/Ex2_P4.cpp
UTF-8
291
2.828125
3
[]
no_license
#include <iostream> #include <conio.h> using namespace std; int main() { int counter; cout << "Counting to 30... \n"; for(counter=1;counter<=9;counter++) { cout << counter << "," ; } for(counter=10;counter<=30;counter+=2) { cout << counter << ","; } getch(); return 0; }
true