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
e6d29edfbd78cb34f3d13e987bc0ebe6602ae803
C++
sonny-zhang/myC-
/example1_1.cpp
GB18030
1,233
3.765625
4
[]
no_license
/* ʶC++Ͷ */ #include <iostream> //ͷļ using namespace std; //ʹռ //int result(int, int); //resultԭ // //const int k = 2; //峣 // //struct Point { //ṹpoint // int x, y; //}; /***************************** result ζab ֵζ *****************************/ //int result(int a, int b) ...
true
8d3b3653abf68ebfdaed9ea839c6bc5fdab0edb7
C++
tran-nick/Learning-CPP
/Section18/IllegalBalanceException.h
UTF-8
312
2.734375
3
[]
no_license
#pragma once #include <iostream> class IllegalBalanceException : public std::exception{ public: IllegalBalanceException() {} ~IllegalBalanceException() {} virtual const char* what() const noexcept override { return "Illegal balance exception, balance cannot be negative number"; } };
true
eb8db2ebad9cb63432b54f166fb04f3d7ffd8c9b
C++
DronPascal/BMSTU-Cpp-Programming-basics
/3 Сем/Лаба1/MeshLoader/MeshLoader/MeshLoader.h
WINDOWS-1251
3,904
2.828125
3
[]
no_license
#pragma once #include "MeshDataTypes.h" #include <vector> #include <list> #include <set> #include <fstream> #include <iostream> #include <unordered_map> // std::hash, std unordered_multimap<std::pair<unsigned int, unsigned int>, FiniteElement> Edge namespace std { template<> struct hash<std::pair<unsigned int...
true
5471482aed63b8ee324f8d5bdee1dd1ebf282eeb
C++
shshun/algorithm
/백준5022(연결).cpp
UTF-8
2,132
2.65625
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <string.h> using namespace std; //9:20 typedef pair<int, int> p; int N, M; int dx[4] = { 0,0,1,-1 }; int dy[4] = { 1,-1,0,0 }; int temp[102][102]; int arr[102][102]; p A[2], B[2]; bool isRange(int x, int y) { if (x >= 0 && y >=...
true
c65ff6bc3c2413e510bbad7d419786915020875c
C++
atifkarim/problem_solving
/cpp_practise/pointer_cpp/pointer_type_obj.cpp
UTF-8
695
3.921875
4
[]
no_license
/*** * In this code usage of pointer type obj is shown. * Also see calling_function_using_another_class.cpp code ***/ #include <iostream> using namespace std; class SUM{ public: SUM(){cout<<"Free constructor\n";} int a ; int b; int do_sum(int x, int y); }; int SUM::do_sum(int x, int y){ cout<<...
true
4fe22200e4d96d044601e90de9df22b6ff1e3f47
C++
qweilak/Golden-Axe-Tribute
/ModuleScenelvl1.h
UTF-8
1,273
2.609375
3
[]
no_license
#ifndef __MODULESCENELVL1_H__ #define __MODULESCENELVL1_H__ #include "Module.h" #include "Animation.h" #include "Globals.h" #include "Point.h" #include "Timer.h" struct Explosion { Animation animation; fPoint point; }; struct Collider; struct Potion { Collider* collider; fPoint position; ~Potion(); }; //Objects...
true
52a1d66c2a35a6e38d712269186e30047eeb2a2c
C++
JayGitH/839C-language-and-data-structure
/839数据结构/c语言/6.2结构与函数.cpp
GB18030
2,351
3.40625
3
[]
no_license
/*20181010() lingr7 2018102021:05:25 20181020 */ middle = makepoint((screen.pt1.x + screen.pt2.x)/2, (screen.pt1.y + screen.pt2.y)/2); /* addpoint*/ struct point addpoint(struct point p1, struct point p2) { p1.x += p2.x; p1.y += p2.y; return p1; } /*ṹ͵IJҲֵͨݵ*/ /* ptinrectpھrڣ򷵻1򷵻0*/ int ptinrect(struct point ...
true
239d9a471c1084de5867beb3824b59309d7c7a12
C++
ThinEureka/Tiny3D
/Win32Project1/shader/shaderprogram.cpp
UTF-8
4,663
2.59375
3
[]
no_license
#include "shaderprogram.h" #include <stdlib.h> #include <stdio.h> #include <iostream> #include <string> using namespace std; //Got this from http://www.lighthouse3d.com/opengl/glsl/index.php?oglinfo // it prints out shader info (debugging!) void printShaderInfoLog(GLuint obj, const char* shaderStr) { int i...
true
9bdafc02e1976404af347f488616d70d9daebe12
C++
Ilyagavrilin/onegin_io
/wrapper.cpp
UTF-8
1,673
2.84375
3
[]
no_license
#include "wrapper.h" int MainWrapper() { const char* separator = "/-------------------------------------\n"; //names for files to work const char * write_fname = "C:/Users/gavri/CLionProjects/onegin_indexed/write.txt"; const char* read_fname = "C:/Users/gavri/CLionProjects/onegin_indexed/get.txt"; ...
true
74963ba9bded4ee2535c0c0bc70ed2bff880b4ae
C++
marvsz/BP38Ergonomie
/model/bodyposture.cpp
UTF-8
1,223
2.90625
3
[]
no_license
#include "bodyposture.h" BodyPosture::BodyPosture() { id = -1; legPosture = new QString(""); setHead(new Head()); setTorso(new Torso()); setLeftArm(new Arm()); setRightArm(new Arm()); setLeftLeg(new Leg()); setRightLeg(new Leg()); } int BodyPosture::getID() const{ return id; } He...
true
1fe2dcaa65b5774aeda693b5ed657e720f548a53
C++
ogsub/MIDI-And-Music-XML-Converter-And-Editor
/MIDI And Music XML Converter And Editor/Main.cpp
UTF-8
6,566
2.671875
3
[ "MIT" ]
permissive
#include "Kompozicija.h" #include "Mapa.h" #include "MIDIFormater.h" #include "MXMLFormater.h" #include "BMPFormater.h" int main(int argc, char *argv[]) { //ime programa, putanja mape, putanja kompozicije, brojilac, imenilac bool konvertovano = false; int meni; bool kraj = false; Mapa mapa; Kompozicija kompozici...
true
382e3f057b73deabc59bcaf870fd3499019e7823
C++
upupming/algorithm
/acwing/算法竞赛进阶指南/0x12-队列/132. 小组队列.cpp
UTF-8
1,531
2.96875
3
[ "MIT" ]
permissive
/* 维护 t 个队列,同时用 m[i] = j 表示第 i 类在第 j 个队列里面,o[j] = i 书上的做法:实际上是把 m 和 n 也当做一个队列来处理了,用一个存小组编号的队列维护当前的所有组,也能够实现按序的出队列。 */ #include <cstring> #include <iostream> #include <queue> #include <vector> using namespace std; int t, m[1010], o[1010], cls[1000010], n, x, cnt, idx; string cmd; vector<queue<int>> qs; int main() { ...
true
5dc778129b5ed6ac792eeb706d43568e35b19a29
C++
RsrnlWysxr/Data_structures
/LinkedList/LinkedQueue/main.cpp
UTF-8
411
3.0625
3
[]
no_license
#include <iostream> #include "LinkedQueue.h" int main() { LinkedQueue<int>* link = new LinkedQueue<int>(); for(int i = 0 ; i < 10 ; ++i) { link->enqueue(i); } link->toString(); std::cout << "size:" << link->getSize() << std::endl; std::cout << "getFront:" << link->getFront() << std:...
true
aba966982e2e8d966b829764f4da07402dba4c9c
C++
iamgyu/DataStructure-Algorithm
/OpenAddressing/OpenAddressing/OpenAddressing.cpp
UHC
3,391
3.15625
3
[]
no_license
#include "OpenAddressing.h" HashTable* OAHT_CreateHashTable(int TableSize) { HashTable* HT = (HashTable*)malloc(sizeof(HashTable)); HT->Table = (ElementType*)malloc(sizeof(ElementType) * TableSize); memset(HT->Table, 0, sizeof(ElementType) * TableSize); HT->TableSize = TableSize; HT->OccupiedCount = 0; return...
true
f41178d086d35fe73f4a657873065c349fcdc7a6
C++
toivjon/sdl2-space-invaders
/include/state.h
UTF-8
1,028
3.046875
3
[ "MIT" ]
permissive
/*! An abstraction for all available game states within the Space Invaders. * * Our implementation of the Space Invaders contains three different scenes, * where one state is reserved for the welcoming (i.e. description) states, * one state is for the player get-ready message and one is for the ingame. */ #i...
true
46e39f9020257969c30df9bf5a2d9210411ce6cf
C++
evanmiller067/cs261
/assignments/production/production2/productiondb.h
UTF-8
960
3.046875
3
[]
no_license
#ifndef PRODUCTIONDB_H #define PRODUCTIONDB_H #include <string> #include <map> #include "entry.h" //class to store all data in maps and vectors class productiondb { private: typedef std::map<std::string stationName, stationdata*> stationMap; stationMap stations; public: void addData(entry&); stationMap::const...
true
3d9ee151a5faed5c75e0d8f6c8fd0aff6440d82e
C++
polyglotm/coding-dojo
/coding-challange/codewars/7kyu/2020-02-21~2020-07-31/from-the-minimum/from-the-minimum.cpp
UTF-8
457
2.890625
3
[]
no_license
// https://www.codewars.com/kata/563b662a59afc2b5120000c6 // $ g++ -std=c++11 space.cpp #include <iostream> #include <string> #include <vector> #include <set> using namespace std; unsigned long long minValue(vector<int> values) { std::set<int> set(values.begin(), values.end()); std::string s; for (const...
true
bfb629607520242ae74a865e08ebd26c93f25ad6
C++
Mukit09/UVA_Solution
/598.cpp
UTF-8
1,230
2.546875
3
[]
no_license
#include<stdio.h> #include<string.h> long taken[15],u,v,fg,fg1,n; char st[30],ch[15][50]; void rec(long ind,long l,long len) { long i; if(l==len) { fg=1; for(i=1;i<ind;i++) { if(taken[i]==1&&fg) { printf("%s",ch[i]); fg=0; } else if(taken[i]==1&&!fg) printf(", %s",ch[i]); } puts("...
true
19320d1ae519ce60419ee6401961ae2a6b399a7c
C++
abhisheksrivastava99/C-Problem-Solving-DSA
/Factors of a number.cpp
UTF-8
176
2.765625
3
[]
no_license
#include <iostream> using namespace std; int main() { int num; cout << "Enter value of num: "; cin >> num; for(int i=1;i<=num;i++) { if(num%i==0){cout<<i<<endl;} } return 0; }
true
8c18a62bed92b783e6b9146d13f3d366e68c59be
C++
gregouar/VALAG
/Valag/src/core/StatesManager.cpp
UTF-8
1,867
2.953125
3
[]
no_license
#include "Valag/core/StatesManager.h" #include "Valag/core/GameState.h" #include "Valag/utils/Logger.h" namespace vlg { StatesManager::StatesManager() : m_attachedApp(nullptr) { } StatesManager::~StatesManager() { //dtor } void StatesManager::stop() { this->switchState(nullptr); } void StatesManager::...
true
012c68bc1f6bf1c5d96dffe4eb6634844eb1062e
C++
eklavya1983/memcache
/src/Shard.cpp
UTF-8
3,360
2.546875
3
[]
no_license
#include <Shard.h> namespace memcache { EmbeddedKvStoreShard::EmbeddedKvStoreShard(folly::EventBase *eb, uint64_t maxCacheEntries) : eb_(eb), maxCacheEntries_(maxCacheEntries) { } void EmbeddedKvStoreShard::init() { } folly::Future<MessagePtr> EmbeddedKvStoreShard:...
true
8f2ee1a5c091c12b378406c27df7ecd3db06ee08
C++
immortaldogg/CaroAI
/Classes/GameManager.cpp
UTF-8
791
2.515625
3
[]
no_license
#include "GameManager.h" #include "SimpleAudioEngine.h" USING_NS_CC; Node* GameManager::createNode() { return GameManager::create(); } // Print useful error message instead of segfaulting when files are not there. static void problemLoading(const char* filename) { printf("Error while loading: %s\n", filenam...
true
79d49ab2c5f6fe3ece37e20e88afb3ac3a0c7461
C++
thelastsupreme/cracking-the-coding-interview
/3.StacksAndQueues/3.5SortStack.cpp
UTF-8
1,113
4.3125
4
[]
no_license
// Sort Stack: Write a program to sort a stack such that the smallest items are on the top. You can use // an additional temporary stack, but you may not copy the elements into any other data structure // (such as an array). The stack supports the following operations: push, pop, peek, and is Empty. #include<iostream> ...
true
83b6b7031d99b31d8aeb13d5bca97721bebcac39
C++
mehrdad-shokri/cosix
/hw/vga.cpp
UTF-8
3,168
2.828125
3
[ "BSD-2-Clause" ]
permissive
#include <oslibc/string.h> #include <hw/vga.hpp> using cloudos::vga_color; using cloudos::vga_buffer; static uint8_t make_color(vga_color fg, vga_color bg) { return uint8_t(fg) | uint8_t(bg) << 4; } vga_buffer::vga_buffer(vga_color fg, vga_color bg, uint16_t *p, size_t w, size_t h) : cursor_row(0) , cursor_column(0...
true
e32b6133b4f3b86a7d0d3dfe053ec5a6caa79bf8
C++
sheikhafsar/1725_OOP
/CPP/Test/main.cpp
UTF-8
387
2.9375
3
[]
no_license
#include <iostream> #include "Staff.h" #include "NonTeachingStaff.h" #include<string> using namespace std; int main() { cout << "Hello world!" << endl; NonTeachingStaff n1; n1.setName("Anish","Rao"); n1.SetPay(992200); n1.Setage(21); cout << n1.getName() << endl; cout << "age : " << n1....
true
c5f0c359a2e2ba782459fb61250303139e89764c
C++
alexalkis/mcl
/InputLine.cc
UTF-8
14,838
3.03125
3
[]
no_license
// The input line #include "mcl.h" #include "cui.h" #include "Interpreter.h" #include <sys/stat.h> #include <time.h> // A history for one input line // This class is used internally by InputLine class History { public: History(int _id); ~History(); void add (const char *s,time_t); // Add this string...
true
b2acc7bc9e256f34cafa4d54a356ff10391c2724
C++
rbdannenberg/o2
/src/sharedmem.cpp
UTF-8
23,771
2.5625
3
[ "MIT" ]
permissive
// sharedmem.cpp -- a brige to shared memory O2 service // // Roger B. Dannenberg // August 2020 /* Supports multiple connections to shared memory processes. All shared memory processes use the same heap, and O2_MALLOC is lock-free and thread-safe. Therefore, O2message types can be transferred directly to shared memo...
true
dfabb22bcde060f619b0c129adb5c3f9b572d877
C++
yingfeng/integer_encoding_library_sparklezzz
/include/Simple16_x64.hpp
UTF-8
5,282
2.59375
3
[]
no_license
#ifndef SIMPLE16_X64_HPP_ #define SIMPLE16_X64_HPP_ #include "Compressor.hpp" #include <stdint.h> namespace paradise { namespace index { class Simple16_x64: public Compressor { public: Simple16_x64() { } virtual ~Simple16_x64() { } public: virtual int encodeUint32(char* des, const uint32_t* src, uint32_t encode...
true
360bf04ed38cfc294a4338a4ae893a723b467e50
C++
zhaoyiru/Stanford-CS106B-Assignments-and-Handouts
/Handout8/Handout8.1.a.cpp
UTF-8
567
3.078125
3
[]
no_license
void Buffer::moveToWordBegin() { // if the character to the left of the cursor is a space // move back until it no longer is to skip over any // spaces that appear after the word while (cursor - 1 >= 0 && isspace(text[cursor - 1])) { moveCursorBackward(); } // now move to the front of t...
true
a71fc55274d7e95540eb6f20a04f02186a04dd44
C++
worldden/gkrellm
/main.cpp
UTF-8
1,846
2.59375
3
[]
no_license
// ************************************************************************** // // // // ::: :::::::: // // main.cpp :+: :+: :+: ...
true
07c2b85960581fc3068e95925f7dd5db4f338ac3
C++
PanCheng111/leetcode
/2/test.cpp
UTF-8
1,456
3.421875
3
[]
no_license
#include <cstdio> #include <vector> #include <algorithm> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { ListNode *head = NULL; ListNode *tail = N...
true
4d28455fbb0b0f63f2b5c4fed08f724cea0558ef
C++
Mmchips/miniature-train
/School_Assignments/lab-env-master/projects/S0008E_Lab3-Skinning/code/Animation.cpp
UTF-8
3,688
2.515625
3
[ "MIT" ]
permissive
// // Created by ivoako-5 on 9/19/17. // #include <config.h> #include <sys/stat.h> #include <fcntl.h> #include <iostream> #include "Animation.h" #include <sys/time.h> bool Animation::loadAnim(const char* fileName) { struct stat st; stat(fileName, &st); size_t size = st.st_size; int fd = open(fileName...
true
ce06a3963f8b5439662e5e260a690b71a582f11d
C++
lets-code-together/lets-code-together
/AlgorithmsBasic/3-DP1/11057_1.cpp
UHC
598
3.34375
3
[]
no_license
/* () N ־ ϴ α׷ ۼ 0 ۰*/ #include<iostream> using namespace std; long long d[1001][10]; const long long mod = 10007; int main() { for (int i = 1; i <= 1000; i++) { for (int j = 0; j <= 9; j++) { if (i == 1) d[i][j] = 1; else if(i > 1) { for (int k = 0; k <= j; k++) { d[i][j] += d[i...
true
b8457517bf3f9c5aa8eb4687e3f376bcbf374aa6
C++
neilsong/USACO
/Star League Gold/deskserving/Source.cpp
UTF-8
475
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main(void) { int n; cin >> n; queue<int>line; vector <vector <int>> desk(n); char place; cin >> place; int x; cin >> x; line.push(x); while (!line.empty()) { char action; int num; cin >> action >> num; if (action == 'C') { line.push(num); } els...
true
8eabf69753b215ff3b6602ac03aa424f66aaede6
C++
dubshfjh/LeetCode
/164.cpp
UTF-8
2,955
3.390625
3
[]
no_license
桶排序,不管数据是否均匀分布,其时间复杂度和空间复杂度都是O(n),参见算法导论112-113 首先设定相同大小的n个桶[本题设定size个桶,每个桶的容量:bucketsize = 1 + max-min/(size-1)],将每个nums[i]放到所属的第nums[i]/bucketsize个桶中,再执行插入排序 #include <iostream> #include <vector> #include <list> #include <iterator> #include <algorithm> #include <limits.h> using namespace std; class Solution { public...
true
bf2b2df3353967edc48ccae9bd5df6890d2cc003
C++
RokwonK/Problem_solving
/Baekjoon/1405_미친_로봇.cpp
UTF-8
1,422
3.015625
3
[]
no_license
#include<iostream> #include<vector> #include<string.h> using namespace std; int N; // 0 1 2 3 long double east, west, south, north; long double percent; int check[35][35]; vector<long double> route; void backtracking(int x, int y, int direct) { if (check[x][y] == 1) return; if (route.size() == N)...
true
0e15989aa024dfdb4dec096894d327445fa156ba
C++
ZoeMilbauer/Flight-Simulator---Project1
/Division.cpp
UTF-8
204
2.890625
3
[]
no_license
#include "Division.h" Division::Division(Expression* left, Expression* right) : BinaryExpression(left, right) {}; double Division::calculate() { return (*left).calculate() / (*right).calculate(); }
true
689415583791d5739dd80e89d447c515d09cf233
C++
shenh10/leetcode
/bitManipulation/numberOf1Bits/source.cpp
UTF-8
1,524
3.546875
4
[]
no_license
/* Problem: Given an integer, write a function to determine if it is a power of two. Solution: O(n) complexity: */ #include "iostream" #include <vector> #include <map> #include <algorithm> #include <cmath> #include <limits> using namespace std; template <typename T> void printVec(vector<T> vec){ cout<<"["; for...
true
23b24c89ea1284c72b17ef88c455f4dea7c4993e
C++
rosecodym/space-boundary-tool
/src/Core/src/area.cpp
UTF-8
4,598
2.6875
3
[]
no_license
#include "precompiled.h" #include "area.h" #include "equality_context.h" #include "geometry_common.h" #include "stringification.h" namespace geometry_2d { area::area(const std::vector<std::vector<point_2>> & loops) : use_nef(loops.size() > 1) { if (use_nef) { nef_rep = wrapped_nef_polygon(loops); } else { si...
true
413e9a763ed0dfa2b1a95383549cc15f8f0a34c1
C++
xyhStruggler/COMS327
/xiao_yuhan.assignment-1.08/object.cpp
UTF-8
2,869
3.03125
3
[]
no_license
#include <vector> #include "object.h" #include "dungeon.h" #include "utils.h" #include <cstring> int16_t *object_get_pos(object *o) { return o->position; } object::object(const object_description &o) { symbol = object_symbol[o.get_type()]; name = o.get_name().c_str(); desc = o.get_description().c_str(); type...
true
423772e23fa45b55f9e65c9b2345383203664526
C++
andens/master-thesis
/thesis-project/src/config-setter/config-setter.cpp
UTF-8
2,068
2.96875
3
[]
no_license
#include "config-setter.h" #include <algorithm> #include <array> bool ConfigSetter::more() const { return next_config_ != configurations_.end(); } void ConfigSetter::next_config(std::function<void(Configuration const&)> const& impl) { if (more()) { impl(*next_config_); next_config_++; } } ConfigSetter...
true
c458eb2116148e5f8878be5d92017c3ecfa06e6c
C++
Jarskih/Bomberman2
/Caligula/Entity.h
UTF-8
1,108
2.921875
3
[]
no_license
#pragma once /* * Entity.h * Base class for entities * Holds colliders and sprites * Has entity type which is used for detecting what entity is colliding with */ enum EntityType { PLAYER, ENEMY, BLOCK, BOMB, FLAME, POWER_UP, }; // Base Class for all entity types class Sprite; class SpriteSheet; class Co...
true
3b595fa3642162ed65493cccf504881b3227c015
C++
paulhuggett/digraph-hash
/src/lib/hash.cpp
UTF-8
2,112
3
3
[ "MIT" ]
permissive
#include "hash.hpp" #include <algorithm> #include "vertex.hpp" namespace { enum class tags : char { backref = 'R', digest = 'D', end = 'E', vertex = 'V', }; } // end anonymous namespace size_t hash::bytes_ = 0; #ifdef FNV1_HASH_ENABLED void hash::update_vertex (vertex cons...
true
49e36fbcc09227936a03e7b7fdc20aec340ca58f
C++
persesvilhena/c_cplus_studies
/AED1/EXERCICIOS/LISTA10/exer06.cpp
UTF-8
489
2.875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> void mm(void){ int x=0; float v[5] = {0}, maior = 0, menor = 9999; for(x=0;x<5;x++){ printf("valor: "); scanf("%f", &v[x]); } for(x=0;x<5;x++){ if(v[x] > maior){ maior = v[x]; } i...
true
f82c053337c089228cbbd645add151c5b1cc7e7e
C++
aardvarkk/pixellate
/geomalgorithms.h
WINDOWS-1252
4,949
3.296875
3
[]
no_license
#ifndef GEOMALGORITHMS_H #define GEOMALGORITHMS_H #include <cmath> // http://geomalgorithms.com/a06-_intersect-2.html // Copyright 2001 softSurfer, 2012 Dan Sunday // This code may be freely used and modified for any purpose // providing that this copyright notice is included with it. // SoftSurfer makes no warranty...
true
521f40da4af79baba327521b1ee05ad79b7813d3
C++
alex08d/Vacuum-Cleaner
/Vacuum_cleaner/main.cpp
UTF-8
24,676
2.625
3
[]
no_license
#include <iostream> #include <string.h> #include <stdlib.h> using namespace std; struct eveniment { char* den; }; struct stare { char* nume; }; typedef struct eveniment ev; typedef struct stare st; void populare_stari(st* stari)//am predefinit numele starilor pentru a facilita partea de afisare a ...
true
d87336de58afed20d13ace4b4b1f599f2c5b9a65
C++
zimengyang/Graphics_MIS_PT
/src/raytracing/integrator.h
UTF-8
2,033
2.625
3
[]
no_license
#pragma once #include <la.h> #include <raytracing/ray.h> #include <raytracing/intersection.h> #include <raytracing/intersectionengine.h> #include <scene/scene.h> class Scene; //The Integrator class recursively evaluates the path a ray takes throughout a scene //and computes the color a ray becomes as it bou...
true
1ce9e85a4664c9bf4d352280db701a1f99221d2b
C++
gittykrish/Competitive_Programming
/Codechef/HOWMANY.cpp
UTF-8
369
2.8125
3
[]
no_license
#include <iostream> using namespace std; int main() { // your code goes here int t,count=0; cin>>t; while(t>0){ count +=1; t /=10; } if(count==1 || count==0) cout<<"1"; else if(count==2) cout<<"2"; else if(count==3) cout<<"3"; else cout...
true
049a1b791c73079d3a2a9ebe569b9c55041f2b80
C++
vatsalsharma376/Algo-n-ds
/MO_Algorithm.cpp
UTF-8
1,228
2.90625
3
[]
no_license
//MO's Algorithm O(m+n * sqrt(n)) No updates and offline queries Sample Range Sum Query // 0 base indexing #include <bits/stdc++.h> using namespace std; int block=0; vector<pair<int,int> >quer; bool cmp(pair<int,int> a,pair<int,int> b){ // Arrange by blocks of sqrt(n) if(a.first/block!=b.first/block) retu...
true
4879e1ad37385e2b05fc3f7e988fbbcee95aa6e9
C++
MaxGarden/CurveEditor
/CurveEditor/Source/CurveEditor/CurveEditorTool.cpp
UTF-8
3,752
2.796875
3
[]
no_license
#include "pch.h" #include "CurveEditorTool.h" class CCurveEditorComponentTool final : public ICurveEditorComponentTool { public: CCurveEditorComponentTool() = default; virtual ~CCurveEditorComponentTool() override final = default; virtual void OnAcquired(const CCurveEditorToolEvent& event) override final;...
true
1acb9ebf80a2b94f1a0fc4af624d12361a439b7c
C++
CLPeterson/DurableCorrectness
/src/petra/dev/src/romulus/benchmarks/pq-ll-enq-deq.cpp
UTF-8
2,508
2.859375
3
[ "MIT" ]
permissive
#include <iostream> #include <fstream> #include <cstring> #include "benchmarks/PBenchmarkQueues.hpp" #include "datastructures/pqueues/RomLogLinkedListQueue.hpp" #include "datastructures/pqueues/RomLRLinkedListQueue.hpp" int main(void) { const std::string dataFilename {"data/pq-ll-enq-deq.txt"}; vector<int> t...
true
a7579fa8eb5ec30df6158e9dc29a5a0b873f6203
C++
anu1meha/perfbench
/src/tenant.h
UTF-8
2,422
2.609375
3
[]
no_license
#ifndef TENANT_H #define TENANT_H 1 #include <string> #include <arpa/inet.h> #include "testcases.h" #include "Controller.h" #include "systemstate.h" #include "signals.h" namespace testcases { class BaseTestCase; } /** * The Tenant class. Holds and creates the testcase object. */ class Tenant { public: int id;...
true
074bd5c9a35d535b40fcdc9d22b028e84ea1e949
C++
kiranraj2208/calendar-cum-Events-manager
/Calendar.h
UTF-8
6,298
3.265625
3
[]
no_license
#include<iostream> #include<fstream> #include<vector> #include<algorithm> #include<cstdlib> using namespace std; std::string get_string(); int dates[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; string days[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; string months[] = ...
true
bec443ec8f9a42e76d5da5124dfddb7712fef8d0
C++
cat1984x/Learning_Cpp_Primer
/exercises/8/8_4.cpp
UTF-8
430
3.15625
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; int main(int argc, char *argv[]) { if(argc > 1) { vector<string> c; string a; ifstream in(argv[1]); if(in) { while(getline(in, a)) c.push_back(a); in.close(); for(auto i : c) cout << i << endl...
true
83be38df144ab624dc2b3b551a9654693d8c3432
C++
mZarifa/CSCI-2270
/Exam 3/Q3/Graph.cpp
UTF-8
2,231
3.5625
4
[]
no_license
#include <vector> #include <iostream> #include <queue> #include "Graph.hpp" using namespace std; /* ---------------------------------------- TODO: Complete the method below. You may add helpers, headers (if necessary) Helper functions should not be part of the class. */ void Graph::vertexAtDepth(string s...
true
00255277ec942ddf8e83a5c8bd1012bbcbb6a0e6
C++
grievejia/tpa
/include/TaintAnalysis/Support/TaintMemo.h
UTF-8
969
2.640625
3
[ "MIT" ]
permissive
#pragma once #include "TaintAnalysis/Support/ProgramPoint.h" #include "TaintAnalysis/Support/TaintStore.h" namespace taint { class TaintMemo { private: std::unordered_map<ProgramPoint, TaintStore> memo; public: using const_iterator = decltype(memo)::const_iterator; TaintMemo() = default; // Return NULL if key ...
true
2784456b5f5352da0e60d878b1a061fcd04884c8
C++
maryana-la/cpp_modules
/cpp04/ex02/Dog.hpp
UTF-8
378
2.640625
3
[]
no_license
#include "Animal.hpp" #include "Brain.hpp" #ifndef DOG_HPP #define DOG_HPP class Dog : public Animal { private: Brain* _mozgi; public: Dog(); Dog(const Dog& other); virtual ~Dog(); Dog& operator= (const Dog& other); virtual void makeSound() const; void setIdea(const std::string& line); ...
true
c270558784e108a4400d08d33e90851047cfb814
C++
Manoama/Methods
/ЛР2/met_lab2.cpp
UTF-8
2,991
3.296875
3
[]
no_license
#include<iostream> #include<cmath> using namespace std; void print_vector(double T[4],string name) { cout << name << ":" << endl; for (int i = 0; i < 4; i++) cout << "\t[" << T[i] << "]" << endl; } void print_Matrix(double T[4][4], string name) { cout << "Matrix "<< name << ":" << endl; for (...
true
b8ac8db8e629b86c6e4ae8e002671d202374ff43
C++
Hausdorffcode/leetcode_cpp
/Palindrome Partitioning.cpp
UTF-8
1,134
3.5
4
[]
no_license
//https://leetcode.com/problems/palindrome-partitioning/#/description //dfs //time O(2^n), space O(n) class Solution { public: vector<vector<string>> partition(string s) { vector<vector<string>> ret; vector<string> path; dfs(ret, path, s, 0, 1); return ret; } private: v...
true
91c8a0d0ad710bd2b42ebb9face261be6c60274d
C++
flylong0204/projects
/src/osg/osgGraphicals/GraphicalsKeyHandler.cc
UTF-8
1,643
2.609375
3
[]
no_license
// ========================================================================== // GraphicalsKeyHandler class member function definitions // ========================================================================== // Last modified on 11/6/05; 12/7/05 // ==================================================================...
true
8e82ad05c5db2edeb08a4ec3bcbf9441b14f07ae
C++
jonathanxqs/lintcode
/87.cpp
UTF-8
2,398
3.765625
4
[ "MIT" ]
permissive
/** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right = NULL; * } * } */ class Solution { public: /** * @param root: The root of the binary search tree. ...
true
4862cdb3683feba7eceb8d27848749a246daa048
C++
KimDinh/UVa-Online-Judge-Practice
/UVa 10106.cpp
UTF-8
760
2.71875
3
[]
no_license
#include <iostream> #include <algorithm> #include <cmath> #include <string> using namespace std; int main() { string s1, s2; while(getline(cin, s1)) { getline(cin, s2); reverse(s1.begin(), s1.end()); reverse(s2.begin(), s2.end()); int a[502], first=0; for(int i=0; i<502;...
true
c9a47a7ae19657d4b6b867236314d58631e99142
C++
elitelau/lalr1_parser
/grammar_config.h
UTF-8
2,365
2.765625
3
[]
no_license
#ifndef _GRAMMAR_CONFIG_H #define _GRAMMAR_CONFIG_H #include "scanner.h" #include "grammar.h" #include <stdio.h> const int SYM_DIRVATION = 1000; #define O_DIRIVATION O_ASSIGN // !! in BNF, there is no denotion of assignment operation , but instand of dirivation #define O_SELECTION O_OR // '|', not "||" //t...
true
af6d724a7fbd909e120fdd65b87272ae38a61417
C++
lyMeiSEU/SEU_beat_plane
/ConsoleApplication1/ConsoleApplication1/FileOperation.cpp
GB18030
1,397
3.1875
3
[]
no_license
#include "pch.h" #include <fstream> #include <io.h> #include "FileOperation.h" #pragma warning(disable : 4996) FileOperation::FileOperation(string dir) { // m_strPathֵ string path = _pgmptr; // exeļĿ¼*.exe m_strPath = path.substr(0, path.find_last_of('\\') + 1); m_strPath += dir; if (!IsExisteDirectory(m_strPa...
true
56b1edc3060a16fb9ff526630dc111f596a94a5a
C++
eagee/SwimFishySwim
/IAudio.h
UTF-8
1,116
2.9375
3
[]
no_license
// IAudio.h // Defines the simple interface for all audio protocols (midi, mp3, pcm, controller) // Author(s): Eagan Rackley #ifndef IAUDIO_H #define IAUDIO_H ///<summary> /// // Defines the simple interface for all audio protocols (midi, mp3, pcm, controller) ///</summary> class IAudio { public: IAudio(){} v...
true
f459050d69b6cbbea73d041ec63db1735480afe1
C++
Moseasirius/Algorithm
/algorithm/Sort/IndexHeap.h
UTF-8
5,273
3.734375
4
[]
no_license
// // Created by mo on 2021/7/24. // #ifndef SORT_INDEXHEAP_H #define SORT_INDEXHEAP_H //索引堆 //数据和索引分开存储 //构建堆的过程和对数据的操作对索引操作就行 template<typename Item> class IndexMaxHeap { private: Item *data; int *indexes; int *reverse; int count; int capacity; void shiftUp(int k) { ...
true
ce07636eff3169d7f7a5536d62e6d9dd8d1162c7
C++
mrcarlino/AI-for-Game-Programming
/Pathfinding_ASCII/Pathfinding/Pathfinding.cpp
UTF-8
5,565
3.265625
3
[]
no_license
#include "pch.h" #include <GridHelper.h> #include <StopWatch.h> #include "BreadthFirstSearch.h" #include "GreedyBestFirst.h" #include "AStar.h" #include "Dijkstra.h" using namespace std; using namespace Library; void DrawGrid(Graph graph, int32_t graphWidth, int32_t graphHeight, set<shared_ptr<Library::Node>> closedS...
true
246db7f31cd8acf59f3ba8ade2f11884d42d97fe
C++
larsbuntemeyer/tracy
/source/vector3d.h
UTF-8
926
3.203125
3
[]
no_license
//vector3d.h #ifndef _VECTOR3D_ #define _VECTOR3D_ #include <iostream> class vector3d { public: vector3d(void); vector3d(float x_in, float y_in, float z_in); ~vector3d(); float getLength(); void Normalize(); static float Dot(vector3d x, vector3d y); vector3d getNormalVect...
true
5dd11fd6fc2ac9d0d15a346d0461be9bfb140aba
C++
Mathematicator/Pokemon-
/Potion.h
WINDOWS-1252
1,061
2.65625
3
[]
no_license
/* * _ _ _ _ _ ___ _ _ _____ _ _ _ _ _ * | \_/ |/ \| \| | | o \/ \| |// __|| \_/ |/ \| \| | * | \_/ ( o ) \\ | | _( o ) (| _| | \_/ ( o ) \\ | * |_| |_|\_/|_|\_| |_| \_/|_|\\___||_| |_|\_/|_|\_| * Par: Lebbat badreddine */ #ifndef POTIO...
true
a5c953daaa8372c97c38ea57a6124256366389dc
C++
Akash16s/Simple-Maze-Solver
/Maze_Solver2.0.ino
UTF-8
10,930
2.703125
3
[]
no_license
const int trigPinF=13,echoPinF=12,trigPinR=11,echoPinR=10,trigPinL=9,echoPinL=8; //Ultrasonic Pins const int rightUp=7,rightDown=6,leftUp=5,leftDown=4; //Motor Pins int orientation=0; /* 0 ...
true
fc5bfc7563ede38091a35ae92f8b56d70db6369c
C++
iwiwi/bip2
/src/vc_solver/pre_reducer.cc
UTF-8
4,990
2.59375
3
[]
no_license
#include "common.h" #include "pre_reducer.h" namespace vc_solver { double pre_reducer::stat_time_total_ = 0; pre_reducer::pre_reducer(const vector<pair<int, int> >& original_edges, const vector<double>& original_weight) { original_edges_ = original_edges; original_weight_ = original_weigh...
true
69ff999a9635239c722464989b016bc391d8d8a3
C++
khm2034/baekjoonAlgorithms
/src/11000/test.cpp
UHC
34,643
2.609375
3
[]
no_license
//#include<iostream> //#include<string> //#include<memory.h> //#define QUEUESIZE 2505 //using namespace std; // //int R, C; //int map[51][51]; //int visit_w[51][51]; //int visit_s[51][51]; //struct qu { // pair<int, int> q[QUEUESIZE]; // int rear, front; // qu() { rear = front = 0; } // void push(int x, int y) // { //...
true
273820a37d315ce5b868f60c8e08c8adc9f9f092
C++
tensorflow/tensorflow
/tensorflow/tsl/platform/stringprintf_test.cc
UTF-8
3,785
2.625
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "BSD-2-Clause" ]
permissive
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. 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 a...
true
09b760c23494767f216856b2ace222721857de95
C++
SpringMT/intruduction_to_algorithms
/2_getting_started/LinearSearchRec.cc
UTF-8
880
3.65625
4
[]
no_license
#include <stdio.h> #include <iostream> #include <string> // http://www.geeksforgeeks.org/linear-search/ void printArray(int arr[], int n) { int i; for (i=0; i < n; i++) printf("%d ", arr[i]); printf("\n"); } void printInfo(std::string test, int n) { printf("[INFO] %s %d \n", test.c_str(), n); } int...
true
4a812ba7d950abfb342d66e449ce27a174e80331
C++
sebasluna/taller3
/Ctaller3IF.cpp
UTF-8
388
3.25
3
[]
no_license
//NOMBRE: Par o Impar //AUTOR: Luis Sebastian Urbano Luna //FECHA: //RESUMEN: Programa para saber si el numero es par o impar #include <iostream> #include <stdio.h> using namespace std; int main(){ int lNumero; printf("ingrese su numero\n"); scanf("%d",&lNumero); if(lNumero%2==0){ printf("el...
true
d3f212adf84f588c86f6a5008ab32efb8cac91df
C++
tonipes/swift-c-interop
/libraryx/libraryx.cpp
UTF-8
203
2.515625
3
[]
no_license
#include "libraryx.h" long factorial(long n) { long result = 1; for(int i = 1; i <= n; i++) { result = result * i; } return result; } long addFoo(Foo foo) { return foo.a + foo.b; }
true
3a0dcd4ac186fee2076f205d79b5465cf1fddfa0
C++
RyanAdamsGD/RayTracer
/RayTracer/ConvexPartCylinder.h
UTF-8
820
2.640625
3
[]
no_license
#ifndef CONVEXPARTCYLINER_H #define CONVEXPARTCYLINER_H #include "GeometricObject.h" class ConvexPartCylinder:public GeometricObject { BoundingBox bbox; BoundingBox createBoundingBox()const; float y0, y1, radius, inverseRadius, azimuthMin, azimuthMax; public: ConvexPartCylinder(void); ConvexPartCylinder(float y0,...
true
58f673b312c986af06da34018996278ea551fab3
C++
adityasunny1189/C-PlusPlus_Basics
/codingNinjas/Recursion/print_pattern.cpp
UTF-8
402
3.34375
3
[]
no_license
#include <iostream> using namespace std; int printPattern(int n) { if(n <= 0) { cout << n << " "; return n + 5; } cout << n << " "; int smallAns = printPattern(n - 5); cout << smallAns << " "; return smallAns + 5; } int main() { //code int t; cin >> t; while(t--) { int...
true
f07d2db1d45ccb2c5bf4eda39bf461361ed14941
C++
Ashna-Nawar-Ahmed/2nd-year-2nd-semester
/Algorithm Lab/Offlines/offline 7/bellmanford_anika.cpp
UTF-8
1,694
3.1875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int d[100],parent[100]; struct edge { int u,v,w; }; vector<edge> edges; void relax(int u,int v,int w) { if(d[v]>(d[u]+w)) { d[v]=(d[u]+w); parent[v]=u; } } void find_path(int des) { if(parent[des]==-1) return; else find_pa...
true
ab8b609cece1ac1149e9f257c607a129bf766294
C++
YichengZhong/Top-Interview-Questions
/665.非递减数列/checkPossibility.cpp
UTF-8
494
2.734375
3
[ "MIT" ]
permissive
class Solution { public: bool checkPossibility(vector<int>& nums) { int flag=0; for(int i=0;i<nums.size()-1;++i) { if(nums[i]<=nums[i+1]) continue; else { flag++; if(flag>1) return false; if (...
true
feefb0dc272390d0bb81dd773e5465ebdadbae02
C++
cstegmayr/bitsoccer
/src/Brick.cpp
UTF-8
8,175
2.796875
3
[]
no_license
#include "Brick.h" #include "Renderer.h" #include "Vec3.h" #include <string.h> // For memset #define _USE_MATH_DEFINES #include <math.h> namespace bitsoccer { Brick::Brick() : m_row(0) , m_col(0) , m_originX(0) , m_originY(0) { // initialize everything green for (int i = 0; i < Direction::NumDirections; ++i...
true
7072547229912c5916332d014b0b3fda0981b40b
C++
st3v3nmw/competitive-programming
/kattis/Repeated_Substrings.cpp
UTF-8
2,671
2.625
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; #define eol "\n" #define _(x) #x << "=" << to_str(x) << ", " #define debug(x) { ostringstream stream; stream << x; string s = stream.str(); cout << s.substr(0, s.length() - 2) << eol; } string to_string(basic_string<char>& x) { return "\"" + x + "\""; } string to_string(ch...
true
5555b7aa3e058d9eeaee94a3df4728aeecef4787
C++
DylanDjaw/algorithms4
/ch.1/1_3_1_7_evaluate.cc
UTF-8
1,603
3.828125
4
[]
no_license
#include <iostream> #include <vector> #include <stack> #include <string> using namespace std; //算数表达式计算示意版,仅支持全部运算带括号,操作数为个位数 double evaluate(string s){ if(s.size() <= 0){ cout << "wrong input" << endl; return -1; } //操作数 stack<double> nums; //运算符 stack<char> ops; double v; ...
true
38cba8ddc0323348ff061dfc86965f148bb8861a
C++
caozongli/Mempool
/MemPooling.cpp
UTF-8
2,639
3.390625
3
[]
no_license
#include <iostream> #include <cstdlib> #include <cstdio> using namespace std; struct LinkedPointer{ void* ptr; LinkedPointer* Next; }; class A { // virtual void test(); // virtual void test2(); // A():age(1), sex(true), bchild(false){} // void SetAge(int age) { this->age = age; ...
true
fb179a57646b2c8a1ac80ee588a9f301a16cfddc
C++
rajendrabaskota/data-structures
/generalPurpose.cpp
UTF-8
879
3.015625
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n, inp, x=0, y; cin >> n; vector<int> integers; vector<int> answer; for(int i=0; i<n; i++){ cin >> inp; integers.push_back(inp); } sort(integers.begin(), integers.end()); y = ...
true
4c92355d336ff2bbf8eb04f782e5a432b5de42a7
C++
COP3503-UF-Project-Team-3/Final-Project
/src/char-creator.cpp
UTF-8
1,340
3.59375
4
[]
no_license
#include "char-creator.h" #include <iostream> using namespace std; Player newChar() { cout << endl; cout << "Character Creation" << endl; // Declare a new `Player` object Player p(false); // Build the object field-by-field string name; cout << "Enter a name: "; cin >> name; p.name = name; // Choosing sta...
true
613958d449df74d11b5d73161da63e7315ce0b07
C++
supakritk/BitCars
/BitCars/Gameplay.cpp
UTF-8
2,784
2.90625
3
[]
no_license
#include "Gameplay.hpp" Gameplay::Gameplay() { } Gameplay::~Gameplay() { } void Gameplay::initialization(std::vector<std::string> &map) { this->setCurrentMap(map); this->addCar(); } void Gameplay::playGame(const int& key_input) { if (key_input != NO_INPUT) { this->addCar(); } this->moveAllCar(); } float ...
true
c5dea258d25bc69fe3acc897af5052fd39c56da0
C++
antbenar/Redes
/Chat/client.cpp
UTF-8
1,835
2.59375
3
[]
no_license
#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <string> #include <iostream> using namespace std; int create_client(){ struct sockaddr_in stSockAddr; ...
true
188684550718e36f03018fd1de50ff87cf374865
C++
j40903272/dsp2017
/hw3/dsp_hw3/test_env/mydisambig.cpp
UTF-8
3,143
2.671875
3
[]
no_license
#include <stdio.h> #include <string> #include <string.h> #include <vector> #include <iterator> #include <map> #include <Ngram.h> using namespace std; typedef map<string, vector<string> > MAP; typedef struct{ int idx; string str; double prob; }DPNode; inline vector<string> sentence_preprocess(char buf[]){ vector<s...
true
049ca971a09195524fddda83451e69ae80ec0692
C++
NaSchkafu/univermec
/inc/objects/param/paramtapertrans.hpp
UTF-8
1,431
2.515625
3
[]
no_license
#ifndef __PARAMTAPERTRANS_HPP__ #define __PARAMTAPERTRANS_HPP__ #include "../iparamtrans.hpp" namespace objects { namespace details { /// Tapering transformation for parametric surfaces /** * * */ template<typename T> class ParamTaperTrans : public IParamTrans { public:...
true
0d920809d24fd178cac16e2c510a7936a3dc7e8f
C++
ClawmanCat/FP2
/semifunctional/functional.hpp
UTF-8
2,687
3.296875
3
[]
no_license
#pragma once #include <cstddef> #include <functional> #include <array> #define fwd(x) std::forward<decltype(x)>(x) #define lam(var, ...) [&](var) { return __VA_ARGS__; } #define generic(fn) [](auto&&... args) { return fn(fwd(args)...); } #define compare_as(name, ...) [&](const auto& a, const auto& b) { \ ...
true
3866aaf656ba97aee1d19cec394933ea994f8315
C++
scabsy/ICT398-Milestone-2
/SlashStudios/GameObject.cpp
UTF-8
3,809
2.625
3
[]
no_license
#include "GameObject.h" #include <iostream> GameObject::GameObject() { //node = 0; } GameObject::GameObject(path modelPath, vector3df position, vector3df rotation, float scale, bool createCollision, ISceneManager* smgr) { node = 0; node = (IAnimatedMeshSceneNode*)smgr->addAnimatedMeshSceneNode(smgr->getMesh(model...
true
1e70e8909720a80eba3f4e9e5de0bb122cfe3409
C++
UnknownFreak/OneFlower
/Project/File/CfgParser.cpp
UTF-8
3,158
2.875
3
[]
no_license
#include "CfgParser.hpp" #include <Module/Logger/OneLogger.hpp> namespace File::Resource::Config { ConfigParser::ConfigParser() { } ConfigParser::ConfigParser(const Core::String& configFile) { load(configFile); } void ConfigParser::comment(const Core::String& comment) { sections[comment] = {}; } void...
true
b83ee573a47845378093b9c83e6a535477892fb3
C++
vivekmaurya1505/CPP
/CPP/Codes/Day1/4.2 function overloading case2 .cpp
UTF-8
473
3.875
4
[]
no_license
#include<stdio.h> //Function having same name and same number of arguments but //differs in type of arguments int sum(int n1, int n2) // sum@@int, int { return n1+n2; } float sum(int n1, float n2) // sum@@int, float { return n1+n2; } int main(void) { int result=0; float result1=0; result= sum(10, 20); // sum@@i...
true
b6590ec701365f0f0eedfaa7c21cd1cf2427d751
C++
fry1999/Spoj-ptit
/PTIT136C.cpp
UTF-8
272
2.546875
3
[]
no_license
#include<iostream> using namespace std; int main(){ long n, a[101][101]; cin>>n; for(int i=1; i<=n ; i++){ for(int j=1; j<=n; j++){ cin>>a[i][j]; } } long x=(a[1][2] + a[1][3] - a[2][3])/2; cout<<x<<" "; for(int i=2; i<=n; i++){ cout<<a[1][i]-x<<" "; } }
true
2f72eaf15a41671dde31a36b6740fba2841a31c9
C++
Dhrubajyoti12/interviewbit-problems
/Heaps And Maps/lru-cache.cpp
UTF-8
967
3.171875
3
[]
no_license
#include<list> #define NOT_FOUND -1 struct item{ int key; int value; item(int k, int v): key(k), value(v) {} }; list<item> *lee; unordered_map< int, list<item>::iterator > *hmap; int cap; LRUCache::LRUCache(int capacity) { cap = capacity; lee = new list<item>; hmap = new unordered_map<int, list<item>::iterator...
true
b4012f965c4061004886f93be33821d5ff464ec9
C++
arthurherbout/crypto_code_detection
/data/crypto-competitions/files/main.cpp
UTF-8
5,325
2.984375
3
[]
no_license
#include <string.h> #include <iostream> #include "keccak.h" #include "gambit.h" /* DISCLAIMER * This is NOT a reference implementation! * This is a quick and dirty implementation. The software is not thoroughly * tested, and not at all tested on platforms other than Intel x86, * Windows OS, and CodeBlocks/GNU comp...
true
5ef2bce6e0ef8c8192cc7415a7ada8d014903abb
C++
IronyGames/LudumDare38
/CinderProject/include/StaticGardenGoalLogic.h
UTF-8
539
2.640625
3
[]
no_license
#pragma once #include "IGardenGoalLogic.h" class StaticGardenGoalLogic : public IGardenGoalLogic { public: StaticGardenGoalLogic( boost::optional<CoordsInt> seedPosition_, std::vector<CoordsInt> occupiedPositions_, std::string entityType_ ); boost::optional<CoordsInt> getSeedPosition() const override; std::vecto...
true
98a74bb58b68421a94e1ec3a63360b50e59999be
C++
log0div0/coro
/coro_test/TestStrandPool.cpp
UTF-8
1,593
3.03125
3
[ "MIT" ]
permissive
#include <atomic> #include <catch.hpp> #include "coro/StrandPool.h" using namespace coro; TEST_CASE("StrandPool::cancelAll", "[StrandPool]") { StrandPool pool; pool.exec([] { Coro::current()->yield({TokenThrow}); }); pool.exec([] { Coro::current()->yield({TokenThrow}); }); pool.cancelAll(); REQUIRE_NOTHR...
true
2b4a8a301f69e7b1728a3cd4d163f1aa92ac48bf
C++
f26401004/UVA_practice
/uva10986.cpp
UTF-8
1,855
3.34375
3
[]
no_license
#include <iostream> #include <queue> #define INF 2000000 using namespace std; typedef struct Edge { int start; int end; int cost; struct Edge* next; } edge; typedef struct EdgeNode { struct Edge* next; } edgenode; int n, m, start, target; edgenode* edges[20005]; int dist[20005]; void init() { for (int i = 0 ;...
true