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
c54f4f0643b770d854cbf297ac8b6fb05a87434e
C++
hgaiser/roman-technologies
/mobile_base/include/mobile_base/PathFollower.h
UTF-8
3,672
2.625
3
[]
no_license
/* * PathFollower.h * * Created on: Jan 20, 2012 * Author: hans */ #ifndef PATHFOLLOWER_H_ #define PATHFOLLOWER_H_ #include "ros/ros.h" #include "nav_msgs/Path.h" #include "tf/transform_listener.h" #include "std_msgs/Float32.h" #include "std_msgs/UInt8.h" #include "mobile_base/LocalPlanner.h" enum FollowS...
true
8e99f2965c506e200eb5d7c43b27523b75561109
C++
whlprogram/LeetCode
/108ConvertSortedArrayToBinarySearchTree/main.cpp
GB18030
2,445
3.625
4
[]
no_license
//ԭ https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/#/description //˲ http://blog.csdn.net/whl_program/article/details/72803058 #include <iostream> #include <vector> #include <queue> using namespace std; // Definition for a binary tree node. struct TreeNode { int val; TreeNode *...
true
9644cd1658856acf9015c39e5193b8d69b1e3a42
C++
JackBro/PEGGY
/Projects/UDWT/Main.cpp
UTF-8
6,008
2.546875
3
[]
no_license
// Copyright (c) Microsoft Corporation. All rights reserved. #include "Source/Filter.h" #include <RunTest.h> //#include <Timings.h> // Reuse the filter from the normal convolution (may as well). Filter * g_filter = 0; //extern Timings // gTimings; //Data1DFloat * //Loop1D * Data1DFloat * g_data = 0; size_t g...
true
28889aced81b41cfb5af71fdff8d8003ec765d5c
C++
droidream/dukv8
/src/Context.cpp
UTF-8
3,575
2.84375
3
[ "MIT" ]
permissive
// // Created by Jiang Lu on 6/2/15. // #include <cassert> #include <dukv8/Context.h> #include <dukv8/Persistent.h> #include <dukv8/Isolate.h> #include <dukv8/Local.h> #include <dukv8/Object.h> namespace v8 { Context *Context::s_current_context_ = NULL; Context::Context() : previous_context_(NULL) { // p...
true
ead7dd325012f5f4a6126b3d7e73f33ad34a4b09
C++
userdw/Arduino_Sensor_Training_Kit
/code/08_Grove_Buzzer/Vibration_Detection/Vibration_Detection.ino
UTF-8
808
2.53125
3
[]
no_license
/*===============VIBRATION DETECTION============== Dibuat Oleh Tim Digiware ========================================== Konfigurasi Pin: |--------------------------------------------------------| | | Arduino Base HAT | |-----------------------------------------------------...
true
bc9d357d65fd57ddf78030915174175063cfe8e2
C++
bioidiap/bob.learn.linear
/bob/learn/linear/cpp/pca.cpp
UTF-8
6,042
2.53125
3
[ "BSD-3-Clause" ]
permissive
/** * @date Tue Jan 18 17:07:26 2011 +0100 * @author André Anjos <andre.anjos@idiap.ch> * @author Laurent El Shafey <Laurent.El-Shafey@idiap.ch> * * @brief Principal Component Analysis implemented with Singular Value * Decomposition or using the Covariance Method. Both are implemented using * LAPACK. Implementat...
true
fd78067c55418910fb1c12e033a4f2ee4bd566fb
C++
s00ler/algorithms-and-data-structures
/task1.cpp
UTF-8
1,192
3.5625
4
[]
no_license
#include <vector> #include <iostream> std::vector<int> factor(int value) { std::vector<int> result; int d = 2; while (d * d <= value) { if (value % d == 0) { result.push_back(d); value /= d; } ...
true
0315509bfbc6b1daecef7806cba531f9b70d31ba
C++
minzo/DPM
/source/ThreadPool.h
UTF-8
6,109
3.265625
3
[]
no_license
//============================================================================== // // Thread Pool // //============================================================================== #ifndef _THREAD_POOL_H_ #define _THREAD_POOL_H_ #include <thread> #include <mutex> #include <condition_variable> #include <map> #inclu...
true
f530db9478de7c75282775ed96e6d282c5a8d772
C++
ztipnis/imaplw
/test/miniz_test.cpp
UTF-8
4,137
2.703125
3
[ "BSL-1.0", "MIT", "OpenSSL", "LicenseRef-scancode-openssl", "LicenseRef-scancode-ssleay-windows" ]
permissive
//test_miniz #include <miniz.h> #include <string> #include <sstream> #include <boost/log/trivial.hpp> #include <iostream> #define ifThenElse(a,b,c) (a ? b : c) #define min(a,b) ( a < b ? a : b) #define max(a,b) ( a > b ? a : b) #define Z_BUF_SIZE (1024*1024) typedef unsigned int uint; const std::string deflate(const st...
true
58c5fab1d2df5e2e84e903fcc9bac6a1d71d255e
C++
hello-lx/CodingTest
/4/573.cpp
UTF-8
2,926
3.109375
3
[]
no_license
#include <iostream> #include <list> #include <vector> #include <math.h> #include <algorithm> #include <map> #include <unordered_map> #include <unordered_set> #include <set> #include <list> #include <queue> #include <stack> using namespace std; #define INT_MIN -99999999999 #define INT_MAX 99999999999 class Solution {...
true
dce0cd7bfcbd4b2c4e04ef67042cf10735195a5b
C++
gruizFING/SOs
/Lab3/soAgenda/MEMORIA.CPP
UTF-8
1,354
2.90625
3
[]
no_license
#include "memoria.h" #include <errno.h> #include <stdlib.h> #include <sys/stat.h> #define PERMISOS S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH int abrir_segmento(char clave, int segsize) { key_t llave; llave = ftok(".",clave); if(llave == (key_t)-1) return -1; return shmget(llave,...
true
c2dae49e2991e14be3c95da2dae272cf39fea8bd
C++
paucazou/FRUMUL2
/frumul/parameters.cpp
UTF-8
20,232
2.765625
3
[]
no_license
#include <climits> #include <unordered_map> #include "functions.inl" #include "parameters.h" #include "parmqueuer.h" #include "compiler.h" #include "symbol.h" #include "vm.h" namespace frumul { Parameter::Parameter(const Node& node, Symbol& np) : Parameter(node,&np) {} Parameter::Parameter(const Node& node,Sym...
true
ce07d4df5228b2169f97109f95283e794874f238
C++
CIVIVFanatic/TSK
/Micro/components/speaker.h
UTF-8
448
2.609375
3
[]
no_license
//authors: Robert Hayes //TechSmartKids 2014 #include <micro_component.h> class Speaker{ public: Speaker(GpioPwmPin p):pin(p){}; void playNote(int note); void playNote(int note, int duration); void stop(); private: GpioPwmPin pin; }; void Speaker::playNote(int note){ tone(pin.getPin(),note); } void...
true
51485c2bb75055e43e99013d919e52a926bdce74
C++
sarojku17/csAcademy
/Build_the_Fence.cpp
UTF-8
650
2.546875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; long N;long long K; long max_height=0; bool check(vector<long> trees,long mid){ if(mid==0) return false; long sol=0; for(long i=0;i<N;i++) { sol+=floor(trees[i]/mid); if(sol>=K) { max_height=mid; return true; } } return...
true
05df21b90245b3ff132aeb15af4d1f302361860a
C++
bvbfan/stlxx
/test.cpp
UTF-8
1,420
2.859375
3
[ "MIT" ]
permissive
#include "stlxx.h" #include <algorithm> #include <iostream> #include <sstream> #include <thread> #include <vector> struct Employee { std::string id; Employee(Employee &&) = default; Employee(std::string id) : id(id) {} std::vector<std::string> lunch_partners; }; int main(int argc, char *argv[]) { ...
true
937067db3eba104af115e1cb53f5a7a39921986d
C++
jhluo/EFM_Server
/Client/Data/CommandHandler.cpp
UTF-8
1,903
2.515625
3
[]
no_license
#include "CommandHandler.h" #include "Client/AClient.h" #define ACK_TIMEOUT 3000 //expect acknowledge to come back in 3 seconds #define COMMAND_TIMER 60 * 1000 //send command every 1 minute (for version 3 only) CommandHandler::CommandHandler(QIODevice* pInput, int version, QObject *pParent) : QObject(pParent)...
true
17164351447c519deb53120da98394f30b11af56
C++
Fareolla/CppBase22.01.2019
/QuadDiff/main.cpp
UTF-8
756
3.1875
3
[]
no_license
#include <iostream> #include <cmath> int main() { double a, b, c, D, x; std::cout << " ax2 + bx + c = 0 " << std::endl; std::cout << "Please insert a" << std::endl; std::cin >> a; std::cout << "Please insert b" << std::endl; std::cin >> b; std::cout << "Please insert c" << std::endl;...
true
805d8c6740d8fefb0c53df4bca233cb1c0eb4b64
C++
FuentesFelipe/lab1so
/Proceso.cpp
UTF-8
1,703
3.1875
3
[]
no_license
#include "Proceso.h" #include <iostream> #include <ctime> Proceso::Proceso(){ } void Proceso::copiarProceso(Proceso proceso){ this->id= proceso.getId(); this->priority = proceso.getPriority(); this->rafaga = proceso.getCurrentTime(); this->tpoLlegada = proceso.getTpoLlegada(); ...
true
194ce5e96b55b567311d442bc35a97bb251f8f5c
C++
mahdikhaliki/CS-Classes
/CS14 Into to C++ Workplace/Lab 11 Part 2/Lab 11 Part 2/lab11Part2.cpp
UTF-8
1,373
3.953125
4
[]
no_license
// // lab11Part2.cpp // // Mahdi Khaliki and Farris Tang // Lab 11 part 2 // Uses an input file for the items and price of items on a menu and creates a // output file using the values of the input file to create a menu. // #include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std...
true
55306ba5261e6b2d85425e40ef46acf0444106c6
C++
vstuhumanoid/robot-controller-ros
/src/AR60x_driver/PowerController/PowerController.cpp
UTF-8
2,401
2.671875
3
[]
no_license
// // Created by garrus on 23.03.18. // #include "PowerController.h" PowerController::PowerController(AR60xHWDriver &driver, ros::NodeHandle &nh) : BaseController(driver, nh) { init_topics(); } PowerController::PowerController(AR60xHWDriver& driver, ros::NodeHandle& nh, double publishingFrequency) : BaseCont...
true
fde3144949ceb596ce20ec347b4d185202962bf4
C++
IUniner/Asm
/debug/LAB7/LAB7.Win32_API/S1/kmpex.cpp
UTF-8
756
2.90625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; vector<int> kmp(const string& s) { vector<int> pi(s.size()); for (int i = 1; i < s.size(); i++) { int j = pi[i - 1]; while (j > 0 && s[j] != s[i]) j = pi[j - 1]; if (s[j] == s[i]) j++; pi[i] = j; } return pi; } int main() { int size = -...
true
4510fae12da456df264d5f32ba6315b538541906
C++
iamslash/learntocode
/leetcode/PartitiontoKEqualSumSubsets/InsertintoaBinarySearchTree/a.cpp
UTF-8
838
3.453125
3
[]
no_license
/* Copyright (C) 2019 by iamslash */ #include <cstdio> struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} TreeNode(int x, TreeNode* l, TreeNode* r) : val(x), left(l), right(r) {} }; // 96ms 99.75% 33.2MB 25.35% // O(lgN) O(1) class Solut...
true
4c7735735b50ba0e518bcd4463b6e38cb5a1543e
C++
erickveil/Qt-GUI-socket-server
/threadmonitor.cpp
UTF-8
543
2.578125
3
[]
no_license
#include "threadmonitor.h" ThreadMonitor::ThreadMonitor(QThread* watch){ watch_thread=watch; startLoop(); } void ThreadMonitor::startLoop() { QTimer *mon_loop=new QTimer(this); connect(mon_loop, SIGNAL(timeout()), this, SLOT(eventListenerStateMonitor())); mon_loop->start(1000); } void ThreadMoni...
true
8a6371ce7dadd7aaf46456c432b0ea790cd1c98c
C++
LenihanConor/Cluiche
/Dia/DiaCore/Containers/Misc/CircularBufferIterator.inl
UTF-8
5,345
3.140625
3
[]
no_license
namespace Dia { namespace Core { namespace Containers { //------------------------------------------------------------------------------------ // CircularBufferIterator - Implementation //------------------------------------------------------------------------------------ //--------------------------...
true
946292e9b41e44c6a802b13f1a5c09c3173249db
C++
song493818557/mfc
/C语言基础/算法 A-star/基础班_16_数据结构(A-Start算法)/AStar.h
GB18030
1,744
3.015625
3
[]
no_license
#pragma once #include <windows.h> #include <vector> using std::vector; class AStar { //Ҫֵ typedef struct _NODE { int G; // ƶ int H; // Ŀĵصľ int F; // GH֮ COORD stcThis; // ڵĵǰλ _NODE* pFront; // ڵһڵָ bool operator=...
true
c995abd1367dcc483d717fede17ff49276f87e0f
C++
fahim-ahmed-7861/competitive-programming
/greedy.Activity selection.cpp
UTF-8
998
2.828125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef struct { int activity; int start; int end; }one; int main() { one std[100],temp; int i,n,j,c=1; cin>>n; for(i=0; i<n; i++) { cin>>std[i].activity>>std[i].start>>std[i].end; } cout<<endl<<endl; for(i=0; i<n-1; i++) ...
true
8129b5c27828ecfdc46f90ecf3dae84f77516db3
C++
raghvendra1218/Data-Structures-and-Algorithm-Analysis
/Search a Linked List Using Recursion/LLIST.cpp
UTF-8
1,384
3.5625
4
[]
no_license
/* LLIST.cpp 21-Feb-2018 Raghvendra */ #include "../DSArchive/Search a Linked List Using Recursion/LLIST.h" #include <iostream> using namespace std; List::List() { head = nullptr; curr = nullptr; temp = nullptr; } void List::addNode(int addData){ nodePtr n = new node; n->data = addData; n->next = nullptr; if(h...
true
77ab2c08961ad2b4cd9c1888e1bd13df4d39d880
C++
greyhillman/cppLearning
/globalVariables/main.cpp
UTF-8
413
3.09375
3
[]
no_license
#include "main.h" int x = 10; // global variable // global varabiesl have global/file scope // global variables have static durataion // which means they are created when the program starts // and are destroyed when the program ends int func() { int x = 4; std::cout << x << std::endl; // local x std::cout << ::x ...
true
80678adb80262fc0f0914690f1ec5b22f3406946
C++
rayzandbergen/patcher
/src/networkif.cpp
UTF-8
1,874
3.203125
3
[]
no_license
/*! \file networkif.cpp * \brief Contains a function to obtain network interface addresses. * * Copyright 2013 Raymond Zandbergen (ray.zandbergen@gmail.com) */ #include "networkif.h" #include <stdio.h> #include <iostream> #include <sstream> /*! \brief This function runs "ifconfig" and parses the output to show on...
true
689638a547a3ee17ebf574254949915745dc4b4b
C++
dunkean/TerrainGenerator
/richdem/richdem.cpp
UTF-8
1,024
2.59375
3
[]
no_license
#include <richdem/common/logger.hpp> #include <map> #include <string> namespace richdem { //TODO: Could use vector for this since the enum just compiles to an int. But //need to make sure things are in the right order. std::map<LogFlag, std::string> log_flag_chars_begin = { {ALG_NAME, "\nA"}, {CITATION, "C"}, ...
true
1f29755cd877f974c340ebd31c0e6460f4201fd6
C++
mlz000/Algorithms
/codeforces/Codeforces Round #221 (Div. 2)/A.cpp
UTF-8
517
2.609375
3
[]
no_license
#include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N=1000005; char s[N]; int main(){ scanf("%s",s); int l=strlen(s); int pos; long long le=0ll,ri=0ll; for(int i=0;i<l;++i) if(s[i]=='^') {pos=i;break;} for(int i=0;i<pos;++i) if(s[i]>='1' && s[i]<='9') le+=(s[i]...
true
781ba2cfcca54cf4af5f7465cdab9db4bb8b2b93
C++
edwinandradeospino/CplusConsoleQt
/Source/Adresse.cpp
UTF-8
4,162
3.34375
3
[]
no_license
/* * Adresse.cpp ** \brief Implantation de la classe Adresse * balises Doxygen * Created on: 2017-11-20 * Author: Edwin Andrade Ospino */ #include"Adresse.h" #include<iostream> #include<sstream> #include"ContratException.h" using namespace std; namespace util { /** * \brief constructeur avec para...
true
f0b54363987f684f6d10dcdf1418a4dba836b435
C++
xijiang/ABG.jl
/cpp/raw2gt.cpp
UTF-8
1,078
2.8125
3
[ "MIT" ]
permissive
#include <iostream> #include <fstream> #include <sstream> #include <algorithm> #include <cctype> #include <vector> /** * Remove the header line. * Remove the first 6 columns of a plink.raw file. * Remove all the spaces between the genotypes. * Write genotypes to stdout * Calculate the allele frequencies into argv...
true
70a6b0179dd10a5e037ffaaae14f9cca1e0eae0e
C++
LuckiiGoggy/OpenGL-Game
/Project/OpenGL-Game/Rect.cpp
UTF-8
2,630
2.828125
3
[]
no_license
#include "Rect.h" Rect::Rect() { sx = 0; sy = 0; ex = 0; ey = 0; r = 1.0f; g = 0.0f; b = 0.0f; color = glm::vec3(r, g, b); id = -1; Bbox = BoundingBox(glm::vec3(sx, sy, 1), glm::vec3(sx, ey, 1), glm::vec3(ex, ey, 1), glm::vec3(ex, ey, 1), glm::vec3(sx, sy, 2), glm::vec3(sx, ey, 2), glm::vec3(ex, ey...
true
64fc1089918b2517dea42b7aa19c71d46874ff7a
C++
reginabezhanyan/study_tasks_contests
/2kurs/IV sem/2k/regina_complex.h
UTF-8
2,811
3.390625
3
[]
no_license
#ifndef __COMPLEX_H #define __COMPLEX_H #include <iostream> #include <iomanip> #include <sstream> #include <string> #include <cmath> namespace numbers { class complex { double re_, im_; public: complex(double _re_ = 0, double _im_ = 0) : re_(_re_), im_(_im_) {} explicit complex(con...
true
72956bc8f84aa800d7fabf0abb761b7d581bddb5
C++
polyakovkrylo/killemall
/src/graphicsview/worldgraphicsview.cpp
UTF-8
5,103
2.65625
3
[]
no_license
/*! * \file worldgraphicsview.cpp * * WorldGraphicsView class definition * * \version 1.0 * * \author Vladimir Poliakov * \author Brian Segers * \author Kasper De Volder */ #include "worldgraphicsview.h" WorldGraphicsView::WorldGraphicsView(QWidget *parent) : QGraphicsView(parent), model_{nullptr}, scen...
true
f9891e7c5decac442a5287b838f6a872bf6f72e9
C++
coolcodehere/project4
/src/DirectedWeightedGraph.h
UTF-8
842
2.84375
3
[]
no_license
#ifndef DIRECTED_WEIGHTED_GRAPH_H_ #define DIRECTED_WEIGHTED_GRAPH_H_ #include <iostream> #include <vector> #include <map> using namespace std; class DirectedWeightedGraph { private: vector<vector<int>> *adjacencyMatrix; map<string, int> *nodeNameToIndex; void addNode(string nodeName); void addEdge(s...
true
d830594a5de3f08c7201672056cc08880d35082f
C++
dotnet/docs
/docs/standard/exceptions/snippets/how-to-use-the-try-catch-block-to-catch-exceptions/cpp/catchexception.cpp
UTF-8
509
2.9375
3
[ "CC-BY-4.0", "MIT" ]
permissive
//<snippet3> using namespace System; using namespace System::IO; public ref class ProcessFile { public: static void Main() { try { StreamReader^ sr = File::OpenText("data.txt"); Console::WriteLine("The first line of this file is {0}", sr->ReadLine()); sr->Close(...
true
53de32a2e9b151a9592459dccb5ba8fcf553395c
C++
ShinriiTin/CodeLibrary
/Heynihao's Standard Code Library/source/zhongzihao/random.cpp
UTF-8
1,270
3.296875
3
[ "MIT" ]
permissive
// 随机数模板 #include<bits/stdc++.h> #define ll long long // 产生一个 [0, n) 的随机数 int randint(int n){ return (rand() << 15 | rand()) % n; } // 产生一个 [0, n) 的随机数 ll randll(ll n){ return (1ll * rand() << 45 | 1ll * rand() << 30 | rand() << 15 | rand()) % n; } // 产生一个整数部分 digit 位,小数部分 scale 位的实数 double randdb(int digit, i...
true
4fa1997a7287b13b3c92a3ef2b6a3e9bc9da317a
C++
Rhyzster/RhyzHomepass
/setup.cpp
UTF-8
2,691
2.625
3
[]
no_license
#include "setup.h" namespace Public_RhyzHomepass{ setup::setup() { newMac = new changeMac(); macList = new std::vector<std::string>; } void setup::startNetwork() { DWORD version; HANDLE clientHandle; PWLAN_HOSTED_NETWORK_REASON failReason = {}; if(WlanOpenHandle(2, NULL, &version, &clientHand...
true
746f4b99f930c0d4bdc9107d42fd2a746c4eb512
C++
Kitware/VTK
/Domains/Chemistry/Testing/Cxx/TestMolecule.cxx
UTF-8
3,013
2.625
3
[ "BSD-3-Clause" ]
permissive
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen // SPDX-License-Identifier: BSD-3-Clause #include "vtkMolecule.h" #include "vtkNew.h" #include "vtkVector.h" #include "vtkVectorOperators.h" // Example code from the molecule documentation. If this breaks, // update the docs in vtkMole...
true
0635d651b4f333c174f6218d324e60f7674ec34f
C++
ririripley/Algorithm580
/AlgorithmReadingNote/Search/DFS-NQueen.cpp
UTF-8
2,591
3.328125
3
[]
no_license
// // Created by 黄紫君 on 11/03/2020. // #include <iostream> #include <vector> const int STEP[][2] = { {1, 1}, {1, -1}, {-1, -1}, {-1, 1} }; using namespace std; bool check_constraint(vector<int> vec, int len); void DFS(vector< vector<int> > & vecList, vector<int> vec, int len, int & to...
true
bf8fa9777cf2e5fdacc46393aafdd513aac3dbe1
C++
psj5329/API_TeamProject2
/Unrailed/Unrailed/Unit.h
UTF-8
555
2.796875
3
[]
no_license
#pragma once #include "GameObject.h" class Image; class Unit : public GameObject { protected: Image* mImage; Direction mDirection; int mHp; public: virtual void Init() override; virtual void Release()override; virtual void Update() override; virtual void Render(HDC hdc) override; public: // Get inline Dire...
true
bba8b2c229f76a10e0a5d5bc137482e95cfb40a0
C++
vxl/vxl
/contrib/mul/vil3d/algo/vil3d_find_blobs.h
UTF-8
1,167
2.546875
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
// This is contrib/mul/vil3d/algo/vil3d_find_blobs.h #ifndef vil3d_find_blobs_h_ #define vil3d_find_blobs_h_ //: // \file // \brief Identify and enumerate all disjoint blobs in a binary image. // \author Ian Scott, Kevin de Souza #include <vil3d/vil3d_fwd.h> #include <vil3d/vil3d_chord.h> //: Specify 6- or 26- ne...
true
3aeea2591d0e6e70c5bb28d8a682b0180159b6e7
C++
Codeon-GmbH/mulle-clang
/test/Sema/asm-goto.cpp
UTF-8
2,100
2.953125
3
[ "Apache-2.0", "LLVM-exception", "NCSA" ]
permissive
// RUN: %clang_cc1 %s -triple i386-pc-linux-gnu -verify -fsyntax-only // RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -verify -fsyntax-only struct NonTrivial { ~NonTrivial(); int f(int); private: int k; }; void JumpDiagnostics(int n) { // expected-error@+1 {{cannot jump from this goto statement to its label}} ...
true
3c9b5423fb42982866abed1dd5050498ac827bb3
C++
YoungGouda/Rock-Paper-Scissors
/LoserGameForLosers/Options.h
UTF-8
3,794
2.859375
3
[]
no_license
#pragma once #include "SDL.h" #include <vector> #include "Vector2D.h" #include "OptionLinks.h" #include "LinkCommands.h" class Options { std::vector<Link *> links_ {new CursorLeftLink(new ChangeStateCommand(STATE_COMBAT)), new CursorLeftLink(new NothingCommand()), new CursorLeftLink(new NothingCommand()), new Cursor...
true
a15f4dd5140c1f0e6c5cab6603a2af0a273c3b19
C++
gfcodearq/HackerRank
/Sets-STL.cpp
UTF-8
529
2.90625
3
[]
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <set> #include <algorithm> using namespace std; int main() { set <int>s; //creo el iterador int n; cin>>n; //pide la cantidad de iteradores for (int i =0;i<n;i++) { int a,option; cin>>option>>a; switch(op...
true
0dc72125bfe16a97454c00014c46ee4d549ee976
C++
JimsWithWang/CPP_PP
/3/examples/3_6/src/main.cpp
UTF-8
418
3.46875
3
[]
no_license
#include <iostream> #include <climits> int main(int argv, char *argc[]) { using namespace std; char ch = 'M'; int i = ch; cout<<"The one to the character code:"<<endl; ch +=1; i=ch; cout<<"The ASCII code for "<<ch<<" is "<<i<<endl; cout<<"Displaying char ch using cout.put(...
true
ab8b219e971e8f149c82098cafc6bcb3952208f3
C++
Kenneth-Raymond/ReadingAndWritingFiles
/dataFileTest/Inventory.h
UTF-8
377
2.9375
3
[]
no_license
#pragma warning(disable:4996) #include "string" class Inventory { public: //Default parameters constr explicit Inventory(std::string = "", int = 0, double = 0); //GETTERS AND SETTERS void SetName(std::string); std::string GetName(); void SetQty(int); int GetQty(); void SetPerUnit(double); double GetPerUnit();...
true
625564c2a3e52b4a4fd0b2a4be01a93ebc8d53c6
C++
meteora211/SelfLearning
/DataStructure/Stack/ex_digitalconvert.cc
UTF-8
603
3.359375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> using namespace std; int convert(int num, int digit) { int res = 0, count = 0; while(num > 0) { int rem = num % digit; num /= digit; res = rem * pow(10,count++) + res; } return res; } int main(int argc, char* argv[])...
true
b4e5587f5728b8d6216dab1c053979e0d8a8a850
C++
bolvarak/NeuralNetwork
/C++/GenAlg/GeneticAlgorithmMap.h
UTF-8
1,344
2.984375
3
[]
no_license
// Application Definitions #ifndef GENETICALGORITHMMAP_H #define GENETICALGORITHMMAP_H // Application Headers #include <stdlib.h> #include <windows.h> #include <vector> #include "Definitions.h" // Namespace Definition using namespace std; // Map class definition class GeneticAlgorithmMap { // Pri...
true
5d1b8650e2765e044cbb7f6f554009c3d57a85c3
C++
maximhouston/labs
/Двусвязный список/DLS.cpp
WINDOWS-1251
6,429
3.359375
3
[]
no_license
#include <cstdlib> #include <locale> #include <iostream> using namespace std; struct Node{ int names; Node *next; }; struct Rings { int name; Node *first; Node *last; Rings *next; Rings *prev; } *ring; int N=0; void Push(int n){ N++; Rings *temp = new Rings; temp->name = n;...
true
ad0da01b9d1f30ac82423953937cc7e54b2c3a3e
C++
DMLou/dmlist
/list/SmartLock.h
UTF-8
1,343
3.59375
4
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/***************************************************************************** SmartLock Defines an object that is "smart" in that it will automatically unlock a mutex (or any object supporting Lock() and Unlock()) when it goes out of scope. Simply create this object and use it for doing Lock/Unlock operation...
true
46466d7b0f6eda282a7cfcbf0d58e7c2cad1b0f0
C++
try1117/PascalCompiler
/Compiler/Compiler/ExpressionParser.cpp
UTF-8
2,278
3.046875
3
[ "MIT" ]
permissive
#include "ExpressionParser.h" #include "Exceptions.h" //ExpressionParser::ExpressionParser(std::shared_ptr<Tokenizer> tokenizer) // : tokenizer(tokenizer) //{ //} // //std::shared_ptr<Expression> ExpressionParser::parse() //{ // return parseExpr(); //} // //std::shared_ptr<Expression> ExpressionParser::parseExpr() //{...
true
a5002b49cc8edba76e540bea34db20fed5224eff
C++
anvv5/studingCPP
/day04/ex01/AWeapon.hpp
UTF-8
544
3.21875
3
[]
no_license
// // Created by Shantay Budding on 4/18/21. // #ifndef EX01_AWEAPON_HPP #define EX01_AWEAPON_HPP #include <string> #include <iostream> class AWeapon { protected: std::string _name; int _apcost; int _damage; AWeapon(); public: AWeapon(std::string const & name, int apcost, int damage); AWeapon( AWeap...
true
fcfa2b9d49baa429ed2f4d0981c27dc0bfacbff9
C++
jBosak98/WUST-object-oriented-programming
/10/1/Calculator.cpp
UTF-8
1,278
3.65625
4
[]
no_license
#include "Calculator.h" Calculator::Calculator(){} void Calculator::performOperation(std::string op){ double firstNumber; double secondNumber; double result; numbers.pop(secondNumber); numbers.pop(firstNumber); if(op == opADD) result = firstNumber + secondNumber; else if(op == opSUB) result = firstNumbe...
true
cae631f69a80bb7b1ab16ce86f8686eefbb465f9
C++
btdat2506/IT.CLA.K18---CP---btdat2506
/TH3/DayTamGiacBaoNhau.cpp
UTF-8
1,745
3.015625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; struct dat { double dt = 0; // dien tich int stt = 0; //so thu tu pair <int, int> a; pair <int, int> b; pair <int, int> c; }; double dientich(pair <int, int> a, pair <int, int> b, pair <int, int> c) { return abs((b.first-a.first)*(c.second-a.secon...
true
b7696c037b404cc913185567bee57774255c5621
C++
Simon-ster/advent-2019-Cpp
/intcode.cpp
UTF-8
3,900
2.6875
3
[]
no_license
#include "common.hpp" // using Program = Vector<int>; struct Memory : Map<long long int, long long int> { void load(const String line) { auto inputs = splitString(line, ','); clear(); long long int i = 0; for (auto &input : inputs) { (*this)[i] = std::stoll(input); ...
true
88f41f0575983dd850354b81176e99fe8af682e5
C++
marezelej/tecnomate
/franco/uri/dole_queue.cpp
UTF-8
1,200
3.359375
3
[]
no_license
#include <iostream> using namespace std; struct node { int num; node* sig; node* ant; }; node* createnode (int x,node* ant,node* p){ node* elcoso = new node(); elcoso->num = x; elcoso->sig = p; elcoso->ant = ant; ant->sig=elcoso; return elcoso; } void link (int n, node* l){ l->num=1; l->sig=l; ...
true
4f4e32cbc032fb28150dd048359cf04de74167cb
C++
visseck/animengine
/animcore/math/fixed_precision.h
UTF-8
2,504
2.921875
3
[]
no_license
#pragma once #include <type_traits> #include <stdint.h> #include "util/namespace.h" ANIM_NAMESPACE_BEGIN template<typename T> struct DoubleSizeType { }; template<> struct DoubleSizeType<int8_t> { typedef int16_t value; }; template<> struct DoubleSizeType<int16_t> { typedef int32_t value; }; ...
true
6ca882d4e5a5346c10bec70d1aaae157453d12f5
C++
Behrouz-Babaki/FactoredSCP
/fscp_src/brancher_exputil.hpp
UTF-8
4,410
2.578125
3
[]
no_license
// brancher for use with constraint_exputil and bn_engine. // based on MPG 'minsize' brancher #ifndef _BRANCHER_EXPUTIL_HPP_ #define _BRANCHER_EXPUTIL_HPP_ #include <gecode/int.hh> #include "policy_tree_state.h" using namespace Gecode; // sorting on second pair entry template <typename T1, typename T2> struct great...
true
f7495e68e863ee601e0b0b64628147d5c371ea8e
C++
RaphiOriginal/cpp
/NativeMatrix/NativeMatrix/main.cpp
UTF-8
2,052
3.078125
3
[]
no_license
#include "Matrix.h" #include <iostream> void multiplyCal(jdouble *m, jdouble *thi, jdouble *result, jint mcolumn, jint thisrow, jint thiscolumn) { int indexer1 = 0; int indexer3 = 0; for (int i = 0; i < thisrow; i++) { //each column from m for (int j = 0; j < mcolumn; j++) { //next column in this int inde...
true
70b8edb08276856b07c6a8ac39012983bcbfb34e
C++
Bebo-K/game_project_1
/game_project_1/game/races_and_classes.hpp
UTF-8
1,106
2.9375
3
[]
no_license
#ifndef RACES_AND_CLASSES_H #define RACES_AND_CLASSES_H #include <game_project_1/types/str.hpp> #include <game_project_1/game/stats.hpp> typedef int RaceID; struct Race{ RaceID id; wchar* name; int max_styles_1; int max_styles_2; int max_styles_3; float hitsphere_height; float hitsphere_ra...
true
813ef8bba7cbbcd4f81b96e6dc22085d60ae1962
C++
graziel666/first-try
/primer_juego/player.h
UTF-8
2,411
2.75
3
[]
no_license
#pragma once #ifndef PLAYER_H #define PLAYER_H #include "globals.h" #include "map.h" bool isWalking = false; enum class HorizontalDirection : uint8_t {Left, Right}; uint8_t frame = 0; uint8_t x = 16; uint8_t y = 16*2; HorizontalDirection playerDir = HorizontalDirection::Right; //Left,Right const...
true
0f70583beab94474dc92a9b7beaea67f23d65071
C++
am-Anmol/DS-Algorithm
/Arrays/Smallest_Subarray_with_sum_greater_than_a_given_value.cpp
UTF-8
1,079
3.90625
4
[]
no_license
//Smallest Subarray with sum greater than a given value # include <iostream> using namespace std; int smallestSubWithSum(int arr[], int n, int x) { int min_len = n + 1; for (int start=0; start<n; start++) { int curr_sum = arr[start]; if (curr_sum > x) return 1; for (int end=start+1; end<n; end++) { curr_s...
true
64c11d1bada83ff0abd7a93f6ab9493ffd8aa18a
C++
mbiggio/ctci
/3_stacks_and_queues/5_sort_stack.cpp
UTF-8
1,226
3.578125
4
[]
no_license
#include <iostream> #include <stack> #include <stdexcept> #include <gtest/gtest.h> #include <gmock/gmock.h> using namespace std; void sort_stack(stack<int> &s) { stack<int> s_sorted; while (!s.empty()) { int tmp = s.top(); s.pop(); int popped = 0; while (!s_sorted.empty() && tmp <= s_sorted.top()) ...
true
35c421d1c7a6fafae2fcf39bcc665f6d31614236
C++
Trompowsky/Calculator
/Calculator/main.cpp
UTF-8
4,097
3.203125
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <sstream> #include <stdexcept> #include "Expression.h" #include "PrintVect.h" #include "Exp.h" #include "Constant.h" #include "Addition.h" #include "Subtraction.h" #include "Multiplication.h" #include "Division.h" using namespace std; int main() { s...
true
1ffed8cc091eec43a4be2550507d2333614b3446
C++
sreejond/FileAuditSystem
/DaemonProcess.h
UTF-8
601
2.609375
3
[]
no_license
#ifndef DAEMONPROCESS_H #define DAEMONPROCESS_H /** * \class DaemonProcess * * \brief * * This class is responsible to create a daemon process */ class DaemonProcess { public: /** * \brief create the daemon process */ static void create(); /** * \brief deleted copy constructor */ Dae...
true
170495e674385af9f0afc2bcfbc2d5fdfcd829d2
C++
wangkendy/grids
/2712.cc
UTF-8
635
3.109375
3
[]
no_license
/* * source: http://poj.grids.cn/practice/2712 * tag: date and time * */ #include <iostream> using namespace std; int get_days(int bm, int bd, int em, int ed) { static int mon[12] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30}; int days = 0; if (bm < em) { days = mon[bm] - bd + ed; } else { // same mont...
true
8a08cdac874d8dab8dd4062811e37c770b158260
C++
Nemaleswang/Course-Of-Master
/研一上学期/Linux高级环境编程实验/实验四/code/4.2/main.cpp
UTF-8
437
2.71875
3
[]
no_license
#include <dlfcn.h> #include <iostream> using namespace std; int main() { void *handle = dlopen("./libfun.so", RTLD_LAZY); if(handle == 0) { cout << "dlopen error" << endl; return 0; } typedef void (*FUNC_PRINT)(); FUNC_PRINT dl_print = (FUNC_PRINT)dlsym(handle, "Print"); if(dl_print ==...
true
fcc98c3188e79746dc98759635e438cbde95746d
C++
tankeeh/exercise5
/stack/vec/stackvec.hpp
UTF-8
2,376
2.875
3
[]
no_license
#ifndef STACKVEC_HPP #define STACKVEC_HPP /* ************************************************************************** */ #include <stdexcept> #include "../stack.hpp" #include "../../vector/vector.hpp" /* ************************************************************************** */ namespace lasd { /* **********...
true
50abbc9cadb52ea05846abc262fdfe9e4972ca6d
C++
moderncoder/SDRReradiationSpectrumAnalyzer
/SDRSpectrumAnalyzerOpenGL/SDRSpectrumAnalyzerOpenGL/FrequencyRange.cpp
UTF-8
543
3.234375
3
[]
no_license
#include "FrequencyRange.h" FrequencyRange::FrequencyRange() { lower = 0; upper = 0; length = 0; strength = 0; centerFrequency = 0; } FrequencyRange::FrequencyRange(uint32_t lower, uint32_t upper, double strengthValue) { Set(lower, upper); strength = strengthValue; } void FrequencyRange::Set(FrequencyRang...
true
141cfde9ecd9745a8e76a2500c2aab09c29ce8a8
C++
TiFu/thrill-hyperloglog
/tests/common/lru_cache_test.cpp
UTF-8
1,758
2.578125
3
[ "BSD-2-Clause" ]
permissive
/******************************************************************************* * tests/common/lru_cache_test.cpp * * Borrowed from https://github.com/lamerman/cpp-lru-cache by Alexander * Ponomarev under BSD license and modified for Thrill's block pool. * * Part of Project Thrill - http://project-thrill.org * ...
true
bb38009a3a9bd0ad51eb371e739a80dfde8fe617
C++
perezite/cheesy
/jvgs-minimal/src/game/Camera.cpp
UTF-8
2,551
2.5625
3
[]
no_license
#include "Camera.h" #include "Entity.h" #include "Level.h" #include "../core/LogManager.h" using namespace jvgs::core; using namespace std; #include "../video/VideoManager.h" using namespace jvgs::video; using namespace jvgs::math; #include "../tinyxml/tinyxml.h" namespace jvgs { namespace game { ...
true
095d0e68c63d737765afc60db52fcaca37eab0e5
C++
ByteFest/ByteFest-Spring-2015
/Competition Day Problems/a_rock_paper_scissors/rock_paper_scissors.cpp
UTF-8
1,027
3.234375
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; int main(void) { int p1Count, p2Count, tieCount; int testCases; int roundSize; char ch1, ch2; ifstream fin("a.in"); fin >> testCases; for (int i = 0; i < testCases; i++) { fin >> roundSize; p1Count = 0; p2Count = 0; tieCount = 0; for (in...
true
075b274ec74bbd6de17387611048c5b6155d3254
C++
avovana/Otus.Cpp.Homework10
/tests/test_benchmark.cpp
UTF-8
8,266
2.703125
3
[]
no_license
#include "FileOutput.h" #include <algorithm> #include <functional> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #define BOOST_TEST_MODULE test_benchmark #include <boost/test/unit_test.hpp> #include <boost/test/included/unit_test.hpp> using namespace std::chrono_literals; class...
true
7f154457055b2efbc21189761632f09a52f850b2
C++
mister345/WorkSamples
/Platformer/Platformer/Assets/D3DGraphics.cpp
UTF-8
9,725
2.515625
3
[]
no_license
/*************************************************************************************** * File: D3DGraphics.cpp * * * * Author: Gregory Weiner ...
true
5e48a3962cf4f40b8dd66511908d6372c9b6909a
C++
ayoubHam2000/fs_licence
/s5_repository/c++/exams/exam2020/list.cpp
UTF-8
2,131
3.34375
3
[]
no_license
#include <iostream> #include "list.h" List::List(int size){ capacite = size; nbelement = 0; data = new T[size]; } List::List(T* d, int size){ capacite = size; nbelement = size; data = new T[size]; for(int i = 0; i < size; i++) data[i] = d[i]; } List::List(const List &a){ dele...
true
edffec3ace2aa0e877b8ffe9743d922ba33bc7b3
C++
bosecodes/CP-by-bosecodes
/30 days coding challenge/Dynamic Programming/fibonacci_dp.cpp
UTF-8
623
3.328125
3
[]
no_license
// Fibonacci Series // Using Dynamic Programming // Somdev Basu // Waste time with the masterpiece #include <bits/stdc++.h> using namespace std; int fibo(int n, vector<int> &dp) { int i = 0; if(n <= 1) return n; // check if previously visited state has been visited or not if(dp[n] != -1)...
true
9df24fb301867a08e851d42beaa504632e4bb594
C++
stalker5217/algorithm
/BAEKJOON/2587.cpp
UTF-8
490
2.78125
3
[]
no_license
#define DEBUG 0 #define LOG(string) cout << string #include <iostream> #include <cstring> #include <vector> #include <algorithm> #include <functional> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int avg; int sum = 0; vector<int> arr; for(int i = 0 ; i < 5 ; i++)...
true
c6fa0ecc0cc85b05a61fddf7ff82d0610ac7f64c
C++
adityanjr/code-DS-ALGO
/LeetCode-Challenges/2020/6. June/26.cpp
UTF-8
1,221
3.9375
4
[ "MIT" ]
permissive
/* Sum Root to Leaf Numbers ------------------------ Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find the total sum of all root-to-leaf numbers. Note: A leaf is a node with no chil...
true
819c7b67020150cfc66c5f60779e0a227a60eb2e
C++
AndyLem/arduino_experiments
/led8.h
UTF-8
1,884
2.71875
3
[ "MIT" ]
permissive
#ifndef led8_h #define led8_h #include "Arduino.h" struct SYMBOL { char Symbol; char Code; }; class Led8 { protected: int _data; int _clock; int _latch; #define SYMBOLS_COUNT 24 SYMBOL const _symbols[SYMBOLS_COUNT] = { // 76543210 { '0', B11000000 }, { '1', B11111001 }, ...
true
d647512dab268fb7d70bb2be4962c1d531782ce7
C++
arunyalamarthy/MultiFormatLogger
/MultiFormatLogger/Logger.cpp
UTF-8
4,027
2.671875
3
[]
no_license
// Logger.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" #include <ILogger.h> #include "Logger.h" #include <iostream> #include <cstdlib> #include <ctime> #include <atlstr.h> #include <atltime.h> using namespace std; CLogger :: CLogger() { m_filename = nullptr; m_LogLevel =...
true
386bf84dea16035af19ca6cc26c027a1e95ae263
C++
YossiMH/PSMoveService
/src/psmoveclient/ClientGeometry.cpp
UTF-8
18,164
2.640625
3
[ "Apache-2.0" ]
permissive
//-- includes ----- #include "ClientGeometry.h" #include "MathUtility.h" #include "MathGLM.h" #include <algorithm> //-- pre-declarations ----- //-- constants ----- const PSMoveFloatVector3 g_psmove_float_vector3_zero= {0.f, 0.f, 0.f}; const PSMoveFloatVector3 *k_psmove_float_vector3_zero= &g_psmove_float_vector3_zero...
true
76b098cdf1cfe992b032bda3b81b5dbc8859d66c
C++
gusrb/student_coding
/2.cpp
UTF-8
363
2.703125
3
[]
no_license
#include <iostream> using namespace std; int sum = 0, n , g ,d; int di(int k) { if (k != 0) { n = n / k; d += n % k; sum += n; } if (d >= k) { sum += d / k; d += n % k; } if (n < k) return sum; else di(k); } int main() { int k; cin >> g >> k; n...
true
5216449845284e4c2a56b701adb7a5cc93bf48e6
C++
nidamon/CS202
/Labs/CS202Lab3SmartPointers/Lab2Class.cpp
UTF-8
864
3.4375
3
[]
no_license
/*Lab2Class.cpp Nathan Damon CS 202 1/19/2021 This is the cpp file for the lab2 class */ #include "Lab2Class.h" Lab2::Lab2() : _name("default") { cout << "Called Lab2 default constructor." << endl; } Lab2::Lab2(const Lab2& orig) { cout << "Called Lab2 copy constructor." << endl; } Lab2::Lab2(string str) : _name(s...
true
86c76a3e7975e6eae0c871a5d9c82ad076ec1275
C++
TheNsBhasin/CodeChef
/XORAGN/main.cpp
UTF-8
481
2.59375
3
[]
no_license
/*input 1 2 1 2 */ // // main.cpp // XORAGN // // Created by Nirmaljot Singh Bhasin on 11/05/18. // Copyright © 2018 Nirmaljot Singh Bhasin. All rights reserved. // #include <iostream> using namespace std; const int MAXN = 100005; typedef long long int lli; lli arr[MAXN]; int main(int argc, const char * argv[]...
true
394ace92f8c5769d56546a8605e7fa62352b9cce
C++
719400737/LeetCode
/70.cpp
UTF-8
388
2.78125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; class Solution { public: int climbStairs(int n) { vector<int> dp(n+1,0); for(int i=1;i<=n;i++){ if(i==1 || i==2) dp[i]=i; else dp[i]=dp[i-1]+dp[i-2]; } return dp[n]; } }; int main(){ Soluti...
true
d1244669d3b9be102a699d4a4b6d5b53bcbba950
C++
SCS2017/Leetcode-Solution
/堆栈队列/用一个栈对另一个栈排序.cpp
UTF-8
1,414
4.125
4
[]
no_license
#include <bits/stdc++.h> using namespace std; /* 题目: 一个栈中元素的类型为整型,现在想将该栈从顶到底按从大到小的顺序排序,只许申请一个栈, 除此之外可以申请新的变量,但不能申请额外的数据结构。如何完成排序? 题解: 需要用到辅助栈。stack执行pop操作,弹出元素记为cur; 如果cur小于或等于assist的栈顶元素,则将cur直接压入assist; 如果cur大于assist的栈顶元素,则将assist的元素逐一弹出并压入stack,知道cur小于或等于assist的栈顶元素,再将cur压入assist 执行上述操作后,直到stack空,将assist所有元素逐一压入s...
true
76efb8eb3e6d4b075766fa2135e395fd4d78cc48
C++
CarlosManuelRodr/QBill
/src/ConfigParser.h
UTF-8
4,985
3.390625
3
[]
no_license
/** * @file ConfigParser.h * @brief This header file contains the ConfigParser class. * * The ConfigParser class is used to retrieve values from a configuration file. * @copyright GNU Public License v3 * @author Carlos Manuel Rodriguez y Martinez * @date 7/18/2012 * * This file is part of QBill: https://github...
true
09521306f4d33d71d77a1684750f258ea30f7562
C++
martynovmaxim/FPS-1
/PracticeProject/Source/PracticeProject/Public/AI/Path Following/Splines/BezierCurve.h
UTF-8
2,245
2.515625
3
[]
no_license
// By Polyakov Pavel #pragma once #include "Spline.h" #include "BezierCurve.generated.h" /** A Bezier curve to move along */ class PRACTICEPROJECT_API FBezierCurve : public FSpline { TArray<TArray<FVector>> ControlPoints; public: FORCEINLINE FBezierCurve(TArray<TArray<FVector>> InControlPoints) : Co...
true
4daf2c2bab2f135827e24ad1a189d6c21df756ad
C++
tao-pr/52-challenges
/018-graph-traversal/headers/Functions.hpp
UTF-8
605
2.8125
3
[ "MIT" ]
permissive
#pragma once #ifndef FF_HPP #define FF_HPP #include <tuple> using namespace std; double inline distance(tuple<double,double> p1, tuple<double,double> p2){ // Haversine const double R = 6371e3; double pp = M_PI / 180; double phi1 = get<0>(p1) * pp; double phi2 = get<0>(p2) * pp; double deltaPhi = (get<0>...
true
c00459e826939001cf60fe82c42900f65616eabc
C++
Jaa-c/kdtree
/KDTree.h
UTF-8
21,430
3.15625
3
[]
no_license
/* * File: KDTree.h * Author: Daniel Princ * * KDTree. * It's a template, so it's all in the header file. * */ #ifndef KDTREE_H #define KDTREE_H #include <vector> #include <stack> #include <queue> #include <limits> #include <math.h> using namespace std; #include "Point.h" #include "KDTreeNodes.h" #includ...
true
4e98c0784e945c304b7f91b48ca7eb02dec88a22
C++
clivic/C-code-examples
/_C++ tests and problem solving/current/main.cpp
UTF-8
744
3.53125
4
[ "MIT" ]
permissive
#include "class.h" #include <iostream> int main() { Time time1(19,40,00); Time time2; std::cout << "Write time1: "; time1.Write(); std::cout << std::endl; std::cout << "Write time2: "; time2.Write(); std::cout << std::endl; time2.Increment(); std::cout << "Incremented time2: "; time2.Write(); std::cout <...
true
a52ffe8c0bc7de630ebcb0a9c2ec5c5754ba930d
C++
cssham/URI
/uri1038.cpp
UTF-8
506
2.828125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { int x,y; cin>>x>>y; switch(x) { case 1: printf("Total: R$ %.2f\n",4.00*y); break; case 2: printf("Total: R$ %.2f\n",4.50*y); break; case 3: printf("Total: R$ %.2f\n",5.00*y); break; ...
true
176d729b5e339530e1913b232e1adb18d1c1f00c
C++
sysfce2/SFML_Space-Invaders.Groszczu
/ScoreDisplayState.hpp
UTF-8
801
2.546875
3
[]
no_license
#pragma once #include "State.hpp" #include "Game.hpp" namespace rstar { class ScoreDisplayState : public State { public: ScoreDisplayState(GameDataPtr data, int playerScore, std::string fileName); void HandleInput() override; void Update() override; void Draw() override; private: GameDataPtr data_; i...
true
adae2847e51220dacf95141071e7a5944ac18a57
C++
william-wang-stu/Junqi
/chess.h
GB18030
5,996
2.8125
3
[]
no_license
#pragma once #include <vector> #include <iostream> #include <queue> #include <map> #include "game.h" #include "connect.h" #include "cmd_console_tools.h" // ̵ĴС static const int Chess_H = 13; static const int Chess_W = 5; class Movement; class Coord; class Connect; extern const int ROLE_BLANK; extern const int ROLE_LO...
true
75fece4b0e5156dbc95f37a99747c53cbf319a2f
C++
fireairforce/CPPalgorithm
/蓝桥杯日记/1932.cpp
UTF-8
2,466
2.578125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; struct code { int x; int y; int z; }q[5]; bool cmp(const code&a1,const code&a2) { if(a1.x==a2.x) { if(a1.y==a2.y) { return a1.z<a2.z; } return a1.y<a2.y; } return a1.x<a2.x; } int panduan(int year,int mo...
true
4b060df776fb8740c9b27b83fc2a260dc0fe0c6e
C++
YoungSeokHong/Young_algorithm_study
/백준_2042.cpp
UTF-8
1,290
3.015625
3
[]
no_license
#include <iostream> typedef long long ll; ll arr[1000000] = {0,}; ll tree[4000000] = {0,}; ll init(int start, int end, int node) { if(start == end) return tree[node] = arr[start]; int mid = (start + end) / 2; return tree[node] = init(start, mid, node * 2) + init(mid + 1, end, node * 2 + 1); } ll sum(int start, in...
true
bc3326e56e4aeaba80c0106349be608d0ca4ecbf
C++
lihongjun1201/my_cpp_demoprojs
/wordcount_20150724/word_count.cpp
UTF-8
4,069
3.109375
3
[]
no_license
/************************************************************************* > File Name: word_count.cpp > Author: > Mail: > Created Time: Fri 24 Jul 2015 05:13:42 AM PDT ************************************************************************/ #include<iostream> #include "word_count.h" using namespace std; //...
true