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
5545241121d9c5195fc1fd5550f6503126571f82
C++
PrajaktaKeer/Programming
/A2OJ/Codeforces Div 2 A/young_physicist.cpp
UTF-8
414
2.53125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { int n, a[101][3], i, j, sumx = 0, sumy = 0, sumz = 0; cin>>n; for(i = 0; i < n; i++) { for(j = 0; j < 3; j++) { cin>>a[i][j]; } } for(j = 0; j < n; j++) { sumx += a[j][0]; sumy += a[j][1]; sumz += a[j][2]; } //cout<<sumx<<" "<<sumy<<" "<<...
true
0c08abab7748dc6ba0660eddd40904c397cf0edc
C++
MarkMansell/OpenGLStarFighter
/OpenGL_SDL Base Project/OBJLoader.cpp
UTF-8
4,750
2.859375
3
[]
no_license
#include "OBJLoader.h" #include <stdio.h> #include <Windows.h> #include "../gl/glut.h" OBJLoader::OBJLoader(string modelFileName) { numVertices = 0; numUvs = 0; numNormals = 1; numPolygon = 0; std::strcpy(fileName, modelFileName.c_str()); // copy the file name to char LoadOBJ(&object, fileName); _TextureID = N...
true
8a9f0f8d886a3f48585c61da5e32cfebb898576a
C++
wangcy6/weekly
/KM/03code/cpp/class/class_member.cpp
UTF-8
1,422
3.671875
4
[ "Apache-2.0" ]
permissive
#include <iostream> using namespace std; class Person{ public: Person(string& str,int x): name(str),value(x){ } string & name; const int value; }; class Grandparent { public: Grandparent(int no): grandparent_data(no){} void printRef() { cout << "myref is: " << grandparent_data << endl; ...
true
e4283d6cf81bcb4a1029657a665970e224bc7770
C++
suifengls/careercup150
/chapter01/01-02-reverse-string.cpp
UTF-8
522
3.515625
4
[]
no_license
#include <iostream> #include <cstring> #include <string> using namespace std; void reverse(char *str) { int len = strlen(str); // strlen() return the lenght, exclude '\0' for(int i = 0; i < len/2; ++i) { char tmp = str[i]; str[i] = str[len-1-i]; str[len-1-i] = tmp; } } int main() { char s1[] = ...
true
3e2c6584706c2f47ea832f67b3e288600a3fbfad
C++
orcchg/StudyProjects
/OBJECT_ORIENTED/SORTINGS/IntKey.h
UTF-8
595
2.984375
3
[]
no_license
#pragma once #include <iostream> using namespace std; #ifndef SORTINGS_INTKEY_H #define SORTINGS_INTKEY_H class IntKey { private: friend ostream & operator << (ostream & out, const IntKey & v); int value; public: IntKey(int v = 0) : value(v) {} IntKey(const IntKey & key) : value(key.value)...
true
11caddb6d1f34b849cf437d3025472bad183901b
C++
marvilchis1/AnomalyDetector
/filemanager.cpp
UTF-8
3,017
3.234375
3
[]
no_license
#include "filemanager.h" bool FileManager::CheckFile(string direction) { ifstream input(direction); if ( !input.is_open()) { std::cout << "El archivo: " << direction << " no pudo abrirse" << std::endl; return false; } if ( input.eof() ) { input.close(); return false; ...
true
34f0c10306af5df4d0715114997725fe02e7585e
C++
cies96035/CPP_programs
/TOJ/已註解,整碼/toj120.cpp
UTF-8
485
2.8125
3
[]
no_license
#include<iostream> using namespace std; int main() { cin.tie(0); ios_base::sync_with_stdio(0); //前綴和觀念稍微有就不會TLE int N,num,Q; cin>>N; long long Snum[N+1]={0};//儲存a0~an的總和(題目數字稍大要開long long for(int i=1;i<=N;i++) { cin>>num; Snum[i]=Snum[i-1]+num; } //輸出 cin>>Q; while(Q--) { int a,b; cin>>a>>...
true
1c20e60dce940abcb2ed303560dbbc32ee7af3ec
C++
igorternyuk/TeAllegro5Pacman
/allegro5timer.cpp
UTF-8
1,118
3.015625
3
[]
no_license
#include "allegro5timer.hpp" #include <stdexcept> Allegro5Timer::Allegro5Timer(double speedSecs) { auto timer = al_create_timer(speedSecs); if(!timer) { throw std::runtime_error("Could not create timer"); } my_unique_ptr<ALLEGRO_TIMER> ptr{ timer, al_destroy_timer }; mTimer.swap(ptr); }...
true
3eda9fcea56c0167a866247a2cb944b1013f8d25
C++
Exoron/CompilersHometasks
/04-scopes/Visitors/PrintVisitor.cpp
UTF-8
2,180
3.046875
3
[]
no_license
#include "PrintVisitor.h" #include "includes.h" PrintVisitor::PrintVisitor(const std::string& filename): out(filename) {} void PrintVisitor::PrintTabs() { for(int i = 0; i < tabs_; ++i) { out << "\t"; } } void PrintVisitor::Visit(NumberExpression* expr) { PrintTabs(); out << "Number" << std::endl; } voi...
true
2e829b3262780d63257e13aceb7a9a52d08756bc
C++
VenkatKS/ParallelEnvironment
/cpp/core/abstract_agent.cpp
UTF-8
568
2.765625
3
[]
no_license
#include "abstract_agent.h" void AbstractAgent::RegisterAction (std::string action_name, uint32_t enumerated_action) { std::unordered_map<std::string, uint32_t>::iterator it = \ registered_actions.find(action_name); /* If the specified action is already in the dictionary, don't allow */ if(it != registe...
true
ec3d0bd1f9686b8a841ef9cea3eb77a0c6c71080
C++
mhikichi1969/hackEv3_2019
/judge/SectionJudge.cpp
UTF-8
1,836
2.765625
3
[]
no_license
#include "SectionJudge.h" #include "Flag.h" SectionJudge::SectionJudge(HPolling *polling, Odometry *odometry) : Judge( polling,odometry) { } void SectionJudge::setValue(int cmd_judge,double val) { int cmd = cmd_judge&0xff00; mEndFlag = (Flag::End)(cmd_judge&0xf...
true
54dadba493bc2bd88d551612e4b1c0440ac086e0
C++
mugiseyebrows/mugi-grep
/src/parse/parsepython.h
UTF-8
1,214
2.578125
3
[ "MIT" ]
permissive
#ifndef PARSEPYTHON_H #define PARSEPYTHON_H #include "linecontext.h" class PythonSymbol { public: enum Type { Class, Method, }; PythonSymbol() {} PythonSymbol(Type type, const QString& name, const QString& shortName, int begin, int end, int indent); bool contains(int line) const...
true
e00cb7a8b5594e776bd38f8a6e27dd33191ef6c9
C++
wesleygriffin/SPLIT_VIS2
/preprocessing/generateSymmetry/genSymmetry.h
UTF-8
632
2.609375
3
[]
no_license
#include <fstream> #include <algorithm> #include <cmath> #include <vector> using namespace std; struct Spin { double px; double py; double pz; double vx; double vy; double vz; double den; }; class genSymmetry { public: genSymmetry(){} virtual ~genSymmetry(){cleanup();} int getNumOfInte...
true
20aaaf6ff7bc4414092679de76df27cd88bc5a6d
C++
zeroplusone/AlgorithmPractice
/UVA/UVA-Q445-Marvelous_Mazes.cpp
BIG5
607
3.203125
3
[]
no_license
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> using namespace std; int main() { char c; int i; while(scanf("%c",&c)!=EOF) { if(c=='!') { printf("\n"); } else if(c==10) { printf("\n"); } else { i=0; while(c>='0' &...
true
8bad9c14625df5e05bb7f69340d889a2a8ec435e
C++
GuanyiLi-Craig/interview
/Array/q28.cpp
UTF-8
1,616
3.515625
4
[]
no_license
/**************************************************************************************************** 28. Implement strStr() ----------------------------------------------------------------------------------------------------- Implement strStr(). Returns the index of the ...
true
64aff4ffdf41c9f41bd33da8c61cecb61a7f7922
C++
peterpanning/DICOMViewer
/dicomSeries.h
UTF-8
1,730
2.859375
3
[]
no_license
#ifndef FINALPROJECT_DICOMSERIES_H #define FINALPROJECT_DICOMSERIES_H // TODO: Is storing these header files here best practice? #include "itkImage.h" #include "itkGDCMImageIO.h" #include "itkGDCMSeriesFileNames.h" #include "itkImageSeriesReader.h" #include "itkConnectedThresholdImageFilter.h" #include "itkMaskImage...
true
04b02626d0318269513a1fa6d4c6d24ab82afad7
C++
cdbm/codeforces
/158A-Round.cpp
UTF-8
478
3.03125
3
[]
no_license
#include <iostream> using namespace std; int main() { int n, k, x; cin >> n; cin >> k; int students[n]; for(int i = 0; i<n; i++){ cin >>x; students[i] = x; } int pass =0; int media = students[k-1]; bool continua = true; for(int j=0; j<n;j++ && continua){ if(...
true
dbd08aa7be2d0451fe09af6ce0adb87b2cba052b
C++
lfermin77/cg_mrslam
/src/uncertainty/graph_distance.cpp
UTF-8
9,036
3.234375
3
[ "BSD-3-Clause" ]
permissive
#include "graph_distance.hpp" /////////////////// void Graph_Distance::clean_class(){ for(std::unordered_map<int, Vertex*>::iterator map_iter = Vertices_map.begin(); map_iter != Vertices_map.end(); map_iter ++){ Vertex* ptr = map_iter->second; delete ptr; } Vertices_map.clear(); for(std::map<std::set<i...
true
554eb93ee8b7ee03c0ab96613aa8434f251c700c
C++
SelyanWorker/cannon_game
/platforms/OpenGL/OGLVertexArray.cpp
UTF-8
2,888
2.703125
3
[]
no_license
#include "OGLVertexArray.h" #include <cassert> namespace selyan { VertexArray *VertexArray::create() { return new OGLVertexArray(); } OGLVertexArray::OGLVertexArray() : m_index(0), m_indexBuffer(nullptr), m_instanceCount(1) { glGenVertexArrays(1, &m_index); } void OGLVertexArray::setVert...
true
2678ce52dbf8da1f54dff2d2ac7c7fac4af1bb79
C++
forkrp/imgui-Tristeon
/src/Core/Transform.h
UTF-8
5,912
2.78125
3
[ "MIT" ]
permissive
#pragma once #include "TObject.h" #include "Math/Vector3.h" #include "Misc/Property.h" #include "Editor/TypeRegister.h" #include "Misc/vector.h" #include <glm/mat4x4.hpp> #include "Math/Quaternion.h" namespace Tristeon { namespace Scenes { class SceneManager; } } namespace Tristeon { namespace Core { /** ...
true
dece924a3d1bf2c6f5527edbbdeafe9df77de79e
C++
BahaaEldeenOsama/FCAI-CU-Assignments
/Data structure/Assignment-2/Queues/main.cpp
UTF-8
4,599
3.734375
4
[]
no_license
#include <bits/stdc++.h> using namespace std; template<class T> class Queue { private: int MX_Capacity; int length; int Front,Back; int init_SZ; T *Array; T val ; public: Queue() { MX_Capacity=9999; Array=new T[MX_Capacity]; Back=MX_Capacity-1; leng...
true
86f6c446dc838d8f7bbe95176b395922e7c65dfc
C++
vishalbelsare/visibility_graph-1
/algorithm/src/math/line_like/ray/ray.hpp
UTF-8
799
2.90625
3
[]
no_license
#pragma once #include <math/line_like/line_like.hpp> MATH_NAMESPACE_BEGIN template<class T, size_t D> class ray : public line_like<T, D> { public: ray() = default; ray(const point<T, D>& p1, const point<T, D>& p2); ray(const ray& other) = default; ray(ray&& other) = default; explicit ray(const li...
true
26d334c3d2fdeb7d9d0190c3d832c682fd9461d6
C++
JoComp27/RockPaperScissors_Game
/RPS Project/OpponentPlayerManager.cpp
UTF-8
1,895
3.28125
3
[]
no_license
#include "OpponentPlayerManager.h" OpponentPlayerManager::OpponentPlayerManager() { this->counter = 0; } PLAY OpponentPlayerManager::play(int currentGame, History const &a, int type) { if (type == 0) { //if Type == 0, play randomly int random = rng.getRandom(0, 2); if (random == 0) { return PLAY...
true
bed2cf77f9bd52d712ae11426254d011d544a3c9
C++
mmcike/HXEngine
/HXEngine/HXCore/include/HXColor.h
GB18030
2,000
2.984375
3
[ "MIT" ]
permissive
#pragma once #include "HXCommon.h" namespace HX3D { struct HXColor { // unsigned char r, g, b, a; // դԲֵstepcolor rgbaǸֵ float r, g, b, a; HXColor() :r(255), g(255), b(255), a(255) {} /*HXColor(int color, unsigned char alpha = 255) { r = (unsigned char)((color & 0xff0000) >> 16); g = (unsigned char...
true
2d9fe95f9c28bf2202c09656f97b9a21c7650fcb
C++
a-kashirin-official/spbspu-labs-2018
/shalgueva.sofiya/A1/main.cpp
UTF-8
790
3.03125
3
[]
no_license
#include <iostream> #include "circle.hpp" #include "rectangle.hpp" int main() { point_t point = {30, 130}; Rectangle r({30, 70, point}); Shape *rectangle = & r; std::cout << "Area of rectangle " << rectangle -> getArea() << std::endl; rectangle -> getFrameRect(); rectangle -> move(70, -30); std::cout <<...
true
168fd3c7936892cb7b9ddd80fe1986428a7ff437
C++
Tomistong/MyLuoguRepo
/rates/[Mivik Round]nurture/A.cpp
UTF-8
1,127
2.6875
3
[]
no_license
#include <iostream> #include <cstdio> using namespace std; const int maxn = 120; char ht[maxn][maxn]; int ssx[maxn], ssy[maxn]; int oval = 0; int n,m; char dir; int sx,sy; bool rti() { if(dir=='>') { for(int j=sy;j<=m;j++) { if(ht[sx][j]=='x') { printf("GG"); // printf("%d %d = %c\n", sx,j ,ht[sx][j]); ...
true
917ec6d4faf34e602b5ff5ea298d00be6f502363
C++
jesperkristensen/algorithms-for-lce
/src/algHashLog.cpp
UTF-8
1,608
2.640625
3
[]
no_license
#include "algHashLog.h" #include <stdlib.h> #include <stdio.h> #include <new> #include <math.h> FingerprintLW::FingerprintLW() { this->s = NULL; this->n = 0; this->H = NULL; this->k = 0; } FingerprintLW::~FingerprintLW() { } bool FingerprintLW::preproc(TestString* s) { uint32 k = (uint32) ceil(lo...
true
b7520fb3793940ec5ef34dbae1563c93961218ef
C++
dbecad/Udacity-cpp-3_ObjectOrientedProgramming
/code/friends.cpp
UTF-8
511
2.546875
3
[]
no_license
// include iostream for printing // Declare class Rectangle // Define class Square as friend of Rectangle // Add private attribute squ_side to Square // Add public constructor to Square, initialize squ_side // Implement Rectangle // Add private attributes width, height // Add public functions...
true
b89fd9339c069b1169c8d906e364e16f5f45e099
C++
pigrange/LeetCodeStepByStep
/src/accepted/125.ValidPalindrome.cpp
UTF-8
607
3.3125
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> using namespace std; class Solution { public: bool isPalindrome(string s) { int l = 0, r = s.size() - 1; while (l < r) { if (!isValidate(s[l])) { ++l; continue; } if (!isValidate(s[r])) { --r; continu...
true
83107fb99f5f4a6abe762f5460381b1d090da7ff
C++
lnikon/SimpleCalculator
/include/tokenizer.h
UTF-8
1,394
3.453125
3
[]
no_license
#ifndef TOKENIZER_H #define TOKENIZER_H #include <istream> #include "tokentype.h" #include "token.h" /** * @todo write docs */ template <class NumericType> class Tokenizer { public: /** * Default constructor */ Tokenizer(std::istream&); Token<NumericType> GetToken(); private: std::is...
true
621809a975b6ed1f17ad9286f40f161f63674b6c
C++
IgorYunusov/Mega-collection-cpp-1
/CPP_cookbok_source/11-40.cpp
UTF-8
2,107
3.578125
4
[]
no_license
#include <iostream> using namespace std; template<int E> struct BasicFixedReal { typedef BasicFixedReal self; static const int factor = 1 << (E - 1); BasicFixedReal() : m(0) { } BasicFixedReal(double d) : m(static_cast<int>(d * factor)) { } self& operator+=(const self& x) { m += x.m; ...
true
51239b5f6c97f3d6c175a5eb66283de2aff52e16
C++
Jarogna/Unit8_Inheritance_Ronald_Angora
/Classes.h
UTF-8
772
2.6875
3
[]
no_license
class Cost { Private: double tuition; double roomAndBoard; double travelCost; double foodCost; double bookCost; Public: Cost() = default; void setTution(double t) = { tuition = t; } void setRoomAndBoard(double rB) = { roomAndBoard = rB; } void setTravelCost(double tC) = { tra...
true
87f63b16df3f6addfd6effc5cb7e1f84c2413121
C++
honpui/leetcode
/3-字符串/实现strstr/实现strstsr/实现strstsr/源.cpp
UTF-8
711
3.265625
3
[]
no_license
#include <iostream> using namespace std; int compare(char* haystack,int head,char* needle) { int i = 0; while (needle[i] != '\0') { if (haystack[head++] != needle[i++]) { return -1; } } return 0; } int strStr(char * haystack, char * needle){ if ((needle == NULL) ||(haystack == NULL ) || (needle[0] ==...
true
c953ac59453c5d4ed1aa5e9cf779507f808c5050
C++
emilybache/custom-start-points
/start-points/C++Countdown/Round5/scorer.cpp
UTF-8
3,948
3.125
3
[ "BSD-2-Clause" ]
permissive
#include <algorithm> #include <cctype> #include <fstream> #include <iostream> #include <iomanip> #include <vector> using namespace std; #include "tokens.cpp" static void print_compiler_version() { cout << ">>> Compiler is G++ " << __VERSION__ << '\n'; cout << ">>> Standard C++ " << __cplusplus << '\n'; c...
true
1c31d3f7f80bc4fc742ce970152a42fc6416b832
C++
aleksandarkiridzic/dna-sequence-aligner
/str.h
UTF-8
1,134
2.9375
3
[]
no_license
#ifndef STR_H_INCLUDED #define STR_H_INCLUDED #include "general.h" #include <iostream> #include <cstring> // basic string structure holding characters and its length immutable_class Str { protected: const char* chars = nullptr; unsigned len = 0; public: Str() {} Str(const char* src, unsigned len); ...
true
5014a756bc84a8a91ddaad2fc4290c8423fdac14
C++
eduardosalas1/Proyecto1
/main.cpp
UTF-8
3,358
2.890625
3
[]
no_license
#include <iostream> #include <fstream> #include <vector> #include <ctime> #include <tuple> #include <string> #include <fstream> #include "SequentialFile.cpp" using namespace std; int main(){ /*srand(time(nullptr)); char nums[10] = {'0','1','2','3','4','5','6','7','8','9'}; //Dni vector<string> vDni;...
true
c94578eb530a7f6381ffb3a48c151155eb92e0f7
C++
JacobWheeler/AssemblerGroupAssignment
/AssemblerGroupAssignment/main.cpp
UTF-8
4,643
3.1875
3
[]
no_license
// // main.cpp // AssemblerGroupAssignment // // Created by Jacob Wheeler, Gabe Cerritos, Katie Rose on 9/6/19. // Copyright © 2019 Jacob Wheeler. All rights reserved. // #include <iostream> #include <fstream> #include <bitset> #include <algorithm> #include <vector> #include <string> #include <sstream> #include "...
true
b02b096a4198b82f2b1236a8d0e16d1a57802e70
C++
asdlei99/winupdate
/winupdate.cpp
UTF-8
3,813
2.6875
3
[ "MIT" ]
permissive
#include <windows.h> #include <stdio.h> #include <string> #include <string.h> #include "winupdate.h" using namespace std; namespace winupdate { // Retrieve directory of path, which is everything up to the last backslash (but excluding the last backslash) static std::wstring Dir(std::wstring path) { auto lastSlash =...
true
4fd05f096cc4cc0bed156ac2bf04c173f6f0bb0c
C++
ash9991win/VVVVVV
/source/UnitTest.Library.Desktop/SListIteratorTest.cpp
UTF-8
4,447
2.578125
3
[]
no_license
#include "pch.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; using namespace LibraryDesktop; namespace UnitTestLibraryDesktop { TEST_CLASS(SListIteratorTest) { public: TEST_METHOD_INITIALIZE(PrepForTests) { #if defined(DEBUG) | defined(_DEBUG) _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF); _Crt...
true
c76bb50e842b748951ea00d41f4f94540f7b4073
C++
MonikaWielgus/Cpp
/PRL/source.cpp
UTF-8
8,350
2.859375
3
[]
no_license
//Monika Wielgus #include <iostream> using namespace std; extern double limit_dziecko[]; extern double limit_kobieta_w_ciazy[]; extern double limit_robotnik[]; enum Grupa{dziecko, kobieta_w_ciazy, robotnik, bez_grupy}; static unsigned int ludnosc=0; struct Kartka { double mieso; double czekolada; }; struct O...
true
82dbcb9918b647c7c7198be52fae7b9067276b94
C++
btcup/sb-admin
/exams/2559/02204111/2/midterm/2_2_716_5920501791.cpp
UTF-8
286
2.6875
3
[ "MIT" ]
permissive
//5920501791 Amarin Sonti #include <iostream> #include <cmath> using namespace std; int main () { int num,n; if(num>0){ cout<<"Enter an integer : "; cin>>n; int num[n]; cout<<"Number of digit is "<<endl; } system ("pause"); return 0; }
true
7d6598772d4da88eda6d7227cea1101c4d93bd09
C++
henu/urhoextras
/json.cpp
UTF-8
22,991
2.9375
3
[ "MIT" ]
permissive
#include "json.hpp" namespace UrhoExtras { bool writeStringWithoutEnding(Urho3D::String const& str, Urho3D::Serializer& dest) { return dest.Write(str.CString(), str.Length()); } Urho3D::String escapeString(Urho3D::String const& str) { // TODO: Escape unicode characters! Urho3D::String result = str; result.Replace...
true
7d156ae41bd4fd3f2050da622b4eadbe428539cc
C++
feng1st/md5checker
/Md5Checker/MD5Calculator.h
UTF-8
358
2.59375
3
[]
no_license
#pragma once class CMD5Calculator { public: void Init(); void Update(const LPBYTE input, UINT inputLen); LPBYTE Finalize(BYTE digest[16]); private: void Transform(const BYTE[64]); private: ULONG m_state[4]; // state (ABCD) ULONG m_count[2]; // number of bits, modulo 2^64 (lsb first) B...
true
cffcbc32762c5016da641ae5e5d4f51b899d6492
C++
Maximilian762/simplescript
/SS_shared/SS_shared/AST_FunctionCalling.cpp
UTF-8
2,209
2.75
3
[]
no_license
#include "stdafx.h" #include "AST_FunctionCalling.h" #include "Table.h" using namespace std; AST_FunctionCalling::AST_FunctionCalling(std::string _callername, std::string _name, std::vector<SharedExpr>& _arguments) { SetType(AST_Type::FunctionCalling); callername = _callername; name = _name; arguments ...
true
e65fd0148100ce5ea8fc292eeef296f213ad5f15
C++
tungndtt/Praktikum_C
/exercise_3/task2/row.cpp
UTF-8
453
2.875
3
[]
no_license
#include "row.hpp" const std::string& Row::get(std::string& key) const { return this->fields.at(key); } void Row::insert(const std::string& key, const std::string& value) { this->fields.insert({key, value}); } std::unordered_map<std::string, std::string>::const_iterator Row::begin() const { return this->...
true
5affe6a860d4a21acaffe4dfd5801ddac2908721
C++
truongpt/warm_up
/practice/cpp/hash_table/roman_to_integer.cpp
UTF-8
1,018
3.625
4
[]
no_license
/* - Problem: https://leetcode.com/problems/roman-to-integer - Solution: - Directly apply rule to convert from roman to integer. - Pre character value is decided after know current character in roman string. - Time and space complexity. - TC: O(n) - SC: O(n) */ #include <iostream> #include <un...
true
ee1ead1f001cce14b7339d97adee611497896e3c
C++
aiwithqasim/Competitive-Programming
/Data Structure & Algorithm C++/12 trees/Q1.cpp
UTF-8
990
3.8125
4
[]
no_license
#include<iostream> using namespace std; struct Node { char data; Node *left,*right; }; Node *Insert(Node *root,char data) { if(root==NULL){ root=new Node(); root->data=data; root->left=root->right=NULL; } else if(data<=root->data){ root->left=Insert(root->left,data); } else{ root...
true
ec96a94d7924b96c6a5a122c944ea972ab997490
C++
pjszzang2/ImageProcessing
/ImageProcessing/filter/sharpening.cpp
UTF-8
542
2.59375
3
[]
no_license
#include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace cv; using namespace std; void sharpening(Mat img) { Mat result; Mat kernel(3, 3, CV_32F, cv::Scalar(0)); kernel.at<float>(1, 1) = 5.0; kernel.at<f...
true
b4fe70cad7e4e7236a9739a568d162fdd175a6fe
C++
ashutosh-ve/Placement
/day2/q2.cpp
UTF-8
343
2.609375
3
[]
no_license
class Solution { public: int numIdenticalPairs(vector<int>& nums) { int n=nums.size(); int ans=0; for(int i=0;i<n-1;i++){ for(int j=i;j<n;j++){ if(nums[i]==nums[j] && i<j) ans+=1; } } retur...
true
a258506786c5de749bbf8be427357bf4dc429fe7
C++
ganipa93/Figuras
/Figuras/Triangulo.h
WINDOWS-1250
2,809
3.390625
3
[]
no_license
#ifndef TRIANGULO_H_DECLARED #define TRIANGULO_H_INCLUDED #include <string> #include <string.h> /** Definicin del Tipo de Dato para manejo de triangulos. Atributos: * base, * altura, * color, * area. Axiomas: * base > 0 * altura >0 * area = (base*altura)/2 */ ...
true
fd6e0ddf37adcb3479134e0acd24716398a93b2b
C++
zilongwhu/ls-client
/include/server.h
UTF-8
1,951
2.515625
3
[]
no_license
/* * ===================================================================================== * * Filename: server.h * * Description: * * Version: 1.0 * Created: 04/11/2014 04:13:14 PM * Revision: none * Compiler: gcc * * Author: Zilong.Zhu (), zilong.whu@gmai...
true
d2fae47034be6fcfad926d2dc4ecc14ef8983723
C++
Diusrex/UVA-Solutions
/637 Booklet Printing.cpp
UTF-8
1,303
3.140625
3
[ "Apache-2.0" ]
permissive
#include <cstdio> int main() { int P; while (scanf("%d", &P), P) { printf("Printing order for %d pages:\n", P); // Only one that does not have a back for each page if (P == 1) { printf("Sheet 1, front: Blank, 1\n"); } else ...
true
7b6c8924aa41f21f6117ee601702023c463fa10f
C++
kronicler/cs2040_DSnA
/KattisPractices/arjo/tree.cpp
UTF-8
378
2.796875
3
[]
no_license
#include <iostream> #include <string> #include <cmath> using namespace std; int main(int argc, char** argv) { string directions = ""; int n; cin >> n; if(!cin.eof()) cin >> directions; long res = (long)pow(2,n+1); long diff = 1; for(int i = 0; i < directions.size() ; i++){ diff*=2; if(directions[i] =...
true
4991712ee9be3f36e2d5cd9d2ecf5eb2feb0a6db
C++
scjurgen/lab64
/RandomGenerator.h
UTF-8
458
2.625
3
[]
no_license
#pragma once #include <memory> #include <random> class RandomGenerator { public: RandomGenerator(); void seed(int sd); double GetNormalizedUniformRange(); double GetUniformRange(double minValue, double maxValue); private: // std::mt19937 m_generator; std::default_random_engine ...
true
26cb5c1d1a4b750eeaf42dce1a259c1d32c4cbad
C++
mave89/CPlusPlus_Random
/LeetCode/hammingDistance.cpp
UTF-8
1,406
3.5625
4
[]
no_license
// https://leetcode.com/problems/hamming-distance/#/description class Solution { private: std::string convert2binary(int x){ std::string binary; while(x > 0){ binary += std::to_string(x % 2); x = x / 2; } // Reverse it std::reverse(binary.begin(), bin...
true
290b374a61a69fde521b3a152433be80b570a296
C++
stefanandonov/OOP2020
/exercises/shapes5.cc
UTF-8
5,034
3.546875
4
[]
no_license
#include<iostream> #include<cstring> using namespace std; enum Color { RED, GREEN, BLUE }; class Shape { protected: char id [5]; char * description; Color color; void copy (const Shape &s) { strcpy(this->id, s.id); this->description = new char [strlen(s.description)+1]; strcpy(this->description, s.des...
true
d762aa4af36bb4e8ab0eacba88c2b2e2c08062b6
C++
artofimagination/simple-ftp-client-server
/UI/CommandLineImpl.h
UTF-8
662
2.671875
3
[ "MIT" ]
permissive
#ifndef COMMAND_LINE_IMPL_H #define COMMAND_LINE_IMPL_H #include <Common/Error.h> #include <map> namespace UI { class CommandLineImpl { public: CommandLineImpl(); //! Prints available options in command line. void listOptions(const std::map<int, std::string>& options) const; //! Prints the welcome messag...
true
337be97c491a43981d16741e4cc6c600c740b254
C++
FeridAdashov/C-and-CPP
/proqram-2015/ders.son.ededin tersi.cpp
UTF-8
162
2.8125
3
[]
no_license
#include<iostream> using namespace std; int main(){ int x,y=0; cout<<"Eded daxil et:"; cin>>x; while(x>0){ y=y*10+x%10; x/=10; } cout<<y; return 0; }
true
828105f833940a375744f3b72f1786bb98fdabe6
C++
moevm/oop
/8381/Pereverzev_Dmitriy/back/gameCPP/src/uuid/UUID.cpp
UTF-8
989
3.03125
3
[]
no_license
#include "UUID.hpp" UUID::UUID() { time_t timeSeed = time(nullptr); std::srand(timeSeed); x = std::rand() % 899999999 + 100000000; y = std::rand() % 899999999 + 100000000; z = std::rand() % 899999999 + 100000000; w = std::rand() % 899999999 + 100000000; } uint32_t UUID::xor128(void) { t ...
true
8f38fb8f50e79ae47c8106628ccb38ccf28fab91
C++
seijihariki/brizas
/OGL/src/graphics/model/model.cpp
UTF-8
3,731
3.265625
3
[]
no_license
#include "graphics/model/model.hpp" #include <string.h> Model::Model(std::string filename) { loadFromFile(filename); loaded = false; } Model::~Model() { if (loaded) unloadFromGPU(); } void Model::loadFromFile(std::string filename) { vertices.clear(); texture_c.clear(); normals.clear(...
true
07e9e9bc08528c5b1f037cf1cad2b35082cf1d0b
C++
Glowny/Dalmuti
/Dalmuti/AlluAI.cpp
UTF-8
1,424
2.828125
3
[]
no_license
#include "AlluAI.h" AlluAI::AlluAI(std::vector<Card*> hand, std::string playerName) : Player(hand, playerName) { } AlluAI::~AlluAI() { } Card* AlluAI::AI(std::vector<Card*>* poytakortit, int ylinkortti, int ylimmankortinmaara) { std::vector<Card*> playbleCards; Card toPlay = Card(NOCARD); if (ylinkortti == N...
true
64e0ad98bf88ee8249d637e57540c38763ce4f22
C++
PeopleCF/Boudjelida_Amin
/Sample-Test2/FileReaderTest.cpp
WINDOWS-1251
769
2.59375
3
[]
no_license
#include "pch.h" #include "C:/out/FileReader.cpp" #include <iostream> class FileReadTest : public ::testing::Test { protected: void SetUp() { FR = new FileReader(); } void TearDown() { delete FR; } FileReader *FR; }; TEST_F(FileReadTest, readFile_FileUnavailable_CannotReadFile) { EXPECT_EQ("Cannot Read fi...
true
f438283a708e99946962905d61372b39eef43b95
C++
ForNeVeR/cthulhu-bot
/history-import/import.cpp
UTF-8
2,529
2.59375
3
[ "MIT" ]
permissive
#include "import.h" #include "history.h" #include "unicode.h" #include <boost/filesystem.hpp> #include <boost/regex.hpp> #include <cstdlib> #include <ctime> #include <fstream> #include <iostream> #include <sstream> using namespace boost; using namespace boost::filesystem; using namespace boost::greg...
true
7a83a72cb908b53a72d20fb92461e7aa171c121b
C++
satyaaditya/My_C
/Add all greater values to every node in a BST.cpp
UTF-8
1,072
3.203125
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<conio.h> #include"bst.h" int get_inorder_sum(struct node* ); void fill_inorder(struct node *, int *, int *, int *); int get_inorder_sum(struct node *root){ if (root == NULL) return 0; else{ int sum = get_inorder_sum(root->left); sum ...
true
5863009487f5bdc002a537b8ed5ea4d5245126f8
C++
ivancea/TuentiChallenge7
/5/main.cpp
UTF-8
4,226
2.703125
3
[]
no_license
#include <iostream> #include <fstream> #include "http.h" using namespace std; int main1(){ http::GETRequest req("https://52.49.91.111:8443/ghost"); string fullBody; int contentLength = -1; do{ req.setField("range", "bytes=" + to_string(fullBody.size()) +"-"); http::res...
true
9b731750971956dbaa49fc4f1e2e22d3ba78575d
C++
SohaylaMohamed/Compiler
/Parser/Construct_Automata.cpp
UTF-8
13,444
2.65625
3
[]
no_license
// // Created by sohayla on 20/03/19. // #include <algorithm> #include <iostream> #include <regex> #include "Construct_Automata.h" #include "../Automata/Helpers.h" Construct_Automata::Construct_Automata() { def_t = Definitions_Table::getInstance(); } bool Construct_Automata::constructAutomata(string line) { ...
true
80f56d044258594b8ebc4e86021d3c792ccc6556
C++
jjzhang166/GameEngine-2
/game/modelManipulation/src/Simplifier.cpp
UTF-8
5,473
2.859375
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> #include <glm/gtc/matrix_inverse.hpp> #include <glm/mat4x4.hpp> #include "Simplifier.h" struct ContractionPair { float cost; Index i0, i1; glm::vec3 recommendedPos; bool deleted; ContractionPair(float cost, const Index& i0, const Index& i1, const glm::...
true
08d4d14dc071c2b8eabe8dfa9c0efbc62fe422c9
C++
EvilPluto/Algorithm
/ComplexNode/ComplexNode/main.cpp
UTF-8
2,579
3.25
3
[]
no_license
// // main.cpp // ComplexNode // // Created by 修海锟 on 2017/3/12. // Copyright © 2017年 修海锟. All rights reserved. // #include <iostream> using namespace std; struct ComplexNode { int m_nValue; ComplexNode* m_pNext; ComplexNode* m_pSibling; }; void CloneNodes(ComplexNode* pHead) { if (pHead == NULL)...
true
fe171c1cd35edeba27a860096a3feff8522784ff
C++
cskilbeck/react4
/firmware/Core/Src/song.cpp
UTF-8
2,634
2.59375
3
[]
no_license
#include "main.h" #include "util.h" #include "song.h" #define TIMER TIM14 #define CHANNEL LL_TIM_CHANNEL_CH1 #define PORT GPIOA #define PIN 4 namespace { int constexpr speed = 18; song::note const *tune; int tune_length; song::option loop_option = song::option::single; int when;...
true
427119d4bc0a354b978a81a1441e6b888d146976
C++
pjaluka13/C-Programs
/doublylinkedlist/doublylinkedlist.h
UTF-8
1,502
3.3125
3
[]
no_license
/*---------------------------------------------------------------------- Programming Assignment No: 1 (CSCI311 spring 15) Name: Tejas Vamanrao Patil Date : 6 Feb 2015 File Name: playlist.h Implementation of a Playlist for music. Description: Implementation of a Playlist for music. A doubly linked list is used ...
true
c40963d24fc4fea71ba9b41d5e6ff8622fc26325
C++
eatoin5hrdlu/LemurCam
/LemurCam.ino
UTF-8
3,833
2.671875
3
[]
no_license
/* Flash pin 13 10 times and toggle a latching relay on pins 11 and 12 */ // DEFINE DEBUG to produce readable (ASCII) command strings //#define DEBUG 1 // DEFINE LEMUR for single camera version #define LEMUR 1 // For UP...CAM2, the constants correspond to Arduino inputs #define STOP 0 #define UNDEF1 1 #define UNDEF2...
true
acc44685b2bedd5de775d742a09cd70673bb1e55
C++
P4piJoke/DroneFlightSimulation
/Kursova_Papizhuk/Commander.h
UTF-8
826
3
3
[]
no_license
#ifndef COMMANDER_H #define COMMANDER_H #include "Navigator.h" class Commander : public Navigator { // Child class Commander for Navigator private: /* Velocity - two conventional units Battery drain - one conventional unit */ std::string commandAndControlType; // Commander command and control type public: Com...
true
5d93661cbd6397b6d10d1d430f007060545c5180
C++
saparhadi/ESP32
/ESP32-Firebase/ESP32-Firebase.ino
UTF-8
2,170
2.59375
3
[]
no_license
#include <WiFi.h> // esp32 library #include <IOXhop_FirebaseESP32.h> #define FIREBASE_HOST "saparhadi-191118.firebaseio.com" // the project name address from firebase id #define FIREBASE_AUTH "fjuyfKHCJYJEVvpAhTon5J3RshAF0xsq09UNuAIK" ...
true
dac8b0db567d947e921e495bedec66094f3b8ba6
C++
Lcch/ngramtools
/ngram_server.h
UTF-8
1,278
2.765625
3
[]
no_license
#ifndef NGRAM_SERVER_H #define NGRAM_SERVER_H #include <string> #include <cstdio> #include <unistd.h> using namespace std; const string kEON = "<EON>"; const string kSearch = "s"; const string kSearchExact = "e"; const string kSearchAndFilter = "f"; const int kBufSize = 10000; const int kLineBufSize = 1024; class ...
true
4d55857cdd691306229c69822a464a160d1462eb
C++
dbrisaro/algo1
/labos_algo1/labo02/ejercicio_03.cpp
UTF-8
1,637
3.171875
3
[]
no_license
/****************************************************************************** Ejercicio 03 Labo 02 AED1 Dani Risaro *******************************************************************************/ #include <iostream> using namespace std; int main() { float nota = 0; int i = 0; // cantidad de alumnos ...
true
09c53a9706a4d1a204c98ffbb9a3e9c95ab07db6
C++
dessskris/Enigma_Machine
/reflector.h
UTF-8
894
2.640625
3
[]
no_license
/*--------------------------------------------------------------------------+ | HEADER FILE | | File Name: reflector.h | | Student: Desy Kristianti | | Cours...
true
de7237a819131c50e2059fb61c4162ce68986d77
C++
PJK136/Brutus
/CProgAST.cpp
UTF-8
46,165
2.609375
3
[]
no_license
// ---------------------------------------------------------- C++ System Headers #include <iostream> #include <string> #include <vector> // ------------------------------------------------------------- Project Headers #include "CProgAST.h" #include "IR.h" #include "Writer.h" //////////////////////////////////////////...
true
496989217431fcd4398465546ba1f706749648d0
C++
CDAdkins/CS150
/zWeek13/SerendipityFinal/mainmenu.cpp
UTF-8
2,402
3.8125
4
[]
no_license
/* Serendipity Book Sellers Part 8 File Name:MainMenu.cpp Programmer: Chris Adkins Date Last Modified: 12/4/2019 CS 150 - Thursday 5:30PM Problem Statement: This program displays a main menu with the ability to show several other sub menus. As of right now there is some small logic used in order to allow the ...
true
7c6c1afa8a5c2397399210aebe532f7915aa9d15
C++
philipdongfei/DiscoveringModernCPP
/Chapter01/shared_ptr_simple.cc
UTF-8
368
3.25
3
[]
no_license
#include <memory> #include <iostream> #include <string> struct S { int i; std::string s; double d; S(int ii, std::string ss, double dd) { i = ii; s = ss; d = dd; } }; int main() { auto p = std::make_shared<S>(1,"Ankh Morpork", 4.65); std::cout << p->i << " " ...
true
1bb336de0f1885ce2a1f54a57deacbd0806985c4
C++
GabrielRavier/SmallPIM
/Menu.cpp
UTF-8
1,478
3.5625
4
[]
no_license
#include "Menu.h" #include <cctype> #include <iostream> #include <cstdlib> using std::tolower; using std::toupper; using std::string; using std::cin; using std::cout; using std::flush; /* Display a menu string and then allow user to enter a character from withing a string of choices. * If user enter...
true
caf3e776a8761055022b85f8b19b786de7fa9183
C++
lehuyduc/Basic-System-Architecture
/Code/multifunction++/main.cpp
UTF-8
1,341
3
3
[]
no_license
#include <utils.h> #include <assembly.h> #include <compiler.h> #include <iostream> #include <vector> #include <map> #include <fstream> #include <deque> using namespace std; void fcfs(deque<PCB*> pcbs) { PCB *pcb; while (!pcbs.empty()) { pcb = pcbs.front(); pcbs.pop_front(); pcb->runAll(); }...
true
bc38fed3516c4d6ce98d87c6df54c5fd85cde93b
C++
sourabbr/cpp_basics
/stl_maps_sets/src/main.cpp
UTF-8
2,079
3.578125
4
[]
no_license
#include "common.h" Void CountWords (ifstream &pFile); Void Display (const std::map <String, Int> &pWords1, const std::map <String, std::set <Int>> &pWords2); String CleanString (String &pStr); int main () { ifstream file; file.open ("../words.txt"); if (!file) { cerr << "Error in opening t...
true
f730b760c06757d68cfef74bc7b324c291fb8431
C++
KeioHigh-ElectronicsClub/quizJudgeController
/lib/quizControll/Test/TestRepository.h
UTF-8
837
2.84375
3
[]
no_license
#pragma once #include <Arduino.h> #include <vector> #include "domain/Recode/IResultRepository.h" #include "domain/Recode/Result.h" class TestRepository : public IResultRepository { public: TestRepository() {} ~TestRepository() {} bool init() { storage.clear(); return true; } bool store(std::uniq...
true
e5afdeac87d63b83429a63cce78ef3cf23a0f2ec
C++
cpuggal/Data-Structures
/cpp_learn/project/Birthday.h
UTF-8
248
2.515625
3
[]
no_license
#ifndef BIRTHDAY_H #define BIRTHDAY_H #include<iostream> using namespace std; class Birthday{ public: Birthday(int a, int b, int c); void print(); private: int month; int day; int year; }; #endif
true
36d73b7b8faac7179e4b2f59d19de83b8435b49d
C++
Oh-kyung-tak/Algorithm
/Baekjoon/baekjoon_2665.cpp
UTF-8
1,193
2.703125
3
[]
no_license
#include <iostream> #include <algorithm> #include <math.h> #include <queue> using namespace std; struct pos { int x; int y; int cnt; }; bool map[51][51]; bool visited[51][51][101]; int darkroom[51][51]; int dx[4] = { -1,0,0,1 }; int dy[4] = { 0,-1,1,0 }; int n; void check() { queue<pos> q; q.push({ 1,1,0 }); ...
true
48c872097d8dda6c09dd3cc3998fbbb89a66d3ae
C++
yungzyad/224FinalProject
/Reader.hpp
UTF-8
760
2.671875
3
[]
no_license
// // Reader.hpp // 224FinalProject // // Created by Zyad Gomaa on 11/10/17. // Copyright © 2017 Zyad Gomaa. All rights reserved. // #ifndef Reader_hpp #define Reader_hpp #include "User.hpp" #include <stdio.h> #include <string> #include <vector> using namespace std; #endif /* Reader_hpp */ class Reader: public U...
true
b135045886a4d89d4f32a6e8e884019d0dde9cb8
C++
cfoytek/DVSim
/include/Packet.h
UTF-8
1,049
2.75
3
[]
no_license
//This class defines a packet. Each packet has a packet type: 0 for DVPacket //1 for Data Packet. If the packet is a DV packet, the packet will contain //the sender's Routing Table. Each packet also has an original sender and //destination field. These are used by the nodes to route the packet to the //proper destinati...
true
41913d79c685318248fc4c20b0e2a4232407fca4
C++
ImuraYasuaki/TimerCore
/Timer_Core/Classes/Utilities/pathutil.h
UTF-8
779
2.71875
3
[]
no_license
// // pathutil.h // Timer_Core // // Created by myuon on 2014/11/30. // Copyright (c) 2014年 yasu. All rights reserved. // #pragma once #ifndef Timer_Core_pathutil_h #define Timer_Core_pathutil_h #include <sys/stat.h> namespace pathutil { bool isExistsPath(const char *path) { struct stat buffer; ...
true
bef493ce5e616e9be7382c1f8c295bdf0a3839ec
C++
marioviti/RayCharles
/src/Texture.h
UTF-8
707
2.546875
3
[]
no_license
#ifndef TEXTURE_H #define TEXTURE_H #include "src/Vec3.h" #include <vector> //#include <iostream> #include <GL/glew.h> //Always in this order! #include <GL/gl.h> //glew before gls class Texture { private: int w; int h; GLuint handleIndex; int bindIndex; int new_bind_idx(); unsigned char *ima...
true
420968775c8da31e2f861849c6cfe959d257ae0d
C++
JuanFerInc/Prog-4
/3_lab5/lab_5/Header/CtrlProducto.h
UTF-8
3,318
2.84375
3
[]
no_license
#ifndef CTRLPRODUCTO_H #define CTRLPRODUCTO_H #include <iostream> #include <set> #include <map> #include "../Header/IProducto.h" #include "../Header/Comida.h" #include "../Header/DtProducto.h" #include "../Header/DtMenu.h" #include "../Header/DtProductoMenu.h" using namespace std; class CtrlProducto :public IProdu...
true
e3f642cc51bcd60ffa3bb293c5718279fafafa0a
C++
chenyu1927/hello-world
/NetWork/Base/MutexLock.hpp
UTF-8
770
3.046875
3
[]
no_license
#ifndef MUTEX_LOCK_H_H #define MUTEX_LOCK_H_H #include<pthread.h> #include<boost/noncopyable.hpp> class MutexLock { public: MutexLock(){ ::pthread_mutex_init(&mutex_, NULL); } ~MutexLock(){ ::pthread_mutex_destroy(&mutex_); } int lock(){ return ::pthread_mutex_lock(&mutex_); } int unlock(){ return :...
true
6db327d5376445fa65ebfbfad536f036430031fb
C++
zouxianyu/query-pdb
/thirdparty/raw_pdb/src/Examples/ExampleContributions.cpp
UTF-8
3,374
2.515625
3
[ "BSD-2-Clause", "MIT" ]
permissive
// Copyright 2011-2022, Molecular Matters GmbH <office@molecular-matters.com> // See LICENSE.txt for licensing details (2-clause BSD License: https://opensource.org/licenses/BSD-2-Clause) #include "Examples_PCH.h" #include "ExampleTimedScope.h" #include "PDB_RawFile.h" #include "PDB_DBIStream.h" namespace { // we d...
true
2c047d1f5517ef2eb52b004ddfe7c7efd63890c4
C++
javed2214/BitMasking
/Remove-Duplicates-From-Str.cpp
UTF-8
477
3.453125
3
[]
no_license
// Remove Duplicates from String in O(n) time and O(1) Space // https://www.geeksforgeeks.org/remove-duplicates-from-a-string-in-o1-extra-space/ #include<bits/stdc++.h> using namespace std; int main(){ string str="geeksforgeeks"; int n=str.length(); int counter=0,p=0; for(int i=0;i<n;i++){ in...
true
4a311d45e577a70e0ca3f39d3f39cfd377586f57
C++
Schorsch0815/rccarlights
/SimpleRcCarLightController.h
UTF-8
3,455
2.875
3
[]
no_license
/*-------------------------------------------------------------------- * This file is part of the RcCarLights arduino application. * * RcCarLights is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either ve...
true
7dcf58b52cc0e5988df99f59b4decd49f4890934
C++
USNavalResearchLaboratory/simdissdk
/Testing/SimCore/CoreCommonTest.cpp
UTF-8
3,690
2.5625
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
/* -*- mode: c++ -*- */ /**************************************************************************** ***** ***** ***** Classification: UNCLASSIFIED ***** ***** Classified By: ...
true
a41304ce662ba6b6a109fe561d76650e942ee0d0
C++
16131zzzzzzzz/Homework202001
/3-9/ex5.cpp
UTF-8
2,962
3.84375
4
[]
no_license
#include <iostream> using namespace std; class IntegerSet{ private: int k[101]; public: IntegerSet() { for(int i = 0;i < 101;++i) { k[i] = 0; } } IntegerSet(int*,int); void inputSet(); void printSet() const; bool isEqualTo(IntegerSet) const; vo...
true
46771d310a261e333f6593d47d611828fed5f96f
C++
billpugh/microcontroller
/fadeTest/fadeTest.ino
UTF-8
1,590
2.625
3
[]
no_license
#include <Adafruit_NeoPixel.h> #include <hsv2rgb.h> #include "RNLightsNeoPixel.h" #define PIN 18 void p(char *fmt, ... ){ char tmp[256]; // resulting string limited to 128 chars va_list args; va_start (args, fmt ); vsnprintf(tmp, 256, fmt, args); va_end (args); Serial.print(tmp); } // Parameter 1 = numbe...
true
98fd92cfac42c7fed5306a46e2dbc7726df6a0c1
C++
TalPat/rubik
/app/src/Rubik.cpp
UTF-8
2,622
2.96875
3
[]
no_license
#include "Rubik.hpp" Rubik::Rubik(char *str) { input = str; tokens = lexer.lex(input); } Rubik::~Rubik() { } bool Rubik::validTokens(void) { // must be 1 or 2 in length // first char must be either "FRLBUD" // second characer must be either "'2" std::string target1 = "FRBLUD"; std::string target2 = "'2"; for...
true
7d3895561929c0caca0f78f4ea9ebbcd225d1ba2
C++
esra33/CppPatternsTutorials
/PatternsTutorial/CBinaryTreeIterator.cpp
UTF-8
2,047
3.0625
3
[]
no_license
#include <cstring> #include "CBinaryTreeIterator.h" #include "CBinaryTree.h" template <class T> CBinaryTreeIterator<T>::CBinaryTreeIterator(CBinaryTree<T>* binaryTree, CBinaryTreeIterator* parent, int index) : m_index(index), m_Status(0), m_BinaryTree(binaryTree) { m_NextNodes = new CBinaryTreeIterator*[3]; memset(m...
true
87308ec95916c460642b4bfdb846b709331c60ee
C++
punipuni21/competitive-programming
/AtCoder/ABC/ABC001-50/ABC027/A.cpp
UTF-8
381
2.984375
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { std::vector<int> array(4); int n = 0; for(int i = 0; i < 3 ; i++){ cin >> array[i]; } sort(array.begin(),array.end()); if(array[1] == array[2]){ n = array[3]; } if(array[2] == array[3]){ n = array[1]; ...
true