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
bd6a505bae8acebf74af98fe1732204bc7b3a11f
C++
chrisyees/cs100
/src/headers/vectorContainer.h
UTF-8
1,447
2.90625
3
[ "BSD-3-Clause" ]
permissive
#ifndef _VECTORCONTAINER_H_ #define _VECTORCONTAINER_H_ #include "rshell.h" #include <string> #include <string.h> #include <unistd.h> #include <stdio.h> #include <typeinfo> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include "argument.h" #include "connector.h" #include <sys/wait....
true
9661e2bfb2e3ce58b54f037d50b32f28d672355e
C++
movie-travel-code/moses
/src/include/IR/IRType.h
UTF-8
6,990
2.71875
3
[]
no_license
//===----------------------------------IRType.h---------------------------===// // // This file contains the declaration of the Type class. // //===---------------------------------------------------------------------===// #pragma once #include "Parser/Type.h" #include <cassert> #include <iostream> #include <m...
true
23192fb8b6269d006d5c68f42e2f4fc6aa5210d4
C++
piffs1/AnyCPP
/zadachi/mergeIntervals.cpp
UTF-8
1,638
3.6875
4
[]
no_license
/* Merge intervals. * input :[1;3][2;6][8;10][15;18] * output:[1;6][8;10][15;18] * Program can insert intervals and merge intervals */ #include <iostream> #include <map> #include <stack> #include <vector> using namespace std; int main() { vector<pair<int,int>> vr; int lb,rb; //lb = left border. rb = right ...
true
7187a0800d039c576670442a18de58f4705c4069
C++
usini/bottangoTest
/BottangoArduino/src/CircularArray.h
UTF-8
1,583
3.390625
3
[]
no_license
#ifndef BOTTANGO_CIRCULARARRAY_H #define BOTTANGO_CIRCULARARRAY_H #include "Errors.h" #include "Log.h" template <class T> class CircularArray { T **array; byte capacity; byte idx; public: explicit CircularArray(int capacity); void pushBack(T *data); void remove(T *toRemo...
true
1579795c4c75277b7df19ff76e2d517261571253
C++
tixvage/Console-Game
/Level.cpp
UTF-8
265
2.609375
3
[]
no_license
#include "Level.hpp" Level::Level(Window* window, std::stack<Level*>* levels) { this->window = window; this->levels = levels; this->quit = false; } Level::~Level() { } const bool& Level::getQuit() const { return this->quit; } void Level::checkForQuit() { }
true
912e364fea0df7058ddf0772e100b03a0b513e3a
C++
maxthielen/yml
/test/WorldTests/HistorySizeTest.cpp
UTF-8
1,905
2.578125
3
[ "MIT" ]
permissive
//// //// Created by emiel on 04-02-20. //// // //#include <gtest/gtest.h> //#include <test/helpers/FieldHelper.h> //#include <test/helpers/WorldHelper.h> //#include <include/roboteam_ai/world/World.hpp> // //TEST(worldTest, HistorySizeTest) { // /* Note, this test only works if the history of worlds is still empty....
true
1ee2ae62ec67134d0b0dccf77adf4abd7a8a08e3
C++
36V3mA21Hz/LeetCodePractice
/Codes/BestTimeToBuy.cpp
UTF-8
525
3.015625
3
[]
no_license
class Solution { public: int maxProfit(vector<int> &prices) { if (prices.empty()) return 0; int n = prices.size(); vector<int> diff; diff.push_back(0); for (int i = 1; i < n; i++) { diff.push_back(prices[i] - prices[i-1]); } int max_end = INT_MIN; int max = INT_MI...
true
9a4700c1702e637afc895ba6643740e11c9ffd05
C++
AlexMalov/Softbox
/SoftBox/effects.ino
UTF-8
1,698
2.859375
3
[]
no_license
// --------------------------------- конфетти ------------------------------------ void sparklesRoutine() { for (byte i = 0; i < scale; i++) { byte x = random(0, WIDTH); byte y = random(0, HEIGHT); if (getPixColorXY(x, y) == 0) leds[getPixelNumber(x, y)] = CHSV(random(0, 255), 255, 255); } fader...
true
41c651c93b8d77ce768d8fe3c72929cb2c5b806d
C++
anzhedro/labs
/C++/6. Template_Array_Stack/ArrayStack.h
WINDOWS-1251
1,857
3.140625
3
[]
no_license
struct BAD{}; template <class T> class ArrayStack { int size; int top; T *p; public: ArrayStack(const int& _size); ArrayStack(ArrayStack &s) { size = s.size; p = new T[size]; for(int q = 0; q < size; q++) { p[q] = s.p[q]; } top = s.top; } ~ArrayStack(); void push(const T &x); T pop(); bool isE...
true
7d55e35d5affeaa7640f6ff1c94a7c5458d480cb
C++
connerkward/OpenAgent_2D
/src/environments/Tile.cpp
UTF-8
866
3.328125
3
[]
no_license
/** This object represents a location on a Board, and can contain Food, an Agent, or both. */ #include "Tile.h" Tile::Tile(int x, int y) : xPos(x), yPos(y) { entity = nullptr; } void Tile::placeEntity(Entity& newEntity) { entity = &newEntity; } void Tile::removeEntity() { entity = nullptr; } ENTITY_TYPE Tile...
true
45ca984145f20d293f1f7510b3b32a2cd6a09f5e
C++
goelShweta/C-code
/cons_var_size.cpp
UTF-8
547
3.359375
3
[]
no_license
#include <iostream> using namespace std; int main() { int a=2321; char c[] ="da"; long l=1234334445; short sh=12; float f=12.34; double d=12.345; string s[]="abcdefgh"; cout <<"integer size "<<sizeof(a)<<endl; cout <<"character size "<<sizeof(c)<<endl; cout <<"fl...
true
fe6b26c285ca951efd5ddedf7bce3b2af1a1f50f
C++
Beaterie/programmiersprachen-aufgabenblatt-3
/source/aufgabe5.cpp
UTF-8
584
2.84375
3
[]
no_license
#define CATCH_CONFIG_RUNNER #include <catch.hpp> #include <cmath> #include <algorithm> #include <vector> bool is_odd(int i){ return (i % 2) != 0; } bool is_even(int i){ return (i % 2) == 0; } TEST_CASE("describe_factorial", "[aufgabe3]"){ // ihre Loesung : std::vector<int> v(100); for (std::vector<int>::iter...
true
34500911eb1dadb0bafa03f0475b895799007df2
C++
Nantus/Database
/main.cpp
UTF-8
1,240
3.265625
3
[]
no_license
#include <iostream> #include <vector> #include <map> #include <string> #include <algorithm> #include <math.h> #include <iomanip> #include <exception> #include <stdexcept> #include <sstream> using namespace std; int main() { Database db; string command; string c; string event; Date date; while (getline(c...
true
40ef05e6cc2ac9c595a16fb4a677683f74ee0572
C++
AtelierNum/projet_dis-information_signals_1819
/Unoui/Code_UNOUi_Farouk-Robin/Code_UNOUi_Farouk-Robin.ino
UTF-8
2,764
3.046875
3
[ "MIT" ]
permissive
const int numReadings = 50; int readings[numReadings]; // the readings from the analog input int readIndex = 0; // the index of the current reading int total = 0; // the running total int average = 0; // the average int inputPin = 0; #include <FastLED.h> #define NUM_...
true
61a538e5d664cc8f4cec02ac541e12211549e0bb
C++
HaseProgram/University
/4sem/OOP/02/02/iterror.h
UTF-8
511
3.03125
3
[]
no_license
#pragma once #include <exception> class ItError : public std::exception { public: virtual const char* out() { return "Iteration error occured"; } }; class Range : public ItError { public: const char* out() { return "Attempt to apply item out of range!"; } }; class Index : public ItError { public: con...
true
d3bb2fb2d4518eea4705071b775736ba228e8d14
C++
learningZhang/lodeBalancer
/lodeBalancer/server2.cpp
UTF-8
1,272
2.546875
3
[]
no_license
#include "head.h" #include "mysql.h" #include "server.h" int searchFd(CMysql &db, const char *name) { if (name == NULL || strlen(name)>12) { return -1; } return db.getStates(name);//对离线信息进行存储,之后按照姓名进行查找 } bool findMesgByName(CMysql &db, const char*name, char *str, int length) { return db.findMessageByName(name...
true
9381f802b511839ce6cc9c8edcafe4af8cad6b9a
C++
nadirizr/betterp2p
/core/src/libbp2p/common/BitVector.cc
UTF-8
791
2.859375
3
[]
no_license
#include "BitVector.h" #include <iostream> using namespace std; namespace BT2 { BitVector bitvector_from_string(const std::string& data, size_t bitlen) { if (bitlen == 0) { // if no bitlen given, assume all bits are used bitlen = data.length() * BitVector::bits_per_block; } BitVector b(d...
true
c36c7b7a5a12eecb487e645d22af5c09469f4006
C++
Houssk/Synthese-d-images-avec-OpenGL
/Materials/FittingTexture/C++/Rectangle3.cpp
UTF-8
1,733
2.78125
3
[]
no_license
// Définition de la classe Rectangle3 #include <GL/glew.h> #include <GL/gl.h> #include <math.h> #include <sstream> #include <iostream> #include <utils.h> #include <MeshModuleDrawing.h> #include <Rectangle3.h> /** * Constructeur */ Rectangle3::Rectangle3() { // créer le maillage m_Mesh = new Mesh("Recta...
true
2a18ce0eb222114427feb2e3ce7d9b5b2ddec818
C++
Abhishek-Rout/Competitive-Coding
/HackerRank/30 Days of Code/Day 22 Binary Search Trees/BinarySearchTrees.cpp
UTF-8
328
2.515625
3
[]
no_license
int getHeight(Node* root){ //Write your code here if(!root) { return -1; } int leftDepth = getHeight(root->left); int rightDepth = getHeight(root->right); return (leftDepth > rightDepth ? leftDepth : rightDepth) + 1; ...
true
8b5f4c81b2aa0535aee237d9300d869751cded82
C++
Christoph9402/CarND-PID-Controller
/src/PID.cpp
UTF-8
769
3.265625
3
[ "MIT" ]
permissive
#include "PID.h" PID::PID() {} PID::~PID() {} void PID::Init(double Kp, double Ki, double Kd) { this->Kp=Kp; this->Ki=Ki; this->Kd=Kd; //Initializing errors and previous_cte with 0.0 p_error=0; i_error=0; d_error=0; } void PID::UpdateError(double cte) { // D-component: calculated by subt...
true
232cbfdf38ed4db7b04d9a8b6f63a9e588dd71c3
C++
ZackSungy/Learn-C-Language
/Subset/main.cpp
UTF-8
304
2.828125
3
[]
no_license
#include<stdio.h> void f(int n, int *A, int cur) { for (int i = 0; i < cur; i++) { printf("%d", A[i]); } printf("\n"); int s = cur ? A[cur - 1] + 1 : 0; for (int i = s; i<n; i++) { A[cur] = i; f(n, A, cur + 1); } } int main() { int n, a[10]; scanf("%d", &n); f(n, a, 0); return 0; }
true
b5cc1f984f7f73a63d4129fd7ea01b8e43c97e3b
C++
andreimit11/TemaPoo3
/TemaPOO3/Cont_de_economii.cpp
UTF-8
3,292
2.734375
3
[]
no_license
#include "Cont_de_economii.h" #include <iostream> Cont_de_economii::Cont_de_economii(const Cont_de_economii&cont) { using namespace std; m_detinator=cont.m_detinator; copy_date(cont.m_data_deschiderii); m_sold=cont.m_sold; m_rata_dobanzii=cont.m_rata_dobanzii; m_tipul_dobanzii=cont.m_...
true
979812117c1e550b490a8d49141761de0f0ae7c9
C++
NathanielRN/uwaterloo-class-resources
/ECE 250/weightedgraph/Weighted_graph.h
UTF-8
16,544
3
3
[]
no_license
/***************************************** * Instructions * - Replace 'uwuserid' with your uWaterloo User ID * - Select the current calendar term and enter the year * - List students with whom you had discussions and who helped you * * uWaterloo User ID: enruizno @uwaterloo.ca * Submitted for ECE 250 * Depa...
true
3378d67ca123b2432768f1982bf0745ccd3224fa
C++
OxOOO1/RawRenderer
/RawRenderer/RawRenderer/src/Scene/DrawableComponent/DebugDraw.h
UTF-8
2,052
3.078125
3
[]
no_license
#pragma once #include "Drawable.h" class RDebugDrawable { public: enum EType { PLANE = 6, CUBE = 36, CONE = 192, CIRCLE = 96, ICOSPHERE = 240, UVSPHERE = 2880, }; struct InstanceDescription { matrix TransformMat; float4 Color; }; RDebugDrawable(EType inType) { Type = inType; Instances...
true
6962e1f309ac249f393bd60ddac277381a7443ba
C++
winwingy/Study
/HomeDoOld/VolumeScreenWebSpeed/Old/WRect.cpp
UTF-8
767
2.71875
3
[]
no_license
#include "StdAfx.h" #include "WRect.h" namespace wingy_ui { WRect::WRect(void) { } WRect::WRect(int l, int t, int r, int b) { left = l; top = t; right = r; bottom = b; } WRect::operator RECT ()const { RECT rect = {left, top, right, bott...
true
bbc64f52e00a25d6b9e4d9025cf28fded3ac2bd2
C++
furongw/DS
/ch4/ch4/main5.cpp
UTF-8
268
2.546875
3
[]
no_license
#include <stdio.h> #include "selectionsort.h" int main() { DataType R[7+1]; int data[7] = { 6,15,45,23,9,78,35 }; int i; for (i = 1; i <= 7; i++) { R[i].key = data[i-1]; } Simple_Select_Sort(R, 7); for (i = 1; i <= 7; i++) { printf("%d ", R[i].key); } }
true
745cb73ff3c8e519c2895157e887fef322815cc2
C++
singhdharmveer311/PepCoding
/Level-2/22. HashMap and Heap/Longest Substring Without Repeating Characters.cpp
UTF-8
865
2.921875
3
[ "Apache-2.0" ]
permissive
#include<iostream> #include<vector> #include<string> #include<map> using namespace std; int lengthOfLongestSubstring (string &s) { //Write your code here int i=-1,j=-1; int n=s.length(); int ans =-1; map<char,int> mp; while(i<n-1){ //acquire while(i<n-1){ i++; ...
true
62c6a39258a250597b90a5c0d89a1f19729e7705
C++
lhprojects/QuSim
/src/DeviceTemplate.h
UTF-8
46,975
3.1875
3
[]
no_license
#pragma once #include "Device.h" #include <memory> #include <complex> #include <algorithm> #include <execution> #include <utility> #include <tuple> #include <cstddef> #include <cstring> // for memmove #ifndef QUSIM_HOST_DEVICE #define QUSIM_HOST_DEVICE #endif template<class Integer> struct int_iter { using di...
true
a4eb7616b7cee06a374ee4643c4db5ba5cae2ccc
C++
Silvertrousers/C_Compiler_Coursework
/translator/include/c2python_ast.hpp
UTF-8
922
2.640625
3
[]
no_license
#ifndef c2python_ast_hpp #define c2python_ast_hpp #include <vector> #include <string> #include "c2python_symbol_table.hpp" class c2python_ast_node{ public: std::string node_type; std::string value; std::vector<std::string> branch_notes; std::vector<c2python_ast_node*> branches; void...
true
16300c7eb71b075f64cee5305364d9db4f915271
C++
omec-project/epctools
/include/epc/ehash.h
UTF-8
17,375
2.625
3
[ "Apache-2.0", "FSFAP" ]
permissive
/* * Copyright (c) 2009-2019 Brian Waters * Copyright (c) 2019 Sprint * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
true
8cc2490c80125330ab99f9d450e6c298bf66bb6a
C++
awiebe1996/WiebeAndrew_CIS5_Spring2017
/Homework/Homework 4/Gaddis_8thEd_Chap5_Prob7_Pennies/main.cpp
UTF-8
1,320
3.75
4
[]
no_license
/* * File: main.cpp * Author: Andrew Wiebe * Created on April 3, 2017, 01:00 PM * Purpose: Pennies. */ //System Libraries #include <iostream> //Input - Output Library using namespace std; //Name-space under which system libraries exist //User Libraries //Global Constants //Function Prototypes //Execution...
true
afad44d08716c2671ae05c0b0ba2caa142d2eaa0
C++
RunaticMoon/BOJ
/백준/1157 단어 공부.cpp
UTF-8
729
3.3125
3
[]
no_license
#include <iostream> #include <string> #include <algorithm> #include <functional> using namespace std; int compare(int a, int b) { return a - b; } int main() { string str; int alphabet[26], tempAlphabet[26], max = 0; fill(alphabet, alphabet + 26, 0); cin >> str; for (auto it = str.begin(); it != str.end(); ++i...
true
9bf00e200ca4fb3bc94848bbd3e615c6338f2f61
C++
JosephMillsAtWork/u2t
/libu2t-private/gsettings-qt/src/util.cpp
UTF-8
1,927
2.578125
3
[]
no_license
/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT A...
true
d593567bb46718ab6bcecfd87e57921b951417db
C++
jiye-algorithm/Data-Structure
/吉页c++库/ch2/employee/employee.cpp
GB18030
1,543
3.5
4
[]
no_license
/* 201449 15:04:51 ҳ ܣ ˳ģʱԱϰ500PM °뿪 ʾûϰСʱͷԼᱣϺţ ʹtimeCardȷԱһĹʣ ʹģķ֮ԱԼ £ ûдʱ timeCard ׳rangeError쳣 catch ģԱΪԱ */ #include <iostream> #include "E:\ѧϰ\ݽṹ\ݽṹSTL\ҳc++\include/y_random.h" #include "E:\ѧϰ\ݽṹ\ݽṹSTL\ҳc++\include/y_tcard.h" using namespace std; int main() { // ÿСʱнˮ const double PAYRATE = 12.5; /...
true
b6e86bfb176512d09e24685ae91fa5afaecc0c6a
C++
arnabs542/ikk2
/Sorting/HW1/TopKElementsFromStream/TopKElementsFromStream.cpp
MacCentralEurope
3,697
3.703125
4
[]
no_license
/* Top K Problem Statement: You are given an array of integers arr, of size n, which is analogous to a continuous stream of integers input. Your task is to find K largest elements from a given stream of numbers. By definition, we don't know the size of the input stream. Hence, produce K largest elements seen so ...
true
21866c3cfedef97447da2c23b787af9806575456
C++
jectivex/ScriptCore
/backend/Lua/LuaLocalReference.cc
UTF-8
12,351
2.796875
3
[]
no_license
#include <ScriptCore/ScriptCore.h> #include "LuaHelper.hpp" namespace script { namespace lua_backend { int copyLocal(int index) { if (index == 0) { return 0; } auto lua = currentLua(); luaEnsureStack(lua, 1); lua_pushvalue(lua, index); return lua_gettop(lua); } void ensureNonnull(int index) { if...
true
f061487c8825afaf9a29f2c11a1bc70aad9a2e22
C++
m1001200/Linux_Project
/Quellcode/main.cpp
UTF-8
1,189
2.625
3
[ "MIT" ]
permissive
// Arkadij Doronin 24.05.2013 // IRC-Bot #ifndef main_cpp #define main_cpp #include <iostream> #include <string> #include <cstdlib> #include <cstdio> #include <cstring> #include "SQLite.h" using namespace std; int main(){ pid_t PID[15]; int countPID = 0; // sqlite_BD wird geöffnet sql_init(); ...
true
57f1654dbbfa214b7fd0798142b67de0da682a60
C++
ChenChangxi/Basic-Algorithm
/Hash/1092 To Buy or Not to Buy (20分).cpp
UTF-8
2,518
3.671875
4
[]
no_license
//// Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sell the strings in whole pieces. Hence Eva must check whether a string in the shop contains all the beads she needs. ...
true
b3effd82a163861e293b2b63859e3646f4500f1e
C++
megatrihr/Arduino-Project
/e_mpu6050_set.ino
UTF-8
1,909
2.84375
3
[]
no_license
void MPU6050_set(){ Wire.begin(); //Initiate the Wire library and join the I2C bus as a master /*set clockspeed 400KHz for fast access default is 100 KHz if you want to use default one just comment out line 27 */ Wire.setClock(400000); //wait for some time to get ready MPU6050 delay(500); ...
true
c05075f825e8756bafa3cd9827c597688500e536
C++
KazuhitoT/competitive-programming
/lib/rolling_hash.cpp
UTF-8
1,086
2.90625
3
[]
no_license
#include <string> const unsigned long long B = 1000000007; // const unsigned long long B = 10000000000000061ULL; bool contain(std::string a, std::string b) { int al = a.length(), bl = b.length(); if (al > bl) { return false; } unsigned long long t = 1; for (int i = 0; i < al; i++) { ...
true
8142fcaa33b35911595f127ac8a69aaf3d702344
C++
nguaki/CPP
/hackerrank/variadic/var_parameters.cpp
UTF-8
856
4
4
[]
no_license
// Oct 13, 16 // //Demonstrates variadic ( unknown type and unknown size) // //1, 2, 3, 4 //1, 2, 3, 4, 5 //Hello, World, 2.3, 4.567, C, 1 #include <iostream> using namespace std; //This is a must otherwise there is a compilation error. //This takes care of the last element. template <typename T> ostream &vPrint(ost...
true
5de04b8dbe8811a0b84adfd4c8d2377089b66d33
C++
godnoTA/acm.bsu.by
/4. Алгоритмы на графах/64. Построить матрицу смежности #3271/[OK]166384.cpp
UTF-8
664
3.03125
3
[ "Unlicense" ]
permissive
#include <iostream> #include <fstream> using namespace std; int main() { ifstream fin("input.txt"); ofstream fout("output.txt"); int n,m; fin >> n; fin >> m; int** matrix=new int*[n]; for (int i = 0; i < n; i++) matrix[i] = new int[n]; for (int i = 0; i < n; i++) for (int j = 0; j < n...
true
740760413cc79dfb396ff51f89e4aee84a7b99ad
C++
ajaysharma12799/Data-Structure-With-CPP
/Array/matrixmultiply.cpp
UTF-8
1,136
3.546875
4
[]
no_license
#include <iostream> using namespace std; int main(int argc, char const * argv[]) { int row, col, sum; cout << "\n Enter Row : "; cin >> row; cout << "\n Enter Column : "; cin >> col; //creating matrix of specific size int arr1[row][col], arr2[row][col], multi[row][col]; //taking inp...
true
571b806dd48dff2551f3c144ea8d11c879b711aa
C++
thesonofwil/cs220-Intermediate_Programming_Final_Project
/basicgamerules.cpp
UTF-8
5,695
3.328125
3
[]
no_license
//Brhea D'Mello //bdmello2 //Jingyu Huang //jhuan146 //Wilson Tjoeng //wtjoeng1 #include "basicgamerules.h" #include "entity.h" #include "entitycontroller.h" #include "game.h" #include "maze.h" #include "tile.h" BasicGameRules::BasicGameRules() { } BasicGameRules::~BasicGameRules() { } /* Allow Entity to make a mov...
true
1f5c3cf653bbb0e2aad01583a01f1d9ab1d278e4
C++
Wiladams/sr
/lessons/week7/testy/test_vectypes.cpp
UTF-8
195
2.53125
3
[ "MIT" ]
permissive
#include <stdio.h> #include "vec_types.hpp" void main() { vec3 v1 = {10,20,30}; vec3 v2 = {20,30,40}; vec3 v3 = v1 + v2; printf("add: %3.2f %3.2f %3.2f\n", v3.x, v3.y, v3.z); }
true
c98cd170200830440a12b0ddf1daa6f405f2c506
C++
lepecoder/threadpool
/threadpool.cpp
UTF-8
4,039
3.171875
3
[]
no_license
#include "threadpool.hpp" #include <cstring> #include <iostream> #include <string> using namespace std; /********** * 任务队列定义 * **********/ TaskQueue<function<void()>>::TaskQueue() { /* 构造函数 */ } TaskQueue<function<void()>>::~TaskQueue() { /* 析构函数 */ } /* 添加任务 */ void TaskQueue<function<void()>>::addTask(T &t) { ...
true
b0b73f79069fff885a024cb752cc9eeb1b405fb2
C++
CP-Mangue/cp-lib
/codes/math_nt/SegmentedSieve.cpp
UTF-8
926
3.140625
3
[]
no_license
/* Author: Ubiratan Correia Barbosa Neto */ /* Segmented Erathostenes Sieve */ /* Needs primes up to sqrt(N) - Use normal sieve to get them */ namespace NT { const int MAX_N = 1123456; bitset<MAX_N> prime; vector<int> primes; vector<int> seg_primes; void Sieve(int n) { prime.set(); prime[0] = false; prime[1]...
true
97a11b82181ef909ea0675c9c71d64b7b5cf0944
C++
kostathai/PrisonerDilemma
/table.h
UTF-8
1,326
2.9375
3
[]
no_license
#pragma once #include <fstream> #include <map> #include <vector> typedef std::map<std::vector<char>, std::vector<int>> MATRIX_; static MATRIX_ CreateMatrix(const std::string &filename) { MATRIX_ T; if (filename.empty()) { T[{'D', 'D', 'D'}] = {1, 1, 1}; T[{'D', 'D', 'C'}] = {5, 5, 0...
true
2db1dd451375a7d6e2b35ba7ba5e1adbd6e954e9
C++
Ranima/particles
/CheckingBits/CheckingBits/pool.h
UTF-8
2,637
3.34375
3
[]
no_license
#pragma once #include <vector> template <typename T> class obpool { const static size_t Default_Pool_Size = 100; std::vector<T> pool; std::vector<bool> poolValidity; size_t nextEmpty() { for (size_t i = 0; i < poolValidity.size(); ++i) { return i; } size_t newIdx = pool.size(); pool.resize(pool.s...
true
ad6cd6ad12e515f4eea7bd038c4f0e9f363cbd38
C++
rohitsikka/UVa
/UVa 531.cpp
UTF-8
1,478
2.578125
3
[]
no_license
#include<iostream> #include<cstdio> #include<cstring> using namespace std; string s1[110],s2[110]; short int C[110][110],S[110][110],n1,n2; bool flag=false; void print(int i,int j) { if(i<=0||j<=0) return ; if(S[i][j]==0) { print(i-1,j-1); if(flag) cout<<" "<<s1[i-1]; ...
true
46f3da5c2809c3a448f84ebab9bcebfcbb648075
C++
adityabettadapura/Algorithms-and-Datastructures
/linkedlist/add_linked_lists.cpp
UTF-8
1,855
3.953125
4
[]
no_license
/**************************** Add two lists: the digits of two numbers are represented as nodes of 2 lists. Author: Aditya Bettadapura ****************************/ #include<iostream> #include<stack> #include<cstdlib> using namespace std; struct node{ int data; node* next; }; node* StackToList(stack<int> stk){ ...
true
847685e2ec0fb85b77073872ecb33ea07f52bfc4
C++
GLeurquin/shiny-waffle
/Project5/add_markers/src/add_markers.cpp
UTF-8
4,315
2.90625
3
[]
no_license
#include "ros/ros.h" #include <visualization_msgs/Marker.h> #include "add_markers/ModifyMarker.h" class AddMarkersService { public: AddMarkersService() { // Advertise a service to change markers in rviz ROS_INFO("Offering modify marker service on /add_markers/modify_marker"); service_ = n_....
true
69c7b7bc897fe9cbe7af75e368a0990538cb0458
C++
yisonPylkita/opengl-cpp-playground
/triangle/triangle/triangle.cpp
UTF-8
2,945
3.046875
3
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <GL/glew.h> #include <SFML/OpenGL.hpp> #include <SFML/Window.hpp> using namespace std::string_literals; // TODO: replace it with spdlog class Log { public: static void debug(const std::string &msg) { std::cout << "[DEBUG]: " << msg << std::endl; } s...
true
30a15e1f97e822273319a29be0ad3a59395a8a6d
C++
tfeldmann/QlockToo
/Firmware/DemoMatrix.ino
UTF-8
858
3.1875
3
[ "MIT" ]
permissive
// // Matrix screen Mode // #include "globals.h" void demo_matrix_setup() { srand(seconds + minutes + hours); display_clear(); corner_clear(); } void demo_matrix_loop() { static int wait_move = 0; static int wait_light = 0; if (++wait_move == 10) { wait_move = 0; // move...
true
27b436dbfc83912efe3bbd535bdfe3d13060b24e
C++
art-kosm/homeworks
/term_2/homework_06/arithmetic_tree/operatorDiv.cpp
UTF-8
158
2.734375
3
[]
no_license
#include "operatorDiv.h" OperatorDiv::OperatorDiv() { value = '/'; } int OperatorDiv::calculate(int left, int right) const { return left / right; }
true
335f39087d8968b6f52061b79b8d4ec739646bb7
C++
BITERP/PinkRabbitMQ
/src/amqpcpp/linux_tcp/tcpchannel.h
UTF-8
1,154
3.25
3
[ "BSD-3-Clause", "MIT" ]
permissive
/** * TcpChannel.h * * Extended channel that can be constructed on top of a TCP connection * * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com> * @copyright 2015 - 2017 Copernica BV */ /** * Include guard */ #pragma once /** * Set up namespace */ namespace AMQP { /** * Class definition *...
true
b062a05d820ac2df48c82282004f1d73a80d336c
C++
scortier/Snippets
/Amazon/Maxm min path 1.cpp
UTF-8
1,540
3.640625
4
[]
no_license
// Given a matrix with r rows and c columns, find the maximum score of a path starting at [0, 0] and ending at [r - 1, c - 1]. The score of a path is the minimum value in that path. For example, the score of the path 8 → 4 → 5 → 9 is 4. #include <iostream> #include <string> #include <vector> #include <limits.h> using ...
true
9ea7d61e5f77f5e1b5f14f3e5a632cd961d05b02
C++
D34Dspy/warz-client
/External/ChilKat/include/CkHtmlToText.h
UTF-8
1,898
2.515625
3
[]
no_license
// CkHtmlToText.h: interface for the CkHtmlToText class. // ////////////////////////////////////////////////////////////////////// #ifndef _CkHtmlToText_H #define _CkHtmlToText_H class CkByteData; #include "CkString.h" #include "CkMultiByteBase.h" #ifdef WIN32 #pragma warning( disable : 4068 ) #pragma unmanaged #...
true
6d18777865204f78bcd08c289008734791c47133
C++
Moreniell/study-projects
/CPlusPlus/Time/Time.cpp
UTF-8
3,131
3.359375
3
[]
no_license
#include "stdafx.h" #include "Time.h" #include "Utils.h" // Конструкторы и деструктор Time::Time(WORD hh = 0, WORD mm = 0, WORD ss = 0) { setTime(hh, mm, ss); cout<<"Конструктор"<<endl; } Time::Time(const Time &time) { setTime(time.hour, time.minute, time.second); cout<<"Копирующий конструктор"<<endl; } Ti...
true
81bc7f2af0511a5776883158436d30fbc135f1c7
C++
chengfx/my_leetcode_exercise
/77. Combinations/Combinations.cpp
UTF-8
873
3.40625
3
[]
no_license
#include"Combinations.h" #include<iostream> using namespace std; void Combinations::example() { vector<vector<int>> results = combine(4, 3); for (auto& row : results) { for (auto& column : row) cout << column; cout << endl; } } vector<vector<int>> Combinations::combine(int n, int k) { vector<vector<int>> ...
true
0cdc6351472a95ab09f492c986aa3530221d74a6
C++
pdschubert/WALi-OpenNWA
/Source/opennwa/RelationOpsPaired.hpp
UTF-8
13,846
2.65625
3
[ "MIT" ]
permissive
#ifndef RELATION_OPS_PAIRED_HPP #define RELATION_OPS_PAIRED_HPP #include <algorithm> #include <iterator> #include <cassert> #include <utility> #include <map> #include <set> #define relations std_set_relations #include "RelationOps.hpp" #undef relations #define relations buddy_relations #include "Relatio...
true
81f23423f361baa03beba2f25f3a3b6c845dee76
C++
thb32133451/windows
/第七章 思考题 10/第七章 思考题 10/calculate.cpp
UTF-8
671
3.3125
3
[]
no_license
#include <iostream> using namespace std; double add(double x, double y); double point(double x, double y); double calculate(double x, double y, double(*pf[2])(double, double)); int main() { double x, y; double (*pf[2])(double, double) = { add,point }; if ((cin>>x && cin>>y)) { double z = calculate(x,y,pf); co...
true
d4afda9857833f555590fe93c84c29600f31ea4f
C++
HongYeseul/DataStructure
/C++_Vacation/1230/Calculator/Adder.cpp
UTF-8
167
2.5625
3
[]
no_license
#include <iostream> using namespace std; #include "Adder.h" Adder :: Adder(int a, int b){ op1 = a; op2 = b; } int Adder :: process(){ return op1+op2; }
true
855a206b9057da1204983393af53dee58f2650c1
C++
antonmax/Anton-s-Space-Invaders
/SFMLProject/GP1/Game/CountdownTimer.h
UTF-8
371
2.625
3
[]
no_license
#pragma once #include "stdafx.h" class CountdownTimer{ public: CountdownTimer(); void SetTime(int hours, int minutes, int seconds); void Update(); void Reset(); void Start(); void Stop(); bool Done(); int Seconds; int Minutes; int Hours; private: sf::Clock clocks; sf::Time time; bool ticking; int default...
true
961fb672d0df5da7510fc4d8996a1cd0002f332e
C++
JJJoonngg/Algorithm
/백준/1373_2진수8진수.cpp
UTF-8
703
2.671875
3
[]
no_license
// // Created by 김종신 on 2020/01/27. // #include <bits/stdc++.h> using namespace std; string input, output = ""; int main() { cin.tie(NULL); cout.tie(NULL); std::ios::sync_with_stdio(false); cin >> input; reverse(input.begin(), input.end()); while(input.size()%3 != 0){ input += "0"; ...
true
0a642cefb0bad68ff0e8eea1de2e1f66fcbb9e0c
C++
gondur/Magical-Broom-Extreme
/luna_new/luna_new/Project/Lue/Source/LueFile.cpp
SHIFT_JIS
8,453
2.703125
3
[]
no_license
//------------------------------------------------------------------------------------------------ // INCLUDE //------------------------------------------------------------------------------------------------ #include "LueBase.h" #include "LueFile.h" //---------------------------------------------------------------...
true
46a596c2abfd47e9922d4fafd76dccc4974f0e97
C++
DeltaHao/sword-to-offer
/34.cpp
UTF-8
758
3.359375
3
[]
no_license
/*第一个只出现一次的字符 在一个字符串,全部由字母组成中找到第一个只出现一次的字符,并返回它的位置,如果没有则返回-1 */ #include<iostream> #include<unordered_map>//无序键值对, 即哈希表 using namespace std; class Solution { public: int FirstNotRepeatingChar(string str){ unordered_map<char, int> char_counts; int the_once=0; for(int i=0;i<str.size();i++)...
true
e95a98af3ab1fdddd6bc9c4597518e4825188957
C++
VardAlex/clientservertcp
/server.cpp
UTF-8
1,090
3.296875
3
[]
no_license
#include <iostream> #include <unistd.h> #include <sys/socket.h> #include <arpa/inet.h> #include <cstring> int main() { // creating an endpoint and descriptor int listening = socket(AF_INET, SOCK_STREAM, 0); // socket description sockaddr_in server; // address family server.sin_family = AF_INET...
true
7936af691573da6bc0c5424cf9c05e51b0afd7e2
C++
ghostumar/DSA
/MATHEMATICS/prime factor of a number.cpp
UTF-8
535
3.46875
3
[ "Apache-2.0" ]
permissive
#include<iostream> using namespace std; bool isprime(int); void primefactor(int n){ for(int i=2;i<n;i++){ if(isprime(i)){ int x=i; while(n%x==0){ cout<<i; x=x*i; } } } } bool isprime(int i){ if(i==1) return false; if(i==2 || i==3) return true; if(i%2==0 ...
true
7ce93c22c31a123b37be45e9665965cfe7f5479e
C++
mingsjtu/OJ_exercise
/王道/cloop.cpp
UTF-8
909
2.59375
3
[]
no_license
//http://bailian.openjudge.cn/practice/2115/ #pragma warning(disable:4996) #include<iostream> #include<cstdio> #include<math.h> typedef long long ll; using namespace std; ll a, b, c, d; ll exgcd(ll a, ll b, ll& x, ll& y) { if (!b) { x = 1, y = 0; return a; } ll d, tx, ty; d = exgcd(b, a%b, tx, ty);//bx'+(a%b)y'=1(mo...
true
af35d21e7cc587138ef24ced441fa98bb2293552
C++
SharifulCSECoU/competitive-programming
/uva-online-judge/accepted-solutions/10484 - Divisibility of Factors.cpp
UTF-8
2,137
2.59375
3
[]
no_license
/*****************/ /* LAM PHAN VIET */ /* UVA 10484 - Divisibility of Factors /* Time limit: 3.000s /********************************/ #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <stack> #inc...
true
098fe85ea631805b8f2975b70deda9c065a1b71d
C++
Domash/Coursera
/Art of Development in Modern C++ Specialization/Yellow_belt/Week_2/isPalindrom.cpp
UTF-8
2,891
3.34375
3
[]
no_license
// // isPalindrom.cpp // coursera // // Created by Денис Домашевич on 2/2/19. // Copyright © 2018 Денис Домашевич. All rights reserved. // #include <iostream> #include <map> #include <set> #include <sstream> #include <stdexcept> #include <algorithm> #include <string> #include <vector> using namespace std; templ...
true
1425a81ca18f1079f53f3b215ae482956574f352
C++
NealXu/HeadFirstDesignPattern
/code/06/include/stereo_on_with_cd.h
UTF-8
495
2.59375
3
[]
no_license
#ifndef _STEREO_ON_WITH_CD_H_ #define _STEREO_ON_WITH_CD_H_ #include "command.h" #include "stereo.h" class StereoOnWithCdCommand : public Command { public: StereoOnWithCdCommand(Stereo *pSte) { pStereo = pSte; } ~StereoOnWithCdCommand() {} virtual void Excute() { pStereo->...
true
4779424ff16432eb2fc788688af8446c7321fe51
C++
qianlishun/toolsClass
/toolsDemo/Framewokes/hough/HoughLineDetector.h
UTF-8
3,345
3.015625
3
[]
no_license
#include <vector> typedef enum _HOUGH_LINE_TYPE_CODE { HOUGH_LINE_STANDARD = 0, //standad hough line HOUGH_LINE_PROBABILISTIC = 1, //probabilistic hough line }HOUGH_LINE_TYPE_CODE; typedef struct { int x; int y; int width; int height; }boundingbox_t; typed...
true
746b229a25e7ba68a14d42b18711de2b7e2a622e
C++
fred-mc/FRED-J-PET
/plugin/plugin_orig/Arr3d.h
UTF-8
7,352
2.609375
3
[]
no_license
#ifndef ARR3D_H #define ARR3D_H #include "idx3d.h" #include "types.h" #include <iostream> #include <iomanip> using namespace std; namespace fred { template <class T> class Arr3d { public: T *data; uint64 N; union { //size vector uint32 sizev[3]; struct { uint32 nx,ny,nz;}; }; uint32 stridev[3]; // stride ...
true
32090627c475f91fb7934148a8d5f73ed5b784c2
C++
zhj149/HereticOS-ObjectSystem
/src/other/TextIoSystem.h
GB18030
7,978
2.5625
3
[ "Apache-2.0" ]
permissive
#pragma once //mylispϵͳ #include "BaseFunctionTool.h" #include "AutoLock.h" #include "stdio.h" #include <stdarg.h> class PrinterProxyInterface { public: PrinterProxyInterface(){}; ~PrinterProxyInterface(){}; virtual void Output(const TCHAR * pMsg){}; virtual void Input(const TCHAR * pMsg){}; virtual const TCHAR ...
true
c40526b6dca5b8d7d557c5b04110436494094e77
C++
lucastle6969/comp371
/src/entities/WorldOrigin.cpp
UTF-8
1,105
2.65625
3
[]
no_license
#ifdef __APPLE__ #include <OpenGL/gl3.h> #include <OpenGL/gl3ext.h> #else #include <GL/glew.h> // include GL Extension Wrangler #endif #include <glm/glm.hpp> #include <vector> #include "Entity.hpp" #include "DrawableEntity.hpp" #include "WorldOrigin.hpp" #include "../constants.hpp" WorldOrigin::WorldOrigin( const G...
true
fc9976513f9763369c9d63d766a158a05ed4a38f
C++
CenTea/CPP-Practice
/Rational (2).cpp
WINDOWS-1252
4,411
3.828125
4
[]
no_license
// CPSC 121 Programming Concepts // assignment: Assignment #6 Rational Overloading. Rational.cpp // due-date: May 2 // author: Matthew Tea // partners:N/A // brief: Overload a bunch of operators to demonstrate understanding. #include <iostream> // Include using namespace std; // Namespace class R...
true
e9cab7cf608ca5ab6853b42fd55e5745b6383f33
C++
lijiancheng0614/poj_solutions
/Volume1/1058/1058.cpp
UTF-8
3,785
2.796875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; typedef vector<string> vs; typedef vector<bool> vb; class Node { public: Node(string name) : name(name){} vector<string> files; vector<Node *> dirs; string name; }; class Solution { public: Solution(int n = 16) : n(n) {} bool solve(vecto...
true
a68947604b1151fdbf3cb5437bc643d4a613657a
C++
FranciscoDavidMunozArmas/Semester-III
/BR_Tree/Libraries/Screen.cpp
UTF-8
1,602
2.578125
3
[]
no_license
/* * Universidad la Fuerzas Armadas ESPE * * @autor David Munoz & Daniela Orellana * @date Jueves, 28 de mayo de 2020 10:07:14 * @function Implementation of Screen */ #include "Screen.h" #include <iostream> #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <time.h> #include <windo...
true
030996ac6427924425fb7a8e10247147369bdf78
C++
tychen5/NTU_ANTS-lab
/networkTA_project/submission/DemoIII/b05705028_15.h
UTF-8
1,047
3
3
[]
no_license
#ifndef PROTOCOL_HPP #define PROTOCOL_HPP #include <string> using namespace std; namespace JPay { class Protocol { public: Protocol() : _success(false), _message("") {} Protocol(bool success, string message) : _success(success), _message(message) {} const bool success() const { return _success; } co...
true
96ffd0cb50e0d3e0f8032d6d2ba68b93054b34de
C++
AdarshRaj9/Algorithmic-Toolbox-Coursera
/assignment_week3/q3/example/main.cpp
UTF-8
2,350
3.0625
3
[]
no_license
// // main.cpp // example // // Created by AADARSH RAJ on 26/04/20. // Copyright © 2020 ADARSH RAJ. All rights reserved. // /*#include <iostream> #include<vector> using namespace std; int no_Of_Stop(vector<int>arr,int n ,int l) { int numRefils=0,currRefil=0;//lastRefil=0; while(currRefil<=n) { ...
true
1216541b28c2b5d9796b455e03276cdb1e735b6b
C++
manarshawkey/SIM
/OOD new A3/processor.h
UTF-8
1,388
3.171875
3
[]
no_license
#pragma once #include<iostream> #include<string> #include"InstFactory.h" #include<vector> #include"Data_Mem.h" class processor { public: processor(); void execute_program(std::string, std::vector<Data_Mem>::pointer); void operator()(std::string, std::vector<Data_Mem>::pointer); private: InstFactory factory; void ...
true
6e58f50f0eebc87213cd27308df27ac6341f2d9d
C++
hadibrais/Alleria
/AlleriaPintool/BufferListManager.h
UTF-8
2,228
3.03125
3
[ "MIT" ]
permissive
#ifndef BUFFERLISTMANAGER_H #define BUFFERLISTMANAGER_H #include "pin.H" #include "AppThreadManager.h" #include <list> #include "PortableApi.h" struct BUFFER_STATE { // Points to the first element in the buffer. VOID *m_bufferStart; // Points to past the last element in the buffer. VOID *m_bufferEn...
true
451837ae6df6819ec2697225b8c74f90997e14e5
C++
kranurag01/Institute-Coding-Test-1
/Lazy Sorting.cpp
UTF-8
478
2.796875
3
[]
no_license
#include <iostream> #include <ctime> #include <cstdlib> #include <cmath> #include <iomanip> using namespace std; int fac(int n){ return (n == 1 || n == 0) ? 1 : fac(n - 1) * n; } int main(){ int n; cin >> n; int p[n]; for(int i = 0; i < n; ++i) cin >> p[i]; double time = 0; int t = fac(n); fo...
true
fcbc6be93da52e4e48d6b53f16c5acfef59dddbb
C++
steven860219/sa
/作業9/prog1.cpp
UTF-8
5,999
3.578125
4
[]
no_license
#include <iostream> #include <cstdlib> #include <iomanip> using namespace std; class GeometricObject { private: string color; bool filled; public: GeometricObject() { color = "BLACK"; filled = false; cout << "Constructor1" << endl; } GeometricObject(string &color,bool filled) { this->colo...
true
778e0cdad4f34784c871d7db838cb7fbee7de9df
C++
toanndpro/Basic-C-Plug-Plug
/Class/EX12/Source.cpp
UTF-8
2,067
3.59375
4
[]
no_license
/* Xây dựng lớp TIME mô tả các thông tin về giờ, phút, giây. Lớp TIME có các thành phần sau: - Các thuộc tính mô tả giờ phút giây - Hàm thiết lập có ba tham số giờ, phút, giây được lấy giá trị ngầm định là 0. - Hàm thành phần Set(int,int,int) để xác lập thời gian - Hàm hiển thị giờ yheo 24 tiếng - Hàm hiển thị giờ the...
true
acef954f24ca64887d657391d2277de37108b1bb
C++
RahmanMoshiur00/Code-Library
/Graph/Articulation Bridge.cpp
UTF-8
1,731
2.625
3
[]
no_license
// LightOJ 1026 - Critical Links #include <bits/stdc++.h> using namespace std; #define repit(it, x) for(__typeof__((x).begin()) it = (x).begin(); it != (x).end(); ++it) #define rep(i, begin, end) for (__typeof(end) i = (begin); i < (end); i += 1) #define all(a) a.begin(), a.end() #define mxn 100010 ...
true
19968b3c2dcccc06b6ef4a5b53ed12442ac65d15
C++
Hallaation/Lootcrates
/LootBoxes/LootBoxes.cpp
UTF-8
4,468
2.65625
3
[]
no_license
// LootBoxes.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "Rarity.h" #include <random> #include <time.h> #include <iostream> #include "BaseLootCrate.h" #include "RewardList.h" struct MyLootCrates { BaseLootCrate mCrate; int miAmountOfCrates; }; using namespace std; i...
true
38c6138f1b17987f244707e23b83c52952f6d60b
C++
c0f93f4fcaa31895c50a3e6a3de98c1f/project
/src/sklist/main.cpp
UTF-8
647
2.796875
3
[]
no_license
#include <iostream> #include "sklist.h" using namespace std; //Just for test void *GenData(int len) { void *ptr = new char [len]; return ptr; } int main() { SkList *sklist = new SkList(3); sklist->Insert(1, GenData(3)); sklist->Insert(2, GenData(2)); sklist->Insert(3, GenData(4)); sklis...
true
2e45126da4ace1ad6adfd6438c2e20a4d6534950
C++
devdk1/Coding
/zigZag.cpp
UTF-8
512
3.34375
3
[]
no_license
#include <iostream> using namespace std; void zigZag(int a[], int n) { bool flag = true; for(int i = 0; i < n - 1; i++) { if(flag && a[i] > a[i+1]) swap(a[i], a[i+1]); else if(!flag && a[i] < a[i+1]) swap(a[i], a[i+1]); flag = !flag; } for(int i = 0; i < ...
true
d05409e89273ed67be67916bb4ad3886fb58cb57
C++
vmmc2/Competitive-Programming
/UVA 00784 - Maze Exploration.cpp
UTF-8
1,664
2.671875
3
[]
no_license
#include <bits/stdc++.h> #include <string.h> using namespace std; int a; int auxiliar; int xp, yp; int colunas, linhas; int x, y; char grid[300][300]; int visitados[300][300]; int dx[8] = {0 ,-1, 1, 0, -1, -1, 1, 1}; int dy[8] = {-1, 0, 0, 1, -1, 1, 1, -1}; void floodfill(int lin, int col){ int newx, newy; ...
true
2f7f3179cc0362064cc2f3df831962e138c022eb
C++
rangaeeeee/profession
/predictoutput/cpp0078.cpp
UTF-8
562
3.453125
3
[]
no_license
/** * \file file.cpp * \author Rangarajan R * \date March, 2016 * \brief * Predict the output. * * \details * Detailed description of file. * * \note * The notes for this file. * * \copyright * */ #include<iostream> using namespace std; class A { int i; public: A(int ii = 0) : i(...
true
f4186db8c05b3cbcd061b80fb1fe66512b523b1d
C++
HonestRationalBest/CLionProjects
/prapareToCol/Figura.cpp
UTF-8
751
2.828125
3
[]
no_license
// // Created by pavel on 23.04.2021. // #include "Figura.h" #include <string> #include <math.h> #include <iostream> using namespace std; Operacje::~Operacje() { } void Figura::liczPole() { pole = value*value*3.14; } double Figura::podajPole() { return pole; } Kolo::Kolo(string f, int v):figura(f){ v...
true
57e629cfa0788762f3ba7115a19ad2a7bd05b747
C++
s8lei/Bezier-Roller-Coaster
/cse167proj4/BezierCurve.cpp
UTF-8
4,203
2.65625
3
[]
no_license
// // BezierCurve.cpp // cse167proj4 // // Created by LSQ on 11/11/19. // Copyright © 2019 LSQ. All rights reserved. // #include <stdio.h> #include "BezierCurve.h" #include "Window.h" glm::mat4 BezierCurve::B = glm::mat4(-1, 3, -3, 1, 3, -6, 3, 0, -3, 3, 0, 0, 1, 0, 0, 0); std::vector<int> BezierCurve::pindices =...
true
17e9fbaa948b9cfb5e42a0712ddfab911ed2c436
C++
Ockin/trogdor-pp
/src/core/lua/api/entities/luaentity.cpp
UTF-8
13,287
2.78125
3
[]
no_license
#include "../../../include/entities/entity.h" #include "../../../include/entities/being.h" #include "../../../include/lua/api/entities/luaentity.h" #include "../../../include/lua/api/entities/luabeing.h" using namespace std; namespace core { namespace entity { // Types which are considered valid by checkEntity()...
true
9fb6a49677092415644a4bae4cd8d6aab1e6708b
C++
johnsogg/cs1300
/homeworks/hw-7-cpp-basics/cpp/cpp_basics_driver.cpp
UTF-8
3,471
2.984375
3
[]
no_license
/* cpp_basics_driver.cpp Note to students: this is a weirdo file. Unless you are already a C++ pro, this will be baffling, confusing, and (possibly) frightening. Just sayin'. Go ahead and look at the unit test code, but realize that this is built using crazy C mis-features called macros. They're handy but ...
true
8de2d5f6588a87f405e1c6dfc555c4ae035a49df
C++
tomaszewskipablo/Backyard-Game
/BackyardGame/BackyardGame/Player.h
UTF-8
361
2.796875
3
[]
no_license
#pragma once #include "Entity.h" class Player : public Entity { private: double movementSpeed; bool isBlocked = false; public: Player(); ~Player(); // getters/setters bool getIsBlocked() const; //methods void move(const double &dt, const double xDirection, const double yDirection); void update(const double& ...
true
61e06811aef63883a171705f0a10dd7bbe0962af
C++
BRAINSia/BRAINSTools
/BRAINSCommonLib/TestSuite/DWIMetaDataDictionaryValidatorTest.cxx
UTF-8
14,377
2.9375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
/** * \author Ali Ghayoor * This test file creates an ITK vector image, * and writes the image to the disk in NRRD format. */ #include <itkMetaDataObject.h> #include <cstdio> #include <itkImage.h> #include <itkImageFileWriter.h> #include <itkImageFileReader.h> #include <itkVectorImage.h> #include <itkImageRegionI...
true
d92639e48e611f31dcfce232516fd16989e96364
C++
mnmartins/exerciciosC
/Projetos em C/GokuxVegeta.cpp
ISO-8859-1
406
2.921875
3
[]
no_license
#include<stdlib.h> #include<stdio.h> /*> Leia a distancia do Goku para o Vegeta > Diga se ele acerta ou no o Vegeta Alcance de golpe at 5000b Km*/ int main() { float distancia; printf ("Qual a distancia de Goku para Vegeta?\n"); scanf ("%f",&distancia); if (distancia <= 5000) { printf ("Te peguei, tro...
true