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
96f28068c1632246818d076fa308faec3287802c
C++
JulianToledano/IntroduccionConcurrencia
/Practica1/Paralelizacion/Division_estatica/Division_estatica.cpp
UTF-8
5,780
3
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include "debug_time.h" #define PROCESADORES 8 typedef struct matriz_t { int filas; int columnas; int** datos; } matriz_t; typedef struct paquete_trabajo{ int **matriz1_datos; int matriz1_inicial; int matriz1_final; int **matriz2...
true
ecb2fd49a9bf974feb057023bfacc272d7faeff8
C++
abhilc/Competitive-Programming
/spoj/dyzio.cpp
UTF-8
414
2.65625
3
[]
no_license
#include<iostream> using namespace std; string str; int N, cut_no, pos, maxD, ans; void solve(int depth) { if(str[pos]=='1')cut_no++; if(depth > maxD) { ans = cut_no; maxD = depth; } if(str[pos++]=='1') { solve(depth+1); solve(depth+1); } } int main() { int t = 10; while(t--) { cin >> N; cin >...
true
998373b62c6dee7e5af6c23fbf7259ec9508c6c0
C++
quigg-caroline/CS32
/Project1/History.cpp
UTF-8
1,047
3.265625
3
[]
no_license
// // History.cpp // Project 1 - CS32 // // Created by Caroline Quigg on 1/6/16. // Copyright © 2016 Caroline Quigg. All rights reserved. // #include "History.h" #include "globals.h" #include <iostream> using namespace std; History::History(int nRows, int nCols) { m_nRows=nRows; m_nCols=nCols; for (int...
true
95ae15f6d407f280221696622ce6d4340dae613f
C++
durgeshak19/Cpp_DS_Algos
/Tree/height_tree.cpp
UTF-8
1,280
3.671875
4
[]
no_license
#include<bits/stdc++.h> using namespace std; class TreeNode { public : int val; TreeNode *left; TreeNode *right; TreeNode(int data){ val = data; left = NULL; right = NULL; } }; int height(TreeNode* root) { int left , right; if(!root) return 0; ...
true
895819052c28ed3d9b6d82dc2950b72ea0afc2a6
C++
frederickmo/DesignPattern-2021
/Commodity/Commodity.h
UTF-8
5,588
3.34375
3
[]
no_license
#ifndef _COMMODITY_H_ #define _COMMODITY_H_ #include <string> #include <list> #include <iterator> using std::string; using std::list; class Shop; template<class return_T, class parameter_T> // 设计模式: Command class Command { public: virtual return_T execute(parameter_T) = 0; }; class CommodityI...
true
832271b10b738d475f902c93813efaac7f960257
C++
elgrandt/TuxWorld-4
/presentacion/background.h
UTF-8
510
2.53125
3
[]
no_license
#ifndef BACKGROUND_H_ #define BACKGROUND_H_ #include "OGL/OGL.h" class Point{ private: int x; int y; int angle; int speed; int STOPPER; int LOOPS; public: Point(int X, int Y, int ANGLE, int SPEED); void update(); int get_x(); int get_y(); ...
true
42406897491c4a381a8867f7c803f3fd1b9dc11c
C++
polyfem/polyfem
/src/polyfem/mesh/mesh3D/Mesh3DStorage.hpp
UTF-8
5,327
2.796875
3
[ "MIT" ]
permissive
#pragma once #include <vector> #include <Eigen/Dense> namespace polyfem { namespace mesh { struct Vertex { int id; std::vector<double> v; std::vector<uint32_t> neighbor_vs; std::vector<uint32_t> neighbor_es; std::vector<uint32_t> neighbor_fs; std::vector<uint32_t> neighbor_hs; bool boundar...
true
6dfcf612c8d54cd8797bad4da6f6e6dc7f1e2e0d
C++
PemchingKue/CSC2100
/Lab05/Lab05.cpp
UTF-8
1,627
4.15625
4
[]
no_license
#include <iostream> using namespace std; class rectangle { public: rectangle(int len, int wid); //Parameterized Constructor rectangle(); //Default Constructor; Default lenght is 20 and default width is 10 void setWidth(int newWid); //Mutator function void setLength(int newLen);//Mutator function ...
true
50b9d425026cc2c6c20ae0e87d3984fce8ccb21a
C++
ashishsalunkhe/Data-Structures-and-Algorithms-Lab
/A12(Searching)c/search.cpp
UTF-8
489
3.5
4
[]
no_license
#include<iostream> using namespace std; int main() { int a[20],i,n,element; int flag=0; cout<<"\nENTER THE NO. OF ELEMENTS: "; cin>>n; cout<<"\nENTER THE ELEMENTS:\n"; for(i=0;i<n;i++) cin>>a[i]; //for sequential search cout<<"\nENTER THE ELEMENT TO BE SEARCHED\n"; cin>>element; for(i=0;i<n;i++) { if(a[i...
true
0e05d5a62f8cea27659148ecc75d8267eaed354c
C++
right-x2/Algorithm_study
/5622.cpp
UTF-8
883
3.03125
3
[]
no_license
#include <iostream> using namespace std; int main(int argc, char** argv) { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string str; int sum=0; cin>>str; for (int i = 0; i < str.length(); ++i) { if(str[i]=='A'||str[i]=='B'||str[i]=='C') sum = sum + 2; el...
true
dc765024dbda07b405a59aecdc5d26b54a65e6a0
C++
jcliberatol/SICSRepository
/SICS/src/input/Input.cpp
UTF-8
3,345
3.203125
3
[]
no_license
/* * input.cpp * * Created on: May 27, 2014 * Author: mirt */ #include "Input.h" Input::Input() { del = ','; } Input::~Input() {} bool Input::importCSV(char* filename, Matrix<double>& M, int rowIdx, int colIdx) { bool eof = false; int row = 0; int col = 0; ifstream inFile; inFile.open(filename, st...
true
774878a6d68766133380268c836dc64a4b353215
C++
cmparsons/cs1570-hw10
/tailor.h
UTF-8
4,534
3.03125
3
[]
no_license
// Programmer: Christian Parsons // Section: E // Filename: town.h // Assignment: HW #10 // Due Date: 5/3/17 // Purpose: File contains the Tailor class defintion. #ifndef TAILOR_H #define TAILOR_H #include "general.h" #include "town.h" #include "phantom_pants.h" #include <cstring> class Bully; class Phantom_Pants; ...
true
6fbb7443248f2f799c6d7fb075b6f69f896d5488
C++
S0ul3r/Tanks-SFML
/src/game_level.h
UTF-8
4,509
3.140625
3
[]
no_license
#ifndef game_level_h #define game_level_h #include <SFML/Graphics.hpp> #include <cmath> #include <cstdlib> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <vector> float shooting_speed = 0.2; float movement_speed = 1; //closest wall check int y_vert = 1; int x_hor = 2; int closest_wall = -1; // for m...
true
4ce4a0e258c74561aada639efb975a5d66147013
C++
boeschf/GHEX
/tests/aligned_allocator.cpp
UTF-8
2,287
2.890625
3
[ "BSD-3-Clause" ]
permissive
/* * GridTools * * Copyright (c) 2014-2020, ETH Zurich * All rights reserved. * * Please, refer to the LICENSE file in the root directory. * SPDX-License-Identifier: BSD-3-Clause * */ #include <ghex/allocator/aligned_allocator_adaptor.hpp> #include <gtest/gtest.h> #include <vector> #include <iostream> te...
true
3200b318d27a3a26dbc5d7a7d4be243fa25004db
C++
alonewolfx2/QC2Control
/src/QC2Control.h
UTF-8
3,572
3.171875
3
[]
no_license
/** * @file * @brief A simple Arduino library to set the voltage on a Quick Charge 2.0 charger. */ #pragma once #include "Arduino.h" /** * @brief Main class of the QC2Control-library * * The QC2Control-class includes all the functions to easily set the voltage of a Quick Charge 2.0 source.. * * @see ...
true
825a4dd43d9ec03158a8501e8d0cf1390858d5a4
C++
oujunwei/project_dmoo
/Parameter.h
UTF-8
5,723
2.8125
3
[]
no_license
/*! \file Parameter.h \brief EA parameters \author Aimin ZHOU \author Department of Computer Science, \author University of Essex, \author Colchester, CO4 3SQ, U.K \author azhou@essex.ac.uk \date Sep.27 2005 rewrite & reorganize structure */ #ifndef AZ_PARAMETER_H #define AZ_PARAMETER_H #include <list> #in...
true
eb0da8aa2a6293d7ec77ee4379d6be022970dbed
C++
podonoghue/usbdm-kinetis
/Firmware/bdm_kinetis_mk22f/Project_Headers/smc.h
UTF-8
15,385
2.59375
3
[]
no_license
/** * @file smc.h (180.ARM_Peripherals/Project_Headers/smc.h) * @brief System Management Controller * * @version V4.12.1.210 * @date 13 April 2016 */ #ifndef HEADER_SMC_H #define HEADER_SMC_H /* * ***************************** * *** DO NOT EDIT THIS FILE *** * ***************************** * * T...
true
bc04bc42e0e9c61bb21d02c6ddf30ba915fa099e
C++
huangdanfeng0214/PAT
/1006.cpp
GB18030
1,559
3.734375
4
[]
no_license
/** ҾȻһֱû 12,.,n ˼Ϊ12βǴ1n ѧ˼άһû stoi ,to_string C++11 stringappend */ #include <iostream> #include <string> #include <set> #include <sstream> #include <algorithm> using namespace std; int main() { string str; cin >> str; int ln; if (str.length() == 2) { str = "0" + str; ln = 10; } else if (str.length() == ...
true
3db475d52a47f34d92195fdeb6df18fbb4a703f1
C++
murolo/rdc
/src/io/memory_io.cc
UTF-8
2,442
3.046875
3
[ "BSD-3-Clause" ]
permissive
#include "io/memory_io.h" namespace rdc { MemoryFixedSizeStream::MemoryFixedSizeStream(void *p_buffer, size_t buffer_size) : p_buffer_(reinterpret_cast<char *>(p_buffer)), buffer_size_(buffer_size) { curr_ptr_ = 0; } MemoryFixedSizeStream::~MemoryFixedSizeStream(void) { } size_t MemoryFixedSizeStream::Read(voi...
true
09d57fc86041e589e020744b09cf53d968df534f
C++
marcinmajkowski/SPOJ
/PP0502B.cpp
UTF-8
328
2.875
3
[]
no_license
#include <iostream> using namespace std; int main(void) { int t, n, i, k; int d[100]; int *ptr; int *ptr2; cin >> t; for (i = 0; i < t; ++i) { cin >> n; ptr = d; ptr2 = d + n; while (ptr != ptr2) cin >> *ptr++; --ptr; while (ptr + 1 != d) cout << *ptr-- << " "; cout << endl; } retu...
true
39c0d976820c910e099f99aa29503ea7030a2692
C++
jade200019/cdproject
/Patch.h
UTF-8
6,995
2.53125
3
[]
no_license
// // Created by jade on 2/27/19. // #ifndef TRYENV_PATCH_H #define TRYENV_PATCH_H #include "Config.h" #include "RotatedRectm.h" class Patch { Mat im; Mat grad_x, grad_y; Mat grad_rho, grad_theta; int histSize = 256; // number of bins, theta_hist size: 256 x 1 Mat theta_hist; Mat top_k_index;...
true
37454755f7cc909362d3a08251d67d8d31f4bcd8
C++
robertcoco/miercoles
/strcut.cpp
UTF-8
913
2.75
3
[]
no_license
#include<iostream> #include<conio.h> #include<string.h> using namespace std; struct carros{ char marca[40]; int precio; }carro1,carro2; int main(){ cout<<"introduce la marca del auto numero: "; cin.getline(carro2.marca,40,'\n'); cout<<"introduce la el precio de auto numero2: "; cin>>carro2.precio; cou...
true
6e815c56f81b3c3e7d07f7a0a9565799df46bca1
C++
greatlse/TURTLE
/gamess-gpu/diesel/lib/Math/etc/BinomialCoefficient.h
UTF-8
911
2.609375
3
[]
no_license
//*********************************************************************** // // Name: BinomialCoefficient.h // // Description: // // Author: Michael Hanrath // // Version: 0.0 // // Date: 07.08.1996 // // // // //*********************************************************************** #ifndef __BINOMIALCOEFFICIENT_H #...
true
ec0ecb63f2a6a998c3d511b5b804e5d7c15e18b1
C++
zencher/algorithms_gym
/leetcode/src/leetcode0092.cpp
UTF-8
1,282
3.484375
3
[]
no_license
// leetcode092.cpp // #include <stack> #include <queue> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode *reverseBetween( ListNode *head, int m, int n ) { int index = 0; ListNode * tmp = head; queue<ListN...
true
70fd0e40ffd89e3d974dc3b573f20014403e7d59
C++
mdrneale/AGE
/source/window/keyboard.cpp
UTF-8
979
3.046875
3
[]
no_license
#include "keyboard.h" Keyboard::Keyboard() { for (int i = 0; i < keyCount; ++i) { keys[i] = NOTTOUCHED; } } Keyboard::~Keyboard() { } void Keyboard::Update() { for (int i = 0; i < keyCount; ++i) { switch (keys[i]) { case DOWN: keys[i] = HELD; break; case UP: keys[i] = NOTTOUCHED; } }...
true
b99898d58bc653466358bca5f03524e4191684cf
C++
hennesseyr14/EECS-280
/p4-calculator/calc.cpp
UTF-8
4,622
3.546875
4
[]
no_license
// Ryan Hennessey /* calc.cpp * * RPN calculator * EECS 280 Project 4 */ #define NDEBUG #include "Stack.h" #include <iostream> #include <string> #include <cassert> using namespace std; // REQUIRES: stack has at least two elements // MODIFIES: stack // EFFECTS: Adds the top two numbers on the st...
true
9ee157c0394023c61fa89e5eb2d34b79655b9200
C++
ras1234/interviewBit
/Arrays/findDuplicate.cpp
UTF-8
942
3.484375
3
[]
no_license
/* Given a read only array of n + 1 integers between 1 and n, find one number that repeats in linear time using less than O(n) space and traversing the stream sequentially O(1) times. Sample Input: [3 4 1 4 1] Sample Output: 1 If there are multiple possible answers ( like in the sample case above ), output any o...
true
80a59ae1db6def0c4f9427153624aa6e5b084ae5
C++
gfh16/StudyNotes
/CPP/C++学习资料/C++入门经典/书本例题/Code From the 2271 Book/ch15/prog15_07/carton.cpp
UTF-8
757
3.296875
3
[]
no_license
// Carton.cpp #include "Carton.h" #include <cstring> #include <iostream> using std::cout; using std::endl; // Constructor Carton::Carton(double lv, double wv, double hv, const char* pStr, double dense, double thick): Box(lv, wv, hv), density(dense), thickness(thick) ...
true
2f702a97a30049d1b08c7559037b6d8844b0139a
C++
ramassin/partio
/src/lib/io/PLY.cpp
UTF-8
13,661
2.640625
3
[]
no_license
/* AAAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRRRRRRRRRGHHHHHHHHHHHHHHHHHHHHHH Core List (required) -------------------- Element: vertex x float x coordinate y float y coordinate z float z coordinate Element: face vertex_indices list of int indices to vertices Second...
true
4733945b43d0a71fbc0a09b5925874100e25b512
C++
ViktorTsekov/CPP
/OOP/Handling_Exceptions/Order/Order.cpp
UTF-8
1,540
3.671875
4
[]
no_license
#include "Order.h" ostream& operator<<(ostream& out, const Order& order) { out << endl; out << "Order number: " << order.orderNumber << endl; out << "Quantity ordered: " << order.quantityOrdered << endl; out << "Single price: " << order.singlePrice << endl; out << "Total price: " << order.totalPric...
true
17820f0dc90a3761670394d620d1c980c8259c02
C++
nonprofittechy/Arduino_Word_Clock
/word clock/Word_clock__nico_ - Copy/Word_clock__nico_.ino
UTF-8
13,952
2.6875
3
[]
no_license
#include <DS1307RTC.h> #include <Time.h> #include <Wire.h> #include "LedControl.h" const int birthDay = 15; const int birthMonth = 6; const int minUpPin = 3; const int minDownPin = 5; int minUpState; int minDownState; int lastMinUpState = HIGH; // we are using the pull-up resistor, so we check for pin state == LOW...
true
e4793b1b82f85318ebe912f1148bb4d9296130f3
C++
reyhard/o2scripts
/std/paramFile.inc
UTF-8
13,474
3.0625
3
[]
no_license
//define parsing function //param - IOStream, opened file, or another stream, return - array parsed paramfile; paramFileRead= { scopeName "paramFile.inc"; private "_ReadClass"; private "_ReadRawClass"; private "_ReadArray"; private "_ReadSimpleValue"; private "_ReadSimpleItem"; //localfunction...
true
b7e494648ec3a0e6e79fc78fa5a9d878ab95c3c1
C++
Shinakshi09/Python
/Programming_Practise-main/C++ Practise/XOR_Operation_Bitwise_Operator.cpp
UTF-8
145
2.578125
3
[]
no_license
/* 2. OR Operation */ #include <iostream> using namespace std; int main() { int x = 5, y = 6, z; z = xˆy; cout << z << endl; }
true
eb0f105a21e9815785e5701a90e77c2abf089807
C++
bmvskii/DataStructuresAndAlgorithms
/Common data structures/5/double_queue_circular_array_impl.cpp
UTF-8
2,388
3.265625
3
[]
no_license
#include "double_queue.hpp" #include <cassert> struct DoubleArrayQueue { double ** m_pData; int * m_pSizes; int m_Size; int m_FrontIndex; int m_BackIndex; }; DoubleArrayQueue * DoubleArrayQueueCreate ( int _fixedSize ) { assert( _fixedSize > 0 ); DoubleArrayQueue * pNewQueue = new Doubl...
true
d336a9943d999656dfb2848f43f4811845c9c719
C++
plaice/Williams
/09/interruptible_thread_tm.h
UTF-8
1,640
3.203125
3
[ "BSL-1.0" ]
permissive
// Listing 9.11, pp.293-294, Williams. // Using a timeout in interruptible_wait for // std::condition_variable. #include <condition_variable> #include <atomic> #include <boost/thread/thread.hpp> class interrupt_flag { std::atomic<bool> flag; std::condition_variable* thread_cond; std::mutex set_clear_mutex...
true
9046505c9c2a45c8bd811cc0fc9f11b1847b2a52
C++
potenbtlife/wxWidgets_All
/timeMgr/timeMgr/20150324_bak/CDBSqlite.h
GB18030
4,457
3.421875
3
[]
no_license
#ifndef ASTMANAGER_CDBSQLITE_H #define ASTMANAGER_CDBSQLITE_H #include "sqlite3.h" #include<string> #include<iostream> using namespace std; const int RET_OK = 0; //ִгɹֵ const int RET_FAIL = -1; //ִʧֵܷ class CDBSqlite { public: //ȱʡ캯 CDBSqlite(); /** *@Description: 캯ʼdbnameԱ *@param[IN] dbn...
true
761924ed89c7e79d39d148a3805549d6de3d39a5
C++
ItemZheng/PAT_Advanced_Level_Answer
/1044.cpp
UTF-8
1,097
3.03125
3
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; // 无坑,就像一个滑动窗口一样,如果小于K,就 end++; 不然就 begin++; 然后评估当前的值是否合适 int main(){ int N, K; cin >> N >> K; int number[N]; for(int i = 0; i < N; i++){ cin >> number[i]; } int min = -1; vector<pair<int, int>> idx_pai...
true
4acdac128f95bf934c082e553eeebc1f46d912bc
C++
arc80/plywood
/repos/plywood/src/runtime/ply-runtime/container/BlockList.h
UTF-8
8,260
2.6875
3
[ "MIT" ]
permissive
/*------------------------------------ ///\ Plywood C++ Framework \\\/ https://plywood.arc80.com/ ------------------------------------*/ #pragma once #include <ply-runtime/Core.h> #include <ply-runtime/container/Reference.h> #include <ply-runtime/string/String.h> #include <ply-runtime/container/LambdaView.h> nam...
true
cd756dc9a9c4ee340a3077af50d406b2fc627d08
C++
iridium-browser/iridium-browser
/third_party/eigen3/src/Eigen/src/Geometry/OrthoMethods.h
UTF-8
11,255
2.828125
3
[ "BSD-3-Clause", "Apache-2.0", "LGPL-2.0-or-later", "MIT", "GPL-1.0-or-later", "LicenseRef-scancode-unknown-license-reference", "MPL-2.0", "Minpack" ]
permissive
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0...
true
0e01c0c8f686b504d4fd42c33781545bdd71e0f4
C++
tylerAllenGithub/University
/course.cpp
UTF-8
2,058
3.5
4
[]
no_license
#ifndef COURSE_C #define COURSE_C #include <iostream> #include <string> using namespace std; #include "course.h" long course::nextCRN=200; //initialize static variable course::course()//takes no parameters {//initialize CRN=nextCRN++; maxAvailableSeats=0; name=" "; departID=0; assignedSeat...
true
d8135e886dda68fb08b17e1b755a0317639309dc
C++
chencorey/TopCoder
/SRM247/TriangleType.cpp
UTF-8
570
3.265625
3
[]
no_license
// https://community.topcoder.com/stat?c=problem_statement&pm=4610&rd=7222 // This problem was used for: // Single Round Match 247 Round 1 - Division II, Level One #include <string> #include <algorithm> using namespace std; class TriangleType { public: string type(int a, int b, int c) { int hyp = max(max(a, b), ...
true
ab97b338b934e81f3e4c9323bbf1c2731147747c
C++
rafalmeisel/Inteligent-Pulsometer
/main.ino
UTF-8
3,901
2.671875
3
[]
no_license
#include <Adafruit_SSD1306.h> #include <SoftwareSerial.h> // range of pulse limits #define UpperThreshold 750 #define LowerThreshold 700 // lcd display phisical adress #define OLED_Address 0x3C // reset pin for lcd display Adafruit_SSD1306 oled(4); bool ignoreAanalogValue = false; bool firstBeatsDetected = false; u...
true
bbf3a8f1f742aaf25bc9fbfe064c68ba1db395bc
C++
mishagam/progs
/cc/fracs_test/strtoolm.h
KOI8-R
8,418
2.671875
3
[]
no_license
/** * \file strtoolm.h * \brief STL string * * : * .., M.Gambarian */ #ifndef mSTRTOOL_H #define mSTRTOOL_H #include <stdarg.h> // #include <string> #include "newtypes.h" /** * remained from Artem - I probably wouldn't define this. */ typedef char * pchar; /** * mask character which is ...
true
714a1f1d2b3a3bafacc3e4b8173eac48ed4c9de3
C++
mitalletap/DataStructures2430
/hw1-archive/hw1.cpp
UTF-8
15,055
2.9375
3
[]
no_license
// I had resources from last semester which I used to complete this assignment as well as // Brandon Labuschagne on youtube #include <iostream> #include <fstream> #include <sstream> #include <string> #include <algorithm> #include "ArgumentManager.h" using namespace std; struct node { // Keys /* string identifica...
true
521562ce5722c45d7f3e54a1564959767838ac55
C++
sahilgoyals1999/Love-Babber-DSA-450
/06. Binary Trees/20. Construct Tree from Inorder & Preorder.cpp
UTF-8
1,046
3.21875
3
[]
no_license
// https://practice.geeksforgeeks.org/problems/construct-tree-1/1 // T.C => O(n^2), S.C => O(n) Node* solve(int in[], int pre[], int inS, int inE, int preS, int preE) { if (inS > inE) return NULL; int rootData = pre[preS]; int rootIndex = -1; // Finding root index in inorder for (int i = inS; i <= inE; ++i) { ...
true
2d877aac93f2793a5db348381af779ac86a62594
C++
btnkij/ACM
/libreoj/LIBREOJ10038.cpp
UTF-8
2,986
2.6875
3
[]
no_license
/** * Number:loj10038 * Title:「一本通 2.1 练习 4」A Horrible Poem * Status:AC * Tag:[字符串哈希, 素数筛] **/ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <vector> #include <queue> #include <stack> using namespace std; #define INF 0x3f3f3f3f #define PI acos(-1) typedef int...
true
2b9d09b06f8f7b39a2a4265bd452e4b12713b47d
C++
Emartiinez/Cpp--School-Projects
/WS07 complete/in-lab/Hero.h
UTF-8
712
2.75
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #ifndef SICT_HERO_H #define SICT_HERO_H // Workshop 7 // Hero.h // Fabio Bernal // 2018/07/12 namespace sict { const int max_rounds = 100; const int MAX_NAME = 41; class Hero { private: char hero_name[MAX_NAME]; int health; int attack; void set();...
true
8a80fd07246808e43dafd58421855ae69dd025d6
C++
Basicconstruction/Methods
/ACM-pretest/acmK.cpp
UTF-8
742
3.0625
3
[]
no_license
#include <iostream> using namespace std; long cAB(int B, int A){ if(A==0){ return 1; } long output = 1; for(int i = 1;i<=A;i++){ output *= (B-i+1); output /= i; } return output; } void printWays(int s){ int howMany2; long ways = 0; if(s % 2 == 0){ howM...
true
f9102a718466646de578f49ed64a7f1ac6a47e25
C++
professorlineu/PROA3-2019-2
/Atividades/Clayton_Ribeiro/Lista3/L3EX17.cpp
ISO-8859-1
680
2.96875
3
[]
no_license
/********************************************************** - Autor: Clayton C Ribeiro - Descrio: Lista 3 - Exerccio 17 **********************************************************/ #include <iostream> #include <locale.h> #include <cstdlib> using namespace std; int main () { int iSenha = 0; s...
true
7b8a9d34157012bd0b66fa97c2f206f537d8579f
C++
yisenFangW/leetcode
/354.俄罗斯套娃信封问题.cpp
UTF-8
2,976
3.6875
4
[]
no_license
给定一些标记了宽度和高度的信封,宽度和高度以整数对形式 (w, h) 出现。当另一个信封的宽度和高度都比这个信封大的时候,这个信封就可以放进另一个信封里,如同俄罗斯套娃一样。 请计算最多能有多少个信封能组成一组“俄罗斯套娃”信封(即可以把一个信封放到另一个信封里面)。 说明: 不允许旋转信封。 示例: 输入: envelopes = [[5,4],[6,4],[6,7],[2,3]] 输出: 3 解释: 最多信封的个数为 3, 组合为: [2,3] => [5,4] => [6,7]。 题解:跟最长连续上升子数组是一类题目(动态规划解法)(这样写时间复杂度较高O(n*n)) //1.因为这个是无序的,所以先排下序,先用第...
true
d603041a639929b1886104a255476650416d9ce8
C++
GhulamMustafaGM/C-Programming
/08-C++ Programing/BubbleSort.cpp
UTF-8
685
3.734375
4
[]
no_license
// Bubble sort app #include <iostream> using namespace std; int length = 0; int arr[100] = {5}; int push(int num = 5) { arr[length + 1] = num; length++; } int main() { push(10); push(12); push(8); push(2); push(70); for (int i = 0; i <= length; i++) { for (int j = 0; j <=...
true
e38cade023fa52f0d20d08ec3c2a350bc703fbb4
C++
emd0008/MathFunctionProject
/TestingMode.cpp
UTF-8
956
3.765625
4
[]
no_license
#include <iostream> #include <string> using namespace std; bool testing; string input_s; void testingFunction() { testing = true; while (testing) { cout << "\nWelcome to the Testing mode." << endl; cout << "You can chose either the Basic or Common formulas to test on." << endl; cout << "Input the numbers you...
true
4f8fbd731c937bc225ddbd41a03861b8b7ff574c
C++
FMyb/Itmo-Algo
/lab10/d.cpp
UTF-8
3,562
2.59375
3
[]
no_license
// // Created by Yarolsav Ilin CT ITMO M3238 on 13.11.2020. // #include <bits/stdc++.h> using namespace std; void dfs(int v, vector<vector<int>> &ed, vector<int> &p, vector<int> &right, vector<bool> &usedLeft, vector<bool> &usedRight) { usedLeft[v] = true; for (auto u : ed[v]) { if (!usedRig...
true
3cb533dd1ac73cbaaef96fb8e3a45f2204d49745
C++
sachavincent/B-Splines
/src/myopenglwidget.cpp
UTF-8
5,097
2.53125
3
[]
no_license
#include "myopenglwidget.h" #include <QMessageBox> #include <QApplication> #include <QDateTime> #include <stdio.h> #include <stdlib.h> #include <iostream> #include <stdexcept> MyOpenGLWidget::MyOpenGLWidget(QWidget *parent) :QOpenGLWidget(parent)/*, QOpenGLFunctions_4_1_Core()*/, _openglDemo(nullptr), _lastime(0) { ...
true
e4e67fefc59b00536d503f3d7df0fe01690700e2
C++
Starbix/hyperion
/include/utils/RgbChannelCorrection.h
UTF-8
1,592
3.234375
3
[ "MIT" ]
permissive
#pragma once // STL includes #include <cstdint> /// Correction for a single color byte value /// All configuration values are unsigned int and assume the color value to be between 0 and 255 class RgbChannelCorrection { public: /// Default constructor RgbChannelCorrection(); /// Constructor /// @param correction...
true
c79f6f978bf0ddea3221145c2b1d2d38836cb692
C++
machinekoder/qt-qmake-catch-and-trompeloeil-seed
/tests/tst_apptests.cpp
UTF-8
2,852
3.140625
3
[ "MIT" ]
permissive
#include <catch.hpp> #include <trompeloeil.hpp> #include <QSignalSpy> #include <warehouse.h> #include <viennawarehouse.h> #include <order.h> #include <autoorder.h> extern template struct trompeloeil::reporter<trompeloeil::specialized>; TEST_CASE("ViennaWarehouse starts with exactly 15 Schnitzel", "[app]") { Vien...
true
ae0419e28a5c386f38b67d0c5486fba300464f12
C++
ChesterHu/cs32
/proj3/main.cpp
UTF-8
7,574
2.828125
3
[]
no_license
#include "Game.h" #include "Player.h" #include "Board.h" #include <iostream> #include <string> using namespace std; bool addStandardShips(Game& g) { return g.addShip(5, 'A', "aircraft carrier") && g.addShip(4, 'B', "battleship") && g.addShip(3, 'D', "destroyer") && g.addShip(3,...
true
187ba9302d4f904646a64210d654282d2c5561cf
C++
expo/expo
/android/vendored/unversioned/@shopify/react-native-skia/cpp/skia/include/core/SkRRect.h
UTF-8
20,410
2.703125
3
[ "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkRRect_DEFINED #define SkRRect_DEFINED #include "include/core/SkPoint.h" #include "include/core/SkRect.h" #include "include/core/SkScalar.h" #include "include/core/S...
true
3a54985f3f47a8749f38cf482ec99b9651bc5477
C++
shubhgkr/codesignal
/core/gravitation.cpp
UTF-8
808
2.8125
3
[]
no_license
// // Created by shubhgkr on 14/10/18. // https://app.codesignal.com/arcade/code-arcade/waterfall-of-integration/hqrYesGKEaKQnv7Sv // #include <vector> #include <string> #include <algorithm> std::vector<int> gravitation(std::vector<std::string> rows) { int min = -1; std::vector<int> ans; for (int col = 0; col < row...
true
c6dfc68c56f832f28f723919d3d940d81215bbda
C++
sauravgupta2800/MyCodingPractice
/Code-Block/nge.cpp
UTF-8
558
2.703125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { int arr[]={5,4,5,6,1,3,9}; int n=7; stack<int> s; s.push(0); for(int i=1;i<n;i++) { if(arr[s.top()]>=arr[i]) s.push(i); else { while( !s.empty() && arr[s.top()]<arr[i]) { ...
true
838a9cd8a5ab57effef488e473f9db7af4336af5
C++
sunbun99/Schoolwork-Practice
/Set/mainset.cpp
UTF-8
1,022
3.046875
3
[]
no_license
#include <iostream> #include "set.h" using namespace main_savitch_11; using namespace std; int main() { set<int> btree; cout << "After insertion: " << endl; btree.insert(2); btree.insert(3); btree.insert(5); btree.insert(4); btree.insert(10); btree.print(3); cout << "Searching for f...
true
93739ba600ee2debe778350b7bf6742d5adc93f2
C++
nixiz/advanced_cpp_course
/src/1-Inheritance/friend_usage.cpp
UTF-8
1,081
3.0625
3
[ "MIT" ]
permissive
#include "advanced_cpp_topics.h" #include <sstream> #include <iostream> namespace FriendUsageRealWorld { class Rectangle { int width, height; friend class RectangleTest; public: Rectangle() {} Rectangle(int x, int y) : width(x), height(y) {} int area() const { return width * height; } f...
true
a7cfc1cb00aaae02ebd556d267cb413daa2e2ff2
C++
adityanjr/code-DS-ALGO
/CodeForces/Complete/800-899/816B-KarenAndCoffee.cpp
UTF-8
519
2.546875
3
[ "MIT" ]
permissive
#include <cstdio> #include <vector> int main(){ const long N = 200100; std::vector<long> a(N), b(N); long n, k, q; scanf("%ld %ld %ld", &n, &k, &q); for(long p = 0; p < n; p++){ long l, r; scanf("%ld %ld", &l, &r); ++a[l]; --a[r + 1]; } for(long p = 1; p < N; p++){a[p] += a[p ...
true
199db0910eb03f59f340101b414ddec92d6b511e
C++
MikamiTetsuro365/Atcoder
/Codeforce/A_Start Up.cpp
UTF-8
1,057
2.578125
3
[]
no_license
#include "bits/stdc++.h" using namespace std; typedef long long int ll; typedef pair<ll, ll > pi; typedef pair<pair<ll, ll >, ll > pii; vector<ll > vec; vector<vector<ll > > vec2; ll MOD = 1000000007; ll INF = 1145141919454519; using namespace std; //回文判定かと思いきや //アルファベットも左右対称じゃないと駄目です(試される英語力 int ma...
true
69909ca8de0b8a428f7c12a178f6234833e22eeb
C++
danscu/onlinejudge
/sols/algo/spfa.cpp
UTF-8
1,660
2.796875
3
[]
no_license
//Shortest Path Faster Algorithm #include <iostream> #include <cstring> #include <fstream> using namespace std; #define maxint 200000; using namespace std; const int juzhen=101; int a[juzhen][juzhen];//邻接矩阵 int dist[juzhen];//源点到每个点的最短距离 int n;//n为图中的节点数 void spfa(int s) { int q[juzhen]; //队列 int v[juzhen]; /...
true
3e7f8ce446f9866ba8124c92236cf91eb6758428
C++
IT-Jhon/caseTest
/CaseTypeManaServer/subinfos/caseinfo.cpp
UTF-8
1,203
2.90625
3
[]
no_license
#include "caseinfo.h" #include <QDebug> CaseInfo::CaseInfo() { m_id.clear(); m_caseType.clear(); m_name.clear(); m_caseCondit.clear(); } CaseInfo::CaseInfo(const QString &id, const QString &caseType, const QString &name, const QString &caseCondit) { m_id = id; ...
true
fce098e4310ea53de042145e3ea44d8d4e42952c
C++
joe-zxh/OJ
/剑指offer/面试题66 构建乘积数组.cpp
UTF-8
666
2.875
3
[]
no_license
class Solution { public: vector<int> multiply(const vector<int>& A) { int sz = A.size(); vector<int> ret(sz); if(sz==0){ return ret; } vector<int> B(sz); vector<int> C(sz); B[0] = 1; C[sz-1] = 1; int curMult = 1; ...
true
2260c54b1e34f1a6d855456cdb2541a7db901d78
C++
nuronialBlock/problemSolving
/ShafayetBlog/DS/LinkedList/linkedList.cpp
UTF-8
1,374
3.859375
4
[]
no_license
#include <bits/stdc++.h> using namespace std; int a[5]; // Array's distribution in memory bool ArraySDistribution(){ for (int i = 0; i < 5; ++i) cin >> a[i]; for (int i = 0; i < 5; ++i) { printf("For %d, Memory Address in your PC: %d\n", i,&a[i]); } } // node stores data and it's next node's address struct no...
true
69c43d6ddf04d1c12abec81077aa942ee9db5499
C++
JosephBMartinV/PicrossSDL
/picross/src/board.h
UTF-8
1,086
2.84375
3
[]
no_license
#ifndef BOARD_H #define BOARD_H #include <vector> #include <string> class Board{ public: Board(int s);//overloaded constructors Board(int r, int c); enum State {Solve=0, Blank, Mark};//enumeration for board state //getter functions int rows(); int cols(); ...
true
4e824dd2a6da19701d8bf525bb637ff3db03fd99
C++
jdnull/LeetCode
/66 Plus One/main.cpp
UTF-8
1,173
3.28125
3
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; class Solution { public: vector<int> plusOne(vector<int>& digits) { int carryOver = 0; vector<int>::reverse_iterator rit = digits.rbegin(); if (*rit + 1 > 9) { carryOver = 1; *rit = 0; ...
true
d474c6fc0ecd4e0799860bf030fb4336336a8fbc
C++
chinmaygarde/flutter_engine
/impeller/renderer/backend/vulkan/fence_waiter_vk.cc
UTF-8
2,763
2.5625
3
[ "BSD-3-Clause" ]
permissive
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "impeller/renderer/backend/vulkan/fence_waiter_vk.h" #include <chrono> #include "flutter/fml/thread.h" #include "flutter/fml/trace_event.h" nam...
true
685c69a3a90bf6fcee82227ec7852edf3c4ecc14
C++
jjfnext/ghrr
/filedb/src/app/main.cpp
UTF-8
3,464
2.703125
3
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; #include <cassert> #include <boost/lexical_cast.hpp> #include <boost/filesystem.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/gregorian/gregorian.hpp> // check the above and delete #include <QApplicat...
true
1b1940da5f741e0d0557d413a59e8e50fe6d76cb
C++
BjornVT/Masterproef
/seek_thermal/camSettings.cpp
UTF-8
1,898
2.640625
3
[]
no_license
#include "camSettings.hpp" void camSettings::write(FileStorage& fs) const //Write serialization for this class { fs << "{" << "cameraMatrixRGB" << cameraMatrix[RGB] << "cameraMatrixLWIR" << cameraMatrix[LWIR] << "distCoeffsRGB" << distCoeffs[RGB] << "distCoeffsLWIR" << di...
true
4a7bdf88caebb4db9fd3104bf34cffd2c7da94f4
C++
Korko/sia-ifips-2010
/PropreRayWindows/Intersection.cpp
UTF-8
818
2.796875
3
[]
no_license
#include "Intersection.h" #include <float.h> Intersection::Intersection():couleur(), distance(FLT_MAX), contact(), normale(){ } Intersection::Intersection(Couleur n_couleur): couleur(n_couleur), distance(FLT_MAX), contact(), normale(){ } Intersection::Intersection(Couleur n_couleur, ...
true
b7c139c8879dd2e9760cde9a9a4fcf3a55d87915
C++
derickwarshaw/CPPLabs
/Programming 2330/Lab/Lab8.cpp
UTF-8
3,749
4.21875
4
[]
no_license
// Derick Warshaw // Lab #8 Character processing with arrays // COSC2330 Section 001 #include <iostream> #include <cstring> using namespace std; int main() { // variable initialization const int SIZE = 20; char line[SIZE]; int count = 0; char letter; bool stop = false; int bucket = 0; bool bi...
true
7c7f5a623c7d7f28895097d4479e0b063b44aa25
C++
Akkarim/TP1-CI-1221-II-3ra
/Arbol/hijoIzqHD1.cpp
UTF-8
3,553
2.75
3
[]
no_license
/* * File: hijoIzqHD1.cpp * Author: luisd * * Created on 25 de septiembre de 2017, 09:14 PM */ #include "hijoIzqHD1.h" hijoIzqHD1::hijoIzqHD1() { } hijoIzqHD1::~hijoIzqHD1() { } void hijoIzqHD1::iniciar() { primero = new NodohIHD1(); cantidadNodos = 0; } void hijoIzqHD1::destruir() { delete t...
true
8ffc748e69af73280a998c4aa27a0a7c106b728e
C++
adamja/HydroControl
/wemos_controller/src/main.cpp
UTF-8
5,839
2.59375
3
[]
no_license
/* Program: Wemos Hydro Control Version: 1.0.0 Author: Adam Jacob Comments: TODO: */ #include <Arduino.h> #include <ESP8266WiFi.h> #include <ESP8266mDNS.h> #include <WiFiUdp.h> #include <ArduinoOTA.h> // Over the air #include <PubSubClient.h> // MQTT library #include <QueueArray.h> // Queue library for hol...
true
cd7fb3502059fb98e41a6001b40db797ebb4a530
C++
alexjhoff/C
/COEN 70/ExpressionTree/ExpressionTree/ExpressionTree.h
UTF-8
2,504
3.234375
3
[]
no_license
// // ExpressionTree.h // ExpressionTree // // Created by Alex Hoff and Nathan Tucker on 2/24/14. // Copyright (c) 2014 Alex Hoff and Nathan Tucker. All rights reserved. // #ifndef ExpressionTree_ExpressionTree_h #define ExpressionTree_ExpressionTree_h #include <iostream> #include <string> using namespace std; c...
true
81f3faa8db69c017391932954d32106fb22f4c88
C++
kzeoh/CodePractice
/Codility/4-1.cpp
UTF-8
960
2.859375
3
[]
no_license
// you can use includes, for example: #include <algorithm> #include <map> // you can write to stdout for debugging purposes, e.g. // cout << "this is a debug message" << endl; int solution(int X, vector<int> &A) { // write your code in C++14 (g++ 6.2.0) int count = 0; int answer = -1, idx=0, tar=X; ma...
true
c336660ca7de608b0ee590063beb078aeea48e86
C++
kryheb/coursera-crypto
/week6-public-key-encryption/src/main.cpp
UTF-8
9,671
2.515625
3
[]
no_license
#include <stdio.h> #include <string> #include <iostream> #include <sstream> #include <cmath> #include <gmpxx.h> #include "utils/log/log.hpp" #include <boost/algorithm/string.hpp> class ModulusFactorBase { protected: explicit ModulusFactorBase(const std::string aMpzStr): N{aMpzStr} {} virtual mpz_class fa...
true
33afa253bd185ca4e5c3f3db566a436099b102ab
C++
thejasonhsu/Monopoly
/guiplayer.cpp
UTF-8
780
2.90625
3
[]
no_license
#include "guiplayer.h" #include "player.h" #include <iostream> #include <string> GUIPlayer::GUIPlayer( Player* p ) { player = p; if(nameLabel == NULL) nameLabel = new QLabel( this ); nameLabel->setTextFormat(Qt::RichText); updateStats(); } QString GUIPlayer::convert(int num) { QString str = ""; ...
true
f46a4f2659c852e4a691a340302d4b1949c3f972
C++
lynar/-Cplusplus-Snoopy
/object.h
ISO-8859-1
543
2.96875
3
[]
no_license
#ifndef OBJECT_H_INCLUDED #define OBJECT_H_INCLUDED #include "console.h" class Object { protected: ///peut etre modifi dans les classes hritires int m_coordX; // coordonnes en X int m_coordY; public: //constructeur destructeur Object(); Object(int coordX, int coordY); ~Object();...
true
479d8a29199387a6aa2d50c72eea2daee1426e88
C++
jmatta1/DecompLib
/Example/DecomposeSpectrum/MiscLib/UserIo.cpp
UTF-8
6,674
2.75
3
[ "MIT" ]
permissive
/*!***************************************************************************** ******************************************************************************** ** ** @copyright Copyright (C) 2018 James Till Matta ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; withou...
true
59272524e0233e674917bb1ad05c484b46c2c099
C++
Humblefool14/UVa-solutions
/Easy/11805 Bafana Bafana.cpp
UTF-8
342
2.65625
3
[]
no_license
#include<iostream> using namespace std; int main(){ int t; cin >> t; int cases =0; while(t--){ cases++; int N,K,P; cin >> N >> K >> P; int res = (K+P)%N; if(res ==0) cout << "Case " << cases << ": " << N << endl; else cout << "Case " << cases << ": " << res << endl...
true
4f92e302b549921eb772a5889d635e7e6e049f50
C++
yss120612/water
/src/Rtc.cpp
UTF-8
2,902
2.578125
3
[]
no_license
#include "Rtc.h" #include "Config.h" #include "Log.h" Rtc1302::Rtc1302(){ _short_interval=120000; last_update=0; upd_success=false; } Rtc1302::~Rtc1302(){ if (_rtc!=NULL) delete(_rtc); if (_tw!=NULL) delete(_tw); if (timeClient!=NULL) delete(timeClient); if (ntpUDP!=NULL) delete(ntpUDP); } ///qwq e bool Rtc1302...
true
7b3ceadc4dcce771760d17a9a309a0a2a289f473
C++
apple/swift
/include/swift/Basic/Program.h
UTF-8
2,836
2.515625
3
[ "Apache-2.0", "Swift-exception" ]
permissive
//===--- Program.h ----------------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
true
36984e807741348771be41abae1dd56a05cbdb91
C++
pingpan2013/coding-exercises
/Sort and Search/find_kth_smallest_element_in_two_sorted_arrays.cc
UTF-8
1,949
3.546875
4
[]
no_license
/* * ===================================================================================== * * Filename: find_kth_smallest_element_in_two_sorted_arrays.cc * * Description: find kth smallest element in two sorted arrays * * Created: 01/17/2015 16:31:24 * Compiler: g++ 4.7.0 * * ======...
true
9184a097e04273df0b8ed2df5ebb9b127dabb70c
C++
jjully/baekjoon
/21608.cpp
UTF-8
7,490
3.015625
3
[]
no_license
//baekjoon 21608 //shark elementary school //simulation //condition1 //condition2 //condition3 #include<iostream> #include<vector> int N=0; std::vector<std::vector<int> > Student; //v students like std::vector<std::vector<int> > Map; //seat std::vector<int> SeatOrder; int drow[] = {1, 0, -1, 0}; int dcol[] = {0, -...
true
427134d23ea8a7cbfb97839e399f4aaccda1665c
C++
antonyarce/MIPSnetic
/src/main.cpp
UTF-8
4,014
2.75
3
[]
no_license
/* * File: main.cpp * Author: cristhian * * Created on May 21, 2016, 7:12 PM */ #include <cstdlib> #include "decodificar.h" #include "interprete.h" #include <ctime> using namespace std; /* *Función principal para la ejecución del programa. */ int main(int argc, char** argv) { cout << "Iniciando Progr...
true
cbb2648f2094cc4fa0a23e30bc917c3c9276f17c
C++
uhdang/leetcode
/1528_20210619_EASY_CPP_Shuffle_String/main.cpp
UTF-8
594
3.03125
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include "Solution.h" #include "Solution_two.h" int main() { Solution solution; Solution_two solution_two; std::string s = "codeleet"; int indices_array[] = {4,5,6,7,0,2,1,3}; std::vector<int> indices_v (indices_array, indices_array + sizeo...
true
c168552e047d092b0c31c74c7d4742fdc36cce2d
C++
Billolha/TestOffFileReader
/TestOffFileReader/headers/classetriangleisocele.hh
UTF-8
1,947
2.78125
3
[]
no_license
/*! \file classetriangleisocele.hh * * \author Paul BERNARD <paul.bernard@eisti.fr> * * \version 0.1 * Creation du fichier classetriangleisocele.hh * \brief classe de triangle isocele */ #ifndef __CLASSETRIANGLEISOCELE_HH_ #define __CLASSETRIANGLEISO...
true
3ccbf0097456f9a35266ff0b368592ff31c99325
C++
hbakhshandeh/iso8583_cipher
/cipher/inc/pinblock.h
UTF-8
1,195
2.578125
3
[]
no_license
#ifndef PINBLOCK_H_ #define PINBLOCK_H_ #include "iso_8583.h" #include "hex.h" #include "ascii.h" #include "crypto.h" #include "exclusive_or.h" #include <string_view> #include <variant> #include <optional> namespace ISO8583 { class pinblock { protected: tools::hex hex; tools::ascii ascii; tools::crypto cryp; to...
true
b3886758f2b376d36195135f970e8eb303201c6a
C++
patelsneh18/GeeksForGeeks-DSA-Workshop
/Week 1/Arrays/P09-subArrOfGivenSum.cpp
UTF-8
839
3.421875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; vector<int> subarraySum(int arr[], int n, int s){ vector<int> ans; for(int i=0;i<n;i++){ int sum=0; for(int j=i;j<n;j++){ sum+=arr[j]; if(sum==s){ ans.push_back(i+1); ans.push_back(j+1); ...
true
8a18dd8a63787c22d573d004e952067eab86ee90
C++
stellarfloat/2021-1_cpp_SnakeGame
/snakegame/GameManager.cpp
UTF-8
8,242
2.859375
3
[]
no_license
// @author 추헌준(20203155) #include <chrono> #include <thread> #include <string> #include <ncurses.h> #include "GameManager.hpp" #include "MapData.hpp" #include "kbhit.hpp" MapData *map; ItemManager *item; Snake *snake; GateManager *gate; int currentLevel = 0; // gametick length (ms) int GAMETICK_...
true
47f6fb598b54ac2cd4cdf0d93a0b9f59e8013e97
C++
StathisTsirigotis/battleship_simulation
/src/peiratiko.cpp
UTF-8
1,089
2.75
3
[]
no_license
#include "peiratiko.h" #include <iostream> #include <cstdlib> using namespace std; int Peiratiko::counter_peir_ships_created=0; int Peiratiko::counter_peir_ships_died=0; Peiratiko::Peiratiko(Naumaxia *n) : Ship(n, 1, 10) { total_attacks = 0; dinami = rand()%PEIR_MAX_DINAMI + 1; //Elaxisto 1 counter_peir_ships_...
true
ee7a1ead848aae6378fe1a2990e735b0e224f87d
C++
ExecDevOps/V3DLib
/Lib/Target/Pretty.cpp
UTF-8
3,957
2.671875
3
[ "MIT" ]
permissive
#include "Pretty.h" #include "Support/basics.h" #include "Target/Syntax.h" #include "Target/SmallLiteral.h" namespace V3DLib { namespace { std::string pretty(Imm imm) { std::string ret; switch (imm.tag) { case IMM_INT32: ret << imm.intVal; break; case IMM_FLOAT32: ret << imm.floatVal; br...
true
323d49fb8aa5d742da19ab8c2b9ca257ff93b035
C++
FabLabValsamoggia/GustavoTheSpaceman
/Firmware/Examples/ButtonsWithMp3/Tasti_e_mp3/Tasti_e_mp3.ino
UTF-8
3,490
2.640625
3
[ "MIT" ]
permissive
#include "DFRobotDFPlayerMini.h" #include "SoftwareSerial.h" #define BTN1 2 // pin tasto 1 #define BTN2 3 // pin tasto 2 #define BTN3 4 // pin tasto 3 #define BTN4 5 // pin tasto 4 //= Variabili per i bottoni ================================...
true
5b33abc696d32990b3e750009fb23d121ccf7f8e
C++
PoignardAzur/Space-Invaders
/Moteur2D/Interfaces/BasicArcadeLevel.h
UTF-8
2,782
3.234375
3
[]
no_license
#ifndef BASIC_ARCADE_LEVEL_HEADER #define BASIC_ARCADE_LEVEL_HEADER #include "AbstractLevel.h" #include "../Timer.h" template<typename In> class BasicArcadeLevel : public AbstractLevel<In> { public : BasicArcadeLevel(unsigned int seed = epoch_to_now().count()); BasicArcadeLevel(std::seed_seq& seed); ...
true
7a75af9a5678bc393f2b245faff0fe00f2e25a13
C++
keisuke-kanao/my-UVa-solutions
/Contest Volumes/Volume 103 (10300-10399)/UVa_10344_23_Out_of_5.cpp
UTF-8
2,072
3.21875
3
[]
no_license
/* UVa 10344 - 23 Out of 5 To build using Visual Studio 2008: cl -EHsc -O2 UVa_10344_23_Out_of_5.cpp */ #include <iostream> #include <algorithm> using namespace std; const int nr_variables = 5, nr_operators = 4; bool calculate_expression(int nr_applied, char operators[], const int variables[]) {...
true
e6ce612d67313ee14d1e3da8ffaffc213efb1dd4
C++
Y-Less/compiler
/source/compiler/memfile.c
UTF-8
2,024
2.671875
3
[ "Zlib", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
/* Implementation of a file functions interface for reading/writing into * memory. * * Copyright (c) faluco / http://www.amxmodx.org/, 2006 * Version: $Id: memfile.c 3636 2006-08-14 15:42:05Z thiadmer $ */ #include <assert.h> #include <stdlib.h> #include <string.h> #include "memfile.h" #if defined FORTIFY #...
true