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
5097e3ee096da6626ef100fa4c9f4f9b90d591fc
C++
utstikkar/sonar-beach-ball
/Accelerometer_piezo_player.ino
UTF-8
3,208
2.96875
3
[]
no_license
#include <Wire.h> #include <Adafruit_LSM303.h> #include <SPI.h> #include <SdFat.h> #include <SdFatUtil.h> #include <SFEMP3Shield.h> #include <SFE_TPA2016D2.h> const int knockSensor = A0; // the piezo is connected to analog pin 0 const int threshold = 3; // threshold value to decide when the detected vibration is a k...
true
643325024f67c8d1450969676ff1ca68ba66769f
C++
cheuk-fung/Programming-Challenges
/USACO/6.1/rectbarn.cc
UTF-8
1,411
2.6875
3
[]
no_license
/* ID: os.idea1 LANG: C++ TASK: rectbarn */ #include <cstdio> FILE *fin, *fout; inline int fmin(short a, short b) { if (!a) return b; return a < b ? a : b; } struct Point { short u, l, r; int area() const { return (int)u * (int)(r + l - 1); } } p_buf[2][3010]; Point *prev = p_buf...
true
2ee26f15a62908e7d741f2213ddf8e8f6b19b97d
C++
GrahamDumpleton-abandoned/ose
/software/library/OTC/system/_stopwtch.cc
UTF-8
2,360
2.625
3
[ "LicenseRef-scancode-generic-exception", "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
/* // ============================================================================ // // = LIBRARY // OTC // // = FILENAME // _stopwtch.cc // // = AUTHOR(S) // Graham Dumpleton // // = COPYRIGHT // Copyright 1995-2003 DUMPLETON SOFTWARE CONSULTING PTY LIMITED // // ====================================...
true
33d4e685b24dce72dd2f0922c244645785377f70
C++
EmilyEclipse/Breakout
/src/options.cpp
UTF-8
1,048
2.953125
3
[ "MIT" ]
permissive
#include "Options.hpp" #include <SDL2/SDL.h> #include <iostream> #include <fstream> #include <sstream> Options::Options() { readOptions(); } void Options::readOptions() { std::fstream optionsFile("options.txt", std::ios::in); Uint16 count = 1; for(std::string inputLine; std::getline(optionsFile, i...
true
56eb56a799bb72c531596a87514423e1d34b6de7
C++
j-p-e-g/AdventOfCode2017
/AdventOfCode/December04b.cpp
UTF-8
1,174
3.046875
3
[]
no_license
#include "stdafx.h" #include <iostream> #include <set> #include "CodeUtil.h" #include "December04b.h" using namespace AdventOfCode::December04; AnagramPassPhraseCheck::AnagramPassPhraseCheck(const std::string& fileName) : PassPhraseCheck(fileName) { } void AnagramPassPhraseCheck::OutputResultToConsole() const ...
true
0e9f1960baff79733690de8a4e18a8462371a97e
C++
Bhushan-joshi/CPP14
/src/MultipleCatch.cpp
UTF-8
724
3.71875
4
[]
no_license
#include <iostream> using namespace std; class MyException1 { }; class MyException2 : public MyException1 { }; int main() { try { throw 1; throw 1.5f; throw 'c'; } catch (int i) { cout << "int catch" << endl; } catch (float f) { cout << "float catch" << endl; } catch (...) { //this catch block ...
true
9225eb153c26fe7fa3b14cfd4590e2d3c011d90c
C++
VitBomm/hackerank
/Mini-Max-Sum.cpp
UTF-8
474
2.6875
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<long long int> v; int main() { long long int e; for(int i = 0 ; i<5;i++) { cin>>e; v.push_back(e); } sort(v.begin(),v.end()); long long int mMin = 0; long long int mMax = 0; for(int i= ...
true
e26eac1c2b47273f5da5ea4a5faa531462487533
C++
vinamarora8/Monochromator-Automation
/StepperControl/StepperControl.cpp
UTF-8
2,434
3.40625
3
[]
no_license
#include <StepperControl.h> StepperControl::StepperControl(const int* stepper_pins) { // Set initial values of private variables stage = 0; pins[0] = stepper_pins[0]; pins[1] = stepper_pins[1]; pins[2] = stepper_pins[2]; pins[3] = stepper_pins[3]; step_delay = 100; // Set pin to output mode pinMode(pins[0], ...
true
77b8bf9688525f0cfb238accd4ede59556b3dd3f
C++
kuangchen/ProtoMolAddon
/protomol/src/protomol/config/Configuration.cpp
UTF-8
7,206
2.75
3
[]
no_license
#include <protomol/config/Configuration.h> #include <protomol/base/Report.h> #include <protomol/base/Exception.h> using namespace std; using namespace ProtoMol::Report; using namespace ProtoMol; //____ Configuration void Configuration::registerKeyword(const string &keyword, Value value) { if (end() != myValues.fin...
true
d25755ab438bdaa8ed292d7083adb77759a850c0
C++
supersteph/randomstuff
/median.cpp
UTF-8
1,634
3.671875
4
[]
no_license
#include<iostream> using namespace std; void swapay(int arr[], int a, int b) { int t = arr[a]; arr[a] = arr[b]; arr[b] = t; } int partition (int arr[], int low, int high) { int pivot = arr[high]; // pivot int i = (low - 1); // Index of smaller element for (int j =...
true
14e616c08f28d41b174401d15910854e44184931
C++
UnregisteredNameA/MiniDatabase
/MiniSQL/tableinfo.cpp
UTF-8
5,134
2.921875
3
[]
no_license
#include "pch.h" #include "tableinfo.h" #include <iostream> #include <algorithm> #include <iomanip> #include <algorithm> #include <cstring> using namespace std; datablock::datablock() { len = 0; } void datablock::clear() { d.clear(); s.clear(); f.clear(); len = 0; } void table::clear() { ...
true
39e992984eff168d53aa8be87c23cbc86f815aa3
C++
LyamCournoyer/comp_422_lab_c
/task2/task2.ino
UTF-8
1,630
2.828125
3
[]
no_license
#include<avr/io.h> #define MYUBRR 103 #define CHUNK 5 #define MAXCHAR 40 #define TERMINATOR '\n' void setup() { UBRR0H = (MYUBRR>>8); UBRR0L = MYUBRR; UCSR0C = 0x06; // UCSR0B = (1<<RXEN0); UCSR0B = (1<<TXEN0)|(1<<RXEN0); } void loop() { char * name_; char * greeting = "hello "; char * p...
true
51cfbde5248f26261b6c0c6871bd18ccf683d00d
C++
ImJsaw/ChineseChess
/ChineseChess/Screen.h
UTF-8
1,726
2.734375
3
[]
no_license
#include<iostream> #include<fstream> #include<Windows.h> //define out border size #define screenX 81 #define screenY 23 //define UI height #define UIY 21 //define UI width #define logX 21 #define boardX 34 #define hintX 26 #define RED 1 #define BLACK 0 //define xy, easy to access array #define X 0 #define Y 1 //defi...
true
dd0637f2346e2ca7695c1de8a9501fd4440735a7
C++
codeheng/freshman_code
/dev-c++写的代码/郝斌老师的代码/函数的形参与实参.cpp
GB18030
337
3.3125
3
[]
no_license
/* 19.8.11 1426 ʵξָmainµIJ βαʾͨµ DZ ͬ λһһӦͱݡ */ # include <stdio.h> void f(int i,float x) { printf("%d %lf\n",i,x); } int main(void) { f(9.9,6.6); return 0; } //Ϊ 9 6.600000
true
85ad857db0754f0dd4c4593dfd9ce610c00e5220
C++
olegartys/CompilerCourseLabs
/lab2/ThompsonConstruction.cpp
UTF-8
17,604
2.546875
3
[]
no_license
// // Created by oleglevin on 17.02.17. // #include <iostream> #include "ThompsonConstruction.h" #include "InfixTransform.h" using namespace std; ThompsonConstruction::ThompsonConstruction(const std::string& regex) : mRegex(regex), mCurId(0) { } void ThompsonConstruction::pushOp(char c) { State::StateP...
true
b63f392c703493f173cd3ea50605673345f7b197
C++
mjun1208/ShootingGame3D
/cBoundingSphere.h
UTF-8
1,099
2.59375
3
[]
no_license
#pragma once enum ObjTag {NONE, PLAYER, ENEMY, PLAYERBULLET, DARKBALL ,BAT, ENEMYATTACKBOUND, MAP , COIN, HEAL}; struct CollInfo { ObjTag Tag; Vec3 Pos; float Size; }; class cBoundingSphere { public: private: struct SPHERE { Vec3 vCenter; float fRadius; SPHERE(Vec3 Center, float Radius) :vCenter(Cent...
true
28de157bbb9215975247affb5451411b3b54de69
C++
KaranKaira/Questions-Algorithms
/Tree/MaximumPathSumLeafNodes.cpp
UTF-8
646
2.875
3
[ "MIT" ]
permissive
#include<bits/stdc++.h> using namespace std; int ans = INT_MIN ; int solve(Node * root) { if(root == NULL) return 0; if(!root->right && !root->left) return root->data; int l = solve(root->left); int r = solve(root->right); if(root->left && root->right) { ans = max(ans,root->data + l +r ); ...
true
8afbb60c44a67c2ace255953bc900c26ba7ba751
C++
jas-bar/quark
/quarkgamecontainer.cpp
UTF-8
1,882
2.59375
3
[ "Zlib" ]
permissive
#include "quarkgamecontainer.h" QuarkGameContainer::QuarkGameContainer() { running = true; maxFPS = 60; } void QuarkGameContainer::setGame(QuarkGame *g) { this->game = g; } void QuarkGameContainer::init(EngineSettings* settings) { maxFPS = settings->maxFPS; input.reset(new Input()); input->re...
true
39b4bcbd9a226198298e3fa5a6df9221bc96a8b0
C++
omkarlenka/leetcode
/buy_and_sell_stock II.cpp
UTF-8
863
3.078125
3
[]
no_license
// // buy_and_sell_stock II.cpp // // Created by omlenka on 21/06/20. // Copyright © 2020 omkar lenka. All rights reserved. // #include <iostream> #include <vector> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int profit = 0; int buy = -1; for(...
true
e22c85d53bd2ec849609b2864d3055ff7056ceec
C++
dnfwlq8054/coding_test
/baekjoon/Silver/Gcd_14490.cpp
UTF-8
547
2.640625
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string>| #include <random> #pragma warning(disable: 4996) using namespace std; int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } int main() { int N, a, b, M; int MAX = 1; string s; cin >> s; int n1 = 0, n2 = 0; ...
true
b35b0bfee1b007cd57b7a840aa14f935e9b4f9ad
C++
Dmitrivm/msu_cpp_autumn_2018
/Yerzhanov/hw7/vector.h
UTF-8
4,238
3.578125
4
[ "MIT" ]
permissive
#pragma once #include <exception> #include <iterator> #include <new> #include <limits> template<class T> class Allocator { public: T* address(T& x) const noexcept { return &x; } const T* adress(const T& x) const noexcept { return &x; } T* allocate(size_t n) { return static...
true
2cf2558fdb5375bca8665be96b9dae834c6affc6
C++
PROUSDER/Uni-work
/program/practice/divide_and_multiply.cpp
UTF-8
155
2.921875
3
[]
no_license
#include <iostream> using namespace std; int main () { double x; cout << "enter a value."; cin >> x; cout << x/3 << ' ' << x * 2; return 0; }
true
9a1723b5b2932b1e489a02b027a2a53e9c66ca1d
C++
bbernardoni/pillow
/pillow/animation.cpp
UTF-8
2,197
2.8125
3
[ "MIT" ]
permissive
#include "animation.h" AnimFrame::AnimFrame(IntRect textureRect, Time frameLength) : texRect(textureRect), frameLen(frameLength) { changeTex = true; transform = false; } AnimFrame::AnimFrame(Vector2f trans, float rot, Vector2f scl, Time frameLength) : translate(trans), rotate(rot), scale(scl), frameLen(f...
true
e75fbb2e2aaf8e29526db3ddaacc62fa6fb0335f
C++
viditg2896/GFGRepo
/Arrays/wavearray.cpp
UTF-8
813
3.265625
3
[]
no_license
#include<algorithm> #include<vector> using namespace std; int main() { //need to sort the array first to get lexicographically least ans int i,t,n,temp; cin>>t; while(t){ cin>>n; int arr[n]; for(i=0;i<n;i++){ cin>>arr[i]; } sort(arr,arr+n); //Swapping outliers alternatively...
true
3bcd84fcd6fe1bf8ee33bde36707af6f0807fc1b
C++
king7282/algorithm
/codeforces/681Div2D.cpp
UTF-8
783
2.53125
3
[]
no_license
#include <stdio.h> #include <algorithm> #include <climits> int input[30010]; int main(void) { int test; scanf("%d", &test); for (int t = 0; t < test; t++) { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%d", input + i); int start = n; input[n + 1] = INT_MAX / 2; while (start ...
true
7080daea5ba5810e3416f1bb90222ad4d2dd21ed
C++
sravya273/BasicProgramming
/String Manipulation/ReverseString.cpp
UTF-8
338
3.328125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void reverseString(string &str) { int length = str.length(); for(int i=0;i<length/2;i++) { swap(str[i], str[length-i-1]); } } int main() { string str; cin>> str; cout<<"Reversal of "<<str<<" is "; reverseString(str); cout<<str<<e...
true
058f8a255dcaff6f6bb4adf762e5f1b5de172428
C++
AlexFirfarov/olympic-programming
/Осень/Siberia 1 ноября/11.cpp
UTF-8
556
2.84375
3
[]
no_license
#include <iostream> #include <string> #include <unordered_map> #include <vector> int main() { int n; std::cin >> n; std::string f; std::vector<std::string> types; std::unordered_map<std::string, int> m; while (n--) { std::cin >> f; int idx = f.find('.'); st...
true
1bc43edecbef9267be80c29f2b4ead041b2c0487
C++
Jorgitou98/Acepta-el-Reto
/Soluciones/AceptaElReto285VacasPensantes.cpp
UTF-8
1,949
3.390625
3
[]
no_license
#include <iostream> #include <algorithm> #ifndef MATRIZ_H #define MATRIZ_H #include <vector> template <typename Object> class Matriz { public: // crea una matriz con fils filas y cols columnas, // con todas sus celdas inicializadas al valor e Matriz(int fils, int cols, Object e = Object()) : datos(fils, std::vecto...
true
6b000f01e13266e40a879bcc3da51e0f9d2162b0
C++
kmilo9999/Mico
/Mico/Math.cpp
UTF-8
5,894
3.171875
3
[]
no_license
#include "Math.h" #include <glm/gtx/transform.hpp> #include <glm/gtx/quaternion.hpp> #include <glm/gtx/norm.hpp> #include <glm/gtx/euler_angles.hpp> Math::Math() { } Math::~Math() { } mat4 Math::CreateTransformationMatrix(vec3& translation, quat& orientation, vec3& scaleSize) { mat4 translate = glm::translat...
true
fdb0f3f967b51baf1a45aecb533977b64b2ad945
C++
ydszza/chatroom
/CLIENT/client/sign_in.cpp
UTF-8
2,501
2.59375
3
[]
no_license
#include "sign_in.h" #include "ui_sign_in.h" #include <QDebug> #include <QtNetwork> #include <QMessageBox> #include <cstring> /*构造函数,布局页面*/ sign_in::sign_in(QWidget *parent) : QWidget(parent), ui(new Ui::sign_in) { this->setFixedSize(400, 300); ui->setupUi(this); connect(ui->pushButton_sign_in, SIG...
true
e95bbf189550dc5f77aff8c3ba6630f3d1e7f386
C++
jsen07/CS2010_Groop3
/TakeoverGame/TakeoverGame/src/engine/core/Mouse.h
UTF-8
1,056
2.515625
3
[]
no_license
#pragma once #include "ValkyrieEngine.h" #include "../utils/Vector.h" namespace vlk { typedef Int MouseButton; namespace MouseButtons { extern const MouseButton BUTTON_1; extern const MouseButton BUTTON_2; extern const MouseButton BUTTON_3; extern const MouseButton BUTTON_4; extern const MouseButton BUT...
true
774fc76e03e6cf461400f29f2ed7a366df5d5b1f
C++
Diusrex/UVA-Solutions
/10160 Servicing Stations.cpp
UTF-8
3,416
3.046875
3
[ "Apache-2.0" ]
permissive
#include <iostream> #include <vector> #include <bitset> using namespace std; typedef bitset<35> bset; // Is quite fast (top 3) with the least obvious speedup being only search in connected components // (which shaved the last 0.02 seconds off) // Also ensures that, if trying to skip node, that it can be completed //...
true
252c6ae4945a89dff0f39dc531277376be8d4eff
C++
hansewetz/gitrep2
/src/cpp/experiments/tests/test-atomic/test1.cc
UTF-8
600
2.6875
3
[]
no_license
// (C) Copyright Hans Ewetz 2010,2011,2012,2013,2014,2015,2016. All rights reserved. #include <atomic> #include <thread> #include <assert.h> std::atomic<bool> x,y; std::atomic<int> z; void write_x_then_y(){ x.store(true,std::memory_order_relaxed); y.store(true,std::memory_order_release); } void read_y_then_x(){ ...
true
b748f27e5c4b2782b6370796e65401f4a897bfe5
C++
fcccode/interview-1
/cpp/opengl_game/0.3.5/oorion/src/iichan/iichan_player.h
UTF-8
367
2.640625
3
[]
no_license
#ifndef __PLAYER_H_ #define __PLAYER_H_ #include "iichan_character.h" class PLAYER : public CHARACTER { private: int score; public: int GetScore() const { return score; } void SetScore(int new_value) { score = new_value; } void CollectPowerup(enum POWERUP_TYPE power_type, int count); PLAYER(int health, int ammo...
true
e22aa6112704cddb592ec365e58df56aa8c4a098
C++
yuexing/problems
/container_util.h
UTF-8
3,059
3.390625
3
[]
no_license
#ifndef _CONTAINER_UTIL_HPP #define _CONTAINER_UTIL_HPP #include <map> #include <iostream> /// avoid long type declaration #define LET(a, b) \ __typeof__(b) a(b) #define LETREF(a, b) \ __typeof__(b)& a(b) #define LETCREF(a, b) \ const __typeof__(b)& a(b) /// const_iterator type template<typename C> class con...
true
8641a696783f0184af120f1b556552d0fbee00c3
C++
Atsu30/ProgramingContest
/ABC/131D.cpp
UTF-8
706
2.984375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; struct Work{ long long A; long long B; }; bool cmp(const Work &a, const Work &another) { return a.B < another.B; }; int main(){ int N; cin >> N; vector<long long> A(N), B(N); vector<Work> works(N); for(int i = 0; i < N; i++){ cin...
true
5a8a9e35190607af14ea49198c8c22e4572a48bc
C++
LKolya97/my-work
/6.cpp
UTF-8
1,509
3.359375
3
[]
no_license
// ConsoleApplication5.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int main() { double n, s; int a, b; cout << "Choose which type of temperature you want to convert\n 1-Fahrenheit\n 2-Celsius\n 3-Kelvin\n"; cin >> (a); sw...
true
953fa2495c2b3d102e8a8434be242ba6666cfd3e
C++
anhvvcs/corana
/libs/z3/src/util/s_integer.cpp
UTF-8
1,297
2.953125
3
[ "MIT" ]
permissive
/*++ Copyright (c) 2006 Microsoft Corporation Module Name: s_integer.cpp Abstract: <abstract> Author: Leonardo de Moura (leonardo) 2007-06-10. Revision History: --*/ #include "util/s_integer.h" s_integer s_integer::m_zero(0); s_integer s_integer::m_one(1); s_integer s_integer::m_minus_one(-1); s_...
true
6f8326c719b2a7579062d72e504f38246c5b1a40
C++
wangning0/learn_cpp
/StrBlob.cpp
UTF-8
1,007
3.453125
3
[]
no_license
#include <iostream> #include <memory> #include <list> #include <vector> using namespace std; class StrBlob { public: typedef vector<string>::size_type size_type; StrBlob(); StrBlob(initializer_list<string> li); size_type size() const { return data -> size(); }; bool empty() const { return data -> ...
true
72422bcd53e4b40f96ea2843cccccce567e75a50
C++
GPUOpen-LibrariesAndSDKs/TAN
/tan/tests/src/common/anyoption.h
UTF-8
9,282
2.59375
3
[ "MIT" ]
permissive
/* The MIT License(MIT) Copyright(c) 2016 Kishan Thomas www.hackorama.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,...
true
c37356b14271be992bda6b45b08fc97625351380
C++
nabilme/xplduino.software
/beta/test_switch_lighting_shutter_xpl_i2c/switch_core.h
UTF-8
3,381
2.59375
3
[]
no_license
#ifndef switch_core_h #define switch_core_h #include "Arduino.h" #include <stdio.h> //~ #define MAX_SWITCH 16 #define T_CMND 1 #define T_STAT 2 #define T_TRIG 3 #define ADDR_TEMP 0 // 1=nouveau niveau de l'entree #define ADDR_PULSE 1 // 1=appui pulse #define ADDR_DPULSE 2 // 1=appui...
true
f34e79a7fc9bad6b8a4d83b04fe9612f3e6d8bd8
C++
teym/captchacker
/C++ sources/Centrage caractères/main.cpp
UTF-8
3,186
2.71875
3
[]
no_license
#include <iostream> #include <string> #include "boost/filesystem.hpp" #include "cv.h" #include "cxcore.h" #include "highgui.h" #if defined (WIN32) #pragma comment(lib,"cv") #pragma comment(lib,"cvaux") #pragma comment(lib,"cxcore") #pragma comment(lib,"highgui") #pragma comment(lib,"cvcam") #endif using namespac...
true
7551b709bcdda8a85f1c4ec49211a1d2bb14d0e4
C++
eariunerdene/C-course
/Day#1/#1 Homework.cpp
UTF-8
190
3.171875
3
[]
no_license
#include <iostream> using namespace std; int main () { int x=1,y=2,z=3; cout<<"1. "<<x+y-z<<endl; cout<<"2. "<<x/z*y<<endl; cout<<"3. "<<20*x*(z+y)<<endl; return 0; }
true
bd2f437482c640f69f7fe306bdb72d66cbce15c3
C++
goaldae/Algorithm
/src/programmers/stringCompression.cpp
UTF-8
1,065
2.90625
3
[]
no_license
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <map> #include <string> using namespace std; string ans = ""; using namespace std; int shortest(int cutNum, string s) { int n = s.size() / cutNum; //잘린 개수 vector<string> temp; for (int i = 0; i < n; i++) { temp.push_ba...
true
ef8cdfea953e5545f5d930a094d0567f8e01193b
C++
likeleon/Geometry
/Geometry/Public/Rtree.h
UTF-8
1,797
2.640625
3
[]
no_license
#pragma once #include <cassert> #include <memory> #include <utility> #include "Geometry/Public/Box.h" #include "Geometry/Public/InsertVisitor.h" #include "Geometry/Public/Node.h" #include "Math/Vec3.h" namespace Geometry { namespace Index { namespace Detail { template <size_t MaxElements> struct DefaultMinElement...
true
8be644156516a3df88ddbb61763969cec8aaefcb
C++
akudrinsky/sorts
/src/statsInt.cpp
UTF-8
1,728
3.03125
3
[]
no_license
#include "../include/statsInt.hpp" #include "../include/usefulDefines.hpp" #include <cstdio> #define GENERATE_COMPARE_OPERATOR_STATSINT(op)\ bool StatsInt::operator op (const StatsInt& other) {\ ++compareNum;\ return number op other.number;\ } Stats::Stats(const char* filename) { FILE* file = fopen(filena...
true
0cc4d27d2e256cc8bfa3432e3063c41e1b09e548
C++
segoranov/exam_preparation_programming
/introduction_to_programming_problems/10_09_2018_SOFTUERNO_problem1/reveal_password_v2.cpp
UTF-8
1,569
3.8125
4
[]
no_license
#include <string.h> #include <iostream> #include <string> bool isSorted(const char* books[], int booksCnt) { for (int i = 0; i < booksCnt - 1; ++i) { if (strcmp(books[i], books[i + 1]) > 0) return false; } return true; } std::string processTitle(const char* title) { std::string result; int cnt = 0; ...
true
4eb6841aed2928f8ed1451cbb3a9fa16d4d9b743
C++
blayzekohime/GSP420_MAIN
/GSP420_Main/AI.cpp
UTF-8
3,432
2.828125
3
[]
no_license
#include "AI.h" //#include "Game.h" AI::AI(void) { } AI::~AI(void) { } void AI::update(const float dt, std::list<Enemy> enemies, std::list<GSP420::ABC> projectiles, GSP420::ABC player) { // Iterate through the list of enemies and updtae their AI based on their type std::list<Enemy>::iterator enemyIt = enemies.beg...
true
9729283d2f6f3e494c01e4fb52b2a63f389afe2b
C++
visanalexandru/TerrainGeneration
/Engine/Texture/Texture2d.cpp
UTF-8
1,330
2.953125
3
[]
no_license
#include "Texture2d.h" Texture2d::Texture2d():Texture() { //ctor } void Texture2d::load_texture(std::string path) { unsigned int texture; glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); // set the texture wrapping/filtering options (on the currently bound texture object) glTexPar...
true
4673e115ad715c0bf559482c1b9a2a0b5caba0f8
C++
charleswang007/c-plus-plus
/C++4ed-SourceCode/Visual Studio/forloop.cpp
UTF-8
506
3.21875
3
[]
no_license
//============================================= // C++ Programming in easy steps 4ed. [3:48] //============================================= #include <iostream> using namespace std ; int main() { int i , j ; for ( i = 1 ; i < 4 ; i++ ) { cout << "Loop iteration: " << i << endl ; // Uncomment the li...
true
36cbd3f266b62682e804932934017ade713487e9
C++
chris118/threadPool
/main.cpp
UTF-8
1,604
2.53125
3
[]
no_license
// // main.cpp // Demo // // Created by admin on 2017/3/21. // Copyright © 2017年 admin. All rights reserved. // #include <iostream> #include <stdio.h> #include <unistd.h> #include <signal.h> #include <string.h> #include <sys/time.h> #include <errno.h> #include <vector> #include <pthread.h> #include <thread> #incl...
true
324be6001582926a25a1dd6bfe601995064b4dc5
C++
himanshuromeo/competitive_programming
/multimoo.cpp
UTF-8
2,065
2.703125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int N; bool vis1[260][260]; bool vis2[260][260]; int A[260][260]; int dfs1(int i,int j){ vis1[i][j]=1; int ans=0; if(i+1<=N && A[i+1][j]==A[i][j] && !vis1[i+1][j]) ans+=dfs1(i+1,j); if(i-1>=1 && A[i-1][j]==A[i][j] && !vis1[i-1][j]) ans+=dfs1(i-1,j); if(j+1<=N &&...
true
36c7e7d08a3893403f8da7c85d1319201512060a
C++
ashu4306/CSES-Solution
/CSES_1094_Increasing_Array.cpp
UTF-8
1,139
3.484375
3
[]
no_license
/** * @author Ashutosh Sharma * Problem https://cses.fi/problemset/task/1094 * * Solution 1: * Time complexity : O(n) * space complexity : O(1) * * if current number >= last number no moves is required * if current number < last number, for min moves we need to increment current number by value equal to last ...
true
577774533c02cb2fd19609e97ac552357e6ec575
C++
yshgpta/Competitive-Coding
/Spoj/SHPATH.cpp
UTF-8
1,388
2.640625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define mxn 100005 #define INF 1000000000 int dist[mxn]; bool vis[mxn]; void initialise(){ for(int i=0;i<mxn;i++){ dist[i]=INF; vis[i]=false; } } int dijkstra(vector<vector<pair<int,int> > > &adj,int s,int e){ dist[s]=0; priority_queue <pair<int,int>> pq; ...
true
2bba5a6f9c88fa52fc4af75273a60cb42e5d0388
C++
syinari0123/GQN-pytorch
/three/core/renderer/opengl/vao.cpp
UTF-8
5,395
2.546875
3
[]
no_license
#include "vao.h" namespace three { namespace renderer { namespace opengl { VertexArrayObject::~VertexArrayObject() { delete_buffers(); } void VertexArrayObject::delete_buffers() { if (_prev_num_objects == -1) { return; } ...
true
326550e727bbd892ba2a1a16b33b5d069466a0f6
C++
methsaan/cpp
/usefulprograms/functionOutput.cpp
UTF-8
921
2.96875
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdlib> #include <string> using namespace std; int main(int argc, char *argv[]) { string function; cout << "Enter function using f(x): "; getline(cin, function); ofstream fo; fo.open("functionRun.cpp"); fo << "#include <iostream>" << endl; fo << "#include <cmat...
true
631380d61e0c3e70fc0423bfb8c56ceed95dae0a
C++
sitenight/StackAttack
/StackAttack/StackAttack/Game.h
WINDOWS-1251
438
2.9375
3
[]
no_license
#pragma once #include <ctime> struct Point { public: int x; int y; }; /* 0- 1- 2- */ class Game { private: static const int cols = 30; static const int rows = 39; Point body; unsigned char mas[rows][cols]; Point block; public: Game() : mas{0} { for (int i = 0; i < 30; ++i) mas[38][i] = 1; body.x =...
true
03b87d86375056e6ebc809074f3ea7dfbdfb45e5
C++
itohdak/AtCoder
/AGC/032/B.cpp
UTF-8
619
2.578125
3
[]
no_license
#include <iostream> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <numeric> // accumulate(v.begin(), v.end(), 0) using namespace std; #define ll long long int main(){ int N; cin >> N; if(N % 2 == 0) { cout << N * (N-2) / 2 << endl; for(int i=1; i<=N; i++) { fo...
true
17663df12b57972b6a17d9d4c76d95d9b9f1ecea
C++
smallhand/codePractice
/gpe_20190320/10295_Hey_Points_q1.cpp
UTF-8
975
3.390625
3
[]
no_license
/* uva 10295: Hay Points 用Map紀錄每個單字得數值,然後再切字串 */ #include <iostream> #include <map> #include <sstream> using namespace std; int main(){ int number, article; while(cin >> number >> article) { map<string, int> dict; string word; int value; while(number--) { cin >> word...
true
bd16796f62693fd27ccb142f94d4032c5a0ac750
C++
DMCDavi/Arduino
/trem-da-alegria.ino
UTF-8
1,138
2.71875
3
[]
no_license
void setup(){ pinMode(A0, INPUT); pinMode(A1, OUTPUT); pinMode(A2, OUTPUT); pinMode(A3, OUTPUT); pinMode(A4, OUTPUT); pinMode(A5, OUTPUT); } void loop(){ int sensor, LED[5], valor = 1023/5; sensor = analogRead(A0); LED[0] = map(sensor, 0, valor, 0, 1023); LED[1] = map(s...
true
7e98f04e25eedad48329f3439ad8407923199275
C++
grimquarry/SfmlCtrl
/SfmlCtrlDriver.cpp
UTF-8
635
2.765625
3
[]
no_license
#include "SfmlCtrl.h" #include <iostream> int main() { SfmlCtrl sfmlCtrl1; sfmlCtrl1.index = 7; sfmlCtrl1.name = "The ultra delux controller pad"; sfmlCtrl1.productId = 3827; sfmlCtrl1.vendorId = 1234; sfmlCtrl1. vendorName = "Jack Cowdry"; std::cout << "Controller Index: " << sfmlCtrl1.index << std::en...
true
bbb0412453b3ed35560bcae7adc834c38cc0e91d
C++
electrodude/esc
/parser.hpp
UTF-8
4,798
3.015625
3
[]
no_license
#include <stack> #include <string> #include <iostream> #include <sstream> class Parser; class Token { public: Token(std::string::iterator start, std::string::iterator end, Parser* parser); virtual ~Token() {} virtual bool isIdent() const { return false; } virtual bool isNum() const { return false; } //virt...
true
47cbe04581ce36650f0204a5d6fd85aa35898eff
C++
alfinur1011/alfi-nur-20063
/Menghitung segitiga siku-siku.3.cpp
UTF-8
1,288
3.4375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { int menu; float a,b,c; while(1) { printf("------- Menu Pitagoras -------\n"); printf("1. Mencari sisi miring (c) \n"); printf("2. Mencari sisi alas (a) \n"); printf("3. Mencari sisi tegak (b) \n"); prin...
true
e5ebe18c46c426a4ea8bc139247d6f7137a167a1
C++
Abramov-solutions/solutioms
/8.cpp
UTF-8
160
2.578125
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main() { double r, n, p; cin >> r >> n; p=2 * r * n * tan(M_PI/n); cout << p; }
true
dc4d71af4d44dbf1eda070c74a50d3beb6c268a1
C++
tkchanat/LobsterGameEngine
/LobsterGameEngine/src/components/Component.cpp
UTF-8
1,344
2.75
3
[]
no_license
#pragma once #include "pch.h" #include "objects/GameObject.h" #include "scripts/Script.h" namespace Lobster { // Maps a component enum to a string. std::string Component::componentName[] = { "Unknown", "Mesh Component", "Camera Component", "Light Component", "Physics Component", "Script Component", "Au...
true
1e9c4ce28d2a6107ad031aba209a366617b6b4a6
C++
deepwaterooo/MyAlgorithms
/myalgorithms/ctci_WinterBreak2013/ch8two.cpp
UTF-8
1,756
3.125
3
[]
no_license
#include <iostream> #include <stack> #include <cstdio> using namespace std; typedef long long ll; struct point { int x; int y; }; stack<point> sp; const int MAXN = 20; int g[MAXN][MAXN]; point vp[MAXN+MAXN]; ll path(ll m, ll n) { if (m == 1 || n == 1) return 1; else return path(m-1, n) + path(m, n-1)...
true
ceab9223d3741211fd68d37619830d4f553e1637
C++
Zahidsqldba07/codesignal-solutions-4
/Trees Basic/kthSmallestInBST.cpp
UTF-8
543
3.0625
3
[]
no_license
// https://app.codesignal.com/interview-practice/task/jAKLMWLu8ynBhYsv6 // Definition for binary tree: // template<typename T> // struct Tree { // Tree(const T &v) : value(v), left(nullptr), right(nullptr) {} // T value; // Tree *left; // Tree *right; // }; // void solve(Tree <int> *t, int &k, int &ret) { ...
true
caacd8f04b263d2754956eedad2af332865c3a78
C++
farshadsafavi/Cpp
/Dynamic/inheritance/src/Derived.cpp
UTF-8
317
3.046875
3
[]
no_license
#include "Derived.h" #include<iostream> using namespace std; Derived::Derived() { this->y = 0; } Derived::Derived(int x, int y) { this->setX(x); this->y = y; } Derived::~Derived() { //dtor } void Derived::show(){ this->display(); cout << "Display of Derived member:" << this->y << endl; }
true
868eece942ccd2125fa584f0c431e0954d949cd1
C++
joeaoregan/LIT-Yr3-Project-Antibody
/AntibodyV4-CodeBlocks/EnterName.h
UTF-8
1,730
3.1875
3
[]
no_license
/* --------------------------------------------------------------------------------------------------------------------- - Name: EnterName.h - Description: Header file for the name entering system - Information: The enter name state is where the player will enter their name before beginning level 1, T...
true
760010f58f5ee5d220b8496e2329b94e8584f991
C++
oumkale/Geeks-For-Geeks-Work
/LinkList/matrixtoLL.cpp
UTF-8
1,090
3.375
3
[]
no_license
// n is the size of the matrix // function must return the pointer to the first element // of the in linked list i.e. that should be the element at arr[0][0] Node* constructLinkedMatrix(int mat[MAX][MAX], int n) { // code here int i=0,j=0,k=0; Node *head=NULL,*tail=NULL,*hh=NULL,*hhh=NULL; Node* node=N...
true
2d4a258c372dcf95b185afcc21c4a034ceba456d
C++
heon24500/PS
/BOJ/2606.cpp
UTF-8
574
2.640625
3
[]
no_license
#include <iostream> #include <vector> #include <queue> using namespace std; #define N 105 vector<int> adj[N]; queue<int> q; bool visited[N]; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, e, ret = -1; cin >> n >> e; for (int i = 0; i < e; i++) { int u, v; cin >> u >> v; adj[u].push_back(v); ...
true
37392034c39dbbc28f3bd9648411d107fcb393d7
C++
josokw/ExamGenerator
/app/examGen/GenImage.h
UTF-8
495
2.625
3
[ "MIT" ]
permissive
#ifndef GENIMAGE_H #define GENIMAGE_H #include "ILeafGenerator.h" #include <string> class GenImage : public ILeafGenerator { public: GenImage(std::string_view id, std::string_view fileName); ~GenImage() override = default; [[nodiscard]] IGenPtr_t copy() const override; void generate(std::o...
true
f681f26d496eae91392adad38ed3ecd5f6898e6a
C++
talkami/OOP
/Project2/AllFiles/Boat.cpp
UTF-8
2,273
3.421875
3
[]
no_license
#include "Boat.h" #include "Point.h" #include <iostream> //constructor Boat::Boat(int size, int player, IBattleshipGameAlgo* PlayerPointer, IBattleshipGameAlgo* RivalPointer, Point* firstPoint) : boatSize(size), direction(0), acctualSize(1), hits(0), player(player), owner(PlayerPointer), rival(RivalPointer), v...
true
f088cab372aee6c1e173e17c4dcac643b94ecc32
C++
tlegorju/Escape_prototype
/src/ParticleSystem.cpp
ISO-8859-1
1,390
2.796875
3
[]
no_license
#include "../include/ParticleSystem.h" using namespace std; using namespace sf; ParticleSystem::ParticleSystem(unsigned int count) : m_particles(count), m_vertices(sf::Points, count), m_lifetime(seconds(1)), m_emitter(0,0) { //ctor _color=Color::White; _speed=50; _angle.x=0; _angle...
true
859ddc0c3c621722220d6b21c2711b34e3300606
C++
xacid/UvaOnlineJudge
/638/main.cpp
UTF-8
4,695
3.21875
3
[]
no_license
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <string> #include <cstring> #include <cstdio> #include <cassert> using namespace std; struct Point { char c; int x; int y; }; struct Rect { string sAbcd; Rect(const Point* a, const Point* b, const Point* c, const P...
true
dc6a03cfde8ccf98f8254f32fa6140cae86f8cbd
C++
moustafa-mk/Fibonacci-nim--C--CLI-version-
/Source code/main.cpp
UTF-8
3,834
3.125
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <windows.h> using namespace std; int main(); int tryAgain(int lastuse, int current, bool start){ int ret; if(start == true){ cout << "Number is more than twice last used number or the number of coins!! please enter a valid number: " << endl;...
true
354b4f50cc86581ddc0a94204ac5414e081385b5
C++
LittleTemple/PATExam
/PATExam/p1075.cpp
UTF-8
4,932
2.515625
3
[]
no_license
//////开始时间15:23 ////#include<iostream> ////#include<vector> ////#include<algorithm> ////#include <map> ////using namespace std; ////struct user{ //// int id; //// string name; //// int total = 0; //// int num = 0;//完美解决的个数 //// int rank; //// bool flag = false;//解决过问题 //// vector<int> p; ////}; ///...
true
8e57ca1425c639f53f2e709d106a86105ea1d87e
C++
abhishekchavannn/DSA
/placment_practice_problem/delete_nth_node_back_of_list.cpp
UTF-8
493
3.09375
3
[]
no_license
node* solve(node* head, int n) { node* start = new node(0); start->next = head; node* fast = start; node* slow = start; for (int i = 0; i < n; i++) { if (fast->next == nullptr) { // n is larger than the length of the list return nullptr; } fast = fast...
true
22ec6af67cc15058b26be5f37a93b677d797be2e
C++
YinXinLION/Cpp
/practice/73.cpp
UTF-8
651
2.796875
3
[]
no_license
/************************************************************************* > File Name: 73.cpp > Author:YinXin > Mail:yinxin19950816@gmail.com > Created Time: 2016年03月26日 星期六 20时02分52秒 ************************************************************************/ #include<iostream> #include<string> #include<vector> ...
true
8812545a978d7a3ac290132d76e0c4cf852c3c5b
C++
Catlinz/catcore-cpp
/tests/core/unit/threading/taskrunnersinglethread_tests.cpp
UTF-8
36,217
2.765625
3
[]
no_license
#include "core/testcore.h" #include "core/threading/taskrunner.h" #include "core/threading/spinlock.h" namespace cc { I32 destroyed_count = 0; I32 failure_count = 0; I32 success_count = 0; I32 terminated_count = 0; Spinlock locky; void reset_counts() { locky.lock(); destroyed_count = 0; failure_cou...
true
bdaa0b2f762da6b54d62a2a8aff6c3f629ace2d1
C++
scortier/Leetcode-Submissions
/problems/count_good_nodes_in_binary_tree/solution.cpp
UTF-8
962
2.921875
3
[]
no_license
class Solution { public: // new integer and chars int good(TreeNode * root, int mm) { // new integer and chars int ans=0; // if else looping condition if(!root) // return value return 0; ...
true
afb33a4363924970d67bb922b23f348ae2ce1480
C++
cloneforyou/fundamentals-computer-animation
/Assignment 1/include/math/mat4f.h
UTF-8
1,562
3.203125
3
[ "MIT" ]
permissive
#pragma once #include <array> #include <initializer_list> #include <iosfwd> #include <memory> namespace math { class Mat4f { public: enum Size { DIM = 4, NUMBER_ELEMENTS = 16 }; using array16f = std::array<float, NUMBER_ELEMENTS>; using handle = std::unique_ptr<array16f>; explicit Mat4f(); explicit Mat4f...
true
e4643b39e3e59d6b0bf73d4663c0d3b23ec63d2e
C++
mholzel/pid
/src/mimo_pid.h
UTF-8
2,478
3.109375
3
[]
no_license
#ifndef MIMO_PID_HEADER #define MIMO_PID_HEADER #include <sstream> #include <string> #include "Eigen/Dense" template <typename T = double, int n_controls = 1, int n_measurements = 1> class MimoPID { private: /* Errors */ using Error = Eigen::Matrix<T, n_measurements, 1>; Error last_error; Error inte...
true
c18b2e94906b2e91b060a4109e706556ed83ca55
C++
TomasKimer/RetroSpace
/src/Controls.h
UTF-8
2,988
2.796875
3
[]
no_license
// +------------------------------------------------------------+ // | RetroSpace v1.0 | // | Retrospektivni hra pro dva hrace s vesmirnou tematikou | // | Bakalarska prace, FIT VUT v Brne, 2011 | // +----------------------------------------------------...
true
e37e0f82d6b3ac82ab2359b7f641756504db2f8b
C++
mayank1751997/c-exp
/binary number.cpp
UTF-8
267
2.59375
3
[]
no_license
#include<stdio.h> int main() { int n,nsave,rem,d,j=1,dec=0; printf("enter the binary number"); scanf("%d",&n); nsave = n; while(n>0) { d=rem*j; rem=n%10; dec+=d; j*=2; n/=10; } printf("enter number =%d,dec =%d\n",nsave,dec); return 0; }
true
c7fe7031926b10be32a7ccc470fdd8322454385a
C++
Kraghan/Dead-Pixel-Society
/include/GraphicEngine/AnimationState.hpp
UTF-8
1,139
2.828125
3
[]
no_license
/*! * \brief File that contains the header of the class * animation state * \file AnimationState.hpp * \author Aredhele * \version 0.1 * \date 22/11/2016 */ #ifndef __ANIMATION_STATE_HPP #define __ANIMATION_STATE_HPP #include "GraphicEngine/Sprite.hpp" #include "GameEngine/Updatable.hpp...
true
081fb2e7cb42be0f4d002802fbd803c4ad708f1f
C++
kravtsovguy/BaseEngine
/GameEngine/GameObject.cpp
UTF-8
555
2.515625
3
[]
no_license
// // GameObject.cpp // GameEngine // // Created by Matvey Kravtsov on 18/01/2017. // Copyright © 2017 Matvey Kravtsov. All rights reserved. // #include "GameObject.hpp" GameObject::GameObject() { addComponent(new Transform()); } Transform* GameObject::getTransform() { return (Transform*)findComponent<T...
true
158ea8475b78fe8468b1a55161f4482da8deaef3
C++
atlas25git/DSA_Mastery
/Sorting/MinPlatformReq.cpp
UTF-8
2,518
3.5625
4
[]
no_license
// { Driver Code Starts // Program to find minimum number of platforms // required on a railway station #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Function to sort vector elements first according to time and if time is //same for two events, then arriva...
true
d976ecc6765b5909b6a3568b1c980e5c95f9de5b
C++
williamthio/competitive-programming-3
/Programming Exercises/2.2 Linear DS with Built-in Libraries/2. 2D Array Manipulation/UVa_10855.cpp
UTF-8
1,708
2.8125
3
[]
no_license
#include <iostream> #include <vector> #include <functional> using namespace std; void uva_10855() { int bn, sn; while (cin >> bn, bn) { cin >> sn; vector<vector<char>> big, small; big.resize(bn); small.resize(sn); for (int i = 0; i < bn; i++) { big[i].resize...
true
efb590154437d5f4fb6ae8e495fbfd7c33ee05ed
C++
Wingman639/cpp_learning
/class/init_instence.cpp
UTF-8
760
3.890625
4
[]
no_license
#include <iostream> #include <string> using namespace std; class stuff { string name; int age; public: stuff() { //这是写法一 cout << name << "---" << age << endl; //赋值前可能会为未初始化值 name = "赋值前可能会为空"; age = 0; cout << name << "---" << age << endl; } stuff(string n, in...
true
4dbebc35f0016a9cc97a89378af66ca6815dd21f
C++
bibhuticoder/IES-snake
/snake.ino
UTF-8
5,562
2.921875
3
[ "MIT" ]
permissive
#include <SPI.h> #include <U8g2lib.h> #include <math.h> #include <string> #include <MPU9250.h> using namespace std; struct Point{ int x; int y;}; #define SPI_CLK 14 U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI oled(U8G2_R2, 10, 15, 16); MPU9250 imu; //function prototypes bool collission(int x1, int y1, int x2, int y2, int ...
true
8164bc820b943349b03dde2538a66895dab9e727
C++
hennesseyr14/EECS-183
/Project 2/Project 2/test.cpp
UTF-8
5,065
3.46875
3
[]
no_license
/** * test.cpp * * Ryan Hennessey * rjhenn * * EECS 183: Project 2 * * Testing functions for your birthdays.cpp implementation. * Holds the definitions of required testing functions. * We have stubbed all required functions for you. */ #include <cassert> #include <cctype> #include <iostream> ...
true
179046fed5cf9459c97e9cef29500c1f42cdd8dc
C++
codingsf/netlib
/ds/binary_search_tree.cc
UTF-8
5,130
3.671875
4
[ "MIT" ]
permissive
#include "binary_node.h" template<typename T> class BinarySearchTree { public: BinarySearchTree(): root_(nullptr) {} ~BinarySearchTree(); void Create(); // Return nullptr if fails, otherwise return the new node's pointer. BinaryNode<T> *Insert(const T &data); // Return nullptr if fails, otherwise return the mat...
true
2bee3f7f700d3726ea943d6f1c59b39fce6e266c
C++
hacker-taso/algorithm_judges
/algospot_judge/book1_sample/MORSE/main.cpp
UTF-8
1,216
2.78125
3
[]
no_license
#include<iostream> #include<vector> #include<cstring> #define MAX_KTH (1000000000+100) using namespace std; int numFirst, numSecond, k; int bino[201][201]; int getNumComb(int numFirst, int numSecond) { return bino[numFirst+numSecond][numSecond]; } string construct(int numFirst, int numSecond, int skip) { if (numFi...
true
9dbebae6c31a6f086d9fbea457f63f9377db4313
C++
fdanesse/Giroscopios
/ADXL335/ADXL335.ino
UTF-8
2,021
3.171875
3
[]
no_license
// https://lastminuteengineers.com/adxl335-accelerometer-arduino-tutorial/ /* Los tres ángulos son la dirección (heading o yaw), elevación (pitch) y ángulo de alabeo (roll). Estos tres ángulos son equivalentes a tres maniobras consecutivas. Dado un sistema de tres ejes fijos en el aeroplano, llamados eje de guiñada (ya...
true
ab2684b82c0a2db6bc84596e8bca7648135a0f63
C++
tonyxwz/leetcode
/9.Graph/133. Clone Graph.cc
UTF-8
988
3.203125
3
[]
no_license
/* // Definition for a Node. class Node { public: int val; vector<Node*> neighbors; Node() { val = 0; neighbors = vector<Node*>(); } Node(int _val) { val = _val; neighbors = vector<Node*>(); } Node(int _val, vector<Node*> _neighbors) { val = _val; ...
true
9ff8a3afa528403b6bc6c915d92d5030e85dc6f9
C++
Sunyandong-CS/Algorithm
/LeetCode/DynamicProgramming/CombinationSumIV/CombinationSumIV/main.cpp
UTF-8
1,426
3.4375
3
[]
no_license
// // main.cpp // CombinationSumIV // // Created by 孙艳东 on 2018/3/5. // Copyright © 2018年 com.xidian.edu.cn. All rights reserved. // /** Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. Example: nums = [1,...
true
6b72854d2d784b197d2f58eadf2ab20dff5c39cd
C++
tejasMadrewar/CPP_notes
/3_functions/ex_inline.cpp
UTF-8
894
3.71875
4
[]
no_license
#include <iostream> using namespace std; // if function is small then overhead in calling increases // alternative is macro but error checking is not done // // inline function is a function that expanded in line when it is invoked. // must defined before called // they are made inline when they are small enough to b...
true
5de80e0eed70050dc36079e1b4211289a5855e27
C++
rubensim/rubluskaskazka
/Chess/ChessWithUi/FigureKing.cpp
UTF-8
827
2.765625
3
[]
no_license
#include "stdafx.h" #include "FigureKing.h" #include "Constants.h" King::King(PieceColor color, string image) :Piece(color, image){} King::~King(){} bool King::CheckMove(Coordinate currentPosition, Coordinate movePosition, bool allowDoCornerStep){ if (abs(currentPosition.GetX() - movePosition.GetX()) <= SQUARESIZ...
true
827eba6f1ebbd379057b30b5fde35afd0d8d9060
C++
LingyanWu2016/Simple-computer-system-with-CPU-and-memory
/SourceFile/cpu.cpp
UTF-8
7,555
2.8125
3
[]
no_license
/* * cpu.cpp * * Created on: Feb 18, 2016 * Author: angie */ #include <iostream> #include <fstream> #include <stdlib.h> #include <math.h> #include <unistd.h> #include <string> #include "cpu.h" #include"memory.h" #include"message.h" using namespace std; void cpu::setPipeCPU(int psd1,int psd2){ //set...
true