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
eed0eafcf0d6591d78113aff4f29b2ee55edba4a
C++
xiaji/noip-csp
/reference.cpp
UTF-8
849
3.734375
4
[ "MIT" ]
permissive
#include <iostream> using namespace std; void times_ref(int& a, int& b) { a *= 2; b *= 2; } void times(int a, int b) { a *= 2; b *= 2; } void prevnext(int x, int& prev, int& next) { prev = x * 2; next = prev + 1; } int main() { int a = 2, b = 3; times(a, b); cout << "call times method without ampe...
true
fd4022ea2173832db22f3989704beba4ccc8eacf
C++
Laci101/prog1
/Drill19/main.cpp
UTF-8
1,825
3.765625
4
[]
no_license
#include "../std_lib_facilities.h" template <typename T> struct S { private: T val; public: S(T val){this->val=val;} T& get(); T& get() const; void set(const T&); void operator= (const T&); }; template <typename T> T& S<T> :: get() { return this->val; } template <typename T> T& S<T>...
true
16848b7bdbba7779e1e9b213abac9957ae1ed627
C++
Jason-zzzz/vscpp
/priority_queue容器适配器/priority_queue容器适配器/priority_queue容器适配器.cpp
GB18030
1,526
3.828125
4
[]
no_license
#include <functional> #include <queue> #include <string> #include <iostream> using namespace std; //priority_queue template<typename T> void list_pq(priority_queue<T> pq, size_t count = 5) { size_t n{ count }; while (!pq.empty()) { cout << pq.top() << " "; pq.pop(); if (--n) continue; cout << endl;//5ʱ n...
true
2fee5307fc9ccdbb0921a27ccb5ff8fa3384ca46
C++
rabzgg/Random-Competitive-Programming
/Ngoding Seru Oktober 2015 Divisi Pejuang/Kisah Katak Dalam Sumur.cpp
UTF-8
409
2.796875
3
[]
no_license
#include <iostream> using namespace std; int main(){ int max = 0, min = 1000000, hasil, x, y, i; cin >> x >> y; int arr[x]; for(i=0; i<x; i++){ cin >> arr[i]; if(arr[i] > max) max = arr[i]; } for(i=0; i<x; i++){ if(arr[i] < min && max + arr[i] >= y) ...
true
698e39cf247d8df53a35bd60bbdbe9afb0595145
C++
yashsingla/UCA
/Greedy Algorithms/huffman_code.cpp
UTF-8
3,692
3.09375
3
[]
no_license
#include<iostream> #include<string> #include<map> #include<vector> using namespace std; struct node { int key; char ch; struct node *left; struct node *right; int b; }; struct node *createNode(int k1,char c1,char p) { struct node *temp=new node; temp->key=k1; temp-...
true
214836f850b7cef1ca6c23912a57c9b031c7229a
C++
marshal20/Sockets
/Examples/DomainNameToIP/main.cpp
UTF-8
670
2.890625
3
[]
no_license
#include <Network/Network.hpp> #include <iostream> using namespace nt; // Not recommended. int main(int argc, char* argv[]) try { if (argc != 2) { std::cout << "- Usage " << argv[0] << " <domain name>" << std::endl; return 1; } char* domainName = argv[1]; std::vector<Address> addrs = Address::FromPresentatio...
true
1152838b3777b76f2d8613065bdf8cb54fe9c06e
C++
AkiraGiShinichi/qt-cpp-tutorial
/x20TcpServerClient_QML/Client/backend.cpp
UTF-8
1,955
2.65625
3
[]
no_license
#include "backend.h" #include <QDataStream> Backend::Backend(QObject *parent) : QObject(parent) { qDebug() << " * Backend::Backend"; client = new ClientStuff("localhost", 6547); connect(client, &ClientStuff::statusChanged, this, &Backend::setStatus); connect(client, &ClientStuff::hasReadSome, this, &...
true
d261bb608f9136d86aee52cd8eddf2dd2a496cc0
C++
FresBlueMan/EmployeeRecordSystem
/EmployeeRecordSystem/EmployeeRecordSystem.cpp
UTF-8
8,162
3.09375
3
[]
no_license
// EmployeeRecordSystem.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #define SIZE 50 typedef struct Employee{ int Eid; char Name[SIZE]; char Email[SIZE]; struct Employee *Next; } Employee; Employee *empHea...
true
f131180fab2cf1575b1b6af2d301596a32f17a98
C++
Nickolas1987/simple_promise
/tests/promise_tests/main.cpp
UTF-8
1,360
2.921875
3
[]
no_license
#include <promise.h> #include <async_call.h> #include <gtest/gtest.h> #include <thread> #include <iostream> #include <chrono> using namespace std::chrono_literals; class TestLog : public ::testing::Test { protected: void SetUp() { } void TearDown() { } }; TEST_F(TestLog, test1) { auto foo =...
true
4e2c30161e9bef7e93e6d994d9de63b6b70a476e
C++
OjusWiZard/CompetitiveProgramming
/CodeChef/CHFMOT18.cpp
UTF-8
438
2.515625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio( false ) ; cin.tie( NULL ) ; int t ; cin>>t ; while( t-- ) { int s, n ; cin>>s>>n ; if( s<=n ) { if( s%2==0 || s==1 ) cout<<1<<"\n" ; else cout<<2<<"\n" ; } else { int ans = s/n ; s = s%n ; if( s%2&...
true
77075ff1f67a6d5784817876c4102435d6e6bd9c
C++
mongobaba/learn_qt
/67_ExecuteCommand/mainwindow.cpp
UTF-8
1,404
2.578125
3
[ "MIT" ]
permissive
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); command = new QLineEdit(this); command->setText(tr("ipconfig")); command->setGeometry(QRect(20, 20, 400, 25)); execute = new QPush...
true
622de720f02ea244f04226d9f4bc5e4b966bc8ad
C++
JSYoo5B/TIL
/PS/BOJ/10845/10845_with_stl.cc
UTF-8
904
3.515625
4
[]
no_license
#include <iostream> #include <string> #include <queue> using namespace std; int main(void) { queue<int> my_queue; int cases; cin >> cases; for (int i = 0; i < cases; i++) { string operation; int temp; cin >> operation; if (operation.compare("push") == 0) { cin >> temp; my_queue.push(temp); } e...
true
61c46061e5e39f2ce57e56aac15bac39560d69ac
C++
bananaappletw/online-judge
/codility/min_perimeter_rectangle.cpp
UTF-8
300
3
3
[ "MIT" ]
permissive
// you can use includes, for example: // #include <algorithm> // you can write to stdout for debugging purposes, e.g. // cout << "this is a debug message" << endl; #include<cmath> int solution(int N) { for(int i=sqrt(N); i>=1; i--) { if(N%i==0) return 2*(N/i+i); } }
true
2057545d45ef009aa897845fe50685464fdc26a9
C++
shamrickus/ComputerVision
/src/Objects/Axis.h
UTF-8
1,674
2.84375
3
[]
no_license
#ifndef _AXIS_H_ #define _AXIS_H_ #include "Object.h" #include "../Buffer/DeviceBuffer.h" #include "../Shaders/ShaderProgram.h" #include <vector> #include "../Colors.h" class Axis : public Object { public: Axis(glm::vec3 pBase) : Object(pBase) { program_ = new ShaderProgram(); auto vs = new Shader(v_passthru, ...
true
6c8708b39264ebb2727bb2929a044bc9abbe9ca7
C++
AndyDentFree/oofile
/source/rep_char/oofrw.h
UTF-8
9,781
2.5625
3
[]
no_license
#ifndef H_OOFRW #define H_OOFRW // COPYRIGHT 1994 A.D. Software, All rights reserved /** \file oofrw.h Old simple character mode report-writer classes. */ /** \defgroup oofCharRW OOFILE Character-mode simple report writer. Simple reports that output just one table formatted as plain text with spaces and returns...
true
3b2058f82f9c6bd0e1fa2ce4ab0cf9779de3e13e
C++
DougHamil/WIT
/wit/src/WITApplication.h
UTF-8
2,402
3.109375
3
[]
no_license
#ifndef WIT_APPLICATION_H #define WIT_APPLICATION_H // - Qt #include <QtGui/QApplication> // - WIT #include "Controller/WITMainWindowController.h" #include "Controller/PathwayController.h" #include "Controller/SubjectDataController.h" #include "Model/Undo/UndoSystem.h" // - STL #include <vector> /** WITApplication i...
true
d5c35f0d7d433c07f33afda126e00a8c2e4ac17b
C++
varunkverma/cpp-practice-questions
/10-power-of-number/main.cpp
UTF-8
853
3.828125
4
[]
no_license
#include <iostream> using namespace std; int find_powerOfNumber(int n, int p) { if (n < 1) { return 0; } int res = n; for (int i = 1; i < p; i++) { res *= n; } return res; } int findPowerOfNumber(int n, int p) { if (p <= 0) { return 1; } if (p %...
true
499652dc30ec8c9f8cf298278420616176de0539
C++
NilsHolger/cppplayground
/Documents/Visual Studio 2013/Projects/cppplayground/cppplayground/countfind.cpp
UTF-8
1,531
2.890625
3
[]
no_license
#include "headers.h" #include "address.h" #include "technology.h" #include "component.h" #include "compfactory.h" using namespace std; //auto main() -> int //{ // Technology t(80, "t", Technology::on); // //Technology *t2 = new Technology(50, "t2", Technology::off); // // //t2->salute(); // //int v = t.getViabilit...
true
b9e24ef901fd725e2174507160ef0865839538f6
C++
Fen99/afina
/src/pipes/FIFOServer.h
UTF-8
1,017
2.546875
3
[]
no_license
#ifndef AFINA_FIFO_SERVER_H #define AFINA_FIFO_SERVER_H #include <atomic> #include <exception> #include <memory> #include <string> #include <thread> #include <unordered_map> #include "./../protocol/Executor.h" #include "core/FIFO.h" #include <afina/Storage.h> namespace Afina { namespace FIFONamespace ...
true
b3d7147c0cc009db484a407f1f431c900f443d0b
C++
Team-Jag/Do-or-die-fitness-tracker
/m5/Main/Timer.h
UTF-8
1,293
3.40625
3
[ "MIT", "CC0-1.0", "LicenseRef-scancode-proprietary-license" ]
permissive
#ifndef _TIMER_H #define _TIMER_H // A class to help us run code at specified // time intervals. You might want to use this // as a template to make your own arduino classes class Timer { private: unsigned long period; // user requested time period unsigned long last_ts; // saved time stamp ...
true
7becfac0b061e8e357b4da5688c93b5f4077bfe5
C++
sandro2112/Mainframes2_Trabajos_Semanales
/Semana 6/Arbol.h
UTF-8
1,097
3.28125
3
[]
no_license
#include <stdio.h> #ifndef __ARBOL_HPP__ #define __ARBOL_HPP__ template<typename X> struct Nodo { X e;//elemento float p;//peso Nodo<X>* hi; Nodo<X>* hd; Nodo(X e, float p) { hi = nullptr; hd = nullptr; this->p = p; this->e = e; } }; template<typename X> struct Arbol { Nodo<X>* r;//raiz long nro; Arbo...
true
b1b97c18049e1615ced35f5877a5fe2c9042d0cf
C++
jteuber/blpl_old
/include/blpl/MultiFilter.h
UTF-8
3,055
3.078125
3
[ "MIT" ]
permissive
#pragma once #include <thread> #include <vector> #include "Filter.h" namespace blpl { /** * @brief This is the interface for all filters of the pipeline. It takes an * input, processes it and produces an output to be processed by the next * filter. */ template <class InData, class OutData> class PIPELINE_EXPORT...
true
dc9c8bb7fa0c678d01605fd8a9ef9916878aee28
C++
jozi77/SuperComputing-HW3
/2/b/2b.cpp
UTF-8
2,120
2.609375
3
[]
no_license
#include<iostream> #include<fstream.h> #include<strstream.h> using namespace std; int min(int,int); int min1(int,int,int); int main() { int i,j,n,k,l; char buffer1[2048]; //--- taking input from file char buffer2[2048]; //--- n,s1,s2 are the corresponding three lines of input char buffer3[2048]; ...
true
2dc37cf50463d5937b511b4fabd810d9a914a44d
C++
wangrui22/mi-jpeg
/cjpegencoder/mi_jpeg_encoder.h
UTF-8
2,994
2.59375
3
[]
no_license
#ifndef MI_JPEG_ENCODER_H #define MI_JPEG_ENCODER_H #include <vector> #include <map> #include <memory> #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> struct Image { int width; int height; unsigned char* buffer; Image():width(0),height(0),buffer(nullptr) {} ~Image(...
true
e89c92246fbf69922fe31f3917f47036e5412265
C++
bsaid/SensorBoard
/firmware/SensorBoard_orig/main/led.h
UTF-8
1,303
3.46875
3
[]
no_license
#ifndef GLOBAL_LED_H #define GLOBAL_LED_H #include "driver/gpio.h" class Led { gpio_num_t ledPin; public: /** * LED constructor * @param ledPin number of GPIO pin */ Led(gpio_num_t ledPin) : ledPin(ledPin) { gpio_config_t io_conf; io_conf.intr_...
true
ba1dabb29c627a4055c9aa67f6151f9fb6241da5
C++
TsubaMukku/CompetitiveProgramming
/1_LeetCode/1305_All-Elements-in-Two-Binary-Search-Trees.cc
UTF-8
2,791
3.609375
4
[]
no_license
/* 2020-09-11 */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNo...
true
5bb61f07d93536030f2691cc97ff8e889df8f907
C++
MinhazRahman/CPPBasics
/IOStreams/writeFile.cpp
UTF-8
370
3.296875
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; int main() { cout << "Writing to a file" << endl; //create a fstream object, it the file doesn't exist the it will create a file fstream fileOut("example.txt", ios::app); //ios::trunc //write to a file fileOut << "First" << endl; fileOut << 40; ...
true
4434df22f56ef5516aa85fb1e5a29dcc285b0f55
C++
dnlsgv/ACM
/12583 - Memory Overflow.cpp
UTF-8
717
2.796875
3
[]
no_license
#include <iostream> #include <cstdio> using namespace std; #define debug(x) cout << (#x) << " tiene el valor " << (x) << endl int main(int argc, char const *argv[]) { int T, n, k, reconocimientos, casos = 1; char nombres[500 + 1]; cin >> T; while(T--) { cin >> n >> k; for(int i = 0; i < n; ++i) { cin...
true
8c49f8548dd2dd98508d5eaae481e988f65445df
C++
Plypy/Lifestyle
/Hdu/5073.cpp
UTF-8
1,250
2.515625
3
[]
no_license
/** * Description: * ProblemName: * Source: * Author: Ply_py */ #include <iostream> #include <fstream> #include <string> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <vector> #include <queue> #include <ctime> #include <map> #include <set> #include <iomanip> #...
true
33b191e94a749601f3de2c8e2d2091e3bc299216
C++
Lowest0ne/simutron
/src/libsimutron/budget.h
UTF-8
1,818
3.078125
3
[ "MIT" ]
permissive
#ifndef SIMUTRON_BUDGET_H #define SIMUTRON_BUDGET_H #include <cstdint> namespace Simutron { class City; class Buyable; /** * @class Budget * @brief Provide monetary functions */ class Budget { private: std::uint16_t m_tax_rate; std::int32_t m_treasury; public: /** * @fn Budg...
true
75f8d684bfa18d8b1e154c71968ce7621561f3be
C++
ebadusb/Trima_12.4
/engr_tools/datalog_tools/PredictUnitTest/TestBase.h
UTF-8
7,014
2.890625
3
[]
no_license
/* * TestBase.h * * Created on: May 19, 2012 * Author: allan */ #ifndef TESTBASE_H_ #define TESTBASE_H_ #include "TestResult.h" #include "Assert.h" #include <iostream> #include <fstream> #include <vector> #include <typeinfo> #include <ctime> #include <map> #include <typeinfo> namespace U...
true
db611b8afd01d83a25394d52b7373a95a28e149c
C++
avesus/hail
/libhail/src/hail/query/ir.cpp
UTF-8
5,361
2.65625
3
[ "MIT" ]
permissive
#include <exception> #include "hail/format.hpp" #include "hail/query/ir.hpp" namespace hail { IRContext::IRContext(HeapAllocator &heap) : arena(heap) {} IRContext::~IRContext() {} Module * IRContext::make_module() { return arena.make<Module>(IRContextToken()); } Function * IRContext::make_function(Module *mod...
true
7840edc10387ed1dd50df8773bcd430e34362f7e
C++
godot-extended-libraries/godot-sqlite
/sqlite.cpp
UTF-8
15,060
2.765625
3
[ "MIT" ]
permissive
#include "sqlite.h" #include "core/core_bind.h" #include "core/os/os.h" #include "editor/project_settings_editor.h" Array fast_parse_row(sqlite3_stmt *stmt) { Array result; // Get column count const int col_count = sqlite3_column_count(stmt); // Fetch all column for (int i = 0; i < col_count; i++) { //...
true
be148008876410edbcbc3de78391dbe18d07c5c1
C++
dillu24/MiniLang_Compiler
/Visitors/Utilities/SymbolTable.cpp
UTF-8
1,988
3
3
[ "Apache-2.0" ]
permissive
// // Created by Dylan Galea on 14/04/2018. // #include "SymbolTable.h" #include "../../Exceptions/CompilingErrorException.h" Visitors::SymbolTable::SymbolTable() { contents = multimap<string,TypeBinder>(); } void Visitors::SymbolTable::addToSymbolTable(string identifier, Visitors::TypeBinder type) { content...
true
d8b03b44512f9166cef7ef8a4361e31d10399ac8
C++
siatwangmin/LeetCode
/leetcode/70ClimbingStairs.cpp
GB18030
1,101
3.625
4
[]
no_license
#include <iostream> #include <vector> using namespace std; //Descirption************************************************************************************* //You are climbing a stair case. It takes n steps to reach to the top. // //Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
true
709d8794d3894f316f85a0c4015fda435319054f
C++
borrislevin/TIL
/Cpp STL, Modern/DAY3/0_입출력4.cpp
UHC
1,029
3.828125
4
[]
no_license
// 0_4.cpp #include <iostream> #include <string> #include <sstream> int main() { double d = 3.141592; // ڸ ڿ ϴ // 1. std::to_string() Լ =>> C++11 ߰ // Ư¡ : " Ѱ" ڿ // std::string s = std::to_string(d); // 3.141592 => "3.141592" std::string s = "d = " + std::to_string(d) + " Դϴ."; // ok // 2. osstringstr...
true
c22abd7903e6551c7aad173cb9c2ede00bfcee89
C++
LeonMac/ecdsa-tv-gen
/open_ecdsa.cpp
UTF-8
7,849
2.84375
3
[]
no_license
//compile: g++ open_ecdsa.cpp -o open -lssl -lcrypto -lstdc++ #include <openssl/ecdsa.h> #include <openssl/sha.h> #include <openssl/bn.h> #include <stdlib.h> // for strtol #include <math.h> #include <string.h> #include <cstdint> #include <vector> #include <iostream> #include <fstream> #include <sstream> #include <...
true
8a83d6745e1f11139fd081c55b2067e84165029c
C++
rocammo/object-oriented-programming-i
/ReservasHotel/sources/cliente.cpp
UTF-8
3,054
3.203125
3
[ "MIT" ]
permissive
/** * cliente.cpp * * @author: Rodrigo Casamayor <alu.89657@usj.es> * @date: 14 ene. 2019 */ #include "cliente.hpp" #include <iostream> #include <iomanip> Cliente::~Cliente() { reservas.clear(); } void Cliente::agregarReserva(const Habitacion& habitacion) { reservas.push_back(habitacion); } void C...
true
d2912d202ea5767548386cfb92e05793a8afe557
C++
muhammedzahit/CPP__Codes
/Compositon of Classes/employee.cpp
UTF-8
400
3.0625
3
[]
no_license
#include <iostream> #include <string> #include "date.h" #include "employee.h" info::info(std::string n_name,std::string n_lastname,date n_birth) : name(n_name) , lastname(n_lastname) , birth(n_birth) {} void info::printInfo(){ std::cout << "Name:" << name << std::endl; std::cout << "Last Name:" << lastname ...
true
861137dce2393ae15a1529bb40b545d3f284287a
C++
hychyc07/contrib_bk
/src/mobee/src/Apps/PoseFinder/matrix.cpp
UTF-8
11,043
3.25
3
[]
no_license
#include "matrix.h" #include <string.h> #include <algorithm> unsigned int rngState[3] = {0, 0, 0}; Matrix::CmpIndex::CmpIndex(const Matrix& lambda, std::vector<unsigned int>& index) : m_lambda(lambda) , m_index(index) { } bool Matrix::CmpIndex::operator ()(unsigned int i1, unsigned int i2) const { return (m_lambda...
true
17064edaecba1653790dc129e0faa01cea087e5c
C++
bikramjitdas/Daily-Data-Structure-and-Algorithm
/recursion/convert a string to integer using recursion/convert a string to integer using recursion.cpp
UTF-8
430
2.875
3
[]
no_license
#include<bits/stdc++.h> #include<algorithm> using namespace std; int r = 0; int stringtoint(string s, int len) { if (len == 0) return r; r = r * 10 + s[len - 1] - '0' ; return stringtoint(s, len - 1); } int main() { #ifndef ONLINE_JUDGE freopen("inputrecursion.txt", "r", stdin); freopen("outputrecursion.txt...
true
5a7933f7d4ccf2b832e0f8875b91b58ad83f3e42
C++
valentin-mladenov/TU-CPP-programing
/graph-work/Ross_Boss_task.cpp
UTF-8
839
3.234375
3
[]
no_license
// // Created by hudson on 20.4.2016 г.. // /*void showAllNodesWithMoreThan2OutboundArcs (node *graph[graphElements]) { cout << "Nodes found: "; bool setNone = true; // first find all that have MORE than 2 arcs OUT. for (int i = 0; i < graphElements; i++) { // NO outbound arcs. if (grap...
true
21f6adbe3526afc5ee3776dc4a2e6a26bd65a660
C++
PLaSSticity/ce-arc-simulator-ipdps19
/intel-pintool/Viser/microbenchmarks/test2.cpp
UTF-8
267
2.890625
3
[]
no_license
#include <list> #include <iostream> #include <iomanip> using namespace std; int main() { int a = 40, b = 10; int *c = new int(999); cout << a << " " << &a << endl; cout << b << " " << &b << endl; cout << *c << " " << c << " " << &c << endl; return 0; }
true
18115cfb212173e33a7d6673dc405dbab7127813
C++
kuldeep-singh-chouhan/interviewbit-solutions
/sub-matrices-with-sum-zero.cpp
UTF-8
2,389
3.234375
3
[ "MIT" ]
permissive
// Time - O(N^2), Space - O(N) // or Time - O(R^2 * C), Space - O(R * C) // where R = number of rows and C = number of columns int Solution::solve(vector<vector<int> > &A) { const vector<vector<int>>& mat = A; int r = mat.size(); if(r == 0) { return 0; } int c = mat[0].size();...
true
224c815b4d1bc14fcc8d539d4f83ade6d585f540
C++
DicardoX/LeetCode_Daily_Problem
/Easy/0014_最长公共前缀.cpp
UTF-8
1,035
3.59375
4
[]
no_license
/** * 题目见:https://leetcode-cn.com/problems/longest-common-prefix/ **/ /** 方法:顺序遍历 **/ class Solution { public: void compare(string& str, string& part) { int vis = -1; for(int i = 0; i < part.size() && i < str.size(); i++) { if(str[i] != part[i]) { vis = i - 1; ...
true
7e773999678e1931ef88ab5b7b748e52b90393ff
C++
Alaxe/noi2-ranking
/2017/solutions/C/IPD-Varna/color.cpp
UTF-8
520
2.625
3
[]
no_license
#include <iostream> #include <bits/stdc++.h> #define endl '\n' using namespace std; int t, n, color[10][100003], number, br; int main () { cin>>t; for (int ti=0; ti<t; ti++) { cin>>n; br=0; for (int i=0; i<n; i++) { cin>>number; color[ti...
true
665c3356317929b4795743fd7ddd51d97719b497
C++
88soham/AVLRedBlackBTree
/ModeRandom/generate_random_inputs.cpp
UTF-8
523
2.828125
3
[]
no_license
#include "header.h" main() { int i,n,rand_pos; int *input; FILE* fp_out=fopen("random_input.txt","w"); srand((unsigned)(time(NULL))); printf("\n Enter the number of keys:"); scanf("%d",&n); input=(int *)malloc(n*sizeof(int)); for(i=0;i<n;i++) input[i]=-1; for(i=0;i<n;) { rand_pos=rand()%n; if(...
true
248898e5fb6bbaa7285e6f64a274514b0b74a595
C++
arthurphilippe/zappy
/player/src/Socket.cpp
UTF-8
2,099
2.8125
3
[]
no_license
/* ** EPITECH PROJECT, 2018 ** zappy ** File description: ** Socket */ #include <cstring> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <netdb.h> #include "Socket.hpp" #include "color.h" namespace pl { Socket::Socket(const int ac, char **av) : _port(0), _machine...
true
edecd0e7b844d8fe462978c9f4d8a3d5793f94dc
C++
NeXTormer/Uebungen
/Voltmeter-Java-Final/builds/voltmeter.ino
UTF-8
357
2.515625
3
[]
no_license
//Arduino - Java Voltmeter //Program needs Java Voltmeter desktop applictaion //Created by Felix Holz on 14.11.2017 #define A0 PIN_POTI int adcvalue = 0; void setup() { Serial.begin(9600); } void loop() { if(Serial.available() > 0) { char in = Serial.read(); if(in == 'R') { adcvalue = analogRead(PIN_POT...
true
0b490be99f6333e9afd9217ca7a4f080a16da620
C++
Assylzhan-Izbassar/Timus-Online-Judge
/volume4/1313.cpp
UTF-8
388
2.71875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main(){ int n; scanf("%d", &n); vector<vector<int> > arr; vector<int> temp; int x; for(size_t i=0; i < n; ++i){ temp.clear(); for(size_t j=0; j < n; ++j){ scanf("%d", &x); temp.push_back(...
true
f12bdc6bf7ee1b9fc2e8cc921f42be9062041238
C++
msercheli/openexr
/docs/src/readDeepTiledFile.cpp
UTF-8
2,801
2.5625
3
[ "BSD-3-Clause" ]
permissive
void readDeepTiledFile(const char filename[], Box2i& displayWindow, Box2i& dataWindow, Array2D< float* >& dataZ, Array2D< half* >& dataA, Array2D< unsigned int >& sampleCount) { DeepTiledInputFile file(filename); int widt...
true
5b1f3890aa331de70cc9eb7a3d1aea578106a3a9
C++
Arzana/Plutonium
/code/src/Streams/FileReader.cpp
UTF-8
7,966
2.640625
3
[ "MIT" ]
permissive
#include "Streams/FileReader.h" #include "Core/EnumUtils.h" #include "Core/Diagnostics/Logging.h" #include "Core/Diagnostics/DbgUtils.h" #include "Core/Platform/Windows/Windows.h" #include <cstdio> #include <cstring> #include <filesystem> using namespace Pu; Pu::FileReader::FileReader(const wstring &path, bool log) ...
true
0661dcd30b0e9494316af1616ed0eb19dc8591ca
C++
adityasarvaiya/coding
/Crio/Array/14_SwapAllOddAndEvenBits/SwapAllOddAndEvenBits.cpp
UTF-8
441
3.03125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; unsigned int swapAllOddAndEvenBits(unsigned int n) { // CRIO_SOLUTION_START_MODULE_L1_PROBLEMS for(int i = 0 ; i < 32 ; i+=2) { if((((n >> i)&1)^(n >> (i+1))&1) == 1) { n ^= (1 << i); n ^= (1 << (i+1)); } } return n; // CRIO_SOLUTION_END_MODULE_L1_PROBLEMS } ...
true
b05ec9f996c82c0e0effa5c095959322f1c01e8a
C++
dark-w/algo-cloud
/src/heap.cpp
UTF-8
546
2.75
3
[]
no_license
#include "heap.h" #include "mm.h" #include <iostream> heap::heap(/* args */) { } heap::~heap() { } bool heap::heap_init(const int32_t config_heap_size) { std::cout << __func__ << std::endl; bool retbool = false; if (my_heap_init(config_heap_size) != 0) retbool = true; return retbool; } int6...
true
8b631816a2bac77c52740f4a1e0250624f67c812
C++
danieldc/newsbeuter
/test/rss.cpp
UTF-8
8,013
2.828125
3
[ "MIT" ]
permissive
#include "catch.hpp" #include <rsspp.h> #include <rsspp_internal.h> TEST_CASE("Throws exception if file doesn't exist", "[rsspp::parser]") { rsspp::parser p; try { rsspp::feed f = p.parse_file("data/non-existent.xml"); } catch (rsspp::exception e) { REQUIRE(e.what() == std::string("could not parse file")); }...
true
e88a73b3ad0a8aab1e787b36b636e40f0b951f18
C++
haramakoto/MuseofJiyugaoka
/MuseJiyugaoka/src/cloths/Particle.cpp
UTF-8
1,795
3.09375
3
[]
no_license
#include "Particle.h" // Constructors Particle::Particle(Vector3f position, Vector3f acceleration) : m_position(position), m_velocity(0,0,0), m_acceleration(acceleration), m_forceAccumulated(0,0,0), m_normal(0,0,0), m_damping(0.86), m_inverseMass(3), m_stationary(false) { } Particle::Particle(const Particle&...
true
8a80fab5edc7bc0575151e9a41fe9bcdd01d64e8
C++
bunelr/dovl-assignment
/main.cpp
UTF-8
1,112
2.796875
3
[]
no_license
#include "ioUtils.h" #include "imageClass.h" #include "problemStatic.h" #include "trw.h" #include <fstream> #include <sstream> int main(int argc, char * argv[]) { image LImageContent; image RImageContent; getImage(LImageContent, "imL.png"); getImage(RImageContent, "imR.png"); cout<<"left is: "<<...
true
e3697fe48b2794a7747464de0c036a9d8044696b
C++
renyajie/Learning
/Algorithm/提高/图论/拓扑排序/可达性统计.cpp
GB18030
1,213
2.546875
3
[]
no_license
#include<iostream> #include<cstring> #include<algorithm> #include<bitset> using namespace std; const int N = 30010, M = 30010; int h[N], e[N], ne[N], idx; int q[N], d[N]; bitset<N> dp[N]; int n, m; void add(int a, int b) { e[idx] = b, ne[idx] = h[a], h[a] = idx++; } void topsort() { int hh = 0, tt = -1; ...
true
c4225a96414a269c840af1b207bd89df650044ea
C++
wangxu989/study
/c++/c++11/tuple.cpp
UTF-8
663
3.25
3
[]
no_license
#include<iostream> #include<string> using namespace std; template<typename... types >class my_tuple;//原始定义 template<>class my_tuple<>{};//无参特化 template<typename T,typename... T1> class my_tuple<T,T1...>:public my_tuple<T1...> {//带参特化 typedef my_tuple<T1...> f_type; public: template<typename V,typename... types> m...
true
34d48637dfb35f0fe0f25e29792621b799af2d19
C++
ahmorsi/Fast-Point-Feature-Histograms
/project/PointCloud.h
UTF-8
801
3.25
3
[]
no_license
#ifndef POINTCLOUD_H_ #define POINTCLOUD_H_ #include <vector> #include "Point.h" /** \brief Implementation of a point cloud * * The point cloud stores a set of points and provides methods for sorting them * * \author mack */ class PointCloud { std::vector<Point*> points; unsigned int size; public: PointCl...
true
000abe4ac686902021d9b99b5e5fcea94e7574da
C++
lauritsriple/EQ-Disco
/disco/io.cpp
UTF-8
4,155
2.65625
3
[]
no_license
/* * io.cpp * * Created: 09/06/2015 22:05:18 * Author: Lua */ #define F_CPU 8000000UL #include <avr/io.h> #include <util/delay.h> #include "io.h" #include <stdlib.h> void pwm_init(void){ //OC0A -> PB2 -> RED //OC0B -> PA7 -> GREEN //OC1A -> PA6 -> BLUE DDRB |= (1 << RED); DDRA |= (1 << GREEN) | (1 << BL...
true
578b5357ea6c406face6e1574250bc2fa14fb5e4
C++
Jack-lss/LeetCode_method
/001Sum_of_two_numbers/Sum_of_two_numbers.cpp
WINDOWS-1252
622
3.6875
4
[]
no_license
#include <iostream> #include <vector> using namespace std; vector<int> twoSum(vector<int>& nums, int target); void main() { vector<int> nums{2, 11, 15, 2}; int target = 9; vector<int> numbers = twoSum(nums, target); if (numbers[0] == nums.size() && numbers[1] == nums.size()) cout << "Ҳ" << endl; else cout <<...
true
4f075bfb7d96b711d86f06206fe651dbc12c385f
C++
beastieGer/schildt
/chapter01/gl01_ex6_queue.cpp
UTF-8
1,122
3.765625
4
[]
no_license
/* класс циклической очереди целых */ #include<iostream> using namespace std; #define SIZE 100 class Queue { int head, tail; // индекс вершины и хвоста int queue[SIZE]; public: void init(); void save(int n); int deq(); }; void Queue::init() { head = tail = 0; } void Queue::save(int n) { ...
true
88b96763db942053bc1c85d19248a8b7ffc836b3
C++
FaryalAjradh/Code-Practice
/Being-Zero/Bit-Manip/split-2.cpp
UTF-8
612
3.40625
3
[]
no_license
// Given a number N, Split it to be represented as sum of powers of 2. N = 2i 2j 2k .... 1 #include<bits/stdc++.h> using namespace std; void printPowersOf2(long long int n) { while(n != 0) { // pos of leftmost set bit = log2n => log2n-1 is used for int k = (int)log2(n); cout << (1LL << k) <...
true
c6b44ff42790c95ddf68c228e01810dad4121ef6
C++
gbakkk5951/OI
/Test_18.4.17/source2/长乐-邱而沐/magic.cpp
UTF-8
1,813
2.734375
3
[]
no_license
#include<ctime> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define N 400010 using namespace std; typedef long long LL; int n, p; int jc[N], ie[N]; int f[100][100]; int a[N], b[N]; inline void Plus(int &x, int y) { x += y; x = x >= p ? x - p : x; } inline int Ksm(int x, int y) { int a...
true
4a6791c40a8a3d65ffabaa7c0fb2167256055830
C++
CheungKitLeong/Programming_practice
/C/Multimedia/Ascii_Art/ascii.cpp
UTF-8
3,237
2.828125
3
[]
no_license
/* CSCI 3280, Introduction to Multimedia Systems Spring 2021 Assignment 01 Skeleton ascii.cpp */ #include "stdio.h" #include "malloc.h" #include "memory.h" #include "math.h" #include "bmp.h" // Simple .bmp library #include <string.h> #include <stdlib.h> #define MAX_SHADES 8 char shades[MAX_SHADES] = {'@','#','%...
true
268c6500e348146c2ca4df4692b8a4fc1f2a1646
C++
blumchik/libIOStream
/src/EncryptedOutputStream.cpp
UTF-8
902
2.59375
3
[]
no_license
#include <sstream> #include <bitset> #include <unistd.h> #include <openssl/evp.h> #include <Util/ErrorHandler.hpp> #include "EncryptedOutputStream.hpp" namespace IOStream { EncryptedOutputStream::EncryptedOutputStream(int socketfd, EVP_CIPHER_CTX *encryptor) :socketfd(socketfd), encryptor(encryptor) { } ssize_...
true
83df8cbacafd12eac2f7882550ee0eea38ea3538
C++
chin0/everydayalgo
/baekjoon/math/2745.cpp
UTF-8
529
2.734375
3
[]
no_license
#include <locale> #include <iostream> #include <string> using namespace std; int main(void) { unsigned long long int result = 0; int b; string s; ios::sync_with_stdio(false); cin >> s; cin >> b; unsigned long long int r = 1; for(int i = s.size() - 1; i >= 0; i--) { if('0'...
true
f54e4bc7a7e798e3f2850bd8f852c34e199c0675
C++
Yakumorin/Leetcode
/297. Serialize and Deserialize Binary Tree.cpp
UTF-8
1,369
3.453125
3
[]
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Codec { public: // Encodes a tree to a single string. void go_serialize(TreeNode* root, string &res) { ...
true
5aed3c75460e4cfc7a116a080fc10c709ff84bd5
C++
BackupTheBerlios/bmws-svn
/c++/nio/util/socket.h
ISO-8859-1
4,872
2.6875
3
[]
no_license
//////////////////////////////////////////////////////////////////////// // socketclass.h // // (C)2000 by Axel Sammet // // Klasse fr einfache Socketverbindungen // // unter Win mit ws2_32.lib zu linken // //////////////////////////////////////////////////////////////////////// #ifndef SOCKETCL_H #define S...
true
5665ea07a680ee3ab55d83e1edb48c223c8505a4
C++
josephyan0816/pintiaC
/实验8-2-8 字符串排序.cpp
GB18030
658
3.28125
3
[]
no_license
#include<stdio.h> #include<string.h> #define n 5 #define maxlen 81 void stringsort(char s[][maxlen],int N); int main() { int i; char s[n][maxlen]; for(i=0;i<n;i++) scanf("%s",&s[i]); //scanfַոgetsس stringsort(s,n); printf("After sorted:\n"); for(i=0;i<n;i++) printf("%s\n",s[i]); } void strin...
true
6f0d97dce78c6aa0a0a73185c6003ac539fadc63
C++
jer22/templates
/RMQ.cpp
UTF-8
1,055
2.796875
3
[]
no_license
#include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #define MAXN 1000 using namespace std; int n; int arr[MAXN]; int maxsum[MAXN][11]; int minsum[MAXN][11]; void RMQ() { for (int j = 1; j <= 10; j++) { for (int i = 1; i <= n; i++) { if (i + (1 << j) - 1 <= n) { max...
true
71a5ba51a223fc00816b5a84eb9acb25c5e535fb
C++
wayne-chen/RTNeural
/RTNeural/dense/dense.h
UTF-8
2,692
2.796875
3
[ "BSD-3-Clause" ]
permissive
#ifndef DENSE_H_INCLUDED #define DENSE_H_INCLUDED #include <algorithm> #include <numeric> #include <vector> #if defined(USE_EIGEN) #include "dense_eigen.h" #elif defined(USE_XSIMD) #include "dense_xsimd.h" #elif defined(USE_ACCELERATE) #include "dense_accelerate.h" #else #include "../Layer.h" namespace RTNeural { t...
true
586ab9e2072aea5da51152c40fb7439f1ed66f76
C++
wtrnash/LeetCode
/cpp/019删除链表的倒数第N个节点/019删除链表的倒数第N个节点.cpp
UTF-8
1,230
3.828125
4
[]
no_license
/* 给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点。 示例: 给定一个链表: 1->2->3->4->5, 和 n = 2. 当删除了倒数第二个节点后,链表变为 1->2->3->5. 说明: 给定的 n 保证是有效的。 进阶: 你能尝试使用一趟扫描实现吗? */ //解答 先遍历一遍求出节点数,然后用倒数的和节点数计算出正数第几个,并做删除操作 # include<iostream> // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(...
true
836bc0795c2332824e49a649c1832a046fe50009
C++
phrz/HPSCProject1
/src/proj1_a.cpp
UTF-8
2,753
2.84375
3
[]
no_license
// // proj1_a.cpp // HPSCProject1 // // Created by Paul Herz on 8/31/16. // Copyright © 2016 Paul Herz. All rights reserved. // #include <iostream> #include "Matrix.h" #include "Vector.h" #include "nest.cpp" using namespace PH; // generate n+1 coefficients // for Taylor polynomial for e^x. // 1/0!, 1/1!, 1/2!, ...
true
4e62d0f52fa0a580ae34cb4bf3a11728c0065690
C++
susantabiswas/interviewbit-solutions
/Binary search/rotated_sorted_array_search.cpp
UTF-8
2,134
4.28125
4
[]
no_license
/* Binary search in rotated sorted array https://www.interviewbit.com/problems/rotated-sorted-array-search/ */ // Solution 1 int Solution::search(const vector<int> &arr, int target) { int left = 0, right = arr.size() - 1; while(left <= right) { int mid = left + (right - left) / 2; ...
true
866fec394d57bb1664550e6b70d8351e82bf707f
C++
sasasao/of_imac
/pet02/src/MyMesh.cpp
UTF-8
740
2.703125
3
[]
no_license
#include "MyMesh.hpp" MyMesh::MyMesh(){ myMesh = ofSpherePrimitive(200,72).getMesh(); for (int i=0; i<myMesh.getVertices().size(); i++) { myMesh.addColor(ofFloatColor(1.0,1.0,1.0,1.0)); } } void MyMesh::update(){ for(int i=0; i<myMesh.getVertices().size(); i++){ ofVec3f loc = myMesh...
true
05f510756b3d2f813a408d7cd75456f32f3156bd
C++
LauraDiosan-CS/lab8-11-polimorfism-pikachu2432
/Marfa.h
UTF-8
2,525
3.265625
3
[]
no_license
#pragma once #include "Garnitura.h" class Marfa : public Garnitura { private: string continut; public: Marfa(); Marfa(string m, string p, int n, string c, int d, int r); Marfa(const Marfa& m); ~Marfa(); Garnitura* clone(); void set_continut(string c); string get_continut(); Marfa& operat...
true
ab67e20f1d5869a15852ace7510a8ac95e03f475
C++
eusgeka/XperimentalHashAlgorithm
/unordermap.hpp
UTF-8
2,191
3.4375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#ifndef UNORDERMAP_HPP #define UNORDERMAP_HPP #include <string> #include <unordered_map> #define A_PRIME 54059 #define B_PRIME 76963 /* another prime */ #define C_PRIME 86969 /* yet another prime */ using namespace std; namespace std { class Key { private: std::string m_strFirst; std::strin...
true
9ef5cf8d56086325e7eead262208d2fc8128d22f
C++
bluarry/daily_problem
/算法学习/模拟/square.cpp
UTF-8
1,423
2.953125
3
[]
no_license
#include <iostream> #include <cstring> using namespace std; int n,m; int linkr[15][15],linkc[15][15]; int has(int s,int n) { int sum=0; for(int i=1;i<=n-s+1;i++) for(int j=1;j<=n-s+1;j++) { int k,ok=1; for(k=i;k<i+s;k++) if(!linkc[j][k]||!linkc[j+s][k]) {ok=...
true
bcd1be39a7240e956df81924b1d605c9f9443632
C++
DancingOnAir/LeetCode
/Leetcode/HashTable/500_KeyboardRow.cpp
UTF-8
2,179
3.046875
3
[]
no_license
//#include <iostream> //#include <vector> //#include <unordered_map> //#include <unordered_set> //#include <string> // //using namespace std; // //vector<string> findWords2(vector<string>& words) //{ // if (words.empty()) // return vector<string>(); // // unordered_map<int, unordered_set<char>> count{ {1, ...
true
45a040d5852e6ef35ab28534c1d1eab3638f954d
C++
pthiben/Helium
/Application/Inspect/Controls/Slider.cpp
UTF-8
7,252
2.546875
3
[]
no_license
#include "Slider.h" #include "Application/Inspect/Controls/Canvas.h" using namespace Helium::Inspect; /////////////////////////////////////////////////////////////////////////////// // Custom wrapper around wxSlider to interact with Slider. // class StdSlider : public wxSlider { public: Slider* m_Slider; bool m...
true
86687eb6fb5ffd5f75500d207d89713e8404defc
C++
Izumemori/muscord-cpp
/src/main.cpp
UTF-8
3,191
2.96875
3
[ "MIT" ]
permissive
#include "muscord.h" #include "common.h" #include "log_message.h" #include <cstdlib> #include <iostream> #include <string> #include <map> #include <memory> #include <csignal> #include <stdio.h> #include <string.h> using namespace muscord; std::map<int, std::string> signal_map { {SIGTERM, "SIGTERM"}, {SIGINT,...
true
f8eee4fec599e5c06befc3898f82afdee43730ae
C++
tienit150198/ACM
/20181020/FIBO_HCMUP/main.cpp
UTF-8
919
2.78125
3
[]
no_license
#include <bits/stdc++.h> #define ll long long int using namespace std; const ll MOD = 1e9 + 7; struct MaTran{ ll c[2][2]; MaTran(){ c[0][0] = 0; c[0][1] = 1; c[1][0] = 1; c[1][1] = 1; } }; MaTran operator* (MaTran a, MaTran b){ MaTran res; for(ll i = 0 ; i <= 1; i...
true
a25131a89abc8c92283da88372cb3475133cd1af
C++
housengw/CS8-I-Love-Baseball
/app/baseball_gui/view_souvenir_list.cpp
UTF-8
3,914
2.515625
3
[]
no_license
#include "view_souvenir_list.h" #include "ui_view_souvenir_list.h" #include "administrator_login.h" /***************************************************************** * CONSTRUCTOR * view_souvenir_list::view_souvenir_list(Map* map, Stadium* stadium, QWidget *parent) :QDialog(parent) *_______________________________...
true
1b031593773c87b99efc85eb0a3cd101f560b5b4
C++
ryanhaining/cppitertools
/internal/iter_tuples.hpp
UTF-8
1,977
2.9375
3
[ "BSD-2-Clause" ]
permissive
#ifndef ITERTOOLS_ITER_TUPLES_HPP_ #define ITERTOOLS_ITER_TUPLES_HPP_ #include "iterator_wrapper.hpp" #include "iterbase.hpp" #include <functional> namespace iter { namespace impl { namespace detail { template <typename... Ts> std::tuple<iterator_deref<Ts>...> iterator_tuple_deref_helper( ...
true
8996de9471985afe114e805900d5fbc8b0c8b7a1
C++
lehuyduc/BasicCppOOP
/Code/Labwork5/Labwork5/sheep/Graphic.hpp
UTF-8
763
3.359375
3
[]
no_license
/* * Graphic.hpp * Labwork 5 * * Created by Lilian Aveneau on 04/11/11. * Copyright 2011 XLIM/SIC/IG. All rights reserved. * */ #pragma once using std::string; class Graphic { protected: const unsigned m_x; // we use Oxy coordinate, bottom left is 0 0 const unsigned m_y; const string m_color; public...
true
c6df1ad8daa10a9df0aa1005a08e08ae8455f915
C++
TeamUnibuc/MusicalBash
/src/ui/u_dynamic_text_box.cpp
UTF-8
520
2.578125
3
[]
no_license
#include "u_dynamic_text_box.hpp" DynamicTextBox::DynamicTextBox(int posX, int posY, int sizeX, int sizeY, int alignment, std::string textInput, std::function<std::string()> func) : TextBox(posX, posY, sizeX, sizeY, alignment, textInput), reloaded_text(func) {} void DynamicTextBox::Render(s...
true
a6875142a45ac02693a7e0731454f9e999ee436f
C++
PrathameshDhumal/Programming-in-C-Advance-C-and-java
/14_COUNTEVENDIGIT/dev.cpp
UTF-8
2,185
3.75
4
[]
no_license
#include<stdio.h> // REquired for printf and scanf int CountEvenDigits(int); #include "Header.h" ////////////////////////////////////////////////////////////// // // Function name : CountEvenDigits // Input : Interger // Output : Integer // Description : It is used to count number of even d...
true
06c2f29e067047c577022c680824470c6e427f5f
C++
shwenakak/CS100-Lab1
/test.cpp
UTF-8
942
2.65625
3
[]
no_license
#include "c-echo.h" #include "gtest/gtest.h" TEST(EchoTest, HelloWorld) { char* test_val[3]; test_val[0] = "./c-echo"; test_val[1] = "hello"; test_val[2] = "world"; EXPECT_EQ("hello world", echo(3,test_val)); } TEST(ShwenaTest, ShwenaKak) { char* test_val[3]; test_val[0] = "./c-echo"; test_val[1] = "shw...
true
3a2287ac5b84f4d24322fa9fccb6d7b85d3a2443
C++
ohughes343/1501project2
/controller/controller.ino
UTF-8
1,356
2.65625
3
[]
no_license
/* * Code for controller * By: Aryton Hoi */ #include <Servo.h> #include <SPI.h> #include <RF24.h> #include <nRF24L01.h> //Setup NRF RF24 radio(7,8); // CE, CSN const byte address[6] = "00001"; //Setup joysticks const int joy1 = A0;//blue const int joy2 = A1;//black //Setup joystick position values (middle position) ...
true
af07bac375a575467efa02cb4c60cdee0bcb8039
C++
ledrui/ELL
/libraries/model/tcc/OutputNode.tcc
UTF-8
2,423
2.796875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
//////////////////////////////////////////////////////////////////////////////////////////////////// // // Project: Embedded Learning Library (ELL) // File: OutputNode.tcc (model) // Authors: Chuck Jacobs // //////////////////////////////////////////////////////////////////////////////////////////////////// n...
true
0f1cfbb54874bcdd3cae1440d02353d77bee11b4
C++
jthornber/cache-simulator
/main.cc
UTF-8
17,454
2.71875
3
[]
no_license
#include <cmath> #include <iomanip> #include <iostream> #include <list> #include <math.h> #include <memory> #include <vector> #include <map> #include <boost/optional.hpp> #include <boost/intrusive/list.hpp> #include <sequence.h> #include <stdlib.h> using namespace std; using namespace boost; //----------------------...
true
184306680f9bce3dcd140cca8bb62263bebadde6
C++
ECOM021/AlGi_Crypt0r
/Model/libs/libhuffman/inc/Node.hpp
UTF-8
476
2.9375
3
[]
no_license
#ifndef NODE_HPP #define NODE_HPP using namespace std; #include "Globals.hpp" class Node { public: Node(); Node( uchar symb , int occur , Node *left , Node *right ); uchar getSymb(); int getOccur(); Node * getLeft(); Node * getRight(); bool isLeaf(); ...
true
75a7d473d194f6ba4b3ede61bb8ed90f361d2f29
C++
schrodinger/maeparser
/MaeBlock.hpp
UTF-8
15,339
2.625
3
[ "MIT" ]
permissive
#pragma once #include <boost/dynamic_bitset.hpp> #include <cassert> #include <cstring> #include <map> #include <stdexcept> #include <string> #include <utility> #include "MaeParserConfig.hpp" namespace schrodinger { namespace mae { using BoolProperty = uint8_t; template <typename T> inline const T& get_property(cons...
true
b0a7089aab8d3a4a519623bebab1b61afe968ded
C++
Woffee/acm
/CPP/2013-2015/HDOJ/又见GCD.cpp
UTF-8
521
3.0625
3
[]
no_license
#include <iostream> #include <cstdio> using namespace std; //最大公约数 int Gcd(int m, int n) { return m == 0 ? n : Gcd(n % m, m ); } int main() { int ncase; int a, b, c; scanf("%d", &ncase); while(ncase--) { scanf("%d%d", &a, &b); int temp = a / b; for(in...
true
5052a9def9e5e651741940ba22a9a3a809be0d4d
C++
Prajakta1798/EngineeringPracticals-SE
/DSF Assignment/1/conv_prefix1.cpp
UTF-8
2,260
3.328125
3
[]
no_license
/************************************************************** ASSIGNMENT NO: ROLL NO: BATCH : TITTEL: conversion of infix to prefix expression. **********************************************...
true
7dcd24bd78acbf9a4a6ac3acf63682a48ad9bd1e
C++
TNTantoine/TextRPG
/TextRPG/Classes/Character.cpp
UTF-8
2,658
3.578125
4
[]
no_license
#include "Character.h" #include <stdlib.h> #include <iostream> #include <random> using namespace std; Character::Character () : m_name ("DefaultName"), m_HP (10) { } Character::Character (string name) : m_name (name), m_HP (10) { } Character::Character (string name, int hp) { m_name = name; m_HP = hp; } Chara...
true
b1ae02251ac1a497159f831699d9cbec2ff7c8c2
C++
aliushn/stereo-vision-toolkit
/src/camera/cameracontrol/cameracontrol/cameracontrol.ino
UTF-8
1,380
2.796875
3
[ "MIT" ]
permissive
/* * Copyright I3D Robotics Ltd, 2020 * Author: Ben Knight (bknight@i3drobotics.com) */ #define CAMERA_TRIGGER_1 3 //Phobos USB uses pin 12 / Phobos GigE uses pin 3 #define CAMERA_TRIGGER_2 2 //Phobos USB uses pin 12 / Phobos GigE uses pin 2 double frame_delay; // amount of time between triggered (1/fps) int tr...
true
1cb45f93a90513875b20fd770b28baef9370f5ca
C++
LookingforMind/MyMind
/C++/8. Massives/Project1.0/Project1/Source.cpp
WINDOWS-1251
704
3.34375
3
[]
no_license
/*1. , . */ #include <iostream> using namespace std; int main() { setlocale(LC_ALL, "rus"); const int string = 10; const int column = 10; int massive[string][column]; for (int i = 0; i < column; i++) { // cout << i; for (int j = 1; j < string; j++) { // cout << j; // // cout << massive[string...
true