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
27d789b45eefb2871c84b9cecd9a93e261cf0000
C++
yashkapoor007/geeksforgeeks
/linkedList_29.cpp
UTF-8
1,450
3.453125
3
[]
no_license
#include<set> Node *removeDuplicates(Node *root) { unordered_set<int> s; Node* current=root; Node* prev=NULL; while(current) { if(s.find(current->val)!=s.end()) { prev->next=current->next; delete current; } else { s.insert(current->val)...
true
e5098e9b501e53c1edec222a0b0906889f7c7757
C++
etsangsplk/burgerlib
/source/windows/brcriticalsectionwindows.cpp
UTF-8
7,569
2.703125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT", "LicenseRef-scancode-warranty-disclaimer", "Zlib" ]
permissive
/*************************************** Class to handle critical sections Copyright (c) 1995-2017 by Rebecca Ann Heineman <becky@burgerbecky.com> It is released under an MIT Open Source license. Please see LICENSE for license details. Yes, you can use it in a commercial title without paying anyt...
true
ea989acf3759833abc91429d3c7af00c11ac4f55
C++
kdwhan/2015-1.DataStructure
/lab_05_Circular_Queue/main.cpp
UTF-8
750
3.078125
3
[]
no_license
#include "lab005.h" #include "lab.hpp" template <class T> Queue<T>::Queue(int queueCapacity) : capacity(queueCapacity) { if(capacity < 1) throw "Queue capacity must be > 0"; queue = new T[capacity]; front = rear = 0; } int main() { Queue<int> q(7); while(1) { cerr << "Queueop > " << endl; char command[...
true
b5cbf661002916f9c2bcb5e78600927d6b72cd1d
C++
wickedZone/ED-2020
/cpp/08_operador_asignacion/Test3.cpp
UTF-8
586
2.78125
3
[]
no_license
/* * --------------------------------------------------- * ESTRUCTURAS DE DATOS * --------------------------------------------------- * Manuel Montenegro Montes * Facultad de Informática * Universidad Complutense de Madrid * ---------------------------------------...
true
1abe0c483cfac7383137a38e83ca46de0fe3f4a0
C++
quadmotor/Superpixel_QEM
/Superpixel_QEM/processing.cpp
UTF-8
8,396
2.5625
3
[]
no_license
#include "processing.h" #include "optimizer.h" #include "partition.h" #include <fstream> #include <unordered_map> using namespace std; using namespace cv; extern Image input_image; extern Optimizer * optimizer; extern Partition* tess; extern int nClusters; extern int * valid_mapping; extern string init_mesh_name; Post...
true
63e4502e536602b3a5557bbf15c3afe2e5ac89bf
C++
SpartanJ/eepp
/src/eepp/system/platform/win/threadimpl.cpp
UTF-8
1,327
2.71875
3
[ "MIT" ]
permissive
#include <eepp/core/debug.hpp> #include <eepp/system/platform/win/threadimpl.hpp> #include <eepp/system/thread.hpp> #include <iostream> namespace EE { namespace System { namespace Platform { #if EE_PLATFORM == EE_PLATFORM_WIN UintPtr ThreadImpl::getCurrentThreadId() { return ( UintPtr )::GetCurrentThreadId(); } Th...
true
2b74cc8749718c41ef3be14fa16d5fa90278e260
C++
der3318/fs-snapshotcmp
/ColorPrinter.h
UTF-8
392
2.8125
3
[]
no_license
#pragma once #include <string> namespace Der3318FileSystemComparison { enum class ConsoleColor { Black = 0, White = 15, Blue = 1, Green = 2, Red = 4, Yellow = 14 }; class ColorPrinter { public: static void Print(std::s...
true
73556c5ad2fb92b2234dce060a91d829ec701378
C++
Zahidsqldba07/competitive-programming-2
/algorithm/bfs.cpp
UTF-8
1,605
3.046875
3
[ "MIT" ]
permissive
#include "iostream" #include "stdio.h" #include "stdlib.h" #include "string" #include "string.h" #include "algorithm" #include "math.h" #include "vector" #include "queue" #include "stack" #include "deque" using namespace std; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; const int inf = 1e...
true
4f70084e1a5446df1ff9b1ab9bf22af7fddc9a69
C++
alelevinas/Inventario
/Common/common_AreaDeVision.cpp
UTF-8
2,305
2.765625
3
[]
no_license
/* * common_AreaDeVision.cpp * * Created on: Jun 9, 2015 * Author: leandro */ #include "common_AreaDeVision.h" using common::Producto; namespace common { unsigned long int AreaDeVision::proximoID; AreaDeVision::AreaDeVision(unsigned long int id,const std::string& ubicacion, const std::string& tipoDeCapt...
true
072e3df878a61e21e76262fb527985fa40704faf
C++
chiahsun/problem_solving
/Algospot/JLIS/solve1.cc
UTF-8
2,013
2.75
3
[]
no_license
#include <cstdio> #include <vector> #include <algorithm> const bool debug = !true; const int M = 100+5; int A[M], B[M]; int merge_list(const std::vector<int> & v1, int sz1, const std::vector<int> & v2, int sz2) { std::vector<int> v; int size = 0, last = -(1 << 29); for (int pos1 = 0, pos2 = 0; pos1 < sz1 ...
true
1bd4e6d6c6b0609540198ac00a4b7067d0c144d3
C++
cos18/baekjoon
/10973.cpp
UTF-8
480
2.71875
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); vector<int> v; int N, tmp; cin >> N; for(int i=0; i<N; i++){ cin >> tmp; v.push_back(tmp); } bool h = prev...
true
e44159f5ec2ea5d030894be31358c12dcdf81ba4
C++
corwinjoy/database-template-library
/example/StoredProc.h
UTF-8
2,257
2.703125
3
[ "LicenseRef-scancode-other-permissive" ]
permissive
// stored proc examples #ifndef _STORED_PROC_H #define _STORED_PROC_H #include "example_core.h" #if 0 class StoredProcBCA { public: void operator()(BoundIOs &cols, variant_row &row) { cols[0] >> row._int(); cols[1] >> row._string(); cols[2] >> row._string(); cols.BindVariantRow(row); } }; #endif class Ge...
true
15a86311e497255b7c3e165f25bd38038baaf5f2
C++
kashyapiitd/AlgorithmAndDataStructure
/insertionSortAnalysis.cpp
UTF-8
2,025
3.390625
3
[]
no_license
#include <vector> #include <string> #include <algorithm> #include <utility> #include <stdlib.h> #include <iostream> using namespace std; #define MAX_ELEMENTS 10000000 void computeNPasses(vector<int>& input){ int nPasses = 0; for (int i = 0; i < input.size();i++){ int sample = input[i]; int j...
true
12cf8186ebaac85a277fede923e1cfdef98ba27b
C++
TobiasSchulte/VADS---Dynamischer-De-Bruijn-Graph
/src/Helpers.cpp
UTF-8
447
2.984375
3
[]
no_license
void itoa(int n, char s[]) { int i, sign; if ((sign = n) < 0) /* record sign */ n = -n; /* make n positive */ i = 0; do { /* generate digits in reverse order */ s[i++] = n % 10 + '0'; /* get next digit */ } while ((n /= 10) > 0); /* delete it */ if...
true
e238dae96c00acd842f544cec650c8f7d9703ba1
C++
Monster88Ra/RayTracer
/trunk/RayTracer/RayTracer/include/math/Vector2.h
UTF-8
4,777
3.671875
4
[ "MIT" ]
permissive
#pragma once #include <cstdint> #include <cmath> #include <iostream> #include <stdexcept> /***************************** * Class of the 2D vector. ******************************/ template <typename T> class Vector2 { public: Vector2(); Vector2(T X); Vector2(T X, T Y); ~Vector2(); template<t...
true
6af4c5157872dc602a15cc9ea6c5ce2adeb7914c
C++
alanlyyy/CPP_Primer_Elementary
/ch9/Date.cpp
UTF-8
2,461
3.71875
4
[]
no_license
#include <string> #include <iostream> #include <vector> struct Date { Date(std::string s) { //format 1: January 1 1900 , currently handles format 1 //format 2: 1/1/1900 //format 3: Jan 1, 1900 int start = 0; int current = start; std::vector<std::string> months_abrv = { "Jan", "Feb", "Mar", "Apr", "May", "Ju...
true
5d6516343e80d48151818e9b3211aaff9175a562
C++
saadjaliawala/c-practices
/switch/main.cpp
UTF-8
348
3.046875
3
[]
no_license
#include <iostream> using namespace std; int main() { int age = 16; switch (age){ case 16: cout << "a" << endl; break; case 17: cout << "b" << endl; break; case 18: cout << "c" << endl; break; case 19: cout << "d" << endl; break; default : cout << "yo...
true
f0502a1a9ae27c9feb1610531808c3d9297c80ce
C++
amanpratapsingh9/Data_Structures_Coding_Ninjas
/Graphs-1/Adjaceny_List_vector.cpp
UTF-8
758
3.25
3
[]
no_license
#include<iostream> #include<string> #include<string> #include<bits/stdc++.h> using namespace std; void addEdge(vector<int> adj[], int u, int v) { adj[u].push_back(v); adj[v].push_back(u); } void printGraph(vector<int> adj[], int V) { for(int i=0;i<V;i++) { cout << "Adjaceny List for vertex " << i << " is " <...
true
9662053f4fce8f7fbd612efe95f9ff268e70e5c0
C++
lineCode/acl
/includes/acl/core/memory.h
UTF-8
10,992
2.75
3
[ "MIT" ]
permissive
#pragma once //////////////////////////////////////////////////////////////////////////////// // The MIT License (MIT) // // Copyright (c) 2017 Nicholas Frechette & Animation Compression Library contributors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and asso...
true
a199ca50691519bdb0544eed67f33a421e6b170c
C++
breakds/monster-avengers
/cpp/utils/jewels_query.h
UTF-8
13,302
2.59375
3
[ "MIT" ]
permissive
#ifndef _MONSTER_AVENGERS_UTILS_JEWELS_QUERY_ #define _MONSTER_AVENGERS_UTILS_JEWELS_QUERY_ #include <array> #include <vector> #include <utility> #include <unordered_set> #include <unordered_map> #include "dataset/dataset.h" #include "utils/filter.h" #include "utils/signature.h" namespace monster_avengers { using da...
true
491ac5ce32771c7c5a4dd04329249cd565690c38
C++
zchambers3/CST-201
/Week 2/Final Submission CLC/RemoveNodeDBL.cpp
UTF-8
1,499
3.78125
4
[]
no_license
/* * RemoveNode.cpp * * Created on: Mar 18, 2018 * Author: Caleb Miller */ #include <stdio.h> #include <tchar.h>#include <iostream> #include <string> #include <stdlib.h> using namespace std; struct Node { int data; struct Node *next; struct Node *prev; }; void deleteNode(struct Nod...
true
ac82036cec0f24eb38a717a98df306007d1f153d
C++
gazdik/l2-mitm-attack
/pcap.cpp
UTF-8
2,580
2.515625
3
[]
no_license
/** * Author: Peter Gazdík <xgazdi03(at)stud.fit.vutbr.cz> * * Date: 15/04/17 */ #include "pcap.h" #include <stdexcept> #include <iostream> using namespace std; namespace pds { pcap::pcap(const char *interface, int timeout, bool promisc) : _interface { interface } { init(timeout, promisc); } pcap::~pc...
true
fd359f656552597510e50a0d79c8e53c40578578
C++
kizza/sensor
/lib/internet/internet.cpp
UTF-8
449
2.53125
3
[ "Apache-2.0" ]
permissive
#include "WiFi.h" #include "internet.h" #include "promise.h" std::function<Context (Context)> initWiFi(const char* ssid, const char* password) { delay(10); Serial.printf("Connecting to %s..", ssid); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } ...
true
587c9c04e614be00787eb6d4cebc81f9a4496090
C++
liubincodelife/DataStructureTasks
/T01_01_ArrayStack/ArrayStack.cpp
UTF-8
887
3.640625
4
[ "Apache-2.0" ]
permissive
#include <iostream> #include "ArrayStack.hpp" using namespace std; int main(int argc, char** argv) { ArrayStack<int> arrayStack(10); cout << "push data into stack:" << endl; for (int i = 1; i <= 10; i++) { arrayStack.push(i); cout << i << " "; } cout << endl; if (array...
true
06b4e59b68cc352c585e369836be263b546cb6a8
C++
george-hinkel/MICE_TeamA
/scoop.cpp
UTF-8
460
2.734375
3
[]
no_license
#include <sstream> #include "scoop.h" Scoop::Scoop(std::string name,std::string description,double wholesale_cost,double retail_price,int initial_stock,std::string image_file_path) : Item(name,description,wholesale_cost,retail_price,initial_stock,image_file_path){ _type="scoop"; } std::string Scoop::to_string(){ std...
true
b13c838ea7dd5757fe42e49743bb1fae3d075aae
C++
sophialundstrom/3D-Project
/Project/Random.h
UTF-8
413
3.03125
3
[]
no_license
#pragma once #include <random> struct Random { static float Real(float min, float max) { std::random_device rd; std::mt19937 mt(rd()); std::uniform_real_distribution<float> value(min, max); return value(mt); } static int Integer(int min, int max) { std::random_device rd; std::mt19937 ...
true
616207bdda24a89be2f7c9845ebc32b2682a4584
C++
ha-k-pg-mori/ProductionShooting
/Shooting/Src/Player.cpp
UTF-8
2,247
2.53125
3
[]
no_license
#include "Player.h" #include "InputManager.h" #include "Definition.h" #include "../Src/Manager/BulletManager.h" Player::Player() { Player::Pos = Vec2(100.0f, 200.0f); Player::Speed = 2.0f; Player::AnimationFrameCounter = 0; Player::AnimationId = 0; Player::counter = 0; } Player::~Player() { } void Player::...
true
6e4642e0a6abcb3aa50e4f4c717e41131ff8be1d
C++
ecorman/WiiWhiteboard
/Warper.cpp
UTF-8
7,953
2.75
3
[ "Unlicense" ]
permissive
// Warper.cpp // Implements the Warper class representing the engine that turns Wiimote coords into screen coords, based on calibration #include "Globals.h" #include "Warper.h" #include "Calibration.h" static const Warper::Matrix::Number EPS = static_cast<Warper::Matrix::Number>(0.00001); //////////////...
true
c5d52b434e0d22785a34b67f10f4463c4fbd4742
C++
heegyubaek/algorithm
/sort/recursive.cpp
UTF-8
321
3.234375
3
[]
no_license
#include <iostream> using namespace std; void printA(int n, int i) { if(i == 7) { return ; } int a = n; while(a!=0) { cout << i; a--; } cout << endl; return printA(n,i+1); } int main() { int n = 0; cin >> n; cout << "input value is "<< n << endl; int i = 1; printA(n, i); return -1; } ...
true
ba99ba7128d171e272175c93e506b2daf5378816
C++
ljjj/PlayGround
/LeetCode/76. Minimum Window Substring.cpp
UTF-8
2,260
3.078125
3
[]
no_license
class Solution { public: string minWindow(string s, string t) { // build hash map for last positions of characters in T, each character key maps to a value of deque unordered_map<char, deque<int>> last_pos; for (const auto & c : t) { if (last_pos.find(c) != last_pos.end()) last_p...
true
9ea0a7513004160f68ee0e917a39a19ba5c2c162
C++
charliemmao/Intranet
/include/php/java/chkgoods.inc
UTF-8
2,639
2.59375
3
[]
no_license
<html> <script language=javascript> function chkgoods() { var msg; var i,j,target; msg = itembyitem(); if (msg != "") { alert("Please check following field(s) for item 0:\n\n" + msg + "\n\nCheck and resubmit."); return false; } for (i=1; i<100; i++) { target = document.all("name" + i.toString()); if (tar...
true
b7525d4fb2b9d353a8e99d05bc4a1339182b7b8a
C++
VladislavSchastnyi/lab13.11.17
/1.cpp
UTF-8
430
2.984375
3
[]
no_license
#include <iostream> using namespace std; int main(){ int n, m; cout << "Vvedite razmer massiva" << endl; cin >> n; if (n <= 0) { cout << "error" << endl; return 1; } cout << "" << endl; int *a = new int [n]; for (m = 0; m < n; m++) { cin >> a[m]; } for (m = 0; m < n / 2 ; ...
true
13af8a4c236307c7f1bbe2cc1372198151a71127
C++
prop-cc/prop-cc
/include/AD/contain/nsqarray.h
UTF-8
3,731
2.921875
3
[ "BSD-2-Clause" ]
permissive
////////////////////////////////////////////////////////////////////////////// // NOTICE: // // ADLib, Prop and their related set of tools and documentation are in the // public domain. The author(s) of this software reserve no copyrights on // the source code and any code generated using the tools. You are encourag...
true
15cbae90129fbfa5e97aeb559ab720049254ede6
C++
dkoguciuk/thin_drivers
/thin_xsens/mtsdk/xcommunication/include/serialinterface.h
UTF-8
2,571
2.578125
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
#ifndef SERIALINTERFACE_H #define SERIALINTERFACE_H #include "streaminterface.h" #include <xsens/xsplatform.h> #include <xsens/xsmessage.h> #include <xsens/xsbaud.h> #include <xsens/xscontrolline.h> struct XsPortInfo; ////////////////////////////////////////////////////////////////////////////////////////...
true
301998ee75f1b29d451632eefe018c3317a1490e
C++
Inx3x/Bomberman
/Bomberman/Item.cpp
BIG5
1,309
2.671875
3
[]
no_license
#include "Item.h" #include "DoubleBuffer.h" Item::Item() { } Item::~Item() { } void Item::Initialize() { switch (rand()%4) { case BOMBPOWERUP: Texture[0] = (char*)""; Texture[1] = (char*)"++BP++"; Texture[2] = (char*)""; ItemList = BOMBPOWERUP; break; case BOMBPOWERDOWN: Texture[0] = (char*)""; Tex...
true
638d5c1a5fb5e3d4d1fe887ecf7fdc2e292bbde5
C++
liqiang1304/leetcode
/median_of_two_sorted_arrays.cpp
UTF-8
957
3.25
3
[]
no_license
#include <iostream> using namespace std; class Solution{ public: double method(int A[], int m, int B[], int n){ int total = m + n; if(total&1){ return find_kth(A,m,B,n,total/2+1); }else{ return (find_kth(A, m, B, n, total/2) + find_kth(A, m, B, n, total/2+1))/2.0; } } int find_kth(int A[], in...
true
29b955041bb74734e2b43047515fa6df31b6fdaf
C++
ghostincircuit/leetcode
/n_queens.cpp
UTF-8
1,746
2.921875
3
[ "BSD-2-Clause" ]
permissive
#include <iostream> #include <vector> #include <string> using namespace std; class Solution { public: vector<int> pos; int lim; vector<vector<string> > ret; void helper(int level) { if (level == lim) { vector<string> vs(lim, string(lim, '.')); ...
true
5dafbe3ab1710c700c0858495ffa471dff8050ad
C++
Jereq/PongOut
/PongOut_Server/ComLib/Chat.cpp
UTF-8
1,135
2.796875
3
[]
no_license
#include "stdafx.h" #include "Chat.h" Chat::Chat(void) : msgBase(msgBase::MsgType::CHAT) { } Chat::~Chat(void) { } void Chat::setMsg( std::string _msg, unsigned int _id, std::string _userName) { id = _id; msg = _msg; user = _userName; msgHeader.length = msg.length() + user.length() + (sizeof(std::uint16_t) * 2)...
true
9ab3126bd5a03f18771fb2b21f3ae2def057b9bd
C++
piochelepiotr/minecraftClone
/src/toolbox/mousepicker.h
UTF-8
1,149
2.671875
3
[]
no_license
#ifndef MOUSEPICKER_H #define MOUSEPICKER_H #include <glm/glm.hpp> #include "entities/camera.h" #include "world/world.h" #define MAX_DISTANCE_BLOCK 30 class MousePicker { public: MousePicker(Camera *camera, World *world, glm::mat4 const& projectionMatrix, double windowX, double windowY); glm::vec3 currentRay(...
true
d1a1e3e2548c4bb6e69f0a2a5746a322aecb63f9
C++
Bo-Xinmin/Computational-Grid
/Curvebase.h
UTF-8
750
2.734375
3
[]
no_license
// SF2565; Program Construction in C++ for Scientific Computing // Jonathan Ridenour & Martin Björnmalm // Project 3 #ifndef CURVEBASE #define CURVEBASE class Curvebase{ friend int main(); protected: //starting point double a; //ending point double b; //displacement from origo double m; ...
true
ebf343207728ac537e0757efc992510b915f6648
C++
jpike/GalacticEggSnatchers
/GalacticEggSnatchers/src/Objects/EasterEgg.h
UTF-8
3,321
3.109375
3
[ "Zlib" ]
permissive
#pragma once #include <cstdint> #include <memory> #include <SFML/Graphics.hpp> #include "Graphics/IRenderable.h" #include "Objects/IGameObject.h" #include "Physics/Collisions/ICollidable.h" namespace OBJECTS { //////////////////////////////////////////////////////// /// @brief An Easter egg. Easter eggs are...
true
7a80180f3e6750fc90cea95a8447d6752c2cfbde
C++
wojtekblack/KrakJamCandy
/KrakJam2013/main.cpp
UTF-8
1,617
2.703125
3
[]
no_license
#include "pch.hpp" #include "SampleScreen.hpp" #include "MenuScreen.hpp" #include "GameScreen.hpp" sf::RenderWindow window; ScreenManager screenManager; MenuScreen menuScreen; GameScreen gameScreen; const float ONE_SIXTIETH = 1.0f / 60.0f; int main(void) { screenManager.AddScreen(menuScreen); screenManager.Ad...
true
170c9239d2b57ad1e8f546d7652ed1ff970f2db5
C++
alemontejolp/shipgame
/Cabeceras/Nave_Enemiga.hpp
UTF-8
1,715
2.6875
3
[]
no_license
#ifndef NAVE_ENEMIGA_HPP #define NAVE_ENEMIGA_HPP #include "../Cabeceras/Naves.hpp" class Nave_Enemiga : public Naves{ public: Nave_Enemiga(void){} Nave_Enemiga(int _vidas, int _x, int _y); ~Nave_Enemiga(void){} //Métodos. void inicializar(int, int, int); /* *Hace la funcion del construct...
true
f048dd6ba435853237a1b55102d2d4838ae67ffb
C++
sanuguladurgaprasad/Codes
/templates/deque front.cpp
UTF-8
375
3.03125
3
[]
no_license
// deque::front #include <iostream> #include <deque> using namespace std; int main () {char t; deque<int> mydeque; mydeque.push_front(77); mydeque.push_front(17); mydeque.push_back(16); mydeque.push_back(43); mydeque.front() -= mydeque.back(); cout<<"mydeque is now \n" ; for(int i=0;i<mydeque.size();i++) ...
true
4bae7e23f9b795af9905c63caf0cea8b5a103458
C++
zhsrl/PP1
/week10/G2/4.cpp
UTF-8
248
2.796875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main(){ vector<int> v; v.push_back(5); v.push_back(7); v.push_back(2); v.push_back(10); v.empty() <=> v.size() == 0 cout << v.empty() << " " << v.size(); return 0; }
true
f0ad243693aa1bdea615b20c77e7a9da15ff0cf1
C++
lovenery/Algorithmics
/UVa/11039-Building-designing.cpp
UTF-8
2,922
3.53125
4
[]
no_license
// UVa 11039 - Building designing // 更聰明的方法 : http://blog.csdn.net/yucan1219/article/details/23655173 #include <iostream> #include <algorithm> using namespace std; void building(int *b, int length) { // splice to two array int *blue = new int[length]; int *red = new int[length]; int num_blue = 0, num_r...
true
978516ad957f7e791b1be923b0c9aeffc42a87fc
C++
keserasera77/Bonberman
/Bomberman/Bomberman/State.h
SHIFT_JIS
1,099
2.71875
3
[]
no_license
#pragma once namespace Sequence { namespace Game { class Parent; } } class Player; class Image; class Object; class Bomb; template<class T> class Array2D { public: Array2D() : mArray(0),mWidth(0),mHeight(0){} ~Array2D() { delete[] mArray; mArray = 0; } void setSize(int width, int height) { mWidth = width;...
true
71d4d96374b6435de4e0a10ad5fec89a9695ff5e
C++
spencerwooo/exp2-process-control
/Linux/ChildProcess.cpp
UTF-8
225
2.9375
3
[ "MIT" ]
permissive
#include <iostream> #include <unistd.h> using namespace std; int main(int argc, char const *argv[]) { char name[10] = "武上博"; cout << "Hi, my name is " << name << endl; // 延时三秒 sleep(3); return 0; }
true
485197b930825842287cae0b2529a719ecc0a84f
C++
dwmize98/Public_Work
/Artificial_Intelligence/Resolution_Refutation/resolution.cpp
UTF-8
3,297
2.984375
3
[]
no_license
#include <cstdlib> #include <cstdio> #include <iostream> #include <fstream> #include <vector> #include <string> #include <queue> #include "parser.hpp" #include "helpers.cpp" using namespace std; //overload operator for priority queue bool operator<(const ResPair& a, const ResPair& b) { return a.score > b.score; ...
true
56c1e37299c61262fbc68256b4a351f55b74df07
C++
link852258/INF3105TP2
/tableau.h
UTF-8
5,854
3.703125
4
[]
no_license
/* Squelette pour classe générique Tableau<T>. * Lab3 -- Tableau dynamique générique * UQAM / Département d'informatique * INF3105 - Structures de données et algorithmes * http://ericbeaudry.uqam.ca/INF3105/lab3/ */ #if !defined(_TABLEAU___H_) #define _TABLEAU___H_ #include <assert.h> template <class T> class T...
true
f2a5a0e30c87ed0b0a8aaa899b20df6cacdcbcaa
C++
gzachv/IntroToC
/p2/SortedList.cpp
UTF-8
4,257
3.59375
4
[]
no_license
/******************************************************************************* Author: Gustavo Zach Vargas CS Login: gustavo Pair Partner: <name of your pair programming partner (if applicable)> CS Login: <your partner's login name> Credits: <name of anyone (other than your pair programming ...
true
dfaa601077c47cfbc4adc81b2af9d30525bd9e81
C++
cuiy0006/THE-C-PROGRAMMING-LANGUAGE
/C5/5-5/str_op.cc
UTF-8
701
3
3
[]
no_license
#include "str_op.h" #include "stdio.h" char *strncpy_p(char *dest, const char *src, size_t n){ for(size_t i = 0; i < n && *src; ++i){ *dest++ = *src++; } *dest = '\0'; return dest; } char *strncat_p(char *dest, const char *src, size_t n){ while (*dest){ ++dest; } for(size_t...
true
054832853e2c6d506da78c2fc97d287ea1d64fd9
C++
MartiHui/GSDAM_Fichaje_Plantilla
/Admin_Fichaje_Plantilla/source/actionjson.cpp
UTF-8
5,173
2.625
3
[]
no_license
#include <QJsonArray> #include <QJsonObject> #include <QJsonValue> #include <QDebug> #include "actionjson.h" ActionJson::ActionJson(QString json) { m_json = QJsonDocument::fromJson(json.toUtf8()); setActionType(); } void ActionJson::setActionType() { QJsonValue action = m_json.object()["action"]; if...
true
183d0eafb2994a0bd4ae6cbe16ea621f6a1497ad
C++
r03er7/algorithms
/[Code] algorytmika praktyczna/Programy_bez_komentarzy/programy_bez_komentarzy/covertree.cpp
UTF-8
1,952
2.515625
3
[]
no_license
#include <cstdio> #include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; typedef vector<int> VI; typedef long long LL; #define FOR(x, b, e) for(int x = b; x <= (e); ++x) #define FORD(x, b, e) for(int x = b; x >= (e); --x) #define REP(x, n) for(int x = 0; x < (n...
true
d6cd55460aa4d18794bcdac3e4166e7da17ca001
C++
ndzik/coinwalletoverview
/src/walletfactory.cpp
UTF-8
892
2.734375
3
[ "MIT" ]
permissive
#include "walletfactory.hpp" namespace cwo { Walletfactory Walletfactory::url(std::string url) { _url = url; return *this; } Walletfactory Walletfactory::address(std::string address) { _address = address; return *this; } Walletfactory Walletfactory::cryptotype(CRYPTOTYPE t) { _cry...
true
f48f80ae244d6713c4f6973a0f6bfe0ae291d099
C++
rahulsharma9898/math-problem-solver
/project1.cpp
UTF-8
15,008
3.890625
4
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main() { double pie = 3.14; std::cout << "\nEnter 1 if question is related to Circle." << std::endl; std::cout << "Enter 2 if question is related to Square." << std::endl; std::cout << "Enter 3 if question is related to Tria...
true
80d1a461ea68b502fa3d2e4274f30dd6921bdfae
C++
sarthakm1011/c_plus_plus
/LRU_cache_implementation.cpp
UTF-8
1,189
3.609375
4
[]
no_license
// STL container is used as double ended queue to store the cache // keys from descending time of reference from front to back and set // container to check the presence of the key. But to fetch the address // of the key using find it takes O(N) time. This can be optimized by storing // reference to each key in hash ma...
true
84c2efc85d6f4a13b1bfc0f968a82d5101428dee
C++
srcpls/gala.go
/core/board/group/ group.cpp
UTF-8
1,946
3.546875
4
[]
no_license
// // gala.go // group.cpp // #include "group.hpp" group::group(int color) { this->color=color; numofcoordinates=0; } group::~group() { } void group::addcoordinate(coordinate c) { std::cout<<"when addcoordinate, coordinate c: i:"<<c.i<<" j:"<<c.j<<std::endl; std::cout<<"when addcoordinate, numo...
true
4e04b4805c8280468cdbc103fe0b0a64f3b2d618
C++
mmason930/kinslayer-mud
/src/threaded_jobs.cpp
UTF-8
2,758
2.859375
3
[]
no_license
/******************************************************************** * threaded_jobs.cpp - Implements the ThreadedJobsManager class * * This file is responsible for handling various jobs * * which require multithreading. * * Added by Galnor in April of 2010 (Sortak@gmail.com) * * ...
true
315e8355d0c80b01514d116c977a1ed0c90fd836
C++
HelloGit2309/Codelines-1
/Tasks/TASK 1/solution.cpp
UTF-8
1,363
3.125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; const long long int mod = (1<<64); const int p=22; //takes a string and returns a vector which containts the hash values //v[0] = hash(substr(0,1)) //v[1] = hash(substr(0,2)) //v[2] = hash(substr(0,3)) .... and so on vector <long long int> computeHash(char *str) { vector...
true
e0e8984d467ee3c7bea3465e884c2a904688d35c
C++
ruudstaal/myproject
/Project/befc/mio/cards/AI/DMS202.hpp
UTF-8
3,426
2.5625
3
[]
no_license
/** ******************************************************************************** * @file DMS202.hpp * @author Patrick * @version $Revision: 000 $ * @date $LastChangeDate: Jan 7, 2014 9:50:58 AM 11:00:00 $ * * @brief Implementation of strain gauge module DMS202 * ******************************...
true
e3d27eeee9733f7ecfc3c4e5c57c757d9d234d7b
C++
ccdxc/logSurvey
/data/crawl/squid/new_hunk_4211.cpp
UTF-8
2,530
3.203125
3
[]
no_license
* Configuration option parsing code */ /** * Parse wccp2_return_method and wccp2_forwarding_method options * they can be '1' aka 'gre' or '2' aka 'l2' * repesenting the integer numeric of the same. */ void parse_wccp2_method(int *method) { char *t; /* Snarf the method */ if ((t = strtok(NULL, w_spa...
true
fa6cd66d3cd8d0ef0f2c0c58622eebc620cab348
C++
tmtlab/vapaee.io-source
/contracts/vapaeetokens/vapaeetokens.core.hpp
UTF-8
12,972
2.765625
3
[ "MIT" ]
permissive
#pragma once #include <vapaee/token/common.hpp> using namespace eosio; namespace vapaee { namespace token { class core { name _self; public: core():_self(vapaee::token::contract){} inline name get_self()const { return vapaee::token::contract; } // TOKEN ---...
true
435264414e8760c65bd5e2de4768503f1f82ca4f
C++
GamesTrap/LearnCPP
/MathVector/src/Vector.h
UTF-8
2,069
3.59375
4
[ "MIT" ]
permissive
#pragma once #include <stdexcept> #include <initializer_list> template<typename T> class Vector { public: explicit Vector(std::size_t amount = 1); Vector(std::size_t amount, T value); Vector(std::initializer_list<T>); Vector(const Vector<T>& v); virtual ~Vector() { delete[] m_start; } auto size() const { ...
true
9348fe881bd1e2d531b0ba00f37755639fee110f
C++
bs-eagle/bs-eagle
/bs_bos_core_base/include/vector_assign.h
UTF-8
979
2.8125
3
[]
no_license
/** * \file * \brief spec for vectors assign * \author Sergey Miryanov * \date 02.03.2009 * */ #ifndef BS_VECTOR_ASSIGN_H_ #define BS_VECTOR_ASSIGN_H_ #include "force_inline.h" namespace blue_sky { template <typename item_t, size_t size, typename val_t> BS_FORCE_INLINE void assign (boost::a...
true
e1e2dae05ae1e4a7c0a7f7c8763cb235453a9416
C++
scissor-project/open-scissor
/docker/d-streamon-master/d-streamon/streamon/lib/fc/StructTemplate.cpp
UTF-8
810
2.5625
3
[ "Apache-2.0", "MIT" ]
permissive
#include "StructTemplate.h" namespace IPFIX { void StructTemplate::add(const InfoElement* ie, size_t offset) { // Add IE to maps add_inner(ie); // Calculate offset if necessary if (!offset) { if (offsets_.empty()) { offset = 0; } else if (ie->len() == kVarlen) { offset = offsets_.back...
true
efd6a8b19b6963aa94269aed1de94b5a8c8d70d8
C++
XZeusJ/Leetcode
/59.spiral-matrix-ii.cpp
UTF-8
1,221
3.421875
3
[]
no_license
/* * @lc app=leetcode id=59 lang=cpp * * [59] Spiral Matrix II * * https://leetcode.com/problems/spiral-matrix-ii/description/ * * algorithms * Medium (48.85%) * Likes: 730 * Dislikes: 98 * Total Accepted: 168.9K * Total Submissions: 332.9K * Testcase Example: '3' * * Given a positive integer n, g...
true
a5adbafc27fc16bda355404f8bd177a22761448f
C++
wtrnash/LeetCode
/cpp/141环形链表/141环形链表.cpp
UTF-8
1,321
3.65625
4
[]
no_license
/* 给定一个链表,判断链表中是否有环。 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)。 如果 pos 是 -1,则在该链表中没有环。 示例 1: 输入:head = [3,2,0,-4], pos = 1 输出:true 解释:链表中有一个环,其尾部连接到第二个节点。 示例 2: 输入:head = [1,2], pos = 0 输出:true 解释:链表中有一个环,其尾部连接到第一个节点。 示例 3: 输入:head = [1], pos = -1 输出:false 解释:链表中没有环。 进阶: 你能用 O(1)(即,常量)内存解决此问题吗?...
true
01b9efe042d40e327c0068900de687b8b9b48e2e
C++
UelitonFreitas/ComputerVision
/BoW/BoW.h
UTF-8
8,671
2.671875
3
[]
no_license
#ifndef __BOW_H #define __BOW_H #include <opencv/cv.h> #include <opencv/cxcore.h> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/nonfree/nonfree.hpp> #include "opencv2/features2d/features2d.hpp" #include "opencv2/ml/ml.hpp" #include <stdlib.h> using namespace cv; using...
true
2de96948c6b302c2c2b7848cb35ba3bf096d799a
C++
TeamLaw/SFML-V1.0
/Main_Screen.cpp
UTF-8
1,050
2.796875
3
[]
no_license
#include "TowerCrawl.h" #include "Entities.h" #include "Environment.h" #include "screens.h" screen_Main::screen_Main(void) { alpha_max = 3 * 255; alpha_div = 3; playing = false; } int screen_Main::Run(sf::RenderWindow &win) { // Start game loop while (win.isOpen()) { // Process events sf::...
true
6cc458ea76ef0e5c66a0b2d46b736ef046a8a5b9
C++
LybaFatimaNasir/DSA
/Binary Search.cpp
UTF-8
1,193
3.625
4
[]
no_license
#include<iostream> using namespace std; const int SIZE = 5; int BinarySearch(int *Arr, int elem, int low, int high); int binarySearch(int *Arr, int elem, int low, int high); int main() { //int size =5; // << " Enter the size of array : " << endl; //cin >> size; int arr[SIZE]; int n ,BS; cout << " Ente...
true
2351a8856ffdbd62e319fc304f4006d6a0d3226d
C++
Ravino/ccpp
/Ivan/Ostrouhova/middleSq.cpp
UTF-8
984
3.171875
3
[]
no_license
#include <iostream> #include <string> int convertStrNumber (const char *fio) { int f = (int) fio [0]; int i = (int) fio [1]; int o = (int) fio [2]; std:: string strNumber = ""; strNumber = strNumber + std:: to_string (f); strNumber = strNumber + std:: to_string (i); strNumber = strNumber + std:: to...
true
0649e25ab7a92eb09bddf7e01e6440afca4b2fc9
C++
Nekhlyudov/algorithm
/leetcode/basic/395.cpp
UTF-8
798
2.578125
3
[]
no_license
class Solution { public: int dfs(string &s,int l,int r,int k){ int mp[26];memset(mp,0,sizeof(mp)); for(int i=l;i<r;i++){ mp[s[i]-'a']++; } int spil=-1; for(int i=0;i<26;i++){ if(mp[i]>0&&mp[i]<k){spil=i;break;} } if(spil==-1)retur...
true
0be25e3858c6e69335ec67ef5775f18fcaa9318e
C++
AritonV10/Exercises
/UVT/Fibo.cpp
UTF-8
474
3.28125
3
[]
no_license
#include <iostream> void fib_swap(int& a, int& b, int& c){ c = a + b; a = b; b = c; } bool func(const int* n, const int* _p){ int a = 0, b = 1, c = 0; for(int i = 0; i <= *n; i++){ fib_swap(a, b, c); if(c == *_p) return true; } return false; } int main(){ int x = 30,...
true
5ced4faecb438e14980aadfdf3fb2ce85777c4b6
C++
gbrlas/AVSP
/CodeJamCrawler/dataset/09_17779_46.cpp
UTF-8
1,256
2.78125
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; typedef unsigned long ulong; int numCases; int d[10]; int main (int argc, char * const argv[]) { if ( argc != 2 ) return -1; ifstream fileIn(argv[1], ifstream::in); if ( fileIn.good() == false ) return -1; fileIn >> numCases; for ( int caseIn...
true
185711184017a0ba608092d96d85b411e41efd5a
C++
SeungHyeokJeon/image_processing
/163337_14_1/thresholding.cpp
UTF-8
1,674
3.125
3
[]
no_license
#include "opencv2/opencv.hpp" using namespace cv; #include <iostream> using namespace std; int main() { int threshold_value = 127; //처음 추정치 T int lowsum = 0, highsum = 0, lowcount = 0, highcount = 0; int u1 = 0, u2 = 0; Mat src, dst; src = imread("image.jpg", IMREAD_GRAYSCALE); cout << "thresh...
true
fe7b971f1fd853a27141b66407bd0b573b4e80f3
C++
unWyse/cplusplus-samples
/09 - ShapesHierarchy/09 - ShapesHierarchy/Trapezoid.cpp
UTF-8
453
2.953125
3
[ "MIT" ]
permissive
//Kyle Wyse //22 March 2018 //8th: p 532 #12.8; Class Inheritance: //TRAPEZOID //This class includes a construtor for a trapezoid object which takes //as parameters two Points and two lengths. It then calls the constructor //from its superclass: Quadrilateral. #include "Trapezoid.h" Trapezoid::Trapezoid(P...
true
74875bdfeeb3e9088ad158d4ddfd7451159269c8
C++
joelnb/nsis
/NSIS/tags/v212/Source/ShConstants.cpp
UTF-8
1,614
2.90625
3
[]
no_license
#include "ShConstants.h" ConstantsStringList::ConstantsStringList() { index = 0; } int ConstantsStringList::add(const char *name, int value1, int value2) { int pos=SortedStringListND<struct constantstring>::add(name); if (pos == -1) return -1; ((struct constantstring*)gr.get())[pos].index = index; ((struct...
true
b0ca8df01973b4295dc9afa3448d8c33eb4f1745
C++
shyamelc/Coding-PC
/Non Competetion/Matrix Chain Multiplication/main.cpp
UTF-8
868
2.921875
3
[]
no_license
#include <iostream> using namespace std; int main() { int n,i,j; cin>>n; int arr[n+1]; for(int i=1; i<=n; i++) cin>>arr[i]; int matrix[n+1][n+1]; for(i=1; i<=n; i++) for(j=1;j<=n; j++) if(i==j) matrix[i][j] = 0; else matri...
true
7499b99c13bc6f7031357db2406df4a9c6227674
C++
cies96035/CPP_programs
/UVA/已通過/uva11332.cpp
UTF-8
266
2.59375
3
[]
no_license
#include<iostream> using namespace std; int N; int f(int num) { int s=0; while(num) { s+=num%10; num/=10; } if(s>9) return f(s); return s; } int main() { cin.tie(0); ios_base::sync_with_stdio(0); while(cin>>N&&N) cout<<f(N)<<'\n'; return 0; }
true
4d88be479137eb53ed90fde4495d566ec7c92573
C++
diwadd/sport
/cf_even_odd_game.cpp
UTF-8
1,833
3.171875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long int ulli; typedef long double ld; void left_just(string &s, int n, char c = ' ') { while(s.length() < n) { s = c + s; } } template<typename T> void print_vector(vector<T> &vec) { int n = vec.size...
true
81e6ccb1cece73da7e6eeedcb21c964ba33e3c60
C++
calmofthestorm/blif-verifier
/truthtable.cc
UTF-8
3,604
2.78125
3
[]
no_license
#include "truthtable.h" #include <cassert> #include <algorithm> #include <iostream> #include <iterator> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> #include "tokenizer.h" using std::istream; using std::istringstream; using std::ostream; using std::string; using s...
true
5884cef7e9b6a585378e88bf28814418f1a929e8
C++
chenyangchenyang/ptcx
/decode.cpp
UTF-8
8,415
2.640625
3
[ "BSD-2-Clause" ]
permissive
#include "ptcx_internal.h" void read_control_values(stream *input, PTCX_PIXEL_RANGE *range, const PTCX_FILE_HEADER &header) { if (BASE_PARAM_CHECK) { if (!input || input->is_empty()) { base_post_error(BASE_ERROR_INVALIDARG); } } switch (header.quant_control_bits) ...
true
2a84b32da9cf5550dede6b7212965b5a212150c9
C++
muris/projects
/InMemoryDatabase/AppManager.cpp
UTF-8
3,181
3.75
4
[]
no_license
#include <stdio.h> #include "RecordManager.h" void Output(struct data *p); int main() { printf("******************************************\n"); printf("* Record Manager Application *\n"); printf("* Xinyi He *\n"); printf("******************************************\n"); ...
true
adfa18d505eee4c5a88665591b83a0df9110028b
C++
Rexagon/methodist
/app/models/CoursesListModel.cpp
UTF-8
1,824
3.296875
3
[]
no_license
#include "CoursesListModel.h" CoursesListModel::CoursesListModel(QObject* parent) : QAbstractListModel(parent) { } CoursesListModel::~CoursesListModel() { m_courses.clear(); } void CoursesListModel::update() { std::stable_sort(m_courses.begin(), m_courses.end(), [](const std::unique_ptr<Course>& a, const...
true
a2e4d12df1086d00cf3d3b1e3220e37de24a36b2
C++
nsubiron/mess-engine
/source/mess/engine/PlayerCredentials.h
UTF-8
792
3.046875
3
[ "MIT" ]
permissive
#pragma once #include "mess/NonCopyable.h" #include "mess/engine/PlayerId.h" #include <mutex> #include <string> namespace mess { namespace engine { class PlayerCredentials : private NonCopyable { public: PlayerCredentials(PlayerId id, std::string username) : _id(id), _username(std::move(u...
true
bd62ecaaf5ca06b3d4ed82da69d04f79488050c4
C++
jinkyongpark/practicealgorithm
/Code/swea_홈방범서비스v2.cpp
UTF-8
1,413
2.953125
3
[]
no_license
#include <iostream> #include<algorithm> using namespace std; const int MAX = 30; int T, d,w,k,ans; int film[MAX][MAX], tmpfilm[MAX][MAX]; pair<int,int> cell[MAX]; int drugcnt; void performanceCheck() { for (int r = 0; r < d; r++) for (int c = 0; c < w; c++) tmpfilm[r][c] = film[r][c]; for (int i = 0; i < drugcnt...
true
6be23181f207991aab20d17c3e99143fb37d4d67
C++
pfaltynek/advent-of-code-2018-cpp
/day22/main.cpp
UTF-8
6,802
2.625
3
[]
no_license
#include "./../common/aoc.hpp" #include "./../common/coord.hpp" #include <queue> #include <regex> #define TEST 1 const std::regex depth_regex("^depth: (\\d+)$"); const std::regex target_regex("^target: (\\d+),(\\d+)$"); typedef enum AREA_TYPE { rocky = 0, wet = 1, narrow = 2 } area_type_t; typedef enum TOOL_TYPE { t...
true
2c9d9a21eeba512a8e9dbe359bd31fc525fd6460
C++
liinumaria/habitare2017
/habitare2017.ino
UTF-8
8,332
2.640625
3
[]
no_license
#include <SPI.h> // SPI library #include <SdFat.h> // SDFat Library #include <SFEMP3Shield.h> // Mp3 Shield Library SdFat sd; // Create object to handle SD functions SFEMP3Shield MP3player; // Create Mp3 library object // These variables are used in the MP3 initialization to set up // some stereo o...
true
8c3dc1a1df64dcc04b19ce7cdc810b78172ec039
C++
yuan95/Projects
/appTest/stl/remove_copy.cpp
UTF-8
471
3.640625
4
[]
no_license
// remove_copy example #include<iostream> // std::cout #include<algorithm> // std::remove_copy #include<vector> // std::vector int main(){ int myints[] = {10,20,30,30,20,10,10,20}; std::vector<int> myvector(8); std::remove_copy(myints, myints+8, myvector.begin(), 20); std::cout << "myvector contains:"; ...
true
8c5eeaaf785967f6a995c62d228a52794ca90d9c
C++
jschmidt42/stingray-html5
/stingray_sdk/plugin_foundation/stream.h
UTF-8
3,265
3.25
3
[ "Apache-2.0" ]
permissive
#pragma once #include "array.h" #include <string.h> namespace stingray_plugin_foundation { // Functions for treating a Array<char> or a char * as a memory stream that can be written to // and read from. namespace stream { // Packs the data in t to the stream. template <class T> void pack(char *&v, const T &t) {...
true
14a8041e49c4271bacf1a67c4447b7233cd1f253
C++
Evalir/Algorithms
/Problems/Local19/a.cpp
UTF-8
902
2.6875
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <cstdio> #include <set> #include <map> #include <queue> using namespace std; // DONT USE SCANF !!!!!!!! int n, l; string s; string pattern; vector<vector<int>> adj(1010); long long ans = 0; void selectNode(int u, int p, int curpos) { ...
true
88b8d00861d4ae6d0cb28af6265a25632ba2fbb3
C++
shahidul-brur/OnlineJudge-Solution
/UVa/11483.cpp
UTF-8
797
2.59375
3
[]
no_license
//Accepted #include <stdio.h> #include<string.h> int main() { freopen("11483.txt", "r", stdin); int n, i, c=1, len, j; char input[110]; while(scanf("%d\n",&n) && n!=0) { printf("Case %d:\n",c); printf("#include<string.h>\n#include<stdio.h>\nint main()\n{\n"); for(i=1;i<=n;i+...
true
eceb84d38ccad44ea050bf426fb5f45c360ac137
C++
semerdzhiev/oop-2020-21
/cs-2-practical/14-virtual-destructors-and-exercise/virtual-destructors/main.cpp
UTF-8
805
3.640625
4
[]
no_license
#include <iostream> #include <vector> class Base { public: Base() { std::cout << "Base: Constructor\n"; } virtual ~Base() { std::cout << "Base: Destructor\n"; } virtual void test() { std::cout << "base\n"; } }; class Derived : public Base { int *arr; public: Derived() { arr = new int[...
true
a032a5339b0fcc56e548cc243b13cc0d9a33357b
C++
JasonLin6086/leetcode
/MergeTwoSortedLists/solution.cpp
UTF-8
1,279
3.46875
3
[ "MIT" ]
permissive
/* * solution.cpp * * Created on: Sep 14, 2016 * Author: jason */ #include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; class Node { public: int data; Node* next; Node(int x) : data(x), next(NULL) {} }; class Solution { public: Node* Merge (Node*...
true
117f8047313de34e4a92caf8324308504f53da6c
C++
Hengle/HFSM2
/include/hfsm2/detail/shared/bit_array.hpp
UTF-8
2,803
2.546875
3
[ "MIT" ]
permissive
#pragma once namespace hfsm2 { namespace detail { //////////////////////////////////////////////////////////////////////////////// struct Units { ShortIndex unit; ShortIndex width; }; //------------------------------------------------------------------------------ template <typename TIndex, ShortIndex NCapacity>...
true
2c5e0f42ca9430d6420e278720ecceae6fddb777
C++
sicaaa/wtd-2017
/arduino/wtd_2017_red_thermochromatic.ino
UTF-8
4,692
2.515625
3
[ "MIT" ]
permissive
/* ESP8266 MQTT example for controlling thermochromatic material. (c) 2017 Team R.E.D. @ Cybus WTD Hackathon This sketch demonstrates the capabilities of the pubsub library in combination with the ESP8266 board/library and some simple control logic to ensure appropriate behaviour of thermochromatic material. T...
true
473c92ef9bba157be99d7a3492d9bd70283ef2c0
C++
fmadrid/LeetCode
/LongestSubstringWithoutRepeatingCharacters/main.cpp
UTF-8
1,180
3.125
3
[]
no_license
#include <string> #include <cstring> #include<iostream> #include <algorithm> #include<vector> #include<map> using namespace std; class Solution { public: int lengthOfLongestSubstring(string s) { int len = s.length(); vector<char> cArr(len); for(int i = 0; i < len; i++) cArr[i...
true
5712fdcbace35c376b9da9b11aadf620d2afdd94
C++
alexandraback/datacollection
/solutions_5751500831719424_1/C++/alikhtarov/a.cpp
UTF-8
1,368
3.109375
3
[]
no_license
#include <cassert> #include <iostream> #include <unordered_set> #include <vector> using namespace std; using vi = vector<int>; using vvi = vector<vi>; vi count(const string& s) { vi out; size_t i = 0, j = 0; while (i < s.size()) { while (j < s.size() && s[j] == s[i]) ++j; out.push_back(j - i); i = j;...
true
40e2a2b71755bf14f0bb01c808ac1c3622ebe2f0
C++
RITIK627/codeforces
/Optimal Point on a Line.cpp
UTF-8
569
2.703125
3
[]
no_license
#include<iostream> #include<stdlib.h> #include<string.h> #include<algorithm> #include<math.h> using namespace std; long long dis(long long a[], long long n,long long k){ long long i,sum=0; for(i=0;i<n;i++){ sum += abs(a[i]-k); } return sum; } int main(){ long long n,i,one,two; cin>>n; long lon...
true