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
3285ced39627529296aba41651b68e56f040d59b
C++
FusionBolt/CraftUI
/utils/Timer.h
UTF-8
807
2.609375
3
[ "MIT" ]
permissive
// // Created by fusionbolt on 2020-01-24. // #ifndef GWUI_TIMER_H #define GWUI_TIMER_H namespace Craft { class Timer { public: //初始化变量 Timer() noexcept; //各种时钟动作 void Start() noexcept; void Stop() noexcept; void Pause() noexcept; void UnPause() n...
true
e5cc95d527f2217fd4eea99451179d6a683a31fd
C++
a567w/AriaGame
/KsEngine/system/collections/KsArray.h
SHIFT_JIS
6,134
3.15625
3
[ "MIT" ]
permissive
/************************************************************************************************/ /** * @file KsArray.h * @brief •ϒz * @author Tsukasa Kato * @date 2008/02/06 * @since 2008/02/06 * @version 1.0.0 */ /*****************************************************************************************...
true
5b2cb233abeb95b15dda401a1d64d239235f8428
C++
jaybroker/dstore
/dstore/network/connection.h
UTF-8
1,459
2.828125
3
[ "MIT" ]
permissive
#ifndef DSTORE_NETWORK_CONNECTION_H_ #define DSTORE_NETWORK_CONNECTION_H_ #include <list> #include <memory> #include "event_loop.h" #include "socket.h" #include "inet_addr.h" #include "buffer.h" namespace dstore { namespace network { class InetAddr; class Message; class Buffer; class Connection { public: enum Stat...
true
b8fd09a4710e493077db67c6504f3ab8847ba3fc
C++
cfromknecht/lattice
/test/HelperTest.cpp
UTF-8
603
3.1875
3
[]
no_license
#include <lattice/Helper.hpp> #include <gtest/gtest.h> TEST( HelperTest, makeUnique ) { // create new pointer to 42 auto sizePtr = lattice::make_unique<size_t>( 42 ); // test that pointer is not null and that value is set to 42 ASSERT_NE( nullptr, sizePtr ); ASSERT_EQ( size_t(42), *sizePtr ); // move ow...
true
f12ab01c34987ee7031e86b3164755443f04ff35
C++
danielhstahl/GaussNewton
/Newton.h
UTF-8
11,720
2.875
3
[]
no_license
#ifndef __NEWTON_H_INCLUDED__ #define __NEWTON_H_INCLUDED__ #include <vector> #include <array> #include <cmath> #include <iostream> #include <complex> #include "TupleUtilities.h" #include "AutoDiff.h" #include "FunctionalUtilities.h" namespace newton{ template<typename Val, typename Obj, typename Deriv> auto i...
true
0b8635bff6a24243b6c3e41b70b49f9d3b18ef17
C++
yqliving/Practice
/54-Spiral-Matrix/solution.cpp
UTF-8
1,423
3
3
[]
no_license
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> res; int rowSize = matrix.size(); if (rowSize == 0) return res; int colSize = matrix[0].size(); int leftb = 0, rightb = colSize - 1; int upb = 0, downb = rowSize - 1; ...
true
a28b67a121c1949d3cb84eac49ade5151788b519
C++
SayaUrobuchi/uvachan
/Kattis/licensetolaunch.cpp
UTF-8
258
2.515625
3
[]
no_license
#include <stdio.h> int main() { int n, i, ans, best, t; while (scanf("%d", &n) == 1) { for (i=0, ans=0, best=2147483647; i<n; i++) { scanf("%d", &t); if (t < best) { best = t; ans = i; } } printf("%d\n", ans); } return 0; }
true
065f490d262c6aae739f5ddb96baf7b305f9a5fe
C++
hysmun/InpresAiportChat
/cpp/SocketException.h
UTF-8
964
3.046875
3
[]
no_license
#ifndef __SOCKETEXCEPTION_H__ #define __SOCKETEXCEPTION_H__ #include <exception> using namespace std; class SocketException : public exception { protected: char *msg; int nbrErr; int setMsg(const char *tmp); int setNbrErr(int n) {nbrErr = n; return 1;}; public: //init SocketException() {msg = ...
true
88e0d23c8b7aec52f43542773b238bcf9a2a00a9
C++
personaluser01/Algorithm-problems
/20131209/AM/131209_tests/subway/check/subway2.cpp
UTF-8
862
3.25
3
[]
no_license
#include <algorithm> #include <iostream> #include <set> #include <string> #include <vector> using namespace std; string canonical(const string& s) { vector<string> parts; int zeros = 0; int ones = 0; int current_start = 1; for (size_t i = 0; i < s.size(); ++i) { if (s[i] == '0') { zeros += 1; ...
true
a76fa0af2b9e55305519445c0ae39f95a65a86c0
C++
EnDronist/BreakOut-Engine
/Engine/Keyboard.cpp
UTF-8
3,592
2.59375
3
[]
no_license
/****************************************************************************************** * Chili DirectX Framework Version 16.07.20 * * Keyboard.cpp * * Copyright 2016 PlanetChili.net <http://www.planetchili.net> * * * * This file is part of The Ch...
true
1d546585578f5c503852b0c859a43d03630e5478
C++
chanaAkerman/AI_FinalProject
/First/Bullet.cpp
UTF-8
3,014
3
3
[]
no_license
#include "Bullet.h" #include "GLUT.H" #include <math.h> #include <stdio.h> Bullet::Bullet() { } Bullet::Bullet(double x, double y) { double len; this->x = x; this->y = y; this->originalX = x; this->originalY = y; this->pre_i = -1; this->pre_j = -1; this->originTeam = 0; dirx = (rand() % 101)-50; diry = (ran...
true
6e57382b18932e9b67d05b7e8115ed530b17eacc
C++
a-laine/GolemFactory
/Sources/Utiles/FileWatcher.h
UTF-8
396
2.8125
3
[]
no_license
#pragma once #include <string> class FileWatcher { public: // Default FileWatcher(const std::string& name); // // Setter / getter std::string getFilemane() const; size_t getLastChangeHash() const; void setFilename(const std::string& name); void setLastChangeHash(const size_t& hash); // protecte...
true
611ce8774b42a09a262c8c5fc1d693147676906b
C++
lineCode/HM4
/net/iobuffer.h
UTF-8
1,789
3.1875
3
[]
no_license
#ifndef _IO_BUFFER_H #define _IO_BUFFER_H #include <string> #include <string_view> #include <cstdio> #include <cassert> namespace net{ class IOBuffer{ private: using container_type = std::string; using size_type = container_type::size_type; private: size_type head_ = 0; container_type buffer_; public: voi...
true
d4a740f88fbde235d08b2173446e26f62703c0c1
C++
piperarmstrong/origami
/treemaker/tmEdge.cpp
WINDOWS-1252
5,682
2.734375
3
[]
no_license
/******************************************************************************* File: tmEdge.cpp Project: TreeMaker 5.x Purpose: Implementation file for tmEdge class Author: Robert J. Lang Modified by: Created: 2003-11-25 Copyright: 2003 Robert J. Lang. All Rights Reserved. ************...
true
f943b636e8cd89bff2994f527423721f26d75208
C++
rockkingjy/Inference_RGB2D_caffe
/depth_camera.cpp
UTF-8
6,833
2.625
3
[]
no_license
#include <caffe/caffe.hpp> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <algorithm> #include <iosfwd> #include <memory> #include <string> #include <utility> #include <vector> using namespace caffe; // NOLINT(build/namespaces) using namespace...
true
8295dbae939792f9d9b050f4c8561591568f5b3f
C++
LeeKangW/CPP_Study
/STL_Univ/STL_Univ/실습 1 알파벳 문자의 사용 횟수 확인.cpp
UHC
823
3.3125
3
[ "MIT" ]
permissive
#include"default.h" #include<string> #include<fstream> #include<map> #include <iomanip> int main() { cout << " - "; string file; cin >> file; ifstream in(file); if (!in) { cout << file << " ." << endl; } map<char, int> alpha; char str; while (in >> str) { if (isalpha(str)) { str = tolower(str); al...
true
2b2587076a3f4984fde4a78dd410ca8b24a55063
C++
JoshGuempel/Fabricated-Files-n-Folders
/file_system.cpp
UTF-8
8,407
3.234375
3
[]
no_license
#include "file_system.h" //List files in current directory void shell::ls(const std::string& args) { //Return if folder is empty or if dir pointer isnt pointing to anything if(curr_dir->files.empty() && curr_dir->folders.empty()) { return; } if(curr_dir == nullptr) { std::cerr << "Somet...
true
469b217380c6cf36569acd53d73a8d32e2a9ece8
C++
dcoretti/ControlDeck
/include/ControlDeck/PPU/PPU2C02.h
UTF-8
4,433
2.609375
3
[]
no_license
#pragma once #include "PPUComponents.h" #include "ColorPalette.h" #include "../cartridge.h" #include "../Render.h" namespace NES { // Starting cycle in scan line state enum class ScanLineState { Idle = 0, //0 TileFetch = 1, //1-256 SpriteFetch = 257, //...
true
d44785270dbe98234b77b8c230e192ae539d8d46
C++
365460/CMP
/CMP/simulator/Error.cpp
UTF-8
671
2.796875
3
[]
no_license
#include "Error.h" Error::Error(){ } Error::Error(std::string s):illegal(s), halt(true){ } void Error::addError(int id){ switch (id) { case WriteTo0: message.push_back("Write $0 Error"); break; case NumOverF: message.push_back("Number Overflow"); break; case OverWr...
true
2293e72f3f1af34747d19b56d41aa110108cc445
C++
SPriyal/work
/github/c++/Message_Folder(c++primer13.4)/Message.h
UTF-8
392
2.59375
3
[]
no_license
#ifndef MESSAGE #define MESSAGE #include <set> #include <string> using namespace std; class Folder; class Message { public: Message(string content); Message(const Message & m); Message operator=(const Message & m); void save(Folder * f); void remove(Folder * f); ~Message(); private: set<Folder*>folders; stri...
true
1db2aa75d5d083a5790d242ce7cbf2c0b2b8a6cc
C++
jarquile/ICS-45C
/Lab 2/calculator.cpp
UTF-8
908
3.0625
3
[]
no_license
#include "calculator.hpp" double calculateTotal(double score, double total, double weight) { return (score / total)*weight; } void calculateFinalGrade(unsigned int number, Artifacts *artifacts, Student* students) { for (int x = 0; x < number; x++) { if (students[x].gradeOpt == 'G') { if (students[x].totalSco...
true
cf08d5c35b297a286104cbae8fd087bc3919272a
C++
wildpea/Fit
/fit/function.h
UTF-8
2,339
2.8125
3
[]
no_license
/*============================================================================= Copyright (c) 2014 Paul Fultz II function.h 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) =================================...
true
dec397182433ce9de3781dd6569482ee961486f9
C++
itohdak/AtCoder
/ABC/old/previous/11-/119/B.cpp
UTF-8
431
2.59375
3
[]
no_license
#include <iostream> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <numeric> // accumulate(v.begin(), v.end(), 0) using namespace std; #define ll long long int main(){ int N; cin >> N; double sum = 0; for(int i=0; i<N; i++) { double x; string u; cin >> x >> u; ...
true
bcd9ef5c74aa0111627ac26d2bd963d98ec776b0
C++
weitianpaxi/Learning_Cpp
/Code_By_Dev-Cpp/test_012.cpp
GB18030
447
3.65625
4
[]
no_license
//test_012.cpp--ʹÑԶxmain()KݔһҪ{ÃɴΡ #include <iostream> void outline_a(); void outline_b(); int main() { outline_a(); outline_a(); outline_b(); outline_b(); return 0; } void outline_a() { //using std::cout; std::cout<<"Three bliand mice"<<std::endl; } void outline_b() { //using std::cout; std::cout<<"See how...
true
36e1debaa5af62eb0af9dc429f8cbe37e28fe669
C++
jazztext/VRRayTracing
/src/Util/FPSTimer.h
UTF-8
604
2.953125
3
[ "MIT" ]
permissive
// FPSTimer.h #pragma once #include "Timer.h" #include <vector> ///@brief Keeps a history of elapsed frame times for calculating average FPS. class FPSTimer { public: FPSTimer(); virtual ~FPSTimer(); void OnFrame(); void Reset(); float GetFPS() const; float GetInstantaneousFPS() const; prot...
true
4fbdf11f52a5b0ecbed20b57e1fb9d0b9770e035
C++
labyrinth6843/Necrodancer
/01_WinMain/Ground.h
UTF-8
1,132
2.59375
3
[]
no_license
#pragma once #include "GameObject.h" #include "Wall.h" class Ground : public GameObject { wstring mFileName; Image* mBack; vector<vector<AlphaTile>> mGroundList; //Test00.txt int mMapSizeX; int mMapSizeY; int mMinIndexX; int mMinIndexY; int mMaxIndexX; int mMaxIndexY; POINT mOddFrame; //홀수 프레임 POINT mEv...
true
e0d21b6b95d80858fc0c18f0d36c8602b118923b
C++
toolittlecakes/draft2Dengine
/draft/objects/dog.h
UTF-8
890
2.75
3
[]
no_license
#ifndef DRAFT_BOX_H #define DRAFT_BOX_H #include "object.h" #include "player.h" //class Dog final : public Object { //public: // Dog(float x, float y, Image image) : Object(x, y, std::move(image)) {} // // void update(const Input &input, std::vector<std::unique_ptr<Object>> &objects) override { // for ...
true
f8bce679a304bbac24f05cc6a41512686cfd3d05
C++
danykim57/c-study
/mapPractice.cpp
UTF-8
540
3.46875
3
[]
no_license
#include<iostream> #include<map> #include<string> using namespace std; int main() { map<string, int>m; m.insert(make_pair("a", 1)); m.insert(make_pair("b", 2)); m["c"] = 6; m.erase("c"); m.erase(m.find("b")); if (!m.empty()) cout << "size of m is " << m.size() << endl; cout << "a: " << m.find("a")->second...
true
a97a3ff39df2ea4ee61f1150bdb406b9007e8b9d
C++
T4g1/ZombieHeadToPlay
/trunk/src/data/Animation.h
ISO-8859-1
575
2.953125
3
[]
no_license
/** \file Animation.h * \brief Dfinit la classe Animation */ #ifndef ANIMATION_H #define ANIMATION_H #include <SDL/SDL.h> /** \class Animation * \brief Classe permettant la gestion des Animation */ class Animation { public: Animation(); virtual ~Animation(); bool addFrame(int x, int...
true
f02b05177dec614ad755f16c6d5af525f6ccd40a
C++
kanglanglang/danei
/CSD1404(待补充)/c++(CSD1404,GAJ)/day07/08muti_inheri.cpp
UTF-8
1,143
3.296875
3
[]
no_license
#include <iostream> using namespace std; class Product{ double price; public: double getPrice(){return price;} Product(double price=0.0):price(price){ } }; class Phone:virtual public Product{ public: Phone(double price=0.0):Product(price){ cout << "Phone()" << endl; } void phone(){ ...
true
014b76c99db7ae214e0969fa982765bb6ba7b03a
C++
BrychDaneel/mtran
/compiler/tokens/stringtoken.cpp
UTF-8
436
2.859375
3
[]
no_license
#include "stringtoken.h" const int StringToken::TYPE = 402; const std::string StringToken::REGEX = "'..+?'" ; const std::string StringToken::NAME = "String"; StringToken::StringToken(const std::string lexem) { this->lexem = lexem; value = lexem.substr(1, lexem.size()-2); } Token *StringToken::create(const s...
true
68152d5422f6f58decefcea1ada870c186acdd7a
C++
ofxyz/ofxBranchesPrimitive
/src/ofxBranchCylinder.h
UTF-8
6,707
2.703125
3
[]
no_license
#pragma once #include "ofMain.h" #include "ofxBranch.h" struct ofxBranchCylinderOptions{ bool cap; float radiusBottom; float radiusTop; int resolution; int textureRepeat; float padding; }; static const ofxBranchCylinderOptions defaultBranchOptions = { false, 5.0, 5.0, 16, ...
true
078c3234593dd52fdd639ad55da185c9a3183e6d
C++
JiayaoWu/MLH
/Task.h
UTF-8
287
2.84375
3
[]
no_license
#ifndef TASK_H #define TASK_H #include<string> using std::string; class Task { public: Task(const string &, const double, const double); void print() const; double getLabor() const; double getPart() const; private: string name; double costofLabor; double costofPart; }; #endif
true
480098f365d6826c8f8270021f9b967b61444fbc
C++
ThomasFuser/BibliotecaP2
/VIEW/listaop.cpp
UTF-8
3,785
2.734375
3
[]
no_license
#include"listaop.h" listaOp::listaOp(DataBase* db): Widget_Padre(db){ table=new QTableWidget(); //inserisco la tabella nel layout del widget layout_table=new QVBoxLayout(); layout_table->addWidget(table); set_style(); setLayout(layout_table); costruisci_contenuto(); connect(table,SIGNA...
true
5dc5a994fdbca144cc041d16b7beaade99855e1b
C++
RitzyDatta/Graphics
/bresenham.cpp
UTF-8
1,220
2.890625
3
[]
no_license
#include<graphics.h> #include<conio.h> #include<stdio.h> #include<math.h> #define fx(x) (getmaxx()/2 + x) #define fy(y) (getmaxy()/2 - y) void initial(int, int); void bres(int,int,int,int); main() { int x1,y1,x2,y2,x; printf("\nenter starting coordinates: "); scanf("%d %d", &x1,&y1); pr...
true
1d33bad035e83ff2139d219b3bf3d6c69d1331e8
C++
HsiangYangChu/RayTracer
/src/objects/triangle_mesh.h
UTF-8
662
2.671875
3
[]
no_license
#ifndef TRIANGLE_MESH_H #define TRIANGLE_MESH_H #include <objects/grid.h> #include <mesh.h> typedef enum { FLAT_TRIANGLE, SMOOTH_TRIANGLE } TriangleType; class TriangleMesh: public Grid { public: typedef std::shared_ptr<Mesh> Mesh_ptr; TriangleMesh(const std::string &name); ~TriangleMesh() {} ...
true
7e4df0b1c6bdf0c4242252031d2364fea8f3a713
C++
Mcgode/kryne-engine
/kryne-engine/src/Light/DirectionalLight.cpp
UTF-8
3,763
2.71875
3
[]
no_license
/** * @file * @author Max Godefroy * @date 06/04/2021. */ #include "kryne-engine/Light/DirectionalLight.hpp" DirectionalLight::DirectionalLight(Process *process, const vec3 &color, float intensity, const vec3 ...
true
c417282e83c12134fda883710f39ab72388158b6
C++
NirTaly/DataStructures
/wet2/library2.cpp
UTF-8
1,584
2.671875
3
[]
no_license
#include "library2.h" #include "agency_managment.h" using namespace DS; void *Init() { AgencyManager* DS = new AgencyManager(); return (void*)DS; } StatusType AddAgency(void *DS) { if (!DS) { return FAILURE; } try { ((AgencyManager*)DS)->AddAgency(); } catch(const std::bad_alloc&) { return ALLOCAT...
true
67d62054450f14570d71ee5a412178a60753fb59
C++
corri108/CorrtexEngine
/CorrtexEngine/CorrtexTetrahedron.cpp
UTF-8
1,198
2.78125
3
[]
no_license
#include "stdafx.h" #include "CorrtexTetrahedron.h" //a basic tetrahedron primitive CorrtexTetrahedron::CorrtexTetrahedron() : CorrtexTetrahedron::CorrtexTetrahedron(vec3(0), 1.0f) { } CorrtexTetrahedron::CorrtexTetrahedron(vec3 pos, float size) { //transform / matrix stuff this->position = pos; this->startingPo...
true
4a42fcdf908884e213788148d08f1309c66a07c7
C++
dezed/mantid
/Framework/Geometry/src/MDGeometry/QLab.cpp
UTF-8
1,354
2.515625
3
[]
no_license
#include "MantidGeometry/MDGeometry/QLab.h" #include "MantidGeometry/MDGeometry/MDFrame.h" namespace Mantid { namespace Geometry { //---------------------------------------------------------------------------------------------- /** Constructor */ QLab::QLab() : m_unit(new Mantid::Kernel::InverseAngstromsUnit) {} co...
true
2dcd6141087c49b4fe205868b2220764f3feabff
C++
ImSahilShaikh/Data-Structures-and-Algorithm
/STL-CPP/stl_unorderedset.cpp
UTF-8
541
3.359375
3
[]
no_license
#include<iostream> #include<unordered_set> using namespace std; int main() { //similar to set but order is not maintained //uses bucket //hashing is used to insert into buckets //insertion, deletion and search has average constant time unordered_set<int> s{1,5,1,6,2,5,2,3,4}; auto search = s.f...
true
47e56449ce6461b3c6f98f5c281bf064a7279ebf
C++
shashwat286/IPMP
/Week8/tree_43.cpp
UTF-8
483
4.03125
4
[]
no_license
TreeNode* trimBST(TreeNode* root, int low, int high) { if(root==NULL) return NULL; root->left=trimBST(root->left,low,high); root->right=trimBST(root->right,low,high); if(root->val<low) { TreeNode* rChild=root->right; return rChi...
true
72f77f816230793f614203cf21106fb105950982
C++
flankersky/vector_ap_bsw
/amsr-vector-fs-libosabstraction/lib/libosabstraction-interface/include/osabstraction/io/net/address/socket_address_interface.h
UTF-8
3,903
2.53125
3
[]
no_license
/********************************************************************************************************************** * COPYRIGHT * ------------------------------------------------------------------------------------------------------------------- * \verbatim * Copyright (c) 2018 by Vector Informatik GmbH. Al...
true
7885d00172daa005d0741fd50ecb0561ad33bff1
C++
jhpy1024/QuadTree
/src/QuadTreeRenderer.cpp
UTF-8
2,101
3.171875
3
[ "MIT" ]
permissive
#include "QuadTreeRenderer.hpp" QuadTreeRenderer::QuadTreeRenderer(sf::RenderWindow& window, QuadTree* quadTree) : m_Window(window) , m_QuadTree(quadTree) , m_QuadColor(4, 130, 219) , m_QuadOutlineColor(sf::Color::Black) , m_PointColor(219, 93, 4) , m_PointRadius(3.f) , m_QuadOutlineThickne...
true
77ab65d420e29670eb361a3136d01d5c032d3461
C++
stfuanu/cpp
/code/exp.cpp
UTF-8
388
3.375
3
[]
no_license
#include <iostream> #include <string.h> using namespace std; int main(){ string x; cout<<"Type the word 'samosa' in capital letter : "; cin>>x; try { if (x == "SAMOSA"){ cout<<"\nOKAY , it works . You know what are capital letters "<<endl; }else{ throw x; } } catch(string somethin...
true
7403c96504bf74ade355ec60ea0bf9f04587125e
C++
flick-archieve/oop
/OOP_lab_4-5/HardworkingStudent.cpp
UTF-8
601
3.046875
3
[]
no_license
// // Created by olehh on 16-Apr-21. // #include "HardworkingStudent.h" void HardworkingStudent::handInAllAssignments() { while (!assignments.empty()) { doTask(); } cout << "All assignments done!"; } HardworkingStudent::HardworkingStudent() { std::cout<<"Hardworking student created"<<std::end...
true
d5bf73b1216002b5225568303dc1afa25e779596
C++
20k/net_code_webassembly
/runtime_types.hpp
UTF-8
20,441
2.828125
3
[]
no_license
#ifndef RUNTIME_TYPES_HPP_INCLUDED #define RUNTIME_TYPES_HPP_INCLUDED #include "types.hpp" #include <optional> #include <functional> #include "template_args_helper.hpp" #include "wasm_interop_context.hpp" struct module; namespace runtime { struct addr : types::integral<uint32_t, addr>{}; struct funcaddr : a...
true
87d408e663353a863132f4ef54f328c93ce23745
C++
hanselcheong/CS122
/Labs/Lab11/Lab11/task1.h
UTF-8
393
2.9375
3
[ "MIT" ]
permissive
// .h part #include <iostream> using std::cin; using std::cout; using std::endl; class Base { public: virtual void testFunction (); }; class Derived : public Base { public: void testFunction (); }; // .cpp part void Base::testFunction () { cout << "Base class" << endl; }...
true
733bd6e31df4927698f29c212ba39537a800d149
C++
AsmitaSethiya/Cpp_Practice_Questions
/check_trangle.cpp
UTF-8
539
3.59375
4
[]
no_license
#include<iostream> using namespace std; int main() { int sidea, sideb, sidec; cout<<"Enter side a: "; cin>>sidea; cout<<"Enter side b: "; cin>>sideb; cout<<"Enter side c: "; cin>>sidec; if(sidea == sideb && sideb == sidec) { cout<<"This is an equilateral triangle. \n"; ...
true
74d1ffba77b16b1f3f9f65b4c8504cc8f976ecb8
C++
EndBug/olinfo-solutions
/semiprimo/semiprimo.cpp
UTF-8
937
3.203125
3
[ "MIT" ]
permissive
#include <iostream> #include <fstream> #include <math.h> using namespace std; bool isPrime(int n) { if (n <= 1) return false; else if (n <= 3) return true; else if (n%2 == 0 || n%3 == 0) return false; int i = 5; while (i*i <= n) { if (n%i == 0 || n%(i+2) == 0) return false; i += 6;...
true
1444ef3388c12ce4db810ecebf5525dd3a73a510
C++
mathieumg/hockedu
/trunk/Sources/C++/Arbre/ArbreRendu.h
ISO-8859-1
3,923
2.6875
3
[]
no_license
/////////////////////////////////////////////////////////////////////////////// /// @file ArbreRendu.h /// @author Martin Bisson /// @date 2007-01-28 /// @version 1.0 /// /// @addtogroup razergame RazerGame /// @{ /////////////////////////////////////////////////////////////////////////////// #ifndef __ARBRE_A...
true
c9f856210915b2a9451414eba4065d4f774de38d
C++
MatrixDeity/Problems
/Codeforces_447B/main.cpp
WINDOWS-1251
1,923
3.34375
3
[]
no_license
/** : DZY , . c DZY wc. s = s1 s2... s|s| (|s| - ) f(s), f(s) = SUM(1, |s|, wsi * i). DZY s. k , . ? : s (1 <= |s| <= 10^3). k (0 <= k <= 10^3). wa wz. 1000. : - , DZY . */ #include <iostream> #include <algorithm> usi...
true
4eb6b5ad68fc10ec8893fa2e319047cc7c4ab4b4
C++
lld2006/my-c---practice-project
/060/060.old.cpp
UTF-8
2,972
2.859375
3
[]
no_license
#include "../lib/tools.h" #include "../lib/typedef.h" #include <cassert> #include <cstdio> #include <algorithm> int limit = 20000; bool isPrimeJoint(int p1, int p2, vector<int>& primes){ if(p1%3==1 && p2%3==2) return false; if(p1%3==2 && p2%3==1) return false; int prod = 1; while(prod < p1...
true
5da8b337c9ac91fce12586b3becd6a1cbdcd282d
C++
herbberg/utm
/tmXsd/gen-xsd-type/complex-bin.hh
UTF-8
2,115
2.65625
3
[]
no_license
/** * @author Takashi Matsushita * Created: 19 Aug 2014 */ /** @todo nope */ #ifndef complex_bin_hh #define complex_bin_hh /*====================================================================* * declarations *====================================================================*/ /*-------------------...
true
9d5c3fb4fb8d2c08ebd2087c735257b35d45f90e
C++
flyforhigh/vendor_mediatek_proprietary_hardware
/audio/common/include/SpeechDriverFactory.h
UTF-8
1,436
2.75
3
[ "Apache-2.0" ]
permissive
#ifndef ANDROID_SPEECH_DRIVER_FACTORY_H #define ANDROID_SPEECH_DRIVER_FACTORY_H #include <utils/Vector.h> #include "AudioType.h" #include "SpeechDriverInterface.h" namespace android { class SpeechDriverFactory { public: virtual ~SpeechDriverFactory(); static SpeechDriverFactory *GetInstance(); SpeechDri...
true
d27e9ce3b8416d6569ec14edb95826ab9dae0996
C++
NatalyTinoco/Proyectos_academicos
/Arduino/JUegodemesacondados.ino
UTF-8
4,548
2.90625
3
[]
no_license
// Wire Master Reader // by Nicholas Zambetti <http://www.zambetti.com> // Demonstrates use of the Wire library // Reads data from an I2C/TWI slave device // Refer to the "Wire Slave Sender" example for use with this // Created 29 March 2006 // This example code is in the public domain. #include <Wire.h> int a=22;...
true
dbff3a5e009888b0aa5f31ac4c7825f4aa813611
C++
dracohan/code
/code_book/Thinking C++/master1/Chapter 8/Ex/Ex19.cpp
WINDOWS-1251
471
3.0625
3
[]
no_license
//: EX08:Ex19.cpp // float. // // . class X { float f1; const float cf1; public: X(); ~X(); }; X::X() : f1(0.6f), cf1(0.7f) { } X::~X() {} int main() { X float_x; }
true
da391fae73d4d82f3f3c5e4e743a3b0fa51b7296
C++
Senka2112/squirrel_manipulation
/squirrel_object_manipulation/src/utils/math_utils.cpp
UTF-8
4,625
3.40625
3
[]
no_license
#include "squirrel_object_manipulation/math_utils.hpp" using namespace std; using namespace arma; double distancePoints(double x1, double y1, double z1, double x2, double y2, double z2){ return sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) + (z1-z2)*(y1-y2)); } double distancePoints(double x1, double y1, double x2, do...
true
124770cc83ecd7987a73f0b33f9a528a5718c2ca
C++
Dawidsoni/programming-competitions
/OI/XX/mul/Multidrink.cpp
UTF-8
3,561
2.796875
3
[]
no_license
#include<stdio.h> #include<vector> using namespace std; enum rodzaj {bialy,lacznik,sciezka}; class kopiec { public: vector<kopiec*> polacz; bool czy_jest, czy_sciezka; int numer; static int licznik; kopiec() : czy_jest(true), czy_sciezka(false) {numer = licznik++;} operator int() ...
true
279a40f44888ddc83aa40ec54f561c642f49ad99
C++
Codefiring/Data-structures-learning-in-college
/数据结构实验任选 (学生)vc6/习题6/交换左右子树的主程序文件.cpp
GB18030
334
2.6875
3
[]
no_license
//ļ.cpp #include<iostream.h> #include<stdio.h> #include"ĽṹͶ.h" #include"Ľ.h" #include".h" #include".h" void main() { bitree*pb; pb=creattree(); preorder(pb); cout<<endl; swap(pb); preorder(pb); cout<<endl; }
true
faf634f0e5ef24278085a56ef691cacf4cb17942
C++
hau-tao/CS13-Advanced-Computer-Programming-Labs-Assignments
/assignment04/BBoard.h
UTF-8
2,407
3.359375
3
[]
no_license
// =============== BEGIN ASSESSMENT HEADER ================ /// @file main.cpp /// @brief assignment03/asignment3.cpp /// /// @author htao001 [htao001@ucr.edu] /// @date August 8, 2014 /// /// @par Plagiarism Section /// I hereby certify that I have not received assistance on assignment, /// or used code, from ANY o...
true
852f8aeb7497dd70787e001c812eb33f22e75315
C++
mipopov/Class-String
/main.cpp
UTF-8
6,636
3.59375
4
[]
no_license
#include "mystring.h" #include <stdio.h> #include <assert.h> void test1(); void test2(); void test3(); void test4(); void test5(); void test6(); void test7(); void test8(); void test9(); void test10(); void test11(); void test12(); void test13(); void test14(); void test15(); void test16(); void test17(); int main() ...
true
4a7d82500c23ee8fd6b5ea7f3f17bdf357ba4e7a
C++
Wait021/Course-Reviwe
/面向对象程序设计/历年卷/《面向对象程序设计》近3年试卷/17级OOP试题/OOP17/OOP17-Exam05.cpp
GB18030
6,007
3.59375
4
[]
no_license
// OOP17-Exam05.cpp #include <iostream> using namespace std; template <typename T> class Stack { private: T *x; int top, max; public: Stack(int Max=5); // ٹ캯 Stack(const Stack &s); // ڿ캯 ~Stack(); // Stack & operator=(const Stack &s); // ֵܸ int Size() const; // ݻȡջеǰӵеԪظ bool Empty(...
true
b6f487006cb4de7e7d49a19086cd6672f25eac84
C++
loupus/pgfe
/lib/dmitigr/pgfe/sql_string.hpp
UTF-8
15,021
2.6875
3
[ "Zlib" ]
permissive
// -*- C++ -*- // Copyright (C) Dmitry Igrishin // For conditions of distribution and use, see files LICENSE.txt or pgfe.hpp #ifndef DMITIGR_PGFE_SQL_STRING_HPP #define DMITIGR_PGFE_SQL_STRING_HPP #include "dmitigr/pgfe/basics.hpp" #include "dmitigr/pgfe/composite.hpp" #include "dmitigr/pgfe/dll.hpp" #include "dmitig...
true
e4445ac1b450736696fd84d5f52be7386d1f61a2
C++
dquangit/GenericKnapsack
/GA.cpp
UTF-8
5,276
2.734375
3
[]
no_license
#include <iostream> #include <cstdio> #include <fstream> #include <stack> #include <algorithm> #include <ctime> #define maximum 100001 #define num_of_individual 40 using namespace std; fstream file; struct datatype { char* filename; }; datatype data[100]; struct __item { int w; int v; }; __item item[1000...
true
d9510085735d4e8761c3f2e4c6e28af7d7a95894
C++
mpzadmin/yuc
/Yousefi/class1.cpp
UTF-8
697
3.53125
4
[]
no_license
#include <iostream> #include <string> using namespace std; class Car { public: string brand; string model; int year; Car(); Car(string b, string m, int y); ~Car(); }; Car::Car() { cout << "car class init"<< endl; } Car::Car(string b, string m, int y) { bra...
true
a9866b13c3ba90dac412608018cf3860b63ce483
C++
maxim1um/SortingMethod
/SortingAlgorithm/Source/Common.cpp
UTF-8
94
2.53125
3
[ "MIT" ]
permissive
#include "Common.h" void Swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; }
true
8a2e3b252f975eb3d7717d78b057083355032423
C++
MdAhsan101/Practice-Programs
/Graph_TUF_Djikstra_SingleSourceShortestPath.cpp
UTF-8
1,657
3.671875
4
[]
no_license
#include<bits/stdc++.h> using namespace std; void Djikstra(vector<pair<int,int>> G[], int n, int src) { vector<int> dist(n+1,INT_MAX); // Data Structure for Min Heap of pair<dist,node> priority_queue<pair<int,int>, vector<pair<int,int>>, greater<pair<int,int>>> min_heap; dist[src]=0; min_heap....
true
1bafd1933572c0e79f60172c384ff20e7900295c
C++
jjimenezg93/ai-state_machines
/game/SM/transition.cpp
UTF-8
482
2.609375
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "transition.h" #include "condition.h" #include "action.h" #include "state.h" Transition::Transition(Condition * condition, State * targetState, Action * action): m_condition(condition), m_targetState(targetState), m_triggerAction(action) {} Transition::~Transition() {} bool Transition::...
true
b29ea21bdd9b35ef3989f4f3e4062d61a7bb595a
C++
lzz5235/leetcode
/src/InsertionSortList.cpp
UTF-8
1,783
3.546875
4
[ "MIT" ]
permissive
//Sort a linked list using insertion sort. #include <iostream> #include <algorithm> #include <stack> #include <string> #include <vector> #include <stdint.h> #include <assert.h> #include <queue> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NU...
true
a833f956d7cef8758458c9f5f36ab38f340fc048
C++
0sorose/thermal
/thermal/src/thermal.ino
UTF-8
6,701
2.96875
3
[]
no_license
#include "Arduino.h" #include "EEPROM.h" #include "SPI.h" // pin def #define encodeA 2 #define encodeB 3 #define encodeP 4 #define holster_air 7 #define holster_irn 8 #define sel_air 9 #define sel_irn 0 #define fan_detect 1 #define temp_air A7 #define temp_irn A6 #define heat_air 6 #define heat_irn 5 #define ss 14...
true
ae54f0ca43540a12c8c02b585fbbe8db0441a6c4
C++
mfarina1/pa1
/main.cpp
UTF-8
3,097
3.546875
4
[]
no_license
#include <iostream> #include <sstream> #include <regex> #include <iterator> #include <string> #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <fstream> #include <vector> #include <cstdlib> using namespace std; struct Node { string value; Node *next; }; class LinkedList { public: Nod...
true
9ea84fb2914245c2611c22a1bc74e57aa32b379d
C++
RobotLocomotion/drake
/multibody/tree/spatial_inertia.cc
UTF-8
24,048
2.953125
3
[ "BSD-3-Clause" ]
permissive
#include "drake/multibody/tree/spatial_inertia.h" #include <string> #include "drake/common/fmt_eigen.h" namespace drake { namespace multibody { namespace { template <typename T> const boolean<T> is_positive_finite(const T& value) { using std::isfinite; return isfinite(value) && value > 0; } template <typename...
true
16ef4106469b7c8701adc2dc6f88327fc9d20e85
C++
cwscx/ms_auto_suggest_check
/predict.cpp
UTF-8
2,105
3.15625
3
[]
no_license
#include "util.hpp" #include "DictionaryTrie.hpp" #include <fstream> #include <string> #include <vector> #include <time.h> void autoSuggest(int size, int stepSize, int iterations, std::string fileName, std::string input, int num_completions) { //load all words in fileName into vector //then randomly add words from ...
true
c27d8a07e99bdc78b4fab36bc867d46dd5f7ad52
C++
Adriianooo/pilha_dinamica
/linkedlist.h
UTF-8
677
2.75
3
[]
no_license
//Adriano Pinheiro Fernandes TIA: 32055161 #ifndef __LINKED_LIST_H__ #define __LINKED_LIST_H__ #include <string> using namespace std; struct Node { float numero; Node* next; }; struct linkedlist { int count; Node* top; Node* tail; }; linkedlist* Create(); void Append(linkedlist* list, float numero); void Inse...
true
ef446bcc9ae621309a810e17416474c026babe56
C++
guilhermeleobas/maratona
/URI/uri1225.cc
UTF-8
432
2.78125
3
[]
no_license
#include <iostream> #include <vector> #include <cmath> using namespace std; int main (){ while (true){ int n; cin >> n; if (not cin) break; vector<int> v (n); int s = 0; for (int i=0; i<n; i++){ cin >> v[i]; s += v[i]; } int diff = 0; int k = s/n; for (int i=0; i<n; i++) diff +=...
true
1d2fe3ad594e6c777a673d5eb75d17e233ca8da7
C++
Iluxa147/EducationalTasks
/MemoryManagement.h
UTF-8
1,837
3.390625
3
[]
no_license
#pragma once /* represents memory different types of memory allocations */ //#define PlacementNew #ifdef PlacementNew void PlacementExample() { const int Buf = 512; const int N = 5; char buffer[Buf]; //int i; std::cout << "1st new and placement new" << std::endl; double *pd1, *pd2; pd1 = new double[N]; //new me...
true
633717cf797a0a4217c593b767e54d35c6578dac
C++
helloworld1983/CxxUtilities
/includes/CxxUtilities/Date.hh
UTF-8
1,388
2.75
3
[]
no_license
/* * Date.hh * * Created on: Dec 15, 2014 * Author: yuasa */ #ifndef DATE_HH_ #define DATE_HH_ #include "CxxUtilities/CommonHeader.hh" namespace CxxUtilities { class Date { public: uint16_t year; uint8_t month; uint8_t day; uint8_t hour; uint8_t min; uint8_t sec; public: static CxxUtilities::Date ...
true
e3e0a4ffa4501fbf85a9522c765ad8a3ba8bfa49
C++
Naooki/stroustrup_ppp_exercises
/Chapter-16/Function_window.h
UTF-8
3,186
2.734375
3
[]
no_license
#include "GUI.h" using namespace Graph_lib; struct Function_window : Window { Function_window(Point xy, int w, int h, const string& title); private: Axis ox; Axis oy; Button draw_button; Button funcs_button; Menu funcs_menu; In_box min_inbox; In_box max_inbox; In_box pts_num_inbox; In...
true
a629fd537c40512616fc8968a04424b2809e05e2
C++
feinstofflicher/myVulkan
/src/vulkan/vertexbuffer.cpp
UTF-8
5,956
2.890625
3
[]
no_license
#include "vertexbuffer.h" #include "vulkanhelper.h" #include "device.h" const static bool useStaging = true; namespace { VkFormat getAttributeFormat(uint32_t numVertices) { switch (numVertices) { case 1: return VK_FORMAT_R32_SFLOAT; case 2: return VK_FORMAT_R32G32_...
true
ff4d4081053dd6aadf53dd347ed51f009d6fe995
C++
c-cash/c-cash
/src/parser/Statement.cpp
UTF-8
502
2.859375
3
[]
no_license
#include "Statement.hpp" #include <iostream> namespace parser { using namespace std; void Statement::DebugPrint(size_t indent){ cout << string(indent, '\t') << "\u001B[36m" << sStatementKindStrings[int(mKind)] << " "; cout << "\u001B[33m" << mType.mName << " " << "\u001B[32m" << mName << "\u00...
true
0a3553ae53d017f8c527df767c58486d5f47b3db
C++
javasuki/RJava
/NXDO.Mixed.V2015/NXDO.RJava.Core/larray.h
GB18030
6,500
2.640625
3
[ "MIT" ]
permissive
#include "jni.h" #include <stdlib.h> #include <string.h> #include "JParamValue.h" #pragma once using namespace NXDO::RJava; class larray { private: /// <summary> /// (java.lang.Class), Class[] /// </summary> /// <param name="jniClassName">jni, ʹ/ָ, : java/lang/Integer</param> static jobjectArray createObjectA...
true
58d4c6bfa8bd17ffe8b898334d9cf9039e23cc69
C++
wigasper/spdrnn
/src/utils.h
UTF-8
15,472
3.125
3
[]
no_license
#include <algorithm> #include <filesystem> #include <fstream> #include <iostream> #include <math.h> #include <random> #include <regex> #include <stdlib.h> #include <string> #include <tuple> #include <vector> namespace fs = std::filesystem; typedef double element_type; typedef size_t dim; typedef std::tuple<std::vector...
true
762c3400dd4af24ceaaa04d56b119a5a59780891
C++
xiexnot/LeetCode
/501-600/LeetCode 516 Longest Palindromic Subsequence.cpp
UTF-8
808
2.9375
3
[]
no_license
class Solution { public: int longestPalindromeSubseq(string s) { vector< vector<int> > LongestSubsequence; int n = s.size(); if (s.size()<=1) return s.size(); LongestSubsequence.resize(n); for (int i=0;i<s.size();i++) LongestSubsequence[i].resize(n); for (int i=0;i<s.size()-1;i++) LongestSubseque...
true
491891d954913d5b968ab4ac8c6e85222825d13d
C++
WuZixing/Geo3DML-CPP
/src/geo3dml/Map.cpp
UTF-8
1,200
2.640625
3
[ "MIT" ]
permissive
#include <geo3dml/Map.h> using namespace geo3dml; Map::Map() { } Map::~Map() { std::vector<Layer*>::const_iterator layerItor = layers_.cbegin(); while (layerItor != layers_.cend()) { delete *layerItor; ++layerItor; } } void Map::SetName(const std::string& name) { name_ = name; } std::string Map::GetName()...
true
b1083682e4f568369948499bc1191dbf2eb09cb0
C++
Kvazar3S273/Cpp-2020
/DZ20/DZ20/TZ.cpp
WINDOWS-1251
4,668
3.046875
3
[]
no_license
/*TASK 1 ; ( ) , '; ( ' , -- pop() / push() ); , -- , ' (, ) Node. (" " ", ' ' ") :*/ /* - , , . ( ) 쳺 70 % . , 30 . 쳺 : ( "") () 쳺 : - 1 , , , ( , , "") */ /*TASK 2 (class BusList). (...
true
89b20a7b9577013517bdf117b17d07e193ce3624
C++
zhanhang2014/pat-advanced
/2015-03-14(1092-1095)/1094.cpp
UTF-8
916
2.90625
3
[ "MIT" ]
permissive
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Node{ int id; vector<int> child; }; vector<Node> node; vector<int> gen; vector<bool> isleave; int maxdepth = 0; void dfs(int root, int depth){ gen[depth]++; maxdepth = max(maxdepth, depth); if (isleave[root]) return; for (int...
true
bf3c4a268c3b98dc999d27601597e69d4472bce7
C++
SKantar/CrackingTheCoodingInterview
/01. Arrays&Strings/1_9.cpp
UTF-8
609
3.46875
3
[]
no_license
/** * String Rotation:Assumeyou have a method isSubstringwhich checks if one word is a substring * of another. Given two strings, sl and s2, write code to check if s2 is a rotation of sl using only one * call to isSubstring (e.g., "waterbottle" is a rotation of"erbottlewat"). **/ #include <cstdio> #include <cstd...
true
dbe30232bb54a9e36aa794e2f34e020d40249058
C++
Zhaozzy-hub/LeetCode_Problems
/Solutions/canIWin464.cpp
UTF-8
896
2.984375
3
[]
no_license
#include <vector> #include <iostream> #include <map> using namespace std; bool solve2(int state, int desiredTotal, vector<char>& m, int maxChoosableInteger) { if (desiredTotal <= 0) return false; if (m[state]) { return m[state] == 1; } for (int i = 0; i < maxChoosableInteger; i++) { if ...
true
5fdb25c6c2cd4efec1638bbc029c1b5db21eb7ac
C++
itstepP12814/Himbitski
/HW12/HW12-1/12Hw1.cpp
UTF-8
496
3.265625
3
[]
no_license
#include <iostream> #include <ctime> using namespace std; void swap(int *a,int *b){ int tmp; tmp = *a; *a = *b; *b = tmp; } void main() { const int size = 20; int mass[size]; int *pa = mass; srand(time(NULL)); for (int i = 0; i < size; ++i) { mass[i] = rand() % 20; cout << mass[i] << " "; } cout << en...
true
92094151fc9c6fc2e598b0ca99b52eb1a12d4270
C++
westernLoser/cpp-primer-5th
/chapter 15/15.7.h
UTF-8
676
3.015625
3
[]
no_license
/* author : szz date : 2019/07/20 */ #ifndef C_15_7_H #define C_15_7_H #include<string> #include"15.3.h" class Bulk_quote_II: public Quote { public: Bulk_quote_II() = default; Bulk_quote_II(const std::string &s, double p, size_t qty, double disc): Quote(s, p), max_qty(qty), discount(disc) {...
true
19d3d96668e420d595c0a6ad4db5a2f5cd547c06
C++
noshbar/HotdogPI
/main.cpp
UTF-8
4,838
3.03125
3
[]
no_license
/* This simple program was thrown together to see if tossing thousands of sausages at lines can be used to calculate PI, described here: http://www.wikihow.com/Calculate-Pi-by-Throwing-Frozen-Hot-Dogs Basically you take a sausage of length N, draw a bunch of lines that are distance N apart, and throw some sausages ...
true
6ea1cf58778b54e1ce88bca93c6d21e880af6870
C++
claudiocabral/contemporary_cpp
/language/auto.cpp
UTF-8
481
3.03125
3
[]
no_license
// C++11 changed the meaning of the auto keyword void f() { auto a = some_func(); decltype(auto) b = some_func(); auto * c = some_func(); auto & d = some_func(); const auto & e = some_func(); } // on function signatures can be used with trailing return types auto f() -> void {} // can be inferred from C++14 ...
true
aa38c8f9f6344e10cfd9111a490f1a8d88893fe9
C++
thesyntaxninja/20.6-concatenating-lists
/main.cpp
UTF-8
1,048
3.984375
4
[]
no_license
// 20.6 main.cpp // Description: Problem 2 of 2 due week 9 // Programmer: Parker Esmay // Date: 03/23/2015 // (Concatenating Lists) Write a program that concatenates two linked list objects of characters. The program // should include function concatenate, which takes references to both list objects as arguments and c...
true
9717ffbcac29fcea546aa02a577f19329c8890ec
C++
Jadiepie-658/CSC17A-47827
/Homework/Code E Problems/Assignment 2 of Code E/PROBLEM 4 Sum-Dynamic Memory Allocation/main.cpp
UTF-8
1,520
4.0625
4
[]
no_license
#include <iostream> using namespace std; int *getData(int &); int *sumAry(const int *, int); void prntAry(const int *, int); int main(){ int size; int *data; // to retrieve array int *add; //to get sum data array data = getData(size); add = sumAry(data, size); prntAry(add, size); ...
true
ad4c18d902239f88adc3559918833adbb86403c8
C++
gregmedlock/roadrunnerwork
/source/rrEvent.cpp
UTF-8
1,440
2.90625
3
[ "Apache-2.0" ]
permissive
#ifdef USE_PCH #include "rr_pch.h" #endif #pragma hdrstop #include "rrEvent.h" #include "rrRandom.h" //--------------------------------------------------------------------------- namespace rr { Event::Event(const int& id, const double& prior, const double& delay) : mID(id), mPriority(prior), mDelay(del...
true
d809978633e00897226bdabf1a2688f1ec955ec7
C++
kevincoxwork/cpp-patterns-mvc-framework
/ProjectLibrary/singleton.cpp
UTF-8
1,659
2.9375
3
[]
no_license
/*! \singleton.cpp \author Kevin Cox \date 2019-01-19 \version 1.0.0 \note Last edited for Project 1 \brief Implementation of singleton.hpp methods. */ #include <cox\patterns\singleton.hpp> #include <iostream> #include <exception> using namespace std; /*! Process entry point. Calls the SingletonPattern singlet...
true
ed13c0e8d09814690f89b0b50ea81c8afba9a80e
C++
ligianovacean/Arduino-Car
/CarControl/ReadSensor.cpp
UTF-8
564
2.8125
3
[]
no_license
#pragma once #include "ReadSensor.h" void initSensor() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); } int computeDistance() { // Clears the trigPin digitalWrite(trigPin, LOW); delayMicroseconds(2); // Sets the trigPin on HIGH state for 10 micro seconds digitalWrite(trigPin, HIGH); delayMicr...
true
9ce4a8b36045c34d38779df453687de4629813ac
C++
allannielsen/termhub
/key-tokenizer/src/action.cxx
UTF-8
1,365
2.78125
3
[]
no_license
#include "key-tokenizer/action.hxx" namespace KeyTokenizer { Action operator%(const Action &a, const Action &b) { Action res; // least common represantant res.consume_data = std::min(a.consume_data, b.consume_data); // prioritize two complete matches if (a.complete() && b.complete()) { //...
true
1e12e8056caf98a2273bb0e5abb6761f1e8a3abd
C++
Stasich/learning_cpp
/Lafore_exercises/411_times.cpp
UTF-8
1,056
3.75
4
[]
no_license
// 410_times.cpp #include <iostream> #include <iomanip> using namespace std; struct times { int hours, minutes, seconds; }; int main() { times t1, t2, t_sum; unsigned long totalsecs_sum; char ch = ':'; cout << "Ввидите первое значение времени в формате чч:мм:сс : "; cin >> t1.hours >> ch >> t...
true