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
2d016f5994782761a7137cfd2e9b7bbd722b296f
C++
jesusma3009/final
/include/ConjuntoParticulas.h
UTF-8
886
2.59375
3
[]
no_license
#ifndef _CONJUNTOPARTICULA_ #define _CONJUNTOPARTICULA_ #include "Particula.h" #include <iostream> const int MIN_SIZE = 5; const int TAM_BLOQUE = 3; using std::cout; using std::endl; class ConjuntoParticulas { private: Particula *set; int capacidad; int utiles; void Redimensiona(bool...
true
7bd50ba1b1f1e2a8316b5d0f02081edf9c28a875
C++
AndrewMorris-scsu/CSClassFiles
/CSCI331 final review/CLion/BPlusTree/BPlusTree.cpp
UTF-8
40,655
2.921875
3
[]
no_license
/** * @file BPlusTree.cpp * implementation file for B+ tree * @authors Jeff Witthuhn, Ross Kostron, Subodh Bhattarai, Andrew Morris, Alex Gatzke */ #include "BPlusTree.h" #include "fileOperations.h" template <class keyType> BPlusTree<keyType>::BPlusTree(){} template <class keyType> BPlusTree<keyType>...
true
7476073eb95aefceed5c2cbffb8ba07219e95508
C++
MaryBagratunyan/GuessTheMovie
/GuessTheMovie/GetImageURLFromText.h
UTF-8
1,980
3.078125
3
[]
no_license
#pragma once #include <fstream> #include <algorithm> #include <iostream> #include "Utils.h" #include "Image.h" int str_to_int(std::string& s) { for (int i = s.size() - 1; i >= 0; --i) { if (s[i] >= '0' && s[i] <= '9') { break; } else { s.pop_back(); } } int res = 0; for (int i = 0; i < s.size(...
true
0c3271adfe0879a2b77b9f7c762a1d638ab8083f
C++
akawashiro/competitiveProgramming
/clib/BridgeBiconnectedComponent.cpp
UTF-8
2,819
3.125
3
[]
no_license
// 二重辺連結成分とは、「その成分に含まれるどの1辺を除いても、 // その成分が非連結にならないような部分グラフ」のことです。 // 橋という言葉を定義すると、二重辺連結成分とは、 // 「すべての橋をグラフから取り除いたときの連結成分」であると言うこともできます。 // 橋とは、その1辺を取り除いただけでグラフが非連結となるような辺のことです。 // よって橋を列挙することができれば、二重辺連結成分も列挙することができます。 struct Edge{ int to,cost; }; bool operator < (const Edge &e,const Edge &f){ return e.cost>f....
true
b41051466351134a1ab40cd667242b952219bad2
C++
x1aoo/ecn_arpro
/lecture_examples/hello.cpp
UTF-8
520
2.78125
3
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <vector> #include <time.h> #include <math.h> #include <tuple> int main(int argc, char ** argv) { /*std::cout << "Hello world!!" << std::endl; std::cout << "You have " << argc << " arguments :" << std::endl; for(unsigned int i=0;i<argc;++i) std::cout...
true
b3b804a092010ee08dc595eb309b2c368646eebc
C++
raulfe06/TPV
/PRÁCTICAS/Práctica 2/HolaSDL/Files/GameMap.h
ISO-8859-1
1,432
3.078125
3
[]
no_license
#pragma once #include "GameObject.h" #include "Texture.h" #include "SDL.h" class Game; // Tipos de celda para el mapa enum mapCell { Empty, Wall, Food, Vitamins }; typedef struct { // 1) Nombre del archivo de la imagen string filename; // 2) Fila y columna de la textura (por si estuviera dividida como un sprite sh...
true
ace4c3744b320853eec8eb3a94be420441d47c8c
C++
precht/imgproc
/src/core/Image.cpp
UTF-8
8,465
2.984375
3
[]
no_license
/** * Created: 19th Nov 2016 * Author: Jakub Precht */ #include "core/Image.hpp" #include <iomanip> //#include <iostream> #include <memory> #include <ostream> #include <stdexcept> #include <string> namespace imgproc { namespace core { Image::Image() : rows_(0) , columns_(0) , channel...
true
2c9239aeab1d5f72e96e95695b0fb53ad3dc63c3
C++
EthanSteinberg/GLUtil-old-
/src/render/render.cpp
UTF-8
4,996
2.625
3
[]
no_license
#include "render.h" #include "glUtil.h" #include <GL/glew.h> #include <iostream> #include <boost/format.hpp> #include <vector> #include "imageUtil.h" #include "matrix.h" #include "renderList.h" #include <cassert> inline void *offset(int floatNum) { return (void *)(sizeof(float) * floatNum); } void Render::set...
true
0a956221baea759d484adedcb3607b05ac3828a9
C++
daniel-bryant/parser
/parse.cpp
UTF-8
1,204
2.703125
3
[]
no_license
#include "parse.h" #include <iostream> // for std::cerr #include "gram.hpp" #include "lexer.yy.hpp" #include "lexglobal.h" #include "token.h" void* ParseAlloc(void* (*allocProc)(size_t)); void Parse(void* parser, int token, Token tokenInfo, bool* valid); void ParseFree(void* parser, void(*freeProc)(void*)); YYSTYPE y...
true
d68d38d2797d5304acaf97a6e3d3ecc7d5cf85a9
C++
JinyuChata/leetcode_cpp
/leetcode/editor/cn/1621_number-of-sets-of-k-non-overlapping-line-segments.cpp
UTF-8
1,555
3.234375
3
[]
no_license
//给你一维空间的 n 个点,其中第 i 个点(编号从 0 到 n-1)位于 x = i 处,请你找到 恰好 k 个不重叠 线段且每个线段至少覆盖两个点的方案数 //。线段的两个端点必须都是 整数坐标 。这 k 个线段不需要全部覆盖全部 n 个点,且它们的端点 可以 重合。 // // 请你返回 k 个不重叠线段的方案数。由于答案可能很大,请将结果对 10⁹ + 7 取余 后返回。 // // // // 示例 1: // // //输入:n = 4, k = 2 //输出:5 //解释: //如图所示,两个线段分别用红色和蓝色标出。 //上图展示了 5 种不同的方案 {(0,2),(2,3)},{(0,1),(1,3)}...
true
15b539e1572615a439e6c05785a10ac1bf044b85
C++
rzuniga64/cplusplus
/cosc1337/Source Files/lectures/lecture6/while_loops_and_loop_patterns/MaxOfNumbers.cpp
UTF-8
564
3.609375
4
[]
no_license
// Reads in positive values and reports the largest // when all are read. User indicates the end of the // input by entering a negative number. #include <iostream> using namespace std; int main() { double num, biggest = 0; cout << "Enter a number: "; cin >> num; while (num >= 0) { //big...
true
6ff10d1c097c7fee2627ff9d34cafaa7f8bb2e49
C++
abdullah-al-jamil/LightOJ-Solutions
/1113 - Discover the Web.cpp
UTF-8
1,520
2.71875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { stack<string>Stackfor; stack<string>Stackback; string s; string ns; int n; cin>>n; for(int i=1;i<=n;i++) { printf("Case %d:\n",i); //int k=1; Stackback.push("http://www.lightoj.com/"); ...
true
0402d78bea0d280f7c9d20329d12c8e462291807
C++
NancyFulda/cs142SolutionCode
/Recitation_4_recursive_snakes/snakes.cpp
UTF-8
442
3.546875
4
[]
no_license
#include <iostream> using namespace std; int snake1(int x, int y); int snake2(int x, int y); int snake1(int x, int y) { if ((x+y) % 2 == 0) return snake2(x-1,y); else return x+y; } int snake2(int x, int y) { if (x*y < 100) return snake1(x,y-1); else return 1; } int main() { int x,y; cout << ...
true
b33479108424d58cb51ca9ebf52253d801308fec
C++
hleclerc/Evel
/test/test_Tcp.cpp
UTF-8
2,226
2.5625
3
[ "Apache-2.0" ]
permissive
#include "../src/Evel/System/Print.h" #include "../src/Evel/TcpConnection_WF.h" #include "../src/Evel/Listener_WF.h" #include "../src/Evel/Timer_WF.h" #include "../src/Evel/EvLoop.h" #include <gtest/gtest.h> using namespace Evel; //TEST( Tcp, client ) { // size_t msg_len = 0; // EvLoop el; // auto *conn_clie...
true
b05de6dbbb1d57e4faef654a608c34b04c308788
C++
avisekksarma/OOP-labwork
/lab8/program3.cpp
UTF-8
811
3.984375
4
[]
no_license
// 3. Write a program to overload stream operators to read a complex number and display the complex number in a+ib format. #include <iostream> using std::cin; using std::cout; using std::endl; class Complex { private: int r, i; public: Complex(int r = 0, int i = 0) : r(r), i(i) {} friend std::istream &o...
true
c4ac71a289c774cf4517e73e218f6aa5a158bb37
C++
thinhemb/Lap_Trinh_Co_Ban
/4_5.cpp
UTF-8
340
2.578125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; class array { int *value; int n; public: array(/* args */); array(int n); ~array(); void nhap(); void xuat(); }; void array::nhap() { } array::array(/* args */) { n=0; value=null; } array::~array() { n=0 } int main() { ...
true
bd9b8a9b07df956d9bc87af9ff7aeb4920aec9a3
C++
syzwdong/ThinkingInCppNote
/common/printBinary.cpp
UTF-8
282
3
3
[]
no_license
// // Created by 何时夕 on 2017/12/10. // #include <iostream> using namespace std; void printBinary(const unsigned char val){ for (int i = 7 ; i >= 0 ; --i) { if (val & (1 << i)){ cout << "1"; } else { cout << "0"; } } }
true
4a6c2c7bddaee8ed75b9650ab73428cf03597f91
C++
qpdf/qpdf
/examples/pdf-count-strings.cc
UTF-8
2,806
2.984375
3
[ "Artistic-1.0", "Artistic-2.0", "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-public-domain", "MIT", "AGPL-3.0-or-later" ]
permissive
// // This example illustrates the use of QPDFObjectHandle::TokenFilter with filterContents. See also // pdf-filter-tokens.cc for an example that uses QPDFObjectHandle::TokenFilter with // addContentTokenFilter. // #include <cstdlib> #include <iostream> #include <qpdf/Pl_StdioFile.hh> #include <qpdf/QPDF.hh> #include...
true
fdf5432010ae4e1be1daa2c7f94cc210e6abbcb3
C++
wishedeom/COMP371_A2
/COMP371_A2/COMP371_A2.cpp
UTF-8
7,905
2.515625
3
[]
no_license
// ---------------------------------------------------------------------------- // // COMP 371 - COMPUTER GRAPHICS // ASSIGNMENT 2 // CONCORDIA UNIVERSITY // // Author: Michael Deom // Submission Date: March 1, 2016 // // ---------------------------------------------------------------...
true
b6e336f69e52535e1d8e60f183abf78012b43eea
C++
PolarisJunior/collection
/collection/ui/Keyboard.cpp
UTF-8
1,020
2.828125
3
[]
no_license
#include "Keyboard.h" #include <SDL.h> #include <set> Keyboard::KeyStates Keyboard::states; std::array<bool, Keyboard::NUM_SCANCODES> Keyboard::keys_pressed = {0}; static std::set<uint32_t> pressed_keys_to_reset; static std::set<uint32_t> released_keys_to_reset; void Keyboard::init() { states = KeyStates{SDL_Get...
true
0808c2252efcc4b7c80b62ebdd6148b3e2299aa1
C++
loyso/StructureOfArrays
/StructureOfArrays/StructureOfArrays.h
UTF-8
1,214
2.71875
3
[ "MIT" ]
permissive
#pragma once struct Vec3 { float x = 0; float y = 0; float z = 0; Vec3() = default; Vec3(float x, float y, float z); Vec3& operator+=(const Vec3& v); }; class Object { public: using Offset = size_t; static void Init(Offset maxObjects); static void Done(); static Object* Ne...
true
ce31fc8ab4f3491c3735788e46f2fc347c484f4b
C++
Ghassen-kh/Cpp_Training
/revision/standard_library/file-management.cpp
UTF-8
494
2.921875
3
[]
no_license
#include <iostream> #include <cstdio> using namespace std; int main (int argc, char ** agv){ /* const char * fn1 = "file1"; FILE * fh = fopen(fn1,"w");//create a file if it doesn't exist, if it already exist it will // override it with an empty file fclose(fh); puts("file created !"); */ /* ...
true
1d14ffe6b5194fd05599cbc5a6649416b24f69ef
C++
HEXcube/BTechLabs
/C++ source codes/Fair Record/9.Area of Shapes.cpp
UTF-8
1,554
4.03125
4
[ "MIT" ]
permissive
/*Find the area of rectangle, triangle and sphere. Use function overloading*/ #include<iostream.h> #include<conio.h> #include<math.h> #include<iomanip.h> unsigned int area(unsigned int,unsigned int); //rectangle float area(unsigned int,unsigned int,unsigned int);//triangle float area(float); ...
true
22d89d2447366e984dcac253058cc2c480766b38
C++
gayasha754/DSA
/Selection sort.cpp
UTF-8
2,082
3.984375
4
[]
no_license
#include<iostream> using namespace std; // this program implements the Selection sort /* repetedly finding the minimum element(considering ascending order) from the unsorted part and puttting it at the beginning algorithm maintains 2 subarrays 1.The subarray which is already sorted 2. Remaining sub...
true
316a6f49ca6853162693966fb6f388dd123823ea
C++
nikhilbadgujar/Projects
/JavaPreProcessor/Analyser.cpp
UTF-8
3,775
2.96875
3
[]
no_license
#include"Header.h" unordered_map<string, string>table; extern FILE *p; //gets input as string terminated by '\0' or '\n' // calls searchHash and nextElementAfterSpace functions void analyser(char buffer[], int len) { if (buffer[0] == '#' || buffer[nextElementAfterSpace(buffer)] == '#') { int i = 0; ...
true
ca73cc8e822f96ad060311fd2c08b2772529ca7f
C++
RBalmoreA27/robot-car-arduino
/examples/Automata/AutomataCarro.ino
UTF-8
994
2.53125
3
[ "MIT" ]
permissive
#include<robot-car-arduino.h> Carro carrito; int detener=3; int giro=-90; void setup(){ //configuraciones del carro carrito.potenciaMAX=150; //velocidad del carro } void loop(){ //si la estructura del sensor central es mayor a los cms para detener pues avanzamos if(carrito.UltraC.medirCM()>detener){...
true
889d81553c354c697369e753858b8ff0ad0bd6c0
C++
eduardorasgado/CppZerotoAdvance2018
/season2/pointers/dynamicArrays/main.cpp
UTF-8
879
3.875
4
[]
permissive
#include <iostream> using namespace std; void takeGrades(int*, int&); void showGrades(int*, int&); int main() { std::cout << "[DYNAMIC ARRAYS]" << std::endl; int N, *grades; std::cout << "Grades quantity: "; std::cin >> N; // creating a dynamic array grades = new int[N]; takeGrades(gra...
true
a8464af14656bfb5c1d3bace413a79c28723159b
C++
mforys/bridge_mf_cpp
/test/Bid_test.cpp
UTF-8
782
3.03125
3
[]
no_license
#include "gtest/gtest.h" #include "Bid.h" TEST (BidTest, Basic) { Bid bid; EXPECT_EQ (bid.volume(), NO_BID); EXPECT_EQ (bid.suit(), NO_TRUMP); } TEST (BidTest, Basic_with_args) { Bid bid(ONE_B, CLUB); EXPECT_EQ (bid.volume(), ONE_B); EXPECT_EQ (bid.suit(), CLUB); } TEST (BidTest, LessThan) ...
true
42dd72f34ab28ac80d0410d19d89551fedea87be
C++
lisiynos/lisiynos
/py_latex/a.cpp
UTF-8
1,008
2.84375
3
[]
no_license
#include <cstdlib> #include <iostream> #include <cmath> #include <cstdio> #include <iomanip> using namespace std; int main() { freopen("sqrteq.in", "r", stdin); freopen("sqrteq.out", "w", stdout); long double a, b, c, D, x1, x2; cin >> a >> b >> c; cout << a << " " << b << " " << c << endl; if (abs(a) < 0...
true
da387bc77daba5c5939c3414a54744eea9ccdaa3
C++
JinnyJingLuo/Expanse
/Paradis_Hydrogen/ParadisJHU06012020/ParadisJHU06012020/paradis/Meminfo.cpp
UTF-8
2,493
2.703125
3
[]
no_license
/*------------------------------------------------------------------------- * * Function: Meminfo * Description: Attempts to obtain an estimate of the memory * footprint of the current process and returns the * value to the caller. * * NOTE: The function first attempts to use the * getrusage() call to o...
true
47fb63590535f08461d9f6a8b8f850ca897edcd9
C++
zjkang/algorithm
/leetcode/538. Convert BST to Greater Tree.cpp
UTF-8
1,239
3.609375
4
[]
no_license
/* Author: Zhengjian Kang Email: zhengjian.kang@nyu.edu Problem: Convert BST to Greater Tree Source: https://leetcode.com/problems/convert-bst-to-greater-tree/#/description Difficulty: Medium Company: Amazon Tags: {Tree} Notes: Given a Binary Search Tree (BST), convert it to a Greater...
true
d80ac168cea6f06b9b1e784af14ee21bd28b6b1a
C++
jockm/smallnet
/env.h
UTF-8
1,748
2.6875
3
[]
no_license
#pragma once #include <string> #include <list> #include <map> #include "ast.h" #include "decl.h" class EnvironmentVar { public: std::string id; std::string type; FieldInfo *fi; int temp_reg; EnvironmentVar() { } EnvironmentVar(const EnvironmentVar& v...
true
b255ebf816bbfb60f867a7385a59251562be1d4a
C++
alex031029/LeetCode
/Move Zeroes/answer.cpp
UTF-8
615
3.296875
3
[]
no_license
// in this solution the number of operations is same as nums.size() // where an operation is defined as the number of writing in nums class Solution { public: void moveZeroes(vector<int>& nums) { int p = 0; int i = 0; for(i=0;i<nums.size();i++) { if(nums[i]==0) ...
true
887dc8ed1904bce4fe5cd90e77d7dda38213f736
C++
Idianale/au_uav_pkg
/src/au_uav_ros/src/a_star/DiscretizedPlane.h
UTF-8
19,874
2.78125
3
[]
no_license
// // DiscretizedPlane.h // Header file for the plane class for use in the Auburn REU program 2011 // By Thomas Crescenzi, with additions from Tyler Young #ifndef PLANE #define PLANE #include <iostream> #include <math.h> #include <vector> #include "Position.h" #include "map_tools.h" #include "au_uav_ro...
true
8cac0553ebc168db73fcd94fe9ecc24ba784c391
C++
markitus18/Development
/GUI/Motor2D/j1Console.h
UTF-8
4,577
2.609375
3
[]
no_license
#ifndef __j1CONSOLE_H__ #define __j1CONSOLE_H__ #include "j1Module.h" #define LINE_SPACING 16 enum CVarTypes { c_float = 0, c_int, c_string, c_bool, }; struct Command { public: Command(){} Command(char* str, char* dsc, uint n, char* abr = NULL, char* newTag = "Miscellaneous"){ command = str; desc = dsc, nArgs...
true
4af2230411071c417829e1e6f0e4f6146088babd
C++
AzizulTareq/virtual-judge
/HolidayOfEquality.cpp
UTF-8
336
2.6875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int arr[n]; int sum = 0; for(int i=0; i<(sizeof(arr)/sizeof(*arr)); i++){ cin>>arr[i]; } sort(arr,arr+n); for(int i=0;i<n;i++){ sum+=arr[i]; } cout<<(arr[n-1]*n-su...
true
272d988e9e32830a59fb6a7847a55b3aae5a9019
C++
professor9999/DSA
/Graphs/Single_Source_Shortest_Path_Using_BFS.cpp
UTF-8
1,508
3.765625
4
[]
no_license
#include <iostream> #include <map> #include <queue> #include <list> using namespace std; template <typename T> class Graph { // Considering the graph to be unweighted and bidirectional map<T, list<T>> l; public: void AddEdge(int x, int y) { l[x].push_back(y); l[y].push_back(x); } ...
true
07b0a6dbadba3d6a646e3f0c9943f2c72d616542
C++
acc-cosc-1337-fall-2019/acc-cosc-1337-fall-2019-Fortress117
/src/homework/tic_tac_toe/main.cpp
UTF-8
1,189
3.296875
3
[ "MIT" ]
permissive
#include "tic_tac_toe.h" #include <iostream> #include <string> #include "tic_tac_toe_manager.h" #include "tic_tac_toe_3.h" #include "tic_tac_toe_4.h" using std::cout; using std::cin; using std::string; using std::vector; using std::ostream; int main() { unique_ptr<TicTacToeManager> manager = std::make_unique<TicTac...
true
bb774d46d7a10e30049d50d4f75071c38513d467
C++
rundun159/th1231
/Problem_Solving/14888.cpp
UTF-8
2,343
2.78125
3
[]
no_license
//50�� ��. //index�� ��������. //index �Ҽ��� �� ����س��� �򰥸��� ����. //dfs ������ ��츦 �� �����س��� #include<iostream> #include<vector> #include<algorithm> using namespace std; vector<int> op_given; vector<int> num_given; int n; int cal_opt(const vector<int> &op_v); void doDFS(int opIdx, int startIdx, i...
true
768e1212964e2766e9fdcce8c16173062013d663
C++
FullMentalPanic/IB_client
/src/SymbolContracts.cpp
UTF-8
2,583
3.265625
3
[]
no_license
#include "SymbolContracts.h" #include <fstream> #include <stdexcept> // std::runtime_error #include <sstream> // std::stringstream #include <iostream> using namespace std; SymbolContracts::SymbolContracts(string filename, int basetickID ) { read_csv(filename, basetickID); } SymbolContracts::SymbolContracts(strin...
true
60072802e6fc7d482774cf83dc8beaef94a13fc8
C++
maximepasquier/Diversity
/Multiples_Simulations/src/main.cpp
UTF-8
13,154
2.640625
3
[]
no_license
#include <iostream> #include <thread> #include <string> #include <mutex> #include <chrono> #include <random> #include "Simulation.h" //* Nombre de threads maximum dédiés aux simulations #define NB_THREADS 8 std::vector<std::mutex> verrous(NB_THREADS); void thread_function(std::string path) { unsigned int seed = ...
true
a96bb27ef0c92556d1938c904e50481bffbbbfac
C++
rpaschen/project2
/PROJECT/Configuration.cpp
UTF-8
3,163
3.015625
3
[]
no_license
// // Created by raylyn on 11/20/18. // #include <iostream> #include <cstdlib> #include <string> #include <fstream> #include "Configuration.h" // Default constructor definition Configuration::Configuration() { interval = 0; count = 0; reportFile = "report.adt"; blk_read = 0; blk_read_s = 0; kb...
true
17e08261430e23f9f8441c6c5d31fc00c0eb1a53
C++
Antilurker77/DragonStarArena
/DragonStarArena/ui/tacticWindow.cpp
UTF-8
1,753
2.515625
3
[]
no_license
// ================================================================ // // tacticWindow.cpp // // ================================================================ #include "tacticWindow.hpp" #include "dataString.hpp" #include "../core/assetManager.hpp" #include "../core/settings.hpp" #include "../entity/actor.hpp" Ta...
true
db8a7a40edd378f31457c8851ffdbbf3e76aac9e
C++
ardamavi/Web-Satranc
/SatrancProgrami/Fil.cpp
UTF-8
3,530
2.625
3
[ "Apache-2.0" ]
permissive
// Arda Mavi - ardamavi.com #include <iostream> #include "Tas.h" #include "Fil.h" using namespace std; Fil::Fil(takim renk, int x, int y): Tas(renk, "Fil", x, y){} bool Fil::yolKntrl(vector<Tas*> taslar, pair <int, int> gidilecekyer){ // Capraz gider. // Onune biri cikana kadar. // Capraz gitme kontro...
true
e929c0709fb2f4eb0ca9fdb9881cbf6498465298
C++
AlumaK/security-system-based-rules-and-Intel-SGX
/final/SecureFunctions/SecureApplication/SecureApplication.cpp
UTF-8
2,970
2.546875
3
[]
no_license
// SecureApplication.cpp : Defines the entry point for the console application. #pragma check_stack(off) #include "stdafx.h" #include "sgx_urts.h" #include "SecureFunctions_u.h" #include <tchar.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #define ENCLAVE_FILE _T("SecureFunctions.signed.dll") ...
true
640a514f66d7e6ff1b8b2fbfef4ec81780dd7009
C++
vitamin-caig/zxtune
/src/sound/receiver.h
UTF-8
832
2.59375
3
[]
no_license
/** * * @file * * @brief Defenition of sound receiver interface * * @author vitamin.caig@gmail.com * **/ #pragma once // common includes #include <data_streaming.h> // library includes #include <sound/chunk.h> #include <sound/multichannel_sample.h> namespace Sound { //! @brief Simple sound stream endpoint...
true
92ab67a283232df9d4b74bcfd5b6be0af1fbffdd
C++
pontsuyo/procon
/aoj/alds1/0101c.cpp
UTF-8
493
3.1875
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; bool is_prime(int x){ if(x==2){ return true; }else if(x < 2 || x % 2 == 0){ return false; } for(int i=3;i <= sqrt(x);i += 2){ if(x % i ==0){ return false; } } return true; } int main(){ in...
true
e4e23e7c5e3cf9eddbabee24b991131310ec0aab
C++
maker91/VoxMysticum
/src/IDFactory.cpp
UTF-8
192
2.546875
3
[]
no_license
#include "IDFactory.hpp" uid IDFactory::generate(const std::string &what) { if (!ids.count(what)) ids[what] = 0; return ids[what]++; } std::map<std::string, uid> IDFactory::ids;
true
5c2c0bc475c47370511ef9215cd6ef6e83d87cd1
C++
gosu/gosu
/src/ClipRectStack.hpp
UTF-8
465
2.625
3
[ "MIT" ]
permissive
#pragma once #include <Gosu/Utility.hpp> #include "GraphicsImpl.hpp" #include <limits> #include <optional> #include <stdexcept> #include <vector> namespace Gosu { class ClipRectStack { std::vector<Rect> m_stack; std::optional<Rect> m_effective_rect; public: void clear(); v...
true
69911b34fca82953ed1fb444e09638fad92d1dbb
C++
Bluegent/CommProto
/CommProtoLib/interface/commproto/utils/Math.h
UTF-8
560
2.765625
3
[]
no_license
#ifndef CP_MATH_H #define CP_MATH_H #include <math.h> namespace commproto { namespace math { inline bool floatEq(float a, float b, float epsilon = 0.0001f) { return fabs(a - b) < epsilon; } inline float getNearest(float left, float right, float value, float step) { float compute = left + value * (ri...
true
72d86060adfa3b6828438b452f86c5cb81e9002f
C++
robhagemans/bethe-solver
/bethe-xxz/main.cc
UTF-8
1,105
3.359375
3
[ "MIT" ]
permissive
#include "exception.h" string Command; vector< stringstream* > Arguments; stringstream Command_Line; int main(int argc, char* argv[]) { Command = argv[0]; for (int argn=1; argn < argc; ++argn) { Command_Line << argv[argn] << "\t"; Arguments.push_back(new stringstream(argv[argn])); } try { return run(); } ...
true
f7d11560f04709ceea7651d7dbb15d7bf8cba662
C++
federicodangelo/SimpleCompiler
/SimpleCompiler-C/CSimboloSimple.cpp
UTF-8
558
2.765625
3
[ "MIT" ]
permissive
#include "CSimboloSimple.h" #include "CTablaSimbolos.h" #include "FuncionesUnix.h" CSimboloSimple::CSimboloSimple() { m_Type = SIMBOLO_TIPO_CONSTANTE_INT; } void CSimboloSimple::Imprimir(int n) { for (int i = 0; i < n; i++) printf(" "); switch(GetType()) { case SIMBOLO_TIPO_CONSTANTE_INT: printf("Const...
true
13c6df1e833e84979e4f9aa8fc8529d3a1a0905f
C++
xczhang07/leetcode
/g/swap_adjacent_in_lr_string.cpp
UTF-8
1,442
3.78125
4
[]
no_license
In a string composed of 'L', 'R', and 'X' characters, like "RXXLRXRXL", a move consists of either replacing one occurrence of "XL" with "LX", or replacing one occurrence of "RX" with "XR". Given the starting string start and the ending string end, return True if and only if there exists a sequence of moves to transf...
true
0024e1d214ab1a75eabeadd88ff4e3f53bad31b8
C++
BaldomeroVargas/BlackJack
/Deck.h
UTF-8
783
3.421875
3
[]
no_license
#ifndef __DECK__ #define __DECK__ #include <iostream> #include <vector> using namespace std; struct Card{ private: string face; string suit; int value; public: //Card constructor Card(string cardFace, string cardSuit, int cardValue); //prints card ...
true
e9d1867ca4395d0f22469b6435d035dd04f40ffd
C++
juris-97/COM-LocalServer-Power
/Server/Factory.cpp
UTF-8
1,264
2.6875
3
[]
no_license
#include "Factory.h" #include "Power.h" Factory::Factory() { InterlockedIncrement(&UCServer); m_ref = 0; }; Factory::~Factory() { InterlockedDecrement(&UCServer); }; HRESULT STDMETHODCALLTYPE Factory::QueryInterface(REFIID id, void** ptr) { if (ptr == NULL) return E_POINTER; *ptr = NULL; if (id == IID_IUnkn...
true
58130abd3a92068c04b93b37871727e2d29d6e58
C++
gianbelinche/TallerTP2
/Cocinero.cpp
UTF-8
445
2.609375
3
[]
no_license
#include "Cocinero.h" #include "CocineroInterno.h" #include "PuntosDeBeneficio.h" #include "Inventario.h" #include <utility> Cocinero::Cocinero(Inventario& inventario,PuntosDeBeneficio& puntos) : cocinero_interno(CocineroInterno(inventario,puntos)){} void Cocinero::empezar(){ std::thread thread(cocinero_interno)...
true
52ba10602fc40a2e68c472c58237030c92698b67
C++
Bilonel/Game-Top-Down
/Object.h
UTF-8
537
2.828125
3
[]
no_license
#pragma once #include "Game.h" class Object { public: int tag; sf::Vector2f bulletPos; Object(int tag=0) :tag(tag), bulletPos(-111, -111) {} virtual void update(float deltaTime) {} virtual void render(sf::RenderWindow& window,float deltaTime) {} virtual bool isAlive() {return true; } }; class SpriteObject : ...
true
8b5a050b96c86d7d1d8e55adc8e6ad02db759696
C++
redaaa99/HackerRankSolutions
/algortihms/implementation/acmIcpcTeam.cpp
UTF-8
842
2.75
3
[]
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int n, m; cin >> n >> m; string topic[n]; for(int topic_i = 0; topic_i < n; topic_i++){ cin >> topic[topic_i]; } int known, max_known = 0, know_all = 0; ...
true
5497ee1a58a26622dc2b09a56c624562302649eb
C++
derekzhang79/Algorithm-Training
/Challenge/DFS/1979m.cpp
UTF-8
1,019
2.859375
3
[]
no_license
#include<iostream> #include<string.h> #include<cmath> using namespace std; char RedAndBlack[20][20]; int RBState[20][20] = {0}; int w,h; int result; int dfs(int a,int b); int main() { while(cin>>w>>h&&(w||h)){ int posX = 0;int posY = 0; result = 0; memset(RedAndBlack,0,sizeof(RedAndBlack)); ...
true
4987050fbcad2badecb6305baa07f9f2e2ce956d
C++
draetus/faculdade_trabalhos
/Estrutura_de_Dados/Trabalho_M2/Atividade_1/Deque.h
UTF-8
511
3.09375
3
[]
no_license
#ifndef DEQUE_H_INCLUDED #define DEQUE_H_INCLUDED #include <iostream> using namespace std; const int dequeSize = 5; class Deque { int elements [dequeSize], elementsQuantity, right, left; public: Deque(); void pushRight(int data); void pushLeft(int data); void popRight(); void popLeft(); ...
true
f4283613a3925108aa83ca33c1a3a7386ab89832
C++
SevenLines/Wave
/gui/mainwindow.cpp
UTF-8
2,452
2.609375
3
[]
no_license
#include <core/Waveprocessor.h> #include "mainwindow.h" #include "ui_mainwindow.h" #include <opencv2/opencv.hpp> #include <QDebug> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; } inline cv::...
true
1c97c4b3db0132617afe49416d64f905ad7a73f2
C++
zeroplusone/AlgorithmPractice
/Other/2015_google_code_jam/qb/qb.cpp
UTF-8
1,347
2.6875
3
[]
no_license
#include<cstdio> #include<cstdlib> using namespace std; #define MAXD 1100 int tmp[MAXD]; int d; int findMin(int p[],int sum,int ans) { printf("~%d %d\n",ans,sum); for(int i=0;i<d;++i) printf("%d ",p[i]); printf("\n"); if(sum<=0) { return ans; } int sp,nsp,tsum,maxn,maxi,i...
true
7dcd85d487fd29a71c7eb389ee757c32061d7ef0
C++
andrejlevkovitch/KaliLaska
/src/graphics/imp/SceneIteratorImp.hpp
UTF-8
1,063
2.953125
3
[]
no_license
// SceneIteratorImp.hpp #pragma once #include <iterator> #include <memory> namespace KaliLaska { class GraphicsItem; class SceneIteratorImp { public: virtual ~SceneIteratorImp() = default; virtual GraphicsItem *operator*() const = 0; virtual GraphicsItem *operator->() const = 0; virtual SceneIteratorImp &...
true
fbc787963da4566c5e4e7665eecf9cce963a9f3e
C++
sanjosh/smallprogs
/basic/array/longest_increasing_subseq2.cpp
UTF-8
1,400
3.515625
4
[ "Apache-2.0" ]
permissive
#include <iostream> #include <vector> using namespace std; int32_t LIS(const std::vector<int32_t> &v) { std::vector<int32_t> highest_in_sequence(v.size()); std::vector<int32_t> length_of_sequence(v.size()); highest_in_sequence[0] = v[0]; length_of_sequence[0] = 1; int num_sequences = 1; for ...
true
51c984a26f261c607dbfbeb38b0c8db5848dcf53
C++
TolgaV/IL2452-System-Design-Languages
/sc-programs/channel-queue/queue_if.h
UTF-8
1,423
3.203125
3
[]
no_license
#pragma once /* Queue Interface header file */ #include "stdafx.h" #include "systemc.h" /* Step 1: Declare an abstract interface class -derived from sc_interface -use Virtual inheritance to allow multiple inheritance without multiple inclusion of the base class members -pure virtual functions because it is mandatory f...
true
00215ad3fa352f6ab809fc99df68ac8dd72f5599
C++
NullCodex/Straights
/DialogTesting/helloworld.cc
UTF-8
1,251
3.453125
3
[]
no_license
/* * Displays a group of radio buttons in a dialog box when the button in the window is clicked. */ #include "helloworld.h" #include "MyDialogBox.h" #include "TurnDialog.h" // Creates a new button with the label "Hello World". HelloWorld::HelloWorld() : button("Bring up dialog box"), button1("Bring up dialog box 2...
true
97ecf18f4909c143095062ffdcb35fe09104b05b
C++
j-seeger/ProjektArbeitSpiel
/zeichenfeld.cpp
UTF-8
4,247
2.53125
3
[]
no_license
using namespace std; #include <QtGui> #include <QMessageBox> #include <QKeyEvent> #include <QLabel> #include <QTextStream> #include "zeichenFeld.h" zeichenFeld::zeichenFeld(QWidget *parent): QWidget(parent) { /*hier wird das Design des Spielfeldes festgelegt*/ setPalette(QPalette(QColor(46, 139, 87))); s...
true
465f8f31266bd4799377854de80a9d14520b16b5
C++
npruehs/pinned-down-server
/Source/PinnedDownGameplay/PinnedDownGameplay/Util/Random.h
UTF-8
547
2.59375
3
[ "MIT" ]
permissive
#pragma once namespace PinnedDownGameplay { namespace Util { // Implementation of the Ranq1 struct found in Numerical Recipes in C: 3rd Edition. // Combined generator (Ranq1 = D1(A1(right-shift first)) with a period of 1.8 x 10^19. class Random { public: Random(); Random(unsigned long long seed); ...
true
7535deb6b799f68d675defbcb39a92165fd73207
C++
Aryaman2912/DSA
/Binary_Trees/breadth_first_traversal.cpp
UTF-8
2,024
4.375
4
[]
no_license
// The below program demonstrates breadth first traversal of a binary tree #include<bits/stdc++.h> using namespace std; struct BstNode{ int data; BstNode* left; BstNode* right; }; // Function to create a new node BstNode* GetNewNode(int value){ BstNode* node = new BstNode(); node->data = value; node->left = no...
true
8c2c64caa14385629e1973c1ca357e06f401ae4a
C++
2020lwy/CppPratice
/C++/gdb/test.cpp
UTF-8
202
2.90625
3
[]
no_license
#include <iostream> int test(int *var){ int a = 200; var = &a; return *var; } int main(void){ int *var = NULL; std::cout << "return = " << test(var) << std::endl; return 0; }
true
46f8f2981e7b58b5ce5f6f78cb79d5f23a67a74e
C++
ArapovXD/QT-Quick-todo-
/src/authhandler.cpp
UTF-8
2,813
2.765625
3
[]
no_license
#include "authhandler.h" #include <QDebug> #include <QVariantMap> #include <QNetworkRequest> #include <QJsonObject> AuthHandler::AuthHandler(QObject *parent) : QObject(parent) , m_apiKey( QString() ) { m_networkAccessManager = new QNetworkAccessManager( this ); } AuthHandler::~AuthHandler() { m_networ...
true
ba025c9d6e63a653f2789e850d596ca80bf7ccf4
C++
shiv-30/Algorithms
/Dynamic Programming/3CatlanNumber.cpp
UTF-8
5,120
3.359375
3
[]
no_license
// Catlan numbers // c0 = 1 // c1 = 1 // c2 = c0c1 + c1c0 = 1 + 1 = 2 // cn = c0c(n - 1) + c0c(n - 2) + ..... + c(n - 2)c0 + c(n - 1)c0 // Applications : // Number of possible Binary Search Trees with n keys. // Number of expressions containing n pairs of parentheses which are correctly matched. For...
true
de375602970d004e2d74de5df5afd7be9de87d90
C++
aeremin/Codeforces
/alexey/Solvers/6xx/617/Solver617E.cpp
UTF-8
2,709
2.59375
3
[]
no_license
#include <Solvers/pch.h> #include "algo/query/mo_query_processor.h" #include "algo/query/order_independent_slider.h" #include "algo/io/printvector.h" #include "algo/io/readvector.h" using namespace std; // Solution for Codeforces problem http://codeforces.com/contest/617/problem/E class Solver617E { public: void ...
true
f0f90dd289bfd30dac273c2dceabf1408bfd1d73
C++
JonnyKong/GoogleCodeJam
/2018/Qualification/d.cpp
UTF-8
2,249
3.203125
3
[]
no_license
#include <iostream> #include <ostream> #include <fstream> #include <vector> #include <string> #include <math.h> using namespace std; // #define cin infile // ifstream infile("in.txt", ios::in); vector<vector<double>> matmul(const vector<vector<double>> & a, const vector<vector<double>> & b) { int x = a.siz...
true
14e25d5be6a24390f1086ce543c68b356dd07983
C++
lache/anyang
/client/samples/Cpp/HelloCpp/Classes/mdgen/data_reloader.h
UTF-8
2,341
2.734375
3
[]
no_license
#pragma once #define THREAD_SAFE_RELOADER 0 namespace data { ; class data_reloader { public: virtual bool is_reloadable() = 0; virtual void reload() = 0; }; template <typename _Ty> class data_referer { public: void add(); void release(); }; template <typename _Ty> class data_reloader_impl : publ...
true
845cd5cf74ef6ca8c3816580c00cee27ec64a979
C++
zldzksk1/OSU-CS325-Argorithm
/Portfolio/tetris3/Coordination.cpp
UTF-8
1,142
3.015625
3
[]
no_license
#include "Coordination.hpp" using namespace std; int Coordination::GetX() const //return x coordination { return xpos; } int Coordination::GetY() const //return y coordination { return ypos; } void Coordination::SetX(int x) //set x and y coordination { xpos = x; } void Coordination::SetY(int y) { ypos = y; }...
true
0cd60b2ff7008cd34c0b96f5071d58473765b759
C++
Cybot101/HIT3172-CS1-Monopoly
/HIT3172-CS1-Monopoly/Player.cpp
UTF-8
1,264
3.296875
3
[]
no_license
/* HIT3172 - Object Orientated Programming C++ Case Study 1 :: Monopoly Kyle Harris 9621121 http://github.com/Cybot101/HIT3172-CS1-Monopoly ********************************************** Player - Implementation */ #include "Player.h" #include <sstream> /** Creates a player object with a name. @param...
true
b00d847052bea8031e8091053bb52b6dc6913185
C++
lhmouse/asteria
/test/ascii_numput_double.cpp
UTF-8
3,155
2.671875
3
[ "BSD-3-Clause" ]
permissive
// This file is part of Asteria. // Copyleft 2018 - 2023, LH_Mouse. All wrongs reserved. #include "utils.hpp" #include "../rocket/ascii_numput.hpp" #include "../rocket/ascii_numget.hpp" #include <float.h> #include <math.h> using namespace ::rocket; int main() { ascii_numput nump; ascii_numget numg; char...
true
f8eb7271c673f94559e0f95b369c458f62e11567
C++
OK-BOOMERS/ProjetFlou
/src/combat/Enemy.cpp
UTF-8
987
3.09375
3
[]
no_license
// // Created by pz on 05/05/2020. // #include <iostream> #include "Enemy.h" #include "Player.h" combat::Enemy::Enemy() { hp=100; energy=200; block=false; } int combat::Enemy::attack(){ srand (time(nullptr)); int damage = rand() % 10 + 10; substractEnergy(80); return damage; } void comba...
true
22e32190d7577b789877f41dd422582c6e78cb74
C++
mccabmic/dumbZoo
/Penguin.cpp
UTF-8
765
2.71875
3
[]
no_license
/************************* Author:Michael McCabe Date: Janaury 19, 2018 IDE: Visual Studio **************************/ #include "Penguin.hpp" Penguin::Penguin() { isFed = false; setAge(1); setCost(1000); setBabies(5); setFoodCost(base); setPayoff(100); } Penguin::Penguin(int age) { isFed = false; setAge(a...
true
2b4b75fa52fcf34792a3d517a86d7006cee15a39
C++
rmShoeb/OnlineCourses
/Udemy/Mastering Data Structures and Algorithms using C and C++/hashing-linear-probing.cpp
UTF-8
1,553
3.734375
4
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; class LinearProbing { private: int *hashTable; bool *isThereAnyElement; int numberOfKeys; public: LinearProbing(){ LinearProbing(50); } LinearProbing(int number_of_keys){ this->numberOfKeys = number_of_keys; this->hashTable ...
true
97bbf33d1f745c949f007da32f5a30b793c67752
C++
kevinkraft/RTS_3
/include/ArgContainer.h
UTF-8
2,143
2.703125
3
[ "MIT" ]
permissive
#ifndef ARGCONTAINER_H_ #define ARGCONTAINER_H_ #include <string> #include <iostream> //#include "Menu.h" class Menu; class InfoMenu; class Action; class Entity; class EntityHP; class TextBox; class SelectionMenu; class ExchangeMenu; class Resource; class Construction; class ArgContainer { public: ArgContainer()...
true
1faf2e8a68d03bfd640ae793eac8feeb2dee7d6d
C++
Honepa/projects
/kvadric/big_knok/auto_knok/auto_knok.ino
UTF-8
4,278
2.546875
3
[]
no_license
#define INIT 0 #define CMP_TURN 1 #define CMP_ON 2 #define EXPECT_KNOK 3 #define ALL_OFF 4 #define ARD_OFF 5 #define LED_PWR_OK 3 #define LED_PWR_ON 2 #define LED_CMP_ON 4 #define knok A1 #define key A0 #define big_ard A7 #define rele_mass A6 #define rele_cmp A5 float t = 0; void setup()...
true
f10523dc62ac63fd658730c5e4b67c9318048ead
C++
thiagoclassen/TrieTree
/src/TrieTree.h
UTF-8
610
2.59375
3
[]
no_license
/* * TrieTree.h * * Created on: 18 de jun de 2016 * Author: Thiago */ #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <cctype> #include <iostream> #include <list> #include <iomanip> #ifndef TRIETREE_H_ #define TRIETREE_H_ #define TAM (26) struct TrieNode { struct TrieNode *children[...
true
7dfaed8a8da4ad42c8e38ebdecb6e0e744691a83
C++
sturgle/LeetCode
/3Sum.cpp
UTF-8
1,363
3.046875
3
[ "Apache-2.0" ]
permissive
class Solution { public: vector<vector<int> > threeSum(vector<int> &num) { vector<vector<int> > result; sort(num.begin(), num.end()); int N = num.size(); for (int i = 0; i < N; i++) { if (i != 0 && num[i] == num[i - 1]) continue; int le...
true
c563d6c670266dc55aa67d7669452cb5a339daae
C++
JJMyring/NewEngineAgain---Copy-2-
/vendor/IMAT3904/include/include/independent/rendering/cameras/camera.h
UTF-8
701
2.828125
3
[]
no_license
/** \file camera.h */ #pragma once #include <glm/glm.hpp> namespace Engine { /** \class Camera Abstract base class for a camera*/ class Camera { protected: glm::mat4 m_projection; //!< Projection matrix glm::mat4 m_view; //!< View matric glm::mat4 m_viewProjection; //!< View projection matrix public: vir...
true
b8a527112111aafc5a0a79f0a7ba519452c1dbda
C++
hegoimanzano/KIMERA
/src/Atom.cpp
UTF-8
14,086
3
3
[ "MIT" ]
permissive
#include "Atom.h" Atom::Atom( long long int id_, double x_, double y_, double z_,long long int type_, bool insurface_) { id = new long long int; x = new double; y = new double; z = new double; atom_type = new string; type = new long long int; insurface = new bool; mass=new d...
true
42cccfa828b8dbb55707c732c701cfd2a7881a81
C++
imSarfaroz/Algorithms-Analysis-2021
/lab-06/p02/main.cpp
UTF-8
1,506
3.53125
4
[]
no_license
#include <iostream> #include <vector> #include <sstream> #include <algorithm> #include <string> #include <stdexcept> using namespace std; enum class Color { White, Red, Black }; void dfs(int v, const vector<vector<int>> &graph, vector<Color> &colors, vector<int> &order) { colors[v] = Color::Red; ...
true
cc9f1bda21ad98b81f0df986f144e5a4ad109f8f
C++
nicolgorostiaga/Application_Stack
/LStack.cpp
ISO-8859-2
5,000
3.71875
4
[]
no_license
//--- LStack.cpp ------------------------------------------------- #include <new> #include <cctype> #include <iostream> #include <string> using namespace std; #include "LStack.h" //--- Definition of Stack constructor Stack::Stack(){myTop = NULL;} //--- Definition of Stack copy constructor Stack::Stack(const Stack ...
true
4f4df4c359c3ee29295a5fd29eaefc1c751a7b82
C++
sibirbil/PMBSolve
/cpp/openmp/rosenbrock_solver.cpp
UTF-8
1,766
2.84375
3
[]
no_license
#include <iostream> #include <random> #include "pmb_driver.hpp" #include "common.h" using namespace std; struct Rosenbrock { int n; Rosenbrock(int n) : n(n) {} void operator()(opt_prec_t* x, opt_prec_t &f, opt_prec_t* g) { f = 0.0; for (int i=0; i<n/2; i++) { f += 100.0*pow(x[2*i+1] - pow(x[2*i]...
true
b9b553f9bbaa2d7a442646c3835bf085dcae436f
C++
dkhonker/sysu
/数据结构/数据结构实验课文件/EXP6-EXAM01/EX6学生代码/20354032/task1.cpp
ISO-8859-7
728
2.96875
3
[]
no_license
#include<stdio.h> #include<stdlib.h> typedef struct Queue{ char* base; int front; int rear; }Queue; int main() { //ն Queue Q; int m,n; int num; char s; char null; int count = 0; int i; scanf("%d%d",&m,&n); Q.base = (char*)malloc(m*sizeof(char)); Q.front = 0; Q.rear = 0; while(((Q.rear-Q.front+1+m)%m!...
true
888ff67b647c2a9f8c4166a6fa11d29912835eb4
C++
mirrzamustafa/OpenGL
/Application.cpp
UTF-8
3,234
2.875
3
[]
no_license
#include<GL/glew.h> #include<GLFW/glfw3.h> #include<iostream> static unsigned int CompileShader(unsigned int type, const std::string& source) { unsigned int id = glCreateShader(type); const char * str = &source[0]; glShaderSource(id, 1, &str, nullptr); glCompileShader(id); // only Error Handling bel...
true
cfe2646196b7a5fd69fbc0d11ff819391f9213eb
C++
VerEeckeDaan/OOP3
/Woman/main.cpp
UTF-8
299
3.09375
3
[]
no_license
#include <iostream> #include "Woman.h" //Include of project header using namespace std; int main() { //int number; Woman mila(19, "Mila"); cout << mila.to_string() << endl; //change age and print again mila.setAge(30); cout << mila.to_string() << endl; return 0; }
true
a670feff3b6f429e42f1d8fa5101dd3c0232140d
C++
MYildizz/Syllabus
/Codes/KardeslerScheduler/Course.hpp
ISO-8859-13
2,228
3.15625
3
[]
no_license
#ifndef COURSE_H_ #define COURSE_H_ #include <iostream> #include <vector> #include <string> #include <fstream> #include <cstring> #include <sstream> using namespace std; class Course { protected: //string courseCode; string courseName; string courseSemasterYear; string credit; string Status; string DepartOrSe...
true
1e85e73260139a146d3289b3aff9d6c2f8168354
C++
github188/SClass
/main/Text/StrInt32WAcc.cpp
UTF-8
792
2.515625
3
[]
no_license
#include "Stdafx.h" #include "MyMemory.h" #include "Core/Core.h" #include "IO/ConsoleWriter.h" #include "Text/MyString.h" #include "Text/MyStringW.h" #include "Text/StringBuilderUTF8.h" Int32 MyMain(Core::IProgControl *progCtrl) { WChar sbuff[32]; Int32 i = 100000000; Int32 j; Bool succ = true; IO::...
true
0ffaa10b02a9f6a95a6c2b3c29be2416db695360
C++
Cha-M/Talkquest
/Talkquest.cpp
UTF-8
1,981
3.125
3
[]
no_license
#include <iostream> #include <fstream> #include <stdlib.h> #include <string> #include <vector> using std::endl; using std::cout; using std::cin; using std::string; using std::vector; class cha_cla { public: string nam; int exp; int lvl = 0; vector<int> points = {0, 10, 20, 50, 100,...
true
e15f4efa34d9609eff847d273d3b82493cf0e973
C++
DaveeFTW/henkaku_installer
/3rdparty/include/stateless++/detail/trigger_behaviour.hpp
UTF-8
2,860
2.640625
3
[ "MIT" ]
permissive
/** * Copyright 2013 Matt Mason * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
true
e27e05240933c71307a67d7ec9b48eebf4e9e483
C++
Jhecks/ITMO-Algorithms-and-Data-Structures
/Lab 13/Lab_3.cpp
UTF-8
659
3.1875
3
[]
no_license
#include <iostream> #include <vector> #include <string> using namespace std; vector <int> PrefixFunc; string String; void PrefixFunction() { PrefixFunc.resize(String.size()); PrefixFunc[0] = 0; for (int i = 1; i < String.size(); i++) { int j = PrefixFunc[i - 1]; while (j != 0 && ...
true
7a44fb53ef4ca5f54f4444e9948d33d14c28b9f2
C++
JulioMelo-Classes/lista-1-taleshrocha
/inverter/src/function.cpp
UTF-8
528
3.328125
3
[]
no_license
#include <iostream> #include <array> #include <iterator> using std::iter_swap; template <size_t SIZE> /*ok!*/ void reverse( std::array< std::string, SIZE > & arr ) { auto first = arr.begin(); auto last = arr.end()-1; if(!(arr.size()%2)){ //std::cout<<"Batata"<<std::endl; for(int i = 0; i < ...
true
7a3f1fd49d6c1e1fe07692428b260d66384637ad
C++
ugovaretto-accel/rocm-scratch
/block-matrix-mul.cpp
UTF-8
6,247
3.515625
4
[]
no_license
/// Block matrix-matrix multiply with non square matrices and non-square blocks /// @author Ugo Varetto #include <cassert> #include <cstddef> #include <iostream> #include <string> #include <vector> using namespace std; using Float = float; /// Used for dimensions (x = columns, y = rows) and offsets. struct dim2 { ...
true