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
a15080ebbbff598b86860ac9c963e75082096afe
C++
yonghwankim-dev/C--_ExpenseWrite
/지출기록프로그램/control.cpp
UHC
6,695
3.234375
3
[]
no_license
#include "control.h" #include "AccountException.h" #include "expense_info.h" #include "stream.h" control::control() : num(0) { } void control::write(stream * io) { expense_info exin; // ִ ü exin.expense_input(); // Է¹޾ try { string temp = exin.getDate().substr(5, 2); if (temp < "01" || temp >"12") ...
true
69e80cb5576932ed802eea807a89081a29553ecf
C++
wpinaud/Game_1000pts
/Game_1000pts/Game_1000pts/Joueur.cpp
UTF-8
1,949
3.21875
3
[]
no_license
// // Joueur.cpp // Game_1000pts // // Created by Willis Pinaud on 19/10/2015. // Copyright © 2015 Centrale. All rights reserved. // #include "Joueur.hpp" int Joueur::score(){ int score; //Parcourir le tas et additionner le score de toutes les cartes points //std::add(tas.begin(),tas.end(),add_score) ...
true
e9b2875c6434c9f7258a5a5e2b90ec8ad248615e
C++
cimplesid/Numerical-method-solution
/forward.cpp
UTF-8
838
2.671875
3
[]
no_license
#include<stdio.h> #include<conio.h> #include<math.h> main() { int i,n,j,fact=1; float x[20],y[20][20],h,d=1,p,a,f; printf("Enter The Value of n:"); scanf("%d",&n); printf("\nEnter the elements of x,y:"); for(i=1;i<=n;i++) { scanf("%f", &x[i]); scanf("%f",&y[i][1]);} h=x[2]-x[1]; printf("Enter x for wh...
true
d4325caa56bf029457e46aa21e5fa4f03f5ffc67
C++
GauravNITIAN/Algorithms
/Dynamic programing/WordBreak.cpp
UTF-8
1,783
4.03125
4
[]
no_license
#include<iostream> #include<string.h> using namespace std; /* This problem is to solve the word break problem which means you are given a sentence without spaces then you need to check whether that sentence exists after breaking them in words. Basically we need to check that all characters that forms a wo...
true
4cc1f8feb5e20f61d41e477705e4a50060c59ff8
C++
fake-cheater/hardware-id-generator
/implementation/version.cpp
UTF-8
2,326
3.203125
3
[]
no_license
#include "version.hpp" #include "log.hpp" #include <algorithm> #include <iterator> #include <sstream> #include <vector> namespace system_info { Version::Version( const std::string& versionStr ) { *this = GetVersionFromString( versionStr ); } std::string Version::ToString() const { return std::to_string( Major...
true
6ccf245267edf330b241ba221b77ec7d0014702b
C++
mikeqcp/superseaman
/Material.h
UTF-8
1,326
2.78125
3
[]
no_license
#pragma once #include "includes.h" class Material { private: string name; GLfloat Ns, Ni, d; glm::vec4 Ka, Kd, Ks; int illum; string map_Kd, map_Ka, map_Ks, map_Kn; public: Material(void); ~Material(void); void setName(string name){ this -> name = name; } void setNs(GLfloat Ns){ this ...
true
bfe348989017ab99b0e1947936f39dfa198f2799
C++
aleafall/DS-A
/pat/a1115.cpp
UTF-8
1,096
3.203125
3
[]
no_license
// // Created by aleafall on 16-10-3. // #include<iostream> #include<map> using namespace std; struct Node { int data; Node *lchild, *rchild; } *root; map<int, int> mp; void preOrder(Node *root, int depth) { if (root == NULL) return; if (mp.find(depth) != mp.end()) mp[depth]++; else mp[depth] = 1...
true
bbecd95b57de9cc556dc9caebbc948499897ec01
C++
luke-peters/COOP_CHESS
/Board.cpp
UTF-8
14,494
3.46875
3
[]
no_license
//Luke Peters: 10204030 //31/05/2021 # include<iostream> # include "Board.h" # include <algorithm> # include <memory> #include <iomanip> #include <tuple> //NO elegant way of doing this //All uncalled squares already have a nullptr void chessboard::set_start_board() { //Resets unique_ptr at relevan...
true
506ffa5e8a44c88113343e2152b472581dd98344
C++
Cocoonshu/FMRadio
/sketch_FMRadio/Button.h
UTF-8
331
2.640625
3
[]
no_license
#ifndef BUTTON_H #define BUTTON_H #include <Arduino.h> class Button { public: Button(int pin); ~Button(); void setOnClickListener(void (*)(int)); void handleClick(); private: void onPinInterrupted(); private: void (*Button::mOnClickListener)(int); int mPin; byte mLastPinValue; ...
true
178620d972fe4d9f7da860f0dcd91a1d4dd2cdd6
C++
MathProgrammer/Hacker-Earth
/Contests/Sprint Challenge 2 - NIT Jalandhar/Programs/Points on a Rectangle.cpp
UTF-8
662
3
3
[]
no_license
#include <cstdio> #define min(a, b) (a < b ? a : b) #define max(a, b) (a > b ? a : b) void solve() { int x1, y1, x2, y2, no_of_points, no_of_internal_points = 0; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); scanf("%d", &no_of_points); while(no_of_points--) { int x, y; ...
true
bc0a06e652fba2ae6dc0d18b74144a0e412b3c1e
C++
260058433/LeetCode
/src/140_WordBreakII.cpp
UTF-8
1,571
3.34375
3
[]
no_license
#include <vector> #include <unordered_set> #include <string> using std::vector; using std::unordered_set; using std::string; class WordBreakII { public: vector<string> wordBreak(string s, unordered_set<string> &wordDict) { int n = s.size(); vector<bool> canBreak(n + 1); canBreak[0] = true;...
true
34801270c614296759057685c631c53df6ba9bf8
C++
aliagestl/treeExercise
/treeExercise/Tree.cpp
UTF-8
1,240
3.640625
4
[]
no_license
#include "Tree.h" #include <math.h> #include <stdlib.h> Tree::Tree() { } Tree::Tree(int lvls) { levels = lvls; int length = pow(2, levels) - 1; int* tree; tree = (int *)malloc(sizeof(int) * length); tree[0] = 1; bool loopDone; while (!loopDone) { //if leftneighbor(index) == -1 //left child (2*index + 1) ...
true
30153f640b28b9bd5c02c6397bd45210787ddd5e
C++
cry20011/algo
/sem3/contest1/taxi.cpp
UTF-8
1,721
3.21875
3
[]
no_license
#include <iostream> #include <vector> class bipart_graph{ private: int A_size; int B_size; std::vector<std::vector<int>> edges; std::vector<int> curr_match; std::vector<int> been_vert; bool koon(int v){ if(been_vert[v] == true) return false; been_vert[v] = true; for(int i = 0; i < edges[v].size();...
true
a774aa121fab93da9d29bf73bc9636532d41685c
C++
lesquoyb/projet_ia
/src/recuit/test_recuit_simule_d2.h
UTF-8
2,806
3.140625
3
[]
no_license
#ifndef TEST_RECUIT_SIMULE_D2 #define TEST_RECUIT_SIMULE_D2 /* teste l'algorithme du recuit simulé pour rechercher le minimum d'une fonction math réelle à 2 variables Pour cette application, l'ensemble des solutions, S = R^2 = {(x,y) avec x dans R et y dans R} */ #include <stdlib.h> /* srand, rand */ #include <...
true
85eabc9e5713295f33e31eec17ee126847ae124d
C++
NurenDurdanaAbha/Nuren
/Online Judge/Codeforces/HURR.cpp
UTF-8
358
2.65625
3
[]
no_license
#include<iostream> #include<stdio.h> using namespace std; int main() { char a[3],b[3],flag=0; int i; cin>>a; for(i=1; i<=5; i++) { cin>>b; if(a[0]==b[0] || a[1]==b[1]) { printf("YES\n"); flag=1; break; } } if(flag==0) ...
true
dd42d8d5fdf8f3cd6c2ed057d010c5506174d437
C++
RomeoV/Analytic-derivative
/Nodes.cpp
UTF-8
8,391
3.25
3
[]
no_license
#include <sstream> #include "Nodes.h" Node::Node() { operator_ = Operator::Node; } Node::~Node() { ; } Operator Node::getOperatorType() const { return operator_; } UnaryNode::UnaryNode (Node_ptr child) : child_(child) { operator_ = Operator::UnaryNode; } UnaryNode::~UnaryNode() { ; } string UnaryNode::...
true
4ed6087d3227a75e33f3b953d3b8b54ec764cca8
C++
SmileyJs/leetcode
/152_maxProductSubArray.cpp
UTF-8
1,043
3.4375
3
[]
no_license
#include <iostream> #include <vector> #include <limits.h> using namespace std; int maxProduct(vector<int>& nums) { int size = nums.size(); if (0 == size) { return 0; } int crtMax = nums[0]; // for (int i = 0; i != size; ++i) { // int max = 1; // for (int j = i; j != size...
true
b58ce757613daaf5564b335df45f2b047b6a98ec
C++
Arjunkhera/Competitive_Programming
/algo+ds/LinkedLists/LinkedList.cpp
UTF-8
2,402
3.984375
4
[]
no_license
#include "LinkedList.h" // Three ways to pass the head pointer // Pass the head pointer by reference : Easiest and will be used throughout the code void insertAtHead(node* &head,int data){ node* newNode = new node(data); newNode->next = head; head = newNode; } // Pass the head pointer and return the changed hea...
true
9aaedbb3cbf98a13a660472538323ade78637d19
C++
SPOTechnology/FourInARow
/C++/trainGenetic/src/weight.h
UTF-8
480
3.078125
3
[]
no_license
#ifndef WEIGHT_H_INCLUDED #define WEIGHT_H_INCLUDED #include <time.h> long double random(double _min, double _max); class Weight { public: void setVal(long double r) { value = r; } long double val() { return value; } void mutate() { if (random(0, 1) < 0.5) { value += random(-0.5, 0.5);...
true
ac59212f0ab891d9681adf463d5ab160ebf99434
C++
pz1971/Online-Judge-Solutions
/HackerRank/Components in a graph.cpp
UTF-8
788
2.515625
3
[]
no_license
#include <bits/stdc++.h> using namespace std ; typedef long long LL ; int n ; int root[30005] ; void init(){ for(int i = 1 ; i <= n + n ; i++){ root[i] = i ; } } int find(int u){ if(root[u] == u) return u ; return root[u] = find(root[u]) ; } void insert(int u, int v){ int a = find(u) ; int b = find(v...
true
ff27a3d18de02b729f2ba2b0e9bc1553a6e41661
C++
tuanpm-oxf/GraphTempp
/GraphGenerator.cpp
UTF-8
1,835
3.140625
3
[]
no_license
#include <iostream> #include <vector> #include <string> #include <stdio.h> #include <stdlib.h> #include <random> #include <fstream> #include <time.h> #include <set> using namespace std; // Số lượng định và tên file output const char * filename = "DenseGraph-100.bin"; const int nVertices = 100; std::random_device rd;...
true
59ace31381d00104a073e2db7897cf3374511898
C++
tylerlthompson/SailCam
/arduino/SailCam_MK5/include/settings/system_configuration.h
UTF-8
1,105
2.65625
3
[]
no_license
#ifndef SYSTEM_CONFIGURATION_H #define SYSTEM_CONFIGURATION_H #define settings_length 15 #include <settings/system_setting.h> struct SettingKeyValuePair { char *key; SystemSetting *value; }; class SystemConfiguration { private: SettingKeyValuePair settings_map[settings_length]; const char* setting...
true
b551a49a51a1f567bd8baf22b137e4c37c5e9d70
C++
noshaba/TrackBall
/ebvassignment01/ueb01_nosh/cutlery/cutlery/cutlery_nosh.cc
UTF-8
12,224
2.96875
3
[]
no_license
#ifdef _WIN32 #define WIN32 #endif #ifdef WIN32 #define _USE_MATH_DEFINES #endif #include <math.h> #include <opencv2/opencv.hpp> #include <stdio.h> #include <assert.h> #include <vector> using namespace std; using namespace cv; typedef double Matrix2x2[2][2]; //************ Interval, DecompositionIntoRegions //! ...
true
515dbe6c18e2046b2b5f77b6ab958e9214f153c0
C++
ild-games/Ancona
/Engine/Src/Ancona/Util2D/Collision/Box3.hpp
UTF-8
1,509
3.359375
3
[ "MIT" ]
permissive
#ifndef Ancona_Util2D_Box3_H_ #define Ancona_Util2D_Box3_H_ #include <SFML/System.hpp> namespace ild { /** * @brief Represents a box in 3rd space with a dimension, position, * and rotation * @author Jeff Swenson */ class Box3 { public: /** * @brief Initialize a 3 dimensional box * ...
true
575ab429b5c046e8546d53def200e5e9493841bc
C++
chenyanhang/chen_yanhang
/chap07/ex_27/main.cpp
UTF-8
427
2.828125
3
[]
no_license
#include <iostream> #include<array> using namespace std; int main() { array<int,1000>n; for(size_t i=0;i<n.size();i++) { n[i]=1; } for(int i=2;i<=999;i++) { int c=0; for(int a=2;c<=999;a++) { n[c]=0; c=a*i; } } for(int i=2;...
true
d276eeec24f0a02a2fcaa5b9d52d58637c8c86c4
C++
nathanPro/MAC5750
/test/helper.cpp
UTF-8
5,388
2.875
3
[]
no_license
#include "helper.h" #include "error.h" #include "parser.h" #include "translate.h" #include "gtest/gtest.h" class HelperTest : public ::testing::Test { protected: TranslationUnit tu; bool no_err; helper::meta_data data; HelperTest() : tu("../input/sample.miniJava"), no_err(tu.c...
true
2debb68f05a6beffd4c5ce5368dbabe4ad9a4558
C++
InsightSoftwareConsortium/ITK
/Modules/Filtering/ImageCompose/test/itkComposeRGBImageFilterTest.cxx
UTF-8
3,273
2.625
3
[ "IJG", "Zlib", "LicenseRef-scancode-proprietary-license", "SMLNJ", "BSD-3-Clause", "BSD-4.3TAHOE", "LicenseRef-scancode-free-unknown", "Spencer-86", "LicenseRef-scancode-llnl", "FSFUL", "Libpng", "libtiff", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-other-permissive", ...
permissive
/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.o...
true
fed54456a7e27ed00e5e5ace0912047b10f4eaed
C++
FauxFaux/tinies
/unrequireadmin.cpp
UTF-8
3,089
2.578125
3
[ "MIT" ]
permissive
#define NTDDI_VERSION NTDDI_VISTA #define _WIN32_WINNT 0x0600 #include <windows.h> #include <iostream> #include <stdexcept> #include <string> #ifndef LOAD_LIBRARY_AS_IMAGE_RESOURCE #define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020 #endif using std::cout; using std::endl; using std::string; void ErrorHan...
true
1213822fbaa38feb54249b2214869f200e1a0397
C++
LastStranger0/PPVIS
/PIVAS.LAB2/PIVAS.LAB2/Fishes.cpp
UTF-8
2,160
3.234375
3
[]
no_license
#include "Fishes.h" #include <iostream> #include <math.h> Fishes::Fishes(): Animals(), dangerous(0), isPredator(0){} Fishes::Fishes(std::string Name, bool isDanger) : Animals(Name), dangerous(isDanger){ if (dangerous == 1) isPredator = 1; if (isPredator == 0) dangerous = 0; } Fishes::~Fishes() { } v...
true
e421e524cdc1cf65e83cf7fa7f5d8723d0febe46
C++
spewspews/modern
/specialize.cpp
UTF-8
374
3.453125
3
[]
no_license
#include <iostream> template <class T, class U> struct Widget { void Foo() { std::cout << "Foo: Generic impl\n"; } void Bar() { std::cout << "Bar: Generic impl\n"; } }; template <> void Widget<int, int>::Foo() { std::cout << "Foo: Specialized impl\n"; } int main() { Widget<double, int> w1; w1.Foo(); w1...
true
6771b98895c560a7f0cc97b34c350a667f37c916
C++
hansoloyi/ass2
/src2/utility/Ray.cpp
UTF-8
3,746
3.25
3
[]
no_license
/* Ray.cpp */ #include "Ray.h" using namespace std; Ray::Ray(VecPoint a, VecPoint b) { this->origin = a; this->vector = b; } VecPoint Ray::intersectTriangle(Triangle triangle) { VecPoint vertex1 = triangle.getV1(); VecPoint vertex2 = triangle.getV2(); VecPoint vertex3 = triangle.getV3(); VecP...
true
fd8e7f539805cd27ccb59ce2590a2d1b4a077120
C++
absorber2018/study_coding
/水仙花素.cpp
UTF-8
282
3.0625
3
[]
no_license
#include <stdio.h> int flower(int t); int main() {int t,n; for(t=100;t<=999;t++) {n=flower(t); if(n==1) printf("%d ",t); }return(0);} int flower(int t) {int a,b,c,d,p; a=t/100; b=(t%100)/10; c=t%10; d=a*a*a+b*b*b+c*c*c; if(d==t) p=1; else p=0; return p;}
true
05d83f6e34e3b88b83f277a217cb3673d3ee90fe
C++
HargovindArora/Programming
/BitMasking/subsets_using_BM.cpp
UTF-8
476
2.953125
3
[]
no_license
#include<iostream> #include<cstring> using namespace std; void filterChars(int n, char a[]){ int j=0; while(n>0){ int last_bit = (n&1); if(last_bit==1){ cout << a[j]; } j++; n=n>>1; } cout << endl; } void range(int n, char a[]){ for(int i=0;...
true
571f6860439f5d2209ade57f73cc3ec7801195ae
C++
201601984/OOP
/week10/vehicle.h
UTF-8
499
2.84375
3
[]
no_license
#ifndef VEHICLE_H #define VEHICLE_H #include <iostream> class vehicle { protected: bool has_name; int wheel_number; int max_speed; public: vehicle(); vehicle(int wheel_number, int max_speed); vehicle(int wheel_number, int max_speed, bool has_name); int get_wheel_number(); int get_get_max_speed(); b...
true
33d613840e9aabb25085d85a8e03924a88ed65f3
C++
ViniciusDeep/Answers-URI-Online-Judge
/Answers/C++/1047.cpp
UTF-8
1,343
2.796875
3
[]
no_license
//Vinicius Mangueira #include <stdio.h> int main() { int a,b,c,d,x,y; scanf("%d%d%d%d", &a, &x, &b, &y); if(a==y && b==y && y==x) { c=x-y; d=24+a-b; printf("O JOGO DUROU %d HORA(S) E %d MINUTO(S)\n", d, c); } else if(a==b && y>x) { c=y-x; d=a-b; ...
true
ca0b78ee52db7a626bce569f5da5afc5d54d17f2
C++
BelfordZ/cpsc3200
/awesome-o/2003/shake.cc
UTF-8
3,446
3.171875
3
[]
no_license
#define PROBLEM 0 /* The problem # here */ #define TEAM 0 /* Your team # here */ #include <iostream> #include <fstream> #include <sstream> #include <string> #include <cstdio> #include <cctype> using namespace std; ifstream in; ofstream out; void solve_problem(); int main(void) { char filename[64]; sprintf(f...
true
d3884caea3c7ba028a222602a990bf31a4ad85c7
C++
NicolasGripont/AutomateArithmetique
/numberexpression.h
UTF-8
332
2.59375
3
[]
no_license
#ifndef NUMBEREXPRESSION_H #define NUMBEREXPRESSION_H #include "expression.h" using namespace std; class NumberExpression : public Expression { private: int value; public: NumberExpression(const int v); ~NumberExpression(); virtual int eval() ; virtual string print() const; }; #endif // NUMBERE...
true
a35ec87cf2ecbd70c97e3498ceed43cc0a1cab5c
C++
mohammadimtiazz/histogram
/histExample/histExample/main.cpp
UTF-8
3,844
2.71875
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <conio.h> #include <cv.h> #include <cxcore.h> #include <highgui.h> using namespace std; int main(){ IplImage *imgA = cvLoadImage("imgC.bmp"); if (imgA) cout << "read image A successfully!" << endl; else{ cout << "Fail to read image A!" << endl...
true
a5317498d9c74665391a94bf7696cd5feba3f3ed
C++
BackupGGCode/alpha-terrain-gen
/TerrainManager.cpp
UTF-8
7,228
3.140625
3
[]
no_license
/* * TerrainManager.cpp * * Manager for the Terrain. * * Dynamically generates new terrain segments and removes existing distant * segments. * * Created on: Jun 3, 2012 * Author: Simon Davies */ #include "TerrainManager.h" #include <Math.h> #include "SDL.h" #include "SDL_thread.h" // How many segments...
true
5bcfde999c0e3537ef8e7d6f7a62dbd5aa724ff3
C++
robmister2/LAB1_NEW
/Lexer.cpp
UTF-8
3,035
3.203125
3
[]
no_license
#include <cctype> #include "Lexer.h" using namespace std; void Lexer::Run(string &inputString) { int lineNumber = 1; int totalLines = 1; //count total lines read for (int i = 0; i < (int) inputString.length(); i++) { if (inputString[i] == '\n') { totalLines++; } } ...
true
fd927d5d0cc74367d19ed0744bafa9a22eabd17a
C++
cginternals/globjects
/source/globjects/include/globjects/base/CompositeStringSource.h
UTF-8
1,202
2.59375
3
[ "MIT" ]
permissive
#pragma once #include <string> #include <vector> #include <globjects/globjects_api.h> #include <globjects/base/Instantiator.h> #include <globjects/base/AbstractStringSource.h> namespace globjects { class GLOBJECTS_API CompositeStringSource : public AbstractStringSource, public Instantiator<CompositeStringSourc...
true
c0b8eb9d8158a2b7f963b0f3a84e8d711723f3d1
C++
vrandakoolwal/Hacker-earth-Problems
/Basics-of-Implementation/COUNTNUMBERS.cpp
UTF-8
579
3
3
[]
no_license
#include <iostream> using namespace std; int numbers(char str[10000], int *p, int count) { // int count=0; // cout<<*p<<endl; count++; for (int i=*p; str[i]<='9'; i++) { *p+=1; } return count; } int main() { int t; cin>>t; while (t--) { int n; ...
true
70a7442634e97ad975e40d1ebbc921073dc9611e
C++
hoaf13/SPOJ_PTIT_DSA
/P167PROD.cpp
UTF-8
1,158
2.5625
3
[]
no_license
#include<iostream> #include<string> #include<sstream> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; string alpha="0123456789"; int vta=-1,vtb=-1,vtc=-1; int a1,b1,c1; for(int i=0;i< a.length();i++) if(a[i]=='?') vta=i; for(int i=0;i< b.length();i++) if(b[i]=='?') vtb=i; for(int i=0;i< c.length();...
true
00895f223f731e4b8bc2df5fe5a414f254b8af14
C++
oisincoveney/PDF-Search-Engine-C-
/Parser/parser.h
UTF-8
2,604
2.71875
3
[]
no_license
#pragma once #include <unordered_set> #include <unordered_map> #include <string> #include <experimental/filesystem> #include <poppler/cpp/poppler-document.h> #include <poppler/cpp/poppler-page.h> #include <poppler/cpp/poppler-rectangle.h> #include <stemmer.h> #include <chrono> #include <sstream> #include <iostream> #...
true
a60ce3461324dfc7fddcca949fe988134841d6d3
C++
nkahile/Tree-Based-Evaluator
/Queue.cpp
UTF-8
3,158
4.03125
4
[]
no_license
#include <iostream> #include <string> #include "Queue.h" //the Queue constructor template <typename T> Queue <T>::Queue(void) :queue_data_(50), queue_size_(0), front_(0), rear_(0) { } template <typename T> Queue <T>::~Queue(void) { //no pointers to delete here } //change...
true
569c8dc508455ebba7a98783117dfb4e29c25d7d
C++
sjtujxwang/3Ddefectdetection
/pylon-5.2.0.13457-x86_64/Samples/C++/ParametrizeCamera_AutoFunctions/ParametrizeCamera_AutoFunctions_Usb.cpp
UTF-8
26,147
2.53125
3
[]
no_license
// ParametrizeCamera_AutoFunctions_Usb.cpp /* Note: Before getting started, Basler recommends reading the "Programmer's Guide" topic in the pylon C++ API documentation delivered with pylon. If you are upgrading to a higher major version of pylon, Basler also strongly recommends reading the "Migrating fr...
true
e9382d64af7fa4b7d6dba23e3951771114f37b33
C++
gregoryjjb/invaders
/src/ofApp.cpp
UTF-8
3,347
2.578125
3
[]
no_license
#include "ofApp.h" #include "Config.h" #include <cstdint> #include <algorithm> #include "Star.h" //-------------------------------------------------------------- void ofApp::setup() { // Spawn world world = new World(); // Spawn player player = (Player*) world->addObject(new Player()); player->setLocation(ofPoi...
true
9cd03ba70c5866324386b2f7a3af156a4fa086ce
C++
hackur/kwm
/kwm/scratchpad.cpp
UTF-8
4,834
2.6875
3
[ "MIT" ]
permissive
#include "scratchpad.h" #include "display.h" #include "space.h" #include "window.h" #include "axlib/axlib.h" #define internal static extern kwm_settings KWMSettings; extern scratchpad Scratchpad; internal inline bool IsScratchpadSlotTaken(int Index) { std::map<int, ax_window*>::iterator It = Scratchpad.Windows.fi...
true
3df53f314afb8fe8d1679da6c4c8e6a23ab3442e
C++
gaivits/code_Kidding
/overlapp.cpp
UTF-8
583
2.953125
3
[]
no_license
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector< pair<int,int> > vec; int sz; int x,y; cin >> sz; int cnt = 0; for(int j = 0;j<sz;j++) { cin >> x >> y; vec.push_back( pair<int,int> (x,y) ); } sort(vec.be...
true
6f7bbcc3f72bbe213644d4f11f214fd28d89b0b7
C++
ravi-kumar7/Power-Programmer
/Recursion/NQueen/code_cpp.cpp
UTF-8
913
3.28125
3
[]
no_license
int board[11][11]; bool isPossible(int n,int row,int col){ for(int i=row-1;i>=0;i--){ if(board[i][col]==1){ return false; } } for(int i=row-1,j=col-1;i<=0,j>=0;i--,j--){ if(board[i][j]==1){ return false; } } for(int i=row-1,j=col+1;i>=0,j<n;i--,j++){ if(board[i][j]==1){ r...
true
4c3b8cac3d800a32a00ee22684a7c36054dbe73c
C++
nfwaldron/CPlayground
/RandomNumberGenerator/RandomNumberGenerator/ExpoGenerator.cpp
UTF-8
686
3.140625
3
[]
no_license
#include "ExponentialGenerator.h" ExponentialGenerator::ExponentialGenerator(){ myLambda = 0.0; } ExponentialGenerator::ExponentialGenerator(double lambda){ myLambda = lambda; } void ExponentialGenerator::setLambda(double lambda){ myLambda = lambda; } double ExponentialGenerator::getLambda(){ return myLambda; } d...
true
3bb20f09f4b6a4ece086f529f514c4e66bf87394
C++
Hide-in-blue/MyPAT
/a1120.cpp
UTF-8
523
2.5625
3
[]
no_license
#include<iostream> using namespace std; int main(){ int n, cnt = 0, visited[40]={0}; cin>>n; for(int i=0;i<n;i++){ int t, sum = 0; cin>>t; while(t){ sum += t%10; t /= 10; } if(visited[sum]==0){ cnt++; visit...
true
4ffe4ca8b655bd5cc2f33858eb5107b6ebcfcdcd
C++
lteacy/maxsum-cpp
/include/maxsum/register.h
UTF-8
4,306
3.15625
3
[]
no_license
/** * @file register.h * This Header defines functions for registering the set of all * variables on which maxsum::DiscreteFunction objects may depend. * * Variables are uniquely identified by a key of type maxsum::VarID and each as * a specified domain size. The purpose of the functions defined in this file ...
true
c20741810069e0e1f2fb56c57a3a81216f34dc5c
C++
shi-mo/aoj
/ITP2_2_D.cpp
UTF-8
827
2.875
3
[]
no_license
#include <iostream> #include <list> #include <vector> using namespace std; int main() { int n, q, query; vector<list<long>> lst; cin >> n; cin >> q; lst.resize(n); while (cin >> query) { int t; cin >> t; switch (query) { case 0: // insert(t, x) int x...
true
f8cc93045335694b3f3956d3db5ddea4a5b73668
C++
soqutto/practice
/AtCoder/ABC137/c.cpp
UTF-8
440
2.546875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; vector<string> S(N); unordered_map<string, int64_t> Smap; for(auto& s: S){ cin >> s; sort(s.begin(), s.end()); Smap[s]++; } int64_t ans = 0; for(auto it = Smap.begin(); it != Smap.end()...
true
282b980af641960ec042c70bb2a6a43fe1475a89
C++
Max5254/RBE-2002-Final-Project
/2002 Robot Code/lib/Ultrasonic-Library-master/examples/ultrasonic/ultrasonic.ino
UTF-8
1,069
3.15625
3
[]
no_license
//Mandatory Includes #include <TimerOne.h> #include <UltrasonicSensor.h> #include <UltrasonicSensorArray.h> #define numOfUltrasonics 3 // not necessary for less than 5 sensors // first, create an Ultrasonic Sensor Array (USA) to receive inputs on pin 2 UltrasonicSensorArray usa(2); // And then create each ultrasonic ...
true
d4555633aee700841e2ac6da1c722fa885994346
C++
milos1397/Project-1
/parallel/ActivationP.hpp
UTF-8
836
3.21875
3
[]
no_license
#ifndef ACTIVATION_HPP #define ACTIVATION_HPP #include <cmath> // Base abstract class for all activation functions. class ActivationFunction { public: virtual double calculate(double x) = 0; }; class Sigmoid : public ActivationFunction { public: double calculate(double x) { return (1 / (1 + exp(-1.0 * x))); } ...
true
30758e35de9a2464ec608f28bc21cbf6fa4f85a4
C++
juliejin/Videogames
/TowerDefense/Source/GameMode.h
UTF-8
1,159
2.65625
3
[]
no_license
#pragma once #include "Actor.h" #include "AudioComponent.h" #include "Spawner.h" #include "Tile.h" #include "HUD.h" class GameMode : public Actor { DECL_ACTOR(GameMode, Actor); public: GameMode(Game& game); void BeginPlay() override; void EndPlay() override; // Get the position that enem...
true
af8bca5c1d1f425487f84a9262dc9311bb125908
C++
AnanyaKumar/symbiotic-rovers
/algorithms/Filters/archive/hellomodule.cpp
UTF-8
704
2.984375
3
[]
no_license
#include <iostream> #include <vector> #include <list> #include <boost/python.hpp> #include <boost/python/stl_iterator.hpp> #include <boost/python/object.hpp> using namespace std; using namespace boost::python; struct World { std::string greet() { return msg; } std::string msg; }; vector<double> to_vector(bo...
true
ec6f5dedbc1bf680a43acdfeb037a3e00433350b
C++
jwakely/Sprout
/sprout/algorithm/search_n.hpp
UTF-8
1,396
2.5625
3
[ "BSL-1.0" ]
permissive
#ifndef SPROUT_ALGORITHM_SEARCH_N_HPP #define SPROUT_ALGORITHM_SEARCH_N_HPP #include <sprout/config.hpp> #include <sprout/iterator/operation.hpp> namespace sprout { // Copyright (C) 2011 RiSK (sscrisk) // 25.2.13 Search template<typename ForwardIterator, typename Size, typename T> inline SPROUT_CONSTE...
true
d26bc5887b05d44879835f4f7598f403c2491e75
C++
colinhp/searchEngine-12
/online/include/net/TcpServer.hpp
UTF-8
861
2.5625
3
[]
no_license
/// /// @file TcpSever.hpp /// @author yangyu/Icot(jobyang@163.com) /// @date 2017-03-18 00:05:58 /// #ifndef __WD_TCPSERVER_H__ #define __WD_TCPSERVER_H__ #include "Noncopyable.hpp" #include "EpollPoller.hpp" #include "Socket.hpp" #include "InetAddress.hpp" #include <string> using std::string; namespace wd { ...
true
2fce11041ffdbb413ac879265714e08c48f26775
C++
Daniel-ef/OIMP_seminars_cpp
/197/seminar11/main.cpp
UTF-8
1,057
3.8125
4
[]
no_license
#include <iostream> class Simple { public: Simple() { std::cout << "1" << std::endl; } Simple(size_t count) : id_(count) { std::cout << "2" << std::endl; } Simple(const Simple& simple) : id_(simple.id_) { std::cout << "3" << std::endl; } Simple(Simple&& simple) : id_(simple.id_) { std:...
true
3baba7638262958ed1db583ffebcd243eab4beb7
C++
SungOuk/test
/shiftregister.ino
UTF-8
592
2.640625
3
[]
no_license
int dataPin = 2; int clockPin = 3; int latchPin = 4; byte data = 0; void setup() { pinMode(dataPin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(latchPin, OUTPUT); } void shiftWrite(int desiredPin, boolean desiredState) { bitWrite(data, desiredPin, desiredState); shiftOut(dataPin, clockPin, ...
true
1d989d231ecde53088bb6cc716277d4824adf8e9
C++
sarah-litz/Data-Structure-Project
/Code/hash.hpp
UTF-8
1,031
3.203125
3
[]
no_license
#ifndef HASH_HPP #define HASH_HPP #include <string> using namespace std; struct hashNode { int key; struct hashNode* next; }; class HashTable { int tableSize; // No. of buckets (linked lists) int collisionCount = 0; hashNode* chainingTable[40009]; //for chaining int intTable[40009]; //for ...
true
458c104f04f9c546c04185cea656fae11633b7cd
C++
AhmedMaher309/MarsExploration
/MarsExploration-OZER/UI/Input.cpp
UTF-8
845
3.09375
3
[]
no_license
#include "Input.h" Modes Input::getMode() { int c; cout << "choose a mode to enter " << endl; cout << "1- interactive \n" << "2-Step-By-Step\n" << "3-Silent\n"; do { cin >> c; switch (c - 1) { case 0: return Modes::Interactive; case 1: return Modes::StepbyStep; case 2: return Modes::Silent; d...
true
db2b3fd4abe076672fa65c8d4f91be93ef1cd921
C++
kostyantyn/unit-e
/src/staking/transactionpicker.h
UTF-8
2,841
2.5625
3
[ "MIT" ]
permissive
// Copyright (c) 2018-2019 The Unit-e developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef UNIT_E_STAKING_TRANSACTION_PICKER_H #define UNIT_E_STAKING_TRANSACTION_PICKER_H #include <vector> #include <amount.h> #in...
true
1240f103f96a68ad03a48e8c7760df09815d90bf
C++
intfloat/AlgoSolutions
/codeforces/CF311/E.cpp
UTF-8
1,780
2.609375
3
[]
no_license
#include <bits/stdc++.h> #define FOR(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long ll; string s; struct Node { int cnt, lcnt, rcnt; Node* ch[2]; Node(): cnt(0), lcnt(0), rcnt(0) { ch[0] = ch[1] = NULL; } }; Node* root = new Node; int from, n; vector<vector<bool> > dp;...
true
1896d55d3d6f3f279a4d35c32ab254a93dc0b627
C++
zalless/modern-cpp-training
/training-2017/examples/EmployeeDb/src/EmployeesDb.hpp
UTF-8
2,168
3.015625
3
[]
no_license
#ifndef EMPLOYEESDB_HPP #define EMPLOYEESDB_HPP #include <unordered_map> #include <vector> enum class Profession { ENGINEER, DOCTOR, LAWYER }; struct EmployeeRecord { std::string name; Profession position = Profession::ENGINEER; int age = 0; int salary = 0; uint64...
true
a5ac18b19dfe2fa32a2f0012823b4c4bf50db3f4
C++
UltraCoderRU/telebotxx
/include/telebotxx/BotApi.hpp
UTF-8
2,697
3.109375
3
[ "MIT" ]
permissive
#ifndef TELEBOTXX_BOTAPI_H #define TELEBOTXX_BOTAPI_H #include "User.hpp" #include "Message.hpp" #include "Update.hpp" #include "SendMessageRequest.hpp" #include "SendPhotoRequest.hpp" #include <string> #include <memory> namespace telebotxx { template <typename RequestType, typename T> void setRequestOption(Reques...
true
ad7344c7895830a43ebfd3b48a87291ec841bc5c
C++
sandychn/LeetCode-Solutions
/Algorithms/Heap/0778-swim-in-rising-water.cpp
UTF-8
1,560
3.078125
3
[ "MIT" ]
permissive
struct Node { pair<int, int> pos; int val; Node(const pair<int, int>& pos, int val): pos(pos), val(val) {} bool operator<(const Node& rhs) const { return val > rhs.val; } }; class Solution { public: static bool inRange(int val, int l, int r) { return l <= val && ...
true
1866e4704ee3100cb1681e2dfd600db4a235e925
C++
2Sangyun/Data-Structure-Practice
/sylee/201214/readfile3.cpp
UTF-8
2,774
2.84375
3
[]
no_license
#include <fcntl.h> #include <iostream> #include <list> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ipc.h> #include <sys/msg.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> using namespace std; void readfile(char *pathName, string &str1, string &str2,...
true
660a82571391ffc023303581f041c8598b074cfd
C++
MalinovayaZaya/Voenmeh-4sem
/system_software-main/pseudo-interpreter/src/ConditionInterpreter/ConditionInterpreter.cpp
UTF-8
3,130
3.125
3
[]
no_license
#include "ConditionInterpreter.hpp" bool execute_logic_expression(std::string str) { math_token result = _execute_expression( variable_controller::instance().fill_string_with_variables(str) ); if (result.type == token_type::number) { return (bool) std::stoll(result.value); } if (result.type == token_...
true
31c2870b279cd83dd180bdb418e824b38f09bc19
C++
mtraja/cpp-playground
/basic-oop-fun/main.cpp
UTF-8
313
3.265625
3
[ "Unlicense" ]
permissive
#include <iostream> using namespace std; class Printer { public: Printer(){ cout << "Creating Printer object. " << endl; } void print(string msg) { cout << msg << endl; } }; int main(){ Printer printer = Printer(); printer.print("Hi cpp!"); return 0; }
true
b5b47c005ffac4bf5f368d3d956319f4201e53ae
C++
jonsim/robin-project
/Common.cpp
UTF-8
2,628
2.75
3
[ "MIT" ]
permissive
#include "Common.h" sint8_t make_sint8_t (const uint8_t b) { return (b - 0xFF); } uint16_t make_uint16_t (const uint8_t bh, const uint8_t bl) { uint16_t r = (bh << 8) + bl; return r; } sint16_t make_sint16_t (const uint8_t bh, const uint8_t bl) { // sint16_t r = ((bh << 8) + bl) - 0xFFFF; sint...
true
54664f61b152c1439ee3d4be139d03792a0d18f3
C++
thundercumt/leetspeak
/9.cpp
UTF-8
523
3.328125
3
[]
no_license
#include <iostream> using namespace std; class Solution { public: bool isPalindrome(int x) { int xx = x; int t=0; if (x < 0) return false; else if (x < 10) return true; while(xx) { t *= 10; t += xx % 10; xx /= 10; } return x == t; } }; #i...
true
2e1a50dd924977e8473c1164d659677041ab2406
C++
chilin0525/NCTUCS_Database_HW2
/utils.cpp
UTF-8
2,100
3.078125
3
[]
no_license
#include <iostream> #include <string> #include <fstream> #include <sstream> #include <vector> #include "utils.h" using namespace std; void read_input_file(int& num_rows, vector<int>& key, vector<int>& value) { //readfile fstream file; file.open("data.txt"); string line; while(getline(file, line, ...
true
ccb2c6f84fbbf076e5227386cd0bb99a7750ef5a
C++
liarchgh/MyCode
/USE/方传宇改pdf名称.cc
GB18030
2,802
2.8125
3
[]
no_license
#include <cstdio> #include <iostream> #include <fstream> #include <cstdlib> #include <string> #include <map> #include <io.h> #include <algorithm> #include <cstring> #include <ctime> #include <sstream> using namespace std; map<string,string>id2name; int main(){ string indpath; string path2findPdfs; string ...
true
3a67006ee81849e92b163130e7bd5bff07ba0041
C++
junhuizhou/Algorithm_Learn
/LeetCode/List/142_cycle_list_2.cpp
UTF-8
1,161
3.140625
3
[]
no_license
/* * @Author: junhuizhou * @Date: 2021-06-03 19:11:02 * @LastEditor: junhuizhou * @LastEditTime: 2021-06-03 20:24:16 * @Description: header * @FilePath: \LeetCode\List\142_cycle_list_2.cpp */ // 找打链表环的入口 struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(i...
true
ddeea99c78c066ae9df4da40e5f7a53b306b4d41
C++
lyb1234567/C-plus-plus-
/复习/自定义动态二维数组以及静态变量的应用/复习.cpp
UTF-8
894
3.453125
3
[]
no_license
#include<iostream> #include<string> using namespace std; double **create_matrix(int, int); void disp_matrix(double**,int ,int); int increase(); int main() { double **matrix1=create_matrix(2,3); disp_matrix(matrix1, 2, 3); double** matrix2 = create_matrix(2, 3); disp_matrix(matrix2, 2, 3); return 0; } double **cr...
true
2940f25b5052b1b74eee0f2a799d45010cd70a82
C++
patsonm/intro-to-cs
/Prototyping and Classes/Box copy.hpp
UTF-8
598
2.5625
3
[]
no_license
/********************************************************************* ** Author: Michael Patson ** Date: October 5, 2017 ** Description: Assignment 3a hpp box *********************************************************************/ #ifndef BOX_HPP #define BOX_HPP //Defines the interface of the Box Class class Box ...
true
1403804fc294acfc4f3830752cf52699258317a6
C++
MassonY/ZeraVentureT1
/PhysicalEntity.cpp
UTF-8
1,724
2.859375
3
[]
no_license
#include "PhysicalEntity.h" b2World* PhysicalEntity::m_world; const float PhysicalEntity::SCALE = 30.0f; PhysicalEntity::PhysicalEntity(){ } void PhysicalEntity::setWorld(b2World* world){ m_world = world; } void PhysicalEntity::draw(sf::RenderTarget &target){ m_sprite.setPosition(BtoSF<float>(m_body->GetPosition())...
true
2da6d34b2af475c7ee03289dfdbbada3498fe914
C++
ahmadreza-n/AP-HW4
/C++/Q3/square.h
UTF-8
479
2.875
3
[]
no_license
#ifndef SQUARE_H #define SQUARE_H #include "twoDimensionalShape.h" class CSquare : public CTwoDimensionalShape { private: double sideLen; double centerX, centerY; public: CSquare(const double &sideLen_ = 0, const double &centerX_ = 0, const double &centerY_ = 0); virtual ~CSquare(); double a...
true
2ebdfd53f4c6ae0d397d028214122989cf497fe3
C++
bmjoy/IOCPGameServer
/GameServer/GameServer/Monster.cpp
UHC
1,204
2.875
3
[]
no_license
#include "stdafx.h" void Monster::Update(float dTime) { if (Hp != 0) { MapRangeCheck(); SetPosition(GetPosition() + GetVelocity() * (5 * dTime)); //std::cout << GetPosition().mX << " " << GetPosition().mY << " " << GetPosition().mZ << " " << std::endl; } } void Monster::MapRangeCheck() { if (GetPosition().m...
true
ffe128f8fcd360acd1ab373d73b7b902898b35e1
C++
sebeneyi/cs112
/proj01/PlayList.h
UTF-8
684
2.796875
3
[]
no_license
/* * PlayList.h declares class PlayList. * * Created on: Feb 10, 2019 * Author: ssy3 at Calvin College for CS 112 proj01 */ #ifndef PLAYLIST_H_ #define PLAYLIST_H_ #include "Song.h" #include <vector> // STL vector #include <string> using namespace std; class PlayList { public: PlayList(const string& filena...
true
ffda5d9cd6d6e65936ff540c9a0df4f36d562bfb
C++
Acnapse/Labs
/oop9/TTree.hpp
UTF-8
946
2.546875
3
[]
no_license
#ifndef TTree_H #define TTree_H #include "TIterator.h" #include "TTreeItem.hpp" #include <memory> #include <future> #include <mutex> #include <thread> template <class T> class TTree { public: TTree(); void push(T* item, size_t index); bool empty(); size_t size(); TIterator<TTreeItem<T>, ...
true
748c8f597c7e490438e185252305bf313035c3d1
C++
zgthompson/fa13
/cs315/lab11/OpenHash.h
UTF-8
1,132
3.390625
3
[]
no_license
#ifndef OPEN_HASH_H #define OPEN_HASH_H #include <iostream> #include <vector> #include <string> #include <list> #include <algorithm> class OpenHash { public: OpenHash(); OpenHash(int startSize); void insert(std::string key); bool contains(std::string key); void remove(std::...
true
a72171dbda533471cdbe2bbc0d7257b7aeee01a5
C++
qinzhengke/zebra_cv
/unit_test/raw_bmp_view/main.cpp
UTF-8
697
2.71875
3
[]
no_license
#include "rawbmpwidget.h" #include <QApplication> #include <iostream> using namespace std; void print_hex(string str) { cout<<str<<" = { "; for(int i=0; i<str.size(); i++) { cout<<std::hex<<str.at(i)<<", "; } cout<<" }"<<endl; } void print_hex(char *str) { int N = ...
true
bd6de83e16e202b100dbede95290b4d8af5a3e67
C++
Michaelhobo/hpv_electronics
/sensor_temp/sensor_temp/user_functions.ino
UTF-8
1,691
3.078125
3
[]
no_license
/* User Functions - Sensor Template * These functions should perform appropriate actions at every cycle of the loop. * Collected and formatted data should be stored in write_buffer[1] * This file is meant to pull user-defined functions out of the base template, * so the template can change without fear of merge con...
true
a95b765a7182e802caace3e5063a0949bcac51f6
C++
OUC-MYM/HDU
/2013.cpp
UTF-8
253
2.71875
3
[]
no_license
#include<iostream> using namespace std; int stop; int ans(int n) { if(n==stop) return 1; return (ans(++n)+1)*2; } int main() { int n; while(cin >> n) { stop=n; cout << ans(1) << endl; } return 0; }
true
92f410356d7f01be22a71e704c58356f505839a2
C++
NirViaje/node-serial
/embedded-code/Neopixel-Effect-Generator-adrianotiger/Neopixel-Effect-Generator-adrianotiger.ino
UTF-8
17,256
2.703125
3
[ "Apache-2.0" ]
permissive
#include <Adafruit_NeoPixel.h> class Strip { public: uint8_t effect; uint8_t effects; uint16_t effStep; unsigned long effStart; Adafruit_NeoPixel strip; Strip(uint16_t leds, uint8_t pin, uint8_t toteffects, uint16_t striptype) : strip(leds, pin, striptype) { effect = -1; effects = toteffects;...
true
05a6c7a98ee3ec0efad7398c2db2a7b61f80de61
C++
MacaScull/Vigenere-Cipher
/Vigenere cipher/Source.cpp
UTF-8
2,377
4.03125
4
[]
no_license
#include <iostream> #include <string> #include <cmath> using namespace std; //Bound checker, if value exceeds the high limit when excrypting - 26, if value exceeds the low limit for decryption + 26, otherwise return the value int boundCheck(int low, int high, int value, bool crypt) { if (crypt == true) { ...
true
c58319738b4c5908397f14552c01268cdbac62be
C++
kbm0818/Portfolio
/GameProject/Object/Model/ModelBuffer.h
UTF-8
3,533
2.671875
3
[]
no_license
#pragma once class ModelBuffer : public ShaderBuffer { public: ModelBuffer() : ShaderBuffer(&data, sizeof(Data)) { data.ambient = D3DXCOLOR(0, 0, 0, 1); data.diffuse = D3DXCOLOR(0, 0, 0, 1); data.specular = D3DXCOLOR(0, 0, 0, 1); data.emissive = D3DXCOLOR(0, 0, 0, 1); data.normal = D3DXCOLOR(0, 0, 0, 1); ...
true
f4027d75e5223e65e875139b583f4b23f5bf6b21
C++
WASDi/sfml-graph-sandbox
/src/KruskalAlgorithm.h
UTF-8
334
2.546875
3
[]
no_license
#ifndef KRUSKALALGORITHM_H #define KRUSKALALGORITHM_H #include "Vertex.h" #include "Edge.h" #include <list> class KruskalAlgorithm { public: KruskalAlgorithm(std::list<Vertex*> vertices, std::list<Edge*> edges); void execute(); private: std::list<Vertex*> vertices; std::list<Edge*> edges; }; #endif /* KRUSKALAL...
true
8cbf25653743317690c43841e8390cbf6db0bcfb
C++
Ainslay/ColorMixing
/ColorMixing/ColorMixing.cpp
UTF-8
6,498
2.59375
3
[]
no_license
// Opracowane przez: Jakub Spałek, Aleksandra Pyrkosz #include <iostream> #include <stdlib.h> #include <GL/glut.h> using namespace std; enum State { MIRROR, SHADOW, NONE }; State state = NONE; GLfloat eyeX = 0.0; GLfloat eyeY = 40.0; GLfloat eyeZ = 50.0; GLfloat pointX = 0.5 * cos(-3.14 / 2); GLfloat pointY = ...
true
4eea40287a5a8ebaa4eabc7804f68e620cea6adc
C++
fursich/open_data_structure
/chapter3/practice/3_18/SEListDeque.h
UTF-8
2,438
3.734375
4
[]
no_license
#ifndef SELIST_DEQUE_H_ #define SELIST_DEQUE_H_ #include <iostream> #include "SEList.h" using namespace std; namespace data_structure { template <class T> class SEListDeque { protected: SEList<T>* front; SEList<T>* back; void balance(); T null; int b; /* arbitrary */ public: SEListDe...
true
f499296e5c2a15609ee074706f6ad88a0df6b625
C++
haraldangell/GameInstitute
/7.9.1 Fraction Class/Fraction.cpp
UTF-8
2,706
3.703125
4
[]
no_license
#include <iostream> #include "Fraction.h" Fraction::Fraction() { mNumerator = 0.0f; mDenominator = 1.0f; } Fraction::Fraction(float num, float den) { mNumerator = num; mDenominator = den; } Fraction::~Fraction() { } void Fraction::Print() const { std::cout << "Numerator: " << mNumerator << std::endl << "De...
true
c80026fc50117b1a35c86883b85c75882368c562
C++
krzysztofMajchrzak-GIT/PSZT1
/ReversiGUI/table.h
UTF-8
1,386
2.796875
3
[]
no_license
#ifndef TABLE_H_ #define TABLE_H_ #define TABLE_SIZE 8 #include "position.h" #include "player.h" #include <vector> #define DEBUG #ifdef DEBUG #include <iostream> #endif //DEBUG class Position; class Player; class Table { public: Table(); ~Table(); enum pawn {white, black, proposal...
true
c40d6714d9b4a43d958ae0f56fb95d7053c1ee2d
C++
tolfaine/ProjetLabyrinthe
/Projet Laby/Labyrinthe2D.h
WINDOWS-1252
1,337
3.0625
3
[]
no_license
/** * @file Labyrinthe2D.h * Projet Labyrinthe * @author BURNER Whitney et DELERIN Maxime * @version 1 30/12/2013 * @brief Composant d'un labyrinthe deux dimensions. * Structures de donnes et algorithmes - DUT1 Paris 5 */ #ifndef LABYRINTHE2D_H_ #define LABYRINTHE2D_H_ #include <fstream> #include "Tableau2D...
true
71a524b4d52c9798b1b9b7b8a07e216e09dddcff
C++
nic-cs150-master/sp21-lecture
/14-sorting/sort.cpp
UTF-8
5,354
3.703125
4
[]
no_license
#include <iostream> #include <vector> using namespace std; void printArray(const int arr[], int size); void printVector(const vector<int> &vec); void bubbleSort(int arr[], int size); void bubbleSort(vector<int> &vec); void selectionSort(int arr[], int size); void insertionSort(int arr[], int size); int main() { /...
true
157faa2beb5d13b802ec5302bf792d05bd47c9c6
C++
Lan-ce-lot/overflow
/Dp/5.cpp
UTF-8
1,272
2.78125
3
[]
no_license
# include<iostream> # include<queue> # define MAX 5842 using namespace std; __int64 humble_number[MAX+1]; struct cmp1{ bool operator()(__int64 &a,__int64 &b) { return a>b; } }; int main() { int i=1,n; humble_number[0]=0; priority_queue<__int64,vector<__int64>,cmp1> q; while(i<=MAX) ...
true