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
544e139604c318a6e82957993bd8d63328642b53
C++
SiChiTong/Lib830
/components/DigitalLED.cpp
UTF-8
2,263
3.09375
3
[ "MIT" ]
permissive
#include <cmath> #include "frc/DigitalOutput.h" #include "frc/DriverStation.h" #include "frc/smartdashboard/SmartDashboard.h" #include "frc/Timer.h" #include "DigitalLED.h" using frc::DriverStation; using frc::DigitalOutput; using frc::SmartDashboard; namespace Lib830 { void DigitalLED::Enable() { red_channel->En...
true
838d8c83935eaf04e084a65b75ad479c9906db79
C++
kalsan1998/face_tracking_camera
/MotorController.cpp
UTF-8
1,826
3.1875
3
[]
no_license
#include "MotorController.h" #include <iostream> #include "Chip.h" MotorController::MotorController(Chip *chip, int channel) : MotorController(chip, channel, 90) {} MotorController::MotorController(Chip *chip, int channel, int init_angle) : chip(chip), channel(channel) { if (!chip) { t...
true
4d7181f84d56a2c569b36a0622024f980288fedf
C++
IHR57/Competitive-Programming
/LightOJ/1014 (Iftar Party)-2.cpp
UTF-8
1,020
2.796875
3
[]
no_license
#include <iostream> #include <algorithm> #include <cstdio> #include <math.h> using namespace std; typedef long long int lint; lint divisor[1000005]; int main() { lint P, L, Q; int test, cases = 1; scanf("%d", &test); while(test--){ scanf("%lld %lld", &P, &L); Q = (P - L); pr...
true
6344838de3615122e2eb092ddccd03d0a5d337c9
C++
tomerlo/HW4-mamat
/Cashier.H
UTF-8
499
2.53125
3
[]
no_license
#pragma once #ifndef _CASHIER_H_ #define _CASHIER_H_ #include <string.h> #include <stdlib.h> #include <stdio.h> #include <iostream> #include "Employee.H" #include "DubbedMovie.H" #include "Theater.H" class Cashier : public Employee { public: Cashier(char* workerName, int workerSalary, char* workHours[7]); int getTi...
true
b5fb620c636ac724bc3f3b954ff94d47cfcc984d
C++
hiro-dot-exe/patient-observer
/src/image_renderer.h
UTF-8
2,509
2.671875
3
[ "MIT" ]
permissive
#ifndef KINECT_PATIENTS_OBSERVER_IMAGE_RENDERER_H_ #define KINECT_PATIENTS_OBSERVER_IMAGE_RENDERER_H_ class Observer; /// <summary> /// Manages the drawing of image data. /// </summary> class ImageRenderer { public: explicit ImageRenderer(Observer *observer); virtual ~ImageRenderer(); /// <summar...
true
4fffbb5375d1554c46d9e2e91bf7dd3a025f659d
C++
KelsenH/WordLocator
/BST_Node.cpp
UTF-8
2,154
3.734375
4
[]
no_license
/** * Implementation of BST_Node methods */ #include "BST_Node.h" BST_Node::BST_Node (std::string word) : word_ (word), left_ (NULL), right_ (NULL), line_numbers_ () {} void BST_Node::append (int line_num) { //Find way to delete these List_Node * n = new List_Node (line_num); line_numbers_.insert (* n); ...
true
e901fe10157327952586ee6300e4cdf8b245de53
C++
kuniyoshi/chapter7
/c7/src/Iterator/Image.h
UTF-8
529
2.921875
3
[]
no_license
#ifndef BAKUDAN_ITERATOR_IMAGE #define BAKUDAN_ITERATOR_IMAGE #include "Point.h" #include "Iterator/Loop.h" class Size; namespace Iterator { class Image { private: Point from_; Point to_; int width_; Loop loop_x_; Loop loop_y_; public: Image(const Point& from, const Point& to, const Size& size); ~Image(); I...
true
cc3893ad08f3a54b2919f9e46de8edfce7fc2219
C++
walterqin/weighbridge
/core/logdatawidget.cpp
UTF-8
2,188
2.546875
3
[]
no_license
#include <QtGui> #include "logdatawidget.h" #include "profile.h" LogDataWidget::LogDataWidget(QWidget *parent) : QWidget(parent) { QIcon logWarmIcon(style()->standardPixmap(QStyle::SP_MessageBoxWarning)); QIcon logCritialIcon(style()->standardPixmap(QStyle::SP_MessageBoxCritical)); QIcon logInfoIcon(st...
true
427e9947a81e5629ed7a6abcbab7264eb2ba9390
C++
RoundRaccoon/MyAdventOfCode2020
/day7/secondStar.cpp
UTF-8
2,394
2.796875
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <map> #include <queue> #include <utility> using namespace std; map<string, int> indexOfColor; ifstream f(".in"); long long solve(int bags[601][601], int n, int start) { queue<pair<int, long long>> q; q.push(make_pair(start, 1)); long lon...
true
b627c6be69a0b13f07bc7172ee1e2acfdb006c3b
C++
elikos/elikos_detection
/src/elikos_detection/TargetDetection/RobotDesc.h
UTF-8
2,120
3.09375
3
[ "MIT" ]
permissive
#ifndef DETECT_ROBOTDESC_H #define DETECT_ROBOTDESC_H #define PI 3.1415926535 #include <opencv2/core/core.hpp> #include "string" using namespace std; enum ColorsIndex {WHITE, GREEN, RED}; class RobotDesc { public: //Constructors and destructor RobotDesc(); RobotDesc(int, int, int); ~RobotDesc(); ...
true
d373d65005079c796e3a9f3065f1fd71da3920ee
C++
ycliuxinwei/My-leetcode-practice
/array/plusOne.cpp
UTF-8
999
3.9375
4
[]
no_license
/* Copyright 2015 Edmund Liu Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. */ #include <vector> #include <iostream> using namespace std; // print the vector void printVector(const vector<...
true
735d17749dedb4b3f7a03095805b90a17d3a34ef
C++
Rani-Zz/skill-tutorials
/玩转算法面试/7-9-404-Sum of Left Leaves/main.cpp
GB18030
764
3.625
4
[]
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { private: int sumLeft(TreeNode* root,bool isleft) { if(root==NULL) return 0; if(isle...
true
159cb70a89682caf1bdac81edd9f58529debd0b2
C++
fabestine1/MyThing
/Fontys-Assignments-2019-2020-master/Embedded systems/TheVaultVN/FinalModel1.ino
UTF-8
1,008
3.296875
3
[]
no_license
// Including the Display #include "Display.h". // Declaring Red and Green lights const int LED1 = 4; const int LED2 = 5; const int LED3 = 6; //Declaring Buttonsint PIN_KEY1 = 9; int PIN_KEY2 = 8; //StartTheProgram int attempts = 0; //iterator to follow the numbers int i = 0; //counter which data we will use to as...
true
c3242b36ddce27913d7cbd7e91febf7461520627
C++
Petrychho/studies
/lesson1/lab2.cpp
UTF-8
467
3.484375
3
[]
no_license
#include <iostream> int main() { int mass[10] = {0,1,2,3,4,5,6,7,8,9}; int mod; int i = 0; int min = mass[0]; int max = mass[0]; int i_min = 0; int i_max = 0; std::cin >> mod; while(i < 10) { if(mass[i] % mod < min) { min = mass[i]; i_min = i; } if(mass[i] % mod > max) { max = mass[i]; ...
true
260dcd6713c302bd2964d6ba4d963dab6903f51d
C++
inthra-onsap/algorithms-archive
/string/finite_automata/finite_automata.cc
UTF-8
1,773
2.984375
3
[]
no_license
#include "finite_automata.h" namespace algorithms_archive { namespace string { std::vector<int> FiniteAutomata::ProcessLps(std::string str) { std::vector<int> lps(str.length(), 0); int border = 0; lps[0] = 0; for (int i = 1; i < str.length(); ++i) { while (border > 0 && str[i] != str[border]) borde...
true
43b8a5379878a2cfadd87094798b223ed50984c2
C++
michael-pruglo/advent-of-code-2019
/helpers/IntcodeComputerASCII.cpp
UTF-8
521
2.78125
3
[]
no_license
// // Created by Michael on 06/02/20. // #include "IntcodeComputerASCII.hpp" std::string IntcodeComputerASCII::grabOutput() { auto outp = IntcodeComputer::grabOutput(); std::string res; res.reserve(outp.size()); for (char c: outp) res.push_back(c); return res; } IntcodeComputer::Mem_t Int...
true
a7d53d68141706187e66750459e89fa7c90bfe1b
C++
AavaGames/SDL_Dominos
/SDL_Dominos/SDL_Dominos/Managers/AssetManager.cpp
UTF-8
4,106
2.796875
3
[ "Unlicense" ]
permissive
// // AssetManager.cpp // SDL_Tutorial // // Created by Philip Fertsman on 2020-01-15. // Copyright © 2020 Philip Fertsman. All rights reserved. // #include "AssetManager.h" namespace SDLFramework { AssetManager * AssetManager::sInstance = nullptr; AssetManager * AssetManager::Instance() { if (sInstance == nul...
true
acb0e98d02301c9d19fe038e635c88f35d6f9a7d
C++
lab132/toolbox
/ezEngine-rev858/Code/Engine/Foundation/Containers/Implementation/ArrayIterator.h
UTF-8
3,552
3.3125
3
[]
no_license
#pragma once #include <algorithm> /// \brief Base class for STL like random access iterators template<class ARRAY, class T, bool reverse = false> struct const_iterator_base { public: typedef std::random_access_iterator_tag iterator_category; typedef T value_type; typedef ptrdiff_t difference_type; typedef co...
true
5ffc8bf522064f34dc769d00d2b8204756a68fbe
C++
dtarqui/Ejemplos_CPP
/p3/Ejercicio 2.cpp
ISO-8859-1
1,079
3.734375
4
[]
no_license
/* 2.- Escribir un programa que lea el salario de un empleado y mediante una funcin efectu un incremento salarial en base a la siguiente escala: Si el salario es menor < 1000 Bs. incremente en un 20% Si el salario es mayor o igual a 1000 pero es menor a 3000 Bs. Incremente en un 15% Si el salario es mayor o igual ...
true
9cea50503bb2d9f11a8410d07ed5d74086523562
C++
MattPChoy/AutomatedMinesweeper
/minesweeper/magnetometer.ino
UTF-8
1,558
2.875
3
[]
no_license
void displaySensorDetails(void){ sensor_t sensor; mag.getSensor(&sensor); Serial.println("------------------------------------"); Serial.print ("Sensor: "); Serial.println(sensor.name); Serial.print ("Driver Ver: "); Serial.println(sensor.version); Serial.print ("Unique ID: "); Serial.println(...
true
9359b4dc1ea5263d012ba0450c64e456d82dfa27
C++
salsabiilashifa11/engimon-factory
/WildEngimon.hpp
UTF-8
806
2.515625
3
[]
no_license
#ifndef _WILD_ENGIMON_HPP_ #define _WILD_ENGIMON_HPP_ #include <string> #include <iostream> #include <map> #include "Engimon.hpp" #include "Skill.hpp" #include "Map.hpp" using namespace std; class WildEngimon : public Engimon { private: string status; Position position; int element2int(string element);...
true
61d2f3feae09b5eae69b50b9aedf895b1958e6ec
C++
MattiasEyh/ListeChainee
/test_liste_generique.cpp
UTF-8
9,989
3.296875
3
[]
no_license
#include <string> #include <iostream> #include "liste.h" #include "liste.cc" int main() { cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" "| Création de plusieurs listes avec différents types : |\n" "- - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" << endl; ...
true
af4d1cf04fae86d2cb46a07449aea64bb3e21d34
C++
thrasher/BrightRoll_Arcade
/BrightRoll_Arcade.ino
UTF-8
3,555
2.765625
3
[]
no_license
/* This program is for an Arduino Leonardo, and allows for the control of a joystick and arcade buttons at BrightRoll's Palo Alto front door. Key presses are are held, without repeating, until a release signal is sent (just as a real keyboard would do, when you hold a key down). Keys are as follows: up: w (pin...
true
147ba3c5433977b8e7bb9e539bdbb33810963b46
C++
PolyglotFormalCoder/Cpp_Practice
/Class_Template1.cpp
UTF-8
474
3.71875
4
[]
no_license
#include <iostream> template<typename T> class Line { private: T point; public: Line(T x) :point(x){} ~Line() {} T Scale() { return (point * point); } }; int main() { Line<int> line_int(2); std::cout << "Integer scaled:" << line_int.Scale() << std::endl; Line<float> line_float(2.3); std::cout << "Float scale...
true
580d8d0a136b40a5f8ee0761c727da50f67ebb5a
C++
pusupalahemanthkumar/competitive-programming
/WindowSlidingTechnique/04_Anagrams.cpp
UTF-8
1,053
3.296875
3
[]
no_license
/*LeetCode - Find All Anagrams in a String */ /* link : https://leetcode.com/problems/find-all-anagrams-in-a-string/ */ #include<bits/stdc++.h> #include<cstring> using namespace std; //Utility Functions bool compare(int a[],int b[]){ for(int i=0;i<26;i++){ if(a[i]!=b[i]){ return false; } } return true;...
true
6d94099397520ea5dd67f861426f919aca31ae97
C++
giter/codeforces-ans
/src/6/6C.cpp
UTF-8
361
2.734375
3
[]
no_license
#include <iostream> using namespace std; int n; int c[100001]; int na,nb; int a,b; int ca,cb; int main(){ ca = cb = a = b = na = nb = 0; cin>>n; nb = n-1; for(int i=0;i<n;i++) cin>>c[i]; while(na<=nb){ if(ca==cb || ca < cb){ ca += c[na]; a++; na++; }else{ cb += c[nb]; b++; nb--; } ...
true
557ee8e6df5e458d43707a2a262cd206d4b05042
C++
mugisaku/expree
/expree_parser__make_element.cpp
UTF-8
7,830
2.96875
3
[]
no_license
#include"expree_parser.hpp" #include"expree_exception.hpp" #include<cctype> #include<cstring> #include<vector> namespace expree{ namespace{ struct OperatorFile { int precedence; ElementKind kind; Operator data; OperatorFile(ElementKind k, const Operator& o): kind(k), data(o) { if(k =...
true
4bff60fc4dcdb491f8731d98a07416bbf7fb1ee4
C++
conmoto/Algorithms
/Programmers/level1/모의고사.cpp
UTF-8
678
2.875
3
[]
no_license
#include <vector> #include <algorithm> using namespace std; vector<int> solution(vector<int> answers) { vector<int> a = {1,2,3,4,5}; vector<int> b = {2,1,2,3,2,4,2,5}; vector<int> c = {3,3,1,1,2,2,4,4,5,5}; vector<int> cnt(3, 0); for(int i = 0; i < answers.size(); i++) { //1 ...
true
cc72c8e960197c76583b0aab0e37863b810bd491
C++
getorres99/TC1017-Fall-IMT-GTO
/WSQ10.cpp
UTF-8
490
3.59375
4
[]
no_license
#include <iostream> #include <cmath> using namespace std; double sqrtt(double); int main(){ int num; std::cout << "Enter a number to calculate it´s square root " << '\n'; std::cin >> num; double result = sqrtt(num); //std::cout << result << '\n'; std::cout << "The square root of your number is " << result << '\n...
true
0c0f70cd1f7f760f989646b9fde3ec3d5abc566a
C++
santilin/gonglib
/mod/gonglib/gongdbfieldstyle.cpp
UTF-8
1,252
2.625
3
[]
no_license
#include "gongdbfieldstyle.h" namespace gong { dbFieldStyle::Alignment dbFieldStyle::fromString( const Xtring &str) { const char *origvalue = str.c_str(); if( origvalue && *origvalue ) { if( strncasecmp(origvalue, "alignment", 9) == 0 ) origvalue+=9; else if( strncasecmp(origvalue,...
true
ce4c1dc8feb8ece87e66a5994ef6c9b7affb0ed4
C++
DoMoCo/DreamSpace
/会变形的方块/Block.cpp
GB18030
1,653
3.203125
3
[]
no_license
//һռַλλøı1λøı2 #include"Block.h" #include"Frame.h" #include"Func.h" #include<iostream> using std::cout; using std::endl; Block::Block() { _pos.x = BLOCK_WIDTH; _pos.y = BLOCK_LENGTH; _true_pos.x = _pos.x*2 + WINDOW_WIDTH; _true_pos.y = _pos.y + WINDOW_LENGTH; } void Block::Drew_override_Block(Frame &frame,int ix,...
true
ebf51a7ef0e3564e05d41b725283d99e789620f7
C++
jungsu-kwon/ps-records
/leetcode/k-th-symbol-in-grammar/Accepted/6-16-2021, 2:35:23 PM/Solution.cpp
UTF-8
634
3.28125
3
[]
no_license
// https://leetcode.com/problems/k-th-symbol-in-grammar #include <cmath> using namespace std; class Solution { private: int power(int x, int p) { if (p == 0) return 1; if (p == 1) return x; int tmp = power(x, p/2); if (p%2 == 0) return tmp * tmp; else return x ...
true
bf67522f7242527eabd28d14087fdbe5738dc8e5
C++
stekliPes/zmqExperiment
/Server/zmqserverapp.cpp
UTF-8
3,421
2.6875
3
[]
no_license
#include "zmqserverapp.h" #include <iostream> ZmqServerApp::ZmqServerApp(int argc, char *argv[]): QCoreApplication(argc,argv), m_zmqContext(), m_repSocket(m_zmqContext,zmq::socket_type::rep), m_pubSocket(m_zmqContext,zmq::socket_type::pub), m_subSocket(m_zmqContext,zmq::socket_type::sub), m_re...
true
acafb05a81d4ebfd35ce62df63966fc5dd8ef97a
C++
justinba1010/AlgoExpert-Practice
/bst/branch-sums.cpp
UTF-8
848
3.046875
3
[ "MIT" ]
permissive
/* Copyright 2021 ** Justin Baum ** MIT License ** AlgoExpert Solutions */ using namespace std; // This is the class of the input root. Do not edit it. class BinaryTree { public: int value; BinaryTree *left; BinaryTree *right; BinaryTree(int value) { this->value = value; left = nullptr; right = n...
true
a8e7cbf4551da3c2e457a2720ab92e2c9c9b3843
C++
daigangfan/numerical_method
/numerical_method/nrutil.h
GB18030
9,380
2.828125
3
[]
no_license
#pragma once #include <string> #include <cmath> #include <complex> #include <iostream> using namespace std; typedef double DP; template <class T> inline const T SQR(const T& a) { return a * a; } template <class T> inline const T MAX(const T& a, const T& b) { return b > a ? (b) : (a); } inline float MAX(const double& a,...
true
e56538cb178c0b1dad455a20898cf00869e24e0f
C++
yaishori/c-cpp
/c++/memory man/memPage_t.h
UTF-8
992
2.75
3
[]
no_license
#include "memManager_t.h" #ifndef H_PAGE #define H_PAGE class memPage_t: virtual public memManager_t{ public: virtual ~memPage_t(); memPage_t(); memPage_t(const unsigned int pos, const unsigned int actual,const char* page); virtual unsigned int getCapacity()const{ return m_capacity; } const char* getString() ...
true
9245e40b90e52705a83da2eac34c90b295f0efb7
C++
MatthewRock/Taverner
/include/Timer.hpp
UTF-8
4,457
3.515625
4
[]
no_license
#ifndef TIMER_HPP #define TIMER_HPP #include <chrono> /** \brief This header implements the class Timer. Timer allows the creation of clock, with various precisions available, is available for C++11 standard, generic. */ namespace Taverner { typedef std::chrono::high_resolution_clock ...
true
f87fd0eef9725253b874b945ee859517b6078d23
C++
Techno-coder/UndertaleCPPLibrary
/revision_2/src/src/headers/fights/states/FightAttackEnemySelectState.h
UTF-8
974
2.5625
3
[]
no_license
#ifndef PROJECT_FIGHTATTACKENEMYSELECTSTATE_H #define PROJECT_FIGHTATTACKENEMYSELECTSTATE_H #include "../../core/State.h" #include "../FightInterfaceControls.h" #include "../Fight.h" #include "../../render/Sprite.h" namespace ug { class FightAttackEnemySelectState : public State { static FightAttackEnemyS...
true
e7d03710d9a9443b0464db35f0eeca687aa3c554
C++
aosipov91/zaton
/src/core/Timer.cpp
UTF-8
433
2.546875
3
[]
no_license
#include "Timer.h" Timer::Timer() {} Timer::~Timer() {} void Timer::Start() { } void Timer::Pause() { } void Timer::Stop() { } void Timer::Begin() { } void Timer::BeginWithDelay(float delay) { } void Timer::SetTime(float f) { } float Timer::GetTime() { return float(1...
true
f23533defb76e572685a2438948cf25c3b6ffd65
C++
MichalTurski/TKOM_PASER
/LibraryInterface/Symbols.h
UTF-8
849
2.578125
3
[]
no_license
// // Created by michal on 29.11.18. // #ifndef PROJEKT_SYMBOLS_H #define PROJEKT_SYMBOLS_H #include <string> #include <map> #include <bits/unique_ptr.h> #include "Object.h" #include "ClassFactory.h" class Function; class FunctionDefinition; class ClassFactory; class Symbols { private: std::map<std::string, Fun...
true
b4e1eb69feaed0ead54c80d78b6d4def498f040a
C++
locolocoer/mycode
/Game-Programming-Using-Qt-5-Beginners-Guide-Second-Edition-master/Chapter03/Qt GUI Programming/tictactoe/tictactoe ver6/configurationdialog.cpp
UTF-8
1,203
2.546875
3
[ "MIT" ]
permissive
#include "configurationdialog.h" #include "ui_configurationdialog.h" #include <QPushButton> ConfigurationDialog::ConfigurationDialog(QWidget *parent) : QDialog(parent), ui(new Ui::ConfigurationDialog) { ui->setupUi(this); connect(ui->player1Name, &QLineEdit::textChanged, this, &Configurati...
true
540beb4eaa3a849cbbd94bdb5c8fe1163d6d6170
C++
daniel1124/cpp_course_project
/student_file_system/print_data.cpp
UTF-8
715
3.625
4
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; template<class T,class Pred> void my_for_each(T iter1, T iter2, Pred fun){ for(;iter1 != iter2; iter1++){ fun(*iter1); } } void Print(int n) { cout << n*n << ","; } struct MyPrint { void operator()( const string & s )...
true
f7da38809de8d97f29edb3341472f0857057a4b0
C++
HersonaREAL/my_cpp_primer_code
/chapter15/1529.cpp
UTF-8
569
2.59375
3
[]
no_license
#include<iostream> #include"1511.h" #include <fstream> #include<vector> #include <algorithm> #include<memory> #include<cctype> #include<stdexcept> using std::cin; using std::cout; using std::ifstream; using std::ofstream; using std::endl; using std::string; using std::vector; using std::shared_ptr; int main(){ vector<...
true
8c4acd0e07f905f77eadc043e7ae970a84127f17
C++
adiatomei/c_plus_exercises
/algoritmi_fund/main.cpp
UTF-8
6,327
3.4375
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; //Divizibilitatea void diviz(int a, int b){ if(a % b == 0 || b % a == 0) { cout << "Da\n"; }else{ cout << "Nu\n"; } } //Paritate string parit(int a){ if(a % 2 == 0){ return "par"; }else{ return "impar"; ...
true
dae79dadcf7bf9d8ba0f14bc213d36de2b867894
C++
notorious94/UVa-solution
/1185 UVA.cpp
UTF-8
665
2.515625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; /// M A C R O Starts Here #define pf printf #define sf scanf #define MAX 500000 #define sif(a) scanf("%d",&a) #define pif(a) printf("%d\n",a) #define pi acos(-1.0) typedef long long ll; typedef unsigned long long ull; int factorialDigit ( int n ) { if(n==0||n==1) ...
true
0a3dfe13ef692c2337d0f2eb5578391dc204bc04
C++
SmartPolarBear/project-dionysus
/kern/libs/basic_io/ftoa.cc
UTF-8
2,165
2.75
3
[ "MIT" ]
permissive
#include "system/types.h" constexpr auto MAX_PRECISION = 10; static const double rounders[MAX_PRECISION + 1] = { 0.5, // 0 0.05, // 1 0.005, // 2 0.0005, // 3 0.00005, // 4 0.000005, // 5 0.0000005, // 6 0.000...
true
c3876159bc27f41005ca0ffc826f7a1e498621f0
C++
davidataka/AlgorithmsAndDataStructures
/lab2/l2b_competition.cpp
UTF-8
1,954
3.109375
3
[]
no_license
#include <iostream> using namespace std; void merge(string data[][2], int left, int middle, int right) { int size1 = middle - left + 1; int size2 = right - middle; string left_part[size1][2]; string right_part[size2][2]; for (int i = 0; i < size1; i++) for (int j = 0; j < 2; j++) ...
true
327a87bb93e170f71664643cd4b04ef4e3d176ed
C++
JanMalitschek/Mineral
/Source/Nodes/Node.cpp
UTF-8
1,680
2.71875
3
[]
no_license
#include "Node.h" #include "NodeEditor.h" #include "Graphs/NodeGraphProcessor.h" Node::Node(int numInputs) { this->numInputs = numInputs; for (int i = 0; i < numInputs; i++) inputs.push_back(nullptr); } Node::~Node() { disconnectAll(); for (int i = 0; i < numInputs; i++) delete inputs[i]; inputs.clear(); del...
true
3ed216f6b62e73e27fa0e5732b748b51a2dfbab4
C++
anonymokata/ae85d9b8-4c15-11ea-90ff-52e448637004
/Pencil.h
UTF-8
756
2.734375
3
[]
no_license
#ifndef PENCILDURABILITYKATA_PENCIL_H #define PENCILDURABILITYKATA_PENCIL_H #include <memory> #include <string> class Eraser; class Paper; class PencilPoint; class Pencil { public: explicit Pencil( std::unique_ptr<PencilPoint> point = std::make_unique<PencilPoint>(), std::unique_ptr<Erase...
true
d17dfd91339ec6c5f70dae7c68b1f9a97d26222a
C++
237K/ProblemSolving
/BOJ#1026.cpp
WINDOWS-1252
600
2.796875
3
[]
no_license
// // OS Windows // 2019.08.25 // // [Algorithm Problem Solving] // // BAEKJOON #1026 // #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(int argc, char** argv) { freopen("s_input1026.txt", "r", stdin); ios::sync_with_stdio(false); cin.tie(NULL); int N, n, ret; vector<int>...
true
63880222a3332ef73e23549ea372c12de5525968
C++
packetsss/Cpp
/Leetcode/Easy/1603_Design_Parking_System.cpp
UTF-8
759
3.453125
3
[]
no_license
#include <iostream> #include <vector> #include <set> #include <unordered_set> #include <map> #include <unordered_map> using namespace std; class ParkingSystem { public: int arr[3]; ParkingSystem(int big, int medium, int small) { arr[0] = big; arr[1] = medium; arr[2] = small; } ...
true
c08322b22ee6a9c749d1d2970cf826cdb22061dd
C++
hieupm123/Hieu
/code/C++/CSES-Solutions/Introductory Problems/Number Spiral (1071)/rainboy.cpp
UTF-8
413
2.90625
3
[]
no_license
/* https://cses.fi/problemset/task/1071 Number Spiral */ #include <stdio.h> int main() { int t; scanf("%d", &t); while (t--) { int x, y, tmp; long long a; scanf("%d%d", &x, &y); a = x > y ? x : y; if (a % 2 == 1) tmp = x, x = y, y = tmp; ...
true
1cf14c60d33c7f48bfac1fd418d3e93d4731d5be
C++
balhayer/epp-preparation-practice
/PART1/deleteSmallestPositive/Prob1.cpp
UTF-8
910
3.828125
4
[]
no_license
#include <iostream> using namespace std; void deleteSmallestPos(int arr[], int size) { int minPos = -1; for(int i = 0; i < size; ++i) { if(arr[i] > 0) { if(minPos == -1 || arr[i] < arr[minPos]) { minPos = i; } } } for(int i = minPos; i < size-1; ++i) { arr[i...
true
95b9e2590da26588434368ffbe20acd4c97c418f
C++
makersmelx/VE281
/LAB/LAB3/src/selection.cpp
UTF-8
2,447
3.34375
3
[]
no_license
// // Created by 吴佳遥 on 2019-10-10. // #include "sort.h" int rSelect(int *nums, int left, int right, int k) { if (left == right) { return nums[left]; } int index = rand() % (right - left + 1) + left; swap(index, left, nums); int pivot = nums[left]; int i = left + 1, j = i; for ...
true
d7503928a82377bdd5a18b7eabdb9c817c319c42
C++
arpitjp/temp
/Postfix to Infix.cpp
UTF-8
548
3.546875
4
[]
no_license
//postfix to infix #include<bits/stdc++.h> using namespace std; string PostfixToInfix(string exp) { string s1, s2; stack<string> s; for (int i = 0; i < exp.length(); i++) { if(isalpha(exp[i])) s.push(exp.substr(i, 1)); else { s2 = s.top(); s.p...
true
9e38ac18f78e9490e44f35e8e8e8b76f5bf80440
C++
fallnomega/CPP_Labs
/CompSci165/Lab12/History.cpp
UTF-8
5,338
3.625
4
[]
no_license
// Lab 12: History.cpp // Programmer: Jason Hillin // Editor(s) used: MS Visual C++ 2010 Express // Compiler(s) used: MS Visual C++ 2010 Express #include <iostream> using std::cout; using std::cin; using std::endl; #include <iomanip> using std::setw; #include <fstream> using std::ifstream; using std::...
true
2a8fedbe31655beadbe4e02a4e7a9b2dbcf98d97
C++
deba19/Coding-Challenge
/sostronk_DebasisJana.cpp
UTF-8
4,911
2.96875
3
[]
no_license
/* So Stronk Assignment This program is made by Debasis Jana, Lovely Professional University University Reg No: 11701186 Email ID: debasisjana93@gmail.com Mobile Number: 9609624692 / 8918470674 */ #include<bits/stdc++.h> #define fastio ios_base::sync_with_stdio(false); cin.tie(NULL) using ...
true
a8868428077a2c4309a55884a0d9cfb4295dc103
C++
zhuangqh/Cpp-course
/project/stage1/Vector.h
UTF-8
467
2.671875
3
[]
no_license
#ifndef VECTOR_H #define VECTOR_H class Vector { private: int _dim; int *_vector; void create(int); public: Vector(); Vector(const Vector &); ~Vector(); explicit Vector(int dim); void set(const int *, int dim); void set_one(int index, int value); int dimension() const; int length() const; void p...
true
0f14cd0fae62cba8a8dad10a2963a0e925b2e249
C++
ZeroOne101010/EdgeOfTheUniverse
/EdgeOfTheUniverse/BackGroundLayer.cpp
UTF-8
450
2.578125
3
[]
no_license
#include "World.h" #include "BackGroundLayer.h" BackGroundLayer::BackGroundLayer(World* world, glm::vec2 speed, glm::vec2 size) { this->speed = speed; layer.Size = size; this->world = world; layer.Angle = 0; } Alterable BackGroundLayer::draw(Renderer* renderer, Alterable alters) { layer.textureRect = FloatRect(wo...
true
7c634415ffba18a3945824670ce0ca8f1c5e462a
C++
kmiloarguello/cplusplus
/Pto2_agosto.cpp
UTF-8
652
3.28125
3
[]
no_license
#include<stdio.h> #include<conio.h> #include<string.h> #include<ctype.h> main() { char a[30]; int i,mayus=0,minus=0,numero=0,caracter=0,espacio=0;; printf("Escriba el Texto (max 30 caracteres)\n"); gets(a); for(i=0;a[i]!='\0';i++) { if(isspace(a[i])){ espacio++; } if( isupper(a[i])){ mayus++; } ...
true
8426755f46bbe5954a5121e209d78f14e73badc2
C++
Graff46/OGSR-Engine
/ogsr_engine/xrGame/purchase_list_inline.h
UTF-8
918
2.59375
3
[ "Apache-2.0" ]
permissive
//////////////////////////////////////////////////////////////////////////// // Module : purchase_list_inline.h // Created : 12.01.2006 // Modified : 12.01.2006 // Author : Dmitriy Iassenev // Description : purchase list class inline functions //////////////////////////////////////////////////////////////////////...
true
41f79b283a28d029aab1c3ac6b09528d16b33e5e
C++
dniklaus/wiring-skeleton
/lib/adapter/MyBuiltinLedIndicatorAdapter.cpp
UTF-8
684
2.8125
3
[ "MIT" ]
permissive
/* * MyBuiltinLedIndicatorAdapter.cpp * * Created on: 04.11.2019 * Author: nid */ #include "MyBuiltinLedIndicatorAdapter.h" #include <Arduino.h> MyBuiltinLedIndicatorAdapter::MyBuiltinLedIndicatorAdapter() { // initialize built in LED pin as output pinMode(LED_BUILTIN, OUTPUT); // switch LED off ...
true
86351432d0475442d8f5557bdb87aad58375aaae
C++
wolfdan666/WolfEat3moreMeatEveryday
/LeetCode/53_最大子序和.cpp
UTF-8
2,324
2.96875
3
[]
no_license
/* 2020年5月3日20:35:58 感觉线段树能够秒了这题,这题应该是用了线段树的基本思路 但是自己有点不太记得了...所以先想想吧 想到了前缀和,然后相减得到区间和 尴尬,这个标签是简单啊,2020年5月3日20:45:24 为啥想这么久 题感消退了很多...看tutorial吧,羞耻 作者:LeetCode-Solution 链接:https://leetcode-cn.com/problems/maximum-subarray/solution/zui-da-zi-xu-he-by-leetcode-solution/ 来源:力扣(LeetCode) 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出...
true
88770fc13ecccda677111942d17ec70ab5c074be
C++
mizimmerman/PracticeProblems
/classes.cpp
UTF-8
781
2.734375
3
[]
no_license
#include <iostream> using namespace std; #include "classes.h" /* Constructors */ FootballPlayer::FootballPlayer() { name = "none"; height = 0; weight = 0; position = "none"; } FootballPlayer::FootballPlayer(string n, int h, int w, string pos) { set_name(n); set_height(h); set_weight(w); set_position(pos); } ...
true
04a476a9c12bcd473cc864a9f3a3d772a5ce2fec
C++
RohiniRG/Daily-Coding
/Day79(Sort_stack).cpp
UTF-8
724
3.921875
4
[]
no_license
/* Given a stack, the task is to sort it such that the top of the stack has the greatest element. Example: Input: Stack: 3 2 1 Output: 3 2 1 */ // ********************************************************************************************************** # include <bits/stdc++.h> using namespace std; void sortedIn...
true
72036b31123ffe445286b568e01c369ff733a1dc
C++
Showtim3/Programming
/CodingBlocks/sumOfArray.cpp
UTF-8
1,105
2.84375
3
[]
no_license
#include <iostream> #include <set> #include <map> #include <vector> #include <algorithm> #include <cmath> #define li long int #define ll long long #define lli long long int using namespace std; vector<int> returnSumArray(vector<int> a, vector<int> b,int n, int m){ int i=0, sum; vector<int> ans; int carry=0; w...
true
43b3506e0dc3feafbe7ca465678922062a711557
C++
PrecedentBrute/mlsa-recruitment-tasks
/Task1.cpp
UTF-8
264
3.0625
3
[]
no_license
#include<iostream> int main() { int x, y, z; std::cout << "Enter x, y and z : " << std::endl; std::cin >> x >> y >> z; int ahead = y % x; int to_travel = x - ahead; if (z >= to_travel) std::cout << "YES" << std::endl; else std::cout << "NO" << std::endl; }
true
b8302d29a66a2d6d882d75a7849bbe5011e469a7
C++
efraindrummer/matrices_C-language
/3diagonal.cpp
WINDOWS-1258
976
2.96875
3
[]
no_license
/*Efrain May Mayo 170869 Universidad Autonoma del Camen Ingenieria en computacion*/ #include<stdio.h> #define maxcol 30 #define maxfil 20 void llenardia(int a[][maxcol],int nfilas, int ncols); void escribirsalida(int a[][maxcol],int nfilas, int ncols); main(){ int nfilas, ncols; int a[maxfil][maxcol]; printf("Cu...
true
0ec07ee75a79fe0425a107f512ddecb60e7c86d7
C++
khainacs/Task_in_class
/quadratic_equation.cpp
UTF-8
965
2.875
3
[]
no_license
#include<stdio.h> int main(void) { float a, b, c, delta, x1, x2; printf("nhap 3 so a, b, c:\n"); scanf("%f%f%f", &a, &b, &c); delta = b*b - 4*a*c; if (a == 0) { if ((b == 0) && ( c == 0)) { printf("phuong vo so nghiem\n"); } else if ((b != 0) && (c == 0)...
true
da2b8dd9b0ff4489170032a741946c1c8ba172aa
C++
Mukund-Raj/C-plus-plus-Programs
/gemstones_hackerrank.cpp
UTF-8
851
2.625
3
[]
no_license
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; main() { int flag=0; int gemstones=0; vector<string>st(0); st.push_back("hrbbwaacqlobwmrdzb"); st.push_back("baccd"); st.push_back("eeabg"); //st.push_back("oafhdlasd"); for(int i=0;i<st.size();i++) { sort(st[i].be...
true
cfcf1a610e26ff91f999167b7f1d16692bb23258
C++
dhirsbrunner/phosg
/KDTree.hh
UTF-8
3,029
2.90625
3
[ "MIT" ]
permissive
#pragma once #include <stdint.h> #include <deque> #include <memory> #include <vector> #include <sys/types.h> template <typename CoordType, size_t dimensions, typename ValueType> class KDTree { public: struct Point { CoordType coords[dimensions]; Point() = default; bool operator==(const Point& other)...
true
b1b27f54f888d7621c96e6305efcd36f9b8c66b0
C++
ImRohan7/MovementAlgorithms
/AIMovementAlgorithms/AIMovementAlgorithms/KinemSeek.cpp
UTF-8
1,822
2.828125
3
[]
no_license
#include "KinemSeek.h" #include <random> #define MaxRotation 5.0f // max rotation velocity // for no arrival physics::SteeringOutput AI::KinemSeek::getSteering() { physics::SteeringOutput steering; ofVec2f dir = (mTarget.mPosition - mCharacter.mPosition).normalize(); // get vel dir steering.mLinear = d...
true
772ee823be74f5ed3b0f7a856dd1bf7a5e7b644b
C++
MdAkdas/My_Codes
/Coding Blocks Course/Array/next_permutation.cpp
UTF-8
438
2.734375
3
[]
no_license
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { int t; cin>>t; string s; while(t--) { s.clear(); int n; cin>>n; int a[n]; for(int i=0;i<n;i++) { cin>>a[i]; s+=(a[i]+'0'); } //cout<<s<<endl; next_permutation(s.begin(), s...
true
0e2c81e48998cfb69dd69cfb5dd529764b855c6e
C++
Loptt/cplus-programs
/Programs/Alg/ronda2.cpp
UTF-8
921
3.28125
3
[]
no_license
#include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; int height(TreeNode *r) { if (r == nullptr) return 0; int leftHeight = height(r->left); int rightHe...
true
c7411a26875da6f7396f51fd6c6c21617e5b97dd
C++
elvircrn/ccppcodes
/matrix_multiplication.cpp
UTF-8
757
2.65625
3
[]
no_license
/* 3 1 3 3 5 5 4 35 */ #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; const int inf = 1<<28; int dp [1000] [1000], a [1000], b [1000], n; int main () { scanf ("%d", &n); for (int i = 0; i < 999; i++) for (int j = 0; j < 999; j++) if (i == j) continue; ...
true
1e264b9c2069f619a79e876010d5652fc4afceff
C++
EnricoCorsaro/DIAMONDS
/demos/demoFive2DGaussians.cpp
UTF-8
6,564
2.671875
3
[ "MIT" ]
permissive
// // Compile with: // clang++ -o demoFive2DGaussians demoFive2DGaussians.cpp -L../build/ -I ../include/ -l diamonds -stdlib=libc++ -std=c++11 -Wno-deprecated-register // #include <cstdlib> #include <iostream> #include <iomanip> #include <fstream> #include "Functions.h" #include "File.h" #include "MultiEllipsoidSamp...
true
2e61b6f7e14b79ed876af0296f1a2e6f71f3eee3
C++
sicwea001/shiqw_source
/Beverage/mocha.h
UTF-8
701
3.265625
3
[]
no_license
#ifndef MOCHA_H #define MOCHA_H #include "condiment_decorator.h" class Mocha : public CondimentDecorator { public: Mocha(Beverage* beve) { beverage = beve; // 想办法让被装饰者被记录到实例变量中。这里做法是:把饮料当作构造器的参数, // 再由构造器将此饮料记录在实例变量中。 } QString getDescription() { return ...
true
4fe33e257ac346fb0d9343b6f79f0140fd8104fc
C++
douglasralmeida/pp-proj
/src/test-array.cc
UTF-8
944
3.546875
4
[]
no_license
/* ** Projeto de Algoritmos Paralelos ** Namespace Array - TESTE */ #include <iostream> #include "array.hpp" #define ARRAY_SIZE 10 using namespace std; int main() { double* source; double* dest; cout << "Teste de alocacao de vetores" << endl; cout << "============================" << endl << endl; ...
true
a36eb6ad042167c8ca8c50caec90a63a135c4c05
C++
Rudthaky/lessons
/lesson73.cpp
UTF-8
1,278
3.828125
4
[]
no_license
#include <iostream> #include <string> using namespace std; /* * Что такое класс * Что такое объект класса */ class Human //class - пользовательский тип данных { public: //модификатор доступа int age; //поле класса int weight; string name; }; cla...
true
2d1694801fcb6560bd8c9af62acdc2b92c16fc69
C++
ibradam/voronoi
/include/voronoi/voronoi_cell.hpp
UTF-8
1,068
2.53125
3
[]
no_license
/********************************************************************** * PACKAGE : voronoi * COPYRIGHT: (C) 2015, Ibrahim Adamou, Bernard Mourrain, Inria **********************************************************************/ #pragma once #include <geometrix/regularity.hpp> #include <geometrix/tmsh_cell.hpp> //=...
true
3be620433dfa3b4e6c490e4ef72d656d21a03c8b
C++
lxwgcool/EigenDel
/ShareLibrary/clsvcf1000genome.cpp
UTF-8
8,253
2.578125
3
[]
no_license
#include "clsvcf1000genome.h" #include <fstream> #include <iostream> #include <unistd.h> ClsVcf1000Genome::ClsVcf1000Genome() { } int ClsVcf1000Genome::ParseVcf(string strVcfFile, string strSampleName) { if(::access(strVcfFile.c_str(), 0) != 0) { cout << "Error: VCF File does not existed!" << endl; ...
true
c0a7c448a051195e5cb1bb65b8ab7a815638cda0
C++
kailasspawar/DS-ALGO-PROGRAMS
/Trees/ConvertBinTreeintoDoublyLList.cpp
UTF-8
1,636
3.375
3
[]
no_license
#include<iostream> #include"bint.h" #include<deque> #include<stack> using namespace std; void push(bnode &head,bnode node) { node->right = head; node->left = NULL; if(head) head->left = node; head = node; } void printList(bnode head) { while(head) { cout<<head->data<<" "; head = head->right; } } void spi...
true
2fddac08fc9e8123111374a0202804cefc62d7c7
C++
aLagoG/kygerand
/microsoft2017/first.cpp
UTF-8
1,704
3.4375
3
[ "MIT" ]
permissive
#include <iostream> #include <vector> #include <string> using namespace std; //Longest Palindromic Subsequence O(n^2) int countOnes(int value){ int count=0; while(value){ value&=(value-1); count++; } return count; } int main(){ int n; scanf("%d",&n); // char seq[] = "alaaabaaabbbbaaaa"; // i...
true
14dc0f1a8e30a16b5155b1a3899fdb4abb41ef1f
C++
imnu-ciec-20171106168/Two-Times
/Chess.cpp
GB18030
1,880
2.578125
3
[]
no_license
// Chess.cpp: implementation of the CChess class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "MyTask.h" #include "Chess.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif //////////////////////////...
true
097112d8a3f49e603681ed5d11ca23f07fa1570e
C++
virtyaluk/leetcode
/problems/38/solution.cpp
UTF-8
744
3.109375
3
[]
no_license
class Solution { public: string countAndSay(int n) { if (n == 1) { return "1"; } if (n == 2) { return "11"; } string curAns = countAndSay(n - 1), ans; int cnt = 1; for (int i = 1; i < size(curAns);...
true
f0ad7124b67f1a82f5a75e792a8f76fddba75c9a
C++
justinzliu/Data-Structures-II
/A4/a4.cpp
UTF-8
929
3.484375
3
[]
no_license
/* 301070053 jzl1 Justin Liu ** a4.cpp ** Assignment 4, CMPT-225 ** ** Reads a sequence of integers (in the range of int's) from standard in; ** It is interpreted as two lists, separated by a single 0 **/ #include <iostream> #include "heap.h" #include "HCompare.h" using namespace std; int main() { long double ...
true
42d66ff39193f01e347b0442278f6e8a491b9d9a
C++
15831944/TCIDE
/src/match/my/MyVarList.h
GB18030
3,553
2.84375
3
[]
no_license
/////////////////////////////////2009.12.19 Ф㷶޶////////////////////////// #ifndef MYVARLIST_H #define MYVARLIST_H #include"MyVar.h" #include"match/My/MyValue.h" MATCH_CPP_NAMESPACE_BEGIN //˱Ľڵ struct varNode { MyVar * var; //ָ varNode * next; //ָһڵ ...
true
bdb06ef39e235a6d8c01b1e580d8f896e489689d
C++
joker-hyt/gvoice_use
/gvoice_test/util/crypto/hash.h
UTF-8
738
2.96875
3
[]
no_license
#pragma once inline unsigned int hash_value(int v) { return static_cast<unsigned int>(v); } inline unsigned int hash_value(unsigned int v) { return static_cast<unsigned int>(v); } template <class T> inline void hash_combine(unsigned int& seed, T const& v) { seed ^= hash_value(v) + 0x9e37...
true
f5ed886951ce0804c53587764fa1db2e4a432d08
C++
CombustibleLemons/digifab
/temperature_control/temperature_control.ino
UTF-8
6,214
2.8125
3
[ "MIT" ]
permissive
/* * Inputs ADC Value from Thermistor and outputs Temperature in Celsius * requires: include <math.h> * Utilizes the Steinhart-Hart Thermistor Equation: * Temperature in Kelvin = 1 / {A + B[ln(R)] + C[ln(R)]3} * where A = 0.001129148, B = 0.000234125 and C = 8.76741E-08 * * These coefficients seem to wor...
true
13e3a3878031629eab4cb53be2968840895fc445
C++
svinniepoopy/mini_architectures
/lfu_cache/lfu_cache.cpp
UTF-8
5,732
3.5
4
[]
no_license
// least frequently used cache #include <iostream> #include <list> #include <utility> #include <unordered_map> #include <map> #include <vector> /* // use an unordered map as the cache containing the key and a pair of values // key : {val, <lru list iterator, map iterator>} // map: items ordered by frequency // list: ...
true
32a54623af45f2ad9ab3ebc3bef1fe35e1b8bc43
C++
soachishti/Data-Structures-coded-in-CS201
/Intermediate/QueueUsingArray.cpp
UTF-8
2,081
3.59375
4
[]
no_license
#include <iostream> using namespace std; class Queue { public: int size, *data, *front = NULL, *rear = NULL; bool full; Queue(int s) { full = false; size = s; data = new int[size]; front = data; } void enQueue(int d) { int *tmp = (front == data) ? dat...
true
c74de27a8395b98e8461dc0da22454b2e550e31f
C++
AbhinavtiwarIdk/c_programming
/use of constant.cpp
UTF-8
763
2.8125
3
[]
no_license
#include <stdio.h> int main() { const int MonthsinYear=12; int Monthsintenyear=12*10; int MoneyGeneratedPerMonth; MoneyGeneratedPerMonth=500; printf("Hello, This code is designed by Manish Mathuria \n"); printf("The approximate yearly income will be: %d \n", MoneyGeneratedPerMonth * Monthsi...
true
87705bd959fe0065174763514ed1aa07844412b1
C++
Hongyan0627/Interview_questions
/138CopyListWithRandomPointer.h
UTF-8
953
3.265625
3
[]
no_license
// LeetCode // // Created by Hongyan on 01/10/17. // Copyright © 2017 Hongyan. All rights reserved. // class ListNode { int val; ListNode* next; ListNode(int x):val(x), next(NULL){} }; struct RandomListNode { int label; RandomListNode *next, *random; RandomListNode(int x):val(x), next(NULL), random(NULL) {} ...
true
8a30f7f25fe0ab7021c0ab2810ba41d7d6be1fa9
C++
samyak3/Algorithms
/Spoj/ToDo/IWGBS - 0110SS.cpp
UTF-8
625
3.125
3
[]
no_license
/* * IWGBS - 0110SS.cpp * * Created on: Oct 31, 2015 * Author: Admin */ #include<iostream> #include<vector> using namespace std; typedef unsigned long long ull; vector<ull>Wzero;//number of ways we can make a number from 1 and 0 which ends with zero vector<ull>Wone;//number of ways we can make a number from...
true
923ca680173b2000a769b76f922b009c707fc8f6
C++
wbrbr/drums
/src/arduino.cpp
UTF-8
875
3.328125
3
[ "MIT" ]
permissive
#include "arduino.hpp" #include <iostream> Arduino::Arduino(): serial("/dev/ttyACM0") { } Arduino::~Arduino() { } bool Arduino::isMessageAvailable() { return serial.getAvailable() >= 8; } Message Arduino::readMessage() { char buf[8]; serial.readBytes(buf, 8); Message msg; msg.type = (uint16_t)b...
true
b42a8a12b8fb377d9de2d19139c6cb77a7d2f22c
C++
mrsteakhouse/project-template
/template/template/equipment.h
UTF-8
461
2.671875
3
[]
no_license
#ifndef _equipment_h_ #define _equipment_h_ #include <iostream> #include <cstdlib> #include <string> using namespace std; namespace equipment { class equip { public: equip(); ~equip(); int strenght; int ressistence; int mana; int endurance; int life; int spellpower; int agility; int...
true
921adbbfef004b26fd5f3c0b87053eccbe3f7c49
C++
ly774508966/GameRender3D
/lonely3D/ColorConverter.cpp
GB18030
5,774
3.25
3
[]
no_license
#include "ColorConverter.h" #include "Color.h" // 8һֽ void ColorConverter::Convert1BitTo16Bit( uint8* inData, uint16* outData, uint32 width, uint32 height, uint32 linepad, bool flip) { if (!inData || !outData) return; // ת if (flip) outData += width * height; for (uint32 y = 0;y < height;y++) ...
true
167a8394e0dde34eda2f260e8757668bd6c444ad
C++
Chungchhay/CS32
/Project3 Part 2/Actor.h
UTF-8
5,743
3.046875
3
[]
no_license
#ifndef ACTOR_H_ #define ACTOR_H_ #include "GraphObject.h" #include "Compiler.h" class StudentWorld; class Actor : public GraphObject { public: Actor(StudentWorld* world, int startX, int startY, Direction startDir, int imageID, int depth); virtual ~Actor(); // Action to perform each tick. virtual void ...
true
65396b540210aa2dd3c11414b85d575cd585a597
C++
fant12/geditor
/GEditor1_4/model/soundarea.h
UTF-8
1,000
2.609375
3
[]
no_license
#ifndef SOUNDAREA_H #define SOUNDAREA_H #include "mediaarea.h" // class -------------------------------------------------------------------------------- //! SoundArea class. /*! * \brief The SoundArea class describes an area, where sound can be played. */ class SoundArea : public MediaArea { Q_OBJECT ...
true
a3c2b734a18b831774b9e9b75ddd098e8d0e6396
C++
tpoliaw/columns
/src/square.cpp
UTF-8
987
2.703125
3
[]
no_license
#include <cstdlib> #include <iostream> #include "square.h" using namespace std; square::square(int cols, int c) { setRandColour(c); setPos((int)SQUARE_SIZE/2 + SQUARE_SIZE * (rand() % cols),(int)SQUARE_SIZE/2); } QRectF square::boundingRect() const { return QRectF(-SQUARE_SIZE/2, -SQUARE_SIZE/2, SQUARE_SIZE, SQUA...
true