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
5e55351d87e7b9bab1d0c61af243f5d1a3eee9f9
C++
alanennis/arduino_old
/sloeber workspace/heating/heating.ino
UTF-8
3,263
2.5625
3
[]
no_license
#define BLYNK_PRINT Serial #include <SPI.h> #include <Ethernet.h> #include <BlynkSimpleEthernet.h> #include <RBD_Timer.h> // https://github.com/alextaujenis/RBD_Timer //http://robotsbigdata.com/docs-arduino-timer.html int Countdown; // Global variable used in Slider widget and runEveryMinute() int TimeChoice; byte...
true
ff7a5a4ea583f2201f6603a389b42038daf29617
C++
barryntklc/ics212f14
/Project 2/ABook.cpp
UTF-8
15,885
3.015625
3
[]
no_license
/****************************************************************************************** * * NAME: Barryn Chun * * HOMEWORK: Project 2 * * CLASS: ICS 212 * * INSTRUCTOR: Ravi Narayan * * DATE: November 27, 2014 * * FILE: TempC...
true
b42cc7e065c75c583f684eea59c57a4b7615c640
C++
AntonShalgachev/AmbientBacklight
/Color.cpp
UTF-8
902
3.359375
3
[]
no_license
#include "Color.h" Color::Color() { SetColor(0, 0, 0); } Color::Color(uint8_t _r, uint8_t _g, uint8_t _b) : r(_r), g(_g), b(_b) { SetColor(_r, _g, _b); } Color::Color(uint32_t color) { SetColor(color); } Color::Color(const Color& color) { SetColor(color); } void Color::SetColor(uint8_t _r, uint8_t _g, uint8_t ...
true
9c7c91c1705287d0b1067111fd43f9cc455fff88
C++
leandroniebles/code-compilation-component
/pseint-code/pseint/Ejecutar.cpp
ISO-8859-1
28,005
2.59375
3
[ "GPL-1.0-or-later", "GPL-2.0-only", "MIT" ]
permissive
#include "Ejecutar.h" #include <string> #include "global.h" #include "intercambio.h" #include "utils.h" #include <iostream> #include "new_evaluar.h" #include "new_memoria.h" #include "zcurlib.h" #include "new_programa.h" #include "new_funciones.h" using namespace std; // ********************* Ejecutar un Bloque de Ins...
true
a55edfb02cc9d38337c58602a3d5544bf8232b7b
C++
Frank-Skywalker/MIT_-ComputerGraphics
/Assignment9_ParticleSystems/forcefield.h
UTF-8
1,937
3.015625
3
[]
no_license
#ifndef _FORCEFIELD_H_ #define _FORCEFIELD_H_ #include "vectors.h" #define G 9.8 class ForceField { public: virtual Vec3f getAcceleration(const Vec3f& position, float mass, float t) const = 0; }; class GravityForceField : public ForceField { public: GravityForceField(Vec3f gravity):gravity(gravity) { } vir...
true
f260706f04454bb4761d77765cd1c67794222878
C++
orlinhristov/cportlib
/cport/util/thread_group.hpp
UTF-8
2,805
3.453125
3
[]
no_license
#ifndef __THREAD_GROUP_HPP__ #define __THREAD_GROUP_HPP__ // // thread_group.hpp // // Copyright (c) 2014-2016 Orlin Hristov (orlin dot hristov at gmail dot com) // // Distributed under the Apache License, Version 2.0 // visit http://www.apache.org/licenses/ for more information. // #include <algorithm> #include <thr...
true
00e126475fa3a990f7dd9f807f7869a00ddb1d56
C++
mikekutzma/compPhys
/Oscillations/shm.cpp
UTF-8
1,401
2.890625
3
[]
no_license
#include <iostream> #include <fstream> #include <iomanip> #include <string> #include <cmath> using namespace std; #define NPOINTSMAX 100000 #define PI 3.141592653 double step(double, double, double); double wstep(double, double, double, double,double, double, double, double); int main(int argc, char* argv[]){ do...
true
eccbe89940bbd59f53eac6c190edf6eb122dfea4
C++
bimoanggito/LatihanFinanceCplusplus
/Finance.cpp
UTF-8
4,230
2.9375
3
[]
no_license
#include <iostream> #include <iomanip> #include <conio.h> #include <math.h> #include <stdio.h> using namespace std; extern "C"{ //Natural Log Base #define LN_BASE 2.718281828459 } class Finance { public: double p_2_f (double i, int n); double f_2_p (double i, int n); ...
true
9fb1e487af261f46e38ee54eccb7eb70ac4d37c2
C++
xeon2007/CommonUtilities
/CharacterLookup.cpp
WINDOWS-1252
4,472
2.578125
3
[]
no_license
#include "CharacterLookup.h" namespace CommonUtilities { CharacterLookup::CharacterLookup() { myCharacterLookup[eKeyboardKeys::KEY_0] = '0'; myCharacterLookup[eKeyboardKeys::KEY_1] = '1'; myCharacterLookup[eKeyboardKeys::KEY_2] = '2'; myCharacterLookup[eKeyboardKeys::KEY_3] = '3'; myCharacterLookup[eKeybo...
true
f064aa3c8d07d2cf33c08d015a62ef6fec15a900
C++
MeushRoman/pointers_HT
/ConsoleApplication24/ConsoleApplication24.cpp
UTF-8
4,279
3.5
4
[]
no_license
// ConsoleApplication24.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <time.h> using namespace std; int main() { srand(time(NULL)); const int size = 10; int a[size]; int *p = a; //1. Создать массив из 10 целых чисел. Заполнить массив случайным ...
true
3f344542fb5c399ba42f12c40becfaa8af62752f
C++
eaasna/low-memory-prefilter
/hashmap/lib/seqan3/include/seqan3/range/views/move.hpp
UTF-8
4,549
2.671875
3
[ "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-public-domain", "CC0-1.0", "CC-BY-4.0", "MIT" ]
permissive
// ----------------------------------------------------------------------------------------------------- // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik // This file may be used, modified and/or redistributed under the terms of th...
true
39d46d1c76fb7fb537ffba038753245221858734
C++
marcelozeballos/SPOJ---OBI
/Zig Zag/main.cpp
UTF-8
746
2.96875
3
[]
no_license
#include <cstdio> #include <iostream> using namespace std; int main() { int rows, col; fscanf(stdin, "%d %d", &rows, &col); int grid[rows][col]; for(int i = 0; i < rows; i++) for(int j = 0; j < col; j++) cin >> grid[i][j]; bool zigzag = true; bool increase = true; int x =...
true
f7f20e749d62e58e75604b55c4da1d17ab1ab7a5
C++
maxytakano/RayTracer
/FINALPHOENIX/MotionObject.h
UTF-8
1,946
2.859375
3
[]
no_license
//////////////////////////////////////// // MotionObject.h //////////////////////////////////////// #ifndef CSE168_MOTIONOBJECT_H #define CSE168_MOTIONOBJECT_H #include "Object.h" #include "Matrix34.h" //////////////////////////////////////////////////////////////////////////////// class MotionObject:public Object ...
true
b8566c29415ed8c0e84661068c0f4eeb941c5c9d
C++
rishup132/Codeforces-Solutions
/Practice/C.cpp
UTF-8
1,172
2.890625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { double n,a,b,c,d; cin >> n >> a >> b >> c >> d; double dis = sqrt((a-c)*(a-c)+(b-d)*(b-d)); if(dis >= n) { printf("%0.9f %0.9f %0.9f\n",a,b,n); return 0; } if(dis == 0) { printf("%0.9f %0.9f %0.9f\n",a+n/2,b,n/2); return 0; } double temp...
true
60f30887443c76b38e66d45adab36697f38b9613
C++
kaushikacharya/cpp_practise
/online_judge/hackerrank/zartan_roads.cpp
UTF-8
3,358
3.03125
3
[]
no_license
// https://www.hackerrank.com/contests/startatastartup/challenges/zartan-roads #include <iostream> #include <vector> #include <fstream> const bool READ_FROM_FILE = false; template<typename T> class Zartan { public: Zartan(T nJunction, T nRoad); ~Zartan(); public: void read_input(std::fstream& pFile); bool process...
true
2cfc98c2b8aa321b320b81357c26c470576f90a7
C++
Krishanadave671/sem4-assignments
/Analysis of Algorithms (AOA)/10. KMP Algorithm.cpp
UTF-8
1,447
3.265625
3
[]
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> void KMP(char *str, char *word, int *ptr) { int i = 0, j = 0; while ((i + j) < strlen(str)) { if (word[j] == str[i + j]) { if (j == (strlen(word) - 1)) { printf("%s located at the index %d\n",...
true
6478ff14dffb417043c303f74b0d27b6bdcd17d4
C++
lisher/whats_new_cpp
/variadic/va_list/positive.cpp
UTF-8
1,928
3.53125
4
[]
no_license
/* * * What's new in C++ * Variadic functions * */ /* * Change the value of STEP identifier to enable different scenarios. * Some include code from previous steps, other are completely separate. * * STEP 0 - calculating average * STEP 1 - negative case - no type control * STEP 2 - printf - positive * STEP ...
true
8a6556bdc5e3795e808e0505a75527e35bf570c1
C++
rafael-431/LAb06_1225419
/DoubleLinkedList.h
UTF-8
554
3.546875
4
[]
no_license
#pragma once #include "Node.h"; template <typename T> class DoubleLinkedList { public: Node<T>* start; Node<T>* end; int count; DoubleLinkedList() { start = nullptr; end = nullptr; count = 0; }; ~DoubleLinkedList() {}; bool IsEmpty() { return count == 0; } void InsertAtEnd(T new_value) { Node<T>*...
true
453c27676bff54f03a95a1ab615dcfe4c4f3b811
C++
jackyluk/novelCL
/device/core.cpp
UTF-8
825
2.75
3
[]
no_license
/*!**************************************************************************** * @file core.cpp Entry file * @author Jacky H T Luk 2013 *****************************************************************************/ #include "Device.hpp" #include <sys/types.h> #include <stdio.h> #include <stdlib.h> /*! Prototypes *...
true
53667934e8b715161bd8a4360d1cd3c26fcf58ae
C++
andriimokii/Cpp_Ess_KI3
/C++_Ess_KI3/Chapter_2/2.9-Labs/Project-2.cpp
UTF-8
759
3.1875
3
[]
no_license
#include <iostream> using namespace std; int main( void ) { unsigned short sum = 0; unsigned short banknotes[5] = {0, 0, 0, 0, 0}; cin >> sum; do { if( sum >= 50 ) { sum-=50; banknotes[0]++; } else if( sum >= 20 ) { sum-=20; banknotes[1]++; } else if( sum >= 10 ) { sum-=10; banknotes[2]...
true
e1d78f4edb1abcade93f6762394d3da001363c7a
C++
caizhixiang/zikao
/C++/程序第2-5章/3.3 内联函数.cpp
GB18030
248
3.4375
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; int isnumber(char c) {return (c>='0'&&c<='9')?1:0;} void main( ) { char c; cin>>c; if(isnumber( c )) cout<<"һ"; else cout<<"IJһ"; }
true
26f0628c67c0badee8cb9e25862219a1fa99adfc
C++
Lukas-PSS/-Programming_Logic
/Curso Logica de Programação Neri Neitzke/Algoritmos em C/avaliacao_if2.cpp
ISO-8859-1
1,254
3.1875
3
[]
no_license
// Prof Neri Aldoir Neitzke // www.INFORMATICON.com.br - videoaulasneri@gmail.com /* Problema: O sistema de avaliao de determinada disciplina, composto por trs provas. A primeira prova tem peso 2, a Segunda tem peso 3 e a terceira prova tem peso 5. Faa um algoritmo para calcular a mdia final de um aluno desta disc...
true
153c06c1cb1d7ae03ddd7bb413bc2cebada72806
C++
Mammux/kraftverk
/Arduino/make55Hz/make55Hz.ino
UTF-8
1,788
2.5625
3
[]
no_license
#include <CmdMessenger.h> // CmdMessenger CmdMessenger cmdMessenger = CmdMessenger(Serial); int hz = 50; boolean toggle1 = 0; // Commands enum { relay_on, relay_off, set_hz, error, }; void attachCommandCallbacks() { cmdMessenger.attach(set_hz, OnSetHz); cmdMessenger.attach(error, OnError); } void OnS...
true
47bf726404f77e6c899553924277f0df484a7ba8
C++
rh17983/swarmtemp
/src/core/simulator/entity/embodied_entity.cpp
UTF-8
17,338
2.609375
3
[ "MIT" ]
permissive
/** * @file <argos3/core/simulator/entity/embodied_entity.cpp> * * @author Carlo Pinciroli <ilpincy@gmail.com> */ #include "embodied_entity.h" #include "composable_entity.h" #include <argos3/core/simulator/space/space.h> #include <argos3/core/simulator/simulator.h> #include <argos3/core/utility/string_utilities.h>...
true
633dfc87b03e710426028c278bee0ae0b0e1e4bb
C++
nuramkin/Portfolio
/C++ Projects/To Do List Application (Programming III Assignment)/programmingassignment3/main.cpp
UTF-8
1,872
3.484375
3
[]
no_license
/* Nicholas Uramkin Programming Assignment 3 COSC 2436 3/30/2018 4:30pm Mon/Wed main.cpp */ #include <iostream> #include <fstream> #include <string> #include "todolist.h" using namespace std; int main() { string fileName = "";//empty string tells save method to make new file bool filter = false;/...
true
0e8aaf75e5d2afe1d28e7dd0a7e09d4bc8f0a49b
C++
mathijsromans/trafel
/button.cpp
UTF-8
560
2.53125
3
[]
no_license
#include "button.h" #include <QDebug> #include <QPushButton> Button::Button(const std::string& text) : QGraphicsProxyWidget(), m_pushButton(0) { m_pushButton = new QPushButton(QString::fromStdString(text)); QFontMetrics metrics(m_pushButton->font()); QRect textBox = metrics.boundingRect(m_pushButton->text()+...
true
089db21dda34d3a58ec2227132212dfa7dc56ad9
C++
toniou/liam-esp
/src/scheduler/scheduler.h
UTF-8
620
2.5625
3
[ "MIT" ]
permissive
#ifndef _scheduler_util_h #define _scheduler_util_h #include <functional> #include <list> struct scheduled_fn_t { bool repeat; uint16_t id; uint16_t delay; uint32_t startMillis; std::function<void(void)> func; }; class Scheduler { public: Scheduler(bool inSeries = false); uint16_t sched...
true
6e3d44c7802077caa258584773b889427c44fce3
C++
Kullsno2/C-Cpp-Programs
/PLANKET.cpp
UTF-8
456
2.9375
3
[]
no_license
#include<iostream> #include<math.h> using namespace std; int main() { long int b,r; cin>>b>>r; int val = b+r; int sq = (int)sqrt(val); for(long int i=1 ; i<=sq ; i++){ if(val % i == 0){ long int fac1 = i; long int fac2 = val/i; long int row,col; if(fac1 > fac2){ row = fac1; col = fac2; }...
true
3795d77925874c26f5af08c98c7100f356d22aaa
C++
yielding/code
/cpp.range-v3/action.join/action.join.cpp
UTF-8
516
2.703125
3
[]
no_license
#include <iostream> #include <ranges> #include <string_view> #include <vector> // // NOTICE pure c++20 (without range-v3 github) // using namespace std; using namespace literals; int main() { auto bits = { "https:"sv, "//"sv, "cppreference"sv, "."sv, "com"sv }; for (auto c : bits | views::join) cout << c <<...
true
462946aab1296618b6638ee8f5428e8ab22558ea
C++
acyclics/ENGG1340_Group98
/simulator.cpp
UTF-8
7,269
3.453125
3
[]
no_license
/* File: simulator.cpp Purpose: Simulates the checkout procedure of a grocery store */ #include <queue> #include <iostream> #include "simulator.h" #include "testcase_generator.h" /* Struct: Customer Description: Stores the time a customer needs during checkout. Also stores the time wh...
true
7cb8b6274a01af5f9eec01e165970eac86599bbc
C++
pasindubawantha/sherlock-framework
/src/AnomalyDetectionModule/AnomalyDetectors/ConfidenceInterval/ConfidenceIntervalAnomalyDetector.cpp
UTF-8
2,432
3.03125
3
[ "Apache-2.0" ]
permissive
#include "ConfidenceIntervalAnomalyDetector.h" #include <iostream> // Constructors ConfidenceIntervalAnomalyDetector::ConfidenceIntervalAnomalyDetector(std::string identifyer) { this->identifyer = identifyer; std::cout << "[ConfidenceIntervalAnomalyDetector] Constructing {" << identifyer << "}" << std::e...
true
399ba4027d28812f18f6bc099b4adfeeed781ffd
C++
sagnik2911/Data-Structure-Practices-
/FACTORIA.CPP
UTF-8
225
2.84375
3
[]
no_license
#include<stdio.h> #include<conio.h> void main() { int i,j=1,n; printf("please input the number:: "); scanf("%d",&n); for(i=1;i<=n;i++) { j=i*j; } printf("factorial is :%d",j); getch(); }
true
24fc4fd6bd9591c172e124093fd46cb2f9b2e936
C++
juggernaut15/gilgil_vendingMachine
/widget.cpp
UTF-8
1,952
2.609375
3
[]
no_license
#include "widget.h" #include "ui_widget.h" #include <QMessageBox> #include <QString> Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); checkMoney(); } Widget::~Widget() { delete ui; } void Widget::checkMoney(){ if(money >= 200){ ui->pbCoke->set...
true
d3afbfe2b1bfa4848beea4e170539aaf0884d0e0
C++
siagung/stoneaero
/trunsmeetur/include/IdleSwitch.h
UTF-8
455
2.828125
3
[]
no_license
#ifndef __IDLESWITCH_H__ #define __IDLESWITCH_H__ #include<Arduino.h> typedef enum { IS_N = 0, IS_0 = 1, IS_1 = 2 } IdleSwitchState; class IdleSwitch { public: IdleSwitch(int pin1, int pinN); IdleSwitch(int pin1, int pinN, IdleSwitchState* state); IdleSwitchState get( void ); void registerState( ...
true
14a7ad2c842d4afdc5beb672a4a67aeb355dff35
C++
rahulkr007/sageCore
/trunk/src/c++/include/util/TypeInfo.h
UTF-8
2,561
3.453125
3
[]
no_license
#ifndef UTIL_TYPEINFO_H #define UTIL_TYPEINFO_H #include <typeinfo> #include <string> namespace SAGE { namespace UTIL { class TypeInfo { public: template<typename T> struct TypeWrapper { typedef T type; }; /// @name Constructors / destructors //@{ /// /// Constructor. TypeI...
true
c74f0dd3fb679cbe7c85630bbe582af8a4632ed9
C++
sgosiaco/ecs60p5
/braincell.cpp
UTF-8
704
2.734375
3
[]
no_license
#include <iostream> #include "braincell.h" #include <cstring> using namespace std; BrainCell::BrainCell() { fed = 0; outgoing = 0; ID = 0; inPath = outPath = NULL; inLength = outLength = 0; visited = 0; source = 0; } void BrainCell::create(Vessel2 in[], int count, int ID) { fed = 0; visited = 0; ...
true
8f4d02441ef45ee62c6e052eefff4af691b09acd
C++
Illia1F/data-structures
/ChainedHashTable with bst/main.cpp
UTF-8
415
3.640625
4
[]
no_license
#include "hashTable.h" #include <iostream> using namespace std; int main() { // create the hash table with a size of 5 HashTable t(5); // insert to the hash table 30 elements for(int i=0; i<30; i++) t.Insert(i+1); // and try to delete some elements t.Delete(2); t.Delete...
true
168c78fdf05c419ae8f17a9b92add769d24e5b6d
C++
fidelitousone/xor-decryptor
/src/XorDecryptor.cpp
UTF-8
1,623
3.1875
3
[]
no_license
// PROJECT EULER // PROBLEM 59 // XOR Decryption #include <iostream> #include <string> #include <sstream> #include <fstream> #include <vector> using namespace std; char * keygen() { static char randkey[3]; char alphabet [26] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t'...
true
f434f5ad4cf0a9064f307bc1e25f9b3dcd591957
C++
MarcoLotto/ScaenaFramework
/Graphics/include/DepthTexture.h
UTF-8
794
2.859375
3
[ "MIT" ]
permissive
/********************************** * SCAENA FRAMEWORK * Author: Marco Andrés Lotto * License: MIT - 2016 **********************************/ #pragma once #include "MemoryTexture.h" class DepthTexture : public MemoryTexture{ protected: void deleteTextureFromMemory(); void generate(vec2 size); void assignTextureId...
true
45a3d26c2e7ef67ee3da59374873496fdce2f0cb
C++
zhaohuanzhendl/algorithm
/leetcode/string/Lenth_of_Last_Word.cc
UTF-8
985
3.3125
3
[]
no_license
/* * Filename Lenth_of_Last_Word.cc * CreateTime 2017-03-05 07:05:40 * * Copyright (C) Zhao Huanzhen * Copyright (C) zhzcsp@gmail.com */ #include <iostream> #include <algorithm> #include <functional> #include <string> using namespace std; class Solution { public: int lengthOLW(const char *s) { ...
true
4f43108c6b0cc643fa2d15e81ff2401b2e89da21
C++
dendibakh/Network-programming
/StatServer/StatServer/StatServer.cpp
UTF-8
4,363
2.734375
3
[]
no_license
#include <iostream> #include <winsock2.h> #include <mysql.h> #include <boost/asio.hpp> #include <boost/array.hpp> #include <boost/tokenizer.hpp> #include <boost/lexical_cast.hpp> #include "util.h" using namespace boost::asio; using namespace std; namespace { MYSQL *connection = nullptr; class commandParser { t...
true
fbb78ae7f1b6b0a0e993927817597cf32f03d655
C++
jammer312/cpp_random_code_without_context
/cmc_complex_eval.h
UTF-8
2,010
2.96875
3
[]
no_license
#include <vector> #include <string> #include <map> #include <functional> namespace numbers { complex eval(const std::vector<std::string> &args, const complex &z) { static std::map<std::string, std::function<void (complex_stack &)> > op_map{ {"+", [] (complex_stack &stack) { comp...
true
08b1bcafcf9098d23bbb833e844898e88dc35828
C++
SureD/Practice
/negetive2nums.cpp
UTF-8
1,878
3.71875
4
[]
no_license
/* * 负二进制的转换及加法计算 * 利用了取余法求取当前位置上的数 *================================================ * * 2---->n n+1 3 * -2|—————— -2|-------- * | -5 ====> | -5 * -------- --------- * -1 ---->m m+2 1 */ #i...
true
0ccfb897365e8fe67cd2f62a5ad4a69a171895b0
C++
pz1971/Online-Judge-Solutions
/SPOJ/PALIN.cpp
UTF-8
1,629
2.546875
3
[]
no_license
#include <bits/stdc++.h> #define vi vector<int> typedef unsigned int ui; typedef long int li; typedef unsigned long lu; typedef long long ll; typedef unsigned long long llu; using namespace std; int main() { int t{}; cin>> t; getchar(); while(t--) { vi d; char ch{}; while(...
true
8388d0f0753216e2a202fb6a8997917ce04bcab4
C++
asieraguado/skeletonml
/kinect_postures/src/exceptions.h
UTF-8
547
2.546875
3
[ "MIT" ]
permissive
#ifndef EXCEPTIONS_H #define EXCEPTIONS_H class NoTrackerDataException: public std::exception { public: virtual const char* what() const throw() { return "Insufficient data from OpenNI tracker. Sensor is not ready or user1 is not calibrated yet."; } }; class LoadModelFileException: public std::exception {...
true
9f3d90822626f029fce7ea4147f4d863190d49d6
C++
michaelrk02/interpolator
/src/NewtonPolynomial.cpp
UTF-8
3,511
2.875
3
[]
no_license
#include <algorithm> #include <cstdlib> #include <iostream> #include <debug.h> #include <NewtonPolynomial.h> NewtonPolynomial::NewtonPolynomial(void) { this->degree = 0; } NewtonPolynomial::~NewtonPolynomial(void) { } void NewtonPolynomial::initializeData(std::istream &input, float scaleX, float scaleY) { t...
true
3da56cade4522f93d536c0e98d41d3eb0955e741
C++
nagyistoce/VideoCollage
/inc/vtl/img/Img_Ip.h
UTF-8
21,986
2.703125
3
[]
no_license
/*************************************************************************\ Microsoft Research Asia Copyright (c) 2003 Microsoft Corporation Module Name: Vis Lib Image Processing Abstract: A group of image processing functions. Notes: TODO: /// Apply the callback function on each pi...
true
367456784296ff5313abc03ba21711e0acd49c8e
C++
maleRjc/GPU_VIDEO
/Video_codec_demo/src/Mux_decode_thread/Demux_queue.cpp
UTF-8
7,110
2.828125
3
[]
no_license
#include "Demux_queue.h" #include <glog/logging.h> #include <cstring> namespace Demux { Demux_queue::Demux_queue():m_write_position(0), m_read_position(0), m_used_queue_size(0), m_enqueue_sta(true), m_dequeue_sta(true), m_clear_cache(false) { pthread_mutex_init(&m_lock, NULL); pthread_cond_init...
true
b1cb1100c85e9d26602ba7d1117bba95a7e8eccf
C++
martymcflywa/ScrabbleDictionary
/test/DictionaryExtractorTests.cpp
UTF-8
4,683
3.0625
3
[]
no_license
#include "stdafx.h" #include "catch.hpp" #include <string> #include "TestHelpers.h" #include "TestReader.h" #include "../lib/DefinitionFormatter.h" #include "../lib/DefinitionPrinter.h" #include "../lib/DictionaryExtractor.h" #include "../lib/DictionaryTask.h" #include "../lib/EmptyStringException.h" #include...
true
d270fccafcaca7d24d66d1ac47cdc071efca32d5
C++
boutboutnico/game
/tic_tac_toe/src/print.cpp
UTF-8
1,134
2.75
3
[]
no_license
/// /// \file print.cpp /// \brief /// \date 9 juil. 2015 /// \author nboutin /// #include "print.hpp" /// === Includes ================================================================================ #include <iostream> #include "engine/engine.hpp" /// === Namespaces ==============================================...
true
45014f78bd4b2cb1257e309acdabf7099014ed04
C++
zahramo/Usart-Sensor
/mainBoard/src/main.cpp
UTF-8
1,910
2.8125
3
[]
no_license
#include <Arduino.h> #include <Wire.h> #include <LiquidCrystal.h> #include <AltSoftSerial.h> #define RXPIN 9 #define TXPIN 8 float datas[2]; AltSoftSerial altSerial; LiquidCrystal lcd(12, 11, 5, 4, 3, 2); typedef union{ float fp; byte bin[4]; } FloatBytes; FloatBytes humidity; FloatBytes temp; float getDataFr...
true
7b540bebacc5ea4889aacd952b782d8f6e3612c8
C++
dtbinh/Game-Engine
/ResourceManager.cpp
UTF-8
6,255
2.671875
3
[]
no_license
#include "ResourceManager.h" #include "GameManager.h" #include "MeshResource.h" #include "PathResource.h" #include "TinyXML.h" std::string ResourceManager::getCurrentGroupName() { return current_group; } ResourceManager::ResourceManager(GameManager* gm) { game_manager = gm; current_group = ""; all_resou...
true
2e1c913049c9e913997d256194713b23a108e432
C++
BekzhanKassenov/olymp
/codeforces.com/Contests/Other contests/Good Bye/2015/A/A.cpp
UTF-8
1,487
2.609375
3
[]
no_license
/**************************************** ** Solution by Bekzhan Kassenov ** ****************************************/ #include <bits/stdc++.h> using namespace std; #define F first #define S second #define MP make_pair #define all(x) (x).begin(), (x).end() typedef long long ll; typedef unsigned long long ull...
true
de8e543ca1c74602f2f7e47e113f3ae062e76120
C++
OkayFly/Learn
/C/Client/example_client.cpp
UTF-8
665
2.734375
3
[]
no_license
// 定时器,每2分钟发送 helloword 到服务器 #include <iostream> #include <stdio.h> #include "tcpclient.h" void onRead(const char *data, int len) { std::cout << "Receive:"<<data << "len:"<<len<<std::endl; } void onConnect() { std::cout << "client connect "<<std::endl; } void onDisconnect() { std::cout<<"client discon...
true
d494d0a249db5cc84d02dda1bd173d2db87b7152
C++
gxmc/TerrainGeneration
/vec.h
UTF-8
2,160
3.296875
3
[]
no_license
#pragma once #include <iostream> #include <QTextStream> using namespace std; /** * @brief Classe abstraite de vecteur. */ class Vec { public: /** * @brief Calcule la norme du vecteur. */ virtual double length() const = 0; }; class Vec2; class Vec3; /** * @brief Vecteur à 2 dimensions. */ cla...
true
6913b36c35b665795079edae083f27b113ea887f
C++
honorpeter/FPGA
/CNN/Tensor.h
UTF-8
948
2.703125
3
[]
no_license
#include <vector> #include <assert.h> struct point_t { int x, y, z; }; struct hyperparam { int stride; int pad; }; typedef ap_fixed<16,8> fixedAP; //typedef float fixedAP; template< int x, int y, int z> struct tensor_t { fixedAP data[x * y * z]; #pragma data //fixedAP * data_p; point_t size; /*Define si...
true
2c2e8164293262aa2279e4379b6232932343eaa0
C++
yanyan2060/Decision-Tree-Induction-algorithm
/newtable.cpp
UTF-8
1,431
2.90625
3
[]
no_license
#include "newtable.h" #include "MyCell.h" using namespace std; vector<MyCell> newtable(int num, string dsname,vector<MyCell>&original,vector<vector<string>> &ds) { vector<MyCell> newdata; vector<int> index; newdata.push_back(original[0]); for (size_t r = 0; r < original.size();r++) { string temp3 = dsname; ...
true
d3a2399b39f8d0aec10c34939d6fc583a8b6e05f
C++
saif86/CPP-Default-Arguments
/Example.cpp
UTF-8
923
3.921875
4
[]
no_license
/** * @file Example.cpp * * @brief C++ Program to demonstrate working of default argument. * * @author Saif Ullah Ijaz * */ #include <iostream> using namespace std; // FUNCTION PROTOTYPE (DECLARATION) /** function that prints a character multiple times. * * @param c The input character to be printed...
true
92fd3f91d1223c72f50b356e2d451b58b11b2f57
C++
alexOarga/PSConcurrentesDistribuidos16
/practica1/tar/ejercicio_4.cpp
UTF-8
1,699
3.359375
3
[]
no_license
#include <iostream> #include <thread> #include <string> #include <chrono> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; //Esribe en media la media de los reales de la tabla T void media(double T[], int i, double* media) { *media = 0.0; for(int j = 0; j<i; j++){ *medi...
true
fc48f096e4f550488b63b3258b2826907c7907a3
C++
vbabenk/Course-work
/Kursa4/Kursa4/Program.cpp
UTF-8
1,895
3.421875
3
[]
no_license
#include "Program.h" #include "Array.h" Program::Program() { } Program::~Program() { } void Program::Run() { int i; char s[10]; do { system("cls"); cout << "-------------- MENU --------------" << endl; cout << "<1>.Create student's object" << endl; cout << "<2>.Create teacher's obje...
true
3acc12406413ae2c711f0d8afb4b6e1fbefca6cd
C++
WhiZTiM/coliru
/Archive2/3e/0c2e6a4c969ed8/main.cpp
UTF-8
5,581
3.203125
3
[]
no_license
#include <iostream> #ifndef ANALOGLITERALS_HPP #define ANALOGLITERALS_HPP namespace analog_literals { typedef unsigned int uint; // Symbols enum line_end { o, I }; enum Lsymbol { L }; // Intermediary types used during construction struct eLsymbol {}; eLsymbol operator! (Lsymbol) { return e...
true
8f70643ac945a15035c09423110e29d64a80e269
C++
munsingh/Downloader
/src/main.cpp
UTF-8
2,830
2.875
3
[]
no_license
//boost includes #include "boost/any.hpp" #include "boost/program_options.hpp" //Project Includes #include "Globals.h" #include "DownloadManager.h" #include "URL.h" //C++ includes #include <vector> #include <iostream> namespace po = boost::program_options; struct Directory { public: Directory( const std::string...
true
cb89818790cce6b54ca4952551643b845d6ee51a
C++
OmerBhatti/Cpp-Classes
/Custom Classes/BitArray.cpp
UTF-8
2,915
3.359375
3
[]
no_license
#include "BitArray.h" #include <iostream> #include <cmath> using namespace std; int BitArray::getCapacity()const { return capacity; } BitArray::BitArray(int n) { capacity = n; int s = (int)ceil((float)capacity / 8); data = new unsigned char[s]; for (int i = 0; i < s; i++) { //initialize with zeroes data[i] = ...
true
e42ad5dbf19225455d5699bab430990fb55910f1
C++
jdefaye/local_TSP
/solution.cpp
UTF-8
543
2.671875
3
[]
no_license
#include "solution.h" Solution::Solution() {} Solution::Solution(const std::pair< float, float >& evaluation, const std::vector< int >& conf): eval(evaluation), configuration(conf) {} std::pair< float, float > Solution::get_eval() const { return eval; } void Solution::set_eval(const std::pair< float, float >&...
true
2f4f10bf1e0a19b5d72f32d88a790560a97dcd50
C++
kartoshhka/urs_laba2
/bagulina_ms_13345_2_2/src/get_week_day_client.cpp
UTF-8
784
2.78125
3
[]
no_license
#include "ros/ros.h" #include "bagulina_ms_13345_2_2/GetDay.h" #include <cstdlib> int main(int argc, char **argv) { ros::init(argc, argv, "get_week_day_client"); ros::NodeHandle n; ros::ServiceClient client = n.serviceClient<bagulina_ms_13345_2_2::GetDay>("get_week_day"); bagulina_ms_13345_2_2::GetDay srv; ...
true
14e4fd871b6a488756d4ad102de2698df2c5be01
C++
Algoraphics/VisualStudioStuff
/Lab3/Producer/Connection.cpp
UTF-8
2,890
3.09375
3
[]
no_license
// Gabriel Hope, ghope@wustl.edu // Kevin Kieselbach, kevin.kieselbach@wustl.edu // Ethan Rabb, ethanrabb@go.wustl.edu // // Connection class definition. // #include "stdafx.h" #include "Connection.h" #include "Producer.h" using namespace std; Connection::Connection(Producer & producer_) : receivingPlays(true), ...
true
c2a8476665d786d085a805ef4d42fa2fa8cd5f4b
C++
sjtuchp/C-PrimerPlus-Learning-Note
/chapter8/practice/5.cpp
UTF-8
392
3.828125
4
[]
no_license
#include <iostream> template <typename T> T max5(T *); int main(){ using std :: cout; using std :: endl; int arr1[] = {1,2,3,4,5}; double arr2[] = {1.0,2.2,3.3,5.5,2}; cout << max5(arr1) << endl; cout << max5(arr2) << endl; } template <typename T> T max5 (T *arr){ T result = *arr; for (int i=1;i...
true
68d503a222c98290bf92422b173761d1fbb890ca
C++
anshumanvarshney/CODE
/Basic Implementation/tree/binarysearchtree.cpp
UTF-8
2,744
3.828125
4
[]
no_license
/* traversal of binary tree 1-Depth order(inorder, preorder, postorder) 2-Level order (level by level) */ #include<bits/stdc++.h> using namespace std; class btree { private : struct node //building a binary search tree { node *left; int data; node *right; }*root; //root of...
true
72c31b1281ae6d155842e6f61b0c2c07b091d6cf
C++
InfiniBrains/mobagen
/examples/maze/Node.h
UTF-8
1,018
3.09375
3
[ "Apache-2.0" ]
permissive
#ifndef MOBAGEN_NODE_H #define MOBAGEN_NODE_H #include <iostream> #include <vector> // the goal of this data structure is to interface with the world struct Node { public: Node() = default; Node(bool north, bool east, bool south, bool west) { data = ((uint8_t)north) | ((uint8_t)east << 1U) | ((uint8_t)south <<...
true
f71cd496903a3fed0fd8fdcfa83fccc1df611cf1
C++
ClarePhang/avs-device-sdk-intel-speech-enabling-kit
/CapabilityAgents/Alerts/include/Alerts/Reminder.h
UTF-8
2,804
2.53125
3
[ "Apache-2.0" ]
permissive
/* * Reminder.h * * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * *...
true
2a79f74a97f3ed9b2cd530c243ad9560e943c66d
C++
NathanZaldivar/Cpp_codecademy
/LOGICAL OPERATORS/Leap_year.cpp
UTF-8
354
3.265625
3
[]
no_license
#include <iostream> int main() { int year; std::cout << "Enter current year: "; std::cin >> year; if (year < 9999 && year > 1000) { if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) { std::cout << "Leap year!\n"; } else { std::cout << "Not a leap year!\n"; } } else { std:...
true
2f1c528703f30b9d96da2df963055370df77d63b
C++
alexclapou/oop
/exam/domain.h
UTF-8
833
3.234375
3
[]
no_license
#include <string> class Astronomer{ private: std::string name; std::string constellation; public: Astronomer(std::string _n, std::string _c):name{_n}, constellation{_c}{} std::string get_name(); std::string get_constellation(); }; class Star{ private: std::...
true
99718b49cbdda49eaa4f08c7e509bdfda234027d
C++
quanghm/UVA-online-judge
/151.cpp
UTF-8
644
2.6875
3
[]
no_license
/* * uva151.cpp * * Created on: May 4, 2015 * Author: qhoang */ #include<iostream> using namespace std; int main() { int n, m,s; while (cin >> n && n) { if (n == 13) { cout<<"1\n"; } else { m=2; while (m++){ // int a[100] = { }; // a[i]: last person in an (i+1)-queue // a[0] = 0; // ...
true
afcd4f56dbe07177f91693d777d1511851cc6841
C++
tobias93/sort-algorithms
/Sortierverfahren/MergeSorter.cpp
UTF-8
2,400
3.09375
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "MergeSorter.h" template<class sortType> MergeSorter<sortType>::MergeSorter() { } template<class sortType> MergeSorter<sortType>::~MergeSorter() { } template<class sortType> void MergeSorter<sortType>::sort(DataArray<sortType>& data) { this->resetPerformenceCounters(); this->sortRecu...
true
4d1d0acbb42cfb48804445ff7120146c7bde262d
C++
Bab95/Programs
/LeetCode/Problems/14.Longest_Common_Prefix.cpp
UTF-8
2,055
3.171875
3
[]
no_license
class Solution { public: struct node{ bool isEnd; int count; struct node* children[26]; }; struct node* getnode(){ struct node* tmp = new node; tmp->isEnd = false; tmp->count = 0; for(int i=0;i<26;i++){ tmp->children[i] = NULL; } ...
true
dca34b7c82fe1026935f24217d65a97cac6c4bed
C++
Thunradee/CPP
/BSTMorse/main.cpp
UTF-8
2,357
3.171875
3
[]
no_license
/************************************************************************************************************* * Programmer: Thunradee Tangsupakij * * Class: CptS 122, Spring, 2019; Lab Section 2 ...
true
8e0db7b435fbc1b28c23efa1a56d6db07af4866c
C++
workOnCarrier/AccGrind
/plugins/textEcho/specialTextTask.cpp
UTF-8
607
2.609375
3
[]
no_license
#include <iostream> #include "specialTextTask.h" namespace AccGrindPlugin{ SpecialTextTask::SpecialTextTask( std::string const &textVal) :m_textValue(textVal) { } void SpecialTextTask::execute() { std::cout << " value of string in SPECIAL task is ::" << m_textValue << std::endl; ...
true
ad571cc1a3d3d248e51089e5a88e10b5fe2c4356
C++
Kpolatajko/PAMSI
/Projekt_1/src/main.cpp
UTF-8
13,731
3.671875
4
[]
no_license
#include "list.hh" #include "map.hh" #include "stack.hh" #include "queue.hh" #include "priorityqueue.hh" #include <iostream> //---Biblioteki STL--- #include <queue> #include <stack> #include <list> #include <iterator> #include <map> //---Funkcja wyswietlajaca liste STL void display_list(std::list<int> tlist){ st...
true
8d636285127905e8ffa55d13c058a21fa4fc67fb
C++
hyemmie/algorithm_study
/Backjoon/DevideConquer/12846.cpp
UTF-8
1,757
3.3125
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #include <utility> #include <cstdlib> using namespace std; vector<long> dailyProfit(0,0); // int로 하면 메모리 초과 long maximumProfit(long start, long end) { // 기저 사례 if (start == end) { return dailyProfit[start]; } long mi...
true
c5acb2a41c451998d67a3bea2da97b8b8623bfc0
C++
bogdan-ivan/quantumcity
/hightrafficdetector/hightrafficdetector.ino
UTF-8
2,212
2.75
3
[]
no_license
// LCD #include <LiquidCrystal.h> const int rs = 1, en = 2, d4 = 4, d5 = 5, d6 = 6, d7 = 7; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); // LEDs int redLed = 33; int yellowLed = 32; int greenLed = 30; // movement const int sensor = 50; // proximity const int trigPin = 51; const int echoPin = 52; long duration; int dis...
true
dc25dbc40e721cba5ecbe5e43e23be52d0ad2065
C++
martin-carrasco/online-judge-solutions
/CSES/1163.cpp
UTF-8
648
2.515625
3
[]
no_license
#include "bits/stdc++.h" using namespace std; using ii = pair<int, int>; int main(){ ios::sync_with_stdio(0); cin.tie(0); set<int> intervals; multiset<int> lengths; int x, n; cin >> x >> n; intervals.insert(0); intervals.insert(x); lengths.insert(x); for(int i = 0;i < n;i++){ int split; cin >> spli...
true
39c7f6fd3823965474e83c6b50003f2c9f5dbc46
C++
GH2005/myLeetcodeSolutions
/289. Game of Life.cpp
UTF-8
984
3.03125
3
[]
no_license
// idea by Stefan Pochmann class Solution { public: void gameOfLife(vector<vector<int>>& board) { int height = board.size(), width = height > 0 ? board[0].size() : 0; if (height == 0 || width == 0) return; // update the state using the second bit for (int centerY = 0; centerY < heigh...
true
f859c302a2e119040e9a56a0baf5a337ed911e71
C++
cskilbeck/SearchClip
/SearchClip/Util.cpp
UTF-8
3,773
2.953125
3
[ "MIT" ]
permissive
////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include <algorithm> #include <functional> #include <cctype> #include <locale> ////////////////////////////////////////////////////////////////////// wstring GString(DWORD id) { WCHAR str[MAX_LOADSTRING]; LoadString(Ge...
true
6f6a7d2f69ba4ab44e4556f3a9832ae276d6a5dc
C++
optimus20/morse
/苏钰迪 开源硬件作业/7月4号第二次作业/qiduanguan.ino
UTF-8
1,894
3.046875
3
[]
no_license
void setup() { pinMode(1, OUTPUT); pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); Serial.begin(9600); } int income=0; void loop() { if(Serial.available()>0) { income=Serial.read(); switch(income) { case'0': show0(); break; case'1': show1(); break; ...
true
4d280d0b66c79be62456cc4c2b2dbac200c24468
C++
james-sungjae-lee/2018_CPP
/STUDY/Study0531/find.cpp
UTF-8
478
3.140625
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; int main(int argc, char const *argv[]) { string fruits[5] = {"사과", "토마토", "배", "수박", "키위"}; std::vector<string> vec(&fruits[0], &fruits[5]); std::vector<string>::iterator it; it = find(vec.begin(), vec.end(), "수...
true
e32004c48a51b3a19988d660a78dafcedf148c59
C++
busebd12/InterviewPreparation
/LeetCode/C++/General/Easy/ComplimentOfABase10Integer/main.cpp
UTF-8
1,425
3.859375
4
[ "MIT" ]
permissive
#include <algorithm> #include <iostream> #include <string> using namespace std; /* * Approach: we convert the input number to a string representation of its bits. * Then, for each bit, if the bit is a one, we make it a zero and vice versa. * Finally, we convert the string back into a decimal number and return that ...
true
328d34eb3e2eeba148b65985020ccfb6566ef0a9
C++
lior035/CPP-WorkoutGym
/healthClub.cpp
UTF-8
10,374
3.40625
3
[]
no_license
#include <iostream> using namespace std; #include <string.h> #include <typeinfo.h> #include "healthClub.h" #include "healthClubException.h" HealthClub::HealthClub(char* name): devices(0) //constructor { if (name!=NULL) this->setName(name); trainers = NULL; iTrainer = 0; } HealthClub::HealthClub(ifstream & inFil...
true
a67da6c6fc6a7365fcd6198a4dcca8a0c4782643
C++
k1rrra/Laba-2
/Laba 7.1.cpp
UTF-8
1,020
3.078125
3
[]
no_license
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int sum(int x, int y) { int sum; sum = x + y; return sum; } void sum(int a1, int a2, int b1, int b2) ...
true
06ff544237d9906211ff44c31e3e2c8f406f39b6
C++
justinjeong5/Implementation
/queue_circularArray.cpp
UTF-8
2,172
3.65625
4
[]
no_license
/* * 2019.7.4 * data structure implementation - queue_circularArray */ #include <iostream> #include <string> using namespace std; #define endl '\n' class QueueCirArr { public: int q_size, capacity; int first, last; int *queue; QueueCirArr() { q_size = 0; capacity = 8; first...
true
84f10fa0aa0969463f57f78dfd258293b07014ef
C++
YegangWu/Alogirthms
/encoding/node.h
UTF-8
375
3.15625
3
[]
no_license
#ifndef INCLUDE_NODE_H #define INCLUDE_NODE_H class Node { public: char d_c; int d_freq; Node* left; Node* right; Node(char c, int freq, Node* left, Node* right): d_c(c), d_freq(freq), left(left), right(right) {} friend struct greater; }; struct greater { bool operator()(const Node* lhs, const Node* rhs...
true
1bd72c180d3953d4be08bc300553430570475959
C++
tabvn/ued
/c++/part1/bai16.cpp
UTF-8
710
3.625
4
[]
no_license
#include <iostream> #include <math.h> using namespace std; bool isPrime(int n){ if(n <2){ return false; } for (int i = 2; i <= sqrt(n); ++i){ if(n % i == 0){ return false; } } return true; } int reverse(int n){ int s; while(n >0){ s += s*10 + n%10; n /= 10; } return s; } void displayCoupleOf...
true
74a0d8cdb083d95e5199be27747f02af7e1f832c
C++
diegoximenes/icpc
/judges/codeforces/done/332b.cpp
UTF-8
1,293
2.609375
3
[]
no_license
#include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; #define MAX 300000+10 #define ll long long int n, k; ll v, dp[MAX][2], tree[MAX]; bool firstPrint = 1; void update(int idx , ll val) { while (idx <= n) { tree[idx] += val; idx += (idx & -idx); } } ll read(int idx) ...
true
050cf192e11a45ce19ddb9f0d7e261b23206e640
C++
1249302623/myWebServer
/LiuServer/base/FileUtil.cpp
UTF-8
1,937
3.328125
3
[]
no_license
#include "FileUtil.h" #include <stdio.h> AppendFile::AppendFile(std::string filename): fp_(fopen(filename.c_str(),"ae"))//e :O_CLOEXEC 应该表示执行exec()时,之前通过open()打开的文件描述符会自动关闭 { setbuffer(fp_, buffer_, sizeof buffer_); //在打开文件流后,读取内容之前,调用setbuffer()可用来设置文件流的缓冲区。参数stream为指定的文件流,参数buf指向自定的缓冲区起始地址,参数size为缓冲区大小 } AppendFi...
true
fb0cccaf051cd1a7158ba9b78a4d46efa6a0e89b
C++
chishaung/CS_570-Artificial-Intelligence-
/2013/CS570/CS_570 A.I./a.cpp
UTF-8
772
2.84375
3
[]
no_license
#include <iostream> using namespace std; int main() { int x = 5; float f = 8.5; float a[3] = {1.1, 1.2, 1.3}; float *fp1, *fp2; fp1 = &f; cout << "fp1: " << *fp1 << endl; fp2 = a; cout << "fp2: " << *fp2 << endl; cout << "fp2: " << fp2[0] << endl; cout << "fp2: " << fp2[1] << endl; cout << "fp2: " << fp2[2] << en...
true
7a8d7bb736b872654bfaa1886c28e4099576170c
C++
patrickpclee/codfs
/branch/0.2/src/client/client_storagemodule.cc
UTF-8
5,339
2.59375
3
[]
no_license
#include <fstream> #include <math.h> #include <stdlib.h> #include <sys/file.h> #include <thread> #include <mutex> // added for gcc 4.7.1 #include <unistd.h> // added for gcc 4.7.1 #include "../common/debug.hh" #include "../common/memorypool.hh" #include "client_storagemodule.hh" #include "../config/config.hh" using nam...
true
f6ba752b6df3084acb30f9a3038840f53d3d6581
C++
JoshuaWright1197/Vehicle
/main.cpp
UTF-8
946
2.875
3
[]
no_license
#include<iostream> #include<vector> #include<iomanip> #include"MotorVehicle.hpp" using namespace std; using namespace MotorVehicle; int main() { vector<Vehicle::pointer_type> v; v.push_back(Vehicle::pointer_type(new SuperCar("Ferrari", "488 GTB", "Red", 2016, 250'000, 8, 1'475,2, 3.9, 670, 0))); v.push_b...
true
988b0a9d3026fc7aeb6706e5b772bc03886a4875
C++
lfblue/CornersVisualizer
/src/bridge.cpp
UTF-8
1,385
2.53125
3
[]
no_license
#include "bridge.h" #include <QFile> #include <QDebug> #include <QVariantMap> // json include #include <QJsonDocument> #include <QJsonObject> #include <QJsonArray> #include <QVariant> #include <QFileDialog> Bridge::Bridge(QObject *parent) : QObject(parent) { m_settings = new QSettings("app.ini",QSettings::IniFor...
true
0dea205c968ddba96e8513eed327439f4f2085ed
C++
swong225/advent-of-code-2017
/swong/02/part1.cpp
UTF-8
490
2.984375
3
[ "MIT" ]
permissive
#include <iostream> #include <fstream> #include <sstream> #include <climits> using namespace std; int main() { ifstream inputFile("./input.txt"); string currLine; int sum; while (getline(inputFile, currLine)) { istringstream is(currLine); int currNum; int min = INT_MAX; int max = INT_MIN; ...
true
34e9f3ed40f1bf9be6db5cac497df99df152157f
C++
cipherxraytaint/preprocessor
/include/record.h
UTF-8
404
2.609375
3
[]
no_license
#ifndef RECORD_H_ #define RECORD_H_ #include "node.h" class Record { public: Record() {}; ~Record() {}; bool init_record(std::string rec); bool is_mark(); void set_index(uint64_t index); uint64_t get_index(); Node get_src(); Node get_dst(); void print_record(); private: bool i...
true
f0feb922fff128d2fbeabf26768ea8766346183c
C++
fallingfox/piskvorky
/piskvorky/piskvorky.cpp
UTF-8
2,993
3.078125
3
[]
no_license
#include <algorithm> #include "piskvorky.hpp" // Konsturktor Piskvorky::~Piskvorky() { delete _board; std::for_each(_players.cbegin(), _players.cend(), [](Player* player) { delete player; }); _players.clear(); } // Gettery Board* Piskvorky::getBoard() const { return _board; } Player** Piskvorky::getP...
true