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
6dc4b71eef0fb2369ef2aadc7b8a09afd5b9018b
C++
egundersen/BumboEngine
/AttackPattern_ShootHorizontal.cpp
UTF-8
2,155
2.84375
3
[]
no_license
#include "AttackPattern_ShootHorizontal.h" AttackPattern_ShootHorizontal::AttackPattern_ShootHorizontal(int width, int height, Matrix &screen_matrix, PlayerDefinition &player, int number_of_attacks) : AttackPatternBase(width, height, screen_matrix, player, number_of_attacks) { generateRandomSequence(attack_starting_...
true
6d700d5a1cae8f6ed9e61bab0c506cd8b47a162c
C++
AndiLi99/catan
/include/tile.h
UTF-8
293
2.921875
3
[]
no_license
#ifndef TILE #define TILE #include "tileType.h" #include <optional> class Tile { TileType type; std::optional<int> rollNumber; public: Tile(TileType type, std::optional<int> rollNumber); TileType getType() const; bool isRollNum(int number); int getRollNumber() const; }; #endif
true
a356c009562613e2b465fcde6579090a1a5fd19e
C++
zhirko-lena/C-
/Class Works/LZ-CW-28-02-19/LZ-CW-28-02-19/Source.cpp
UTF-8
6,765
3.4375
3
[]
no_license
#include <iostream> #include <ctime> using namespace std; //template<typename T, typename T2> //void Fill(T arr[], T2 size) { // for (int i = 0; i < size; i++) { // arr[i] = rand() % 10; // } //} // //template<typename T, typename T2> //void Print(T arr[], T2 size) { // for (int i = 0; i < size; i++) { // cout << "...
true
43db88825a0ff6c229e40c78a46ae89ff840a213
C++
supertask/icpc
/nj/2015/2_ChainDisappearancePuzzle.cc
UTF-8
3,076
2.671875
3
[]
no_license
#include<iostream> #include<set> #include<vector> #include<algorithm> #include<cmath> #include<iomanip> #include<numeric> #include<climits> #include<ctime> #include<cstring> #include<sstream> #define REP(i,p,n) for(int i=p;i<(int)(n);i++) #define rep(i,n) REP(i,0,n) #define rep_split(tok,a_str,re) for(char *tok = strto...
true
361fe354f4610c3c9e94de33cfa9f7287f3082e4
C++
RamilGauss/MMO-Framework
/Source/Modules/GraphicEngine/ShaderPrefabs.cpp
UTF-8
2,530
2.515625
3
[ "MIT" ]
permissive
/* Author: Gudakov Ramil Sergeevich a.k.a. Gauss Гудаков Рамиль Сергеевич Contacts: [ramil2085@mail.ru, ramil2085@gmail.com] See for more information LICENSE.md. */ #include "ShaderPrefabs.h" using namespace nsGraphicEngine; const std::list<std::string> TShaderPrefabs::GetRenderObjectVertex() { std::string text ...
true
258750011b4b2c696e1a48ba6c26af56e34ac35d
C++
rahavens/CStwothreefive
/Lab2/main.cpp
UTF-8
3,211
3.90625
4
[]
no_license
#include <iostream> #include <vector> template <typename D> class LinkedList { struct Node { D value; Node * next; Node(D member, Node* next=nullptr): value(member), next(next) {} ~Node() { std::cout << value << " is being destroyed!\n"; } ...
true
d2d3ce6460f9f107e6bc31f70639cfab862a42df
C++
queryproc/Graphite
/Graphite/tests/unit/dvfs_multithreaded/dvfs_multithreaded.cc
UTF-8
3,874
2.8125
3
[]
no_license
#include "carbon_user.h" #include <stdio.h> #include <stdlib.h> #include <assert.h> // Suggested DVFS domain configuration: // <1.0, CORE, L1_ICACHE, L1_DCACHE> <1.0, L2_CACHE, DIRECTORY, NETWORK_MEMORY, NETWORK_USER> int num_threads; int num_iterations; int iteration_size; int array_size; int cache_line_size; int8_t...
true
8050eb7de2e694dec1439af69e7cde8dda01d24f
C++
Aapoorva/codeDemos
/clg_codevita_training/day1/palindrome.cpp
UTF-8
432
2.90625
3
[]
no_license
#include "iostream" using namespace std; int main(){ int n,temp,rev_n=0,max_digit=0,min_digit=9,digit; cin>>n; temp = n; while(n>0){ digit = n%10; rev_n = rev_n*10 + digit; max_digit = max_digit < digit ? digit : max_digit; min_digit = min_digit > digit ? digit : min_digit; n=n/10; } rev_n == temp...
true
8a36e10a79fe45b5a2ecec291c1fc668a891e7ac
C++
MichalMrena/Competitive
/leetcode/valid-parentheses.cpp
UTF-8
1,320
3.921875
4
[]
no_license
#include <iostream> #include <string> #include <vector> /** * This solution is bit of an overkill but still better than using hash-map * (Dictionary, HashMap, std::unordered_map) for finding closing bracket. * For such a small number of elements, just use linear search over vector * or a hard-coded solution li...
true
1858f9df654bd3d14c183f2c93c26c7e1d67012b
C++
olegfafurin/tasks
/leetcode/rain_trap.cpp
UTF-8
917
3.359375
3
[]
no_license
// // Created by imd on 10/9/2019. // #include <vector> #include <iostream> #include <algorithm> using namespace std; int trap(vector<int>& height) { int n = height.size(); if (n == 0) return 0; int curmax = 0; int csum = 0; int rain = 0; for (int i = 1; i < n; i++) { if (height[i] > ...
true
8aee0de2894b9c511ec67f2151b9740ee7bc842b
C++
binhfile/library
/cpp/algorithm/backoff/backoff.h
UTF-8
1,442
3.28125
3
[ "MIT" ]
permissive
#ifndef __LIB_CPP_ALGORITHM_BACKOFF_H__ #define __LIB_CPP_ALGORITHM_BACKOFF_H__ /** * @file backoff.h * @author binhfile * @brief Giao diện cho các thuật toán backoff * Backoff: Thuật toán áp dụng cho trường hợp cần truyền lại các bản tin trong truyền thông. * Các thuật toán backoff khác nhau về thời gian trễ gi...
true
e509fd94feb46255d645ec89fd2eed209326a003
C++
chestnutme/pat-solution
/A1082.cpp
UTF-8
1,233
2.921875
3
[]
no_license
#include <cstdio> #include <cstring> char num[10][5] = { "ling", "yi", "er", "san", "si", "wu", "liu", "qi", "ba", "jiu"}; char wei[3][5] = { "Shi", "Bai", "Qian"}; char part[2][5] = {"Wan", "Yi"}; int main() { char str[17]; gets(str); int len = strlen(str); int left = 0, right = len - 1; ...
true
5e8d332b14430e43c17eaacfc45e4bb70f8897f3
C++
vishal-keshav/UVa
/AdHoc/A4 p483.cpp
UTF-8
728
2.890625
3
[]
no_license
#include <iostream> #include <stdio.h> #include <cstring> using namespace std; string input; int main(){ //string input; int back_iter, forward_iter; while(getline (cin,input)){ //Reverse and print forward_iter = 0; for(int i=0;i<input.size();i++){ if(input[i]!=' '){ forward_it...
true
36ffa338a513a42a0b25ab6ec0b3d467f5e34a26
C++
HariniJeyaraman/DSAPrep
/trapping_rain_water.cpp
UTF-8
1,765
3.796875
4
[]
no_license
/* 42. Trapping Rain Water Hard Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. Example 1: Input: height = [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 Explanation: The above elevation map (black section) is represented by array ...
true
d032d0cfc69e7cc22eca5425916c0da346e52246
C++
kks227/BOJ
/1100/1106.cpp
UTF-8
575
2.53125
3
[]
no_license
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int IMPOSSIBLE = 1000000000; int N, C, cost[20], earn[20], dp[21][1001]; int hotel(int pos, int dest){ int &ret = dp[pos][dest]; if(ret != -1) return ret; if(pos == N) return ret = (dest ? IMPOSSIBLE : 0); ret = hotel(pos+1, des...
true
5a2d55133ea2b480b8a717146f1d5ce6fe24cb06
C++
pyramation/vim3d
/src/Channel.cpp
UTF-8
10,243
2.59375
3
[]
no_license
#include <math.h> #include <stdio.h> #include "Channel.h" #include "Scene.h" float Channel::globalMaxY=0.0f; float Channel::globalMinY=0.0f; Channel::Channel() { start = scopeStart = 0; end = scopeEnd = 240; enabled = true; active = false; sampleRate = 30.0f; filepath = String(); name = Sc...
true
01973168da8756b9bc654d671657782a15269f0c
C++
jmalbert7/twisted-path
/Player.hpp
UTF-8
1,901
3.28125
3
[]
no_license
/*************************************************************************************************** * Name: Jessica Albert * Project: Final Project - Player.hpp * Date: 3/10/19 * Description: The Player class is used to implement the 'Game of Life' text game. In this game * the player has 20 steps to get a job as...
true
4bd64eb37d1747a455c73aaf72073f6dd85dfa69
C++
aspectspro/EnterpriseDomainObjects
/src/Party/salarydomainobject.cpp
UTF-8
7,079
2.53125
3
[]
no_license
#include "salarydomainobject.h" #include "person.h" SalaryDomainMapper SalaryYearToDate::mapper; SalaryDomainObject::SalaryDomainObject() { } const QMetaObject &SalaryDomainObject::metaObject() const { return this->staticMetaObject; } void SalaryDomainObject::registerConverter() { } SalaryDomainObject::Salar...
true
4d77059974015f414944bd3322f9e5e29536c812
C++
Zindokar/Arduino-Keyboard
/keyboard/keyboard.ino
UTF-8
1,661
2.625
3
[]
no_license
#include <SoftwareSerial.h> SoftwareSerial ftdi(4, 5); boolean keys[4][4] = {{LOW, LOW, LOW, LOW},{LOW, LOW, LOW, LOW}}; void setup() { pinMode(6, INPUT); pinMode(7, INPUT); pinMode(8, INPUT); pinMode(9, INPUT); pinMode(10, INPUT); pinMode(11, INPUT); pinMode(12, INPUT); pinMode(13, INPUT); ftdi.beg...
true
72300b29baa084f01cf59f5e8b1263893a7460e8
C++
rajatkhanna1999/CompetitiveCoding
/Codechef/CHEFCHR.cpp
UTF-8
950
2.6875
3
[]
no_license
#include <iostream> #include <string> #include <string.h> #include <cstring> using namespace std; int main() { long t; cin>>t; while(t>0){ string S; cin>>S; long sum=0; long len=S.length(); for(long i=0;i<=len-4;i++) { string A=S.substr(i,4); string B[24]={"chef","ch...
true
9b97f24d607523d05749a0e3bc7f85664ffbd298
C++
iamweiweishi/LeetCode-Problems
/80.cpp
UTF-8
421
2.703125
3
[ "MIT" ]
permissive
class Solution { public: int removeDuplicates(vector<int>& nums) { if(nums.size()<3) return nums.size(); int f=0,r=1; while(r<nums.size()){ if(nums[f]==nums[r]){ if(r-f>1) nums.erase(nums.begin()+r,nums.begin()+r+1); else r++; }else{ ...
true
6bad10feaaa9e7fd852abe7b69df8ab7ce1c5420
C++
SijmenHuizenga/BitBot
/src/LedControl.cpp
UTF-8
898
2.921875
3
[ "MIT" ]
permissive
/* * LedControl.cpp * * Created on: 19 dec. 2014 * Author: Sijmen */ #include "Arduino.h" #include "../controllers/Led.h" LedController::LedController(){ pins[0] = 2; pins[1] = 3; pins[2] = 4; pins[3] = 5; pins[4] = 6; pins[5] = 7; pins[6] = 8; pins[7] = 9; for(int i = 0; i < getLedAmount...
true
5b898fb4855d4df1a86f5a5dd6ff818fab2ae978
C++
jsoysouvanh/RefurekuIntegration
/ThirdParty/Include/Refureku/TypeInfo/Entity/EEntityKind.h
UTF-8
1,948
2.609375
3
[]
no_license
/** * Copyright (c) 2020 Julien SOYSOUVANH - All Rights Reserved * * This file is part of the Refureku library project which is released under the MIT License. * See the LICENSE.md file for full license details. */ #pragma once #include "Refureku/Config.h" #include "Refureku/Misc/FundamentalTypes.h" #include "Refurek...
true
3c272bee655fc1995c0c7adf57167254c0241424
C++
Warbi2601/OOP-Assignment-Snake-and-Mouse
/Bomb.cpp
UTF-8
402
2.90625
3
[]
no_license
#include "Bomb.h" Bomb::Bomb() : MoveableGridItem('B', 0, 0) { } void Bomb::reset() { time_ = 4; active_ = false; } int Bomb::get_time() { return time_; } int Bomb::tick() { return time_--; } bool Bomb::has_exploded() { return time_ <= 0; } bool Bomb::is_active() { return active_; } void Bomb::set_active(b...
true
27d3412facf270e7c04cb6977f6e5d91b0c9db1d
C++
wuyadie/envpool
/envpool/core/circular_buffer.h
UTF-8
1,819
2.640625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * Copyright 2021 Garena Online Private Limited * * 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 required by applicabl...
true
1e950d916d2f232238706a6bfc833f79871c7438
C++
SaiPrathek/MyCCode
/pattern.cpp
UTF-8
506
2.546875
3
[]
no_license
#include<stdio.h> main(){ int i, j, k, n; scanf("%d", &n); printf("\n"); n++; for(i=1, k=n;i<=n;i++, k--){ for(j=0;j<i;j++) printf("* "); for(j=2*k-2;j>1;j--) printf(" "); for(j=0;j<i;j++){ if(j==n-1) continue; printf("* "); } // printf("-"); printf("\n"); } for(i=...
true
d8db827546e9092f5f19adc8fec29ed303dd728d
C++
hrachyahakobyan/Pandemic
/core/include/core/CharterFlight.h
UTF-8
370
2.609375
3
[]
no_license
#pragma once #include "ActionBase.h" namespace pan{ /** * @brief Class representing a charter flight action * @author Hrachya Hakobyan */ class CharterFlight : public ActionImpl<CharterFlight, ActionBase>{ public: CharterFlight(); CharterFlight(PlayerIndex player, CityIndex city); PlayerIndex player; Cit...
true
fc006e8afab6a68948e6ae62a0801849ffd297d6
C++
vivanov-dp/taskslib
/src/include/taskslib/Types.h
UTF-8
1,433
2.71875
3
[ "BSD-3-Clause" ]
permissive
#pragma once #include <memory> #include <functional> #include <chrono> #include <map> namespace TasksLib { // === Classes ===== class TaskOptions; class Task; class TasksThread; class TasksQueue; class TasksQueuesContainer; // === Task ===== enum TaskStatus { TASK_FINISHED = 0, TASK_INIT = 1, // Fre...
true
a5770e384e3c6fdb8441b6d92e3ca8da164e7031
C++
BGCX261/zolgatron-svn-to-git
/trunk/simulator/SDLittleDog.h
UTF-8
2,813
2.5625
3
[]
no_license
#ifndef __SD_LITTLE_DOG_H__ #define __SD_LITTLE_DOG_H__ #include <littledog.h> #include "SDSimulator.h" #include "SDConstants.h" #include <vector> // Forward declaration of slow walk controller. class SDSlowWalk; // structure to encapsulate all state information struct SDDogState { bduVec3f pos; bduV...
true
55504a5568e812b411387f6d7f0d8f819cf43647
C++
ZongoForSpeed/ProjectEuler
/problemes/probleme1xx/probleme149.cpp
UTF-8
3,934
3.5625
4
[ "MIT" ]
permissive
#include "problemes.h" #include "arithmetique.h" #include <fstream> typedef long long nombre; typedef std::vector<nombre> vecteur; typedef std::vector<vecteur> matrice; namespace { nombre maximum(const vecteur &v) { nombre max_tmp = 0; nombre max_total = 0; for (nombre n: v) { ...
true
5f8c4d3297f309aa52acd0c0b7da0d6040aa969e
C++
wangscript007/ojcode
/poj2299_Ultra-QuickSort(树状数组).cpp
GB18030
1,370
2.984375
3
[]
no_license
#include <stdio.h> #include <memory.h> #include <algorithm> using namespace std; #define lowbit(t) (t&(-t)) struct type{ int num,index; }num[500005]; int N,C[500005];//ƶǰ׺״ bool cmp(struct type a,struct type b) { return a.num<b.num; } int sum(int *C,int e) { int sum = 0; while(e > 0) { ...
true
b07ef103622eed3b068f9dc864a3ec88fedfab56
C++
cardcaptr/PhenoAppl
/velocityverletintegrator.cpp
UTF-8
1,718
2.640625
3
[]
no_license
#include "velocityverletintegrator.h" #include <iostream> #include <fstream> #include "particlesbase.h" #include "solutionExporterLagrangian.h" #define _USE_MATH_DEFINES #include <cmath> VelocityVerletIntegrator::VelocityVerletIntegrator() { } // Integrate nIter iterations using a constant time step dt using a ver...
true
015c5000b575384a490577d191fe3b1aeff7c2e9
C++
AkshayMariyanna/solutions
/spoj/primeintervals.cpp
UTF-8
656
2.625
3
[]
no_license
/// https://www.spoj.com/problems/PRINT/ #include <iostream> #include <cstring> #include <math.h> using namespace std; /* Not solved TLE Revisit */ int main() { int T; cin >> T; bool mapOPrime[1000005]; while (T--) { int s, e; cin >> s >> e; int n = e - s + 1; memset(mapOPrime, 1, n); int sq = sqr...
true
39d9466e1634c48cd6e9b31b0d3821ae12b824b4
C++
alan1tavares/maratona-de-programacao
/codcad/vetores/sub-prime.cpp
UTF-8
529
2.5625
3
[ "MIT" ]
permissive
#include<bits/stdc++.h> using namespace std; //1105 int main(){ int b, n; int fundo[21]; while(true){ cin>>b>>n; if(b==0 && n==0) break; for(int i=1; i<=b; i++) cin>>fundo[i]; for(int i=1; i<=n; i++){ int d, c, v; cin>>d>>c>>v; // leia os valores de "d", "c" e "v". fundo[d...
true
6ea00799420aff36e98e1b347a99d9a5e2b049a2
C++
tomvidm/Pelmeni2D
/src/pelmeni/graphics/StaticSprite.cpp
UTF-8
1,871
2.53125
3
[]
no_license
#include <cstdio> #include "graphics/StaticSprite.hpp" namespace p2d { namespace graphics { void StaticSprite::draw(sf::RenderTarget& target, sf::RenderStates states) const { if (isDrawable) { states.transform *= math::toSfmlTransform(getLocalTransform()); states.texture = _texture...
true
988f992776850ebdb9fc53c8b72bd17a33e0b954
C++
velenk/Algorithms_Test
/洛谷/1428.cpp
UTF-8
910
2.890625
3
[]
no_license
#include <cstdio> #include <algorithm> using namespace std; class Node { public: int val, index; }; Node a[1000]; int n; int ans[1000],c[1000]; int lowbit(int x) { return x&(-x); } void update(int x) { for (int i = x; i <= n; i+=lowbit(i)) { c[i]+=1; } return; } int sum(int x) { in...
true
5b1947229f16a6a3fcb9aec8b3fd247b2b2e2aad
C++
liuyaanng/LeetCode
/198.house-robber.cpp
UTF-8
339
2.75
3
[]
no_license
/* * @lc app=leetcode.cn id=198 lang=cpp * * [198] 打家劫舍 */ // @lc code=start class Solution { public: int rob(vector<int>& nums) { int m = 0, n = 0; for(int i = 0; i < nums.size(); ++i){ if(i % 2 == 0){ n += nums[i]; } else { m += nums[i]; } } return max(m, n); } }; // @l...
true
2df8c40e638177b3eac609178afca37d7cc6e641
C++
ipa-rmb/cob_object_perception
/cob_read_text/common/src/createCorrelation.cpp
UTF-8
2,950
2.65625
3
[]
no_license
#include <iostream> #include <fstream> #include <sstream> #include <stack> #include <cstdio> #include <dirent.h> // ROS includes #include <ros/ros.h> #include <ros/package.h> // OpenCV includes #include <opencv2/opencv.hpp> int main(int argc, char* argv[]) { std::string input_image_path = ros::package::getPath("co...
true
352b39ec202c21953a03d5ead1b4a9fe322c1bda
C++
shawnhan108/RAIInet
/cell.h
UTF-8
948
2.90625
3
[]
no_license
#ifndef _CELL_H_ #define _CELL_H_ #include <string> #include <memory> #include "piece.h" typedef std::shared_ptr<Piece> PiecePtr; class Cell { int x; //x is row and y is col int y; bool isOccP1 = false; bool isOccP2 = false; bool firewallOne = false; bool firewallTwo = false; std::string O...
true
5fcd31d1a765dcbe725b684b583f6fa8e51193d5
C++
Xuhui-Wang/poj-solutions
/2367/9310152_AC_0MS_204K.cpp
UTF-8
1,239
3.015625
3
[ "MIT" ]
permissive
#define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<algorithm> const int MEMBER_NUM_MAX=100; struct Member{ int id,childNum,children[MEMBER_NUM_MAX-1],discover,finish; bool root; }; int memberNum; Member members[MEMBER_NUM_MAX]; int time; void dfs(int index){ members[index].discover=time++;...
true
42904feebb4390f67120b8b358e4d4cb8c552795
C++
marcinmierzejek/suffix_trees
/SuffixTree.h
UTF-8
2,545
2.78125
3
[]
no_license
/* * SuffixTree.h * * Created on: Feb 24, 2013 * Author: mierzejm */ #include <string> #include <map> #include <set> #include <vector> #include <iostream> #include <boost/archive/binary_oarchive.hpp> #include <boost/archive/binary_iarchive.hpp> #include <boost/serialization/map.hpp> #include <boost/serializ...
true
8d2c93b2c2e0067f909117ab65438aecb96125b2
C++
yruestc/FAS
/base/EventLoopThreadPool.cpp
UTF-8
1,867
2.53125
3
[]
no_license
#include <memory> #include <EventLoopThreadPool.h> #include <EventLoop.h> #include <boost/bind.hpp> fas::EventLoopThreadPool::EventLoopThreadPool(EventLoop *baseloop, int threadNum, std::string name) : threadNum_(threadNum), name...
true
5a054259003070e28f132a2af6e95e7f011a767f
C++
LoganTHarvell/FieaGameEngine
/source/Library.Shared/EventQueue.cpp
UTF-8
1,030
2.625
3
[]
no_license
#pragma region Includes // Pre-compiled Header #include "pch.h" // Header #include "EventQueue.h" // Standard #include <algorithm> #include <future> // First Party #include "EventPublisher.h" #pragma endregion Includes using namespace std::string_literals; namespace Library { void EventQueue::Publish(EventPublish...
true
1df3a71866c56b59323c4cbd90a9bccef5c66765
C++
zeromem88/algorithm-toolbox
/Week6Ex2/partition3.cpp
UTF-8
1,103
3.125
3
[]
no_license
#include <iostream> #include <vector> #include <unordered_map> using std::vector; using std::unordered_map; static unordered_map<long long, bool> memo; bool doPart3(const vector<int> &A, int m, int n, int p, int l) { if (m == 0 && n == 0 && p == 0) return true; if (l < 0) return false; long long key = m * ...
true
43a3e629238fa23f5b43fdac4d5957ed774acc7b
C++
pacemario/programas-sencillos-c-
/priigualult.cpp
UTF-8
353
3.125
3
[ "MIT" ]
permissive
#include <iostream> #include <conio.h> #include <stdio.h> using namespace std; int main(){ int pri,ult,num; puts("Ingrese el numero"); scanf("%d",&num); ult=num%10; do{ pri=num%10; num=num/10; }while(num!=0); if(pri==ult) puts("Comienza y termina con el mismo numero"); else puts("No comienza y ...
true
f239d8cd9e3c1fb58fed1cad1a8ab0e52ef58c2e
C++
adamleighfish/c3po
/src/sphere.cpp
UTF-8
3,725
2.84375
3
[]
no_license
#include "sphere.h" #include "interaction.h" #include "transform.h" #include "utility.h" #include <numbers> namespace c3po { Sphere::Sphere(std::shared_ptr<Transform> object_to_world, std::shared_ptr<Transform> world_to_object, bool reverse_orientation, float radius) : Shape(std::m...
true
9a923ff0c14fe814cf82b439e9086c6b26016bc6
C++
PatrikoPy/Arduino_Temperature_alarm
/SW_zad3.ino
UTF-8
1,682
2.671875
3
[]
no_license
#define AREF_VOLTAGE 3.3 #define TEMP_SENSOR_PIN 5 #define BUTTON_PIN_L 12 #define BUTTON_PIN_P 13 #define ALERT_PIN 2 float temperature; unsigned short alert5 = 0; unsigned short buzzerOff = 0; unsigned short buttonStateL = 0; unsigned short buttonStateP = 0; void ledClear() { for (short p = 2; p < 12; p++) { ...
true
a0da50ab81567f5cccb218ef2dc13fc2d4c945f6
C++
shalyapin/Crystals-and-dragons
/Crystals and dragons/Crystals and dragons/View.cpp
UTF-8
3,052
3.109375
3
[]
no_license
#include "View.h" #include "ConsoleColor.h" using namespace view; using namespace model; using namespace std; View::View(Model * model) { this->model = model; model->registerObserver(this); rowDialogue = 0; isDarkRoom = false; } void View::update(ActionType type) { switch (type) { case HeroMove: break; case...
true
83fc8556c130569db07fb24db982218d7eedef31
C++
tej17/Competitive-Coding
/a2oj/275A.cpp
UTF-8
410
2.71875
3
[]
no_license
#include <iostream> using namespace std; int main() { int a[5][5] = {0}; int b[5][5]; int x; for(int i=1;i<4;i++){ for(int j=1;j<4;j++){ cin >> a[i][j]; } } for(int i=1;i<4;i++){ string row; for(int j=1;j<4;j++){ b[i][j] = a[i][j] + a[i-1][j] + a[i+1][j] + a[i][j-1] + a[i][j+1]; if(b[i][j]%2==0)...
true
acca1c6f65be1b8942584d144e3944cb157e9859
C++
Swathi-vyas/SimulatorProject
/Cpp_Prac/nvidia_prac/src/tik_tak_toe.cpp
UTF-8
351
3.140625
3
[]
no_license
#include<iostream> using namespace std; int main(){ int** arr; int j; arr = new int*[8]; for(auto i=0; i<8;i++){ arr[i] = new int[8]; } for(auto i=0; i<8; i++){ for(auto j=0; j<8; j++) arr[i][j]=(i+j+1)%2; } for(auto i=0; i<8; i++){ for(auto j=0; j<8; j++){ cout << arr[i][j] << " "; } co...
true
63163cc685b7399a2b000fd59a52fe6410815f40
C++
ctkhanhly/C-
/homework/hw05/temp.cpp
UTF-8
18,746
3.6875
4
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; //82,8,,108,183,189 //82, 90, 111, 188, 198 class Warrior{ friend ostream& operator<<(ostream& os, const Warrior& warrior){ os << warrior.name << ": " << warrior.strength; return os; } private: st...
true
137768a8f6d102fe0488af5395ba8f2051fbed82
C++
surendhar-code/OOPS-practice
/Stack(class).cpp
UTF-8
1,034
3.90625
4
[]
no_license
#include<iostream> #include<iomanip> #define MAX 30 using namespace std; class Stack { private: int top; int value; int stack[MAX]; public: Stack() { top= -1; } void push() { if(top==(MAX-1)) cout<<"Stack overflow\n"; else ...
true
14c8c54ddd42d934686484f4f89cc75748ca7a0d
C++
cyberfenrir/programs-C
/CHAP5_14.CPP
UTF-8
617
3.109375
3
[]
no_license
#include<iostream.h> #include<conio.h> void main() { clrscr(); double i; double a; cout<<"Enter the annual salary of a person: "; cin>>i; if((i>=0)&&(i<=10000)) { cout<<"No need to pay Income Tax."; } else if((i>=100001)&&(i<=150000)) { a =((10.0*(i-100000.0))/100.0); cout<<"The person has to pay Rs."<<...
true
54e4e25894184b20911d0c6aa592bd76ef4bfbf9
C++
Airahc/Tstl
/test/test.hpp
UTF-8
4,072
2.796875
3
[]
no_license
#ifndef _TEST_HPP_ #define _TEST_HPP_ #ifndef _KERNEL_TSTL #include "stdio.h" #else #define printf_s DbgPrint #endif namespace Test { class MyClass { public: MyClass() { printf_s("地址:%p 构造: %s\n", this, __FUNCSIG__); } MyClass(int i): m_value(i) { printf_s("地址:...
true
45f844ff395afb80281ed4af66b4c1717f1fd516
C++
rohit236c/Competitive-programming-CPP
/linkedlist01.cpp
UTF-8
2,313
3.640625
4
[]
no_license
#include<iostream> using namespace std; class node { public: int data; node*next; node(int d) { data = d; next = NULL; } }; node * deletemid(node*head){ node*fast = head; node*slow = head; node*prev = NULL; while(fast!=NULL && fast->next!=NULL){ prev = slow; slow = slow->next; fast = fast->next->next...
true
918070e3c6fbf6073177a29342ab53a5cfad904e
C++
solomonwzs/leetcode
/cpp/src/populating_next_right_pointers_in_each_node_2.cpp
UTF-8
1,601
3.3125
3
[]
no_license
#include "leetcode.h" using namespace std; struct TreeLinkNode{ int val; TreeLinkNode *left, *right, *next; TreeLinkNode(int x): val(x), left(NULL), right(NULL), next(NULL){} }; class Solution{ public: void connect(TreeLinkNode *root){ TreeLinkNode *level_head=root; while (level_head){ TreeL...
true
78de6d2eb760663db316fbafe57b6a93a1ce1557
C++
Tegon-McCloud/J3D
/J3D/Buffer.cpp
UTF-8
1,477
2.703125
3
[]
no_license
#include "Buffer.h" #include "Graphics.h" Buffer::Buffer( Graphics& gfx, const void* data, size_t size, D3D11_USAGE usage, uint32_t bindFlags, uint32_t cpuAccessFlags, uint32_t miscFlags, size_t structureSize) { D3D11_BUFFER_DESC desc; desc.ByteWidth = static_cast<UINT>(size); desc.Usage = usage; desc.Bin...
true
ffa48e8ed32c2cc06f0787a1e79d8d8f40a6818f
C++
MayTzadoky/Election-System
/Project1_C++/Address.cpp
UTF-8
1,015
3.671875
4
[]
no_license
#include <iostream> using namespace std; #include "Address.h" //c'tor Address::Address(const string& city, const string& street, int num) { setCity(city); setStreet(street); setNum(num); } //Gets city for the address const string& Address::getCity() const { return city; } //Gets street for the address const st...
true
c63c76f558f48b829824737b8f8bc591be36324d
C++
ingemar100/DungeonsAndCrawlers
/GameObject.h
UTF-8
545
2.578125
3
[]
no_license
#pragma once #include <string> #include "Held.h" class GameObject { public: GameObject(); ~GameObject(); enum gameObjecten { WAPEN, ETEN, KLEDING }; std::string naam() { return _naam; }; int getStrength() { return _strength; }; void setNaam(std::string naam) { _naam = naam; }; void setStrength(int st...
true
d27daee6bbc28ebb80752139b89d7f86de041937
C++
codingiam/jass
/src/jass/game_objects/intro/text.cc
UTF-8
2,119
2.515625
3
[ "BSD-2-Clause" ]
permissive
// Copyright (c) 2015, Doru Budai. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "jass/game_objects/intro/text.h" #include <array> #include "jass/resources/image.h" #include "jass/drawables/font.h" namespace { const std::array<...
true
6ecf4036572f03dd2a5b39b421905b18b2dce090
C++
JackieZhai/ICPC_Training
/Spring_Training/ACM-ICPC/Round6/E.cpp
UTF-8
477
2.609375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; struct Node{ char c; int n; friend bool operator < (const Node &a, const Node &b) { return a.n<b.n; } }; set<Node> num; int n, m; int main() { while(scanf("%d%d", &n, &m)!=EOF) { if(n==0 && m==0) break; num.c...
true
47dc30025cb576ba4ca402eef7a6cae55d5be989
C++
thisthat/TT-FFX-Butterfly
/TT-ControlMotor/Logger/logFile.cpp
UTF-8
343
2.828125
3
[]
no_license
#include "logFile.hpp" using namespace std; LogFile::LogFile(string name){ _name = name; cout << "File name: " << _name << endl; } void LogFile::open(){ log.open(_name); } void LogFile::close(){ log.close(); } void LogFile::write(string msg){ log << formatMessage(msg); log << "\n"; fprintf(stderr, "Message:...
true
d0deb45146d2dfadacf83a695ef32abf7dc33f5c
C++
newcommander/cc
/solution1/action.cpp
UTF-8
3,356
3.078125
3
[]
no_license
#include <iostream> #include <fstream> #include "action.h" std::map<unsigned int, void*> g_actions; extern Action action_1; extern Action action_2; extern Action action_3; extern Action action_4; static Action *online_actions[] = { &action_1, &action_2, &action_3, &action_4, }; void show_all_actions...
true
dd2342119f348f8aebd0dfa02c26e12628c90f9f
C++
JuicyJerry/mincoding
/(훈련반2) Level28.5 - 문제1번.cpp
UTF-8
890
3.1875
3
[]
no_license
#include <iostream> using namespace std; struct Node { char chr; int vect; }; int n; void getNameArrange(Node t[10]) { char temp, temp1; for (int y = 0; y < n; y++) { for (int x = 0; x < n; x++) { if (t[y].chr < t[x].chr) { temp = t[x].chr; temp1 = t[x].vect; t[x].chr = t[y].chr; t[x].vect = ...
true
8e3967fab3a7918c55921a533d5d8b964ced1399
C++
mtalluto/WatershedTools
/src/hydrology.cpp
UTF-8
2,482
3.203125
3
[ "MIT" ]
permissive
#include <Rcpp.h> using namespace Rcpp; //' Connect points in a watershed, accumulating a value as we go //' //' The values and ds pixels should match; i.e., values[i] is the value for pixel i, //' and dsPixel[i] is that pixel's downstream pixel //' //' @param dsPixel A vector of downstream pixels, diPixel[i] is down...
true
6a39a2b9933b5d5fdf26501ae25b6b8d06099cae
C++
indrajeetpala19/Codeforces
/1030A.cpp
UTF-8
296
2.671875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int a; cin>>a; if(a==1) { cout<<"HARD"<<endl; return 0; } } cout<<"EASY"<<endl; return 0; }
true
2268764df421b713fe50592bd31fa5b86ec3ef81
C++
EdvinAlvarado/Code-Wars
/deleteNth.cpp
UTF-8
509
3.5625
4
[ "BSD-2-Clause" ]
permissive
#include <vector> #include <iostream> #include <map> using namespace std; std::vector<int> deleteNth(std::vector<int> arr, int n) { std::map<int, int> counter; std::vector<int> v; for (const int& i: arr) { // if (counter.find(i) == counter.end()) { // not in map // counter[i] = 1; // v.push_back(i); // } ...
true
06c82979be921bcd3f440d1c8e197cf1a8fc812f
C++
rakhils/SpecialTopic
/Engine/Code/Engine/Math/Frustum.cpp
UTF-8
2,653
2.75
3
[]
no_license
#include "Engine/Math/Frustum.hpp" #include "Engine/Math/Matrix44.hpp" #include "Engine/Math/AABB3.hpp" // CONSTRUCTOR Frustum::Frustum() { } // DESTRUCTOR Frustum::~Frustum() { } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////...
true
29e0a535c0d32de1b28c7a0026edcb3f3353ef6b
C++
juffson/nacos-sdk-cpp
/include/ResourceGuard.h
UTF-8
483
2.578125
3
[ "Apache-2.0" ]
permissive
// // Created by liuhanyu on 2020/9/6. // #ifndef NACOS_SDK_CPP_RESOURCEGUARD_H #define NACOS_SDK_CPP_RESOURCEGUARD_H namespace nacos{ template<typename T> class ResourceGuard { private: T *_obj;//The object being watched ResourceGuard(); public: ResourceGuard(T *obj) { _obj = obj; }; ~ResourceGuard...
true
3cb4b43302e66aa55520fa873caa20cd99417950
C++
tthsqe12/cas
/lint/source/headers/generic/generic_mpoly_mul_divides.h
UTF-8
16,493
3.0625
3
[]
no_license
#pragma once //////////////////////////////// heaps ///////////////////////////////////////// // a chain of nodes with the same exponent struct mpoly_heap_chain { ulimb i, j; mpoly_heap_chain* next; }; /* The heap can either store the exponents (of size ML) directly in the mpoly_heap_entry_imm. Since t...
true
9229d7cee25b7745135d7b0dac3564f009dd063a
C++
niuxu18/logTracker-old
/second/download/git/gumtree/git_repos_function_5503_git-2.2.3.cpp
UTF-8
544
2.546875
3
[]
no_license
static int is_dir_empty(const wchar_t *wpath) { WIN32_FIND_DATAW findbuf; HANDLE handle; wchar_t wbuf[MAX_PATH + 2]; wcscpy(wbuf, wpath); wcscat(wbuf, L"\\*"); handle = FindFirstFileW(wbuf, &findbuf); if (handle == INVALID_HANDLE_VALUE) return GetLastError() == ERROR_NO_MORE_FILES; while (!wcscmp(findbuf.cFi...
true
7d89dad2e639bf8493c5cb8185387f8bbfcf58c1
C++
steam228/GROUU
/ARCHIVE/arduino/GROUU_GREENHOUSE_0/PROBE_MF/PROBE_MF.ino
UTF-8
3,422
2.515625
3
[ "CC-BY-4.0" ]
permissive
#include "DHT.h" #include "OneWire.h" #include "math.h" //#include <Wire.h> #include "floatToString.h" //Sensors location #define DHTPIN 4 #define DHTTYPE DHT22 // DHT 22 (AM2302) DHT dht(DHTPIN, DHTTYPE); int ledPin = 13; int moistPin = A0; int wetPin = A1; int lumPin = A2; //int phPin = A3; int soiltempPi...
true
aa7c310c078f239b21c2bd650f56e46bafff0766
C++
Millsy242/GeneticRaceEditor
/BaseProject/Tools/SprayToolType.cpp
UTF-8
1,164
2.53125
3
[]
no_license
// // SprayToolType.cpp // GeneticRaceEditor // // Created by Daniel Harvey on 02/09/2019. // Copyright © 2019 Daniel Harvey. All rights reserved. // #include "Tool.hpp" #include <iostream> #include "Canvas.hpp" #include <vector> void SprayToolType::OnMouseDown(sf::Vector2i MousePos, Canvas& canvas, PaintOptions &...
true
1b324a4c95f12de06602125b84a58eba9ffa1993
C++
arielrodrigues/sOS-Sim
/FileManager.h
UTF-8
1,365
3.0625
3
[]
no_license
#ifndef SIMPLE_OS_SIMULATOR_FILEMANAGER_H #define SIMPLE_OS_SIMULATOR_FILEMANAGER_H #include <sstream> #include <fstream> #include <iostream> namespace FileManager { static uint32_t numberofLines = 0; /*** * Put the file in a stringstream * @param filepath * @return out (file stringstream) *...
true
6b7b8e3f20c6593f6d5d8d7fe2085bc1e730dc44
C++
guti21js/235_Project1
/delete.cpp
UTF-8
824
3.125
3
[]
no_license
#include<iostream> #include<cstring> #include<string.h> using namespace std; string set; //set char *setPtr; //Where set string will be stored in to be used for string token char *elmnt; char *result; //where outputs of string token will be stored in int elmntN=0; //Number of elements int main(){ cout<<"Enter a set...
true
2c085903a1349843ee83a7f370fa4ea6a1d5bccf
C++
AshDr/Data-Struct-Experment-2020
/Data Sturct Experiment/exp8/grpAdjLinkedList.h
GB18030
14,140
3.625
4
[]
no_license
//************************************************************// //* ͼڽʾͷļļGraphAdjLinkList.h *// //* *// //************************************************************// #include "stdio.h" #include "stdlib.h" #include <iostream> #include "string.h" #...
true
bebaaa83dac6694f451a3469167b6c5b86d67404
C++
muzammilpeer/BSCS
/Part time projects/Fast CGI based file sharing portal/cgi-bin/register.cpp
UTF-8
7,033
2.828125
3
[]
no_license
// Fig. 19.12: post.cpp // Demonstrates POST method with XHTML form. #include <iostream> #include <fstream> /*using std::cout; using std::cin; using std::ofstream; using std::ifstream; using std::ios;*/ #include <string> #include <cstring> /* using std::string; using std::strlen;*/ #include <cstdlib>/* u...
true
c04ac73f9e48a58861f12776f291f189ef01bc04
C++
botorabi/SensorStation
/Arduino/SensorStation/core.h
UTF-8
2,281
2.5625
3
[ "MIT" ]
permissive
/** * Copyright (c) 2019 by Botorabi. All rights reserved. * https://github.com/botorabi/SensorStation * * License: MIT License (MIT), read the LICENSE text in * main directory for more details. */ #ifndef CORE_H #define CORE_H #include "sensor.h" #include "connectivity.h" #include "httpserver.h" #incl...
true
10a7a877b3e98ef34c7f7b7cdb57d8837d11b681
C++
iomeone/CSGOCheat
/PhysicsProps.h
UTF-8
2,907
2.59375
3
[]
no_license
#pragma once #include "RandomStuff.h" struct surfacephysicsparams_t { float friction; float elasticity; float density; float thickness; float dampening; }; struct surfaceaudioparams_t { float reflectivity; // like elasticity, but how much sound should be reflected by this surface ...
true
1a64c16089a5b4d6b1bbfd00d3ea36423090c9e3
C++
oscstr-9/Lab-3-doa
/Lab 3/Lab 3/Main.cpp
WINDOWS-1252
3,194
3.453125
3
[]
no_license
#include <IOstream> #include <cstdlib> #include <ctime> using namespace std; struct retStruct{ int largest; int smallest; int denominator; // nmnare int numerator; // tljare }; retStruct mergeSort(int* list, int size) { int leftIndex = 0, rightIndex = size / 2; retStruct ret{ 0,0,0,0 }; retStruct leftSolution...
true
a78240cc7d22006a1a8dad97baecd3f899c13ed3
C++
friskycodeur/Coding
/Codeforces/Practice/510A.cpp
UTF-8
533
2.765625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void pattern(int n,char c){ for(int i=0;i<n;i++){ cout<<c; } } int main(){ int n,m;cin>>n>>m; for(int r=0;r<n;r++){ if(r%2==0){ pattern(m,'#'); }else{ if((r/2)%2==0){ patte...
true
b2771e079f7b299c81ef850750ab90e7e80dca99
C++
somodis/ClassRoomExamples
/SZE/OODB/20191112/Oliver/Music.h
UTF-8
326
2.84375
3
[]
no_license
#pragma once #include "Media.h" class Music : public Media { const std::string artist; public: Music(const std::string& artist, const std::string& title, int length) : Media(title, length), artist(artist) {} virtual std::string toString() const; virtual void print() const;...
true
767173d78de36cc235759fe9d572a24b63f799c2
C++
vgherard/viterbi
/example.cpp
UTF-8
2,559
3.09375
3
[]
no_license
#include "viterbi.h" #include <iostream> #include <cmath> using std::cout; using std::cin; using std::vector; int main() { size_t H; cout << "Enter dimension 'H' of hidden state space.\n" << "H: > "; cin >> H; cout << "Hidden state space: {h_1, h_2, ..., h_" << H << "}\n"; ...
true
e429ba660ec710da575b54f8059303c9e765c294
C++
Calibri-Software/Calibri-Library
/src/timers/timermetric.hpp
UTF-8
2,665
3.03125
3
[ "MIT" ]
permissive
#ifndef CALIBRI_TIMERS_TIMERMETRIC_HPP #define CALIBRI_TIMERS_TIMERMETRIC_HPP // Std includes #include <chrono> // Calibri-Library includes #include "global/types.hpp" namespace Calibri { namespace Timers { // Enumerations enum class TimerMetric : uint8 { Hours, Minutes, Seconds, Milliseconds, ...
true
cdc06ed5af3530fef1f53cb890d077bfaa1aee71
C++
marozau/cpp_craft_0314
/solutions/igor_kolupaev/3/sources/3_5/averange_calculator.cpp
UTF-8
969
2.8125
3
[]
no_license
#include <iostream> #include <map> #include "averange_calculator.h" void average_calculator::calc( std::ifstream& in ) { std::map<uint32_t, size_t> size_by_types; time_counter_t curr_time_messages_by_types; uint32_t curr_time = 0; while( !in.eof() ) { binary_reader::market_message message( in ); if( messa...
true
7d1e2248d45c689787d758738c227ddbdbf724fd
C++
SamuelGallay/Cluedo
/main.cpp
UTF-8
3,122
3.34375
3
[]
no_license
#include <iostream> #include <string> #include "cluedo.h" using namespace std; int main() { std::vector<std::string> listeJoueurs; int nombreJoueurs = 0; cout << "Combien y a t-il de joueurs ?" << endl; cin >> nombreJoueurs; string myName = ""; cout << "Mon nom : "; cin >> myName; listeJoueurs.push...
true
84d737f430cd4a6b2221d3d88443d2ab31e8a371
C++
tigoe/MakingThingsTalk2
/3rd_edition/chapter9/WriteTagMultipleRecords/WriteTagMultipleRecords.ino
UTF-8
1,056
2.703125
3
[]
no_license
/* NDEF card writer context: Arduino */ #include <SPI.h> // include SPI library #include <PN532_SPI.h> // include SPI library for PN532 #include <PN532.h> // include PN532 library #include <NfcAdapter.h> // include NFC library PN532_SPI pn532spi(SPI, 11); // initialize adapter NfcAdap...
true
6937829790c527c14d559154189ceef4a547285f
C++
SZUxiegumeng/Games-Graph
/Assignment7/PA7/Assignment7/Material.cpp
GB18030
11,345
2.6875
3
[]
no_license
#include "Material.hpp" //wi,woע⣬·׷٣Դ //һ㶼ǹԴ㣬Ҫ뽻 float Material::Fresnels(const Vector3f &wi, const Vector3f &wo, const Vector3f &N, const Vector3f &h) { //ʵkr/ks(/͸)ĻҪһ //ks/kd߹/ɢ䣩,F0Ǵֱʱ switch (m_type) { case BSDF: case Cook_Torrance: { float ansF = 1.0f; if (dotProduct(h, wo) > 0) an...
true
c02d05b72fd30850e07f6d47f01969b17a3f4017
C++
SokolovVadim/AdvancedCpp11
/26_Koenig_lookup_ADL/main.cpp
UTF-8
744
3.1875
3
[ "MIT" ]
permissive
#include <iostream> namespace Uni { struct Student {}; void study(Student) { std::cout << "calling Uni::study()\n"; } } class Lesson{ public: void study(Uni::Student) { std::cout << "calling Lesson::study()\n"; } }; class School: public Lesson { public: void work() { Uni::Student Max; study(Max); }...
true
189d637c61c5f660225e14b0e483337e19d53e5d
C++
khuumi/Flat_Filesystem
/objlist.cpp
UTF-8
1,517
2.859375
3
[]
no_license
#include <iostream> #include <string> #include <fstream> #include <dirent.h> #include <sys/stat.h> #include <unistd.h> #include <sys/types.h> #include <cstdlib> #include "tools.h" using namespace std; int main(int argc, char * argv[]){ int show_size = 0; if (argc < 1) { cerr << "Usage:" << argv[0] << ...
true
c1b84f1dddf1013b99fcc06ee07bed9c95144e39
C++
goodpaperman/template
/07.chapter/mix/mix.cpp
GB18030
3,890
2.640625
3
[]
no_license
// mix.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include <typeinfo> template <typename T> class List { public: void clear() { printf("clear list\n"); } T *buf; }; typedef struct { double x, y, z; } Point; typedef enum { red, green, blue } *ColorPtr; template <typename T, T nontype_param> class C { public:...
true
59434900145d91b44bbeeee74c1df32ea35d2346
C++
nadnik13/OOP
/THexagon.h
UTF-8
613
3.09375
3
[]
no_license
#ifndef Hexagon_H #define Hexagon_H #include "IPolygon.h" #include <iostream> class Hexagon : public Polygon { public: Hexagon(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int x5, int y5, int x6, int y6); Hexagon(std::istream &is); Hexagon(const Hexagon &original); virtual ~Hexagon() overrid...
true
3587ae077f7d54e0e3c991ffc513c4f161c6d3ac
C++
NTimmons/ModernCPP_Examples
/C++17/Library/Sampling.h
UTF-8
545
3.109375
3
[ "MIT" ]
permissive
#pragma once //#ifdef MSVC_NOT_SUPPORTED_ENABLED #include <algorithm> #include <iostream> #include <random> #include <string> namespace Sampling_Example { void Sampling() { std::string input = "Hello this is a test"; std::string output; std::mt19937 randomDevice(std::random_device{}()); ...
true
36e100a1f0a62a4d79796e67bdfcbd2080a6ac6a
C++
axxel/zxing-cpp
/core/src/pdf417/PDFBarcodeValue.h
UTF-8
669
2.65625
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2016 Nu-book Inc. * Copyright 2016 ZXing authors */ // SPDX-License-Identifier: Apache-2.0 #pragma once #include <map> #include <vector> namespace ZXing { namespace Pdf417 { /** * @author Guenther Grau */ class BarcodeValue { std::map<int, int> _values; public: /** * Add an occurrence of a value ...
true
2711ea42bbe13eb8a5e227fc4613e7a1eb2e1c23
C++
ChuaPingChan/SpaXI
/Submission/Team11/Code11/SPA/PQL/Validator/Selection/With/WithValidator.cpp
UTF-8
7,467
2.828125
3
[]
no_license
#include "WithValidator.h" WithValidator::WithValidator(QueryTree *qtPtrNew) { this->qtPtr = qtPtrNew; } WithValidator::~WithValidator() { } void WithValidator::validate(string str) { string lhs = extractLhs(str); string rhs = extractRhs(str); if (isValidLhs(lhs) && isValidRhs(rhs) && isLhsSameTypeA...
true
b4e999724439ec97259f731c5abf6463b7139094
C++
BuddhaCola/cpp
/m05/ex03/Bureaucrat.hpp
UTF-8
854
2.6875
3
[]
no_license
#ifndef BUREAUCRAT_HPP # define BUREAUCRAT_HPP #include <iostream> #include "AForm.hpp" # define GOOD "\033[0m\033[32m" # define BAD "\033[0m\033[31m" # define TOOHIGH "\033[0m\033[35m" # define TOOLOW "\033[0m\033[33m" # define RESET "\033[0m" class AForm; class Bureaucrat { protected: const std::strin...
true
fe7b96e98b4e78ee049652ec2607bf943515b030
C++
BEccentricity/Euegene
/comparator.cpp
UTF-8
944
3.296875
3
[]
no_license
#include "comparator.h" int str_compare_drct (struct c_string* a, struct c_string* b) { int aPointer = 0; int bPointer = 0; int Diff = 0; while (aPointer < a->Len - 1 && bPointer < b->Len - 1) { if (!isalpha (a->Str[aPointer])) { ++aPointer; continue; } if (!isalpha (b->Str[bPointer])) { ++bPointer...
true
1b5537468130240540009951bf406721923ef537
C++
sircodesalotOfTheRound/VerbOS
/Assemblies/LoaderClasses/Types/FileInt8/FileInt8.h
UTF-8
445
2.578125
3
[]
no_license
// // Created by Reuben Kuhnert on 14/9/23. // Copyright (c) 2014 Reuben Kuhnert. All rights reserved. // #ifndef __FileInt8_H_ #define __FileInt8_H_ #include <istream> class FileInt8 { uint8_t value_; public: FileInt8(std::istream& stream); uint8_t value() const; operator uint8_t() const; friend std::...
true
fc6418f76f2c8f5b15850d554df712b56071cd07
C++
SunTingxin/LightGuardian
/cpp/SuMax_Experiments/delay_distribution/Sketch.h
UTF-8
7,230
2.53125
3
[]
no_license
#ifndef SKETCH #define SKETCH #include"param.h" #include "EMFSD.h" int get_delay_lev(unsigned delay){ rep2(i, 0, Lev_Num-1){ if(delay < delayLevThres[i]) return i; } return Lev_Num-1; } class buck{ public: unsigned *Bin; buck(){ Bin = new unsigned[Lev_Num]; r...
true
1a0eece9bbc5239d3335cb67411bb4f55665146a
C++
blackkaiserxjc/kraken
/libs/io/src/kr/io/compression.cpp
UTF-8
2,526
2.875
3
[ "Apache-2.0" ]
permissive
// // Created by kaiser on 2021/1/2. // #include "compression.h" #include <fmt/format.h> #include <stdexcept> namespace kr { namespace io{ compression::compression(CompressType type, std::optional<int> level) : type_(type) { } std::string compression::compress(std::string_view data) { return {}; } std::str...
true