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
8cb23f4f8d0cde9f701fb9dbebacce9dea94402a
C++
codeplaysoftware/parallelts-range-exploration
/range-v3/test/view/chunk.cpp
UTF-8
4,834
3.109375
3
[ "NCSA", "MIT", "BSL-1.0", "LicenseRef-scancode-mit-old-style", "LicenseRef-scancode-other-permissive", "Apache-2.0" ]
permissive
// Range v3 library // // Copyright Eric Niebler 2014 // // Use, modification and distribution is subject to 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) // // Project home: https://github.com/ericniebler/range-v3 #includ...
true
fa1b790e4b00dbb86e4fa590df72caa34ae0b749
C++
Robertorosmaninho/4_Semester_2019_UFMG
/ALG1/TP_2/src/include/lib.h
UTF-8
609
2.65625
3
[]
no_license
#ifndef GREEDY_H #define GREEDY_H #include <vector> #include <tuple> class Lib{ private: int _N = 0, _M = 0; //max_Cash and #Islands std::vector<std::tuple<float, int, int>> _islands; //cost/points, cost, points int _days = 0; int _total_points = 0; int _days_pd = 0; int _total_points_pd = 0; public: ...
true
4068f05843ad99acae3290b175943cff3bce6b9e
C++
kc991229/practice
/2021.3.14/test.cpp
UTF-8
1,281
2.96875
3
[]
no_license
//数数问题 #include <iostream> #include <vector> #include <map> using namespace std; vector<int> GetNum(vector<int> vec, int size, int k) { vector<int> res(size - k + 1); vector<vector<int>> dp(size, vector<int>(size)); map<int, int> mp; for (int i = 0; i < size-1; i++) { mp.clear(); dp[...
true
dc0a80e1b144500fd6b525f44fbed7e2915ec3a2
C++
guilhermehrn/patimos
/AdmBase.cpp
UTF-8
2,421
2.53125
3
[]
no_license
/* * admBase.cpp * * Created on: Mar 24, 2015 * Author: guilherme */ #include "AdmBase.h" AdmBase::AdmBase(char* caminhoBase) { //incializa a consulta. this->consulta = "select from"; //inicializa o caminho da base this->caminhoBase = caminhoBase; //Inicializa os rotulos da tabela this->atributos[0...
true
e5bd07f60510e442666d31b5fc7d6db727545d48
C++
jjzhang166/Utils-2
/graph/Curve.h
UTF-8
629
2.5625
3
[]
no_license
#ifndef _CURVE_H #define _CURVE_H #include <deque> #include <vector> #include <string> #include <timing/chrono.h> #include "CurveEntry.h" using namespace std; #define CURVE_EXPIRATION 5.0 #define CURVE_GC 1000 class Curve { public: Curve(string name_, Rhoban::chrono *start_); ~Curve(); ...
true
fbe630e4bae2246e62164e4e75255aa4fe0b8d82
C++
NWChen/tshirt-shooting-robot
/Code/arduino/shooter_tester/shooter_tester.ino
UTF-8
422
2.5625
3
[]
no_license
#include <Servo.h> #define k_mLeft 10 #define k_mRight 9 #define k_pSpeed A0 Servo left; Servo right; double speed; void setup() { Serial.begin(9600); left.attach(k_mLeft); right.attach(k_mRight); } void loop() { speed = (double)map(analogRead(k_pSpeed), 0, 1023, 90, 180); if(speed<110) speed=90; left.w...
true
76f098ad592786eca283028f64c1d4d081011c71
C++
sbhonde1/apex_simulator
/LSQ.cpp
UTF-8
3,013
3.15625
3
[]
no_license
// // @author: sonu // @date: 12/10/18. // #include "LSQ.h" #include "lsq_entry.h" #include "helper.h" using namespace std; /*returns slot id * if slot id = -1 * couldn't insert into lsq */ int LSQ::add_instruction_to_LSQ(LSQ_entry entry) { if (isFull()) { return -1; } else if (isempty()) { head = tail = ...
true
27d5313c3568a73923c2eba7a12d5f26d72965ca
C++
cynic64/render-cpp
/src/ll/rpass.cpp
UTF-8
1,942
2.703125
3
[]
no_license
#include "rpass.hpp" #include <stdexcept> namespace ll::rpass { auto attachment(VkFormat format, AttachmentSettings settings) -> VkAttachmentDescription { VkAttachmentDescription info{}; info.format = format; info.samples = settings.samples; info.loadOp = settings.load; info.storeOp = settings.store; ...
true
4061cacb02d881c241ccd6eaa33e6a9ea2016998
C++
e-kohler/CG
/Shape.h
UTF-8
1,488
2.75
3
[ "MIT" ]
permissive
#ifndef SHAPE_H #define SHAPE_H #include "Vector2z.h" #include "Camera.h" #include <gtk/gtk.h> #include <list> #include <vector> #include <string> class Shape { protected: std::string name; public: std::vector<Vector2z> world_coords; Shape(std::string name); ~Shape(...
true
4c093fcd9e3298c25365532ffb8511c195111493
C++
bmjoy/ZenonEngine
/znEngine/SceneFunctional/Scene3D.h
UTF-8
719
2.671875
3
[]
no_license
#pragma once #include "SceneNode3D.h" class Scene3D : public Object { public: Scene3D(); virtual ~Scene3D(); std::shared_ptr<SceneNode3D> GetRootNode() const; template<class T, class ... Args> std::shared_ptr<T> CreateSceneNode(std::shared_ptr<SceneNode3D> Parent, Args&&... _Args); void Accept(IVisitor...
true
b467ba4d6d588b6da014ce7de609d326dd0b75b4
C++
juniway/lint
/algorithms/sort/basic3.cpp
UTF-8
1,171
3.5625
4
[]
no_license
#include <stdio.h> /* * Bubble Sort * O(n^2) */ void bubbleSort(int a[], int n){ int i, j, temp; for (i = (n - 1); i >= 0; i--){ for (j = 1; j <= i; j++){ if (a[j-1] > a[j]){ temp = a[j-1]; a[j-1] = a[j]; a[j] = temp; } } } } // selection sort // best case: O(n^2) /...
true
147c61cf2cb7569cf4c2812267278659f6d2f2f6
C++
hsntrq/towers-defense-sdl
/towercards/goldcard.hpp
UTF-8
317
2.6875
3
[]
no_license
#include "towercard.hpp" /** * \brief This class stores the attributes and methods specific to the bomb tower * */ class GoldCard : public TowerCard { public: /** * Simple constructor */ GoldCard(); /** * Constructor that initializes attributes */ GoldCard(int x, int y); };
true
30611577917ce2463c893f8870c428f6c27ce6f7
C++
sd2048/LeetCode
/976. Largest Perimeter Triangle.cpp
UTF-8
588
3.421875
3
[]
no_license
bool decrSort(int a, int b) { return( a > b ); } class Solution { public: int largestPerimeter(vector<int>& A) { std::sort(A.begin(), A.end(), decrSort); int max = 0; for (int i = 0; i < A.size()-2; ++i) // leave space for the two smaller sides (a, b) { ...
true
551626c07faed5341e027901f73ddc96d3751e95
C++
jakcron/libnintendo-hac
/src/DeltaMetaExtendedHeader.cpp
UTF-8
2,096
2.6875
3
[ "MIT" ]
permissive
#include <nn/hac/DeltaMetaExtendedHeader.h> nn::hac::DeltaMetaExtendedHeader::DeltaMetaExtendedHeader() { clear(); } nn::hac::DeltaMetaExtendedHeader::DeltaMetaExtendedHeader(const DeltaMetaExtendedHeader& other) { *this = other; } void nn::hac::DeltaMetaExtendedHeader::operator=(const DeltaMetaExtendedHeader& oth...
true
4553aa94623f147c72a63df5866c760271e75aa4
C++
ssi-anik/acm
/acm11541.cpp
UTF-8
911
2.71875
3
[]
no_license
#include<stdio.h> #include<string.h> #include<ctype.h> #include<stdlib.h> int main() { char str[300]; int i,j,k, testCaseRunning=1,totalTestCase; scanf("%d",&totalTestCase); getchar(); while(testCaseRunning++<=totalTestCase) { printf("Case %d: ",testCaseRunning-1); gets(str); ...
true
e2ecf03f823e9ff861fe5702f37cf42446703aba
C++
Dagmoores/Cplusplus
/Introducao_a_C++/Challenges/challenge9.cpp
UTF-8
705
3.921875
4
[]
no_license
//Challenge9 /* Crie um Algoritimo em C++ utilizando apenas ponteiros, em que o usuário informa a idade de duas pessoas, e o Algoritmo informa a média destas duas idades. */ #include <iostream> using namespace std; int main () { int age1; int age2; int* pointerAge1; int* pointerAge2; //Ag...
true
6391151aed3414e7373b7d7b238b898991fcc207
C++
Goto-Tatsu/imgui_dx11_gm31_
/GAME/control.cpp
SHIFT_JIS
5,961
2.5625
3
[]
no_license
#include "control.h" #include "stdio.h" using namespace DirectX; void KeyInput::Reset() { for (int i = 0; i < KEY_ARRAY_NUM; ++i) { aKeyboard[i] = 0; aKeyboardOld[i] = 0; } } bool KeyInput::Update(const MouseCapture& mouse) { BYTE keyary[KEY_ARRAY_NUM]; if (!GetKeyboardState(keyary)) { for (int i = 0; i < ...
true
b60cbda435ff7a6e54586c38402acea4416933a0
C++
mehranagh20/ACM-ICPC
/uva/11080-Place-the-Guards/11080-Place-the-Guards.cpp
UTF-8
1,803
2.546875
3
[]
no_license
//In The Name Of God #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long llu; typedef pair<int, int> ii; typedef pair<int, ii> iii; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<iii> viii; typedef vector<vii> vvii; typedef set<int> si...
true
5299ac7e005d4a1d85de507454431a1113a80ca5
C++
AliEissa2077/speedopoint
/SpeedoPoint/date.h
UTF-8
516
2.796875
3
[]
no_license
#pragma once #ifndef DATE_H #define DATE_H #include <ctime> class date { private: int day; int month; int year; int hour; int minute; public: date(); date(int d, int m, int y); date(int d, int m, int y, int h, int min); float operator-(float inp) { float var1 = 0; var1 += day*24; ...
true
50405e34865ce223a3a12ac2ff72c18d0dcee98a
C++
mr-stocki/giulia_ESCape
/lib/mcp_can/mcp_can/examples/send/send.ino
UTF-8
1,295
2.5625
3
[ "MIT" ]
permissive
// demo: CAN-BUS Shield, send data #include <df_can.h> #include <SPI.h> const int SPI_CS_PIN = 10; MCPCAN CAN(SPI_CS_PIN); // Set CS pin void setup() { Serial.begin(115200); int count = 50; // the max numbers of in...
true
e72944069bd2fe41b0d0c80af9aa919c8167ca96
C++
JaumeMontagut/CITM_2_Project2_BuffManager
/exercices/Buff_manager/j1Entity.cpp
UTF-8
1,506
2.546875
3
[ "MIT" ]
permissive
#include "j1Entity.h" #include <vector> #include "PugiXml/src/pugiconfig.hpp" #include "PugiXml/src/pugixml.hpp" #include "p2Log.h" #include "Module_Buff.h" #include "j1App.h" #include "j1Scene.h" Entity::Entity(int x, int y) : x(x), y(y) { } bool Entity::Start() { return true; } bool Entity::Update(float dt) { re...
true
0a341a7ef9568b2ce431dbb75b166f9afba6455a
C++
TheRedLancer/Boilerplate-Maker-Cpp
/Main.cpp
UTF-8
670
2.890625
3
[]
no_license
#include "Boiler.h" int main(int argc, char * argv[]) { //argv[1] = directory path, argv[2] = file name ifstream commentHeader; commentHeader.open("header.txt"); if (argc != 3) { cout << "ERROR: Two(2) command line arguments required: directory path, file name" << endl; exit(-1); } ...
true
6c3fa321203b13b52b34672af6caaf9159a28267
C++
kgd-al/ReusWorld
/src/misc/autocalibrator.cpp
UTF-8
6,481
2.953125
3
[ "MIT" ]
permissive
#include <csignal> #include "../simu/simulation.h" #include "kgd/external/cxxopts.hpp" struct ITest { virtual const std::string& name (void) const = 0; virtual void operator() (void) const = 0; virtual void next (bool success) const = 0; virtual bool preciseEnough (void) const = 0; virtual void finalize (...
true
ce660d0516b57343d42adefcaad311212f1f1df5
C++
bluebynick/ES-1036-Labs
/ES1036Labs/Lab 004/npaul5_lab04_q1.cpp
UTF-8
2,765
4.53125
5
[]
no_license
#include <iostream> /* Nick's More Choice Convertor Programmer: Nicholas Paul Date: October 26th 2017 In this program we will convert Celsius into Fahrenheit, Centimeters to Inches, Meters to Feet, or Km/h toMPH. You will be asked for an input at the beginning that will indicate your choice. The options are: 1. Cels...
true
7b3e6f10166047137777b95ff42c96ad556c55c8
C++
spywhere/os-sim
/src/ui/table.cpp
UTF-8
3,283
3.234375
3
[]
no_license
#include "table.h" #include <sstream> uiTable::uiTable(Logger logger){ this->logger = logger; this->showHeader(); } void uiTable::showHeader(){ this->headerVisible = true; } void uiTable::hideHeader(){ this->headerVisible = false; } void uiTable::checkColumn(int index, std::string col){ if(this->colSize.size(...
true
fbbea38c35e2b579be12d74535cf57a486cd9dc6
C++
bdcarter/Intro2CPPassignments-projects
/Stack-Queue-practice/QueueFunction.cpp
UTF-8
2,865
4.34375
4
[]
no_license
/***************************************************** * Program filename: QueueFunction.cpp * Author: Brianna Carter * Date: 5/17/2015 * Description: This creates a double linked list with FIFO characeristics, * adds 3 values to the list, and removes them. * ****************************************************/...
true
9697b06d8fafeb5ee501133d187fb5aba750f7fa
C++
MazenHassani/AdvancedAlgorithmsCourse
/Week1/1/Queries.cpp
UTF-8
546
2.84375
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; int lower_bound (int a[], int n, int x) { int M,R=n,L=-1; while(R-L>1) { M=L+(R-L)/2; if (a[M]>x) //f(M) R=M; else L=M; } return R; } int main() { int n,m,x,a[2000...
true
fd30020975a7c9051283ea1a7d365ad4e6c744a2
C++
gentlecolts/Mongoose-Rendering-Engine
/engine/core/core.h
UTF-8
2,245
2.765625
3
[ "MIT" ]
permissive
#ifndef CORE_H_INCLUDED #define CORE_H_INCLUDED /* includes all relevant definitions and classes the user should not need to specify includes for any particular datatypes all aspects of this engine must use the namespace MG */ #include "../2d/surface.h" #include "../object/object.h" #include "event.h" #include "threa...
true
456f270cc77b4237ad5fd5940f66a0f6b649dd50
C++
xtuer/Qt
/QtBook/Widget/TopWindow/gui/TopWindow.cpp
UTF-8
2,156
2.515625
3
[]
no_license
#include "TopWindow.h" #include "ui_TopWindow.h" #include "util/NinePatchPainter.h" #include <QDebug> #include <QPainter> #include <QPixmap> #include <QMouseEvent> #include <QSizeGrip> TopWindow::TopWindow(QWidget *centralWidget) : ui(new Ui::TopWindow) { ui->setupUi(this); setWindowFlags(Qt::FramelessWindowH...
true
e7b684804783668e8b2c0f7f76707adf503db219
C++
m7mdkamal/LeCompiler
/include/lexer/LexicalAnalyser.h
UTF-8
882
2.640625
3
[]
no_license
/* * LexicalAnalyser.h * * Created on: Apr 13, 2016 * Author: mohamed */ #ifndef LEXICAL_LEXICALANALYSER_H_ #define LEXICAL_LEXICALANALYSER_H_ #include <string> #include <map> #include <set> #include <sstream> #include <iostream> #include "Token.h" #include "Tag.h" class LexicalAnalyser { public: Lex...
true
29f04b8bb0da0164aa9310738857bcc389d2e8d4
C++
i6o6i/cannydetect
/matrics.cpp
UTF-8
8,739
2.625
3
[ "MIT" ]
permissive
#include "matrics.hpp" Point0::Point0(int x,int y) { this->x=x; this->y=y; } matrics::matrics(const char *filename) { bgr = imread(filename, IMREAD_COLOR); cvtColor(bgr, gray, COLOR_BGR2GRAY); rows = bgr.rows; cols = bgr.cols; } void matrics::gausblur(int i) { GauBlurMat = Mat(); GaussianBlur(gray, Gau...
true
41f7b706abacdb29b6b645f0235d4698a25d9963
C++
Delebrith/return-of-the-neighbours
/kNN_NBC/NBC/CreatedPoint.h
UTF-8
292
2.625
3
[ "MIT" ]
permissive
#pragma once #include "point.h" class CreatedPoint : public Point { std::vector<double> attributeValues; public: CreatedPoint() {}; CreatedPoint(const std::vector<double> attributeValues) : attributeValues(attributeValues) {}; const std::vector<double>* getAttributeValues() const; };
true
e0b29185f849c8ef775a2f614037947a1de78015
C++
PanCheng111/leetcode
/10/test.cpp
UTF-8
1,338
2.984375
3
[]
no_license
#include <cstdio> #include <vector> #include <algorithm> #include <string> using namespace std; class Solution { private: int **opt; public: bool checkMatch(int i, int j, int l1, int l2, const string s, const string p) { if (j == l2) return i == l1; //if (i == l1) return j == l2; if (...
true
0ee4a6fa5a06921fe9202e3ed4369305da5cf655
C++
macieg/jnp3
/kontroler.cc
UTF-8
655
2.796875
3
[]
no_license
#include "kontroler.h" #include "sejf.h" #include <iostream> Kontroler::Kontroler(const Sejf* sejf) { this->sejf = sejf; } Kontroler::operator bool() const { return (sejf->get_available_accesses() > 0); } bool Kontroler::break_in() const { return (sejf->get_break_in()); } bool Kontroler::is_manipulated() const {...
true
22c6a7e1c9ed6e605b07920c2ae6e5741e13571c
C++
Oscer2016/cpp
/example300/transport.cpp
UTF-8
460
2.671875
3
[]
no_license
/************************************************************************* > File Name: transport.cpp > Author: hp > Mail: hepan@xiyoulinux.org > Created Time: 2016年12月11日 星期日 00时23分25秒 ************************************************************************/ #include <iostream> using namespace std; int main(int...
true
82fa187b103ea694f1ce2308871f4b7cddfafac9
C++
toyama1710/cpp_library
/util/coordinate_compression.hpp
UTF-8
1,003
3.046875
3
[ "CC0-1.0" ]
permissive
#ifndef COORDINATE_COMPRESSION_HPP #define COORDINATE_COMPRESSION_HPP #include <algorithm> #include <vector> template <class T> struct CoordinateCompression { std::vector<T> p; template <class InputItr> CoordinateCompression(InputItr first, InputItr last) : p(first, last) { std::sort(p.begin(), p....
true
5b2b485fdc47d230b85246f8d5b479fc5f019247
C++
nomawni/coco
/Coco/Coco/Coco.cpp
UTF-8
3,119
3.203125
3
[]
no_license
// Coco.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include <iostream> #include <boost/asio.hpp> #include "Client.h" #include "ResponseHandler.h" #include "Server.h" void handler(unsigned int request_id, const std::string& response, const boost::system...
true
3d3ec2b50d299215f6ff687cc6186c7a7192d526
C++
afcidk/poj
/POJ-1149.cpp
UTF-8
2,166
2.546875
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <queue> #define MAX 1005 #define INF 0x7fffffff using namespace std; int cap[MAX][MAX], flow[MAX][MAX]; int visited[MAX]; int past[MAX]; int pig[MAX]; int solve(int s, int t); int main() { int m, n; while(scanf("%d%d", &m, &n)==2){ me...
true
8c5bcd2e73e4dac3971b9a48218c6883a00e4ad5
C++
DangerMouseB/DA_Bones_Mirror
/Eispack.cpp
UTF-8
10,669
2.5625
3
[]
no_license
#include "Platform.h" #include "Eispack.h" #include "Strict.h" #include "SquareMatrix.h" #include "Exceptions.h" #include "Decompositions.h" #include "Numerics.h" #include "Functionals.h" namespace { double Pythag(double a, double b) { return sqrt(Square(a) + Square(b)); } double BetterPythag(doubl...
true
698410086db07dbe2a7f84dd28a80ae059233e07
C++
astephens4/Iriss
/Iriss/Orientation.hpp
UTF-8
456
2.53125
3
[]
no_license
#ifndef IRISS_ORIENTATION_H #define IRISS_ORIENTATION_H 1 #include "Utils/Packable.hpp" namespace Iriss { class Orientation : public Utils::Packable { public: static const unsigned char ORNTMSG = 3; float roll; float pitch; float yaw; Orientation(float r, float p, float y); virtual void pac...
true
95af82ec24540c42993c5e94337decaed17b6341
C++
zhangjiangen/hopper
/devel/CSGLib/src/ML_Line.cpp
UTF-8
4,083
2.9375
3
[ "WTFPL" ]
permissive
// Author: Greg Santucci // Email: thecodewitch@gmail.com // Project page: http://code.google.com/p/csgtestworld/ // Website: http://createuniverses.blogspot.com/ #include "ML_Line.h" #include "ML_Maths.h" #include "ML_Transform.h" mlVector3D mlLine::Centroid(void) const { return (a + b) *...
true
4511f45158da0ffb3b742e3437f5bf80d9a9a651
C++
odeblic/joad-project
/network/serialization.cpp
UTF-8
2,487
3.125
3
[]
no_license
#include "serialization.hpp" #include <arpa/inet.h> #include <cstdint> #include <cstring> #include <endian.h> #include <string> ByteBuffer::ByteBuffer() : mContent{}, mCursor(0), mError(false) { } ByteBuffer::~ByteBuffer() { } void ByteBuffer::pushU8(std::uint8_t value) { return push(value); } void ByteBuffer:...
true
0beb1c1dd0de491d1736cda199dce2ea18ef4aa8
C++
hota1024/OpenSiv3D
/Siv3D/include/Siv3D/Spherical.hpp
UTF-8
4,062
2.734375
3
[ "MIT" ]
permissive
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2018 Ryo Suzuki // Copyright (c) 2016-2018 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # pragma once # include "Fwd.hpp" # include "V...
true
e538d074843de58da6e722242afeac066db9ebb5
C++
andreucm/sketches
/27_offLineYarpPublisher/offLinePublisher.cpp
UTF-8
6,353
2.65625
3
[]
no_license
#include "offLinePublisher.h" CoffLinePublisher::CoffLinePublisher(const double firstTS, const string configFileName, bool vb) { userFirstTimeStamp = firstTS; openFiles(configFileName); initializeTimeStamps(); verbose = vb; } CoffLinePublisher::~CoffLinePublisher() { unsigned int ii; for (ii=0; ii<fileSet.siz...
true
4c275070e15fae3a291723f161bf40b2d22d34ae
C++
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-quicksight/include/aws/quicksight/model/Template.h
UTF-8
9,845
2.59375
3
[ "Apache-2.0", "MIT", "JSON" ]
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/quicksight/QuickSight_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/quicksight/model/TemplateVersion.h> #include <aws/core/utils/DateTime.h> #inc...
true
6930a6ce1c250990891c37ab81a73bc955e9a342
C++
Francinildo-Figueiredo/Projetos-em-C-mais-mais
/Conversor_de_bases_numericas/Conversor.cpp
ISO-8859-1
5,781
3.296875
3
[ "MIT" ]
permissive
#include "Conversor.h" #include <iostream> using std::cout; using std::endl; #include <string> using std::string; using std::to_string; using std::stoi; #include <cmath> using std::pow; #include <cctype> using std::isdigit; Conversor::Conversor( unsigned long long d, long long b, string oct, string hd ) { setDeci...
true
216d2e65a8f925668475bfc067967d3b0e02349a
C++
WhiZTiM/ParserDataStructures
/include/FVector.hpp
UTF-8
11,884
2.875
3
[]
no_license
/* * ParserDataStructures * * 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) * * Author: Ibrahim Timothy Onogu * Email: ionogu@acm.org * Project Date: March, 2016 */ #ifndef FVECTOR_H #define FVECTOR_H ...
true
b57e4ab4403f8f767a794804f9901ecc86da346b
C++
jaykpatel1996/DailyCodes
/array/boring questions/RomanToInteger.cpp
UTF-8
746
3.40625
3
[]
no_license
#include<stdio.h> #include<iostream> #include<map> using namespace std; //MCMIV int RomanToInteger(string s) { map<char, int> m; m['I'] = 1; m['V'] = 5;m['X'] = 10;m['L'] = 50;m['C'] = 100;m['D'] = 500;m['M'] = 1000; int i = 0; int res = 0; while (s[i] != '\0') { int curr_val = m[s[i]]; if (i + 1 < s.lengt...
true
53a00e206f9edf9c5f8622384ff149f42a6508bb
C++
MaximeRedstone/Chess
/Rook.h
UTF-8
515
2.765625
3
[ "MIT" ]
permissive
#ifndef ROOK_H #define ROOK_H #include"Piece.h" #include"ChessBoard.h" using namespace std; class Rook: public Piece { friend class ChessBoard; private: bool hasMoved; Rook(bool hasMoved) : hasMoved(hasMoved) {} /* Check valid move */ bool validMove(int fileTo, int rankTo, ChessBoard &chessboard) ov...
true
c162a6a6d9220995a6dd1263ceca471acf491657
C++
newincpp/Obake
/Window/Linux/Window.cpp
UTF-8
3,055
2.515625
3
[ "MIT" ]
permissive
#include <cassert> #include <iostream> #include "Window.hh" #include <Core.hh> System::Window::Window() : _connection(nullptr), _screen(nullptr) { OBAKE_ADD(createWindow); OBAKE_LOOP { OBAKE_ADD(refresh); } } void System::Window::createWindow() { if (_core) { _core->eventsManager.bindEvent("Window Event", th...
true
0a2694422def39f4134c63d782071a719c600b7e
C++
mandliors/SpikeEngine
/Spike Engine/src/Events/EventDispatcher.cpp
UTF-8
438
2.609375
3
[]
no_license
#include "EventDispatcher.h" namespace Spike { EventDispatcher::EventDispatcher(int eventType, void(*func)(SDL_Event& event)) { m_EventType = eventType; m_Function = func; } EventDispatcher::EventDispatcher(void(*func)(SDL_Event& event)) { m_EventType = -1; m_Function = func; } int EventDispatcher::Get...
true
eb22ff5b959aa53ea50eb4349e5536e2348f7e59
C++
TriLoo/c_algorithm
/63GuPiaoZuiDaZhi/main.cpp
UTF-8
895
3.734375
4
[]
no_license
/** * @author smh * @date 2018.08.24 * * @brief 剑指offer第63题 * 股票的最大利润 * * 思路: * 1. 最大的利润就是最大的差值 */ #include <iostream> #include <vector> using namespace std; int getMaxProfit(vector<int> &values) { if (values.size() <= 1) return 0; int minV = values.at(0); int currMax = values.a...
true
d6e8c7aa38e83ae7d57c770332dce49d17e7b240
C++
Wizmann/ACM-ICPC
/POJ/2/2115.cc
UTF-8
774
2.625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
//Result:wizmann 2115 Accepted 164K 0MS C++ 735B #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> // (A + C*x) MOD 2^D == B long long x,y; long long eEuclid(long long a,long long b) { long long ret; if(b==0) { x=1;y=0; return a; } else { ret=eEuclid(b,a%b); long long t=x; x=y...
true
de09f234586589473ffba8e5fdd6d3027c552c51
C++
jam-xd/Competitive-Programing
/#Codeforces/900/A. Devu, the Singer and Churu, the Joker/439_A.cpp
UTF-8
447
2.78125
3
[]
no_license
//http://codeforces.com/contest/439/problem/A #include <bits/stdc++.h> using namespace std; int main() { int canciones, tiempo; cin>>canciones>>tiempo; deque<int>gg(canciones); int sum = 0; for(int i=0;i<canciones;i++){ cin>>gg[i]; sum = sum + gg[i]; } if(sum + (cancione...
true
91afd3f4e9fa584a8ddea8171038db14adea51c6
C++
promoter/shmqueue
/shmmqueue.cpp
UTF-8
16,823
2.515625
3
[]
no_license
// // messagequeue_h // // Created by 杜国超 on 17/6/22. // Copyright © 2017年 杜国超. All rights reserved. // #include <string.h> #include <cstdlib> #include <stdio.h> #include <memory> #include <sys/shm.h> #include "shmmqueue.h" namespace shmmqueue { BYTE *CMessageQueue::m_pCurrAddr = nullptr; CMessageQueue::CMessageQu...
true
16f6be3d281dc82f3f798509e957f30c224163dc
C++
nikhilponnuru/Justcodeit
/DFS.cpp
UTF-8
1,300
3.484375
3
[]
no_license
//As adjaceny list model is being used I am using list library here #include<iostream> #include<list> using namespace std; class graph //also structures can be used { private: int size; //to declare number of vertices of graph list<int> *pointer; public: graph(int size); void dfs_star...
true
fa8290786506dd5641bfe0cd60ce0bed64d1a559
C++
utsavdubey724/Competitive-programming
/Leetcode/C++/Easy/isUgly.cpp
UTF-8
1,075
3.6875
4
[]
no_license
/* Problem: 263. Ugly Number Date: August 02, 2021 Author: Utsav Dubey, utsav_201700433@smit.smu.edu.in Difficulty: Easy Source: https://leetcode.com/problems/ugly-number/ Question: An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5. Given an integer n, return true if...
true
82dbb6d1a3ddf23c0b50e99e4ec8b461be13fe4c
C++
Pedro-Appel/Organizador-de-Tabelas
/TadPilha.cpp
UTF-8
1,018
2.71875
3
[]
no_license
#include <iostream> #include "TadPilha.h" TadPilha::TadPilha() { this->topo = NULL; this->Ftopo = NULL; } bool TadPilha::vazia() { return this->topo == NULL; } bool TadPilha::Fvazia() { return this->Ftopo == NULL; } void TadPilha::push(NoAbb * noAbb) { NoPilha * no = new NoPilha(noAbb); ...
true
7649d1d5986b7df8f453fe65a5a603c0a4ffd0b2
C++
Dolphiniac/Vulkan
/Engine/Code/Engine/Network/NetPacket.cpp
UTF-8
2,168
2.84375
3
[]
no_license
#include "Engine/Network/NetPacket.hpp" #include "Engine/Core/ErrorWarningAssert.hpp" #include "Engine/Math/MathUtils.hpp" //----------------------------------------------------------------------------------------------- bool NetPacket::WriteContents(const NetMessage& msg) { MessageHeader msgHeader; msgHeader.flags...
true
14b365fbb703042f2b23d8b106419e4ea110299e
C++
RishabD/GraphTheory
/graph_theory.cpp
UTF-8
3,479
3.859375
4
[]
no_license
/* Shortest path v2.0 Code below finds shortest path. The one I made doesn't need to traverse through all paths. I used semi-aysncronous code to find the path by effectively searching through all paths at the same time. The first one that finishes is shortest path. Code can be easily modified to find all paths in incre...
true
ca11224a46244d8a315ab40400eea1593ee92d5c
C++
bendem/SchoolCars
/src/utils/TermUtils.cpp
UTF-8
3,151
2.78125
3
[]
no_license
#include "utils/TermUtils.hpp" const String TermUtils::ESCAPE_SEQUENCE = "\033["; void TermUtils::setEchoInput(bool echo) { // Get current settings termios settings; tcgetattr(STDIN_FILENO, &settings); // Change ICANON flag if (echo) { settings.c_lflag |= ECHO; } else { settin...
true
ec719907544f18863582f3db3c776da54c84b85b
C++
laviniameds/CP
/studying/tree_heap_hash/UVa-11849/11849.cpp
UTF-8
542
2.59375
3
[]
no_license
#include <iostream> #include <set> using namespace std; int main(){ set<int> cds_jack; int qtd_jack, qtd_jill, cd, count = 0; while(cin >> qtd_jack >> qtd_jill, qtd_jack && qtd_jill){ while(qtd_jack--){ cin >> cd; cds_jack.insert(cd); } while(qtd_jill--){ ...
true
66b178516d8a58b8dbd0422b2ee480412b51be74
C++
lucaslongaray/simuladores-netuno
/gpu_sonar_simulation/include/vizkit3d_normal_depth_map/test/Material_test.cpp
UTF-8
5,374
2.546875
3
[]
no_license
#define BOOST_TEST_MODULE "Material_test" #include <boost/test/unit_test.hpp> // OpenSceneGraph includes #include <osg/AlphaFunc> #include <osg/Geode> #include <osg/Group> #include <osg/Image> #include <osg/ShapeDrawable> #include <osg/StateSet> #include <osgViewer/Viewer> // Rock includes #include <normal_depth_map/...
true
714f2b6e53f0c78b405436d7a42c9fd70f8dcaae
C++
Annushka34/c-Examples
/32стаціонар/08_List/08_List/QueueRing.cpp
WINDOWS-1251
1,610
3.640625
4
[]
no_license
//#include<iostream> //using namespace std; // // //class MyQueue //{ //private: // struct Node // { // int val; // Node* next; // }; // // - // Node * pHead; // Node * pTail; // int size; // //public: // MyQueue() // { // pHead = nullptr; // pTail = nullptr; // size = 0; // } // bool Pop(int &val) // { // i...
true
4bedb1c96fb48975d1354d333161485678d2dddc
C++
georgerapeanu/c-sources
/Siruri 2/main.cpp
UTF-8
1,080
2.546875
3
[]
no_license
#include <iostream> using namespace std; long long S[1805][605]; long long N,M,K; long long adun(long long a,long long b){ a += b; if(a >= M){ a -= M; } return a; } long long mult(long long a,long long b){ long long rez = 0; while(b){ if(b & 1){ rez = adun(rez,a); } b...
true
91044b49232196357526f8930076c4ddcb3f5a26
C++
xiao9616/dataStruct
/List/cpp/DoubleList.h
UTF-8
738
2.640625
3
[]
no_license
// // Created by user on 2019/9/18. // #ifndef CPP_DOUBLELIST_H #define CPP_DOUBLELIST_H #include <iostream> #include <list> using namespace std; class DListNode { public: DListNode *prev, *next; int val; DListNode(DListNode *prev = nullptr, DListNode *next = nullptr, int val = 0); virtual ~DListNo...
true
722da095f8b3766cad40deba9b77639123f1170e
C++
WhiZTiM/coliru
/Archive2/39/91302648439db6/main.cpp
UTF-8
650
3.125
3
[]
no_license
//PUNTEROS #include <stdio.h> /*void mul(int a, int b, int s) { s=a*b; } void mult(int a, int b, int* s) { *s=a*b; }*/ /* void p() { int s; printf("%d\n",s); } void q() { int n = 248; printf("%d\n",n); } */ int* m() { int a=29; return &a; } int main() { /*int a=8; int* ...
true
4f9a9cae49bbc7889c1ced606fafd69a12e25dbe
C++
arangodb/arangodb
/3rdParty/boost/1.78.0/boost/pfr/detail/make_integer_sequence.hpp
UTF-8
2,564
2.53125
3
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause", "ICU", "Zlib", "GPL-1.0-or-later", "OpenSSL", "ISC", "LicenseRef-scancode-gutenberg-2020", "MIT", "GPL-2.0-only", "CC0-1.0", "LicenseRef-scancode-autoconf-simple-exception", "LicenseRef-scancode-pcre", "Bison-exception-2.2", "LicenseRef-scancode...
permissive
// Copyright (c) 2018 Sergei Fedorov // Copyright (c) 2019-2021 Antony Polukhin // // 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) #ifndef BOOST_PFR_DETAIL_MAKE_INTEGER_SEQUENCE_HPP #define BOOST_PFR_DETAIL_MAKE_IN...
true
d9fdc2c3fe60d4afe6cb33b4ad6f3ee3ce7fcbb0
C++
huajing225/GraphicsFileConverter
/src/brc2pov/main.cpp
UTF-8
4,549
3.015625
3
[]
no_license
#include <stdio.h> #include <math.h> #include <algorithm> #include <QtCore> using namespace std; class Node { public: Node(): x(0), y(0), z(0), r(1) {} Node(float x_, float y_, float z_, float r_): x(x_), y(y_), z(z_), r(r_) {} void print() const { printf(" <%f, %f, %f>, %f\n", x, y, z, r);...
true
ebd4f9a12d2ab73dc4411251fc090c94b22dadff
C++
Amankumar-code/GeeksForGeeksSolution
/Track/Searching/5. Majority Element.cpp
UTF-8
447
3.265625
3
[]
no_license
class Solution{ public: // Function to find majority element in the array // a: input array // size: size of input array int majorityElement(int a[], int n) { if(n==1) return a[0]; map<int,int>m; for(int i=0;i<n;i++) { m[a[i]]++; } ...
true
820d0651917175de7cb29b213f2d690de36e5607
C++
tanimoto-y/procon30_comp_ProvisionalOutput
/for_VisualStudio/procon30_comp_ProvisionalOutput/node.cpp
SHIFT_JIS
2,245
3.46875
3
[]
no_license
#include "node.hpp" /** Node::Node: NodeNX̃RXgN^ m[h̎WƐem[hݒ肷iem[hȂꍇnullptrwj @param argX m[hɐݒ肷xW @param argY m[hɐݒ肷yW @param argParentNodePtr ݒ肷em[h̃|C^ */ Node::Node(const int argX, const int argY, Node* argParentNodePtr) { mX = argX; mY = argY; mThisNodePtr = ...
true
cf1153c0e1e68f83b900d071f4f4c53dcb57823d
C++
kritsanaphat/week3-2
/week3-2/Source.cpp
UTF-8
975
4.09375
4
[]
no_license
#include<stdio.h> void Plus(int a, int b) { printf("%d + %d = %d\n", a, b, a + b); } void Minus(int a, int b) { printf("%d - %d = %d\n", a, b, a - b); } void Multiplied(int a, int b) { printf("%d * %d = %d\n", a, b, a * b); } void Divide(int a, int b) { float c; c = (float)a / b; printf("%d / %d = %f\n", a, b, c)...
true
6fc40733b47a310c097e80db82a9502c3231e922
C++
ARM-software/ATP-Engine
/stats.hh
UTF-8
5,624
2.8125
3
[ "BSD-3-Clause-Clear", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * SPDX-License-Identifier: BSD-3-Clause-Clear * * Copyright (c) 2015 ARM Limited * All rights reserved * Created on: Oct 19, 2015 * Author: Matteo Andreozzi */ #ifndef _AMBA_TRAFFIC_PROFILE_STATS_HH_ #define _AMBA_TRAFFIC_PROFILE_STATS_HH_ #include <cstdint> #include <string> #include <cmath> #include...
true
f64fc12ece96935ed7395b4c5f490f6e29e5a48b
C++
yalagamsrinivas/CPP-Training
/CPPTraining/LambdaExpression.cpp
UTF-8
895
3.125
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { double dData[] = {-0.001, 5.0251, -0.3, 9.365, 0.365, 89.5654}; vector<double> v_dData; for (auto Data : dData) { v_dData.push_back(Data); } cout << "Before Transform : " << endl; for (auto &Data : v_dData) { c...
true
069c5a20f1df12dee232baddc7fccf5922b302d8
C++
guerarda/rt1w
/src/core/arena.cpp
UTF-8
1,588
3.09375
3
[ "MIT" ]
permissive
#include "rt1w/arena.hpp" #include "rt1w/error.h" constexpr size_t cache_line_size = 64; constexpr size_t extra_alloc_size = 256 * 1024; struct hdr { struct hdr *prev; uint8_t *next; uint8_t *limit; }; struct _Arena : Arena { _Arena(); ~_Arena() override; void *alloc(size_t n) override; ...
true
ef9f43ab49737ba3d16c9ecfab70d82c3674c73a
C++
benyeoh/arf
/Src/RendererUtils/RUPostTransVertCacheOpt.h
UTF-8
2,199
2.546875
3
[]
no_license
//============================================================================== // // RUPostTransVertCacheOpt.h // // Based on Tom Forsyth's implementation: // http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html // // Author: Ben Yeoh // Date: 2/2/2009 // //=========================...
true
dcb444e80bf4cd5065eda2da249627431a79ba79
C++
MariaTeresaFerreira/CAL-proj
/Projeto_Parte1/Projeto_Parte1/src/Accommodation.h
UTF-8
2,422
3.75
4
[]
no_license
/* * Accommodation.h * * Created on: 23/03/2018 * Author: Francisco Miranda; Jo�o Vaz Gama Amaral; Maria Teresa Ferreira; */ #ifndef SRC_ACCOMMODATION_H_ #define SRC_ACCOMMODATION_H_ #include "Period.h" #include "Libraries.h" class Accommodation{ private: /** * @brief Variable tha...
true
9c796185539842a286b8af0f707e6d9020e2050a
C++
saumya66/Competitive-Programming-
/CODEFORCES/A2OJ Practice/1300 Codeforces Rating 1399/WayTooLongWords.cpp
UTF-8
534
2.546875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; void solve() { string s; cin>>s; ll l =s.length(); if(l>10){ string ans ; ans = ans+ s[0]; ans=ans+ to_string(l-2); ans=ans + s[l-1]; cout<<ans ; } else { cout<<s; } } int main() { ios_base::sync_with_stdio(false); cin....
true
cb45d09eb2f8c47f63ebb240174d05120179f369
C++
jgrowl/carcassonne
/src/left_side_connections.cc
UTF-8
997
2.796875
3
[]
no_license
#include "left_side_connections.h" namespace carcassonne { LeftSideConnections::LeftSideConnections() { } LeftSideConnections::LeftSideConnections(const LeftSideConnections& src) : SideConnections(src) { CopyFrom(src); } LeftSideConnections& LeftSideConnections:: operator=(const LeftSideConnections& rhs) { if(t...
true
06036ac7f9039e26074e7beeda827aa847ad1c24
C++
Dreadbot/Dreadbot-V
/src/XMLInput.cpp
UTF-8
10,105
2.75
3
[]
no_license
#include "XMLInput.h" #include "Config.h" namespace dreadbot { //SimplePneumatic stuff SimplePneumatic::SimplePneumatic() { invert = false; dPneumatic = nullptr; sPneumatic = nullptr; actionCount = 2; } void SimplePneumatic::Set(DoubleSolenoid::Value value) { if (invert) { if (value == DoubleSolen...
true
f7f04605fbe8205bce346fccdcc2087ec187b3dd
C++
JialeWei/6D_pose_filter_and_smoother
/src/main.cpp
UTF-8
10,512
2.546875
3
[]
no_license
#include <iostream> #include <fstream> #include <cassert> #include <Eigen/Geometry> #include <random> #include <chrono> #include <iomanip> #include "../include/kalman_filter.h" #include "../include/kalman_smoother.h" void dataReader(std::vector<std::vector<double>> &res, const std::string &pathname) { std::ifstrea...
true
1d37f2ca798cfc989a12c1556221b9b266a53c9d
C++
PenteractStudios/Tesseract
/Project/Source/Components/Component.h
UTF-8
2,384
2.71875
3
[ "MIT" ]
permissive
#pragma once #include "Components/ComponentType.h" #include "FileSystem/JsonValue.h" #include "Utils/UID.h" class GameObject; #if defined(TESSERACT_ENGINE_API) /* do nothing. */ #elif defined(_MSC_VER) #define TESSERACT_ENGINE_API __declspec(dllexport) #endif class Component { public: Component(ComponentType type,...
true
d8f9a0eceaca71b2aa46edd00b1943c17a63ecc2
C++
dentych/APKX
/Checkpoint.hpp
UTF-8
1,417
2.65625
3
[]
no_license
#pragma once #include <map> #include <vector> #include <iostream> #include <boost/signals2.hpp> #include <mutex> #include "Package.hpp" typedef std::string TDestinationAddress; class ICheckpoint { public: std::string getName() const; virtual void checkIn(TPackage package) = 0; protected: ICheckpoint(st...
true
48977b3999fb82239aa3dc6b0f04091645f45c5d
C++
HabibCodeMage/Binarysearchtreeafter
/Binarysearchtree.cpp
UTF-8
1,619
2.78125
3
[]
no_license
// Binarysearchtree.cpp : This file contains the 'main' function. Program execution begins and ends there. #include <iostream> #include"BST.h" using namespace std; int main() { BST<int> obj; obj.insert(7); obj.insert(4); obj.insert(13); obj.insert(2); obj.insert(6); obj.insert(11); obj.insert(15); obj.insert(1...
true
5613709f8e59530d5fd62492460d9cd44e371890
C++
BartoszewskiA/Programowanie-obiektowe-WYKLAD-Int.-techniczna-2021
/w07p02.cpp
UTF-8
1,254
3.796875
4
[]
no_license
#include <iostream> #include <sstream> #include <cmath> using namespace std; class RGB { private: int R; int G; int B; public: RGB(int r=0, int g=0, int b=0) : R(r), G(g), B(b) {} string toString() { stringstream temp; temp<<"R="<<R<<" G="<<G<<" B="<<B<<endl; return t...
true
e0a26a9460ca3eaccdbbbd2eb1c9ba2b01615035
C++
RobMa/raytracer
/src/global.cpp
UTF-8
572
2.625
3
[]
no_license
#include "global.hpp" #define _USE_MATH_DEFINES #include <math.h> using namespace Util; SE3 Util::createSE3(double ax, double ay, double az, double tx, double ty, double tz) { SE3 rx { Eigen::AngleAxisd(ax, Eigen::Vector3d(1, 0, 0)) }; SE3 ry { Eigen::AngleAxisd(ay, Eigen::Vector3d(0, 1, 0)) }; SE3 rz { Eigen::A...
true
f78ea276c0272047be2fe746682ac6154f15b995
C++
chenjianlong/cpp-research
/diamond2.cpp
UTF-8
1,861
3.0625
3
[]
no_license
#include <iostream> using namespace std; class A { public: int a_; }; // class B: public A class B: public virtual A { public: int b_; }; // class C: public A class C: public virtual A { public: int c_; }; class D: public B, C { public: int d_; }; /*typedef void (*pfn)(A&a); void dispaly(D &d) { ...
true
c406ca91a23adfeb3282a7c11d70a183acc745b3
C++
sabyrrakhim06/eyden-tracer-06
/src/CameraTarget.h
UTF-8
629
2.9375
3
[]
no_license
#pragma once #include "CameraPerspective.h" class CCameraTarget : public CCameraPerspective { public: // --- PUT YOUR CODE HERE --- CCameraTarget(Size resolution, const Vec3f& pos, const Vec3f& target, const Vec3f& up, float angle) : CCameraPerspective(resolution, pos, normalize(target - pos), up, angle) { ...
true
4eb0b477f5295a96ad3a23a6e1f31ed56b7ebe59
C++
chetan-anand/coding
/SUBGCD.cpp
UTF-8
435
2.640625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int gcd(int a,int b) { int temp; while(b) { int temp=a%b; a=b; b=temp; } return a; } int main() { int t,i,j,k; cin>>t; while(t--) { int n,a[110000],temp; cin>>n; for(i=0;i<n;i++) cin>>a[i]; temp=a[0]; for(i=1;i<n;i++) { temp=gcd(temp,a[i]); ...
true
5fc0fe4659fb0f67059dcc8b247d6fa665d5c9cd
C++
Sparky384/FRC_2015
/projects/config_reader/src/ConfigReader.h
UTF-8
644
2.9375
3
[]
no_license
/* * ConfigReader.h * * Singleton class for reading configuration file * */ #ifndef CONFIGREADER_H_ #define CONFIGREADER_H_ #include <string> #include <map> using namespace std; class ConfigReader { public: // make the implementation of this class a singleton static ConfigReader* getInstan...
true
bafc8bc1379f80e90b73cc66a9005cfb75da9aaf
C++
gregjesl/simpleson
/json.cpp
UTF-8
30,174
3.234375
3
[ "MIT" ]
permissive
/*! \file json.cpp * \brief Simpleson source file */ #include "json.h" #include <string.h> #include <assert.h> /*! \brief Checks for an empty string * * @param str The string to check * @return True if the string is empty, false if the string is not empty * @warning The string must be null-terminated for this ...
true
fb7d8d753c8f2cb08bfab832f948c8d29654105b
C++
jguillaumes/MeteoArduino
/clocks/MeteoClockRTC.cpp
UTF-8
2,225
2.859375
3
[]
no_license
/* * MeteoClockRTC.cpp * * Created on: Sep 25, 2018 * Author: jguillaumes */ #include <Arduino.h> #include "MeteoClockRTC.h" MeteoClockRTC::~MeteoClockRTC() { RTC_DS3231 *rtc = (RTC_DS3231 *) _theRTC; delete rtc; _theRTC = NULL; } //+ // Constructor: creates a new RTC_DS3231 instance and stores a po...
true
1560082e1a63a26f435710fe2ce6cdffe41b0ee3
C++
sqwsummerwind/summer
/net/EventLoopThread.cc
UTF-8
920
2.546875
3
[]
no_license
//2016.9.13 //qiangwei.su // #include <boost/bind.hpp> #include "EventLoopThread.h" #include "EventLoop.h" using namespace summer; using namespace summer::net; EventLoopThread::EventLoopThread(const ThreadInitCallback& cb, const std::string& name) :loop_(NULL), mutex_(), cond_(mutex_), exiting_(false), callback_(cb...
true
aecc5f3b932fcbf547613212f31fa0cc133e238e
C++
rrivas-utec/Semana10
/Ejercicio1.cpp
UTF-8
2,298
3.390625
3
[]
no_license
// Librerias #include <iostream> #include <vector> #include <string> #include <cstdlib> // Namespaces using namespace std; // Crear clases contenidas struct TLlanta { string marca; string perfiles; float radio; float espesor; }; struct TMotor { string marca; string modelo; float cilindr...
true
9e7d21e85ab62e032d2185f6f78c2e2847e986bd
C++
nish-works/DSA-Probs-Sols
/bitwise/power_set_using_bitwise.cpp
UTF-8
588
3.015625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; // Efficient solution: TC: Theta(2^n * n) void solve(string s) { int sLength = s.length(); int powerSetSize = pow(2, sLength); for (int counter = 0; counter < powerSetSize; counter++) { for (int j = 0; j < sLength; j++) { if ((c...
true
48e9259c9b85f4be6e217d2daabd3c29c9db2719
C++
momja/CPU-Raytracer
/GFX/Scene/Primitives/Cylinder.h
UTF-8
878
3.015625
3
[]
no_license
// // Created by Maxwell James Omdal on 2/10/20. // #ifndef RAYCASTER_CYLINDER_H #define RAYCASTER_CYLINDER_H #include "Primitive.h" #include "../../Color.h" class Cylinder: public Primitive { public: float radius; Point3D center; Vector3D orientation; float height; // Default Constructor Cy...
true
b4c1a554a4bfbf315fd922f3ff262f43d6b41cb6
C++
byu-cpe/ecen629_student
/partitioner/src/partitioner_main.cpp
UTF-8
1,529
2.921875
3
[]
no_license
#include <cassert> #include <fstream> #include <iostream> #include <string> #include <vector> #include "Block.h" #include "Chromosome.h" #include "Design.h" #include "Net.h" #include "utils.h" int main(int argc, char **argv) { if (argc != 3) { printf("Usage: ./partitioner circuit_file seed\n"); exit(-1); ...
true
689ee11bbbaf267536c5d220796fd39d08c88a06
C++
AhmedMahmoud129/-
/QUESTION 1/QUESTION 1/QUESTION 1.cpp
UTF-8
748
3.484375
3
[]
no_license
#include <iostream> using namespace std; int main() { float year, month = 0, i, sum = 0, max = 0, mini = 9999999999; for (year = 1; year <= 10; year++) { for (i = 1; i <= 12; i++) { cout << "Enter the month earning"; cin >> month; if (month ...
true
626b6ff016ce2ae0347634713db137df0771ebab
C++
Ermelber/KMP-Tools
/AbstractKMP/Area.cpp
UTF-8
802
2.6875
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: Area.cpp * Author: Ermii * * Created on 25 settembre 2016, 15.31 */ #include "Area.h" Area::Area(AreaPoint* area...
true
fe9b3e792b9b9722b2a03c407cb24b6fdeb27c19
C++
jdtuck/fdasrvf_MATLAB
/gropt/Manifolds/Stiefel/StieVector.h
UTF-8
772
3.046875
3
[]
no_license
/* This file defines the class of a point on the tangent space of the Stiefel manifold \St(p, n) = \{X \in R^{n \times p} | X^T X = I_p\} SmartSpace --> Element --> StieVector ---- WH */ #ifndef STIEVECTOR_H #define STIEVECTOR_H #include "Manifolds/Element.h" #include <new> #include <iostream> #include "Others/def....
true