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
532f84b7768c2f7bdff56ab53d8755cf340b92d2
C++
ChopsII/neural_net_cpp
/src/assets/neuron.cpp
UTF-8
516
2.6875
3
[]
no_license
#include "synapse.h" #include "neuron.h" Neuron::Neuron(float init_output_value, float init_threshold) : Soma(init_threshold) { output_value = init_output_value; } void Neuron::add_synapse(Synapse& new_synapse) { all_synapses.emplace_back(new_synapse); } void Neuron::set_output_value() { float incom...
true
20bf50d617dee36f6e2a9f21e75686a1ab3c81e1
C++
khvysofq/vscp
/src/vscp/net/vscpserver.cpp
UTF-8
2,678
2.546875
3
[]
no_license
// Vision Zenith System Communication Protocol (Project) #include "vscp/net/vscpserver.h" namespace vscp { VscpServer::VscpServer(boost::asio::io_service& io_service, BaseSessionManager *session_manager, const std::string server_address, uint16 server_port) :io_service_(io_service), session_mana...
true
2a5ecbeb49c058f67d8550619acaf82ef886ec71
C++
zhushiqi123/ios-
/C++语言程序设计 郑莉 第四版(课件、课后答案、例题源代码)/C++语言程序设计案例的源代码和目录/10852C++案例教程源代码/case03/3_4.cpp
GB18030
409
3.40625
3
[]
no_license
#include<iostream> using namespace std; int sgn(double x) //źsgn()䷵ֵΪint { if (x>0) return(1); //س1 if (x<0) return(-1); //س2 return(0); //س3 } int main() { double x; for (int i=0;i<=2;i++) { cout<<"Input x="; cin>>x; cout<<"sgn("<<x<<")="<<sgn(x)<<endl; ...
true
f18c203dfb8aeaada6d378c0ad62e7fd9a8cffa9
C++
besSveta/otuscpp11
/bulkasync.h
UTF-8
1,989
3.046875
3
[]
no_license
/* * bulkmt.h * * Created on: 30 июн. 2019 г. * Author: sveta */ #pragma once #include <iostream> #include <fstream> #include <sstream> #include <string> #include <chrono> #include <ctime> #include <sys/stat.h> #include <sys/types.h> #include<vector> class BulkInfo { std::string bulkString; int commandCou...
true
32fd2c3d3a0b18c490c65fa0127f03d00a774be6
C++
indranilm256/Compiler-project
/src/type_check.h
UTF-8
1,111
2.78125
3
[]
no_license
#include <iostream> #include <string> #include <cstring> #include <unordered_map> #include <map> using namespace std; typedef long long ll; typedef unsigned long long ull; bool isInt (string type); bool isSignedInt (string type); bool isFloat (string type); bool isSignedFloat (string type); class type_check { publ...
true
c0f1dfddbf601a4efe670bc4063b4376ac21a89b
C++
Hannna/robocupsslclient
/ robocupsslclient/additional.h
UTF-8
6,968
2.53125
3
[]
no_license
#ifndef ADDITIONAL_H_ #define ADDITIONAL_H_ #include <string> #include <iostream> #include <vector> #include <map> #include <sstream> #include <math.h> #include <sys/time.h> #include <strings.h> #include <list> #include "boost/tuple/tuple.hpp" #include "Vector2d/Vector2D.h" #include "RotationMatrix/RotationMatrix.h" ...
true
8990afbc818601d602c2e1333fb967902d7cd0a6
C++
jamalbouizem/Deus-Ex-Machina
/DeusExMachina/DeusExMachina/FileCSV.cpp
UTF-8
698
2.59375
3
[]
no_license
#include "FileCSV.hpp" using namespace DEM::Core; FileCSV::FileCSV(std::string path) : File(path) { separator = ';'; loadDatas(); } FileCSV::~FileCSV() { } Resource& FileCSV::loadDatas() { File::load(); datas.clear(); m_reader.open(m_path.c_str(), std::ios::in); if (m_reader) { std::strstream stream; ...
true
4b33eeb8a1d1a7b03e13085ce02ca6f3c5fdf3d0
C++
Elbagast/TF2_Mod_Builder
/sak/outliner_model.hpp
UTF-8
7,937
2.53125
3
[]
no_license
#ifndef SAK_OUTLINER_MODEL_HPP #define SAK_OUTLINER_MODEL_HPP #ifndef SAK_OUTLINER_MODEL_FWD_HPP #include "outliner_model_fwd.hpp" #endif #ifndef INCLUDE_STD_MEMORY #define INCLUDE_STD_MEMORY #include <memory> #endif #ifndef INCLUDE_STD_VECTOR #define INCLUDE_STD_VECTOR #include <vector> #endif #ifndef INCLUDE_QT_...
true
e4a88c5f3586a9006da06af64b5e914d983cd53f
C++
valhassan/simple-programs
/practice/tempconversion.cpp
UTF-8
652
3.71875
4
[]
no_license
#include<stdio.h> float C_Fah(float); float F_Cel(float); void main() { char ty; float cel, fah, Fa, Ce; printf("THIS PROGRAM CONVERTS TEMP. FROM CELSIUS TO FAHRENHEIT & VICE VERSA\n"); printf("INDICATE CONVERTION TYPE: ENTER F or f FOR FAHRENHEIT:"); scanf("%c", &ty); if(ty=='F'||ty=='f'){ printf("\nEnter Temp. in Ce...
true
5dc08e9e103e27c41958fa97ace4af4f292b6dae
C++
renatomb/engComp
/programacaoC/TRAB1UNID/TRAB5.CPP
ISO-8859-1
1,189
3.234375
3
[]
no_license
/*--------------------------------- UNP - Universidade Potiguar Curso de Engenharia de Computacao - 1 Ano Disciplina Programacao Cientifica - 1 Unidade Professor: Marcelo Mariano Aluno: RENATO MONTEIRO BATISTA Trabalho de C++ - Questo 05 ---------------------------------*/ #include <iostream.h> void main() {...
true
5553fa4c95b9e99984430093d1b0f86f50c0773a
C++
vster/CryptSecNetBook
/Lecture05/p163/p163.cpp
UTF-8
743
3.15625
3
[]
no_license
#include <iostream> #include <stdint.h> #define byte unsigned char using namespace std; // typedef unsigned char byte; typedef unsigned short u16bit; typedef unsigned int u32bit; typedef uint64_t u64bit; typedef signed int s32bit; byte f( byte k ) { return ( k * k ); } void bin_output ( byte x ) { int arr[8]; i...
true
326f32e615aa8b396f8db65fa934139907e0ef3e
C++
okmechak/SandBox
/Patterns/Creational.cpp
UTF-8
2,226
3.25
3
[]
no_license
#include "Creational.h" #include <iostream> using namespace std; /*! Example from refactoring guru full documentation see here: https://refactoring.guru/uk/design-patterns/factory-method */ namespace FabricMethod { namespace ProductCreator { void ConcreteProductA::doStuff() { cout << "Doing stuff o...
true
bf150113fb13171ec9b05ef5c8fea4c27ce07dcd
C++
krishnan1159/Contest
/hackerrank/oct13/angry_children_2.cpp
UTF-8
1,058
2.765625
3
[]
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { std::ios_base::sync_with_stdio(false); int n,k,x,i,minAns = 0,ans=0,addFactor = 0,subFactor = 0; vector<int> packets; cin>>n>>k; for(i=0;i<n;i++) { ...
true
47b1683cee2af75c63bce9a4fe70555ac2fd0d1d
C++
maximesong/voici
/src/PreviewCanvas.cpp
UTF-8
1,135
2.71875
3
[]
no_license
#include "PreviewCanvas.h" #include <iostream> using namespace std; PreviewCanvas::PreviewCanvas(QWidget *parent) :QLabel(parent) { standard_width = 250; standard_height = 200; setMinimumSize(standard_width, standard_height); } void PreviewCanvas::drawImage(const ImageFamily &imageCore) { QImage image = imageC...
true
3c92068621e0763d9d4067fa8762ceb237d6f88a
C++
chipolux/coding-math
/cpp-sdl2/ep02.cpp
UTF-8
1,014
2.640625
3
[]
no_license
#include <SDL2/SDL.h> #include <SDL2/SDL2_gfxPrimitives.h> #include <iostream> #include "helpers.h" const int WIDTH = 1280; const int HEIGHT = 720; SDL_Window* WINDOW; SDL_Renderer* RENDERER; void loop(); int main(int argc, char* args[]) { if (init(WINDOW, RENDERER, "Coding Math - Ep. 2", WIDTH, HEIGHT)) { ...
true
da903e9a77421c9cad78e7e2488b2cc66ade023f
C++
RaoulMarz/ImagePipeline
/src/stringframework.cpp
UTF-8
1,751
2.96875
3
[]
no_license
#include <boost/tokenizer.hpp> #include <iostream> #include <memory> #include <vector> #include <string> #include <sstream> #include "stringframework.h" using namespace std; std::unique_ptr<std::vector<std::string>> stringframework::getTokensOnDelimiter(std::string input, std::string delimiter) { std::unique_ptr<st...
true
a17be03ba54aea4c183faf0c3d03e85b9914cf3f
C++
dubshfjh/LeetCode
/37.cpp
UTF-8
5,847
3.28125
3
[]
no_license
#include <iostream> #include <vector> #include <string> using namespace std; //采用回溯法,结合36中的行访问数组,列已访问数组和9宫格已访问数组 class Solution { public: vector<vector<char>> temp_board; void solveSudoku(vector<vector<char>>& board) { int row,col,num,size_1,size_2,board_num,total_board; size_1=board.size(); siz...
true
0c11947796767328182faa06f854c9705f3013d2
C++
Striz-lab/c-3sem
/12/1.cpp
UTF-8
1,635
3.15625
3
[]
no_license
#include <iostream> #include <vector> #include <set> using namespace std; bool is_DAG(int node_index, const vector<set<int>> &graph, vector<bool> used){ used[node_index] = true; for (auto i : graph[node_index]){ if (used[i]) return false; bool check = is_DAG(i, graph, used); ...
true
7a8bdfa61be36d8864822a2a5f312d79827d3479
C++
drakesargent/Cpp-samples
/Programming II/CISS242_ADE_7.1/CISS242_ADE_7.1/mainProgram.cpp
UTF-8
1,281
3.71875
4
[]
no_license
#include <iostream> #include <iomanip> #include "Payroll.h" using namespace std; //using a constant for the number of employee payroll objects const int numEmps = 7; int main() { //declare payroll array with constant Payroll employees[numEmps]; //loop through the employee array for (int i = 0; i < numEmps; i++)...
true
69207de2a46c672f524c90107ef97feb1539aaf8
C++
pieisland/BaekJoon
/cpp/dp/9252. LCS2*(210104).cpp
UTF-8
1,746
3.21875
3
[]
no_license
#include<cstdio> #include<stdio.h> #include<iostream> #include<vector> #include<algorithm> #include<string> #include<cstring> #include<queue> using namespace std; /* 이 문제는 책을 보고 풀었다. 인덱스가 너무 헷갈리는 부부인 것 같다. 이전 값을 비교하기 위해 -1을 쓰기 때문에 lcs는 1부터 시작하지만 string 값은 0부터 시작하니까 -1 뺴주면서 하는 식. lcs 마지막 값이 lcs의 길이가 되고 출력을 하기 위해서는 lcs...
true
5fb3232fb4f5897653eeca601ee4605c6be6dd11
C++
LiineKasak/AlgoLab2020
/09-advanced-flows/potw-fleetrace.cpp
UTF-8
3,627
3.03125
3
[]
no_license
/* Finding the maximum sum of spactacle coefficients on a pair selection, given coefficents for each pair. The tricky part is that we do not necessarily have to have maximum matching, just maximize the coefficents. Implementation: max flow min cost. Initial solution was with binary search on the number on pairs (max ...
true
5b9445ed7c55a7b7bc8a3ce0743406a3350defeb
C++
rv404674/CPcodes
/spoj/bfs/primepath.cpp
UTF-8
1,520
3
3
[]
no_license
///important question to do on bfs //http://spoj-solutions.blogspot.in/2014/08/ppath-prime-path.html #include<iostream> #include<queue> #include<string.h> using namespace std; bool prime[10009]; //true indicates not prime void segsieve(){ memset(prime,false,sizeof(prime)); int i; for(i=2;i*i<=10009;i++) ...
true
96af97cbc80777d56a5d7ae9deea31dcb0769358
C++
mojoe12/UVa
/haybales.cpp
UTF-8
1,872
3.015625
3
[]
no_license
/*#include <iostream> #include <fstream> #include <algorithm> #include <vector> #include <cmath> #include <map> /* ID: josephh2 PROG: haybales LANG: C++11 using namespace std; int main(int argc, char *argv[]) { ifstream fin ("haybales.in"); ofstream fout ("haybales.out"); int n, q; fin >> n >> q; vector<int> hay...
true
ec52bebc4d8afc8d441a20ab99b7ecad7ae1623c
C++
hongquan/MVerbiste
/gui/conjugation.h
UTF-8
5,048
2.59375
3
[]
no_license
/* $Id: conjugation.h,v 1.12 2011/01/08 19:07:36 sarrazip Exp $ conjugation.h - Generic conjugation interface verbiste - French conjugation system Copyright (C) 2003-2006 Pierre Sarrazin <http://sarrazip.com/> This program is free software; you can redistribute it and/or modify it under the terms...
true
db9e7cda20916bef51a555409a79100ba176d9cc
C++
agul/contest-tasks
/TCO20_1B_medium.cpp
UTF-8
1,228
2.875
3
[]
no_license
#include "base/header.hpp" class EllysWhatDidYouGet { public: int getCount(int N) { sums = std::vector<int>(300000, 0); for (int i = 0; i < sums.size(); ++i) { int cur = i; int sum = 0; while (cur > 0) { sum += cur % 10; cur /= 10; } sums[i] = sum; } int ans = 0; for (int x = 1; x <=...
true
68dd5252bcc4b893522c71e268b405538a521a97
C++
xopoww/raytrace
/src/body.cpp
UTF-8
864
3
3
[]
no_license
#include "body.hpp" #include <cmath> Sphere::Sphere(const coord_t _radius, const Vector3 &_center): radius(_radius), center(_center) {} std::pair<Ray, Ray> Sphere::intersect(const Ray &ray) const { coord_t a = std::pow(ray.direction.length(), 2), b = 2 * (ray.origin - this->center).dot(ray.di...
true
5e77924f063b1b979a6e105576f0fc134edcabcc
C++
janadr/FYS3150
/prosjekt3/kode/extractData.cpp
UTF-8
585
2.625
3
[]
no_license
#include "extractData.hpp" // denne funksjonen henter ut initielle verdier fra body051018.dat fra NASA Planet extract(string filename, int i){ ifstream inf(filename); for (int j=0; j<i; ++j){ string strInput; getline(inf, strInput); } string name, mass, x, y, z, vx, vy, vz; inf >> name; inf >> mass; ...
true
3878939428a13feec7bdc847d0f5b66dea863d1e
C++
nwni/ioform
/main.cpp
UTF-8
4,586
3.015625
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <cmath> using namespace std; class cFormulas { public: // float Sumatoria(float l, float m, float s) // { // float lam = l; // float mi = m; // float ser = s; // // float sum = 0, PO=0; // // for(int n = 0; n <= ser-1; n++...
true
badf39998ff76cc42f7e4430a494e5ff32b4c1ed
C++
KimSeungJu/ClassDesign
/Chapter12_15/Chapter12_15/Person.cpp
UHC
297
3.453125
3
[]
no_license
#include "Person.h" Person::Person() { name = ""; age = 0; gender = true; } Person::Person(string n, int a, bool g) { name = n; age = a; gender = g; } void Person::Print() { cout << "̸ : " << name <<endl; cout << " : " << age << endl; cout << " : " << gender << endl; }
true
46e8a36913ad4840a1005eedb7c6934611307f40
C++
LC-CPU/WordCount
/WordCount.cpp
UTF-8
1,016
2.78125
3
[]
no_license
#define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_NUM 1024 void fun1() { FILE* fp; int total = 0; if ((fp = fopen("test.txt", "r")) == NULL) { perror("the file fail to read"); getchar(); exit(1); } while (getc(fp)!=EOF) { total++; } printf("字符...
true
e89e784f252b64473ed965e9ad916240f18328ea
C++
Royz2123/Navigation-Drone
/project/pid.cpp
UTF-8
377
2.71875
3
[]
no_license
#include "pid.hpp" float Pid::calc(){ return p*kp/500.0+i*ki/10000.0+d*kd/10000.0; } void Pid::update(float deltaTime,float delta){ //std::cout << "Delta =" << delta<< " | DeltaTime =" << deltaTime << std::endl; p = delta; i += deltaTime * (last+delta)/2; d = (p-last)/deltaTime; int maxI = 1000; if (i > maxI)...
true
fcfe731b7b3fd4f7d5480218831101ae374e0a07
C++
woodw221/CS320_Assignment2
/Tokenizer.hpp
UTF-8
233
2.546875
3
[]
no_license
#include <string> #include <vector> #include <iostream> class Tokenizer { private: std::vector<std::string> tokenized; int isTokInt(char *tok); int isQuit(char *stop); public: std::vector<std::string>* GetTokens(); };
true
5e6a9413b947019695adb41c8cd1044e6f40886d
C++
DenitsaS/UP-2016-2017
/homework1task1/homeworktask1.cpp
UTF-8
590
3.46875
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main() { int a, b, c, d, e; cout << "Enter five real numbers:\n"; cin >> a >> b >> c >> d >> e; cout << "The biggest number is "; if ((a >= b) && (a >= c) && (a >= d) && (a >= e) ) cout << a; else if ( b >= a && b >= c && b...
true
f7b3d40376bac9291cada61f6496300c6de28f0c
C++
liuli4016/pfSkel
/Normalize/normalize.cpp
UTF-8
2,968
2.875
3
[]
no_license
#include "common.h" bool NormalizeVolume( unsigned char **vol, int *L, int *M, int *N, // original volume and dimension int sphereDiameter = 100, // sphere enclosing the object after normalization int boundingBoxDistance = 1 // distance from sphere to the bounding box ) { int newL, newM, newN; int newIdx, o...
true
403526b8818890ead874644fe15f0c1808f2f6b7
C++
ivankreso/random-forest
/random_forest/random_tree.h
UTF-8
3,088
2.765625
3
[]
no_license
#ifndef RANDOM_TREE_H_ #define RANDOM_TREE_H_ #include <vector> #include <memory> #include <random> #include "params.h" #include "split.h" #include "objective_function.h" #include "forest_helper.h" namespace forest { struct Node { Node(const DataBase& data, const std::vector<size_t>& sample_indices) { samples...
true
a724dc0d9ef6370469543be594eb04d0c11f54ca
C++
atifdelibasic/Algoritmi_i_strukture_podataka
/SelectionSort.cpp
UTF-8
539
3.046875
3
[]
no_license
#include <iostream> using namespace std; void SelectionSort(int niz[], int n) { for (int i = 0; i < n-1; i++) { int minI = i; for (int j = i+1; j < n; j++) { if (niz[j] < niz[minI]) minI = j; } if (minI != i) { swap(niz[minI], niz[i]); } } } void Ispis(int niz[], int n) { for (int i = 0; i...
true
d3624662f833cdf87c7d85768fa31acd805ac3e9
C++
uesp/tes4lib
/common/obfile.h
UTF-8
6,002
2.96875
3
[ "MIT" ]
permissive
/*=========================================================================== * * File: ObFile.H * Author: Dave Humphrey (uesp@sympatico.ca) * Created On: April 5, 2006 * * Contains the definition for the CObFile class, a very simple class * encapsulating file access. * *============================...
true
e6d6e87c6a71cc8ca91e3d250957f14f4228882a
C++
ShepherdZFJ/PAT_AdvancedLevel
/PAT/PATA1068.cpp
UTF-8
1,118
2.6875
3
[]
no_license
/* * @Author: MeiYing * @Date: 2019-08-28 20:18:16 * @Last Modified by: MeiYing * @Last Modified time: 2019-08-28 21:16:52 */ #include<iostream> #include<algorithm> #include<vector> using namespace std; int n,m; vector<int>v,ans,value; bool flag; void DFS(int index,int sum) { if(sum==m && ans.size()==0) ...
true
a88580024f824b5e76fdc139626593b9bba83142
C++
jaguar-paw33/CODE_AAI
/6.Data Structures/2.Stack/4.check_redundant_brackets.cpp
UTF-8
1,982
4.15625
4
[]
no_license
/* For a given expression in the form of a string, find if there exist any redundant brackets or not. It is given that the expression contains only rounded brackets or parenthesis and the input expression will always be balanced. A pair of the bracket is said to be redundant when a sub-expression is surrounded by unn...
true
56a8af97d7a7ab645da15e581f295b18b3c47757
C++
Diegores14/CompetitiveProgramming
/ICPCArchive/4219 - Bora Bora/solution.cpp
UTF-8
2,855
2.625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; vector< pair<int, char> > deck(300); pair<int, char> topmost; vector<int> cards; int var = 1, k = 0, turn = 0; void rules(map< pair<int, char>, int > &hand) { if(topmost.first == 12) { var *= -1; return; } if(topmost.first == 7) { hand[...
true
510bce57e563bca3179cdadc1b430f86a4a8b3d7
C++
gik0geck0/WSNInterface
/echo_mote/hello_timer.ino
UTF-8
330
2.9375
3
[ "MIT" ]
permissive
void setup() { Serial.begin(57600); Serial.setTimeout(5); } char inbuf[1024]; void loop() { // Wait for an incoming value, then send it back. Expected that everything ends in \r int readin = Serial.readBytesUntil('\r', inbuf, 1024); if (readin > 0) { Serial.write((uint8_t*) inbuf, readin); Serial.println(...
true
a5537463f566f55b6e70a1bbe0515819043626c8
C++
shenfei/real_root_isolation
/var_orders/var_orders.cpp
UTF-8
360
2.90625
3
[]
no_license
#include<iostream> #include<string> using namespace std; int main() { string line; do{ getline(cin,line); }while (line.find("The order") == string::npos); while (getline(cin,line)) { if (line.find('=') != string::npos) break; cout << line.substr...
true
20865ca248bfdf21e1b4d1ee521ae4000af59c72
C++
stevencoding/jobduoj
/JD1533(AC).cpp
UTF-8
601
3.03125
3
[]
no_license
#include <algorithm> #include <cstdio> #include <vector> using namespace std; int LIS(vector<int> &a) { int n = a.size(); if (n < 2) { return n; } vector<int> s; int i; int j; s.push_back(a[0]); for (i = 1; i < n; ++i) { if (a[i] > s.back()) { s.push_back(a[i]); continue; } j = lower_bound(s.b...
true
61e4a1c6208162c4f29b1ee0d0f9a8374f0ac88b
C++
soltree12/EffectiveCPPStudy
/35_AlternativesToVirtual/GameCharacter_TR1Func.h
UHC
2,582
3.65625
4
[]
no_license
/* tr1::function ȯ, Ű ȣȯ ɼ ̴ (ñ״ó ȣȯǴ Լȣ⼺ ü) ex) ȯ int ƴ int ٲ ִ Ÿ Լ  ȣȯǵ . */ #pragma once #include <functional> class GameCharacter; // int defaultHealthCalc(const GameCharacter& gc); short calcHealth(const GameCharacter& gc); // üġ ԼԴϴ. ȯ Ÿ int ƴ κп ָ! /* üġ Լ ü Ŭ */ struct HealthCalculator { int op...
true
f51c86f78c7eea190b39b97300d9c7e54caf6d96
C++
davison0487/Checker-Bot
/Game.hpp
UTF-8
1,277
2.578125
3
[]
no_license
// // Game.hpp // Checkers // // Created by rick gessner on 2/22/21. // Copyright © 2021 rick gessner. All rights reserved. // #ifndef Game_hpp #define Game_hpp #include "Player.hpp" #include "Piece.hpp" #include "stdio.h" #include <iostream> namespace ECE141 { enum class Reasons {tbd, forfeit, badmove, eli...
true
56a87d347a79d26403319e020915a1f93d0aa5f3
C++
lparolari/greenhouse
/test/delay/test.cpp
UTF-8
1,486
2.84375
3
[]
no_license
#include <unity.h> #include "delay.hpp" void delay_is_not_fired_after_creation_test() { greenhouse::delay::Delay<0> d1; greenhouse::delay::Delay<3000> d2; TEST_ASSERT_FALSE(d1.is_fired()) TEST_ASSERT_FALSE(d2.is_fired()) } void delay_is_fired_if_forwarded_by_at_least_delayamount_test() { greenhou...
true
f49c178f1709aa38f9f3661ce48b359f7c2d46ea
C++
crypps1412/KTLT-project
/control.ino
UTF-8
5,310
2.546875
3
[]
no_license
#include <ESP8266WiFi.h> #include <Servo.h> Servo sv1,sv2,sv3,sv4; #define SV1 2 #define SV2 0 #define SV3 4 #define SV4 5 #define PWMA 14 #define DIRA 12 #define PWMB 13 #define DIRB 15 const char* ssid = "iPhon"; const char* password = "12345678"; int Speed; WiFiServer server(80); voi...
true
59c1c98de172ad557977c927b661e486e0f03151
C++
jems89/Ejercicio-de-Clases-POO-Lara-Cola
/class1.h
ISO-8859-1
1,753
2.90625
3
[]
no_license
#ifndef CLASS1_H_INCLUDED #define CLASS1_H_INCLUDED /*Llenar (float): Debe permitir aumentar la ocupacin del recipiente pero nunca por encima de su capacidad. Vaciar(float): Debe permitir disminuir la ocupacin del recipiente pero nunca por debajo de 0. Vaciar(): Debe vaciar por completo la ocupacin del recipien...
true
32d33296ff1def685dc65309f322560321e6057d
C++
ToeTag/adventure-world
/gamemap.h
UTF-8
1,107
2.703125
3
[]
no_license
// // GameMap.h // AdventureWorld // // Created by Niclas Kempe on 2012-08-13. // Copyright 2012 __MyCompanyName__. All rights reserved. // #ifndef MAP_H #define MAP_H #include <iostream> #include <string> #include "Area.h" using namespace std; namespace AdventureWorld { class GameMap { pu...
true
1e70ef2750778fcf3caabeb28340b6fc91c94d32
C++
code-hunger/Spreadsheets-Lower
/Formula.h
UTF-8
1,357
3.21875
3
[]
no_license
#pragma once #include <memory> #include <optional> #include <string> namespace formulas { struct Context { virtual float at(size_t x, size_t y) const = 0; virtual ~Context(){}; }; struct Formula { virtual float compute(Context const&) const = 0; virtual ~Formula(){}; }; using FormulaPtr = std::unique_ptr<Formul...
true
93a62b67bd91810f5c5c73e203dfe2e12032c6ae
C++
tuxmuzon/hotel
/models/bookingviewmodel.cpp
UTF-8
2,542
2.515625
3
[]
no_license
#include "bookingviewmodel.h" BookingViewModel::BookingViewModel(QObject *parent) : QSqlQueryModel (parent) { headers << "bookingId" << "appartmentsId" << "personsId" << "Номер" << "Дата заезда" << "Дата выезда" << "Статус" << "Цена" << "Всего" << "Оплачено" << "Комментарий" << "Клиент"; resetFilter(); } void...
true
b1e573bb6afc8cc80a2e676b506f2c24e26ed415
C++
KrenZfer/EngineProjek2D
/graphiccoba/Graphic/ErrorHandling.cpp
UTF-8
478
2.53125
3
[]
no_license
#include "ErrorHandling.h" void EngineProject2D::ErrorHandling::fatalError(string errorString) { cout << errorString << endl; cout << "Hit Enter To Quit" << endl; int temp; cin >> temp; SDL_Quit(); exit(1); } void EngineProject2D::ErrorHandling::fatalError(string errorString, int delay) { cout << errorString <...
true
70872f2ebefd384104421e6ddddffbc1f44c371c
C++
IliyanKafedzhiev/FacultyOfMathematicAndInformatic
/C++SDP/02.Stack/Stack/LinkedLists/Source.cpp
UTF-8
607
3.15625
3
[]
no_license
#include <stack> #include <queue> #include <iostream> #include "LinkedList.h" #include "Stack.h" using namespace std; template class LinkedList<int>;// check for compilation errors template class Stack<int>;// check for compilation errors void testStack() { Stack<int> h; for (int i = 0; i < 10; i++) { h.Push(...
true
2198f71061659b4607eb37455b70fa4e19c68a8e
C++
nikhilmohan33/Lab220
/Lab 1 TV Jammer F17/tutorial/tutorial.ino
UTF-8
4,778
3.390625
3
[]
no_license
/* Basic Arduino tutorial 18-220 S13 */ // Declare identifiers for pins for neater/readable code. // These variables will not change. const int LEDA = 8; // digital pin LEDA is connected to const int LEDB = 9; // digital pin LEDB is connected to const int buttonA = 10; // digital pin buttonA is connected...
true
dafdb56d2de95f72e415f6e8d9e53efc9782e7e3
C++
FabriceScoupe/ProjectEuler
/115/Problem115.cc
UTF-8
2,315
3.515625
4
[]
no_license
#include <iostream> #include <cstdlib> #include <map> using namespace std; /*** NOTE: This is a more difficult version of problem 114. A row measuring n units in length has red blocks with a minimum length of m units placed on it, such that any two red blocks (which are allowed to be different lengths) are separated...
true
69bc26721057c1fe2135501984b81fd4e9fe7436
C++
ned14/outcome
/doc/src/snippets/error_code_enums2.cpp
UTF-8
3,310
2.734375
3
[ "BSL-1.0", "Apache-2.0" ]
permissive
/* Example of Outcome used with error code enums (C) 2017-2019 Niall Douglas <http://www.nedproductions.biz/> (3 commits) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License in the accompanying file Licen...
true
6a6ada49e5b7237776a7a1b1d1cbc60367d21995
C++
BrandeisMakerLab/Robotics_ZumoAutomation
/examples/DriveShield_Simple_Example/DriveShield_Simple_Example.ino
UTF-8
750
3.0625
3
[]
no_license
/*Written by Jacob Smith for Brandeis Robotics Club contains an example program to use our Drive class. The program is documented for a general audience. April 2 2018 */ //includes the header file of the library #include <DriveShield.h> //creates a global reference to a Drive object DriveShield robot; //occu...
true
013c172aca09244886f95a12d79f7368d4dc0ae1
C++
harshraj22/problem_solving
/solution/leetcode/5.cpp
UTF-8
1,186
3.015625
3
[]
no_license
// https://leetcode.com/problems/longest-palindromic-substring/ class Solution { // pair of (index, length) pair<int, int> ans; string s; vector<vector<int>> dp; bool recur(int left, int right) { if (left > right) return false; else if (left == right) { if (...
true
c10a8dc4cdf5db01cc3477335a444e1f8201a6df
C++
Nazmul96/C-Programming
/week1-d3/pbl17.cpp
UTF-8
248
2.828125
3
[]
no_license
/* time duration: 20min 17. Given N, find X and A where N = X*2^A. */ #include<stdio.h> int main() { int n,x,A=0; scanf("%d",&n); while(n%2==0){ n=n/2; A++; } printf("%d %d\n",n,A); return 0; }
true
90901b9e5aececc0d2bb2d81805b390bc59c2257
C++
jhnaldo/problem-solving
/acmicpc/cpp/11383.cc
UTF-8
556
2.90625
3
[]
no_license
#include <stdio.h> bool check(char str[], char str2[], int size){ int i; for (i = 0; i < size; i++){ if (str[i] != str2[i*2] || str[i] != str2[i*2+1]) return false; } return true; } int main(){ int n, m, i; char str[10][11]; scanf("%d %d", &n, &m); for (i = 0; i < ...
true
f78c2a0291ef40b75deff5b7fd5cffcbed468a84
C++
amiravni/Baby-Busy-Board
/RightCode/classes.h
UTF-8
9,293
2.78125
3
[ "MIT" ]
permissive
#include "bitmaps.h" #include "bitmaps_8bits.h" //////////////////////////////////////////////// VoltageDivider //////////////////////////////////////////////// // definition of AnalogRead class class VoltageDivider { public: VoltageDivider(); VoltageDivider(int _pin,float _const_R) { analog_pin...
true
c96b19faf62d4b99fb2b9410feeed847c97dcedd
C++
EucWang/cpp_primer_plus_demo
/cppprimerplus/p12/test7/test1.cpp
UTF-8
1,322
3.6875
4
[]
no_license
#include <iostream> #include "string1.h" using namespace std; void test(); int main42(){ test(); // String a("wahaha"); // String b("duolemei"); // String c = a+b; // cout << c << endl; // String d = c.up(); // cout << d << endl; // cout << d.low() << endl; // cout << "count of...
true
e4d38582c26c973b1ac14612a0d34130ca136073
C++
ArtemisKS/Piscine_CPP
/rush_00/Star.cpp
UTF-8
365
2.921875
3
[]
no_license
#include "Star.hpp" #include <ncurses.h> Star::Star( void ) : AObject() {_val = '.';} Star::~Star( void ) {} Star::Star(Star const & src) : AObject(src.getX(), src.getY()){} Star::Star(int x, int y) : AObject(x, y) {_val = '.';} bool Star::move( int timeFrame ) { if (_x >= 11) { if (timeFrame % 3 == 0) _x-...
true
4da9ac860520410952a7bc7c24e0d80c2fa189e7
C++
theochp/c-antlr-compiler
/compiler/ast/unexpression.h
UTF-8
337
2.71875
3
[]
no_license
#pragma once #include "expression.h" #include "unoperator.h" class UnExpression : public Expression { Expression *expr; UnOperator op; public: UnExpression(UnOperator op, Expression *expr); ~UnExpression(); const Expression *getExpr() const; const UnOperator& getOp() const; virtual std::s...
true
14dc5192f2bae06f7ff5c28d6d746e9b207ea6a9
C++
CPcoding0930/ACMPractice-C-
/LargestSubsequence/Source.cpp
UTF-8
830
3.25
3
[]
no_license
#include <queue> #include <iostream> #include <string> using namespace std; char largest(string s) { char c = 'a'; for (int i = 0; i < s.length(); i++) { if (s.at(i) > c) { c = s.at(i); } } return c; } string eraseStr(string s, char c) { for (int i = 0; i < s.length(); i++) { if (c == s...
true
c5ae737a7d231ae3841161bdd33815e9b7c4a6e3
C++
michelebucelli/apc_project
/timer.h
UTF-8
835
2.953125
3
[]
no_license
#ifndef _TIMER_H #define _TIMER_H #include <chrono> #include <vector> #include <string> #include <sstream> #include <iomanip> class timer { public: using clock = std::chrono::high_resolution_clock; using timePoint = std::chrono::time_point<clock>; private: timePoint startTime; timePoint stopTime; doub...
true
8158bcfa1489479e39ae96f1c2d00ca7d7302f6f
C++
shuvokr/LeetCode_Solution
/Algorithms/projection-area-of-3d-shapes.cpp
UTF-8
772
2.703125
3
[]
no_license
// https://leetcode.com/contest/weekly-contest-96/problems/projection-area-of-3d-shapes/ class Solution { public: int projectionArea(vector<vector<int>>& grid) { int r = grid.size(), ar[55][55], ret = 0; memset(ar, 0, sizeof ar); for(int i = 0; i < r; i++) for(int j = 0; j < r; ...
true
6427a5d1eb9957b6072a5cd4ae7eceb3e4ca4d51
C++
cjkjackee/CPE
/pass_year/22171.cpp
GB18030
2,726
2.5625
3
[]
no_license
#include <cstdio> #include <queue> #include <cstring> #include <iostream> using namespace std; const int maxn = 50; int L, R, C; int Sz, Sx, Sy; int Ez, Ex, Ey; char maze[maxn][maxn][maxn]; int dist[maxn][maxn][maxn]; int vis[maxn][maxn][maxn]; queue<int> q; int bfs() { while(!q.empty()) q.pop(); ...
true
764d7f580d39347b15251917e8119a88de60f72b
C++
dotnet/runtime
/src/coreclr/pal/tests/palsuite/filemapping_memmgt/MapViewOfFile/test5/mapviewoffile.cpp
UTF-8
2,652
2.53125
3
[ "MIT" ]
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. /*============================================================= ** ** Source: MapViewOfFile.c ** ** Purpose: Negative test the MapViewOfFile API. ** Passing invalid values ...
true
703bff9629cee0bb07c323ab4ebe1ade43d01672
C++
yczheng-hit/gensim
/support/libgvnc/lib/Encoder.cpp
UTF-8
1,157
2.84375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* This file is Copyright University of Edinburgh 2018. For license details, see LICENSE. */ #include "libgvnc/Encoder.h" #include <stdexcept> using namespace libgvnc; Encoder::Encoder(const FB_PixelFormat& format, const RectangleShape& shape) : encoded_format_(format), shape_(shape) { } RawEncoder::RawEncoder(con...
true
032e67ceb876873e2a5fe803f74040def5a1e5ef
C++
kovinevmv/software_design_labs
/lab_1/src/containers_example.cpp
UTF-8
2,844
3.703125
4
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <vector> #include <list> #include <deque> #include <map> using std::cout; using std::endl; int main(int argc, char *argv[]) { std::initializer_list<int> init = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; cout << "Инициализация map значениями : {{1, 2}, {3, 4}, {5, 6}}" << ...
true
40601affe5fff264c8fdd73dce42b33a12049839
C++
TaynaraCruz/8-Puzzle-AI-Solver
/src/HillClimbing/HillClimbing.cpp
UTF-8
3,752
3.015625
3
[]
no_license
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <unordered_set> #include "HillClimbing.h" int get_min_Hill(std::map<int, int> Frontier){ std::pair<int, int> min = *std::min_element(Frontier.begin(), Frontier.end(), ComparatorHillClimbing()); return min.first; } i...
true
049d42babef4025bc4551ffb0ab5b292278f848d
C++
hanzohasashi33/DSA
/Segment Trees/update.cpp
UTF-8
1,051
3.046875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; const int N = 1000; int tree[2 * N]; void update(int arr[],int i,int x,int n) { arr[i] = x; i = (n + i - 2)/2; while(i > 0) { if(arr[tree[2*i + 1]] > arr[tree[2*i + 2]]) { tree[i] = tree[2*i + 2]; } else { tree[i] = tree[2*i +...
true
d71b0a2765369606f9bd7962dce6b7a0e758aa44
C++
KawOwio/GameEngine
/src/engine/Entity.h
UTF-8
3,966
3.140625
3
[]
no_license
#pragma once #ifndef _ENTITY_H_ #define _ENTITY_H_ #include <memory> #include <vector> namespace engine { class Component; class Core; /// ### Example of usage: /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.cpp /// std::shared_ptr<Entity> entityName = core->addEntity(); /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cl...
true
2618f911f3a5d507c3ce91b40b06ac89eb59fba3
C++
evyatarh/Cpp-projects
/Transportation network/Position.cpp
UTF-8
1,107
3.25
3
[]
no_license
#include "Position.h" /******************** c'tor method **************************/ Position::Position():x(0){} /******************** c'tor method **************************/ Position::Position(const int &i):x(i){} /******************** copy c'tor method **************************/ Position::Position(const Positi...
true
158ac0448104945e9e64e79e82d93fc17829f20d
C++
iTXCode/Review
/Linux/process/fork/nfork.cc
UTF-8
294
2.8125
3
[]
no_license
#include<iostream> #include<unistd.h> int main(){ pid_t pid; int i=0; for(i=0;i<5;i++){ pid=fork(); if(pid==0){ break; } } sleep(i); if(i<5){ printf("I'm child!,pid=%d,ppid=%d\n",getpid(),getppid()); }else{ printf("I'm father!\n"); } return 0; }
true
3261c15a9004b7ff7d953baa74048e265e0fd7b4
C++
rameshrajagopal/thrift-cluster
/common/request.h
UTF-8
484
2.609375
3
[]
no_license
#ifndef _REQUEST_H_INCLUDED_ #define _REQUEST_H_INCLUDED_ #include <vector> #include <request.h> using namespace std; class Request { public: Request(int rnum, const string & r, Response & res): num(rnum), req(r), response(res) {} void updateResponse(int slaveId, int errnum) { respons...
true
99efb77816922510e01a15782ae21b29871e829a
C++
marcosrodrigueza/DLRSHIP-miniproject
/Project/spacecraft.cpp
UTF-8
2,475
3.0625
3
[]
no_license
#include "spacecraft.h" SpaceCraft::SpaceCraft(int cm, float pri, int prop, string rn, string o, bool b) { crewMax = cm; price = pri; propulsion = prop; regNum = rn; owner = o; av_sale = b; } void SpaceCraft::show() { // } void SpaceCraft::transaction(bool &create_sale) { string new_owner = "non-sense"...
true
89ddb133b9a921646fe082e12260a413fdad0f1e
C++
lamductan/DCTC
/visualization/graph.cpp
UTF-8
3,274
2.859375
3
[]
no_license
#include <iostream> #include <fstream> #include "graph.h" #include "draw_utils.h" /* Node */ Node::Node(long double x, long double y, long double r, long double angle, int node_type) : x_(x), y_(y), r_(r), angle_(angle), node_type_(node_type) {} void Node::draw(CImg<unsigned char>& img) { x = x_*SCALE; y = y...
true
fc6212ae2163a549a72e8597e7ce592789d8fa1c
C++
EggyJames/Leetcode
/75.cpp
UTF-8
619
3
3
[]
no_license
class Solution { public: void sortColors(vector<int>& nums) { int l = 0,r = nums.size()-1; if(r == 0 || r < 0) return; for(int i = 0;i<=r;){ if(nums[i] == 0) { int temp = nums[l]; nums[l] = 0; nums[i] = temp;...
true
a6d9b8ae4132497cf0fed3f5a476c37ec53c2337
C++
Essoz/CS225_ZJUI
/Midterm1 templates/kaoshi/ex6/ex6.h
UTF-8
1,032
3.15625
3
[]
no_license
#ifndef ex6_h #define ex6_h template<class T> class pair{ public: pair(){ pair_t = 0; pair_n = 0; } pair(T t, int n):pair_t(t), pair_n(n){} T get_t(){ return pair_t; } int get_n(){ return pair_n; } void...
true
e4eb2d8636430e954a38f95d4ffffd6960569942
C++
S-John-S/CSN-212_Tutorial-3
/interval_tree.h
UTF-8
4,269
2.796875
3
[ "MIT" ]
permissive
#ifndef E_INTERVAL_TREE #define E_INTERVAL_TREE #include "misc.h" #include "TemplateStack.H" #include <math.h> #include <limits.h> #include <iostream.h> // The interval_tree.h and interval_tree.cc files contain code for // interval trees implemented using red-black-trees as described in // the book _Introductio...
true
96a687b4dad834175259b7de0bba6e1e9a0d7c0e
C++
tzn893/tony-render-pipeline
/Common/Drawable.h
UTF-8
412
2.6875
3
[]
no_license
#pragma once #include <vector> #include "geometry.h" class Drawable { public: virtual std::vector<int> face(int nface) = 0; virtual int nfaces() = 0; virtual Vec3f vert(int nvert) = 0; virtual int nverts() = 0; virtual ~Drawable() {} virtual Vec2f uv(int nvert) = 0; virtual Vec3f normal(int nvert) { return Ve...
true
36fbe3a5722e2eec0fd51c9687b2786bc9109ae9
C++
methusael13/phy-ray
/phyray_lib/src/core/integrator/sampler.cpp
UTF-8
4,815
2.53125
3
[ "Apache-2.0", "BSD-2-Clause" ]
permissive
#include <core/integrator/sampler.h> namespace phyr { // Sampler definitions #define RESET_OFFSETS (array1DOffset = array2DOffset = 0) Sampler::~Sampler() {} void Sampler::startPixel(const Point2i& pt) { currentPixel = pt; currentPixelSampleIndex = 0; // Reset array offsets for next pixel sample RES...
true
9853303323c22c6cd7ff9ec592cd759391350da1
C++
sergone/C-lab-5
/src/task3.cpp
UTF-8
887
3.171875
3
[]
no_license
#include <time.h> #include <stdlib.h> #include <string.h> #define COUNT_WORDS_MAX 20 #define LENGTH_WORDS_MAX 30 char *mixChars(char *in, char *out) { int len = 0; // length of word while (*(in + len) != ' ' && *(in + len) != '\n' && *(in + len) != '\0') { *(out + len) = *(in + len); len++; } char temp = 0; ...
true
ee297a881a7ca93a3dd2fc35de0a826198fea156
C++
mariogrieco/Estructura-de-Datos
/Helpers/Templates.h
UTF-8
15,400
2.671875
3
[]
no_license
#ifndef _TEMPLATES_H_ #define _TEMPLATES_H_ using namespace std; /* Nombres Descripción memcpy copia n bytes entre dos áreas de memoria que no deben solaparse memmove copia n bytes entre dos áreas de memoria; al contrario que memcpy las áreas pueden solaparse memchr busca un valor a partir de una dirección de m...
true
2eec67ef7acdd2e7d37e853a9cd6fa67ec1831e1
C++
panda959595/boj_algorithm
/boj_algorithm/2166.cpp
UTF-8
497
3.15625
3
[]
no_license
#include <iostream> using namespace std; struct point { double x, y; }; double outer(point p1, point p2, point p3) { return (p2.x - p1.x) * (p3.y - p1.y) - (p3.x - p1.x) * (p2.y - p1.y); } int main() { int n; cin >> n; point arr[10005]; for (int i = 0; i < n; i++) { cin >> arr[i].x >> arr[i].y; } double ans =...
true
8342452b6e8df869dcade4e316154c87310322d2
C++
softchicken/POLSKI-SPOJ
/1909 SUMY WIELOKROTNE.cpp
UTF-8
471
2.71875
3
[]
no_license
/* POLISH SPOJ http://pl.spoj.com/problems/KC008/ https://github.com/softchicken/ */ #include <iostream> using namespace std; int main() { long long int numberSeries,buffer=0,bufferAll=0; while(cin>>numberSeries) { if(numberSeries!=0) buffer = buffer + numberSeries; else { ...
true
bf722a3e96c6c5484efbebb5d8d7e9988f14f3d4
C++
G4m3r-2003/arduino
/lib_ard/Pin.h
UTF-8
522
2.875
3
[]
no_license
#ifndef LIB_ARD_PIN #define LIB_ARD_PIN #include "Arduino.h" #include "PinType.h" namespace lib_ard { class Pin { private: unsigned short _number; protected: /*funzione di appoggio usata da input e output pins per chiamare le read di basso livello*/ unsigned short int read (PinT...
true
e33ab97d7bd419aed898b99ab05e079aa91d37dd
C++
fmidev/rack
/src/drain/util/StringMapper.h
UTF-8
9,667
2.5625
3
[ "MIT" ]
permissive
/* MIT License Copyright (c) 2017 FMI Open Development / Markus Peura, first.last@fmi.fi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rig...
true
d216131b2f110de4f15098272ea2c73f05f9d1a1
C++
tunamako/Chat-Server-and-Client
/ClientList.h
UTF-8
649
2.5625
3
[]
no_license
#pragma once #include <string> #include <map> #include <fstream> #include <vector> #include <string.h> using namespace std; class ClientList { public: void addClient(int fd); void removeClient(int fd); int clientCount(); int readFrom(int fd); ClientList(int maxClients); ~ClientList(void); private: const int BUF...
true
3aea9bb22b7cfb8ac70aa616d1a2a9494f97fc28
C++
bociepka/jimp2
/lab5/friendclass/friendclass.cpp
UTF-8
504
2.578125
3
[]
no_license
// // Created by Bartek on 27.03.2018. // #include "friendclass.h" Rodzic::Rodzic(string name,string surname,int age,Dziecko * child){ imie = name; nazwisko = surname; wiek = age; &dziecko = child; } Rodzic::~Rodzic(){}; Dziecko::Dziecko (string name, string surname, int age, string school){ imi...
true
5dd2ba56b3546aa839c74ef6c4e2e996698e66b8
C++
floreaadrian/C-
/OOP/TestLab11/TestLab11/Painting.h
UTF-8
538
2.765625
3
[]
no_license
// // Painting.hpp // TestLab11 // // Created by Adrian-Paul Florea on 5/17/18. // Copyright © 2018 Adrian-Paul Florea. All rights reserved. // #ifndef Painting_h #define Painting_h #include <stdio.h> #include <string> class Painting{ private: std::string title; std::string artist; int year; public: ...
true
88952949e0d23e173d5c6272dfc9b6fe04084d1d
C++
Mldn/B-Tree
/Resursi/main.cpp
UTF-8
2,176
2.84375
3
[]
no_license
#include "Niz_Filmova.h" #include "Node.h" #include "Redak_Indeks.h" #include "Header.h" using namespace std; int main() { int q = 1; Niz_Filmova nf; Redak_Indeks ri; int r = 0; cout << " Unesite nacin na koji zelite da unesete bazu(0 za standardni ulaz, ostalo za datoteku)\n"; cin >> q; if (q) { nf("tmdb...
true
07fa72c00b789ebf187f0936d36fdd0a0eaa87ed
C++
isalogi/Sistemas-Digitales-Avanzados
/Proyecto/CommunicationProtocol/lib/Protocol/protocol.h
UTF-8
601
2.859375
3
[]
no_license
#ifndef protocol_h //Evita importar dos veces la libreria #define protocol_h #include <Arduino.h> //Archivo primera en minuscula y la clase en mayuscula class Protocol { public: Protocol(); //Lo primero que se ejecuta cuando creo una clase void sendData(uint8_t inpData, uint8_t pin); void read(Stream *stream, co...
true
83861811b94a39dd212644b480280d794cbabb33
C++
StormZillaa/1stNeuralNetwork
/ConsoleApplication4/ConsoleApplication4/Neuron.cpp
UTF-8
4,065
2.890625
3
[]
no_license
#include <math.h> #include <stdlib.h> #include <time.h> #include <iostream> #include "Text.cpp" class neuron { public: int input; int hidden; int output; double costInc = 0.001; //amount to increment cost by vector<vector<double>> weights; vector<vector<double>> bias; vector<vector<double>> activations; vector...
true
c7b28f0a162de4d0fa2a28e9777dc060db3cadb0
C++
sivokon/CPlusPlusEssentials
/Chapter2/2.4/lab_2_4_23(2).cpp
UTF-8
2,634
3.125
3
[]
no_license
#include <iostream> #include <bitset> using namespace std; int main(void) { unsigned short int val; bool ispalindrome = true; cout << "value = "; cin >> val; int counter = 15; unsigned short a = 1, b = 1; for (int i = 0; i < counter; i++) { a = a << i; b = b << counter; if (((val & a) &...
true
d0df21d7629f01f8850ed6c6dee874ffe9ca8456
C++
Kitsch1/BOJ
/2422_better.cpp
UTF-8
586
2.59375
3
[]
no_license
#include <cstdio> using namespace std; bool not_good[201][201]; int main(){ int n,m; int res = 0; scanf("%d %d",&n,&m); for(int i=0;i<m;i++){ int n1,n2; scanf("%d %d",&n1,&n2); not_good[n1][n2] = not_good[n2][n1] = true; } for(int i=1;i<=n-2;i++){ for(int j=i+1;...
true
a9af1a3552d3b347575b67c5d89a4abb980d6d4f
C++
Reid-Ricky/LAB5
/UtPod.cpp
UTF-8
7,041
3.21875
3
[]
no_license
//UtPod.cpp // //UtPod program //Reid Lindemann & Ricky Guzman 10/18/2018 //EE 312 /* Student information for project: * * On my honor, Reid Lindemann and Ricky Guzman, this programming project is our own work * and I have not provided this code to any other student. * * Name: Reid Lindemann * email address: lin...
true
d623edc68233d699728d62aa5160b23ccbf9222d
C++
admitrievsky/ay-3-8912-d4
/arduino-sketch/ay_channel.h
UTF-8
821
2.578125
3
[]
no_license
#ifndef AY_CHANNEL_H #define AY_CHANNEL_H #include "defines.h" constexpr size_t FIXED_INTEGER_SIZE = 256; union FixedPoint { struct { uint8_t fraction; uint8_t integer; } parts; uint16_t raw = 0; }; class Channel { private: FixedPoint period; FixedPoint wave_position; uint8_t ...
true