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
0f1af390dae0b750777319f1dc25558cad74a4e1
C++
devadomas/cpp-piscine
/d04/ex01/PlasmaRifle.hpp
UTF-8
303
2.53125
3
[]
no_license
#ifndef PLASMA_RIFLE_HPP # define PLASMA_RIFLE_HPP # include "AWeapon.hpp" class PlasmaRifle: public AWeapon { public: PlasmaRifle(void); PlasmaRifle(PlasmaRifle const & src); virtual ~PlasmaRifle(void); PlasmaRifle & operator=(PlasmaRifle const & src); void attack(void) const; }; #endif
true
3c8c78e26d80bd131706114dd90bed2984f1681c
C++
robertsonasc/UFC-Estrutura-de-Dados
/2-trabalhos-entregues/tad/tad_ponto/Ponto2.h
UTF-8
812
3.59375
4
[]
no_license
#ifndef PONTO_H #define PONTO_H #include <iostream> #include <cmath> class Ponto { private: double x; double y; public: //Construtor padrão. Ponto(){ x = 0; y = 0; }; // Construtor Ponto(double X, double Y) { x = X; ...
true
51a70e113a8b18965cd1fe2446f675011c3fb86f
C++
sparkmxy/SJTU_Bookstore
/SJTU_Bookstore/index.cpp
UTF-8
1,637
2.734375
3
[]
no_license
#include "index.h" void multiIndex::add(keyT key, int recID) { //std::cout << "add: " << key << ' ' << recID << '\n'; auto V = L.lookup(key); if (!V.size()) { //std::cout << "New key: " << key << '\n'; indexT NewIndex(key); array A; A.push(recID); rec.push(A); NewIndex.push(rec.size()); L.push(NewInde...
true
df0e238f8a2ba23276e470020e6adb592376e90a
C++
IamBikramPurkait/My-CP-Journey
/GFG/DSA ADVANCED/9 - Strings/naive_pattern_search.cpp
UTF-8
789
3.671875
4
[ "MIT" ]
permissive
// { Driver Code Starts // C++ program for Naive Pattern // Searching algorithm #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to check if the given pattern exists in the given string or not. bool search(string pat, string txt) { // Your co...
true
4ac0a01f8a3cee1b1366e825ab5d69a844783a75
C++
Kid03/Tarea02-Delgado-SanMartin-Salgado
/tarea2/src/TCPEchoServer.cc
UTF-8
4,145
2.515625
3
[]
no_license
/* * C++ sockets on Unix and Windows * Copyright (C) 2002 * * 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 l...
true
b02223dbcd29d5c650a751a4861bf88233d2d795
C++
goDawgs18/520-Assignments
/week_6/integrator.h
UTF-8
558
2.578125
3
[]
no_license
#ifndef __INTEGRATOR_H #define __INTEGRATOR_H #include "elma/elma.h" class Integrator : public elma::Process { Integrator(std::string name) : Process(name) {} void init() {} void start() {} void update() { double newVal = 0.0; if ( channel("link").nonempty() ) { newVal = c...
true
8d593a2567178cac06a81e6ca7ba0bcf3721534b
C++
GDRH/mBot_Controller
/src/Serial.cpp
UTF-8
589
3.21875
3
[]
no_license
#include "Serial.h" Serial::Serial(){ filestream = NULL; } Serial::~Serial(){ fclose(filestream); } bool Serial::init( std::string filePath ){ filestream = fopen( filePath.c_str(), "w" ); if ( filestream ){ puts("Serial opened!\n"); return true; } //else... puts("Error : failed to initialize ser...
true
cc133bd15a92be6b8dab84fcb0d49013971d2875
C++
Hajiii88/RecordABC
/abc153_d.cpp
UTF-8
728
2.890625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define df(x) int x = in(); #define pb push_back #define eb emplace_back #define sz(x) int(x.size()) using ll = long long; using p = pair<int, int>; ll f(ll x){ if(x == 1) return 1; ll a = f(x/2); return a*2+1; } ...
true
bb951995ed43cd72a2c9ab51b2350d45a2e55dd0
C++
Oleg-E-Bakharev/Sorting
/Sorting/rbt.hpp
UTF-8
9,684
3.140625
3
[]
no_license
// // rbt.hpp // Sorting // // Created by Oleg Bakharev on 24/03/16. // Copyright © 2016 Oleg Bakharev. All rights reserved. // #ifndef rbt_hpp #define rbt_hpp #include <iostream> #include <string.h> #include <assert.h> // Красно-черное дерево. Удовлетворяет следующим условиям: // 1. Все узлы либо красные, либо ...
true
267514430b0dd31f4ac5e0cd9ec7966729bc2729
C++
Ze1598/Cpp_stuff
/learning/cpp_exceptions.cpp
UTF-8
1,199
4.5
4
[]
no_license
// This file goes over exceptions /* In C++, exception handling is done using three keywords: `try`, `catch` and `throw`. A `try` block is a block of code that includes code which is usually prone to raising exceptions. It's usually paired with a `catch` block. A `catch` block when a particular exception is thrown or ...
true
adec1354a8a13b218f5df3c5cf6f95efa76482bb
C++
oshernati22/College-projects
/ZOO System/allClasses.h
UTF-8
7,706
3.359375
3
[]
no_license
#ifndef ALL_CLASSES #define ALL_CLASSES #include <iostream> #include <cstring> #include <typeinfo> #include <fstream> using namespace std; class Animal { protected: Animal();//set the default color to GRAY and other params to 0 Animal( const char* color, int childs, float avgLifetime );//init the Ani...
true
244807f697ff3a09551493c0de7c9276e9a0ea12
C++
dicksonchum/DC-blackjack
/BlackJack/Hand.hpp
UTF-8
638
2.625
3
[]
no_license
// // Hand.hpp // BlackJack // // Created by Dickson Chum on 2018-12-26. // Copyright © 2018 Dickson Chum. All rights reserved. // #ifndef Hand_hpp #define Hand_hpp #include <stdio.h> #include <vector> #include "Card.hpp" #include "Deck.hpp" //using namespace std; class Hand{ public: Hand(); void start...
true
cf9872b8830fc5f91473dc84545421fb8e3b800e
C++
msalamat/PageRank
/matrix.cpp
UTF-8
8,759
3.546875
4
[]
no_license
// // Created by Mohammad Salamat on 2019-01-28. // #include <iostream> #include <iomanip> #include <cmath> #include <numeric> #include "matrix.hpp" /** * A helper method. * * Determines whether a number is a square number * @param n the number in question * @return true, whether or not it is square */ bool isS...
true
b1610087cfde94837fd1be3cb1dbcd7c17ffcc8a
C++
karajensen/cloth-simulator
/ClothSimulator/mesh.h
UTF-8
6,416
2.59375
3
[]
no_license
//////////////////////////////////////////////////////////////////////////////////////// // Kara Jensen - mail@karajensen.com - mesh.h //////////////////////////////////////////////////////////////////////////////////////// #pragma once #include "pickablemesh.h" #include "callbacks.h" class Picking; class IOctree; c...
true
ed41164390f2fe2fc034d5ad7669b6cb7f5eff06
C++
Makos63/CocktailPro
/src/main/VorhandeneZutaten.h
UTF-8
2,569
3.015625
3
[]
no_license
//@(#) VorhandeneZutaten.h #ifndef VorhandeneZutaten_H_H #define VorhandeneZutaten_H_H #include <string> #include <unordered_map> #include <vector> #include <list> #include <fstream> #include <cstdlib> // fuer exit() unter Linux #include <iostream> #include <sstream> /** * @class VorhandeneZutaten * @brief Class...
true
11020354cff0cedebe737e4465b0227aa84c6611
C++
dgarciama/Primers-programes-Arduino
/05. Comunicació Sèrie Avançada/Prog.01/Prog.01.ino
UTF-8
1,125
2.53125
3
[]
no_license
/********************************************************************************** ** ** ** TÍTOL: 05. Comunicació Sèrie Avançada - Prog.01 ** ** ...
true
4134eac13a8ea45f67ccf5b9cf71836a939b98e3
C++
datracker/Evolutionary-Comp
/my_eval.cpp
UTF-8
433
3.296875
3
[]
no_license
#include <iostream> using namespace std; string eval(int* x); int main (){ string result = eval(x); } string eval(int* x){ int sum = 0; for (int i = 0; i < 20; i++){ if (i%2 == 0 and x[i] == 1){ sum ++; } } for (int i = 20; i < 50; i++){ if (i%2 == 1 and x[i] == 0){ sum ++; } } if(x[23] and x ...
true
5515f6db38f1e1eeec9c533b3c41131d7ca3a058
C++
dg8fv2010/LeetCode
/238.cpp
UTF-8
1,255
3.8125
4
[]
no_license
// 基本思路是用两个数组left和right,left保存从最左侧到当前数之前的所有数字的乘积,right保存从最右侧到当前之后的所有数字的乘积, // 然后,结果数组就是把这两个数组对应位置相乘即可 class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { int len=nums.size(); vector<int> res; if (len<2) return res; vector<int> l; l.resize(len); ...
true
c442cafd2b43293642ebe19cc81d40c86c93c653
C++
dishankgoel/CodeChef-Solutions
/binadd.cpp
UTF-8
1,275
2.515625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int t;scanf("%d", &t); while(t--){ string a,b; cin>>a>>b; int ans = 0; if(b != "0"){ int n1 = a.length(); int n2 = b.length(); if(n1 > n2){ string to_append(n1-n2, '0'); ...
true
5dfd3f3662e123d0035f0c726c6eb82b4823ea6a
C++
vortydev/tp2-prog-a2020
/TP2/assetManager.cpp
ISO-8859-1
821
2.921875
3
[]
no_license
/* * Author: tienne Mnard * Date: 26/11/2020 * File: assetManager.cpp * Description: Dfinition des mthodes de l'assetManager. */ #include "assetManager.h" //load la texture et la met dans la map void assetManager::loadTexture(string name, string fileName) { Texture tex; if (tex.loadFromFile(fileName)...
true
67b258b517f1236de5100b9d8d08faee69544634
C++
zhangyaqi1989/Python-Code-for-Competitive-Programming
/code/ch2/ch2_01_array_vector.cpp
UTF-8
761
3.703125
4
[ "MIT" ]
permissive
#include <cstdio> #include <vector> using namespace std; int main() { int arr[5] = {7,7,7}; // initial size (5) and initial value {7,7,7,0,0} vector<int> v(5, 5); // initial size (5) and initial value {5,5,5,5,5} printf("arr[2] = %d and v[2] = %d\n", arr[2], v[2]); // 7 and 5 for (in...
true
07f87809d094e9ef4b682828f51698011faeeb9b
C++
anaguma2261/programming_study
/src/1_6_2.cpp
UTF-8
382
2.5625
3
[]
no_license
#include <cstdio> #include <algorithm> #include <vector> using namespace std; int L = 10; int n = 3; int x[] = {2, 6, 7}; void solve() { int minT = 0; for(int i=0; i<n; i++){ minT = max(minT, min(x[i], L - x[i])); } int maxT = 0; for(int i=0; i<n; i++){ maxT = max(maxT, max(x[i], L - x[i])); } ...
true
9b670e7ae8fc054a0ecd8eb2d3d839448c76e003
C++
Slidejiveman/Programming1
/programming2Lab1/programming2Lab1/BubbleSort.cpp
UTF-8
1,232
3.578125
4
[]
no_license
#include <iostream> #include <fstream> using namespace std; //function prototypes void sortArray(int[], int); void showArray(const int[], int, ofstream&); int main() { const int SIZE = 6; ofstream outputFile; outputFile.open("prgmAsn1.txt"); //array of unsorted values int values[SIZE] = { 7, 2, 3, 8, 9, 1 }; ...
true
abb568873098ccbeaf4fcfe2687121f9ae1a3b60
C++
DryRun/PFGAnalysis
/src/RBXMap.cc
UTF-8
9,116
2.640625
3
[]
no_license
#include "HCALPFG/PFGAnalysis/interface/RBXMap.h" #include <string> #include <cstring> #include <vector> #include <iostream> #include <fstream> #include <sstream> #include <algorithm> #include <iterator> RBXMap::RBXMap(): m_hash_map_rbxstring ( 1600000, std::string("") ), m_hash_map_rbxnumber ( 1600000, -1 ), m...
true
b0169f083e7bf98916d022d11202657b48bf9b7a
C++
samarcodes/Cpp-STL
/algorithms/sort.cpp
UTF-8
436
3.875
4
[]
no_license
#include<iostream> #include<algorithm> using namespace std; bool compare(int a, int b) { return a > b; } int main() { int a[] = {5, 2, 4, 3, 1}; int b[] = {5, 4, 3, 2, 1}; int n = 5; sort(a, a + n); //ascending order sort(b, b + n, compare); //descending order using a comparator for (int i = 0; i < n; i++) ...
true
2a930f8386ea0e4d2209b7d707a959c70af4e051
C++
HouCongCN/LeetCode_exercise
/771.宝石与石头.cpp
UTF-8
671
2.703125
3
[ "MIT" ]
permissive
/* * @Author: HouCong * @Date: 2020-01-10 01:00:38 * @LastEditTime : 2020-01-10 01:07:51 * @Description: file content * @FilePath: \LeetCode_exercise\771.宝石与石头.cpp */ /* * @lc app=leetcode.cn id=771 lang=cpp * * [771] 宝石与石头 */ // @lc code=start #include <string> #include <set> using namespace std; class So...
true
d1b91f3972c6b41ccb5939b655796bbf4f0dfcd6
C++
fmidev/smartmet-library-spine
/spine/HTTPAuthentication.cpp
UTF-8
3,687
2.546875
3
[ "MIT" ]
permissive
#include "HTTPAuthentication.h" #include <boost/algorithm/string/case_conv.hpp> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/split.hpp> #include <macgyver/Base64.h> #include <macgyver/Exception.h> #include <macgyver/TypeName.h> namespace ba = boost::algorithm; namespace SmartMet { ...
true
c5e33a4c2edbb408b7c5bc3cd8ba76da5f0ad7e8
C++
zvova7890/lg-phone-develop
/gcc/Sources/LampFM/Core/TimerCounter.cpp
UTF-8
1,048
3.109375
3
[]
no_license
#include "TimerCounter.h" TimerCounter::TimerCounter(int initial_cout) : m_value(initial_cout), m_status(0) { m_comp = [](TimerCounter *tc) { if(tc->value() > 65536) return true; return false; }; m_vop = [](TimerCounter *tc) -> int { return tc->value()+1; ...
true
2434417be4c95a036c4072440385c1077f8037ca
C++
hwangyukr/hwangyurithm
/DRAGON.cpp
UHC
1,217
2.984375
3
[]
no_license
// 4ð ̻, #include <iostream> #include <vector> #include <string> using namespace std; typedef long long int INT; const int MAXN = 50; string FX = "FX"; INT nFunc(INT level) { // ̸ 迭 ð ! if (level == 0) return 1; return nFunc(level-1) * 2 + 2; } char Func(string words, int n, INT &m) { if (n...
true
7d0d6b34816a47c7f126adddd24bcc3029dfd31a
C++
ekesel/450DSA
/C++/Linked_List/detect and remove loop.cpp
UTF-8
1,152
3.46875
3
[ "Apache-2.0" ]
permissive
#include <bits/stdc++.h> using namespace std; struct Node{ int data; Node* next; Node(int x){ data=x; next=NULL; } }; void detectRemoveLoop(Node* head) { Node *slow = head, *fast = head; while (fast!=NULL && fast->next!=NULL) { slow = slow->next; fast ...
true
7f20ef3ddc99204d0589b5af941850262fe43b25
C++
lgkimjy/Control
/Impedance/Impedance.ino
UTF-8
2,398
2.65625
3
[]
no_license
#include <TimerFive.h> //Pin define #define MA_DIR 12 #define MA_PWM 10 #define PT_ENC A0 #define PT_REF A1 #define LED 3 // Global variables int loop_flag = 0; int loop_chk = 0; unsigned int t5_index = 0; unsigned int first_t = 1; int enc_val; int ref_val; // variables for Control int err_k = 0; int err_k...
true
c11a02f69afda2f9af1c3a29662286de34cf5a15
C++
leftCoast/Arduino
/Double_blink_test/Double_blink_test.ino
UTF-8
6,419
2.921875
3
[]
no_license
#include "blinker.h" #include "idlers.h" class delayWave : public blinker { public: enum waveState { startingUp, changingDelay, sitting, running }; delayWave(int pin1,int pin2,float pulseMs,float periodMs,float delayMs); ~delayWave(void); void s...
true
30c79fa2a5791fccacb883a893844a67b5db3877
C++
zcxsythenew/AVLTree
/AVLTree/Binary_node.h
UTF-8
113
2.546875
3
[]
no_license
#pragma once template <class Entry> struct Binary_node { Entry data; Binary_node *left; Binary_node *right; };
true
a6caaf316d570e58d72feff239bfcf615b219a0a
C++
AnibalSiguenza/effectiveModernCppNotes
/item12-sideKnowledge.cpp
UTF-8
1,590
3.484375
3
[]
no_license
// In item 12 is also discused the concept of reference qualifier, but since // it's quite independent I decided to explain it in this file #include <bits/stdc++.h> #include "TestClass.hpp" class Foo { private: TestClass tc; public: Foo(std::string name) : tc(name){}; TestClass &getData() { return tc; } ~F...
true
a88ad1877c649e1561cb551c9f9692213d61a861
C++
LiseR18/Knocki
/Code/eeprom_test.ino
UTF-8
976
3.171875
3
[]
no_license
#include <EEPROM.h> int eeprom_readout[] = {}; void setup() { Serial.begin(9600); //Commenter et décommenter les lignes pour écrire ou lire la mémoire //writeInts(); readInts(); } void loop() { // put your main code here, to run repeatedly: } void writeInts() { int addr = 0; //l'adresse de l'octet cour...
true
3649039c294083907f1a2405506677c25c08b8c6
C++
yisea123/Automa
/AutomaLib/include/DLine.h
BIG5
724
2.59375
3
[]
no_license
#pragma once #include "Coordinate.h" #include <Math.h> namespace AutoLib { class DLine { public: DLine(void); ~DLine(void); DCoordinate PA,PB; double GetAtan(); DLine Rotation(const double dblS); double GetLength(){return sqrt((PA.x-PB.x)*(PA.x-PB.x)+(PA.y-PB.y)*(PA.y-PB.y));}; DCoordinate GetCenter(){return DCo...
true
d5d15e3944a1de0c4a44bbf41e0f1164b096c00e
C++
sikey647/algorithm008-class01
/Week_03/practice/SingleNumberIII.cpp
UTF-8
571
3.109375
3
[]
no_license
/* * @lc app=leetcode.cn id=260 lang=cpp * * [260] 只出现一次的数字 III */ // @lc code=start #include <vector> using namespace std; class Solution { public: vector<int> singleNumber(vector<int>& nums) { vector<int> res(2, 0); int mask = 0, diff = 0; for (auto num : nums) mask ...
true
473f7087543e5d684c1c8a289a225dab3f02443f
C++
Frapschen/Cdamo
/C progarm project/PracticeMain.cpp
GB18030
1,918
2.96875
3
[]
no_license
//ϵͳͷļ #include "stdio.h" #include "conio.h" #include "stdlib.h" //Զͷļ #include "HeadFile/practice1.h" #include "HeadFile/practice2.h" #include "HeadFile/practice3.h" #include "HeadFile/practice4.h" #include "HeadFile/practice5.h" #include "HeadFile/practice6.h" #include "HeadFile/practice7.h" #include "H...
true
124725e1e03846406e73a54f33294e08b29facf8
C++
nickamor/fruitconda
/src/gameplay.cc
UTF-8
17,353
2.609375
3
[ "MIT" ]
permissive
/* * gameplay.c * * Created on: Aug 30, 2011 * Author: nick */ #include "gameplay.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "state.h" #include "util.h" #include "menu.h" #include "input.h" #define GAME_PI 3.141592 char *pausemenu_items[2] = {"Retry",...
true
d9dfcc9b879d45407dc5decb751b4c4ced70d498
C++
MoonJam/MoonJamRelayServer
/src/Helpers.cpp
UTF-8
2,192
2.953125
3
[]
no_license
#include "Helpers.h" #include <random> #include <fstream> #include <sstream> #include <cstdio> #include <iostream> #include <cstring> #include <filesystem> #include <algorithm> namespace fs = std::filesystem; std::string randomString(int length) { static auto& characters = "0123456789abcdefghijklmnopqrstuvwxyzAB...
true
c2cf434f1dc519941cc08bb6be101f5366ca5ac3
C++
keith-skinner/robotics
/demo/alpha.ino
UTF-8
894
3.078125
3
[]
no_license
/* ** The alpha-bot has: ** - straight-ahead vision (can only detect prey directly in front of it) */ #include "common.h" typedef enum { SCOUT, CHASE } mode_t; /* ** The beta-bot sprints in the direction of the beta. ** ** Note: If it stays in chase mode for more than 5 seconds, ** it runs out of energy and lose...
true
eaf43aec8e236596b57eb51d10d2e4d9fcc8af06
C++
fieryheart/LearningRenderer
/Shaders/PhongShader.h
UTF-8
1,973
2.59375
3
[]
no_license
#ifndef __PHONGSHADER_H_ #define __PHONGSHADER_H_ #include "shader.h" namespace QGL { class PhongShader : public Shader { public: StrangeModel *model; Matrix uniform_mat_obj2view; Matrix uniform_mat_transform; Matrix uniform_mat_norm_transform; Vec3f uniform_camera; Vec3f uniform_light; ...
true
cc9afae6bfa301a8b2251b0727256a6e35664815
C++
catree/lbcpp
/include/ml/DoubleVector.h
UTF-8
14,638
2.59375
3
[]
no_license
/*-----------------------------------------.---------------------------------. | Filename: DoubleVector.h | Base class for Double Vectors | | Author : Francis Maes | | | Started : 03/02/2011 16:10 | | `---...
true
c50cd1d9a9bdb988b903a114f2f19778db07af01
C++
dtbinh/com-vision
/DetectMouvement/control.cpp
UTF-8
6,354
2.71875
3
[]
no_license
#include <iostream> #include <stdio.h> #include "control.h" #include <string> #include <stdlib.h> #include <dirent.h> #include "kalman.h" using namespace cv; using namespace std; #define GRAY_LEVEL 256 #define CMD_FOND "fond" #define CMD_DETECT "detect" Control::Control(){} /* Permet de séparer le nom des fichiers...
true
a2bf6fb68248a383426419415c5ebf5a605a8dbb
C++
Pattywu20031224/cpp
/YTP/停課.cpp
UTF-8
1,016
2.921875
3
[]
no_license
#include<iostream> #include<vector> using namespace std; struct Class{ int count; int positive; }; struct School{ int count; int positive; vector<Class> classes; }; int main(){ int ns, susp_students=0; cin>>ns; vector<School> school(ns); for(int i=0; i<ns; i++){ int nc; int total_susp=0, susp_schools=0, to...
true
b8f3bd99cbe8ba0e2cd9bf287e7a94f6fb44a0f5
C++
ysdeal/LeetCode
/permuteUnique.h
UTF-8
955
3.5
4
[]
no_license
/** Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2], [1,2,1], and [2,1,1]. */ class Solution { public: vector<vector<int> > permuteUnique(vector<int> &num) { // Note: The Solution o...
true
ab8dbf6c95117a7cc030ae21fc8438f9b3bede16
C++
Xuchaoxiong/PAT
/B1011/B1011/B1011.cpp
GB18030
598
2.984375
3
[ "Apache-2.0" ]
permissive
// B1011.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include <iostream> #include <vector> using namespace std; struct NumStruct { long A; long B; long C; }; int main() { int n; cin >> n; NumStruct *NumMass = new NumStruct [n]; for (int i = 0; i < n; i++) { cin >> NumMass[i].A; cin >> NumMass[i].B; cin >> NumMas...
true
902009fc0b69dca7ee7831267fc2c4d317e3c322
C++
UG-SEP/Data-Structure-and-Algorithms
/Leetcode/Unique Paths/Unique Paths withput DP.cpp
UTF-8
1,868
3.5625
4
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; /* The code utilises the similarity of the problem to pascal's triangle and hence uses nCr [N Combinations from R] formula to get the solution without the use of DP. Here is the Pascals Triangle: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 The DP grid constructed containi...
true
4aba654e0b9ba80fd9c14cb4c89a7d7540a7c3fe
C++
toasti1973/TurboMath
/TurboMath/Matrix.h
WINDOWS-1250
15,520
2.640625
3
[ "MIT" ]
permissive
// ------------------------------------------------------------------- // File : Matrix // // Project : TurboMath // // Description : Class for Matrix // // Author : Thorsten Polte // ------------------------------------------------------------------- // (c) 2011-2020 by Innovation3D-Studios // -------------------...
true
0e83ee1d1ae9f3918046d776524acec25b3e6a56
C++
Filip-Novak/finding-perfect-matchings
/rekurzia/ba-graph/include/algorithms/object_collection/generation.hpp
UTF-8
4,942
2.59375
3
[]
no_license
#ifndef BA_GRAPH_ALGORITHMS_OBJECT_COLLECTION_GENERATION_HPP #define BA_GRAPH_ALGORITHMS_OBJECT_COLLECTION_GENERATION_HPP #include <string> #include <algorithms/isomorphism/isomorphism.hpp> #include <algorithms/isomorphism/isomorphism_nauty.hpp> #include <io/graph6.hpp> #include <operations/copies.hpp> using namespa...
true
1550f9a5df0e2a7c04d7fa0e6132288edeefcac8
C++
Luzio5/Programacion-2
/tarea3/src/cadena.cpp
UTF-8
16,939
3.203125
3
[]
no_license
/*4307385*/ #include "../include/cadena.h" #include "../include/info.h" #include <stddef.h> #include <stdio.h> #include <assert.h> struct nodo { info_t dato; nodo *anterior; nodo *siguiente; }; struct rep_cadena { nodo *inicio; nodo *final; }; /* Devuelve la cadena_t vacía (sin elementos). */ cadena...
true
5728070d948c92cf2abd594f52d3378baf981569
C++
MDOUBRE/Embedded-Projects
/Streamdeck/streamdeck_arduino/test_streamdeck.ino
UTF-8
1,734
2.515625
3
[]
no_license
#include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <Keypad.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 32 // OLED display height, in pixels #define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) #define SCREE...
true
b176b2315dfb3ba46302e089e7ea67502ae37aaa
C++
rickarkin/PyMesh-win
/tools/MeshUtils/FinFaceRemoval.h
UTF-8
1,505
2.734375
3
[]
no_license
/* This file is part of PyMesh. Copyright (c) 2015 by Qingnan Zhou */ #pragma once #include <Core/EigenTypedef.h> namespace PyMesh { /** * This class removes duplicated triangle faces. * Two faces are duplicates of each other if they consist of the same 3 * vertices. */ class FinFaceRemoval { public: ...
true
ed9e64f2694603f8a371b2b068ed1f476acb54bc
C++
hicdre/skiaui
/skia/experimental/Intersection/QuadraticBezierClip.cpp
UTF-8
2,690
2.578125
3
[ "BSD-3-Clause" ]
permissive
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "CurveIntersection.h" #include "CurveUtilities.h" #include "LineParameters.h" #include <algorithm> // used for std::swap #define DEBUG_BEZIER_CLIP 1 // return false ...
true
0d85d5b440915492a9c52886854220a22b114d73
C++
eelfgnc/Object-Oriented-Programming1-Lab.
/Lab 05/Quiz5/Automobile.cpp
UTF-8
814
2.96875
3
[]
no_license
#include "Automobile.h" #include"Vehicle.h" /** *\brief Yapici Fonksiyon *\param passengerCount: Aracin yolcu sayisina esit olur. *\param productionYear: Aracin uretim yilina esit olur. *\param tireCount: Aracin tekerlek sayisina esit olur. *\param maxSpeed: Aracin maksimum hizina esit olur. */ Automobile::Aut...
true
702b4755f2189e9fae26206358a35c63f400c0e6
C++
amillerbrowne/BUCommunityApp
/DataBase/Colleges/don't touch/getColleges.cpp
UTF-8
984
3.09375
3
[]
no_license
//created by Nicholas Maresco 3/5/15 #include <iostream> #include <fstream> #include <string> using namespace std; int main() { string line; int name_start, name_end, size, line_number = 1; ifstream raw_college_file("raw_BUColleges.txt"); ofstream official_college_file ("BUColleges.txt"); //check successful file op...
true
a78e13424e567212ed9dde66ee15b33859e0e312
C++
dheerwani/competetive_coding
/2_d_array/suffix_sum_matrix.cpp
UTF-8
696
2.578125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { int r,c; cin>>r>>c; int a[r][c]; for(int i=0;i<r;i++) { for(int j=0;j<c;j++) { cin>>a[i][j]; } } int suffsum[r][c]; suffsum[r-1][c-1] = a[r-1][c-1]; for(int i=r-2;i>=0;i--) { suffsum[i][c-1] = suffsum[i+1][c-1] + a[i][c-1]; } for(int i=c...
true
9d84bb240502770fb3fc528f17e9d9c6dcb325e7
C++
ptokponnon/Utils
/StackT.hpp
UTF-8
714
2.75
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: StackT.hpp * Author: parfait * * Created on 26 septembre 2018, 16:10 */ #ifndef STACKT_HPP #define STACKT_HPP #in...
true
d3e712ea991c47e1dceb3c10bff0d153266a5334
C++
tyhenry/ofxPointCloudLibrary
/src/ofxPointCloudLibrary/Types.hpp
UTF-8
1,746
2.703125
3
[ "MIT" ]
permissive
#pragma once #include "ofMain.h" #include "ofxPointCloudLibrary/Common.hpp" namespace ofxPointCloudLibrary { // Point using Point = pcl::PointXYZ; // Point Cloud using PointCloud = pcl::PointCloud<pcl::PointXYZ>; struct PointCloudData { PointCloudData() {} PointCloudData( const PointCloud& pc ) : nPoints( p...
true
b511b27f897b6a27800542391d6f7937b85bd141
C++
veedee2000/Competitive-Programming
/GeeksForGeeks/Interview/Math/LCM.cpp
UTF-8
741
3.125
3
[]
no_license
long long f(int base,int exp){ if(exp == 0) return 1; else if(exp&1) return base * f(base,exp / 2) * f(base,exp / 2); else return f(base, exp / 2) * f(base, exp / 2); } long long getSmallestDivNum(long long n){ long long ans = 1; vector<int> primes = {2,3,5,7,11,13,17,19,23}; vector<int>v(prime...
true
cd410fde47db1967cf7d39caef42e1e31ae2c996
C++
stonesha/UNR-CS
/CS 202/PA4_Sha_Stone/Agency.h
UTF-8
696
2.921875
3
[]
no_license
#ifndef AGENCY_H #define AGENCY_H #include "func.h" #include "Car.h" class Agency { public: Agency(); //GET AND SET FUNCTIONS ============================== char *getName(); int getZipcode(); void setName(char temp[MAX_CHAR]); void setZipcode(int temp); //=...
true
950d7aae30d43414258c38360815e3ec54da7cc2
C++
AlbertPuwadol/2D-Data-Communication
/Assign/Test/ServoV2.5/ServoV2.5.ino
UTF-8
1,480
2.8125
3
[]
no_license
#include <Servo.h> Servo myServo; char order; void rotateR45() { int detect = myServo.read(); for (int i = detect; i > detect - 45; i--) { myServo.write(i); delay(50); } Serial.print("c"); } void rotateAll45(int dest) { int detect = myServo.read(); if (detect <= dest) { for (int i = detect; i <=...
true
34f823f369b3c319e552b5f1f8d9420a67314f17
C++
leandrovianna/programming_contests
/lib/fenwick.cpp
UTF-8
380
2.515625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; const int N = 2*1e5+10; int bit[N]; // execute the query [1, x] int query(int x) { int s = 0; while (x) { s += bit[x]; x -= (x & -x); } return s; } // execute the update [1,x] void update(int x, int v) { while (x <= N) { bit[x] += v; x += (x & -x); } } ...
true
ec59bafcbdd56088b4caa0f354d742912234b9b3
C++
bzxing/container_benchmark
/src/main.cpp
UTF-8
2,666
3.0625
3
[]
no_license
#include <algorithm> #include <iterator> #include <memory> #include <set> #include <string> #include <unordered_set> #include <boost/container/flat_set.hpp> #include "profiler.hpp" #include "rand_gen.hpp" using INT_TYPE = uint64_t; static constexpr INT_TYPE seed = 1; static constexpr INT_TYPE rand_range = 20...
true
99d88dc631744220fa315c4c9bf16af1bedd4767
C++
RosinaGeorgieva/ObjectOrientedProgramming2021
/Practicum/week 10/MultipleInheritanceTest/Source.cpp
UTF-8
1,370
3.640625
4
[]
no_license
#include <iostream> // закоментирайте необходимото за всяка подточка class BaseClass1 { public: int a; BaseClass1() { a = 1; } BaseClass1(int a) { this->a = a; } BaseClass1(const BaseClass1& rhs) { a = rhs.a; } BaseClass1& operator=(const BaseClass1& rhs) { if (this != &rhs) {...
true
3211d60cfd104f0c33cb68f241720ff24077ac55
C++
gauzinge/MSSD_Analysis
/src/annealing.cc
UTF-8
1,631
2.609375
3
[]
no_license
// // annealing.cc // // // Created by Georg Auzinger on 04.12.12. // // #include <stdio.h> #include <stdlib.h> #include "TROOT.h" #include "TStyle.h" #include "TColor.h" #include "TLegend.h" #include "TMath.h" #include "TF1.h" #include "TCanvas.h" #include "TGraph.h" #include "TMultiGraph.h" #include "TAxis.h" #i...
true
27e1ad388f6028015fe5bee0f0df08582d8ada69
C++
Stektpotet/gloom
/gloom/src/overkill/graphics_internal/IndexBuffer.hpp
UTF-8
1,101
2.8125
3
[ "MIT" ]
permissive
#pragma once #include <glad/glad.h> #include "../gfx.h" template<typename TIndex> class IndexBuffer { private: GLuint id; public: IndexBuffer(const GLsizeiptr count, const TIndex* data = nullptr) : count{ count } { glGenBuffers(1, &id); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, id); glBufferData(GL_ELE...
true
e9a15a151304ab661401aa70ead97b6e0568b539
C++
minhnh/hbrs_courses
/15w_air/assignment03/include/environment.hpp
UTF-8
697
2.859375
3
[]
no_license
#ifndef ENVIRONMENT_HPP #define ENVIRONMENT_HPP enum CellType { CELL_DIRT = 0, CELL_SPACE = 1, CELL_START = 2, CELL_OBSTACLE = 3 }; class Environment { public: Environment(); void run(); int load_map(int map_index); void initialize_map(); char get_value_at(...
true
e4d2c5c70ac329393a4c08e70745c5ab40094290
C++
andriy-kuz/Algorithms
/Decrease-and-Conquer/Algos.cpp
UTF-8
1,847
3.515625
4
[]
no_license
#include <iostream> #include <vector> using namespace std; int BinarySearch_NonRec(const vector<int>& Ar, int k); int TernarySearch_NonRec(const vector<int>& Ar, int k); int MultyplicationLaRus(int n, int m); int LomutoPartition(vector<int>& Ar, int l, int r); int QuickSelect(vector<int>& Ar, int l, int r, int k); i...
true
e78e79c762499a7945abbbb1e7e81d8442c66a3d
C++
twolffpiggott/C-Apollonian-Gasket
/include/point2d.h
UTF-8
2,242
3.765625
4
[ "MIT" ]
permissive
/* * point2d.h * * Created on: 27 Apr 2015 * Author: Tim */ #ifndef POINT2D_H_ #define POINT2D_H_ #include <iostream> #include <cmath> using namespace std; //defining the 2D point class /** * \brief A point in \f$\mathbb{R}^2\f$ */ class Point { //overloaded friend operators /** * \brief Overload...
true
d85a57d2440b7871e115039b9816100abb48e437
C++
fushime2/competitive
/AOJ/aoj0511.cpp
UTF-8
390
2.671875
3
[]
no_license
#include <iostream> #include <algorithm> #include <map> #include <vector> #include <string> #include <cstdio> #include <cmath> using namespace std; int main(void) { bool f[31] = {0}; for(int i=0; i<28; i++) { int a; cin >> a; f[a] = true; } for(int i=1; i<=30; i++) { if...
true
116b9fe5be7cc9783ade10d2f8b3891607622c18
C++
alexandraback/datacollection
/solutions_6404600001200128_1/C++/juanplopes2/A.cpp
UTF-8
545
2.703125
3
[]
no_license
#include <iostream> using namespace std; int T[10010]; int main() { int test=0, tests; cin >> tests; int N; while(cin >> N) { for(int i=0; i<N; i++) cin >> T[i]; int MD = 0; int A1 = 0; for(int i=1; i<N; i++) { A1 += max(T[i-1]-T[i], 0); ...
true
8c508c5acbf9a6a2a519f26c297c92a30b625772
C++
leisheyoufu/study_exercise
/algorithm/leetcode/106_Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal/main.cpp
UTF-8
1,641
3.6875
4
[]
no_license
/* Construct Binary Tree from Inorder and Postorder Traversal Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. */ #include<iostream> #include<string> #include<vector> #include<algorithm> #include<queue> #include<stack> #include...
true
70f013c511ea85466b99d1a33db36dac6cecffbd
C++
bestcobe/common-c-library
/livechatmanmanager/LCTextItem.h
UTF-8
451
2.546875
3
[]
no_license
/* * author: Samson.Fan * date: 2015-10-21 * file: LCTextItem.h * desc: LiveChat文本消息item */ #pragma once #include <string> using namespace std; class LCTextItem { public: LCTextItem(); virtual ~LCTextItem(); public: // 初始化 bool Init(const string& message, bool isSend); public: string m_message; //...
true
6d824b5112d1a73cb875a99328ab24b58c626d1d
C++
mishra-sid/HarryPotter
/Harry/Window.cpp
UTF-8
1,346
2.859375
3
[]
no_license
#include "Window.h" #include "Error.h" #include <iostream> Window::Window() { } Window::~Window() { } int Window::createWindow(std::string windowName, int screenWidth, int screenHeight, unsigned int currentFlags) { Uint32 flags = SDL_WINDOW_OPENGL; if (currentFlags & INVISIBLE) flags |= SDL_WINDOW_HIDDEN; if...
true
20686a5049807bb472529a718120802152f3cb5c
C++
edgar-323/leetcode
/MajorityElement.cpp
UTF-8
1,878
3.828125
4
[]
no_license
/* Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊n/2⌋ times. You may assume that the array is non-empty and the majority element always exist in the array. Example 1: Input: [3,2,3] Output: 3 Example 2: Input: [2,2,1,1,1,2,2] Output: 2 */ class Solut...
true
40b730bd1f3354f78aa28d0b09e57312ec69ceaf
C++
shsanek/Black-Betty
/DTR/DTRRangeLexem.cpp
UTF-8
709
2.671875
3
[]
no_license
// // DTRRangeLexem.cpp // DTR // // Created by Alexander Shipin on 12/08/16. // Copyright © 2016 Alexander Shipin. All rights reserved. // #include "DTRRangeLexem.hpp" using namespace DTR; RangeLexem::RangeLexem(char startSymbol,char endSymbol) { if (startSymbol <= endSymbol) { this->startSymbol = st...
true
3c9c5820dc30320914fd4964ff56e28477cb451b
C++
Yutong-Dai/codes-for-courses
/cpp_CS225/daily-exercise/day39-hashing/potd-q39-clean/Hash.cpp
UTF-8
332
2.71875
3
[ "MIT" ]
permissive
#include <vector> #include <string> #include "Hash.h" using namespace std; int hashFunction(string s, int M) { // Your Code Here //hash function to sum up the ASCII characters of the letters of the string } int countCollisions (int M, vector<string> inputs) { int collisions = 0; // Your Code Here return co...
true
eb22b3087a7c665fa9d871f73c43128bf36457b1
C++
ProgramSnail/tp_game
/src/game/map_entities/cell.hpp
UTF-8
478
2.875
3
[]
no_license
#pragma once namespace map { enum class CellType { none, unit, weapon, forest, moutain }; enum class CellPlayer { none, player0, player1, player2, player3 }; struct Cell { CellType type; CellPlayer pla...
true
f90ff4c211a9879a97e43dc475a738dd46f70d3f
C++
furyanaor/ExpExpert
/MFC V2/blue_card.h
UTF-8
1,352
2.796875
3
[]
no_license
#pragma once #include "card.h" class blue_card : public card { private: int blue_stamina; int blue_energy, blue_energy_temp; int blue_attack; //int blue_defence; //int blue_spell2; //int blue_power; int blue_attx; //int blue_defx2; public: blue_card() : blue_attack(0), blue_attx(0) { card_...
true
e77e19b9e1dd45a67755540d848163dfb1301b01
C++
Redleaf23477/ojcodes
/codejam/2018-1C/word.cpp
UTF-8
2,775
2.546875
3
[]
no_license
// #include <bits/stdc++.h> #define endl '\n' #define int ll using namespace std; typedef long long ll; struct Node { char ch; ll leafcnt; Node *nxt[26]; Node(char ch):ch(ch), leafcnt(0) { for(int i = 0; i < 26; i++) nxt[i] = NULL; } }; int n, len; vector<set<char>> charset; vector<st...
true
c29e282262e846714f589a826ba87509a5aeb2ef
C++
sundsx/RevBayes
/src/revlanguage/datatypes/basic/Natural.h
UTF-8
3,534
3.1875
3
[]
no_license
#ifndef Natural_H #define Natural_H #include "Integer.h" #include <ostream> #include <string> namespace RevLanguage { class RealPos; /** * Primitive type for Natural numbers (including 0). * * Note that we derive this from Integer. To make * sure inheritance is safe, we restrict the r...
true
6c121cd43ef5025bca2a9b70edef79f9df67a593
C++
tomwhy/Rockstar
/Rockstar/Null.cpp
UTF-8
2,699
3.34375
3
[]
no_license
#include "Null.h" #include "Number.h" #include "String.h" #include "Mysterious.h" #include "Boolean.h" #include "Array.h" #include "InterpeterExceptions.h" Null::Null() : ISimpleVariable("Null") { } std::string Null::toString() { return ""; } bool Null::canBeIndex() { return false; } bool Null::toBool() { return...
true
9d64c055777e4aa5eaa537c5f1fb2dd6a600c5a4
C++
swarmer/algorithms
/graphs/edmonds-karp/edmonds-karp.cpp
UTF-8
2,279
2.734375
3
[]
no_license
#include <iostream> #include <fstream> #include <vector> #include <utility> #include <set> #include <map> #include <algorithm> #include <cstdio> #include <cstdlib> #include <climits> #include <cmath> #include <iomanip> #include <cfloat> #include <queue> #include <memory> using namespace std; typedef long long ll; stru...
true
8c3062fa06a89be68573698ce395ce08aab091f0
C++
RockyRocks/AsteroidDemo
/Asteroid Demo_RRK/common/utils/HashedString.h
UTF-8
794
3.3125
3
[]
no_license
#ifndef __HASHEDSTRING_H #define __HASHEDSTRING_H #include <string> /* Encapsulates both the string and it's hashed value */ class HashedString { public: HashedString() {} explicit HashedString(const char * const pIdentStr) : m_Ident(hash_name(pIdentStr)), m_IdentStr(pIdentStr) {} unsigned long getHashValue()...
true
3aaf4e61d3aca4b701440c5ab630eba59e64a377
C++
go-to-valley/algorithm-problem-solving-strategies
/molang/20-habit.cpp
UTF-8
1,717
3.140625
3
[]
no_license
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; struct Comparator{ const vector<int>& group; int t; Comparator(const vector<int>& _group, int _t): group(_group), t(_t){ } bool operator() (int a, int b){ if(group[a] != group[b]) return group[a] <...
true
2210dd9b4b08a6f22259a7648a99fcd67ef66799
C++
c-coutts/suspensionModel
/Arduino Code/suspensionModel/suspensionModel.ino
UTF-8
1,411
3.1875
3
[]
no_license
#include <Servo.h> //include required library Servo myServo1; //suspension servo Servo myServo2; //steering servo String message, suspensionAngle, steeringAngle; //message & message substrings from Processing void setup() { Serial.begin(115200); //set arduino to 115200 baud } void loop() { while (Serial.avail...
true
8744e48f02ab27231bd401854f68c1f730765323
C++
StevensDeptECE/CPE593
/old/session02Sorting/2022S_simple_sort_review.cc
UTF-8
352
2.96875
3
[]
no_license
// pseudocode void bubblesort(int a[]) { for (int i = 0; i < a.length - 1; i++) { for (int j = a.length - 2 - i; j >= 0; j--) { if (a[j] > a[j + 1]) { //swap int temp = a[i]; a[i] = a[i + 1]; a[i + 1] = temp;...
true
2bc0113f7cfb9ab70d9f36229b67a3e80752a004
C++
wenwen12321/Big_Number
/Project2/Project2/Integer.cpp
UTF-8
3,607
3.171875
3
[]
no_license
#include "Integer.h" #define MAX 1000 Integer::Integer() : Number() { } Integer::~Integer() { num.clear(); num.shrink_to_fit(); denom.clear(); denom.shrink_to_fit(); } Integer::Integer(string newNum) { dot1 = 0; isDecimal = 0; denom.push_back(1); strnum = newNum; if (newNum.find('.', 0) != string::npos) {...
true
f9af985cabd0627d9b21a196e930e3e42621c76b
C++
STDombr/oop_course2_semester2_exam
/Uis/mainwindow.cpp
UTF-8
12,890
2.640625
3
[]
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include "addelement.h" #include "addbook.h" #include "addserver.h" int radio_link = 1; int radio_data = 1; template<typename T> ContainerInterface<T> *I1; template<typename T> ContainerInterface<T> *I2; template<typename T> DLList<T> *DL1; template<typename T> DLLis...
true
689c3b6e80da333a72036e08b533143af4300195
C++
AmrARaouf/algorithm-detection
/graph-source-code/129-C/12250106.cpp
UTF-8
1,118
3.15625
3
[ "MIT" ]
permissive
//Language: GNU C++ #include<iostream> #include<string> #include<cstring> #include<algorithm> #include<algorithm> #include<queue> #include<set> using namespace std; struct Pos{ int x; int y; int second; }; char map[10][10]; int addx[9] = { -1, -1, -1, 0, 0, 0, 1, 1, 1 }; int addy[9] = { -1, 0, 1, -1, 0, 1, -1, 0,...
true
28bf74bd080bca1c5902fae84ef12a47c89491b5
C++
GDF22/AwesomeProject
/Component.cpp
UTF-8
1,708
3.1875
3
[]
no_license
/* * File: Component.cpp * Author: GDF * * Created on 2 novembre 2013, 16:34 */ #include "Component.h" using namespace std; Component::Component() { this->visible = true; this->name =""; this->parent = this; } Component::Component(string name) { this->visible = true; ...
true
cec4a61bf17a8b273d3050cd4f2e3097a3ba437e
C++
rajsawhoney/Car-Parking-project
/CarClass.h
UTF-8
1,258
2.921875
3
[]
no_license
//This is the store house of this program Car Parking #include <ctime> //used for getting local date and time #include "timeConversion.h" //user defined header file to convert date and time in seconds into date and time format #include "date_time.h" //user defined header file for getting date and time ...
true
b55582b477efd11ed051475984bd51756e71bad9
C++
Shawn7936/GitTest
/CaptureDirFile/CapDirFile/tools.cpp
UTF-8
12,466
3.1875
3
[]
no_license
#include <iostream> #include <fstream> #include "tools.h" #include <time.h> #define YEAR_SET 1900 #define MON_SET 1 /** * * @author Ming * * @date 2016/06/08 * * @fn string Tools::ReadFileLineData( string path ,int lineNumber ) * * @brief ( 讀取檔案中的指定行數 ) * * @param ( path : 檔案的路徑+名稱 ) * ...
true
41bb7686e516e75d2516bf1982f69a0c248cba8f
C++
elbow95/cpp
/C++Primer/string1.cpp
UTF-8
437
3.40625
3
[]
no_license
#include <iostream> using namespace std; int main() { string str("some string"); // decltype(str.size()) punct_cnt = 0; // for(auto c:str) // if(ispunct(c)) // ++punct_cnt; // cout << punct_cnt // << "is" << str << endl; for(decltype(str.size()) index = 0; index...
true
e56d5bc912abd22559b40b6a325194c29573ea1b
C++
HangDeYang/Accelerated-cpp
/inputname.cpp
UTF-8
232
3.140625
3
[]
no_license
#include<iostream> #include<string> int main() { //ask for user name std::cout<<"please input your name: \n"; //define name std::string name; std::cin>>name; //show result std::cout<<"Hello, "<<name<<"! \n"; }
true
6ae07d59fd919b1ba339e8405242aaaf296a8055
C++
ShaiRoitman/clu
/clu/Operators/TrimOperator.cpp
UTF-8
810
2.90625
3
[ "MIT" ]
permissive
#include "InputFileOperator.h" #include "CommandLineHandlers/PredicateCommandLineHandler.h" USING_NAMESPACE(std); USING_NAMESPACE(clu); class TrimOperator : public InputFileOperator { public: TrimOperator() {}; virtual bool OnLineRead(string& input) { string spaceTrim = Trim(input, ' '); string tabTrim = Trim(...
true
7c1dc5cd63e418c22104ab07602483a5bad195f5
C++
silenceinthesky/Tools
/rsa_encryption_decryption/rsa.cpp
UTF-8
3,790
2.546875
3
[]
no_license
//demo.cpp // g++ demo.cpp -o demo -lcrypto #include <openssl/rsa.h> #include <openssl/err.h> #include <openssl/pem.h> #include <iostream> #include <string> #include <cstring> #include <cassert> #include <vector> #include "std_base64.h" using namespace std; RSA *createPrivateRSA(std::string key); //加密 std::string En...
true
4fd22f45ba782907dc262eb1e3b31a007fff88b9
C++
julienlopez/QWarhammerSimulator
/libs/libwarhammerengine/unit.cpp
UTF-8
1,393
2.703125
3
[ "MIT" ]
permissive
#include "unit.hpp" #include <cmath> #include <gsl/gsl_util> namespace QWarhammerSimulator::LibWarhammerEngine { Unit::Unit(Model model, std::size_t number_of_models, std::size_t number_of_models_in_a_row) : m_model(std::move(model)) , m_number_of_models(number_of_models) , m_number_of_models_in_a_row(n...
true
6732ec9262280c7cf463d07a7157f17882f13098
C++
datafl4sh/MeshTriangles
/Efficient integration.cpp
UTF-8
4,416
3.03125
3
[]
no_license
#include "Mesh triangles.h" #include "Efficient integration.h" // Examples of interfaces double Circle(Point A) { return pow(A.gety(), 2) + pow(A.getx(), 2) - 2; } double CircleYofXpositive(Point A) { return sqrt(2 - pow(A.getx(), 2)); } double Parabola(Point A) { return A.gety() - pow(A.getx(), 2); } double Parabol...
true