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
25478f504b521701194f0a67ba9d0de76758cd73
C++
rathoresrikant/HacktoberFestContribute
/Algorithms/SparseMatrix/SparseAddMultipl.cpp
UTF-8
4,400
2.75
3
[ "MIT" ]
permissive
#include<iostream> #include<cstring> using namespace std; void print_sparse(int mat[][3]){ int c[mat[0][0]][mat[0][1]] ,k = 1; for(int i = 0; i< mat[0][0]; i++){ for(int j = 0; j<mat[0][1]; j++){ if(i == mat[k][0] && j == mat[k][1]){ c[i][j] = mat[k][2]; k++;...
true
dec450a806f01b0bd83263f07864d2e502379402
C++
MAhsan-Raza/AlgorithmsPractice
/HackerRank./C++./TemplateSpecialization.cpp
UTF-8
901
3.578125
4
[ "MIT" ]
permissive
// Define specializations for the Traits class template here. template<> struct Traits<Fruit> { public: static string name(int i) { switch((Fruit)i) { case Fruit::apple: return "apple"; break; case Fruit::orange: return ...
true
3b4eae0cd9cae606d6e1f998fa3c4572c0d384ce
C++
kaabimg/opengl-demos
/transforms/lab_solar_system/solarsystemscene.cpp
UTF-8
6,497
2.53125
3
[]
no_license
#include "solarsystemscene.h" #include "orbitingbody.h" #include <camera.h> #include <sphere.h> #include <QGLWidget> #include <QImage> SolarSystemScene::SolarSystemScene( QObject* parent ) : AbstractScene( parent ), m_camera( new Camera( this ) ), m_vx( 0.0f ), m_vy( 0.0f ), m_vz( 0.0f )...
true
0c4201727de6b315cbcd62a2966b2d3db92d8bbb
C++
stwrd/SmallTool
/CvtVideoToFrame.cpp
GB18030
2,426
2.640625
3
[]
no_license
// Vedio2Img.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include <Windows.h> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; class MySVM : public CvSVM { public: //svmľߺеalpha double * get_alpha_vector() { return this->decision_func->alpha; } //svmľߺеrho,ƫ float get_rho() { return this...
true
6a434c7cf5bacc280cbed8db04719c4f9421aa4f
C++
kyuhwang3/AwayTeamstar
/study/increaseNum.cpp
UTF-8
669
2.984375
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; void solve(int *dataInput, int dataSize) { int *memo = new int[dataSize]; for (int i = 0; i < dataSize; i ++) { memo[i] = 1; } for (int i = 0; i < dataSize; i++) { for (int j = 0; j < i; j++) { if (dataInput[i] > dataInput[j] && memo[i] < memo[...
true
a74edefcd8fcf2633988357674b0901b70f2be57
C++
ykw1225/CS-132
/cpp/10-5.cpp
UTF-8
906
3.984375
4
[]
no_license
//10-5: Sentence Capitalizer //Yeung Kit Wong #include<iostream> #include<string> using namespace std; void stcCap(char* array){ int i = 0; //if the element is the first letter, and after '.', '!', or '?', then upper the case. while(*(array+i) != '\0'){ if(i == 0 || *(array+i-2) == '.' ...
true
2113b73e3bcdf50ffe807c09d677253ade2447ca
C++
Shailendra53/Projects
/hash analysis/name_map.hpp
UTF-8
10,672
3.390625
3
[]
no_license
#ifndef NAME_MAP_HPP #define NAME_MAP_HPP #include <iostream> #include <cmath> using namespace std; template <typename K,typename V> class NODE; template <typename K, typename V> class Name_Map { // map interface public: Name_Map(int capacity); // constructor int size() const; // number of entr...
true
4e673ac177b17b342ce7df5bec91bfe50aed35de
C++
yprateek136/Data_structure_in_120days
/Check if strings are rotations of each other or not.cpp
UTF-8
747
3.75
4
[]
no_license
// Check if strings are rotations of each other or not.cpp #include<bits/stdc++.h> using namespace std; class Solution { public: //Function to check if two strings are rotations of each other or not. bool areRotations(string s1,string s2) { if(s1.length() != s2.length()) { re...
true
cf96a80f0220bf0b71b2ed2c0268744b408dce29
C++
palwxc/Lists-and-BigInteger
/MyList.hpp
UTF-8
8,362
3.5625
4
[]
no_license
//Programmer: Phillip LaFrance //Student ID: 12398940 //Intructor: Patrick Taylor //Section: A //Date: 03/19/2018 //File: MyList.hpp //Description: Defines functions for MyList.h /* Define all your MyVector-related functions here. * You do not need to include the h file. * It included this file at the bottom...
true
927660c2b994754382400d178bcab24c3148baa1
C++
livingthdrm/Practice-
/conversions/main.cpp
UTF-8
490
3.234375
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main(){ double x, y, result1, result2, result3, result4, result5 ; x = 3; y = 4; result1 = abs(x + y); cout << result1 <<endl; result2 = abs(x) + abs(y); cout << result2 << endl; result3 = pow(x, 3)/ x + y; cout << res...
true
7b7df483cc1b21ce44cdf9aecd6f9bc721101eae
C++
tangjz/acm-icpc
/self_training/2016-06-18/T.cpp
UTF-8
1,304
2.578125
3
[ "Apache-2.0" ]
permissive
#include <cstdio> #include <algorithm> typedef long long LL; const int maxn = 1001; int t, n, x[maxn], y[maxn], r[maxn], fa[maxn], dis[maxn]; bool vis[maxn]; int find(int x) { if(x == fa[x]) return x; int tmp = fa[x]; fa[x] = find(fa[x]); dis[x] ^= dis[tmp]; return fa[x]; } inline LL sqr(int x) { return (LL)x *...
true
64925f32bb5b62be824400f5cb4a21617b7d2a82
C++
DavidConsidine/Project-Engine
/ProjectEngine/src/Core/Renderer/OrthographicCamera.cpp
UTF-8
1,164
2.625
3
[ "Apache-2.0" ]
permissive
#include "pepch.h" #include "Core/Renderer/OrthographicCamera.h" #include <glm/gtc/matrix_transform.hpp> namespace ProjectEngine { OrthographicCamera::OrthographicCamera(float left, float right, float bottom, float top) :m_ProjectionMatrix(glm::ortho(left, right, bottom, top, -1.0f, 1.0f)), m_ViewMatrix(1.0f) { ...
true
23f76d42c710fa9551d1ef87807f052f0a2be109
C++
DocN/CPP-Stack-Implementation
/Stack/Stack/Stack.cpp
UTF-8
1,663
3.96875
4
[]
no_license
#include "Stack.hpp" #include <iostream> using namespace std; Stack::Stack() { //initial position in array count = -1; } /* push - pushes an integer onto the stack Input~ int value - an integer value we're pushing onto the stack return - success or failure boolean */ bool Stack::push(int value) { if (count == ...
true
8d7cfdae7fa306d32140788bd5f30917d40c6d04
C++
Sadik/TSS-SIM
/src/Signal.h
UTF-8
1,328
2.65625
3
[]
no_license
#pragma once #include "Gate.h" #include "SAFault.h" #include "SignalValue.h" #include <string> #include <bitset> #include <boost/make_shared.hpp> class Gate; class SAFault; class Signal { public: Signal(); Signal(std::string name, bool isPrimary = false); // Signal(std::string name, Gate* source, Gate* ...
true
314ca2d1f8739fdfbbbe01058331e21d967527d9
C++
dattapro001/C-Codes-3G
/task4/number-4.cpp
UTF-8
1,107
3.828125
4
[]
no_license
#include <iostream> using namespace std; struct Node { int data; Node* next; }; Node* deleteNode( Node* head) { if (head == NULL) return NULL; else if (head->next == NULL) { delete head; return NULL; } Node* again = head; while (again->next->next != ...
true
dfc68a8da9d75d305b696488f5f559d035757e09
C++
theandrewcosta/Rose
/Rose/src/Rose/Core/Timestep.h
UTF-8
306
3.03125
3
[ "Apache-2.0" ]
permissive
#pragma once namespace Rose { class Timestep { public: Timestep(float time = 0.0f) : time(time) { } float GetSeconds() const { return time; } float GetMiliSeconds() const { return time * 1000.0f; } private: float time; }; }
true
4927076693ad403b7ede7950232074e0138753a0
C++
pmac1965/proteus
/source/display/prFadeManager.h
UTF-8
2,886
2.703125
3
[ "Apache-2.0" ]
permissive
// File: prFadeManager.h /** * Copyright 2014 Paul Michael McNab * * 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 requ...
true
53bf63d4c8c691582d338300750ef53d8642f592
C++
MrLolthe1st/disasm
/Antivir/disasm.cpp
UTF-8
36,916
2.703125
3
[]
no_license
/* disasm.cpp - disassembler and other structures. Converts bytes to assembler code. Simply logic recovery to pseudo C-like style. Main convertion to code, that will be analyzed later will be in clogic.cpp. Copyright (C) 2019 Novozhilov Alexandr (MrLolthe1st) This program is free software: you can redistribute it...
true
d17d309c8e27bd4ae314d00e62d4d3f9b5348927
C++
Andreea15B/Facultate_an_I
/Semestru I/IP/Proiect TABL2/inversa_matrice.cpp
UTF-8
1,816
2.796875
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; ifstream fin("inversa.in"); int calcul_det(int **matr,int n); int **calcul_minor(int **matr,int lin,int col,int n); int **calcul_inversa(int **matr,int n); int main() { int i,j,det,n; fin>>n; int **matr=new int*[n]; for(i=0;i<n;i++) matr[i]=new...
true
71f9f20ee2f74839575b3cd6a45884bffe16429b
C++
avnyaswanth/DS_AND_ALGO
/ds_Algo/number_theory/binary_exponentiation.cpp
UTF-8
288
3.546875
4
[]
no_license
#include<iostream> using namespace std; void a_power_b(int a,int b) { int res = 1; while(b!=0) { if(b % 2 != 0) res = res*a , b--; a *= a , b /= 2; } cout<<res; } int main() { int a,b; cout<<"Enter base and exponent"; cin>>a>>b; a_power_b(a,b); }
true
e9f68ec9cfd9ea80c6fd2f6a94ec183e02b35c56
C++
dekonoplyov/try_stuff
/xlib/mouse_move.cpp
UTF-8
1,912
3.03125
3
[ "MIT" ]
permissive
#include <linux/uinput.h> #include <fcntl.h> #include <stdio.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> /* emit function is identical to of the first example */ void emit(int fd, int type, int code, int val) { struct input_event ie; ie.type = type; ie.code = code...
true
211b018c6cf4084fca87331b244bfb713524cc40
C++
vei123/PATTestAdvanced
/C++/1023趣味数字.cpp
UTF-8
1,141
2.984375
3
[]
no_license
#include<iostream> #include<string> #include<unordered_map> #include<algorithm> using namespace std; void delprezeros(string& s) { while (!s.empty() && s[0] == '0') s.erase(0, 1); } string stradd(string a, string b) { string res; int al = a.size(), bl = b.size(); int* cc = new int[max(al, bl) + 1](); int* aa =...
true
2625b6ef728b84376dd2f84e8aa260a9a1308f16
C++
igorgsh/SmartHouse
/SmartHomeBoard/utils.cpp
WINDOWS-1251
643
2.5625
3
[]
no_license
// // // #include "utils.h" // , , // extern int __bss_end; extern void *__brkval; // , (RAM) int memoryFree() { int freeValue; if ((int)__brkval == 0) freeValue = ((int)&freeValue) - ((int)&__bss_end); else freeValue = ((int)&freeValue) - ((int)__brkval); return freeValue; } //String PrintIP(IP...
true
a9213a9c949f99dd0e288f5c04cb955b5a930260
C++
JChristensen/piXBee
/main.cpp
UTF-8
8,486
2.609375
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
#include <iostream> #include <string.h> #include "XBee.h" using namespace std; class myXBee : public XBee { public: myXBee( XBeeAddress64 dest = XBeeAddress64(0x0, 0x0) ); //default destination is the coordinator bool read(void); void transmit(void); XBeeAddress64 m_destAddr; // destination ad...
true
756af31d74470648ca25d58bfd58ae5f018e620f
C++
eshlykov/junk
/school-31/coding/olymp/1810numB.cpp
UTF-8
751
2.6875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; vector<vector<int> > mc; vector<int> pra; vector<int> fr; vector<int> cl; void dfs(int v, int st) { cl[v] = true; for (int i = 0; i < mc[v].size(); ++i) { fr[mc[v][i]] = st; dfs(mc[v][i], st); } } int main() { int n, x; c...
true
10bc4553756060d3744d56a1a2285f32e6f387fc
C++
OptoCloud/VRC-BundleExtractor
/filereadsource.cpp
UTF-8
1,020
2.78125
3
[]
no_license
#include "filereadsource.h" VRCE::IReadSource::Type VRCE::FileReadSource::InterfaceType() const { return IReadSource::Type::File; } VRCE::FileReadSource::FileReadSource(const std::filesystem::path& path) : VRCE::IReadSource() , m_stream(std::make_shared<std::ifstream>(path)) { } bool VRCE::FileReadSource::is...
true
8b522f84ac91aa7439f8c6063989f131686a3afc
C++
H-Shen/Collection_of_my_coding_practice
/Leetcode/1203/1203.cpp
UTF-8
3,111
2.765625
3
[]
no_license
vector<unordered_set<int>> AL; namespace Topo { int n; vector<int> vis, result; bool dfs(int u) { vis[u] = -1; for (const auto &v : AL[u]) { if (vis[v] < 0) { return false; } else if (vis[v] == 0) { if (!dfs(v)) { ...
true
10603625fa00ede383f1a6d1c59ba0fa6fa67fff
C++
rohitbhatghare/c-c-
/even_odd_array.cpp
UTF-8
634
3.3125
3
[]
no_license
#include <iostream> using namespace std; int main() { int a[24]; int n,i; cout<<"enter the elements in array"<<endl; cin>>n; cout<<"enter the 1st array element"<<endl; for (i =0 ; i < n; i++) { cin>>a[i]; } cout<<"the even numbers are "<< a[i] <<...
true
3d53a0845ce31a4a0b93711798fd5a947d8af853
C++
zhandb/tegrenys
/TGSystem/TGRefCounter.h
WINDOWS-1251
4,195
2.90625
3
[]
no_license
#ifndef TGRefCounter_h__ #define TGRefCounter_h__ //----------------------------------------------------------------------------- #define uint32_t uint //----------------------------------------------------------------------------- #include "windows.h" //----------------------------------------------------------...
true
9e57a769ae45da2c0ee30e3ca6cc8c713413b999
C++
D34Dspy/warz-client
/External/NaturalMotion/common/XMD/src/XMD/CollisionSphere.cpp
UTF-8
3,744
2.515625
3
[]
no_license
//---------------------------------------------------------------------------------------------------------------------- /// \file CollisionSphere.cpp /// \note (C) Copyright 2003-2005 Robert Bateman. All rights reserved. //------------------------------------------------------------------------------------------------...
true
dc8bde4acdb9ef26e40e2bd5c0867eef75ca36b3
C++
Ashwinbicholiya/cpp-Practice
/Practice on functions/numbercover.cpp
UTF-8
1,080
3.484375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int BinarytoDecimal(int n) { int ans = 0; int x = 1; while (n > 0) { int y = n % 10; ans += x * y; x *= 2; n /= 10; } return ans; } int OctaltoDecimal(int n) { int ans = 0; int x = 1; while (n > 0) { int y = n % 10; ans += x * y...
true
167e27db3c04b4194348194e05c6f84f9afd74c6
C++
g4workshop/gamelet
/gamelet/player.h
UTF-8
2,537
2.671875
3
[]
no_license
// // Player_manager.h // Player manager // // Created by Dawen Rie on 12-4-9. // Copyright (c) 2012年 G4 Workshop. All rights reserved. // #ifndef gamelet_player_manager_h #define gamelet_player_manager_h #include <event2/util.h> #include <string> #include <map> #include <set> #include <list> #include "cmd.h" ...
true
e86bd1445e4fd818a4eb79646e7b33b56f35ef19
C++
alexandraback/datacollection
/solutions_1595491_1/C++/piyapan/q2.cpp
UTF-8
517
2.65625
3
[]
no_license
#include<stdio.h> #include<iostream> using namespace std; int main() { int N, i, j, d, p, m, S, max, tmp; cin >> m; for(i=0;i<m;i++) { cin >> N; cin >> S; cin >> p; max = 0; for(j=0;j<N;j++) { cin >> d; if((d%3==0 && d/3 >= p) || (d>0 && d%3!=0 && d/3+1 >= p)) { max+...
true
7a6ca76ee06443122d2cdf8995a5a7f3ff4c5eaf
C++
GhulamMustafaGM/C-Programming
/05-C++ Programming/Threedigits.cpp
UTF-8
140
2.828125
3
[]
no_license
// Three digit number #include <iostream> int main() { int n; std::cin >> n; std::cout << n / 100 + n / 10 % 10 + n % 10; }
true
14a19a35e751474c35316f5218d2291c3abea43f
C++
endyul/my-leetcode-solution
/Remove-Element.cpp
UTF-8
283
3.03125
3
[ "MIT" ]
permissive
class Solution { public: int removeElement(int A[], int n, int elem) { int cnt = 0; for (int i = n-1; i >= 0; i--) { if(A[i] == elem){ A[i] = A[n-1-cnt]; cnt++; } } return n - cnt; } };
true
b5f02810f7905662edd992b4f3bad9895d4448a8
C++
rajneeshkumar146/pepcoding-Batches
/2019/levelUp302/lecture_001_Recursion/extraClass.cpp
UTF-8
3,182
3.015625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; void laxcigraphicalOrder(int st, int end) { if (st > end) return; cout << st << endl; for (int i = 0; i < 10; i++) if (st * 10 + i < end) laxcigraphicalOrder(st * 10 + i, end); else break; if (s...
true
650032d111e76637e0ccd1e7a2c597e993a8891f
C++
ShreyJ1729/Competitive-Programming
/Project Euler/solutions/P26.cpp
UTF-8
1,605
3.4375
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <set> using std::cout; using std::endl; int len_cycle(int n) { // std::vector<int> quotient; std::vector<int> rems; int d = 1; bool isRepeat = false; while (true) { // check to see if d == 0 (division terminated) or i...
true
5c366db636c651fdaf5302b1bbe3203614a0c87f
C++
VerhelstJoris/DirectX_Framework
/Engine/PostProcessingShader.h
UTF-8
1,863
2.515625
3
[]
no_license
////////////// // INCLUDES // ////////////// #include <d3d11.h> #include <d3dx10math.h> #include <d3dx11async.h> #include <fstream> using namespace std; //////////////////////////////////////////////////////////////////////////////// // Class name: PostProcessingShader //////////////////////////////////////////////...
true
358424f440350bb918942a522c08f67837316a05
C++
te-bachi/libines
/src/util/sort/Comparator.cxx
UTF-8
1,258
2.515625
3
[]
no_license
#include "jam/util/sort/Comparator.hxx" #include "jam/lang/Class.hxx" using namespace jam::util::sort; using namespace jam::lang; const Class Comparator::klass = Class::newInstance("jam::util::sort::Comparator"); /*** Reference ***/ Comparator::Comparator() : Object() { // } Comparator::Comparator(const Refere...
true
b19b525c1c59cd20a251e1e2a5a9822a07d7e48c
C++
AlleCrossCosti/4.-Pulsanti-e-interuttori
/Pulsanti e interrutori 1.cpp
UTF-8
674
3.265625
3
[]
no_license
// Pin del pulsante const byte PIN_PULSANTE = 2; // Pin del LED const byte PIN_LED = 13; // Variabile di stato del pulsante byte statoPulsante = 0; void setup () { pinMode (PIN_LED, OUTPUT) ; // LED in OUTPUT pinMode (PIN_PULSANTE, INPUT) ; // pulsante in INPUT } void loop () { // Leggo il pulsante...
true
444160f18bc0cda92fdc5066cfb8806808edaec7
C++
sunshinekai/Exercise
/day_13/day_13/day_13.cpp
GB18030
7,261
3.3125
3
[]
no_license
/* ѡ⣺ 1. ǶʹifʱCԹ涨else(C) A ֮ǰͬλõif B ֮ǰif C ֮ǰҲelseif D ֮ǰĵһif עif elseʹù 2. ³(C) #include <stdio.h> int main() { int i,a[10]; for(i=9;i>=0;i--) a[i]=10-i; printf("%d%d%d",a[2],a[5],a[8]); return 0; } A 258 B 741 C 852 D 369 עa[10] = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }; 3. 벻ȷhelloѡΪ(B) #include <stdio.h> #incl...
true
a2604a01f213e2bf1e95ecbfa5753cf455c00fb1
C++
zeroplusone/AlgorithmPractice
/Leetcode/90. Subsets II-3.cpp
UTF-8
725
3.125
3
[]
no_license
//back tracking solution class Solution { public: vector<vector<int>> subsetsWithDup(vector<int>& nums) { vector<vector<int>> ans; vector<int> current(0); sort(nums.begin(), nums.end()); backtracking(0, current, nums, ans); return ans; } void backtracking(int now...
true
ec424187e8b46a53822200911e1414a72c33e80e
C++
qwefgh90/aaateamopencvserver1
/AAATeamServer/ImageManager.cpp
UHC
1,779
2.578125
3
[]
no_license
#include "stdafx.h" #include "ImageManager.h" ImageManager* ImageManager::singleton= NULL; ImageManager::ImageManager(){ sift = SiftEngine::getSiftEngine(); } ImageManager* ImageManager::getImageManager() { if(ImageManager::singleton==NULL) { ImageManager::singleton = new ImageManager(); } return ImageManager::...
true
85b4bcbf097ff0750aacc9b4b63aff9a8d801d94
C++
SPYCODER-droid/DSA
/Merge_two_sorted_arrays_in_O(1)_space/main.cpp
UTF-8
727
2.703125
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; int main() { vector<int> a1,a2; int n1,n2,a,b; cin>>n1>>n2; for (int i = 0; i < n1; i++){ cin>>a; a1.push_back(a); } for (int i = 0; i < n2; i++){ cin>>b; a2.push_back(b); } sort(a1.begin(), a1.end()); ...
true
103be8a87d5c1991cf707398132c5614ce3281d1
C++
RomanYu/leetcode
/q342.cpp
UTF-8
264
3.0625
3
[]
no_license
#include<iostream> using namespace std; class Solution { public: bool isPowerOfFour(int num) { return (num & (num - 1)) == 0 && (num & 0x55555555); } }; int main() { Solution s; cout<<s.isPowerOfFour(16)<<endl; }
true
717837248a593c0a3574a4d209d2cc1ef5696d54
C++
shashwatg1/Coding_Practice
/sorting/bucketSort.cpp
UTF-8
1,242
4.25
4
[]
no_license
// decimal numbers in a range #include <iostream> #include <vector> #include <algorithm> using namespace std; void printArr(float arr[], int size) { std::cout << "the array is : "; for (int i = 0; i < size; ++i) std::cout << arr[i] << " "; std::cout << "\n"; } void createArr(float arr[], int size) { for(int i=0;i...
true
8560107dc102224556ebcb88635aed909e8218b2
C++
davidghobson1/Dragons-Dungeon-Game-Simulator
/source/GameObjects/Items/Potions/HealthPotion.cc
UTF-8
587
3
3
[]
no_license
#include <iostream> using namespace std; #include "HealthPotion.h" #include <string> #include "random.h" HealthPotion::HealthPotion(int x, int y): Potion(x, y) { name = "Health Potion"; boostType = "health"; boost = random(100)%4 + 1; } HealthPotion::~HealthPotion() { } //Health potions collect function //A...
true
885ee62d951b1e40958506d7677a8bd142f603ea
C++
kl4kennylee81/Canon
/source/PathAIData.hpp
UTF-8
2,576
2.78125
3
[]
no_license
// // PathAIData.hpp // Canon // // Created by Jonathan Chen on 3/21/17. // Copyright � 2017 Game Design Initiative at Cornell. All rights reserved. // #ifndef PathAIData_hpp #define PathAIData_hpp #include <stdio.h> #include <cugl/cugl.h> #include "AIData.hpp" #include "ActiveAI.hpp" #include "GameObject.hpp" e...
true
d1c566c70c4cac069bf9fcfa1ccf5296c20058ae
C++
jk127jp/kinmu
/kinmu.cpp
UTF-8
8,398
2.765625
3
[]
no_license
#include <fstream> #include <iostream> #include <string> #include <cstdlib> using namespace std; const int staffNum = 9+1; // 社員数 const int tanmuNum =3+1; // 担務数 const int dayNum=30+1; const int mawariHit=2; // 回りがヒットした場合の加算値 const int defaultPriority=100; // 標準の優先度 class Staff{ public: // int getID(){return id;}; ...
true
3e724515a9038cabda85bc7318ae8d8616523b15
C++
mmrraju/HackerRank-Basic-Problem_Solving-soluiton-with-cpp
/ElectronicsShop.cpp
UTF-8
1,098
2.609375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int s; int n; int m; cin >> s >> n >> m; int k[n]; int z=-1; int u[m]; for(int i=0;i<n;i++) { cin >> k[i]; } for(int i=0;i<m;i++) { cin >> u[i]; } for(int i=0;i<n;i++) { for(int j=0;j<m;j+...
true
a164f4130593422df59b04eda8dedb8a123c8c94
C++
crowleydi/ece231-challenges
/main.cpp
UTF-8
187
2.546875
3
[]
no_license
#include <iostream> #include "hashmap.h" int main() { HashMap<std::string, int, StringHash> hmap; hmap.insert("ECE231", 5); std::cout << hmap["ECE231"] << std::endl; return 0; }
true
c656d2805e751326855c95931b32d29f33f919b1
C++
DoMoCo/Skyline
/Skyline.h
GB18030
2,771
2.65625
3
[]
no_license
#ifndef __SKYLINEONRDF__SKYLINE__ #define __SKYLINEONRDF__SKYLINE__ #include <iostream> #include <vector> #include <list> #include <string> #include <unordered_map> #include <unordered_set> #include <iterator> #include <queue> #include <stack> #include <set> //#include "BTree.h" namespace SkylineOnRDF { const int ...
true
1075e1c11895d8a7cdf1e5a25c89f35bc481f685
C++
pzhxbz/CCpp2016
/practices/cpp/level1/p_CircleAndPoint/Circle.h
UTF-8
386
2.59375
3
[]
no_license
#ifndef CIRCLE_H #define CIRCLE_H #include "Point.h" class Circle { public: Circle(); virtual ~Circle(); Circle(Point center,int r); void draw(); void trans(int x,int y); void put_trans(int x,int y); protected: private: Point center; ...
true
87a298d4db85961da21f0c93a351e2f745db942b
C++
syedfarhanashraf/CPP-Program-Reference-
/CPP/Course2/classes.cpp
UTF-8
723
3.890625
4
[]
no_license
#include <iostream> #include <cassert> class Date{ public: //---Getters(accessors)----// int Day(){return day;} int Month(){return month;} int Year(){return year;} //---Setters(mutators)----// void Day(int d){ if (d > 0 && d <= 31) day = d; ...
true
7af623f470fc92febacf22c75c4858d0c3625127
C++
pointer20qt/wudi
/2-11test/try_catch.cpp
GB18030
720
3.59375
4
[]
no_license
#include<iostream> #include<vector> using namespace std; int main() { vector<int> arr{ 1, 2, 3, 4, 5, 6 }; try{ for (int i = 0; i < 7; i++) { cout << arr.at(i) << endl; }//쳣תcatch 쳣1 throw 2;//Լ׳쳣 쳣2 ֻcatchǰ쳣 cout << "ӡ" << endl; } catch (int test) { cout << "쳣,쳣"<<test << endl; } catch (out...
true
29854391086d822c589e0e24c0f8cd1f8f77e61d
C++
firewood/topcoder
/atcoder/agc_008/a.cpp
UTF-8
423
2.875
3
[]
no_license
// A. #include <iostream> #include <algorithm> #include <sstream> #include <cstdio> #include <cstring> using namespace std; int main(int argc, char *argv[]) { int x, y; cin >> x >> y; int ans = 1 << 30; for (int a = -1; a <= 1; a += 2) { for (int b = -1; b <= 1; b += 2) { int p = x * a, q = y * b; if (p...
true
424095653bfb0549e87dfe9c7edc0e9a6ae27f31
C++
thlucena/ray-tracer-2020
/project04/src/cameras/orthographic.h
UTF-8
887
2.875
3
[]
no_license
#ifndef _ORTHO_CAM_ #define _ORTHO_CAM_ #include "../core/film.h" #include "../core/camera.h" #include "../core/point3D.h" #include "../core/vec3.h" #include "../core/ray.h" class OrthographicCamera : public Camera { public: OrthographicCamera( float l, float r, floa...
true
0a27115528d1a9ea1215da468289e8d326f0f69c
C++
SeisSol/easi
/include/easi/util/RegularGrid.h
UTF-8
864
2.546875
3
[ "BSD-3-Clause" ]
permissive
#ifndef EASI_UTIL_REGULARGRID_H_ #define EASI_UTIL_REGULARGRID_H_ namespace easi { template <typename T> class Slice; class RegularGrid { public: static unsigned const MaxDimensions = 6; inline ~RegularGrid() { delete[] m_values; } void allocate(unsigned const* numGridPoints, unsigned dimensions, unsig...
true
2c3167b114a050e517e0cd6d06506d04f2ed2a83
C++
OpenLocalizationTestOrg/ECMA2YamlTestRepo2
/fulldocset/add/codesnippet/CPP/p-system.windows.forms.d_42_1.cpp
UTF-8
227
2.5625
3
[ "CC-BY-4.0", "MIT" ]
permissive
public: void SetMyCustomFormat() { // Set the Format type and the CustomFormat string. dateTimePicker1->Format = DateTimePickerFormat::Custom; dateTimePicker1->CustomFormat = "MMMM dd, yyyy - dddd"; }
true
755b4abb4c5f3adde5be23d53e0a4f625858f3cd
C++
DreadedX/raid
/src/raid/platform/android/android.cpp
UTF-8
6,236
2.515625
3
[]
no_license
//---------------------------------------------- #include <GLES3/gl3.h> #include <android/log.h> #include "raid/platform/android/android.h" #include "logger.h" //---------------------------------------------- static void engine_handle_cmd(android_app*, int32_t cmd) { switch(cmd) { case APP_CMD_INIT_WINDOW: bre...
true
5f684e8a1a6a64b30491582d44bccbdc1f49acc8
C++
ashuy280/hackerrank
/Linked_List/Insert_a_node_at_a_specific_position_in_a_linked_list.cpp
UTF-8
459
3.640625
4
[]
no_license
SinglyLinkedListNode* insertNodeAtPosition(SinglyLinkedListNode* head, int data, int position) { SinglyLinkedListNode *add=new SinglyLinkedListNode(data); SinglyLinkedListNode *temp=nullptr; temp=head; while(position>1){ temp=temp->next; position--; } if(temp->next==NULL){ ...
true
1cff8b108990d9fecae0b4ef140fdf0e3905c687
C++
marcosrodriigues/ufop
/conteudo/AEDS I/Práticas/Prática 05/Marcos-Rodrigues-1/Pilha.cpp
UTF-8
886
2.96875
3
[]
no_license
#include <stdlib.h> #include <iostream> #include "Pilha.h" using namespace std; void TPilha_Inicia(TPilha *pilha) { pilha->pPrimeiro = NULL; pilha->pUltimo = NULL; } int TPilha_EhVazia(TPilha *pilha) { return (pilha->pPrimeiro == pilha->pUltimo ? 1 : 0 ); } int TPilha_Push(TPilha *pilha, TItem item) { TCelula *a...
true
d8c284d58d9f6e383203443267afc2b279ef30b6
C++
MarshalStewart/EECE_2080_Lab_07
/Lab07/Main.cpp
UTF-8
18,072
3.09375
3
[]
no_license
// FleetAttack.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <stack> #include <cstdlib> #include <ctime> #include "Fleet.h" #include "IShip.h" #include "IRace.h" #include "ShipFactory.cpp" using namespace std; int main() { c...
true
1a9ef21051734a2892ca1f857b415622765931ca
C++
danielpereira/AoETechTree
/TechTree/AnotherControlRelatedClass.h
UTF-8
454
2.53125
3
[ "MIT" ]
permissive
#pragma once /* INCLUDES */ // Base class header #include "GameType.h" /* DEFINITIONS */ #pragma pack(push, 1) // Represents an unknown control related class. // Research type name: AnotherWindowRelatedStruct. class AnotherControlRelatedClass : public GameType { protected: // Member variables DWORD _unknown1[27]; ...
true
af4dc8e10659d37ee95f7095c1f3d741bcb4e0ff
C++
ymmtshny/ArizonaStateUniversity
/SER221/week2/produce.cpp
UTF-8
7,127
3.84375
4
[]
no_license
/****************************************************** * Programmed by : Shinya Yamamoto * Created on : 17 January 2016 * Class : SER221 * Week : 2nd week * Problem : BoxOfProduce Class * * This program randamaly selects three bundles of fruits * or vegetables as an array of type stri...
true
bb0963fed97aa1f41839c4e1c420d85f5a015e90
C++
StateFromJakeFarm/compProgramming
/leetcode/google/strictly_palindromic_number.cpp
UTF-8
398
3.171875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; class Solution { public: bool isStrictlyPalindromic(int n) { // Because a number's representation in base n-2 will always be 12 (duh) return false; } }; int main() { Solution S; for (int i=4; i<=10000; i++) { if (S.isStrictlyPali...
true
3729b17c0f6a6590d990aba3832ba3dac72fc053
C++
AswinTorch/Semester1
/Assignment7.cpp
UTF-8
7,807
2.859375
3
[]
no_license
//Aswin Nair //Assignment 7: Buffon's Needle #define _USE_MATH_DEFINES #include <iostream> #include <sstream> #include "Simple_window.h" #include "GUI.h" #include "Graph.h" #include "Window.h" #include <cstdlib> #include <ctime> #include <cmath> #include <vector> using namespace Graph_lib; using namespace std; struct ...
true
7b93a040556b4e14ac5822b9173fc4881a92a4fc
C++
DYu24/Warzone
/src/player/PlayerDriver.cpp
UTF-8
2,044
3.046875
3
[]
no_license
#include "../game_engine/GameEngine.h" #include "../orders/Orders.h" #include "Player.h" int main() { // Setup Territory* t1 = new Territory("Territory1"); Territory* t2 = new Territory("Territory2"); Territory* t3 = new Territory("Territory3"); Territory* t4 = new Territory("Territory4"); Terr...
true
264997a912e5f197952642b4553b57bade928e3e
C++
TheDonsky/DumbRay
/__source__/DataStructures/GeneralPurpose/Matrix/Matrix.impl.h
UTF-8
6,034
2.75
3
[ "MIT" ]
permissive
#include"Matrix.h" /** ########################################################################## **/ /** //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// **/ /** ########################################################################## **/ template<typename Type> __device__ __host__ inli...
true
c4549a2c6284ee6931c7cddc5c6dff259d6e43c9
C++
ankitpahwa111/DSA
/StringSortSTL.cpp
UTF-8
512
3.1875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void changing(int a[], int size) { for (int i = 0; i < size; i++) a[i] = a[i] + 1; } void change(vector<int> v) { for (int i = 0; i < v.size(); i++) v[i] = v[i] + 1; } int main() { int a[3] = {0, 1, 2}; vector<int> v; for (int i = 0; i ...
true
95258b11fe106e147fc732a1957e91ddc7f26bae
C++
NeelimaGundu/CodeforcesProblemsSolutions
/ChocolateFeast.cpp
UTF-8
558
2.671875
3
[]
no_license
#include<iostream> using namespace std; int main() { int t; cin>>t; int *a=new int[t]; for(int i=0;i<t;i++) { int n,c,m,left=0,wraps=0; cin>>n>>c>>m; int choci=0; choci=n/c; wraps=choci; while(wraps!=1) { if(wraps<m)...
true
a93d77fdec73314a151c3a8f81e213f0d43807e3
C++
ucam-comparch-loki/lokisim
/src/Utility/Trace/Callgrind.h
UTF-8
4,337
2.734375
3
[ "MIT" ]
permissive
/* * Callgrind.h * * Class used to generate a trace in a format compatible with Callgrind. * * For each function executed, need a block like: * fl=<file name> * fn=<function name> * <line number> <events for this function> * cfi=<file name of called function> * cfn=<called function name> * calls=...
true
afc5959920fc375563cbb5ac68d86f95e5a2b85f
C++
vicmars5/EDA
/enclase/12-abril/Stack/include/stack.h
UTF-8
1,715
3.640625
4
[]
no_license
#ifndef STACK_H #define STACK_H #include <exception> class StackException : public std::exception { private: public: } template <class T> class Stack{ private: Node<T>* anchor; public: Stack(); ~Stack(); Stack(const Stack&); bool isEmpty(); bool isFull(); void push(const T&); ...
true
a1eb3b4eb21e0ec2ed2a840327dc5e33dc4274d1
C++
nranjan2014/mytc
/Glossary/main.cpp
UTF-8
1,940
2.65625
3
[]
no_license
#include "Glossary.cpp" int main(int argc, char **argv) { int i; class Glossary TheClass; vector <string> retval; vector <string> items; if (argc != 2) { fprintf(stderr, "usage: a.out num\n"); exit(1); } /* items = ; */ if (atoi(argv[1]) == 0) { items.push_back("Canada"); items.push_back( "Fra...
true
527595e3cc4ff1b229da7d14f1d24d1b99e1c9e6
C++
Ablyamitov/Programming
/Practice/24/c++/24/24/24.cpp
UTF-8
917
2.75
3
[]
no_license
#include<fstream> #include"json.h" #include<iostream> #include<iomanip> #include<vector> using nlohmann::json; using namespace std; int main() { int complete_work ; vector <int>all_userId; ifstream in("in.json"); json inin; in >> inin; ofstream out("out.json"); json outout = json::array(); size_t size_inin = i...
true
1b0f7ab7684698e891063abd1096cfc84cb89f1c
C++
alex1701c/KDevelopTemplates
/qt_cpp_templates/qt_cli_templates/validated_qt_cli_template/Validator.cpp
UTF-8
1,526
2.5625
3
[]
no_license
#include "Validator.h" #include <QDebug> CommandLineParseResult validateCommandLine(QCommandLineParser &parser, CommandLineValues *data, QString *errorMessage) { parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); parser.setApplicationDescription("Description..."); const QCommandLi...
true
0f6c23c4cf4491c8f57d77f50910e9f0c5a0ca8e
C++
Utkarshmalik/dailycodebase
/day11/C++/day-11.cpp
UTF-8
756
3.4375
3
[]
no_license
/** * @author Utkarshmalik * @date 06/01/2019 */ #include<iostream> using namespace std; string lcs(string str1,string str2) { //first make sure that s2 is the smaller of the two strings if(str2.size()>str1.size()) { //swap the two given strings string temp=str1; str1=str2; str2=temp; } ...
true
b37220409a4d40b8ebbcd1ec34fbe2336415d32c
C++
wusunmoon/Interview_Ex
/Linear1/Linear1/main.cpp
UTF-8
745
3.59375
4
[]
no_license
#include<iostream> #include<algorithm> #include<vector> using namespace std; bool BeSum(vector<int>& nums, int target) { sort(nums.begin(), nums.end()); //对数组排序 for (int i = 0; i < nums.size(); ++i) { if (nums[i] > target) //如果当前元素大于target,后面元素也必定大于target break; bool b = binary_search(nums.begin() + i + 1, n...
true
bfdf90ec8079d90a2bc7018bf6df4287cc10604c
C++
GoodRon/dataKeeper
/plugins/journal/JournalRequests.hxx
UTF-8
2,765
2.515625
3
[]
no_license
/* * Created by Roman Meyta 2016 <meyta@incom.tomsk.ru> * Incom inc Tomsk Russia http://incom.tomsk.ru/ */ #ifndef JOURNAL_REQUESTS_HXX #define JOURNAL_REQUESTS_HXX #include <string> #include "MsgPack_types.h" namespace journal_db { /** * @brief Сформировать запрос добавление записи * * @param sa источник *...
true
d2bf365d99f8081b7b8e0cebea24e352d0223377
C++
BCITTeamOmega/MouseCraft
/MouseCraft/Graphics/Renderable.cpp
UTF-8
2,546
2.71875
3
[]
no_license
#include "Renderable.h" #include "ModelGen.h" #include "../Core/Entity.h" #include "../Loading/ModelLoader.h" #include "../Loading/ImageLoader.h" #include "../ResourceCache.h" #include <string> #include <sstream> Renderable::Renderable() : _shininess(0.5), _smoothness(25.0) {} Model* Renderable::getModel() { retur...
true
4ee9ef9802894473365a562b6f1cc8eccb3f4e24
C++
moevm/oop
/6381/GerasimovaDV/Lab2/EllipseSector.h
UTF-8
1,085
3.234375
3
[]
no_license
#ifndef OOP_ELLIPSESECTOR_H #define OOP_ELLIPSESECTOR_H #include "Shape.h" class EllipseSector : public Shape { public: EllipseSector(Point* center, float R1, float R2, float start_angle, float end_angle, Color* color, int id); Point* getCenterPoint() override; float area() override; ostream& print...
true
0a222dcfa4c8b371aad8d1f888505aeec85ad9cb
C++
vandrw/K-armed_Bandits
/src/bandit.cpp
UTF-8
5,848
2.78125
3
[]
no_license
#include <random> #include <iostream> #include <vector> #include <cmath> #include "bandit.h" #include "distrib.h" #include "user.h" using namespace std; Bandit::Bandit(Parameters param) { algorithm = param.algorithm; K = param.K_arms; distribution = param.distrib; switch (algorithm) { case 1:...
true
60b73f903a5b80bad0a00edf658466d82c9e1457
C++
felipe241920/TALLER-NO.3
/Taller 3/Taller 3/If/Punto 2 C.cpp
UTF-8
488
3.609375
4
[]
no_license
/* * Programa: numero menor * Fecha: 21-08-2018 * Elaborado por: Felipe Henao */ #include <stdio.h> using namespace std; //Funcion principal int main(int argc, char *argv[]) { float num1,num2,num3,menor; printf("\nIngrese tres numeros para saber cual es el menor\n"); scanf("%f %f %f",&num1,&num2,&num3); if(num1...
true
5716628e05479081341cc43a641768233c90cc3a
C++
davidhwang-rtr/qt_test
/tableview/inc/flashingled.h
UTF-8
1,508
2.859375
3
[]
no_license
#ifndef FLASHINGLED_H #define FLASHINGLED_H #include <QWidget> class QTimer; class FlashingLed : public QWidget { Q_OBJECT Q_PROPERTY(double diameter READ diameter WRITE setDiameter) // mm Q_PROPERTY(QColor color READ color WRITE setColor) Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment) ...
true
742d787779192824c916e12c93bf840ddb4ed7c8
C++
NBAlexis/GiNaCToolsVC
/Code/CLN/src/integer/output/cl_I_print_string.cc
UTF-8
997
2.671875
3
[]
no_license
// print_integer_to_string(). // General includes. #include "cln_private.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/string/cl_sstring.h" namespace cln { char * print_integer_to_string (unsigned int base, const cl_I...
true
ef62f8639abaa99dc074847d5b6531debfa7c1c8
C++
pranav245/CP2_CIPHERSCHOOLS
/239.SlidingWindow My solution.cpp
UTF-8
551
2.921875
3
[]
no_license
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { deque<int> dq; int m=nums[0]; for(int i=0;i<k;i++) { if(nums[i]>m) m=nums[i]; dq.push_back(nums[i]); } vector<int> v; v.push_back(m); for(int i = k...
true
207d537575a5a18d695e9e1d3c1e2e4b330129ce
C++
romanaminov/slot_machine.
/headers/wheel.h
UTF-8
1,753
3.09375
3
[]
no_license
#ifndef WHEEL_H #define WHEEL_H #include "headers/object.h" #include <ctime> #include "headers/textureobjectmanager.h" /* Cass Wheel наслеуется от Object */ // Состояние барабана enum WheelState { _stopped, _running }; class Wheel: public Object { public: Wheel(WheelState _state, double _lb_xrf, double ...
true
5f6d97e26393a750d96b1ebb71b9e6fc894690f0
C++
imulan/procon
/aoj/vol5/0556.cpp
UTF-8
436
2.765625
3
[]
no_license
#include <cstdio> #include <iostream> #include <utility> using namespace std; int main(){ long n; int k; scanf(" %ld", &n); scanf(" %d", &k); for(int i=0; i<k; ++i){ long a, b; scanf(" %ld %ld", &a, &b); //対称性を利用して折り返し(1/8サイズになる) if(a > (n+1)/2) a=n-a+1; if(b > (n+1)/2) b=n-b+1; if(a<b) swap(a,b); ...
true
5914e9a7c99d730c4cf4741d154beae9efcfabb0
C++
TheMetabug/Fysiikkakoodaus
/Operaattorit/Operaattorit/Main.cpp
UTF-8
3,349
3.078125
3
[]
no_license
#include <iostream> #include "Vector2D.h" #include "Vector3D.h" #include "Matrix3.h" #include "Matrix4.h" #include "Quaternion.h" using namespace std; int main(void) { Vector3D vektor_1(1.f,1.f,3.f); Vector3D vektor_2(2.f,1.f,3.f); float matriisi_1[] = { 1.5f , 0.0f , 0.0f, 0.0f , 1.2f , 0.0f, 0.0f , 0.0f...
true
8e701305716ec4a6d7aad3a26597edcd72014092
C++
Assianguyen/BE_Cpp
/Tests/test_sms2/test_sms2.ino
UTF-8
1,990
2.5625
3
[]
no_license
#include <Wire.h> #include <ESP8266WiFi.h> // WiFi network info. //const char *ssid = "ViewLiteAssia"; // Enter your WiFi Name //const char *pass = "3399fc7ac862"; // Enter your WiFi Password //const char *ssid = "Gathou"; // Enter your WiFi Name //const char *pass = "12345678"; // Enter your WiFi Passwor...
true
0b85f7ababfb529252fa28dc8e09d6425830415e
C++
AdnarLozano/School
/RCCD/CSC-7/Ch7 Probability of Movement/Source.cpp
UTF-8
635
3.171875
3
[]
no_license
#include <iostream> using namespace std; float temp[20]; void CalcP(float p[], float p_m, int size) { for (int i = 0; i < size; i++) { // at loc i and didnt move or at loc i-1 and moved if (i > 0) temp[i] = p[i] * (1 - p_m) + p[i - 1] * p_m; else temp[i] = p[i] * (1 - p_m); } memc...
true
c5c3c5c03a83a5de10a57ac1d38926505335b5bc
C++
andreas-volz/pluxx
/include/pluxx/Plugin.h
UTF-8
867
2.546875
3
[ "MIT" ]
permissive
#ifndef PLUGIN_H #define PLUGIN_H #include <string> #define PLUGIN_EXPORT extern "C" namespace pluxx { /* forward declarations */ class PluginLoader; class Plugin { public: friend class PluginLoader; /*! * Warning: Never call 'new' direct on Plugin! * Use PluginLoader::loadFactory() instead to ...
true
5a7924405bdf343b9589a21ad9aafac3647cf130
C++
melaphor/Arcade-Warrior
/arkade_warrior_jun05c.ino
UTF-8
13,504
2.625
3
[]
no_license
//teensy++ code for arcade warrior //tomash ghz //www.tomashg.com #include <Bounce.h> //debugging will print out in serial instead of midi boolean debugging=false; boolean traktorrr=false; //channel number for midi messages int midiChannel=3; //pin numbers for elements int leds[3]= { 20, 21, 22 }; int buttons[1...
true
e9d922645e12f4a800c11c5ccb6c3a1e604fa281
C++
Magiczne/MidiCreator
/MidiCreator/Sequence.cpp
UTF-8
8,325
2.703125
3
[]
no_license
#include "Sequence.h" #include "SequenceNote.h" #include "SequenceFile.h" #include "SMF/StandardMIDIFile.h" #include "SMF/HeaderChunk.h" #include "SMF/Exceptions/NoTracksException.h" using namespace SMF; using namespace SMF::Exceptions; using namespace std; Sequence::Sequence() { this->name("New Sequence"); this-...
true
32c5cfc72835246434fd91363edf78b59202a53f
C++
kravtsun/au-cg
/salute/src/gl_holder.cpp
UTF-8
2,457
2.53125
3
[ "MIT" ]
permissive
#include <memory> #include <cassert> #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include "glfw_window_manager.h" #include "gl_holder.h" GLHolder::GLHolder(std::shared_ptr<GLFWWindowManager> window_manager) : window_manager(window_manager) , salutes_combiner_pass(width(), heig...
true
1adb50fda8cd824e0be78daaf5cf0b50d43a90f5
C++
Wikzo/CPP_FirstTutorials
/menu_chooser.cpp
UTF-8
658
3.84375
4
[]
no_license
// Menu Chooser // Demonstrates the switch statement #include <iostream> using namespace std; int main() { cout << "Choose a difficulty:\n\n"; cout << "1 - EASY\n2 - NORMAL\n3 - HARD\n\n"; int choice; cout << "Choice: "; cin >> choice; switch (choice) { case 1: ...
true
c7a99550192a00eab2df4abda2be7d802708d518
C++
ironiron/LCRmeter
/LCRmeter_CODE/tests/fakes/I2C_fake.hpp
UTF-8
2,840
2.703125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/* * I2C.h * * Created on: 12.05.2019 * Author: Rafa� */ #ifndef I2C_HPP_ #define I2C_HPP_ #include <stdint.h> #include <vector> /** * @class I2C * @brief This class handles communication either by DMA or blocking transmission * */ class I2C { public: I2C (){} enum ErrorCode{OK,TIMEOUT,NACK,BUS...
true
0cf9a9f0231d939302b385e228fa230c25a43902
C++
borsim/AJADEBA
/screens/subScreens/Helps/howToPlayScreen.cpp
UTF-8
1,514
2.984375
3
[]
no_license
#include "howToPlayScreen.h" howToPlayScreen::howToPlayScreen() { widgetBase* backButton=new button ((vFunctionCall)terminateSub, makeCoor(30,WINDOW_Y-80),makeCoor(150,WINDOW_Y-30),"Back",30); widgets.push_back(backButton); widgets.push_back(new lButton([](){newSub=screen::HELPII;},makeCoor(WINDOW_X-100,WI...
true
afa5b4ab000993ddd139287d7ae05d4d469f74ff
C++
paulkokos/DesignPatternsInCpp
/src/[002]SOLID Design Principles/[003]Single Responsibility Principle/source/PersistenceManager.cpp
UTF-8
309
2.65625
3
[ "BSD-3-Clause" ]
permissive
#include "../include/PersistenceManager.hpp" #include <string> #include <fstream> using std::ofstream; using std::endl; void PersistenceManager::save(const Journal &journal, const string& filename) { ofstream ofs(filename); for (auto &e: journal.getEntries()) { ofs << e << endl; } }
true
9a9d772b01d9ad01a5d0954bb48a2857fc5d6afa
C++
poilpy/RoboticsPrograms
/nameReplace.cpp
UTF-8
528
2.875
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <algorithm> using namespace std; int main(int argc, char* argv[]) { std::ifstream mystream; mystream.open("Mandela.txt"); std::string story; std::string nameToReplace(argv[1]); std::string replacingName(argv[2]); std::size_t position; while(std::...
true