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
439197f57fc991acd02c37a1e2f90cfedd1037b7
C++
sandmn/point_offer
/point_offer/Quit_repeat_in_order_array.cpp
UTF-8
583
3.5
4
[]
no_license
#include<iostream> using namespace std; //有序数组进行去重 int Quit_Repeat(int arr[],int n) { if(arr == NULL || n <= 1) { return n; } int i = 0; int index = 0; for(i = 1;i < n;i++) { if(arr[index] != arr[i]) { arr[++index] = arr[i]; } } return ind...
true
35ac873abca21bdb5e61f8ddc1770f9e14f5e4d2
C++
acc-cosc-1337-spring-2020/acc-cosc-1337-spring-2020-OMTut
/src/homework/tic_tac_toe/tic_tac_toe_data.cpp
UTF-8
1,129
3.234375
3
[ "MIT" ]
permissive
#include "tic_tac_toe.h" #include "tic_tac_toe_data.h" #include "tic_tac_toe_3.h" #include "tic_tac_toe_4.h" //cpp void TicTacToeData::save_games(const vector<unique_ptr<TicTacToe>>& games) { ofstream file_out(file_name, ios_base::trunc); for (auto& game : games) { for (auto peg : game->get_pegs()) { file...
true
aa1520cf19e2d02476a7b03e59d9a999d25f5e11
C++
Johnny-Martin/toys
/Test/Test/Test.cpp
GB18030
15,764
2.890625
3
[]
no_license
// Test.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include "Test.h" #include <map> #include<cctype> #include<iostream> #include <sstream> #include <fstream> #include<map> #include<stack> #include<string> #include <regex> using namespace std; enum Token_value { NAME, NUMBER, END, PLUS = '+', MINUS = '-', MUL = '*', DIV = '...
true
6d29d1363e5397817cbaacc59e9e5be9edc99ca4
C++
long-gong/leetcode
/test/data-structures-linked-list/445_add_numbers_II_test.cpp
UTF-8
1,280
2.765625
3
[]
no_license
// // Created by saber on 8/21/18. // #include <src/data-structures-linked-list/445_add_numbers_II.hh> #include <gtest/gtest.h> TEST(AddNumbersIITest, Solution01Case01) { auto l1 = ListNode::create({7,2,4,3}); auto l2 = ListNode::create({5,6,4}); AddNumbersII01 an201; EXPECT_TRUE(ListNode::compare({7, 8,0,7...
true
14af5ea3d644fa5be50f0d8e7995a4fe880927bf
C++
hatv/QTowerDefense
/code/Cockroach.h
UTF-8
848
3.0625
3
[]
no_license
#ifndef COCKROACH_H #define COCKROACH_H #include <QtGui> #include "Enemy.h" /** * \class Cockroach * \image html img/cafard.png * \brief Représente un cafard * * Le cafard est un insecte (et hérite donc de la classe Enemy). * * Il a la spécificité de donner naissance à deux cafards de taille inférieure lorsqu'...
true
55d24c269bed2e746a4fc3ab2c0ab38bc80d8723
C++
patelpreet422/cipherschools
/minimize_the_max_adjacent_diff.cpp
UTF-8
925
2.90625
3
[]
no_license
#ifdef DEBUG #include <LeetcodeHelper.h> #include <prettyprint.hpp> #endif #include <bits/stdc++.h> using namespace std; using ll = long long; vector<int> find_max_of_k_size_window(vector<int> &v, int k) { vector<int> r; deque<int> q; int n = v.size(); for (int i = 0; i < n; ++i) { while (!q.empty() and q....
true
25cb3d7165d2175977803bb95cfe9f6cc43e8696
C++
PazerOP/StatusSpec
/src/modules/filesystemtools.cpp
UTF-8
1,841
2.515625
3
[ "BSD-2-Clause" ]
permissive
/* * filesystemtools.cpp * StatusSpec project * * Copyright (c) 2014-2015 Forward Command Post * BSD 2-Clause License * http://opensource.org/licenses/BSD-2-Clause * */ #include "filesystemtools.h" #include "convar.h" #include "filesystem.h" FilesystemTools::FilesystemTools() { searchpath_add = new Con...
true
e5b211dc60def531ae9024beea35edebf73136df
C++
moaiweishui/leetcode
/26. Remove Duplicates from Sorted Array/src.cpp
UTF-8
673
2.984375
3
[]
no_license
class Solution { public: int removeDuplicates(vector<int>& nums) { if(nums.size() == 0) return 0; else if(nums.size() == 1) return 1; vector<int>::iterator it1 = nums.begin(); while (it1 != nums.end()) { vector<int>::iterator it2; ...
true
490a49985bc07ad18acc6fbb62869df58e1006c1
C++
jtlai0921/XB1939_-_-
/ch09/CH09_15.cpp
BIG5
869
3.890625
4
[]
no_license
#include <iostream> #include <cstdlib> using namespace std; class Circle { private: const static double PI; static int counter; int radius; public: Circle(int r) { radius = r; counter++; } double Area(){ return PI*radius*radius; } ...
true
3d8c73f5038cc2c68fcbfae05ea9e7fa38046e8b
C++
Knabin/AlgorithmQ
/Chapter2/main_37.cpp
UTF-8
864
3.125
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(void) { int s, n, i, j, temp, idx; cin >> s; cin >> n; vector<int> vSize(s); vector<int> vNumber(n); for (i = 0; i < n; ++i) { cin >> vNumber[i]; idx = 0; temp = 0; for (j = 0; j < s; ++j) { if (vNumber[i] !...
true
749395645d2cebc4ff80832658752b74f264ec6f
C++
thirdeye18/CS162a
/Module 9/Lab 9/Lab 9/PalindromeStack.hpp
UTF-8
801
3.078125
3
[]
no_license
/********************************************************************* ** Program name: Lab 9 ** Filename: PalindromeStack.hpp ** Author: Justin Hammel ** Date: 6/4/2017 ** Description: Implementation for the PalindromeStack class. *********************************************************************/ #ifndef PALINDRO...
true
c53bdd67aecabcc86bbb4c5423a683763003f21c
C++
DirectX-Vulkan/DirectX11
/DirectX/Logger.cpp
UTF-8
1,696
2.984375
3
[]
no_license
#include "Logger.h" #include <filesystem> #include <fstream> #include <iostream> using namespace std; Logger::Logger(string pcId, string renderEngine, string objectName, TimeType timeType, char separator) { m_pcId = pcId; m_renderEngine = renderEngine; m_objectName = objectName; m_logs = vector<Log>(); m_timeTy...
true
67f38ee0fb65e5796ef072bc53e9deb2487adeb1
C++
xswxq/C-Primer-Plus
/chapter12/src/String2.cpp
GB18030
3,240
3.015625
3
[]
no_license
/*ߣlu ڣ Ȩ */ #include "String2.h" int String2::num_strings = 0; int String2::HowMany() { return num_strings; }; String2::String2() { len = 4; str = new char[1]; str[0] = '\0'; num_strings++; }; String2::String2(const char *s) { len = strlen(s); str = new char[len+1]; ...
true
87b4ea832ab9693efebf47b925eac30f0187231f
C++
webclinic017/Potts-Portfolio
/computer_science/cpp_lists/LinkedNode.h
UTF-8
554
3.046875
3
[]
no_license
// // Created by Toby Dragon on 10/24/16. // // Completed by Kenneth Potts as course project work // #ifndef LINKEDNODE_H #define LINKEDNODE_H class LinkedNode { private: int item; LinkedNode* next; public: LinkedNode(int item){ this->item = item; next = nullptr; } int getIte...
true
a3675727e6c1392321e7b39e575f2e339cb5ad10
C++
alexisv318/CPSC301Assignment4
/balance.cpp
UTF-8
2,084
3.390625
3
[]
no_license
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <cstring> using namespace std; struct PERSON{ char Name[20]; float Balance;}; void Display(PERSON(&person)[10], int &nPeople){ for (int i = 0; i < nPeople; i++) { cout << person[i].Name << " " << person[i].Balance << endl; } }...
true
7ffec6486086d1655637b6455b222a63259fa3a2
C++
PuppyRush/lesson
/main.h
UTF-8
288
2.65625
3
[]
no_license
#pragma once #include "ctor_dtor.h" #include <string> using namespace std; int main() { Animal animal; Animal* animal_ptr = new Animal{}; Animal& animal_ref = animal; animal_ref.SetName(new string{ "abc" }); string str; animal_ptr->SetName(str); animal_ptr->SetName(&str); }
true
5efe895aabb02643bdfb81609ae2b16d63596b1f
C++
changqing16/LeetCode
/0101-0150/138.cpp
UTF-8
872
3.34375
3
[]
no_license
#include <iostream> #include <unordered_map> #include <vector> using namespace std; class Node { public: int val; Node *next; Node *random; Node() {} Node(int _val, Node *_next, Node *_random) { val = _val; next = _next; random = _random; } }; Node *copyRandomList...
true
1b023d304a47da0863497e9a09aea4aef92854c4
C++
vintagewang/fuxedo
/src/svcrepo.h
UTF-8
2,278
2.546875
3
[ "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
// This file is part of Fuxedo // Copyright (C) 2017 Aivars Kalvans <aivars.kalvans@gmail.com> #include <map> #include "mib.h" #include "misc.h" struct queue_entry { int grpno; int msqid; }; struct service_entry { std::vector<queue_entry> queues; size_t current_queue; uint64_t cached_revision; uint64_t *...
true
d4da0988706aa83e2114978bc87106902287d41d
C++
NicoKNL/coding-problems
/problems/kattis/relocation/sol.cpp
UTF-8
442
2.625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int N, Q; cin >> N >> Q; unordered_map<int, int> M; for (int i = 1; i <= N; ++i) cin >> M[i]; while (Q--) { int OPT, A, B; cin >> OPT >> A >> B; if (OPT == 1) M[A] = B; if (OPT =...
true
b11e988e3b1c0d97a8ae264f2dd24ae7ed679f81
C++
pobortsevv/cpp_intro
/day04/ex01/SuperMutant.cpp
UTF-8
812
2.78125
3
[]
no_license
/* * =================================================================== * * Filename: SuperMutant.cpp * * Version: 1.0 * Created: 06/17/2021 10:13:08 * Compiler: clang++ * * Author: sabra * * =================================================================== */ #inc...
true
df2003d69cf9ca79dca8769f872d27c50472e274
C++
zhajee/Academic-Spring-2020
/Calculate Course Grades/calculateScores.cpp
UTF-8
1,524
3.171875
3
[]
no_license
#include "students.hpp" //calculate total score based on rawscores, points, and weights for each artifact void updateTotalScores(Student* student_info, int* points, int* weights, int num_students, int num_artif) { for (int i = 0; i < num_students; i++) { double sum = 0; for (int j = 0; j < num_arti...
true
9343596c3a5527440910a8a8afa2649b532c3de3
C++
orlov-dm/qt-chat
/ChatServer/core/connection.h
UTF-8
348
2.546875
3
[]
no_license
#ifndef CONNECTION_H #define CONNECTION_H #include <QTcpSocket> class Connection : public QTcpSocket { Q_OBJECT public: Connection(QObject *parent); void setClientName(const QString &name) { _clientName = name; } QString getClientName() const { return _clientName; } private: QString _clientName;...
true
a6c84b12fae05f5d45ee77c4d4bad0beb21135b9
C++
MachineMitch21/CodeGalore
/RendererStuff/src/VertexBufferLayout.h
UTF-8
993
3.140625
3
[]
no_license
#ifndef VERTEXBUFFERLAYOUT_H #define VERTEXBUFFERLAYOUT_H #include <GL/glew.h> #include <vector> struct VertexBufferElement { unsigned int type; unsigned int count; unsigned char normalized; static unsigned int SizeOfGLType(unsigned int type) { switch(type) { case G...
true
eaa160c6f0ea828733b81f6351c79685d530720b
C++
dongxiaorui/OJ
/SLCUPC-OJ/1877【函数】求最大公约数——递归.cpp
UTF-8
241
2.6875
3
[]
no_license
#include "stdio.h" int Gcd(int n,int m){ if(m<=n&&n%m==0) return m; else if(n<m) return Gcd(m,n); else Gcd(m,n%m); } int main() { int n,m; scanf("%d%d",&n,&m); printf("%d\n",Gcd(n,m)); return 0; }
true
018972a4ba7ce6fbfe3633b6273736af0c2c7390
C++
webstorage119/document-scanner-1
/abstractpapersheetdetector.cpp
UTF-8
3,038
2.90625
3
[]
no_license
#include "abstractpapersheetdetector.h" #include <opencv2/imgproc.hpp> //constexpr AbstractPaperSheetDetector::AbstractPaperSheetDetector(double minAreaPct, double maxAreaPct, double approxAccuracyPct) // : minAreaPct(minAreaPct>=0 && minAreaPct<=1 ? minAreaPct : throw std::invalid_argument("Min area percentage mus...
true
a4e55fa61d26e3f4f91a6f95ffadd552b7eeeb9b
C++
strengthen/LeetCode
/C++/682.cpp
UTF-8
2,555
2.828125
3
[ "MIT" ]
permissive
__________________________________________________________________________________________________ sample 4 ms submission class Solution { public: int calPoints(vector<string>& ops) { std::stack<int> opS; int sum {0}; for (const auto& op : ops) { if (op == "C") { ...
true
3c138a0a7c77356bec8178de7ddfc57633978f2d
C++
dom380/IMAT3606-Coursework-2
/include/Graphics/ModelComponent.h
UTF-8
3,241
2.6875
3
[ "MIT", "CC-BY-2.0", "Zlib", "CC-BY-3.0", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
#pragma once #ifndef MODELCOMPONENT_H #define MODELCOMPONENT_H #include "Graphics\stb_image.h" #include "Graphics\Bitmap.h" #include "Graphics\Texture.h" #include <Camera\Camera.h> #include "utils\ObjReader.h" #include "Renderers\Graphics.h" #include "GL\glm\glm\glm.hpp" #include "Shader.h" #include "Graphics\Transform...
true
f7e010863755c94e1f35120c3164d3b55fb980f6
C++
lsmmay322/BaekJoon
/9465.cpp
UTF-8
657
2.515625
3
[]
no_license
#include <iostream> using namespace std; #define MAX(a, b) (a > b) ? a : b int dp[2][100001]; int main() { int t, n; int res = 0; scanf("%d", &t); for (int i = 0; i < t; i++) { scanf("%d", &n); for (int j = 0; j <= 1; j++) { for (int k = 0; k < n; k++) scanf("%d", &dp[j][k]); } dp[0][1] += dp[1...
true
4cf57cb8fddfe32e1f5a01a0960e9670d51ff552
C++
hanhiver/mycpp11
/Concurrency/promise/promise.cpp
UTF-8
792
3.6875
4
[]
no_license
#include <iostream> // std::cout, std::endl; #include <thread> // std::thread #include <string> // std::string #include <future> // std::promise, std::future #include <chrono> // seconds void read(std::future<std::string> *future) { // Future will block untill its value set. std::cout << future->get(...
true
86ddf2e8097d086b9d3945f690fe151a2c544f19
C++
windystrife/UnrealEngine_NVIDIAGameWorks
/Engine/Source/Runtime/MovieScene/Public/Evaluation/PersistentEvaluationData.h
UTF-8
9,336
2.578125
3
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Stats/Stats.h" #include "MovieSceneFwd.h" #include "Evaluation/MovieSceneEvaluationKey.h" #include "Evaluation/MovieSceneEvaluationOperand.h" /** * Unique identifier for shared persistent data entries (see F...
true
3853a4d53b8d1442d9437f7d0da5147733f0dcea
C++
SinnerA/difftool
/diffstdout/diffstdout.cpp
UTF-8
2,934
2.765625
3
[]
no_license
// diffstdout.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "Templates.h" #include "FilePartition.h" #include "DiffEngine.h" // helper // // purpose:tells us whether the file exists BOOL FileExists(CString &szFilename) { BOOL bFound = FALSE; WIN32_FIND_DATA findFile; H...
true
13813e59717fc84865ac60ea416dbb017d931ef4
C++
Gleeber/ebml_parser
/main.cpp
UTF-8
9,579
2.59375
3
[ "MIT" ]
permissive
#include <iostream> #include <cstring> #include <cstdlib> #include <ctime> #include <bitset> #include <vector> #include <array> #include <chrono> #include <iomanip> #include <unistd.h> // requires unix #include <time.h> using std::cout; using std::string; using std::endl; using std::hex; using std::ostream; using st...
true
5e82883f4ec7e506861fad779aac8df60a3bb7b9
C++
sgzwiz/xbox_leak_may_2020
/xbox_leak_may_2020/xbox trunk/xbox/private/atg/samples/misc/sectionload/sectionload.cpp
UTF-8
9,757
2.625
3
[]
no_license
//----------------------------------------------------------------------------- // File: SectionLoad.cpp // // Desc: Illustrates loading and unloading of sections. // // Note: This was a somewhat difficult sample to write. Especially because // samples are by definition very small bits of code meant only to...
true
2bee64fd1e2c1c62c04414612f3ddc11a8c89751
C++
Banderi/GodotNeuralNetworkTests
/CLion/src/main.cpp
UTF-8
13,229
2.765625
3
[ "MIT" ]
permissive
#include <gdnative_api_struct.gen.h> #include <cstring> #include "main.h" #include "NN/neural_network.h" const char *p_class_name = "NNClass"; const godot_gdnative_core_api_struct *API = nullptr; const godot_gdnative_ext_nativescript_api_struct *nativescript_API = nullptr; typedef struct { char data[256]; } globa...
true
35672555872060a6a59cea68e5911ff1396ad901
C++
georgiosdoumas/ProgrammingCplusplus-
/CplusplusPrimer_5thEd_2012/chapter03/Exercise3.02.cpp
UTF-8
793
3.703125
4
[]
no_license
/* Exercise 3.2: Write a program to read the standard input a line at a time. Modify your program to read a word at a time */ #include <iostream> #include <string> using std::cin; using std::cout; using std::endl; int main() { cout << "Type text, line by line , and I will output it line-by-line (finish by giving...
true
7aededa33d0e4f8cd27e7cab728d46a65e1d0310
C++
ginkgo/AMP-LockFreeSkipList
/test/sssp/Simple/SimpleSssp.h
UTF-8
1,797
2.625
3
[]
no_license
/* * SimpleSssp.h * * Created on: Jul 16, 2012 * Author: Martin Wimmer * License: Boost Software License 1.0 */ #ifndef SIMPLESSSP_H_ #define SIMPLESSSP_H_ #include "../sssp_graph_helpers.h" #include "SimpleSsspPerformanceCounters.h" namespace pheet { template <class Pheet> class SimpleSssp : public ...
true
46d0ae37ed19ace90587e084031a83cd2424e356
C++
Aftermath863/my-code
/C++project4/C++project4.cpp
UTF-8
4,410
3.328125
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include <iomanip> #include <exception> #include <typeinfo> #include <string.h> #include<iostream> using namespace std; template <typename T> class MAT { T* const e; //指向所有整型矩阵元素的指针 const int r, c; //矩阵的行r和列c大小 public: MAT(int r, int c) :MAT::r(r), MAT::c(c)...
true
e0bd8bf361d271558391529c6f42b80c3bad0cac
C++
mt-revolution/Competition
/Atcoder/JOI2013finalA.cpp
UTF-8
729
2.78125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int tmp = 0; vector<int> light(N+1); // 交互列の長さをカウント vector<int> sequence; sequence.push_back(0); cin >> light[1]; tmp = 1; for (int i = 2; i <= N; i++) { cin >> light[i]; if (light[i] ...
true
153fbd35b10e21ab7576187062634818e354d28d
C++
southernEast/SEU_553
/2014/4/Date.cpp
GB18030
1,060
3.59375
4
[]
no_license
#include "Date.h" #include <iostream> using namespace std; Date::Date(unsigned y, unsigned m, unsigned d) { setDate(y, m, d); } void Date::setDate(unsigned y, unsigned m, unsigned d) { static unsigned days[2][13] = { { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, // ÿµ { 0, 31, 29, 31, 30, 31, 30, 31, ...
true
b0afbc579c55255633103ace13c83b01b00a1688
C++
VolodymyrShkrynda/4.6
/4.6/Source.cpp
UTF-8
1,662
3.5
4
[]
no_license
// Lab_03_4.cpp // < Шкринда Володимир // Лабораторна робота № 4.6 // Табуляція функції, заданої формулою: функція з параметрами // Варіант 22 #include <iostream> #include <cmath> using namespace std; int main() { double P,P1, P2; int n, k; k = 1; P2 = 1; while (k<=20) { P1 = 1; n = 1; while (n<=25-k) { ...
true
7220cf3f00f4ce713931b4c250f4351a04cf4e95
C++
kimdy003/AlgorithmStudy
/Study/3_week/2_1464.cpp
UTF-8
341
2.75
3
[]
no_license
//분할정복 #include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string str, temp; cin >> str; for(int i=1; i<str.length(); i++){ if(str[i] > str[i-1]){ temp = str[i]; str.erase(i,1); str = temp + str; } } c...
true
9f570cbd6c670f232318c43fd627b46acfa0bffb
C++
angelalim1010/Cybersecurity-labs
/program1.cpp
UTF-8
753
3.953125
4
[]
no_license
#include <iostream> #include <climits> using namespace std; int main(){ int i ; int j ; int result; cout << "For this compiler: integers are: " << sizeof(int) << " bytes" << endl; cout << "The largest integer is: " << INT_MAX << endl; cout << "The smallest integer is: " << INT_MIN << endl; cout << "...
true
08165e280be049e3d133295de84adede78f48317
C++
alexandraback/datacollection
/solutions_5630113748090880_0/C++/mooncalf/b.cpp
UTF-8
417
2.859375
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main() { int t, n, h; cin >> t; for (int i = 0; i < t; ++i){ cin >> n; int nums = (2*n-1)*n; int heights[2501] = {0}; for (int j = 0; j < nums; ++j) { cin >> h; ++heights[h]; } cout << "Case #" << i + 1 << ": "; for (int j = 1...
true
490141a40f4fa90970c4e2fece818889026ecf3b
C++
StevensDeptECE/CPE390
/old/2020F/session03/byvalue.cc
UTF-8
872
3.921875
4
[]
no_license
#include <iostream> using namespace std; void f(int x) { // pass by value cout << x << '\n'; x = 99; } void g(int& x) { //pass by reference (we have a pointer to where the parameter lives) cout << x << '\n'; x = 22; } void h(int* x) { // x is a pointer to where the number lives cout << x << '\n'; ...
true
01440c67bd457ad649e442bf368579abf857f1dd
C++
teodoraalexandra/Data-Structures-And-Algorithms
/DSALAB7/BSTNode.h
UTF-8
758
2.859375
3
[]
no_license
// // Created by Teodora Dan on 2019-05-28. // #ifndef DSALAB7_BSTNODE_H #define DSALAB7_BSTNODE_H #include "utility" typedef int TKey; typedef int TValue; typedef std::pair<TKey, TValue> TElem; class BSTNode { private: TElem value; BSTNode *leftChild; BSTNode *rightChild; public: BSTNode(std::pai...
true
b282aeee9aab5c9b9ee73990abb4c419519f8590
C++
jinq0123/rpcz
/src/rpcz/connection_info_zmq.hpp
UTF-8
1,217
2.734375
3
[ "Apache-2.0" ]
permissive
// Licensed under the Apache License, Version 2.0. // Author: Jin Qing (http://blog.csdn.net/jq0123) // Read and write connection_info through zmq. #ifndef RPCZ_CONNECTION_INFO_ZMQ_HPP #define RPCZ_CONNECTION_INFO_ZMQ_HPP #include <zmq.hpp> #include <rpcz/connection_info.hpp> #include <rpcz/zmq_utils.hpp> // for sen...
true
5700412e1aae3c14bd1952d9f713b16f290d3398
C++
AnotherSuperIntensiveMinecraftPlayer/ATACS
/src/POSET.cc
UTF-8
26,978
2.609375
3
[ "Apache-2.0" ]
permissive
////////////////////////////////////////////////////////////////////////// // @name POSET.cc => Code to implement POSET class defined in bap.h // @version 0.1 alpha // // (c)opyright 2001 by Eric G. Mercer // // @author Eric G. Mercer ////////////////////////////////////////////////////////////////////////// #include ...
true
4bb463812771252cfa76c8257e48ead3c58a730a
C++
myevan/el.lua
/Sources/Delegate.h
UTF-8
4,139
3.34375
3
[]
no_license
#pragma once #include <vector> #include <memory> #include <functional> #include <cassert> namespace EL { class HandleManager { public: uint32_t AllocHandle() { uint32_t handle; if (m_freeIndices.empty()) { handle = GenerateHandle(m_totalH...
true
7edb9edcfc820b67b8572fd2d14504b5d4252b2f
C++
vaibhavdangayachvd/CPP-Programming
/Practise/Design Patterns/Factory Design/main.cpp
UTF-8
351
2.578125
3
[]
no_license
#include<iostream> #include<cstdlib> #include<conio.h> #include "implementation\\factory.cpp" int main() { toy *ptr; while(true) { system("cls"); ptr=factory::create_toy(); if(ptr) ptr->show_product(); else std::cout<<"\nProduct not found !!"; ...
true
ddafd05cd461a936978f97da7bba856ca96d0529
C++
taronegeorage/AlgorithmTraining
/Dynamic Programming/8.Burst Balloons/solution.cpp
UTF-8
560
2.578125
3
[]
no_license
class Solution { public: int maxCoins(vector<int>& nums) { int n = nums.size(); vector<int> newnum(n+2, 1); for(int i = 1; i <= n; i++) newnum[i] = nums[i-1]; vector<vector<int> > c(n+2, vector<int>(n+2, 0)); for(int l = 1; l <= n; ++l) for(int i = 1; i ...
true
e9bde4e99f07b6ced5d9c6c78eb8feec69467576
C++
Solairseir/StereoVisionRobotMM1
/Robot Vision Windows/Robot Vision Windows/Headers/IMUCommunication.h
UTF-8
1,486
2.6875
3
[ "MIT" ]
permissive
#pragma once #include "SerialPorts.h" namespace RobotVisionWindows { public ref class IMUCommunication { private: SerialPorts IMUPort; float Yaw; float Pitch; float Roll; public: bool Initialize(System::String^ Portname,int BuadRate){ return IMUPort.PortOpen(Portname,BuadRate); } //**************...
true
9428228329a65634f942b8671949ca89ac3b0aff
C++
BFriedrichs/uni
/Programming/friedrichs_3003421_ex12/task02/queue.tpp
UTF-8
1,766
3.78125
4
[]
no_license
#include <iostream> #include "queue.hpp" /** * @brief Queue Constructor */ template<class T> Queue<T>::Queue() { this->list = new List<T>; } /** * @brief Queue Destructor */ template<class T> Queue<T>::~Queue() { delete this->list; } /** * @brief Add an item to back of the queue * * @param T, item to...
true
9b3f7ea6deb8adcd9d9573c5cd0a216553fd8b81
C++
DouglassValenzuela/Programacion2
/Determinar Numero/main.cpp
UTF-8
435
3.390625
3
[]
no_license
#include <iostream> #include<stdlib.h> //ingresar un numero y determinar si es positivo, negativo o cero using namespace std; int numero; int main() { cout<<"Ingresar un numero"; cin>> numero; if (numero>0) { cout<<"Es positivo"; } else if (numero<0) { cout<<...
true
52d64215464e315bf75a34cc1366e4c15564c769
C++
SunInTeo/ImageEditor-Parser
/Header Files/Command.h
UTF-8
1,608
3.84375
4
[]
no_license
/** @file Command.h * @brief * * Class Command helps with processing given commands. * * @author Teodor Karushkov * @bug No known bugs. */ #pragma once #include <iostream> #include <vector> #include <string> #include <cstring> class Command { private: std::string rawString; std::vector<std::str...
true
67a0b70a3addcefa3879a656a1368ac79b329374
C++
Kawser-nerd/CLCDSA
/Source Codes/AtCoder/agc026/A/4634370.cpp
UTF-8
847
2.609375
3
[]
no_license
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <map> #include <vector> using namespace std; typedef long long int ll; int main(int argc, char const *argv[]) { int N; cin >> N; vector<int> a(N); for (size_t i = 0; i < a.size(); i++) { cin >> a[i]; } ...
true
bdf9108f711516c7fa63c176d84f310af0d52825
C++
HGD-CodeMe/c_or_cpp
/My Procedure/c++/39.cpp
UTF-8
301
2.796875
3
[]
no_license
#include<iostream> using namespace std; void swap(int a[10]) { int i,j,t; for(j=0;j<10;j++) for(i=0;i<9-j;i++) if(a[i]>a[i+1]) { t=a[i+1]; a[i+1]=a[i]; a[i]=t; } for(i=0;i<10;i++) cout<<a[i]; } main() { int x[10]; int i; for(i=0;i<10;i++) cin>>x[i]; swap(x); }
true
1269d852af519122f8c4199ec4f45d18306de343
C++
cmarcario/FieaGameEngine
/ActionIncrement.h
UTF-8
2,391
3.03125
3
[]
no_license
#pragma once #include "Action.h" #include "Factory.h" #include "Signature.h" namespace FieaGameEngine { /// <summary> /// ActionIncrement class /// increments a set target (float) by the step /// </summary> class ActionIncrement : public Action { RTTI_DECLARATIONS(ActionIncrement, Action); public: /// <sum...
true
3771b1527281010cd9a8481108a5c16a92e3269a
C++
iiison/technical-interview-prep
/LeetCode/Previous-Permutation-with-One-Swap.cpp
UTF-8
934
3.828125
4
[]
no_license
/* Given an array A of positive integers (not necessarily distinct), return the lexicographically largest permutation that is smaller than A, that can be made with one swap (A swap exchanges the positions of two numbers A[i] and A[j]). If it cannot be done, then return the same array. Example 1: Input: [3,2,1] Output...
true
72bf1acb08d98fafb467fdee82356714e1a847df
C++
RoboSherlock/robosherlock
/robosherlock/src/segmentation/symmetrysegmentation/include/robosherlock/NonLinearOptimization/Functor.hpp
UTF-8
6,061
2.5625
3
[]
no_license
/** * Copyright 2014 University of Bremen, Institute for Artificial Intelligence * Author(s): Ferenc Balint-Benczedi <balintbe@cs.uni-bremen.de> * Thiemo Wiedemeyer <wiedemeyer@cs.uni-bremen.de> * Jan-Hendrik Worch <jworch@cs.uni-bremen.de> * * Licensed under the Apache License, Version 2.0 (the "...
true
0c8d269f4035297b59d01a35250f28d48389ab5a
C++
Cesea/Portfolio
/Hunter/ApplicationTimer.h
UTF-8
798
2.515625
3
[]
no_license
#ifndef APPLICATION_TIMER_H #define APPLICATION_TIMER_H #include "SingletonBase.h" class ApplicationTimer : public SingletonBase<ApplicationTimer> { public : ApplicationTimer(); ~ApplicationTimer(); void Initialize(int32 targetMS); void Tick(); inline float GetDeltaTime() { return (float)_currentDeltaSecond; ...
true
00f655b8e386c25c0921e8965cefdf1caf9e0e22
C++
arifkhan1990/Competitive-Programming
/Data Structure/Stack/implementation/stack.cpp
UTF-8
603
3.21875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int stk[10001]; int top = -1; void push(int data, int n) { if(top != n-1) { stk[++top] = data; } } bool empty() { return (top == -1)? 1:0; } void pop() { if(!empty()) top--; } int size() { return top+1; } int topData() { return stk[top];...
true
222ab856a4c0b4e93ec6c27a346a906b30f78632
C++
zh7314/drogon_test
/third_party/drogon/orm_lib/src/ArrayParser.cc
UTF-8
7,602
3
3
[ "MIT", "BSD-3-Clause" ]
permissive
/** Handling of SQL arrays. * * Copyright (c) 2018, Jeroen T. Vermeulen. * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. */ // Taken from libpqxx and modified /** *...
true
df8879c4fa85cb77239a8781901c93755453f487
C++
aryansj/data-structures-
/bfs.cpp
UTF-8
1,423
3.609375
4
[]
no_license
#include<bits/stdc++.h> using namespace std; void addEdge(int x, int y, vector <int> *adj){ // function to add an edge from node x to node y adj[x].push_back(y); } void bfs(int start, int n, vector <int> *adj){ bool visited[n]; // create an array of boolean to check if a node i...
true
e6dceaab9e0e2a9a1e54716203bfd5478856a483
C++
tectronics/cvekas
/source/VertexFormat.cpp
UTF-8
3,931
2.765625
3
[]
no_license
#include "stdafx.h" #include "VertexFormat.h" namespace Cvekas { VertexFormat::VertexFormat() : has_position(false), number_of_uvs(0), has_normal(false), has_binormal(false), has_tangent(false), has_color(false), needs_rebuild(false), declaration(NULL) { } VertexFormat::VertexFormat(bool po...
true
287163ef076468e41b4ecd27c616c0b77407e6c7
C++
doniaGhazy/tera_sort
/TeraSortItem.hpp
UTF-8
5,843
3.15625
3
[]
no_license
#ifndef TeraSortItem_H #define TeraSortItem_H #include <string.h> #include <algorithm> #include <cstdint> #include <inttypes.h> typedef unsigned __int128 uint128_t; using namespace std; class Sortable { private: public: //pure virtual methods to be inherited to all child classes Sortable(){} Sortable...
true
de9b0a13cf97ed6bc06261547de2ccd7e7abb4ab
C++
frovedis/frovedis
/test/core/test2.5.2/test.cc
UTF-8
1,487
2.625
3
[ "BSD-2-Clause" ]
permissive
#include <frovedis.hpp> #include <boost/algorithm/string.hpp> #define BOOST_TEST_MODULE FrovedisTest #include <boost/test/unit_test.hpp> using namespace frovedis; using namespace std; std::vector<std::string> splitter(const std::string& line) { std::vector<std::string> wordvec; boost::split(wordvec, line, boost:...
true
bb2198983823b18e9074120268c13a3b800f992a
C++
pieisland/2021-coding-test-preparing
/백준/1912. 연속합(210225).cpp
UTF-8
942
2.984375
3
[]
no_license
#include<cstdio> #include<stdio.h> #include<iostream> #include<vector> #include<queue> #include<algorithm> #include<string> #include<cmath> using namespace std; int n; int arr[100000]; int dp[100000]; //n개의 정수로 이루어진 임의의 수열이 주어지는데 연속된 몇 개의 수를 선택해 구할 수 있는 합 중 가장 큰 합 구하기. //수는 한 개 이상 선택해야한다. //순간, 나를 포함을 안해도 되는 거 아닌가?...
true
f0fe95f10b83490cf3acbfa2f557c929ba0da55b
C++
AmandaPrasetiyoN/stack_dengan_linkedlist
/stack_linkedlist.cpp
UTF-8
2,002
3.78125
4
[]
no_license
#include <iostream> #include <string.h> using namespace std; struct Node{ int no; char nama[50]; char posisi[50]; Node *next; }; Node *top; class stack{ public: void push(int n,char pos[],char name[]); void pop(); void display(); }; void push(int n,char pos [],char ...
true
3d995b0a56d8d43f01fded748bf64855b6fa0c1d
C++
shailendra-singh-dev/ProgrammingChallenges
/Caribbean Online Judge COJ/1676 - Let us help George.cpp
UTF-8
558
2.953125
3
[]
no_license
#include <cstdio> #define FOR(i, a, b, c) for(i = a ; i <= b ; i += c) using namespace std; unsigned long long int N, i, diamonds, temp; int main() { while(scanf("%llu", &N) != EOF) { if(!N) break; if(N == 1) printf("Case %llu:\nn = %llu, diamonds = %d\n", N, N, 1); else if(N == 2) printf("Case %llu:\n...
true
3bf3fdc2925f0b0d21a571145f296f2463b3799d
C++
wonny-Jo/algorithm
/알고리즘 문제 풀이/BOJ/단계별 기초 연습/동적 계획법 1/2565_전깃줄/2565.cpp
UTF-8
549
2.578125
3
[]
no_license
#include<iostream> #include<algorithm> using namespace std; int main() { int N; cin >> N; int num[501] = { 0 }; int a; for (int i = 0; i < N; ++i) { cin >> a; cin >> num[a]; } int cache[101] = { 0 }; int size = 0; for (int i = 1; i <= 500; ++i) { if (num[i] == 0) continue; if...
true
cdfdc8916ea9e5f8004c5408015e1d83f22cee5e
C++
lkramer37/CS302-Data-Structures
/PA06/Project/PA06.2/ExpressionTree.cpp
UTF-8
4,850
3.6875
4
[]
no_license
/*In this laboratory, you construct an expression tree from the prefix form of an arithmetic expression. * * * */ #include <iostream> #include "ExpressionTree.h" using namespace std; template<typename DataType> ExprTree<DataType>::ExprTree() { root = NULL; } template<typename DataType> ExprTree<DataType>::...
true
5c4e9d614669c56102cb7a89185301432cd190f1
C++
lijinpei/clang-json-gen
/RecordInfo.hpp
UTF-8
4,214
2.625
3
[]
no_license
#pragma once #include "Directive.hpp" #include "clang/AST/DeclCXX.h" #include "llvm/Support/raw_ostream.h" namespace clang { class FieldDecl; class CXXRecordDecl; class CXXBaseSpecifier; } // namespace clang // the information needed by codegen functions struct CodegenContext { std::string indent; std::string s...
true
36de5b016135709b4a250be194f5f908dccd04fc
C++
a1d4c7/Betriebssysteme
/src/thread/ActivityScheduler.cc
UTF-8
4,062
2.75
3
[]
no_license
#include "thread/ActivityScheduler.h" #include "thread/Activity.h" #include "interrupts/IntLock.h" #include "device/Clock.h" #include "lib/Debugger.h" /* Suspendieren des aktiven Prozesses * Der korrekte Ausfuehrungszustand ist zu setzen * und danach der naechste lauffaehige Prozess zu aktivieren. */ void ...
true
c5fbc390451614936d958dd3fd4458fb5d5bd02a
C++
1InfinityDoesExist/Sigmoid
/Q5.cpp
UTF-8
1,749
3.6875
4
[]
no_license
#include<bits/stdc++.h> using namespace std; struct Node { int data; struct Node* next; Node(int val) : data(val), next(NULL){} }; class Solution { private: public: Solution(); struct Node *mergeSortedLinkedsList(struct Node *head1, struct Node *head2); }; Solution::Solution(){} ...
true
994a33411550646b64d7652e3c1a650c8e7fe910
C++
NathanBhamra/IMAT2908
/TeapotAD/TeapotAD/scenediffuse.cpp
UTF-8
4,951
2.546875
3
[]
no_license
#include <cstdio> #include <cstdlib> #include <iostream> #include "defines.h" #include "scenediffuse.h" #include <gtc/matrix_transform.hpp> #include <gtx/transform2.hpp> using std::cerr; using std::endl; using glm::vec3; //This struct is setting the lighting intensity struct S_Light { //Diffusion vec3 Ld; //Am...
true
fd2c7ace4d438a7279f5fda9b39d0f43184c801f
C++
BrandonColbert/Geon
/src/tilemap.cpp
UTF-8
2,155
3.109375
3
[]
no_license
#include "generation/tilemap.h" #include <cmath> #include <iostream> #include <sstream> #include "actor.h" #include "components/collider.h" #include "components/rect.h" #include "components/sprite.h" #include "structures/texture.h" #include "utils/format.h" #include "console.h" using namespace std; using namespace Fo...
true
cdfa3be23a0c08c7272c43b55f75bcbcbbd3841a
C++
DmitryKholodok/Osisp-2
/Lab4/Lab4/ThreadPool.cpp
UTF-8
1,813
2.875
3
[]
no_license
#include "stdafx.h" #include "ThreadPool.h" ThreadPool::ThreadPool(int threadCount) { InitializeCriticalSectionAndSpinCount(&threadPoolCritSection, 4000); InitializeConditionVariable(&threadPoolCondVar); this->threadCount = threadCount; this->closed = false; threads = new HANDLE[threadCount]; for (int ...
true
15710517caa4e4fe662caec2c7f0afa9bb865e6a
C++
orihehe/BOJ
/Graph/17182번_우주 탐사선.cpp
UTF-8
918
2.609375
3
[]
no_license
/* BOJ 17182 - 우주 탐사선 https://www.acmicpc.net/problem/17182 플로이드로 i->j의 최단거리를 구해둔 뒤 완탐 */ #include <cstdio> #include <algorithm> #include <cstring> #define INF 987654321 using namespace std; /* 🐣🐥 */ int arr[11][11]; int dp[11][1 << 10]; int n, k; int dfs(int cur, int mm) { if (mm == (1 << n) - 1) return 0; i...
true
13687fc8bb93a5dae5069ad92aa9c356106dcf45
C++
omwalhekar/arduino
/Binary/Binary.ino
UTF-8
1,109
2.75
3
[]
no_license
int pin1 = 11; int pin2 = 12; int pin3 = 13; int interval = 1000; void setup() { // put your setup code here, to run once: pinMode(pin3,OUTPUT); pinMode(pin2,OUTPUT); pinMode(pin1,OUTPUT); } void loop() { // put your main code here, to run repeatedly: //0 digitalWrite(pin3,LOW); digitalWrite(pin2,LOW)...
true
015007ccd467834b0bdb9656802181d625f66cac
C++
CameronJMurphy/AI-Repo
/Dinosaur Sim/IdleDecision.cpp
UTF-8
367
2.671875
3
[]
no_license
#include "IdleDecision.h" void IdleDecision::makeDecision(Agent* agent, float deltaTime) { vector2 agentSpeed = agent->GetVelocity(); //get speed //start to slow the agent down float slowAmount = 1.001f; if (agentSpeed.x != 0) { agentSpeed.x /= slowAmount; } if (agentSpeed.y != 0) { agentSpeed.y /= slowAm...
true
9a1d027c2a859a96126ec24c7e4308f30cabf4cf
C++
Aditya-013/Hackerrank-Stuff
/Trials/Longest Common Substring/Print_shortest_common_SuperSequence.cpp
UTF-8
1,890
2.921875
3
[]
no_license
#include <bits/stdc++.h> int main(){ char w[] = "acbcf"; char q[] = "abcdaf"; std::string temp; int n = sizeof(w); int m = sizeof(q); int t[n][m]; memset(t, 0, sizeof(t)); for(int i=1; i<n; i++){ for(int j=1; j<m; j++){ if(w[i-1] == q[j-1]){ t[i][j] = ...
true
3df36c363a283e3a63c59807f2a4562db1facad2
C++
destmaxi/ibrdtn
/ibrdtn/daemon/src/core/EventDispatcher.h
UTF-8
2,956
2.875
3
[ "Apache-2.0" ]
permissive
/* * EventDispatcher.h * * Created on: 06.12.2012 * Author: morgenro */ #ifndef EVENTDISPATCHER_H_ #define EVENTDISPATCHER_H_ #include "core/Event.h" #include "core/EventSwitch.h" #include "core/EventReceiver.h" #include <ibrcommon/thread/RWMutex.h> #include <ibrcommon/thread/RWLock.h> #include <ibrcommon/...
true
35d5733cf3f29e85c32b72f7a5f57e9e7bbb3cf7
C++
Annerley/Images
/PNGImage.h
WINDOWS-1251
360
2.5625
3
[]
no_license
#pragma once #include <string> #include"AbstractImage.h" class PNGImage final : public AbstractImage // final , { public: PNGImage(const std::string& fileName); void save(const std::string& outputName) override; std::string stringType() const override; };
true
7c87697a7b342eda9d8df5ce7ddb0c50d68aae4f
C++
causelovem/2-course
/c++/2_matrix_calculator/main.cpp
UTF-8
2,072
2.78125
3
[]
no_license
#include <cstdio> #include <cstring> #include <cstdlib> #include <iostream> #include <ctime> #include <climits> #include "class_Exception.hpp" #include "class_Big_int.hpp" #include "class_Rational_number.hpp" #include "class_Vector.hpp" #include "class_Matrix.hpp" #include "generator.hpp" using namespace std; int m...
true
06d242ffa010498560e861c4186305213e8d5643
C++
the-paulus/old-skool-code
/C++/ch11ptest2.cpp
UTF-8
912
2.90625
3
[]
no_license
#include<iostream.h> #include<fstream.h> #include<string.h> ofstream OUTFILE; ifstream INFILE; char StudentName[25], ch; int main() { OUTFILE.open("OUT.DAT",ios::out); do { cout << "\nEnter student's name and hit 'END' when finished: "; cin.get(StudentName,25); cin.ignore(80,'\n'); OUTFILE << StudentName ...
true
b1881186545b29ed7ebaa560238e643598781e12
C++
cavallo5/cpp_scripts
/src/Lettura e stampa matrice.cpp
UTF-8
626
2.71875
3
[]
no_license
#include<iostream> #include<cstdlib> using namespace std; int main() { const int maxrango=10; typedef int matrice[maxrango][maxrango]; matrice a; int n; cout<<"Inserire la dimensione della matrice"<<endl; cin>>n; for (int i=0;i<n;i++) for (int j=0; j<n;j++) { ...
true
6da6e9e79e7a6b1aac59595b67c5e5d034f4b3d3
C++
kizato1018/computer-programming
/NTNU/NM/matrix.cpp
UTF-8
8,790
3.046875
3
[]
no_license
#include <iostream> #include <vector> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include "matrix.h" using namespace std; // class Matrix { // public: // Matrix() : row_(0), col_(0), v_(nullptr) {}; // Matrix(int, int); // Matrix(const Matrix&); // // Matrix(int r, int...
true
e696ccf4c42fa33018ba16860041cb5813cc453a
C++
scorpio-su/zerojudge
/c++/d559.cpp
UTF-8
264
2.84375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; while (cin >> n){ cout <<"\'C\' can use printf(\"%d\",n); to show integer like "<<n << endl; } return 0; }
true
9309719e5b0fd3026d1002f373dcd5b3deeff48e
C++
mtiganik/Arduino-projects
/Exercise08.2 - OOP_version/JoystickController.cpp
UTF-8
5,206
2.78125
3
[]
no_license
/// FILE NAME: JoystickController.cpp /// AUTHOR: Mihkel Tiganik /// CREATED: 02.08.2018 /// MODIFIED: 03.08.2018 #include "JoystickController.h" JoystickController::JoystickController(Joystick* joystick, ConfigController* configController, MainDisplayController* ma...
true
f1c3768c12b0d043f2e1e9a4f1ece11156232109
C++
xiami2019/LeetCode
/剑指Offer/60.扑克牌中的顺子.cpp
UTF-8
1,152
3.03125
3
[]
no_license
class Solution { public: bool isStraight(vector<int>& nums) { sort(nums.begin(), nums.end()); int Zeros = 0; int index = 0; while (nums[index] == 0) { Zeros++; index++; } if (Zeros == 4) return true; int sequence = nums[index++]; ...
true
258a1a5b2954fc4ffa507ae0e873132cd7e0f957
C++
fedee96/Practico-2
/TP2/TP2/Operaciones_matematicas.h
UTF-8
378
2.75
3
[]
no_license
#pragma once class Operaciones_matematicas { public: Operaciones_matematicas(); ~Operaciones_matematicas(); #define CUADR(a) (a*a) float cuadrado(float a); #define SUM(a,b) (a+b) float sum(float a, float b); double aCirc(double r); double PI = (3,14159); #define CIRC(r) (2*PI*r) #define MAX(...
true
1ec1453507b83c88ad0936351b2d18053144fb0d
C++
ouxu/CppRecord
/OJ/1193.cpp
UTF-8
179
2.5625
3
[]
no_license
#include <iostream> using namespace std; int main() { const double pi=3.1415927; double r,v; while (cin>>r) { v=4*pi*r*r*r/3; printf("%.3lf\n",v); } return 0; }
true
336172ee1512ceb5e3d72946f6fc93187ef8525c
C++
tiennm99/CTDL-GT
/Lab4.cpp
UTF-8
7,774
3.703125
4
[]
no_license
#include <iostream> using namespace std; struct Node { int data; Node *next; Node() { this->data = 0; this->next = nullptr; } Node(int data) { this->data = data; this->next = nullptr; } Node(int data, Node *next) { this->data = data; ...
true
70514a381d3e937bfc0b2581c31c53496e3e5087
C++
navkamalrakra/random
/Lucky String.cc
UTF-8
1,109
3.234375
3
[]
no_license
#include<iostream> #include<cmath> #include<string> using namespace std; inline int calculate_digit(long); inline string create_binary(long); int main() { unsigned long t=0, digit; cin >> t; while (cin >> t) { digit = calculate_digit(t); } return 0; } inline int calculate_digit(long num) { long exp = 1 ,no...
true
459680510fe87386cfc6a135174bbe44fa1738f1
C++
Lee-JaeWon/Cpp_study
/함수참조복사생성자/OpenChallenge.cpp
UHC
4,310
3.453125
3
[]
no_license
// Chapter 5, OpenChallenge // ȣ ȯ, ȣ // ASCII code #include <iostream> #include <string> #include <locale> using namespace std; class Morse { private: string alphabet[26]; string digit[10]; string slash, question, comma, period, plus, equal; string text; public: Morse(); void text_to_Morse(string, string&);...
true
c6184a779a9e628d97bafa9f92d5b9d80c486e89
C++
wojiushimogui/leetCode
/isHappy.cpp
GB18030
993
3.890625
4
[]
no_license
#include<stdio.h> #include<stdlib.h> //Ĺܣָλĺ int everyDigitSquareSum(int n){ if(n<0){ return 0; } int sum=0; while(n){ int remainder=n%10; sum+=(remainder*remainder); n/=10; } return sum; } #define N 10000 //ĹܣǷtarget bool isExist(int *nums,int numsSize,int target){ if(nums==NULL||numsSize<1){ retur...
true
20c60a919708559a7dd831c9b3b25e2c32a07238
C++
zhengzebin525/LINUX-Environmental-programming
/C++编程/类的封装/lcd.cpp
UTF-8
2,032
2.890625
3
[]
no_license
#include "lcd.h" extern "C" { #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <sys/mman.h> #include <sys/ioctl.h> #include <linux/fb.h> } lcd::lcd(string lcdname) { this->lcdname = lcdname; } bool lcd::open() { //t...
true
4b8c90464d41879a71f866369631bf7312fb7cd6
C++
tibaes/motion
/backup/comp_norm_components.cpp
UTF-8
2,798
2.734375
3
[ "MIT" ]
permissive
/* Compute Normalized Mixtures * Input: GMM YML * Output: Normalized GMM YML * * Rafael H Tibaes [ra.fael.nl] * IMAGO Research Group */ #include <cv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/ml/ml.hpp> #include <opencv2/opencv.hpp> #include <cstdio> typedef struct Component { cv::Mat mean,...
true
f986fdfb82934bef708e62ba0c31ae58ed979643
C++
silent-lad/GFG
/course/12.BST/ceil.cpp
UTF-8
533
2.828125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define ll long long struct Node { ll value; Node *left; Node *right; }; Node *findCiel(ll x, Node *root) { Node *temp = root; Node *res = NULL; while (temp != NULL) { if (temp->value == x) { return temp; } ...
true
49552c8fe26097e1b56b1d1f7abe193394363bf3
C++
MPercieduSert/NoteCpp
/Library/Entities/AttributMultiple.h
UTF-8
5,785
2.90625
3
[]
no_license
/*Auteur: PERCIE DU SERT Maxime *Date: 17/02/2017 */ #ifndef ATTRIBUTMULTIPLE_H #define ATTRIBUTMULTIPLE_H #include "AttributSimple.h" /*! \ingroup groupeBaseAttributEntity * \brief Classe template des attributs multiple. */ template<class... Attribut> class Attributs; template<class Attribut> class Attributs<A...
true