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
dcf152a07d2224017e5f7743c87f89316ff016e3
C++
ravikjay/Steganographer
/Compressor.cpp
UTF-8
6,534
3.25
3
[]
no_license
#include "provided.h" #include "HashTable.h" //#include "anotherHashTable.h" //#include "substituteHashTable.h" //#include "saveMyHashTable.h" #include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; // ComputeHash function unsigned int computeHash (string x) { int hash = 9...
true
09a993906c0432ed215663a7b554af90215e179d
C++
SurlySilverback/rshell
/src/TestProcess.h
UTF-8
1,873
3.25
3
[]
no_license
#include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <dirent.h> #include <errno.h> #include <string> #include "Command.h" class TestProcess : public Command { private: char* flag; char* path; public: TestProcess(char* path) { std::string defa...
true
5a1596c9795522599bed240cbf8e06df48aef36d
C++
RomMarie/open_rm
/src/Graphe/robotvirtuel.cpp
UTF-8
1,948
2.875
3
[]
no_license
#include <open_rm/Graphe/robotvirtuel.h> namespace rm{ namespace Graphe{ /*! * \brief Constructeur principal d'un robot virtuel * \param posCur Pose courante * \param posPrec Pose précédente * \param d distance parcourue * \param n Indice du noeud de départ * \param b Indice de la branche de départ ...
true
88bfa790f66494eb1af3e8298289d56b4f54b12a
C++
KasperOmari/Problems
/SPOJ/TEST - Life, the Universe, and Everything.cpp
UTF-8
685
2.53125
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<string> #include<cmath> #include<math.h> #include<memory.h> #include<cctype> #include<algorithm> #include<set> #include<map> #include<queue> #include<stack> #include<utility> #include<iomanip> #includ...
true
a0d3e1ff4439b2cd965968d1fb8be4f72cb2980b
C++
michealchen17/cmd_vel
/src/cmd_vel.cpp
UTF-8
2,104
2.546875
3
[]
no_license
/** 2017-12-17 * michealchen michealchen17@163.com * * this node can subsrcibe topic teleop published from kb_teleop node. * and it can publish geometry_msgs::twistStamped msg as topic cmd_vel. * this is velocity command publish node used to drive a mobile robot to move! * only for x linear velocity ...
true
f6cbee69279790c8bf45579dad52ec307384c78d
C++
ybouret/upsylon
/src/main/y/code/utils.hpp
UTF-8
1,546
2.765625
3
[]
no_license
//! \file #ifndef Y_CODE_UTILS_INCLUDED #define Y_CODE_UTILS_INCLUDED 1 #include "y/os/platform.hpp" namespace upsylon { //! hexadecimal helpers struct hexadecimal { static const char *lowercase_word[16]; //!< "0".."f" static const char *uppercase_word[16]; //!< "0".."F" stati...
true
e9275338d49d25ed36ab5be6c4f44e14c55aaaa7
C++
yjjfirst/x-sip
/test/CallIdHeaderTest.cpp
UTF-8
2,286
2.578125
3
[]
no_license
#include "CppUTest/TestHarness.h" extern "C" { #include "CallIdHeader.h" #include "Parser.h" } TEST_GROUP(CallIdHeaderTestGroup) { }; TEST(CallIdHeaderTestGroup, CallIdHeaderParseTest) { struct CallIdHeader *id = CreateEmptyCallIdHeader(); char callidString[] = "Call-ID : 843E@TTT.COM"; Parse(callidStr...
true
a57f44e817af709da0e9d496fe3450da2b220203
C++
northWindPA/cpp_modules
/Module_03/ex02/FragTrap.cpp
UTF-8
1,938
3.03125
3
[]
no_license
#include "FragTrap.hpp" std::string FragTrap::_attack_line[10] = { "Spider in da face!", "Giant tree coming!", "Bully teenager kicking da ass!", "Dragon poop coming!", "Ass blowing!", "Fat man's fart in da face!", "Dendi face!", "Rocky Balboa's motivational speech!", "Cowabunga!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!...
true
bd2cfc45fe4c15c3b6b88def7dea275831be27e0
C++
xuedong/leet-code
/Problems/Algorithms/445. Add Two Numbers II/add-two-numbers-II.cpp
UTF-8
1,223
3.40625
3
[ "MIT" ]
permissive
#include <stack> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solution { public: ListNode*...
true
5b656b9359bbebb996e55d0308830550aa4511c3
C++
crystal95/Competetive-Programming-at-different-platforms
/summer_2k15_coding/graphs/dijkstra.cpp
UTF-8
1,425
2.875
3
[]
no_license
using namespace std; #include <iostream> #include <list> #include <algorithm> #include <stdio.h> #include <vector> #include <queue> typedef pair<int ,int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<vii> vvii; int *D; int ver,edges; void di(int start, vector<vector<ii> > &arr) { vii::iterato...
true
ea3985d2a0dac8942f869d8a470b88d3979dd966
C++
sekharkaredla/Cpp_Programs
/week2/2.2.cpp
UTF-8
195
3.15625
3
[ "MIT" ]
permissive
#include<iostream> using namespace std; int main() { int a,b; cout<<"enter two numbers : "; cin>>a>>b; if(a>b) cout<<"\nthe larger is "<<a; else cout<<"\n the larger is "<<b; return 1; }
true
78f5646ef3b8d54e0d4024a84337d4b960f6e7bb
C++
rmit-s3536515-jianning-pan/C-Assignment-2
/model/model.h
UTF-8
1,915
2.734375
3
[]
no_license
/*********************************************************************** * COSC1254 - Programming Using C++ * Semester 2 2017 Assignment #2 * Full Name : Yixuan Zhang, Jianning Pan * Student Number : s3380293, s3536515 * Course Code : COSC1254 ********************************************************...
true
fa9379bf5f16f613e08f96307a65a06cc866d1b5
C++
denisyq/LeeCode
/283_Move_Zeroes.cc
UTF-8
543
3.53125
4
[]
no_license
/* 283. Move Zeroes * Description: move 0 to the last position in vector */ class Solution { public: void moveZeroes(vector<int>& nums){ int num_zero = 0; vector<int>::iterator it = nums.begin(); while(it != nums.end() ){ if(*it == 0){ it = nums.erase(it); ...
true
68cb529d8c2a25ccf6bae7c9d926721f7f5cdd5c
C++
alexandraback/datacollection
/solutions_5658571765186560_0/C++/Wajeb/probD.cpp
UTF-8
861
2.984375
3
[]
no_license
#include <iostream> #include <fstream> #include <sstream> using namespace std; int main() { ifstream cin("probDsmall.in"); ofstream cout("probDsmall.txt"); int T; cin >> T; for(int t = 0; t < T; t++) { int X, R, C; cin >> X >> R >> C; stringstream casenum; casenum << t + 1; string casenumstr = case...
true
f1faff68de2a6bd13d5cb7d91d4c472ebb9fe230
C++
FrankieV/Fondamenti-di-Informatica
/(Appello d'esame del 15.11.2011) - Es 1/main.cpp
UTF-8
1,058
3.28125
3
[]
no_license
#include <iostream> #include <cstring> using namespace std; const int dim = 100; void Elimina_Lettere(char[],char[]); void print_Frase(char[]); int main() { char Frase[dim]; cin.getline(Frase,dim); char Elenco_Parole[strlen(Frase)]; cin.getline(Elenco_Parole,strlen(Frase)); Elimina_Lettere(Frase,E...
true
24f29bad172fae425e44f05329e9cac1c305d1fc
C++
piranna/asi-iesenlaces
/0607/funciones/digito.cpp
ISO-8859-1
1,352
3.84375
4
[]
no_license
// $Id$ // Explicacion del programa #include <stdio.h> #include <stdlib.h> int digit(int pos, int num) /* funcin, Digit(N,num) que devuelva el dgito Nsimo de un nmero num de tipo entero, teniendo en cuenta que el dgito 0 es el dgito ms a la derecha (el menos significativo). La funcin devolver -1 si el nmero no tien...
true
95cbbe9cc92046b8419aad1a09a630cc2fb81daa
C++
Hyp-ed/hyped-2018
/BeagleBone_black/src/demo_gpio.cpp
UTF-8
688
2.6875
3
[ "Apache-2.0" ]
permissive
#include <stdio.h> #include "utils/concurrent/thread.hpp" #include "utils/io/gpio.hpp" #include "utils/system.hpp" using hyped::utils::concurrent::Thread; using hyped::utils::io::GPIO; using hyped::utils::System; namespace io = hyped::utils::io; int main(int argc, char* argv[]) { System::parseArgs(argc, argv); ...
true
38501fa7602a6f63cdf04f66a47f6a781ecbc5e3
C++
sunkest/Algorithm
/Baekjoon/9205.cpp
UTF-8
368
2.5625
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; struct Point { int x; int y; }; int t, n; vector<Point> v; vector<vector<int>> g; bool* visited; bool* ans; int main(void) { cin >> t >> n; ans = new bool[t]; for (int i = 0; i < n + 2; i++) { visited[i] = false; } int x, y; ci...
true
4926b227f3d62da98180215b9e1387ade6fcd931
C++
Atrix256/RandomCode
/OneQubit/Source.cpp
UTF-8
8,364
3.171875
3
[]
no_license
#include <stdio.h> #include <array> #include <complex> typedef std::array<std::complex<float>, 2> TQubit; typedef std::array<std::complex<float>, 4> TComplexMatrix; const float c_pi = 3.14159265359f; //================================================================================= static const TQubit c_qubit0 = { 1...
true
48bfd9b8a85e8a74105b21fbf13e68dca220c0a9
C++
JonnyKong/LeetCode
/388_Longest_Absolute_File_Path.cpp
UTF-8
888
2.765625
3
[]
no_license
class Solution { int pos; int level; int length; bool type; // 0 dir, 1 file bool hasFile; void getNext(const string& s) { type = 0; level = 0; length = 0; while (pos < s.length() && s[pos] == '\t') { ++pos; ++level; } while (pos < s.length() && s[pos] != '\n') { i...
true
05ac2368b8b040d95e25315d29fb284e4293c506
C++
0xCC00FFEE/Unprotect_snippet
/screen_res/main.cpp
UTF-8
741
2.984375
3
[]
no_license
#include "wtypes.h" #include <iostream> using namespace std; /* 1024x768 can be used for automated Sandbox 800x600 can be used for automated Sandbox 640x480 can be used for automated Sandbox 1024x697 1280x800 1280x960 1680x1050 1916x1066 */ void GetResolution(int& horiz, int& verti) { RECT desktop...
true
6e7c449cdc558e959ebfefb78778d09534a3ccea
C++
kiranarsam/understanding-cpp-step-by-step
/cpp-advanced/complex-user-defined-literals.cpp
UTF-8
455
3.3125
3
[]
no_license
#include <iostream> #include <complex> using namespace std; // imaginary literal constexpr complex <double> operator"" _i(long double d) { return complex <double> { 0.0 , static_cast<double>( d )}; } int main() { complex<double> z = 3.0 + 4.0_i; complex<double> y = 2.3 + 5.0_i; cout << "...
true
aca4b13818876ec27983621a1d7dadfc39ddbe33
C++
tcoderwang913/algorithmic_study
/DivideTwoIntegers.cpp
UTF-8
526
3.34375
3
[ "Apache-2.0" ]
permissive
/** Divide two integers without using multiplication, division and mod operator. */ class Solution { public: int divide(int dividend, int divisor) { long long a = abs((double)dividend);; long long b = abs((double)divisor); long long ret = 0; while (a >= b) { long long ...
true
ceaa23fe57c9c212718eb2f5d8ac2128694dd813
C++
saitotm/Atrimx
/test/test_arithmetic_operations.cpp
UTF-8
1,891
3
3
[]
no_license
#include <iostream> #include "../src/atrimx.hpp" namespace { const int kCols = 100; const int kRows = 200; } // namespace int main() { Atrimx::Matrix<float, kRows, kCols> m1, m2; for (int i = 0; i < m1.rows(); ++i) { for (int j = 0; j < m1.cols(); ++j) { m1(i, j) = m1.ro...
true
fe186291134afd481ada74b5a8bb0d66f471eb44
C++
maojie/hackerrank
/number_theory/closet_number.cc
UTF-8
335
2.546875
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main() { int t; long long a, b, x, res; cin >> t; while (t--) { cin >> a >> b >> x; res = pow(a, b); cout << (abs(int(res / x) * x - res) <= abs((int(res / x) + 1) * x - res) ? int(res / x) * x : (int(res / x) + 1) * x) << endl; }...
true
7d8765aa1918fe51ec052022e2a9c6d5d403de2b
C++
ZombiGik/HomeWork
/Avtomorph.cpp
UTF-8
1,261
3.53125
4
[]
no_license
#include <iostream> #include <vector> #include <cmath> using namespace std; int main() { setlocale(0, ""); int n = 0; cout << "АВТОМОРФНЫЕ ЧИСЛА" << endl << endl; while (true) { int n, m; cout << "Введите диапазон для поиска автоморфных чисел (\"0 0\" для выхода) \n-> "; cin >> n; cin >> m; if (m == n ...
true
26382f4326f82b529eb4a87cbb13512a4bae65cc
C++
afnan6630/CSE225-Lab
/Lab 04/Task2/StudentInfo.h
UTF-8
768
3.390625
3
[]
no_license
#ifndef STUDENTINFO_H_INCLUDED #define STUDENTINFO_H_INCLUDED using namespace std; class StudentInfo { private: int id; string name; double cgpa; public: StudentInfo() { } StudentInfo(int i,string n, double c) { id=i;...
true
95857ead9c0bdbe2e0011476cd48a8b94bcc74ec
C++
zbigos/PGK2020
/lista_6/maputils.cpp
UTF-8
2,149
2.765625
3
[]
no_license
#include <iostream> #include <fstream> #include <dirent.h> #define NATIVE_MAP_RESOLUTION 1201 #define SQ(x) ((x) * (x)) using std::vector; using std::string; vector<string> gettargets(string path) { vector<string> targets; DIR *dir; struct dirent *ent; if ((dir = opendir (path.c_str())) != NULL)...
true
d0d2c418835ee7587ced1f99bedfeed73b921b85
C++
abhisheksnaik/CS31-Projects
/Project 5/stars.cpp
UTF-8
5,979
3.375
3
[]
no_license
// // main.cpp // stars // // Created by Abhishek Naik on 11/13/17. // Copyright © 2017 AbhishekNaik. All rights reserved. // #include "utilities.h" #include <iostream> #include <cstring> #include <cctype> #include <random> #include <string> using namespace std; //sets the word list to document const char WORD...
true
e1c8e5a749b61fa24d19ba9411c3ddbbce395b55
C++
brunodea/cg-t3
/include/GUI/Sidebar/ProjectionRadioButton.h
UTF-8
1,169
2.734375
3
[]
no_license
/* Classe que faz acoes dependendo de qual RadioButton foi selecionado. Esses radiobuttons sao relativos ao tipo de projecao. */ #ifndef _BRUNODEA_PROJECTION_BUTTON_GROUP_HPP_ #define _BRUNODEA_PROJECTION_BUTTON_GROUP_HPP_ #include <SCV/SCV.h> #include "Gui/Canvas/Projection.h" #include <string> namespace GUI { ...
true
ff5a7e25a2769e4b83d9daa4ad306dd38db2116c
C++
DDUC-CS-Sanjeet/polynomial-implementation-iamkuldeepnath
/Polynomial.cpp
UTF-8
3,257
4.09375
4
[]
no_license
/* KULDEEP NATH 19HCS4029 PROGRAM TO IMPLEMENT ADDITION AND SUBSTRACTION ON POLYNOMIALS */ #include<iostream> using namespace std; class Polynomial { private: // Variables to store information about polynomial int *arr; int size; public: Polynomial() { // Behavior of default constructor ...
true
b1e3f1c308ece4f0dde69430daf95d07d8e39750
C++
bbockelm/xrootd-tpc
/src/stream.hh
UTF-8
3,041
3.28125
3
[ "Apache-2.0" ]
permissive
/** * The "stream" interface is a simple abstraction of a file handle. * * The abstraction layer is necessary to do the necessary buffering * of multi-stream writes where the underlying filesystem only * supports single-stream writes. */ #include <memory> #include <vector> #include <cstring> struct stat; cla...
true
8c7f5c0d8182133b99e6f7d84cebfe37cecb7b24
C++
cHaO5/data-structure-practicum
/grid-construction-cost-simulation-system/grid_construction_cost_simulation_system.h
UTF-8
1,195
3.21875
3
[]
no_license
#include <iostream> #include <string> using namespace std; struct Edge { int num; //次顶点序号 float cost; //边的开销 Edge *next; //指向下一个邻接顶点 }; class Node { public: int start; //头结点序号 int end; //尾节点序号 float cost; //造价 Node() {} //构造函数 Node(int start, int end, float cost) { ...
true
1057bd731e0161563e30ec5eaac6109f393047b4
C++
darshan-crypto/darshan_cpp_projects
/netlib/netlib/payload.h
UTF-8
891
3.28125
3
[]
no_license
#include <string> typedef std::string string; class Payload { public: Payload(string); void getPayload(string *); string getHeader() { return data; } private: string data; string payload; void process(); int start; }; Payload::Payload(string s) { data = s; process(); } void Payload:...
true
c55400568b820ae0ba02a25b399a8fcc71cf22e7
C++
Brightlpf/MY-LEARN
/cpp/C++PrimerPlus/chapter16/PE/bank.cpp
UTF-8
2,375
3.3125
3
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> #include <queue> #include "customer.h" using namespace std; const int MIN_PER_HR = 60; bool newcustomer(double x); //is there a new customer int main() { srand(time(NULL)); cout << "Case Study: Bank of Heather Automatic Teller\n"; cout << "Enter maximum siz...
true
4bfa012b09cacb5739926219bd21a657063b8228
C++
Samas1503/EDM
/1ro Info/Pactica de abii/multiplicar sumando.cpp
UTF-8
382
3.359375
3
[]
no_license
#include <iostream> #include <string> void ingreso_datos(int &x, int &y); int division(int x, int y); using namespace std; int main(){ int a,b; ingreso_datos(a,b); cout<<division(a,b)<<endl; } void ingreso_datos (int &x, int &y){ cin>>x>>y; } int division (int x, int y){ int r=0; do{ i...
true
2769eeda2d1a144a31090a7e55a36d8458b4e1a0
C++
cedoduarte/QML_QPROPERTY_and_QQuickStyle
/myperson.cpp
UTF-8
471
3.046875
3
[ "MIT" ]
permissive
#include "myperson.h" MyPerson::MyPerson(QObject *parent) : QObject(parent) { m_age = 0; } MyPerson::MyPerson(const QString &name, int age, QObject *parent) : QObject(parent) { m_name = name; m_age = age; } void MyPerson::set_name(const QString &name) { if (m_name != name) { m_name = name; ...
true
e74d47f26ac7605b9085b10e8602d24cc5c5ee7a
C++
joel-perez/9515Algo2TP2
/src/Vertice.cpp
UTF-8
2,195
3.09375
3
[]
no_license
#include "Vertice.h" using namespace std; Vertice::Vertice(string nombre, unsigned int indice) { if (nombre != "" && indice >= 0) { this->nombre = nombre; this->adyacentes = new Lista<Arista*>(); this->indice = indice; this->envios = NULL; } } Lista<Arista*>* Vertice::obtenerAdyacentes() { return this->ady...
true
d2dd8ac7571ed70c01d340bcbb9dd2dde715ea63
C++
Denis-chen/iot-client-sdk
/tests/iot_client/flags.cpp
UTF-8
3,358
3.203125
3
[]
no_license
#include "flags.h" #include <iostream> #include <string.h> #include <algorithm> using std::cout; using std::endl; namespace { const char whiteSpaces[] = " \t\r\n"; std::string TrimRight(const std::string& s, const char *chars = whiteSpaces) { std::string res = s; res.erase(s.find_last_not...
true
57a66d5c67c6092bd757ec486402c0d7a3819f4e
C++
renancmonteiro/ils_simulated_annealing_timetabling
/Vizinhancas/TimeMove.cpp
UTF-8
6,433
2.75
3
[]
no_license
/* * TimeMove.cpp * * Created on: Dec 16, 2015 * Author: renan */ #include "TimeMove.h" #include "Move.h" #include "RoomMove.h" #include "../Model/Alocacao.h" TimeMove::TimeMove(Individuo* piInd, Alocacao* al1, Alocacao* al2){ tipoMovimento = 3; list<Alocacao*>::iterator it; ind = piInd; m = NULL; a1 ...
true
3d735ff61b9b0ba8f5147a61fb1c6b8efb580793
C++
thedeepestreality/lectures2019
/Exceptions/Source.cpp
UTF-8
704
3.609375
4
[]
no_license
#include <iostream> #include <exception> int gcd(int x, int y) { if (x == 0 || y == 0) throw 1; if (x < 0) throw "First argument is negative"; if (y < 0) throw std::runtime_error("Second argument is negative"); while (x != y) x > y ? x -= y : y -= x; return x; } int main() { try { gcd(1, -1); int x = gcd...
true
a73f1b54688cd5e5655dd8d931c93684d49886fb
C++
JRProd/SDEngine
/Code/Engine/Core/Math/Primatives/Plane2D.hpp
UTF-8
458
2.78125
3
[]
no_license
#pragma once #include "LineSeg2D.hpp" #include "Vec2.hpp" struct Plane2D { Vec2 normal; float distance = 0.f; public: Plane2D() = default; Plane2D( const Vec2& direction, float dist ); Plane2D( const Vec2& direction, const Vec2& point ); bool IsOnPositiveSide( const Vec2& point ) const; b...
true
742613adba784816629ae157b5292597a77fe7b8
C++
jashwanth/Advanced-Data-Structures-
/HW1/doubleLinkedList.cpp
UTF-8
11,247
3.40625
3
[]
no_license
#include "doubleLinkedList.h" doubleNode::doubleNode(int item, doubleNode* prev, doubleNode* next) { this->data = item; this->prev = prev; this->next = next; } int doubleNode::getNodeData() { return this->data; } doubleNode* doubleNode::getPrevNode() { return this->prev; } doubleNode* doubleNode::getNextN...
true
2de66ea1cc1bb6b490c828201cd4c11476ed9159
C++
godforename/1
/VopesMath/test/include/complex.h
UTF-8
2,035
3.015625
3
[]
no_license
#ifndef _COMPLEX_H #define _COMPLEX_H #include <iostream> #include <cmath> #include <stdlib.h> #include <stdbool.h> #define PI 3.141592654 #define EXP 2.718281828 using namespace std; class Complex { friend ostream & operator <<(ostream &o, const Complex& x); private: double real; double imag; public: Compl...
true
a7f8a2619b819b010272031646e60ebfca17ac27
C++
scse-l/MyCompiler
/lex.cpp
UTF-8
3,871
2.890625
3
[]
no_license
#include <iostream> #include <string> #include <map> #include <limits> #include "global.h" #include "support.h" #pragma warning(disable:4996) extern unsigned int numMax; extern char ch; extern long long value; extern std::string ident; extern int lineNo; extern std::map<std::string, int> keywordTable; int lex() { s...
true
1ffd33bc8f9eb2df1a72c17e905d7c23b45575be
C++
JellyWellyBelly/Comp-2018
/ast/null_node.h
UTF-8
518
2.59375
3
[]
no_license
// $Id: null_node.h,v 1.2 2018/03/23 16:45:23 ist426009 Exp $ -*- c++ -*- #ifndef __GR8_NULLNODE_H__ #define __GR8_NULLNODE_H__ #include <cstddef> namespace gr8 { /** * Class for describing null nodes. */ class null_node: public cdk::literal_node<std::nullptr_t> { public: inline null_node(int lineno...
true
ec5bf37909757e9321482b18a1a308091d8a5ee7
C++
adithya-tp/leet_code
/0377_combination_sum_IV/solution_push_dp.cpp
UTF-8
422
2.8125
3
[]
no_license
class Solution { public: // using the forward / push dynamic programming method int combinationSum4(vector<int>& nums, int target) { vector<unsigned long long> dp(target+1, 0); dp[0] = 1; for(int i = 0; i < target + 1; i++){ for(int x: nums){ if(i+x < target +...
true
666b2a7d924ab443f64d3624b57930722bd696ea
C++
abaddon201/qzxsqualpel
/memory/segment.h
UTF-8
2,240
3.28125
3
[]
no_license
#ifndef SEGMENT_H #define SEGMENT_H #include <vector> #include <stdexcept> #include <algorithm> #include <memory> #include <string> namespace dasm { namespace memory { ///@brief Описание сегмента памяти class Segment { public: using IdType = unsigned long long; using size_type = size_t; enum class Type { ...
true
7cda0198f4c86b172eab49e34628687cfc578085
C++
JLMPL/Ship
/src/Visual/Trail.hpp
UTF-8
594
2.8125
3
[ "MIT", "Bitstream-Vera", "LicenseRef-scancode-public-domain", "CC0-1.0" ]
permissive
#pragma once #include "Core/Math.hpp" #include <SFML/System/Time.hpp> #include <SFML/Graphics/Vertex.hpp> #include <vector> class Trail { public: Trail() = default; void update(); void draw(); void setPosition(const vec2& pos); void setColor(const sf::Color& color); void setInterval(float int...
true
0510fc1de5b9efc5d2be2cec3c3105f70266fe2a
C++
juan-zh/Euler
/EP38.cpp
UTF-8
1,091
2.765625
3
[]
no_license
/************************************************************************* > File Name: EP38.cpp > Author: meng > Mail: 2206084014@qq.com > Created Time: 2019年06月16日 星期日 15时00分11秒 ************************************************************************/ #include<iostream> #include<cstdio> #include<cstdlib> #inclu...
true
7a2e962f34bbfc2b2b6607800fca65cfc52c08e8
C++
radioation/eyesDx
/MAPPSNativeIO/MAPPSNativeIO/niot.cpp
UTF-8
3,837
2.65625
3
[]
no_license
#include "native_io_test.h" inline bool ok(const char* s) { return strcmp(s, "ok") == 0; } int main(int argc, char** argv) { char msg[512]; ////////////////////////////////////////////////////////////////////////// // Connect to the server. ///////////////////////////////////////////////////////////////////////...
true
04c2c3073d2aca500e665adf23e11304a7d63779
C++
RaduSzasz/PhotoEditor
/src/color.cpp
UTF-8
8,616
3.125
3
[]
no_license
#include "color.h" #include <math.h> float minim(float a, float b, float c) { if(a<b&&a<c) { return a; } else { if(b<c) return b; } return c; } float minimum(float a, float b) { if(a < b) return a; return b; } float maxim...
true
5cb392afe888085bf9919c181cded68bac0c5882
C++
umaatgithub/ImageProcessingOpenCV
/imageedgefiltertool.cpp
UTF-8
3,847
2.890625
3
[]
no_license
#include "imageedgefiltertool.h" /*************************************************************************** * Input argument(s) : QObject *parent - Passed to base class constructor * Return type : NIL * Functionality : Constructor to initialize all the member variables * of th...
true
cc56227b4bd8b340ef05df5f55cd8476d2689f74
C++
luiz734/Jogo-VS
/ListaEntidade.cpp
UTF-8
687
2.859375
3
[]
no_license
#include "ListaEntidade.h" ListaEntidade::ListaEntidade() { } ListaEntidade::~ListaEntidade() { limpar(); } ListaEntidade* ListaEntidade::instancia = NULL; ListaEntidade* ListaEntidade::getInstancia() { if (instancia == NULL) { instancia = new ListaEntidade; } return instancia; } voi...
true
91b64befaa8ac524c4c2a74c9e0a38e0f3c000a0
C++
ailyanlu1/ACM-10
/图论/拓扑排序/拓扑排序.cpp
GB18030
1,261
2.734375
3
[]
no_license
// ACMdata.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include<iostream> #include<algorithm> #include<cstdio> #include <cstring> #include <cmath> #include <string> #include <map> #include <vector> #include <queue> using namespace std; const int N = 510; int n, m, s[N], a, b; int head[N], cnt; struct edge { int to, next; }e[...
true
9a5fdeab6a6f169267026b5a2401d46c97715951
C++
shortthirdman/code-eval-challenges
/quickstart/ArrayAbsurdity.cc
UTF-8
1,608
3.578125
4
[ "MIT" ]
permissive
/* Array Absurdity Share on LinkedIn Description: Imagine we have an immutable array of size N which we know to be filled with integers ranging from 0 to N-2, inclusive. Suppose we know that the array contains exactly one duplicated entry and that duplicate appears exactly twice. Find the duplicated entry. (For...
true
a28452bd08a98b3db6666464a2ad3a749196e393
C++
nos8160/AlgosWithCPlusPlsu
/OneFileToRuleThemAll.cpp
UTF-8
317
2.65625
3
[]
no_license
#include<iostream> #include<time.h> #include "TemplateCollection.cpp" using namespace std; int main(){ double start = clock(); int array[] = {-89,0,-32,789,0,1,45}; int size = sizeof(array)/sizeof(array[0]); sortWithSelection(array,size); printArray(array,size); cout<< clock()-start<<endl; }
true
7a45f740235a686f15a917cec9ed044bb38a8778
C++
luqian2017/Algorithm
/LintCode/707_Optimal-Account-Balancing/707_Optimal-Account-Balancing-V2.cpp
UTF-8
1,307
3
3
[]
no_license
class Solution { public: /* * @param edges: a directed graph where each edge is represented by a tuple * @return: the number of edges */ int balanceGraph(vector<vector<int>> &edges) { int nRow = edges.size(); int nCol = edges[0].size(); unordered_map<int, int> um; //<i, j>...
true
0e5b339d5f81f204bd90606fd5f10cab48df51ff
C++
danykim57/c-study
/quiz/54.cpp
UTF-8
493
2.65625
3
[]
no_license
#include<stdio.h> #include<vector> #include<stack> #include<algorithm> using namespace std; int main(int argc, char** argv){ //freopen("input.txt", "rt", stdin); stack<char> s; char a[50]; int i, flag=1; scanf("%s", &a); for(i=0; a[i]!='\0'; i++){ if(a[i]=='(') s.push(a[i]); else{ i...
true
ae3357a683a7342d4ce04fadddbcfe70a3de5168
C++
tatevbarseghyan/shape_class
/inc/CircleClass.hpp
UTF-8
284
2.71875
3
[]
no_license
#ifndef CIRCLE_H #define CIRCLE_H #include <string> #include "ShapeClass.hpp" class Circle : public Shape { private: double m_radius; public: Circle(std::string name, std::string color, double radius); double get_area(); ~Circle(); }; #endif
true
f7357639ba805b567f02d7c64dd31b7d07474a96
C++
chenxinjizhe/dynasoar
/allocator/soa_defrag.inc
UTF-8
38,498
2.5625
3
[]
no_license
// Textual header. static const BlockIndexT kInvalidBlockIndex = std::numeric_limits<BlockIndexT>::max(); template<int NumBuckets, typename IndexT> __DEV__ IndexT block_idx_hash(IndexT block_idx) { return block_idx % NumBuckets; } template<typename ClassIteratorT, typename AllocatorT> __global__ void kernel_i...
true
b63f0c7c8c835717b73e2e93b783884bf0693f57
C++
ShreyaTarwey/OOM-Project
/display_students.cpp
UTF-8
2,745
3.515625
4
[]
no_license
#include"main.hpp" //using namespace comp; void display(student s){ cout << "Name: " << s.get_name() << endl; date a = s.getDOB(), b=s.getDOJ(); cout << "Year of study: " << s.get_year() << endl; cout << "DOB: "<<a.day<<"/"<<a.month<<"/"<<a.year<<endl; cout << "DOJ: "<<b.day<<"/"<<b.month<<"/"<<b.y...
true
d4eaee52bdb08ae432c0a299a7edf5df219476a4
C++
OscarFredriksson/DT064G
/Labb2/sorts.h
UTF-8
2,732
3.578125
4
[]
no_license
#include <algorithm> int& find_min(int* begin, int* end) { int* min = begin; while(begin++ != end) { if(*begin < *min) min = begin; } return *min; } void selection_sort(int* begin, int* end) { std::for_each(begin, end, [&end](int& iter) { int& min = find_min(&iter, ...
true
1853012f4ad56ad58a092db8824ed7674fc17f63
C++
olitvinenko/sound-engine
/common/impl/openal/OalUtils.hpp
UTF-8
2,259
2.5625
3
[]
no_license
#pragma once #ifdef SOUND_OPENAL #include <OpenAL/OpenAL.h> #include <string> #include <type_traits> namespace details { bool check_al_errors(const std::string& filename, const std::uint_fast32_t line); bool check_alc_errors(const std::string& filename, const std::uint_fast32_t line, ALCdevice* device); } ...
true
ba3a873f8a7b21f1cb59a165f2b4f331c2c5bb2c
C++
yeahzdx/Leetcode
/模拟-Spiral Image.cpp
GB18030
1,944
3.171875
3
[]
no_license
#include"stage2.h" vector<int> spiralOrder(vector<vector<int> > &matrix){ vector<int> ret; int m=matrix.size();//ﲻͬʱжmnm=0matrix[0]ڣʲ if(m>0){ int n=matrix[0].size(); if(n>0){ for(int i=0;i<min(m,n)/2;++i){ for(int j=i;j<n-i-1;++j) ret.push_back(matrix[i][j]); for(int j=i;j<m-i-...
true
5cb7d43663854b02f9ef78c8a71c8cd434d8a09c
C++
jtcullen/compiler
/src/ast/statements/Continue.h
UTF-8
437
2.625
3
[]
no_license
#ifndef COMPILER_CONTINUE_H #define COMPILER_CONTINUE_H #include <iostream> #include "Statement.h" #include "Expression.h" #include "AssemblyProgram.h" class Continue : public Statement { public: Continue(); ~Continue(); void print(std::ostream &os, int indent) const; void generate(AssemblyProgram &ap...
true
17940b4fe00282e55b7e6b24162f5c25315107de
C++
herob4u/Velocity
/Velocity/src/Engine/Renderer/Camera.h
UTF-8
2,499
2.703125
3
[]
no_license
#pragma once #include "Engine/Math/Rotator.h" namespace Vct { class Camera { public: static const float WORLD_Z_MAX; struct Frustum { float FOV; float Aspect; float NearZ; float FarZ; Frustum() : FOV(45.f)...
true
2c562e21be4e8664f9bc3c7f6589ed46a4d7c2a2
C++
MarioHsiao/bup-log-analizer
/filesystemmodel.cpp
UTF-8
4,069
2.75
3
[]
no_license
#include "filesystemmodel.h" #include <QDebug> #include <QStorageInfo> FileSystemModel::FileSystemModel(QObject *parent) : QAbstractListModel(parent), dir(QDir("/")) { updateDirInfo(); } void FileSystemModel::updateDirInfo (void){ beginResetModel(); items.clear(); if(dir.isRoot()){ ...
true
0be96e7925b4d0a18a5b6bc6f5862f3c36a87f56
C++
XRabell13/NewRep
/1curs/Laba13_Dop/Source.cpp
WINDOWS-1251
2,263
3.109375
3
[]
no_license
// 4 /*#include <iostream> #include <cmath> #include <stdlib.h> #include <ctime> using namespace std; int main() { setlocale(LC_ALL, "Russian"); int n; cout << " "; cin >> n; int Mass[17][17], d = n, k, count = 1, i, j, p; for (p = 0; count <= pow(n, 2); p++) { for (k = p; k < d; k++) Mass[p][k] = coun...
true
6f2aa519486a24592a7f4045dc4a3c380f795b8c
C++
assassin945/The-Summary-of-ACM
/基础算法——高精度计算/例1.3-高精度乘法/例1.3-高精度乘法.cpp
UTF-8
972
2.671875
3
[]
no_license
#include <iostream> #include <cstring> #include <cstdio> using namespace std; int main() { char a1[101], b1[101]; int a[101], b[101], c[10001]; int lena, lenb, lenc; int x; memset(a, 0, sizeof(a)); memset(b, 0, sizeof(b)); memset(c, 0, sizeof(c)); cin >> a1; cin >> b1; lena = strlen(a1); lenb = strlen(b1...
true
d7c9c4d154dd8219352489ecd9538031a06d3a0d
C++
jiyahan/moon
/moon/moon/logic/units/doerUnit/doerEquip.h
UTF-8
1,219
2.640625
3
[]
no_license
#ifndef __ACTOR_EQUIP_H__ #define __ACTOR_EQUIP_H__ class CPlayer; /******************************************* * 玩家装备模块 ******************************************/ class CPlayerEquip : public CDoerUnit { public: typedef CDoerUnit super; //角色装备位置定义 enum EquipPosition { epHat = 0,//头盔(左侧第一格) epDress = 1,//衣服(...
true
1280def72c63fa7e393b8718b705c0b3c883921b
C++
JiatuYan/NumericalAnalysis
/project1/code/problemB/test.cpp
UTF-8
736
2.875
3
[]
no_license
/** * @file test.cpp * @brief * @author XDDD * @version * @date 2020-03-20 */ #include "function.h" #include "NewtonMethod.h" int main(int argc, char *argv[]) { std::ifstream my_in("input.txt"); //input from input.txt std::ofstream my_out("output.txt"); //output to output.txt function f; functiond fd; ...
true
a66c4c494a966ee0bc0ccd6ed1585d143aa8191a
C++
fraigo/arduino-sketches
/step_motor_direction/step_motor_direction.ino
UTF-8
663
3.15625
3
[]
no_license
/** * Step motor - direction control * Author: Francisco Igor * Email : franciscoigor@gmail.com * * */ #include <Stepper.h> const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution // initialize the stepper library on pins 2 through 5: Stepper myStepper(stepsPerRevolution,...
true
a9ce5cf811835d548056fcfd376efef7c94dcca6
C++
aplqo/exercises
/loj/3045-Switch.cpp
UTF-8
3,203
2.6875
3
[]
no_license
#ifdef APTEST #include "debug_tools/judge.h" #endif #include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <iterator> #include <numeric> const int maxn = 100, maxsp = 5e4; constexpr unsigned int mod = 998244353, inv2 = 499122177; struct Number { inline friend Number operator+(const Num...
true
28ce4693626f9e422090f81bf78e06557bb75155
C++
lixiang2017/leetcode
/cpp/5894.0_Two_Out_of_Three.cpp
UTF-8
1,985
3.25
3
[]
no_license
/* 执行用时:24 ms, 在所有 C++ 提交中击败了100.00% 的用户 内存消耗:27.3 MB, 在所有 C++ 提交中击败了100.00% 的用户 通过测试用例:288 / 288 */ class Solution { public: vector<int> twoOutOfThree(vector<int>& nums1, vector<int>& nums2, vector<int>& nums3) { unordered_set<int> us1 (nums1.begin(), nums1.end()); unordered_set<int> us2 (nums2.beg...
true
8c7d0bb57590a78e2204ddddbccf2efc124d1986
C++
asahi7/UNIST-data-structure-assignments
/assignment1/polynomial.h
UTF-8
8,736
3.609375
4
[]
no_license
// Aibek Smagulov 20142028 // CSE221 Assignment 1 #ifndef polynomial_h #define polynomial_h #include <typeinfo> #include <iostream> #include <math.h> using namespace std; template <typename T> class Polynomial { public: // Default constructor p(x) = 0 Polynomial(); // Copy constructor Polynomial(const ...
true
bd70aaf6ee2ae75d07c16e08f898992ee68e6717
C++
WIAS-BERLIN/dti
/src/Vector.h
UTF-8
1,278
2.984375
3
[]
no_license
#ifndef VECTOR_H_ #define VECTOR_H_ #include <iostream> #include <string> #include <sstream> #include <cmath> #include <R.h> #include <R_ext/Utils.h> #include <Rinternals.h> /* * The class 'Vector' offers typical vector operations. */ class Vector { private: // length of Vector int n; // components of V...
true
c6226c74e94aa4cfdb1c267561aa601339512fb1
C++
spsbstn/ProjectWatchlist
/src/cursorshapearea.h
UTF-8
592
2.53125
3
[]
no_license
#ifndef CURSORSHAPEAREA_H #define CURSORSHAPEAREA_H #include <QDeclarativeItem> /* * Class for setting different CursorShapes in GUI */ class QsltCursorShapeArea : public QDeclarativeItem { Q_OBJECT Q_PROPERTY(Qt::CursorShape cursorShape READ cursorShape WRITE setCursorShape NOTIFY cursorShapeChanged) public...
true
d320675852ccec9fdaad72f5d9f51d92d84b950a
C++
SayaUrobuchi/uvachan
/Kattis/nimionese.cpp
UTF-8
1,357
2.59375
3
[]
no_license
#include <iostream> using namespace std; const char *tk = "bcdgknpt"; const char *tt = "aou"; int tbl[128], tail[128]; int main() { int i, j, mod; char last, better; bool ws, ss; string s; for (i=0; tk[i]; i++) { tbl[tk[i]] = 1; } for (i=0; tt[i]; i++) { tail[tt[i]] = 1; } while (getline(cin, s)) { ...
true
72a243971d304bb7a76b6bd5f8029553e4174b2a
C++
antikrem/mg_ultra
/mg_ultra/movement_polar_turn.h
UTF-8
654
2.84375
3
[]
no_license
#ifndef __MOVEMENT_POLAR_TURN__ #define __MOVEMENT_POLAR_TURN__ #include "movement_quanta.h" class MovementPolarTurn : public MovementQuanta { float rate; int duration; public: MovementPolarTurn(float rate, int duration) { this->rate = rate; this->duration = duration; } ~MovementPolarTurn() { } bool isEx...
true
48976a38466546b97b6eb980ab307cf27bf3fde3
C++
dumel7/MyGame
/IcyTower/IcyTower/PointBanner.cpp
UTF-8
483
2.5625
3
[]
no_license
#include "PointBanner.h" PointBanner::PointBanner(Resource &resource) { resource.setFont(font); resource.setPointsBanner(sprite); points.setFont(font); points.setCharacterSize(30); points.setPosition(BANNER_POSITION); sprite.setPosition(BANNER_POSITION); } void PointBanner::drawNow(sf::Render...
true
404e0440c27d6aaa3adbeaf35867d9987e50cbba
C++
mqaaa/algorithmmic
/1129. Recommendation System (25).cpp
UTF-8
931
2.625
3
[]
no_license
/************************************************************* Author : qmeng MailTo : qmeng1128@163.com QQ : 1163306125 Blog : http://blog.csdn.net/Mq_Go/ Create : 2018-03-17 18:49:35 Version: 1.0 **************************************************************/ #include <set> #include <cstdio> using namespace st...
true
7de750edb14cb7faa0a159afa160c0b66076e1a7
C++
AndreyG/watermarking
/src/algorithms/median.h
UTF-8
3,767
3.1875
3
[]
no_license
#ifndef _MEDIAN_H_ #define _MEDIAN_H_ #include <algorithm> #include <boost/utility.hpp> #include "../utility/stopwatch.h" #include "../utility/debug_stream.h" namespace algorithm { namespace { template< class Iter > struct default_comparator_f { typedef std::less< typenam...
true
73c31b27eb210551f92342d7658d877838ce27e0
C++
jbji/Programming-Method-and-Practice---2019-CS
/2020ad-p14-crystal/main.cpp
UTF-8
2,764
2.90625
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; class Block{ public: int a; int b; int c; int index; int min; Block(int _a,int _b, int _c,int _index):a(_a),b(_b),c(_c),index(_index){ if(a < b) swap(a, b); if(a < c) swap(a,c); if(b < c) swap(b,c); ...
true
707abaf9def83fbc57dcdc8700b40dbcf1b5d3af
C++
patilaarti15/CorJava
/anjali cpp prog/e1.cpp
UTF-8
696
3.375
3
[]
no_license
/*#include<iostream> using namespace std; class demo { int a; public: void show() { cout<<"In Constructor"<<a<<endl; } demo() { cout<<"Enter number"; cin>>a; } demo(int i) { a=i; } ~demo() { cout<<"In destructor"; } }; int main() { demo d...
true
2fbfdce6e11eb7552dca45725d1868f5d3131652
C++
Rahul-D78/DS_and_Algo
/array/maxLengthSubString.cpp
UTF-8
1,374
3.65625
4
[]
no_license
// C++ program to find maximum length equal // character string with k changes #include <iostream> using namespace std; // function to find the maximum length of // substring having character ch int findLen(string& A, int n, int k, char ch) { int maxlen = 1; int cnt = 0; int l = 0, r = 0; // traverse ...
true
25ad444a2251c6417a2cf2e86fed9dbb34243bbe
C++
jayoswald/sparse
/src/vector.h
UTF-8
442
2.71875
3
[]
no_license
#pragma once class SparseMatrix; // Very simple vector class. class Vector { friend Vector *sym_spmv(const SparseMatrix&, const Vector&, int); public: Vector(int len) : _data(new double[len]), _len(len) {} ~Vector() { delete _data; } double &operator()(int i) { return _data[i]; } double operator()(...
true
839a2ec96dc39f6cbf90e78aad0a1f892a0aaeb1
C++
ipetrovanton/C-lab-4
/src/main3.cpp
UTF-8
1,227
3.453125
3
[]
no_license
/*Задача №3 Написать программу, которая запрашивает строку и определяет, не является ли строка палиндромом (одинаково читается и слева направо и справа налево) Пояснение Цель задачи - применить указатели для быстрого сканирования строки с двух концов Состав Программа должна состоять из функций: - int isPalindrome(...
true
ab9b2557dfc03ba80a5dd28da33af658b94b4723
C++
vlongle/Neurosimulation
/feb/learn/main.cpp
UTF-8
383
3.03125
3
[]
no_license
#include "Vector.h" #include <iostream> using namespace std; int main(){ Vector<double> test; test.reserve(10); cout << "main" << endl; cout << test.size() << endl; for (int i=0; i < 10; i++){ // cout << "loop" << endl; test.put(i, i*2); cout << "test[" << i << "]:...
true
fc232421134c1cd80c8ea8e1d004398ae22a961e
C++
HectorIGH/Competitive-Programming
/Leetcode Challenge/09_September_2020/C++/Week 3/5_Sequential Digits.cpp
UTF-8
1,198
3.671875
4
[]
no_license
//An integer has sequential digits if and only if each digit in the number is one more than the previous digit. // //Return a sorted list of all the integers in the range [low, high] inclusive that have sequential digits. // // // //Example 1: // //Input: low = 100, high = 300 //Output: [123,234] //Example 2: // //Inp...
true
af5e20b96b770f38fa15d93cd4318960d642feb6
C++
Steelbadger/OpenGLThreading
/Windows Framework/Lab6c/terrain.cpp
UTF-8
1,526
2.828125
3
[ "MIT" ]
permissive
#include "Terrain.h" #include "myvector4.h" #include "my4x4matrix.h" #include "noisegenerator.h" #include <time.h> #include <string> #include <iostream> #include <algorithm> Terrain::Terrain() { } Terrain::Terrain(float s, float r): squareSize(s), resolution(r) { Create(); } Terrain::Terrain(Mesh &m) : Me...
true
eee572966fb2c462b8793fa266a2e7d8e2f01138
C++
chinawch007/LeetCode
/221.cpp
UTF-8
1,548
3.09375
3
[]
no_license
#include <vector> #include <iostream> using namespace std; class Solution { public: int maximalSquare(vector<vector<char>>& matrix) { if(matrix.size() == 0)return 0; int n = matrix.size(); int o = matrix[0].size(); vector< vector<int> > e; e.resize(n); for(int i =...
true
73d45add50416a9fb937fd1d7a0f309e683f88fe
C++
hello-starry/ML4KP
/src/prx/simulation/playback/plan.cpp
UTF-8
6,582
2.921875
3
[ "MIT" ]
permissive
#include "prx/simulation/playback/plan.hpp" namespace prx { plan_t::plan_t(const space_t* new_space) { control_space = new_space; steps.push_back(plan_step_t(control_space->make_point(), 0)); num_steps = 0; max_num_steps = 1; end_iterator = steps.begin(); const_end_iterator = steps.begin(); } plan_t::...
true
36c856f5ba1967e12782908d17312a91679787f6
C++
akkybm/Leetcode_July-21
/Day11_Find Median from Data Stream.cpp
UTF-8
820
2.59375
3
[]
no_license
#include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update #include <ext/pb_ds/detail/standard_policies.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> order...
true
0d79297cb05655da55ae937df01cc8e63fb4e13b
C++
Luke2336/EDA_2021_Spring
/lab2/Code/Timer.hpp
UTF-8
931
2.921875
3
[]
no_license
#pragma once #include<bits/stdc++.h> using namespace std; class GlobalTimer { static unique_ptr<GlobalTimer> uniqueGlobalTimer; chrono::seconds timeLimit; chrono::high_resolution_clock::time_point startTime; GlobalTimer() {} void restart(chrono::seconds seconds) { timeLimit = seconds; startTime = ch...
true
edd2aff942e90a605a603e43d390bd29fff34604
C++
el-bart/ACARM-ng
/src/datafacades/DataFacades/StrAccess/ErrorThrower.t.cpp
UTF-8
3,234
2.640625
3
[]
no_license
/* * ErrorThrower.t.cpp * */ #include <tut.h> #include "DataFacades/StrAccess/ErrorThrower.hpp" #include "DataFacades/StrAccess/DefaultHandleMap.hpp" #include "DataFacades/StrAccess/TestParams.t.hpp" using namespace DataFacades::StrAccess; namespace { struct TestClass { TestClass(void): pLast_(Path("a.b"), ...
true
5b467cf877bbc6e52d652c7891748af2fb39e669
C++
fastbuild/fastbuild
/Code/Core/CoreTest/Tests/TestThread.cpp
UTF-8
1,843
2.859375
3
[ "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// TestThread.cpp //------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------ // TestFramework #include "TestFramework/TestGroup.h" // Core #include "Core/Process/Thread.h" // TestThread //--------------...
true
f78a89ef744ff3fea0509d78e79948bb714c5409
C++
lisnayk/oop
/lec9/Ex1.cpp
UTF-8
1,456
3
3
[]
no_license
//--------------------------------------------------------------------------- #pragma hdrstop #include <stdlib.h> #include <cstdlib> #include <iostream> using namespace std; class TestConst { public: int data; //const int data2 = 10; -- error const int data2; const int data3; mut...
true
d6f362ced98f961fb38aaa09a48dd82af6727a0a
C++
Kionte/ProcessSimulation
/OS_Simulation/OS_Simulation/Source.cpp
UTF-8
5,369
2.828125
3
[]
no_license
#include <iostream> #include <map> #include "Core.h" #include "Process.h" #include "GlobalQueue.h" using namespace std; // randomly created representation of user queue<Process> user; // queue that the processes will be pulling from queue<Process> ready; void createUser() { srand((unsigned int)tim...
true
2685143773b7447c97682867233c311b88c2e145
C++
BizShuk/code_sandbox
/c_cpp/test.cpp
UTF-8
1,431
3.40625
3
[ "MIT" ]
permissive
#include <iostream> #include <string.h> #include <list> using namespace std; void test1() { char b = 'a'; char *a = &b; char w[] = "aaaaaa"; char *x = w; cout << "x:" << strlen(x) << endl; cout << sizeof(*a) << endl; char d[] = "eeee"; char *c[] = {d}; cout << c[0] << strlen(c[0...
true