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
996f9d18c37f3fa0dc3a4563eaf04bcbf4859cf4
C++
rselvanathan/star_rage
/SRC/Quaternion.cpp
UTF-8
13,892
3.546875
4
[]
no_license
/* This class represents a Quaternion which can be used for rotations. Author : Romesh Selvanathan Date : 03/05/12 References : dhpoware. (2012). OpenGL Third Person Camera Demo. [online]. Available at: <http://www.dhpoware.com/demos/glThirdPersonCamera2.html.>[Accessed: 21 December 2011]. Fletcher, D and Parberr...
true
d7897f686b13cc30f04cc4feb53871bfedb048dc
C++
randevlper/Memory
/Memory/05-File IO/main.cpp
UTF-8
3,248
3.15625
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <random> #include <chrono> void closed(); void open(); int printFile(std::string file); bool isRunning = true; int main() { srand(time(0)); //closed(); open(); //ask if they want another file system("pause"); return 0; } void closed() { //A...
true
db2535c68ae6ab486fd343847750e3f3fb9b92a5
C++
Ohohcakester/Simplex
/fraction.h
UTF-8
1,239
2.890625
3
[]
no_license
#ifndef FRACTION_H #define FRACTION_H #include <string> using namespace std; struct Fraction { int n, d; Fraction(); Fraction(int n, int d); Fraction(int n); Fraction (const Fraction &o); void init(int n, int d); int gcd(int a, int b); float toFloat(); string t...
true
eb1b645f8594064c140ba99a612fd00af8dda175
C++
ailyanlu1/Programming-Challenges
/leetcode/Combination Sum II.cpp
UTF-8
1,087
2.921875
3
[]
no_license
class Solution { public: vector<vector<int> > combinationSum2(vector<int> &num, int target) { // Note: The Solution object is instantiated only once and is reused by each test case. vector<int> cur_ans; vector< vector<int> > result; set< vector<int> > visited; sort( num.begin...
true
730390fcb5480d7fa10e4d2f57139d55c27b836b
C++
duonghau/abncounting
/cpp/AlignmentRecord.cpp
UTF-8
5,467
2.609375
3
[]
no_license
#include "AlignmentRecord.h" using namespace std; // isdigit() AlignmentRecord::AlignmentRecord(){}; AlignmentRecord::~AlignmentRecord(){}; AlignmentRecord::AlignmentRecord(const string & record_raw, bool lite){ std::vector<string> tokens=stringSplit(record_raw); qname=tokens[0]; flag=atoi(tokens[1].c_str()...
true
4ce49acb886beba68d63b92146d55735e4a0a1a4
C++
henrywoo/ultraie
/client/uutoolbar/src/lib/6beebase/guard.h
UTF-8
1,938
2.53125
3
[]
no_license
// UltraIE - Yet Another IE Add-on // Copyright (C) 2006-2010 // Simon Wu Fuheng (simonwoo2000 AT gmail.com), Singapore // Homepage: http://www.linkedin.com/in/simonwoo // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published ...
true
64edf588438fc192c9ce04210b1a992533b55519
C++
shivral/cf
/0300/80/381a.cpp
UTF-8
772
3.375
3
[ "Unlicense" ]
permissive
#include <iostream> #include <vector> template <typename T> std::istream& operator >>(std::istream& input, std::vector<T>& v) { for (T& a : v) input >> a; return input; } void answer(unsigned x, unsigned y) { std::cout << x << ' ' << y << '\n'; } void solve(const std::vector<unsigned>& a) { ...
true
d3b0dc6ee9e775dff4c8356462edd34941d37828
C++
jcrowe6/wiki_graph
/Vertex.h
UTF-8
592
2.859375
3
[]
no_license
#pragma once #include <vector> #include <string> #include <iostream> #include <vector> #include <list> class Vertex { public: std::list<int> categories; // categories the article is in (yes there are multiple apparently) std::string name; // article name int id; std::list<int> neigh...
true
851046f30766f2e855ac6d992ad2672c75557c5c
C++
txfyxzzy/dev
/c/zlib/test.cc
UTF-8
900
3.15625
3
[]
no_license
#include <stdlib.h> #include <string.h> #include <stdio.h> #include <zlib.h> int main(int argc, char* argv[]) { char text[] = "zlib compress and uncompress test\nturingo@163.com\n2012-11-05\n"; uLong tlen = strlen(text) + 1; /* 需要把字符串的结束符'\0'也一并处理 */ char* buf = NULL; uLong blen; /* 计算缓冲区大小,并为其分配内存 */ blen = co...
true
d6a8f42c6840c2d6ca8b5674c38713fb0bfffd74
C++
Intiser/ProblemSolvingAndContest
/UvaOnlineJudge/12917.cpp
UTF-8
249
2.578125
3
[]
no_license
#include<iostream> #include<stdio.h> using namespace std; int main(){ int p,n,o; while(cin>>p>>n>>o){ if(n>(o-p)){ printf("Hunters win!\n"); } else{ printf("Props win!\n"); } } }
true
33a9ac0f0ea1ed2d6a352c41e6346abc6289189d
C++
luyiming112233/PatCodeRepo
/PatCodeRepo/PatAdv/A1014.cpp
GB18030
1,479
2.71875
3
[]
no_license
#include<cstdio> #include<queue> using namespace std; #define maxn 1010 int N, M, K, Q, a[maxn] = { 0 }; struct wait_queue { int time; queue<int> q; }wqs[20]; int time2num(int hh, int mm) { return hh * 60 + mm; } void print_time(int num,int num2) { if (num >= 1020) { printf("Sorry\n"); } else { int hh, m...
true
cc0388863b8f967b6df896296ceacbb6eb6e1b65
C++
Irwin1985/cppmonkey
/main/environment.hpp
UTF-8
509
2.84375
3
[ "Apache-2.0" ]
permissive
#if !defined(ENVIRONMENT_H) #define ENVIRONMENT_H #include <string> #include <memory> #include <unordered_map> #include "object.hpp" class Environment { public: Environment(): store{} {}; Environment(std::shared_ptr<Environment> outer): store{}, parent{outer} {}; virtual ~Environment() = default; Obj...
true
e543528f6786e60c078b586e9db1f164fe2487d1
C++
adityaemaulana/cp-training
/UVA/Graph/1103 - Ancient Messages.cpp
UTF-8
3,068
3.015625
3
[]
no_license
#include <vector> #include <iostream> #include <string> #include <algorithm> using namespace std; typedef vector<char> vc; vector<vc> grid; vc hieroglyph{'W', 'A', 'K', 'J', 'S', 'D'}; vector<string> hextobin{"0000","0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110", "11...
true
6858807e2817d1b955fc26736ba293b2434f7583
C++
onesmash/WukongBase
/base/thread/Thread.cpp
UTF-8
2,080
2.578125
3
[]
no_license
// // Thread.cpp // AppCore // // Created by Xuhui on 15/5/10. // Copyright (c) 2015年 Xuhui. All rights reserved. // #include "base/thread/Thread.h" #include "base/message_loop//Time.h" #include "base/message_loop/MessageLoop.h" namespace WukongBase { namespace Base { static uv_key_t threadLocalStorageKey; ...
true
1ad3411eec8bd036e52a074e0a8a48d7b1723646
C++
floura-angel/onemoredb-1
/BigQ.cc
UTF-8
4,474
2.828125
3
[]
no_license
#include <climits> #include <unistd.h> #include <cstring> #include "BigQ.h" using namespace std; char tempFilePath[PATH_MAX]; BigQ::BigQ(Pipe &in, Pipe &out, OrderMaker &orderMaker, int runlen1) { inPipe = &in; outPipe = &out; runlen = runlen1; maker = &orderMaker; pthread_create(&worker_thread, ...
true
27e6eff09ba514a975d43c6c9311941bcf09ebb2
C++
tc-imba/VE475
/challenges/c2/cipher2/byte.cpp
UTF-8
1,333
3
3
[]
no_license
// // Created by liu on 17-7-3. // #include "byte.h" #include <iostream> #include <ctime> using namespace std; std::vector<uint8_t> byte_encode(const std::string &str) { vector<uint8_t> bytes; for (int i = 0; i < str.length(); i++) { bytes.push_back(alphabet_rev[str[i]]); } // for (auto &i...
true
f78a1e4d3eb18d139b4b849fe0e249c57b494c82
C++
Leocodefocus/project
/Cplusplus/Chapter_3/BagInterface.h
UTF-8
1,947
3.625
4
[]
no_license
#ifndef _BAG_INTERFACE #define _BAG_INTERFACE #include <vector> using namespace std; template<class ItemType> class BagInterface { public: /** Gets the current number of entries in this bag. @return The integer number of entries currently in the bag */ virtual int getCurrentSize() const=0; /**Adds a new entry t...
true
25a0b1eeb7c196b423ce525a0584b9aefd7ef956
C++
quantumhara/cpp_ex
/cp0058.cpp
UTF-8
342
2.890625
3
[]
no_license
#include <iostream> using namespace std; void sub(); int g = 100; int main() { int a = 200; cout << "g=" << g << '\n'; cout << "a=" << a << '\n'; sub(); return 0; } void sub() { int b = 300; cout << "g=" << g << '\n'; cout << "a is not defined in this function" << '\n'; cout <...
true
9e57b12b44eb14afca02d32434c9fcc95e88338c
C++
liwei86521/c_plus_base_pro
/15_extend_3.cpp
UTF-8
1,660
3.546875
4
[]
no_license
#include <iostream> #include <cstring> #include <stdio.h> /* 谈谈你对重写,重载理解 函数重载 Overload: 必须在同一个类中进行 在一个类中,同名的方法如果有不同的参数列表(参数类型不同、参数个数不同甚至是参数顺序不同)则视为重载 重载的时候,返回值类型可以相同也可以不相同 函数重写 Override: 必须发生于父类与子类之间(继承) 子类 在方法名,参数列表,返回类型都相同的情况下, 对方法体进行修改或重写,这就是重写 使用virtual声明之后能够产生多态(如果不使用v...
true
ba66312f34af0856343e8fba381d72ef252d213d
C++
berglindduna/Data-Structure
/Palindrome/main.cpp
UTF-8
466
3.09375
3
[]
no_license
#include <iostream> #include <cstring> #include "palindrome.h" using namespace std; // Tests int main() { char a[] = "abcdcba"; char b[] = "1221"; char c[] = "ablab"; if (palindrome(a, 0, strlen(a)-1)) cout << a << " is a palindrome" << endl; if (palindrome(b, 0, strlen(b)-1)) c...
true
40702b6737f54145453803d4a8322a36aee88edf
C++
night0205/zorejudge
/e623.cpp
UTF-8
323
2.9375
3
[]
no_license
//e623: PPAP #include<iostream> #include<string> using namespace std; main(){ string ans[4] = {"Pen","Pineapple","Apple","Pineapple pen"}; int n; cin >> n; int a = 0; int te = 0; while(te<n){ a++; for(int i=0;i<4;i++){ te += a; if(te>=n){ a = i; n = 0; break; } } } cout << ans[a]; ...
true
345b22927d81f9893f28da8aa0f20994bfd9a1b1
C++
nandiniramakrishnan/xnor-net-ios
/xnor/xnor/Convolution.cpp
UTF-8
4,831
2.625
3
[]
no_license
// // Convolution.cpp // xnor // // Created by Nandini Ramakrishnan on 29/04/17. // Copyright © 2017 Shalini Ramakrishnan. All rights reserved. // #include "Convolution.hpp" #include "im2col.hpp" #include <arm_neon.h> Convolution::Convolution(int k,int stride, int c, int pad, int group, int num) { this->k = 5...
true
68f01f61493fb3463957bdafe55dfd5c637949b6
C++
andresusanopinto/novelty-detection-thesis
/novelty-gm/synthetic/single-factor.cc
UTF-8
16,056
2.625
3
[]
no_license
/** * Novelty Detection Scripts * * Copyright 2011: André Susano Pinto * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later ...
true
cbd53034a6afb4ce9c4fd4df780fc81a85ba6a0f
C++
pathakaditya6/Competitive-Programming
/HackerRank/2D-ArrayDS.cpp
UTF-8
2,080
2.71875
3
[]
no_license
// In the name of Aadi Shakti // We are nothing and You are everything // Jai Mata Di #include <bits/stdc++.h> using namespace std; int main() { int res[16] ; int arr[6][6] ; for(int i = 0 ; i < 6 ; i++) { for(int j = 0 ; j < 6 ; j++) { cin >> arr[i][j]; } } ...
true
691cae6e66a17c9bf9c90de0b14cbc8883bc9639
C++
SantiagoBarbosaNieto/Intro_IA
/Proyecto3_InferenciaBayesiana/src/Dato.h
UTF-8
311
2.5625
3
[]
no_license
#pragma once #include <iostream> #include <map> using namespace std; class Dato { private: map<string, string> valores; public: Dato(); ~Dato(); string buscarDato(string col); void ingresarDato(string col, string dato); void imprimirValores(); map<string, string> darValores(); int tam(); };
true
ae10de00d32fa3fd149229a876be42ab3e9ecb5f
C++
MorrigansWings/GamePhysics
/Katamari/Katamari Game/PhysicsEngine/PhysicsManager.cpp
UTF-8
10,207
2.546875
3
[ "Apache-2.0" ]
permissive
#include "PhysicsManager.h" #include <iostream> #include "ForceGenerators/ParticleForceGenerator.h" #include "ForceGenerators/GravityForceGenerator.h" #include "ForceGenerators/SpringForceGenerator.h" #include "Collision/ParticleContact.h" #include "Collision/ParticleContactGenerator.h" #include "Collision/GroundCont...
true
05dba1f7fe54330215fbd9ffc8bde4adcd4e31b4
C++
currently1/option_pricer
/Option_Pricer.h
UTF-8
2,975
2.546875
3
[]
no_license
#include "Lin_Algebra.h" class pricer { public: virtual double get_price(); double(*forward_func)(double); double(*vol_func)(double, double); double(*payoff_func)(double); double(*discount_func)(double); double expire_time; }; class pde_pricer : public pricer { /* S(t) = F(t)exp(x(t)) dx = -0....
true
e70d6862f326b0847e891e5caf1a20d551a33eb8
C++
TracyBaraza/Arduino
/Arduino_exercise/Arduino_exercise.ino
UTF-8
1,128
2.8125
3
[]
no_license
int REDLED=4; int GREENLED=2; int blinknumberREDLED=5; int blinknumberGREENLED=6; void setup() { Serial.begin(9600); pinMode (REDLED,OUTPUT); pinMode (GREENLED,OUTPUT); Serial.println("This is my first program"); Serial.printl...
true
677997941e89c0ea5c27d2b1eb8b60a489e9d2a6
C++
her-cat/meow-cpp
/src/coroutine/context.cc
UTF-8
1,615
2.890625
3
[ "MIT" ]
permissive
#include <iostream> #include "context.h" #include "meow.h" #include "log.h" using meow::Context; Context::Context(size_t stack_size, coroutine_function_t fn, void *private_data) : stack_size_(stack_size), fn_(fn), private_data_(private_data) { swap_ctx_ = nullptr; try { /* 创建一个 C...
true
d05d00455481a261194c99d90459bbb93817695a
C++
blxckdog7702/algorithm
/vsAlgorithm/Algorithm/Algorithm/QuickSort.cpp
UHC
1,395
3.359375
3
[]
no_license
//#include<string> //#include<iostream> // //using namespace std; // //void quicksort(int low, int high, int s[]); //void partition(int low, int high, int& pivot, int s[]); // //int main() //{ // int s[50] = {0}; // int low, high; // int i, n; // // cout << "Է ?" << endl; // cin >> n; // // while (n < 0 || n > 50) { //...
true
5d7f2a0edfd1d03ba19411bc9a445bd2ddb9c333
C++
mluna030/Last-of-the-labs
/lab26.cpp
UTF-8
1,149
3.71875
4
[]
no_license
#include <iostream> using namespace std; const int ARR_SIZE = 10; void bSort(double ar[]); int main() { double nums[ARR_SIZE]; for(int i =0; i < ARR_SIZE; i++) { cout << "Enter value " << i+1 << " of " << ARR_SIZE << " to be sorted: "; cin >> nums[i]; cout << endl; ...
true
eeaf1beb3242336f82c98f6e22f4e019cf8dff96
C++
mingyuefly/leetcode
/leetcode/prune/Sudoku Solver37/Sudoku Solver/Sudoku Solver/main.cpp
UTF-8
4,692
3.59375
4
[ "MIT" ]
permissive
// // main.cpp // Sudoku Solver // /** Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Each of the digits 1-9 must occur exactly once in each row. Each of the digits 1-9 must occur exactly once in each column. Each of the digits 1-...
true
2bd37c786923d93743857119db52b2d5667e0071
C++
contacoonta/sgap-ccpp
/008 함수 function/001 function/main.cpp
UTF-8
797
3.609375
4
[]
no_license
/* 함수 function - main 함수에 집중된 코드를 분산. - 함수로 만든 코드를 재사용. y = f ( x ) int main( ) 1. 함수의 필요성 알아야.. 2. 함수를 정의.. 3. 함수를 선언.. */ #include <stdio.h> // 3. add 함수의 선언 int add(int a, int b); int div(int a, int b); void show(int k); void main() { int nA = 3, nB = 7; int nC = nA + nB; // 1. add 함수의 필요성. nC ...
true
7a76ccadc1a214e036701ca1d80cddfa7b2a4a67
C++
Midren/graphical_edtior
/newscenedialog.cpp
UTF-8
1,150
2.546875
3
[]
no_license
#include "newscenedialog.h" NewSceneDialog::NewSceneDialog() { QGridLayout *layout = new QGridLayout; QLabel *heightLabel = new QLabel(tr("Height of scene: ")); QLabel *widthLabel = new QLabel(tr("Width of scene: ")); heightEdit = new QLineEdit(tr("300")); widthEdit = new QLineEdit(tr("300")); ...
true
a428960b778668f330fea027c799ef1585c37820
C++
smrnjeet222/DS-Algo
/Algo_Coursera-Specialization/AlgoToolbox/week5_dynamic_programming1/1_money_change_again/change_dp.cpp
UTF-8
896
3.28125
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> using namespace std; int get_change_recursive(int m) { //write your code here if (m <= 0) return 0; int one = (m >= 1) ? get_change_recursive(m - 1) + 1 : 9999; int three = (m >= 3) ? get_change_recursive(m - 3) + 1 : 9999; int four = (m >...
true
faeb188e81e6d25b91fb50461ec8f2493da966e3
C++
highstar97/Programmers_all_questions
/Summer_Winter_Coding_untill_2018/number_game.cpp
UTF-8
539
3.390625
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> int solution(std::vector<int> A, std::vector<int> B) { int i=0,j=0; int answer = 0; sort(A.begin(),A.end()); sort(B.begin(),B.end()); for(; i<A.size(); i++){ for(j; j<B.size(); j++){ if(A[i] < B[j]){ j++;...
true
b7a2bf846d4899f62092a7aa1a7ca9d5b22a0ac9
C++
karansonawane/CPP_Tutorial
/prac.cpp
UTF-8
1,398
4.15625
4
[]
no_license
// Assignment operators are : // #include<iostream> // using namespace std; // int main() // { // int a = 3, b=4; // cout<<"The value of assignment operator a+b is: "<<a+b<<endl; // cout<<"The value of assignment operator a-b is: "<<a-b <<endl; // cout<<"The value of assignment operator a/b is: "<<...
true
1fea6b6b83bcd5726fd39c462c863427f246b0ff
C++
ChallengerCY/C-Base
/Chapter5/compstr1.cpp
UTF-8
944
3.828125
4
[]
no_license
// // Created by cy on 2020/1/1. // #include <iostream> #include <cstring> int main() { using namespace std; char word[5]="?ate"; for (char ch = 'a'; strcmp(word,"mate"); ch++) { cout<<word<<endl; word[0]=ch; } cout<<"After loop ends,word is "<<word<<endl; return 0; } /**本段代码小...
true
d2e0127ce262d4a79134c8b0d470b1269b828a20
C++
mrdrivingduck/leet-code
/338.CountingBits.cpp
UTF-8
1,824
3.71875
4
[ "MIT" ]
permissive
/** * @author Mr Dk. * @version 2021/03/03 */ /* Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array. Example 1: Input: 2 Output: [0,1,1] Example 2: ...
true
65d972a45abdff2b45c53cd6dd455aa637f08c9e
C++
AK-Reid/Mobile-Data-Collector
/Master_Code_Due.ino
UTF-8
25,042
2.515625
3
[]
no_license
//Including gfx & touchscreen libraries #include <Adafruit_GFX.h> #include <MCUFRIEND_kbv.h> #include <TouchScreen.h> //Defining the display MCUFRIEND_kbv tft; //Pressure threshholds #define MINPRESSURE 200 #define MAXPRESSURE 1000 // I2C_Anything from : http://www.gammon.com.au/i2c //Important library, this handl...
true
9642c8696eaec4ab9c54b18023f825fe3bf764f7
C++
hchen106/Appointment_System
/Appointment_System/src/controller/LoginUIController.cpp
UTF-8
3,549
2.609375
3
[]
no_license
#include "controller.h" #include "src/model/tcpConnection.h" #include <iostream> using namespace boost::asio; Controller::LoginUIController::LoginUIController(std::string IP , int PORT, boost::asio::io_service& io_service, boost::asio::ssl::context& context) : io_service_(io_service), socket_(io_service_), tcp...
true
6b310d6da295817aab72e5d14dd87a5688d00a0c
C++
MaSteve/UVA-problems
/UVA11185.cpp
UTF-8
385
2.953125
3
[ "MIT" ]
permissive
#include <iostream> #include <stack> using namespace std; int main() { int n; stack<char> s; while (cin >> n && n >= 0) { while (n >= 3) { s.push(n%3 + '0'); n /= 3; } s.push(n + '0'); while (!s.empty()) { printf("%c", s.top()); ...
true
dccedacb2a6d7d7658edef9a6e2536bb6794f233
C++
sos0911/PS_Cpluslplus
/Cppcont/src/CPP_Src/Chapter 16 source/DynamicPolymorphicCasting.cpp
UTF-8
324
3.140625
3
[]
no_license
#include <iostream> using namespace std; class AAA { public: virtual void ShowSimple() { cout<<"AAA"<<endl; } }; class BBB: public AAA { public: void ShowSimple() { cout<<"BBB"<<endl; } }; int main(void) { AAA * ptr1 = new BBB; BBB * ptr2 = dynamic_cast<BBB*>(ptr1); return 0...
true
261b9c79617be294f403df5dfe5f3ba3f7bb1241
C++
tslothorst/Learning-Cpp
/Section9/SumofOddInts/SumofOddInts/main.cpp
UTF-8
231
2.90625
3
[ "MIT" ]
permissive
#include "main.h" #include<iostream> using namespace std; int main() { int sum{}; for (int i = 0; i <= 15; ++i) { if (i % 2 > 0) { cout << i << endl; sum += i; } } cout << "sum is: " << sum << endl; return 0; }
true
fa0803acc24b8375461e30dfadbae5e65aa8369c
C++
Jasper-Shi/Milestone-oop345
/ms3/ms3/order.cpp
UTF-8
2,553
3.328125
3
[]
no_license
#include <iostream> #include <fstream> #include <vector> #include <string> #include "util.h" using namespace std; class Order { string orderCustomer, orderProduct; vector<string> itemList; public: Order(vector<string> row) { if (row.size() < 3) { throw std::string("Expected 3 or more fields, found ") + std...
true
1937b20322193898c0eee0a9898e5adb69cc1623
C++
DIC3BlOCK/POO_Devoir-2
/LigueHockeyApp.cpp
UTF-8
6,453
2.796875
3
[]
no_license
/*---------------------------------------------------------------------*/ /* FICHIER: LigueHockeyApp.cpp */ /* */ /* AUTEUR(S): Thomas Bergeron, Alex Roberge */ /* ...
true
dcf5ea084b9e9488c7d32c6c1684c4ba260be57a
C++
lineCode/ABx
/abserv/abserv/CollisionComp.h
UTF-8
553
2.90625
3
[]
no_license
#pragma once namespace Game { class Actor; namespace Components { /// Only an Actor can have a CollisionComp, because only moving objects need it. class CollisionComp { private: Actor& owner_; public: CollisionComp() = delete; explicit CollisionComp(Actor& owner) : owner_(owner) { } // n...
true
d8522ab7fd47abfe0d75a944c0b2058db68f6f81
C++
RodrigoHolztrattner/Wonderland
/Wonderland/Wonderland/Source/Engine/Wonderland.cpp
ISO-8859-1
11,407
2.515625
3
[ "MIT" ]
permissive
// Wonderland.cpp : Defines the entry point for the console application. // #define GLFW_INCLUDE_VULKAN //#include <pthread.h> // #include "SystemClass.h" #include <fstream> #include <iterator> #include <algorithm> #include <map> #define GLM_FORCE_RADIANS #define GLM_FORCE_DEPTH_ZERO_TO_ONE #include <glm/vec4.hpp>...
true
2bbc66864c7ea13cdd2fcf90a7865a7d075a9ce2
C++
UnendingGlory/Cplusplus_Primer
/ch15/15_28.h
UTF-8
4,168
3.765625
4
[]
no_license
// define the Quote and Bulk_quote copy-control members #ifndef CH_15_28_H #define CH_15_28_H #include <string> #include <iostream> using std::string; class Quote { private: std::string bookNo; protected: // 允许派生类访问 double price = 0.0; public: Quote() { std::cout << "Quote : default constructing\n"; }...
true
86fc6d666f8b220f84d730fdddd3e441a2bc51da
C++
Jackiebibili/my_projects
/Arithmetic_OverFlowed/Node.h
UTF-8
424
3.1875
3
[]
no_license
#ifndef NODE_H #define NODE_H #include<iostream> #include<cstdlib> class Node { private: int num = 0; int loc = 0; Node* next = nullptr; public: Node(); //default constructor Node(int num); //overloading constructor Node(int pos, int num); Node(const Node& right); int getNum() const; int getPos() const; Node...
true
cbf2ee8e23d4e3c922810fae672ae09afda087a4
C++
magicLeeFeng/HiveRender
/Hive/Hive/Math/ARPoint.h
WINDOWS-1252
730
2.515625
3
[]
no_license
/************************************************************************/ /* */ /************************************************************************/ #pragma once class ARVector3; class ARPoint { public: ARPoint(void); ~ARPoint(void); ARPo...
true
ca2413204c3845d00c3c0a1e20a121c6fb5b8b20
C++
namichie/CSI2372
/Project/Cardnanza/Deck.h
UTF-8
502
2.875
3
[]
no_license
#ifndef DECK_H #define DECK_H #include <istream> #include <vector> #include "Card.h" using namespace std; class CardFactory; class Deck { public: Deck() = default; Deck(istream & in, const CardFactory * cardFactory); static Deck randomizedDeck(CardFactory * cardFactory); bool isEmpty(); C...
true
3463fcf20ee2945bbef250da92712fd5bacab74c
C++
yangyanzhe/GeometryManipulation
/src/PolygenPainter/paint.cpp
UTF-8
15,991
2.640625
3
[]
no_license
#include "paint.h" #include <windows.h> #include <winuser.h> #include <wingdi.h> #include <QDebug> #include <cmath> #include <stack> Paint::Paint() { frontColor = RGB(255, 127, 39); backColor = RGB(255, 255, 255); lineWidth = 2; range = 6; isDrawing = false; direction = true; withInnerCircl...
true
c4e8868d29567545010a57c51713c5753ce8ca83
C++
SarahFDAK/CS201
/Labs/lab26/lab26/lambdas_main.cpp
UTF-8
2,153
3.578125
4
[]
no_license
/** * @file lambdas.hpp * @author Student Name * @date Mar 21, 2019 * John Quan * * Practice using lambda functions */ #include <cstdlib> #include <iostream> #include <algorithm> #include <iterator> #include <utility> #include <vector> #include <string> #include "lambdas.hpp" int main() { // TODO:...
true
b0ebc345606611bb8b9dc5c1e402abab0b208b74
C++
MIPT-ILab/mipt-mips-old-branches
/akochetygov_task_2/func_sim/func_memory/func_memory.cpp
UTF-8
1,951
2.859375
3
[ "MIT" ]
permissive
/** * func_memory.cpp - the module implementing the concept of * programer-visible memory space accesing via memory address. * @author Alexander Titov <alexander.igorevich.titov@gmail.com> * Copyright 2012 uArchSim iLab project */ // Generic C #include <cassert> #include <cstdlib> // Generic C++ #include <string...
true
6b34b8329adf5b74c1fc186e18f190c1c62a63cd
C++
hiren505/studentRegSystem
/school_func.cpp
UTF-8
7,936
3.65625
4
[]
no_license
#include <iostream> #include <fstream> #include <iomanip> #include "school.h" using namespace std; /* This is a member function of school class. This function basically takes the parameters from the keyboard and stores in the school object */ void school::input_student_data() { cout<<"\nEnter Student ID: "; ...
true
9856e40e5d6059e0e8133623369c7411203f720a
C++
OverMe/lulzKey
/include/Memory.h
UTF-8
381
2.921875
3
[]
no_license
/** * @file Memory.h * * @brief Memory management namespace. */ #include <Type.h> namespace Memory { void* alloc (Type::ulong size); void* free (void* pointer); } // Kernel space new's void* operator new (Type::ulong size); void* operator new[] (Type::ulong size) // Kernel space delete's void operator d...
true
a68c33ad054cd9454c508958f0e68ec8bd9e5cad
C++
albertium/GridPricing
/Options.h
UTF-8
1,044
2.515625
3
[]
no_license
// // Created by Albert Wong on 3/23/18. // #ifndef HULLWHITE_OPTIONS_H #define HULLWHITE_OPTIONS_H #include "PricerHelper.h" #include "DiffusionPDE.h" #include "GridPricer.h" #include "Curve.h" #include <cmath> #include <algorithm> #include <iomanip> class Options { protected: double m_price; public: exp...
true
49b8eead4dbf0fd9866a2c62907594eb9742fae0
C++
kajyuuen/cpp-intro-practice
/src/008/for01.cpp
UTF-8
199
2.65625
3
[]
no_license
int main() { // for ( 変数の宣言 ; 終了条件の確認 ; 各ループの最後に必ず行う処理 ) 文 for( int i = 1; i <= 100; ++i ) { std::cout << i << " "s ; } }
true
20e18a8a550c017505731bff08f045efeeffa532
C++
SixtyOne61/Hub_Spacel
/Hub_Spacel/Source/Hub_Spacel/Public/Noise/SpacelNoise.h
UTF-8
982
2.640625
3
[]
no_license
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" /** * */ class HUB_SPACEL_API SpacelNoise { private: struct Grad { Grad(double _x, double _y, double _z) : m_x(_x) , m_y(_y) , m_z(_z) , m_w(0) {} double m_x; double m_y; d...
true
d9d1152601643153e8e57d6551daa7536f1d2908
C++
mrabets/cpp-course
/template-inheritance/Monoblock.h
UTF-8
835
2.703125
3
[ "MIT" ]
permissive
#pragma once #include "Stationary.h" class Monoblock : public Stationary { public: Monoblock(); Monoblock(string standColour, int powerSupply, string model); Monoblock(const Monoblock& object); ~Monoblock(); string getStandColour() const; void setStandColour(string standColour); friend bool operator<(const Mon...
true
c2777256d43bf4ff7192fa47751db7b93714a7d8
C++
madaan/funcs
/hello.cpp
UTF-8
310
2.78125
3
[]
no_license
//sg #include<iostream> #define INF 100000; using namespace std; int add(int a, int b) { return a + b; } int div(int a, int b) { if (b != 0){ return a / b; } else return INF; } int mul (int a, int b) { // multiplies two nmbrs { return a*b; } int main() { cout << "Hi"; return 0; }
true
fb04e6b148ec139d6ac21ce2ef6e49a9058736bc
C++
eparu/TronGame
/Client/Client/main.cpp
UTF-8
7,874
2.9375
3
[]
no_license
#include <SFML/Graphics.hpp> #include <random> #include <iostream> #include <utility> #include <vector> #include <chrono> #include <thread> #include <boost/asio.hpp> using namespace sf; constexpr int W = 600; constexpr int H = 480; constexpr int speed = 1; class Field { public: Field() { cells.assig...
true
5f4484339021599c4a6ed935e91cea562dc3b921
C++
asimonov/CarND3-P1-Path-Planning
/src/Car.cpp
UTF-8
7,632
2.828125
3
[]
no_license
// // Created by Alexey Simonov on 05/08/2017. // #include "Car.h" #include <math.h> #include <cassert> #include "helpers.h" #include <fstream> #include <ios> using namespace std; Car::Car(int id, double x, double y, double yaw, double s, double d, int lane, double speed, double a...
true
040685bd81a94b909460645983c04bd09057454f
C++
HerculesShek/cpp-practise
/src/ch6/basic/demo02.cc
UTF-8
340
3.578125
4
[ "MIT" ]
permissive
#include <iostream> using namespace std; int fact(int val) { int res = 1; while(val > 1) res *= val--; return res; } int fabi(int i) { if(i<=2) return 1; return fabi(i-1) + fabi(i-2); } int main() { int res = fact(5); cout << "5! is " << res << endl; cout << "the 5th fabi num is " << fabi(5) << ...
true
e2d234c4a1503c17ecb229d6514e2974fce8cacb
C++
iRoy7/Strings_Handling
/ex_string_pattern_match.cpp
UTF-8
956
2.671875
3
[]
no_license
#include "stdafx.h" #include <stdio.h> const int SMAX = 256; static int brute_force(const char* ptn, const char* src, int pln, int sln) { // base case: if (sln < pln) return 0; // general case: int ptn_cnt = 0; int pidx = 0; int sidx = 0; while (pidx < pln && sidx < sln) { if (src[sidx]...
true
d33858498d894378e239ed53c5750d156dfadd5b
C++
Neriok/Stella
/Source/Collections/Array.h
UTF-8
4,800
3.34375
3
[]
no_license
#pragma once #include "Typedef.h" #include "IIterable.h" #include <initializer_list> namespace Stella::Collections { template <class T, Size N> class Array : public IIterable<T> { /*----------------------------------------------------------------------- Fields ----------------...
true
4871c1a6558e5c92681fba3d8702c0590b740d7a
C++
Anubhav12345678/competitive-programming
/UNITGCDAPRILLONGCODECHEFVVVVVVIMP.cpp
UTF-8
1,113
3.203125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; template<typename T = int> vector<T> create(size_t n){ return vector<T>(n); } template<typename T, typename... Args> auto create(size_t n, Args... args){ return vector<decltype(create<T>(args...))>(n, create<T>(args...)); } int main(){ ios::sync_with_stdio(false); cin.tie...
true
a880906593fecf48d21a11f969b05db6d01cfc96
C++
PrikhodkoStanislav/HomeWork
/I semester/HomeWork8/Zadacha1 hash table/Zadacha1 hash/hash.h
UTF-8
607
2.875
3
[]
no_license
#pragma once #include "list.h" using namespace list; namespace hash { struct HashTable; // create new hashtable HashTable *createHashTable(); // delete hashtable void deleteHashTable(HashTable *hashTable); // insert to hashtable new element void insertToHashTable(HashTable *hashTable, ElementType newElement); // Is e...
true
b0e3d5612d1ae32b6066801bf07dce659e62a0e8
C++
bsmsnd/LeetCode-CharlieChen
/269.alien-dictionary.cpp
UTF-8
2,869
3.09375
3
[ "MIT" ]
permissive
/* * @lc app=leetcode id=269 lang=cpp * * [269] Alien Dictionary */ #include <iostream> #include <string> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; class Solution { public: unordered_map<char, unordered_set<char>> m; unordered_map<char, char> parent; unor...
true
514ced355d74288c866731a4619d5a809eed060f
C++
karencaro/Visualizacion2D
/ViewPipeline.h
UTF-8
700
2.796875
3
[]
no_license
#pragma once class ViewPipeline { CRect w; //ventana (el area que se quiere desplegar) CRect vp;//Puerto de vista (viewport) //(En que parte del dispositivo se va a //desplegar) float sx,sy; //factores de escalamiento ventana/viewport public: ViewPipeline(void); ~ViewPipeline(void); void Se...
true
c7cc6770e498bf923c03f8831c23378b5f4737e1
C++
AllenXL/algorithm
/Merge Two Sorted Lists/Merge Two Sorted Lists/main.cpp
WINDOWS-1252
919
3.828125
4
[]
no_license
#include <iostream> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x) : val(x), next(NULL) {} }; //ݹ ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { if (l1 == NULL) return l2; if (l2 == NULL) return l1; ListNode* res; if (l1->val < l2->val) { res = l1; l1->next = mer...
true
0ea3bdd0c0fc2d42105c5d281c8fc1150fb5b7bd
C++
The-Assembly/Arduino-Triggered-Camera-Shutter
/Camera_Trigger.ino
UTF-8
1,918
2.671875
3
[]
no_license
/* * created by Rui Santos, http://randomnerdtutorials.com * * Complete Guide for Ultrasonic Sensor HC-SR04 * *modified by Judhi Prasetyo for camera shutter control * * Ultrasonic sensor Pins: VCC: +5VDC Trig : Trigger (INPUT) - Pin11 Echo: Echo (OUTPUT) - Pin 12 ...
true
0e4cd7aff095adcd72a0834a5708e8dd92e3d449
C++
eldsg/BOJ
/BOJ/5639/5639.cpp
UTF-8
704
3.640625
4
[]
no_license
#include<stdio.h> #include<stdlib.h> typedef struct tree{ int data; struct tree *left; struct tree *right; }tree; tree *insert(tree *node, int data){ if (node == NULL){ tree *temp; temp = (tree*)malloc(sizeof(tree)); temp->data = data; temp->left = temp->right = NULL; return temp; } if (data > (node->d...
true
617aea4757276703d9965cf1e00b7a1a6afaa17a
C++
iishipatel/Competetive-Programming
/ice cream parlor.cpp
UTF-8
586
2.578125
3
[]
no_license
#include<iostream> #include<vector> using namespace std; int main(){ int T; cin>>T; for(int t = 0; t<T; t++){ int M, N; cin>>M>>N; int c[N]; for(int n = 0; n<N; n++){ cin>>c[n]; } int i, j; bool found = false; for(i = 0; i<N; i+...
true
ac645b995fa562b1c5e8d68192bb6fec5761dcc9
C++
7421/muduo_learning
/test/test8.cpp
UTF-8
945
2.78125
3
[]
no_license
#include <iostream> #include <unistd.h> #include "./net/EventLoop.h" #include "./net/InetAddress.h" #include "./net/TcpServer.h" void onConnection(const muduo::TcpConnectionPtr& conn) { if (conn->connected()) { std::cout << "onConnection(): new connection [" << conn->name().c_str() << "]" << " from " << con...
true
f4912dfefb938070b378b31549e9a7c264b9d61f
C++
hugtalbot/caribou
/src/Caribou/Topology/Grid/Internal/BaseUnidimensionalGrid.h
UTF-8
3,145
3
3
[]
no_license
#ifndef CARIBOU_TOPOLOGY_ENGINE_GRID_INTERNAL_UNIDIMENSIONALGRID_H #define CARIBOU_TOPOLOGY_ENGINE_GRID_INTERNAL_UNIDIMENSIONALGRID_H #include <Caribou/Topology/Grid/Internal/BaseGrid.h> namespace caribou::topology::internal { /** * Simple representation of an unidimensional (1D) Grid in space. * * ** Do not use ...
true
264ca0b78fbe87268e4764c8522b2762806f8641
C++
DuckMonster/SmallGame
/Game/src/Core/Standard/Color.h
UTF-8
801
3.71875
4
[]
no_license
#pragma once class Color { public: /* Standard colors */ static const Color white; static const Color black; static const Color transparent; static const Color red; static const Color green; static const Color blue; static const Color orange; static const Color purple; static const Color cyan; static const ...
true
f4662064d2397b73849934e7a1f146fc99c9c325
C++
AnandDev006/CPlusPlusCodes
/DCP_v1/DCP121.cpp
UTF-8
1,688
3.125
3
[]
no_license
/* author : Anand Given a string which we can delete at most k, return whether you can make a palindrome. For example, given 'waterrfetawx' and a k of 2, you could delete f and x to get 'waterretaw'. */ #include <bits/stdc++.h> #define sz(a) int((a).size()) #define pb push_back #define mp(a, b) make_pair...
true
f4cba61245373bf262322e5bd9de4c296fac2466
C++
Stasich/learning_cpp
/Lafore_exercises/902_strconv.cpp
UTF-8
1,436
3.46875
3
[]
no_license
// strconv.cpp #include <iostream> #include <string.h> //#include <string> using namespace std; class String { protected: static const int MAX = 80; char str [ MAX ]; public: String() { str[0] = '\0'; cout << "ска";} String( const char s [] ) { strcpy ( str, s ); } String( char s [] ) {...
true
e36b6087092c3cb64985c24ea8e6c6b1e5e3358b
C++
amansirohi05/DS-Algo
/Arrays/Array math/Add One To Number.cpp
UTF-8
1,123
3.296875
3
[]
no_license
// https://www.interviewbit.com/problems/add-one-to-number/ vector<int> Solution::plusOne(vector<int> &A) { bool flag = false; vector<int> C; for(int i=0;i<A.size();i++){ // removing prefix zeros if(A[i]!=0){ flag = true; } if(flag){ C.push_back(A[i]); ...
true
d74f40bfa9d24bfbacce89a57997463cc936dea3
C++
boivie/sikozu
/src/main.cpp
UTF-8
2,852
2.5625
3
[]
no_license
#include <sys/types.h> #include <sys/time.h> #include <sys/queue.h> #include <stdlib.h> #include <stdio.h> #include <iostream> #include <string.h> #include <err.h> #include <event.h> #include <sys/types.h> #include <vector> #include "server.h" #include "coreservice.h" #include <boost/program_options.hpp> #include <dlfc...
true
0ad0bdd80d04d3c74922b608119fede6d3365a03
C++
sittiufairoh/Strukdat-11
/exercise2.cpp
UTF-8
4,365
3.53125
4
[]
no_license
/* Program : exercise-02 Nama : Sitti Ufairoh Azzahra NPM : 140810180002 Deskripsi : Binary Search Tree Tanggal : 15 Mei 2019 */ #include<iostream> using namespace std; struct Simpul{ int info; Simpul* left; Simpul* right; }; typedef Simpul* pointer; typedef pointer Tree; void createSimpul(pointer& ...
true
d581592d5abf9150039e53005b04bcde5ca2eccf
C++
dfki-asr/patchwise_inpainting_zcurves
/libInpainting/src/costfunction/L2CostFunction.cpp
UTF-8
1,341
2.515625
3
[]
no_license
#include "stdafx.h" #include "L2CostFunction.h" #include "dictionary/Dictionary.h" #include "StatusFlags.h" namespace inpainting { L2CostFunction::L2CostFunction(Problem* problem, Dictionary* dictionary) : DictionaryBasedCostFunctionKernel( problem, dictionary ) { } L2CostFunction::~L2CostFunction() { } ...
true
84d1e3a6f9661ddd569c589f2285cfe70035f609
C++
hj24/PAT-A-Level
/PAT_A_1013.cpp
UTF-8
766
2.8125
3
[]
no_license
#include <cstdio> #include <algorithm> using namespace std; int v[1000][1000]; bool visited[1000]; int n, m, k; void creat_map(){ scanf("%d%d%d",&n,&m,&k); for (int i = 0; i < m; ++i){ int c_1, c_2; scanf("%d%d",&c_1,&c_2); v[c_1][c_2] = v[c_2][c_1]= 1; } } void dfs(int node){ visited[node] = true; for (in...
true
d8f13688cfb3ecd32c305af8714ebec919162c1a
C++
kovarex/BhaalBot
/src/CostReservation.hpp
UTF-8
768
2.9375
3
[]
no_license
#pragma once #include <Cost.hpp> #include <string> #include <vector> #include <Module.hpp> class CostReservation; class CostReservationItem { public: CostReservationItem(Cost cost); virtual ~CostReservationItem(); virtual std::string str() const = 0; void clear(); Cost cost; CostReservation* owner; }; cl...
true
19f357b93d22da12790b1066078cf3d42d824ba3
C++
Touhidul121/All_code4
/The 81 part 4/smart_phone.cpp
UTF-8
416
2.515625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; ll a; vector<ll>v; for(int i=0;i<n;i++) { cin>>a; v.push_back(a); } ll res=0; sort(v.begin(),v.end()); if(n&1) { res=v[n/2]; cout<<(ll)res*((n/2)+1)...
true
91e5030713c741613311f26414b0469f223bd88c
C++
vslavik/poedit
/deps/boost/libs/polygon/test/voronoi_diagram_test.cpp
UTF-8
3,540
2.53125
3
[ "GPL-1.0-or-later", "MIT", "BSL-1.0" ]
permissive
// Boost.Polygon library voronoi_diagram_test.cpp file // Copyright Andrii Sydorchuk 2010-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for updates, docu...
true
2e38194e1d6511d815e4dc6cb4ad1fb6d2d50087
C++
Sachin5411/Algo-Practice-C-
/smartkeypad.cpp
UTF-8
552
2.953125
3
[]
no_license
#include<iostream> using namespace std; string table[] = { " ", ".+@$", "abc", "def", "ghi", "jkl" , "mno", "pqrs" , "tuv", "wxyz" }; void smartkeypad(char in[],char out[],int i,int j) { if(in[i]=='\0'){ out[j]='\0'; cout<<out<<endl; return; } int digit=in[...
true
be7727b77bf9b3cd0303dcdd3f1995afac935016
C++
yuvalschl/max-flow-algorithem
/HeapCell.cpp
UTF-8
431
3.125
3
[]
no_license
#include "HeapCell.h" HeapCell::HeapCell() { this->m_key = 0; this->m_data = 0; } HeapCell::HeapCell(int key, int data) { this->m_key = key; this->m_data = data; } int HeapCell::getKey() const { return this->m_key; } int HeapCell::getData() const { return this->m_data; } void HeapCell...
true
023d63e45f0aca6e242f36916459f26f38a7bfa4
C++
MingYueRuYa/cprimeprimecode
/c++_code/constructor/manage_dynamic_cache/strvec.cpp
UTF-8
1,848
3
3
[]
no_license
/**************************************************************** ** ** Copyright (C) 2016 635672377@qq.com ** All rights reserved. ** ***************************************************************/ #include <memory> #include <iostream> #include <algorithm> #include "strvec.h" using std::cout; using std::endl;...
true
8d0f0db4e1056cd6d96d2bc778cdd986d860ffda
C++
frozenca/CLRS
/12_binary_search_trees/easy/03_bst_successor.h
UTF-8
5,881
2.9375
3
[ "Apache-2.0" ]
permissive
#ifndef __CLRS4_BST_SUCCESSOR_H__ #define __CLRS4_BST_SUCCESSOR_H__ #include <cassert> #include <common.h> #include <iostream> #include <stdexcept> namespace frozenca { using namespace std; template <typename T> struct BSTSuccNode { T key_ = T{}; BSTSuccNode *succ_ = nullptr; unique_ptr<BSTSu...
true
79b83d98523c6f1baa694a6e59dc5884c6ae9582
C++
VinekNet/Zombie
/src/Bomber.cpp
UTF-8
315
2.6875
3
[]
no_license
#include "Bomber.h" Bomber::Bomber() { setStrenght(getStrenght()*2); //ctor } Bomber::~Bomber() { cout<<"Zombie Bomber " <<getNom() << " detruit"<<endl; //dtor } void Bomber::explosion(Zombie* cible){ cible->setPv(cible->getPv() - (getStrenght()*3)); Zombie::~Zombie; }
true
48b0371e5d0877c57b1293040b4b26ea03343713
C++
akasharun-gh/SDL-2D-Game
/src/animation.cpp
UTF-8
1,818
3.1875
3
[]
no_license
#include <iostream> #include "animation.h" // Method to load texture of image to render target SDL_Texture *Animation::LoadTexture(std::string filepath, SDL_Renderer *renderTarget) { SDL_Texture *texture = nullptr; SDL_Surface *surface = IMG_Load(filepath.c_str()); if (surfa...
true
15dc4e0811bb0d1006f8efb642306a799ae19e31
C++
thijsking/AirHandlingUnit
/Eind code AHU/_TheUnit/src/HeatingElement.cpp
UTF-8
683
3.34375
3
[]
no_license
#include "HeatingElement.h" /** * Create the HeatingElement object and assign the provided parameter data to the corresponding variables. */ HeatingElement::HeatingElement(iCommunication* communication, uint8_t address) : iActuator(communication,address) { } /** * Destroy the HeatingElement object */ HeatingElement::~H...
true
c27065c5d9b82e7b076745ec56411554c7a66f1a
C++
ClaraGhabro/text_mining
/src/trie/nodes.hh
UTF-8
680
3.046875
3
[]
no_license
#pragma once #include "node.hh" namespace trie { /** * \fn add_node * * \brief Add a node in the vector containing all nodes */ std::size_t add_node(); /** * \fn get_node * * \brief Return a node using a given index. * * \param index The index of the node to return */ Node& get_node(std::size_t index); /*...
true
db0e9eb4341e643c8081f9a53b9a416d92628aca
C++
manishhedau/Data-Structure-Algorithm
/6. Linked List/8_Merge_sort_over_ll.cpp
UTF-8
1,904
3.71875
4
[ "MIT" ]
permissive
// Code By - Manish Hedau #include<bits/stdc++.h> using namespace std; class node { public: int data; node *next; // constructor node(int d) { data = d; next = NULL; } }; void insertHead(node *&head, int data) { // check if ll is empty if (head == NULL) { head = new node(data); return; } node *new_b...
true
4576b4639d36b6438fb2ac231c8e2846f7254018
C++
UnitySio/MonoChrome-Direct2D-GUI-Framework
/x64/Framework/Includes/Color.cpp
UTF-8
474
2.90625
3
[]
no_license
#include "Color.h" Color* Color::DarkGray = new Color(60, 60, 60, 255); Color* Color::LightGray = new Color(180, 180, 180, 255); Color* Color::Black = new Color(0, 0, 0, 255); Color* Color::White = new Color(255, 255, 255, 255); Color* Color::Red = new Color(255, 0, 0, 255); Color* Color::Green = new Color(0, 255, 0, ...
true
68a22f6e5326130a06d93a1ca85d283ad24dac74
C++
palais-ai/ailib
/AICore/Blackboard.h
UTF-8
3,670
3.09375
3
[ "MIT" ]
permissive
#ifndef BLACKBOARD_H #define BLACKBOARD_H #pragma once #include "ai_global.h" #include "Any.h" #include "btHashMap.h" #include <map> BEGIN_NS_AILIB template <typename KEY> class BlackboardListener { public: virtual void onValueChanged(const KEY& key, const ailib::hold_any& value) = 0; }; typedef uint32_t Hand...
true
9fe149e53bdd1a11784d14f106287de1c1376373
C++
bbernardoni/pillow
/pillow/enemy.cpp
UTF-8
564
2.5625
3
[ "MIT" ]
permissive
#include "enemy.h" Enemy::Enemy(Vector2f pos) : Character(Texture(), IntRect(0, 0, 50, 100), NULL, pos) { id = enemy; damaging = true; addBoundingBox(FloatRect(0.0f, 0.0f, 1.0f, 1.0f)); hp = 100.0f; } void Enemy::update(Time deltaTime){ float dt = deltaTime.asSeconds(); Vector2f vel = getArrowsVel() * dt; Ui...
true