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
a2afd2d20d5b7569f2da46df0055086f79b62ce3
C++
takumus/trump
/src/display/display.h
UTF-8
669
2.53125
3
[]
no_license
#ifndef _JP_TACM_DISPLAY #define _JP_TACM_DISPLAY #include "sprite.h" #include <string> using namespace std; class Display{ public: void setup(int width, int height, char background); void clear(); void render(); void draw(Sprite* s); void mask(Sprite* s); void repeatBackground(Sprite* s); int getWidth(); int...
true
6e3245ccb82a94412d69014b9ce5139f9dc8e002
C++
stdstring/leetcode
/Algorithms/Tasks.0501.1000/0525.ContiguousArray/solution.cpp
UTF-8
1,742
3.21875
3
[ "MIT" ]
permissive
#include <algorithm> #include <unordered_map> #include <vector> #include "gtest/gtest.h" namespace { class Solution { public: [[nodiscard]] int findMaxLength(std::vector<int> const &nums) const { size_t maxSubarrayLength = 0; std::unordered_map<int, size_t> prefixBalanceMap; int balan...
true
85d376083d2cfef06fba7e326ec0811e2a721c66
C++
ArpitSingla/Advance-Data-Structures
/AVL.cpp
UTF-8
4,116
3.53125
4
[]
no_license
#include<iostream> #define ll long long using namespace std; struct node{ ll info; node *left,*right; ll height; }; ll height(node *n){ if(n==NULL){ return 0; } else{ ll ldepth=height(n->left); ll rdepth=height(n->right); return max(ldepth,rdepth)+1; } } ll balanceFactor(node *n){ if(n==NU...
true
ec6e22e1e9a40da6119a8457b7aff03dd16482f9
C++
zeos/signalflow
/source/src/node/processors/delays/comb.cpp
UTF-8
1,380
2.609375
3
[ "MIT" ]
permissive
#include "signalflow/node/oscillators/constant.h" #include "signalflow/node/processors/delays/comb.h" #include <stdlib.h> namespace signalflow { CombDelay::CombDelay(NodeRef input, NodeRef delay_time, NodeRef feedback, float max_delay_time) : UnaryOpNode(input), delay_time(delay_time), feedback(feedback) { t...
true
bb00e723024d11a3b63a5df414c4641e01ebd930
C++
idtoto2001/Kinect-finger-tracking-library
/candescentport/candescentport/HandTracking/FingerPointDetector.cpp
UTF-8
3,581
2.9375
3
[]
no_license
#include "FingerPointDetector.h" #include "LineThinner.h" #include "../pointfnc.h" #include <limits> FingerPointDetector::FingerPointDetector(HandDataSourceSettings* settings1){ settings=settings1; } std::vector<FingerPoint*>* FingerPointDetector::FindFingerPoints(Contour* contour, ConvexHull* convexHull){ contour...
true
2df2ed364d27be834b5cb19b210d1224621fc828
C++
0000duck/noether
/noether_tpp/test/tool_path_modifier_utest.cpp
UTF-8
8,882
2.875
3
[]
no_license
#include <boost/core/demangle.hpp> #include <gtest/gtest.h> #include <random> #include <regex> #include <noether_tpp/core/tool_path_modifier.h> // Implementations #include <noether_tpp/tool_path_modifiers/no_op_modifier.h> #include <noether_tpp/tool_path_modifiers/waypoint_orientation_modifiers.h> #include <noether_tp...
true
440a45dfc8743eb046d3a98696980cd8a17ee025
C++
bingyingL/spoc_lite
/sand_classifier/include/sand_classifier/classifier.h
UTF-8
3,281
2.53125
3
[]
no_license
/*! * @file classifier.h * @brief Base classifier class implementation * @author Kyon Otsu <otsu@jpl.nasa.gov> * @date 2017-02-24 */ #ifndef _CLASSIFIER_H_ #define _CLASSIFIER_H_ #include <ros/ros.h> #include <image_transport/image_transport.h> #include <image_transport/subscriber_filter.h> #include <me...
true
b05d5bc930122572f915fc65e1e6afcdab34eff9
C++
dorev/dryad
/runtime/src/scale.h
UTF-8
4,479
2.921875
3
[]
no_license
#pragma once #include "types.h" #include "chord.h" #include "constants.h" namespace Dryad { struct ScaleOffsets { ScaleOffsets ( NoteValue tonic = 0, NoteValue supertonic = MajorSecond, NoteValue mediant = MajorThird, NoteValue subdominant = Perf...
true
c7a6a80979b223ead0d8a46337e879f4c7b88502
C++
jaidurn/Design-Tests-take-2
/Design Tests/FontCache.h
UTF-8
700
2.609375
3
[]
no_license
#pragma once //========================================================================================== // File Name: FontCache.h // Author: Brian Blackmon // Date Created: 8/19/2019 // Purpose: // Loads and stores fonts that have been created. //======================================================================...
true
5660a4551be9d236043d371e6bdc1830db9e069b
C++
PollockCR/Practice-Problems
/HackerRank/cut-the-sticks.cpp
UTF-8
825
3.28125
3
[]
no_license
// https://www.hackerrank.com/challenges/cut-the-sticks #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; void cutSticks( vector<int> ); int main() { int numSticks, i, temp; vector<int> sticks; cin >> numSticks; for( i = 0; i < numSticks; i++ )...
true
9f6ed6a8816a7c88d9d0cfa26ed39cba92d51d47
C++
gokulmuvvala/My-C-codes
/If_else.cpp
UTF-8
263
3.28125
3
[]
no_license
#include<stdio.h> //if else program to find largest among two numbers main() { int n1,n2; printf(" Enter the valuea of n1 & n2"); scanf("%d%d",&n1,&n2); if(n1>n2) { printf("n1 is greater than n2 "); } else { printf("n2 is grater than n1"); } }
true
a9de69314734dee8571917829a2f8a4f44515153
C++
tgalg/KnightsTour
/KnightsTour/KnightsTour.cpp
UTF-8
1,724
3.40625
3
[]
no_license
/** * @file KnightsTour.cpp * @author Tom Gallagher * @date 03/22/16 * @KnightsTour implementation */ #include "KnightsTour.h" const int xMove[8] = { 2, 1, -1, -2, -2, -1, 1, 2 }; const int yMove[8] = { 1, 2, 2, 1, -1, -2, -2, -1 }; KnightsTour::KnightsTour(int m, int n, int r, int c) { rsize = m; csize = n; ...
true
7e37d8c3c4fc8c64bc595b815d13b6ee404af60d
C++
reetpriye/cplusplus-programs
/38aSingleInheritanceDeepDive.cpp
UTF-8
1,364
4.09375
4
[]
no_license
// Single Inheritance(Publicly Derived) // Author: REET #include <iostream> using namespace std; class Base { int data1; public: int data2; void setData(); int getData1(); int getData2(); }; void Base ::setData() { data1 = 10; data2 = 20; } int Base ::getData1() { return data1; } i...
true
c4d034b9b9d3a9455544d88de0ee042c21f75af3
C++
poborskii/CAADoc_SelectAgent
/CAAVisualization.edu/CAAVisBasics.m/src/CAAVisBaseDocument.cpp
UTF-8
3,432
2.71875
3
[]
no_license
// COPYRIGHT DASSAULT SYSTEMES 2000 //Local Framework #include "CAAVisBaseDocument.h" #include "CAAVisBaseView.h" //Visualization Framework #include "CAT3DBagRep.h" #include "CATReadWriteCgr.h" //For the InsertModel method #include "CATViewer.h" int CAAVisBaseDocument::_ViewName = 0; //----------------------------...
true
5783e4bba914df78ac79ac0c33cb42e75193ac81
C++
GDW2018/GDW
/gdw_project/gdw/src/utilities/CharacterRecognition.cpp
GB18030
2,259
2.859375
3
[ "MIT" ]
permissive
#include <stdio.h> namespace gdwcore { namespace utilities { inline bool inRange(char input, char range_start, char range_end) { if (input >= range_start&&input <= range_end) return true; return false; } bool isGBK(const char* input) { if (input == NULL) return false; const char* p = i...
true
59b013d6d3353c76f6bef89c32e6207cef630664
C++
przemkovv/sphinx-cpp
/src/docker/v1/IOConnection.h
UTF-8
2,430
2.875
3
[]
no_license
#include <string> #include <boost/asio.hpp> #include <type_traits> #include <memory> namespace Sphinx { namespace Docker { namespace v1 { typedef boost::asio::ip::tcp::socket TCPSocket; typedef boost::asio::local::stream_protocol::socket UnixSocket; template<typename T> struct Endpoint { }; template<> struct Endpo...
true
fedab145a57758d130d122d580fbaa3434ddef04
C++
AlstonLin/iHear
/Arduino/iHear_Arduino_v1/iHear_Arduino_v1.ino
UTF-8
890
3.015625
3
[]
no_license
// Assume: 1 - left, 2 - middle, 3 - right #define MIC_1 A1 #define MIC_2 A2 #define MIC_3 A3 int MIC_OUT_1 = 3; int MIC_OUT_2 = 5; int MIC_OUT_3 = 6; void setup() { // put your setup code here, to run once: Serial.begin(115200); pinMode(MIC_OUT_1, OUTPUT); pinMode(MIC_OUT_2, OUTPUT); pinMode(MIC_OUT_3...
true
702b348b36f8fd70ffe2aba48d6ba0fea833a3e2
C++
papi656/a2ojLadder
/RatingLess1300/pythagoreanTheorem.cpp
UTF-8
295
2.578125
3
[]
no_license
#include <iostream> #include <cmath> #define lld long long int using namespace std; int main(){ lld n; cin >> n; lld cnt = 0; for(int i = 1; i < n; i++){ for(int j = i+1; j < n; j++){ lld c = i*i + j*j; lld d = sqrt(c); if(d*d == c && d <= n) cnt++; } } cout << cnt; }
true
17b58d6585c7538fc25316d9290e2c8e47275e88
C++
KeunhyoungLee/programmers
/Heap/더 맵게.cpp
UTF-8
1,647
3.0625
3
[]
no_license
#include <string> #include <vector> //#include <algorithm> #include <queue> #include <functional> using namespace std; int solution(vector<int> scoville, int K) { int count=0; priority_queue<int, vector<int>, greater<int>> scov; for(int i=0; i<scoville.size(); i++){ if(scoville[i]>=K) ...
true
0ba178bd2dd8209c688c2f01c136d13a592fe7ba
C++
Hackatonboiscaliswag/svpremespaghetti
/lista.cpp
UTF-8
827
3.703125
4
[]
no_license
#include <iostream> using namespace std; class nodo { public: nodo (int dato, nodo *siguiente = NULL) { int d = dato; nodo *sig = siguiente; } private: nodo *sig; int d; friend class lista; }; class lista { nodo *h; public: void i...
true
f471dd86dd7c7f254b7f4aa71cdf85a6ca6499c4
C++
tmuttaqueen/MyCodes
/Online Judge Code/[Other] Online-Judge-Solutions-master_from github/TJU/2344 - Honeymoon Hike.cpp
UTF-8
1,863
2.828125
3
[]
no_license
#include <cstdio> #include <queue> using namespace std; #define max(x,y) (x)>(y)? (x):(y) #define min(x,y) (x)<(y)? (x):(y) struct node{ int x,y; node(){} node(int _x, int _y){ x = _x; y = _y; } }aux; int n,H[100][100],min_h,max_h; bool visited[100][100]; const int dx[] = {-1,1,0,...
true
edbe2e4cb73ae642a95d87f831ebbe784caf941e
C++
MarcoSDomingues/MicroMachines
/OrtogonalCamera.cpp
UTF-8
466
2.625
3
[]
no_license
#include "OrtogonalCamera.h" #include "AVTmathLib.h" OrtogonalCamera::OrtogonalCamera(float left, float right, float bottom, float top, float near, float far) { _left = left; _right = right; _bottom = bottom; _top = top; _near = near; _far = far; } void OrtogonalCamera::update(float ratio) { lookAt(0, 0, 0, 0...
true
2246ef9846d249aae4a131dad91a2702d07a4306
C++
yy405145590/OpenglRipper
/OpenRipper/OpenglHook/Tools/TexTool.cpp
GB18030
3,314
2.53125
3
[]
no_license
// TexTool.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include "PVRTexture.h" //#include "png.h" #include <string> #include "DetoursGlDef.h" #include "PVRTextureUtilities.h" using namespace pvrtexture; #include <Windows.h> #include <math.h> #include <iostream> using namespace std; #define RGB2INT(r,g,b) (r*256*256 + g...
true
fb0a2317738979ce9777226ae2692f0fa19aead4
C++
ziolkowskid06/Cpp_Programming_An_Object_Oriented_Approach
/CH05 - Repetition/PR-5.17_FindingIfANumberIsAPrime.cpp
UTF-8
1,246
4.34375
4
[]
no_license
/****************************************************************** * Use a return statement to find if a number is a prime or not. * * The program returns from the main function as soon if finds * * if a number is 1 or composite. * *******************************************...
true
ee6d5def36b663c9cc378a831889d25151a2dc3d
C++
jiuyewxy/Cpp-Primer-Plus
/ch2/Q07.cpp
UTF-8
295
3.359375
3
[]
no_license
#include <iostream> using namespace std; void fun(int a, int b) { cout<<"Enter the number of hours: "<<a<<endl; cout<<"Enter the number of minutes: "<<b<<endl; cout<<"Time: "<<a<<":"<<b<<endl; } int main() { int hour,min; cin>>hour>>min; fun(hour,min); return 0; }
true
aaa2353796c64f9cd6730be938282ae5c2b73ba0
C++
jitendrab/btp
/c_code/diarization_single/src/viterbi_realign.cpp
UTF-8
4,677
2.65625
3
[]
no_license
/* Written By: Jitendra Prasad Keer BTech, CSE, IIT Mandi */ #include "../include/viterbi_realign.h" /****************************************************************************** viterbi_realign : Perform Viterbi Realignment on given observation vectors inputs : Observation Space (pointer to all training feat...
true
709f39cde3728156188a7af2271897c88c026d9d
C++
jasonchu237/fair-job-scheduler
/scheduler.cpp
UTF-8
7,777
3.4375
3
[]
no_license
#include "common.h" #include <string.h> #include <limits.h> extern Tree tree; extern Heap heap; extern ofstream out; void Insert(string operand) /*Insert into tree and heap*/ { /*Get the ID ...
true
2efba804cd64495b4edaa6dc80ba0d8d164ecfab
C++
HaRshA10D/codechef_solved
/AMR16D.cpp
UTF-8
221
2.546875
3
[]
no_license
#include <iostream> using namespace std; int main(){ int t,tot,pos; cin>>t; for(int i=0;i<t;i++){ cin>>tot>>pos; if((pos-1)/3 == pos/3) cout<<"yes"<<"\n"; else cout<<"no"<<"\n"; } return 0; }
true
b3a8f9722cb61e0cb6175cde768ff3d1ea5f9234
C++
jharmer95/cpp_named_concepts
/include/Swappable.hpp
UTF-8
225
2.75
3
[ "CC0-1.0" ]
permissive
#pragma once #include <concepts> namespace concepts { template<typename T> concept Swappable = std::swappable<T>; template<typename T, typename U> concept SwappableWith = std::swappable_with<T, U>; } // namespace concepts
true
d9d148f34dc844a14bf4915334e8653d02d353c5
C++
RaresC21/ProgrammingContests
/ICPC/Samara/X/I.cpp
UTF-8
1,219
2.5625
3
[]
no_license
#include "bits/stdc++.h" using namespace std; const int MOD = 1000000007; // Modulo int N; vector<int> mult(vector<int> P, vector<vector<int> > m) { vector<int> v(N); for (int i = 0; i < N; i++) { for (int k = 0; k < N; k++) { v[i] = (v[i] + (1LL * P[k] * m[i][k]) % MOD) % MOD; }...
true
4d42734d197e6b85d2de9b3ce0a8036587a8b53f
C++
cslarsen/project-euler
/e033/eul33.cpp
UTF-8
899
2.71875
3
[]
no_license
#include <stdio.h> #include <string.h> #include <vector> int main() { std::vector nums, denums; for ( int a=1; a<10; ++a ) for ( int b=1; b<10; ++b ) for ( int c=1; c<10; ++c ) for ( int d=1; d<10; ++d ) { int n=a*10+b, de=c*10+d; if ( n==0 || de==0 || n==de ) continue; float v = (float)n/(float)de; if...
true
ebe0524e973fbc069bdf5bee907d9c546eddb44d
C++
jmarmstrong1207/cppProject
/classes/mainMini.cpp
UTF-8
267
2.53125
3
[]
no_license
#include "MiniCar.h" int main() { MiniCar smallVan("Toyota","miniVan", "blue",2000,false ); std::cout << smallVan.getIsMiniCooper() << std::endl; smallVan.paintCar("green"); std::cout << smallVan.getColor() << std::endl; smallVan.startCar(); return 0; }
true
39883b9e0b3f0aaa5e7517456d2781cb4d3d1f26
C++
montalex/CS-112-i-CPP-Class-Project
/src/Stats/Stats.cpp
UTF-8
1,553
3.03125
3
[]
no_license
#include <Stats/Stats.hpp> #include <Application.hpp> void Stats::setActive(int id) { activeId = id; } void Stats::reset() { for(std::pair<const int, LabelledGraph> & g : graphs) { g.second.graph->reset(); } } void Stats::addGraph(int id, std::string const & label, std::vector<std::string> const ...
true
a699ea1e53682df8f7b6c01a79b2c373b55bb560
C++
rjc11a/AIProject2
/AIProj2/phase1.h
UTF-8
6,916
2.8125
3
[]
no_license
// // phase1.h // AIProj2 // // Created by Joseph on 4/3/17. // Copyright © 2017 JosephC. All rights reserved. // #ifndef phase1_h #define phase1_h #include <iostream> #include "geneticheap.h" //fitness function for phase 1 static int p1fitcalls = 0; void p1fitness(p1Node& specimen, const geneticSack& s) { p1...
true
c2dfac57b4665eeb8e57eccc3a1b600a74faa1f6
C++
LawrenceFulton/RLAss2
/code/Cat.cpp
UTF-8
577
2.6875
3
[]
no_license
#include "header/Cat.h" #include "header/Mouse.h" Cat::Cat(){}; Cat::Cat(int r, int c, int maxRow, int maxCol, World* world):Agent::Agent(CAT_ID, r,c,maxRow,maxCol, world){ steps = 0; } Cat::~Cat(){ deleteStates(); }; State* Cat::getInternalState(){ return Agent::getInternalState(mouse->getR(),mouse->getC())...
true
7b90c296e25fe912fd5a4b7c0e7fbd265b67242c
C++
trevorassaf/gpio14
/include/I2c/I2cClient.h
UTF-8
1,030
2.609375
3
[]
no_license
#pragma once #include <cstdint> #include <memory> #include <string> #include <utility> #include "I2c/I2cIoctlOps.h" #include "Utils/Fd.h" namespace I2c { class I2cClient { public: I2cClient(I2cIoctlOps *ioctlOps); I2cClient(I2cIoctlOps *ioctlOps, uint8_t slaveAddress); I2cClient(I2cIoctlOps *ioctlOps, std::uniqu...
true
ef16f028955f14253d0b157a25fa2260bab50241
C++
sahuaman83/Competetive
/Recursion/sorting Stack(Recursion) II.cpp
UTF-8
634
3.734375
4
[]
no_license
/*The structure of the class is class SortedStack{ public: stack<int> s; void sort(); }; */ /* The below method sorts the stack s you are required to complete the below method */ void insert_stack(stack<int> &s,int x) { if(s.empty()) { s.push(x); return ; } if(x>=s.top()) { s.pu...
true
639015f8d83dd7c9ad0dd1d717d6643006f29d2d
C++
mush-musha/University-Management-System-UML-AND-CODE
/Student.h
UTF-8
2,654
3.296875
3
[]
no_license
#pragma once #include"Courses.h" #include"AcademicRecord.h" #include<iostream> #include<string> #include<vector> using namespace std; class Student:public AcademicRecord { public: Student()=default; ~Student()=default; //Using polymorphism between methods void setName(string); void set_id(int); void set_address(s...
true
e848da994a04eee9d0055d740c830c18c74477ba
C++
ElvisKwok/code
/ci/12_print1ToMaxOfNDigits.cc
UTF-8
2,190
3.859375
4
[]
no_license
#include <iostream> #include <cstring> // memset using namespace std; // file description: // print 1, 2, 3, 4, ..., (9............9) // |--n digits--| bool increment(char* num); void printNum(char* num); void print1ToMaxOfNDigits(int n) { if (n<=0) return; char* num = new ...
true
db0a1c22b45b34628a0ed2d2d0cfb0c2b5df44a0
C++
Overlord7667/Temperature
/DZ/Source.cpp
UTF-8
950
2.90625
3
[]
no_license
#include<iostream> using namespace std; void main() { setlocale(LC_ALL, "Russian"); int temperature; cout << "Введите температуру воздуха: "; cin >> temperature; if (temperature >= 70) { cout << "Вы на другой планате!" << endl; } else if (temperature >= 50) { cout << "Вы на экваторе" << endl; } else i...
true
e1479876d2dfb1fe20e51de0a1c6f5f50e6535d2
C++
famousDeer/Jezyk_Cpp_Szkola_programowania
/Rozdzial_7/Zadanie_7/Zadanie_7.cpp
UTF-8
1,911
3.609375
4
[]
no_license
#include <iostream> const int Max = 5; //Protorypy funkcji double *fill_array(double * begin, double * end);//* zmodyfikować void show_array(const double * begin, double * end); // nie zmienia danych //* zmodyfikowac void revalue(double r, double * begin, double * end); //* zmodyfikowac int main(){ using nam...
true
8448a3116aad39a5beb4015fe70ac3631a60ee79
C++
SirKnightTG/brakeza3d
/src/2D/TextureAnimationDirectional.cpp
UTF-8
1,904
2.9375
3
[]
no_license
#include "../../headers/2D/TextureAnimationDirectional.h" #include "../../headers/Render/EngineSetup.h" TextureAnimationDirectional::TextureAnimationDirectional() { for (int d = 0; d <= 8 ; d++) { for (int j = 0; j < ANIMATION2D_MAX_FRAMES ; j++) { this->frames[d][j] = new Texture(); }...
true
79b4080b7ced29f1f583300e52b8720c31aa5d8a
C++
smalls12/blokus
/src/Network.cpp
UTF-8
7,167
2.625
3
[ "MIT" ]
permissive
#include <string> /* ========================================================= * * Implements the network layer * * ========================================================= */ #include "Network.hpp" #include "spdlog/spdlog.h" Network::Network(std::string nodeName, ICompress& compress, IDecompress& decompress)...
true
0dc3542cb460f8c84dfe44b317bcbeb493e42b4b
C++
jkwon0866/AoC2020
/day15.cpp
UTF-8
1,400
3.1875
3
[]
no_license
#include <iostream> #include <unordered_map> #include <vector> using namespace std; void ElfGame1(int rounds){ unordered_map<int,pair<int,int>> round_spoken({{2,{1,-1}},{1,{2,-1}},{10,{3,-1}},{11,{4,-1}},{0,{5,-1}},{6,{6,-1}}}); int last_spoken = 6; for(int round = round_spoken.size() + 1; round <= rounds; round+...
true
625d8599c30e9f8e153a6eb1e077db64acc99fae
C++
CGCC-CS/csc220summer18
/class13/threads.cpp
UTF-8
1,403
3.671875
4
[ "MIT" ]
permissive
#include<iostream> #include<thread> #include<mutex> // compile with: // g++ threads.cpp --std=c++11 -pedantic -Wall -pthread std::mutex m; // This funtion counts to 10 with 1 second delay between numbers // The tabs argument lets us differentiate between different // threads visually. void count_t...
true
1d78c9c64a4f47781e82f77bc17ebf5da2227373
C++
BrandonFowler/SchoolWork
/Later Work/C++ Introduction/305 Assignment 3/PackageException.h
UTF-8
616
2.71875
3
[]
no_license
/* Author: Brandon Fowler Class: CSCD305 Assignment: 3 Quarter: Summer 2014 Compilers Used: g++ and cl */ #pragma once #include "Package.h" using namespace std; class PackageException:public Package{ protected: string problem; public: PackageException(int trackingNumber, int weight, string problem, string ...
true
1b9cb68df10915358cfeafc529f47a18d4d21ecd
C++
bklimt/QueryWizard
/Table.cpp
UTF-8
1,401
3.015625
3
[]
no_license
#include "Table.h" CTable::CTable() { record = 0; } CTable::CTable( const CTable& table ) { data = table.data; columns = table.columns; record = table.record; } CTable CTable::operator=( const CTable& table ) { data = table.data; columns = table.columns; record = table.record; return *this; } void CTable::S...
true
b01cd3ab8ced50075bf1da5c3e7473e9881d5ba2
C++
nishinjohn/Container_Inventory
/CONTAINE.CPP
UTF-8
8,131
2.84375
3
[]
no_license
#include<iostream> //Remember to change this #include<conio.h> #include<process.h> #include<fstream> //Remember to change this #include<stdio.h> #include<string.h> using namespace std; //Remember to remove this char user[15],item[25]; int cap=0; class container { public: int contno,vol; float shipid,...
true
98781dfe6c2402609cbe5dd1d03a4efd352d6153
C++
pycpp/sfinae
/push_front.h
UTF-8
1,501
2.875
3
[]
no_license
// :copyright: (c) 2017-2018 Alex Huszagh. // :license: MIT, see licenses/mit.md for more details. /** * \addtogroup PyCPP * \brief SFINAE detection for `push_front` and fail-safe implementation. * * Copy and add item to front of container. * * \synopsis * template <typename T> * struct has_push...
true
88882eafcf881007330c00d9558d2bd87abec0ce
C++
uhini0201/CodeChefChallenges
/CodeChefLunchMay20/LOSTWKND.cpp
UTF-8
722
2.65625
3
[]
no_license
// Problem Link: https://www.codechef.com/LTIME84B/problems/LOSTWKND #include <bits/stdc++.h> using namespace std; #define whatis(x) cerr << #x << " is : " << x <<endl; typedef long long ll; typedef unsigned long long ull; int main(){ int t; cin >> t; while(t--){ ll arr[5]; ll p; fo...
true
3b5ab7110dddf05d3a8a229c2f909d1c1d983095
C++
seceast/shujujiegou
/栈和队列/LinkQuNodecode.cpp
UTF-8
2,071
3.375
3
[]
no_license
/* * @Author: seceast * @Date: 2020-10-19 15:39:44 * @LastEditors: seceast * @LastEditTime: 2020-10-21 17:08:20 */ #include <stdio.h> #include <stdlib.h> #include <malloc.h> typedef int ElemType; //链队中数据结点类型声明 typedef struct qnode { ElemType data; //存储元素 struct qnode *next; //下一个结...
true
3967caf7fbf209b22845656a14096af5af1c5d1c
C++
njozzer/shells_sort
/main.cpp
UTF-8
4,562
3.1875
3
[]
no_license
#include <iostream> #include <pthread.h> #include <stdlib.h> #include <time.h> #include <cstring> #include <vector> void print(int *arr,int n){ std::cout << '\n'; for( int i = 0; i < n; i++ ) { std::cout << arr[i] << ' '; } std::cout << '\n'; } void shell(int *A, int N) { unsigned i,j,k; ...
true
acec6849fbd88e6c2a4a52a3f6353857f57e0f2f
C++
ppcamp/digital-image-processing-class
/PDItrabalhos/trab11.cpp
UTF-8
5,021
3.265625
3
[]
no_license
#include <cstdio> #include <opencv2/core.hpp> #include <opencv2\highgui.hpp> using namespace cv; #define MAX 256 #define MIN -1 /** * @brief Apply erosion into a image using the structuring element (SE) * @param image A Mat object monochromatic (grayscale) * @param SE Filter mask * @return Mat object that repres...
true
fc67fabcd90bc92942778d3cad08fc5f93215fc3
C++
na-thy/C-
/desafio10.cpp
UTF-8
1,024
4.28125
4
[]
no_license
//crie um algoritmo que tenha uma função recebe 2 ponteiros //e troca o valor de referencia entre os dois. #include <iostream> using namespace std; void swap(int* &valor1, int* &valor2); int main() { float* valor1 = new float; float* valor2 = new float; cout << "Informe o valor 1: "; cin >> *valor1...
true
6ae3bbcf53c2f25ff34c8592ee4229fc423e06aa
C++
krovma/FcyF
/Engine/Code/Engine/Core/Vertex_PCUNT.hpp
UTF-8
620
2.75
3
[]
no_license
#pragma once #include "Engine/Math/Vec3.hpp" #include "Engine/Core/Rgba.hpp" #include "Engine/Renderer/RenderBufferLayout.hpp" struct Vertex_PCUNT { public: static BufferAttribute Layout[]; static void VertexMasterCopyProc(void* dst, const VertexMaster* src, int count); public: Vertex_PCUNT(); explicit Vertex_PCUN...
true
58cacfd2fbe7e085957ed5991c2353e695e9f463
C++
walkccc/LeetCode
/solutions/0465. Optimal Account Balancing/0465.cpp
UTF-8
861
3.109375
3
[ "MIT" ]
permissive
class Solution { public: int minTransfers(vector<vector<int>>& transactions) { vector<int> balance(21); vector<int> debt; for (const vector<int>& t : transactions) { const int from = t[0]; const int to = t[1]; const int amount = t[2]; balance[from] -= amount; balance[to] +=...
true
513fcb3dbed9e4fc5afb48c90fd25efffb567e83
C++
lim-james/Wind
/Wind/Render.h
UTF-8
841
2.625
3
[]
no_license
#ifndef RENDER_H #define RENDER_H #include "Component.h" #include <Math/Vectors.hpp> #include <Events/Event.h> struct Render; namespace Events { struct TextureChange : Event { const unsigned previous; Render * const component; TextureChange(const unsigned& previous, Render * const component) : previous(...
true
aa365b16876a4808e1208c4de191501cec70eed2
C++
RockyYan1994/Algorithm
/242. Valid Anagram.cpp
UTF-8
1,148
3.65625
4
[]
no_license
/* 方法一:采用无序map记录一个string,然后判断。 */ //version 1(12 ms) class Solution { public: bool isAnagram(string s, string t) { unordered_map<char, int> um; for (auto ch : s) um[ch]++; for (auto ch : t) um[ch]--; for (auto &p : um) { if (p.second != 0) return false; } ...
true
ca6639c12c739672f0eb8c25f4d3d9a1c53f8e71
C++
stranxter/lecture-notes
/samples/01_programming 101/2015/functions/funct2.cpp
UTF-8
1,115
3.75
4
[ "MIT" ]
permissive
#include <iostream> using namespace std; int enterNumber (int a, int b) { int input; cout << "Please enter a number between " << a << " and " << b << "..."; do { cin >> input; } while (input < a || input > b); return input; } void printNumber (int x) { while (x != 0) { co...
true
89b7f91a5c83bbc4ec4b5c6a88e18f399d55c57d
C++
paulosuzart/graphic_editor
/src/Command.cpp
UTF-8
715
2.671875
3
[ "Apache-2.0" ]
permissive
/* * Command.cpp * * Created on: Jan 14, 2017 * Author: suzart */ #include "Command.h" #include <iostream> using namespace std; namespace paulosuzart { Command::Command(GraphEditor* editor, string command) : editor(editor), command(command) { } bool Command::run() { try { vector<string> v; split...
true
7c7e31c47ffec7c4b15ccf79b5f6a67e32322003
C++
youlive789/AlgorithmStudy
/Codeup/dp/3707.cpp
UTF-8
547
3.03125
3
[]
no_license
#include <iostream> using namespace std; unsigned long cache[100000]; unsigned long dfs(short number) { if (number == 0) { return 1; } if (cache[number]) { return cache[number]; } else { unsigned long sum = 0; for (int idx = 1; idx <= number; idx...
true
e266dc82bfe615a9249db5e4cd022d82d0db1035
C++
ciscoruiz/emc2
/solutions/06_future/future.cpp
UTF-8
3,178
3.546875
4
[ "MIT" ]
permissive
#include <vector> #include <thread> #include <algorithm> #include <time.h> #include <sys/time.h> #include <iostream> #include <future> typedef std::vector<int> InputValues; double averageMethod (const InputValues& values) { long result = 0; for (int value : values) { result += value; } return ...
true
9be664eca1bc24d038af6967452c6329ad8c4e2b
C++
firewood/topcoder
/atcoder/abc_085/d.cpp
UTF-8
538
2.734375
3
[]
no_license
// D. #include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; int main(int argc, char *argv[]) { int n, h; cin >> n >> h; vector<int> a(n), b(n); for (int i = 0; i < n; ++i) { cin >> a[i] >> b[i]; } sort(a.rbegin(), a.rend()); sort(b.rbegin(), b.rend()); int d = a[...
true
08d5ba824be1be5516e86451cd3a34a0071d518b
C++
hoklavat/beginner-algorithms
/MORE/Dynamic(UglyNumbers).cpp
UTF-8
1,056
3.796875
4
[]
no_license
//Dynamic(UglyNumbers) //ugly numbers are numbers whose only prime factors are 2, 3 or 5. 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... //Task: find nth ugly number. //Reference: dynamic programming. //Time Complexity: O(n). #include <iostream> using namespace std; unsigned findUglyNumber(unsigned n){ unsigned ugly[n]; u...
true
b38107e2ffa965cb26678971b656965354768460
C++
mismayil/cs488
/A2/A2.hpp
UTF-8
2,472
2.8125
3
[]
no_license
#pragma once #include "cs488-framework/CS488Window.hpp" #include "cs488-framework/OpenGLImport.hpp" #include "cs488-framework/ShaderProgram.hpp" #include <glm/glm.hpp> #include <vector> // Set a global maximum number of vertices in order to pre-allocate VBO data // in one shot, rather than reallocating each frame. ...
true
50bc54202357ba4258723f0524cdc92738b505d8
C++
mzlogin/LeetCode
/algorithms/cpp/implementQueueUsingStacks/test.cpp
UTF-8
664
3.34375
3
[ "MIT" ]
permissive
#include "../catch.h" #include <stack> using std::stack; #include "solution.h" TEST_CASE("Implement Queue Using Stacks", "implementQueueUsingStacks") { Queue q; SECTION("test push and peek") { q.push(1); CHECK(q.peek() == 1); } SECTION("test queue order") { q.push(1); ...
true
7ac373415a2a147889a8b4cd3a5bdad135ddca2d
C++
jdflyfly/shootForOffer
/4.cpp
UTF-8
570
2.5625
3
[]
no_license
#include <stdio.h> #include <string.h> int main(void) { // freopen("in.txt","r",stdin); char str[1000001]; int len; int new_len; int i; int cnt; gets(str); len = strlen(str); cnt = 0; for (i = 0; i < len; ++i) { if (str[i] == ' ') ++cnt; } new_len = len + 2 * cnt; str[new_len] = '\0'; --len; --new_...
true
59000145d4583b7aa81252c0af9ad84f08f89048
C++
LaiTial/CplusPlus
/BookPractice/Chapter2/비밀코드 맞추기/FindCode.cpp
UHC
740
3.5625
4
[]
no_license
/* 2019-08-31  c++ ó! chapter2 LAB1 ǻͰ ִ ڵ带 ϴ α׷ 97~122 => a~z */ #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { char code = 97, ans; string locate; srand(unsigned int(time(NULL))); code += rand() % 26; do { cout << "ڵ带 纸: "; cin >> ...
true
b1825769559265c13f1a44ec0db12fee5c7c2d25
C++
tianfangma/leetcode
/problem/201-300/213.cpp
UTF-8
730
3.328125
3
[]
no_license
/* 分成两种情况,1:偷第一家不偷最后一家;2偷最后一家不偷第一家 状态转移方程同198 */ class Solution { public: int rob(vector<int>& nums) { if(nums.empty()) { return 0; } else if(nums.size()==1) { return nums[0]; } return max(robrob(0,nums.size()-1,nums),robrob(1,nums.siz...
true
4a80aa25635c65d9ba5c3e3940fe518aeff11231
C++
zer02001/csc-2010
/csc 2111 lab 08/csc 2111 lab 08.cpp
UTF-8
1,493
3.25
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; void getdata(string[], int[][5]); void getaverage(int[][5], double[]); void print(string[], int[][5], double[]); int main() { double avg; int grades[10][5]; string names[10]; double average[10]; int tot; getdata(names, grades); getaverage(...
true
3f35a044ce5a61c98b5fec6706a37a76eb0e3d82
C++
MachineGunLin/LeetCode_Solutions
/树/297. 二叉树的序列化与反序列化.cpp
UTF-8
2,822
4.21875
4
[]
no_license
/* 将二叉树先序遍历解码为一个序列字符串s,不同的数字之间用逗号分隔,如果遇到空节点,就只在s加上一个","。 如果不是空节点,就先加上当前节点的值,然后再加上逗号。 解码的时候,也是取两个逗号之间的值,如果逗号之间为空,则说明是空节点,否则new一个TreeNode出来,节点的值就是两个逗号之间的 子串的值转为int。 */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : v...
true
5c51caf3475585814b71c4b1b9075c46c4df877b
C++
xsatishx/cloud-repo
/parcel/parcel/src/tcp2udt.cpp
UTF-8
11,971
2.515625
3
[ "Apache-2.0" ]
permissive
/****************************************************************************** * * FILE : tcp2udt.cpp * PROJECT : parcel * * DESCRIPTION : This file contains functions for creating a TCP * server that accpts incomming connections, creates a * UDT connection to remote server, and p...
true
e06f31eeb00364708e6d7bb84443ca2552d33e7b
C++
wallband/verklegt1-2017
/Verk1R/verk1Aii/main.cpp
UTF-8
625
3.296875
3
[]
no_license
#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ofstream fout; fout.open("textFileB.txt", ios::app); if (fout.is_open()) { string str; cout << "Please write a sentence: " << endl; while(str[0] != '\\') { getline(c...
true
8f0dd020b1b37293ee0c7dcb8882829ac29b06ff
C++
tanmay017/Data-Structure-and-Algorithms-Learning
/14. Trees/children_sum_property.cpp
UTF-8
807
3.328125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; struct Node { int key; Node *left; Node *right; Node(int k) { key = k; left = right = NULL; } }; bool isCSum(Node *root) { if (root == NULL) return true; if (root->left == NULL && root->right == NULL) return tr...
true
fad1b911503c7a1a28a88b0380b2308bc77d8f11
C++
KirylShakh/BlobGameStudy
/Source/Blob/BlobGameMode.cpp
UTF-8
2,721
2.625
3
[]
no_license
// Copyright Epic Games, Inc. All Rights Reserved. #include "BlobGameMode.h" #include "BlobPawn.h" #include "Tile.h" #include "Obstacle.h" #include "Droplet.h" ABlobGameMode::ABlobGameMode() { PrimaryActorTick.bCanEverTick = true; } void ABlobGameMode::BeginPlay() { Super::BeginPlay(); CreateInitialTiles(); } v...
true
6b29c0c783a9b1c69e4e92b4eb5472fab878b752
C++
duixin111/CPlusPlus
/singleNumber2.cpp
UTF-8
322
2.609375
3
[]
no_license
class Solution { public: int singleNumber(vector<int>& nums) { map<int, int> q; for(int num: nums) ++q[num]; for(auto [num, occ] : q) { if(occ == 1) { return num; break; } } return -1; } }...
true
16acc9b553c11f791b0ee1c940539d0b05fc449a
C++
s5063638/ChristosEngine2
/src/game_engine/Component.h
UTF-8
1,023
2.78125
3
[]
no_license
#ifndef _COMPONENT_H_ #define _COMPONENT_H_ #include <memory> #include "Engine.h" namespace game_engine { class Entity; class Engine; class Keyboard; class Transform; class Component { private: friend class Entity; std::weak_ptr<Entity> entity; public: virtual void OnInit(); /*!< Initialises the C...
true
e457da756b0bb82c286e6f9c81c2f056c47576ba
C++
OriginQ/QPanda-2
/ThirdParty/EigenUnsupported/Eigen/src/Skyline/SkylineInplaceLU.h
UTF-8
11,332
2.765625
3
[ "Apache-2.0" ]
permissive
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008 Guillaume Saupin <guillaume.saupin@cea.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can ob...
true
aac63637708ec6f3403e09e89bd8e64276c57551
C++
ninellekam/ALGRORITHMS_MAIL
/dz3/e.cpp
UTF-8
2,279
2.609375
3
[]
no_license
#include <stdio.h> #include <string.h> #include <unistd.h> #include <iostream> using namespace std; const int LEN = 10002; int main() { FILE *src = fopen("input.txt", "r"); FILE *dst = fopen("output.txt", "w"); FILE *f_merge = fopen("temp_3.txt", "w+"); FILE *f_1 = fopen("temp_1.txt", "w+"); FILE *f_2 = fopen("...
true
ce52ffa40e4192952945e520d38c95c5944d815c
C++
tater1337/cplusplus-fvtc
/4-15-2014 test/main.cpp
UTF-8
1,084
2.796875
3
[]
no_license
//created because I cannot create a default C++ templpate to start all my programs with //i Proboably could but not when I am also using VS2012 for other classes #include <stdio.h> //used for getchar not in codeblocks? #include <iostream> //used for cin and cout #include <iomanip> //used to modify text strings se...
true
004416a28970cfb8267e86e30bc366208125c167
C++
jaya6400/Coding
/Graph/bellman.cpp
UTF-8
1,262
3.015625
3
[]
no_license
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int isNegativeWeightCycle(int n, vector<vector<int>>edges){ vector<int> dis(n, INT_MAX); dis[0] = 0; for(int i = 0; i < n-1; i++){ for(int j = 0; j < edges.size(); j+...
true
e84885734dccc33a303faf421cc2b0ac5d19007a
C++
Caffrey/CPipeline
/Raytracing/Intrucdtion/Realistic Ray Tracing/DynSphere.h
UTF-8
545
2.578125
3
[]
no_license
#pragma once #include "Common.h" #include "Shape.h" #include "Vector.h" #include "Ray.h" #include "Color.h" class DynSphere : public Shape { public: DynSphere(const Vector3& _ocenter, RFLOAT _radius, const Color& _color, RFLOAT min_time, RFLOAT max_time); bool hit(const Ray& r, float tmin, float tmax, RFLOAT ...
true
f08e76787419701c12fa0b0b1083765248ffb114
C++
ganli2015/Hope_Love
/SentenceAnalysisAlgorithm/Punctuator.cpp
WINDOWS-1252
2,071
2.921875
3
[]
no_license
#include "StdAfx.h" #include "Punctuator.h" #include "../DataCollection/Character.h" #include "../DataCollection/Sentence.h" #include "../DataCollection/LanguageFunc.h" using namespace DataCollection; using namespace std; Punctuator::Punctuator(std::string longSen):_unpunctuated(new Sentence(longSen)) { } Punctuato...
true
fe71d565880e27c45710973df3437f7d3c7b1bdb
C++
kdimmick001/kdimmick001-CSCI21-Spring2018
/Week10/movie_search.cpp
UTF-8
1,131
3.578125
4
[]
no_license
#include <string> #include <iostream> #include <cstdlib> #include <iomanip> #include <sstream> #include <list> using namespace std; int main() { //Creating an input stream ifstream fin; //To open a text file to get the string information. fin.open(file.c_str()); //A check to make sure that th...
true
56af0ea9c3e6a1b8182cd169aa6489d2f659652e
C++
ashish25-bit/data-structure-algorithms
/Trees/AVL.cpp
UTF-8
4,035
3.734375
4
[]
no_license
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node* left; Node* right; int height; Node(int key) { data = key; left = NULL; right = NULL; height = 1; } }; int height(Node *node) { if (!node) return 0; return node->height; } // difference between left ...
true
a92b18de94fc1f648af81ba36c5c692ebe86cd6b
C++
MaggieLee01/Coding
/25_02_MergeSortedArray/MergeSortedArray.cpp
GB18030
1,003
3.71875
4
[]
no_license
/* A B A ĩ㹻Ļռ B дһ B ϲ A ʼ A B ԪֱΪ m n : A = [1,2,3,0,0,0], m = 3 B = [2,5,6], n = 3 : [1,2,2,3,5,6] https://leetcode-cn.com/problems/sorted-merge-lcci */ #include<vector> using std::vector; void merge(vector<int>& A, int m, vector<int>& B, int n) { int aIndex = m - 1, bIndex = n - 1, ansIndex = n ...
true
2cbe2ef00771106835ca7528e51322f0c66b6ad4
C++
PawelWorwa/SFMLnake
/sources/states/game/snake.hpp
UTF-8
1,328
2.765625
3
[ "MIT" ]
permissive
#ifndef SNAKE_H #define SNAKE_H #include <SFML/Graphics/Sprite.hpp> #include <SFML/Graphics/RenderWindow.hpp> #include "gameSprites.hpp" #include "direction.hpp" class Snake { private: bool moved; bool suspendGrowth; GameSprites &sprites; std::vector< sf::Sprite > parts; ...
true
bd98af651eba1c22bc5017a95f09e7d1cb66667a
C++
smadala/IIIT-PG11
/os/6/assignment6/pra/sample.cpp
UTF-8
218
2.703125
3
[]
no_license
#include<iostream> #include<map> using namespace std; struct node{ int size; map<int,node*> links; }; int main(){ map<int,node*> f; struct node *p=new node(); f=p->links; cout<<sizeof(node)<<endl; return 0; }
true
178f79075212dec7296b3d766e2eebe69c4a5a36
C++
ahmedasad236/Social_Media
/Profile.h
UTF-8
958
2.9375
3
[]
no_license
#pragma once #include <iostream> #include <cstring> #define Max_Followers_Following 1000 using namespace std; class Profile { private: char* name; int followersNum; int followingNum; protected: Profile* followers[Max_Followers_Following]; Profile* following[Max_Followers_Following]; public: Profi...
true
464f65733c2b953ce4da24b598c68cdc9830171f
C++
Karbust/Processing-Models-Generated-on-Blender
/ProjetoPOO/Face.cpp
UTF-8
6,852
3.21875
3
[]
no_license
// // Created by Karbust on 30/10/2019. // #include <iostream> #include "Face.h" Vertice * Face::CalcularCoordVetor(Vertice *V1, Vertice *V2){ float dx = V2->ReturnVX() - V1->ReturnVX(); float dy = V2->ReturnVY() - V1->ReturnVY(); float dz = V2->ReturnVZ() - V1->ReturnVZ(); return new Vertice(dx, dy, ...
true
f0dd4b2bb1a2bfadca0135ef8f0ab7c9397cdd9a
C++
wmichalski/UNIX-shell
/source/Environment.cpp
UTF-8
3,599
3.25
3
[]
no_license
#include <Environment.h> void Environment::setEnvVariable(std::string key, std::string value) { hashmap[key] = value; } std::string Environment::getEnvVariable(std::string key) { char *ret = getenv(key.c_str()); if (ret != NULL) return std::string(ret); if (hashmap[key] != "") { r...
true
a53f5a4da4e615152302ac2f4264ec1519290e99
C++
reddrinkbro/directPortal
/DIRECT3D/particle.h
UHC
1,531
2.65625
3
[]
no_license
#pragma once //ƼŬ ü typedef struct tagPARTICLE_VERTEX { D3DXVECTOR3 pos; // ġ float size; //ƼŬ DWORD color; // ÷ enum { FVF = D3DFVF_XYZ | D3DFVF_PSIZE | D3DFVF_DIFFUSE }; }PARTICLE_VERTEX, *LPPARTICLE_VERTEX; typedef vector<D3DXCOLOR> VEC_COLOR; typedef vector<float> VEC_SCALE; // ϳ class p...
true
2ffd9a6f543e60f47815dbe75b5ba7cf3e7ce273
C++
JacobLetko/IntroToCpp
/Assesment/textanimations.h
UTF-8
353
2.671875
3
[]
no_license
#pragma once void colorFunction(int x);//changes color for the lines not entire console void delay(int delay, std::string text);//prints each char slowly in a string void delaySkip(int delay, std::string text); //prints lines and skips one void test(int x, int y); //test the colors of color fuction between certin n...
true
74bfc360002c6d00ec5cf4d0ba0550af6ebce48a
C++
HaoYang0123/LeetCode
/Capitalize_the_Title.cpp
UTF-8
918
3.46875
3
[]
no_license
// Leetcode 2129 class Solution { public: string capitalizeTitle(string title) { string res = ""; vector<string> words; title += ' '; string cur = ""; for(int i=0; i<title.length(); ++i) { if(title[i] != ' ') { if(title[i] >= 'a' && title[i] <= 'z...
true
0d47bf90a7ba4859577173c9c026bedc16428f63
C++
tlecoeuv/piscine_cpp
/day_06/ex01/main.cpp
UTF-8
1,211
3.671875
4
[]
no_license
#include <iostream> #include <string> struct Data { std::string s1; int n; std::string s2; }; void* serialize(void) { char *ret = new char[16 + sizeof(int)]; std::string alnum("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); std::srand(time(NULL)); std::cout << "values during seria...
true
e3a7eff5eec75b813a24ceb86a2c342c0a78071d
C++
Beom-portfolio/Direct3D-Team-DirectX9-
/SRTeam_Project/Engine/Utility/Codes/Rect_Texture.cpp
UHC
1,966
2.546875
3
[]
no_license
#include "..\Headers\Rect_Texture.h" USING(Engine) CRect_Texture::CRect_Texture(LPDIRECT3DDEVICE9 pGraphicDev) : CVIBuffer(pGraphicDev) { } CRect_Texture::CRect_Texture(const CRect_Texture & rhs) : CVIBuffer(rhs) { } CRect_Texture::~CRect_Texture() { } HRESULT CRect_Texture::Ready_Buffer(void) { m_iVertexSize =...
true
45a376398827d46056e8a0f4fc1fb7766c5fcbc6
C++
stiltskincode/lemur-game
/TextureManager.h
UTF-8
475
2.6875
3
[]
no_license
#ifndef TEXTUREMANAGER_H_ #define TEXTUREMANAGER_H_ #include <string> #include <deque> #include "TGAImage.h" class TextureManager { public: struct Texture { std::string name; GLuint tex; }; static void setLocation(std::string loc) {location=loc;} static GLuint get(std::string name, bool mipmaps = true); sta...
true
dfb5656c037f774f2ab8359c9a6b2c1eea5f7fe5
C++
N4G170/pathfind_ui
/src/include/clock.hpp
UTF-8
1,682
3.515625
4
[ "MIT" ]
permissive
#ifndef CLOCK_H #define CLOCK_H #include <string> #include <memory> #include <mutex> #include <chrono> #include <map> /** * \brief Basic SINGLETON class to manage a small clock to be used by Euler Problems functions */ class Clock { public: virtual ~Clock(); /** * \brief Get a std::uni...
true
c7081aa96daa7ace73b8c95a9f122b45eddc3c66
C++
H-Shen/Collection_of_my_coding_practice
/Leetcode/825/825.cpp
UTF-8
1,553
2.71875
3
[]
no_license
class Solution { public: int numFriendRequests(vector<int>& ages) { sort(ages.begin(),ages.end()); int counter = 0; int n = (int)ages.size(); for (int x = 0; x < n; ++x) { if (ages[x] >= 100) { int lower, upper; if (ages[x] & 1) { ...
true
c44722bce7e7904d0e003e353dd3658d872ee07a
C++
mukulaggarwal/Codes
/codechef/palidrome.cpp
UTF-8
621
2.5625
3
[]
no_license
#include<cstdio> #include<iostream> #include<cstring> #include<cmath> using namespace std; #define M 1000000007 long long int power(long long int n) { if(n==0) return 26; if(n==1) return 26; long long int x=power(n/2); x=(x*x)%M; if(n%2) x=(x*26)%M; return x; } int main()...
true