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
3eb8d641af2400fa7a7ef228375647cb5152b4bf
C++
amov-lab/Prometheus
/Modules/motion_planning/min_snap_trajectory/uav_simulator/so3_quadrotor_simulator/include/ode/libs/numeric/odeint/performance/rt_explicit_rk.hpp
UTF-8
2,119
2.625
3
[ "Apache-2.0" ]
permissive
/* * rt_explicit_rk.hpp * * Copyright 2009-2012 Karsten Ahnert * Copyright 2009-2012 Mario Mulansky * * 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) */ #ifndef RT_EXPLICIT_RK_HPP_ #define RT_EXPLICIT_RK_...
true
706cc8b3eb6675586dc64f05af11b81f83fbe2bb
C++
zhanghuanzj/cpp
/USACO/1-3MixingMilk.cpp
UTF-8
971
2.796875
3
[ "Apache-2.0" ]
permissive
/* ID: zhanghu14 PROG: milk LANG: C++11 */ #include <iostream> #include <fstream> #include <string> #include <map> #include <vector> #include <unordered_set> #include <algorithm> #include <set> using namespace std; //#define STDIO #ifdef STDIO #define IN cin #define OUT cout #else #define IN fin #define OUT fout...
true
7f2ddd7885fea10988529de492f3c757f9fb0b8b
C++
FrankBlabu/GEP
/libs/system/GEPException.hpp
UTF-8
1,196
2.6875
3
[]
no_license
/* * GEPException.hpp - Exception base class * * Frank Cieslok, 03.06.2006 */ #ifndef __GEPException_hpp__ #define __GEPException_hpp__ #include <QtCore/QString> namespace GEP { /* * Base class for all GEP exception classes */ class Exception { public: Exception (const QString& message); v...
true
53d7b8d6fd36e9d7d1a4039b87c0097255cd0a84
C++
dis-triplebit/grace-slave
/TripleBit/tools/Mutex.cpp
UTF-8
431
2.8125
3
[]
no_license
/* * Mutex.cpp * * Created on: 2014-3-5 * Author: root */ #include "Mutex.h" Mutex::Mutex(){ // Constructor pthread_mutex_init(&mutex, 0); } Mutex::~Mutex(){ // Destructor pthread_mutex_destroy(&mutex); } void Mutex::lock(){ // Lock pthread_mutex_lock(&mutex); } bool Mutex::tryLock(){ // Try to lock ...
true
31519068c912bfc47a72e3b1be519b509b8f5508
C++
MukundAggarwalRsystems/RC-Car
/2. Test Codes/Sharp_ir_test_run_1/Sharp_ir_test_run_1.ino
UTF-8
774
2.84375
3
[]
no_license
const int analogInPin = A0; // Analog input pin that the potentiometer is attached to int sensorValue = 0; // value read from the pot void setup() { // initialize serial communications at 9600 bps: Serial.begin(115200); pinMode(8, OUTPUT); pinMode(9, OUTPUT); pinMode(10, OUTPUT); pinMode(11, OUTPUT...
true
0cc565eba2e483e0e3129dbc0a5082ee80ed1db4
C++
epics-base/pva2pva
/p2pApp/weakset.h
UTF-8
8,617
3.28125
3
[ "MIT" ]
permissive
#ifndef WEAKSET_H #define WEAKSET_H #include <set> #include <vector> #include <stdexcept> #include <pv/sharedPtr.h> #include <epicsMutex.h> #include <epicsGuard.h> /** @brief a std::set-ish container where entries are removed when ref. counts fall to zero * * A container of ref. counted (by shared_ptr) entries * ...
true
c39c5a9eadace687a214b2da64d38bade1a7bc78
C++
rishabh-live/oop-w-cpp-4-sem
/Labs/Lab 8/q2.cpp
UTF-8
746
4.0625
4
[]
no_license
// using friend function #include <bits/stdc++.h> using namespace std; int i = 1; class myclass { float a; public: void getdata(void) { cout << "Enter number " << i << " : "; cin >> a; i++; } friend myclass operator / (myclass a, myclass b) { myclass temp; temp.a = a.a / b.a; ...
true
137064f0e084021a1e5059e1d1a793b56429b042
C++
algoriddle/cp
/uva/01203.cc
UTF-8
552
2.71875
3
[ "MIT" ]
permissive
#include <iostream> #include <queue> #include <tuple> #include <vector> using namespace std; typedef tuple<int, int, int> query; int main() { ios::sync_with_stdio(false); string cmd; priority_queue<query, vector<query>, greater<query>> heap; while (cin >> cmd && cmd != "#") { int n, p; cin >> n >> p...
true
5c625c4dd721c812f676ca17fcfcd41b42b456d4
C++
mike9304/schoolWorks
/programming_language/HW(108)/Homework1/ext/nana/include/nana/gui/widgets/panel.hpp
UTF-8
1,869
2.703125
3
[ "BSL-1.0" ]
permissive
/** * A Panel Implementation * Nana C++ Library(http://www.nanaro.org) * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com) * * 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) * * @file: nana/gui/...
true
5ed843e08b99c5ab058201a7055046b6a81a9983
C++
jhoacar/algo2-tp2
/src/funcionalidades/Lista.h
UTF-8
3,242
3.75
4
[]
no_license
#ifndef LISTA_H #define LISTA_H #include "Nodo.h" template <class Dato> class Lista { protected: Nodo<Dato> *inicio; Nodo<Dato> *fin; unsigned long tamano; public: Lista(); /* PRE: POST: Libera la memoria reservada */ ~Lista(); /* PRE: Un dato a cargar en la lista POST: Almacena en la ult...
true
3dba7699f966373025a2cfc889fd49f60f2361ca
C++
kentril0/OpenGL_Atmospheric_Scattering
/src/scene/camera.cpp
UTF-8
4,117
2.875
3
[ "Apache-2.0" ]
permissive
/********************************************************** * < Interactive Atmospheric Scattering > * @author Martin Smutny, xsmutn13@stud.fit.vutbr.cz * @date April, 2021 * @file camera.cpp * @brief FPS Camera abstraction *********************************************************/ #include "core/pch.hpp" #inclu...
true
d686ee4d621b266ceacf45aec13fb7ed7e3c83ab
C++
Seungchul-Han/algorithm
/practice/algospot/fan_meeting/fan_meeting.cpp
UTF-8
2,108
2.953125
3
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; vector<int> multiply(const vector<int>& a, const vector<int>& b) { vector<int> c(a.size() + b.size(), 0); for (int i = 0; i < a.size(); ++i) for (int j = 0; j < b.size(); ++j) c[i + j] += a[i] * b[j]; return c;...
true
343de38fad0021988135e56d620325ed430d808c
C++
MarkusEson/GUI-Projekt-Januari
/GUI-Projekt-Januari/JanuariYahtzee/gamebrain.h
UTF-8
531
2.609375
3
[]
no_license
#ifndef GAMEBRAIN_H #define GAMEBRAIN_H // #include <iostream> #include <algorithm> #include <QDebug> #include <stdlib.h> #include <time.h> class Die { public: Die(); ~Die(); void setValue(int newValue); int getValue(); bool checkIsChecked(); private: int _value = 6; ...
true
e7c3af064041b5d384b69e28289985becf6826cb
C++
zhaoxuyan/leetcode_cpp
/DataStructure/0020-valid-parentheses.cpp
UTF-8
956
3.8125
4
[]
no_license
/* * 20. 有效括号 * * 用栈来解决 */ #include <algorithm> #include <iostream> #include <stack> #include <unordered_map> #include <vector> using namespace std; class Solution { private: stack<char> stack; unordered_map<char, char> map = { {'(', ')'}, {'{', '}'}, {'[', ']'}, }; public: ...
true
60aea444eb30bbbc78d9b0b056b47671b0b540dd
C++
ChrisMugwagwa/PhysicsEngineCplusplus
/physicsEngineLab/src/worldobject.cpp
UTF-8
3,152
3.03125
3
[]
no_license
#include "worldobject.h" #include "ofApp.h" #include <iostream> #include <cmath> // std::abs WorldObject::WorldObject() { dx = 0; dy = 0; y = 0; // top of the screnn. x = 0; // left of the screen. diameter = 10; // assuming a naive shape for now... spring = 0.05; friction = -0.9; } WorldObject::W...
true
ef3ab0837f9103956eb32def7b0a02ca60212794
C++
Antonija5654/oop_vjezbe
/Vjezba6/Zadatak/fun.cpp
UTF-8
2,861
3.21875
3
[]
no_license
#include <iostream> #include <math.h> #include "Header.h" using namespace OOP; int Vec3::counter = 0; std::istream& OOP::operator >> (istream& a, Vec3& vektor) { std::cout << "upisi x1, y1, z1, x2, y2, z2" << std::endl; a >> vektor.x1 >> vektor.y1 >> vektor.z1 >> vektor.x2 >> vektor.y2 >> vektor.z2; return a; } s...
true
ada675894c220e98b011ce7f73dd314dc2f73fc0
C++
x-fer/xfer-natpro
/2010/2_mi/jednakost/jednakost.cpp
UTF-8
585
2.78125
3
[]
no_license
#include <cstdio> using namespace std; const int MOD = 1000000007; const int N = 100000; typedef long long llint; llint power_mod(llint a, llint b, llint mod) { if (b == 0) return 1; if (b & 1) return a * power_mod(a * a % mod, b / 2, mod) % mod; return power_mod(a * a % mod, b / 2, mod); } in...
true
e59172f5bfdcbf235c82f5a7e0c2911f4e86219c
C++
lee-jisung/Algorithm-study
/백준/2842번 집배원 한상덕/2842.cpp
UTF-8
2,362
2.921875
3
[]
no_license
#include <iostream> #include <algorithm> #include <string> #include <cstring> #include <queue> #include <vector> #include <deque> #include <cmath> #define SIZE 51 #define INF 987654321 using namespace std; /* BFS + inchworm 고도시작지점, 끝지점을 한칸식 늘려주면서 배달이 가능한 경우 고도차의 최소값을 찾는다 */ struct NODE { int r, c; }; int n,...
true
328d0e6303ac712b0dc590ffb6707b8fcb569583
C++
longf0720/atoffer
/3/subtree.cpp
UTF-8
1,587
3.65625
4
[]
no_license
/** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right = NULL; * } * } */ class Solution { public: bool isSame(TreeNode * T1, TreeNode * T2) { if(T1 == NU...
true
f59b1d3926acbacd0397a50f6555e283917c665d
C++
sczembor/projekt_wymiana_walut
/Authorization.cpp
UTF-8
1,848
3.015625
3
[]
no_license
// // Login.cpp // wymiana_walut // // Created by Stanislaw Czembor on 23/11/2019. // Copyright © 2019 Stanislaw Czembor. All rights reserved. // #include "Authorization.hpp" authorization::authorization(const std::string & p_username, const std::string & p_password) { username = p_username; password = p_pa...
true
9157abd2e8dd65a4b122060de22898829cd4604a
C++
jonathanirvings/tcframe
/include/tcframe/spec/io/GridIOSegment.hpp
UTF-8
2,320
2.953125
3
[ "MIT" ]
permissive
#pragma once #include <stdexcept> #include <tuple> #include "IOSegment.hpp" #include "tcframe/spec/variable.hpp" using std::runtime_error; using std::tie; namespace tcframe { struct GridIOSegment : public IOSegment { friend class GridIOSegmentBuilder; private: Matrix* variable_; int* rows_; int* c...
true
a08665418d145ebe60d66db67c2e6650f0978a9b
C++
ayan978/vjudge
/CodeForces/854A - Fraction.cpp
UTF-8
241
2.75
3
[]
no_license
#include<iostream> using namespace std; int gcd(int a,int b) { return b==0?a:gcd(b,a%b); } int main() { int n; cin>>n; for(int i=n/2;;i--) if(gcd(i,n-i)==1) { cout<<i<<" "<<n-i;break;} return 0; }
true
b12ec560db31bea9a5d201bfa1735834011d0996
C++
lkjfrf/Cplus-Study
/Cplus_Study/p232_5.cpp
UTF-8
269
3.140625
3
[]
no_license
//#include <iostream> //using namespace std; // //struct CandyBar //{ // char name[20]; // double weight; // int calory; //}; // // //int main() //{ // CandyBar snak = { "Mocha Munch", 2.3, 350 }; // // cout << snak.calory << ", " << snak.name << ", " << snak.weight; // //}
true
6ffd9c7d7c6d3f22065bfa837b30ba3705f5c110
C++
JamilGarcia/P3Lab2_JamilGarcia
/Main.cpp
UTF-8
3,340
3.484375
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <time.h> #include <cmath> #include <iomanip> using namespace std; int recursiva(double verticeX, double respuesta, int a, int b, int c, int cont){ if (cont >= 0){ respuesta = recursiva(verticeX, respuesta, a, b, c, cont-1) - ((a * (pow(verticeX, 2)) + (b*vertice...
true
cd00e6f06e191ffb8e799801b042717a060d735e
C++
Jordan-1234/Team-A-TMR3M1
/dc_motors.ino
UTF-8
1,230
3.375
3
[]
no_license
/* PRIZM Controller example program * Spin DC motor channel 1 for 5 seconds, then coast to a stop. * After stopping, wait for 2 seconds, spin in opposite direction. * Continue to repeat until RED reset button is pressed. * author PWU on 08/05/2016 */ #include <PRIZM.h> // include the PRIZM library...
true
39cc99604a26f9c89adfb5ce2c7b129a3ef4b9d6
C++
zni/delta
/src/enemies.h
UTF-8
604
2.703125
3
[ "MIT" ]
permissive
#ifndef ENEMIES_H #define ENEMIES_H #include <vector> #include <SFML/Graphics.hpp> #include <SFML/System.hpp> struct Enemy { enum State { live, dead }; State state; sf::FloatRect aabb; sf::Sprite sprite; float speed; }; class Enemies { public: Enemies(const sf::Vector2u &bounds); ...
true
69aa626ebbeb9700433052d2caeb35a00c652e89
C++
Born0/Academic-Code-Practice-AIUB-
/C & ++/CodeBlockes project/lab 3/main.cpp
UTF-8
613
3.5
4
[]
no_license
#include <iostream> using namespace std; class Box { float height,width,breadth; public: void input(float h,float w, float b) { height=h; width=w; breadth=b; } void show() { cout<<height<<endl<<width<<endl<<breadth<<endl; } void area() { cout...
true
b9906f65e45390dcb2a46a0d866fa8fc58d528d0
C++
adigriever12/Robotics
/MapSearchNode.h
UTF-8
1,065
2.65625
3
[]
no_license
/* * MapSearchNode.h * * Created on: Jun 5, 2015 * Author: colman */ #ifndef MAPSEARCHNODE_H_ #define MAPSEARCHNODE_H_ #include "stlastar.h" #include "Map.h" class MapSearchNode { Map* _map; int _x; int _y; public: MapSearchNode() { _map = NULL; _x = _y = 0; ...
true
cd4d5850add0addbc2aeecb8ad05d3f06780fb21
C++
sa4k5hi/Algorithms
/Graphs/undirected_cycle_finding_dfs.cpp
UTF-8
1,237
2.5625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define INF (1LL<<61) vector<int> adj[100005]; int vis[100005]; int parent[100005]; int st=-1,ed=-1; bool dfs(int v) { vis[v]=1; for(auto u :adj[v]) { if(u == parent[v]) continue; if(vis[u]!=1) { ...
true
e9ef72949e621a743c00e6532b997ebc9e735a83
C++
iboB/word-grid
/server/code/server/util/LoadLanguageFromDir.cpp
UTF-8
2,792
2.515625
3
[ "MIT" ]
permissive
// word-grid // Copyright (c) 2019-2021 Borislav Stanimirov // // Distributed under the MIT Software License // See accompanying file LICENSE.txt or copy at // https://opensource.org/licenses/MIT // #include "LoadLanguageFromDir.hpp" #include <core/Language.hpp> #include <core/LanguageBuilder.hpp> #include <core/Lette...
true
d86e870854e54db5a7b0a91adb96e225eff58399
C++
whdgmawkd/boj_algo
/boj/2312.cpp
UTF-8
566
2.90625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; bool prime[100001]; int main(void) { prime[0] = true; prime[1] = true; for (int a = 2; a <= 100000; a++) { if (!prime) { for (int b = a << 1; b <= 100000; b += a) { prime[b] = true; } } } int t; cin >> t; while (t--) { int n; cin >> n; ...
true
943879bb832cfc90df997591ab0ddb01286b939e
C++
theAirC/lib
/System/Devices/MAX9939.h
UTF-8
3,220
2.53125
3
[]
no_license
//! Library for MAX9939 SPI PGA #pragma once #include <lib/System/Devices/Device_SPI.h> namespace System::Devices { struct MAX9939 : Device_SPI { enum struct Register : byte { Trim = 0, Gain = 1, }; enum struct Gain : byte { X1 = 0...
true
7c780a264185ab25c75a63facff0cfd3e2866c99
C++
tingwei758/Quadris
/Block/Z_Block.cc
UTF-8
7,041
3.171875
3
[]
no_license
#include <iostream> #include "Z_Block.h" using namespace std; Z_Block::Z_Block(int level, char symbol, Board *gameBoard, std::vector<Cell *> occupiedCells) :Block{level, symbol, gameBoard, occupiedCells, "horizontal"} {} bool Z_Block::rotatable() { int x = this->occupiedCells.back()->getState().x; in...
true
7b0cf9643dab0cce6c7856af469c1c8d5d5d217c
C++
VisaSimula/Projekti-WALL-i
/Koodi_WALL•I_V1.2.ino
UTF-8
11,755
2.859375
3
[]
no_license
#include <SD.h> // Include SD module library. -VS #include <TMRpcm.h> // Include library for speaker control. -VS #define SD_ChipSelectPin 4 // Defining CS pin. -VS #define enable 5 // Defining enable pin (L298N drive...
true
eb65567f15b5833374f5c2a0b7a3cd1381c4ebcb
C++
fsatka/msu_cpp_spring_2018
/homework/Sokolova/03/Characters.h
UTF-8
2,358
3.671875
4
[ "MIT" ]
permissive
/** @file @brief Header file with character classes declaration. File contains hierarchy of characters in the game. */ #include <string> #include "Items.h" /** * @brief Base class of all characters in the game. * Can recover of damage and upgrade to new level. */ class Character { public: void recover(); ...
true
e1537687c2b8d53c391ad43b69d4c4e8346f3b5c
C++
devinacker/decomposer
/src/devices/MIDIdefs.cpp
UTF-8
2,141
2.609375
3
[ "MIT" ]
permissive
#include "MIDIdefs.h" using MIDI::StringMap; static QString fromStringMap(const StringMap& map, uint num) { if (map.contains(num)) return map.value(num); return "unknown"; } static const StringMap controlNames = { {0, "Bank select"}, {1, "Modulation wheel"}, {2, "Breath controller"}, {4, "Foot pedal"}, {5,...
true
45f56c9d7973cf603ea1638495797fcef2efd8ed
C++
brysonb24/Assignments
/P02/myVector.h
UTF-8
6,294
3.734375
4
[]
no_license
#include <iostream> using namespace std; /******************************** * * * Class * * Implementation * * * * * ********************************/ class myVector { private: int *vPtr; // int pointer to array int maxSize; // max size of array int minSize; // min size of array int index; // current location to ...
true
24b463f02afa024d36e19b04c1580f79a29acafa
C++
ob6160/pazaak
/pazaak.h
UTF-8
1,659
2.5625
3
[]
no_license
#ifndef PAZAAK_H #define PAZAAK_H #include <vector> #include <iostream> #include <cstdlib> #include <map> #include "SDL2/SDL.h" #include "SDL2/SDL_ttf.h" #include "SDL2/SDL_events.h" #include "player.h" #include "card.h" #include "constants.h" #include "button.h" #include "helpers.h" class Pazaak { public: ex...
true
af68d6321f282a877cd226d0f04bec774d200ee8
C++
damienArnol/svca
/svca_limix/src/limix/utils/brentc.cpp
UTF-8
4,222
2.796875
3
[ "Apache-2.0" ]
permissive
/* ******************************************************************* * * Copyright (c) Microsoft. All rights reserved. * This code is licensed under the Apache License, Version 2.0. * THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY * IMPLIED...
true
545c25e2c64a654e678f4eddd2f8e85f3ec6a748
C++
Wizmann/ACM-ICPC
/Codeforces/Educational Codeforces Round 19/C.cc
UTF-8
1,506
2.921875
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> #include <cassert> using namespace std; #define print(x) cout << x << endl #define input(x) cin >> x class Solution { public: Solution(const string& s_)...
true
40ebc2a27c564f3d6e6e8b5d07710636509f25b8
C++
NoahSarkey/osProject4
/search.h
UTF-8
1,227
3.0625
3
[]
no_license
// Sam Mustipher, Noah Sarkey // CSE 30341 - 02 // Project 4 // search.h ////////////////////////////////// TO DO /////////////////////////////////////// // Take care of carraige returns // no wildcards or regular expressions? what does this entail //////////////////////////////////////////////////////////////////////...
true
b97906458d416a4584043bfa153b859f22d1cd44
C++
alexandraback/datacollection
/solutions_5670465267826688_0/C++/FireJade/C.cc
UTF-8
1,865
3.109375
3
[]
no_license
#include <iostream> #include <map> #include <vector> using namespace std; typedef struct { bool neg; string rep; } val; val times(val left, val right) { val ret; ret.neg = left.neg ^ right.neg; if (left.rep == "1") { ret.rep = right.rep; } else if (right.rep == "1") { ret.rep = lef...
true
63319dd6c9de9741720a0bcf283079551d75ff36
C++
herox25000/oathx-ogrex-editor
/V5.1/v5/系统模块/客户端组件/形象组件/CustomFaceManager.cpp
GB18030
8,626
2.5625
3
[]
no_license
#include "StdAfx.h" #include "CustomFaceManager.h" ////////////////////////////////////////////////////////////////////////////////// //ļṹ struct tagCustomFaceFile { DWORD dwCustomID; //Զʶ tagCustomFaceInfo CustomFaceInfo; //ͷϢ }; //̬ CCustomFaceManager * CCustomFaceManager::m_pCus...
true
daa1d45e75ad5677699e5d7bc631251e5a83f59c
C++
escape0707/usaco_trainings
/agrinet.cpp
UTF-8
1,505
2.84375
3
[]
no_license
/* ID: totheso1 LANG: C++14 TASK: agrinet */ #include <algorithm> #include <fstream> #include <iterator> #include <vector> using namespace std; static ifstream fin("agrinet.in"); static ofstream fout("agrinet.out"); #define endl '\n' template <typename T> T fin_get() { return *istream_iterator<T>(fin); } templa...
true
c41de0267d11e3c89585e0a0ede2b572145f57d9
C++
adfilm2/algorithm
/hee.youn/15686.cpp
UTF-8
1,343
2.875
3
[]
no_license
#include<iostream> #define fi(i, a, b) for(int i = a; i < b; i++) #define abs(a) ((a) > 0 ? (a) : -(a)) #define MAX_N 50 #define MAX_M 13 #define CUSTOMER 1 #define STORE 2 using namespace std; int N, M; int map[MAX_N][MAX_N]; struct Pos { int x; int y; }; int distance(Pos a, Pos b) { return abs(a.x - b.x) + ab...
true
b400f06f5bae3f45183278189245f2dc89a556ee
C++
khaledman6122/codeforces-A-B
/A. Calculating Function.cpp
UTF-8
492
3.125
3
[]
no_license
// http://codeforces.com/contest/486/problem/A // // 12:25 1:22 -->57 min // #include <iostream> using namespace std ; int main () { long long int x; cin>>x; if(x%2==0) x/=2; else if(x%2!=0) { x++; x/=2; x*=(-1); } cout<<x<<endl; return 0 ; } /* n = (n(n+1)/2 = ...
true
19b7dbf26e540961be9c9e0c022324face7b0a3d
C++
dss875914213/cpp_learn
/cpp_learn/demo2/main.cpp
UTF-8
660
3.28125
3
[ "MIT" ]
permissive
#include<iostream> int main() { int basic = 10; auto f1 = [](int x, int y) {return x + y; }; auto f2 = [basic](int x, int y) {return x + y + basic; }; auto f3 = [&basic](int x, int y) {basic = 5; return x + y + basic; }; auto f4 = [=](int x, int y) {return x + y + basic; }; auto f5 = [&](int x, int y) {basic = 5...
true
941b6df9341a2db9afcef10b1483ceb218b50243
C++
YegorLindberg/oop
/lw6/httpURL/httpURL/CHttpUrl.hpp
UTF-8
2,985
3.171875
3
[]
no_license
// // CHttpUrl.hpp // httpURL // // Created by Moore on 04.06.2018. // Copyright © 2018 Moore. All rights reserved. // #ifndef CHttpUrl_hpp #define CHttpUrl_hpp #include <string> #include <regex> enum Protocol { HTTP, HTTPS }; class CHttpUrl { public: // выполняет парсинг строкового представления UR...
true
4e8f274680aa7198062046fb72de91bec1367128
C++
ailuoxz/BadPrincess-Game
/Src/Graphics/FrustumEntity.h
ISO-8859-1
2,413
2.890625
3
[]
no_license
//--------------------------------------------------------------------------- // Entity.h //--------------------------------------------------------------------------- /** @file Entity.h Contiene la declaracin de la clase que representa una entidad grfica. @see Graphics::CFrustumEntity @author Guidi Giacomo @date M...
true
5adeff8cdaa2329b25745fec603b478252e35cd1
C++
shumingcong/rgbd_pose_estimation
/pose/Simulator.hpp
UTF-8
16,117
2.640625
3
[ "MIT" ]
permissive
#ifndef _RAND_GENERATOR_HEADER_ #define _RAND_GENERATOR_HEADER_ #include <se3.hpp> #include <time.h> #include <limits> #include <random> #include "Utility.hpp" using namespace Eigen; using namespace std; std::default_random_engine generator; std::normal_distribution<double> distribution(0., 1.0); template< typename...
true
fbcad2ceb6d5419cdb73333629e24c3c703fb598
C++
tomekmucha85/sea
/Screen.hpp
UTF-8
754
2.59375
3
[]
no_license
#ifndef SCREEN_HPP #define SCREEN_HPP #include <SDL.h> #include <SDL_image.h> #include <SDL_ttf.h> #include <stdio.h> class Screen { private: //Screen dimension constants static const int SCREEN_WIDTH; static const int SCREEN_HEIGHT; //static const int RESOLUTION_W = 640; //static const...
true
08429a526bd9c2fbc76e2765b301c73c54e78768
C++
enzohorquin/School-Projects-for-Analysis-and-Design-of-Algorithms-II
/Ejercicio6TP1/main.cpp
WINDOWS-1250
4,508
3.15625
3
[]
no_license
#include "TP2_Grafo.h" #include "list" #include "iostream" struct nodo { char letra; string color; int v;}; using namespace std; void ImprimeLista(list<int> & Lista); void DFS(Grafo<int> & G,list<int> & Caminos, bool Marca [ ],int origen, int destino, list<nodo> Listacolores); struct nodoMarca{ int v; bool Visitado;...
true
490487ecc2f5ea72f363eabd65b8437f6be3ba67
C++
tjresearch/research-richard
/code/src/communication.cpp
UTF-8
2,421
3.015625
3
[]
no_license
#include "global.h" /** * For each car, creates an event based on current speed */ void createEvents() { for (auto it = graphCars.begin(); it != graphCars.end(); it++) { Car& car = it->second; if (!car.isDTD) continue; if (car.roadIndex != -1) { if (car.eventSent) { car.eventSent = false; graphEv...
true
ff7aabeb996de16ce75fe029496228e6851be69a
C++
luisenano90/Cajero-beta-
/Finanzas(archivos).cpp
ISO-8859-1
14,391
2.578125
3
[]
no_license
#include <iostream> //Libreras incluidas. #include <stdlib.h> #include <locale.h> #include <string> #include <fstream> #include<iomanip> //variables principales int user, day, month, year = 0; int opt, opt_cat, opt_r, opt_pay, opt_trans; int intentos = 3; double saldo, gasto, ingresos, saldo_f,billetera,tarj...
true
ce09081e691b8f106ee0cabdfb5774efef808a2d
C++
lchavez287/eecs_268
/Lab09/Queue.hpp
UTF-8
1,787
3.984375
4
[]
no_license
/** * @file : Queue.hpp * @author : Lacie Chavez * @date : 04/25/2014 * Purpose: Implementation of Queue class */ template<typename T> Queue<T>::Queue() //default constructor { frontPtr=nullptr; backPtr=nullptr; size1 = 0; } template<typename T> Queue<T>::~Queue() //destructor { while(!isEmpty()) { dequeue()...
true
673b49301a8b920d5f4c2d8e6247dbf3f8408aad
C++
rushioda/PIXELVALID_athena
/athena/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFacet.h
UTF-8
1,738
2.84375
3
[]
no_license
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ #ifndef GeoFacet_h #define GeoFacet_h 1 // Class: GeoFacet // // Base class for GeoModel Facets // Two implementations exist: // 1. GeoTriangularFacet // 2. GeoQuadrangularFacet // #include "GeoModelKernel/RCBase.h" #include "CL...
true
cd1e653bfc9d8f2d758c6820d2725963e5b9defb
C++
ssy02060/algorithm
/hello.cpp
UTF-8
1,018
3.140625
3
[]
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> int stack[200000]; int top = -1; int isEmpty(){ return top == -1; } void push(char data){ stack[++top] = data; } int pop(){ return stack[top--]; } int peek(){ return stack[top]; } void clear(){ for(int i = 0; i < top; i++){ stack[i] = 0; ...
true
01aa9353678ace26217867c210e5e7a37d64c3a9
C++
Razdeep/LeetCode-Solutions
/Dynamic Programming/Target_sum.cpp
UTF-8
514
3.03125
3
[ "MIT" ]
permissive
// https://leetcode.com/problems/target-sum/ class Solution { public: int solve(vector<int>& nums, int idx, int remaining) { if (idx == nums.size()) { return remaining == 0; } int solution_a = solve(nums, idx + 1, remaining + nums[idx]); int solution_b = solve(nums, idx +...
true
3e2aabd581c57336ca9bdc9c72aba383904e39bb
C++
innovationlabgreenwich/SmartHomeKit
/smarthome_lesson6B.ino
UTF-8
6,295
2.78125
3
[]
no_license
/* OSOYOO Smarthome example: Remote Control Servo A simple web server that lets you control a servor via a web page. This sketch will print the IP address of your ESP8266 module (once connected) to the Serial monitor. From there, you can open that address in a web browser to control the servo on pin D9, when the...
true
0f15e8e73ea82ce2b3777e8dec9b88454b423664
C++
fcvalise/AnOctonautOdyssey
/Decors/Rainbow.cpp
UTF-8
8,406
2.5625
3
[]
no_license
#include "Rainbow.hpp" #include "ABiome.hpp" #include "SkyCycle.hpp" #include <Interpolations.hpp> #include <Math.hpp> Rainbow::Rainbow(void) : Rainbow(nullptr) { } Rainbow::Rainbow(SkyCycle * cycle) : m_cos(0),//std::cos(90.f * octo::Deg2Rad); m_sin(1),//std::sin(90.f * octo::Deg2Rad); m_loopCountMax(10u), m_lo...
true
70a115c12373fd6412d5b74fef59c4346c0e1e06
C++
anothermist/LIBRARIES
/MySensors/drivers/NVM/Flash.h
UTF-8
5,676
2.8125
3
[]
no_license
/* * Flash.h - Flash library * Original Copyright (c) 2017 Frank Holtz. All right reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the Lic...
true
40b7e31d543948e9e7f340ab098cc1ad88d8cfd5
C++
aGzDelusion/Cplusplus-Object-Oriented
/QuiambaoA3/src/Payroll.cpp
UTF-8
1,298
3.515625
4
[]
no_license
/* * Payroll.cpp * * Created on: Oct 1, 2019 * Author: Darwish Quiambao */ //Implementation file for member variables and methods of class Payroll. #include "Payroll.h" #include <iostream> Payroll::Payroll() //default constructor. { regularPay = 0.0; overtimePay = 0.0; workHours = 0.0; hourlyRate...
true
5ab6f3bf52bbed289372387b825c2282096dce27
C++
GuiM0x/Classics
/Pong/main.cpp
UTF-8
17,431
2.671875
3
[]
no_license
#include <iostream> #include <cmath> #include <SFML/Graphics.hpp> #include <SFML/System.hpp> #include <SFML/Audio.hpp> #include "include/Outils.h" ////////////////////////////////////////////// /////// RESET KEY STATE void reset_key_state(std::vector<bool>& v){ for(auto&& x : v) x = false; } enum keys{P...
true
abe197b7ff50343b62123563bea00ab8970db5da
C++
nilmadhab/code
/november/lunch_time/shuffling.cpp
UTF-8
1,672
2.78125
3
[]
no_license
#include <iostream> using namespace std; #define endl "\n" //INT_MIN #include<bits/stdc++.h> #define ll long long vector<int> vec(100005); #define endl "\n" ll max(ll a, ll b){ if(a > b) return a; return b; } void print(vector<int> v, int N){ for (int i = 0; i < N; ++i) { cout << v[i] << "...
true
331e2f214ffe252d0eae0e0d770e8a6fc5e35461
C++
tbor8080/rannc
/src/comm/ObjectComm.cpp
UTF-8
2,106
2.578125
3
[ "MIT" ]
permissive
// // Created by Masahiro Tanaka on 2019/09/20. // #include "ObjectComm.h" namespace rannc { inline size_t max(const std::vector<size_t>& nums) { size_t max_val = 0; for (size_t n: nums) { if (max_val < n) { max_val = n; } } return max_val; ...
true
78280b1d0a55342d300c37ee42c4bef1a68d611a
C++
rajatgirotra/study
/cpp/templates/23_DotTemplate2.cpp
UTF-8
287
2.9375
3
[]
no_license
#include <iostream> #include <string> #include <cstddef> #include <bitset> using namespace std; int main() { bitset<10> bs; bs.set(5); cout<<"bs = "<<bs<<endl; string s = bs.to_string<char, char_traits<char>, allocator<char> > (); cout<<"s = "<<s<<endl; return 0; }
true
79aa3b8c17ec167c4bca66c1dbab728535b08686
C++
martinsele/ros
/tech_task/include/Navigator.h
UTF-8
5,201
2.53125
3
[]
no_license
#ifndef TECH_TASK_NAVIGATOR_H #define TECH_TASK_NAVIGATOR_H #include <ros/ros.h> #include <geometry_msgs/Pose.h> #include <nav_msgs/OccupancyGrid.h> #include <unordered_set> #include "TaskReachedCallback.h" #include "Controller.h" #include "Map.h" #include "GraphLocation.h" #include "SearchGraph.h" #include "unordered...
true
5bd014be62e9046733fb886dc214c6cf1f40e6d5
C++
aresgtr/Learn
/UdacitySelfDrivingCarEngineer/T2-Lesson6Project-CarND-Kidnapped-Vehicle-Project-master/src/particle_filter.cpp
UTF-8
10,169
2.96875
3
[ "MIT" ]
permissive
/** * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: Tiffany Huang */ #include "particle_filter.h" #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector> #include "helper_functions.h" using std::string;...
true
6004e03af8bb6c2765114788406184d5894f7446
C++
zhiyuhuo/DirectSLAM
/PlaneDetection/TextureSegment.cc
UTF-8
11,123
2.609375
3
[]
no_license
#include "TextureSegment.h" TextureSegment::TextureSegment(cv::Mat image, int gridX, int gridY) { InitData(image, gridX, gridY); } void TextureSegment::InitGaborFilters() { cv::Size ksize(3, 3); double pi_value = 3.14159265; std::vector<double> sigma = {1, 2, 3, 4, 5}; std::vector<double> theta = ...
true
02c683e6c0d7684694481ed1eee9941febcfa664
C++
ccs-hnu/LeetCode
/Leetcode judge/median of two sorted arrays.cpp
UTF-8
3,408
3.1875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { unsigned min_length, max_length; vector<int> n1 = nums1, n2 = nums2; if(nums1.size() > nums2.size()) { min_length = n...
true
447835a5d9d080f5ebf4ca8e609ece3358de9a0d
C++
Kerorohu/Linux-DataRead
/main.cpp
UTF-8
1,593
3.34375
3
[]
no_license
#include <iostream> #include <string> #include <unistd.h> //For usleep() #include "SerialPort.hpp" using namespace std; int main(int argc, char *argv[]) { argc = 2 ; argv[1] = (char*)"ttyUSB2"; //dummy input string strModemDevice = "/dev/"; while(NULL == argv[1]) { char cInput; cout << "欠缺參數(ttyS0 或 ttyUSB0 ...
true
584442c7713d65b6805b0744b40b101d7f4b8a61
C++
dotnet/runtime
/src/coreclr/jit/valuenum.h
UTF-8
82,999
2.890625
3
[ "MIT" ]
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // Defines the class "ValueNumStore", which maintains value numbers for a compilation. // Recall that "value numbering" assigns an integer value number to each expression. The "val...
true
d24a99c9335869481cc874e2d9c2247e8464a95d
C++
Thiag0Andres/Roteiro-3---Laboratorio-LP1
/Questão 1/mainHospital.cpp
ISO-8859-1
1,661
3.171875
3
[]
no_license
/* Thiago Andres Paiva Palacios Questao 1 */ /* O que polimorfismo? Polimorfismo em linguagens orientadas a objeto, a capacidade de objetos se comportarem de forma diferenciada em face de suas caractersticas ou do ambiente ao qual estejam submetidos, mesmo quando executando ao que detenha, sema...
true
7c12ea657bdb96591073cb415d3ba57a6874620f
C++
walnutgallery/DataStructures
/prog03/Prog03/algorithm.h
UTF-8
10,634
3.625
4
[]
no_license
//////////////////////////////////////////////////////////////////////////////// /// @brief Algorithms, e.g., sorting /// @ingroup MySTL /// @todo Implement swap /// @todo Implement bubble sort /// @todo Implement one of: /// - Insertion Sort (in place) /// - Selection Sort (in place) /// @todo Implement on...
true
16740b127d8f5ce515a53d99b5757bdc074bcdea
C++
pulcherriman/Programming_Contest
/AtCoder/ABC/000-099/ABC062/arc074_a.cpp
UTF-8
474
2.578125
3
[]
no_license
#include <iostream> using namespace std; #define ll long long ll min(ll a,ll b){return a<b?a:b;} ll max(ll a,ll b){return a>b?a:b;} ll sep(int a, int b){ ll pre=1<<30,a1,a2; for(ll i=1;i<a;i++){ a1=max(llabs(b*i-b*((a-i)/2)),llabs(b*i-b*(a-i-(a-i)/2))); a2=max(llabs(b*i-(a-i)*(b/2)),llabs(b*i-...
true
2f41e3616b9cb3bc5fa3a3c543226a04f4c29e24
C++
bright-dusty/lintcode-
/Remove Node in Binary Search Tree/test.cpp
UTF-8
3,421
3.0625
3
[]
no_license
#include <stdexcept> #include <string> #include <iostream> #include <dlfcn.h> using namespace std; typedef void (*MessageBoxA) (int, const char *, const char *, int); class TreeNode { public: int val; TreeNode *left, *right; TreeNode(int val) { this->val = val; this->left = thi...
true
12ffb5112f074f6f21431bad6b5bf2835dd5176b
C++
Siddharth-Babbar/Pepcoding
/PepcodingSept_19/Lec_059/Questions.cpp
UTF-8
3,561
3.75
4
[]
no_license
#include<iostream> struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; //leetcode 141=================================================== bool hasCycle(ListNode* head) { if(head == nullptr || head->next == nullptr) { return false; } ListNode* slow=head; ...
true
5532c4dd222586de535a7ce8db7e3e72aaaee38b
C++
ahfergus1/Intrinsi
/IntrinsiForceDemo/DrawManager.cpp
UTF-8
3,341
2.765625
3
[]
no_license
/* DrawManager.cpp * Draws menu pages and data to screen for the IntrinsiForce prototype. * @author Andrew Simpson, ahfergus1@gmail.com */ #include "DrawManager.h" //#include "LCD.h" #include "DrawUtils.h" DrawManager::DrawManager() { // Draw BOOT page first this->page = BOOT; this->subPage = 0; this->extr...
true
489bbda23014b3101a34abff45ec707779422a92
C++
Luni-4/CameraController
/src/communication/MessageDecoder.cpp
UTF-8
2,659
3.046875
3
[]
no_license
/* * Created on: Jul 24, 2018 * Author: Luca Erbetta */ #include "MessageDecoder.h" #include "logger.h" #include <algorithm> using std::max; using std::min; MessageDecoder::MessageDecoder(MessageHandler& msgHandler) : handler(msgHandler) { } MessageDecoder::~MessageDecoder() { if (message != nullptr) ...
true
5daab4f85cface54ec4f3ce8e2f6c0f05e4b48c7
C++
MichelleZ/leetcode
/algorithms/cpp/checkifBinaryStringHasatMostOneSegmentofOnes/checkifBinaryStringHasatMostOneSegmentofOnes.cpp
UTF-8
441
3.125
3
[]
no_license
// Source: https://leetcode.com/problems/check-if-binary-string-has-at-most-one-segment-of-ones/ // Author: Miao Zhang // Date: 2021-06-08 class Solution { public: bool checkOnesSegment(string s) { int cnt = 0; int ones = 0; for (char c: s) { if (c == '1') { cn...
true
83b02761abb01aca4cca81ed6c7301056c63e116
C++
projectescape/cp-archive
/LC/house-robber.cpp
UTF-8
451
2.640625
3
[]
no_license
int calcAns(vector<int>& nums, vector<int>& dp, int index) { if (index >= nums.size()) return 0; if (dp[index] != -1) return dp[index]; dp[index] = max(nums[index] + calcAns(nums, dp, index + 2), calcAns(nums, dp, index + 1)); return dp[index]; } class Solution { public: int rob(vector<int>& num...
true
e13806199a0bf9b80362efdc8cb17ac1f3e0a1c0
C++
buckeye-cn/ACM_ICPC_Materials
/solutions/kattis/ecna20/mathtrade_hcz.cpp
UTF-8
1,167
2.875
3
[]
no_license
// https://open.kattis.com/problems/mathtrade #include <cstdlib> #include <cstdint> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <unordered_map> #include <iostream> using namespace std; string to_str[100]; int to[100]; int depth[100]; int main() { ios_base::sync_with_stdio(fa...
true
b0b69a20f8212eb1c5c4c0762f0fad12ede09a5a
C++
rohitdureja/Smart-Sensing
/temp/example_thread.cpp
UTF-8
258
2.859375
3
[]
no_license
// Thread Basics #include <thread> #include <iostream> #include "classes.h" using namespace std; int main(int argc, char const *argv[]) { super_class sup1(1,2,3,4); cout << "Printing values of super_class: " << sup1.call_me() << endl;// sup1.b << endl; }
true
136f81fe047b99697f6862093eacffac1a719cae
C++
MolSSI/MIRP
/mirp_bin/cmdline.hpp
UTF-8
3,311
3.703125
4
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/*! \file * * \brief Functions for parsing the command line given to a program */ #pragma once #include <string> #include <vector> namespace mirp { /*! \brief Check to see if the given command line has an argument * * \param [in] cmdline The command line to check (should be converted already) * \param [in] ar...
true
7b4c8ca22ae30eb9df0dddee047ba9f98ad453ff
C++
meisimo/Maratones
/UVA/10855/main.cpp
UTF-8
1,323
2.5625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void S(int N, int n){ bool match; char M[N][N], m[n][n], a; int i, j, ii, jj, count, n2; for (i = 0; i<N; i++) { for (j = 0; j<N; j++) cin >> M[i][j]; cin.ignore(1); } for ( i = 0; i < n; i++) { for (j = 0; j < n; j++) cin >> m[i][j]; ci...
true
eaa8a08c99a19a376f44aa0f1365c411fadb55aa
C++
FJ98/Githubs-2019-1
/unidad-7-programacion-rreactiva-FJ98/src/Event.h
UTF-8
278
2.765625
3
[]
no_license
// Created by felix on 6/28/2019. #ifndef SRC_EVENT_H #define SRC_EVENT_H class Event{ public: int x, y; public: Event() = default; Event(int x, int y): x{x}, y{y} {} int getX() { return x; } int getY() { return y; } }; #endif //SRC_EVENT_H
true
c7802d1d70ce13b145af902d1125e74e020533f3
C++
trisyoungs/fmatch
/src/dnchar.cpp
UTF-8
10,527
2.984375
3
[]
no_license
/* *** Dynamic character array *** dnchar.cpp Copyright T. Youngs 2011 This file is part of FMatch3. FMatch3 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
true
3f352eb68dc6fdab0fc9270060461462e1553380
C++
nihaljn/computer-graphics
/tree-drawing/src/graphics_engine.cpp
UTF-8
4,279
2.984375
3
[]
no_license
#include <iostream> #include "graphics_engine.h" GraphicsEngine::GraphicsEngine() { window = GraphicsEngine::initialize(); pCount = 0; return; } void GraphicsEngine::process_input() { if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) glfwSetWindowShouldClose(window, true); return; } ...
true
5ba1ea571f3a3ddb87dfcaeb37b2731fc6eb10c5
C++
Flp25/URI
/1047.cpp
UTF-8
760
3.046875
3
[]
no_license
#include<iostream> int horas = 24; int minutos = 60; using namespace std; int saida(int a, int b){ cout << "O JOGO DUROU "<< a <<" HORA(S) E " << b << " MINUTO(S)\n"; return 0; } int main(){ int h_ini, h_fim; int m_ini, m_fim; int h_dif, m_dif; h_dif = m_dif = 0; cin >>...
true
733778ef08e705edb28b1f3d0b9bfa4ae0d44675
C++
KANBE8810/AtCoder
/Beginner/EX12.cpp
UTF-8
305
2.75
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int p=0, m=0; int sum=0; string s; cin >> s; for(int i = 0; i < s.size(); i++){ if(s.at(i) == '+') p++; if(s.at(i) == '-') m++; } sum = 1 + p - m; cout << sum << endl; }
true
1c0cf09a89344e197e8b38668a9a5a1d1a88c60a
C++
Vetteru/Topcoder
/DIV2/SRM414/RestaurantManager.cpp
UTF-8
5,326
2.65625
3
[]
no_license
// BEGIN CUT HERE // END CUT HERE #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <strin...
true
44ac851b8bece109471582304cbdaf256baff3cc
C++
notwatermango/Kattis-Problem-Archive
/current/codecleanups.cc
UTF-8
695
2.703125
3
[ "Apache-2.0" ]
permissive
#include <iostream> using namespace std; int main(){ int n; cin>>n; int arr[n]; for (int i = 0; i < n; i++) { cin>>arr[i]; } int d = 1; int clen = 0; while (d < 400) { int dirt = 0; for (int i = 0; i < n; i++) { if(d > arr[i]){ ...
true
69b8abc8ffe4fdb03dbe3595476c06d3e0606d8c
C++
Vall98/GearStocks
/back/src/BddManager.cpp
UTF-8
3,921
2.671875
3
[]
no_license
// // EPITECH PROJECT, 2019 // main // File description: // main // #include <iostream> #include "../include/BddManager.hpp" #include <bsoncxx/builder/stream/document.hpp> #include <bsoncxx/json.hpp> #include <mongocxx/client.hpp> #include <mongocxx/instance.hpp> BddManager::BddManager() { connect(); } BddManager...
true
75cfd35e3c22d82779b61405c549ea43e0b3e579
C++
rokcej/n-body-problem
/N_body_openmp.cpp
UTF-8
1,997
2.671875
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <string> #include <omp.h> #include <chrono> #include "vector.h" #include "body.h" #include "util.h" #define ITERS 10000 #define DELTA_T 100000.0 #define FRAMES 2000 int main(int argc, char* argv[]) { int N; Body *bodies, *bodies_new; read_i...
true
abe362f1d8e06ef4bfe1f5254435f4bddd85a193
C++
Gamma-Software/ros_ws
/src/drone_optique/src/track_people.cpp
UTF-8
2,068
2.609375
3
[ "Apache-2.0" ]
permissive
#include <ros/ros.h> #include <image_transport/image_transport.h> #include <cv_bridge/cv_bridge.h> #include <sensor_msgs/image_encodings.h> #include <std_msgs/Bool.h> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/video/tracki...
true
f826cf7e5c3802712c047bb87fc22e8753af934b
C++
ZacharyTaylor/Multimodal-Calib
/Code/ImageList.h
UTF-8
2,460
2.9375
3
[]
no_license
#ifndef IMAGELIST_H #define IMAGELIST_H #include "common.h" #include "ScanList.h" #include "GenList.h" //! holds the sensors images class ImageList { private: //! structre holding infomation about each image typedef struct imageInit{ //! vector holding image data thrust::device_vector<float> image; //! ima...
true
bbb615de675cd468568f762ef64517df1a4a2891
C++
sootsprite/cpp-unit-testing
/lib_forward_list/list_sample.cpp
UTF-8
559
2.921875
3
[]
no_license
#include <iostream> #include <list> #include <string> #include <algorithm> int main(int argc, char const* argv[]) { std::list<std::string> cats = { "shutan", "mizuki", "rori", }; auto itr = std::find(cats.begin(), cats.end(), "mizuki"); itr = cats.insert(itr, "magusan"); std::for_each( cats.begin(), cats....
true
de3d1a5e7caeba6ed1dc14e6ad4ecf1c0c30cb5f
C++
bhavnas23/Leetcode-Monthly-Challenges
/October2020/7RotateList.cpp
UTF-8
1,208
3.3125
3
[]
no_license
/** * 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* findKth(Lis...
true
490008d26252242bca6afd38efbf3d509254ffe2
C++
yumiris/OpenSauce
/OpenSauce/shared/Include/YeloLib/configuration/i_configuration_value.hpp
UTF-8
2,057
2.59375
3
[]
no_license
/* Yelo: Open Sauce SDK See license\OpenSauce\Halo1_CE for specific license information */ #pragma once #include <YeloLib/configuration/i_configuration_leaf.hpp> namespace Yelo { namespace Configuration { /// <summary> Base configuration value interface. </summary> class i_configuration_value ...
true
ad45f781612eefde477e01cc7fd7c294eb7c4fe6
C++
qhdong/cpp-primer
/chapter-09/string.cpp
UTF-8
597
3.09375
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main() { const char *cp = "Hello, world!!!"; char notNull[] = {'H', 'l'}; string s1(cp); string s2(notNull, 2); // string s3(notNull); string s4(cp + 6, 5); string s5(s1, 6, 5); string s6(s1, 6); string s7(s1, 6, 20); ...
true