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
3f6f10553fbfb70aef460e212391d7f93c467f15
C++
AxelTB/SmartGreenHouse
/Arduino/.Time.h
UTF-8
1,228
2.625
3
[]
no_license
#ifndef TIME_H #define TIME_H #include <inttypes.h> typedef uint32_t time_sec; typedef uint64_t time_millis; /******************************************************************* * ==SmartGreenHouse== * Time Class * Created: 17/02/2013 * Author: Ax * License: CC BY-SA 3.0 * http:...
true
a1a5cf7e66cb88c01d1941444381d190450a45fa
C++
Huxinkui/Client-Server
/DataPackage/Serialize.h
UTF-8
3,936
2.78125
3
[]
no_license
#ifndef _SERIALIZE_H #define _SERIALIZE_H //序列化 // int Serialize(const DataPackage &s, char output[]) // { // int count = 0; // memcpy(output, &s.age, sizeof(s.age)); // count += sizeof(s.age); // memcpy(output + count , &s.name_size, sizeof(s.name_size)); // count += sizeof(s.name_size); // memcpy(...
true
ab7311605c67d7ca0f3689c4d99c9c948d8c3fef
C++
Heiden-repository/Study_Algorithm
/coding/TreeDistance.cpp
UTF-8
1,331
2.75
3
[]
no_license
//#include<cstdio> // //int depthX = 0; //int depthY = 0; //int tree[1000]; //int Node[1000]; // //int returnValue(int idx) { // int num; // num = tree[idx]; // return num; //} // //void find(int x, int y) { // int num = x; // // if (x == 0 || y == 0) { // if (x == 0) num = y; // else num = x; // while (num != 0) {...
true
788ba45a5874f48c9c4dd6f9d6790cd5bfddc288
C++
alyssssa8/resume
/4. lintcode/LeetCode409LongestPalindrome/LeetCode409Longest Palindrome.cpp
UTF-8
2,271
3.421875
3
[]
no_license
//https://leetcode.com/problems/longest-palindrome/description/ //Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. // //This is case sensitive, for example "Aa" is not considered a palindrome here. // //Note: // Assume the ...
true
167773e0725a4bc8f3b3a10ec26e7fcd6bb4d5bb
C++
Alicelalala/Code
/Data_Struct/20.最小的10个数.cpp
UTF-8
2,102
3.40625
3
[]
no_license
/************************************************************************* > File Name: 20.最小的10个数.cpp > Author: caohaiyan > Mail: 877022406@qq.com > Created Time: 2018年11月03日 星期六 15时55分59秒 ************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <t...
true
4662486904024159fe418927104a661596e84167
C++
korECM/BaekJoonStudying
/알고리즘 기초 1/200 - 자료구조 1/2020.02.06/스택수열/1874_JW.cpp
UTF-8
872
2.90625
3
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; int num; int count = 0; string result; vector<int> s; count = 0; for (int i = 0; i < n; i++) { cin >> num; getchar(); if (num > count) { while ...
true
4218611dd71a5836dcf761fa71680d22ddef1d26
C++
Frankie-2000-F/PAT_Advanced-Level
/1027/1027/Main.cpp
UTF-8
392
3.203125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; int main(){ int rgb; int color[6]; char digits[13] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C' }; for (int i = 0; i < 6; i = i + 2){ cin >> rgb; color[i] = rgb / 13; color[i + 1] = rgb % 13; } cout <...
true
f918e22885567e052b71fdf4d9c3b94898f7d55c
C++
stembotvn/UMake-Arduino
/examples/Auto_Light/Auto_Light.ino
UTF-8
589
2.90625
3
[]
no_license
#include "MakerKit.h" #define Light_pin A0 #define LED_pin 2 int light; int ON = 10; int OFF = 30; MakerKit Umake; void setup() { Serial.begin(115200); } void loop() { light = Umake.getLight(Light_pin); // Lấy giá trị cường độ ánh sáng (tính theo %) if(light < ON){ // Nếu cường độ ánh sáng đọc vào nhỏ ...
true
9b5b7ef1a5bc8cbc18a26c7d9b0a4b8defdc8045
C++
rahatchd/TINAH_example
/Arduino/libraries/TINAH_libraries/custom.cpp
UTF-8
295
2.53125
3
[]
no_license
/* * Custom.cpp - Custom library example. * Created by Rahat Dhande, July 19, 2016. */ #include <custom.h> #include <Arduino.h> Example::Example() { Serial.print("Example Object Constructed.\n\n"); } void Example::set(uint8_t x) { _x = x; } uint8_t Example::get(void) { return _x; }
true
1b94f2847a8b3ac5078c6a5552e1f68745301265
C++
ernestyalumni/HrdwCCppCUDA
/Voltron/Source/DataStructures/Graphs/WeightedGraph.h
UTF-8
9,410
3.421875
3
[ "MIT" ]
permissive
#ifndef DATA_STRUCTURES_GRAPHS_WEIGHTED_GRAPH_H #define DATA_STRUCTURES_GRAPHS_WEIGHTED_GRAPH_H #include <algorithm> // std::fill #include <cstddef> #include <cstring> #include <limits> #include <type_traits> // std::is_floating_point namespace DataStructures { namespace Graphs { //----------------------------------...
true
ff949717462a762b3fc1b69fd17bbbed9574edfe
C++
amina-rahman-ananna/my-code
/uva/10035.cpp
UTF-8
618
2.84375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main () { unsigned long long a; unsigned long long b; int sum =0; int count=0; int carry =0; while (cin >> a>> b) { if (a== 0 && b== 0) break; carry =0; sum=0; count=0; while (a||b){ sum = (carry + (a%10)+ (b...
true
f4fa8f13673265b16ace88eee4b48108087801a3
C++
peddinti/CPractice
/DataStructures/LinkedList.cpp
UTF-8
2,816
3.4375
3
[]
no_license
// // Created by Raghava Viswa Mani Kiran Peddinti on 9/3/16. // #include "LinkedList.h" #include "BinaryTree.h" #include <iostream> using namespace std; template <typename T> LinkedList<T>::LinkedList(T array[], int length) { // creating the head first LinkedListNode<T>* previous = new LinkedListNode<T>(&arr...
true
0b00dfc18657a52dc73e7614794c3448b4f9dcfe
C++
Techno-coder/UndertaleCPPLibrary
/revision_2/src/src/headers/resource/ResourceManager.h
UTF-8
1,529
2.890625
3
[]
no_license
#ifndef PROJECT_RESOURCEMANAGER_H #define PROJECT_RESOURCEMANAGER_H #include <map> #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include "ResourceItem.h" namespace ug { class ResourceManager { std::map<std::string, std::unique_ptr<sf::Texture>> texturesHolder; std::map<std::string, std::...
true
4905d31fab64a9316e5b93680b92e892c0c829c6
C++
LogicJake/code-for-interview
/leetcode-cn/C++/692.前k个高频单词.cpp
UTF-8
1,146
3.109375
3
[]
no_license
/* * @lc app=leetcode.cn id=692 lang=cpp * * [692] 前K个高频单词 */ // @lc code=start #include <algorithm> #include <queue> #include <string> #include <unordered_map> #include <vector> using namespace std; class Solution { public: using PIS = pair<int, string>; struct cmp { bool operator()(const PIS& ...
true
e6d1554e19334af7ef6f72b96ebd3b6d3bebf13b
C++
SCS2017/Leetcode-Solution
/二分查找/378_有序矩阵中第k小的元素.cpp
UTF-8
5,828
3.96875
4
[]
no_license
/* 给定一个 n x n 矩阵,其中每行和每列元素均按升序排序,找到矩阵中第k小的元素。 请注意,它是排序后的第k小元素,而不是第k个元素。 示例: matrix = [ [ 1, 5, 9], [10, 11, 13], [12, 13, 15] ], k = 8, 返回 13。 说明: 你可以假设 k 的值永远是有效的, 1 ≤ k ≤ n^2 。 */ #include <bits/stdc++.h> using namespace std; //使用最大优先队列,遍历整个数组,得到最小的k个数,然后返回top元素即可 class Solution { public: int kthS...
true
180564d3921a2955b60cec54f9d7af52cf93e95f
C++
abcosmi/CG-trab3
/codigo/janela.cpp
UTF-8
1,545
2.921875
3
[]
no_license
#include <iostream> #include <string> #include "janela.h" #include "tinyxml2.h" using namespace tinyxml2; Janela::Janela(){ largura = 0; altura = 0; corR = 0; corG = 0; corB = 0; titulo = ""; } int Janela::getAltura(){ return altura; } int Janela::getLargura(){ return largura; } float Janela::getCo...
true
853be3a3e7ae44e0dd4a9b09b99dd9ee5187f199
C++
jasonristeski/CPP
/LinkedList/DoublyLinkedNodeIterator.h
UTF-8
3,471
3.53125
4
[]
no_license
#pragma once #include <iostream> using namespace std; #include "DoubleLinkedNode.h" template<class DataType> class DoublyLinkedNodeIterator { private: enum IteratorStates {BEFORE,DATA,AFTER}; IteratorStates fState; typedef DoubleLinkedNode<DataType> Node; const Node* fLeftmost; const Node* fRightmost; const Nod...
true
d813dc77ffa6225a28adca0887740134ab5b9f45
C++
youngslab/hooking-api
/hook/include/hook/hook.hpp
UTF-8
2,789
3.046875
3
[ "MIT" ]
permissive
#pragma once #include <dlfcn.h> #include <chrono> #include <cstring> #include <functional> #include <sstream> #include <string> #include <tuple> #define _str(a) #a #define xstr(a) _str(a) // helper interface function-like macro /** * @brief Load the original function */ #define hook_load(x) hook::load<typeof(x...
true
b410212a0f3be169674d0579b354cdd38aafd9a6
C++
zhangchuhu/serviceframe
/service/imlib/SearchBuddyRecordOpHelper.cpp
GB18030
1,739
2.59375
3
[]
no_license
#include "./SearchBuddyRecordOpHelper.h" #include "core/sox/logger.h" using namespace server::imlist; using namespace mysqlpp; //¼ void SearchBuddyRecordOpHelper::insertRecord(SearchBuddyRecordDataSet &data) { Query query = m_conn->query(); query << "insert into search_buddy_record(uid, search_uid, time) ...
true
fd0a976472bcf4feac91f0d18d7e5c41250c9168
C++
anc95/leetcode
/18. 4Sum/solution.h
UTF-8
1,403
3.15625
3
[]
no_license
#include <vector> #include <string> using namespace std; class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { sort(nums.begin(), nums.end()); int size = nums.size(); int startPoint, endPoint; vector<vector<int>> result = {}; for (int i = 0; ...
true
a0f94b182224528f2243ee6ead236b3330af4615
C++
janmlam/TDT4102
/oving10/oving10/Shape.h
UTF-8
160
2.578125
3
[]
no_license
#pragma once #include "Image.h" class Shape { private: Color color; public: Shape(Color color); Color getColor(); virtual void draw(Image &img)=0; };
true
b5ae35ade3d0b0e46524b17a452a3e8f90eb0a4d
C++
charles-pku-2013/CodeRes_Cpp
/Cpp11/Thread/call_once_singleton.cpp
UTF-8
899
3.625
4
[]
no_license
#include <iostream> #include <thread> #include <memory> class Foo { public: using pointer = std::shared_ptr<Foo>; static pointer GetInstance() { std::cout << "Foo::GetInstance()" << std::endl; std::call_once(flag_, []{ pInst_.reset(new Foo); }); return pInst_; } ~Foo() { ...
true
7cabd90662bbab5813c1fd6296b14a14db3bc90b
C++
naordahan/Task8
/Board.h
UTF-8
1,082
3.015625
3
[]
no_license
#pragma once #include <iostream> #include <string> #include <exception> #include <math.h> #include "Spot.h" #include "IllegalCoordinateException.h" #include "IllegalCharException.h" using namespace std; struct RGB { uint8_t red, green, blue; public: RGB() {} RGB(uint8_t red, uint8_t green, uint8_t blue): red(red...
true
84756f429a72f8ac4745f5138cc4818d5b18f9ee
C++
JulioNV/CDD-PongGame-Linux-Client-Server
/Clases.h
UTF-8
5,255
3.234375
3
[]
no_license
#ifndef CLASES_H_INCLUDED #define CLASES_H_INCLUDED #include "linuxLibGame.h" int golesA=0, golesB=0; //Declaro las variables globales para indicar los goles recibidos por cada jugador class Jugador { private: int x,y,GolesRecibidos=0; //Coordenadas que tendra el jugador; public: Jugador(int _x, int _y); //Con...
true
b8a97393079a4733e6e67b1984c9432e7ce5fcf8
C++
tadejpetric/vegova
/presentation/smart_pointers.cpp
UTF-8
187
2.5625
3
[]
no_license
#include <memory> int main() { std::unique_ptr<int> a = std::make_unique<int>(3); { auto p = std::make_unique<int>(5); } // p pobriše za sabo } // a pobriše za sabo
true
62897f6de3b07af7b2c3a84062c0f3b9fd45baff
C++
KentaroJay/BasicCG
/6/kadai06_sample.cpp
SHIFT_JIS
7,184
3.5625
4
[]
no_license
#include <cstdlib> #include <cmath> #include <vector> #include <GLUT/glut.h> // 2xNg߂̃NX class Vector2d { public: double x, y; Vector2d() { x = y = 0; } Vector2d(double _x, double _y) { x = _x; y = _y; } void set(double _x, double _y) { x = _x; y = _y; } // 1ɐK void normalize(...
true
3e9319b7ec71a7c2459ba8f1e4fa75e147130439
C++
Raks110/Fearless-Knights
/shooter_structs.h
UTF-8
4,355
2.71875
3
[ "BSD-2-Clause" ]
permissive
#ifndef SHOOTER_STRUCTS_H #define SHOOTER_STRUCTS_H #include "shooter_utils.h" #include <algorithm> #include <chrono> #include <random> #include <vector> #include <string.h> #include <ncurses.h> #include <iostream> using namespace std; typedef struct coordinates{ int x; int y; }coordinates; namespace dialo...
true
af623bf355ca0607a2306bc6d163004ca5996a4c
C++
Suckzoo/CS311
/project2/cs311.cpp
UTF-8
4,534
2.6875
3
[]
no_license
/***************************************************************/ /* */ /* MIPS-32 Instruction Level Simulator */ /* */ /* CS311 KAIST ...
true
892ae7cae6b82a9d7205b11e0b9dd479e6c4cf1f
C++
antonioguerrerocarrillo/1DESARROLLO-DE-APLICACIONES-MULTIPLATAFORMA
/1DAM/programacion en c++/ejercicios y practicas/UD2/cuadrado_perfecto.cpp
UTF-8
396
3.515625
4
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main () { int numero = 0, i = 0; cout << "introduce el numero para saber si el cuadrado es perfecto " << endl; cin >> numero; for (i = 0; i <= numero; i++) { numero = i * i; if ((pow(numero, 2)) == numero) { cout << "es un cuadrado perfecto " ...
true
5404881d5cd144fb5ef22f8a01efb654845c2336
C++
JanKolomaznik/MedV4D
/MedV4D/src/remoteComp/remoteNodesManager.h
UTF-8
2,639
2.578125
3
[]
no_license
/** * @defgroup cellbe Remote computing */ /** * @ingroup cellbe * @author Vaclav Klecanda * @file remoteNodesManager.h */ /** * @addtogroup cellbe * @{ * * Library used to send some parts of pipeline to remote mashines to be executed * and result sent back. This library is not bound to specific archite...
true
673b955cbd49fe59ca315a25c1bf8ebc742ce425
C++
SpiNNakerManchester/Visualiser
/spynnaker_external_device_lib/Threadable.h
UTF-8
1,229
2.640625
3
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2015 The University of Manchester * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
true
c78c92d305c9b0ebc4cd27dc10c37a910d8e8874
C++
alemoke/RoomHub
/src/config/ConfigurationWebServer.cpp
UTF-8
3,872
2.515625
3
[ "MIT" ]
permissive
#include "config/ConfigurationWebServer.hpp" #if defined(USE_WIFI) #include <WebServer.h> #elif defined(USE_ETHERNET) #include "httpserver/HttpServer.hpp" #endif #include "SPIFFS.h" #include "config/MasterConfig.hpp" ConfigurationWebServer::ConfigurationWebServer(ConfigurationStorage& _storage): storage(_storage) { ...
true
7804df0e8f90decc966897eb7452726339e19f6d
C++
jatrindo/learncpp
/13.9_overloading_the_subscript_operator/quiz/q1/program.cpp
UTF-8
2,759
4.34375
4
[]
no_license
/* * A map is a class that stores elements as a key-value pair. The key must be * unique, and is used to access the associated pair. * * In this quiz, we're going to write an application that lets us assign grades * to students by name, using a simple map class. The student's name will be the * key, and the grade...
true
a75684732094b80e99163df23032d032c2986fb5
C++
immortalx74/SDLUI
/sdlui_demo_controls_creation.cpp
UTF-8
9,278
2.953125
3
[ "MIT" ]
permissive
// Create some windows. SDLUI_Control_Window *wnd1 = SDLUI_CreateWindow(20, 100, 350, 400, "Window1"); SDLUI_Control_Window *wnd2 = SDLUI_CreateWindow(460, 30, 450, 350, "Window2"); SDLUI_Control_Window *wnd3 = SDLUI_CreateWindow(410, 400, 370, 200, "Window3"); SDLUI_Control_Window *wnd4 = SDLUI_CreateWindow(120, 620, ...
true
8f78c766cc644cbc9bb10ca7ed4aab16b5fa50ec
C++
marcosnils/node-bufferdiff
/bufferdiff.cc
UTF-8
1,152
2.640625
3
[]
no_license
#include <v8.h> #include <node.h> #include <node_buffer.h> #include <cstring> using namespace v8; using namespace node; static Handle<Value> VException(const char *msg) { HandleScope scope; return ThrowException(Exception::Error(String::New(msg))); } Handle<Value> EqBuf(const Arguments &args) { HandleSco...
true
35b0180a8f7d28b4860faac9c4e11925329813d0
C++
manikantanallagatla/Miscellaneous-Files-of-CPP
/DP/floydWarshallAlgo.cpp
UTF-8
1,152
2.734375
3
[]
no_license
#include<bits/stdc++.h> #include<math.h> #define ll long long int #define V 4 #define INF INT_MAX using namespace std; void floydWarshell (int graph[][V]){ int dist[V][V]; for(int i = 0;i<V;i++){ for(int j = 0;j<V;j++){ dist[i][j] = graph[i][j]; } } for(int k = 0;k<V;k++){ ...
true
7fc75341b9b6e1a76133d917e7092308e0fd40d7
C++
debanga/Data-Structures-and-Algorithms
/searching/median_2sorted_array_logn.cpp
UTF-8
1,517
3.515625
4
[]
no_license
#include <iostream> using namespace std; int find_j(int i, int n1, int n2) { return (n1+n2+1)/2 - i; } float find_median(int arr1[], int arr2[], int n1, int n2) { int left = 0; int right = n1-1; int mid; int j; bool is_odd = false; if ((n1+n2)%2!=0) { is_odd = true; } ...
true
91c3a9ca2b0da73bac6593a21159239234610451
C++
parag-shendye/cpp_lessons
/main.cpp
UTF-8
1,313
3.46875
3
[]
no_license
#include <iostream> #include "Employee.h" #include "Database.h" using namespace std; /* --To add an employee --To fire an employee --To promote an employee --To view all employees, past and present --To view all current employees --To view all former employees */ int main() { /* cout << "Testing E...
true
a4dfda9e2e466034c6920695924b803865dabfe1
C++
imhkr/Eminence-CP-dec
/number-theory assignment-1/cubefreenumber.cpp
UTF-8
633
2.578125
3
[]
no_license
#include<iostream> #include <bits/stdc++.h> using namespace std; int main(){ // Write your code here int t; int arr[1234567]; memset(arr, 0, sizeof(arr)); for(int i=2;i<=100;i++){ int c = i * i * i; for (int j=c;j<1234567;j=j+c) { arr[j] = -1; } } int count=1; for(in...
true
ead090d92391c95150084675fd071a4fdc3a1910
C++
mgready/ttttr
/asgn3/SavingAccount.h
UTF-8
455
2.671875
3
[]
no_license
#pragma once #include"Account.h" #include"I_printable.h" #include<iostream> class SavingAccount: public Account,public I_printable { private: string name; double balance; double interest_rate = 1; public: SavingAccount(); SavingAccount(string name, double balance, double interest_rate); void setInterest_rate(doub...
true
06114cc1dcc768ca3354a601ec4469be990c746b
C++
AbdulrahmanMaktabi/NumbersAndStrings
/prime.cpp
UTF-8
351
3.75
4
[]
no_license
#include <iostream> using namespace std; bool IsPrime(int n); int main(){ int num; cout << "Enter The Number: "; cin >> num; cout << (IsPrime(num) ? "True" : "False") << endl; return 0; } bool IsPrime(int n){ if (1 >= n){ return false; } for(int i=2; i<n; i++){ if(n % i == 0) retu...
true
9d2e9a02b2b9643f05041ae712ce8a3a275f604d
C++
luchenqun/leet-code
/problems/606-construct-string-from-binary-tree.cpp
UTF-8
1,572
3.65625
4
[]
no_license
/* * [606] Construct String from Binary Tree * * https://leetcode-cn.com/problems/construct-string-from-binary-tree/description/ * https://leetcode.com/problems/construct-string-from-binary-tree/discuss/ * * algorithms * Easy (44.12%) * Total Accepted: 243 * Total Submissions: 549 * Testcase Example: '[1,...
true
216fafe35056bbf69c3c19207ef9c6d513715298
C++
tek-nishi/game05
/src/co_misc.hpp
UTF-8
940
3.15625
3
[]
no_license
 #pragma once // // 雑多な処理 // #include <sys/stat.h> #include <string> namespace ngs { // 切り上げて一番近い2のべき乗値を求める int int2pow(const int value) { int res = 1; while(res < (1 << 30)) { if(res >= value) break; res *= 2; } return res; } // ファイルの存在判定 bool isFileExists(const std::string& file) { struct stat inf...
true
69c782ad38415221ce601053c1f57be9212975a2
C++
vlfom/Landscape-Generator
/MapGenerator/Hill_algorithm.cpp
UTF-8
8,095
2.921875
3
[]
no_license
#include "stdafx.h" #include <windows.h> #include <stdio.h> #include <iostream> #include <cmath> #include <vector> #include "Hill_algorithm.h" #include "Random.h" int convert(char x) { if (x == 'x') return -1; if (x == 'y') return -2; if (x == '+') return -3; if (x == '-') return -4; if (x == '*') return -5; i...
true
ec68be650a079b22196c2f6128ee1a3cc60b1524
C++
David-Sam22/Zorkish
/Task9-Spike_GameStateManagement/cmd_manager.cpp
UTF-8
9,990
2.671875
3
[]
no_license
#include "pch.h" #include "cmd_manager.h" #include <string> #include <list> #include <iostream> #include <fstream> #include "inventory.h" #include "location.h" #include "player.h" #include <algorithm> #include <map> #include "child_entity.h" #include "Message.h" using namespace std; cmd_manager::cmd_manager() { load...
true
56dcb6dc8f576f9889fb9683e836d2032adbb4cc
C++
ginkgo/AMP-LockFreeSkipList
/test/graph_bipartitioning/PPoPP/PPoPPBBGraphBipartitioningStrategy2.h
UTF-8
3,426
2.578125
3
[]
no_license
/* * StrategyBBGraphBipartitioningStrategy.h * * Created on: Mar 14, 2014 * Author: Martin Wimmer * License: Boost Software License 1.0 (BSL1.0) */ #ifndef PPOPPBBGRAPHBIPARTITIONINGSTRATEGY2_H_ #define PPOPPBBGRAPHBIPARTITIONINGSTRATEGY2_H_ #include <pheet/pheet.h> #include <pheet/sched/strategies/Use...
true
9a884c6ba409a0b3a61d8bf3dfa87ec3521a1ce0
C++
foreverhy/leetcode
/ExcelSheetColumnTitle.cc
UTF-8
574
3
3
[]
no_license
#include "leet.h" #include <algorithm> #include <cstring> class Solution{ public: string convertToTitle(int n) { string ret(""); while (n) { auto r = n % 26; n /= 26; if (r) { ret = static_cast<char>('A' - 1 + r) + ret; } else { ...
true
73c3250c34788168b9bee8dbd5238a55dae8d144
C++
jgsogo/Tuenti-Challenge
/7.The.Perfect.Larry.Matching.Algorithm/Girl.hpp
UTF-8
4,309
2.984375
3
[]
no_license
#pragma once #include <string> #include <memory> #include <vector> #include <map> #include <algorithm> #include <fstream> #include <bitset> #include <set> // Structs to store data about the world struct Girl { enum Q {GAME, FIGURE, SUITS, CATS, SHOP}; std::size_t id; std::string label; std::bitset<5...
true
c20256211acf509b4fa8f0867fd91033cd1c2cc5
C++
rexim/beatwave
/src/beatwave/splat.cpp
UTF-8
1,087
2.859375
3
[ "MIT" ]
permissive
#include <cmath> #include <SFML/Graphics.hpp> #include <core/math.hpp> #include <beatwave/splat.hpp> Splat::Splat(size_t dropCount) { for (size_t i = 0; i < dropCount; ++i) { m_drops.emplace_back(sf::Color::White); } } void Splat::render(sf::RenderTarget *renderTarget) const { for (const auto &dr...
true
841c06d6bb2f4efd8d1430d992140a85586fb504
C++
cwindom/cpp-module
/day04/ex00/MyVictim.hpp
UTF-8
437
2.75
3
[]
no_license
// // Created by Мария Корогодова on 25.01.2021. // #ifndef EX00_MYVICTIM_HPP #define EX00_MYVICTIM_HPP #include <iostream> #include "Victim.hpp" class MyVictim: public Victim { private: MyVictim(); public: MyVictim(std::string const name); virtual ~MyVictim(); MyVictim(MyVictim const &copy); MyVictim &operator...
true
c134e230f7fc77b42bc181aa5a8af95206acc80d
C++
xvrxvr/basicoopparser
/parser1/main.cpp
UTF-8
1,925
3.0625
3
[]
no_license
#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include "EvalSystem.h" /* expr: mul_exp { '+'|'-' mul_exp } mul_exp: primary { '*'|'/' primary } primary: <number> | '(' expr ')' */ class Lexer { char* input; int num; int symbol; public: Lexer(char* in) : input(in), num(0), symbol(-...
true
fb39be985e8caf2e44d61e90e4fe486ef9e986a6
C++
ud-boss/DSA
/DP/DivisorGame.cpp
UTF-8
852
2.796875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int solve(vector<int> &A) { int N = A.size(); vector<int> Dp(N,1); for(int i=1;i<N;i++) { if(A[i] > A[i-1]) Dp[i] = Dp[i-1]+1; else if(A[i] == A[i-1]) Dp[i] = Dp[i-1]; } for(...
true
7398eadcc9a4738c4e57bc70b0a13a41b9508b18
C++
Plasmarobo/MikrokopterSerialDriver
/dummy.cpp
UTF-8
550
2.53125
3
[]
no_license
#include "serial_channel.hpp" #include "raw_channel.hpp" #include "serial_frame.hpp" #include <iostream> int main(int argc, char *argv[]) { if(argc < 2) { printf("No port specified, exiting\n"); exit(0); } SerialChannel *r = new RawChannel(argv[1], 0); r->Open(); char *d = new char[5]; d[0] = 100; d[1] = 20...
true
0aecd6262c348582cc8eb466ce0098c6dd05c9ee
C++
sigalnotovich/project-in-cpp
/World.h
UTF-8
5,194
3.28125
3
[]
no_license
#ifndef MTM4_WORLD_H #define MTM4_WORLD_H #include "Clan.h" #include "Area.h" #include <map> namespace mtm { typedef std::shared_ptr<Area> AreaPtr; enum AreaType { PLAIN, MOUNTAIN, RIVER }; class World { map<string, Clan> clan_map; //areas: //MtmSet<AreaPtr> areas_set; map<string, AreaPtr> areas_map; ...
true
786da714cb749be047e82b09bc2cf765b409b80e
C++
sheriby/DandAInLeetCode
/Daily_Problem/2012/Middle/201215_Monotone_Increasing_DIgits/method1/solution.cc
UTF-8
906
3.5625
4
[ "MIT" ]
permissive
#include <vector> using std::vector; class Solution { public: // 将数字变成各位的数字数组 int monotoneIncreasingDigits(int N) { vector<int> numbers; while (N) { numbers.push_back(N % 10); N /= 10; } for (int i = 0; i + 1 < numbers.size(); i++) { if (n...
true
933d83dac35de0d3c0ad55dac9e00334507e2b15
C++
SudakovOleg/ReadManga
/standartview.cpp
UTF-8
4,489
2.65625
3
[]
no_license
#include "standartview.h" #include "ui_standartview.h" #include <QScrollBar> #include <QScreen> #include <QPushButton> #include <QTimer> StandartView::StandartView(QWidget *parent, const QList<QString>& pages, const QString& name) : QDialog (parent), ui(new Ui::StandartView) { //Узнаем размер экрана //...
true
d99842c0d94b360f09ecdd34c945c5bc6bbba70f
C++
3817061ShashkinEV/Shashkin_All_Labs
/Queue/queue_main.cpp
UTF-8
921
3.84375
4
[]
no_license
#include <iostream> #include "Queue.h" int main() { TQueue<int> queue(10); int tmp; std::cout << "Queue is: "; if (queue.IsEmpty()) std::cout << "empty.\n"; else if (queue.IsFull()) std::cout << "full.\n"; else std::cout << "not empty and not full.\n"; std::cout << "Filling the queue with val...
true
3f94d32dd36f00d29ee8c2c3d50255fe5f2b2bfa
C++
namyoungu/baekjoon
/백준 17478번 재귀함수가 뭔가요.cpp
UHC
1,246
3.296875
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; int n; void firstPrint(int dep) { int cnt = n - dep; for (int i = 0; i < cnt; i++) { cout << "____"; } } void Print(int dep) { if (dep == -1) return; firstPrint(dep); cout << "\"Լ ?\"" << '\n'; if (dep == 0) { first...
true
a67f87a8c274773ae4768db7af97615ca3f6d5b3
C++
Mrd278/Codeforces_Java
/GivenlengthAndSumOfDigits.cpp
UTF-8
1,035
2.515625
3
[]
no_license
#include<bits/stdc++.h> #include<string> using namespace std; #define fo(i, n) for(int i = 0; i < n; i++) typedef long long int ll; void solve() { int m,s, max_ = 0; cin>>m>>s; string maximum, minimum; if(s == 0 && m <= 1) cout<<"0 0"<<endl; else if((s == 0 && m > 1) || (s > 9*pow(2,m-1))) cout<<"-1 -1"<<...
true
3a6ee1fbaa22504da0435046a58398794752db68
C++
johnttaylor/colony.core
/src/Cpl/Text/Tokenizer/Basic.cpp
UTF-8
1,853
2.53125
3
[]
no_license
/*----------------------------------------------------------------------------- * This file is part of the Colony.Core Project. The Colony.Core Project is an * open source project with a BSD type of licensing agreement. See the license * agreement (license.txt) in the top/ directory or on the Internet at * http://int...
true
29a84af6e6727490dd6170de9c6db8ccfb7c331d
C++
RongleXie/Play-Leetcode
/2501-3000/2581-Count-Number-of-Possible-Root-Nodes/cpp-2581/main.cpp
UTF-8
2,085
3.265625
3
[]
no_license
/// Source : https://leetcode.com/problems/count-number-of-possible-root-nodes/description/ /// Author : liuyubobobo /// Time : 2023-03-04 #include <iostream> #include <vector> #include <list> #include <set> using namespace std; /// Rerooting /// Time Complexity: O(n) /// Space Complexity: O(n) class Solution { p...
true
a987a5d1dc6fcb2c5dbbaca035235d9eff2850c5
C++
jleppert/sony
/test.cpp
UTF-8
966
2.640625
3
[]
no_license
#include <opencv2/opencv.hpp> #include <opencv2/ccalib/randpattern.hpp> #include <zmq.hpp> #include <iostream> #include <unistd.h> using namespace std; using namespace cv; using namespace randpattern; int main() { cout << "started okay" << endl; zmq::context_t context (1); zmq::socket_t socket (context, ZMQ_REP...
true
62cec61d9d3c3529f7e1e598cbc06472487c2f6c
C++
chanhou/openCL_DNN
/openCl/YoUtil.cpp
UTF-8
2,597
2.84375
3
[]
no_license
#include "YoUtil.hpp" #include <iostream> // for I/O #include <fstream> // for file I/O using namespace std; cl::Context *getContext(cl_device_type type, vector<cl::CommandQueue> &cmdQueues, cl_command_queue_properties props, bool verbose) { vector< cl::Platform > platforms; cl::Platform::get(&platforms); for...
true
d589cc2c30c81631e872336c22ec3274da882fb2
C++
shaihitdin/CP
/Olymp/WCS/Division_selection/A.cpp
UTF-8
506
2.625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 100; int d[N]; inline int calc (int x) { int res = 0; while (x) { if (x % 10 == 0) ++res; x /= 10; } return res; } int main () { #ifdef BROKEN freopen ("in", "r", stdin); #endif d[0] = 1; for (int i = 1; i < N; ++i) { d[i] = d[i...
true
79b0920fee7e16367586fff3cfde81aacd995a88
C++
OpsRaven/SenecaOOP345-attic
/filesize.cpp
UTF-8
317
2.78125
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; int64_t filesize(char*f) { ifstream i(f, ios::in | ios::binary | ios::ate); return i? uint64_t(i.tellg()): -1; } int main(int argc, char**argv) { for(int arg = 1; arg < argc; arg++) cout << argv[arg] << " = " << filesize(argv[arg]) << "\n"; }
true
20572b36da3fe17187f4af7e4b852cfebd8a8af3
C++
ghorges/leetcode
/21-2-5/剑指offer28.cc
UTF-8
956
3.375
3
[]
no_license
// 开始想着很麻烦,但是实际上不难,因为这个树本身 // 是对称的,所以只要从根开始,判断左边和右边即可 // 空间复杂度是O(n),因为压栈的原因。 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool rec = true; ...
true
1ddfc0d7b825cc318bfb9c443aacf138e54b551b
C++
cwilkens/mortimer-maxwell
/DosLife/MortimerMaxwell/GameObject.h
UTF-8
1,299
2.796875
3
[ "MIT" ]
permissive
// generic game object //#include <windows.h> #include "ConsoleImage.h" #ifndef GAMEOBJECT_H #define GAMEOBJECT_H class ObjectList; enum State { ACTIVE, REMOVE }; enum ObjectType { PLAYER, ENEMY, ITEM, POWERUP, PROJECTILE, SCENERY }; class GameObject { public: // overridden by child virtual State Step()...
true
5e4a896720fd037d85ab1db8291befeb92ff7871
C++
acsearle/mania
/mania/rect.hpp
UTF-8
4,004
3.3125
3
[]
no_license
// // rect.hpp // mania // // Created by Antony Searle on 9/3/19. // Copyright © 2019 Antony Searle. All rights reserved. // #ifndef rect_hpp #define rect_hpp #include "vec.hpp" namespace manic { // There are many defensible choices for rect storage. The most performance // critical use case is guessed to be c...
true
468c8c581b98c91eab73384dcc31dd860b65544f
C++
mehran-alipour/OOP345
/OOP345_myNOTE/OOP345_week01_sol/external_linkage/ModuleB.cpp
UTF-8
268
2.671875
3
[]
no_license
// External Linkage // Module_b.cpp #include <iostream> void display(); int share_me = 0; // variable definition int main() { display(); display(); std::cout << "share_me at " << &share_me << '\n'; std::cout << "share_me is " << share_me++ << '\n'; }
true
2881aa63993bac63ee04737969342cb217d83421
C++
Alpinski/1stExcercises
/Excercises/ConstructDestruct/ConstructDestruct/Source.cpp
UTF-8
444
3.140625
3
[]
no_license
#include <iostream> using namespace std; class Player { public: Player(); //e Player(const char * name); //d Player(int a_max_ammo, int a_max_health); //a Player(float x, float y); //b Player(Player& a_player); //c float X, Y; int ammo; int max_ammo; int health; int max_health; char name[64]; }; void main...
true
9c69899f5c7f7b4d9ba00f63a952598ecce61fbd
C++
bisrat09/Sudoku-Solver
/sudoku.h
UTF-8
2,898
3.40625
3
[]
no_license
/* sudoku.h By Bisrat Belayneh Mar 8,2017 sudoku.h contains the class definitions of the functions implemented in sudoku.cpp */ #pragma once #include<iostream> #include"puzzle.h" #include"string" #include"sudokuFitness.h" class sudoku : public puzzle { //----------------------------------------------...
true
c78c8a7c93f636e75baf16d93954c6487018deab
C++
Mesywang/EPSILON_Noted
/EPSILON/core/common/inc/common/basics/shapes.h
UTF-8
11,942
2.890625
3
[ "MIT" ]
permissive
/** * @file shapes.h * @author HKUST Aerial Robotics Group * @brief * @version 0.1 * @date 2019-03-17 * * @copyright Copyright (c) 2019 */ #ifndef _COMMON_INC_COMMON_BASICS_SHAPES_H__ #define _COMMON_INC_COMMON_BASICS_SHAPES_H__ #include <map> #include <opencv2/core/core.hpp> #include "common/basics/basics.h"...
true
69ce80d92e424210ca8895555de4f8cb1e5df1cb
C++
rafalh26/Cpp
/FunctionFun1/FunctionFun1/main.cpp
WINDOWS-1250
311
3.0625
3
[]
no_license
#include <iostream> #include <string> using namespace std; void printMyName(); void printSomething(); int main() { printMyName(); printSomething(); return 0; } void printMyName() { string name = "Rafa\n"; cout << name << endl; } void printSomething() { cout<< "Hey! Look Im here"<<endl; }
true
41de4d73f6297225ac32c468ad1e5d33eb272107
C++
HexRabbit/ACMpractice
/uva10106.cpp
UTF-8
1,091
2.625
3
[]
no_license
#include <iostream> #include <cstdio> #include <vector> #include <string> using namespace std; int main(int argc, char const *argv[]) { vector<int> v1; vector<int> v2; vector<int> res; string s1; string s2; while(cin >> s1) { cin >> s2; v1.resize(0); v2.resize(0); res.resize(0); for (int i = 0; i < s1.lengt...
true
87df88fbc533025c9ed5a7a52a7d9cbbb24180d7
C++
CyberSet/Coursework_2nd_semestr
/Kurs/Kurs/class_Int.h
WINDOWS-1251
6,785
3.390625
3
[]
no_license
#include "class_block.h" #include "class_sl.h" #include <algorithm> #ifndef CLASS_INT_H #define CLASS_INT_H using namespace std; class Integer{ private: unsigned int size; // unsigned int digit;// () block* begin, *end, *ptr; // - begin , end public: Integer(block* int_begin, unsigned int int_digit) { ...
true
3f4cbf62258ad2a6a247e66243efd44a2d359eb3
C++
dat1209/php
/lap trinh huong doi tuong/to_mau_2/main.cpp
UTF-8
507
3.0625
3
[]
no_license
#include <graphics.h> using namespace std; void to_mau(int xa, int ya, int xb, int yb, int xc, int yc, int xd, int yd, int color) { int ymax =yc, ymin=ya; int y=ymin; for(y; y<=ymax; y++) { int xm1 = ((xd-xa)/(ymax-ymin))*(y-ymin)+xa; int xm2 = ((xb-xc)/(ymax-ymin))*(y-ymin)+xb; ...
true
31298591da0ba29b8ded0c45638dd0276efeebd4
C++
ImMahbus/CpAlgo
/Binary_Exponentiation/Binary_exponentiation.cpp
UTF-8
1,578
3.609375
4
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ll; class BinaryExponentiation { public: ll binaryExpRec(ll base, ll exp); //using recursion O(log(n)) (Fast but uses extra space in stack) ll binaryExpIter(ll base, ll exp); // iterative solution O(log(n)) (faste...
true
b7b87e15f2f08d42706c82cd174f9cfa0aa2405f
C++
meysam81/flight-console-app
/finalproject/date.cpp
UTF-8
870
3.21875
3
[]
no_license
#include "date.h" using namespace std; date::date() { year = ""; month = ""; day = ""; } string date::set_year() { cout << "Enter Year " << endl; cin >> year; return "\0"; } string date::set_month() { cout << "Enter Month " << endl; cin >> month; return "\0"; } string date::set...
true
4befdf62adf44ebd58f0c1780b1f5cb1286ce726
C++
HaakenJ/Data-Structures
/sessions/Session6.Rectangle-Template/Rectangle.h
UTF-8
1,488
3.875
4
[]
no_license
// // Created by Kevin Lundeen on 10/15/20. // #pragma once /** * Rectangle class * * @tparam T the datatype of the rectangle dimensions */ template<typename T> class Rectangle { public: Rectangle(); Rectangle(T width, T length); Rectangle(const Rectangle<T> &other); Rectangle<T> &operator=(const ...
true
7470370eb7a280548b9eea7d875a8fe4bd3b927b
C++
1092772959/My-ACM-code
/模板/图论模板/最小生成树-kruskal.cpp
UTF-8
874
2.625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; const int maxn=30; const int maxm=100+10; struct Edge{ int u,v,dist; bool operator<(const Edge &rhs)const{return dist<rhs.dist;} }; struct Kruskal{ int n,m; Edge edges[maxm]; int fa[maxn]; int findset(int x){ return fa[x]==-1?x:fa[x]=findset(fa[x])...
true
4295e7da67f504c95df12bf7e43a74d5941865ac
C++
aiekick/engine
/src/modules/ai/server/IProtocolHandler.h
UTF-8
1,214
2.953125
3
[]
no_license
/** * @file */ #pragma once #include <memory> #include "IProtocolMessage.h" #include "common/Types.h" namespace ai { typedef uint8_t ClientId; /** * @brief Interface for the execution of assigned IProtocolMessage * * @note Register handler implementations at the @c ProtocolHandlerRegistry */ class IProtocolHa...
true
809d977d2f855a306cc9d0830ef649aa4fb6fcc2
C++
ArtiomTr/Game
/TPPEngine/Tpp_Rect.h
UTF-8
1,133
3
3
[ "MIT" ]
permissive
#pragma once #include "Tpp_Vector2.h" namespace tp { template <typename T> class Rect { private: T width; T height; Vector2<T> position; Vector2<T> pivot; public: Rect(T width, T height) : width(width), height(height), position(Vector2<T>::zero()), pivot(Vector2<T>(width / (T) 2, height / (T) 2...
true
0fa7b93886c53b250a1ee4209ed0c0012fad1d66
C++
RomainJaminet/Neural-Network
/Neuron/main.cpp
UTF-8
324
2.515625
3
[]
no_license
#include "neuron.hpp" #include <iostream> using namespace std; int main () { Neuron * n1 = new Neuron(); Neuron * n2 = new Neuron(); vector<Neuron*> c; c.push_back(n1); c.push_back(n2); Neuron * n3 = new Neuron(c); cout << n3->getJson() << endl; Neuron * test = new Neuron(n3->getJson(),c); return 0...
true
7a3788e482de5e993b102abbf1be8beb8b49f36d
C++
albert-zhao/my_live555
/include/delaytimeval.hh
UTF-8
1,461
2.953125
3
[]
no_license
#ifndef _DELAY_TIMEVAL_HH #define _DELAY_TIMEVAL_HH #include "timevalue.hh" using namespace std; class DelayTimeVal: public TimeVal { public: DelayTimeVal(const struct timeval &t) :TimeVal(t) { cout << "DelayTimeVal(struct timeval &t) init" << endl; } DelayTimeVal(int sec, int u...
true
fc918551c9024e819aaf8f437bc365d7c2f3a384
C++
tmguvenc/tools
/facecropper/src/facefinder.cpp
UTF-8
3,829
2.71875
3
[]
no_license
#include <facefinder.h> #include <common.h> #include <boost/filesystem.hpp> namespace fs = boost::filesystem; FaceFinder::FaceFinder(FaceFinder::Queue *queue) : m_queue(queue), m_classifier(new cv::CascadeClassifier), m_image_index(0) { } FaceFinder::~FaceFinder() { if(m_classifier){ delete ...
true
33d94e3b6566ea027fdab0a07f3bcc6d170bd209
C++
shruti-nahar14/C-PlusPlus
/for loop hackerrank.cpp
UTF-8
554
3.546875
4
[]
no_license
///////////////////////////////////// /*Input: 2 7 *Output: two three four five six seven *Description:Display the number with spelling from n1 to n2 range *Date: 4-June-2021 *Author: Shruti Nahar*/ ///////////////////////////////////////// #include<iostream> using namespace std; int main() { int ...
true
11080a3157f0e56da82f7bcd5663c1d0aa1c0585
C++
devanfarrell/NifflerTM
/source/Tape.cpp
UTF-8
1,819
3.65625
4
[]
no_license
#include "Tape.hpp" #include <string> #include <iostream> Tape::Tape() { cells = ""; currentCell = 0; } void Tape::initialize(std::string inputString) { cells = inputString; currentCell = 0; } void Tape::update(char writeCharacter, const char moveDirection) { cells[currentCell] = writeCharacter; if (move...
true
0fc63afd2549230bd2770bf64e85a79c3e6b0662
C++
wokulski48/personalBudget
/ExpenseManager.h
UTF-8
610
2.6875
3
[]
no_license
#ifndef EXPENSEMANAGER_H #define EXPENSEMANAGER_H #include "Expense.h" #include "FileWithExpenses.h" #include "AuxiliaryMethods.h" #include "DateOperationMethods.h" using namespace std; class ExpenseManager { vector <Expense> expenses; FileWithExpenses fileWithExpenses; public: ExpenseManager(string nam...
true
f24d048cca3b7ff5a82697648587dfce25e31ebb
C++
felixjones/SDL-GL
/include/FileSystem.h
UTF-8
3,329
2.640625
3
[ "MIT" ]
permissive
#ifndef __FILE_SYSTEM_H__ #define __FILE_SYSTEM_H__ #include <stdint.h> #include "ReadFile.h" #include "WriteFile.h" #include "FileList.h" #define DIRECTORY_LEN ( 240 ) class xiFileArchive; class xiArchiveLoader; class xiFileSystem { public: enum deleteType_e { DELETE_WHEN_DROPPED, DELETE_NEVER }; enum exte...
true
6c6a22486dbad256af0c881a181828b17e0dd6d0
C++
HelenEgorova/SAKOD
/Record.h
WINDOWS-1251
1,003
3.015625
3
[]
no_license
#pragma once #include <string> using namespace std; // class Record { private: // : , , , , string date; int receiveHours; int receiveMinutes; int returnHours; int returnMinutes; int itemIndex; string customerName; public: // Record(string date1, int receiveHours1, int receiveMinutes1, in...
true
ad553787b31dcbd66bf66c109282f5d96d365b7a
C++
cyy1991/abcranger
/src/various.hpp
UTF-8
2,690
2.640625
3
[ "MIT" ]
permissive
#pragma once #include <vector> #include <memory> #include <iostream> #include <iomanip> #include <queue> #include <deque> #include <chrono> #include "utility.h" static constexpr std::size_t operator"" _z(unsigned long long n) { return n; } static auto sz = 5_z; static_assert(std::is_same<decltype(...
true
a5aaa0bbc8481ca4d46b2d1edbe00fec1182dced
C++
arturstaszczyk/mosaiker
/MosaikerLib/FileSystemOps/FileChooser.cpp
UTF-8
624
2.640625
3
[]
no_license
#include "FileChooser.h" #include <QDebug> #include <QFileDialog> FileChooser::FileChooser(QObject* parent) : QObject(parent) { } QString FileChooser::chooseFile(OperationType operationType) { switch(operationType) { case OT_OPEN: return QFileDialog::getOpenFileName(); case ...
true
77c4c3e7c3fa4ff7bcb8b7a08af8381540ef30a8
C++
dna10101/FiveInARow
/Calculator/ChessBoard.cpp
GB18030
5,158
3.0625
3
[]
no_license
#include "stdafx.h" #include "ChessBoard.h" #define FIVE 100000 #define ALIVE4 50000 #define DIE4A 250 #define DIE4B 300 #define DIE4C 260 #define ALIVE3 300 #define jALIVE3 200 #define DIE3A 50 #define DIE3B 80 #define DIE3C 60 #define DIE3D 55 #define DIE3E 45 #define DIE3F 20 #define ALIVE2 65 #define...
true
e7e3680a11fc5aafdf47a31700e5a9c742cc2e78
C++
coder-e1adbc/CppPrimer
/chapter04/ex19.cpp
UTF-8
234
2.515625
3
[]
no_license
int *ptr; vector<int> vec; int ival; ptr != 0 && *ptr++ // ptr != 0 && *ptr != 0, ++ptr ival++ && ival // ival != 0 && ival != -1 vec[ival++] <= vec[ival] // warning: undefined // vec[ival] <= vec[ival + 1], ++ival
true
15809fb4fe9d4505c0b7e2692d6d84e201287e66
C++
brandtamos/arduino-binary-clock
/sketch_apr01a/sketch_apr01a.ino
UTF-8
4,415
2.796875
3
[]
no_license
/* Binary clock */ //#include <math.h> //M0 pins //these uses the analog input pins because we need //pins 2 and 3 for interupts! const int M0_BIT0_PIN = A0; const int M0_BIT1_PIN = A1; const int M0_BIT2_PIN = A2; const int M0_BIT3_PIN = A3; //M1 pins const int M1_BIT0_PIN = 4; const int M1_BIT1_PIN = 5; const int...
true
90cf0f559f6f712c62404edb6669b39135de99bc
C++
sarthak815/DS_Manipal
/Lab/Lab3(Stacks)/q3.cpp
UTF-8
1,383
3.640625
4
[]
no_license
#include<iostream> #include <stdlib.h> using namespace std; const int N=5; const int Size=10; class nStacks{ private: int s[Size]={0}; int item; int stk; int top[N]; int bottom[N+1]; public: nStacks(){ for(int i=0,j=-1;i<N;i++,j+=Size/N){ ...
true
6bbddeb6105cf04d5b666a2662f115f17f7d4e1b
C++
lucasandre22/cpp-mini-projects-and-studies
/ThreadsImpl/Thread.h
MacCentralEurope
1,224
3.0625
3
[]
no_license
#define HAVE_STRUCT_TIMESPEC #include <pthread.h> #include <iostream> #pragma once class Thread { private: pthread_t _threadID; pthread_attr_t _tAttribute; static pthread_mutex_t _mutex; static void* runThread(void* pThread) { Thread* aux = static_cast<Thread*>(pThread); try { aux->run(); } catch (......
true
27c1d93720fd15e47fb686ad68fe9bbd65e468b9
C++
moh-C/microprocessorSmartWatch
/sevenSegment_counter.ino
UTF-8
3,772
2.859375
3
[]
no_license
int a = 9; int b = 10; int c = 13; int d = 12; int e = 11; int f = 6; int g = 8; void setup() { pinMode(a,OUTPUT); pinMode(b,OUTPUT); pinMode(c,OUTPUT); pinMode(d,OUTPUT); pinMode(e,OUTPUT); pinMode(f,OUTPUT); pinMode(g,OUTPUT); } void loop() { zero(a,b,c,d,e,f,g); delay(1000); one(a,b,c,d,e,f,g);...
true
9fb02ff3179803f29b70cc9f1c9a514b580c9a3e
C++
bchesley97/FroggerV2
/FroggerV2/FroggerV2/Frog.h
UTF-8
404
2.515625
3
[]
no_license
#pragma once #ifndef FROG_H #define FROG_H #include "Vehicle.h" class Frog { private: sf::RectangleShape *shape; const int jump_length = VEHICLE_LENGTH; int lane; public: Frog(); sf::RectangleShape* getShape(); const int getJump(); int getLane(); void Frog::incrementLane(); void Frog::decrementLane(); ...
true
4fbc16711bca03c183c7a8a40a56ea74998e40ab
C++
tatt61880/atcoder
/submissions/abc023_c/main.cpp
UTF-8
1,120
2.546875
3
[]
no_license
#include <iostream> #include <string> #include <map> #include <set> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <functional> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> using namespace std; typedef long long LL; typedef unsigned long long ULL; const LL...
true