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
9db97fa742d7c9dbe5b3bd900b1aba2d8c26984d
C++
pheller/libbgp
/src/bgp-sink.h
UTF-8
2,174
2.828125
3
[ "MIT" ]
permissive
/** * @file bgp-sink.h * @author Nato Morichika <nat@nat.moe> * @brief The BGP sink. * @version 0.1 * @date 2019-07-05 * * @copyright Copyright (c) 2019 * */ #ifndef BGP_SINK_H_ #define BGP_SINK_H_ #include <mutex> #include <stdint.h> #include <unistd.h> #include "bgp-packet.h" #include "bgp-log-handler.h" ...
true
28ce21ff69354d8eb932b32764ca55d5c1a1090c
C++
Pandinosaurus/flow_ros
/flow_ros/test/unit/publisher.cpp
UTF-8
2,202
2.671875
3
[ "MIT" ]
permissive
/** * @copyright 2020 Fetch Robotics Inc. * @author Brian Cairl */ // C++ Standard Library #include <cstdint> #include <vector> // GTest #include <gtest/gtest.h> // ROS #include <ros/time.h> // ROS Messages #include <std_msgs/Header.h> // Flow #include <flow/flow.h> #include <flow_ros/message_stamp_access.h> #i...
true
ce1aa6fdc63a9ce66eb3a43ab3e3f57d62026237
C++
BEN2suzuka/proconlib
/AOJ_GRL/grl_5c_2.cpp
UTF-8
2,505
3.109375
3
[]
no_license
// GRL 5_C // C++14 #include <bits/stdc++.h> using namespace std; // 最小共通祖先 (LCA : Lowest Common Ancestor) // 根付き木の 2 頂点 u, v の共通祖先で最も根から遠い祖先 vector<vector<int>> G; const int INF = 2147483647; // 2^31 - 1 // Euler Tour (DFS 木も作る) // t := タイマー // pre[i] := もとの頂点番号 i に対応する DFS 木の頂点番号 // ET[i] := DFS の訪問順をもつ (2*N-1 要素...
true
5b5464e523602b84eeb44f4e8b5b6e45e0eda688
C++
alifahrri/nmtools
/include/nmtools/meta/expr.hpp
UTF-8
5,733
2.921875
3
[]
no_license
#ifndef NMTOOLS_META_EXPR_HPP #define NMTOOLS_META_EXPR_HPP #include "nmtools/meta/common.hpp" #include "nmtools/meta/bits/transform/add_reference.hpp" #include "nmtools/utility/get.hpp" namespace nmtools::meta { namespace expr { /** * @brief helper alias template to check if given type T has...
true
db4e121f596f68f200d66b07c78eec2ae4b8e3e9
C++
dmrudy17/Rainfall
/rainfall.cpp
UTF-8
772
3.765625
4
[]
no_license
/* rainfall.cpp Rainfall report */ #include <iostream> #include <vector> int main() { // input hourly rainfall data std::vector<double> rainfall; double n; while (std::cin >> n) { rainfall.push_back(n); } // calculate average and heaviest rainfall double total = rainfall...
true
9636b6be6ca40ee8142300af4022748afefdb9bf
C++
JanaSabuj/Leetcode-solutions
/Apr'20/907(Sum of SubArray Minimums).cpp
UTF-8
1,390
2.6875
3
[ "MIT" ]
permissive
class Solution { public: int sumSubarrayMins(vector<int>& A) { const int mod = 1e9 + 7; int n = A.size(); vector<int> g1(n), g2(n); stack<int> s;// next smaller element // increasing stack for(int i = 0; i < n; i++){ while(!s.e...
true
57ee74630ed4f44ccfb0e27607532efd4aa23ff6
C++
20191864235/G22
/c7/7.9/7.9.cpp
UTF-8
510
3.28125
3
[]
no_license
#include<stdio.h> #include<string.h> void fun(char s[]) { int len=strlen(s); int letter=0,num=0,space=0,other=0; for (int i=0; i<len; i++) { if ((s[i]>='a'&&s[i]<='z')||(s[i]>='A'&&s[i]<='Z')) letter++; else if (s[i]>='0'&&s[i]<='9') num++; else if (s[i]==' '||s[i]=='\t') s...
true
9d9fae26a59346af9fcd8fbdeee47e87513c5dff
C++
PraneshASP/COMPETITVE-PROGRAMMING
/_LEETCODE/1561.cpp
UTF-8
349
2.59375
3
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
#include <bits/stdc++.h> using namespace std; class Solution { public: int maxCoins(vector<int> &piles) { sort(piles.begin(), piles.end()); int n = piles.size(); int i = n / 3, j = n - 2, ans = 0; while (i--) { ans += piles[j]; j -= 2; } ...
true
bc77cffc120478d2c5c3aa1f1eb02999f44fd73c
C++
isvelasc/CPP-How-To-Program
/Ch 5/5_16_Mod_Compound_Interest.cpp
UTF-8
582
3.28125
3
[]
no_license
#include <iostream> #include <iomanip> #include <cmath> int main() { int amount; int principal = 1000 * 100; double rate = 1.05; std::cout << "Year" << std::setw( 21 ) << "Amount on deposit" << std::endl; std::cout << std::fixed << std::setprecision( 2 ); for (unsigned int year = 1; year <= 10; ...
true
5a0fcbfabd4c4042f5eee05b7ed9919c90c8a8f3
C++
doug0102/GAM1514FinalProject
/Source/Common/Game/Enemy.h
UTF-8
399
2.671875
3
[]
no_license
#include "Player.h" class Enemy : public Player { public: Enemy(Level* level, float speed); virtual ~Enemy(); const char* getType(); void update(double delta); void paint(); void reset(); void fireProjectile(float x, float y); void slowEnemy(double length, float power); protected: void handlePlayerColli...
true
5c9b13f37a9b951da2fd1f1294ee1b52f84161ec
C++
lvsszz/suan_fa_jing_sai_bao_dian
/chapter3/1_freopen.cpp
UTF-8
426
3
3
[]
no_license
//freopen方式读写文件 #include <iostream> #include <cstdlib>//此行必加,否则linux下可能出问题 using namespace std; int main() { int a,b; freopen("sum.in","r",stdin); //从sum.in中读取数据 https://www.cplusplus.com/reference/cstdio/freopen/ freopen("sum.out","w",stdout);//输出到sum.out文件 cin>>a>>b; cout<<a+b<<endl; //system("pause"...
true
33bf8e5256260c2d8a7944dccfc3435b8da87ca5
C++
zackdlut/designpattern
/factoryMethod/src/Log.h
UTF-8
298
3.015625
3
[]
no_license
#ifndef _LOG_H_ #define _LOG_H_ #include<iostream> class Log { public: Log(); virtual ~Log(); virtual void writeLog(std::string log) = 0; }; Log::Log() { std::cout<<"Construct Base Log"<<std::endl; } Log::~Log() { std::cout<<"Destruct Base Log"<<std::endl; } #endif //_LOG_H_
true
3c3353bf7b764c1c5ed269680a8c6e31fbe27470
C++
rstms/splishsplash
/splish/AudioCapturer.h
UTF-8
1,132
2.640625
3
[ "MIT" ]
permissive
#pragma once /// Responsible for launching a thread that continually captures the audio output and makes /// it available in a cyclic buffer. An event is raised every time new audio data is /// available. class AudioCapturer { public: AudioCapturer(int bufferSizeInSeconds, int latencyInMilliseconds); ~AudioC...
true
1aa3aa4092c832889dba67d184a3bd68fa3655a7
C++
MIDAS2020/Midas
/ClusterMaintenance/misc.h
UTF-8
955
2.640625
3
[]
no_license
#pragma once using namespace std; #ifndef MISC_H #define MISC_H const bool POPULATE_CHECK = false; const short ENDOFTREETAG = 3002; const short ENDTAG = 3001; const short INFINITY_SHORT = 3003; //a number greater than any short const long INFINITY_LONG = 2000000000; //a number greater than any long ext...
true
503730a3880a462748b334bfd39ac2a3bef08936
C++
Gaspard--/Kontext_kompiler
/include/Stack.hpp
UTF-8
437
3.140625
3
[]
no_license
#pragma once #include <memory> #include <deque> #include "Value.hpp" class Stack : public std::deque<std::unique_ptr<Value>> { public: Stack() = default; Stack(Stack const &) = delete; Stack(Stack &&) = delete; ~Stack() = default; /// I didn't find anything about stack resize destrcution order so using po...
true
b9a7f334ceaa54a6289948db0dbd003914ff8c61
C++
goodfella/libndgpp
/include/libndgpp/bounded_integer.hpp
UTF-8
20,812
3.28125
3
[ "MIT" ]
permissive
#ifndef LIBNDGPP_BOUNDED_INTEGER_HPP #define LIBNDGPP_BOUNDED_INTEGER_HPP #include <cstdint> #include <cstring> #include <functional> #include <limits> #include <stdexcept> #include <string> #include <type_traits> #include <utility> #include <libndgpp/error.hpp> #include <libndgpp/safe_operators.hpp> #include <libnd...
true
565586403124982918f8c960e2126dd3e716df75
C++
Arkozak/New-Repo
/Homework 4/tokenizer.cpp
UTF-8
485
3.046875
3
[]
no_license
#include "tokenizer.hpp" int main() { vector<string> tokens; string str; int x = 0; cout << "Please enter some text."; cout << " To end type end." << endl; while (str != "end" && str != "END" && str != "End") //Grabing inputs { if (ReadLine(str) == true) { tokens.push_back(str); tokens.push_back("...
true
cb9e901f77dc6305ad1374da4b949966451b6a84
C++
rahulbeeram12/ABC_Assignments
/Assignment 2/q7.cpp
UTF-8
281
3
3
[]
no_license
#include<iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int min = a; if (b < min) min = b; if (c < min) min = c; //another approach using ternary operator // min = c < (a < b ? a : b) ? c : (a < b ? a : b); cout << min << "\n"; return 0; }
true
df2b636f4da43961c7dc1d40d30c28f532b84bd3
C++
heavy3/stanforg-cs106b
/w3/permutation/src/permutation.cpp
UTF-8
1,140
3.21875
3
[]
no_license
#include <iostream> #include "simpio.h" #include "stack.h" #include "console.h" #include "lexicon.h" #include "filelib.h" using namespace std; void intro(); void permute(string s); void permute(string sofar, string remain); Lexicon english; int main() { intro(); english = Lexicon("dictionary.txt"); ...
true
c5891e3baeb77b162e60091b4a36d3969a8c9059
C++
tianjun-love/HelloWorld
/DateTime/include/Date.hpp
UTF-8
951
2.9375
3
[]
no_license
/******************************************* 功能:日期处理类 作者:田俊 时间:2019-05-22 修改: *******************************************/ #ifndef __DATE_HPP__ #define __DATE_HPP__ #include "DateTime.hpp" class CDate : public CDateTime { public: CDate(); CDate(unsigned int iYear, unsigned int iMon, unsigned int iDay); CDate(cons...
true
b6f746fd451bc481300a3654bfdd1f398e86b50c
C++
ValKmjolnir/NUAA-CCST-Data-Structure
/exp8-src/quick_sort.cpp
UTF-8
688
3.15625
3
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> #include <cmath> int num[1024]; void init() { std::srand(unsigned(std::time(NULL))); for(int i=0;i<1024;++i) num[i]=rand()%1024; return; } void quick_sort(int begin,int end) { int i=begin; int j=end; if(i<j) { int mid=num[(begin...
true
4bdce010665dbf0fdb99caac41c2285a23e4289b
C++
prashrock/CPP
/string/substring.h
UTF-8
11,276
3.28125
3
[ "MIT" ]
permissive
#ifndef _SUBSTRING_UTILS_CPP_ #define _SUBSTRING_UTILS_CPP_ /** * @file Substring * @brief Substring functions */ #include <vector> /* std:vector */ #include <algorithm> /* std::max */ #include "hash_fns.h" /* rolling_hash() */ /** * N...
true
b6d1c2ff952048f5c25a198935cac61a547c2ad5
C++
Nexarian/Coverage-Finder
/Multi-Threaded Coverage Finder/Path.cpp
UTF-8
5,997
2.78125
3
[]
no_license
#include "StdAfx.h" #include "Path.h" #include <fstream> Path::Path(void) { } Path::~Path(void) { ClearData(); } void Path::SavePathVectors(const char* FileName) const { std::ofstream OutputFile(FileName); //each of these is a vector for (std::list< std::pair<POINT, POINT> >::const_iterator VectIt = LastPathVec...
true
591702ca3705be174f4d852b0721af297b0f221b
C++
Rufian55/Cpp
/makeChange.cpp
UTF-8
1,643
3.4375
3
[ "MIT" ]
permissive
/****************************************************************************** * makeChange.cpp outputs minimum number of coins to make a given change input * as argv[1]. Usage is makeChange {int currency2Return} * Compile: g++ makeChange.cpp -o makeChange -g -Wall * [1] ***********************************************...
true
0b7fa8ec43f5c234d7b73e1ec87844705d2f5240
C++
cy-peng/C_homework
/計算機技術作業HW5(4).cpp
UTF-8
761
2.953125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <time.h> int main( ) {int a,b,c,d,count,out,sum,n1,n2,n3,n4; while(a==b||b==c||c==d||a==d||a==c||b==d){ srand(time(NULL)); a=rand()%10; b=rand()%10; c=rand()%10; d=rand()%10; } printf("%d%d%d%d",a,b,c,d); while(count!=4){ printf("\nPlease input four digits(0~9):\n"); s...
true
c1a1518d7dfb4ee4c790dbbba415b6b60b80c829
C++
isaevi/PodcastLoader
/recordinfo.cpp
UTF-8
2,540
2.703125
3
[]
no_license
#include <QtCore> #include "recordinfo.h" RecordInfo::RecordInfo(QObject *parent) : QObject(parent), _downloadPercent(0), _status(Ready) { } bool RecordInfo::operator ==(const RecordInfo& other) { return _title.compare(other._title) == 0 && _url.matches(other._url, QUrl::None) && _date == other._date; } QStri...
true
55fcc2d90d8dc672dbde0aa3388247ae268de3d0
C++
madhuri29/Thesis_25_5
/Practice/Partitioning/Headers/matrix.h
UTF-8
948
2.984375
3
[]
no_license
/*------------------Class Details------------------------ * Name: Matrix * * Description: Defines the connectivity matrix * A vector of vectors that stores the connectivity information * between nodes *--------------------------------------------------------*/ #ifndef _MATRIX_H #define _MATRIX_H #include...
true
28170d96f53a943778e3cb390338c6a64af92f62
C++
ostvld/figure
/source/CFigureFactory.cpp
UTF-8
479
2.53125
3
[]
no_license
#include "CFigureFactory.h" namespace NFigure { IFigure *CFigureFactory::getFigure(EFigure type) { if (NFigure::EFigure::Rectangle == type) { return new NFigure::CRectangle("прямоугольник"); } else if (NFigure::EFigure::Circle == type) { return new NFigure::CCircle("окружность"); ...
true
72e4d82687aa8f4129b68ff0edb909974d9096f1
C++
kamyu104/LeetCode-Solutions
/C++/flip-equivalent-binary-trees.cpp
UTF-8
2,773
3.640625
4
[ "MIT" ]
permissive
// Time: O(n) // Space: O(h) /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ // bfs solution class Solution { public: bool flipEquiv(TreeNode* root1, TreeNode* root2...
true
315e861fac76171798ecf257491ea5283944a051
C++
ankityadav107/Solutions-in-Place
/Leetcode/Trees/ConvertSortedArraytoBinarySearchTree.cpp
UTF-8
840
3.6875
4
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode ...
true
e5da7ac37545dc533675c0cd0e765632268ae9b4
C++
MichaelLafosse99/MathforGames
/MathforGames/MathforGames/Matrix4.cpp
UTF-8
2,509
3.640625
4
[]
no_license
#include "Matrix4.h" //This initializes a 3d matrix to have values of 0 Matrix4::Matrix4() { for (int r = 0; r < 4; r++) { for (int c = 0; c < 4; c++) { data[r][c] = 0.0f; identityMatrix[r][c] = 0.0f; } } } Matrix4::Matrix4(float xx, float xy, float xz, float xw, float yx, float yy, float yz, float yw,...
true
836694f74ee4f0ec3d3211ceaf2303dff22f6a4c
C++
18ivan18/ArtificialIntelligence
/descisionTree/Solver.h
UTF-8
503
2.609375
3
[]
no_license
#ifndef SOLVER #define SOLVER #include <string> #include <vector> using std::string; using std::vector; class Solver { private: const int DEFAULT_FOLD = 5; std::vector<std::string> split(std::string &, const std::string &); vector<vector<string>> input; int fold; void readInput(const string &); ...
true
e127f849f0fef3a39709b512e018404877e1f226
C++
CR0N00S/lab13_2561_2
/lab13_1.cpp
UTF-8
893
3.46875
3
[]
no_license
#include <iostream> #include <string> using namespace std; template <typename T> void swap(T d[],int x,int y){ T temp = d[x]; d[x] = d[y]; d[y] = temp; } template <typename T> void insertionSort(T d[],int N){ int x=0,i=1; for(int i=1;i<N;i++){ int x=i; for(int f=0;f<N;f++){ if(f=...
true
beeaa4884351b4145cb23932a035c3be1ba15ea3
C++
DIYMAN-CSHOP/DIYMAN_ArduinoProjects
/Automatic Alcohol Dispenser - Rua tay tu dong.ino
UTF-8
1,380
2.6875
3
[]
no_license
#define inPin 12 #define LedStand 13 #define LedPump 11 #define Buzzer 10 #define OutPump 9 #define TimeToBegin 500 #define TimeToPump 300 int val1, val2=-1; char buf[10]; int count = 0; void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println("HELLO"); pinMode(inPin,...
true
db958e5471fc3d50dce5fc7f141071dcaaa7ad98
C++
ahmadtc1/LineFollowingRobot
/line_Follower.ino
UTF-8
2,702
3.015625
3
[]
no_license
const int LeftmotorPin1 = 12; // Assign Digital pin 12 of Arduino to Left Motor Pin1 const int LeftmotorPin2 = 11; // Assign Digital pin 11 of Arduino to Left Motor Pin2 const int RightmotorPin3 = 10; // Assign Digital pin 10 of Arduino to Right Motor Pin3 const int RightmotorPin4 = 9; // Assign Digital pin 9 of Arduin...
true
f4423ae53c5ca86d02bace0295c09f0a5ec7e15d
C++
anmolgup/Competitive-programming-code
/Codeforces/26/B.cpp
UTF-8
394
2.640625
3
[]
no_license
#include<bits/stdc++.h> #define ll long long using namespace std; int main() { string s; cin>>s; stack<char> a; ll l=s.length(); for(ll i=0;i<l;i++) { if(a.empty()) { a.push(s[i]); } else if(s[i]==')') { if(a.top()=='(') { a.pop(); } else { a.push(s[i]); ...
true
e37c84500f6fb44b630194cefadbdb33ecf44de3
C++
manparvesh/coursera-ds-algorithms
/2. Data Structures/Programming-Assignment-4/is_bst/is_bst.cpp
UTF-8
1,489
3.6875
4
[ "MIT" ]
permissive
#include <algorithm> #include <iostream> #include <vector> using std::cin; using std::cout; using std::endl; using std::vector; struct Node { int key; int left; int right; Node() : key(0), left(-1), right(-1) {} Node(int key_, int left_, int right_) : key(key_), left(left_), right(...
true
7b1325fe673c2875b9c8b23b41adc0b25d44a4c4
C++
raysloks/Project3
/DynamicState.cpp
UTF-8
464
2.703125
3
[]
no_license
#include "DynamicState.h" bool DynamicState::operator==(const DynamicState& rhs) const { return !(*this != rhs); } bool DynamicState::operator!=(const DynamicState& rhs) const { if (scissor.offset.x != rhs.scissor.offset.x) return true; if (scissor.offset.y != rhs.scissor.offset.y) return true; if (scissor.ex...
true
5388c76ecdd654948d9c9b018000c5a31096973e
C++
LivingFray/SpaceCOOP
/SpaceCOOP/src/client/HUD.cpp
UTF-8
780
2.75
3
[]
no_license
#include "HUD.h" #include "Client.h" #include <string> HUD::HUD() { font.loadFromFile("assets/cour.ttf"); health.setFont(font); health.setCharacterSize(24); health.setPosition(sf::Vector2f(10.0f, 10.0f)); health.setFillColor(sf::Color(255, 255, 255)); } HUD::~HUD() { } void HUD::draw(sf::RenderTarget& target, ...
true
2b10dd31b62007dd2dbe603d377fb4504ec6a16e
C++
Summer-16/arduino-codes
/count_persion_in_roon_IR/count_persion_in_roon_IR.ino
UTF-8
1,323
2.625
3
[]
no_license
int s1 = 0; int s2 = 0; int a = 0; int a1 = 0; int b = 0; int c = 0; int num = 0; void setup() { Serial.begin(9600); pinMode(A4, INPUT); pinMode(A5, INPUT); pinMode(13, OUTPUT); } void loop() { s1 = digitalRead(A4); s2 = digitalRead(A5); if (s1 == HIGH) { b = 1; if ((s1 == HIGH) && (b == 1)) ...
true
d959108e3e42ef7a0431b2b3ac0bae4c93bcb7d6
C++
oursuccess/cplusplus_primer_practices
/12.26.cpp
GB18030
701
3.1875
3
[]
no_license
#include<iostream> #include<memory> #include<string> using std::string; using std::cin; using std::allocator; using std::cout; using std::uninitialized_copy; using std::uninitialized_fill_n; int main() { string s; cin >> s; //wrong elem below //allocator<string> allos; //wrong the same? //correct need to update...
true
22d3427016b83a8b784e64eef6d7547a5f405319
C++
manraj23s/Data-Structures-Algorithms
/Lab 5-HashTableADTs/TestPlan1Table.cpp
UTF-8
5,693
3.53125
4
[]
no_license
/* //======================================================================== // // Laboratory 10 Test Plan 1 Test10.cpp // // Name: Lab 10 test compilation // Version #: 1 // Date Originally Written: 04/08/2021 // Date Last Modified: 04/10/2021 // Authors's Names: Manraj Singh ...
true
5d667713a59647faf725eb87bffacfc53347c912
C++
Z02X/TermPomodoro
/src/main.cpp
UTF-8
1,675
3.46875
3
[ "BSD-3-Clause" ]
permissive
#include <iostream> #include <unistd.h> #include <SFML/Audio.hpp> int main() { //This is the intager that stores the users input int input; //This is the audio file that plays when the timer is up sf::Music music; if (!music.openFromFile("./files/sound.wav")) //TODO this error triggers due...
true
4e51b8be78d1bc92195cbda303d255558a01e716
C++
zyxrrr/LeetCode
/494-Target Sum/Solution.cpp
UTF-8
1,042
2.96875
3
[]
no_license
class Solution { public: int findTargetSumWays(vector<int>& nums, int S) { if (nums.empty()){return 0;} return find(nums,0,S); /* queue<int> q; queue<int> tmp; int cnt = 0; if (nums.empty()){ return cnt; } q.push(nums[0]); q...
true
15277f2e7f93d8515123c7b5b6d11aa78dead84a
C++
seth1002/antivirus-1
/include/klava/klavstl/allocator.h
UTF-8
3,038
2.59375
3
[]
no_license
// allocator.h // #ifndef allocator_h_INCLUDED #define allocator_h_INCLUDED #include <stdlib.h> #include <string.h> #include <kl_types.h> #ifdef KLAVA // NB: in order to prevent definition conflict, a link may not include <new>, either directly, or indirectly inline void* operator new (size_t size, v...
true
fe2f24144c3aa521cdca0495cb2f7f9dafeb6d45
C++
jihoon-ko/AlgorithmStorage
/treeStructure/Splay.cpp
UTF-8
5,529
2.84375
3
[]
no_license
#include<cstdio> #include<algorithm> #define lnode now_node->l #define rnode now_node->r using namespace std; struct node{ int val; node *p,*l,*r; int cnt; long long sum,mini,maxi; bool rev; }tree[300002]; node *root = &tree[0]; int n,q; void preorder(node *now_node){ if(!now_node) return; ...
true
e3f211fb2091f4cd5e3ee2895f310d621116fdd7
C++
nik3122/Trolled
/Source/Trolled/Items/FoodItem.cpp
UTF-8
2,259
2.671875
3
[]
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "FoodItem.h" #include "Trolled/MainCharacter.h" #include "Trolled/Player/TrolledPlayerController.h" #include "Trolled/Components/InventoryComponent.h" // namespace used for language localization #define LOCTEXT_NAMESPACE "FoodItem...
true
95b8200330f50daa1311ae3d2ef7ee2123fb982c
C++
ChuckBolin/TwistedTunes
/include/cgamestatescore.h
UTF-8
1,257
2.5625
3
[]
no_license
//CGameStateScore.h #ifndef GAME_STATE_SCORE_H #define GAME_STATE_SCORE_H #include "CGameStateObject.h" #include "CTimer.h" #include "CGraphics.h" #include <iostream> #include <windows.h> #include "CGameData.h" #include "keystatus.h" #include "CConfigData.h" struct HIGH_SCORE{ std::string name; int...
true
f76e64ae4009a2e5182e0ec5cc46cb237a862bef
C++
ArthurGoodman/violet
/source/ast/nodes/variabledefinitionnode.cpp
UTF-8
924
2.8125
3
[]
no_license
#include "variabledefinitionnode.h" #include "icontext.h" #include "common.h" VariableDefinitionNode::VariableDefinitionNode(Variant::Type type, list<pair<string, Node *>> definitions, bool isConst) : type(type), definitions(definitions), isConst(isConst) { } VariableDefinitionNode::~VariableDefinitionNode() { ...
true
6921e1d6dc7135b588c3437e7a01fd0a0b30f9be
C++
BekzhanKassenov/olymp
/acmp.ru/101...200/192/192.cpp
UTF-8
774
2.796875
3
[]
no_license
#include <iostream> #include <algorithm> #include <cstdio> #include <vector> using namespace std; int n, p[10010]; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d", &p[i]); } int pos = n - ...
true
1f77fdbd39057ca36420e2b2576bf2ec4eee3d09
C++
spfrood/CPP-references
/Chapters/Assignment_11/Menu_Assn_5_Ch_13_Ch_14/Worker.cpp
UTF-8
1,064
3.171875
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: Worker.cpp * Author: scott_r_parker * * Created on May 3, 2017, 10:16 AM */ #include "Worker.h" Worker::Worker()...
true
cb64c13b011ae35a26d39a766007de87be022bfa
C++
FrizzleFur/iOSDevLevelingUp
/ReadingBooks/《Objective-C 高级编程》学习笔记/ProObjcBookDemo/BlockDemo/BlockImplementaionDemo/BlockImplementaionDemo/main6.cpp
UTF-8
2,022
2.59375
3
[]
no_license
struct __block_impl { void *isa; int Flags; int Reserved; void *FuncPtr; }; //_______________________________ 作为全局变量的 block _______________________________________________ struct __globalBlcok_block_impl_0 { struct __block_impl impl; struct __globalBlcok_block_desc_0* Desc; __globalBlcok_block_imp...
true
12bd64760c4905374f3cf773412706b1171a5ae3
C++
rgsouza/MultimediaBox
/cpp/Groupe.cpp
UTF-8
860
3.390625
3
[]
no_license
// // Groupe.cpp for create a group of multimedia files. // Rayanne Souza - 10/2015 // #include "Groupe.h" Groupe::Groupe( const string name, ptr_multimedia object):list() { this->name = name; this->push_back(object); } Groupe::Groupe():list(){ this->name = "Undefined name"; } Groupe::~Groupe() { ...
true
1ef8ab11dc0f0d9f103eb67223678a6b172f7323
C++
jmsplmr/CS345_week10_PageReplacementLab
/prSecond.h
UTF-8
1,679
2.625
3
[]
no_license
/*********************************************************************** * Component: * Page Replacement Second Chance * Author: * James Palmer * Summary: * This is the DERRIVED class to implement Second ************************************************************************/ #pragma once #include "pr.h" ...
true
9991574afafbd85e6bd0431f3ca2303e39c16cab
C++
Daguerreo/Azul
/image.h
UTF-8
360
2.53125
3
[]
no_license
#ifndef IMAGE_H #define IMAGE_H #include <QImage> #include <opencv2/core/core.hpp> using namespace cv; class Image { public: Image(); ~Image(); Mat getMat() const; void setMat(const Mat &image); QImage getQImage() const; void setQImage(const QImage &image); private: Mat mMatImage; QI...
true
caa7d908c30594f62048bb25de8afe13d138c04a
C++
saw1998/Computional_Geometry
/src/computational_geometry/circle.cpp
UTF-8
1,294
3.15625
3
[]
no_license
// // Created by sachin on 14/01/20. // #include <cmath> #include "circle.h" #include "point.h" namespace { #define EPS 1e-9 #define PI std::acos(-1) } namespace cg { template<typename T> circle<T>::circle(point<T> _p, double rad) { p = _p; r = rad; } template<typename T> circle<T>::circle(T x, T y, double...
true
b6e91f3b432843f16e7d22c7d54fae7c0332ea07
C++
marioanloru/Fundamentos-de-la-Programacion
/sesion13/ejercicio4.cpp
UTF-8
7,875
3.828125
4
[]
no_license
/* EJERCICIO4: Programa que realiza estadísticas sobre datos meteorológicos * * Autor: Mario Antonio López Ruiz * 1ºD */ #include <iostream> using namespace std; class Meteo{ private: static const int FILAS = 90; static const int COLUMNAS = 3; int datos[FILAS][COLUMNAS]; int amplitudes[FILAS]; int uti...
true
94491d32b027bc3ec969d622bf0fc68f57414eb1
C++
abhishek09091/competitive-programming
/Company Wise Practice/Goldman Sachs/special-stack.cpp
UTF-8
1,575
3.71875
4
[]
no_license
/****** https://www.geeksforgeeks.org/design-and-implement-special-stack-data-structure/ https://www.geeksforgeeks.org/design-a-stack-that-supports-getmin-in-o1-time-and-o1-extra-space/ *******/ #include<iostream> #include<stack> using namespace std; void push(int a); bool isFull(int n); bool isEmpty(); int pop(); in...
true
41118c4d4b171640386c400047fe55bc8b330b5a
C++
adams-jon/ja1870341-Projects
/Adams, Jonathan_Proj1_42450_A&Pver2/main.cpp
UTF-8
44,125
2.890625
3
[]
no_license
/* * File: main.cpp * Author: Adams, Jonathan * * Created on April 19th, 2014 @ 09:30 AM */ #include <iostream> #include <cmath> #include <iomanip> #include <ctime> #include <cstdlib> #include <fstream> using namespace std; //Global Constants const int asize=4; //Function Prototypes void fillary (int[], int, in...
true
da98644f0316354dc946d1e09c1d51ac0bc3e516
C++
vsierrabonich/udemy_C
/3.31.cpp
UTF-8
1,343
3.578125
4
[]
no_license
// // Created by Vicenç Sierra on 08/12/2018. // // Udemy - 3.31. Cajero automático con menú // #include <iostream> using namespace std; int main(){ int opc; float saldo = 2500, ret, ing; cout << "\n--- Bienvenido a tu cuenta bancaria ---\n\nTu saldo actual es de: " << saldo << " €.\n"; cout << "\n...
true
9ea23c0e469a37ee0c00137e736599d35148af9b
C++
BenThurber/Graphics-Assignment-1
/Assignment1/tesla_boat.cpp
UTF-8
3,159
2.875
3
[]
no_license
// // tesla_boat.cpp // Assignment1 // // Created by Benjamin Gorham Thurber on 10/04/20. // Copyright (c) 2020 Benjamin Gorham Thurber. All rights reserved. // #include <stdio.h> #include <iostream> #include <cmath> #include <GL/freeglut.h> #include "tesla_boat.h" #include "loadOFF.h" #include "main.h" // Change...
true
5ccbd9c2ccdfdf3e73512b479535706e5c793442
C++
akshaynathr/Competitive-Programming
/GRAPH/TREES/sumTree.cpp
UTF-8
743
3.765625
4
[]
no_license
// Given a binary tree find the sum of all the elements #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node* right ; struct Node* left ; Node(int data) { this ->data = data; right=left=NULL; } }; int addTree(struct Node * node) { ...
true
45d0aeff8a5aa8d50e87179a90ffc389557bc65b
C++
sidrusiya/CP-AlgorithmsSol
/spmat.cpp
UTF-8
666
3
3
[]
no_license
#include<iostream> using namespace std; #include<vector> void spmat(int n){ vector <vector<int>> A(n,vector<int>(n)); int p1,p2,k=1; for(int l=0;l<n;l++){ if(l%2==0){ p1=l/2;p2=l/2; while(p1+p2<=2*(n-1-(l)/2)){ A[p1][p2]=k++; if(p2<n-1-(l)/2)p2++; else p1...
true
ea036faaca56a91c06b3c6a857798de115cd7a87
C++
chaeyeonhan1225/TIL
/알고리즘/MergeSort.cpp
UHC
1,216
3.734375
4
[]
no_license
#include <iostream> using namespace std; void merge(int a[], int left, int mid, int right) { int i = left; // κ ù° ε int j = mid + 1; // κ ù° ε int *temp = new int[right-left + 1]; // ӽù迭 int k = 0; while (i <= mid && j <= right) { if (a[i] < a[j]) { temp[k++] = a[i++]; } else { ...
true
b0ab81f2e9bc90badd69ff07eaf784b7ab1cbca1
C++
gabrielmaneru/Ray-Tracing-Model-SDF
/Raytracer/src/utils/math_utils.h
ISO-8859-10
1,398
2.890625
3
[]
no_license
/* Start Header ------------------------------------------------------- Copyright (C) 2019 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited. File Name: math_utils.h Purpose: Some mathematical utils...
true
7536d6205bdb8344aa098b65f59f6c334946f7c2
C++
minkipro/dungreed
/DX_FrameWork/MosaicShader.h
UHC
362
2.515625
3
[]
no_license
#pragma once //pass 0:mosaicShader(mosaicSize) ũ ׸ Է class MosaicShader final :public Shader { public: MosaicShader(); virtual ~MosaicShader(); virtual void ShaderReady(RenderInfo* render) override; void SetMosaicSize(Point size) { assert(size.x && size.y); this->mosaicSize = size; } private: Point mosaicSize;...
true
8ac101a176ac30081ef66dac8c8359d0fe177fff
C++
AlbinChang/Nanyang-Institute-of-Technology-ACM
/房间安排/源.cpp
UTF-8
432
3.03125
3
[]
no_license
#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { int T; cin >> T; int time_space[256]; int A, B, C; int N; while (T--) { cin >> N; fill_n(time_space, 256, 0); int MAX = 0; while (N--) { cin >> A >> B >> C; for (int i = B; i < B + C; i++) { ...
true
02d20e935e0091f3c2561d4134a707ae30e8d783
C++
pravirtual/Leetcode
/nandincpp/Merge Intervals.cpp
UTF-8
662
2.78125
3
[]
no_license
class Solution { public: vector<vector<int>> merge(vector<vector<int>>& intervals) { vector<vector<int>> ans; if(!intervals.size()) return ans; sort(intervals.begin(), intervals.end()); //sorting vector<int> temp = intervals[0]; ...
true
c96e9eb2b930fcc925e89f9c492a351937629fb5
C++
JacobigWong/rtmp_media
/audiooutsdl.cpp
UTF-8
2,600
2.609375
3
[]
no_license
#include "audiooutsdl.h" #include "dlog.h" #include "timeutil.h" namespace LQF { static void fill_audio_pcm(void *udata, Uint8 *stream, int len) { static int64_t s_pre_time = TimesUtil::GetTimeMillisecond(); AudioOutSDL *audio_out = (AudioOutSDL *)udata; int64_t cur_time = TimesUtil::GetTimeMillisecond()...
true
32f63196a02e35d840c6ec862c43cce684480430
C++
Sookmyung-Algos/2021algos
/algos_assignment/team_pratice/ucpc/team7/week1/2876.cpp
UTF-8
841
3.5625
4
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { int n, a, b; cin >> n; vector<int> A; vector<int> B; for (int i = 0; i < n; i++) { cin >> a >> b; A.push_back(a); B.push_back(b); } int min_grade = 0; int max_students = 0; for (int g = 1; g <= 5;...
true
172eb79e256b3f4ca5bf960438145408192ca38a
C++
quanmingyao/FaNCL-parallel
/code/tools.cpp
UTF-8
2,446
2.75
3
[]
no_license
#include <algorithm> #include "mkl.h" #include "tools.h" using namespace std; // used for sorting template <class type> class comIdx { public: comIdx() :m_val(0), m_idx(0) {} comIdx(const type val, const long long idx):m_val (val), m_idx(idx){} bool operator < (const comIdx <type>& input) { ...
true
1cdb59cd5de2b634b9067eb2ea252a1e076e486d
C++
jhernandez68/Ejercicios.
/Punteros_Ejercicio1.cpp
UTF-8
558
3.703125
4
[]
no_license
//Comprobar si un numero es par o impar con punteros y mostrar su direccion de memoria xd #include <iostream> using namespace std; int main(){ int numero, *direccion_numero; cout<<"Digite un numero \n"; cin>>numero; direccion_numero=&numero; if(*direccion_numero%2==0){ cout<<"El numero: "<<*dire...
true
972dce1ce4b5ec311ee0ffdb57a4ebdcc41799ba
C++
barunpuri/study
/c++ hw/8-50/q29 - 요일 계산하기.cpp
UTF-8
1,505
3.5625
4
[]
no_license
#include <iostream> #include <fstream> void q29(std::ifstream& fin); bool isLeapYear(int year); int yearsToDays(int year); int monthsToDays(int month, bool isLeapYear) ; int detDate(int days); int main() { std::ifstream fin; int numTestCase; fin.open("input.txt"); fin >> numTestCase; for(int i=0; i<numTestC...
true
3564418ba4a21e849759c5d88bcf39b6254b8f14
C++
igorbragaia/algorithms
/leetcode/938.cpp
UTF-8
613
3.46875
3
[]
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int rangeSumBST(TreeNode* root, int L, int R) { int ans=0; rec(root,L,R,ans); ...
true
35b74a89f0eb06feb6913ef97308d08a0f8a672b
C++
Dosx001/mini-RPG
/spike/TestInput.cpp
UTF-8
939
2.578125
3
[]
no_license
#include <gtest/gtest.h> #include <iostream> #include <fstream> int readUserInput(std::istream& input) { std::string value; std::cout << "Enter a number: "; getline(input, value); //input >> value; return std::stoi(value); } TEST(Some, Test) { std::ifstream ifs; ifs.open("sp...
true
8231dcf09d581a0ffe552aac42a2a7e18328ea68
C++
antonkov/UniversityCourses
/cg/tests/segment_intersect.cpp
UTF-8
2,869
2.640625
3
[]
no_license
#include <gtest/gtest.h> #include "cg/operations/segment_intersect.h" #include <cg/primitives/segment.h> #include "random_utils.h" TEST(segment_intersect, test1) { cg::segment_2 seg1(cg::point_2(0, 1), cg::point_2(1, 0)); cg::segment_2 seg2(cg::point_2(1, 1), cg::point_2(0, 0)); EXPECT_TRUE(cg::segments_...
true
735b85d3654fd154e454784b76695c885623491c
C++
Lijian1122/SF_PollServer
/Base/ThreadPool.h
UTF-8
1,444
2.765625
3
[]
no_license
/*================================================================ * Copyright (C) 2019 All rights reserved. * * 文件名称:ThreadPoll.h * 创 建 者:lijian * 创建日期:2019年06月03日 * 描 述:封装linux 和 windows下的线程池的封装,利用C++11的特性 * #pragma once ================================================================*/ #ifn...
true
306711cbf74085fbb891e4eee65a61ed0f524394
C++
alchemist366/Homeworks_2
/List_ 1.cpp
UTF-8
1,907
3.90625
4
[]
no_license
#include <iostream> using namespace std; struct Letter{ char l; Letter *next = NULL; }; struct LincedList{ Letter *first = NULL; Letter *last = NULL; void AddToEnd(char c){ if (first == NULL){ Letter *letter = new Letter; letter -> l = c; first = letter;...
true
3ab342c2804f3eeb63018b21d389486441a64ef8
C++
isombeg/Morse-Code-Interpreter
/Morse_Code_Interpreter.ino
UTF-8
6,624
3.078125
3
[]
no_license
#include <stdlib.h> const int ELEC_INPUT_PIN = 7; //Digital pin 7 will be used to detect electrical input char *morseStr = " "; //Letters and corresponding morse code #define morse_A "01" #define morse_B "1000" #define morse_C "1010" #define morse_D "100" #define morse_E "0" #define morse_F "0010" #define morse_G...
true
ca6e3884f8969137a450c17a1878b2c3f321cf2c
C++
gleensande/PLM
/Gant/graph.cpp
UTF-8
4,091
3.28125
3
[]
no_license
#include "graph.hpp" // конструктор графа по количеству вершин CListGraph::CListGraph(size_t vertices_count) { edges.resize(vertices_count); tasks.resize(vertices_count); visited.resize(vertices_count, false); } // добавление связи между вершиной номер v1 и номер v2 void CListGraph::AddEdge(int v1, int v2...
true
124f36e453b09aae4f6dfc4280cb18fc6b479a80
C++
fpelliccioni/Honeycomb
/Honeycomb/src/common/Honey/Physics/Physics.cpp
UTF-8
1,358
2.515625
3
[ "BSL-1.0" ]
permissive
// Honeycomb, Copyright (C) 2013 Daniel Carter. Distributed under the Boost Software License v1.0. #pragma hdrstop #include "Honey/Physics/Physics.h" namespace honey { template<class Real> Real Physics_<Real>::travelTime(Real dist, Real accel, Real velMin, Real velMax) { if (accel <= 0 || velMax <= 0...
true
2615ffaf52324c99d6749e7c587aee2ff235f028
C++
vordhosbnbg/simple2dgameengine
/VS2015/NeuralNetTester/GSRenderer.cpp
UTF-8
766
2.53125
3
[]
no_license
#include "GSRenderer.h" GSRenderer::GSRenderer(shared_ptr<GSWindow> window) : renderer_handle(SDL_CreateRenderer(window->GetRawHandle(), - 1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC), sdl_deleter()) { } GSRenderer::~GSRenderer() { } void GSRenderer::Clear() { SDL_RenderClear(renderer_handle.get()...
true
7c725873087854c526d41bdc93540bcd7a99edb7
C++
forspy/share
/test_c++_transfer string.cpp
GB18030
955
3.703125
4
[]
no_license
#include<iostream> #include<string> using namespace std; void display(string* str, int n); int main() { const int Size = 3; char kk[200]; cin >> kk; cout << kk << endl;; //cin.clear();ֻcinĴ״̬ cin.getline(kk,100);//ۣʹcin.getlineסʣµַ,൱ cout << kk << endl;; char str[100]; cin.getline(str, 100);//cin.getlineֻܸchar...
true
cfc890c7408f48e02d3ebcb3867ddd17ab21a968
C++
NiharsGIT/LandingGearMechanism
/LandingGearNano/LandingGearNano.ino
UTF-8
1,327
2.84375
3
[]
no_license
#include <Servo.h> Servo servo1; Servo servo2; int pos = 180; int Thr=20; int state; // 0:Open 1:Moving 2:Closed long duration,cm; int trigPin = A3; int echoPin = A4; unsigned long prevMillis = 0; unsigned long currentMillis = 0; void setup() { servo1.attach(A1); servo2.attach(A2); Serial...
true
ac2c62d34851929db30cda215c85c2d63544e9f9
C++
kbrian187/Warhammer_Casualty_Tracker
/Source_Files/Game.h
UTF-8
495
2.625
3
[]
no_license
/* * Game.h * * Created on: Apr 13, 2014 * Author: Brian */ #include<string> #include<iostream> #include"Unit.h" #include"Army.h" #include"Model.h" using namespace std; #ifndef GAME_H_ #define GAME_H_ class Game { public: Game(Army*, Army*); ~Game(); string unitCasualties(Army*, Army*); bool unitDead(int); ...
true
a31c04798842e6bb511fcfccfc376813b678e0d2
C++
apaek1204/Megaman
/deliverable/healthbar.h
UTF-8
1,616
3
3
[]
no_license
#ifndef HEALTHBAR_H #define HEALTHBAR_H #include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #include "LTexture.h" #include <vector> class healthbar{ public: healthbar(float=500, float=400); ~healthbar(); bool loadSprite(); void render(float, float, int); ...
true
d63acec62da575a1641609e1ec5394b7d3597145
C++
manalikale/Trees
/IdenticalTrees.cpp
UTF-8
1,400
4.4375
4
[]
no_license
/* Algorithm to check if two trees are identical Algorithm: sameTree(tree1, tree2) 1. If both trees are empty then return 1. 2. Else If both trees are non -empty (a) Check data of the root nodes (tree1->data == tree2->data) (b) Check left subtrees recursively i.e., call sameTree( tree1->left_subtree, tree2->...
true
ea1d7359a5cf8a0f978d1e819c4046d41ca88acb
C++
smwesten-usgs/Starspan
/src/common.h
UTF-8
2,853
2.625
3
[ "MIT-Modern-Variant" ]
permissive
// // starspan common declarations // Carlos A. Rueda // $Id: common.h,v 1.10 2008-04-23 00:05:22 crueda Exp $ // #ifndef starspan_common_h #define starspan_common_h #include <string> #include <sstream> #include <vector> #include <cassert> using namespace std; /** buffer parameters */ struct BufferParams { /** ...
true
4250f06eb0347063872709d0f08f298c08e33b2f
C++
icestudent/ontl
/ntl/win/console.hxx
UTF-8
14,319
2.625
3
[ "Zlib", "LicenseRef-scancode-stlport-4.5" ]
permissive
/**\file********************************************************************* * \brief * Console support * **************************************************************************** */ #ifndef NTL__WIN_CONSOLE #define NTL__WIN_CONSOLE #...
true
f6118214604c597b1938ea981a0636bac97ae587
C++
CORaisch/Smart-Car
/src/Rendering/Models/Car.cpp
UTF-8
3,502
2.625
3
[]
no_license
#include "Rendering/Models/Car.h" using namespace Rendering; using namespace Models; Car::Car() {} Car::~Car() { //is going to be deleted in Models.cpp } void Car::Create() { GLuint vao; GLuint vbo; glGenVertexArrays(1, &vao); glBindVertexArray(vao); //Get Size of Screen to Scale Model ...
true
1c37e0197e5599b59ff8914b0a1c72876bccc60b
C++
onewordstudios/sweetspace
/cugl/include/cugl/2d/actions/CUAnimateAction.h
UTF-8
12,978
2.78125
3
[]
no_license
// // CUAnimateAction.h // Cornell University Game Library (CUGL) // // This module provides support for filmstrip animation. The animation is // is represented as a sequence of frames. There is no tweening support // between animation frames. // // This class uses our standard shared-pointer architecture. // /...
true
511163ea4305e095ab992848b137d7e7a9850c6e
C++
kelompok-oop-sekar/reimagined-octo-funicular
/FarmAnimal/Chicken.cpp
UTF-8
1,799
2.96875
3
[]
no_license
# include <iostream> # include <cstdlib> # include <ctime> # include "Chicken.h" using namespace std; string Chicken::className = "Chicken"; Chicken::Chicken(int _x, int _y) : EggProducingFarmAnimal(_x,_y,true) , MeatProducingFarmAnimal(_x,_y,true) , FarmAnimal(_x,_y) { tickDie = 5; tickHungry = 7; } string C...
true
1f3cd2604efbcf1166e050d29d2bd4930a74979d
C++
DunsanyInteractive/RAD
/DirectX/Guicon.cpp
UTF-8
2,410
2.515625
3
[]
no_license
/* * Guicon.cpp * Rad Adventure Development * * Created by Oliver Plunkett * Copyright 2010 Dunsany Interactive. All rights reserved. * */ #include <windows.h> #include <stdio.h> #include <fcntl.h> #include <io.h> #include <iostream> #include <fstream> #include "Guicon.h" #include "../LuaEngine.h" #ifndef _...
true
293cc22fdd50bffc69fdcf871ec7b8d32a78f3a7
C++
kyun2024/ProgramSolve
/4375.cpp
UTF-8
1,304
2.796875
3
[]
no_license
#include <iostream> #include <cmath> #include <queue> #include <memory> using namespace std; int main(){ unsigned int input_n{}; int i{},j{},sum{}; int start_index{},coef{},mul_val{}; queue<int> Q; input_n = 0; while(true){ cin >> input_n; if(cin.eof()){ break;...
true
3a338c91c9165a17666bb83b7367ad946147fb41
C++
vladotrocol/bubble_source
/Source Code/DisplayKernel/OgreApplications/RobotSimulation.h
UTF-8
2,321
2.78125
3
[]
no_license
#ifndef _ROBOT_SCENE_MANAGER_H #define _ROBOT_SCENE_MANAGER_H #include "./DisplayKernel/OgreApplications/SimulationManager.h" class RobotSimulationManager: public SimulationManager{ Ogre::Entity *e; Ogre::AnimationState* mAnimationState; public: std::vector<Ogre::AnimationState*> animations; RobotSimulationManager...
true
a0d2d38795272380a07fd6cb7f1535f5fc8530aa
C++
Manny500/Sample-Code
/Cloud11Gaming-Alpha/VelocityEngine/StructuralCore/AccessOverride.cpp
UTF-8
1,703
3.4375
3
[]
no_license
#include "AccessOverride.h" /** * @brief AccessOverride::AccessOverride */ AccessOverride::AccessOverride(){ this->extraAccesses = new std::vector<Accessible*>; } AccessOverride::~AccessOverride(){ removeAllExtraAccesses(); delete this->extraAccesses; this->playerAccess = NULL; this->player...
true
3b09310a2c9bc99bc3e1699bf8b7f0b53593d89c
C++
dendibakh/Algorithm-Tasks
/Coursera class/Coursera Assignments/Seam Carving/Seam Carving/Seam Carving.cpp
UTF-8
3,280
2.953125
3
[]
no_license
#include "Seam Carving.h" #include <limits> pixelsEnergy calcPixelsEnergy(const PicturePixels& pixels) { pixelsEnergy pixEnergy(pixels.size(), std::vector<int>(pixels[0].size(), 0)); int height = static_cast<int>(pixels.size()); int width = static_cast<int>(pixels[0].size()); for (int i = 0; i < height; ++...
true
16bcc228cd90075504ab2110049b6e82093777bb
C++
andonghun/portfolio
/SW Expert Academy/swea_6/1249_안동훈.cpp
UTF-8
1,270
2.546875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int N; int mmap[102][102]; int hour[102][102]; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; void bfs(int x, int y){ queue<pair<int, int>> q; q.push({x, y}); hour[1][1] = 0; while(!q.empty()){ auto cur = q.front(); q.pop(); ...
true
6b38471e7d561cff436dae69171cf966cc42d8f4
C++
k2-fsa/k2
/k2/python/csrc/torch/v2/doc/any.h
UTF-8
61,192
2.671875
3
[ "Apache-2.0" ]
permissive
/** * @copyright * Copyright 2021 Xiaomi Corp. (authors: Fangjun Kuang) * * @copyright * See LICENSE for clarification regarding multiple authors * * 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...
true
b52817a6c3118ffdc2230966de90439f5bea6ec4
C++
tgrochow/scene
/source/graphic_exception.cpp
UTF-8
480
3.171875
3
[]
no_license
#include "../include/graphic_exception.hpp" namespace graphic { // default constructor Graphic_exception::Graphic_exception() : message_(std::string("no error message defined")) {} // user constructor Graphic_exception::Graphic_exception(std::string const& message) : message_(message) {} // destructor Gra...
true