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
f388271069851c63d1fa0175cde8f595cd94098b
C++
msrishu65/codes
/codes/array n dp/minimumunsortedarray.cpp
UTF-8
504
2.578125
3
[]
no_license
#include<iostream> using namespace std; int main() { int c=0,start,end; int m=0; int a[]={10, 12, 20, 30, 25, 40, 32, 31, 35, 50, 60}; //int a[]={0, 1, 15, 25, 6, 7, 30, 40, 50}; for(int i=0;i<10;i++) { if(a[i]>m) m=a[i]; if(a[i]<m) end=i; if(a[i]>a[i+1] && c==0) ...
true
e6888d4a1c1d86dc1190fe83b72f2c64996e7d1d
C++
duskmoon314/THU_homework
/C++ program design/cpp files/exp9-1-1.cpp
UTF-8
658
2.953125
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; int main() { int iNumberOfSheep; cout << "Please input the number of sheep: \n"; cin >> iNumberOfSheep; int iWeightOfSheep[1024] = { 0 }; for (int i = 0; i < iNumberOfSheep; ++i) { iWeightOfSheep[i] = rand(); } for (int i = 0; i < 100; ++i) { for (int j = iNumberOfS...
true
952b3c3a5037bf513910b698c52133941009ada1
C++
pjx3/DirectXTex
/DirectXTex/DirectXTexRAW.cpp
UTF-8
2,865
2.78125
3
[ "MIT" ]
permissive
//------------------------------------------------------------------------------------- // DirectXTexRAW.cpp // // DirectX Texture Library - RAW file format reader/writer // // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // // http://go.microsoft.com/fwlink/?LinkId=248...
true
4236e7df39343d2b1d907742aaad8f29bef2d17d
C++
maksymshvaiko/Circle_buffer
/tests/auto/ewq/tst_ewq.h
UTF-8
1,743
3.265625
3
[]
no_license
#include <gtest/gtest.h> #include <gmock/gmock-matchers.h> #include <iostream> using namespace testing; TEST(ewq, qwe) { EXPECT_EQ(1, 1); ASSERT_THAT(0, Eq(0)); } template<typename EL, int _size> class ring_buff { private: size_t m_size; EL m_buf[_size]; size_t m_front; size_t m_back; ...
true
4e8584365b46235833409b6fdc22753d4e06204e
C++
sankarsh98/codeforces
/trainTickets.cpp
UTF-8
624
2.703125
3
[]
no_license
#include<iostream> #include<cmath> #include<algorithm> #include<vector> #include<string> #include<map> #include<set> using namespace std; #define loop(i,a,n) for(int i=a;i<=n;i++); typedef unsigned long long ll; int main(){ int n,m,a,b; cin>>n>>m>>a>>b; int p=min(b,a*m); int c=n/m; int res=c...
true
17dd6cc65b5a7549a41f906d7573639704d3b838
C++
xiaoqixian/Wonderland
/leetcode/cloneGraph.cpp
UTF-8
1,241
3.0625
3
[]
no_license
/********************************************** > File Name : cloneGraph.cpp > Author : lunar > Email : lunar_ubuntu@qq.com > Created Time : Sun Jul 3 17:37:25 2022 > Location : Shanghai > Copyright@ https://github.com/xiaoqixian **********************************************/ #include <ve...
true
2ad77ab1e21a22b1ec4376abaf0a7da41739a136
C++
Yu-ChenChang/LeetCode
/src/39_combination_sum.cpp
UTF-8
1,097
3.390625
3
[]
no_license
#include<iostream> #include<vector> #include<algorithm> using namespace::std; class Solution { public: vector<vector<int> > combinationSum(vector<int> &candidates, int target) { sort(candidates.begin(),candidates.end()); vector<vector<int> > res; vector<int> combinations; combinationSum(candidates,res,com...
true
048250e0eaeb2e12637a227216ee89cb6ec07c6c
C++
li487941081/HDOJ
/1003Max Sum solution1.cpp
UTF-8
1,933
3.421875
3
[]
no_license
/* Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14. Input The first line of the input contains an integer T(1<=T<=20) which means the number of test cas...
true
0a57354f28ad744c1ac32d817c5c9ef581cd978b
C++
Raj6713/CodeChef
/chefsum.cpp
UTF-8
737
3.4375
3
[]
no_license
//chef solves a new problem #include<iostream> using namespace std; #include<climits> inline long int summer(int *,int index,int size); int main() { int testCases,size,index; long int minimum; cin>>testCases; while(testCases--) { minimum=LONG_MAX; cin>>size; int *arr=new int[size]; for(int i=0;i<size;i++) ...
true
cfa42192cad13a26745c15302ccf638bd4e76994
C++
yuqi-lee/program-design
/homework/hw4/分解因数.cpp
UTF-8
1,175
3.515625
4
[ "MIT" ]
permissive
/* 李昱祁 PB18071496 程序设计II第 4 次作业 题目 1:分解因数 2020.04.22 */ #include <iostream> using namespace std; int _count = 0; void my_func(int i, int a); int main(void) { int a; cout << "输入正整数a:"; cin >> a; for (int i = 2; i <= a; i+...
true
00eb5a65b935a1cb14acccdaac4160101ceb4b08
C++
rajarahul12/Programs
/LinkedList/palindrome_ll_effe.cpp
UTF-8
1,206
3.359375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; struct Node{ int data; Node *next; }; Node *head=NULL; Node *last= NULL; void node(int val){ Node *n = new Node; n->data = val; n->next = NULL; if(head == NULL){ head = last = n; } else{ last->next = n; last =n; } } void reverseLinkedlist(int len,int mid){...
true
872e93797c4e43f30fa6b6d4f338d39b9c9b91f4
C++
alexandraback/datacollection
/solutions_5708921029263360_0/C++/cseteram/C.cpp
UTF-8
2,976
2.546875
3
[]
no_license
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> #include <string> #include <set> #include <map> #include <queue> #include <stack> #include <utility> #include <functional> #include <algorithm> using namespace std; void make_all(int m, int k, int j, int p, i...
true
25fb6e47c93f611ecdc203c9089798ec255b296c
C++
fenixGames/WvV
/src/nodes/board.cpp
UTF-8
356
2.984375
3
[ "BSD-2-Clause" ]
permissive
#include <nodes/board.hpp> std::list<Piece*> Board::create_row(int ncols) { std::list<Piece*> row; for (int idx = 0; idx < ncols; idx++) row.push_back(); } Board::Board(int ncols, int nrows, const Point &position, const Size &size) : Node(position, size){ for (int idx = 0; idx < nrows; idx++) this->pieces.pu...
true
71d22d6643a1f3dadb5b2a3c3d5bfbe4312da89f
C++
xoyowade/solutions
/leetcode/66_plus_one.cpp
UTF-8
639
3.265625
3
[]
no_license
class Solution { public: vector<int> plusOne(vector<int> &digits) { // Start typing your C/C++ solution below // DO NOT write int main() function int carry = 1; vector<int> new_digits; for (int i = digits.size()-1; i >= 0; i--) { int sum = digits[i]+carry; ...
true
003fa7918c3f8d9eaab8132fd5d17b7237cdd16c
C++
AmanAswal/cpp-competitve-coding
/Array/NxN_multiply_matrix.cpp
UTF-8
1,220
3.546875
4
[]
no_license
// WAP to take and print Nxn matrix. ( same no. of rows and columns) #include<iostream> using namespace std; int main() { int a[10][10], b[10][10],c[10][10], r, co; cout<<"Enter the number of rows: "; cin>> r; cout<<"Enter the number of columns: "; cin>> co; cout<<"Enter el...
true
9e73205ebbcecda2bb26859b22a6345c3675cd9c
C++
jinhang87/qtutil
/app/MessageBox/messagebox.cpp
UTF-8
1,253
2.546875
3
[]
no_license
#include "messagebox.h" #include "ui_messagebox.h" MessageBox::MessageBox(Icon icon, const QString &text, QMessageBox::StandardButtons buttons, QWidget *parent) : QDialog(parent), ui(new Ui::MessageBox) { ui->setupUi(this); ui->buttonBox->setStyleSheet("QPushButton { min-width: 150px ; min-height: 60px...
true
3e02fc724d8bc8097e921cd98494835a93030ad2
C++
xalyes/adapter
/adapter/reciever.cpp
UTF-8
1,332
2.53125
3
[]
no_license
#include "stdafx.h" #include "network_helpers.h" #include "translator.h" #include "reciever.h" #include <sstream> using namespace boost::asio; void Reciever::Acceptor(int port, unsigned int module) { ip::tcp::endpoint ep(ip::tcp::v4(), port); ip::tcp::acceptor acc(g_service, ep); boost::thread_group threads; whi...
true
dba45b61428121ed6bf12b797767760c101f7352
C++
dsmo7206/genesis
/shapes.cpp
UTF-8
620
3.046875
3
[]
no_license
#include "shapes.h" #include "planet.h" #include "star.h" Shape* Shape::buildFromXMLNode(XMLNode& node) { if (rapidxml::count_attributes(&node) != 1) raiseXMLException(node, "Expected 1 attribute"); XMLAttribute* attr = node.first_attribute(); if (strcmp(attr->name(), "type")) raiseXMLException(node, "Missing ...
true
0bcbda517d5d07805e727522abf03f624c875585
C++
acttell/practice
/dynamic/edit_distance.cpp
UTF-8
840
2.984375
3
[]
no_license
//https://www.cnblogs.com/grandyang/p/4344107.html #include<iostream> #include<string> #include<vector> using namespace std; int edit_distance(string& s1,string& s2) { int m=s1.size(); int n=s2.size(); vector<vector<int>> dp(m+1,vector<int>(n+1)); for(int i=0;i<m+1;i++) dp[i][0]=i; for(int i=0;i<n+...
true
ceda628136fdb3b7e9478a4686ab08b0a2282c82
C++
Thisnicknameisalreadytaken/kaoyan
/algorithm_note/cp10-graph/bfsForwardOfWeibo.cpp
UTF-8
2,000
3.375
3
[]
no_license
#include <iostream> #include <queue> using namespace std; /* * P363 给出微博中的几个人,每个人关注的其他人,当一个人发布动态的时候可以被关注他的人转发,求经过 L 层转发后,总共最大被转发了几次 * 微博人的关注关系构成一张图,本题与层级有关,应选用 BFS 解决 */ const int maxn = 1010; typedef struct Node { int no; // 节点编号 int level; // 节点所在层级 } node; bool G[maxn][maxn] = {false}; // 图的邻接矩阵 bool ha...
true
bb242f9f5c36c817e6f281c3a33d613f314d83e5
C++
gonzhitova/laba5.1
/55.cpp
UTF-8
367
2.984375
3
[]
no_license
#include <iostream> using namespace std; class pr{ public: int a,b,r; int getS(){ return a*b; } int getP(){ return 2*(a+b); } int getSs(){ return 3.14*r*r; } int getPe(){ return 2*3.14*r; } }; void main() { pr p; p.a=5; p.b=8; p.r=8; cout<<p.getS(); cout<<" "; cout<<p.getP(); cout<<"\n"; cout<<p.getSs(); cout<<" "; ...
true
8668b73d839efeffd96be1339afc44c4e7deee29
C++
JokerIsol/GitLearn
/src/head_file/Axis.h
UTF-8
999
2.71875
3
[]
no_license
#ifndef AXIS_H #define AXIS_H // "Axis_h" struct Axis_state{ //状态 bool Request; //是否接受指指令 bool Done; //是否已完成运动指令 }; struct parameter{ //运动参数 double Position; //位置 double Velocity; //速度 double Acceleration; //加速度 double Deceleration; //减速度 }; struct new_cmd{ //接受命...
true
75d1f8315d27b21468b665edf0a834a2ee263cd0
C++
KristinaKulabuhova/Automate-for-regular-expressions
/automate.cpp
UTF-8
2,745
3.25
3
[]
no_license
#include "automate.h" const char *IncorrectRegularExpression::what() const noexcept { return "Incorrect regular expression"; } bool IsCorrectRegularExpression(std::string regular) { int counter = 0; for (int i = 0; i < regular.size(); ++i) { if (regular[i] == 'a' || regular[i] == 'b' || regul...
true
af042cef6c24e52da50a5489c0ab73d896e5e67c
C++
yusuke-matsunaga/ymtools
/libym_logic/src/sat/ymsat/VarHeap.h
UTF-8
6,756
2.640625
3
[]
no_license
#ifndef VARHEAP_H #define VARHEAP_H /// @file VarHeap.h /// @brief VarHeap のヘッダファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2005-2011, 2014 Yusuke Matsunaga /// All rights reserved. #include "YmLogic/sat_nsdef.h" #include "YmLogic/VarId.h" BEGIN_NAMESPACE_YM_SAT ///////////////////////////////...
true
881865a26e8afb5634dac81f39300e9059db3818
C++
deepakshisud/Competitive-Coding
/Cpp implementations/Multiplication_Recursion.cpp
UTF-8
226
2.8125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int multiplication(int m, int n) { if(n==0) return 0; int smallAns = multiplication(m, n-1); return m+smallAns; } int main() { cout<<multiplication(2,3); return 0; }
true
a264ac842ca872a8626cdcf7c47c7a0eeb737970
C++
ydk1104/PS
/6321.cpp
UTF-8
266
2.84375
3
[]
no_license
#include<stdio.h> int main(void){ int N; scanf("%d", &N); char s[51]; for(int i=1; i<=N; i++){ scanf("%s", &s); for(int j=0; s[j]!='\0'; j++){ if(s[j] == 'Z'){ s[j] = 'A'; } else{ s[j]++; } } printf("String #%d\n%s\n\n", i, s); } }
true
b05909e75056cb795ee768ec960fc1ed089b5db3
C++
zenanswer/lintcode-practice
/src/cpp/test612.cpp
UTF-8
1,967
3.421875
3
[]
no_license
#include "lintcode_comm.h" /** * Definition for a point. * struct Point { * int x; * int y; * Point() : x(0), y(0) {} * Point(int a, int b) : x(a), y(b) {} * }; */ class PointW { public: PointW(int x, int y, Point& origin) { this->x = x; this->y = y; this->count = 1...
true
eb645c009b278d2eaaa7bb9f9b63af15b7453403
C++
RuslanLytvynov/University_WIT
/Programowanie Obiektowe/Lesson_7/C07/03_ID03P06/C07_Proj_ID03P06_0001/Application.cpp
UTF-8
1,320
2.671875
3
[]
no_license
///***************************************** void Application::Run(){ Main07(); } ///***************************************** void Application::Main01(){ cout<<"\n\n\t\tApplication::Main01\n\n"; } ///***************************************** void Application::Main02(){ MyClass m0; m0.Ini(1,2,3)...
true
970a6a8ee3b42e71c1d573610730519165a57c1f
C++
RotoscopMe/RotoscopMe-Desktop
/gui/createprojectdialog.cpp
UTF-8
3,021
2.609375
3
[ "MIT" ]
permissive
#include "createprojectdialog.h" CreateProjectDialog::CreateProjectDialog(QWidget *parent) : QDialog(parent) { setWindowTitle(tr("Rotoscop'Me - Nouveau Projet ")); QLabel *nomLabel = new QLabel("Nom : "); _nomEdit = new QLineEdit(); QLabel *workspaceLabel = new QLabel("Workspace : "); _worksp...
true
e2b40a9955c82a77182424744ea0be2667624b30
C++
willyii/CS230-Project3-RigidBodySimulation
/CS230-RigidBodySimulation/CS230-RigidBodySimulation/init.cpp
UTF-8
1,501
2.6875
3
[]
no_license
// // init.cpp // CS230-RigidBodySimulation // // Created by 易昕龙 on 2/29/20. // Copyright © 2020 易昕龙. All rights reserved. // #include <iostream> #include <glad/glad.h> #include <GLFW/glfw3.h> void framebuffer_size_callback(GLFWwindow* window, int width, int height);// call back function of size GLFWwindow* ini...
true
d2f3208af461b9b2c714434d72fa79d0645aee3d
C++
Bridge12Technologies/Gyrotron-Control-System---OLD
/device.cpp
UTF-8
3,322
2.53125
3
[]
no_license
// the commented-out lines are for a later implimentation of pre-programmed command lists #include "device.h" ethdevice :: ethdevice() { name = ""; hostname = ""; portno = 0; preread = false; socket = 0; pause = false; recon_count = -1; } //ethdevice :: ethdevice(std::string n, std::string...
true
8ec62518e67eda82d2976b29d2365cc87481dd56
C++
dxhans5/bull_cow
/BullCowGame/main.cpp
UTF-8
2,741
3.546875
4
[]
no_license
/* This is the console executable, that makes use of the BullCow class This acts as the view in a MVC pattern, and is responsible for all user interaction. For game logic, see the FBullCow class. */ #include <iostream> #include <string> #include "FBullCow.h" using FText = FString; using int32 = int; void PrintIntro(...
true
1e0789dc3d13cb14de1ba9342e29549839ad73d8
C++
TanDung2512/tandung251298
/execises theory class BK/lab_danhsachke/lab_danhsachke/main.cpp
UTF-8
2,671
3.125
3
[]
no_license
// // main.cpp // lab_danhsachke // // Created by nguyen tan dung on 11/4/17. // Copyright © 2017 nguyen tan dung. All rights reserved. // #include <iostream> using namespace std; class point{ public: int data; point*link; bool check; point(){ this->data=0; this->link=NULL; ...
true
6c9f959ccc00cb47e2e065153be736e4b1e0900b
C++
zaimoni/Iskandria
/z_n.hpp
UTF-8
682
2.53125
3
[ "BSL-1.0" ]
permissive
// z_n.hpp #ifndef Z_N_HPP #define Z_N_HPP 1 #include "Zaimoni.STL/Logging.h" #include "Zaimoni.STL/augment.STL/type_traits" namespace zaimoni { namespace math { // modulo arithmetic classes template<uintmax_t n> class Z_ { static_assert(0<n); private: typename min_unsigned<n>::type _x; public: ...
true
c985fa7b8b777afc6bb1c5f924576432df4b1ff0
C++
wh2per/Programmers-Algorithm
/Programmers/Lv2/Lv2_교점에별만들기.cpp
UTF-8
1,921
3
3
[]
no_license
#include <string> #include <vector> #include <iostream> #include <climits> #include <algorithm> using namespace std; vector<string> solution(vector<vector<int>> line) { vector<string> answer; vector<pair<long long, long long>> cross; long long minX = LLONG_MAX, minY = LLONG_MAX; long long maxX = LLONG...
true
7c165ea5de6be320d79690f5d53d1065511fbfcf
C++
roycefanproxy/CPP_Primer_5th
/Chapter 10/10.29.cpp
UTF-8
388
2.578125
3
[]
no_license
#include <iostream> #include <iterator> #include <vector> #include <fstream> using namespace std; int main() { ifstream fs("Sales_Item.h"); istream_iterator<string> ifsi(fs), eof; vector<string> vs; //string s; while(ifsi != eof) //while(getline(fs, s)) vs.push_back(*ifsi++); //...
true
eb6862eda05218963c3ea4e7f9ad5f0f91f59526
C++
igankevich/subordination
/src/bscheduler/kernel/foreign_kernel.hh
UTF-8
957
2.640625
3
[]
no_license
#ifndef BSCHEDULER_KERNEL_FOREIGN_KERNEL_HH #define BSCHEDULER_KERNEL_FOREIGN_KERNEL_HH #include <bscheduler/kernel/kernel.hh> #include <bscheduler/kernel/kernel_type.hh> namespace bsc { class foreign_kernel: public kernel { private: typedef char char_type; typedef size_t size_type; typedef ::bsc::kernel_ty...
true
5c8cccbcebe3fdf6895852c3a3829da946869efd
C++
minlexx/l2-unlegits
/l2ooghelper/UserBuffs.h
UTF-8
1,496
2.75
3
[]
no_license
#ifndef H_USER_BUFFS #define H_USER_BUFFS class UserBuff { public: UserBuff() { clear(); } UserBuff( const UserBuff& other ) { this->operator=( other ); } UserBuff& operator=( const UserBuff& other ) { this->skillID = other.skillID; this->skillLvl = other.skillLvl; this->duration = other.duration...
true
9f08d720fe354037d5fb790e66b7f43c795173a0
C++
SofiaQuintana/ESTRU_2019
/Proyecto 2/Guatemala's DB/Table.cpp
UTF-8
626
2.96875
3
[]
no_license
#include "Table.hpp" using namespace std; Table::Table() { setName(""); } Table::Table(string name) { setName(name); this -> hashmap = new Hashtable(); } void Table::addColumn(string name, string type) { Column *column = new Column(type, name); this -> columns.push_back(column); } void Table::a...
true
96a7c267236122c727dae4c8c0a4c13c51eb55f1
C++
mlepicka/Depth_Creator
/src/functions.cpp
UTF-8
2,939
3.03125
3
[]
no_license
#include "../include/functions.hpp" std::vector<String> read_sample_images_names(std::string path){ std::vector<String> images_filenames; cv::glob(path, images_filenames, false); std::cout << "Number of files in directory " << images_filenames.size() << std::endl; return images_filenames; } std::vector<...
true
e214bdc1c384557d511f6e447c3d556c863eea02
C++
fengxueem/Home_Surveillance
/Day6/ngrok-c-master/https.cpp
UTF-8
36,659
2.953125
3
[]
no_license
#include "https.h" struct http_response* handle_redirect_get(struct http_response* hresp, char* custom_headers) { if(hresp->status_code_int > 300 && hresp->status_code_int < 399) { char *token = strtok(hresp->response_headers, "\r\n"); while(token != NULL) { if(str_contains(token, "Location:")) { /* ...
true
80048da699e51546ef62efee5735b40bf08cb7b3
C++
InigoRomero/CPP-Modules
/CPP04/ex03/main.cpp
UTF-8
1,125
2.890625
3
[]
no_license
#include <iostream> #include "Cure.hpp" #include "Ice.hpp" #include "MateriaSource.hpp" #include "Character.hpp" int main() { IMateriaSource* src = new MateriaSource(); src->learnMateria(new Ice()); src->learnMateria(new Cure()); ICharacter* moi = new Character("moi"); AMateria* tmp = NU...
true
1e5e06dac93077d05cf2ae4a0cf0e0b397d239cd
C++
gptakhil/Cpp-Revision
/Calculator_using_class.cpp
UTF-8
915
4.09375
4
[ "MIT" ]
permissive
# include <iostream> using namespace std; class calculator{ float num1,num2; public: calculator(){ num1 = 0; num2 = 0; } int add(float n1 , float n2){ num1 = n1; num2 = n2; return num1 + num2; } float subtract(float n1, float n2){ num1 = n1; ...
true
fc73330c0c787c95ca35d868251200acfa645b4e
C++
SyssouREB/Odin
/Programmes/Programmes-intermédiaires/Programmes-Scanner-Ecran/affichage2dim.ino
UTF-8
6,639
2.578125
3
[]
no_license
#include<Servo.h> #include<math.h> #include<SoftwareSerial.h> #define RX 7 #define TX 8 #define RXb 2 #define TXb 3 Servo servoVer; Servo servoHor; char scan=' '; int byt[9]; int distance; const int HEADER=0x59; char printout[4]; #include <TFT.h> #include <SPI.h> #define TFT_CS 10 #define TFT_R...
true
1de4b7f63d9a478605b5580268bc80bc57c289ef
C++
BinFench/CppBoil
/src/arg.h
UTF-8
1,677
3.4375
3
[]
no_license
/* Author: Ben Finch Email: benjamincfinch@gmail.com Desc: declaration of arg. Arg holds any amount of parameters to be used in a stack or recursion function. */ #include "stack/stackLink.h" #include "stack/stack.h" #include "parser/rule.h" #include "ast/ASTNode.h" #include <type_traits> #ifndef...
true
199f72ed39255f09c24008dfe425427c80953e7c
C++
vedantpople4/problem_solving_cpp
/1528.cpp
UTF-8
242
2.609375
3
[]
no_license
class Solution { public: string restoreString(string s, vector<int>& indices) { string retStr = s; for(int i = 0; i < indices.size(); i ++){ retStr[indices[i]] = s[i]; } return retStr; } };
true
c41b1e8822bcb0273e14c6c399c9756bed8eb293
C++
rbjoshi1309/tf_idf
/main.cpp
UTF-8
6,060
2.515625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; long long number_of_files(vector<string> &file_name_list, string file_name) { long long count = 0; string temp; ifstream no_of_files("./data/" + file_name); while (no_of_files >> temp) { file_name_list.push_back(temp); ++count; } ...
true
9a3f286e8f2802dc91619d8fd58df399a1d7bf6e
C++
SunTalk/CPP-Reference
/HW01/Gernic_Programming/rand.h
UTF-8
577
3.0625
3
[]
no_license
#pragma once #include<iostream> #include<vector> #include<string> #include<algorithm> #include<ctime> #include<fstream> #include<cstdlib> void init_randseed(){ srand(time(NULL)); } int rand_Ascii(int left, int right){ return left + (rand() % (right - left) + 1); } std::string rand_string(int len){ std::string...
true
0147f0f00224e912c9c081b681edd27ec8346009
C++
poweihuang17/practice_leetcode_and_interview
/Leetcode/Greedy/714_Best_Time_to_Buy_and_Sell_Stock_with_Transaction.cpp
UTF-8
386
2.65625
3
[]
no_license
class Solution { public: int maxProfit(vector<int>& prices, int fee) { vector<int> own(prices.size()+1,-50001); vector<int> sell(prices.size()+1,0); for(int i=1;i<=prices.size();i++) { own[i]=max(sell[i-1]-prices[i-1],own[i-1]); sell[i]=max(own[i-1]+prices[i-1]-fee,...
true
913b0a83be65a2f36eab93b5d65203ba8b438f17
C++
wynnliam/an_engine_of_ice_and_fire
/src/GameStateHandler.cpp
UTF-8
2,261
2.625
3
[]
no_license
//Liam "AFishyFez" Wynn, 6/17/2015, A Clash of Colors #include "GameStateHandler.h" #include "GameStates/GameState.h" //States #include "GameStates/StateIntro.h" #include "GameStates/StateMainMenu.h" #include "GameStates/StateTopDown.h" using namespace ACOC_GameState; /*HANDLER IMPLEMENTATIONS*/ GameStateHandler::...
true
2a84bd9a3cfe209e38ac078751f25730c67a2433
C++
radii-dev/rpi3-self-driving-model-shuttle-bus
/Raspi backup/20190902/final/final.cpp
UTF-8
15,319
2.6875
3
[ "MIT" ]
permissive
/* g++ final.cpp -o final `pkg-config --libs opencv` -larmadillo -lwiringPi */ #include <iostream> #include <armadillo> #include <string> #include "opencv2/core/core.hpp" #include "opencv2/core/utility.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui/highgui.hpp" #i...
true
f3dfbceef3c1c2f3ff321c488b43bf213359c46e
C++
petrarce/alhorythms-cpp
/euler-project/problem_11/main.cpp
UTF-8
1,142
2.921875
3
[]
no_license
#include <iostream> #include <string> #include <cmath> #include <vector> #include "lib_euler_project.h" using namespace std; int count_factors(vector<prime_factor_entire_t> & local_primes_db){ uint64_t sum1 = 0, sum2 = 0; for (int i = 0; i < local_primes_db.size(); i++) sum1 += local_primes_db[i].co...
true
4ebe9b3ca5c4f877149245719d39983e81aec612
C++
barbararaquelperez/dev-C-
/PUNTERO 2.cpp
UTF-8
1,299
2.953125
3
[]
no_license
#include<iostream> #include<stdio.h>//printf #include<stdlib.h>//malloc #include<raquel_func.h> #include<string.h>//strcpy using namespace std; //ORDENAMOS POR EL METODO DE LA BURBUJA void puntero(){ int veces; int cont; char *palabras[4]; int longitud; char *p_aux; char aux[20]; for(veces=1;...
true
77571bd2a2aa5d2b6264a81c90351b16be9f6c4e
C++
saranshbht/codes-and-more-codes
/codeforces/1076/1076a.cpp
UTF-8
475
2.53125
3
[ "MIT" ]
permissive
#include<bits/stdc++.h> using namespace std; #define endl "\n" int main() { ios_base :: sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; string s; cin >> n >> s; char maxm = CHAR_MIN; for (int i = 0; i < n; i++) { maxm = max(maxm , s[i]); } int i; n--; for (i = 0; i < n; i++) { if (s[i] > s[i +...
true
671a542499caf5e4cee9b351892a9b1577ca8c5f
C++
jss8649/IPCV
/imgs/ipcv/frequency_filtering/FrequencyFilter.cpp
UTF-8
2,961
2.890625
3
[]
no_license
/** Implementation file for image filtering * * \file ipcv/spatial_filtering/Filter2D.cpp * \author <your name> (<your e-mail address>) * \date DD MMM YYYY */ #include "FrequencyFilter.h" #include <iostream> #include <opencv2/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui.hpp> #in...
true
4a3c5a8eca6c2516c8a632120fca912ade87f584
C++
cyj407/ACM-practice
/UVA-10420.cpp
UTF-8
835
3.171875
3
[]
no_license
#include<cstdio> #include<map> #include<string> #include<iostream> #include<cstring> #include<string> using namespace std; int main(){ int n; while(scanf("%d\n",&n)!=EOF){ map<string,int> m; map<string,int>::iterator it; string str; for(int i = 0;i<n;++i){ /* cut the string to nation */ getline(c...
true
ff43968a9834f87563c41095f561f133ed85c359
C++
EShourav/lightojaccodes
/1225 - Palindromic Numbers (II).cpp
UTF-8
652
2.71875
3
[]
no_license
#include<stdio.h> int main() { int n,i,numb,rem,temp; scanf("%d",&n); for(i=1; i<=n; i++) { int reverse=0; scanf("%d",&numb); temp=numb; while(temp!=0) { rem=temp%10; ...
true
a7cb728aabfc01fb3ca670a514e8160055c9856e
C++
gurudattapatil/Data-stuctures
/dsa/course 1/week1_programming_challenges/2_maximum_pairwise_product/max_pairwise_product.cpp
UTF-8
810
3.5625
4
[]
no_license
#include <iostream> #include <vector> #include <algorithm> long long MaxPairwiseProduct(const std::vector<int>& numbers) { int max_index1 = -1; int max_index2 = -1; int n = numbers.size(); for(int i=0;i<n;i++) { if((max_index1==-1)||(numbers[i]>numbers[max_index1])) { ma...
true
d38307fd238bb727966c871cd15aa8fa57754394
C++
OGStudio/lua-cross-platform-examples
/features/main/Example+application.nodePool.node.rotation.cpp
UTF-8
1,714
2.75
3
[]
no_license
FEATURE main.h/Setup this->setup_application_nodePool_node_rotation(); FEATURE main.h/Impl private: void setup_application_nodePool_node_rotation() { MAIN_EXAMPLE_REGISTER_ENVIRONMENT_CLIENT( { "application.nodePool.node.rotation" }, this->process_app...
true
1e9736efe26d5dcbbee0fc1fed21a22009d027c4
C++
gnosiop/fromPhone
/C++/Essential/Ios/rdstate(streamErrors).cpp
UTF-8
997
2.96875
3
[]
no_license
#include <iostream> #include <fstream> #include <errno.h> using namespace std; char str[1024]; int main() { ifstream in("test.txt"); while(in){ in.getline(str,1024,' '); if(str[0] == '\0') continue; cout<<"\n::::"<<in.rdstate()<<":::"<<str; if(in.rdstate() & ios::failbit) { cout << "Formate error!\n...
true
c331c2c4e20511a13112a13a864669b3174e15ad
C++
2002patryk/zamiana
/main.cpp
UTF-8
1,079
3.15625
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main(int argc, char** argv) { ifstream plik; ofstream plik1; string liczba1; string liczba2; string liczba3; string liczba4; plik.open("liczby.txt"); plik1.open("wyjscie.txt"); if( plik.good() == true ) { plik>>...
true
cfbcad89a8c3776b097f0ce0f21c6defa9b4e9c8
C++
shrikadam/codeforces
/122a_luckydivision.cpp
UTF-8
314
2.953125
3
[]
no_license
#include <iostream> using namespace std; int main(){ int l[] {4, 7, 44, 47, 74, 77, 444, 447, 474, 477, 744, 747, 774, 777}; int n; cin >> n; for(int i:l){ if(n%i==0){ cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }
true
c8d42e30433d61a35fa5c044b178869c4092980b
C++
apmfifty/outbrain-click-prediction
/00_reference_code/04_AlexeyNoskov_02th_code/prepare-leak.cpp
UTF-8
5,627
2.53125
3
[]
no_license
#include "util/io.h" #include "util/data.h" std::vector<std::pair<std::string, std::string>> filesets { std::make_pair("cache/clicks_cv1_train.csv.gz", "cache/leak_cv1_train.csv.gz"), std::make_pair("cache/clicks_cv1_test.csv.gz", "cache/leak_cv1_test.csv.gz"), std::make_pair("cache/clicks_cv2_train.csv.g...
true
df4d3ad6b65a1f3bce878e80de256a4d3a492df4
C++
enginBozkurt/perception_pipeline
/src/octreevoxelgrid.h
UTF-8
2,873
3.171875
3
[ "BSD-2-Clause" ]
permissive
#pragma once #include <pcl/point_types.h> #include <pcl/octree/octree.h> template<class PointT> class OctreeCentroidContainer : public pcl::octree::OctreeContainerBase<int> { public: /** \brief Class initialization. */ OctreeCentroidContainer() : point_counter_(0) { this->reset(); } /** \brief Empty class dec...
true
78db9e2fc17e7e293796adadf9c91120bfc17879
C++
Opal21/tic_tac_toe
/User.hpp
UTF-8
761
2.84375
3
[]
no_license
#ifndef USER_HPP #define USER_HPP #include "Plane.hpp" #include <iostream> class User { protected: char player_sign{}; public: [[nodiscard]] virtual Move decide_move(const Plane& plane) const = 0; [[nodiscard]] virtual int UserMode() const = 0; [[nodiscard]] char get_player_sign() const; }; class Play...
true
7ba78e9762a6569012f4cfbf10ec8a2bec903d59
C++
saikiranpalimpati/AntColonySystem
/Graph/Graph/Colony.h
UTF-8
919
3.21875
3
[]
no_license
/*colony class will take a graph and hold the individual ants. It makes the ant to move around the graph and tour trough all the cities(or vertices) on the graph using different algorithms.It initaialises the pheromone by calculating m/cnn, where 'm' is number of ants and 'cnn' is the length of tour generated by n...
true
788edf297e1cd33ca59898372d8824dea51c1e4a
C++
aprilandjan/learn-cpp-primer-plus
/src/chapter12/2_queue/use_queue.cpp
UTF-8
3,067
3.25
3
[]
no_license
// // Created by May on 2018/12/11. // #include <iostream> #include <cstdlib> // provide rand #include <ctime> // provide time #include "use_queue.h" #include "./Queue.h" const int MINUTES_PER_HOUR = 60; /** * check should create a new customer or not * @param x * @return */ bool check_new_customer(double x)...
true
80989a47117424a53a8473e24935e8a0d5abcabf
C++
agoffer/secretary
/src/competitorCtrl.cpp
WINDOWS-1251
4,287
2.703125
3
[]
no_license
//--------------------------------------------------------------------------- #pragma hdrstop #include "competitorCtrl.h" #include "competitorDM.h" #include "utils.h" void TCompetitor::extend(TPerson inPerson, TSkill inSkill, TRequest inRequest){ person = inPerson; skill = inSkill; request = inRequest...
true
3aa217d7e8009527df9368028e7ffa799c124598
C++
Veterun/Interview-1
/Leetcode/42.trappingRainWater/42.cpp
UTF-8
1,175
3.15625
3
[]
no_license
https://leetcode.com/discuss/16171/sharing-my-simple-c-code-o-n-time-o-1-space //we should do it in a cumulative way. We set 2 pointers from the two end. //Meanwhile, we keep two value maxleft, maxright to maintain the max height of left and //right respectively. In the process when we move the two pointers towards ...
true
06daa7846549c693a3847e94379e2270dc56263a
C++
HarryCha777/USACO-Solutions
/Train - Chapter 2/nocows.cpp
UTF-8
703
2.875
3
[]
permissive
/* ID: harrych2 PROG: nocows LANG: C++ */ #include <iostream> #include <fstream> #include <algorithm> using namespace std; int main() { ifstream in("nocows.in"); ofstream out("nocows.out"); int n, k; in >> n >> k; int dpTable[110][220] = {}; for (int i = 1; i <= k; i++) dpTable[i][0] = dpTable[i][1] = 1; // mus...
true
dd16dcb5bddc03a9644dfa55e0a44ae9e690636b
C++
niwa/interoperable_land_water_models
/Examples/BMI/Lookup/src/lib/lookup.h
UTF-8
964
2.640625
3
[]
no_license
#ifndef LOOKUP_LIB_H #define LOOKUP_LIB_H #include <string> #include <variant> #include <vector> namespace lup { struct Input { std::string name; std::variant<std::string, double, int> value; }; class Lookup { public: static Lookup *Create(std::string filename); sta...
true
c75e236fce354ffc24d33800178f65196e91b968
C++
kwhitehouse/graspit_msgs
/src/grasp_msg.cpp
UTF-8
2,403
2.5625
3
[]
no_license
/* * grasp_msg.cpp * * Created on: Oct 12, 2010 * Author: hao */ #include "grasp_common/grasp_msg.h" #include <sstream> namespace grasp_common { GraspMsg::GraspMsg(const std::vector<double> &pre_grasp, const std::vector<double> &final_grasp, double epsilon, double volume) { epsilon_ = epsilon; volume_ =...
true
bd947dfc6d8d16e5babef5abcbac99823cf78f3f
C++
durba-s/dsa_assignment
/A2/J.AirTicket.cpp
UTF-8
2,072
3.15625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include<limits.h> struct node { int vertex; struct node* next; }; struct node* createNode(int); struct Graph { int nov; struct node** adjLists; }; struct node * createNode(int v){ struct node * newnode=(struct node *)malloc(sizeof(struct node)); newnode-...
true
690b4e3209e89702057a837d50e8c2ee197f8c6a
C++
Juseong-Bang/algorithms
/13458.cpp
UTF-8
1,476
3.484375
3
[]
no_license
/* 문제 총 N개의 시험장이 있고, 각각의 시험장마다 응시자들이 있다. i번 시험장에 있는 응시자의 수는 Ai명이다. 감독관은 총감독관과 부감독관으로 두 종류가 있다. 총감독관은 한 방에서 감시할 수 있는 응시자의 수가 B명이고, 부감독관은 한 방에서 감시할 수 있는 응시자의 수가 C명이다. 각각의 시험장에 총감독관은 오직 1명만 있어야 하고, 부감독관은 여러 명 있어도 된다. 각 시험장마다 응시생들을 모두 감시해야 한다. 이 때, 필요한 감독관 수의 최소값을 구하는 프로그램을 작성하시오. 입력 첫째 줄에 시험장의 개수 N(1 ≤ N ≤ 1,000,000)이...
true
b947a43dcb6f76dc9b13726907e30ec758a57f11
C++
siahuat0727/lab3
/questionA.cpp
UTF-8
549
3.109375
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdlib> #include <vector> #include <algorithm> #include <iomanip> using namespace std; int main(){ ifstream inFile("file.in", ios::in); if(!inFile){ cerr << "Failed opening" << endl; exit(1); } int numberOfCow; inFile >> numberOfCow; vector<int>cow(numberOfCo...
true
0cd13caa39ec456381db35e4ccb4661017f935bf
C++
jordsti/stigame
/StiGame/gui/TableRow.cpp
UTF-8
1,690
3.203125
3
[ "MIT" ]
permissive
#include "TableRow.h" namespace StiGame { namespace Gui { TableRow::TableRow() { valueObject = nullptr; } TableRow::~TableRow() { auto cit(cells.begin()), cend(cells.end()); for(;cit!=cend;++cit) { delete (*cit); } if(valueObject != nullptr) { delete valueObject; } }...
true
ffff7589f3293d37bd575db66152c93780911186
C++
ZephirDev/PocoJsonPath
/src/PocoJsonPath/Operators/MultOperator.hpp
UTF-8
1,439
2.59375
3
[]
no_license
// // Created by desrumaux on 13/10/2021. // #ifndef POCOJSONPATH_MULTOPERATOR_HPP #define POCOJSONPATH_MULTOPERATOR_HPP #include "AbstractOperator.hpp" namespace PocoJsonPath { namespace Operators { class MultOperator : public AbstractOperator { public: /*** * Invoke a...
true
5c222112065da98f20cd3aae0742dd8f90048d6c
C++
yerson001/ProgramacionCompetitiva
/Contest/C.cpp
UTF-8
325
2.515625
3
[]
no_license
#include<iostream> using namespace std; int main(){ long cont; cin>>cont; while(cont--){ long a, b, n; cin>>a>>b>>n; long cnt(0); while(a <= n && b <= n){ if(a < b){a += b;} else{b += a;} ++cnt; } cout<<cnt; } return...
true
456a9039cf0668ce5edd01842b894e5ade0f3edd
C++
danielpmachado/PROG-FEUP-Parte2
/Menus.cpp
ISO-8859-1
6,997
3.1875
3
[]
no_license
#include "Menus.h" /* Funo que pede ao utilizar para inserir o nome da loja e dos ficheiros (clientes, produtos e transaoes) e que verifica se os ficheiros de clientes, produtos e transaes abrem corretamente. */ bool infoInicial(string & loja, string & fichClientes, string & fichProdutos, string & fichTransacoes) { ...
true
d7f906ce8ced480b127c8562e62ff563dd5b514d
C++
SadSock/acm-template
/uva/UVa369.cpp
UTF-8
1,573
2.578125
3
[]
no_license
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <set> #include <map> #include <queue> #include <stack> #include <fstream> #include <iomanip> #include <bitset> #include <lis...
true
144f7846c28c72a4683a4c33c78de72b10453ab3
C++
patilrajat/hackerrank
/cavity_map.cpp
UTF-8
906
3.15625
3
[]
no_license
/* Sample Input 4 1112 1912 1892 1234 Sample Output 1112 1X12 if left,right,upper,lower elements are less then replace with X(this is not for element on edge) 18X2 1234 Explanation The two cells with the depth of 9 are not on the border and are surrounded on all sides by shallower cells. Their values hav...
true
56a9c4ec65c49dd23730dbc7f897c327216b03b9
C++
dkStephanos/robotSymbol
/RobotSymbol/OGLReferenceFrame.h
UTF-8
1,140
2.78125
3
[]
no_license
#pragma once #ifndef OGL_REFERENCE_FRAME #define OGL_REFERENCE_FRAME #include "MathUtil.h" #include <glm\glm.hpp> #include <string> using std::string; #include <vector> using std::vector; class OGLReferenceFrame { public: glm::mat4 orientation; vector<Transform> transforms; public: OGLReferenceFrame(); virtual...
true
d201ec53dfe43981165d24dc0036c3bcc6f7e7c8
C++
shenfumin/tools
/source/protocol/usercontent.h
UTF-8
8,098
2.609375
3
[]
no_license
#ifndef USERCONTENT_H #define USERCONTENT_H #include <QObject> #include <QString> #include <QDateTime> #include <QTime> #include <QDebug> #include "../source/device/userdevice.h" class UserContent : public QObject { Q_OBJECT public: enum Direction {Upper=0,Lower=1}; explicit UserContent(enu...
true
c0fb1c50c79a24abbceb2f501f4f2206e912dd8a
C++
chenzhiqiang1/enjoy
/test6.cpp
GB18030
3,128
3.25
3
[]
no_license
/* Ŀ ÿһͯ,JOBDU׼һЩСȥ¶ԺС,ˡHFΪJOBDUԪ,ȻҲ׼һЩСϷ,иϷ:,СΧһȦȻ,ָһm,ñΪ1СѿʼÿκmǸСҪг׸,ȻƷѡ,ҲٻصȦ,һСѿʼ,1...m....ȥ....ֱʣһС,Բñ,õJOBDUġ̽ϡذ(Ŷ!!^_^),ĸСѻõƷأ 룺 жݡ ÿһ,2n(0<=n<=1,000,000),m(1<=m<=1,000,000),n,mֱʾСѵ(1....n-1,n)HFָǸm()n=0,롣 Ӧÿ,õ󽱵Сѱš 룺 1 10 8 5 6 6 0 1 3 4 */ #include<stdio.h> ...
true
45af88f48372c2ba3949e046003723cf5f6d8c8c
C++
liux0229/settings
/tools/codes/rand.cpp
UTF-8
691
2.765625
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <mylib.h> #define NUL '\0' int main(int argc, char **argv) { char *usage = "rand <lower> <upper> [n_num] [-n] (inclusive; -n : every number in a line)"; int lower, upper, n_num; int i; if ( argc < 3 ) { printf("%s\n", usage); exit(EXIT_FAIL...
true
a983b293f59311f361600c7a252abd707efdd1d7
C++
joel-perez/9515Algo2TP2
/src/Terreno.h
UTF-8
1,757
2.875
3
[]
no_license
#ifndef TERRENO_H_ #define TERRENO_H_ #include "Lista.h" #include "Parcela.h" #include "Dificultad.h" #include "Constantes.h" #include "Texto.h" class Terreno { private: Lista<Parcela*>* parcelas; Texto texto; unsigned int tamanioColumnas; unsigned int tamanioFilas; unsigned int precio; public:...
true
c45d08c026625fb9c555ab637892ff6f732169db
C++
miodek/Thinking_in_cpp_1
/examples_from_the_book/C14/Combined.cpp
UTF-8
620
2.90625
3
[]
no_license
//: C14:Combined.cpp // Kod zrodlowy pochodzacy z ksiazki // "Thinking in C++. Edycja polska" // (c) Bruce Eckel 2000 // Informacje o prawie autorskim znajduja sie w pliku Copyright.txt // Dziedziczenie i kompozycja class A { int i; public: A(int ii) : i(ii) {} ~A() {} void f() const {} }; clas...
true
9a8e9a31aec7abc24ae2747808e25afad8ec2840
C++
KN-2018-Praktikum/up-problems-groups-1-2
/exercise-03/problem02.cpp
UTF-8
611
3.515625
4
[]
no_license
#include <iostream> using namespace std; int main() { char firstLetter, secondLetter, firstNum, secondNum; char thirdNum, forthNum, thirdLetter, forthLetter; cin >> firstLetter >> secondLetter >> firstNum >> secondNum; cin >> thirdNum >> forthNum >> thirdLetter >> forthLetter; int multiplicatio...
true
0252516959324bb0e2cd0fdc93e25b10109a11b8
C++
toHelandback/CircularQueueArray
/Circular Queue Template.cpp
UTF-8
1,519
3.875
4
[]
no_license
#include <iostream> #include <string> using namespace std; template<class T> class CircularQueue { private: T *arr; int size, front, rear, cap; public: CircularQueue(int size); bool isEmpty(); bool isFull(); void Enqueue(T val); void Dequeue(T &val); T frontval(); T rearval(); }; template<c...
true
23700650aeecef6588e6ee594c499c023557a6bd
C++
CLOBOT-Co-Ltd/rmf_traffic
/rmf_traffic/src/rmf_traffic/geometry/SimplePolygon.hpp
UTF-8
6,091
2.828125
3
[ "Apache-2.0" ]
permissive
/* * Copyright (C) 2019 Open Source Robotics Foundation * * 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 at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
true
3b053cce4d2bfafd35a3e5d9173c886c72e33692
C++
seanjkim/CS256
/CargoShip.cpp
UTF-8
1,765
3.75
4
[]
no_license
#include <stdio.h> #include <cstdio> #include <string> #include <iostream> using namespace std; class Ship { protected: string shipName; string yearMade; public: Ship(string name, string year) { shipName = name; yearMade = year; } string getShipName(){ return shipName;} void setShipName(string name){shipNam...
true
6ea060d3bd033ffd9e8dba613d923fb2fb6a30e8
C++
martinspedro/lidar-interference-analysis
/src/multiple_lidar_interference_mitigation_bringup/include/multiple_lidar_interference_mitigation_bringup/datasets_info.hpp
UTF-8
15,585
3.21875
3
[]
no_license
/** * \file datasets_info.hpp * \brief Set of constants and methods usefull to manage the datasets * */ #ifndef DATASETS_INFO_H #define DATASETS_INFO_H #include <string> /*! * \namespace datasets_path * \brief namespace for datasets manipulation */ namespace datasets_path { /*! * \brief Get full path to t...
true
58948c2e2517129c9757148df2994b7d696254b3
C++
jwvg0425/DSAndAlgo3
/src/countNode/countNode.cpp
UTF-8
189
3
3
[ "MIT" ]
permissive
struct Node { int data; Node* left = nullptr; Node* right = nullptr; }; int count(Node* node) { if (node == nullptr) return 0; return count(node->left) + count(node->right) + 1; }
true
cbf99fac0e11fd7f0d2e6f82c192bc570fe0f96d
C++
ljtg24/Offer68
/S38_permutation.cpp
UTF-8
777
3.3125
3
[]
no_license
#include <iostream> #include <cstdio> using std::cout; using std::endl; void permutationCore(char* pStr, char* pBegin) { if (*pBegin == '\0') { // cout << (*pStr) << endl; printf("%s\n", pStr); } else { for (char* pCh = pBegin; *pCh != '\0'; pCh++) { char...
true
35df65940ace72152df16da2928c71be88a6fd67
C++
amandugar/5X5-Matrix-of-Motors
/Slave_2/Slave_2.ino
UTF-8
555
3
3
[]
no_license
#include <Servo.h> #include <Wire.h> Servo myServo[12]; void setup() { for (int i = 0; i < 13; i++) { myServo[i].attach(i + 1); myServo[i].write(0); } Wire.begin(2); Wire.onReceive(receiveEvent); } void runServo(byte x) { for (int pos = 0; pos <= 180; pos ++) // goes from 0 degrees to 180 degree...
true
db412d2726fba740eb08060be0a2bb059915ab90
C++
liviuq/Petrache_Andrei_Liviu_A3
/lambdaLab/myVector.cpp
UTF-8
852
3.453125
3
[]
no_license
// // Created by andrew on 12.05.2021. // #include <iostream> #include "myVector.h" bool myVectorClass::Add(int newElement) { myArray.push_back(newElement); this->size++; return true; } bool myVectorClass::Delete(int index) { myArray.erase(myArray.begin() + index); this->size--; return true; } void myVectorCla...
true
e3b99f0f180e26057fbc0827d390dec1584641d9
C++
edenreich/http-component
/tests/unit/request_test.cpp
UTF-8
881
2.734375
3
[ "MIT" ]
permissive
#include <gtest/gtest.h> #include <http/message.h> #include <http/request.h> #include <http/response.h> #include <http/interfaces/response_interface.h> #include <http/url.h> #include <http/types/status_codes.h> #include <http/exceptions/invalid_message_exception.h> using namespace Http; TEST(RequestTest, ItThrowsA...
true
7223bade28820862bfdaecc45878c386f01eead7
C++
RlingDK/QTTime
/QTTime/Period.h
UTF-8
1,751
3.421875
3
[]
no_license
/* * Period.h * * Created on: May 26, 2016 * Author: rling */ #ifndef PERIOD_H_ #define PERIOD_H_ #include <stdio.h> /** * Enumeration for the time period types (work and relax) */ enum TYPE { fail, // Indicator type for when the whole plan has failed work, relax, end // Indicator type ...
true
d23110ba25dd2e20bb8c422a5495a3ebf9ab117a
C++
tiagochst/PIM2013
/src/Config.cpp
UTF-8
2,054
2.640625
3
[]
no_license
#include "Config.h" const std::string USR_HOME = std::string(getenv("HOME")); std::string Config::_rootPath(USR_HOME + "/.pim2013/"); std::string Config::_resourcesPath(""); std::string Config::_dataPath(""); std::string Config::_outputPath(""); std::string Config::_configPath(""); std::string Config::_capturedFramesP...
true
b2618653196c7bea6368cd215b5b9857fb1628e2
C++
luqilinok/Leetcode
/leetcode-algorithms/242. Valid Anagra/242. Valid Anagram.cpp
UTF-8
1,360
3.53125
4
[]
no_license
/* * @lc app=leetcode.cn id=242 lang=cpp * * [242] 有效的字母异位词 * * https://leetcode-cn.com/problems/valid-anagram/description/ * * algorithms * Easy (51.90%) * Total Accepted: 27.2K * Total Submissions: 52.4K * Testcase Example: '"anagram"\n"nagaram"' * * 给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的一个字母异位词。 * * ...
true