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
544f6b5a6c0d741b6f593b28c58e56e36b2763c1
C++
AgmLee/Networking-Library
/Test Project/ntwk server/ntwk/ServerController.h
UTF-8
1,925
3.125
3
[ "MIT" ]
permissive
#pragma once #include <string> #include <vector> namespace ntwk { ///Though this class was made to help with controlling the ServerManger functions and settings, ///This was designed in a way that makes it more of a Command-line controller. ///Create a derived class and in 'compareToCommands' don't reference the Se...
true
275bcd3fa500269e4272a5530c9842f10899a060
C++
giranath/SpookySushi
/engine/async/public/job.hpp
UTF-8
3,805
2.78125
3
[]
no_license
#ifndef SPOOKYSUSHI_JOB_HPP #define SPOOKYSUSHI_JOB_HPP #include "../../platform/public/host_infos.hpp" #include <atomic> #include <cstring> #include <new> #include <memory> namespace sushi { namespace async { class job { public: using job_fn = void(*)(job&); private: job_fn fn; job* parent; std::ato...
true
d6bc35867679b31f4b7ed49e31a12cefb57ec1ec
C++
Nikitosis/Graph-Helper
/Forms/visualalgorithm.cpp
UTF-8
8,842
2.5625
3
[]
no_license
#include "visualalgorithm.h" #include "ui_visualalgorithm.h" VisualAlgorithm::VisualAlgorithm(Graph *graph,QWidget *parent) : QDialog(parent), ui(new Ui::VisualAlgorithm) { ui->setupUi(this); _graph=new Graph(graph,this); init(); initDfs(); isExit=false; } void VisualAlgorithm::init() { ...
true
865c6bcc9a7fe8f18594c8a27e09cb8b05e39988
C++
SBNSoftware/icaruscode
/icaruscode/Utilities/EventRegistry.h
UTF-8
7,018
2.703125
3
[]
no_license
/** * @file icaruscode/Utilities/EventRegistry.h * @brief Class keeping track of _art_ event IDs. * @author Gianluca Petrillo (petrillo@slac.stanford.edu) * @date January 22, 2021 * @see icaruscode/Utilities/EventRegistry.cxx * * * * */ #ifndef ICARUSCODE_UTILITIES_EVENTREGISTRY_H #define ICARUSC...
true
fca3713ab389484f5ff8468d0ddf0ada6a4fe8ad
C++
polybar/polybar
/include/utils/command.hpp
UTF-8
2,618
2.84375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
#pragma once #include "common.hpp" #include "components/logger.hpp" #include "components/types.hpp" #include "errors.hpp" #include "utils/file.hpp" POLYBAR_NS DEFINE_ERROR(command_error); enum class output_policy { REDIRECTED, IGNORED, }; /** * Wrapper used to execute command in a subprocess. * In-/output st...
true
fc73a457569d16077d40c136f437f12135e0a525
C++
AndrewBowerman/example_projects
/C++/selectionSort.cpp
UTF-8
2,695
4.1875
4
[]
no_license
/* selectionSort.cpp Andrew Bowerman 4 Sept 2018 user picks a number (n) array of n numbers are generated array of n numbers are sorted with selection sort */ #include <iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> using namespace std; // clearScreen() shoves all the ol...
true
00e2c6e34f8f7b0bd810ed09c957fcf33a54ad73
C++
RKrnn/ray_tracing
/texture.h
UTF-8
2,886
3.1875
3
[]
no_license
#ifndef TEXTURE_H #define TEXTURE_H #include "rtweekend.h" #include <iostream> class my_texture { public: __device__ virtual color value(float u, float v, const vec3& p) const = 0; }; class solid_color : public my_texture { public: __host__ __device__ solid_color() {} __host__ __de...
true
08f74d5fdaf6bebd6cb8b9378b21259250109203
C++
avinashw50w/practice_problems
/ACM ICPC/Practice problems/searching/Hackerrank - Search/count luck.cpp
UTF-8
4,040
3.5625
4
[]
no_license
/* Hermione Granger is lost in the Forbidden Forest while collecting some herbs for a magical potion. The forest is magical and has only one exit point, which magically transports her back to the Hogwarts School of Witchcraft and Wizardry. The forest can be considered as a grid of N×M size. Each cell in the forest ...
true
2926d629015e601d73df22812708f40e8d6e32d5
C++
charlottemarriner/Semester-1-GEC
/Week 3/Program9_Share of Savings/Share of Savings/Source.cpp
UTF-8
377
3.25
3
[]
no_license
#include<iostream> using namespace std; int main() { //Set values for mySavings and yourPercentage int mySavings = 2000; float yourPercentage = 50; //Set value for yourShare by using other variables int yourShare = (mySavings * (yourPercentage / 100)); //Output yourShare cout << "Your share: " << yourSh...
true
4d6e18f86952685f2577c5f2ad36720a95fd8360
C++
denis-gubar/Leetcode
/all/1404. Number of Steps to Reduce a Number in Binary Representation to One.cpp
UTF-8
410
2.765625
3
[]
no_license
class Solution { public: int numSteps(string s) { int result = 0; while (s != "1") { ++result; if (s.back() == '0') s.pop_back(); else { int i = s.size() - 1; for (; i >= 0; --i) if (s[i] == '1') s[i] = '0'; else { s[i] = '1'; break; } ...
true
a754ecd1d29443b9d5091c04e8e83602c35924c5
C++
paksas/Tamy
/Code/Include/core/RoundBuffer.h
UTF-8
2,142
2.875
3
[]
no_license
/// @file core/RoundBuffer.h /// @brief round buffer data structure #ifndef _ROUND_BUFFER_H #define _ROUND_BUFFER_H #include "core\MemoryRouter.h" #include "core\MemoryAllocator.h" /////////////////////////////////////////////////////////////////////////////// /** * This is a structure similar to a queue, but i...
true
a99417b81ad1789df843c6f642266f0754f7e713
C++
curet/Learningcpp
/general-practice/temp/max_of_dataset.cpp
UTF-8
717
3.984375
4
[]
no_license
// Write a C++ program to find the max of an integral data set. The program will ask the user to // input the number of data values in the set and each value. The program prints on screen a // pointer that points to the max value. #include <iostream> using namespace std; int main(){ int size = 1; int A[size]...
true
6acd743215dc30e27c88d5a42afb44638d612b55
C++
ChrisRzech/Snake
/src/TileMap/Map.cpp
UTF-8
2,173
3.15625
3
[]
no_license
#include "Map.hpp" #include <cmath> namespace TM { Map::Map(const sf::Vector2u& pixelSize, const sf::Vector2u& tileCount) : m_pixelSize(pixelSize), m_tileCount(tileCount) { updateTilePixelSize(); } sf::Vector2u Map::getPixelSize() const { return m_pixelSize; } sf::Vector2u Map::getTileCount() const { ...
true
ad9be34eb2f6f35991345d14cf9d8643e6e423c7
C++
Reactor11/Data-Structures-Practice
/Array/array_index_place.cpp
UTF-8
715
3.421875
3
[ "MIT" ]
permissive
// Place the elements of array according to their index. if not present place -1. #include<bits/stdc++.h> using namespace std; bool lfind(int a[],int val,int n){ for(int i=0;i<n;i++){ if(a[i]==val) return true; } return false; } int main(){ int n,k; cout<<"N : "; cin>>n; int arr[n],a[n]; for(int i=0;i<n;i+...
true
1a5f6ab892d5f2984ffd6c99ceaecf39aa1b9374
C++
xiaohunziaaaa/CUDAExercise
/MultiThreading/MutexLock.h
UTF-8
465
2.921875
3
[]
no_license
#ifndef __MUTEXLOCK_H__ #define __MUTEXLOCK_H__ #include <pthread.h> class MutexLock{ private: pthread_mutex_t mutex; public: MutexLock(){ pthread_mutex_init(&mutex, NULL); } ~MutexLock(){ pthread_mutex_destroy(&mutex); } void lock(){ pthread_mutex_lock(&mutex...
true
337dd0917ca722c09311139f6d191b955b6c1540
C++
korca0220/Algorithm_study
/ACMICPC/SWtest/Problem/Review/new_hanoi.cpp
UTF-8
1,338
2.640625
3
[]
no_license
#include <iostream> #include <vector> #include <array> #include <queue> #include <map> #include <tuple> #include <algorithm> #include <string> #include <cstring> using namespace std; int main(){ array<string, 3> in; for(int i=0; i<3; i++){ int cnt; cin >> cnt; if(cnt > 0){ ...
true
51fa1b33a23b3da3d9bdfdeddb98b3565aebeee1
C++
SerRataGo/CompetitiveCode
/CodeChef_problems/ATTND/solution.cpp
UTF-8
1,585
3.328125
3
[ "MIT" ]
permissive
// The logic is to check the first name of all students and maintain records of those students who have common first name. // By maintaining the record, we'll be able to distinguish the students whose first & last names need to be called out. #include<bits/stdc++.h> // includes every standard library #define lli long ...
true
0e3b1aa8fa2921e83f41738240a19d9eda6b79fc
C++
haneulshin1030/USACO
/List of Topics/(2) Data Structures/Storage/(6) Wavelet Tree.cpp
UTF-8
1,894
3.03125
3
[]
no_license
/** * Source: https://ideone.com/Tkters * Unused */ int MAX = 1000000; int a[300000]; struct wavelet { int lo, hi; wavelet *c[2]; vi b; wavelet(int *from, int *to, int x, int y) { lo = x, hi = y; if (lo == hi || from >= to) return; int mid = (lo+hi)/2; auto f = [mi...
true
69d0998238b9f573812365797e17aa932cbbdd74
C++
autious/kravall
/include/gfx/GFXInterface.hpp
UTF-8
16,167
2.5625
3
[]
no_license
#ifndef GFXINTERFACE_INCLUDE_HPP #define GFXINTERFACE_INCLUDE_HPP #ifdef _WIN32 #ifdef GFX_DLL_EXPORT #define DLL_API __declspec(dllexport) #else #define DLL_API __declspec(dllimport) #endif #else #define DLL_API #endif #include <glm/glm.hpp> #include <GL/glew.h> #include <GFXDefines.hpp> typedef glm::vec2 GFXVec2...
true
34d13394113c8efa47c3cb3b5af4ced159c83f48
C++
blacksea3/Cpp-STL-test
/other/CppAlgs/Graph/Prim.cpp
GB18030
1,856
3.1875
3
[]
no_license
#include "Prim.hpp" /* * PrimС * ߣÿһбʾһڵߣڲÿһpairfirstʾһڵ㣬secondʾģǸ * С * ⲿӦȷedgesijӼܹγͨͼ, ȷڵedges.size()ڵIDϷ */ int PrimInterface(vector<vector<pair<int, unsigned int>>> edges) { //ʵ϶ͷǰ{·Ӧڵ}pairʹĬgreater pairʽ priority_queue<pair<unsigned int, pair<int, int>>, vector<pair<unsigned int, pair<int, int>>>, greate...
true
149f9c400835c681bdde6771b1cf9e01eb18e476
C++
randym32/vector-cloud
/internal/log/util/logging/logging/printfLoggerProvider.h
UTF-8
1,149
2.625
3
[ "MIT" ]
permissive
/** * File: printfLoggerProvider * * Author: damjan stulic * Created: 4/25/15 * * Description: * * Copyright: Anki, inc. 2015 * */ #ifndef __Util_Logging_PrintfLoggerProvider_H_ #define __Util_Logging_PrintfLoggerProvider_H_ #include "util/logging/iFormattedLoggerProvider.h" namespace Anki { namespace Util { class P...
true
5b34650d6326944c639ee2adcff36099a4ed8e43
C++
PetyrEftimov/GitHubPetyrEftimov
/Nasledqvane_Car/Car.cpp
UTF-8
640
2.859375
3
[]
no_license
// // Car.cpp // Nasledqvane_Car // // Created by Pepi on 4/26/17. // Copyright © 2017 Pepi. All rights reserved. // #include "Car.hpp" #include <iostream> #include <vector> #include <string> using namespace std; Car::Car(){} Car::Car(string brand , string model){ this -> brand = brand; this -> model = mo...
true
990e572a58f9e3b02e21f4d9dc68a61aa0abe661
C++
qq464418017/bintalk
/compiler/Context.cpp
GB18030
1,172
2.515625
3
[]
no_license
#include "Context.h" #include "Options.h" #include <stdio.h> Context gContext; Context::Context(): lineno_(1) {} Context::~Context() { // ɾеdefinitionʵ. for(size_t i = 0; i < definitions_.size(); i++) delete definitions_[i]; } Definition* Context::findDefinition(const std::string& name) { for(size_t i = 0; i <...
true
9fe7838c433e25ae1923eb63d8c610cc0facfe85
C++
sergiyvan/robotic_vl
/src/tools/kinematicEngine/kinematicNode.h
UTF-8
6,301
2.59375
3
[]
no_license
/* * kinematicNode.h * * Created on: 12.02.2014 * Author: lutz */ #ifndef KINEMATICNODE_H_ #define KINEMATICNODE_H_ #include "kinematicVisual.h" #include "kinematicMass.h" #include "platform/hardware/robot/motorIDs.h" #include "utils/units.h" #include "utils/math/Math.h" #include <string> #include "phy...
true
5549fa7b20f9b2e32c22c892f32d3cb80b97decb
C++
santidv6/kairos-device-climatizer
/src/main/util.cpp
UTF-8
774
2.9375
3
[ "MIT" ]
permissive
#include "util.hpp" enum sources { EEPROM, DEFAULt }; const int source = DEFAULt; /** * Carga la configuración general. * @return configuración cargada */ Config LoadConfig() { struct Config config; switch (source) { case EEPROM: config = LoadEEPROMConfig(); break; case DEFAULt: config = LoadDEFA...
true
526858f2bf4db8498435da8b738c13717023a018
C++
kazunetakahashi/atcoder
/201510_201609/1114_codefes2015_final/E.cpp
UTF-8
1,033
2.609375
3
[ "MIT" ]
permissive
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <cmath> #include <tuple> #include <string> #include <cassert> using namespace std; typedef long long ll; int calc(string S, int x) { reverse(S.begin(), S.end()); f...
true
7bc00196cd0caa1cdc14e3d2af4bc15f3afad8c3
C++
FederikoCorp/Editor
/export/Core/Property/propertyfloat.h
UTF-8
764
2.84375
3
[]
no_license
#ifndef PROPERTYFLOAT_H #define PROPERTYFLOAT_H #include <limits> #include "property.h" class PropertyFloat : public Property { public: PropertyFloat(const std::string &name); ~PropertyFloat() override = default; void createPropertyControl(UserInterfaceGateway *userInterfaceGateWay) override; Storage...
true
4131e940e25051dca4b4e4a947bce27dbf0046dc
C++
knagar06/Competitive-Coding
/Leetcode/Medium/15 Kth Largest Element in an Array.cpp
UTF-8
527
3.015625
3
[]
no_license
class Solution { public: int findKthLargest(vector<int>& nums, int k) { // declare a min heap // where in question it is given largest/greatest means create min heap and for smaller create max heap int val; priority_queue<int,vector<int>,greater<int>> minh; int n= nums.size(); for (in...
true
b5a94f2e5afc3c87389c006315af197471f66d12
C++
Swarnava1997/Image-Processing
/Day 2/assignment2.cpp
UTF-8
657
2.6875
3
[]
no_license
//scale down a image(half) #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/core/core.hpp" using namespace cv; int main () { Mat img=imread("a.png",0); int m=img.rows; int n=img.cols; Mat tmp(m/2+1, n/2+1, CV_8UC1, Scalar(0) ); namedWindow ("win", WINDOW_NORMAL);...
true
4c8b86002a380211b6350229d0454aedcc3839c9
C++
ezEngine/ezEngine
/Code/Engine/Core/ResourceManager/ResourceManager.h
UTF-8
24,960
2.578125
3
[ "MIT" ]
permissive
#pragma once #include <Core/ResourceManager/Implementation/WorkerTasks.h> #include <Core/ResourceManager/Resource.h> #include <Core/ResourceManager/ResourceHandle.h> #include <Core/ResourceManager/ResourceTypeLoader.h> #include <Foundation/Configuration/Plugin.h> #include <Foundation/Containers/HashTable.h> #include <...
true
1ef76f95748799a4d5925782fea7a83604e9f350
C++
prajogotio/expriment-kalmanfilter
/kalman.h
UTF-8
1,586
2.890625
3
[]
no_license
#ifndef KALMAN_KALMAN_H #define KALMAN_KALMAN_H #include "matrix.h" namespace kalman { class KalmanFilter { public: // 'initial_mean' refers to the initial state of the system, while // 'initial_covariance' refers to the initial error matrix of the state. KalmanFilter(const Matrix& initial_mean, const Matrix&...
true
8d3ee197798bc8c177dcb466095f70252bdd4dd3
C++
RomanPas/Lab_2
/tests/test_database.cpp
UTF-8
2,924
3.140625
3
[]
no_license
#include "gtest/gtest.h" #include "tools.h" #include "ipv4.h" #include "database.h" #include <vector> using namespace std; namespace { class TestDatabase : public Database { public: const vector<Ipv4>& getData() const; pair<itIp, itIp> checkFindRange(Ipv4 min, Ipv4 max); bool checkCorrectIp(const std::vector...
true
06bd67e062b9c9ae6b56e759628b9e821302f1ee
C++
MatiCuartero/Matias
/Correcciones de Franquito 2.0/TP Final cosnultas/Project34/cRamal.cpp
UTF-8
675
2.515625
3
[]
no_license
#include "cRamal.h" #include "cParada.h" #include "cListaT.h" cRamal::cRamal() { //////////agregar algo///////////// nombre = ""; } cRamal::cRamal(string nombre, cParada *parada1, cParada *parada2, cParada *parada3, cParada *parada4, cParada *parada5) { /*this->parada1 = parada1; this->parada2 = par...
true
d2a5bfca07fcb209bd3ac16eed58b37d617352ac
C++
QAlexBall/C-
/exercise_cpp11/list_back_test.cpp
UTF-8
367
3.171875
3
[]
no_license
// // Created by deren zhu on 2019/10/15. // #include<iostream> #include<list> int main(){ // Initialization of list std::list<int> demo_list; // Adding elements to the list demo_list.push_back(10); demo_list.push_back(20); demo_list.push_back(30); // prints the last element of demo_list ...
true
4cb6b7e0241862b2d96e85f85df2d75462024c1a
C++
nonanona/myeditor
/src/text_util.cc
UTF-8
476
2.796875
3
[]
no_license
#include "text_util.h" namespace text_util { std::vector<std::vector<uint32_t>> split(std::vector<uint32_t> str, uint32_t delimiter) { std::vector<std::vector<uint32_t>> result; std::vector<uint32_t> element; for (uint32_t i = 0; i < str.size(); ++i) { element.push_b...
true
63c94217b1f6f25f2fa28ad6be4f57d67427d06d
C++
benard-g/wire-frame
/src/space/shape/Cube.cpp
UTF-8
1,796
2.859375
3
[ "MIT" ]
permissive
#include "wf/space/shape/Cube.hpp" wf::space::shape::Cube::Cube(double size, sf::Color color): m_size(size), m_color(color) {} void wf::space::shape::Cube::generateLines(LineInserter const &insertLine) { double offset = m_size / 2; // Points wf::core::Position front1{ .x=-offset, .y=-o...
true
52251dc4921a484b9fc09f29525834bb4f00bcd2
C++
Szymon200227/vector-json
/cgi-vector-sortowanie.cpp
UTF-8
2,065
2.953125
3
[]
no_license
#include <iostream> #include <vector> #include <fstream> #include <conio.h> #include <queue> #include <string> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; struct osoba { string imie, nazwisko; int wiek; }; ...
true
7d233ce83910772d62e7619d670c9f527df508b7
C++
geekhch/homework
/CPP/程序/第6章程序/s6_13/smain6_13.cpp
GB18030
797
3.390625
3
[]
no_license
// ļ·:s6_13\smain6_13.cpp #include <iostream> // Ԥ #include <deque> // Ԥ #include <stack> // Ԥ using namespace std; // ʹռstd int main() // main() { stack<int> s; // ջ for(int i = 1; i <= 5; ++i) { // ջ s.push(i); // iջ } c...
true
b1b4e368ef7fe4feafc8f1adf21fcb0f55192032
C++
ColorlessBoy/leetcode
/84.柱状图中最大的矩形.cpp
UTF-8
1,022
3.234375
3
[]
no_license
/* * @lc app=leetcode.cn id=84 lang=cpp * * [84] 柱状图中最大的矩形 */ #include <bits/stdc++.h> using namespace std; // @lc code=start class Solution { public: int largestRectangleArea(vector<int>& heights) { if(heights.empty()) return false; stack<int> s; heights.push_back(0); int n = ...
true
a20ef9bdab182490ab3c2380c96dcb324f89f0c7
C++
Sandeep-Pasumarthi/4thSemster
/ProgrammingParadigmsLabaratory/Lab-4/Part 1/PP_A4_Part1_P2.cpp
UTF-8
4,221
3.390625
3
[]
no_license
#include <iostream> using namespace std; class Person { protected: string name; int age; char gender; public: Person(){}; Person(string, int, char); ~Person(); virtual void readData(string, int, char); virtual void displayData(); }; class Student : virtual public P...
true
ff247e74cb0edc57b55d2e0174203f660a4d5024
C++
KhaledAbdelgalil/sheet-mostafa-saad-problem-solving-
/Some Explaintion/Topics to be taken/DP/content in vidoes/videos 1-12/video12/dp19/main.cpp
UTF-8
1,258
3.125
3
[]
no_license
//probability with dp //TC: PrimeSoccer(another solution(prob without dp)in video 12 is left for now) #include <bits/stdc++.h> using namespace std; double a,b; double table[19][19][19];//state is which interval what a scores till now what b scores till now bool prime(int n) { switch(n) { case 0: case 1...
true
45a40f75d2f66d4f5704e1af452c787fc81afb33
C++
rohanraja/dbms_abhijeet
/delta.cpp
UTF-8
890
2.90625
3
[]
no_license
#include <cmath> #include <vector> #include <iostream> #include<string> #include<sstream> #include<map> #include<cstdlib> #include<utility> using namespace std; struct WINDOW{ int x0, x; vector<int> T; vector<int> Y; int sumx, sumy, sumx2, sumy2, sumxy ; }; struct CONSTANTS{ float a, b ; }; CONSTANTS...
true
9ab31915eb5141d50ee63501ed0ac4f62866d6b6
C++
Forrest-Z/cplus_plus_code
/014_UNIX_LINUX/getopt/getopt2.cpp
UTF-8
1,057
3.296875
3
[]
no_license
#include<iostream> #include<unistd.h> class Program { public: Program(unsigned int c) : count(c) {} void run(); private: unsigned int count; }; void Program::run() { for(unsigned int i = 0; i < count; ++i) { std::cout << "Hello World with getopt!.\n"; } } int main(int argc, char **argv) {...
true
4e1fe12382921bdf95993643183283777ead1342
C++
vinsonleelws/LeetCode
/223-Rectangle Area.cpp
UTF-8
1,542
3.46875
3
[]
no_license
Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner as shown in the figure. Rectangle Area Example: Input: -3, 0, 3, 4, 0, -1, 9, 2 Output: 45 Note: Assume that the total area is never beyond the maximum possible value of...
true
9a583feff7f06c792563c8e7ea84a25fa61a8ac6
C++
jiahaochen666/CS103
/lab3/Automobile.cpp
UTF-8
162
2.53125
3
[]
no_license
#include "Automobile.hpp" Automobile::Automobile(std::string n, double sp, double w, int sz): Vehicle(std::move(n), sp, w, sz){} Automobile::~Automobile(){}
true
d94a8bfdbad5fad6a7706a769169f7d09e15f9e7
C++
padesai/Caching
/MyTag.cc
UTF-8
1,075
2.625
3
[]
no_license
#include "ns3/tag.h" #include "ns3/packet.h" #include "ns3/uinteger.h" #include <iostream> #include "MyTag.h" namespace ns3 { TypeId MyTag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::MyTag") .SetParent<Tag> () .AddConstructor<MyTag> () .AddAttribute ("TagData", ...
true
36015e0993dd3d4e70813144ea17f01a1b513aaa
C++
opendarkeden/server
/src/server/gameserver/item/Dermis.h
UHC
3,868
2.78125
3
[]
no_license
////////////////////////////////////////////////////////////////////////////// // Filename : Dermis.h // Written By : Elca // Description : ////////////////////////////////////////////////////////////////////////////// #ifndef __DERMIS_H__ #define __DERMIS_H__ #include "Item.h" #include "ConcreteItem.h" #include...
true
cb361cc4e25463dc45e42181e15ec60eec68361a
C++
luabeltranga/Herramientas
/MatrixCodes/gsl/chp03/arraysUniv2.cpp
UTF-8
2,023
3.890625
4
[]
no_license
// ejemplos de arrays unidimensionales // ejemplo: // tipo name[int size]; #include <iostream> using namespace std; typedef double REAL; // typedef float REAL; #define SIZE 7 int main(void) { // int size = 5; // declarar arreglo de int int arrayInt[SIZE]; // declarar arreglo de REAL REAL arrayReal[SIZ...
true
8c71487e374e3ba01c3b610e06edd53d6a2cdc3e
C++
CPardi/Test-Cpp
/Mandlebrot/Grid.hxx
UTF-8
901
3.640625
4
[]
no_license
#include "Grid.h" template<class resultType> Grid<resultType>::Grid(int xPoints, int yPoints, resultType x0, resultType xMax, resultType y0, resultType yMax) { // Set the classes public fields. XPoints = xPoints; YPoints = yPoints; // Intialize vectors. _xValues.resize(xPoints); _yValues.resize(yPoints); // ...
true
7345ec0b57c56c46e309fc243981af9b965d4748
C++
karlgluck/evidyon-2.10
/Evidyon/apps/common/gui/guirect.cpp
UTF-8
4,044
3.09375
3
[ "MIT" ]
permissive
//------------------------------------------------------------------------------------------------ // File: guirect.cpp // // Desc: // // Copyright (c) 2007-2008 Unseen Studios. All rights reserved. //------------------------------------------------------------------------------------------------ #include "guipoin...
true
8f2c5a57733f7e77755944ef881d7b18019422fb
C++
Vuean/ThinkingInCPlusPlus
/2. Making & Using Objects/Exercise/ex2.cpp
UTF-8
435
3.84375
4
[]
no_license
#include <iostream> using namespace std; int main() { int radius; cout << "Enter the circle radius: "; cin >> radius; if(radius < 0) { cout << "Radius must be greater than zero." << endl; cout << "Please try again!" << endl; } float area = 3.14 * radius * radius; cout...
true
2c7a52e6944e35a7568b70cd49d1295dc25b1ea2
C++
shubhammatta/hackerrank
/prac.cpp
UTF-8
1,456
2.5625
3
[]
no_license
//Author : Nitin Singh Budhwar a.k.a SinOfWrath #define ssync ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0) // in case of using only c++ input stream and not stdio(much faster) #define FOR(i,a,b) for(int i=a;i<b;i++) #define fst first #define scd second #define pb push_back #include <cmath> #include <ios...
true
9f70a32225a2ddbfa03bb80f72abe63ab15e7544
C++
Minek124/Studia-Informatyka
/Cpp/zad2-1.cpp
UTF-8
393
3.234375
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { vector<int> v; while(true){ int x; cin >> x; if(x != 0) v.push_back(x); else break; } int max = -2147483647; int min = 2147483647; for(auto i : v){ if(i > max) max = i; if(i < min) min =...
true
7b91d7cebcb960fff887c321ba06638c0d8e75df
C++
haikentcode/code
/collegeTime/cpp/rotedarray.cpp
UTF-8
913
2.9375
3
[]
no_license
#include<iostream> using namespace std; int bs(int A[],int left,int right,int k){ int mid=left+(right-left)/2; if(left<=right){ if(A[mid]==k) return mid; else if(A[mid]>k) return bs(A,left,mid-1,k); else return bs(A,mid+1,right,k);} return -1; } int brs(int A[],int left,int right,in...
true
1d6a2da291c67654427568914e40b3397746c80a
C++
munawar-shakil/Tricks
/Dynamic Connectivity Offline D&C.cpp
UTF-8
4,570
2.515625
3
[]
no_license
#include<cstdio> #include<cstdlib> #include<cstring> #include<vector> #include<map> #include<list> #include<queue> #include<iostream> #include<algorithm> #include<set> #include<deque> #include<stack> #define vi vector<int> #define vll vector<LL> #define pii pair<int,int> #define pli pair<LL,int> #define pll pair<LL,LL>...
true
e9700cb33d95506e6c6d9a4912348f0a90f40d44
C++
thuy288/HackerRank-Problem-solve
/Tree Heihgt of a Binary Tree.cpp
UTF-8
458
3.65625
4
[]
no_license
/*The tree node has data, left child and right child class Node { int data; Node* left; Node* right; }; */ int height(Node* root) { if(root == NULL) return -1; ///single node has height 0 here ///if single node has defined height 1 then it will retu...
true
3f56d618d5aa6ab7b1e69b58a1ee44c821d3eb18
C++
SNHU-projects/Clocks
/MenuOptions.cpp
UTF-8
2,215
3.625
4
[ "Apache-2.0" ]
permissive
// // Created by Jef DeWitt on 3/16/20. // #include <iostream> #include "MenuOptions.h" #include "DisplayClocks.h" #include "chrono" // Default Constructor MenuOptions::MenuOptions() { } // Build menu interface void MenuOptions::DisplayMenu() { std::cout << " *************************" << std::en...
true
55988b972820eb588d509e5b0f996233b5cb1d1a
C++
PredatorFeesh/NeuralNetwork
/cpp/Matrix.cpp
UTF-8
4,554
3.15625
3
[]
no_license
#include "../headers/Matrix.h" #include <iostream> #include <algorithm> using std::vector; using std::cout; using std::endl; using std::transform; void Matrix::initZero() { // Done by default so pass } void Matrix::initLowRandoms(float low, float top) { std::default_random_engine gen; std::uniform_real_d...
true
36dfff38d52a242459cad36c9865bcbf1933cc14
C++
c-square/homework
/Licență/Anul I/POO/Poligon/punct.h
UTF-8
1,105
2.65625
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; #ifndef PUNCT #define PUNCT class Punct { int X, Y; // coordonatele punctului public: static const Punct Origine; static const Punct UnuZero; static const Punct ZeroUnu; Punct(int X = 0, int Y = 0); // constructor ~Punct(){} // destructor int GetX() const; ...
true
f1253dfb95d6ea6cfac698e6926b297e699cb92c
C++
shufisyahida/cp
/latihan/12554.cpp
UTF-8
939
2.609375
3
[]
no_license
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <algorithm> #include <map> #include <queue> #include <vector> #include <utility> using namespace std; #define REP(a,b) for (int a = 0; a < b; a++) #define PB(v,a) v.push_back(a) bool check(vector< pair<string, bool> ...
true
028841308c16047e8ea75c94ae54891fadf3d7d9
C++
inbei/klib
/src/thread/KAtomic.h
UTF-8
5,223
3
3
[]
no_license
#ifndef _ATOMIC_HPP_ #define _ATOMIC_HPP_ #if defined(WIN32) #include <windows.h> #endif #include <map> #include "thread/KMutex.h" #include "thread/KLockGuard.h" /** 原子操作类 **/ namespace klib { template<typename VariantType> class AtomicVariant { public: AtomicVariant(const ...
true
5829bbadeefd7726875adb87e05fe5c64910b4e2
C++
PeterZhouSZ/DataDrivenBipedController
/PyCommon/external_libraries/VirtualPhysics/vpLib/include/VP/vpNDOFJoint.h
UTF-8
6,540
2.640625
3
[ "LicenseRef-scancode-other-permissive", "MIT", "Apache-2.0" ]
permissive
/* VirtualPhysics v0.9 2008.Feb.21 Imaging Media Research Center, KIST jwkim@imrc.kist.re.kr */ #ifndef VP_NDOFJOINT #define VP_NDOFJOINT #include <VP/vpDataType.h> #include <VP/vpJoint.h> /*! \class TransformNDOF \brief Abstract class model an arbitrary N DOF joint */ class TransformNDOF {...
true
20ab08192c6407c8ad722307c918f073b8f3a65e
C++
Divyalok123/LeetCode_Practice
/Practice/Maximum Product of Word Lengths.cpp
UTF-8
760
3.15625
3
[]
no_license
/* https://leetcode.com/problems/maximum-product-of-word-lengths/ */ #include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; class Solution { public: int maxProduct(vector<string>& words) { int n = words.size(); vector<long long> store(n); ...
true
b0469306dcb696f5e5350d7597cf859f34f72bd5
C++
michael-smirnov/vision_internal
/Core/MathItemGenerator.cpp
UTF-8
1,564
2.9375
3
[]
no_license
#include "MathItemGenerator.h" namespace vision { Mat MathItemGenerator::matrix_by_row( const std::vector<float>& row ) { Mat res( row.size(), row.size(), CV_32F ); for( uint i = 0; i < row.size(); i++ ) for( uint j = 0; j < row.size(); j++ ) res.at<float>( j, i ) =...
true
c2e41c8d11ad5f9f501365b3fe2c6670a5dc3660
C++
VikramGaru/Projects
/CSE250-DataStructures/TreasureHunter/GameBoard.h
UTF-8
1,152
2.96875
3
[ "Unlicense" ]
permissive
#ifndef UNTITLED_GAMEBOARD_H #define UNTITLED_GAMEBOARD_H #include <set> #include <unordered_map> #include <utility> #include <sstream> #include "GameLogic.h" using namespace std; // Wrapper class for an (x,y) point class Location{ private: int x; int y; public: Location(); Location(int, int); L...
true
5ab99ccf431ff1b36475327b1351ca5f25e3bb26
C++
wurikiji/algorithm-PS
/acmicpc/1003.cpp
UTF-8
390
2.734375
3
[]
no_license
#include <cstdio> int main(void) { long long arr[64][4]; int t; scanf("%d", &t); arr[0][0] = 1; arr[0][1] = 0; arr[1][0] = 0; arr[1][1] = 1; for (int i = 2; i <= 40;i++) { arr[i][0] = arr[i-1][0] + arr[i-2][0]; arr[i][1] = arr[i-1][1] + arr[i-2][1]; } while(t--) { int n; scanf("%d", &n)...
true
1815d70f9bc38d51d830178b57643667a8f90196
C++
brucelevis/cBoy
/include/flags.h
UTF-8
828
2.765625
3
[]
no_license
/* Project: cBoy: A Gameboy emulator written in C++ Author: Danny Glover - https://github.com/DannyGlover File: flags.h */ #ifndef FLAGS_H #define FLAGS_H // includes #include "typedefs.h" // flag class class Flags { public: // for getting members which should be indirectly-publicly accessible class Get { ...
true
6ab3e7ade1352d87fab2a94aa1f4fe536927c7a2
C++
AyinDJ/HeXiaojun_46090
/Hmwk/Assignment5/Gaddis_8thEd_Chap6_Prog2/main.cpp
UTF-8
1,081
3.59375
4
[]
no_license
/* * File: main.cpp * Author: Xiaojun He * Purpose: Gaddis_8thEd_Chap6_Prog2 * * Created on July 12, 2015, 10:19 PM */ #include <iostream> using namespace std; //User Libraries //Global Constants //Function Prototypes void Input (float&,float&); float Area (float&,float&,float&); void Display (float&,flo...
true
c7fb47541a97f4fe617f0946af57b754e1bae8c9
C++
shenyunhan/sudoku
/sudoku/writer.cpp
UTF-8
1,884
2.796875
3
[]
no_license
#include "stdafx.h" #include "writer.h" inline void decode(int x, int& r, int& c, int& v) { x--; v = x % 9, x /= 9; c = x % 9, x /= 9; r = x; } inline void transform(const std::vector<int>& pos, char (&board)[10][10]) { for (auto i : pos) { int r, c, v; decode(i, r, c, v); board[r][c] = '1' + v; } } uns...
true
9f645d9407241a57229f318ce639a861a00d5427
C++
sgmtec1/23-shock
/shock.ino
UTF-8
1,344
2.59375
3
[]
no_license
//Open Source #include <LiquidCrystal_I2C.h> //INCLUSÃO DE BIBLIOTECA LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3, POSITIVE); //ENDEREÇO DO I2C E DEMAIS INFORMAÇÕES int Led = 8; int shock = 2; int buzzer = 3; int val; void setup () { lcd.begin (16,2); //SETA A QUANTIDADE DE COLUNAS(16) E O NÚMERO DE LINHAS...
true
5caf47bce04215dad7b7ed1d8bca908c2f1bffe3
C++
Coastchb/cpp_primer_plus
/function/0_varible_args.cpp
UTF-8
283
2.875
3
[]
no_license
// // Created by coastcao(操海兵) on 2019-09-03. // #include<iostream> int sum(int a, ...){ int *temp = &a, sum=0; //++temp; for (int i = 0; i < a; ++i) sum+=*temp++; return sum; } int main(){ std::cout<<sum(4, 1, 2, 3, 4)<<std::endl; return 0; }
true
f2ec5ec6830b6bb75e9dd11780065c8b71df536e
C++
rarora7777/GAUSS
/src/Base/include/DOF.h
UTF-8
3,768
2.921875
3
[ "MIT" ]
permissive
#ifndef DOF_H #define DOF_H #include "State.h" namespace Gauss { /** Even baser class */ template<typename DataType, unsigned int Property=0> class DOFBase { public: explicit DOFBase(unsigned int localId) { m_localId = localId; m_globalId = localId; ...
true
5aa7bc5b152648c8eddb8bd6178597016414d343
C++
SinoReimu/homework
/hw3/includes/tree.h
UTF-8
449
2.890625
3
[]
no_license
#include <iostream> #include <cstring> using namespace std; #ifndef TREE_H #define TREE_H struct TreeNode { string content; TreeNode* left; TreeNode* right; }; class Tree { public : Tree () { TreeNode *tn = new TreeNode; tn->left = NULL; tn->right = NULL; tn->content = "ROOT"; root = tn; } ...
true
2f4a4235d145d1b6580eae88ecb4d5244a1c4235
C++
HarekrushnaPradhan/CS141
/lab5q23.cpp
UTF-8
290
3
3
[]
no_license
#include<iostream> using namespace std; int main() { //declare int i,n; //ask user for number cout << "enter the starting number from where you want to countdown to 0" <<endl; cin >> n; //countdown till 0 while (n>=0){ cout << n<<endl; --n;} cout << "done !!!"; return 0; }
true
06c9f538c2ea3eb4bec7bbedb878c9cf9e14eac8
C++
tarundhamor/leetcode-june
/Day 23 - Count Complete Tree Nodes.cpp
UTF-8
580
2.90625
3
[]
no_license
class Solution { public: int countNodes(TreeNode* root) { if (root == NULL) return 0; int height = 0; int count = 0; TreeNode *left = root->left; TreeNode *right = root->left; while(right != NULL) { height++; left ...
true
bce98eb0ad20dc296a7d971525c9f3c9dd1f8ebc
C++
RontuGeorgiana/POO---tema-1
/vect.h
UTF-8
481
2.890625
3
[]
no_license
class vect//clasa pentru citirea si afisarea a n numere complexe { int n;//numarul de numere complexe Complex *obj;//vectorul de numere complexe public: vect ();//constructor de declarare vect (int);//constructor de initializare vect (const vect &);//constructor de copierre ~vect ();...
true
cc4df02b7774b90a68dc70de36d53baebe60ebd4
C++
lfxgroove/cpplibutil
/json_unstructured.cpp
UTF-8
17,837
2.984375
3
[ "MIT" ]
permissive
#include "json_unstructured.h" #include "json.h" namespace json { std::string Parser::findKey(JsonStructured::Str const& s) const { return findKey(s.begin(), s.end()); } std::string Parser::findKey(JsonStructured::Str::const_iterator start, JsonStructured::Str::const_iterator end) const { JsonStruct...
true
cb785612de72b522e12a077334d7f8f9302cabc4
C++
rakhi2207/C-Learning
/Practice questions/Fibonacci.cpp
UTF-8
320
3.125
3
[]
no_license
#include<iostream> using namespace std; void Fibonacci(int a) { int t1=0; int t2=1; int b=0; for(int i=0;i<a;i++) { cout<<t1<<"\n"; b=t1+t2; t1=t2; t2=b; } return; } int main(){ int a; cout<<"Enter a no"; cin>>a; Fibonacci(a); return 0; }
true
c3220e4e980f64675d711a9a86177f8f4c687d0e
C++
Nabil-mubarak/manual-c-
/src/main.cpp
UTF-8
887
3.5
4
[]
no_license
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { float a,b,hasil; char aritmatika; cout << "Selamat datang di program calculator \n \n" ; //memasukkan input dari user cout << "Masukkan nilai pertama: "; cin >> a; cout << "silakan pilih operator: "; ci...
true
71ad9db3156ae99a762ffcb40ce52edadb577cd4
C++
timal75/Ecole42Dev
/piscinec++/j01/ex07/main.cpp
UTF-8
1,709
2.703125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
true
463efb078c42f85bbfe84a9845e78effe57205bf
C++
thyton/fasterBinPacking
/main.cpp
UTF-8
1,403
2.78125
3
[]
no_license
#include "header.h" #include "random.h" #include "main_helper.h" int result::N = 0; int main(int argc , char *argv[]) { const int RUNS = 50; vector<vector<double>> sequences; vector<double> seq_sums; vector<result> results; ofstream o; // prepare random weight sequences result::N = atoi(...
true
4177ea1679c79a3123e1b9ccbe3eae061e451a84
C++
tongnamuu/Algorithm-PS
/B1874/B1874.cpp
UTF-8
645
2.65625
3
[]
no_license
#include <iostream> #include <stack> #include <string> using namespace std; int n; stack<int>s; string ans; int main() { ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); cin >> n; int num; int max = 0; for (int i = 0; i < n; ++i) { cin >> num; if (num >= max) { for (int i = max + 1; i <= num; ++i)...
true
bc23a2ea0a538746702bff80c3ad013122e3f3c4
C++
datmemerboi/CPP-pbl
/Typecasting/Q4.cpp
UTF-8
379
3.1875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void GetVowelCount(char word[]){ int count = 0; for (int i = 0; i < strlen(word); ++i) { if( word[i]=='a' || word[i]=='e' || word[i]=='i' || word[i]=='o' || word[i]=='u') ++count; } if( count>2 ){ cout<<word<<"\t--"<<count<<endl; } } int main() { char input[...
true
cf7539b84cd325e2115f44bd4157382d1d72a1b7
C++
oajerd/CIS375-Project
/CIS375Project/login.h
UTF-8
1,655
3.578125
4
[]
no_license
#pragma once #include<string> #include <iostream> bool checkPassword(std::string p1, std::string p2) { if (p1 == p2) { return true; } else { return false; } } void login() { char choice; std::cout << "\nA.Director\nB.Manager\nC.Operator\nD.Crew " << std::endl; std::cin >> choice; switch (choice) { case('A...
true
e7ac22c126ad09e33bef3c1e39998f9d4331b48d
C++
danilotuzita/programacao-cientifica
/DataStructures/DataStructures/Item.hpp
UTF-8
714
3.515625
4
[]
no_license
#pragma once #include <string> template <class T> class Item { private: T value; Item* previous; public: Item(); ~Item(); T getValue() const; Item *getPrevious() const; void setValue(T value); void setPrevious(Item *previous); }; template < class T > Item<T>::Item() { value = T(); previous = nullptr; } ...
true
8004f87d3c4d2e064ddbb19050209004c03fd4d1
C++
Marbax/second_exam_cpp
/Entity.h
UTF-8
1,804
2.765625
3
[ "MIT" ]
permissive
#ifndef ENTITY_H #define ENTITY_H #include "SFML-2.5.1/include/SFML/Graphics.hpp" #include "SFML-2.5.1/include/SFML/Window.hpp" #include "SFML-2.5.1/include/SFML/System.hpp" #include <iostream> //---------------------------------------------------------------------------------------------------------------------------...
true
c3f05859c3ce9307ad169823d499e6c89c982e39
C++
ZaynF/lab5
/class.cpp
UTF-8
1,025
2.875
3
[]
no_license
#include<iostream> #include<string> #include<cstdlib> #include"class.h" using namespace std; HugeInt::HugeInt(int a){ int p[1000]={0}; string s; for(int i=0;a!=0;i++){ ans[i]=a%10; a=a/10; } } HugeInt::HugeInt(string b){ for(int i=0;i<1000;i++){ ans[i]=(b[i]-48)%10; } } HugeInt HugeInt::operator+(HugeI...
true
aa98c8affe530eb7de4b2269c1b8a09ee8b40539
C++
voxel-tracer/riow
/vren/rawdata.h
UTF-8
2,530
2.9375
3
[ "Apache-2.0" ]
permissive
#pragma once #include <vector> #include <fstream> #include <stdexcept> #include <cstring> #include "vec3.h" #include <yocto/yocto_cli.h> class RawData { protected: std::vector<vec3> data; unsigned width; unsigned height; public: RawData(unsigned width, unsigned height) : width(width), height(height...
true
e6fdc94b725971c37fb06fab3c743cc6d8d6d8b8
C++
Peter-Zheng-Sp/STL
/06_algorithms/07_copy/01_copy-overlap.cpp
UTF-8
2,610
3.59375
4
[ "MIT" ]
permissive
/* * Date:2021-08-18 14:32 * filename:01_copy-overlap.cpp * */ #include <iostream> #include <algorithm> #include <deque> #include <vector> using namespace std; template <class T> struct display { void operator() (const T& x) { cout << x << ' '; } }; int main() { { int ia[] = {0, 1, 2, 3, 4, 5, 6, 7, 8};...
true
d3f8f5e05814cfd331bf25b82e09b0d346b4806b
C++
EYH0602/dcash
/Database.cpp
UTF-8
7,183
2.78125
3
[ "BSD-3-Clause" ]
permissive
#include "Database.h" #include <iostream> #include <string> #include <stdio.h> #include <time.h> #include <mysql/mysql.h> #include "ClientError.h" #include "StringUtils.h" using namespace std; Database::Database(string un, string pwsd, string host, int port, string name, string key) { this->stripe_secret_key = ke...
true
d62fe0cd4275197a7b52eb87f067d566922e97b8
C++
Godongwon/Dungreed
/팀포폴/DungreedProject/Object/Item/AllItemList.cpp
UHC
2,446
2.765625
3
[]
no_license
#include "stdafx.h" #include "AllItemList.h" void AllItemList::init_weaponKeysAll() { _itemKeys.push_back("۶콺"); _itemKeys.push_back("׵"); _itemKeys.push_back(""); _itemKeys.push_back("ܰ"); _itemKeys.push_back("б"); _itemKeys.push_back("ġ"); } void AllItemList::delete_weaponKeysAll() { auto iter = _itemKeys.beg...
true
efa5f68a21294a6b4b242ba0e408b7332c7266d3
C++
z-Endeavor/OpenJudge-NOI
/1.4 编程基础之逻辑表达式与条件分支/20 求一元二次方程的根/20-1.cpp
UTF-8
599
2.671875
3
[]
no_license
#include <iostream> #include <math.h> using namespace std; int main(){ double a, b, c; cin>>a>>b>>c; if (b*b == 4*a*c) { if(b == 0) printf("x1=x2=%.5f", b / (2*a)); else printf("x1=x2=%.5f", -b / (2*a)); } else if (b*b > 4*a*c) { printf("x1=%.5f;x2=%.5f", (-b + sqrt(b*b-4*a*c))/(2*a), (-b - sqrt(b*b-4*a*c))/...
true
7c4b745f26ed7176817fa77d427af6facb742f8a
C++
Sun-Yi-Heng/MyAlgorithmPractice
/Q206.cpp
GB18030
920
3.453125
3
[]
no_license
// // Created by һ on 2020/3/21. // Q206ת // #include "util.h" class Solution { public: /** * ת * ʱ临ӶO(n),ռ临ӶO(1) */ ListNode* reverseList(ListNode* head) { if (head == NULL || head->next == NULL) { return head; } ListNode *n1 = head, *n2 = head->next; ...
true
502c4ebe9806268f98ab37146bff2cc5575b0f8d
C++
Rijul1204/Algorithm_ACM
/Source_Code/MST/Krushkal's/1147 Heavy Cycle edge.cpp
UTF-8
915
2.625
3
[]
no_license
#include<stdio.h> #include<algorithm> using namespace std; struct edge{ int u; int v; int w; }; edge edges[31000],select1[31000]; int pre[11000],n,m; int find(int x){ if(pre[x]==x) return x; return pre[x]=find(pre[x]); } bool comp(edge a,edge b){ return a.w<b.w; } void set(int n){ for(int i=0;i<=n;i++){ ...
true
1bf36c01e9b07931c9df1b60f57dad4a3fdcae56
C++
Indidev/cornEngine
/control/util/Log.h
UTF-8
1,099
2.78125
3
[]
no_license
#ifndef LOG_H #define LOG_H #include <QString> #include <iostream> #include <stdlib.h> using std::cout; using std::cerr; using std::endl; /** * @brief Used for printing log messages * TODO: add function to log in file(Log::f) */ class Log { public: /** * @brief d Print message on screen only when in deb...
true
7e460febd4bb90a2228eb89538678da5c70888bf
C++
Aschen/cutebox-public
/sql/Database.cpp
UTF-8
1,244
2.625
3
[]
no_license
#include "Database.hh" #include <QStringList> #include <QSqlQuery> #include <QSqlError> #include "Debug.hh" Database::Database() { } Database::~Database() { if (m_db.isOpen()) m_db.close(); } bool Database::initDatabase(const QString & databaseName) { m_db = QSqlDatabase::addDatabase("QSQLITE"); ...
true
023a57645fc62b17ee0e6ffb74e55821b6782bc3
C++
dungna29/PT15306-UD-SOF307
/PT15306_UD_SOF307/PT15306_UD_SOF307/BAI_2.5_CacThuatToanTimKiem/Main.cpp
UTF-8
1,320
3.515625
4
[]
no_license
#include <stdio.h> int getMax(int a[], int n) { int max = a[0];//Coi giá trị ở index 0 là số lớn nhất for (int i = 1; i < n; i++) { if (max < a[i])//Nếu max nhỏ hơn giá trị trong mảng thì gán lại cho max { max = a[i]; } } return max; } int getMin(int a[], int n) { int min = a[0]; for (int i = 1; i < n...
true
4bf40415dadd34802b68d6fc27bf312fa91448a0
C++
CLAYouX/codeForLeet
/121_maxProfit.cpp
UTF-8
799
3
3
[]
no_license
#include<iostream> #include<string> #include<cmath> #include<vector> #include<iterator> #include<limits> #include<algorithm> #include<map> #include<utility> #include<set> #include<unordered_map> #include<stack> #include<queue> #include<unordered_set> #include<numeric> using namespace std; int maxProfit(vector<int>& pr...
true
df18d1aa202aed7b3f95c9a17b7b9d5d83236cf3
C++
mertfozzy/Gym-Management-Software
/Gym Software v2.cpp
UTF-8
21,426
2.84375
3
[]
no_license
/* Beykoz University - Computer Enginerring Name: Mert Altuntas ID : 1804010005 For Login System; username = "Mert" password = "1234" */ #include <stdio.h> #include <iostream> #include <conio.h> #include <stdlib.h> #include <string.h> #include <windows.h> using namespace std; int main()...
true
a4a835d7d78b6f224214aa8cfc0f79271ab13892
C++
juanalbertogutierrez/Competition
/Acm 2016/Actividad 2/eight/basicgeometry.cpp
UTF-8
1,503
3.34375
3
[]
no_license
#include <iostream> #include <cmath> #include <iomanip> # define N_PI 3.14159265358979323846 using namespace std; long double calculaoAngulo(int radio, int altura){ return 2 * (acos(1 - ((double)altura / (double)radio))* 180.0 / N_PI);//sacamos angulo y convertimos a grados } long double calculoArea(int radio,int a...
true