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
c145c9452ddfffa903ccf0a9911227fc1488dc27
C++
fuhailin/show-me-cpp-code
/leetcode_cc/131.palindrome-partitioning.cc
UTF-8
1,073
3.03125
3
[ "LicenseRef-scancode-generic-cla", "Apache-2.0", "BSD-2-Clause" ]
permissive
#include <iostream> #include <string> #include <vector> using namespace std; class Solution { private: vector<vector<int>> dp; vector<vector<string>> res; vector<string> path; int n; public: void backtracking(const string& s, int i) { if (i == n) { res.emplace_back(path);...
true
9c6619c2221678506cdcf7fa789280492746d6cb
C++
ZRobbins7/C-Projects
/Assignments/Assignment3/RobbinsAsg3/RobbinsAsg3P3.cpp
UTF-8
2,695
3.484375
3
[]
no_license
/* Zac Robbins zrobbins@my.athens.edu 00100125 Asg3P3 - CS317 */ // This program creates a receipt for the customer at Ying Thai Kitchen. #include <iostream> #include <iomanip> #include <string> #include <cstdlib> using namespace std; int main() { string server, date = "7/4/2013", time = "7:28 PM"; string foodItem1...
true
36353861c126d44896561b3e76dba8cdaf5f6dc4
C++
bigsuperfa/MPI_3DCompact
/src/PngWriter.hpp
UTF-8
9,479
2.609375
3
[ "MIT" ]
permissive
#ifndef PNG_WRITER_HPP #define PNG_WRITER_HPP // ====================================================================== // PngWriter.hpp // // This class can write a png image using libpng routines (i.e. png.h). // // Sample usage: // // PngWriter png(nx,ny); // // // then one or more calls to... // // p...
true
3237fc16cdfae8988497682aee2891dd9ffc6023
C++
ShadowBLR/OAIP-1-course
/Вариант 7/sem2laba2/sem2laba2/sem2laba2.cpp
UTF-8
826
2.984375
3
[]
no_license
#include <iostream> using namespace std; int mn(int n, ...); void diht(double (*f)(double)); double f1(double x); double f2(double x); int main() {/**/ setlocale(LC_ALL, "ru"); cout << mn(4,15,3,14,29) << endl; cout << mn(2,13,4) << endl; cout << mn(5,12,13,14,2,4) << endl; /*2-------------------------------------...
true
22ee74fdaf1353d971980404bebdc43f2f830373
C++
whyshivam/CppCode
/CodeForces/479C.cpp
UTF-8
937
2.609375
3
[]
no_license
//Cut my wings and ask me to fly, //to your astonishment I'll be lost in the sky #include<bits/stdc++.h> using namespace std; #define ull unsigned long long int #define ll long long int #define fast() ios_base::sync_with_stdio(false); cin.tie(NULL); #define rep(n) for(ll i=0;i<n;i++) #define repj(n) for(ll j=;j...
true
763b3aabbd45a40d16fb04ffa719ba8327870391
C++
aman-aman/Leetcode
/628. Maximum Product of Three Numbers.cpp
UTF-8
239
2.71875
3
[]
no_license
class Solution { public: int maximumProduct(vector<int>& nums) { sort(nums.begin(),nums.end(),greater<int>()); return max(nums[0]*nums[nums.size()-1]*nums[nums.size()-2],nums[0]*nums[1]*nums[2]); } };
true
5b5d99b6884de034c95aa4d3634e0f0bf4614217
C++
42seoul-NULL/Webserv_
/libft_cpp/ft_memset.cpp
UTF-8
177
2.6875
3
[]
no_license
#include "libft.hpp" void *ft_memset(void *s, int c, size_t n) { unsigned char *temp; temp = (unsigned char *)s; while (n--) *(temp++) = (unsigned char)c; return (s); }
true
1cd8986a9feaee70ca10dbd3d05202a757706551
C++
blackjack-nix/monix
/src/Server/MongoWrapper.cpp
UTF-8
2,085
3.125
3
[]
no_license
#include "MongoWrapper.h" Mongo& MongoWrapper::database(){ static Mongo database; return database; } std::string MongoWrapper::addUser(std::vector<std::string> parameter){ std::string pseudo(parameter[0]); float money = std::stof(parameter[1]); database().addUser(pseudo, money); return ""; } std::string MongoW...
true
2d78a5ce4b25941fe15b96941e9e06c18ca35d42
C++
pantzerbrendan/INF34207_TP3
/tests/main2.cpp
UTF-8
781
2.9375
3
[]
no_license
#include <vector> #include <iostream> #include "../include/Thread.hpp" #include "../include/Mutex.hpp" #include "../include/IThreadable.hpp" Mutex *mtx; void *function(void *args) { long long sig1 = reinterpret_cast<long long>(args); int sig = static_cast<int>(sig1); for (int index = 0; index < 10; index++) ...
true
a83a95a24bb20e6784e47da103efba31dec02419
C++
madeibao/PythonAlgorithm
/PartC/交换数字中的两个位置来实现数字最大化.cpp
UTF-8
487
3.296875
3
[]
no_license
class Solution { public: int maximumSwap(int num) { string a = to_string(num); int res = num; for(int i=0; i<a.size(); i++){ for(int j=i+1; j<a.size(); j++){ swap(a[i], a[j]); res = max(res, stoi(a)); swap(a[i], a[j]); ...
true
bfb6c1e753fea8649f5ba52434c08e5174f71b27
C++
Sakery/CLK
/Machines/Oric/BD500.cpp
UTF-8
3,602
2.78125
3
[ "MIT" ]
permissive
// // BD500.cpp // Clock Signal // // Created by Thomas Harte on 14/01/2020. // Copyright © 2020 Thomas Harte. All rights reserved. // #include "BD500.hpp" using namespace Oric; BD500::BD500() : DiskController(P1793, 9000000, Storage::Disk::Drive::ReadyType::ShugartModifiedRDY) { disable_basic_rom_ = true; sel...
true
12e0c6858201e4f10250f590410bfd1afcb9dff2
C++
calofmijuck/BOJ
/Data Structures/splay_tree.cpp
UTF-8
3,433
3.515625
4
[]
no_license
#include <bits/stdc++.h> using namespace std; template <typename T> class node { public: node *left, *right, *parent; T value; int size; node(void) : left(0), right(0), parent(0), size(0) {} node(const T &value) : left(0), right(0), parent(0), value(value), size(0) {} }; template <typename T> c...
true
bb42bc9dd5fe30eb63fd95b88092a070c1726c41
C++
kymo/hmmseg
/include/trie.h
UTF-8
2,613
2.609375
3
[]
no_license
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Aron // contact: kymowind@gmail.com www.idiotaron.org // // This file is part of hmmseg // // hmmseg is a segmentation module conbined hidden markov model with // maximum match segmentation, you can redistribute it and modify it // under the term of the GNU Genural Pu...
true
cad21300b6b785cb785a130a2f6c0bc8d5fa5f0f
C++
MaxDerouet/learncpp
/9.2/1/main.cpp
UTF-8
1,735
3.84375
4
[]
no_license
#include <iostream> class Fraction { int m_nominator=0; int m_denominator=1; public: Fraction(int nominator=0, int denominator=1):m_nominator(nominator), m_denominator(denominator) { } friend Fraction operator*(const Fraction &firstFraction, const Fraction &secondFraction); friend Fraction ...
true
e6bf0a10bdb4ff755733b02fb82b23ec581f9ae7
C++
AlexMaz99/WDI
/lab2/zad01.cpp
UTF-8
525
2.921875
3
[]
no_license
#include <iostream> using namespace std; int main() { int number; int tab[10000]; int a = 1, b = 1; bool done = false; cin >> number; tab[0] = 1; if (number == 1) done = true; for (int i = 1; a + b <= number && !done; i++) { b = a + b; a = b - a; tab[i] = b; ...
true
b2c4adb14a48ce4cff5b6a6bc0529846411dd877
C++
NathanBeals/Escape-Room
/EscapeRoom/Source/EscapeRoom/NewToggleGroup.cpp
UTF-8
757
2.546875
3
[]
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "NewToggleGroup.h" void ANewToggleGroup::ToggleGroupVisibility(bool visible) { for (auto x : ActorsToHide) if (x != nullptr) x->SetActorHiddenInGame(!visible); bIsVisibleInScene = visible; } // Sets default values ANewTo...
true
bf63fe00b1213237e319fc055dc217ab6d344e66
C++
SantiagoMunoz/raytracer
/src/world.cpp
UTF-8
1,825
2.78125
3
[]
no_license
#include "world.h" #include "ray.h" #include "tuple.h" #include "matrix.h" #include <cmath> #include <iterator> void camera::render(world* w) { color illumination{0, 0, 0}; tuple horizontal_stride = rotate_y(PI/2)*dir; tuple vertical_stride = rotate_x(-PI/2)*dir; tuple origin = (pos + horizontal_stride*(screen-...
true
9c5f4c8054c64f9e276b267a9181b5a59b85d307
C++
MastProgs/MyAlgorithm
/Console/AlgorithmConsole/AlgorithmConsole/Fibonacci.cpp
UTF-8
537
3.6875
4
[]
no_license
#include "Fibonacci.h" #include <iostream> Fibonacci::Fibonacci(size_t n) : m_number{ n } { m_memo.reserve(n + 1); m_memo.emplace_back(0); m_memo.emplace_back(1); m_memo.emplace_back(1); GetValue(n); } size_t Fibonacci::GetValue(size_t n) { if (n < 3) { return 1; } if (n < m_memo.size()) { return m_memo[n]; ...
true
09476bcd62dfa3e493ab47544166495a2ea8899f
C++
rastabaddon/saphire
/saphire-memory/src/module/CMemoryBuffer.cpp
UTF-8
1,539
2.859375
3
[]
no_license
/* * CMemoryBuffer.cpp * * Created on: 14 mar 2015 * Author: rast */ #include "CMemoryBuffer.h" namespace Saphire { namespace Core { namespace Types { CMemoryBuffer::CMemoryBuffer(Saphire::Module::IMemoryModule * mm,Saphire::Core::Types::size size) { this->mm = mm; Grab(this->mm); this->size = size; m...
true
47f25afac76fed3171d20fef6932e8bf548a12d1
C++
Koo12/exp_cpp
/lab4_2.cpp
UTF-8
561
3.6875
4
[]
no_license
#include<iostream> #include<string> using namespace std; const int SIZE=100; template<class T> class Stack { private: T stack[SIZE]; int tos=0; public: void Push(T n) { stack[tos]=n; tos++; } T Pop() { stack[tos]=0; tos--; } int getTos() { return tos; } T * getStack() { return stack; } }; i...
true
7daa3c30fbbfb81ad80e54b2a36c8a27618da911
C++
dnavas77/cpp-concepts
/DesignPatterns/DesignPatterns/src/MultipleBuilders/MultipleBuilders.cpp
UTF-8
473
2.65625
3
[ "MIT" ]
permissive
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <boost/algorithm/string.hpp> #include <sstream> #include "Person.h" #include "PersonBuilder.h" #include "PersonAddressBuilder.h" #include "PersonJobBuilder.h" int main() { Person p = Person::create() .lives().at("999 Some Street") ...
true
20919f9c8f59ff45f57181c77395fd535536a261
C++
liuguoxu/learning_module
/cpp_learn/static/static.cpp
UTF-8
642
4.0625
4
[]
no_license
#include <iostream> #include <string> using namespace std; class Girl { public: static int Num; void set_info(string new_name, int new_age); void show_info() { cout << "name is "<< this->name <<", age is "<< this->age<< endl; } Girl() { cout << "This is a new girl!" << endl; } ~Girl() { ...
true
521c6cd9b848f5e5b6ad76ada98120fb7f5f9681
C++
bryant1410/bayesAB
/src/closedTests.cpp
UTF-8
808
2.78125
3
[]
no_license
#include <Rcpp.h> using namespace Rcpp; double lbeta(double a, double b) { return lgamma(a) + lgamma(b) - lgamma(a + b); } // [[Rcpp::export]] double bayesPoissonTestClosed_(double alpha_1, double beta_1, double alpha_2, double beta_2) { double total = 0; for(int i = 0; i < alpha_1; i++) { total += ex...
true
c02dae18e869fc4cec93901e1b550aac69e75ee4
C++
chjesus/Estructura-de-Datos
/Parcial II/Parcial 2/Problema 1/Personal.h
UTF-8
1,177
3.609375
4
[]
no_license
#ifndef PERSONAL_H #define PERSONAL_H #include <string.h> using namespace std; class Personal{ int id; char nombre[40]; bool activo; int precio; public: Personal(){} Personal(int id,char *nom,bool act,int pre){ this->id = id; strcpy(this->nombre,nom); this->activo = act; this->precio = pre; } ...
true
cff9981bf5f1b061e6d558611123d129b4ce9c41
C++
mszhangjiao/GameNetwork
/GameNetwork/NetClient.h
UTF-8
1,473
2.6875
3
[]
no_license
#pragma once // defines the client networking features: // - set up connection with server, // - maintains client network states; // - handles received packets; class NetClient : public NetManager { public: const float cHelloTimeout = 1.f; static NetClient* Instance() { return dynamic_cast<NetClient *>(NetManag...
true
63d0062967d1f8253e34814e0593e69d01da9236
C++
bunnybryna/Parkland_College_CSC125_CPP2
/Lectures/0314/mainTogether.cpp
UTF-8
3,381
4.09375
4
[]
no_license
#include <iostream> #include <string> #include <cstdlib> using namespace std; class LinkedListNode { public: LinkedListNode(string str,LinkedListNode* ptr); LinkedListNode* getNext(){return m_Next;} void setNext(LinkedListNode* ptr){m_Next = ptr;} void setData(string str){m_Data = str;} string ge...
true
f415e6a803f052e4d39567712c74842cc5d43edc
C++
LinMdjj/daigua
/create/create/create.cpp
UTF-8
1,824
2.84375
3
[]
no_license
#include"pch.h" #include<iostream> #include<stdio.h> #include<time.h> #include <stdlib.h> #include<sys/timeb.h> using namespace std; struct timeb timeSeed; int random()//产生随机数的函数 { ftime(&timeSeed); srand(timeSeed.time * 1000 + timeSeed.millitm); int a; a = rand() % 100+1; return a; } int random1()//产生随机数的函数 { i...
true
705479f8458f14da040a4ef863c2ec32148b8bb8
C++
Svitojar/Curve2d
/main.cpp
UTF-8
821
2.984375
3
[]
no_license
#pragma once #include "Point2D.h" #include "Curve2d.h" #include "Line2d.h" #include "Arc2d.h" #include <iostream> using namespace lesson_10; using namespace std; void main() { Point2D *CentralPoint = new Point2D(137,158); Point2D *StartPoint = new Point2D(10, 10); Point2D *EndPoint = new Point2D(230, 4...
true
a2ed337ce96116bff116a7486c4c4c3b33eb0b35
C++
JonnieWayy/Own-Notes
/数字图像处理/SourceCode/chapter04/code04-01-resize/code04-01-resize/code04-01-resize.cpp
GB18030
1,631
2.9375
3
[ "MIT" ]
permissive
/************************************************************ Copyright (C), 2008-2014, ӿƼѧȨ. ļ: code04-01-resize.cpp : λ : 1.0 : 2014-08-11 : ʵͼıŲʾ : б: 1. ޸ļ¼: <> <޸ʱ> <汾> <> λ 2014-08-11 1.0 ļ **************************************************...
true
7bd43608e42cb70c9cd21d3239fd6e6b9d15b804
C++
prostain/projetsSio
/c++/pointeur1/pointeur.cpp
UTF-8
519
3.53125
4
[]
no_license
#include <iostream> using namespace std; int main() { int nb1, nb2; cout<<"entrer le premier nombre : "; cin>>nb1; cout<<"entrer le second nombre : "; cin>>nb2; int *lePlusGrand, *lePlusPetit; if(nb1>nb2) { lePlusGrand = &nb1; lePlusPetit = &nb2; } else { lePlusGrand = &nb2; lePlusPetit = &nb1; }...
true
0c4c3fd8526392c759e131bda790ad32ca5ce660
C++
alaneos777/club
/camp 2018/contest 1/H.cpp
UTF-8
1,819
2.65625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long int lli; template <typename T> struct SegmentTree{ SegmentTree *left, *right; int start, end, half; T value, lazy; SegmentTree(int start, int end){ this->start = start; this->end = end; this->half = start + ((end - start) >> 1); this->value =...
true
8e1adfd70ab3fd53ee500332af7215c246978867
C++
siddhanta1/ticpp
/CPP/Chap2_Ticpp/casting_float_to_char_pointer.cpp
UTF-8
409
3.296875
3
[]
no_license
#include <iostream> using namespace std; void printBinary(const unsigned char val) { for (int i = 0; i <=sizeof(val); i++) if (val & (1 << i)) cout << "1"; else cout << "0"; } int main() { float f=2.2; unsigned char *p = reinterpret_cast<unsigned char*>(&f); for (int i =0; i <sizeof(f); i ...
true
1848e05260298c810d2a7a38a1e2a02807a64bb2
C++
hello-sources/Coding-Training
/LeetCode/433最小基因变化.cpp
UTF-8
679
2.8125
3
[]
no_license
class Solution { public: int minMutation(string start, string end, vector<string>& bank) { if (start == end) minNum = min(minNum, num); for (auto str : bank) { int diff = 0; for (int i = 0; i < str.size(); i++) if (str[i] != start[i]) diff++; if (diff == 1 && u_se...
true
16896b5b70d6237448baf1fb74f2bfedc5cef8fd
C++
shashank9aug/DSA_CB
/BackTracking/ImpProblems/unique_permutation.cpp
UTF-8
926
3.765625
4
[]
no_license
/* we have given char set : we have to return all the possible permutation. permutation : all the possible rearrangement . if Given in question : unique and lexicographical we can use set for that => stl container ip : aba op : aab,aba,baa, */ #include<iostream> #include<set> #include...
true
cd58f390a5d4a1534192345093c7dcc5fed28cdb
C++
CremboC/aktex
/aktex/Screens.cpp
UTF-8
1,247
2.671875
3
[]
no_license
#include "stdafx.h" #include "Screens.h" #include "Game.h" using std::pair; using enums::GameState; using enums::ItemSpeed; using enums::ItemType; Screens::Screens() {} Screens::~Screens() {} // returns the start screen Screen *Screens::main() { Screen *scr = new Screen( "menu", "Welcome to Aktex. The adven...
true
f43b063ee4172d91ae4493a989be3249e00773d8
C++
cheickmec/Todo-List-Program
/c_command.h
UTF-8
1,700
2.578125
3
[]
no_license
#ifndef COMMAND_H #define COMMAND_H #include <fstream> #include "c_Arglist.h" #include <vector> ///-------------------------COMMAND------------------------------ class c_Command { private: std::fstream m_File; bool isEmpty(); bool isFormat(std::string str); public: c_Command(); c_Command(c_Arglist args); virtua...
true
814991a83d1158cf54abef6fb36578a5536d4a99
C++
PiggerZZM/DataStructure_cpp
/stack/Hanoi.cpp
GB18030
372
3.359375
3
[]
no_license
#include <iostream> #include <cstring> void Hanoi(int n, String A, String B, String C) { // AnӽBƶC if (n == 1) cout << "Move top disk from peg" << A << "to peg" << C << endl; else { Hanoi(n-1, A, C, B); cout << "Move top disk form peg" << A << "to peg" << C << endl; Hanoi...
true
78881a0ebf96a3afb829a3b9b38fe5524103c0f8
C++
WonJoonPark/BOJ-Algorithm
/17822.cpp
UHC
3,644
2.765625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int N, M, T; // , Ǵ , T ȸŲ. int circle[51][51]; // ° / ° bool visited[51][51]; //bfs queue<pair<int, int>> tmpq; int xi, di, ki; int xdk[51][3]; bool checkexist = false; int dx[4] = { -1,1,0,0 }; int dy[4] = { 0,0,-1,1 }; double tmpsum, tmpn; bool neighbor = false; //ȣ ...
true
da749209b13ab831aab64e8b1a1fed0a81d5e81b
C++
iridium-browser/iridium-browser
/buildtools/third_party/libc++/trunk/test/std/ranges/range.factories/range.iota.view/iterator/plus_eq.pass.cpp
UTF-8
2,319
2.703125
3
[ "NCSA", "LLVM-exception", "MIT", "Apache-2.0", "BSD-3-Clause" ]
permissive
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
true
93816edcaf10a5af9c88beef57ef1b745c838b4f
C++
abiles/StudySlowly
/305_VALVUE_CATEGORY/valueCategories.cpp
UHC
490
3.4375
3
[]
no_license
#include <iostream> using namespace std; void f1 ( int a ) {} void f2 ( int& a ) {} void f3 ( int&& a ) {} int main () { int n= 10; f1 ( n ); f2 ( n ); // f3 ( n ); : error f3 ( static_cast< int&& > ( n ) ); // f3(move(n)); } /* 1. 2. Լ Ÿ ϴ ˱ */ int x=0; int f4 () { return x; }; int& f5 () { return x...
true
35e597eecc62de06bd22b7459de377257a5fbec6
C++
alextzik/arduino_workshop-2019
/Robotic_Arm/Arm.ino
UTF-8
2,339
2.75
3
[]
no_license
template <typename type> type sign(type value) { return type((value>0)-(value<0)); } void MoveServos(){ long xx = abs(x); long yy = abs(y); long zz = abs(z); // sample comment // Servo 1 long dxy = sqrt(sq(xx)+sq(yy)); Serial.print("dxy="); Serial.println(dxy); if (y == 0L){ ang...
true
e91b9924e20a2db842ab37e5bba98427728dc0dc
C++
anujinm/Game_of_life
/Game_of_life/welcome_screen.h
UTF-8
6,543
2.6875
3
[]
no_license
#pragma once #include <iostream> namespace welcome { static void draw_start_button(int x) { // draw the start button if (x==0) { std::cout << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl; std::cou...
true
122a1051c570a40c220e79e9a6af6ea053085d90
C++
andreimocian/Probleme-Pbinfo-rezolvate
/zoo.cpp
UTF-8
892
2.546875
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; ifstream fin("zoo.in"); ofstream fout("zoo.out"); int n, m, a[105][105], q, i1, j1, i2, j2; long long sum[105][105], s; void SumePart() { for(int i = 1; i <= n; i++) { for(int j = 1; j <= m; j++) { sum[i...
true
96fed9084d179ba06c741825f9f72bb7278d34e4
C++
autonomobil/SDCND-P9_PID-Control
/src/PID.cpp
UTF-8
1,592
2.984375
3
[ "MIT" ]
permissive
#include "PID.h" using namespace std; PID::PID() {} PID::~PID() {} void PID::Init(double Kp, double Ki, double Kd) { p_error = 0; i_error = 0; d_error = 0; steering_val_acc = 0; d_error_acc = 0; last_cte = 0; Kp_ = Kp; Ki_ = Ki; Kd_ = Kd; m_timeBegin = std::chrono::steady_clock::now( ); } void PID::...
true
faa3b813a5127f9eac2faffd191e32fc3ad803db
C++
bulingma/DataStructAndAlgorithm
/bitmap/main_o1_init.cpp
GB18030
2,054
2.875
3
[ "MIT" ]
permissive
/****************************************************************************************** * Data Structures and Algorithm in C++ . * Junhui DENG(deng@tsinghua.edu.cn) is first author, Yuguang Ma learnadd and modify it . * All rights reserved. ***************************************************************************...
true
bfbbdecf194d54bbc28ad9d6d2fe5137f206af13
C++
alicezywang/cognition
/src/micros/resource_management/cognition/cognition_resource/math_model_lib/crowd_compute/crowd_evaluate/src/crowd_evaluate.cpp
UTF-8
12,275
2.578125
3
[]
no_license
#include "crowd_evaluate/crowd_evaluate.h" #include <stdio.h> #include <stdlib.h> #include <iostream> #include <vector> #include <algorithm> #include <math.h> namespace warning_expel_model { //####################################### // Implementation of functions //###################################...
true
f3ce41c4d2acfd15a00387fe0b1d3265515a84ef
C++
luis8230/cc1-L2017-1
/bisiesto.cpp
ISO-8859-10
301
2.75
3
[]
no_license
#include <iostream> using namespace std; int main() { int anio ; cout<<"ingrese un ao "<<endl; cin>> anio ; if (anio % 4 == 0){ if((anio%100)!=0 || (anio% 400) ==0) cout<<"es bisiesto"<<endl; } else cout<<"no es bisiesto"<<endl; return 0; }
true
f51b14ad0a9338b43a8638c05bc3099c7026b0f3
C++
AlexPandaBear/vortex
/src/SimKernel.cxx
UTF-8
20,789
2.90625
3
[]
no_license
#include "SimKernel.hxx" SimKernel::SimKernel(bool x_periodic, bool y_periodic, double x_period, double y_period, std::string method) : m_X_periodic(x_periodic), m_Y_periodic(y_periodic), m_X_period(x_period), m_Y_period(y_period), m_method(method) {} SimKernel::~SimKernel() {} void SimKernel::addVortex(Vortex ...
true
d02406a845ca7a67c5d42dbad438e1aa29ec694b
C++
budelphine/_cpp_modules
/day03/ex04/NinjaTrap.cpp
UTF-8
11,086
3.1875
3
[]
no_license
#include "NinjaTrap.hpp" NinjaTrap::NinjaTrap() : ClapTrap("defaultNinjaTrap", 60, 60, 120, 120, 1, 60, 50, 0) { std::cout << "* NINJ4-TP Default constructor called *" << std::endl; std::cout << GREEN_COLOR << this->getName() << ": " << END_COLOR; std::cout << "Hey, best friend!" << std::endl; } NinjaTrap::NinjaTr...
true
a289504fbd186751ae2eb37cffaa833ae2860469
C++
IndianShifu/Compiler-Lab
/LAB3/q9.cpp
UTF-8
12,718
3.0625
3
[]
no_license
#include<iostream> #include<string> #include<map> #include<fstream> using namespace std; string terminals = "e", nonterminals; // e is epsilon struct parseEntry { //terminal,production string production; string input; }; string dupliRemove( string a ) { string w; for( int i=0; i<a.le...
true
bf4af8f20e03f4bef526cbcbae60c73c366a716d
C++
Vetos22854/Lab_1
/Git 1/Git 1.cpp
WINDOWS-1251
1,199
2.984375
3
[]
no_license
// Git 1.cpp: . // #include "stdafx.h" #include <iostream> using namespace std; int main() { cout << "29.06.1998"; cout << ""; cout << ""; cout << ""; cout << " 3"; cout << " 9 "; cout << " "; cout << " 2017"; cout << " 2017"; cout << " "; cout << " "; cout << " "; cout << " "; cout << ...
true
0e6336cab67b46a296dbfe5c6911c9b5693d7924
C++
ivanenkomaksym/designpatterns
/src/bridge/entertainmentdevice.cpp
UTF-8
527
2.96875
3
[]
no_license
#include "bridge/entertainmentdevice.h" #include <iostream> void EntertainmentDevice::buttonSevenPressed() { m_volumeLevel++; std::cout << "Volume at: " << m_volumeLevel << std::endl; } void EntertainmentDevice::buttonEightPressed() { m_volumeLevel--; std::cout << "Volume at: " << m_volumeLevel << st...
true
03de5b816c82d054c56f776395a8273bf289873d
C++
0000duck/travsales
/genalg.cpp
UTF-8
7,232
2.703125
3
[ "MIT" ]
permissive
// // genalg.cpp // Traveling Salesman // // Created by Alexandre Soares on 1/10/2020. // Copyright © 2020 Alexandre Soares. All rights reserved. // #include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> #include <chrono> #include <thread> #include <mutex> #include <GL/glut....
true
4eacd9865745844923d206e05d5f1260d38174b8
C++
clckwrkbdgr/miniban
/src/counter.h
UTF-8
225
2.828125
3
[ "WTFPL" ]
permissive
#pragma once struct Counter { Counter(int counter_stop_value); bool is_active() const; void start(); int multiplied_value(int factor); void tick(int increase); private: bool active; int current_value, stop_value; };
true
8f192f910d6a73cc6b3113a1a043b6981c1f3f09
C++
sbojarovski/rubic-solver
/Cell.cpp
UTF-8
449
2.71875
3
[ "MIT" ]
permissive
// // Created by stefan on 12/24/15. // #include <assert.h> #include "Cell.h" Cube::CubeFace::Cell::Cell(const CellColor &color) :color(CellColor::UNKNOWN) { assert(color >= 0 && color <= 6); this->color = color; } void Cube::CubeFace::Cell::setColor(const CellColor &color) { assert(color >= 0 &&...
true
67671b3d749f895c15aaa5eb00d2f4a86433cbd1
C++
brucelevis/cherrysoda-engine
/Engine/CherrySoda/Renderers/SingleTagRenderer.h
UTF-8
947
2.59375
3
[ "MIT" ]
permissive
#ifndef _CHERRYSODA_RENDERERS_SINGLETAGRENDERER_H_ #define _CHERRYSODA_RENDERERS_SINGLETAGRENDERER_H_ #include <CherrySoda/Graphics/Effect.h> #include <CherrySoda/Renderers/Renderer.h> #include <CherrySoda/Util/BitTag.h> #include <CherrySoda/Util/Camera.h> namespace cherrysoda { class Scene; class SingleTagRenderer...
true
f6be99efd92e5b7ce5aa8c6f14c0e25cc3ffd305
C++
olethrosdc/beliefbox
/src/models/CompressSensing.cc
UTF-8
1,837
2.796875
3
[]
no_license
#include <vector> #include <map> #include <random> #include "CompressSensing.h" #include "real.h" compressor createCompressionMatrix(std::vector<std::vector<int> > &indices) { compressor c; std::map<int,int> indexMap; int distinct = 0; for(int i = 0;i<indices.size();i++) { for(int j=0;j<indices[i].size();j++) {...
true
b01c04384a4e0403384835140dc4387e51742a4e
C++
123Phil/Compiler
/2 Parser/main.cpp
UTF-8
615
2.640625
3
[]
no_license
// Phillip Stewart, 891499733 // OCT 2014 // compiled on OSX 10.9.5 using g++ which invokes clang, with: // $ g++ main.cpp Parser.cpp Lexer.cpp // can be run supplying filename as command line argument: // ./a.out program.txt // or run and supplied filename during runtime: // ./a.out // >Enter filename: progra...
true
80122bad687dfb4ea1e86a5ba064de804ac01fd4
C++
harshraj22/problem_solving
/solution/leetcode/76.cpp
UTF-8
1,247
2.8125
3
[]
no_license
class Solution { bool in(map<char, int> &t, map<char, int> &s) { for (auto pi: t) { if (pi.second > s[pi.first]) return false; } return true; } public: string minWindow(string s, string t) { if (t.empty() || s.empty()) return string(); ...
true
f464a8f743573b413edce4817e3e67422ead0ea5
C++
alexandrakl/Crazy
/test.cpp
UTF-8
1,481
2.90625
3
[]
no_license
#include <iostream> using std::cout; using std::endl; int tape[1000] = {0}; int* dp = tape; int main(){ cout << endl; ++(*dp); ++(*dp); ++(*dp); ++(*dp); ++(*dp); ++(*dp); ++(*dp); ++(*dp); while(*dp){ ++dp; ++(*dp); ++(*dp); ++(*dp); ++(*dp); while(*dp){ ++dp; ++(*dp); ++(*dp); ++dp...
true
43c8075354b6232016e2c07b33df8c47aca19829
C++
MohamadIsmail/Online-Judges-solutions
/spoj/reverse.cpp
UTF-8
602
2.640625
3
[]
no_license
//#include<iostream> //#include<algorithm> //#include<vector> //#include<string> //using namespace std; //int main () //{ // int n; // cin>>n; // cin.ignore(); // string arr,t; // vector<string> s; // for(int e=0 ; e<n; e++) // { // getline(cin,arr); // for(int i=arr.size()-1; i>=0; i--) // { // if(arr[i]!=' ') //...
true
8c9f3907b8d0363dee29518510a157f2ffba5834
C++
relision/elipp
/src/term/ISpecialForm.h
UTF-8
1,253
2.53125
3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
#ifndef ISPECIALFORM_H_ #define ISPECIALFORM_H_ /** * @file * Define the public interface to a special form. * * @author sprowell@gmail.com * * @verbatim * _ _ _ * ___| (_)___(_) ___ _ __ * / _ \ | / __| |/ _ \| '_ \ * | __/ | \__ \ | (_) | | | | * \___|_|_|___/_|\___/|_| |_| * The Elision ...
true
68548347b6249a9f4f40496de3bbbd086bcbbba9
C++
YhgzXxfz/leetcode
/reshape_the_matrix.cpp
UTF-8
388
2.765625
3
[]
no_license
class Solution { public: vector<vector<int>> matrixReshape(vector<vector<int>>& nums, int r, int c) { int m = nums.size(), n = nums[0].size(); if (m*n != r*c) return nums; vector<vector<int>> output(r, vector<int>(c, 0)); for (int k = 0; k < m*n; ++k) { output[k/...
true
aaabcddf941eb9f6f289f28688e689f11cf62c1f
C++
mdiazmeli/JUEGO-PONG-SOCKET-TCP
/servidor.cpp
UTF-8
5,161
2.546875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <iostream> #define PORT 7777 using namespace std; int p1y = 9; int p2y = 9; int jug...
true
2cb34224f77657f88dbd5383bb737aaade29a38b
C++
korbiniak/SolverMachine
/Solver3/src/face.cpp
UTF-8
449
3.171875
3
[]
no_license
#include "include/face.h" Face::Face() {} Face::Face(Digit setColor) { for(int i = 0 ; i < 9 ; ++i) tile[i] = setColor; } Face::Face(const Face &f) { for(int i = 0 ; i < 9 ; ++i) tile[i] = f.tile[i]; } void Face::swapTiles(uint8_t tile1, uint8_t tile2) { swap(tile[tile1], tile[tile2]); } bool Face::opera...
true
b42de7bf05f81f5e868e90f94b4b8d39ab7a063b
C++
HampsterEater/VoxelEngine
/Source/Generic/Helper/StringHelper.cpp
UTF-8
2,569
3.109375
3
[]
no_license
// =================================================================== // Copyright (C) 2013 Tim Leonard // =================================================================== #include "Generic\Helper\StringHelper.h" #include <stdarg.h> int StringHelper::Split(const char* v, char deliminator, std::vector<std::string...
true
13dd9815a8f82fe23f06b8efe0a12883f1d0026d
C++
ayush-artist07/CipherSchools_Assignment
/src/Recursion and Backtracking/Unique Paths.cpp
UTF-8
1,076
3.5
4
[]
no_license
/* A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid. */ #include<iostream> using namespace std; //Since this problem is already ...
true
5f711ba391bf49f66732fd1966d9c13dea816fa8
C++
yinchunxiang/LeetCode
/7.ReverseInteger/ReverseInterger.cc
UTF-8
613
3.671875
4
[]
no_license
#include <iostream> using namespace std; /* int reverse(int x) { int ret = 0; int sign = 0; if (x < 0) { sign = 1; x = 0 - x; } for(; x; x/=10) { ret = ret*10 + x%10; } return sign == 1 ? 0 - ret : ret; } */ int reverse(int x) { int r = 0; for (; x; x /= 1...
true
8d5d99c4edd6dbc6157b15f2c113bc40edbb64b5
C++
sniper-fly/atcoder
/ABC/208/b.cpp
UTF-8
1,301
2.515625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; using ll=long long; using ld=long double; using pll=pair<ll, ll>; #define rep(i,n) for (ll i=0; i<n; ++i) #define all(c) begin(c),end(c) #define PI acos(-1) #define oo 2e18 template<typename T1, typename T2> bool chmax(T1 &a,T2 b){if(a<b){a=b;return true;}else return false;...
true
714f1139bc99a4ec9f8b9a6064eb7d69be52e028
C++
abhishekchandra2522k/CPPrograms
/Pointers/Dangling_Pointer/dangling_pointer_2.cpp
UTF-8
455
3.671875
4
[]
no_license
// Dangling Pointers using dynamic memory allocation #include <stdio.h> #include <stdlib.h> int main() { // 4 bytes of int memory block (64bit compiler) // allocated using malloc() during runtime int *ptr = (int *)malloc(sizeof(int)); // normal pointer *ptr = 10; // memory block deall...
true
acc911ae8fff664c5f2611032344e113a3e86635
C++
mrmorais/tree
/examples/questao_101.cpp
UTF-8
2,570
3.6875
4
[]
no_license
#include <iostream> #include <vector> /** * Questão 101 * * Montei um template de heapsort para um vetor de tipo 't_x', é necessário passar a função de comparação dele * a funçào de comparação possibilita ordenar estruturas variadas ou também alterar a ordem de ordenação */ template <class t_x> std::vector<t_x...
true
7de1efcd65d6ef8791f8a43e46a5b424a5adade3
C++
BenQuickDeNN/LeetCodeSolutions
/分割等和子集.cpp
UTF-8
1,094
3.265625
3
[]
no_license
#include <vector> #include <algorithm> using namespace std; class Solution { bool isFound; // 深度优先搜索 bool dfs(const vector<int>& nums, const int& target, const int& idx) { if (isFound) return true; if (target == 0) { isFound = true; ...
true
94e02ea11e83b365bc83cbe6505bc986196c0420
C++
Alegruz/Game-AI-Track
/1_2/high_level_programming_ii_the_cpp_programming_language/cpp_primer/part_i_the_basics/07 Classes/ex02.h
UTF-8
560
3.203125
3
[]
no_license
// Add the combine and isbn members to the Sales_data class // you wrote for the exercises in § 2.6.2 (p. 76). #if !defined(EX02_H) #define EX02_H #include <string> struct Sales_data { std::string bookNo; double price; unsigned int units_sold = 0; double revenue = 0.0; Sales_data &combine(const Sa...
true
252ac86c35428312034c348f4b6ffdcd1055e97c
C++
AgelkazzWrenchsprocket/PJATK_CPP_PJC
/lab5/zad2/main.cpp
UTF-8
991
3.484375
3
[]
no_license
/* * Rozwiń definicje klasy Osoba o konstruktory: * - pusty – wprowadzający wartości pól do dynamicznie alokowanych zasobów, * - przyjmujący dwa parametry (char*, int) – inicjujący pola przez listę inicjacyjną. * Oba z konstruktorów powinny wyświetlić na ekranie informacje o utworzeniu obiektu Osoba. * Dodefiniuj ...
true
020593f58284d9778e771d5317def2f88d1ca994
C++
luczeng/HoughRectangle
/tests/unit_tests/test_io.cpp
UTF-8
4,823
2.921875
3
[]
no_license
#define CATCH_CONFIG_MAIN #include <catch2/catch.hpp> #include "io.hpp" #include "string" #ifndef STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION #ifndef STB_IMAGE_WRITE_IMPLEMENTATION #define STB_IMAGE_WRITE_IMPLEMENTATION #include <array> #include "stb_image.h" #include "stb_image_write.h" unsigned char uc...
true
9d166f11c79558135dec36bc48fb267b7b1caa96
C++
bjpark0805/Problem_solvings
/examples/programmers_위장.cpp
UTF-8
789
3.46875
3
[]
no_license
//8분 소요 // hash(map) 사용하는 연습문제 // iterator사용하는 법을 잘 익혀두자. #include <string> #include <vector> #include <iostream> #include <map> using namespace std; int solution(vector<vector<string> > clothes) { int answer = 1; map<string, int> m; for(int i = 0; i < clothes.size(); ++i){ if(m.find(clothes[i][1]) !...
true
f16668f56d78e572e7062fcdf107eee47c80fd01
C++
tusharc31/Temperature-Monitoring-System
/ESW.ino
UTF-8
5,100
2.671875
3
[]
no_license
// Embedded Systems Workshop - Lab 2 and 3 // Tushar Choudhary #include "DHT.h" #include <WiFi.h> #include <WiFiMulti.h> #include "BluetoothSerial.h" // Defining the max safe temperature int safe_t=15; // Pin numbers for LEDs and buzzer const byte alert = 23; const byte not_alert = 22; // WiFi and Bluetooh details ...
true
ca265898ec61eaf832181d08da3a7bb51159d74a
C++
AdamFurmanek/ProgramowanieGrafikiKomputerowej
/lab1zad1.h
UTF-8
1,356
2.71875
3
[]
no_license
#pragma once #include <stdlib.h> #include <GL/glut.h> using namespace std; double cameraX = 0; double cameraY = 0; double cameraSpeed = 3.0; bool figure = true; GLUquadricObj* obj; void Display() { glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0, 1.0, 1.0); glLoadIdentity(); glRotatef(cameraX, 1.0f, 0.0f, 0.0f); ...
true
6c0629b8f2effac487b0f041527d3e2ebe0b87f7
C++
tmcphillips/absflow-accelerators
/OpenCL/OpenCL_Features/NumberFilter.Tests/IntegerFilter_Native_Tests.cpp
UTF-8
752
2.875
3
[]
no_license
#include "stdafx.h" #include "CppUnitTest.h" #include <string> #include <vector> #include "Utilities.h" using std::string; using std::vector; using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace NumberFilterTests { template<typename T> vector<T> lowpassFilter(vector<T> inValues, T maxValue) { ...
true
280d8cf924635396fb3ac5cd18359e54449cdaf1
C++
KritikRawal/C-rudiments
/22. Calculator.cpp
UTF-8
1,315
3.46875
3
[]
no_license
#include<iostream> #include<conio.h> using namespace std; class CALC{ public: CALC(int i=0) { result=i; } void addnumber(int num1, int num2) { result=num1+num2; } void subnumber(int num1, int num2) { result=num1-num2; } void multnumber(int num1, int num2) { result=n...
true
064a719ef4160ce766a98c887694c68367bc9600
C++
my-official/NastyMathCPP
/Matrix/BaseMatrix.h
WINDOWS-1251
4,998
2.875
3
[ "MIT" ]
permissive
#pragma once #include "..\Utils.h" template <typename ElementType> using Vector = std::vector<ElementType>; template <typename ElementType> ElementType DotProduct(const Vector<ElementType>& a, const Vector<ElementType>& b); enum class RankMethod { LeftTop, RightTop, RightBottom, LeftBottom }; typedef std::...
true
86a4250ea2c80709072548536f9ba6ddda290f13
C++
colinw7/CQTextFile
/src/CTextFileSel.cpp
UTF-8
6,191
2.515625
3
[ "MIT" ]
permissive
#include <CTextFileSel.h> #include <CTextFile.h> CTextFileSel:: CTextFileSel(CTextFile *file) : file_ (file), selected_(false), selMode_ (RANGE_SEL_MODE), start_ (), end_ () { notifyMgr_ = new CTextFileSelNotifierMgr(this); } void CTextFileSel:: addNotifier(CTextFileSelNotifier *notifier) { notifyMg...
true
00e52fdbeb33567a615688d0b1d92c652321d86d
C++
yuquanF/cpp_course_code
/chapter_2/eg_2_18/quote_1.cpp
UTF-8
1,425
3.828125
4
[]
no_license
#include <iostream> using namespace std; int main() { int i; int &j = i; i = 30; cout<<"i = "<<i<<", j = "<<j<<endl; // i=30,j=30 j = 80; cout<<"i = "<<i<<", j = "<<j<<endl; cout<<"i addr: "<<&i<<endl; cout<<"j addr: "<<&j<<endl; return 0; } /** * 引用说明: * 1)引用名可以使用任何合法的变量名。 * 2...
true
51005fc156945c5cdf916eea4a4a16e24b4c65e5
C++
ShashankRampardos/Cpp
/Assignment 28 Mar 2021/Q27 ClassOfClass.cpp
UTF-8
234
3
3
[]
no_license
#include<iostream> using namespace std; class B { public: int y=0; }; class A { B obj; int x; public: void fun() { cout<<obj.y; } }; int main() { A main; main.fun(); }
true
622444f6901fa4e6bf43ee4f00b6bea64a87104e
C++
harpreethkaurj/Simulation-of-weather-conditions-using-open-gl
/main.cpp
UTF-8
79,493
2.53125
3
[]
no_license
#include <iostream> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<GL/glut.h> #include<windows.h> #define PI 3.1416 GLint i; GLfloat cx=0,str=500.0,mn=500.0; GLfloat sr=0.0,sg=0.749,sb=1.0; void circle(GLdouble rad) { GLint points = 50; GLdouble delTheta = (2.0 * PI) / (GLdou...
true
62d2c3c538da094305a8d8048732811fa06d95aa
C++
DeftHaHa/ACM
/cjluoj/2853.cpp
UTF-8
440
3.28125
3
[]
no_license
#include<cstdio> #include<iostream> using namespace std; void hmove(int n,char a,char b,char c) { if(n==1) printf("%c-->%c\n",a,c); else { hmove(n-1,a,c,b); printf("%c-->%c\n",a,c); hmove(n-1,b,a,c); } } int main() { int n; ...
true
de87787cf2489b9e0352b8d8bffd08c608fe681e
C++
paintdream/PaintsNow
/Source/Utility/MythForest/Component/Field/Types/FieldSimplygon.cpp
UTF-8
3,735
2.59375
3
[ "MIT" ]
permissive
#include "FieldSimplygon.h" using namespace PaintsNow; FieldSimplygon::FieldSimplygon(SIMPOLYGON_TYPE t, const Float3Pair& b) : type(t), box(b) { } TObject<IReflect>& FieldSimplygon::operator () (IReflect& reflect) { BaseClass::operator () (reflect); if (reflect.IsReflectProperty()) { ReflectProperty(type); } ...
true
384e58b6fd34e014cbedb420cc7ac1535230cd90
C++
Hengle/NarvalEngine
/src/primitives/InstancedModel.h
UTF-8
686
2.546875
3
[ "MIT" ]
permissive
#pragma once #include "primitives/Model.h" #include "primitives/Ray.h" #include "primitives/Primitive.h" #include "utils/StringID.h" namespace narvalengine { class InstancedModel { public: StringID modelID = NE_INVALID_STRING_ID; bool isCollisionEnabled = true; Model *model; glm::mat4 transformToWCS; glm::...
true
3838d596e2c33e07590449e860db0d4f96a78143
C++
kjh107704/Algorithm
/BOJ/13460.cpp
UTF-8
6,910
3.3125
3
[]
no_license
#include <iostream> #include <vector> #include <map> using namespace std; int N, M; int min_move = 11; struct position { int x, y; position(int _x, int _y) : x(_x), y(_y) {} }; struct marble { position red; position blue; marble(int x1, int y1, int x2, int y2) : red(position(x1, y1)), blue(posit...
true
d8b137b693aa27ec13a50bfcff3ce30afbb5ab47
C++
closedsum/core
/CsPlugin/Source/CsCore/Public/Containers/CsWeakObjectPtr.h
UTF-8
1,192
2.671875
3
[ "MIT" ]
permissive
// Copyright 2017-2023 Closed Sum Games, LLC. All Rights Reserved. // MIT License: https://opensource.org/license/mit/ // Free for use and distribution: https://github.com/closedsum/core #pragma once class UObject; template<typename ObjectType> struct TCsWeakObjectPtr { static_assert(std::is_base_of<UObject, ObjectT...
true
74e596812b28f3b35845b3dd3f8832342104ad92
C++
vishalsahu5/spoj
/ARMY.cpp
UTF-8
649
2.5625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main(){ freopen("input.txt", "r", stdin); ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin >> t; while(t--){ int G,M; cin >> G >> M; priority_queue<int> A,B; for(int i=0; i<G; i++){ int x; cin >> x; A.push(x); } for...
true
781bc6993a8bb649a6b95ef5f45ff6f8c92cfa3e
C++
volcoma/netpp
/netpp/netpp/error_code.cpp
UTF-8
831
2.890625
3
[ "BSD-2-Clause" ]
permissive
#include "error_code.h" namespace net { namespace { const net_err_category net_category{}; } const char* net::net_err_category::name() const noexcept { return "network"; } std::string net::net_err_category::message(int ev) const { switch(static_cast<errc>(ev)) { case errc::data_corruption: ...
true
963e8c83be23827483bac3415c991206f628b0bd
C++
ajmalsiddiqui/mouse-cli
/src/cli_ncurses.cpp
UTF-8
1,995
2.828125
3
[]
no_license
#include <iostream> #include <stack> #include <string> #include <string.h> #include <ncurses.h> #include <term.h> //include the OS specific interrupt handler //_WIN32 is defined for both windows 64 bit and 32 bit #if defined(_WIN32) // TODO: write the handlers for windows //if not windows, then assume unix #else ...
true
cb5edf2fc25dc5097b00460d13e3052c10a51fea
C++
syalanurag1991/ImageProcessing
/C++/src/FeatureReduction.cpp
UTF-8
1,144
2.515625
3
[]
no_license
#include "FeatureReduction.h" #include "pca.h" #define NUM_REDUCED_FEATURES 3 vector<vector<float>> ReduceFeaturesUsingPCA(vector<vector<float>> &feature_set) { stats::pca pca(feature_set.front().size()); vector<double> v3(feature_set.front().size(), 0); vector<vector<double>> double_feature_set(feature_set.size...
true
048de15161b8327aad99aa87d0169e3b9712185a
C++
omjee17/DS_Algo_Questions
/Backtracking/print_all_permutations_of_a_string.cpp
UTF-8
791
2.984375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; class Solution { public: vector<string>ans; void helper(string s,int l,int r) { if(l==r) { ans.push_back(s); return; } for(int i=l;i<=r;i++) { swap(s[l],s[i])...
true
bafc6c5ba4fae5fcd8206ab8fecf2596a492d859
C++
hanjongho/baekjoon
/dijkstra/1504.cpp
UTF-8
1,591
2.875
3
[]
no_license
#include <iostream> #include <queue> #include <vector> #include <algorithm> #define INF 987654321 using namespace std; int dist[801]; int N, E, v1, v2, v1_ans, v2_ans, v3_ans, v4_ans; vector <pair<int, int> > v[801]; priority_queue <pair<int, int> > q; void dijkstra(int x) { for (int i = 1; i <= N; i++) d...
true
6b165614720699195f10d559489f7d68da72d644
C++
Ian-Parberry/Tourney
/Code/TakefujiLee.cpp
UTF-8
7,161
2.515625
3
[ "MIT" ]
permissive
/// \file TakefujiLee.cpp /// \brief Code for the neural network tourney generator CTakefujiLee. // MIT License // // Copyright (c) 2019 Ian Parberry // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in...
true
d232cf0667b784582d802f0e1aa6dc756c333ef3
C++
silviuh/first_game
/MyfirstSDLgame/main.cpp
UTF-8
6,625
2.609375
3
[ "Zlib", "FTL", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
#include "gameHandler.h" #include "LevelManager.h" #include "EndGameMenu.h" #include "CharacterMenu.h" bool restartGameFlag = false; bool backToMainMenuFlag = false; int totalScore = 0; Game *game = nullptr; Menu *endGameMenu = nullptr; Menu* mainMenu = nullptr; Menu* characterMenu; LevelManager *gameLevelManager = n...
true
ffc5ad65d4789cc0ae92429287f7c52c595af2c9
C++
venkatarajasekhar/tortuga
/wrappers/core/include/EventFunctor.h
UTF-8
886
2.640625
3
[]
no_license
/* * Copyright (C) 2007 Robotics at Maryland * Copyright (C) 2007 Joseph Lisee <jlisee@umd.edu> * All rights reserved. * * Author: Joseph Lisee jlisee@umd.edu> * File: wrappers/core/include/EventFunctor.h */ #ifndef RAM_CORE_WRAP_EVENTFUNCTOR_H_10_30_2007 #define RAM_CORE_WRAP_EVENTFUNCTOR_H_10_30_2007 // Lib...
true
c378f1e75c56d8f24bc7b554aa26f2d7863799de
C++
pvantonov/qnavierstokes
/src/side_heating/side_heating_solver.hpp
UTF-8
10,738
2.8125
3
[]
no_license
#pragma once #include <QtCore/QMutex> #include <QtCore/QThread> //! Класс, отвечающий за решение конвективной задачи бокового подогрева. class SideHeatingSolver : public QThread { Q_OBJECT public: //! \param[in] parent Указатель на родительский виджет. SideHeatingSolver(QObject *parent = NULL); ~Side...
true