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
ff83e026925721d3acbcc6df2352259604f55f56
C++
zswDev/libgco
/utils.cpp
UTF-8
1,652
2.65625
3
[]
no_license
#include <sched.h> #include <unistd.h> #include <stdio.h> #include <pthread.h> #include <stdlib.h> #include <time.h> #include "utils.h" int CPUS = 0; cpu_set_t* CPU_masks = 0; void cpu_init() { CPUS = sysconf(_SC_NPROCESSORS_CONF); cpu_set_t* CPU_masks = (cpu_set_t*)malloc(sizeof(cpu_set_t)* CPUS); }; void...
true
06ab95205eec47264e6f8c0b76a9c4e26418ab93
C++
wsldwo/CPlusPlus
/NOI/NOI1139.cpp
GB18030
1,575
3.703125
4
[]
no_license
#include <iostream> #include <string> using namespace std; string s1,s2; string sub(string a,string b)//a - b { //ȣҪȽabĴСaСbҪתΪ -b - a int len_a = a.length(),len_b = b.length(); int is_a_bigger = 0;//0Ϊ if(len_a > len_b) is_a_bigger = 1;//1Ϊ else if(len_a == len_b) { for(int i = 0;i < len_a;i++) { if(a...
true
b9d018dbead2c9ee734d6671f2ebdade1b210df4
C++
iShubhamRana/DSA-Prep
/Leetcode-Contests/biweekly-54/1894.cpp
UTF-8
385
3.21875
3
[]
no_license
// 2 tricks // 1. use '0l' instead of '0' in accumulate as sum may be 'long' // 2. if((k -= c[i]) < 0) class Solution { public: int chalkReplacer(vector<int> &c, long k) { long sum = accumulate(c.begin(), c.end(), 0l); k %= sum; for (int i = 0; i < c.size(); ++i) if ((k -=...
true
90a691b1a1a6d83f031ce59e92cdf6ebb1245906
C++
wildandri/sudoku_solver
/main.cpp
UTF-8
1,622
2.671875
3
[]
no_license
#include "solverengine.h" #include "opencv2/core.hpp" #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <iostream> #include <vector> int main() { std::cout << "- - - START PROGRAMM - - -" << std::endl; double time = (double)cv::getTickCount(); // Load Image // cv::Mat frame = cv...
true
c26d886b99592eb909d98eebae9955e40271534a
C++
tkubicz/ngengine
/source/src/NGE/Geometry/Basic/Box.cpp
UTF-8
5,233
2.65625
3
[]
no_license
#include "NGE/Geometry/Basic/Box.hpp" #include "NGE/Math/Vector3.hpp" #include "NGE/Rendering/Renderer.hpp" #include "NGE/Core/Core.hpp" using namespace NGE::Geometry::Basic; bool Box::Initialize() { return Initialize(1.0f); } bool Box::Initialize(float size) { this->boxSize = size / 2.0f; InitializeGeometry(); ...
true
4e5025d64313553c3310bb28329a6cefc4e27a67
C++
SoulPoet/ITCG_coding_project
/CommonFunc.cpp
UTF-8
2,859
2.90625
3
[]
no_license
#include "CommonFunc.h" const int A = 48271; const long M = 2147483647; const int Q = M / A; const int R = M % A; long int state; bool normal_flag; CodeWord::CodeWord(int codeword_len) { len = codeword_len; cw = new int[codeword_len]; } CodeWord::~CodeWord() { delete[] cw; } CodeWord Co...
true
d5a595132b2334977ba4370de9a4587c2b7a9a2f
C++
guardiancrow/clipss
/PNGChunk.h
UTF-8
1,067
2.671875
3
[ "MIT" ]
permissive
//Copyright (C) 2014 - 2016, guardiancrow #pragma once #ifndef _PNGCHUNK_H_ #define _PNGCHUNK_H_ #include "CRC32.hpp" class PNGChunk { public: PNGChunk(){ ChunkType = new char[5]; memset(ChunkType, 0, 5); ChunkData = NULL; Size = 0; CRC = 0; Offset = 0; isCritial = false; isPublic = false; isRes...
true
fab7416a78017d445e3ecebea5af2033ea4f3856
C++
ivandryi/csci333-queue
/src/AQueue/AQueue.h
UTF-8
571
3.078125
3
[]
no_license
#ifndef __AQUEUE_H__ #define __AQUEUE_H__ class AQueue { private: int* theQueue; // array that holds the elements of the queue int front; // references the first element in the queue int back; // references the last element in the queue int numOfElements; // stores number of elements in the queue int cap...
true
971325d9ab4d068938ac456d9aeac41d88c3b448
C++
Yhatoh/Programacion_competitiva
/codeforces/1030A-In_Search_Of_An_Easy_Problem.cpp
UTF-8
303
2.53125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.setf(ios::fixed); cout.precision(4); int n, x; cin >> n; while(n--){ cin >> x; if(x == 1) break; } cout << (x == 1 ? "HARD" : "EASY") << "\n"; return 0; }
true
48cbbf8e31f85faed46cb7f2fc84fb5e613be025
C++
Klaudiaklaudia98/repo158251
/mysin.h
UTF-8
848
3.140625
3
[ "MIT" ]
permissive
#ifndef MYSIN_H #define MYSIN_H class MySin { //! \defgroup 1 metody_publiczne public: //! \{ /**publiczna metoda MySin()*/ MySin(); /**publiczna metoda MySin(double x)*/ MySin(double x); /**publiczna metoda MySin(const MySin &obj)*/ MySin(const MySin &obj); /**publiczna metoda ~MySin()*/ ~MySin(); ...
true
3fac1f84df115ab954117db2420c95fbc6f843aa
C++
MTM-Almog-Tom/ex2
/part2/Sniper.cpp
UTF-8
2,756
3.046875
3
[]
no_license
#include "Sniper.h" namespace mtm { Sniper::Sniper(int health, int ammo, int range, int power, Team team) : Character(health, ammo, range, power, team), attack_counter(1) {} //constructor Sniper::Sniper(const Sniper &copy_from) : Character(copy_from) {} //copy constructor Sniper &Sniper::operator...
true
1cdf75abd6f31e1c954bd9504319afb053e3cc5c
C++
zhaoxuyang13/distributed-system
/lab1-rdt/rdt_receiver.cc
UTF-8
5,491
2.703125
3
[]
no_license
/* * FILE: rdt_receiver.cc * DESCRIPTION: Reliable data transfer receiver. * NOTE: This implementation assumes there is no packet loss, corruption, or * reordering. You will need to enhance it to deal with all these * situations. In this implementation, the packet format is laid out as * th...
true
24b7403a52de56efca6a48c17da32cc9f2001c91
C++
loloof64/ChessTrainingVsEngine
/libs/chessx-pgn/database/partialdate.h
UTF-8
3,369
3.015625
3
[ "MIT" ]
permissive
/*************************************************************************** * (C) 2005-2009 Michal Rudolf <mrudolf@kdewebdev.org> * * * * This program is free software; you can redistribute it and/or modify * * it ...
true
08c30c653dcdd066fbcdab8efe070f20cd754340
C++
AndreOliver/SpaceFlight-Game
/ShipSprite.h
UTF-8
1,216
2.515625
3
[]
no_license
#pragma once #include "tsprite.h" class ShipSprite : public TSprite { public: ShipSprite(sf::Texture & texture) { setPosition(sf::Vector2f((float)-(rand()%200+100),(float)-(rand()%200+100))); setSpeed(sf::Vector2f((float)(rand()%200+20),(float)(rand()%200+20))); setAcceleration(sf::Vector2f((float)(rand()%30...
true
d803b15689bb8b1e6c132bb7ad971b18f5a9838a
C++
theaksharapathak/c-prog-assignments
/lab6.24.cpp
UTF-8
444
3.4375
3
[]
no_license
#include<stdio.h> int power(int base,int powerRaised); int main() { int base,powerRaised,result; printf("enter base no\n"); scanf("%d",&base); printf("enter power no(positive integer):\n"); scanf("%d",&powerRaised); result=power(base,powerRaised); printf("%d ^ %d = %d",base,powerRaised,result); return 0;...
true
b348d1c36ac45af3761b7cf10654680430ee7dea
C++
rvbc1/BLDC_DRIVER
/Inc/LedDriver.h
UTF-8
1,251
2.609375
3
[]
no_license
/* * LedDriver.h * * Created on: Apr 13, 2019 * Author: rvbc- */ #ifndef LEDDRIVER_H_ #define LEDDRIVER_H_ #include "stm32f3xx_hal.h" class Led_Driver { private: uint32_t pin; uint16_t start_pin; uint16_t end_pin; GPIO_TypeDef* port; void init(GPIO_TypeDef* port, uint16_t start_pin, uint16_t end_pin...
true
3281219be09ac8fa4692a561aa36509c04b6b2ae
C++
arvind96/AGame-Engine
/AGame Engine/Engine/Input.cpp
UTF-8
2,693
3.15625
3
[]
no_license
#include "Input.h" #include <string> namespace AGameEngine { SDL_Event Input::_singleHitKeyEvent; const Uint8* Input::_continuousKey; Input::Input() { } Input::~Input() { } void Input::ProcessInput() { /* const Uint8* keystate = SDL_GetKeyboardState(NULL); //Continuous response keys if (keystate...
true
ecffd7c7fc5e89c38bd5d6fc2191559b39d74da5
C++
iceysteel/CS2
/lab_6/src/Time.cpp
UTF-8
2,294
3.171875
3
[]
no_license
#include "Time.h" #include <iostream> #include <iomanip> #include <string> using namespace std; Time::Time(int y, string mo, int d, int h, int m, int s) { setTime(y, mo, d, h, m, s); } void Time::setTime(int y, string mo, int d, int h, int m, int s) { setYear(y); setMonth(mo); setDay(d); setHr(h)...
true
600ec7f2670b131d9309def419cd2ec41b375dcf
C++
4l3dx/DBOGLOBAL
/NtlLib/Server/NtlNetwork/PeekerQueue.cpp
UTF-8
2,173
2.625
3
[]
no_license
#include "stdafx.h" #include "PeekerQueue.h" #include "assert.h" CPeekerQueue::CPeekerQueue(UINT64 nBufferLimit) { m_nBufferLimit = nBufferLimit; } CPeekerQueue::~CPeekerQueue() { Clear(); } void CPeekerQueue::Clear() { CPeeker peeker; while (this->size()) { peeker = this->front(); peeker.Release(); t...
true
dc656efb0e51de023506f52e001419ae7b42243f
C++
jacgoldberg/Assignment2
/Main.cpp
UTF-8
2,016
3.109375
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdlib> #include "myGrid.h" #include <thread> #include <chrono> using namespace std; bool start(){ bool a; cout << "Would you like to begin?(1/0)" << endl; cin >> a; return a; } void flair(){ cout << " ---------WELCOME TO THE GA...
true
aa6a95bf3d8105518b33fc30ed7f6cc333bd9a45
C++
mijanur-rahman-40/C-C-plus-plus-Online-Judge-Algorithms-Practise-Programming
/Bestt_algorithm Based problems code/C++ .STL Container/Map problems/Multimap/count.cpp
UTF-8
582
3.328125
3
[]
no_license
#include <iostream> #include <map> using namespace std; int main () { multimap<char,int> my; my.insert(make_pair('x',50)); my.insert(make_pair('y',100)); my.insert(make_pair('y',150)); my.insert(make_pair('y',200)); my.insert(make_pair('z',250)); my.insert(make_pair('z',300)); for (char c='x'; c<='z';...
true
a400acf6a784eb46917dc55a8d00941001b20673
C++
NullStudio/NoNameGame
/src/Game.cpp
UTF-8
3,151
2.78125
3
[]
no_license
#include "Game.hpp" #include "SCredits.hpp" #include "SMenu.hpp" Game& Game::GetInstance() { static Game self; return self; } Game::Game() : mInput( mApp.GetInput() ), mStateManager( StateManager::GetInstance() ), mResourceManager( ResourceManager::GetInstance() ), mIsRunning(false) { } Game...
true
92b06245e352d7ca25da9b091f616932587104be
C++
withelm/Algorytmika
/leetcode/algorithms/c++/Car Pooling/Car Pooling.cpp
UTF-8
384
2.703125
3
[]
no_license
class Solution { public: bool carPooling(vector<vector<int>> &trips, int capacity) { vector<int> t(1000 + 10, 0); for (auto &x : trips) { for (int i = x[1]; i < x[2]; i++) { t[i] += x[0]; if (t[i] > capacity) ret...
true
d568690fc28ef88f78dfcad7d7c9336b92e2e542
C++
qt/qtbase
/src/corelib/text/qlatin1stringmatcher.cpp
UTF-8
6,101
2.921875
3
[ "LicenseRef-scancode-unicode" ]
permissive
// Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qlatin1stringmatcher.h" #include <limits.h> QT_BEGIN_NAMESPACE /*! \class QLatin1StringMatcher \inmodule QtCore \brief Optimized search for substring in La...
true
397cfaf320fb17da4342e8d7c63e365e519339cc
C++
romulosantos92/TrabalhoPesquisaOperacionalGurobi
/GurobiTestProj/SupportLib.cpp
UTF-8
2,374
3
3
[]
no_license
#include "SupportLib.h" void SupportLib::leArquivo() { char fileName[50] = "myFile.csv"; /* cout << "\nDigite o nome do arquivo:\n"; string str; //scanf("%s", fileName); gets(fileName);*/ //filename = ; ifstream Myfile(fileName); if (!Myfile.is_open()) { cout << "...
true
fa88ed482acaf33dbd580b144b8afcfafb62498d
C++
Xumengqi0201/OJ
/PAT/Adavanced-level/1138/main2.cpp
UTF-8
786
2.984375
3
[]
no_license
#include <iostream> #include <vector> using namespace std; vector <int> preorder , inorder; int n; void inpre(int inL, int inR, int preL, int preR); int main() { ios :: sync_with_stdio(false); cin.tie(0); cin >> n; preorder.resize(n); inorder.resize(n); for (int i = 0; i < n; i++){ cin >> preorder[i]; } ...
true
ddbae3e906458fbf1cee5d123904d863d28c33da
C++
aranoy15/embedded-project
/src/lib/time/timer.cpp
UTF-8
550
2.828125
3
[]
no_license
#include <lib/time/timer.hpp> //#include <cassert> namespace lib::time { void Timer::start() { _start_time = Time::current(); _is_started = true; } void Timer::restart() { start(); } void Timer::stop() { _is_started = false; } bool Timer::has_expired(const Time& timeout) { //assert(is_started())...
true
9ce69a366ed61c22cc68dda37bdec3283cd26b2c
C++
uvazke/AtCoder
/ABC/ABC199/D.cpp
UTF-8
1,489
2.734375
3
[]
no_license
#include <cmath> #include <iostream> #include <queue> #include <vector> #define myFor(N) for (int i = 0; i < N; i++) #define myForFL(first, last) for (int i = first; i < last; i++) using namespace std; typedef struct { int nodeNum; vector<int> edgesTo; int color; } Node; vector<Node> nodes(N); int main(void) {...
true
6e28fb8840324831a4153430ae74d0f423cff612
C++
LIAO-JIAN-PENG/CPE-One-Star-record
/STAR_33.cpp
EUC-JP
1,060
3.46875
3
[]
no_license
# include<stdio.h> # include<stdlib.h> # include<math.h> # pragma warning(disable: 4996) int isPrime(int); int reverse(int); int getDigit(int); int main() { /* 1. N is not prime., if N is not a Prime number. 2. N is prime., if N is Prime and N is not Emirp. 3. N is emirp., if N is Emirp. */ int n...
true
d5a74920639e616d155d7c38dee7f8c065ae9211
C++
xtachx/AutoBub3hs
/AlgorithmTraining/Trainer.cpp
UTF-8
8,644
2.609375
3
[]
no_license
#include <vector> #include <string> #include <dirent.h> #include <iostream> #include <stdexcept> #include <opencv2/opencv.hpp> #include "Trainer.hpp" #include "../LBP/LBPUser.hpp" #include "../ImageEntropyMethods/ImageEntropyMethods.hpp" #include "../common/UtilityFunctions.hpp" //#include "ImageEntropyMethods/Imag...
true
1f287abdc344da529b67cdfaafbb5a0f68d2eafa
C++
rishavjnv12/Code-backup
/range_q/sum.cpp
UTF-8
1,104
2.921875
3
[]
no_license
#include <bits/stdc++.h> #define vi vector<int> const int MAXN = 1000; using namespace std; int t[4*MAXN]; void build(vi a,int v,int tl,int tr){ if(tl==tr){ t[v]=a[tl]; }else{ int tm = (tl + tr) / 2; build(a, v*2, tl, tm); build(a, v*2+1, tm+1, tr); t[v] = t[v*2] + t[v...
true
570bb9dfb062ac6dde529b670593cc59df7bf34d
C++
HaochenLiu/My-LeetCode-CPP
/191.cpp
UTF-8
610
3.640625
4
[]
no_license
/* 191. Number of 1 Bits Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit integer ’11' has binary representation 00000000000000000000000000001011, so the function should return 3. Credits: Special thanks to @ts for add...
true
c5fdf3132afefadd68f30268806eef8eff5b8928
C++
cmz2012/lt
/1260.cpp
UTF-8
548
3.125
3
[]
no_license
#include <iostream> #include <vector> using namespace std; vector<vector<int>> shiftGrid(vector<vector<int>>& grid, int k) { int n=grid.size(),m=grid[0].size(); vector<vector<int>> res(n,vector<int>(m,0)); k = k%(n*m); for(int i=0;i<n;i++) for(int j=0;j<m;j++){ int ni=(i+(j+k)/m)%n;...
true
5935a6e48991c9838721d2ef8542526c7c37dfb6
C++
dmdamen/photonic
/classes/filereader/filereader.cpp
UTF-8
1,241
3.125
3
[]
no_license
#include <algorithm> #include <cstring> #include "filereader.hpp" Filereader::Filereader(const std::string path) : Filereader(path, 65536) { } Filereader::Filereader(const std::string path, const size_t maxBufferLength) : m_path {path}, m_maxChunksize {maxBufferLength} { m_stream >> std::noskipws; m_st...
true
ff8bbf4a8a2372307254f913f0222daac93455ae
C++
elatisy/shujujiegou
/HuffmanTree/HuffmanTree.h
UTF-8
2,348
3.578125
4
[]
no_license
#include "Node.h" #include "../MinHeap/MinHeap.h" #ifndef HUFFMANTREE_H #define HUFFMANTREE_H template <class T> class HuffmanTree { private: Node<T> *root; void deleteTree(Node<T> *node); void mergeTree(Node<T> *treeRoot1, Node<T> *treeRoot2, Node<T> *&mergedTreeRoot); Node<T>* objectToPtr(Node<T> ob...
true
dcc6d76cacccdf849dbb856cb707e8c0d37d78dc
C++
CKBird/HearthstoneSim
/Card.h
UTF-8
3,709
3.203125
3
[]
no_license
#pragma once #include <string> #include <iostream> #include <array> using namespace std; //Changes to the following enum classes must be maintained in the operator<< as well enum class card_type { none, minion, spell, weapon, hero }; enum class class_name { none, demon_hunter, druid, hunter, mage, paladin, priest, ...
true
15dfdb79f6b016dee340afcc471dbad9ec5dbe27
C++
peterisgood2002/99.NctuProject
/02.Computer Graphic/Assignment1/HW1/program23.cpp
BIG5
1,499
2.796875
3
[]
no_license
/****************************************** FILE program23.cpp Purpose Ѥl@~GҦO 2.Render the Utah teapot using Gouraud shading. (15%) Ѥl@~TҦO 4.Render the Utah teapot with bump mapping.(50%) NOTE Author 9757553 C *******************************************/ #include "function.h" extern GLuint texture[NTE...
true
76a8fff799abfbc49988d68f7735a44dca396fd7
C++
ttiozinho00/pac-man-em-cpp
/Headers/Console.hpp
UTF-8
362
3.203125
3
[]
no_license
#ifndef GAME_H #define GAME_H #include <string> #include <iostream> using namespace std; class Console { private: std::string m_name; public: Console(std::string name); void writeLine(std::string line); }; Console::Console(string name) { m_name = name; } void Console::writeLine(string line) { cout << "[" << ...
true
b0497eb833d961f96928dd424430b89ada0afaab
C++
fngoc/CppModules
/Module08/ex01/main.cpp
UTF-8
2,137
3.21875
3
[]
no_license
#include "span.hpp" using std::cout; using std::endl; int main() { srand(time(NULL)); cout << "---------TEST-0---------" << endl; { Span sp(1000); for (int i = 0; i < 1000; ++i) { sp.addNumber(i + rand() % 10); } cout << "short: " << sp.shortestSpan() << endl; ...
true
503f26f899e8fe1be6c7c1364fd99a4c30e181fd
C++
Antoniano1963/vscode_cpp
/cpp_window/Week4/assignment12.cpp
UTF-8
8,711
3.203125
3
[]
no_license
#include<iostream> #include<string> #include<ctime> #include<algorithm> #include<thread> #include<numeric> #include<vector> #include<functional> #include "big_operation1.1.h" #include<cmath> #include<cblas.h> using namespace std; bool testNum(string str); long testFunc(string str); void creatVector(string str, float *v...
true
0d924399408096831b39a6d909eeb09fe966daac
C++
ftiasch/ccpc-final-2020
/main/nondegenerate-triangle/solution.cc
UTF-8
1,076
2.8125
3
[]
no_license
#include <bits/stdc++.h> namespace { static const int ITERATIONS = 20; struct Point { int x, y; }; Point operator-(const Point &a, const Point &b) { return Point{a.x - b.x, a.y - b.y}; } using Long = long long; Long det(const Point &a, const Point &b) { return static_cast<Long>(a.x) * static_cast<Long>(b.y)...
true
5598d4e08ef2572025572de634d126784f5669bb
C++
archer18/homework
/HW4 final.cpp
UTF-8
943
3
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; void extract(ifstream& read, ofstream& write); int main() { ifstream read; ofstream write; read.open("grades.dat"); write.open("Grades Calculated.dat"); if (read.fail()) { cout << "ERROR: Cannot read file \n"; exit(1); } ...
true
c764225ff314e36a484135f928125647dfe9f611
C++
defuyun/ACM
/入门经典/part2/chapter6/6.2/6.2.2-链式结构.cpp
UTF-8
1,059
2.921875
3
[]
no_license
#include<iostream> #include<cstdio> #include<cstdlib> using std::cin; using std::cout; using std::endl; const int maxn=500000 + 50; int left[maxn],right[maxn],n,t; void link(int a,int b){ right[a]=b; left[b]=a; } int main(){ cin >> n; for(int i=1;i<=n;i++) { left[i]=i-1; right[i]=i...
true
a6dd902da225bb193da6ef6bfb6dc827590b8776
C++
HarveyHub/NowCoder
/baidu/stand_order.cpp
UTF-8
393
3
3
[]
no_license
#include<iostream> #include<list> using namespace std; struct Person { int order; int no; Person(int i):order(i),no(i){}; }; int main() { int M; while(cin >> M) { list<Person> ps; for(int i = 1; i <= 100; i++) { ps.push_back(Person(i)); } // int left = 100; int pos = 0; while(ps.size() >= M) ...
true
30091dd7bae20977e67eb84e1b65035f3ae3f327
C++
caa-dev-apps/libcef_v2
/source/CUtils.cpp
UTF-8
840
2.65625
3
[ "MIT" ]
permissive
#include "stdio.h" #include "stdlib.h" #include <string> #include <vector> #include <stdbool.h> #include <cstdlib> #include <ctime> #include <ostream> #include <iostream> #include <unistd.h> using namespace std; //x #include <cstdlib> /////////////////////////////////////////////////////////////////////////// // ...
true
bc15b2376cc40d35e8b84f162399e8b0126344bc
C++
Mihret-T/SE-c-User_Defined_Header_Files
/main.cpp
UTF-8
1,172
3.578125
4
[]
no_license
//main.cpp #include "Cal.h" #include <iostream> #include<string> using namespace std; int main(){ char op; float a, b; cout <<"Enter operator: "; cin >> op; cout << "Enter the first number: "; cin >> a; cout << "Enter the second number: "; cin...
true
6ef553a7b10fecabd689d4d4dd64f182c8251ab9
C++
dskading/iqrf-daemon
/daemon/MqttMessaging/MqttMessaging.h
UTF-8
1,033
2.609375
3
[ "Apache-2.0" ]
permissive
#pragma once #include "JsonUtils.h" #include "IMessaging.h" #include <string> class Impl; typedef std::basic_string<unsigned char> ustring; class MqttMessaging : public IMessaging { public: MqttMessaging() = delete; MqttMessaging(const std::string& name); virtual ~MqttMessaging(); //component void start...
true
81ce263cf6e37b9a26b8b2771ffc37b63fcff2e4
C++
jsyeh/uva
/cpe/CPE_20201222/C_uva10415.cpp
UTF-8
1,273
3
3
[]
no_license
#include <stdio.h> int findNote(char c) { char note[]="cdefgabCDEFGAB"; for(int i=0; i<14; i++){ if(note[i]==c) return i; } } //table[note][finger]表示音符note對的手指finger有沒有按 int table[14][10]={ // 1,2,3,4,5,6,7,8,9,10 {0,1,1,1,0,0,1,1,1,1},//c {0,1,1,1,0,0,1,1,1,0},//d {0,1,1,1,0,0,1,1,0,0},//e {0,1,1,1,0,0,1,...
true
797f5ee9e1d3b1dad1204593ddd6f9e98b1fb27d
C++
flexoid/rTracer
/src/vector3.h
UTF-8
2,475
3.640625
4
[]
no_license
#ifndef VECTOR3_H #define VECTOR3_H #include <math.h> class Vector3 { public: // Data float x, y, z; // Ctors Vector3( float InX, float InY, float InZ ) : x( InX ), y( InY ), z( InZ ) { } Vector3( ) : x(0.0f), y(0.0f), z(0.0f) { } // Operator Overloads ...
true
ccc3dec34ae903e6455735ed5e5ab885d2b4438f
C++
giovgiac/AvalonEngine
/AvalonEngine/Source/Runtime/Components/SpriteComponent.h
UTF-8
455
2.546875
3
[]
no_license
/** * SpriteComponent.h * * Copyright (c) Giovanni Giacomo. All Rights Reserved. * */ #pragma once #include <Components/PrimitiveComponent.h> namespace Avalon { class ASpriteComponent : public APrimitiveComponent { private: virtual void ConstructObject(void); public: ASpriteComponent(void); void Set...
true
e03a306c2fc03ba23d5cdad32cdca38a5a82e985
C++
arakna/ArduinoLibraries
/LcdMenu/LcdMenuHandler.h
UTF-8
1,511
3.109375
3
[]
no_license
#ifndef LCDMENUHANDLER_H #define LCDMENUHANDLER_H #include <Arduino.h> #include <LiquidCrystal.h> #define TYPE_SHORT 0 #define TYPE_INT 1 #define TYPE_LONG 2 class LcdMenuHandler { public: LcdMenuHandler(int ident) { this->ident = ident; this->val = 0; this->state=0; }; virtual ~LcdMenuHandler() {}; void takeCont...
true
f751247a24501f12fdf739ea82ad62b7bd9f066f
C++
Sookmyung-Algos/2021algos
/algos_assignment/2nd_grade/김민정_mzeong/week1/4358.cpp
UTF-8
565
2.953125
3
[]
no_license
#include <iostream> #include <map> #include <string> using namespace std; void init() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); } int main() { init(); map<string, float> m; string tree; int count = 0; while (getline(cin, tree)) { if (m.find(tree) != m.end()) m[tree] += 1; else m[...
true
bbd1a2e3c549c7e499ad2e4726d22e5e3b32b494
C++
rubenwardy/rufunge
/src/subroutine.hpp
UTF-8
284
2.734375
3
[]
no_license
#pragma once class Thread; class VM; class Subroutine { public: int users = 0; void grab() { users++; } void drop() { users--; } /// Either performs the calculation and adds it to the stack, or pops a new cursor onto /// The stack virtual void run(VM* vm, Thread *th) = 0; };
true
eb54f8427f2cc88e9175df3256649203a5f7388f
C++
miamiww/ghostDoll
/servoTester/servoTester.ino
UTF-8
797
2.640625
3
[]
no_license
#include <Servo.h> Servo panelServo; int pos = 140; int ledPin = 2; int servoPin = 10; int statePin = HIGH; int knockPin = 0; byte val = 0; int THRESHOLD = 80; void setup(){ Serial.begin(9600); pinMode(ledPin,OUTPUT); digitalWrite(ledPin, HIGH); panelServo.attach(servoPin); panelServo.write(pos); } void lo...
true
3f12a4704e8c269724b0ef50374014d87c7394b1
C++
awarirahul365/CSE-2003-Data-Structures-and-Algorithms
/Leetcode 30 Days Solution/Find the Difference of Two Arrays.cpp
UTF-8
1,187
2.703125
3
[]
no_license
class Solution { public: vector<vector<int>> findDifference(vector<int>& nums1, vector<int>& nums2) { vector<vector<int>>vect; unordered_set<int>notnums2; unordered_set<int>notrepeat1; unordered_set<int>notnums1; unordered_set<int>notrepeat2; for(int i=0;i<nu...
true
625f1073a48795e39f859014459914a558089cbf
C++
mlitman/ShuntingYard
/Node.cpp
UTF-8
280
3.015625
3
[]
no_license
#include "Node.hpp" Node::Node(string payload) { this->payload = payload; this->nextNode = 0; } string Node::getPayload() { return this->payload; } Node* Node::getNextNode() { return this->nextNode; } void Node::setNextNode(Node* n) { this->nextNode = n; }
true
f37e3b3adcba3ad887efd0606f825c0c989650bd
C++
pwwpche/X-Locate-OpenCV
/scale_space.cpp
UTF-8
1,028
2.9375
3
[]
no_license
#include "scale_space.h" #include "gaussian_blur.h" IplImage *** generate_scale_space(IplImage * img, int octaves, int scales) { // scale_space[i][j] is the ith octave, jth scale (blur level) IplImage *** scale_space = new IplImage**[octaves]; for(int i=0;i<octaves;++i) { scale_space[i] = new IplImage*[sca...
true
0f16c733efae744df1f9d87eeed19ead2a727d81
C++
Lawrenceh/AC_Monster
/two_sorted_kth/two_sorted_kth.cpp
UTF-8
1,590
3.3125
3
[]
no_license
#include <iostream> #include <string.h> #include <stdlib.h> using namespace std; int FindKthElm(int A[], int aBeg, int aEnd, int B[], int bBeg, int bEnd, int k) { if (aBeg > aEnd) return B[bBeg + k - 1]; if (bBeg > bEnd) return A[aBeg + k - 1]; int aMid = aBeg + (aEnd - aBeg)/2; ...
true
290054f57b63c93bbf0617521f87b9aeff27b14c
C++
DullemondWilliam/Bloom-Filter-UI
/Bloom-Filter/csvbuilder.cpp
UTF-8
1,795
2.921875
3
[]
no_license
#include <QFile> #include "csvbuilder.h" //Assuming data is entered linearly not logrithmicly CSVBuilder::CSVBuilder() { } void CSVBuilder::insertColomn( double head, QVector<double> m_colomn ) { m_xAxisLabel.push_back( head ); m_data.push_back( m_colomn ); } bool CSVBuilder::printToFile( QString fileName, Q...
true
d6c0848e482d5b97abb31fcc0f20c1d3fdd5e0c2
C++
charles-a-beswick/Collatz-conjecture
/Collatz conjecture.cpp
UTF-8
1,599
3.65625
4
[]
no_license
#include <iostream> #include<limits> int main() { char repeat; do { std::cout << "======================================================\n " << "Enter a number and we will perform the Collatz conjecture on it!\n" << "=============================================...
true
07f4ea5fb7a994fd2e0daf621d550451488bb32f
C++
NemoLeiYANG/generalvisodom
/src/util/math.cpp
UTF-8
5,865
3.0625
3
[ "BSD-2-Clause" ]
permissive
#include "gvio/util/math.hpp" namespace gvio { void print_shape(const std::string &name, const MatX &A) { std::cout << name << ": " << A.rows() << "x" << A.cols() << std::endl; } void print_shape(const std::string &name, const VecX &v) { std::cout << name << ": " << v.rows() << "x" << v.cols() << std::endl; } v...
true
4bfc61b36020d58f7a0b0b7c637ad7ee4a715322
C++
lord-of-logic/problem_solving
/trees/left_view.cpp
UTF-8
1,142
3.5
4
[]
no_license
#include<iostream> #include<vector> #include<stack> using namespace std; class node { public: int data; node *left; node *right; node(int data) { this->data=data; this->left=nullptr; this->right=nullptr; } }; void insert(node **root,int data) { node *temp_root=*roo...
true
3c9d65c91574d717589dbad75833b9fd76520989
C++
armkernel/armkernel.github.io
/code_practice/10/advanced_cpp/2일차/2_vector2.cpp
UHC
781
3.78125
4
[ "MIT" ]
permissive
#include <iostream> using namespace std; template<typename T> class vector { T* buff; int sz; public: vector(int s, T value = T()) :sz(s) { buff = static_cast<T*>(operator new(sizeof(T)*sz)); try { std::uninitialized_fill_n(buff, sz, value); } catch (...) { operator delete(buff...
true
a02b73bd3baa12f10c5623d018849366d6d653d4
C++
zachlambert/game-arena
/src/render/polygon_renderer.cpp
UTF-8
4,799
2.96875
3
[]
no_license
#include "render/polygon_renderer.h" #include <iostream> #include <stack> PolygonVertex::PolygonVertex(glm::vec3 position, glm::vec4 color) { // Position straightforward this->position = position; this->color = color; } void PolygonRenderer::initialise(unsigned int program_id) { this->program_id = pr...
true
5ea8055606852843a0f520523a2f072a4a9675e0
C++
brunonevado/concatenateFasta
/source/main.cpp
UTF-8
3,957
2.828125
3
[]
no_license
// // main.cpp // concatenateFasta // // Created by bnevado on 26/09/2014. // Copyright (c) 2014 Bruno Nevado. All rights reserved. // #include <iostream> #include <fstream> #include "fasta.h" #include "args.h" void help(){ std::cout << "###################\n concatenateFasta 16022018 \n###################...
true
fdd3ee7a53500254e698be850b01de80d5f19fbb
C++
krconv/iot-devices
/src/LightSwitch/Button.cpp
UTF-8
1,867
3
3
[ "MIT" ]
permissive
#include "Button.h" #include <functional> #include <Arduino.h> #include "Configuration.h" namespace LightSwitch { Button::Button(MqttClient &mqttClient_) : mqttClient(mqttClient_) { } void Button::setup() { pinMode(Configuration::getButtonPin(), INPUT); mqttClient.subscribe( Confi...
true
6d5d375dd53a94a87ce07f3e857fd3798c42bd5d
C++
filippe24/ca_water_simulation
/watergrid.h
UTF-8
6,181
2.96875
3
[]
no_license
#ifndef WATERGRID_H #define WATERGRID_H #include <QApplication> #include <glm/glm.hpp> #include <iostream> class waterGrid { public: waterGrid(); waterGrid(float room_dim, float cube_dim, int mode) { room_dim_param = room_dim; cube_dimension = cube_dim; cubes_per_side = int(room_d...
true
95eda7c159c1d7a50430521ecd5055e0842dea2d
C++
ms303956362/myexercise
/DS/8_Dict/diligence2.cpp
UTF-8
2,648
2.953125
3
[]
no_license
#include <cstdio> #include <cstring> char a[20011][10]; int cnt[20011]; struct Entry { //词条模板类 char * key; int value; Entry ( char* k, int v) : value ( v ) { key = new char[strlen(k) + 1]; strcpy(key, k); }; Entry (const Entry& e ) : value ( e.value ) { key = new char[strlen...
true
33154c124464540b7636adf42ae806116b5343fc
C++
felipebma/CompetitiveProgramming
/Seletiva2019/Homework#2/J.cpp
UTF-8
346
2.625
3
[]
no_license
#include <bits/stdc++.h> #define endl "\n" using namespace std; int main(){ ios::sync_with_stdio(0);cin.tie(0); vector<int> arr; int n,aux; cin >> n; while(n--){ cin >> aux; arr.push_back(aux); } sort(arr.begin(),arr.end()); if(arr.size()>0){ cout << arr[0]; for(int i=1;i<arr.size();i++) cout << " " <...
true
3815b8795697f4c3004671bf82c50a588c042a79
C++
shannubansal/progettoP2
/vacation.h
UTF-8
1,368
2.96875
3
[]
no_license
#ifndef VACATION_H #define VACATION_H #include<QDate> #include<QString> #include<iostream> #include<sstream> #include<iomanip> using std::string; #include "writer.h" class Writer; class Vacation { private: string name; string place; string country; QDate date; double basePrice; unsigned int we...
true
124fbc63c2d3d02d809020fc2c72a42f484ad5f9
C++
sql-sith/RPG
/RPG/RPG/dungeon.cpp
UTF-8
2,234
3.40625
3
[]
no_license
#include "dungeon.h" #include <fstream> #include <cstdlib> #include <cstddef> #include <iostream> using namespace std; class ForwardError {}; class BackwardError {}; Dungeon::Dungeon() { dunStart = new Room; dunStart->description = "DEFAULT_ROOM"; dunStart->isMonster = false; dunStart->next = NULL; playerLoc = ...
true
b457604e383e01488ed7fa6cb65a88b5f27ba3b1
C++
MahinHossainMunna/Solved-Codes-URI
/Problem1161.cpp
UTF-8
303
2.65625
3
[]
no_license
#include<stdio.h> main() { long long int i,j,n,m; long long int f1,f2; f1=f2=1; while(scanf("%lld %lld",&n,&m) != EOF){ for(i=1; i<=n; i++){ f1=f1 * i; } for(j=1; j<=m; j++){ f2=f2 * j; } long long int sum = f1+f2; printf("%lld\n",sum); f1=f2=1; } }
true
13f13a6037ead65f5e57d55a5a3b61d2fe048d61
C++
z34hyr/school21_projects
/10_cpp_modules/module_02/ex00/Fixed.class.cpp
UTF-8
814
3.1875
3
[]
no_license
#include "Fixed.class.hpp" const int _fb_number = 8; Fixed::Fixed(void) { std::cout << "Default constructor called" << std::endl; Fixed::_fp_value = 0; return; } Fixed::~Fixed(void) { std::cout << "Destructor constructor called" << std::endl; return; } // copy constructor Fixed::Fixed(const Fixed& obj)// : _f...
true
255889c0c0987dad2187c363d9dcfcb771728c79
C++
LynnShaw/MyAlgorithm
/code_for_interview/10.斐波那契数列.cpp
UTF-8
707
3.34375
3
[]
no_license
#include <iostream> #include <stack> #include <vector> using namespace std; class Solution { public: int Fibonacci(int n) { // int a,b,c; int a = 0,b = 0,c = 0; for (int i = 1; i <= n; ++i) { if (i==1){ c=1; } else if(i==2){ b=0; ...
true
19c415661eb164963732e66042bc942dac8acc1e
C++
MESH-Model/MESH_Project_Baker_Creek
/Model/Ostrich/ParameterABC.h
UTF-8
12,306
2.59375
3
[]
no_license
/****************************************************************************** File : ParameterABC.h Author : L. Shawn Matott Copyright : 2004, L. Shawn Matott Encapsulates a parameter. Parameters are variables in the model which are to be calibrated. Version History 06-12-03 lsm added copyrig...
true
51b6ee08f0ddd72acecc8d79e818731203bce2ce
C++
leoleil/shu_ju
/Project3/VspdCTOMySQL.h
GB18030
1,806
2.796875
3
[]
no_license
#pragma once #include <stdio.h> #include <string> #include "winsock2.h" #include "mysql.h" using namespace std; class VspdCToMySQL { public: // MYSQL mysql; /* 캯ϡ */ VspdCToMySQL(); ~VspdCToMySQL(); /* ҪĹܣ ʼݿ ݿ ַ ڲ host MYSQLIP port:ݿ˿ Dbݿ userݿû passwdݿû charsetϣʹõַ Msg:صϢϢ ڲ int 0ʾɹ1...
true
b5df3dffd31189f6203b7f58f492118dafb2e65a
C++
xfile6912/Baekjoon
/Stack, Queue, Deque, List/boj11866.cpp
UTF-8
668
3.015625
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include<iostream> #include<vector> #include<string> #include<algorithm> #include <queue> using namespace std; int main(void) { queue<int> q; int n, k; scanf("%d %d", &n, &k); int i; for (i = 1; i <= n; i++) { q.push(i); } int cnt = 1; printf("<"); while...
true
41d6f4b1166c1647dc797db193a01c4384cff036
C++
mucrow/PlayStation1Vsts
/PluginsCommon/ByteInputStream.h
UTF-8
2,056
3.328125
3
[ "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#pragma once #include "InputStream.h" #include <cstring> //------------------------------------------------------------------------------------------------------------------------------------------ // Provides a byte oriented input stream from a given chunk of memory. // The stream is merely a view/wrapper around th...
true
fd16f69c752bb90843b4a140c970bdce8468b95e
C++
ketteske/neuron_halo
/neuralstuff/neuralstuff/Layer.h
UTF-8
1,247
2.671875
3
[]
no_license
#pragma once #include "Connection.h" #include "Perceptron.h" #include "Global_header.h" class Layer { vector <Connection*> Contacts; vector <Perceptron*> StimulatedPercetrons; double default_weight_value = 1; // Back propagate automaticly void backPropagate(); public: Layer(vector <Perceptron*> Perceptrons); ...
true
a720b26a09963afd49bbfc6759544449aefc099a
C++
CaptainEven/ColmapMVSMy
/ColMapMVSMy/depth_map.h
GB18030
2,599
2.78125
3
[]
no_license
#ifndef COLMAP_SRC_MVS_DEPTH_MAP_H_ #define COLMAP_SRC_MVS_DEPTH_MAP_H_ #include <string> #include <vector> #include <algorithm> #include "mat.h" #include <opencv2/highgui.hpp> namespace colmap { namespace mvs { class DepthMap : public Mat<float> { public: DepthMap(); DepthMap(const float depth_min, co...
true
8b6c4542b97a9f69649383300a2c7f596a33a1f7
C++
bseazeng/c-_base
/trie.cpp
UTF-8
1,197
2.859375
3
[]
no_license
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; char s[11]; int n,m; bool p; struct node { int count; node * next[26]; }*root; node * build() { node * k=new(node); k->count=0; memset(k->next,0,sizeof(k->next)); return k; } void insert() { node *...
true
943fcf1c6ef40f88e22d9e058100984a8f45623a
C++
JJungs-lee/problem-solving
/BOJ/10811_바구니 뒤집기.cpp
UTF-8
484
2.921875
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, m; cin >> n >> m; vector<int> v(n); for (int i = 0; i < n; ++i) v[i] = i + 1; for (int i = 0; i < m; ++i) { int start, end; cin >> start...
true
a23c41d1b588228771fce447bdfdf4aeadcf7239
C++
choihomeboy/Bus_Scheduling_Project
/project/src/route.h
UTF-8
3,931
3.078125
3
[]
no_license
/** * @file route.h * * @Copyright 2019 3081 Staff, All rights reserved. */ #ifndef SRC_ROUTE_H_ #define SRC_ROUTE_H_ /******************************************************************************* * Includes ******************************************************************************/ #include <list> #incl...
true
e512a84337b07856cbcf2a5b1432534e02a214e4
C++
drudox/AlgebraSparseMatrix
/SparseMatrix/CompressedStorage/CRS/CRSmatrix.H
UTF-8
12,054
2.734375
3
[]
no_license
# ifndef __CRS_MATRIX_H__ # define __CRS_MATRIX_H__ # define __DEBUG__ # define __TESTING__ # include "../CompressedMatrix.H" namespace mg { namespace numeric { namespace algebra { // foward declarations template <typename U> class CRSmatrix ; template <typename U> std::ostream& operator<<(std::ostream& os , c...
true
322880138b6871808ad193be546d65557148e617
C++
juliolugo96/lozi-map
/lozi.cpp
UTF-8
18,875
3.21875
3
[ "MIT" ]
permissive
/** * @file lozi.cpp * @name Mapas de Lozi * @author Julio Lugo * @mail jmanuellugo96@gmail.com * @date 16/05/2017 * @brief Globaly coupled Lozi map */ # include <iostream> # include <iomanip> # include <cmath> # include <fstream> # include <ctime> # include <cstdlib> # include <cstdio> # include <random>...
true
9554a5d0db0a7251473fbe940f87ad96612f3228
C++
PitEG/todotoday
/src/cpp/Goal.cpp
UTF-8
488
2.828125
3
[ "MIT" ]
permissive
#include "Goal.hpp" // // GETTER/SETTERS // unsigned int Goal::NumTasks() { return tasks->Size(); } std::vector<Task*> Goal::Tasks() { return tasks->Tasks(); } bool Goal::Completed() { return tasks->Completed(); } // // CONSTRUCTORS // Goal::Goal(std::string name) : name(name){ } Goal::Goal(std::string name...
true
b800003f866594b78ba1f352ff2f93251b4d041c
C++
kmisrano/butiran
/zpp/mrvp/ball.h
UTF-8
661
2.796875
3
[ "MIT" ]
permissive
/* ball.h Sparisoma Viridi 20121124 Simple ball struct Version: 20090520 The first version of ball class is written 20111022 ball is changed from a class to a struct 20120310 Member s for spin is added 20121124 Information of struct member is added */ #ifndef ball_h #define ball_h #ifndef vect3_h #includ...
true
600de2f2edf0bbf1c54f2bdd97af652faa692748
C++
WhiZTiM/coliru
/Archive/01050ffcfeb0af113d3bde8adbc75c3f-653c64665bcb020f1c708d5e11734e4a/main.cpp
UTF-8
515
2.84375
3
[]
no_license
#include<iostream> #include<map> #include<vector> #include<string> #include<algorithm> #include<iterator> #include<utility> #include <stdio.h> template<class A, class B, B(A) Call> F<B> fmap(Call call, F<A> fa){ F<B> fb; for(auto&& a : fa){ fb.push_back(call(a)) } return fb; } struct A { }; struct callable { voi...
true
722c26bfd4cc40a87dda0978866f2c8b59c0d12b
C++
jpennington222/KU_EECS_Labs
/EECS_560/Lab03/Node.cpp
UTF-8
623
3.65625
4
[]
no_license
/* * @Author: Joseph Pennington * @File Name: Node.cpp * @Assignment: EECS 560 Lab 03 * @Brief: This program is the cpp for the Node class. It contains the constructor, getValue, getNext, setValue, and setNext functions to make a Node. */ template<typename T> Node<T>::Node(T& value) { m_value = value; m_next = ...
true
e74f59bfbbf02dd2398ae94eadbb9d75bafdf746
C++
Aphodomus/Algoritmos-e-Estruturas-Dados-I
/Atividades/EstudoDirigido13/Contato.hpp
UTF-8
6,507
3.34375
3
[]
no_license
#ifndef _CONTATO_H_ #define _CONTATO_H_ #include <iostream> using std::cin ; // para entrada using std::cout; // para saida using std::endl; // para mudar de linha #include <iomanip> using std::setw; // para definir espacamento #include <string> using std::string; // para cadeia de caracteres #include <fstream> usi...
true
a23b59b68541ab64dac7b7baa3e0c5eb9b971939
C++
xocoatzin/algorithms
/src/string-matching/string-matching.cpp
UTF-8
4,500
3.21875
3
[]
no_license
#include <iostream> #include <string> #include "../common/string.h" #include "string-matching-tools.h" using namespace std; using namespace string_matching; int main(int argc, char *argv[]) { if (argc < 2) { cerr << "Error! you need to include the input file in the command line" << endl; tool...
true
ad1d764b2352c0bbb67d88a94ba1bdab9b74fd09
C++
kayru/librush
/Rush/GfxBitmapFont.h
UTF-8
2,536
2.640625
3
[ "MIT" ]
permissive
#pragma once #include "Rush.h" #include "GfxCommon.h" #include "GfxPrimitiveBatch.h" #include "UtilArray.h" namespace Rush { class DataStream; // Class for working with AngelCode BMFont files. // More details here: http://www.angelcode.com/products/bmfont/ // Current simple implementation is only suitable for ASCI ...
true
6c13eaffafdc2cdf895791c3cdaf801c6490335d
C++
ungidrid/Math
/MathC++/MathC++/Libraries/cpps/LinearEquation.inl
UTF-8
2,418
3.4375
3
[]
no_license
//CONSTRUCTORS template<class T> LinearEquation<T>::LinearEquation(size_t length) { valArray.resize(length); } template<class T> LinearEquation<T>::LinearEquation(const vector<T>& vect) :valArray{ vect } { } template<class T> LinearEquation<T>::LinearEquation(const initializer_list<T>& list) : valArray{ list } { } //M...
true
85db33e5e5f52c58aa76273459d0430e9cf3ba2c
C++
abuild-org/abuild
/src/WorkerPool.hh
UTF-8
8,522
3.03125
3
[ "Apache-2.0", "Artistic-2.0", "LicenseRef-scancode-unknown-license-reference", "Artistic-1.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
#ifndef __WORKERPOOL_HH__ #define __WORKERPOOL_HH__ // This object manages a pool of worker threads for processing a // number of objects in parallel. The WorkerPool is initialized with // the number of workers that should be created and a method to be // called for each item that processes the item and returns a sta...
true
e26cdc12c1fca360f723b08183e41ccd407058a9
C++
JosanSun/MyNote
/C++/关键字/functionTryBlock/functionTryBlock/oth.cpp
GB18030
821
2.890625
3
[]
no_license
///* // * --------------------------------------------------- // * Copyright (c) 2017 josan All rights reserved. // * --------------------------------------------------- // * // * ߣ Josan // * ʱ䣺 2017/9/22 14:56:55 // */ //void f(int &x) try //{ // throw 10; //} //catch(const int &i) //{ // x...
true
e20ceefe08186cc53fe6395534b4b1ed6022ccd2
C++
sgladchenko/cpp-examples
/Timer.h
UTF-8
858
2.953125
3
[]
no_license
#ifndef SGTIMER_H #define SGTIMER_H #include <chrono> namespace SG { // A short class needed for quick evaluation of the elapsed time between tick and tock calls template<class timeunit = std::chrono::milliseconds, class timeclock = std::chrono::steady_clock> class Timer { using timepoint = ty...
true
13d8e84ec202d6ec0618483fa4623966c59e0f0b
C++
lowlander/nederrock
/src/parser_nodes/arithmetic_parser_node.cpp
UTF-8
4,219
2.6875
3
[ "MIT" ]
permissive
// // Copyright (c) 2020 Erwin Rol <erwin@erwinrol.com> // // SPDX-License-Identifier: MIT // #include "arithmetic_parser_node.hpp" #include "product_parser_node.hpp" #include "add_parser_node.hpp" #include "subtract_parser_node.hpp" #include "parser_node.hpp" #include <memory> #include <istream> #include <string> #...
true
af43114e12af80acfb04609316148cb77346dae7
C++
banouge/SeniorProject
/TurnHandler.cpp
UTF-8
2,153
3.015625
3
[ "MIT" ]
permissive
#include "Player.h" #include "TurnHandler.h" std::unordered_map<Player*, std::unordered_map<int, std::queue<Command*>*>*> TurnHandler::playerMap = std::unordered_map<Player*, std::unordered_map<int, std::queue<Command*>*>*>(); void TurnHandler::submitCommands(Player* player) { std::unordered_map<int, std::queue<Comm...
true
ebaa837e0d6c67db59e21af2eb820ab9126dacf0
C++
kila2862/Poisson-Disk-Sampling
/main.cpp
UTF-8
8,783
3.203125
3
[]
no_license
#include <iostream> #include <glut.h> #include <math.h> #include <random> #include <ctime> #define R 10 //The R value mentioned in paper #define K 30 //The K value mentioned in paper #define WINDOW_WIDTH 1000 #define WINDOW_HEIGHT 1000 #ifndef M_PI #define M_PI 3.14159265358979323846 //Need PI to generate...
true
97115d3e5c4537d0a0611a4b8d3d32dae129cc21
C++
sohaibsyed95/Comsc-200
/Lab 0/HelloWorld.cpp
UTF-8
614
3.609375
4
[]
no_license
// Lab 0b, The "Hello, World" Program // Programmer: Sohaib Syed // Editor(s) used: Code::Blocks // Compiler(s) used: Code::Blocks #include <iostream> using namespace std; int main() { // print my name and this assignment's title cout << "Lab 0b, The \"Hello, World\" Program \n"; cout << "Programm...
true