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
90466d6a93f99570baa32e871fa24d69e06f66cf
C++
yaelShechter/ATM
/src/account.cpp
UTF-8
224
2.75
3
[]
no_license
#include "account.hpp" Account::Account(int balance): _balance(balance) {} int Account::balance() const { return _balance; } void Account::set_balance(int new_balance) { _balance = new_balance; }
true
eedbbc8c5fcb881dc9e0eeabea233097e47f9157
C++
JHYOOOOON/Collection
/baekjoon/2456.cpp
UTF-8
1,076
3
3
[]
no_license
#include <iostream> #include <algorithm> #define X first #define Y second using namespace std; bool compare(pair<pair<int, int>, pair<int, int>> a, pair<pair<int, int>, pair<int, int>> b){ if(a.X.X != b.X.X) return a.X.X > b.X.X; else if(a.X.Y != b.X.Y) return a.X.Y > b.X.Y; else if(a.Y.X != b.Y.X) return ...
true
9f049916a72120b12be46fe5dcfb3ea85dd84fce
C++
vutuancong/C--Combination.
/Chap 4-Linklist-Stack-Queue/stl_DuyetString.cpp
UTF-8
969
3.015625
3
[]
no_license
#include <iostream> #include <list> #include <string> #include <fstream> using namespace std; typedef struct node { string word; int soLan; }; list<node> X; list<node>::iterator i; int kiemTra(string a,int &n) { int count = 0; for(i = X.begin();i!=X.end();i++) { node temp = *i; if(temp.word == a) return cou...
true
13df27077d2c5768b153ac0e217a5dc5b149f3be
C++
mtrempoltsev/msu_cpp_autumn_2017
/homework/Filin/08/task8_1.cpp
UTF-8
8,161
3.640625
4
[ "MIT" ]
permissive
#include <iostream> #include <stdio.h> #include <memory> #include <vector> //базовый класс ошибок class Error { protected: std::string message_; public: const std::string getMessage() const { return message_; } }; //класс ошибок, возникающих в базовых операциях/функциях класса Vector class Vector...
true
e15a68c19dfb15029edd18a0fed9b11158cd3c92
C++
FabioVL/IME
/LabProg1/Revisao_C/ordena.cpp
UTF-8
443
2.828125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { // Método bubblesort(?) int *a,n,b; cout << "Entre com n: " << endl; cin >> n; a = (int *) malloc(n* (sizeof(int))); for(int i=0;i<n;i++) scanf("%d",&a[i]); for (int i=0;i<n;i++) for (int j=0;j<n-1;j++) { if (a[j+1] < a[j]) { b = a[...
true
52f0a3e43a4151c3e4053bcbc22a990126ace4de
C++
xingfeT/c-practice
/day-001-100/day-024/problem-3/main.cpp
UTF-8
985
4.375
4
[]
no_license
/* * Write a C program that asks the user to input two numbers. After your program * accepts these numbers using one or more scanf() function calls, have your program * check the numbers. If the first number entered is greater than the second number, * print the message: * - "The first number is greater than the s...
true
596349485986ff178e45348adaa8f8ff66f506d5
C++
fudalejt/SFML-game
/SFML game/SFML/VertexHitbox.cpp
UTF-8
1,976
2.8125
3
[]
no_license
#include "VertexHitbox.h" #include "MathUtilities.h" #include <iostream> VertexHitbox::VertexHitbox(sf::VertexArray& vertexAr): vertexAr(vertexAr), linPar(std::vector<LinFuncParam>(vertexAr.getVertexCount())) { } VertexHitbox::~VertexHitbox() { } bool VertexHitbox::isContaining(const sf::Vector2f& point) { sf::...
true
0147751f98be11ef13c5dfb5e3e2713780c7fa6e
C++
Infamous0192/competitive-programming
/classical/HANGOVER.cpp
UTF-8
270
2.578125
3
[]
no_license
#include <stdio.h> int main() { float c; scanf("%f", &c); while (c) { float len = 0.00; int n = 0; while (len < c) { n++; len += 1.00 / (1.00 + n); } printf("%d card(s)\n", n); scanf("%f", &c); } return 0; }
true
bee23c7889f280449ca5cc1cbfbfa8578b474573
C++
hlohse/sound-glove
/software/common/Serializer.h
UTF-8
476
2.59375
3
[]
no_license
#ifndef SERIALIZER_H_ #define SERIALIZER_H_ #include "SharedPointer.h" #include "Serialization.h" class Serializer { public: Serializer(const Serialization& serialization); void serialize(const uint8_t value, const int bits = 8); void serialize(uint8_t* buffer, const int length); int size() const; private: ...
true
93c5041c7b21a69101707b51448a3b1e15d0d647
C++
Igor-amateur/mvp-for-license-service-project
/Windows_C++dll_client/DLLControlLicense/file_parser.h
UTF-8
536
2.5625
3
[]
no_license
#ifndef FILE_PARSER_H_INCLUDED #define FILE_PARSER_H_INCLUDED #include <iostream> #include<string> struct TargetPoint { bool is_parsed_ = false; int port_; std::string ip_addres_; double time_dur_; TargetPoint() = default; explicit TargetPoint(int port, std::string ip_addres, double time_dur); void SetPor...
true
6bddcb81e05e0bf2fe454d7ea5473f081bb9e198
C++
trnthsn/VongLapPractice
/bai27.cpp
UTF-8
221
2.734375
3
[]
no_license
#include <iostream> using namespace std; int main() { string number[] = {"khong", "mot", "hai", "ba", "bon", "nam", "sau", "bay", "tam", "chin"}; int n; cin >> n; if (n >= 0 && n <= 9) cout << number[n]; }
true
d3d832bddcb971e5bb7a9359f4b1632b76c97909
C++
lkesteloot/weekend-ray-tracer
/src/ray/Texture.h
UTF-8
261
2.859375
3
[ "Apache-2.0" ]
permissive
#ifndef TEXTURE_H #define TEXTURE_H #include "Vec3.h" // Interface for a procedural texture. class Texture { public: // Use u,v for 2D textures, p for 3D textures. virtual Vec3 value(float u, float v, const Vec3 &p) const = 0; }; #endif // TEXTURE_H
true
195adc2ef8ea1fcff0adcde98c024b646da903e5
C++
Sopel97/chess_pos_db
/src/chess/ReverseMoveGenerator.h
UTF-8
44,995
2.8125
3
[ "MIT" ]
permissive
#pragma once #include "Bitboard.h" #include "CastlingTraits.h" #include "Chess.h" #include "Position.h" #include "data_structure/FixedVector.h" #include "enum/EnumArray.h" namespace movegen { struct PieceSetMask { bool pawn; bool knight; bool lightSquareBishop; bool darkSquar...
true
7583ac84b7390779b09544dae29c3a4f470a15fc
C++
N-Magi/ArduinoWriter
/include/eeprom.h
UTF-8
390
2.53125
3
[ "MIT" ]
permissive
#include <Arduino.h> #include <Wire.h> class eeprom { private: /* data */ public: eeprom(/* args */); void WriteByte(uint16_t addr,uint8_t data); bool WritePage(uint16_t addr,uint8_t* data); uint8_t ReadByte(uint16_t addr); uint8_t* ReadBytes(uint16_t addr, int size); ~eeprom()...
true
6bb14e5eeb79f86d12e14e681befe33d4f64f62d
C++
cheon7886/ArduinoBox
/examples/Rokit/Hunoi/Apps/WalkFish/WalkFish.ino
UTF-8
1,378
2.703125
3
[]
no_license
#include <Servo.h> #define LedPin_01 8 #define LedPin_02 9 #define LedPin_03 10 int light = 0; int wait = 120; Servo servo1; Servo servo2; void setup() { pinMode(LedPin_01, OUTPUT); pinMode(LedPin_02, OUTPUT); pinMode(LedPin_03, OUTPUT); pinMode(24, INPUT_PULLUP); servo1.attach(16); // attaches the se...
true
df6b3d6e5144805013a61d9f9005cbd260a5c02c
C++
WillGetDream/ParticleLinked
/mainWithoutwindow.cpp
UTF-8
2,829
3.28125
3
[]
no_license
#include <iostream> #include <stdio.h> #include <assert.h> #include <time.h> static void DRAW(float x, float y) { } class Particle { public: Particle* getNext() const { return state_.next; } void setNext(Particle* next) { state_.next = next; } Particle() : framesLeft_(0) {} bool...
true
f10844a6373877eb5e74de91fc4cfd83930f286c
C++
carsongmiller/orbit
/orbit/util.h
UTF-8
1,045
2.890625
3
[]
no_license
#ifndef UTIL_H #define UTIL_H class Star; class Galaxy; //converts a radian value to degrees double rad_to_deg(double r); //converts a degree value to radians double deg_to_rad(double d); //returns a double between low and high //if neg = true, returned value has 50% chance to be negative double randBound(double ...
true
e44da5a260b63135d8bc0589ecf806adf1c8aae3
C++
Kuree/hermes
/src/process.hh
UTF-8
3,295
3.09375
3
[]
no_license
#ifndef HERMES_PROCESS_HH #define HERMES_PROCESS_HH #include <condition_variable> #include <cstdio> #include <functional> #include <future> #include <memory> #include <mutex> #include <queue> #include <string> #include <thread> #include <utility> #include <vector> // forward declare namespace subprocess { class Popen...
true
6f7410d901941c5f34495db6fcaabab04a4f1730
C++
Makaronodentro/imperial
/cracking_the_coding_interview/2_linked_lists/lists.h
UTF-8
932
3.765625
4
[]
no_license
#ifndef LISTS_H #define LISTS_H #include <iostream> template <typename T> struct Node{ Node* next; T x; }; template <typename T> class SinglyLinkedList { private: Node<T>* root; public: SinglyLinkedList(T _x){ root = new Node<T>; root->next = NULL; root->x = _x; last = root;...
true
d65ccfbcca8502363cf75b9a86b2c890c7928498
C++
SaberDa/LeetCode
/C++/390-eliminationGame.cpp
UTF-8
342
2.59375
3
[]
no_license
class Solution { public: int lastRemaining(int n) { int res = 1, distance = 1; while (distance * 2 <= n) { res += distance; distance *= 2; if (distance * 2 > n) break; if ((n / distance) % 2) res += distance; distance *= 2; } ...
true
284df2103fab53c41e888841d37649bcbb8cb573
C++
juanpa1220/AlgoritmosDeBusqueda
/busquedas/main.cpp
UTF-8
1,490
3.8125
4
[]
no_license
#include <iostream> #include "BusquedaSecuencial.cpp" #include "BusquedaBinaria.cpp" #include "BusquedaDeInterpolacion.cpp" using namespace std; int main() { int arr[10]; int num; // recibe 10 numeros que forman el array cout << "Ingrese 10 numeros enteros en orden ascendente\n"; for (int i = 0;...
true
e7fae9f1c8334973405c7a8f35a26398d75ca504
C++
denniskb/merge_fusion
/KinectFission/kifi/util/algorithm.h
UTF-8
3,929
2.625
3
[]
no_license
#pragma once namespace kifi { namespace util { // TODO: Change interface to ptr, size template< typename T > void radix_sort ( T * first, T * last, void * scratchPad ); template< typename T, typename U > void radix_sort ( T * keys_first, T * keys_last, U * values_first, void * scratchP...
true
082851c39fecf22e621b8fd9d2d3784971514bbe
C++
AbdulMajeedkhurasani/OpenGL_Learning
/Instancing.cpp
UTF-8
4,960
2.546875
3
[]
no_license
#include <glad/glad.h> #include <GLFW/glfw3.h> #include "Shaders/Shader2.h" #include <bits/stdc++.h> using namespace std; void framebuffer_size_callback(GLFWwindow* window, int width, int height); void processInput(GLFWwindow *window); GLFWwindow* initialize(); // settings const unsigned int SCR_WIDTH = 1366; cons...
true
1d468ca41744d6482948eceb99f0e84a5f4fc1f7
C++
OnyxKnight/Labs
/1021Lab/lab9/money.cpp
UTF-8
1,436
3.46875
3
[]
no_license
/************************* *Joseph Barton *CPSC 1021-004, F16 *Lab 9 *jbarto3 **************************/ #include <iostream> #include "money.h" using namespace std; // default constructor money_t::money_t() { dollars = cents = 0; } // Regular constructor money_t::money_t(double amt) { if (am...
true
b609f6a5cacde04249572eb3d7517c22be1657ce
C++
FlashPanda/c_cpp
/directory.cpp
UTF-8
630
3.375
3
[]
no_license
#include <unistd.h> #include <iostream> int main () { char dir_name[] = "/tmp/this/is/a/test"; int result = access (dir_name, 0); std::cout << "判断的目录:" << dir_name << std::endl; if (result == 0) std::cout << "目录存在,result的值为0" << std::endl; else std::cout << "目录不存在,result的值为-1" << std::endl; char dir_nam...
true
97fb4cba3c7871c83325560336df2ad3a3bcd031
C++
cskilbeck/MakeTheWords
/Source/Base/ScopedObject.h
UTF-8
716
3.140625
3
[]
no_license
////////////////////////////////////////////////////////////////////// #pragma once ////////////////////////////////////////////////////////////////////// template<typename T> struct ScopedObject { explicit ScopedObject(T *p = 0) : mPointer(p) { } ~ScopedObject() { SafeRelease(mPointer); } bool IsNull(...
true
3b9f4c4f111565b362157985b45d7dbe9d1e2a8b
C++
SDG98/Capstone-Graphics
/PizzaBox/Animation/AnimEngine.cpp
UTF-8
673
2.609375
3
[]
no_license
#include "AnimEngine.h" #include <algorithm> using namespace PizzaBox; std::vector<Animator*> AnimEngine::animators; bool AnimEngine::Initialize(){ return true; } void AnimEngine::Destroy(){ animators.clear(); animators.shrink_to_fit(); } void AnimEngine::Update(float deltaTime_){ for(auto& animator : animato...
true
27084b6a981f7edefb581f8fb151b2cb6b3c6bd1
C++
warvair/bulletscript
/include/bsEmitterDefinition.h
UTF-8
2,470
2.90625
3
[]
no_license
/* BulletScript: a script for firing bullets. See /doc/license.txt for license details. */ #ifndef __BS_EMITTERDEFINITION_H__ #define __BS_EMITTERDEFINITION_H__ #include <vector> #include "bsPrerequisites.h" #include "bsObjectDefinition.h" #include "bsAffector.h" namespace BS_NMSP { class ParseTr...
true
4c3c83edfec22101c05691632f7f24e23c94b561
C++
yuanyiyixi/C--
/file/ex.cpp
UTF-8
534
2.796875
3
[]
no_license
#include <iostream> #include <fstream> #include <stdlib.h> using namespace std; int main() { char buf[256]; ifstream examplefile ("example.txt"); if (!examplefile.is_open()) { cout << "Error opening file" << endl; exit (1); } while(!examplefile.eof())//eof()会多读一次 //while(examplefile.peek() != EOF)//peek()不会...
true
c043c2d990ad61434b6d7c6ac162337c380d428e
C++
Dragon2050/All-Code
/modular multiplicative inverse update.cpp
UTF-8
993
3.5625
4
[]
no_license
#include<bits/stdc++.h> using namespace std; int x; int check_prime(int mod) { int check=0; int root=sqrt(mod)+1; for(int i=2;i<=root;i++) { if(mod%i==0) { check=1; break; } } return check; } int bigmod(int number,int power...
true
0ec4d62b351a99a6fb4793bee3e9fb8c4d2b2c24
C++
ramdotram/BST
/src/CNode.cpp
UTF-8
4,187
2.71875
3
[]
no_license
//#include "stdafx.h" #include <iostream> #include "BstUtility.h" #include <cstring> #include <algorithm> // std::sort #include <vector> using namespace std; #include <atlstr.h> #include "CNode.h" namespace krian_bst { CNode::CNode(char *pName, char cColor): m_nSize(1), m_unNodeID(1) { strcpy...
true
4de43d1b47d0bcbc38006bee338754bc505a61c0
C++
twobrowin-study/coursera
/Algorithmic Toolbox/week2_algorithmic_warmup/1_fibonacci_number/fibonacci.cpp
UTF-8
1,120
3.453125
3
[]
no_license
#include <iostream> #include <cassert> #include <cstdint> #include <cstring> uint64_t fibonacci_naive(uint64_t n) { if (n <= 1) return n; return fibonacci_naive(n - 1) + fibonacci_naive(n - 2); } uint64_t fibonacci_fast(uint64_t n) { if (n <= 1) return n; uint64_t prev = 1; uint6...
true
d0caeafb3d7a98c0b27fd626dbf9ce85ecb44258
C++
DavidParkerDr/PixelGrid
/pixeltest/Shape.h
UTF-8
2,355
3.4375
3
[]
no_license
#ifndef SHAPE_H #define SHAPE_H class Shape { private: String mName; uint32_t mColour; uint32_t * mCells; uint16_t mRows; uint16_t mColumns; uint16_t mNumCells; uint16_t mX; uint16_t mY; public : Shape(String pName, uint32_t pColour, uint16_t pRows, uint16_t pColumns) { ...
true
f66f51a8043f645a87e8e12df9270aaefb2fd05b
C++
YuseqYaseq/Biblioteka
/AnimationTemplate.h
UTF-8
547
2.625
3
[]
no_license
//AnimationTemplate.h #pragma once #include "Texture.h" namespace PORTECZKI { class CellID { public: int X; int Y; }; class AnimationTemplate { public: AnimationTemplate(); ~AnimationTemplate(); void Initialize(Texture* pTexture, int iCellWidth, int iCellHeight); fRect GetFrame(int iCellX, int i...
true
0a5460a85fc399f56f9b8ba979032d64eb299c3c
C++
F1xx/Shaders-Megaman
/Game/Source/GameObjects/Player.cpp
UTF-8
2,633
2.5625
3
[]
no_license
#include "GamePCH.h" #include "Game/Game.h" #include "Mesh/Mesh.h" #include "GameObjects/GameObject.h" #include "GameObjects/Player.h" #include "GameObjects/PlayerController.h" #include "Mesh/SpriteSheet.h" #include "../Scenes/Scene.h" #include "../Physics/PhysicsWorld.h" struct RayCastResultCallback : public b2RayCa...
true
dbb7254df5433a0a252c7c5195d6269dcab0ef75
C++
pluto27351/Particles
/ParticleSystem/Classes/CParticle.cpp
BIG5
22,709
2.78125
3
[]
no_license
#include <cmath> #include "CParticle.h" // ھڭOPɶp delta time 첾tq Aনù첾 // ] 2.5 @Ӥlqṳ̀W貾ʨ̤U, ]NO 720 PIXEL // 720 PIXEL = 0.5*9.8*2.5*2.5 m => 1M = 23.5102 PIXEL // ]Y bUt, ҥHOn[Wt, NV #define FALLING_TIME 2.5f #define MAX_HEIGHT 720.0f #define PIXEL_PERM (2.0f*MAX_HEIGHT/(9.8f*FALLING_TIME*FALLING_TIME)) #define GRA...
true
6f087b2af769ecd68f16388eea365f3aa779fc67
C++
Aash2802/ShaderManipulation_Task-2
/Task2ShaderProject/AnalogPinCodes/AnalogPinCodes.ino
UTF-8
848
3.59375
4
[]
no_license
int AnalogPin0 = A0; //Declare an integer variable, hooked up to analog pin 0 int AnalogPin1 = A1; //Declare an integer variable, hooked up to analog pin 1 int AnalogPin2 = A2; void setup() { Serial.begin(9600); // Begin Serial Communication with a baud rate of 9600 } void loop() { // New variables are declared ...
true
5dfb2f89f2ab156e0e52b2569137e5fdf6aaed9e
C++
b3n3m/cpp-first-steps
/factorial_project/to_int.cpp
UTF-8
318
3.09375
3
[]
no_license
#include <sstream> #include <stdexcept> #include <string> #include "factorial.hpp" using namespace std; int to_int(char* text) { stringstream input{text}; int n; input >> n; if (input.fail() || !input.eof()) { throw invalid_argument{string{"Argument '"} + text + "' has wrong format!"}; } return n; }
true
0859c3804107a634987bef71eb709535a9e9bfcf
C++
zsebastian/Algoritmer_Datastrukturer
/TravelingSalesman/TravelingSalesman/BranchAndBound.h
UTF-8
4,405
2.65625
3
[]
no_license
#pragma once /* Reads: http://lcm.csa.iisc.ernet.in/dsa/node187.html */ #include "Graph.h" #include <vector> #include <utility> #include "Path.h" namespace tsp { namespace algorithm { /* My kingdom for a friend function! */ template <class T, template <class> class MatrixRep, template <class, template <class>...
true
8e368afa483f07e8ffcf50f4e833e526873133ee
C++
melon-li/cpp_course
/test9-5.cpp
UTF-8
1,183
2.828125
3
[]
no_license
#include <iostream> #include <set> #include <stdio.h> #include <stdlib.h> using namespace std; void solve(const set<pair<int, int> > &record, int power, int id){ set<pair<int, int> >::iterator ptr, fo, ba; ptr = record.find(make_pair(power, id)); fo = record.end(); fo--; if(ptr =...
true
e41e0fedc4dcc306c83fd3f0a7eb5898297f6af1
C++
googleplexplex/FakeTypes
/FakeTypesProject/fakeBool.hpp
UTF-8
3,448
2.984375
3
[]
no_license
#pragma once #include "registerCore.hpp" class fakeBool : public registerableClass { public: bool val; fakeBool(bool _val, const char* name, bool codeLine) : registerableClass(boolType, name, codeLine) { val = _val; } fakeBool(const char* name, bool codeLine) : registerableC...
true
68b8175c3e8753ea199caaf839f25df7ef1bec06
C++
ShreyasP7495/DP-2
/ques22.cpp
UTF-8
667
3.203125
3
[]
no_license
Time Complexity-O(n*m) Here 'n' is the amount and 'm' is the size of the input vector HSpace Complexity-O(n) Here 'n' is the amount Did the code run on Leetcode? Yes #include <iostream> #include<vector> using namespace std; class Solution { public: int change(int amount, vector<int>& coins) { vector<int>d...
true
c27ff897fbe77de7fd7c1bb6e437b3e7edc80abb
C++
danegottwald/OpenGL
/src/vendor/include/glm/ext/scalar_common.inl
UTF-8
3,457
2.59375
3
[]
no_license
namespace glm { template<typename T> GLM_FUNC_QUALIFIER T min(T a, T b, T c) { return glm::min(glm::min(a, b), c ); } template<typename T> GLM_FUNC_QUALIFIER T min(T a, T b, T c, T d ) { return glm::min(glm::min(a, b), glm::min(c, d) ); } template<typename T> GLM_FUNC_QUALIFIER T m...
true
e7cfa62241f23f52c4dd739340fb52e4b6f1a251
C++
2109/win32lualib
/oolua/unit_tests/cpp_classes/cpp_function_params.h
UTF-8
2,367
2.703125
3
[ "MIT" ]
permissive
#ifndef CPP_FUNCTION_PARAMS_H_ # define CPP_FUNCTION_PARAMS_H_ # include "oolua_tests_pch.h" # include "gmock/gmock.h" template<typename Specialisation , typename ParamType> class FunctionParamType { public: virtual ~FunctionParamType(){} /**[ValueParam]*/ virtual void value(ParamType instance) = 0; /**[ValuePar...
true
f021a397c4548beca9e9be98ae9feec67b1c65e6
C++
SimonRene/LikeMinecraft
/GameEngine/include/mesh.h
UTF-8
1,589
2.609375
3
[]
no_license
#pragma once #include <vector> #include <string> #include <glm/glm.hpp> #include "../texture.h" namespace GE { enum MeshType { COLORED_MESH, TEXTURED_MESH }; class ShaderProgram; class Mesh { public: virtual void draw(ShaderProgram* shader) = 0; virtual void setupMesh() = 0; protected: unsig...
true
90b7b45aa58ef65d194fffa188564cf9e53d145a
C++
DMLfor/leetcode
/1-10/8_string_to_interger_atoi.cpp
UTF-8
1,454
2.84375
3
[]
no_license
class Solution { public: int myAtoi(string str) { int flag = 0, mark = 0, i = 0; string MIN = "2147483648", MAX = "2147483647"; int dmin = -2147483648, dmax = 2147483647; while(str[i] == ' ' && i<str.size()) i++; // cout<<i<<endl; if(i >= str.size()) ...
true
52f993c5d9daed0142163cc582f11396a69f1685
C++
alienxcn/LeetCodeAcceptedCode
/MEDIUM/[TREE]_987_Vertical Order Traversal of a Binary Tree.cpp
UTF-8
1,017
3.140625
3
[]
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 { public: map<int, vector<pair<int, int>>> m; void dfs(TreeNode* root, int x, int y){ if(root...
true
a9ccd8562e542d227323ac16acba539170f75412
C++
Mohamed-Ali-Mohamed/Chess
/Chess/King.cpp
UTF-8
1,463
2.921875
3
[]
no_license
#include"King.h" #include"ChessBoard.h" #include"GLOBALS.h" vector<Possible_Move> King::move() { ChessPiecePosition current_position; Possible_Move possible_move; /////////////////////////////////////// vector< vector<ChessPiece*> > Board = ChessBoard::GetBoard(); vector<Possible_Move> All_Possible_Positions; cur...
true
8154be001720e256527ddfef31b6efc51aa48d15
C++
nitasn/SearchingAlgoServer
/log_info.cpp
UTF-8
570
2.796875
3
[]
no_license
// // Created by Nitsan BenHanoch on 29/01/2020. // #include <iostream> #include "log_info.h" using namespace std; class IgnoreStream : public ostream { public: IgnoreStream() : ostream(nullptr) {} IgnoreStream(const IgnoreStream &) : ostream(nullptr) {} }; template<class T> const IgnoreStream &operator<<(...
true
c20fdf1fa67d4ef34b9460279ba439f63ec2e48b
C++
snoplus/oxsx
/src/fitutil/EventSystematicManager.cpp
UTF-8
749
2.71875
3
[]
no_license
#include <EventSystematicManager.h> #include <EventSystematic.h> #include <Event.h> void EventSystematicManager::Clear(){ fSystematics.clear(); } void EventSystematicManager::Add(EventSystematic* sys_){ fSystematics.push_back(sys_); } const std::vector<EventSystematic*>& EventSystematicManager::GetSystemat...
true
4068166ff65b684c7eacdd58ed7a00a0990188bc
C++
mdepp/3d-rendering
/3D Rendering/GameEngine.cpp
UTF-8
4,370
2.53125
3
[]
no_license
#include "GameEngine.h" GameEngine::GameEngine() { if (SDL_Init(SDL_INIT_VIDEO) < 0) { cerr << "Error in GameEngine::GameEngine() - " << SDL_GetError() << endl; } else { window = NULL; window = SDL_CreateWindow("3D Rendering", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SD...
true
749d86e26cc8e8e8cbbb54d47d0fe1486ecefd77
C++
FunnyPhantom/ACM_SUMMER_CAMP
/Training/week_4_classroom/entekhab.cpp
UTF-8
775
2.53125
3
[]
no_license
// // Created by Mohamad on 8/5/2018. // #include <bits/stdc++.h> using namespace std; #define ll long long const int max_nk = 1003; ll dp[max_nk][max_nk]; ll peymane = 1e9 + 7; void init() { for (int i = 0; i < max_nk; ++i) { for (int j = 0; j < max_nk; ++j) { dp[i][j] = -1; } ...
true
fd9019a8d7a7f448426155fb9da9060b71fcd765
C++
thomas-westfall/labs-136
/project1/sum.cpp
UTF-8
340
3.28125
3
[]
no_license
//Thomas Westfall //Lab 1 CSCI 135 #include <iostream> using namespace std; int main() { int val; //current value int ans = 0; //sum of the values while(cin >> val) { // While there are still values to add ans = ans + val; //adds the integer to the current sum } cout<<ans<<endl; //print the ans...
true
2835f9ca3af9232767ce5500848e989a50c2fa35
C++
MINDS-i/MINDS-i-LaserTarget
/src/sample.cpp
UTF-8
1,358
2.75
3
[ "Apache-2.0" ]
permissive
#include "sample.h" sample::sample() :m_win_start_time(0), m_num_values_read(0), m_win_span(0) { ; } sample::~sample() { ; } bool sample::Init(unsigned long timer, unsigned long win_span) { m_win_span = win_span; reset(timer); } void sample::reset(unsigned long timer) { m_win_start_time = timer; m...
true
8abd8bbfca1c1cf6ff2a6aad6a75401aab4922be
C++
jeremy-coulon/boostgeometryvector
/include/BoostGeometryVector/strategies/cartesian/length_pythagoras.hpp
UTF-8
12,140
2.53125
3
[ "BSL-1.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Copyright Jeremy Coulon 2012-2013. // 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) #pragma once //=========================== //== BoostGeometryVector == //=========================== ...
true
4c9f9a996c08d978be14988bf6a6a03419a11213
C++
araafario/opencv_learn
/opencv_10_detectionClick/main.cpp
UTF-8
5,708
2.734375
3
[]
no_license
#include <iostream> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace cv; using namespace std; bool enable,clicked; Mat imgOriginal; int iLowH = 0; int iHighH = 179; int iLowS = 0; int iHighS = 255; int iLowV = 0; int iHighV = 255; String control = "Control"; String orig...
true
68ce7a1dd3ef8a53cd360e589c5430f54d75b412
C++
phillipchan124/Program-Design-Data-Structures
/Lab13/MySortableStaticArray.cpp
UTF-8
2,240
3.46875
3
[]
no_license
// Lab 13a, Write A Sortable Array Class Template // Programmer: Kwun Hang Chan // Editor(s) used: Xcode // Compliers(s) used: Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) #include <iostream> using namespace std; #include <vector> #include <cstdlib> #include <fstream> #include "SortableStaticArr...
true
533bc3973df4790f1dd560e5f122e6d7f381ce93
C++
MinhazRahman/CPPBasics
/arrays/linearSearch.cpp
UTF-8
522
4
4
[]
no_license
#include <iostream> using namespace std; //write a program to find an element in an array using linear search int search(int[]); //returns the index where the element is found otherwise returns -1 int search(int *arr, int n, int x) { for (int i = 0; i < n; i++) { if (arr[i] == x) { return i; } ...
true
17635ec8180805a343174a0bf415767897e61b70
C++
schme/KoomGL
/src/ks_glutils.cpp
UTF-8
3,559
2.78125
3
[]
no_license
#include "ks_glutils.h" #include <assert.h> #include <stdlib.h> #include <iostream> #include <string> #include <fstream> #include <sstream> #define PRINT_SHADER_ERROR( shader )\ do {\ GLint logSize = 0;\ glGetShaderiv( shader, GL_INFO_LOG_LENGTH, &logSize);\ GLchar *errorMessage = (GLchar*)mal...
true
5c4a02063bfbf6836a7f11cf940ce8758abc2886
C++
luni64/TeensyTimerTool
/src/API/baseTimer.cpp
UTF-8
616
2.546875
3
[ "MIT" ]
permissive
#include "baseTimer.h" //#include "Arduino.h" #include "types.h" namespace TeensyTimerTool { BaseTimer::BaseTimer(TimerGenerator *generator, bool periodic) : timerGenerator(generator) { this->timerGenerator = generator; this->timerChannel = nullptr; this->isPeriodic = per...
true
9186a2620dcd1c796a1793863416c815763b36b2
C++
p-gonzo/cpp_practice
/chp12/listing_12_10.cpp
UTF-8
294
3.234375
3
[]
no_license
#include <iostream> #include <string> class Display { public: void operator () (std::string input) const { std::cout << input << std::endl; } }; int main() { Display displayFuncObj; displayFuncObj("Hello"); displayFuncObj.operator()("World"); return 0; }
true
0a33c1cd47b854fe6b0a338beb53186f03f7345f
C++
akin666/bolt
/lib/core/component/property.hpp
UTF-8
1,646
2.90625
3
[]
no_license
/* * property.h * * Created on: 14.10.2011 * Author: akin * * Property is like the Model from ModelViewController pattern. * Property adds some properties to the entity, once attached, the entity * has as set of data, bound to it, inside the Property.. * The arrangement of the da...
true
5081c9064bf6723fdf31c032c906fec89a6b7800
C++
dantlz/VERY_OLD_Academic_Projects
/Undergraduate_SecondYear/CSCI104/HW3: Array List, Stack, Copy Constructor, Operator Overloading/boolexpr.cpp
UTF-8
7,736
3.25
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <map> #include <cstdlib> #include <utility> #include <cctype> #include "stackint.h" #include <sstream> using namespace std; bool toBool(char character); void printTruth(bool truth, const string t, const string f,string error); int main(int argc, char* ...
true
e7eec7b4ab4db7a970af3d27150f1b6aa920dffa
C++
mju/acm
/107.cpp
UTF-8
647
3.28125
3
[]
no_license
#include <iostream> using std::cout; using std::cin; using std::endl; #include <cmath> int exponent(int &a,int &b) { int i,j; for (i=1;i<=b;i++) for (j=1;pow(i+1,j)<=a;j++) if (pow(i+1,j)==a && pow(i,j)==b) { a=i+1,b=i; return j; } } void count(int &a,int &b) { int exp; ...
true
274d3429c7136fa62e937e52272d0b80d9055116
C++
mlaniewski/SPA
/src/PQL/Field.cpp
UTF-8
1,864
3.015625
3
[]
no_license
#ifndef _STDLIB_H_ #include <stdlib.h> #endif #include <iostream> #include <sstream> #include "Field.h" Field::Field() { this->nazwaProcedury = false; this->nazwaZmiennej = false; this->wartosc = false; this->statement = false; } Field::Field(string type, string value) { this->type = type; this->value = value; ...
true
e48e29408c54da0c665d06469da5a699421180ef
C++
AliTaheriNastooh/Time-Series-Motifs
/Phase 2/Project2/saxquantizer.hpp
UTF-8
7,785
2.71875
3
[ "MIT" ]
permissive
/* Copyright (c) 2014 Mohamed Elsabagh <melsabag@gmu.edu> 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, modify, mer...
true
497efc8d084106ab93daf081da85f8e41556f51e
C++
svetthesaiyan/uni-projects-1st-year-2nd-trimester
/2021.02.26 Exercise 7/exercise_7.cpp
UTF-8
1,054
3.25
3
[]
no_license
/* Да се напише програма, в която са дефинирани низове със стойности ТМ и Телематика. * Във вторият низ да се копира стойността на първия низ като се използва вградената функция за копиране. * Да се отпечатат стойностите на низовете преди и след копирането. */ #include <iostream> #include <cstring> using namespace s...
true
b8799204b2c11eddd874089a5095c82c08210c92
C++
aman-aman/Algorithms
/count-divisior.cpp
UTF-8
556
3.640625
4
[]
no_license
#include <bits/stdc++.h> using namespace std; /* aman kumar jha This algorithm count the number of divisors of a number in O(sqrt(n)) time. */ int countdivisor(int n) { int c=0; for (int i=1; i<=sqrt(n); i++) { if (n%i==0) { if (n/i == i) c++; ...
true
4e9fd37ea4c769332a8d97a5c39e88fd1e6c96dc
C++
delecui/oneAPI-samples
/DirectProgramming/DPC++/ProjectTemplates/Hello_World_GPU/src/main.cpp
WINDOWS-1252
864
2.578125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
//============================================================== // Copyright 2020, Intel Corporation. All rights reserved. // // SPDX-License-Identifier: MIT // ============================================================= #include <iostream> #include <CL/sycl.hpp> using namespace cl::sycl; int main() { // GP...
true
3ca4210df71b3dd57d63a8701078f1d3aace7585
C++
cajet/Leetcode
/my-leetcode-master/96.cpp
UTF-8
321
2.734375
3
[]
no_license
class Solution { public: int numTrees(int n) { int* G = new int[n+1]; fill(G, G+n+1, 0); G[0]=G[1]=1; for (int i = 2; i <= n; i++) { for (int j = 1; j <= i; j++) { G[i] += G[j-1]*G[i-j]; } } int ans = G[n]; delete[] G; return ans; } }; ...
true
106625f13c4ec7bc9dff72d9e85e9f79aaf8f97d
C++
limziwen/Pokemon
/Player.h
UTF-8
530
2.796875
3
[]
no_license
#pragma once #ifndef Player_H #define Player_H #include "Pokemon.h" #include "string" using namespace std; class Player { private: Pokemon PokemonArray[6]; //need pointer to hold location of next free space string name; int ptr; //Holds positon of next empty space public: Player(); //set ptr ...
true
2a349cf03debb13171ab559ad8e008d66512a90a
C++
DoviWidawsky/dovi_proj
/Utils.cpp
UTF-8
1,152
3.125
3
[]
no_license
// // Created by ori on 1/12/19. // #include "Utils.h" string Utils::coordinatesToString(vector<string> crdnts) { string c1, c2 = crdnts[0]; string path; for (int i = 1; i < crdnts.size(); ++i) { c1=c2; c2=crdnts[i]; if(this->getRowCoordintae(c1)-1==this->getRowCoordintae(c2)){ ...
true
78656c3662cff58b8bed1cc89d32f0548347747c
C++
dfavato/bh_dynamics
/LineSensor.h
UTF-8
772
3
3
[]
no_license
#ifndef LineSensor_h #define LineSensor_h #include "GenericSensor.h" class LineSensor : public GenericSensor { int state; // estado do sensor, sobre ou fora da linha int line_threshold; // limiar para decidir que o sensor está sobre a linha int offline_threshold; // limiar para decidir que o sensor está fora da...
true
c09bf0498a1c658f9c9a97548cef421c44655696
C++
ak566g/Data-Structures-and-Algorithms
/Recursion/14_StairCase.cpp
UTF-8
508
3.578125
4
[]
no_license
// A child is running up a staircase with N steps, and can hop either 1 step, 2 steps or 3 steps at a time. // Implement a method to count how many possible ways the child can run up to the stairs. // You need to return number of possible ways W. #include<bits/stdc++.h> using namespace std; int stairCase(int n) { ...
true
47273b66b9c8701f8f3ae12e9188ef8b03bd8fd9
C++
vayct/exercises
/C/problems/11799.cpp
UTF-8
310
2.65625
3
[]
no_license
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int main() { int TC; int z =1; cin >> TC; while(TC--) { int n; int highest = 0; int curr; cin >> n; while(n--){ cin >> curr; highest = max(curr, highest); } printf("Case %d: %d\n", z++, highest); } }
true
cb6ff7ac36d36122db6743f7398217001c7aa2f3
C++
naveenls/Competitive-Coding
/C++/test453.cpp
UTF-8
2,701
2.59375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; const int maxN=2*1e5+10; long long val[3*maxN+1]; long long val1[3*maxN+1]; void Update(long long new_val,int pos,int ind,int start,int end,int f) { if(pos<start || pos>end) return; if(start==end) { if(f==0) { val[ind]=max(val[ind],new_val); } else { ...
true
3b82e621947ba76c4671e7d9a7e6d8301e14db09
C++
solnor/Prosjekt-MAS-234
/Del1/PWMdioder/PWMdioder/main.cpp
WINDOWS-1252
1,158
2.640625
3
[]
no_license
/* * PWMdioder.cpp * * Created: 19/11/2020 12:10:03 * Author : mathi */ #include <avr/io.h> #define F_CPU 1000000UL //Definerer mikrokontrollerfrekvens, //viktig for at delayfunksjonen skal fungere riktig #include <util/delay.h> //Inkluderer delay int main(void) { /* Setter data direction for PB1 og PB2 til...
true
2cd3d600d5064cc3c5bc65540cadfd3e84daf17b
C++
abhishekmishra11/Interest-Calculator
/IT210_Interest-Calculator.cpp
UTF-8
6,830
3.625
4
[]
no_license
//IT210 BUSINESS APPLICATIONS WITH C++ //PROGRAMMER:ADRIAN ALEY //DATE:APRIL 11, 2014 //PROGRAM ASSIGNMENT 4 //Preprocessor directives #include <iostream> #include <iomanip> #include <string> using namespace std; void headerfn(); void namefn(string &first, string &last); int cardfn(int card); void check...
true
7270c23142c30ac003e4469d8243215d08f6d3f2
C++
likeweilikewei/Algorithm-Data-Structure-Implement
/链表/带头结点反转单链表/construct.cpp
GB18030
549
3.34375
3
[]
no_license
#include"head_link.h" NODE construct() { NODE head = new Node; //αʹ NODE current = head; if (NULL == head) { cout << "new Node failed." << endl; exit(-1); } current->next = NULL; // cout << "please input list value.q to quit." << endl; int value; while (cin >> value) { NODE tmp_node = new Node; if...
true
d0c898d149f2d23c14ac75d80ffa4bdf8572a8e5
C++
TolimanStaR/tp-lab-6
/include/Engineer.h
UTF-8
1,238
2.71875
3
[]
no_license
// copyright 2021 Toliman #ifndef INCLUDE_ENGINEER_H_ #define INCLUDE_ENGINEER_H_ #include <string> #include "Interfaces.h" #include "Personal.h" class Engineer : public Project, public Projectbudget, public Personal { public: int calcBudgetPart(float projectPart, int budget);...
true
1d94fc14dd778d35debb96b48fa5611ce9883210
C++
sonaspy/LeetCode
/c/normal_hard/lettercombines.cpp
UTF-8
987
2.75
3
[]
no_license
// author -sonaspy@outlook.com // coding - utf_8 #include <bits/stdc++.h> #define test() freopen("in", "r", stdin) using namespace std; class Solution { public: vector<string> letterCombinations(string digits) { vector<string> res; if (digits.empty()) return res; string s; dfs...
true
7c9b8f02354388aa53d57d5cfb990e0195ecd291
C++
NyamLand/HuntingBrave
/HuntingBrave_client/source/Player.cpp
SHIFT_JIS
6,278
2.515625
3
[]
no_license
#include <vector> #include <fstream> #include "iextreme.h" #include "GlobalFunction.h" #include "Player.h" #include "CSVReader.h" #include "BaseEquipment.h" //*************************************************************** // // PlayerNX // //*************************************************************** //--------...
true
1048cba89a5bcb142620875f9db107422a45f5ae
C++
ChosenxOne/CHOSEN
/test2/test2.cpp
GB18030
1,114
3.171875
3
[]
no_license
/*ջֲʱ 򣨿ɼԣ˽׶Աӹ */ #include<stdio.h> #include<math.h> /*int g_max = 10; int fun(int x, int y) { int a = x + y; int b = x - y+g_max; a= g_min;//ִ£ return a + b; } int g_min = 0;// int main() { int a = 10, b = 20; fun(a, b); int c = g_max + g_min; return 0; }*/ //鶨 /*int main() { int i = 10; int ar[10] = { 10,...
true
f56da81588562a9cc0b87488360c71abcefc2d7d
C++
tatsuya4649/muldia
/muldia/include/name.h
UTF-8
385
2.796875
3
[]
no_license
// <name.h> header is a header that defines the name of the namespace and // allows you to use the abbreviated name. // #ifndef NAME_H #define NAME_H #include <string> // the abbreviations below allo refer to the same namespace #define MULDIA muldia #define MD muldia #define _md muldia namespace _md{ extern std::str...
true
a40d4c7be6360226ba265783954f3032c5abd3bb
C++
dianartanto/PLCArduinoku
/examples/A. Modul IO Aktif High/02. IO Analog/O1_IO_Analog/O1_IO_Analog.ino
UTF-8
1,127
2.546875
3
[]
no_license
/* 1.Rangkaian: Modul Input Output Aktif High. Kaki Input Analog : A4, A5 (kaki A4 dan A5 Arduino) Kaki Output Analog : Y6, Y9 (kaki PWM: D6 dan D9 Arduino) Alat Input Analog : Potensio 2x Alat Output Analog : LED 2x 2.Program: A4 1 ||--------------------{READ ADC}----...
true
4f0b2eb348c093ed0e97637f4ca68956b0fd531f
C++
OctupusTea/Online-Judge
/Zero Judge/b553.cpp
UTF-8
276
2.625
3
[]
no_license
#include <stdio.h> int main( void) { int n = 0, counter = 0; while( ~scanf( "%d", &n) ) { counter = 0; while( n != 1) { if( n % 2 == 1) { n *= 3; n++; } else { n /= 2; } counter++; } printf( "%d\n", counter); } return 0; }
true
0d19fbd4aa9f20b4c6ec353b9a7238a458c3b19a
C++
revsic/HYU-ITE1015
/hw8-1/rectangle_main.cc
UTF-8
605
3.265625
3
[ "MIT" ]
permissive
#include "rectangle.h" #include <iostream> int main() { while (true) { std::string given; std::cin >> given; Rectangle* rect = nullptr; if (given == "nonsquare") { int width, height; std::cin >> width >> height; rect = new NonSquare(width, height...
true
9487aff697fedba35e1a12c3c80ac56eb30c2b36
C++
lemaitre/concepts
/test.cpp
UTF-8
1,340
2.6875
3
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
#include <iostream> #include <list> #include <unordered_set> #include <complex> #include "concepts.h" using namespace Concepts; using namespace std; Common{...Args} void common(Args... args) {} Compatible{A, B} void compatible(A,B){} Incrementable{I} void incr(I){} #define PRINT(...) std::cout << #__VA_ARGS__ ":\t...
true
75294b0d6cb6023dc9c5bb0b64e7de65c5769304
C++
jesusrafaell/task2-3
/task2/tarea2.cpp
UTF-8
7,237
2.921875
3
[]
no_license
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; #define M 1000 //total de hijos //Vampiros int table_vampires[M][M]; string name_vampires[M]; int n_vampires; //numero de vampieros //Busquedas de Vampiros string quest_vampieres[M]; //resultado de las las quest int n_quest; ...
true
0f1df7094f9cf99caf0f9eb4c97a320b2179ff6c
C++
kkathpal153/Spoj-
/familyp.cpp
UTF-8
761
2.75
3
[]
no_license
#include<iostream> using namespace std; int main() { int i,j,k,l,n,s,d,c; cin>>n; int z[100][100]; while(n--) { cin>>s>>c; for(i=0;i<s;i++) cin>>z[0][i]; // till herer insertion is done //first subroutine calculate delta and other dealts^n for(i=1;i<s;i++) for(j=0;j<s-i...
true
6c12582729b02b98ea14485e9cdf647d8854939a
C++
NikitaGrebeniuk/cs50
/Home/hw25.02/task2.cpp
UTF-8
4,887
3.5
4
[]
no_license
#include <stdio.h> #include <iostream> //Подключаем библиотеку, обрабатывающую //стандартные потоки ввода/вывода //#include <conio.h> const int ABCSize = 26; //Размер алфавита const char low_ch[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', '...
true
487bc2ec28dcec16e3924127a85e606fa1703b38
C++
watashi/AlgoSolution
/zoj/30/3051.cpp
UTF-8
4,912
3.046875
3
[]
no_license
#include <vector> #include <iostream> #include <algorithm> using namespace std; class Hand; class Card { friend class Hand; private: int suit, rank; public: friend bool operator<(const Card& lhs, const Card& rhs) { return lhs.rank < rhs.rank; } frie...
true
26151ce624786c8606e0e3229add079a5e9e6e31
C++
lilieming/libpqxx
/include/pqxx/strconv.hxx
UTF-8
10,505
3
3
[ "BSD-3-Clause" ]
permissive
/* String conversion definitions. * * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/stringconv instead. * * Copyright (c) 2000-2019, Jeroen T. Vermeulen. * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, ...
true
5bd3894b2ab0f13ddef214825c53553ba886e2a3
C++
yangjiang123/possumwood
/src/libs/dependency_graph/data.cpp
UTF-8
1,716
3.3125
3
[ "MIT" ]
permissive
#include "data.inl" namespace dependency_graph { Data::Data() { } Data::Data(const Data& d) { m_data = d.m_data; assert(std::string(d.typeinfo().name()) == std::string(typeinfo().name())); } Data& Data::operator = (const Data& d) { // it should be possible to: // 1. assign values between the same types // 2. a...
true
d958391e7eca892d57cadca0f2861a67e6c3404b
C++
kajames2/double_auction
/include/market/market.h
UTF-8
1,635
2.734375
3
[]
no_license
#ifndef _MARKET_MARKET_H_ #define _MARKET_MARKET_H_ #include <map> #include <ostream> #include "market/clearing_queue.h" #include "market/holdings.h" #include "market/market_state.h" #include "market/offer_validity.h" namespace market { class Market { public: Market() : auction_(true, true) {} Market(std::map<...
true
850aa062ea2be9dbb8dc6d8483e013f031000422
C++
4625204/lab3
/lab3.cpp
UTF-8
391
2.78125
3
[]
no_license
#include<iostream> #include<fstream> #include<algorithm> #include<vector> using namespace std; int main() { int i,data,num,sum=0; vector<int> a; ifstream infile("file.in",ios::in); infile>>num; while(infile>>data) { a.push_back(data);} sort(a.begin(),a.end()); reverse(a.begin(),a.end()); for(...
true
b8fbe93b6741e26c12ef1c100bfc5d5d6e3538c1
C++
iamukasa/pookas
/quiz bot/TestBot/code/QuizParticipant.cpp
UTF-8
1,320
2.59375
3
[]
no_license
#include "QuizParticipant.h" QuizParticipant::QuizParticipant(void) { score = 0; name = ""; } QuizParticipant::QuizParticipant( int session ) { sessionID = session; state = QUIZPLAYER_CLICKED; score = 0; } QuizParticipant::~QuizParticipant(void) { } void QuizParticipant::setState( PlayerStat...
true
897aeac7432929530c80ae18270bf5f822b2a41b
C++
hyperpace/study_algo_gangnam
/CNK/codePlus_basic/day01/04_1406_main.cpp
UTF-8
1,054
3.171875
3
[]
no_license
#include <iostream> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; /* 에디터 https://www.acmicpc.net/problem/1406 */ int main() { ios_base::sync_with_stdio(false); string str; int n; stack<char> left, right; cin >> str; cin >> n; for (int i = 0; i < str....
true
1591f9d75c8807094c3a867030b94aab1a88c840
C++
AlirezaMojtabavi/misInteractiveSegmentation
/misDatasetManager/ColorMapBoneCT.cpp
UTF-8
2,025
2.609375
3
[]
no_license
#include "stdafx.h" #include "ColorMapBoneCT.h" #include <boost/range/iterator_range.hpp> ColorMapBoneCT::ColorMapBoneCT(double minThreshold, double maxThreshold) : m_MaxThreshold(maxThreshold), m_MinThreshold(minThreshold) { } void ColorMapBoneCT::SetViewingThreshold( bool usedDefaultThreshold, double minThresh...
true
fd9aa27e2fe89e55996a6acbf6043a5f8a73be3c
C++
ALXlixiong/day_code
/other_code/4_21_test/str/strcat.cc
UTF-8
385
3.234375
3
[]
no_license
#include<iostream> using namespace std; #include<string.h> #include<assert.h> char *my_strcat(char*str1,const char* str2) { assert(str1); assert(str2); char *ret = str1; while(*str1) { str1++;// } while(*str1++ = *str2++) { ; } return ret; } int main() { char str1[14] = "hello "; char *s...
true