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
15e4dc2ee5d69cbe5593773172b4a36c73a761f3
C++
DemonikOpen/SFNet
/src/VoiPClient.cpp
UTF-8
1,185
2.59375
3
[]
no_license
#include "VoiPClient.hpp" voip::Client::Client() { audioStream = new voip::AudioStream(); audioRecorder = new voip::AudioRecorder(*this); } voip::Client::~Client() { if(audioStream != NULL) { delete audioStream; audioStream = NULL; } if(audioRecorder != NULL) { dele...
true
d9a4bec223eb13effe85270b98a4eab461917e16
C++
ProfJust/MCT1
/Praxisdemo Kap10_Echo und Encoder/MCT1_Kap11_sw01_Fischertechnik Encoder Motor/MCT1_Kap11_sw01_Fischertechnik_Encoder_Motor/MCT1_Kap11_sw01_Fischertechnik_Encoder_Motor.ino
UTF-8
1,233
2.65625
3
[]
no_license
//========================================== // Westfälische Hochschule - FB Maschinenbau // Prof. Dr.-Ing. Olaf Just // MCT1, Version vom 27.4.2018 //-------------------------------------- // MCT1_Kap11_sw01_Fischertechnik Encoder Motor.ino //-----E-Blocks ------------------------ // LED - Board an Jx (D8-D15) + Powe...
true
72021b601eefb1995ccd7ce1e1a66622006330d7
C++
TASMIAHASAD/Assignment2sorted
/SortedType.h
UTF-8
640
3.125
3
[]
no_license
#ifndef SORTEDTYPE_H_INCLUDED #define SORTEDTYPE_H_INCLUDED template <class ItemType> class SortedType { struct NodeType { ItemType info = ItemType(); NodeType* next = NULL; }; public: SortedType(); ~SortedType(); bool IsFull(); int GetLength(); void MakeEmpty(); bool IsEmpty(); ItemType Ge...
true
7d581d7758d542b79a3a9e7d7b925169121085ba
C++
1601110116/LePlasma_Visual
/LeFrame/src/Stage.cpp
UTF-8
460
2.53125
3
[]
no_license
/* * Stage.cpp * * Created on: Apr 24, 2016 * Author: zlstudio */ #include <Stage.h> Stage::Stage(const char* title,int x,int y,int w,int h): title(title), stageX(x),stageY(y), stageWidth(w),stageHeight(h) { this->x=0; this->y=0; stage=this; } Stage::Stage():title(title), stageX(0),stageY(0), stage...
true
029510b0cd701d088bc4670fd6710c4b2b672924
C++
Flash1ee/voyager-game
/libs/math/test/tests/utilits_tests.cpp
UTF-8
16,043
2.84375
3
[]
no_license
#include <gtest/gtest.h> #include <tuple> #include <math/utilits.hpp> #include <math/vector2d.hpp> struct rotate_test { math::coords_t point; math::decimal_t angle; math::coords_t basis; math::coords_t answer; }; // для фикса утечек gtest при попытки вывода данной структуры void PrintTo(const rotate...
true
162c2d0b227ab57cecf9d3f7fb17e66d09d0079a
C++
raju2592/problem-solving
/topcoder/PowerOfThree.cpp
UTF-8
7,077
2.875
3
[]
no_license
/** * SRM: 604 * Div: 1 * Point: 250 */ #include<cstdio> #include<ctime> #include<iostream> #include<cmath> #include<cstring> #include<algorithm> #include<cstdlib> #include<vector> #include<stack> #include<queue> #include<map> #include<set> #include<utility> #define ll long long #define ull unsigned ll #define pb p...
true
1f8928f834597668ec6e412c3eec4ae4cf0a8d45
C++
jdisset/gaga
/tests/sqlite_tests.hpp
UTF-8
4,805
2.671875
3
[ "MIT" ]
permissive
#include "../dna/arraydna.hpp" #include "../extra/sqlitesave/sqlitesave.hpp" #include "../gaga.hpp" #include "../novelty.hpp" #include "catch/catch.hpp" #include "dna.hpp" TEST_CASE("SQL") { // types that will be used in this test using dna_t = GAGA::ArrayDNA<int, 256>; // our DNA: 256 integers. using Ind_t = GAGA...
true
9bc47d8114bea526428ef9d732bf0b57d8ad58bf
C++
MaSteve/UVA-problems
/UVA10288.cpp
UTF-8
1,376
2.8125
3
[ "MIT" ]
permissive
#include <iostream> #include <cmath> using namespace std; typedef long long ll; typedef pair<ll, ll> ii; ll gcd(ll n, ll m) { ll auxi; if (m > n) { auxi = n; n = m, m = auxi; } while (m != 0) { auxi = n; n = m, m = auxi%m; } return n; } ii sum (ii & a, ii & b) ...
true
c51359f888fc7ed8661bfdaf008ba217c02919c2
C++
habi-a/codingame
/singlePlayer/medium/stock-exchange-losses.cpp
UTF-8
898
2.859375
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int n; vector<int> valuesDiff; vector<int> maxLosses; vector<unsigned int> values; cin >> n; cin.ignore(); for...
true
cd89743b92ca267b1483c19290ea9b0b65830fbf
C++
whosxavierwu/LeetCodeSolution
/leetcode_5069/leetcode_5069.cpp
UTF-8
3,202
3.125
3
[]
no_license
// leetcode_5069.cpp : This file contains the 'main' function. Program execution begins and ends there. // /* Given a string s, return the last substring of s in lexicographical order. Example 1: Input: "abab" Output: "bab" Explanation: The substrings are ["a", "ab", "aba", "abab", "b", "ba", "bab"]. The lexicographi...
true
1afa495d56c009ededb058710a8e1d5df2878442
C++
redhatlonghairdontcare/fastcat
/src/manager.h
UTF-8
6,094
2.640625
3
[ "BSD-2-Clause" ]
permissive
#ifndef FASTCAT_MANAGER_H_ #define FASTCAT_MANAGER_H_ // Include related header (for cc files) // Include c then c++ libraries #include <memory> #include <queue> #include <unordered_map> #include <vector> // Include external then project includes #include <yaml-cpp/yaml.h> #include "fastcat/device_base.h" #include ...
true
c84cdf112a74a6b6344dd61ff0c00f68357e2a0a
C++
Strider-7/code
/BST/pair-with-given-sum.cpp
UTF-8
2,029
3.578125
4
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node *left; Node *right; Node(int x) { data = x; left = nullptr; right = nullptr; } }; Node *insert(Node *root, int data) { if (!root) return new Node(data); if ...
true
42eba828b8cd6fa441303bd6e7ec40e8057da02f
C++
Adarsh76/C-plus-plus-programs
/C_BY_REF.CPP
UTF-8
368
3.625
4
[]
no_license
//WAP to swap two nos using call by references parameter(by alias) #include<iostream.h> #include<conio.h> void main() { int x,y; void swap ( int &,int &); clrscr(); cout<<"\n Enter X and Y "; cin>>x>>y; swap(x,y); cout<<"\n After swapping "<<x<<" "<<y; getch(); } void swap(int &a, int...
true
63949d2c666f83c35d275da60e51af2b9d54e7a3
C++
JoshuaHolloway/Parallel_Programming
/Windows/Threading_Advisor_Exercise_Files/01_01/Advisor Demo App/Advisor Demo App/src/TaskHandler.h
UTF-8
1,831
3.484375
3
[]
no_license
#ifndef TASK_HANDLER_H #define TASK_HANDLER_H #include <thread> #include <chrono> using namespace std; // The TaskHandler object is a thread which handles asynchronous execution of a given task. // It takes in a task to be repeatedly executed on a separate thread. class TaskHandler { public: static const long s_I...
true
d31d3f300ee0999b696405dfeca0f42ef050641c
C++
wangxing0608/CtCI
/Linked_Lists/Partition.cpp
UTF-8
2,825
4.125
4
[]
no_license
// // Created by wangxing on 19-7-12. // // 2.3 使用x分隔链表中的节点,使得节点中数值小于x的出现在x节点之前,大于x的出现在x之后 // 如果x出现在链表中,只需要出现在比它小的节点之后 #include <iostream> #include <random> struct Node { int data; Node *next; Node (int d): data{ d }, next {nullptr} {} }; void insert(Node * &head, int data) { Node *newNode = new Nod...
true
0afe3760d9d9dc3447ec2f4699f03919b076f394
C++
sakibakon/template-
/lower_bound.cpp
UTF-8
1,984
4.28125
4
[]
no_license
// C++ code to demonstrate the working of lower_bound() #include<bits/stdc++.h> using namespace std; int main() { int i=0; vector<int> arr1(6);// = {10, 15, 20, 25, 30, 35}; arr1[i++]=10; arr1[i++]=15;arr1[i++]=20;arr1[i++]=25;arr1[i++]=30;arr1[i++]=35; cout << "The position of 20 using lower_...
true
5db187f6885642fe7bc4fc3161704ef8ceaa9a37
C++
Riflio/Cameron
/Plugins/usingleton.h
UTF-8
887
3.078125
3
[]
no_license
#ifndef USINGLETON_H #define USINGLETON_H #include <QtGlobal> //#pragma warning(disable : 4355) template <class T> class uSingleton { public: uSingleton(T& rObject) { Q_ASSERT_X(!s_pInstance, "constructor", "Only one instance of this class is permitted."); s_pInstance = &rObject; } ~uSing...
true
c1cd8e892dc8ed9d5c8722f0cfc9e5f6a766a5dd
C++
Lisaflyz/TextDetection
/swt/Line.cpp
UTF-8
2,705
3.25
3
[]
no_license
#include <math.h> #include <opencv2/core/core.hpp> #include "Line.hpp" /** * Line drawing based on Breseham's algorithm * * @author naoki * */ Line::Line() { } /** * Line drawing using the Simplification code in Wiki. * * point.x: vertical direction (row) point.y: horizontal direction (co...
true
e033e5fcbf9c8d754a36dcdff4d5df6181af9c1b
C++
famez/J1939-Framework
/Tests/SPNStatus_test.cpp
UTF-8
2,866
2.828125
3
[ "MIT" ]
permissive
#include <gtest/gtest.h> #include <J1939Common.h> #include <SPN/SPNStatus.h> using namespace J1939; TEST(SPNStatus_test, constructor) { //Test constructor SPNStatusSpec::DescMap valueToDesc { {0, "Desc 0"}, {1, "Desc 1"}, {2, "Desc 2"}, {3, "Desc 3"}, }; SPNStatus status(100, "test_status", 4, 2, 2,...
true
253dc93221067bd04d6b3a61202d124e2eea9442
C++
OHDSI/Cyclops
/standalone/codebase/CCD/imputation/ImputationPolicy.cpp
UTF-8
4,896
2.546875
3
[ "Zlib", "Apache-2.0" ]
permissive
/* * ImputationHelper.cpp * * Created on: Jul 28, 2012 * Author: Sushil Mittal */ #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <map> #include <cstdlib> #include <cstring> #include <algorithm> #include <time.h> #include "ImputationPolicy.h" #define MAX_ENTRIES 10000...
true
5145c1a7844b1a23373777a717d1e9bd21e7e3fe
C++
michelwandermaas/p_hamiltonian_heuristic
/BinaryHeap.h
UTF-8
456
2.75
3
[]
no_license
#ifndef BINARY_HEAP_H #define BINARY_HEAP_H #include <math.h> #include <stdlib.h> #include <iostream> using namespace std; #define MINUS_INFINITY -10000000000.0 class BHNode { public: double key; int p; int position; }; class BinaryHeap { public: BinaryHeap(int n); ~BinaryHeap(); void Insert(BHNode *node); ...
true
f06b28b4173d69927c4a617139a1a37c3920bdf9
C++
PawelZydek/university-db
/src/Pesel.cpp
UTF-8
3,989
3.078125
3
[]
no_license
#include "Pesel.hpp" #include <algorithm> #include <array> #include <cmath> #include <iomanip> static constexpr int peselLen{11}; Pesel::Pesel(const std::array<uint8_t, 11>& numbers) : pesel_(numbers) {} int Pesel::get_day() const { return pesel_.at(4) * 10 + pesel_.at(5); } int Pesel::get_month() const { ...
true
d1666b807108a70803031aef42976d17e49e4801
C++
jdileo4/JohnMarianoKevin
/Parse.cpp
UTF-8
13,332
3.21875
3
[]
no_license
#include "Token.h" #include "Engine.h" #include <vector> #include <iostream> #include <fstream> #include <sstream> //TODO: #define TYPE_ERROR -1 #define CANT_FIND_TABLE -21 Engine engine; bool isInteger(const string & s) { if(s.empty() || ((!isdigit(s[0])) && (s[0] != '-') && (s[0] != '+'))) return false ; ...
true
267025fb97de541c045a0fe178c8851f97e4ed71
C++
gwqw/LeetCodeCpp
/Algorithms/medium/863_all_nodes_distk_BT.cpp
UTF-8
2,808
4
4
[]
no_license
/** 863. All Nodes Distance K in Binary Tree We are given a binary tree (with root node root), a target node, and an integer value k. Return a list of the values of all nodes that have a distance k from the target node. The answer can be returned in any order. Example 1: Input: root = [3,5,1,6,2,0,8,null,null,7,4...
true
0dbe2acca894b62b258d8c7943a50076d792b23f
C++
pellarolojuani/datos2c2014seventyfivezerosix
/tpDatosPredictor/BIS/NGramas.cpp
UTF-8
8,237
2.78125
3
[]
no_license
/* * NGramas.cpp * * Created on: 30/10/2014 * Author: juanignacio */ #include "NGramas.h" NGramas::NGramas() { this->lexico = new abb::ArbolB<Registro, 60>; this->cantGrama = 0; separadorNgrama = " "; listaTerminos = vector<string>(); this->registros = tr1::unordered_map<string, size_t>(); this->orac...
true
09fcfd043bb1882da01d9abaa214b1c9ab337f1f
C++
arfaouiGit/OOP2
/code/misc/mem.cpp
UTF-8
4,487
3.75
4
[]
no_license
/* * Experiments with memory, illustrating the use of * memory operators and `sizeof()`. * */ #include <cstddef> #include <iostream> #include <iomanip> using namespace std; /* * f() exists to help us further explore the stack! * */ int f(int n, byte* end) { int j = n; int k = n % 23; cout << "Addre...
true
29502124651c9147c83949b31bba5fd82b587d3a
C++
sebCarabali/Problem-Solving-and-Programming-II
/Lecture/08 Friends and Operator Overloading/Sample Code/Friend Function/main.cpp
UTF-8
354
2.703125
3
[]
no_license
#include <iostream> using namespace std; #include "Button.h" int main() { Button buttons[5]; buttons[0].Setup( "New", 15, 5 ); buttons[1].Setup( "Save", 15, 3 ); buttons[2].Setup( "Save", 15, 3 ); buttons[3].Setup( "Undo", 10, 5 ); buttons[4].Setup( "Exit", 12, 3 ); for ( int i = 0; i < 5; i++ ) { Dra...
true
94274028027748edb641060b78bac559eae16be8
C++
KarinaKlevzhits/labs
/Lab8/fill.h
UTF-8
251
3.125
3
[]
no_license
#pragma once template <class Dynamic> void feelA(Dynamic a, int m) { for (int i = 0; i < m; ++i) { a[i] = i; std::cout << a[i] << " "; } } template <class Dynamic> void feelB(Dynamic b, int n) { for (int i = 0; i < n; ++i) { b[i] = i; } }
true
557c7fcac8e36173dfed8417c2a34d7453f5a4f1
C++
L4v/os_school
/v11/prioritet/rasporedjivac.h
UTF-8
2,505
2.890625
3
[]
no_license
#ifndef RASPOREDJIVAC_H_INCLUDED #define RASPOREDJIVAC_H_INCLUDED #include <mutex> #include <vector> #include "dijagnostika.h" #include "cv_hrono.h" #include "red.h" using namespace std; using namespace chrono; class Rasporedjivac { private: Dijagnostika& dijagnostika; vector<Red> prioriteti; mutex m; ...
true
10e815b93b9d67f79c76fa337860f623019dc814
C++
byte98/A2B37CPP
/MatrixCalculator/Main.cpp
UTF-8
1,385
3.375
3
[]
no_license
#include "Matrix.h" #include <iostream> #define EXIT_ERR_INPUT -1; #define EXIT_ERR_OPERATOR -2; /* Main program */ int main(int argc, char *argv[]) { Matrix NULL_MX = NULL_MATRIX; int reti = EXIT_SUCCESS; //Load first matrix Matrix M1 = NULL_MATRIX; M1.loadFromInput(); if (M1 == NULL_MX) { reti = EXIT_ERR_...
true
b05802216c0c361317d3a0f5ffba2c7638c3982d
C++
dongfusong/CmdStringMatching
/src/CmdStringPath.cpp
UTF-8
1,123
2.6875
3
[]
no_license
#include "CmdStringPath.h" #include "PartitionSymbolDef.h" #include <iostream> #include <assert.h> using namespace std; CmdStringPath::CmdStringPath(const std::string& str):_currentIndex(0),_str(str){ } int CmdStringPath::parse() { int beginPos = 0, endPos = 0; while (beginPos < _str.size()) { if (isSymbol (_str...
true
9e088b7079e2a82fbc6ecf53f4ae0fdd754c79f3
C++
klinki/MI-RUN
/Tests/Utf8StringTest.cpp
UTF-8
677
2.828125
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "CppUnitTest.h" #include "../JVM/utils/HashMap.h" #include "../JVM/utils/Utf8String.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace Tests { TEST_CLASS(Utf8StringTest) { public: TEST_METHOD(testHash) { Utf8String a("This should get converted to UTF8 s...
true
b12e080f0391cebf1dcf4a7262b055e5267c58ea
C++
AlexChiang0208/C_plusplus_beginner
/資料結構/vector練習.cpp
BIG5
481
3.28125
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ char choice; vector<int>myVec; while(1){ cout << "O_nsW(Y/N)"; cin >> choice; if(choice == 'Y'){ int temp; cin >> temp; myVec.push_back(temp); } if(choice == 'N'){ break; } } sor...
true
cc08a970c3062eb3433745d86e948cc89fbedf33
C++
smallwolf1991/xlib
/hex_str.cc
UTF-8
13,213
2.640625
3
[]
no_license
#include "hex_str.h" #include <string.h> #include "xmsg.h" #include "ws_s.h" #include "ws_utf8.h" using std::string; //! 十六进制转换,小写索引 static const char* const gk_NumFmt_Low = "0123456789abcdef"; //! 十六进制转换,大写索引 static const char* const gk_NumFmt_Up = "0123456789ABCDEF"; string hex2str(const void* hexs, const si...
true
8259fad728aa164e3a798c3a1c8f0c8088c1043f
C++
njumathdy/code-practice
/Leetcode/543_Diameter of Binary Tree/c++/solution.cpp
UTF-8
1,812
3.640625
4
[]
no_license
/******************* Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root. *******************/ #include <cstdlib> #include <cstdio> #include <exce...
true
921510ba7b7d03bbc0cd465029595df2c8dc1e17
C++
kvolden/Pmatch
/sub_rule.h
UTF-8
2,215
3.203125
3
[]
no_license
#ifndef Sub_rule_h #define Sub_rule_h #include <vector> #include <string> #include "pcast.h" class Sub_rule { // Sub rule for testing one single input private: bool invert; // Whether to invert final answer (not-transition) bool wildcard; std::vector<std::string> single_values; std::...
true
fed1ca6a035e7bab640643ef6602de799f9dd05e
C++
ignacioreyes/opengl_experiments
/experiments/src/tests/Test3D.cpp
UTF-8
3,282
2.5625
3
[]
no_license
#include "Test3D.h" #include <GL/glew.h> #include "imgui/imgui.h" #include "glm/glm.hpp" #include "glm/gtc/matrix_transform.hpp" namespace test { Test3D::Test3D() : m_ViewFrom {0.0f, 0.0f, 1000.0f}, m_ModelCenter {0.0f, 0.0f, 0.0f}, m_ModelAngle(0.0f) { UpdateMV...
true
aa56b9c96a853778a1e961c89a8d34868ae445e5
C++
AliZ786/CPP-Codes
/Vectors/main.cpp
UTF-8
2,091
3.78125
4
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { vector<int> vector1; vector<int> vector2; int score_1 {0}; int score_2 {0}; cout<<"Enter the first number that you want to add in vector1: "; cin >> score_1; vector1.push_back(score_1); cout <<"\nEnter th...
true
12c7bcd676bac68c0e3976e4cf64ab38f82a0b3c
C++
A-Samad1206/cpp
/Prev/c++ code/daily practice/NUMBERS/03 abundant no. DEFIECIENCY.cpp
WINDOWS-1252
708
3.9375
4
[]
no_license
//consider the number 21. Its proper divisors are 1, 3 and 7, and their sum is 11. //Because 11 is less than 21, the number 21 is deficient. //Its deficiency is 2 21 - 32 = 10. //ABUNDANT NO. whose sum of prime factors is greater than the number itself. #include<iostream> using namespace std; int dis_prime(int); m...
true
17aa484fe7e7759c6a17b4387648f0228cc65754
C++
cjhgo/learn_and_use
/cpp/mystl/ringbuffer.cpp
UTF-8
2,665
3.546875
4
[]
no_license
#include <stdlib.h> #include <iostream> class RingBuffer2 { public: RingBuffer2(int capacity_): capacity(capacity_),size(0),head(0),tail(0) { data = (int*)malloc(capacity*sizeof(int)); } void show() const { for(int i = 0; i < size; i++) { int index = (head+i)%capacity; std::cout<...
true
0322bdb10c9723513a98f922a7dc3ac954bf9708
C++
ssprusakov/far-git-autocomplete
/src/RefsDialog.cpp
UTF-8
5,266
2.53125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#include "RefsDialog.h" #include <algorithm> #include <cassert> #include "GitAutocomplete.hpp" #include "Guid.hpp" #include "GitAutocompleteLng.hpp" #include "Utils.hpp" using namespace std; static size_t MaxLength(const vector<string> &list) { return (*max_element(list.begin(), list.end(), [](stri...
true
da3cf779c29b0ed306edc55c2e22a9c7c9685c29
C++
hejh6408/cal-2020
/arithmetic/arithmetic.h
UTF-8
848
2.671875
3
[]
no_license
#pragma once #ifndef ARITHMETIC_H #define ARITHMETIC_H #include "definition/definition.h" #include <memory> #include <cstdbool> class arithmetic; typedef std::shared_ptr<arithmetic> pArithmetic; class arithmetic { public: arithmetic(const size_t size); virtual ~arithmetic(); void intializeResult(const...
true
72bbd3543c89eed607c9af47a6a94863232987f0
C++
PeterYHChen/idea-of-acm-problem-solutions
/problems-base/hdu/hdu-general/hdu-findTheMostComfortableRoad/solution.cpp
UTF-8
1,770
3.03125
3
[ "MIT" ]
permissive
#include <iostream> #include <string.h> #include <queue> #include <vector> using namespace std; int n, m; int start, end, speed; bool mark[201][201][201]; struct Node{ int val, speed; }; vector<Node> adjacent[201]; struct Transfer{ int s, m, e; int min, max; }; class comp{ public: bool operator()(Transfer &a,...
true
b6328e5d6be89c37edf7d974df273ec6d9384838
C++
lwzswufe/CppCode
/Chapter04/prec.cpp
UTF-8
657
4.03125
4
[]
no_license
// 运算符优先级 #include <iostream> using std::cout; using std::endl; int main() { cout << 6 + 3 * 4 / 2 + 2 << endl; // parentheses in this expression match default precedence and associativity cout << ((6 + ((3 * 4) / 2)) + 2) << endl; // prints 14 int temp = 3 * 4; // 12 int temp2 = temp / 2; // 6 i...
true
9c4b3d081182a539b11fd2abe44ecc07ce1e2652
C++
hschoi1104/stupid-week-2021
/2021/05/30/jh20s/contest#238/1837.cpp
UTF-8
461
2.765625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
class Solution { public: int longestBeautifulSubstring(string word) { int cnt = 0; int ans = 0; int now = 0; vector<char> v = { 'a','e','i','o','u','k' }; int i = 0; while (i<word.size()) { if ((word[i] == v[now]) || (cnt!=0 && word[i] == v[now + 1])) { cnt++; if (word[i] == v[now + 1]) now++; if...
true
4a2c4d52d7b0ebc6f9ebde60a466d0bbd63a3f8a
C++
lamer0k/stm32Labs
/Lab7Empty/main.cpp
UTF-8
1,787
2.953125
3
[]
no_license
#include "adc1registers.hpp" //for ADC1 #include "adccommonregisters.hpp" //for ADCCommon #include "gpioaregisters.hpp" //for Gpioa #include "gpiocregisters.hpp" //for Gpioc #include "rccregisters.hpp" //for RCC #include "tim2registers.hpp" //for TIM2 #include <iostream> extern "C" { int __low_level_init(void)...
true
06f790b5971b78cd2146c2f696f171b95d697a2e
C++
odiraitis/VEKTORIUS
/vekt_class/vektorius.h
UTF-8
15,971
3.09375
3
[]
no_license
#define pragma once #include <initializer_list> #include <algorithm> #include <iterator> #include <exception> #include <memory> #include <cstddef> #include <utility> template<class T,class Alloc = std::allocator<T>> class Vector { private: size_t sz{}; size_t max{}; T *elem; friend Vector<T> operator+(...
true
fcb17e5bf12c0e2fa84f69749152eb9f1ad9959f
C++
FariaLucas/Hots
/Hots/src/Torre.h
UTF-8
623
2.5625
3
[]
no_license
#pragma once #include "ofMain.h" #include "Meteoro.h" class Torre { private: ofVec2f m_posicao; ofImage m_imagem; Meteoro* meteoro[20]; int m_numeroMeteoro, m_tempo; bool m_ataque, m_status; public: Torre(int x, int y); ofVec2f GetPosicao(); int GetMeteoroNumero(); bool Radar(ofVec2f posicao); bool GetA...
true
273be12fb1d6f26b0b7407c3f07ae8eb822bf1c0
C++
fvandepitte/dailyprogrammer
/_ideas/Rumikub/source.cpp
UTF-8
729
3.4375
3
[]
no_license
#include <iostream> #include <set> #include <algorithm> struct letter { char c; int v; }; inline bool operator<(const Letter& lhs, const Letter& rhs) { return lhs.c == rhs.c : lhs.v < rhs.v ? lhs.c < rhs.c; } bool isVallidGroup(const std::set<letter>& letters){ if (letters.size() < 3) return ...
true
968c82d8383411573989da33bb7f685d26bfc4f0
C++
Parean/Homeworks
/1/Hw6/Task6.1/tree.cpp
UTF-8
4,118
3.625
4
[]
no_license
#include "tree.h" #include <stdio.h> TreeNode *removeElement(TreeNode *treeNode, TreeNode *&temp); TreeNode **findNode(TreeNode *&treeNode, int value); TreeNode *addInTree(Tree *tree, TreeNode *treeNode, int value); void deleteNode(TreeNode *&treeNode); void printInDescendingOrder(TreeNode *treeNode); void printInAsce...
true
f217b5062cbc853eb2d2fa4e207d054091f6c3e8
C++
KoTLiK/network
/src/server.cpp
UTF-8
2,013
3.046875
3
[ "MIT" ]
permissive
#include <iostream> #include <csignal> #include "Network.h" Net::Server server(Net::Datagram::TCP); void signalHandler(int) { server.stop(); std::cout << "\nShutting down...\n"; exit(0); } int main() { std::string input; signal(SIGINT, signalHandler); std::string delimiter = "."; Net::...
true
ca450d080707f85f9118a4c1442fde9aabd0e33d
C++
shashank0107/CP-Solutions
/UVA 757.cpp
UTF-8
4,198
2.625
3
[]
no_license
/* Note that John will plan his travel linearly, i.e., after going to 2 from 1 he won't come back to 1 Now we'll just find the value of dp[i][ti] : fishes caught in pos i till time ti ( 1 ti = 5 min ), this value only depends on the previous state and the time of transition from the previous lake to the current *...
true
5592da1facd5c6599619d5e162f0a4f5d0875edf
C++
acastellanos95/AppCompPhys
/CH18/NITROGEN/N2.cpp
UTF-8
10,422
2.90625
3
[ "MIT" ]
permissive
/* N2.cpp Ryckaert method for dumbbell N2 this time with standard Verlet molecule index m:0->N_mol-1) atom index a:(0,1) particle index i:(0->2N_mol-1) */ #include <iostream> #include <fstream> #include <cmath> #include <random> #include <vector> using namespace std; typedef mt19937_64 MersenneTwi...
true
dbb5a3febcedf9e98f8f625b6d808b47e485a6e2
C++
Dogbone0714/C-_Database
/A56.cpp
UTF-8
248
2.765625
3
[]
no_license
#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; int main(void){ for(;;){ int a,sum=0; double b=0.1; cin>>a; while(a/2>=1){ b*=10; sum=sum+(a%2)*b; a/=2; } cout<<b*10+sum<<endl; } }
true
81b84968bedfd2cc620e61897d349fa29e7c5a88
C++
ramonjunquera/GlobalEnvironment
/RPi/Geany/02 cpp/08 Lists/01 ForwardList/ForwardList.cpp
UTF-8
4,324
3.640625
4
[]
no_license
/* * Autor: Ramón Junquera * Tema: Programación en C++ * Objetivo: Lista simple * Material: Raspberry Pi * Descripción: * Las listas son una de las estructuras más utilizadas en programación. * * En el ejemplo actual aprenderemos a utilizar una lista simple. * Son aquellas que un elemento guarda un valor y un...
true
4157e1a35a01d907200c9d263f335055f875fb08
C++
AlexDz27/cpp-fiddles
/projects/template-functions/main.cpp
UTF-8
240
3.375
3
[]
no_license
#include <iostream> #include <string> using namespace std; template<typename T> T sum(T a, T b) { return a + b; } int main() { double a = 2.4; double b = 3.5; double result = sum<double>(a, b); cout << result; return 0; }
true
be72d0bfcf410899c6eb09b3477275fa4d5f9eb1
C++
gr001/PeaksProcessing2
/Bridge/section.cpp
UTF-8
1,930
2.625
3
[]
no_license
// This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // This program is distributed in the hope that it will be useful, ...
true
0c11a750a5f91fc45ced1697373c7693e36df5dc
C++
IvanovskyOrtega/Udemy-Curso-Cpp
/S2-Operaciones-Basicas/promedioNotas.cpp
UTF-8
494
3.84375
4
[]
no_license
#include <iostream> using namespace std; int main(){ /** EJERCICIO 3 **/ /** Escriba un programa que lea 3 notas y escriba el promedio final. **/ float nota1, nota2, nota3, promedio; cout << "Ingresa la primer nota: "; cin >> nota1; cout << "Ingresa la segunda nota: "; cin >> n...
true
fd17c0436c8a2d982f23ceab1e474e0bbaded4b3
C++
15831944/nfpvr
/nfpvrlib/Bitfield.h
UTF-8
1,008
2.765625
3
[]
no_license
#ifndef __bitfield_h__ #define __bitfield_h__ #include "NfpvrTypes.h" namespace nfpvr { class Bitfield { public: Bitfield(uint8* buffer, int length); void attach(uint8* buffer, int length); template <typename T> static T decode(const uint8* buffer); template <typename T> static void encod...
true
b574b42c46ef22585b2733ce575fe786b2c91e78
C++
wonderly321/CodeExercise
/LCS&LIS/d.cpp
UTF-8
1,891
2.609375
3
[]
no_license
/* * Author : Wonderly321 * Create Time : 2018-12-08 21:26:09 * File Name : d.cpp */ #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #include <string> #include <set> #include <vector> #include <map> #include <stack> #include <ctime> #include <sstream> using namespac...
true
2575abc1a4aa5e92318e4834c99b4fdc9acf6e29
C++
nathreya/karma
/lex.cpp
UTF-8
15,893
2.578125
3
[]
no_license
#include "stdafx.h" #include "lex.h" #include "lex_utils.h" namespace __karma { namespace __lex { string remove_line_continuations(string source) { vector<string> tpsplt; int index = 0; string ret; for(int i = 0; i < source.length(); i++) { if(source.substr(i,_new_line.length()) == _new_line) { ...
true
d9f48651d2a200428a89fda8a2bcfc77aaf9171f
C++
Bulkas456/BOTS
/BOTS/BotsEngine.Tests/DamageManipulatorTests.cpp
UTF-8
4,488
3
3
[]
no_license
#include "stdafx.h" #include "CppUnitTest.h" #include "CppUnitTestAssert.h" #include "../BotsEngine.Damage/DamageManipulator.h" #include "../BotsEngine.Damage/DamageManipulatorMethods.h" #include "../BotsEngine.Damage/DamageType.h" #include "../BotsEngine.Damage/DamageData.h" using namespace Microsoft::VisualStudio::C...
true
5323e0570d6863cd957365b35abf6d8ef72219cc
C++
BilalAli181999/OOP-IN-C_Plus_Plus
/oop Mid term last question/oop Mid term last question/Header1.h
UTF-8
455
2.875
3
[]
no_license
#ifndef HEADER1_H #define HEADER1_H #include<iostream> #include"header.h" using namespace std; class A { int a; public: A(int i=0) { cout << "\n para cons of A"; } A(A & ref) { cout << "A::A(A& ref)"; } void operator=(A& ref) { cout << "A::operator =(A& ref)"; } A(B & ref) { cout << "A::A(B& ref)"...
true
141155b1e37151cce1a73fce4e045f790073c82a
C++
GabeOchieng/ggnn.tensorflow
/program_data/PKU_raw/46/2270.c
UTF-8
881
2.875
3
[]
no_license
void main() { int a[105][105]; int flag=1,loci=0,locj=0,row,col,upwall=0,downwall,rightwall,leftwall=-1,i,j; scanf("%d %d",&row,&col); for(i=0;i<row;i++) for(j=0;j<col;j++) scanf("%d",&a[i][j]); rightwall=col; downwall=row; for(i=1;i<row*col;){ if(locj+1<rightwall&&flag==1){printf("%d\n",a[loci...
true
735785f35c030a6c99d5b5af3e7bd25f8e0f5f17
C++
taylor0000/Client-Database-System-PP3
/Client.cpp
UTF-8
907
2.65625
3
[]
no_license
/************************************************************************ Programming Project #3 -- Team Project for C++ Client Database System Exp ArbitraryForClientsAndRepsansion // Client Database Project.cpp : This file contains the 'main' function. Program execution begins and ends there. // //TODO: Saving to t...
true
cbe79b8c1633ffcacccefcad0f796e088658796c
C++
zackliscio/topicmapping
/Sources/TopicMapping/optimize_alpha.cpp
UTF-8
950
2.65625
3
[]
no_license
# include "../standard_package/standard_include.cpp" #include "lda_util.cpp" #include "alpha_optimization.cpp" int main(int argc, char * argv[]) { if(argc<2) { cout<<argv[0]<<" [gamma_file]"<<endl; cout<<"computes alphas and writes to file:: "; cout<<"alphas.txt"<<endl; ...
true
422968a213213a509ad39ac21e88795c0bc60188
C++
MathisLeclair/piscine-cpp
/d04/ex00/Peon.hpp
UTF-8
367
2.59375
3
[]
no_license
#ifndef PEON_HPP # define PEON_HPP # include <string> # include <iostream> # include "Victim.hpp" class Peon: public Victim{ public: Peon(std::string name); Peon(Peon & src); ~Peon(); Peon & operator=(Peon & src); virtual void getPolymorphed() const; private: Peon(); }; std::ostream & op...
true
f7123d39e8f1693c37fcc6e402c1ef13049dfa5f
C++
mathieuwang/myproject
/myproject/leetcode_11_maxarea/leetcode_11_maxarea/maxarea.cpp
UTF-8
828
3.078125
3
[]
no_license
// // maxarea.cpp // leetcode_11_maxarea // // Created by mathieuwang on 15/9/2. // Copyright (c) 2015年 mathieuwang. All rights reserved. // #include <stdio.h> #include <vector> using namespace std; class Solution { public: int maxArea(vector<int>& height) { int hsize = (int) height.size(); i...
true
1aca1c9243dc193408e3925c060c0ea65952541a
C++
zproksi/lanczos
/CommandQueue.h
UTF-8
1,801
2.953125
3
[]
no_license
#pragma once namespace DialogsSync { class Command { public: enum cmdtype : uint32_t { cmdNothing = 0, cmdClose = 1, cmdScrollTo = 2, cmdTotal = 3 }; Command(const cmdtype acmdtype) : _type(acmdtype) {} cmdtype type()const noexcept { return _type; } public: ...
true
7100d3868ba633d8e980a1b0b0d6d0800b1d09fd
C++
rodolfomartinezc/fibonacci_iterativo1
/Iterativo/fibonacciIterativo.cpp
UTF-8
1,418
3.90625
4
[]
no_license
#include<iostream> //libreria de entradas y salidas using namespace std; unsigned int fibonacci(int n) { // funcion fibonacci nos regresa un valor no signado if (n < 2) { // condicion de paro return n; } unsigned int a = 1, b = 1, c; // se hace el metodo iterativo con va...
true
4e8a4081f2744e5d9f0a2d24785947a48f9d3780
C++
moevm/oop
/8383/averina/labs/Interface/Commands/SaveCommands/GameSaveRequest.cpp
UTF-8
695
2.796875
3
[]
no_license
#include "GameSaveRequest.h" void GameSaveRequest::Command() { std::cout << "------- GAME SAVE ------" << std::endl; std::cout << "/save" << std::endl; std::cout << "/load" << std::endl; std::cout << "------------------------" << std::endl; std::string input; std::cout << "<command> : " ; s...
true
671846950aa6b9a565de62fe349f3677ae2e82cc
C++
GoodGuySteve/SchoolProjects
/CS24/virtual_directory.cpp
UTF-8
4,940
3.375
3
[]
no_license
#include <iostream> #include <string> #include "bst.h" #include "directory.h" #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> using namespace std; /* Change `cwd` to point to either its parent (..) or one of its subdirectories. If `name` is `..` change into the parent directory. Attempting t...
true
2d8ad1161b0e42320d04741c68b7eef5b340aad4
C++
parvezaalam786/Placement-Preparation
/Strings/Z Algorithm.cpp
UTF-8
790
2.84375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; /* Z Algorithm: It is string matching algorithm Time Complexity = O(string.length() + pattern.length()) string = ababaa , pattern = aba step1: string tot = pattern + "$" + string => tot = aba$ababaa step2: 0 1 2 3 4 5 6 7 8 9 tot = a b a $ a b a b a a ...
true
4887c61513448c378b5496a7df38a37f0b69cefc
C++
jeffsetter/Halide_CoreIR
/apps/coreir_examples/camera_pipe/pipeline.cpp
UTF-8
24,362
2.609375
3
[ "MIT" ]
permissive
#include "Halide.h" #include <stdint.h> using namespace Halide; Var x("x"), y("y"), tx("tx"), ty("ty"), c("c"), xi("xi"), yi("yi"), z("z"); Var xo("xo"), yo("yo"); Var x_grid("x_grid"), y_grid("y_grid"), x_in("x_in"), y_in("y_in"); // Average two positive values rounding up Expr avg(Expr a, Expr b) { Type wider ...
true
04983d9b887837f255abcb9718c04060f8dccdd3
C++
CodersCove/opengl
/c++ opengl/OB/Player.cpp
UTF-8
2,074
2.765625
3
[]
no_license
#include "Player.h" #include "Game.h" Player::Player(Game* game) { this->game = game; } void Player::HandleInput() { if(glfwGetKey(this->game->GetWindow(), GLFW_KEY_D ) == GLFW_PRESS) { if(buildmode && selected != nullptr) { selected->Right(); } else { this->game->MoveLeft(); }...
true
ebe86c0124935c9cff29d6f93eb06df42b554cae
C++
yitati/LCProject
/Leetcode/GameOfLife.cpp
UTF-8
3,196
3.71875
4
[]
no_license
/******************************************************************************/ /* * Question: #289 Game Of Life * According to the Wikipedia's article: "The Game of Life, also known simply as Life, * is a cellular automaton devised by the British mathematician John Horton Conway in 1970." * Given a board with m by ...
true
ae95d36b557c70f29ab9cc96ef988ba29114a3a7
C++
sundsx/RevBayes
/src/revlanguage/datatypes/evolution/RlTaxon.cpp
UTF-8
4,718
2.625
3
[]
no_license
#include "ConstantNode.h" #include "ModelVector.h" #include "RlTaxon.h" #include "TimeAndDate.h" #include "RbUtil.h" #include "RlString.h" #include "TypeSpec.h" #include <sstream> using namespace RevLanguage; /** Default constructor */ Taxon::Taxon(void) : ModelObject<RevBayesCore::Taxon>() { } /** Construct f...
true
a3b4a455bc28c38bf7ffcca2e60a5603392fb23d
C++
Bohdan-Belik/wppt-archive
/Semestr2/KP/projects/lab2/figury c++/main.cpp
UTF-8
7,284
3
3
[]
no_license
/**LAB 3_ZAD.2 *@author Max_Telepchuk */ #include <iostream> #include <cmath> #include <vector> #include <cstring> #include <string> #include <sstream> #define PI 3.14159265 using namespace std; class Figura { public: virtual float ObliczObwod(){}; virtual float ObliczPole(){};...
true
306ec61afb0fb724640a9b3c327a2ca7ea74ca3b
C++
7starsea/Prioritized-Experience-Replay
/util_cpp/inc/cnarray.hpp
UTF-8
4,718
2.671875
3
[ "MIT" ]
permissive
#ifndef KLEIN_CPP_INC_CNARRAY_HPP #define KLEIN_CPP_INC_CNARRAY_HPP #include <pybind11/pybind11.h> #include <pybind11/numpy.h> namespace py = pybind11; #include "cnarray_c.hpp" /* /// @brief construct np.1darray from a raw data pointer /// user should make sure the data pointer is valid /// during t...
true
d37804a5cb2daed66856e4da9b33313aca7efaa0
C++
david-grs/c-excercises
/course6/toyapp-adam/displaylib/mesh.cc
UTF-8
634
2.875
3
[]
no_license
#include "mesh.h" namespace Display { void Mesh::NormalizeScale() { auto maxDimension = 0.0f; for (auto& triangle : triangles) { for (unsigned vector = 0; vector < 3; ++vector) { for (unsigned vertex = 0; vertex < 3; ++vertex) { auto dimension = std::fabs(triangle[vector][vertex]); if (dimension...
true
2dd8d947a38e2cbc56581f106f104e560e9a0f5a
C++
DancingOnAir/LeetCode
/Leetcode/Array/035_SearchInsertPosition.cpp
UTF-8
576
3.25
3
[]
no_license
//#include <iostream> //#include <stdlib.h> //#include <vector> // //using namespace std; //int searchInsert(vector<int>& nums, int target) //{ // int i = 0; // int j = nums.size() - 1; // // while (i < j) // { // int mid = (i + j) / 2; // if (nums[mid] < target) // i = mid + 1; // else // j = mid; // } // // i...
true
6ac30cd6f70e35cca77ebbbac407a9066b7355cd
C++
sam830917/TenNenDemon
/Engine/Code/Engine/Math/OBB3.hpp
UTF-8
582
2.703125
3
[ "MIT" ]
permissive
#pragma once #include "Vec2.hpp" #include "Vec3.hpp" struct OBB3 { Vec3 m_center; Vec3 m_halfDimensions; Vec3 m_iBasisNormal = Vec3( 1.f, 0.f, 0.f ); Vec3 m_jBasisNormal = Vec3( 0.f, 1.f, 0.f ); Vec3 m_kBasisNormal = Vec3( 0.f, 0.f, 1.f ); OBB3() = default; ~OBB3() = default; explicit OBB3( const Vec3& center...
true
c7c7ae0dc0bd2a656e59c2ef6549e7db1d441ba2
C++
jchallenger/ShaderTestEngine
/ShaderTester/WindowInfo.cpp
UTF-8
1,551
3.078125
3
[]
no_license
#include "WindowInfo.h" WindowInfo::WindowInfo(){ fullScreen = false; mouseHide = false; } WindowInfo::~WindowInfo() { } void WindowInfo::setWindow(sf::RenderWindow * _window){ window = _window; setSize( _window->getSize() ); } sf::RenderWindow * WindowInfo::getWindow(){ return window; } void ...
true
34ad893ab94c5a32e9ca015f0e7439666e888777
C++
gnole/lab-01-parser
/sources/print_any.cpp
UTF-8
1,895
3.453125
3
[ "MIT" ]
permissive
// Copyright 2020 gnole #include <print_any.hpp> #include <iomanip> #include <vector> std::stringstream ssany(const std::any& object) { std::stringstream out_str; if (object.type() == typeid(std::string)) { out_str << std::any_cast<std::string>(object); } else if (object.type() == typeid(int)) { out_str...
true
f0a3db72e062bef1caef2fd5e77d32ed610e2e07
C++
northWindPA/cpp_modules
/Module_04/ex03/Character.cpp
UTF-8
1,152
3.0625
3
[]
no_license
#include "Character.hpp" void Character::equip(AMateria *m) { for (int i = 0; i < 4; ++i) { if (_materia_pack[i] == nullptr) { _materia_pack[i] = m; break; } } } void Character::unequip(int idx) { if (idx >= 0 && idx < 4) if (_materia_pack[idx]) _materia_pack[idx] = nullptr; } void Character::us...
true
fb32d9433d11273165f7b11801097aa102e3d998
C++
MGPDGLC/CSDN
/53.cpp
UTF-8
627
3
3
[]
no_license
#include<iostream> using namespace std; void fun(int x, int y, int z); int main() { int x, y, z; cin >> x >> y >> z; fun(x, y, z); return 0; } void fun(int x, int y, int z) { int i, j, k=1; int n = 0; for (i = 2000; i <= x; i++) { for (j = 1; j <= 12; j++) { if (i == x && j == y) { n += z; bre...
true
521255940e82303d4438a0745a955853293860c6
C++
Jeremycw-tec/MasterMind
/Proyecto c++/MasterMind/mainwindow.cpp
UTF-8
17,359
2.6875
3
[]
no_license
//Librerias #include "mainwindow.h" #include "ui_mainwindow.h" #include "QColor" #include <stdlib.h> #include <time.h> #include <ctime> #include <cstdlib> using namespace std; //Algunas varibles iniciales //verificadores para el boton de hacer jugada int verif1=0; int verif2=0; int verif3=0; int ver...
true
ebc29d0b260b5502d2a19e1e9157f739c421e9ca
C++
lav0/MathLib
/rcbCubeState.cpp
UTF-8
3,931
2.78125
3
[]
no_license
#include "stdafx.h" #include "rcbCubeState.h" //============================================================================== bool operator==(eTurnAxis a_e_axis, eCubeSide a_e_side) { switch (a_e_axis) { case TA_X: return a_e_side == CS_FRONT || a_e_side == CS_BACK; case TA_Y: return a_e_side == CS_RIGHT || a_e...
true
55c488679e9c51a84638cb3d5deac08d07aa97ed
C++
mehulthakral/logic_detector
/backend/CDataset/myPow/myPow_18.cpp
UTF-8
252
2.90625
3
[]
no_license
class Solution { public: double myPow(double x, int n) { long n2 = (long)n; if (n2 < 0) {n2 = -n2; x = 1/x;} if (n2 == 0) return 1; return (n2 % 2 == 0) ? myPow(x*x, n2/2) : myPow(x*x, n2/2)*x; } };
true
91c925e626b867ba93e22441d43d5acb7af46046
C++
Urevel/Project
/кучи/Heap.h
WINDOWS-1251
4,495
3.671875
4
[]
no_license
#pragma once struct AAA { int x; void Print(); int GetPriority(); }; namespace heap // { enum CMP { LESS = -1, EQUAL = 0, GREAT = 1 }; // ( ) struct Heap { int Size; int MaxSize; void** Storage; CMP(*Compare)(void*, void*); // Heap(int maxsize, CMP(*f)(void*, void*)) // ...
true
1c716e6ff921f10b5767df2aa461a2fb73526c8d
C++
RMoraffah/hippo-postgresql
/src/include/izenelib/include/am/db_trie/traits.h
UTF-8
1,722
2.5625
3
[ "Apache-2.0", "PostgreSQL" ]
permissive
#ifndef _DB_TRIE_TRAITS_H_ #define _DB_TRIE_TRAITS_H_ #include <limits.h> NS_IZENELIB_AM_BEGIN /** * Traits for NodeID */ template<typename NIDType> class NodeIDTraits; template <> class NodeIDTraits<int32_t> { public: enum{RootValue = 1, EmptyValue = 2, MinValue = 3, MaxValue = INT_MAX}; }; template <> class...
true
38708cfeaea4d74d5c8a945fb4d0bc420398bbcf
C++
ranjeevnayak/book-my-show
/mainClass.cpp
UTF-8
15,623
2.859375
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <fstream> #include <iomanip> #include <cstring> using namespace std; int count=0; class Movies{ int ch; char sig[1]; public: Movies(int in) { if(in==-1) { int z; cout<<"--------------------...
true
7b1da689be3e9e41a9c1706792351d181fdf86c9
C++
FTWinston/Chessmaker
/ChessmakerCore/TurnOrder.cpp
UTF-8
2,249
3.125
3
[]
no_license
#include "TurnOrder.h" #include "Player.h" TurnRepeat::TurnRepeat(int count) { maxRepeats = count; currentIteration = 0; state = AtStart; } TurnRepeat::~TurnRepeat() { while (!steps.empty()) delete steps.front(), steps.pop_front(); } TurnStep* TurnRepeat::GetNext(bool forwards) { if (state == AtStart) { ...
true
5075ad5496a720715d995fbbaefe5eaaac95fbd6
C++
SayanBan/Hacktoberfest-Codes
/C program/p3.cpp
UTF-8
267
2.875
3
[ "MIT" ]
permissive
#include<stdio.h> int main() { char i,j,s=1,k; for(i='G';i>='A';i--) { for(j='A';j<=i;j++) { printf("%c",j); } for(k=s;k>1;k--) { printf("\n"); } for(j=i;j>=1;j--) { printf("%c",j); } printf("\n"); s++; } }
true
585724fcc6327086a2ff313e2aaa2bfc000fddf9
C++
Wbrta/ACM
/BZOJ/1001.[BeiJing2006]狼抓兔子.cpp
UTF-8
2,941
2.609375
3
[]
no_license
#include <queue> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef struct node { int v, cap, nxt; node(int a = 0, int b = 0, int c = 0) { v = a; cap = b; nxt = c; } }Edge; const int maxn = 2100005; const int maxm = 6100005; const int inf = 0x3f3f3f3f; Edge ...
true
b9541fb4b0ff239c24acc8959ee6fd14978229d2
C++
suyuan945/LeetCode
/139_WordBreak/139_WordBreak.cpp
UTF-8
648
3.125
3
[]
no_license
#include <iostream> #include <vector> #include <string> using namespace std; class Solution { public: bool wordBreak(string s, vector<string>& wordDict) { const int n = s.size(); vector<bool> dp(n+1, false); dp[0] = true; for (int i = 1; i <= n; ++i){ for (int j = i - 1; j >= 0; --j){ if...
true
d1aef424040e456a1822fc5886c4ad06e1c3a895
C++
thecodingwizard/competitive-programming
/Infoarena/engineer.cpp
UTF-8
3,877
2.703125
3
[]
no_license
/* * Parallel binary search + BIT * * The time limit is ridiculously tight, so you basically can't use maps at all. * Instead of using 2D BIT, you have to use 1D bit and just brute force loop through * one dimension (no idea why this works but a 2D bit doesn't) */ #include <bits/stdc++.h> using namespace std; ...
true
217372d6ab539b1c14d6285123cad4f8d4fad4df
C++
andy-c-huang/Hitchin
/discreteheatflowiterator.cpp
UTF-8
3,435
2.515625
3
[]
no_license
#include "discreteheatflowiterator.h" #include "liftedgraph.h" template <typename Point, typename Map> DiscreteHeatFlowIterator<Point, Map>::DiscreteHeatFlowIterator(const LiftedGraphFunction<Point, Map> *initialFunction) : nbBoundaryPoints(initialFunction->nbBoundaryPoints), nbPoints(initialFunction->nbPoints),...
true
6072fb14afe2688127d97d6e15779bb8df515d08
C++
renr3/HIGROTERM
/Source Code/A000_SourceCode_HIGROTERM_EnPtVersion_v0_4_DUE_Version/A40_drawConfigurationScreen.ino
UTF-8
1,235
3.328125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* This function draws the Configuration Screen. * When it finishes, it outputs the value of exit_flag, a byte variable. * This variable indicates where to proceed next: * - A output of 1 indicates the main code will proceed to Loading Screen; * - A output of 2 indicates the main code will proceed to Monitoring ...
true
aad60c05dd63ecfc8f9a0dbe4c8a3c4e8bc9c25e
C++
vladopp/distributed-decipher
/common/vigenerecipher.h
UTF-8
661
2.515625
3
[]
no_license
#ifndef VIGENERECIPHER_H #define VIGENERECIPHER_H #include <QString> class VigenereCipher { public: static QString encrypt(const QString& text, const QString& key); static QString decrypt(const QString& text, const QString& key); static int getProbableKeyLength(const QString& text); private: static do...
true