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
deecdf1728a5fd6648b525567856db24d2e58bb6
C++
AndresFelipeRG/Algorithms
/checkLinkedListPalinDromeLinearTimeConstantSpace.cpp
UTF-8
1,020
3.0625
3
[]
no_license
** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ i...
true
e2146557c71b64ede2dfb48805cddeac50edba93
C++
0APOCALYPSE0/Algorithm-Concepts
/Tree/BinaryTree_ZigZag_Level_order.cc
UTF-8
1,398
3.078125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" class Node { public: int data; Node* left; Node* right; Node(const int data){ this->data = data; left = NULL; right = NULL; } }; Node* buildTree(){ int data; cin >> data; string left,right; Node* root = new Node(...
true
57c42af702293754a9492d0fe2718d76691d4fdf
C++
fukaoi/crystal-v8
/src/ext/v8pp/ptr_traits.hpp
UTF-8
2,893
2.625
3
[ "MIT" ]
permissive
// // Copyright (c) 2013-2016 Pavel Medvedev. All rights reserved. // // This file is part of v8pp (https://github.com/pmed/v8pp) project. // // 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 V8PP_PTR_TRAIT...
true
fc1ffae6309ee3c064f2eafe2848b48a2a2bc027
C++
Menci/TuringAdvancedProgramming19A
/Task 1/double-checker/src/main.cc
UTF-8
14,713
2.90625
3
[]
no_license
#include <iostream> #include <iomanip> #include <random> #include <chrono> #include <bitset> #include <cstdint> #include <math.h> #include <dlfcn.h> #include "TerminalColor/TerminalColor.h" #include "Arguments.h" #include "Utility.h" const double RELATIVE_ERROR_LIMIT = 1e-8; using double_calc_t = uint64_t (*)(uint...
true
36e128ab85560932cc0b2bdfaeb7c395c3ed90f9
C++
liuyi2008/3D-display
/3D display/test3.cpp
GB18030
1,916
2.71875
3
[]
no_license
#include<stdio.h> #include<iostream> #include <vector> #include<math.h> #include<windows.h> #include<GL/glut.h> void init(int argc, char** argv) { glutInit(&argc, argv); //Iʼ GLUT. glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA); //ʾģʽʹRGBģ glutInitWindowPosition(50, 100); //ôڵĶλ glutInitWindowSize(400, 300); //ô...
true
6d095882eb8b048b8ed11442c2f2393d610ef1d6
C++
Superdanby/YEE
/AP325/P-8-11.cpp
UTF-8
1,214
2.578125
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; typedef long long ll; // constexpr const int INF = 0x3f3f3f3f; constexpr const ll INF = 1L << 60; constexpr const ll MOD = 1e9 + 9; void traverse(const vector<vector<pair<int, int>>> &graph, vector<vector<ll>> &dp, const int node) { for (const auto &x : ...
true
b547c06b653b08d29ed261bdcf855a080c58f8ac
C++
zhangke8/MSU-CS
/Programming-II/scheduler.h
UTF-8
800
2.53125
3
[]
no_license
/* * File: scheduler.h * Author: zhangke8 * Section: 007 * Created on April 3, 2014, 1:55 PM */ #ifndef SCHEDULER_H #define SCHEDULER_H #include "job.h" #include<string> using std::string; #include<vector> using std::vector; #include<algorithm> using std::swap; class Scheduler { private: vector<Job> arrivals...
true
fa4c663b136daf665d49a3892c52dfdf2973c25f
C++
yvc74/wrmos
/lib/containers/bitmap.h
UTF-8
2,961
3.046875
3
[ "MIT" ]
permissive
//################################################################################################## // // bitmap.h - template container. // //################################################################################################## #ifndef BITMAP_H #define BITMAP_H template <unsigned MAX_BITS> class bitmap...
true
3f35d98d25d41b724a6db44ae1da182b7ed081ba
C++
shamrice/EngineMonitor
/src/time/ClockTime.cpp
UTF-8
1,286
2.96875
3
[]
no_license
#include "ClockTime.h" time_t getTeensy3Time() { return Teensy3Clock.get(); } ClockTime::ClockTime() { setSyncProvider(getTeensy3Time); if (timeStatus()!= timeSet) { SerialLogger::getInstance().log(LogLevel::ERROR, "ClockTime::ClockTime()" "Unable to sync with RTC"); } else { SerialLo...
true
e1faae393ba9330ee37f20f5d26646f511440794
C++
InsightSoftwareConsortium/ITK
/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmrle/info.cxx
UTF-8
3,394
2.8125
3
[ "IJG", "Zlib", "LicenseRef-scancode-proprietary-license", "SMLNJ", "BSD-3-Clause", "BSD-4.3TAHOE", "LicenseRef-scancode-free-unknown", "Spencer-86", "LicenseRef-scancode-llnl", "FSFUL", "Libpng", "libtiff", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-other-permissive", ...
permissive
/*========================================================================= Program: librle, a minimal RLE library for DICOM Copyright (c) 2014 Mathieu Malaterre All rights reserved. See Copyright.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty ...
true
89f4df29439ed72020c8d6cf17ab9362403ff30b
C++
UBCOrbit/ADCS
/Control/Quaternion_Library/quaternion.cpp
UTF-8
2,485
3.15625
3
[]
no_license
#include <math.h> #include "quaternion.h" using namespace Quaternion; quat& quat::operator= (const quat &q) { this->a = q.a; this->b = q.b; this->c = q.c; this->d = q.d; return *this; } quat& quat::operator+= (const quat &q) { this->a += q.a; this->b += q.b; this->c += q.c; this->d += q.d; return *this; }...
true
048deafa2dbab9fe3b55ae8e55e1ab0d789f93bc
C++
basilwang/datastructure
/chapter2/iterator/main.cpp
UTF-8
307
2.84375
3
[]
no_license
#include "list.h" #include <iostream> using std::cout; int main() { list<int> l; l.insert(0,3); l.insert(0,2); l.insert(0,1); l.insert(3,4); l.printList(cout); for(iterator<int> it=l.begin();it!=l.end();it++) { cout<<*it<<endl; } system("pause"); }
true
c193725049e6a872f5cd617593baddf9112ce443
C++
scott-mao/NISwGSP_test
/Feature/ImageData.cpp
UTF-8
9,084
3.046875
3
[]
no_license
#include "ImageData.h" LineData::LineData(const Point2f & _a, const Point2f & _b, const double _width, const double _length) { data[0] = _a; data[1] = _b; width = _width; length = _length; } void ImageData::init_data(const char *img_path) { get_img(img_path); get_size(); } void ImageData::...
true
a23eb204aeb1154621ce26c64838f0ee4ca71ee1
C++
weimingtom/HereticTrainer
/heretictrainer/Classes/GameSetting.h
GB18030
1,135
2.703125
3
[]
no_license
#ifndef __GANESETTING_CORE_H__ #define __GANESETTING_CORE_H__ #include"cocos2d.h" #include<string> #include<map> USING_NS_CC; /* Ϸ࣬һЩá */ class GameSetting { public: static const int JUDGETIME_MISS=0; static const int JUDGETIME_BAD = 1; static const int JUDGETIME_GOOD = 2; static const int JUDGETIME_GREAT = 3; //...
true
86974f5bf1ffa316fc61c1d644f9f2846689e7b8
C++
DPAttila/AGL2.0
/src/Point.cpp
UTF-8
2,200
3.34375
3
[]
no_license
#ifndef POINT_CPP #define POINT_CPP #include "Point.h" #include <cmath> #include <cstdlib> #include "Quaternion.h" using namespace std; namespace agl { Point::Point() {} Point::Point(float x, float y, float z) { this->x = x; this->y = y; this->z = z; } float Point::pyth() { return sqr...
true
7153bcb2962fb3416201ec035f07a96d939b10fd
C++
pilgarlicx/rendering-fw
/RFW/system/utils/src/rfw/utils/file.h
UTF-8
2,204
2.828125
3
[ "Apache-2.0" ]
permissive
#pragma once #include <cassert> #include <fstream> #include <istream> #include <string> #ifdef WIN32 #include <direct.h> #else #include <unistd.h> #ifdef __linux__ #include <limits.h> #endif #endif #include "Logger.h" namespace rfw::utils::file { static std::string get_working_path() { #ifdef WIN32 const char *bu...
true
1b560c9affcc54c4d06db01743fd3e03603024bf
C++
pufit/FCS-PFaM-2019
/2/2-palindrome.cpp
UTF-8
685
3.15625
3
[]
no_license
// // Created by pufit on 25.01.2020. // #include <algorithm> #include <cstdint> #include <iostream> #include <cctype> using i32 = int32_t; bool IsLetter(char c); int main() { std::string inp, out = "YES", str; std::getline(std::cin, inp); std::copy_if(inp.begin(), inp.end(), std...
true
dceb67d270bd4e52c4a9a238de91291b9e1decd3
C++
nobuyuki83/delfem2
/include/delfem2/vec2.cpp
UTF-8
13,486
2.609375
3
[ "MIT" ]
permissive
/* * Copyright (c) 2019 Nobuyuki Umetani * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <cstdlib> #include "delfem2/vec2.h" DFM2_INLINE bool delfem2::IsCrossLines( const double po_s0[2], const double po_e0[2], ...
true
612005d03658f06fd237ae4d7a878ac50a46e6c9
C++
vastyellowNew/contour-tree
/ContourTree/TriMesh.cpp
UTF-8
1,567
3.03125
3
[ "BSD-3-Clause" ]
permissive
#include "TriMesh.hpp" #include <fstream> #include <iostream> #include <set> #include <algorithm> #include <cassert> namespace contourtree { TriMesh::TriMesh() { } int TriMesh::getMaxDegree() { return maxStar; } int TriMesh::getVertexCount() { return nv; } int TriMesh::getStar(int64_t v, std::vector<int6...
true
1959bfa5be52c342f7aa5d9d3929df2d16abe482
C++
lineCode/Berserk
/Engine/Source/RenderSystem/Public/Managers/DebugDrawManager.h
UTF-8
4,909
2.859375
3
[]
no_license
// // Created by Egor Orachyov on 13.04.2019. // #ifndef BERSERK_DEBUGDRAWMANAGER_H #define BERSERK_DEBUGDRAWMANAGER_H #include <Math/MathInclude.h> #include <Memory/IAllocator.h> #include <Misc/UsageDescriptors.h> #include <Containers/ArrayList.h> #include <mutex> namespace Berserk::Render { /** * Debug d...
true
4f20028e58eb5b1339142856a1829a3f646ee49b
C++
mylonabusiness28/cpp_design_patterns
/Patterns/Singleton/ConceptualExample01.cpp
UTF-8
1,637
3.390625
3
[]
no_license
// =========================================================================== // ConceptualExample01.cpp // =========================================================================== #include <iostream> #include <thread> #include <mutex> namespace ConceptualExample01 { class Singleton final { private: ...
true
62fc1c5ae0f687d344a77cc9c346e181e2704b64
C++
qs8607a/algorithm-10
/C++/Boyer-Moore/boyermoore.h
UTF-8
2,744
2.890625
3
[]
no_license
#ifndef __BOYERMOORE_H #define __BOYERMOORE_H #include <queue> #include <vector> typedef unsigned int uint; typedef unsigned char uchar; using namespace std; class BoyerMoore{ public: BoyerMoore(const uchar* prefix,uint _prefixlength); void search(queue<const uchar*>& store,const uchar* text, uint textlength); ...
true
a745da7c25952056ab93eda22158e346da62e6df
C++
Sanzhar479/Midstone-Project---GameEngine
/Engine/MidStone Engine/Spawner.cpp
UTF-8
622
2.765625
3
[]
no_license
#include "Spawner.h" Spawner::Spawner() { } Spawner::Spawner(Vec3 pos_[6]) { //setting new spawn points for (size_t i = 0; i < 6; i++) pos[i] = pos_[i]; } Spawner::~Spawner() { } Vec3 Spawner::Rand() { //setting randomizer srand(time(NULL)); //set number of the array member int num = 0; //checking if current...
true
ab1f90b128b66814bc5fcf4ff6629c3b5ba423ca
C++
15831944/Utility
/ScheduleNotifier.h
UTF-8
2,513
2.625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: ScheduleNotifier.h * Author: Justin Lin * * Created on 2017年5月17日, 下午 12:59 */ #ifndef UTILITY_SCHEDULENOTIFIER_H ...
true
5a3addf8b1c34791efe854d47f22c0f8b390be67
C++
ericXin95616/hackerrank
/Swap_Nodes.cpp
UTF-8
849
2.9375
3
[]
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> #include "source.h" using namespace std; /* typedef struct node { int data; node *left; node *right; } node; void addNode(node *root, const int leftData, const int rightData, const int parentNode); void s...
true
97b47a987482ee174fd686cffa77a8cbc921c282
C++
Mekanikles/fudgelang_cpp
/fudge/tests/inputtests.cpp
UTF-8
1,118
3.09375
3
[]
no_license
#include "gtest/gtest.h" #include "input/source.h" #include "input/bufferedinputstream.h" using namespace fudge; TEST(Input, EmptyInputStream) { BufferSource source(""); BufferedInputStream inStream(source.createStream()); char c = inStream.peek(); EXPECT_TRUE(c == EOF) << "Expected EOF but was: " << c; } TES...
true
44976902651e92e098236e47eb87864e17d9b2b3
C++
serjik85kg/MineSweeperSolver
/MineSweeperSolver/game.h
UTF-8
280
2.625
3
[ "MIT" ]
permissive
#pragma once #include "group.h" class Game { public: int ** mField; int mM; int mN; int mMines; std::vector<Group> mGroups; public: Game(int ** field, int m, int n, std::vector<Group> groups, int mines) : mField(field), mM(m), mN(n), mGroups(groups), mMines(mines) {} };
true
b9ac198ae2f164eb3b7b679c02a6921ae6ba3657
C++
osak/Contest
/AOJ/0540.cc
UTF-8
1,726
2.703125
3
[]
no_license
#include <iostream> #include <vector> #include <utility> #include <climits> #include <algorithm> using namespace std; int main() { while(true) { int N, M, H, K; cin >> N >> M >> H >> K; if(!N && !M && !H && !K) break; vector<int> scores; vector<int> goals; ...
true
4eb49f162edcf26ca0e7e81a4619e173794360f2
C++
Calypso3362/Yahtzee2020
/normal.cpp
UTF-8
26,111
2.90625
3
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> #include <cstring> #include <iostream> #include <string> #include <algorithm> #include "normal.h" using namespace std; //functions for checking// int is_aces(int array[5]){ int sum = 0; for(int i=0; i<5; i++){ if (array[i]==1){ sum+...
true
2d26bb0c37519c159f8baa638707f70d746c4199
C++
HypnoMix12/LAB9
/lab94.cpp
UTF-8
4,159
3.21875
3
[]
no_license
// lab94.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> using namespace std; int main() { setlocale(0, ""); int N; div_t N1, N2, N3; cout << "Введите число от 100 до 999: "; cin >> N; N1 = div(N, 100); N2 = div(N1.rem, 10); ...
true
8cb9fe0470dc9b359af9fb52d33df8330aea977b
C++
VincentZ-42/ROBOLAB1
/MOVEMENTS.ino
UTF-8
7,530
3.125
3
[]
no_license
///////////////////////////////////////////////////////////////// MOVEMENTS /////////////////////////////////////////////////////// void goUp(int vol) { if (vol >= 255) vol = 255; analogWrite(RPWMOutputLeft, vol); analogWrite(LPWMOutputLeft, 0); analogWrite(RPWMOutputRight, 0); analogWrite(L...
true
7ad526d1338b2d6a153f8926195ceeff696f73fb
C++
MatheusKunnen/Jogo-TecProg
/src/Jogo/Gerenciadores/GerenciadorColisoes.cpp
UTF-8
4,641
2.78125
3
[ "MIT" ]
permissive
// // GerenciadorColisoes.cpp // Jogo-SFML // // Created by Matheus Kunnen Ledesma on 11/13/19. // Copyright © 2019 Matheus Kunnen Ledesma. All rights reserved. // #include "GerenciadorColisoes.hpp" namespace Game { namespace Gerenciadores { // Constructor & Destructor GerenciadorColisoes::GerenciadorColisoes(...
true
a544955ab8e723b44ba6ee3c2483b388ec36ca1c
C++
mdevman/CSC016
/Node/list.cpp
UTF-8
6,788
3.5
4
[]
no_license
# include "list.h" # include <cstddef> # include <iostream> using namespace std; //# include <stddef.h> List::List() //:next(0), data(0) { first = NULL; } /* List::List(DataType data, Node * next) { this->data = data; this->next = next; } */ void List::insert(DataType data) { Node * tempPtr = new Node(data, firs...
true
6249852cd705de29f11a298d04e8bf5e2896f378
C++
spectrum968/dfwbi
/httpd/svm/LSFitting.h
UTF-8
2,373
2.65625
3
[]
no_license
#ifndef LSFITTING_H #define LSFITTING_H #include <boost/numeric/ublas/io.hpp> #include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/vector_proxy.hpp> #include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/matrix_proxy.hpp> #include <boost/numeric/ublas/vector_expression.hpp> #includ...
true
521a24ee60ac098aa9998ce8397f087a2a1aab81
C++
steventfan/CS14
/Week5/Tree.cpp
UTF-8
20,980
3.34375
3
[ "BSD-3-Clause" ]
permissive
#include <iostream> #include <string> #include "Tree.h" Tree::Tree( ) { root = 0; } Tree::~Tree( ) { //calls deconstructor helper function deletion(root); } void Tree::insert(const string &data) { if(root == 0) { root = new Node(data); return; } Node *current = ro...
true
8b5202646503f082a0742f930308db716059bdce
C++
Wei-YB/WebServer
/EventLoopThreadPool.h
UTF-8
905
2.734375
3
[]
no_license
#pragma once #include <functional> #include <memory> #include <vector> #include "EventLoopThread.h" #include "Util.h" START_NAMESPACE class EventLoop; class EventLoopThread; class EventLoopThreadPool { public: using ThreadInitCallback = std::function<void(EventLoop*)>; EventLoopThreadPool(size_t size = 4...
true
448ba808dbc8f8a7cca76c12230b8e4e8bdf20ae
C++
Danil5656/Lab_4_TiMP
/2_Project/Exception.h
UTF-8
1,353
3.390625
3
[]
no_license
/** * @file Exception.h * @author Соколов Д.А. * @version 1.0 * @brief Описание класса Error * @date 28.05.2021 * @copyright ИБСТ ПГУ */ #pragma once #include <stdexcept> #include <string> using namespace std; /// @brief Класс для обработки ошибок, которые могут возникнуть при взаимодействии с программой /// @details ...
true
3e16d861dceef04a03b65e480e53d55612841967
C++
konstantint/Silverware-H345
/Goldenware/Hardware/Peripherals/mpu6050.h
WINDOWS-1252
7,671
2.734375
3
[ "MIT" ]
permissive
// Generic interface to the MPU6050 (or compatible) I2C six axis accelerometer/gyro chip // See e.g. https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/RM-MPU-6000A.pdf // Also: https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf // // License: MIT // Author: konstantint, silverx // Ba...
true
3a6bd47eb1d0c5b16cc87b89db1868b2f2be2963
C++
aberry5621/COMP235-Lab-20170425-Sets-And-Maps
/COMP235 Lab 20170425/main.cpp
UTF-8
3,851
3.328125
3
[]
no_license
#include <set> #include <map> #include <iterator> //for ostream_iterator #include <regex> #include <sstream> #include <string> #include <iostream> using namespace std; int main() { /* Part 1 (STL::set) Copy and paste this into your IDE. Extract words into a set, display the set. */ string gdp = { "...
true
2f352d407c5ca0eb0b037938e0ecb30349b81fbb
C++
hellonaro/BOJ
/14002.cpp
UTF-8
1,375
3.59375
4
[]
no_license
#include <iostream> #include <vector> #include <stack> using namespace std; /* 수열 A가 주어졌을 때, 가장 긴 증가하는 부분 수열을 구하는 프로그램을 작성하시오. 예를 들어, 수열 A = {10, 20, 10, 30, 20, 50} 인 경우에 가장 긴 증가하는 부분 수열은 A = {10, 20, 10, 30, 20, 50} 이고, 길이는 4이다. */ int main(){ int a; cin >> a; vector<pair<int, int>> numbers(a); vect...
true
f95cb028348c706af0625ce18f4aee65826b2d99
C++
evgen1a/homework1
/mai5.cpp
UTF-8
293
3.265625
3
[]
no_license
#include <iostream> using namespace std; void fun (float a) { float b; b = 1.8 * a + 32.0; cout<< a << " degrees Celsius is " << b <<" degrees Fahnrenheit"; } int main() { float a; cout << "Please enter a Celsius value:"; cin >> a; fun(a); return 0; }
true
526b7442359adbc8bfd53d81ddb3dbd86b415913
C++
gengyouchen/leetcode
/minimum-window-substring/sliding-window-solution.cpp
UTF-8
964
3.078125
3
[]
no_license
class Counter { private: int char2count[128] = {}, char2threshold[128] = {}; int nMatched = 0, nTargeted; public: Counter(const string& target) : nTargeted(target.size()) { for (char c : target) ++char2threshold[c]; } void add(char c) { if (char2threshold[c] && char2count[c]++ < char2threshold[c]) ++nMat...
true
cb52bab15b45c8e69eef90f73fbbebe267f786d7
C++
cqd123123/complier
/complier/Quadcode.h
UTF-8
1,446
2.5625
3
[]
no_license
#ifndef _COMPILER_QUADCODE #define _COMPILER_QUADCODE #pragma warning(disable:4786) #include "symbol.h" #include "SymbolTable.h" #include <VECTOR> class Quadcode { public: const enum Quad_type { ADD, // ASSIGN, // MUL, // SUB, // DIV,//divide INV,//inverse CALL,//call FUNC, PROC, //not uesd JMP...
true
8a5b18d0af824091caa72bc58ca5353ca6a8b3ac
C++
Ilyazykov/DNA-methylation
/DNAmethylation/CourseWork/OrdinaryLeastSquares.cpp
UTF-8
855
3.03125
3
[]
no_license
#include "OrdinaryLeastSquares.h" OrdinaryLeastSquares::OrdinaryLeastSquares() { } OrdinaryLeastSquares::OrdinaryLeastSquares( vector<double> x, vector<double> y ) { getLinearRegression(x, y); } void OrdinaryLeastSquares::getLinearRegression( vector<double> x, vector<double> y ) { if (x.size() != y.size()) throw ...
true
8d10478ecdd3e3f266ba9d668736fe0619cd9d6a
C++
tleek135/university
/CS202/lab1/Account.h
UTF-8
745
3.203125
3
[]
no_license
#ifndef ACCOUNT_H #define ACCOUNT_H /*************************************** * Kyle Lee * Account.h * April 8, 2015 * This file declares the Account class. ***************************************/ //This class simulates a bank account, with a balance and deposit/withdrawal options. //It can also accept an interes...
true
ef6dfe93a6a3c3126cfac393c4b5cbc0cc13c992
C++
mickkn/E2PRJ2
/Implementering/SW PC/Release/Release/Release/brugerUI.cpp
ISO-8859-15
8,197
3.3125
3
[]
no_license
#include "brugerUI.h" #include <iostream> #include <conio.h> #include <string> #include <iomanip> using namespace std; brugerUI::brugerUI(hukommelse *hu) { huPtr = hu; } void brugerUI::showMenu(int menu) { while(1) { if(menu == 0) // vis prelogin menu. Login og vis status kan vlges { menu = preLogin();...
true
3f5ba60117a473f5924a9ea595d63f57ef2ac6c0
C++
KryEdge/Pong-Raylib
/Project1/src/cpp/GameOVER.cpp
UTF-8
1,298
2.53125
3
[]
no_license
#include "GOver.h" #include "raylib.h" #include "Players.h" #include "game.h" #include "GMenu.h" namespace Carceglia { const int victory = 5; void endGame() { BeginDrawing(); ClearBackground(BLACK); if (contadorP1 == victory) { DrawText("Felicidades Jugador 1!", 100, screenHeight / 4, ...
true
45fcb017edce10eaa1e4531c0c5282329ae7e1a6
C++
ysh4296/compiler
/syntax_analyzer/lexical_analyzer.cpp
UTF-8
7,884
3.28125
3
[]
no_license
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <cstring> using namespace std; typedef pair<int, int> ii; //New type definition for token table typedef pair<string, string> ss; //New type definition for Output String ii DFA_tabl...
true
9149c12fa00d664aee49a910d6200a404d3a4f0d
C++
mln-lchs/Moteur3D
/Moteur3D/RigidBody.cpp
ISO-8859-1
3,527
2.859375
3
[]
no_license
#include "pch.h" #include "RigidBody.h" #include <math.h> /* Constructeur */ RigidBody::RigidBody() { inverseMass = 0; linearDamping = 0; position = Vecteur3D(); velocity = Vecteur3D(); orientation = Quaternion(); rotation = Vecteur3D(); transformMatrix = Matrix4(); inverseInertiaTensor = Matrix3(); forceAcc...
true
0a13cb8c53d0c137fb3e343119d5e6d4d9ca85ed
C++
syamashi/cppmodule
/cpp08/ex02/mutantstack.hpp
UTF-8
3,082
2.859375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* mutantstack.hpp :+: :+: :+: ...
true
3b2b9171f0739dc9313878b5169a7c23865b46a5
C++
naindejardin/financial_software_projects
/phase1/mmain.cc
UTF-8
4,145
2.625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <iostream> #include "SBB_util.h" #include "SBB_date.h" #include "SBB_io.h" #include <math.h> #include "BondCalculator.h" #include "Portfolio.h" using namespace std; int main (int argc, char** argv) { SBB_util util_obj; util_obj.start_clock(); // for(int i=0; i<1000...
true
cc020f496bda29561be1fd0c3cdf4970843593bd
C++
AverJing/LeetCode
/LeetCode/PointToOffer/CH05/Ex31FindGreatestSumOfSubArray.cpp
UTF-8
419
3.0625
3
[]
no_license
/* * * *@author: Aver Jing *@description: *@date: * * */ #include <iostream> #include <vector> using std::vector; class Solution { public: int FindGreatestSumOfSubArray(vector<int> array) { if (array.empty()) return; int sum = 0, maxNumber = INT_MIN; for (auto e : array) { sum += e; if (e > sum) sum...
true
26643b848ee26ee51909e76d99c3214ab3be9e29
C++
sgluebbert/CISS465NetworkGame
/app/Main.cpp
UTF-8
626
2.71875
3
[]
no_license
#include "../Source/Application/Application.h" int main(int argc, char* argv[]) { bool gui = true; if (argc >= 2) { if (strcmp(argv[1], "help") == 0 || strcmp(argv[1], "h") == 0) { std::cout << "Usage:\n"; std::cout << "\t" << argv[0] << "\n"; std::cout << "\t" << argv[0] << " server [port] [lobby na...
true
35b4c179fd7d35c0017d8dbae9eac78e51b676c4
C++
lana555/dynamatic
/resource_sharing/src/bb_graph_reader.h
UTF-8
741
2.578125
3
[ "MIT" ]
permissive
// // Created by pejic on 21/08/19. // #ifndef RESOURCE_MINIMIZATION_BB_GRAPH_READER_H #define RESOURCE_MINIMIZATION_BB_GRAPH_READER_H #include <string> #include <iostream> #include <vector> #include <fstream> using namespace std; class BB_graph { public: struct Link{ int src; int dst; int set_id; vecto...
true
0f7e4d7b30ae47b4c004cd9523a64ed158a9752b
C++
wutongtoby/mbed13
/13_2_Distance/main.cpp
UTF-8
545
2.53125
3
[]
no_license
#include "mbed.h" #include "bbcar.h" Ticker servo_ticker; Ticker encoder_ticker; PwmOut pin8(D8), pin9(D9); DigitalIn pin3(D3); BBCar car(pin8, pin9, servo_ticker); int main(void) { parallax_encoder encoder0(pin3, encoder_ticker); // set the initial step to 0 encoder0.reset(); car.goStraight(100); ...
true
d084bd7d861de026f5ed13061d889137d9ca2b05
C++
EneRgYCZ/Problems
/Numere_Lipsa/Numere_Lipsa.cpp
UTF-8
340
2.546875
3
[ "MIT" ]
permissive
#include <iostream> #include <fstream> using namespace std; ifstream fin ("numere.in"); int n; int main() { fin >> n; int y = n + 1, x; while (fin >> x) { if (x == y) { continue; } else { n--; y = x; } } cout <...
true
8310c01e6e16d3d64955fd86f11480edf6a068df
C++
doctoroyy/algorithm
/天梯赛刷题/L2-011 玩转二叉树 (25 分).cpp
UTF-8
1,121
3.390625
3
[]
no_license
#include<iostream> #include<queue> using namespace std; struct node { node *lchild, *rchild; int ele; node (int x) { ele = x; lchild = rchild = NULL; } }; node* build(int *PreOrder, int *InOrder, int len) { node* root = new node(PreOrder[0]); int root_pos; for (int i = 0; i < len; i++) { if (P...
true
2eab53f8fd884d36d84833ecd0ad678333a58f10
C++
ninc/tddc78
/lab3/main.cpp
UTF-8
3,508
2.734375
3
[]
no_license
// my first program in C++ //export OMP_NUM_THREADS=16 // icpc -xHost -openmp -o main main.cpp //./main //10 times faster as OMP_NUM_THREADS=16 vs 1 //$ompsalloc ./main #include <iostream> #include <stdio.h> #include <math.h> #include <vector> #include "omp.h" const int n = 1000; const int maxiter = 1000; const do...
true
5e4694a2db99f47c99aae4523a5302cdfb06478f
C++
spraetor/amdis2
/test/utility/int_seq.hpp
UTF-8
1,001
2.984375
3
[ "MIT" ]
permissive
#pragma once // from http://stackoverflow.com/questions/17424477/implementation-c14-make-integer-sequence/17426611#17426611 namespace AMDiS { template <int...> struct Seq {}; namespace detail { template <int s, class S> struct Concat; template <int s, int ... i> struct Concat<s, Seq<i... >> ...
true
14dc06cca9250fccac6d70b7c4a3735b2ab6fc60
C++
Harshil-Gupta/ubiquitous-robot
/MinMaxDiff.cpp
UTF-8
838
2.703125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int smallestRangeII(vector<int>& A, int K) { sort(A.begin(),A.end()); int dp1[A.size()],dp2[A.size()]; for(int i=0;i<A.size();i++) { dp1[i]=A[i]+K; dp2[i]=A[i]-K; } if(A.s...
true
3a377ec54e13489dbebff7ad8df51d81d7a4424b
C++
vt167098/cpp
/[200324]HW6-2.cpp
UTF-8
2,942
2.71875
3
[]
no_license
#include <iostream> #include <vector> #include<sstream> #include <algorithm> using namespace std; int main() { struct Animals { string animal; int qty; }; struct Places { /* data */ string place; vector<struct Animals> result; }; vector<struct Places> data; int i; string data1, data3, input, tmp...
true
ba940216ef6c21c9c55227a5b7fd7cc76e6159fc
C++
rekotiira/xd
/include/xd/vendor/glm/core/func_packing.hpp
UTF-8
7,829
2.765625
3
[ "BSL-1.0" ]
permissive
/////////////////////////////////////////////////////////////////////////////////////////////////// // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) /////////////////////////////////////////////////////////////////////////////////////////////////// // Created : 2010-03-17 // Updated ...
true
ff26a7f8185f8dc9cd09c5bb912fc7facbfb1cec
C++
chenyuxiaodhr/hacker_rank_solutions
/Algorithms/Bit_Manipulation/Cipher.cpp
UTF-8
959
2.703125
3
[ "MIT" ]
permissive
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <bitset> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n, k; cin >> n >> k; bitset<2000000> b; cin >> b; bitset<1000000> s;...
true
8008091ac8a73f64e191bb71ade0f63680835717
C++
innocentboy/myrepository
/src/codee/codchef/PPTEST.cpp
UTF-8
1,167
2.84375
3
[]
no_license
/** http://www.codechef.com/problems/PPTEST NOTE: It's similare to 0-1 knapsack problem. */ /** INPUT: 1 3 7 1 2 3 2 3 5 3 3 3 OUTPUT: 11 */ #include<cstdio> #include<iostream> #include<algorithm> #define N 105 using namespace std; int c[N],p[N],t[N]; int pt[N]; int dp[N][N]; int main() { int i,j,k,test,n,w;...
true
40580f3d119cf345a3a0413321ec931bbfab06ce
C++
foreignbill/program_training
/NJFU 蓝桥杯模拟赛3/3.cpp
UTF-8
1,449
2.84375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int g[6][6], res = 0; bool vis[10]; const int dx[] = {0,0,1,-1,1,1,-1,-1}; const int dy[] = {1,-1,0,0,1,-1,1,-1}; bool check() { for(int i = 1; i <= 3; i++) { for(int j = 1; j <=4; j++) { if( (i == 1 && j == 1) || (i == 3 && j == 4) ) continue; ...
true
f18af199b548f4dfaef1cdccdbd1470f48582299
C++
jamiehayes45/JamieHayes-CSCI20-Fall2016
/lab6/lab6.cpp
UTF-8
2,267
3.484375
3
[]
no_license
// Created by Jamie Hayes // Description: copyright for ascii // Titile: lab six Intro to Functions // Class: CSCI-20-Fall 2016 MW programming 1 #include <iostream> #include <string> using namespace std; void copyRight () // function { string creator = "Jamie Hayes"; string copyright = "Copy Right"; int y...
true
cf82d31b210abc6ce2ed10cbe153a2f26add271b
C++
adityabettadapura/Algorithms-and-Datastructures
/sorting/wave_sort.cpp
UTF-8
888
3.75
4
[]
no_license
/**************************** Wave Sort algorithm Sorts elements such that a[0] > a[1] < a[2] ... Time: O(n) Space: O(n) Author: Aditya Bettadapura ****************************/ #include<iostream> #include<vector> #include<cstdlib> using namespace std; void PopulateVector(vector<int>& input, int size){ for(int i=...
true
22065dfc64e338087319c29b2c5bae3f64415aa5
C++
Lime5005/epitech-1
/tek2/C++/cpp_arcade/src/interfaces/Structures.hpp
UTF-8
2,529
2.65625
3
[]
no_license
/* ** Structures.hpp for cpp_arcade in /home/ventinc/epitech/cpp/cpp_arcade/interfaces/Structures.hpp ** ** Made by Vincent DUSAUTOIR ** Login <vincent.dusautoir@epitech.eu> ** ** Started on Fri Mar 17 15:55:42 2017 Vincent DUSAUTOIR ** Last update Fri Mar 17 15:55:42 2017 Vincent DUSAUTOIR */ #ifndef CPP_ARCADE_ST...
true
d75a1f93bdfdc40957cee8f549ebbf674b1db099
C++
veedee2000/SDE_30_DAYS
/Day17/Vertical_View.cpp
UTF-8
698
2.734375
3
[]
no_license
vector<int> verticalOrder(Node *root) { vector<int>ans; map<int, vector<int>>mp; queue<pair<Node*, int>>q; if(root) q.push({root, 0}); while(!q.empty()){ int sz = q.size(); while(sz--){ auto current = q.front(); q.pop(); Node* curr = curr...
true
b00551b8cfd0d3538001bfc1b7ce7aea70aa0511
C++
ImLegend4658/Inform-211
/Aldawk_lab4_pro5.cpp
UTF-8
2,288
4.03125
4
[]
no_license
/* Author :Aziz Aldawk Date : 2/10/2016 Language : C++ Purpose : This program about arithmetic calculations (addition, subtraction, multiplication, division) */ #include<iostream> using namespace std; int main() { int value1 = 1, value2 = 2, value3 = 3, value4 = 4; int Num, add, sub, div, mult; in...
true
4e9edafd5af9d98568d442ea2cbf7faf03896380
C++
Mereco/ACM-ZS
/ACM-ZS/ACM1016.cpp
UTF-8
305
2.578125
3
[]
no_license
#include<iostream> using namespace std; int main() { int a=0,b=0,c=0,d=0; cin>>a; b=a%100; if(b>0) { c=a%4; if(c>0) { cout<<"no"<<endl; } else { cout<<"yes"<<endl; } } else { d=a%400; if(d>0) { cout<<"no"<<endl; } else { cout<<"yes"<<endl; } } return 0; }
true
e01e23f37a9a91d73a6b4a2d9674ca51fa1278be
C++
ch812248495/nowcoder
/4.stackAndQueue/MaxInWin.cpp
UTF-8
525
2.75
3
[]
no_license
#include "head.cpp" #include <utility> typedef pair<int, int> Pair; vector<int> maxInWin(vector<int> &num, int size) { vector<int> result; priority_queue<Pair> Q; for(int i = 0; i<size-1; i++) { Q.push(Pair(num[i], i)); } for(int i = size-1; i < num.size(); i++) { Q.push(P...
true
484066c07b585c06af96f1542dd45c872ba2ca2a
C++
antonidass/BaumanStudy
/sem4/OOP/lab_3/src/scene/scene.cpp
UTF-8
881
2.84375
3
[]
no_license
#include <iterator> #include "../../inc/scene/scene.h" #include "../../inc/object/composite.h" Scene::Scene() : _figures(new Composite) {}; std::vector<std::shared_ptr<Object>> Scene::getFigures() { return _figures->_elements; } std::vector<std::shared_ptr<Camera>> Scene::getCameras() { return _cameras; } s...
true
3388fc0c9f9ce55ffc9ae89350d480801d28398e
C++
strawberryfg/pascal
/NOIP2010/20100924/all/program/A汤舒扬/concert.cpp
UTF-8
1,005
2.53125
3
[]
no_license
#include<iostream> #include<fstream> #include<cstdio> #include<cstring> #include<cstdlib> #include<string> #include<cmath> #include<algorithm> using namespace std; ifstream fin ("concert.in" ); ofstream fout("concert.out"); #define MAXN 1005 #define MS(S) memset(S,0,sizeof(S)) #define sqr(X) ((X)*(X)) int n,g[MAXN],b...
true
d11f7b224d1299ffb2b5ccb72e20d4568901d74c
C++
harpreets152/interviewbit-problems
/Bit Manipulation/min_xor_value.cpp
UTF-8
652
3.5625
4
[]
no_license
/* Given an array of N integers, find the pair of integers in the array which have minimum XOR value. Report the minimum XOR value. Examples : Input 0 2 5 7 Output 2 (0 XOR 2) Input 0 4 7 9 Output 3 (4 XOR 7) Constraints: 2 <= N <= 100 000 0 <= A[i] <= 1 000 000 000 */ //this is not the best solution to th...
true
2bc1f3cc1fef0b856e0054fce900cc932fd273ce
C++
abdalimran/Competitive_Programming
/Mathematics Techniques/GCD/GCD.cpp
UTF-8
494
2.96875
3
[]
no_license
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything. Coder: Abdullah Al Imran Email: abdalimran@gmail.com */ #include<bits/stdc++.h> using namespace std; //Recursively int gcd(int a, int b) { if(b==0) return a; else return gcd(b, a%b); } //Shortly int gcd(int a, int b...
true
eb28821e62852ed90cdcd7230be5af53b4c0bbcd
C++
GuyOded/Fraction
/Fraction.cpp
UTF-8
9,892
3.703125
4
[]
no_license
/* * fraction.cpp * * Created on: Jan 22, 2016 * Author: guy */ #include "Fraction.h" #include <iostream> #include <stdexcept> #include <cmath> /** * Fraction(int num, int denum = 1) * * @param num * @param denom */ Fraction::Fraction(int num, int denom) { if(denom == 0) { throw std::overflow_err...
true
1b2a8b885c093b9537b0d8ff1a3f75d2492aba3f
C++
cwj5012/rdm-cppserver
/src/rdm/database/mysql/DBServiceManager.cpp
UTF-8
2,562
2.546875
3
[ "MIT" ]
permissive
#include <sstream> #include "DBServiceManager.h" #include "DBConnectionPool.h" #include "IDBConnection.h" #include "../../log/Logger.h" #include "../../service/Service.h" #include "../../config/ServerNetConfig.h" namespace rdm { DBServiceManager::DBServiceManager() { if (mDBConnectionPool == nullptr) { //...
true
abc16b24a9f46ffa69e6258b94c14c8e2fe4d196
C++
samfubuki/lbcodessolution
/Graph Algorithm Codes/hamiltonianpath2.cpp
UTF-8
681
2.765625
3
[]
no_license
#include <iostream> using namespace std; int result; bool visit[16]; void backtrack(int board[][16],int i,int v,int count){ visit[i]=true; for(int j=1;j<=v;j++){ if(visit[j]==false && board[i][j]==1) backtrack(board,j,v,count+1); } if(count==v-1) result=1; visit[i]=false; return; } int main() { int t; cin>>t; whil...
true
3283fb28c055f27b29c3eeb0c82f8c00f4eece40
C++
chenghui-lee/leetcode
/Code/1326 Minimum Number of Taps to Open to Water a Garden.cpp
UTF-8
735
2.859375
3
[]
no_license
class Solution { public: int minTaps(int n, vector<int>& ranges) { vector<int> jumps(ranges.size(), 0); for(int i=0; i<ranges.size(); i++){ int left = max(0, i - ranges[i]); int right = min(n, i + ranges[i]); jumps[left] = max(jumps[left], right - left); ...
true
4961ae94da2b1d47458323677601e55893196456
C++
thomas-huet/mapbox-gl-native
/include/mbgl/map/camera.hpp
UTF-8
1,256
2.8125
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer", "NCSA", "ISC", "blessing", "BSD-3-Clause", "OpenSSL", "IJG", "BSL-1.0", "Zlib", "Apache-2.0", "Libpng", "curl", "MIT", "BSD-2-Clause", "LicenseRef-scancode-openssl", "LicenseRef-scancode-sslea...
permissive
#pragma once #include <mbgl/util/chrono.hpp> #include <mbgl/util/geo.hpp> #include <mbgl/util/optional.hpp> #include <mbgl/util/unitbezier.hpp> #include <functional> namespace mbgl { /** Various options for describing the viewpoint of a map. All fields are optional. */ struct CameraOptions { /** Coordinate ...
true
5079b760f2948ffc63a37e4c91f8fef0bd710bb3
C++
fwsGonzo/IncludeOS
/api/net/addr.hpp
UTF-8
2,676
2.984375
3
[ "Apache-2.0" ]
permissive
#pragma once #include <net/ip4/addr.hpp> #include <net/ip6/addr.hpp> namespace net { union Addr { public: static const Addr addr_any; constexpr Addr() noexcept : ip6_{} {} Addr(ip4::Addr addr) noexcept : ip4_{0, ip4_sign_be, std::move(addr)} {} Addr(ip6::Addr addr) noexcept : ip6_{std::move(ad...
true
c8a09c8e9e1661ecd7d45f075923901336df5a29
C++
krthush/programming-principles-book
/Chapter 9/Drill/Drill/Chrono.cpp
UTF-8
7,531
3.421875
3
[]
no_license
#include "Chrono.h"; /* q1 */ //namespace Chrono { // std::ostream& operator<<(std::ostream& os, const Date& d) // { // return os << '(' << d.y << ',' << int(d.m) << ',' << d.d << ')'; // } // // helper functions // void init_day(Date& dd, int y, int m, int d) { // // // check that (y,m,d) is a valid date // // if...
true
a33db9481c76b7ffbb26f790919de7f2df301d8f
C++
sardort96/Stationery-Delivery
/main.cpp
UTF-8
1,029
3.03125
3
[]
no_license
/*///////////////////////// / Name: Assignment 3 ////// / Author: Sardor ////////// *////////////////////////// #include<iostream> #include"Gazel.h" #include"Damas.h" #include"Nexia.h" #include"Lorry.h" #include"CalculateFuel.h" using namespace std; int main() { Vehicle *ptr; cout << "1-Gazel\n2...
true
b53390d8c684f573aee29c50428e83b71cead07f
C++
deucalionAlpha/3D-Chinesechess
/Chinese Chess/CHESSMANAGER.h
UTF-8
6,929
2.59375
3
[]
no_license
#ifndef CHESSMANAGER_H #define CHESSMANAGER_H #include"CHESSGO.h" #include "WATERFLOW.h" class boardCross { private: Square *cross[2]; glm::mat4 *modelMatrix; Material *crossMaterial; public: boardCross(float cx, float cz, float gap) { cross[0] = new Square(0, 0, 2.2, 0.5, gap * 2 * sqrt(2.0)); cross[1] = new ...
true
3a5b137a7b6c908626589fd2315f4aa0144fcb3c
C++
jcohen1964/MadCow
/totalClinicalVisitor.cpp
UTF-8
654
3
3
[]
no_license
#include "totalClinicalVisitor.h" //Visits all BovineGroups in herd and tallies number of clinical bovines void TotalClinicalVisitor::visit(BovineHerd* herd) { total = 0; BovineHerd::iterator end = herd->end(); for(BovineHerd::iterator it = herd->begin(); it != end; ++it) it->accept(*this); } //Loops t...
true
b6fcc1e24412be685e1270c4af57efa341b39dd0
C++
scottshotgg/AsyncClientCpp
/main.cpp
UTF-8
4,842
2.609375
3
[]
no_license
// asynchronous client event loop #include <iostream> #include <thread> #include <map> // fkin boosted m8 #include <boost/asio.hpp> #include <boost/uuid/uuid.hpp> // uuid class #include <boost/uuid/uuid_generators.hpp> // generators #include <boost/uuid/uuid_io.hpp> // streaming operators etc. #inc...
true
598c12264a8183848461a1b667de7f58fb87e158
C++
TheKillerAboy/programming-olympiad
/C++_Solutions/SAPO/School_Round_2017/Round_2/Problem_2_Polynacci_Solution_1.cpp
UTF-8
335
2.734375
3
[]
no_license
#include <iostream> #include <valarray> using namespace std; int main(int argc, char const *argv[]) { valarray<int> tri = {2,8,15,4,4,3,8,9,10,3}; int N = 36; int sum; for(int i = 0; i < N-tri.size();i++){ sum = tri.sum(); tri = tri.shift(1); tri[tri.size()-1]=sum; } cout<<tri[tri.size()-1];...
true
1511e74a2f43d6f0a96a70267617c3a35341aed7
C++
carlitomm/python_prog_course
/practica26/practica26.ino
UTF-8
871
2.640625
3
[]
no_license
const int potInt = A2; const int buttonInt = 2; boolean automatic = true; float x = 1.57; boolean going_up = false; float value; void setup() { Serial.begin(9600); } float scale(float meassure) { meassure = (meassure * 0.0048 * 16) + 40; return meassure; } void loop() { if (automatic == true) { if (x ...
true
2be86df943469bd90093eb582737040e4a010928
C++
liviabelirocha/mtn2-ck0048
/tarefa_14/src/VectorN.hpp
UTF-8
493
2.859375
3
[ "MIT" ]
permissive
#ifndef VECTOR_HPP #define VECTOR_HPP #include <iostream> #include <cmath> #include <vector> using namespace std; class VectorN { private: int size_; vector<double> vector_; public: VectorN(); VectorN(int size); void setElement(int i, double element); int getSize(); double getElement(int...
true
c0153a9ae0ce949e5d6e18a6024ba8cfff5fbc7d
C++
Effective12/VGTU-Procedural-Programming
/Lab_1/Lab_17.cpp
UTF-8
342
3.15625
3
[]
no_license
#include <iostream> using namespace std; int main () { double money = 1000000; int years = 0; double interest; while ( money >= 0) { interest = (money * 0.08) - 100000; money += interest; years += 1; if ( money <= 0 ) { break; } cout << "Money left in the account: " << money << " , years: " << y...
true
5c0ea9046ae6316df3c7485052d3f12d76192e61
C++
losvald/algo
/icpc/qual-purdue/f.cpp
UTF-8
1,145
2.953125
3
[]
no_license
#include <cstdio> #include <cstring> #include <algorithm> #include <map> #include <set> #include <utility> #include <vector> using namespace std; int n, m; vector<vector<int> > a; int dfs(int u, int s, vector<bool>& vis) { int ret = 0; for (vector<int>::iterator v = a[u].begin(); v != a[u].end(); ++v) { if...
true
aa5fed8afa4a8bc33d39cf4e45e01da650127c31
C++
pavel-zeman/CodeChef
/CodeChef/src/y2014/m03/cookoff/ABCStrings.cpp
UTF-8
1,150
3.15625
3
[]
no_license
// Go through the input string character after character, calculate the difference of B's - A's and C's - A's and find the same differences in a map // http://www.codechef.com/COOK44/problems/ABCSTR #include <stdio.h> #include <string.h> #include <limits.h> #include <math.h> #include <stdlib.h> #include <ctype.h> #incl...
true
2c031e7a010f23fb7e9fd8e9d8bebc02f661bf10
C++
ErolB/preach_sampling
/Probing.cpp
UTF-8
3,611
2.53125
3
[]
no_license
// // Created by erol on 5/9/16. // #include "Probing.h" /* This function does random probing. ** Does multiple random sampling and selects the edge set that makes the least runtime on average if weighted = true: weighted by their sizes, disappearance probability and invloved cut size ** The resulting edges shoul...
true
441be32beb9288bcd342038e799f2eda70b28013
C++
sckomoroh/InfoView
/plugins/MongoDBPlugin/BsonElement.cpp
UTF-8
4,651
2.671875
3
[]
no_license
#include "BsonElement.h" #include "BsonDocument.h" BsonElement::BsonElement() : m_sName(NULL) { m_value.m_binaryData = NULL; m_value.m_boolData = false; m_value.m_doubleData = 0; m_value.m_int32Data = 0; m_value.m_int64Data = 0; m_value.m_utfStrData = NULL; } BsonElement::~BsonElement(void) { d...
true
2b9606594d9372279d3b626cb8d8ae082ac5b283
C++
dhidas/CExamplesBasic
/AHelloWorld.cc
UTF-8
513
2.953125
3
[]
no_license
//////////////////////////////////////////////////////////////////// // // Dean Andrew Hidas <dhidas@bnl.gov> // // Created on: Wed Feb 8 17:09:47 EST 2017 // //////////////////////////////////////////////////////////////////// #include <iostream> // You MUST define the function 'main' int main (int argc, char* ar...
true
78be54f238ee6bbbcc700551e63736a71216b11b
C++
klaashofman/arduino-projects
/simple_buzzer_pin3/simple_buzzer_pin3.ino
UTF-8
1,057
3.34375
3
[]
no_license
/* Blink Turns on an buz on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an buz connected on most Arduino boards. // give it a name: int buz = 3; // the setup routine runs once when you press reset: void setup() { // initi...
true
300df83c3672c13a3c7878785b708de32b38a12f
C++
hardik20sharma/C_plus_plus
/STACK PUSH AND POP (ARRAY BASED).cpp
UTF-8
1,024
3.5
4
[]
no_license
#include<iostream> using namespace std; const int size =50; int push(int stack[size], int &top, int info) { if(top==size-1) { cout<<"Overflow Aborting !"; return -1; } else { top++; stack[top]=info; } return 0; } int pop(int stack[size], int &top) { if(top==-1) return -1; else top--; ...
true
333f382b268f978fd1291e33952596dbf404c236
C++
bertus11/C-2-periodo-SI
/Switch Case 2.cpp
UTF-8
1,455
3.640625
4
[]
no_license
// Autor: Gabriel Bertussi // Data: 30/08/2021 #include <stdio.h> #include <stdlib.h> main () { int opcao; float numero, numero2; printf("----------CALCULADORA----------\n"); printf("\n"); printf("----------Digite [1] para SOMAR: \n"); printf("----------Digite [2] para SUBTRAIR: \n"); printf("...
true
13cd0dfe30c9183bc6f2f470cd9ce8f8807b263a
C++
awardak/CMinusMinus
/SymbolTable/SymbolTable.cpp
UTF-8
3,600
3.390625
3
[]
no_license
/* * SymbolTable.cpp */ #include <iostream> #include "SymbolTable.h" using namespace std; int SymbolTable::counter = 0; /* Nothing special to do in constructor, yet. */ SymbolTable::SymbolTable() { } /* Destructor responsible for deleting all symbols added to ST and ST itself. */ SymbolTable::~SymbolTable() { /*...
true