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
1ef0f311a7e622aebd6694cf0f6b33207cbae75d
C++
Muril-o/UV_RP
/UV_RP/project_esp/esp.ino
UTF-8
6,216
2.578125
3
[]
no_license
#include <Arduino.h> #include <WiFi.h> #include <ArduinoJson.h> #include <WiFiClientSecure.h> #include <UniversalTelegramBot.h> /* Definições pinos do ML8511 */ #define PIN_GPIO34 34 #define PIN_GPIO35 35 /* Definições do Telegram */ #define TELEGRAM_TIME_CHECK_MESSAGE 250 //Em ms #define TELEGRAM_TOKEN "...
true
e2ab52c577c61d918e1209a180762f1b090be380
C++
Pinkii-/LD48
/Object.hpp
UTF-8
568
2.53125
3
[]
no_license
#ifndef OBJECT_HPP #define OBJECT_HPP #include "utils.hpp" class LD48; class Object { public: Object(LD48* game, sf::Vector2f size, sf::Texture& tex, sf::Vector2i spriteCount ); LD48* game; sf::Vector2f position; sf::Vector2f size; sf::Texture& tex; sf::Vector2i spriteCount; sf::Vector2i ...
true
16f40c6685f363858964a6f44e213383d6bfdd6a
C++
Gystre/HaloCE-internal
/haloCE-internal/matrix.cpp
UTF-8
1,857
2.796875
3
[]
no_license
#include "pch.h" #include "matrix.h" #include "vector4d.h" mat4_t::mat4_t() { m11 = m12 = m13 = m14 = m21 = m22 = m23 = m24 = m31 = m32 = m33 = m34 = m41 = m42 = m43 = m44 = 0; } mat4_t::mat4_t(float x1, float x2, float x3, float x4, float y1, float y2, float y3, float y4, float z1, float z2, float z3, float z4,...
true
a37e847f0bb3d84e90919b9f36c1b5d72620ac32
C++
JaviVinnas/Proyecto-final-de-COGA
/ProyectoFinalCOGA/LocalizadorShader.h
UTF-8
2,326
2.734375
3
[]
no_license
#pragma once #ifndef GLAD_H #include <glad.h> #endif // !GLAD_H #ifndef GLM_HPP #include <glm/glm.hpp> #endif // !GLM_HPP #ifndef MATRIX_TRANSFORM_HPP #include <glm/gtc/matrix_transform.hpp> #endif // !MATRIX_TRANSFORM_HPP #ifndef TYPE_PTR_HPP #include <glm/gtc/type_ptr.hpp> #endif // !TYPE_PTR_HPP #ifndef CMATH #i...
true
b37e278b71ed6dbc2264974185ba43205e4c0506
C++
chenfan2014/CFgit
/LeetCode/numberToTitle.cpp
UTF-8
874
3.109375
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <string.h> using namespace std; const int SIZE = 1024; string numberToTitle(int number) { if(number == 0){ return ""; } char s[SIZE] = ""; int i = 0; while(number) { int n = number % 26; if(n == 0){ ...
true
20586d4fe1b6e5bebf8afb9d56d1df75fc646bd2
C++
eooomji/StudyCPP
/Chap05/예제 5-11.cpp
UHC
1,935
4.1875
4
[]
no_license
#include <iostream> #include <cstring> using namespace std; class Person { // Person Ŭ char* name; int id; public: Person(int id, const char* name); // Person(const Person& person); // ~Person(); // Ҹ void changeName(const char* name); void show() { cout << id << ',' << name << endl; } }; Person::Person(in...
true
09847827f64d901c684a86d8d3ab09ccd2ca8dd7
C++
SetsunaChyan/OI_source_code
/Luogu/P1019.cpp
UTF-8
1,019
2.75
3
[]
no_license
#include <cstdio> #include <cstring> char s[20][255], head; int n, maxn = 0, ans, vis[20]; inline int min(int a, int b) { return a < b ? a : b; } int min_cover(int sa, int sb) { int la = strlen(s[sa]); int lb = strlen(s[sb]); for(int i = 1; i < min(la, lb); i++) { int flag = 0; for(int j = la - i, k = 0; j ...
true
ff1a5469f4555c52ccab10bbee0e97bbea854104
C++
arangodb/arangodb
/3rdParty/boost/1.78.0/boost/random/xor_combine.hpp
UTF-8
7,118
2.84375
3
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause", "ICU", "Zlib", "GPL-1.0-or-later", "OpenSSL", "ISC", "LicenseRef-scancode-gutenberg-2020", "MIT", "GPL-2.0-only", "CC0-1.0", "LicenseRef-scancode-autoconf-simple-exception", "LicenseRef-scancode-pcre", "Bison-exception-2.2", "LicenseRef-scancode...
permissive
/* boost random/xor_combine.hpp header file * * Copyright Jens Maurer 2002 * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * See http://www.boost.org for most recent version including documentation. * * $...
true
b4b85cbcdaa911b6054e804b1353093eb1fade9c
C++
cjawahar/wssaLab3
/I2C_1/I2C_1.ino
UTF-8
2,664
2.6875
3
[]
no_license
// This file is ConfigureExample -- overwritten. // I2C interface by default #include "Wire.h" #include "SparkFunIMU.h" #include "SparkFunLSM303C.h" #include "LSM303CTypes.h" #include "DebugMacros.h" #include "FreeRTOS_ARM.h" /* define DEBUG 1 in SparkFunLSM303C.cpp turns on debugging statements. Redefine to 0 ...
true
67611f2b827d3326cc13b7d571a8fee01e4ec84c
C++
sgadrat/super-tilt-bro-server
/src/server/StatisticsSink.hpp
UTF-8
1,915
2.578125
3
[]
no_license
#pragma once #include "GameState.hpp" #include "network.hpp" #include "src/utils.hpp" #include <chrono> #include <stdint.h> #include <map> #include <memory> #include <string> #include <uuid/uuid.h> /** Component processing reports from the rest of the game, outputing statistics */ class StatisticsSink { public: str...
true
4ade6a8040bde0b99973abcd621cf85813268ba1
C++
jorgerodrigar/Sistema-de-Integracion-Continua
/ProyectosSDL/Tracker/src/TrackerEvents.cpp
ISO-8859-1
4,439
2.8125
3
[]
no_license
#include "TrackerEvents.h" #include "json.hpp" using namespace nlohmann; const string TrackerEvent::toJson() const { json j; //Elementos comunes del evento j["userID"] = id_; j["time"] = timeStamp_; j["type"] = eventTypes[type_]; // escribe el tipo de forma legible string result = j.dump(); return result; } c...
true
bc55c59d01d666b0842877ba74666fa82ba23abe
C++
Lee-W/ACM
/POJ/1125/1125.cpp
UTF-8
1,639
2.84375
3
[]
no_license
#include <cstdio> #include <climits> #include <numeric> #include <algorithm> #define maxStockholderNum 105 int dis[maxStockholderNum][maxStockholderNum]; void Floyd(int n) { for (int k = 1; k <= n; k++) for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) if (dis[i][k] + ...
true
533e2daf173e079773e83aa7780d5545ba107732
C++
iangrigiani/tpdatos2daentrega
/sadfghjkl/src/Arbol/ArbolBMas.h
UTF-8
3,874
2.703125
3
[]
no_license
#ifndef _ARBOLBMAS_H_ #define _ARBOLBMAS_H_ #include "../EstructurasArbol/Elementos.h" #include "NodoInterior.h" #include "../Persistencia/PersistorArbol.h" #include "../EstructurasArbol/Solucion.h" #include <fstream> #include <vector> #include <list> using namespace std; class ArbolBMas { friend class Nodo; fr...
true
95646c154a43e8cdc5ff8620dad3eb626fb9115a
C++
sk2282/ECE3400_Team8
/code/milestone1/milestone1.ino
UTF-8
2,971
2.828125
3
[]
no_license
/* MILESTONE 1 * Team 8: The Resistance * Monday Night Lab */ #include <Servo.h> Servo left; Servo right; // GLOBAL VARIABLES // int leftLine = 0; // Pin for left line detector int rightLine = 1; // Pin for right line detector int leftWide = 2; // Pin for left intersection detector int rightWide = ...
true
83cdd5af04ca7d329758cc38f648e416541c6569
C++
vedant-jad99/DSA-450
/Linked List/Reverse a linked list/reverse_ll.cc
UTF-8
865
3.765625
4
[]
no_license
/* Link to the question - https://practice.geeksforgeeks.org/problems/reverse-a-linked-list/1 Approach 1 - Recursive Approach 2 - Iterative */ class Solution { public: //Function to reverse a linked list. struct Node* reverseList(struct Node *head) { //Common for both if(head == NULL) ...
true
3cee0b0c78db747eeab29d782760036a4804647a
C++
Yangjiaxi/leetcode
/0001-0200/0173-binary-search-tree-iterator/main_morris.cpp
UTF-8
1,520
3.65625
4
[]
no_license
/** * time: 92ms, 33.90% * mem: 26.2MB, 6.67% * * BUTT WHY ?? :( */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class BSTIterator { private: TreeNode *curr...
true
42e0b9a917e2d9155d34bf75b44750d204ebff59
C++
FelixOON/DOIT_ESP32_DevKit-v1_30P
/Examples/DigitalOutput/DigitalOutput.ino
UTF-8
3,631
2.875
3
[]
no_license
/********************************************* ESP32 GPIO OUTPUT PINS ************************************************* The ESP32 chip comes with 48 pins with multiple functions. Not all pins are exposed in all ESP32 development boards, and there are some pins that cannot be used. ESP32 devkit has 36 pins and 18 ...
true
2bbd34916ad2bf5009b01bf5a596a576ad0e21d2
C++
prokarius/hello-world
/C/SumOfTheOthers.cpp
UTF-8
406
3.328125
3
[]
no_license
#include<iostream> int sum (int N) { return (N*(N+1))/2; } int main(){ std::ios::sync_with_stdio(false); int numcases, N, testcase; std::cin >> numcases; while (numcases > 0){ std::cin >> testcase >> N; std::cout << testcase << ' ' << sum(N) << ' ' << sum(N)*2 - N...
true
b24aee8a3ddd5dc3706aa1d018dc12e641668bc7
C++
IvanHalim/sort-search
/test.cpp
UTF-8
1,640
3.53125
4
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> #include "sort.hpp" using std::cout; using std::endl; using std::srand; using std::time; void display(vector<int> vect) { for (int i = 0; i < vect.size(); i++) { cout << vect[i] << " "; } cout << endl; } int main() { // Initialize the s...
true
343dd97cab62265de99f76c72636329f388ce473
C++
AkiLotus/AkikazeCP
/Vault/UVa Online Judge/10300.cpp
UTF-8
513
2.984375
3
[]
no_license
#include <iostream> using namespace std; long long strtoll(string z) { long long result = 0, sign = 1, i = 0; if (z[0] == '-') { i = 1; sign = -1; } for (; i<z.size(); i++) { result *= 10; result += (z[i] - '0'); } return result * sign; } int main() { int t; cin >> t; while (t-- > 0) { int p; ci...
true
0061e27feadb3719053f851853124247f3701e73
C++
wjwzju/pat
/advanced/1012.cpp
UTF-8
3,101
3.203125
3
[]
no_license
#include <cstdio> #include <algorithm> #include <map> using namespace std; const int MAXN = 2000; struct student{ int id; int score_c, score_m, score_e; double score_a; int rank_a, rank_c, rank_m, rank_e; int rank, rank_class; student(){ score_c = -1; score_e = -1; sc...
true
4287125c4556aeb38982c1752286b3bf7ae7be4e
C++
Msudyc/LeetCodePartCpp
/LeetCodeTestSolutions/Ex022-MergekSortedLists-Test.cpp
UTF-8
3,794
3.0625
3
[]
no_license
#include "CppUnitTest.h" #include "Ex022-MergekSortedLists.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace LeetCodeTestSolutions { TEST_CLASS(Ex22Test) { public: TEST_METHOD(Ex022_Test_mergeKLists) { Ex22 ex; vector<ListNode *> t; ...
true
d978afb77bc3e4b23f78de6227902215dfa4cebc
C++
UVMCS120BS2020/GF-SC-Project3
/main.cpp
UTF-8
14,797
3.421875
3
[]
no_license
// George Fafard and Sean Cosgrove // Lisa Dion // CS 120 // Project 3: Battleship #include <string> #include <iostream> #include <optional> #include <memory> #include "battleship.h" #include "destroyer.h" #include "torpedoes.h" #include "board.h" using namespace std; /********** Global functions declarations ******...
true
c2ceaaf9f63fbeee94648076f4da83ef8bbdba18
C++
smartboyathome/something-lang
/IdentTypes/VariableType.cpp
UTF-8
4,582
3.203125
3
[]
no_license
// VariableType.cpp #include "VariableType.h" string VarTypes::ToString(Type type) { string StringTypes[] = { "NIL", "INTEGER", "BOOLEAN", "REAL", "STRING", "ARRAY", "POINTER", "RECORD" }; if((int)type >= 0 && (int)type <= 7) ...
true
048e462647e626d403868915bf57e7d41ab63093
C++
cc-yyyy/C-_STL
/06 vector容器-互换容器.cpp
GB18030
1,359
3.953125
4
[]
no_license
#include<iostream> using namespace std; #include<vector> //swap(vec); // vec뱾Ԫػ void printVector6(vector<int> &v) { for (vector<int>::iterator it = v.begin(); it != v.end(); it++) { cout << *it << " "; } cout << endl; } //1ʹ void test06() { vector<int>v1; for (int i = 0; i < 10; i++) ...
true
2c15ff8e88cf523211bf2c8ba1ba8a68bd074bb8
C++
pearlescen7/code-stash
/djikstra.cpp
UTF-8
9,468
3.625
4
[]
no_license
/**************************** * Author: Uzay Uysal * * Student Number: 150180039 * ****************************/ #include <iostream> #include <string> #include <fstream> #include <vector> #include <map> #include <set> #include <unordered_map> #include <sstream> #include <stack> #include <climits> ...
true
0ebbb73552fe5848150075755633f84595a38af7
C++
CGCL-codes/FJoin
/src/util/logger.cpp
UTF-8
2,416
2.671875
3
[ "MIT" ]
permissive
/* Modified from https://github.com/bmoscon/Logger */ /* * logger.hpp * * * Logger Library Header * * * Copyright (C) 2013-2017 Bryant Moscon - bmoscon@gmail.com * * Please see the LICENSE file for the terms and conditions * associated with this software. * */ #include"../head.hpp" #ifn...
true
19451cd95eef7daa5aa0dd54c86fe6d1cebcbc81
C++
crashdemons/BLAKE-wasm
/blake_easy_stub.cpp
UTF-8
2,241
2.875
3
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
#include "blake_easy_stub.hpp" #include <iostream> /* void* mallocz(size_t size){ void* p = malloc(size); memset(p, 0, size); return p; } */ blake_state_easy* blake_init_easy(unsigned int digestBits){ blake_state_easy* ctx = (blake_state_easy*) malloc(sizeof(blake_state_easy)); ctx->bitlength = digestBits; switc...
true
caec15d9ad198734ba8b0b59beaae81eeaead0f0
C++
nuharahman9/factory-pattern
/add.hpp
UTF-8
365
2.734375
3
[]
no_license
#ifndef __ADD_HPP__ #define __ADD_HPP__ #include "base.hpp" #include "op.hpp" #include "Operator.hpp" class Add: public Operator{ public: Add(Base* left,Base* right ):Operator(left,right){ } double evaluate() {return value1->evaluate()+value2->evaluate();} std::string stringify() {return value1->stringify...
true
8f90654ab7641359baa574429e4ef044af15519e
C++
royertiago/porrinha-wagner
/Zero2.cpp
UTF-8
755
2.703125
3
[]
no_license
#include "Zero2.h" #include "core/util.h" #include "stdlib.h" namespace wagner { Zero2::Zero2( std::string name ) : _name(name) {} int Zero2::hand() { if( rand() % 100 < 5 ) return rand() % core::chopsticks(core::index(this)) + 1; return 0; } int Zero2::guess() { int h...
true
4068d2b9c434191c6b537d36f8066e5b6820d721
C++
Ecole-INRA-Test/INRA-Test.cpp
/src/RoadBookCalculator.h
UTF-8
1,003
2.515625
3
[]
no_license
/* * File: RoadBook.h * Author: cjoffro2 * * Created on 27 novembre 2013, 13:14 */ #ifndef ROADBOOKCALCULATOR_H #define ROADBOOKCALCULATOR_H #include <algorithm> #include <vector> #include "Instruction.h" #include "Error.h" #include "Direction.h" #include "RoadBook.h" #include "MapTools.h" #include "LandSenso...
true
22d7094a88975543d5b448b25ea4895424e2977b
C++
kirkosyn/C-project
/GeographicArea.cpp
UTF-8
808
2.984375
3
[]
no_license
#include "GeographicArea.h" GeographicArea::GeographicArea() { #ifdef _DEBUG std::cout << "GeographicArea class default constructor fired.\n"; #endif // _DEBUG } void GeographicArea::setLandform(int i) { landform = i; } void GeographicArea::setLatitude(int number) { latitude = number; } void GeographicArea::setL...
true
c08472128c604d430ac93b0221967bc0e068020a
C++
JannLee/c_plus_plus_lab
/kaka22/Study_1/Source.cpp
TIS-620
940
2.859375
3
[]
no_license
#include <string> #include <iostream> int main() { std::string input1; std::string input2; std::string input3; std::string input4; std::string grape(""); std::cin >> input1; std::cin >> input2; std::cin >> input3; std::cin >> input4; int iInput1 = 0; int iInput2 = 0; int iInput3 = 0; char buf[10] = { 0...
true
495d1af9f06530c6ad51e5c92f964372ac5174c9
C++
dringakn/ROSExamples
/src/example_template.cpp
UTF-8
284
2.609375
3
[ "MIT" ]
permissive
#include <stdc++.h> // The base template for the standard (non-array) case, the dimension is 0. template<typename T> struct dimof{ static constexpr int value = 0; }; /* A partial specialization for type */ int main(int argc, char const *argv[]) { return 0; }
true
2d47e054868ef9907df65a230798219a0e5a5a55
C++
Yashika1305/CppPrograms
/palindrome.cpp
UTF-8
419
3.421875
3
[]
no_license
#include<iostream> using namespace std; int main() { int num,n,n1,rev=0; cout<<"Enter the number to check for palindrome"; cin>>num; n=num; while(num!=0) { n1=num%10; rev=(rev*10)+n1; num=num/10; } cout<<"Reverse is:"<<rev; if(n==rev) c...
true
9faadad953648f3a8d783d83926db319e8547d76
C++
emewinchester/RV_Star3D
/estrellaRv/Projects/Project6/Project6/Scene3D.cpp
ISO-8859-1
2,229
2.640625
3
[]
no_license
#include "stdafx.h" #include <glew.h> #define _USE_MATH_DEFINES #include <math.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include "Scene3D.h" #include "ShaderProgram.h" #include "Figure3D.h" #include "Ground3D.h" #include "Star3D.h" // // FUNCIN: Scene3D::Scene3D() // // PROPSITO: Construye el...
true
01a3c408131c4420f6cc44215fa5a23d90c32282
C++
kbc16b15/game
/GameTemplate/game/Sea.cpp
SHIFT_JIS
1,353
2.59375
3
[]
no_license
#include "stdafx.h" #include "Sea.h" Sea::Sea() { } Sea::~Sea() { m_modelData.Release(); } void Sea::Init(const char* modelName, D3DXVECTOR3 pos, D3DXQUATERNION rot) { //ǂݍރf̃t@CpX쐬B char modelPath[256]; sprintf(modelPath, "Assets/modelData/%s.x",modelName); //f[hB m_modelData.LoadModelData(modelPath, NULL)...
true
33477e82324991b1aa954980a655e6186e4a6516
C++
geewizz246/COMP_NOTES
/C++/Class_Tutorial/Main_BMI.cpp
UTF-8
1,095
3.078125
3
[]
no_license
//Client File //Main_BMI.cpp #include <iostream> #include <string> #include<vector> #include "BMI.h" using namespace std; int main() { vector<BMI> patients; BMI patient_1{ 0015, "George", 68, 150.4 }; //using overload constructor BMI patient_2; //using default constructor BMI patient_3{ 0264, "Conor", 65, 170.45 ...
true
0c46da07414875640e089b0fb38239404d3bba93
C++
dangbert/raytracer
/seamcarving/code.cpp
UTF-8
12,432
3.078125
3
[]
no_license
#define cimg_display 0 #include "CImg.h" #include <Eigen/Dense> #include <cmath> #include <iostream> #include <limits> using namespace cimg_library; using std::string; using std::cout; using std::endl; /* function prototypes */ int getIndex(int col, int row, int width, int height); Eigen::Vector3d *removeVerticalSeam(...
true
26b579eb9c69d736d11876cd0d57bf615e3c5dbc
C++
mverde/Random
/Random/Euler7.cpp
UTF-8
448
2.96875
3
[]
no_license
#include <iostream> using namespace std; void not7main() { int primeCount = 0, i = 2; bool isPrime = true; while (primeCount < 10001) { if ((i - 5) % 10 != 0 || i == 5) { for (long long int j = 2; j <= i / 2; j++) { if (i%j == 0) { isPrime = false; break; } } if (isPrime == t...
true
794da19dc6c0e84392410dbe93a2156b596045c8
C++
enitink/prj
/generic/codes/googleJam/codeChef/Crafts02/simulator/soln.cpp
UTF-8
869
2.84375
3
[]
no_license
#include <iostream> using std::cout; using std::cin; using std::endl; #include <cstring> #include <cmath> #ifndef PI #define PI 3.14159265358979323846 #endif #define DEG_CIRCLE 360 //#define DEG_TO_RAD (M_PI / (DEG_CIRCLE / 2)) #define RAD_TO_DEG ((DEG_CIRCLE / 2) / M_PI) /*inline double deg2rad(double degrees...
true
bd4c9e933d18233e054c1375a595904662741673
C++
teemusallyla/smart-curtains
/curtain_main/curtain_server.cpp
UTF-8
6,470
2.6875
3
[]
no_license
#include <ESP8266WiFi.h> #include "Arduino.h" #include "curtain_server.h" #include "curtain_led.h" cServer::cServer(int http_port, cStepper* stpr) : _led(0), _server(http_port) { _stepper = stpr; } void cServer::begin() { const char* ssid = ""; const char* password = ""; Serial.print("\n\...
true
37c7339f164612073b39c29bf1b4d06388cfd908
C++
GPUOpen-LibrariesAndSDKs/RadeonProRenderSharedComponents
/OpenVDB/include/openvdb/cmd/openvdb_lod.cc
UTF-8
13,254
2.640625
3
[ "MPL-2.0", "MIT", "LicenseRef-scancode-khronos", "BSD-3-Clause", "BSL-1.0", "Apache-2.0" ]
permissive
// Copyright Contributors to the OpenVDB Project // SPDX-License-Identifier: MPL-2.0 #include <openvdb/openvdb.h> #include <openvdb/tools/MultiResGrid.h> #include <openvdb/util/CpuTimer.h> #include <openvdb/util/logging.h> #include <boost/algorithm/string/classification.hpp> // for boost::is_any_of() #include <boost/a...
true
2015bb1f8789501809361220347405f9ac6db5ec
C++
Dark90lab/university-projects
/Labs_C++/Lab11-Geometry/Polynomial.cpp
UTF-8
2,880
3.203125
3
[]
no_license
#include "Polynomial.h" #include <cmath> //define missing constructor(s) Polynomial::Polynomial(int _deg , int* _coef) { if (_deg > 0 && _coef == nullptr) { this->degree = -1; return; } this->degree = _deg; this->size = degree + 1; this->init(size, _coef); } //Polynomial::~Polynomial() //{ // this->degree...
true
a78d6ca6b493d8144ac31428895105b9d3486f70
C++
sinsheep/dateStructures
/leetcode/Cpp/lcofer-cha-de-shen-du.cpp
UTF-8
789
2.71875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; // * Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: int maxDepth(TreeNode* root) { if(root) return 0; queue...
true
22353b5042c91bc0611dbf0656fdda320640d443
C++
TailonR/PartC372Final
/Headers/Mazda.h
UTF-8
331
2.53125
3
[]
no_license
//Tailon Russell // Created by renew on 4/30/2020. // #include "Car.h" #ifndef UNTITLED1_MAZDA_H #define UNTITLED1_MAZDA_H class Mazda: public Car{ public: Mazda(std::string model, int year); std::string getModel() override; int getYear() override; private: std::string _model; int _year; }; #endif /...
true
cb7c72236730bac7584e37ea58a0f33271c373aa
C++
DamirNabiull/ITP_CPP
/UniversityAccessSystem/generator.cpp
UTF-8
26,693
3.125
3
[]
no_license
// // Created by dale on 06.03.2021. // #include <iostream> #include <string> #include <vector> #include "persons.h" #include "rooms.h" #include "generator.h" using namespace std; void generator::generate_data(vector<Guest> &guests, vector<Student> &students, vector<LabEmployee> &labs, vector<Professor> &profs, vecto...
true
8109fea1c3bb892b7934bd8417abf65747a40053
C++
PHANTOM0122/Learning_OpenCV
/Class/Mat/MatOp4.cpp
UTF-8
520
2.90625
3
[]
no_license
#include "opencv2/opencv.hpp" using namespace std; using namespace cv; int main() { Mat mat1 = Mat::zeros(3, 4, CV_8UC1); // op1 for (int j = 0; j < mat1.rows; j++) { for (int i = 0; i < mat1.cols; i++) mat1.at<uchar>(j,i)++; } // op2 for (int j = 0; j < mat1.rows; j++) { uchar* p = mat1.ptr<uchar>(j);...
true
accb186de011968a31b527b9bb33742ef7cab7c2
C++
ahwxz123/ITKLearning
/Demo1_itkImageReader/ITKImageReader.cpp
UTF-8
1,352
2.703125
3
[]
no_license
#include <itkImage.h> #include <itkImageFileReader.h> #include <itkImageFileWriter.h> int main(int argc, char* argv[]) { const unsigned int Dimension = 2; //定义图像维数 //typedef unsigned char PixelType; //定义像素类型 typedef itk::RGBPixe...
true
8af72db5d9450e71808e55d522acd092638fcad3
C++
looooj/testxx
/common/mgserver.cpp
UTF-8
2,179
2.703125
3
[]
no_license
#include <string.h> #include "mgserver.h" void* MgServerThread(void* arg) { if ( arg ) { ((MgServer*)arg)->loop(); } } int MgServerHandler(struct mg_connection* conn, enum mg_event evt) { if ( conn->server_param ) { return ((MgServer*)conn->server_param)->handler( conn, evt ); ...
true
e8c5c60dc6d6fd8de6e8f0ecdea4adbd48301aa6
C++
OmriMan/ZoomSys-Rooms-and-students
/Student.cpp
UTF-8
1,379
3.25
3
[]
no_license
/* * Student.cpp * * Created on: Jan 2, 2021 * Author: ise */ #include "Student.h" Student::Student(string first , string last , int id , int avg):m_first_name(first),m_last_name(last) { if (id < 0 || avg < 0 || avg > 100) { throw Invalid_details(); } m_id = id; m_avg = avg; m_curr_room = nullptr; ...
true
548d1419c7269f26c17ab26d72f9633759ce8060
C++
ktran050/Portfolio
/plusplus/csCourseWork/cs12_labs/lab09/main.cpp
UTF-8
1,399
2.875
3
[]
no_license
// =============== BEGIN ASSESSMENT HEADER ================ /// @file main.cpp /// @brief Lab 9 for CS 12 Winter 2015 /// /// @author Kevin Tran [ktran050@ucr.edu] /// @date March 2nd, 2015 /// /// @par Enrollment Notes /// Lecture Section: 002 /// @par /// Lab Section: 023 /// @par /// TA: Brian /// ///...
true
a8f4c167b97ed4541d5fec8adbdac3998b3ed2ac
C++
dgpalmieri/Flow
/flow_main.cpp
UTF-8
3,172
3.34375
3
[]
no_license
// flow_main.cpp // Dylan Palmieri // 2020-12-12 // Test Suite for flow module #include"flow.hpp" #include<iostream> using std::cout; using std::endl; int main() { Flow test; test.hello(); { // test case with example from // https://www.geeksforgeeks.org/ford-fulkerson-algorithm-for-maximum-flow-...
true
b876aeff7cc50498b377dfb57c1b52ae10fbf58a
C++
xgraph/XGLCD
/LittleVGL_examples/lv_test_tileview/lv_test_tileview.ino
UTF-8
4,032
2.59375
3
[]
no_license
/** * Create a tileview to test their functionalities */ #include "lv_xg.h" #include "lvgl.h" void setup() { Serial.begin(38400); // Debugging info via Arduino Terminal = Serial debugging port lv_xg_init(); ...
true
c0b3bf03519eecfd94f9af3237d73c9b15b4d4a9
C++
JCiroR/Competitive-programming
/Problems/JTS/CF-B/10077TheSternBrotcotNS.cpp
UTF-8
990
3.125
3
[]
no_license
#include <iostream> #include <utility> #include <string> using namespace std; typedef long long ll; typedef pair<ll,ll> frac; bool above(frac f1, frac f2) { if(f1.second == 0 || f2.first == 0) return true; else if(f1.first == 0 || f2.second == 0) return false; else return ((double)f1.first)/((double)f1.s...
true
02c819ad7f619afbefd64b09d9c38995d3417285
C++
iridium-browser/iridium-browser
/buildtools/third_party/libc++/trunk/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp
UTF-8
2,473
2.84375
3
[ "NCSA", "LLVM-exception", "MIT", "Apache-2.0", "BSD-3-Clause" ]
permissive
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
true
be40147bab9099f927112453dbead57294983edc
C++
raima20/C_Programming
/prime factor.cpp
UTF-8
262
2.609375
3
[]
no_license
#include<stdio.h> #include<math.h> int main() { int i,n; printf("Enter the numnber:"); scanf("%d",&n); while(n%2==0){ printf("%d",2); n=n/2; } for(i=3;i<=sqrt(n);i=i+2) while(n%i==0){ printf("%d\t",i); n=n/i; } if(n>2) printf("%d",n); return 0; }
true
912aca5ec4e39f2c32c4667d2cc5e9ef5db56a0b
C++
kwh1108/WenhuiKuang
/CS32/Project4/Project4/DiskMultiMap.h
UTF-8
2,238
2.796875
3
[]
no_license
#ifndef DISKMULTIMAP_H_ #define DISKMULTIMAP_H_ #include <string> #include <iostream> #include "MultiMapTuple.h" #include "BinaryFile.h" using namespace std; class DiskMultiMap { public: class Iterator { public: Iterator(); Iterator(BinaryFile *bf, BinaryFile::Offset off); boo...
true
9bf8da0f5127b464761f40450f74f64fca5dcc28
C++
yuuta-h/-GamePrize2019
/GameProtType.ver.0.00/textDX.cpp
SHIFT_JIS
2,696
2.71875
3
[]
no_license
#include "textDX.h" TextDX debugFont; struct { const int m_TOP = 100, m_SIZE = 25;//Jnʒu/sԊu int m_y = m_TOP; }TxtLine;// 0.02 void initializeTextDX() { createTextDX(&debugFont, 24, false, false, "Arial"); } void unInitializeTextDX() { safeRelease(debugFont.dxFont); }; bool createTextDX(TextDX* text,int height...
true
a13ac5f06a37fb4a4379bf9cea5947105a41807c
C++
Pikecillo/ninety-nine-problems
/leetcode/102_binary_tree_level_order_traversal.cpp
UTF-8
801
3.3125
3
[]
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<vector<int>> levelOrder(TreeNode* root) { queue<TreeNode *> nodes; vecto...
true
786e5c3c3b59ecf3971b11b72d65cbb5e5d2077a
C++
chenbq83/CodeLab
/c++0x/thread_pool/thread_pool_1/ThreadPool.cpp
UTF-8
1,904
3.28125
3
[]
no_license
#include "ThreadPool.h" #include <iostream> #include <algorithm> using namespace netlib; ThreadPool::ThreadPool(int theThreadNumber) :threadNumber_(theThreadNumber), isRunning_(false) { std::cout << "ThreadPool constructor" << std::endl; } ThreadPool::~ThreadPool() { std::cout << "ThreadPool destructor"...
true
0549e58cf93e211c9217e28d67d18af929dfbad5
C++
rohan-shah/residualConnectivity
/RPackage/src/residualConnectivity/igraphInterface.cpp
UTF-8
1,000
2.5625
3
[]
no_license
#include "igraphInterface.h" void igraphConvert(SEXP graph_sexp, residualConnectivity::context::inputGraph& outputGraph) { //Convert graph object Rcpp::List graph; try { graph = Rcpp::as<Rcpp::List>(graph_sexp); } catch(Rcpp::not_compatible&) { throw std::runtime_error("Unable to convert input graph to a lis...
true
6f44adf9fddf0868f34297cd4dcaf6bbbef4b40f
C++
flajann2/cwrap
/example/Po7/Po7_socket.h
UTF-8
9,173
2.734375
3
[]
no_license
#pragma once // // Po7_socket.h // cwrap // // Created by Lisa Lippincott on 8/30/14. // Released into the public domain by Lisa Lippincott, 2014. // #include "Po7_Basics.h" #include "Po7_is_sockaddr.h" #include "bufferlike.h" #include <type_traits> #include <unistd.h> #include <sys/socket.h> namespace Po7 ...
true
8f5f5423c2921e51af0e75aada46676a0bd48980
C++
rishirajsurti/uva
/10004.cpp
UTF-8
955
2.671875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; vector<vi> adj; vi bfs_col; map<int, bool> vis; bool bfs(int u, int color){ bfs_col[u] = color; bool ans=true; int i,v; queue<int> q; q.push(u); while(!q.empty() && ans){ v = q.front(); q.pop(); // printf("%d-> ",v ); for(i=0; i<adj[v]....
true
47ee327404ed246ba102f9457abcd916665012ce
C++
SyromyatnikovAlexander/msu_cpp_autumn_2020
/07/vector.h
UTF-8
2,528
3.15625
3
[]
no_license
#ifndef VECTOR_H #define VECTOR_H #include <cstddef> template<class T> class MyAllocator { T * pointer = nullptr; size_t mySize = 0; public: MyAllocator() { } T * allocate(size_t size); void deallocate(T* ptr, size_t size); size_t maxSize() const noexcept; }; template<class T, class ...
true
e8d2b4cad1b6b77af51e63fcb5d541dccf93f38a
C++
Radu-Lucian/pianify
/include/Client/DataMappingTools.hpp
UTF-8
2,212
3.4375
3
[]
no_license
#pragma once #include <vector> #include <string> #include <sstream> #include <type_traits> #include <iterator> class DataMapper { public: template <typename T> std::enable_if_t<std::is_floating_point_v<T> || std::is_integral_v<T>, std::string> convertToString(const std::vector<std::vector<T>>& data); template <ty...
true
bdde60bb67aa7ad86c00052a54d9cbaa6fa0535a
C++
Argo15/Aggro-Engine
/AggroEngine/src/Subsystem/Graphics/Impl/OpenGL/CommandTree/GBuffer/InitializeGBufferCommand.cpp
UTF-8
1,947
2.765625
3
[]
no_license
#include "InitializeGBufferCommand.hpp" #include "Texture.hpp" InitializeGBufferCommand::InitializeGBufferCommand(GLuint framebuffer, GLuint program, GLsizei width, GLsizei height) : Command() , m_framebuffer(framebuffer) , m_program(program) , m_width(width) , m_height(height) { m_hash = CommandType::INIT_GBUFF...
true
8ee922ce7c7fc10c4f2288b7f0630fc86093880e
C++
gokcedemir/Object-Oriented-Homeworks
/hw5/ConnectFourDiag.h
UTF-8
851
2.8125
3
[]
no_license
/* File: ConnectFourDiag.h * Author: Gökçe Demir * Student ID: 141044067 * CSE241 - HWO5 * Created on November 22, 2017, 12:41 AM */ #ifndef CONNECTFOURDIAG_H #define CONNECTFOURDIAG_H #include <iostream> #include <string> #include "ConnectFourAbstract.h" using namespace std; namespace Game { class Conn...
true
92c57739d12e2765dcf731b2901e63be04a052c0
C++
BaranovMykola/Parallel-Computing
/MatrixComputing/SymplexMethod.cpp
UTF-8
3,856
3.0625
3
[]
no_license
#include "SymplexMethod.h" #include <iostream> #include <algorithm> #include <numeric> #include <thread> #include <future> using std::cout; using std::endl; double symplexMethod(Mat C, Mat a, int n, int m) { Vec P0 = extractVecB(a, n, m); Vec b = P0; Mat _Cb = createMat(1, m); generateMatrix(_Cb, 1, m, 0); Vec ...
true
b306fc3e2d2bc147cb6c8470cdfc0ccee9615185
C++
eagletmt/contests
/source/code/poj/3771.cc
UTF-8
1,843
3.03125
3
[]
no_license
#include <cstdio> #include <vector> #include <algorithm> #include <complex> using namespace std; typedef complex<double> P; struct edge { int u, v; double d; edge(int a, int b, double c) : u(a), v(b), d(c) {} bool operator<(const edge& e) const { return d < e.d; } }; struct DisjointSet/*{{{*/ { vector<int> ...
true
99b60dac55c634432988223ba35a1123b7f6e7ab
C++
CODARcode/MGARD
/tests/src/test_TensorQuantityOfInterest.cpp
UTF-8
5,218
2.84375
3
[ "Apache-2.0" ]
permissive
#include "catch2/catch_approx.hpp" #include "catch2/catch_test_macros.hpp" #include <cstdlib> #include <algorithm> #include <limits> #include <random> #include <stdexcept> #include "TensorMeshHierarchy.hpp" #include "TensorNorms.hpp" #include "TensorQuantityOfInterest.hpp" #include "blas.hpp" #include "testing_rand...
true
32064f91e92063f0a3eb144d0cc45aaca39e0aa1
C++
zhongjianhua163/BlackMoonKernelStaticLib
/krnln/krnln_GetHDiskCode.cpp
GB18030
950
2.734375
3
[ "BSD-3-Clause" ]
permissive
#include "stdafx.h" /* øʽ ͡ ȡӲ - ϵͳֿ֧-> ӢƣGetHDiskCode صеһӲ̵֣ǽӲصģҲ˵κϵͳ޹أϵͳûʹôԼijijһ̨УԱԼİȨκ Windows ϵͳ汾Сִк 0 ʾ˴ȡӲʧܡпΪʱ I/O ͻɣʧܺԵȴһʱԣԲο̣ظκȻʧܣӲ޷ȡ֡Ϊ */ extern DWORD __cdecl krnln_GetHD___Code(int *a1); LIBAPI(DWORD, krnln_GetHDiskCode) { return krnln_GetHD___Code(NULL); }
true
fce7d4937df1e6b17ce056fb7b004b0b79fc4f74
C++
mrdylan123/LinalgEindopdracht
/LinalgEindopdracht/World.cpp
UTF-8
1,539
2.515625
3
[]
no_license
#include "World.h" #define _USE_MATH_DEFINES #include "Vector.h" #include "Shapes/Shape.h" #include "Shapes/SpaceShip.h" World::World() : camera_{ this } { } World::~World() { } void World::update(SDL_Renderer& renderer) { SDL_SetRenderDrawColor(&renderer, 255, 255, 255, SDL_ALPHA_OPAQUE); if (shapes_.size() > 10...
true
e02a994e1202054cbf87e02b87222dcf47e50cd4
C++
luisSalher/Sistemas-Distribuidos
/Practica12/Cliente.cpp
UTF-8
1,941
2.90625
3
[]
no_license
#include "SocketDatagrama.h" #include <iostream> #define PUERTO 7200 #define PUERTO1 7201 #define PUERTO2 7202 int main(int argc, char const *argv[]) { char *server_ip = "127.0.0.1"; char *server_ip2 = "127.0.0.10"; char *server_ip3 = "127.0.0.20"; unsigned int mensaje1[3]; unsigned int mensa...
true
e09824f63629c50ea4e8942dace0b3599693110f
C++
snowyuki31/competitive-programming-library
/snow/monoids/plus-size.hpp
UTF-8
1,404
2.890625
3
[]
no_license
#pragma once namespace snow { template < typename T > struct plus_size_monoid { struct value_type { T val; int size; }; static value_type e() { return value_type{0, 0}; }; static value_type op(value_type l, value_type r) { return {l.val + r.val, l.size +...
true
bdd8bbbd7abb75cca6f41285dede9d9541f930be
C++
HarryLong/StatisticalAnalysisTool
/reproducer/distribution_factory.h
UTF-8
1,489
2.515625
3
[]
no_license
#ifndef DISTRIBUTION_FACTORY_H #define DISTRIBUTION_FACTORY_H #include "../utils/dice_roller.h" #include <QPoint> class AnalysisPoint; class DistributionFactory { public: DistributionFactory(); std::vector<AnalysisPoint> generateRandomDistribution(int category_id, int p_number_of_points, int width, int heigh...
true
b2e96228f26152662fcf173968986ad29ba25a31
C++
gratus907/Gratus_PS
/BOJ Originals/[BOJ Steps] BOJ 단계별로 풀어보기/[20] 스택/09012 괄호.java
UTF-8
372
2.796875
3
[]
no_license
#include <cstdio> #pragma warning (disable:4996) using namespace std; int stack[100000]; int main() { int n; scanf("%d", &n); int ptr = 0; long long int sum = 0; while (n--) { int x; scanf("%d", &x); if (x != 0) { stack[ptr] = x; ptr++; } else { ptr--; } } for (int i = 0; i < ptr; i...
true
63c1a6c4d4dd540baf2bf23fa09fb4e36ec385c6
C++
Bonayy/Competitive-Programming
/SnackDown2019/TYPING.cpp
UTF-8
1,701
2.640625
3
[]
no_license
/* Author: Dung Tuan Le University of Rochester */ #include <bits/stdc++.h> #define fio ios_base::sync_with_stdio(false); cin.tie(NULL) #define FOR(i, l, r) for (int i=l; i<=r; i++) #define REP(i, r, l) for (int i=r; i>=l; i--) #define mp make_pair #define pb push_back #define fi first #define se second #...
true
a4c2344cfa09ab19b9eebd99135f2c95c5e7a9b7
C++
ivilab/src
/lib/l_mt_cpp/l_mt_pt_attr.h
UTF-8
3,227
3.109375
3
[]
no_license
/** * @file * @author Andrew Predoehl * @brief def of RAII class to control a pthread attr object */ /* * $Id: l_mt_pt_attr.h 25499 2020-06-14 13:26:04Z kobus $ */ #ifndef PT_ATTR_H_INCLUDED_IVILAB #define PT_ATTR_H_INCLUDED_IVILAB #include <l_mt/l_mt_pthread.h> #include <l_cpp/l_exception.h> namespace ivi { ...
true
bc550477b3b188be3910e0da82a351788a7a8b72
C++
Vegtam/Roguelike
/src/TitleView.cpp
UTF-8
1,424
2.671875
3
[]
no_license
#include <vector> #include <string> #include <allegro5/allegro.h> #include "Image.hpp" #include "TitleView.hpp" #include "World.hpp" bool TitleView::init() { int result = false; if( model && imageset) { Image& title = imageset->get(titlescreen); title.init(0, 0, 1024, 768); /* probably need a better way of s...
true
94814eb9a3ca11df4a2866741a4307de4168c535
C++
yushiyaogg/backup
/practice/STL/find.cpp
UTF-8
508
3
3
[]
no_license
#include <vector> #include <list> #include <deque> #include <algorithm> #include <iostream> using namespace std; int main() { const int arraySize = 7; int ia[arraySize] = {0,1,2,3,4,5,6}; vector<int> ivect(ia, ia+arraySize); list<int> ilist(ia,ia+arraySize); deque<int> ideque(ia, ia+arraySize); ...
true
f638be4b42013a4870bb3ef724db51cc733ead48
C++
jonathanleemn/Program_Design_And_Development
/HW01/point2.cc
UTF-8
539
3.203125
3
[]
no_license
// Copyright 2018 <Jonathan Lee> #include "HW/HW01/point2.h" #include <math.h> #include <iostream> Point2::Point2(float x, float y) { XCoord = x; YCoord = y; } Point2::Point2() { XCoord = 0; YCoord = 0; } Point2::~Point2() { std::cout << "Destructor" << std::endl; } float Point2::get_X_Coord()...
true
a36fec163fc1fb10e54301f6040982eb436d086c
C++
rjtsdl/CPlusPlus
/Interview Play CPP/a1388PizzaWith3nSlices.cpp
UTF-8
954
2.71875
3
[]
no_license
// // a1388PizzaWith3nSlices.cpp // Interview Play CPP // // Created by jingtao ren on 9/6/20. // Copyright © 2020 Jingtao Ren. All rights reserved. // #include <stdio.h> #include <vector> using namespace std; class Solution { public: const int inf = 1e9; int solve(vector<int>& a, int k) { i...
true
50e05a6c3bfb7a61872bc701a209ff667c6b29f3
C++
jxu103/denchgrade
/src/menu.h
UTF-8
2,106
3.25
3
[]
no_license
#ifndef MENU_H #define MENU_H #include "account.h" #include <iostream> #include <string> using namespace std; class Menu { private: Account* account; public: bool run() { bool exitcall; this->loginMenu(); exitcall = this->mainMenu(); return e...
true
80f535104c3dffc64f196ee4c5d8a60d63d2d508
C++
Sokakaoh/CameraRP_PTut
/func.cpp
UTF-8
5,027
2.703125
3
[]
no_license
/* * func.cpp * * Created on: 15 févr. 2018 * Author: pi */ #include "func.hpp" void error(const char *msg) { perror(msg); exit(0); } Conf* menu(Conf* setRP) { int numb = -1; while(numb < 1 || numb > 3) { cout << "Configuration de la capture d'images :" << endl; cout << "1. Modification t...
true
7334390b397f22b888bf2095607988bd08b679f1
C++
joerocklin/pdes
/warped/simulationmodels/adaptTest/AdaptTestObject.cpp
UTF-8
8,141
2.515625
3
[]
no_license
// See copyright notice in file Copyright in the root directory of this archive. #include <string> #include <utils/StringUtilities.h> #include "AdaptTestEvent.h" #include "AdaptTestObject.h" #include "AdaptTestObjectState.h" #include <warped/SimulationManager.h> #include <warped/warped.h> #include <warped/IntVTime.h> ...
true
6a83d5b7411f17bb42a0cb9ca9e5afd7210c1263
C++
garinrk/MonsterEngine
/MonsterGame_WithEngine/MonsterChase/MonsterGame.cpp
UTF-8
8,862
3.21875
3
[]
no_license
#include "MonsterGame.h" #include "Player.h" #include "Monster.h" #include "MonsterEngine.h" #include "MonsterDebug.h" #include <assert.h> #include <string.h> #include <ctype.h> #include <conio.h> MonsterGame::MonsterGame(int boardSize, MonsterPoint2D &playerStartPos) { boardSizeX = boardSize; boardSizeY = boardSize;...
true
42084760b1dc5acce71694e06d94b51eafe63917
C++
palmsnipe/cppsharing
/shared/mylib.cpp
UTF-8
1,050
2.578125
3
[]
no_license
// // shared.cpp for cppsharing in /Users/cyrilmorales/Documents/Projects/perso-cppsharing/shared // // Made by Cyril Morales // Email <palmsnipe@hotmail.com> // // Started on Wed Nov 18 00:10:30 2015 Cyril Morales // Last update Wed Nov 18 22:42:57 2015 Cyril Morales // #include <fstream> // #include <iostream> //...
true
9f8a516865d0c79dae9ee78acadde89f3577e45e
C++
banach-space/cpp-tutor
/include/strings_pool.hpp
UTF-8
2,170
3.609375
4
[ "MIT" ]
permissive
//============================================================================== // FILE: // strings_pool.hpp // // AUTHOR: // banach-space@github // // DESCRIPTION: // // License: MIT //============================================================================== #ifndef _STRINGS_POOL_ #define _STRINGS_POOL_ #i...
true
74fb0dc0c636710b752cfe36dff6a2f039dee0cd
C++
Yee172/SHY_ACM_Template
/Codes/cpp/Yee_172/math/fast_Walsh_Hadamard_transform.cpp
UTF-8
1,691
2.984375
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; namespace FWT { const int MOD = 0x3b9aca07; const int inv2 = MOD + 1 >> 1; inline void FWT_OR(int * x, int len, int mode=1) { for (int step = 1; step < len; step <<= 1) for (int d = step << 1, i = 0; i < len; i += d) for...
true
42bffa6a29fb52e08bf68a2f09522bf728c9a515
C++
MyunghunSeong/CExample
/Example9.cpp
UHC
1,056
3.359375
3
[]
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> void copyArray(int* pArr, int* arr, int size) { int i = 0; for(i = 0; i < size; i++) *(pArr + i) = arr[i]; } void printArray(int* pArr, int start, int size) { int i = 0; for(i = start; i < size; i++) printf("Number[%d] : %d\n", i+...
true
c8266aaff2a68eb3bc33e3f66a2449b0711e0f2e
C++
kass1693/Baekjoon
/2775.cpp
UTF-8
400
2.546875
3
[]
no_license
#include<iostream> using namespace std; int arr[15][15]; int main() { int T, k, n; for (int i = 1; i <= 14; i++) arr[0][i] = i; for (int i = 1; i <= 14; i++) arr[i][1] = 1; for (int i = 1; i <= 14; i++) { for (int j = 2; j <= 14; j++) { arr[i][j] = arr[i - 1][j] + arr[i][j - 1]; } } scanf("%d", &T...
true
d349272ed6685de529f3c1c391b4c8f342fbad4c
C++
evanJensengit/problems
/twoSum.cpp
UTF-8
1,686
3.484375
3
[]
no_license
// // main.cpp // TwoSumProblem // // Created by Evan Jensen on 8/5/20. // Copyright © 2020 Evan Jensen. All rights reserved. // using namespace std; #include <iostream> #include <vector> vector<int> twoSum(vector<int>& nums, int target) { bool solutionNotFound = true; int indexBase = 0; int base...
true
62b30d612641b16e18d846b4c11e82125491024a
C++
abista7/DatabaseSystem
/projects/FinalProject/Library.h
UTF-8
5,205
3.015625
3
[]
no_license
#pragma once #include "Database.h" class Library { Database db; string host = "tcp://127.0.0.1:3306"; string userName = "root"; string password = "0987654321"; string database = "Library"; public: Library() { db.connect(host, userName, password); if (db.getIsConnected()) { if (db...
true
273a5692fec9c9b21cc44c7655b18a6b7fc60023
C++
cristiano-xw/c-homework
/sixth/第四题.cpp
GB18030
2,326
3.1875
3
[]
no_license
#include<stdio.h> #include<string.h> #include<math.h> int main(void) { int a=0; int b=0; int c=0; //ֱ洢ʱ //һʱַʽΪAA/BB/CC //:MM/DD/YYYY/MM/DD. scanf("%d/%d/%d",&a,&b,&c);//ÿִ洢ʡȥ0 //January, February, March, April, May, June, July, August, September, October, November December if(a>=13) //ֻǵڶ YY/MM/DD. ...
true
3281d015be9674491358d4068ffaf985e1161e6e
C++
RoshniPande/Competitive-Programming
/pset2/prob14_grains.cpp
UTF-8
437
2.71875
3
[]
no_license
#include <iostream> #include <string> #include <cmath> #include <algorithm> using namespace std; int main() { long long int n,m; cin>>n>>m; if (n<=m) { cout<<n<<endl; return 0; } else { long long int low=0,high=1e10; while(low<high) { long long int mid=low+(high-low)/2,x=(mid*(mid+1))/2; if ...
true
5d24a40b4147c3247e51829f4ee50efe1ff45dbf
C++
Le0nRoy/StepicCppCourse
/src/headers/ScopedPtr.h
UTF-8
902
2.90625
3
[]
no_license
// // Created by lap on 9/25/20. // #ifndef TESTS_SCOPED_PTR_H #define TESTS_SCOPED_PTR_H #include "Expression.h" struct Expression; struct Number; struct BinaryOperation; struct ScopedPtr { explicit ScopedPtr(Expression *ptr = 0) { ptr_ = ptr; } ~ScopedPtr() { delete ptr_; } E...
true
cd6cbf63b1c1dd370dbcbb6b6ab9a626fb040e8a
C++
marcphilippebeaujean-abertay/archaic-arena
/projectile.h
UTF-8
801
2.703125
3
[]
no_license
#pragma once #include "game_object.h" class projectile : public game_object { public: projectile(sf::Vector2f colliderSize, LOOK_DIR initDir, int firedPlayerID, sf::Texture* fireTexture, sf::Vector2f boundryInfo, sf::Vector2f initPosition); ~projectile(); // functions void update(float& delta_time) override; // ...
true
85750839189de32917dc8cd921aba14dc8b47a82
C++
hsj278/Scientific-Computing-Coursework
/lab04/fact.cpp
UTF-8
503
3.984375
4
[]
no_license
#include <stdio.h> long factorial(int n); int main(){ int n; printf("Enter an integer\n"); scanf("%i",&n); printf("%i! = %ld\n",n,factorial(n)); return 0; } // recursive implementation of factorial algorithm long factorial(int n){ long answer; printf("factorial called w/ n = %i\n",n); if (n < 2 ) ans...
true
ee500f9f1faa1261ac30a1b0f2d7af3726ec19f5
C++
suhyunch/shalstd
/BOJ/5000~/5622/src.cpp
UTF-8
386
2.9375
3
[]
no_license
//https://www.acmicpc.net/problem/5622 #include <iostream> #include <string> using namespace std; int main() { string num; cin >> num; int x; int l=num.size(); int sum=0; for(int i=0; i<l; i++) { if(num[i]=='1') x=2; else if(num[i]=='Z' ) x= 10; else if((int)num[i]>='S') x= (num[i]-'A'-1)/3+...
true