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
b8d6ecc095f43a58a4882dae4123a693d8fe66de
C++
CloverTinTin/CppPrimerStudy
/chapter_03/vector/Exercise_3_14/readFromCinStoreInVector.cpp
UTF-8
258
3.109375
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { vector<int> Vint; int temp; while(cin >> temp) Vint.push_back(temp); for(decltype(Vint.size()) i = 0; i < Vint.size(); ++i) cout << Vint[i] << " "; cout << endl; return 0; }
true
a9815264941e81720feaf631397da6488ce08be5
C++
vxl/vxl
/contrib/mul/pdf1d/pdf1d_exponential.h
UTF-8
2,812
2.96875
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
// This is mul/pdf1d/pdf1d_exponential.h #ifndef pdf1d_exponential_h #define pdf1d_exponential_h //: // \file // \brief Univariate exponential PDF // \author Tim Cootes #include <iostream> #include <iosfwd> #include <pdf1d/pdf1d_pdf.h> #ifdef _MSC_VER # include <vcl_msvc_warnings.h> #endif //: Class for exponential...
true
299c12c60c455994b1a480dac6cfceee54905f99
C++
Spourmoafi/Euclid-classification-algorithm-C-implementation
/Table.hpp
UTF-8
1,913
3.046875
3
[]
no_license
#ifndef Table_hpp #define Table_hpp #include <fstream> // // Table.hpp // lab // // Created by Sajid on 11/20/16. // Copyright © 2016 Sajid. All rights reserved. // #include <iostream> #include <sstream> #include <string> #include <vector> #include <iomanip> #include <cmath> #include <algorithm> #include <list> #i...
true
4cb392c689947c96342d945d137efbc9be8d2771
C++
zhaofeng-shu33/tech-chores-archive
/2014/cplusplus_summer/linklist_of_maple.cpp
UTF-8
2,993
3.3125
3
[]
no_license
#include<iostream> #include<cmath> using namespace std; class complex{ public: complex(){ // cout<<"complex0"; } complex(double a, double b) {real=a;img=b;}//?? complex(const complex& c){ real=c.real; img=c.img; //cout<<"complex2"; } ~complex(){ // cout<<"~complex"; ...
true
184dff1b93aad56f98fe0ab5907f190d81a9328c
C++
Code4fun4ever/pc-code
/solved/i-k/id-codes/idcodes.cpp
UTF-8
401
2.90625
3
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
#include <algorithm> #include <cstdio> #include <cstring> using namespace std; #define MAXLEN 50 char str[MAXLEN + 1]; int len; int main() { while (true) { scanf("%s", str); if (str[0] == '#') break; len = strlen(str); if (next_permutation(str, str + len)) printf("%s...
true
301b9cbb5ffe5484d41761ca6c76b9ae97f042f0
C++
pythogeeker/dsalgo
/linked list/kthNodeFromEnd.cpp
UTF-8
1,030
3.625
4
[]
no_license
#include<iostream> using namespace std; struct node { int data; node *next; }; int kthNode(struct node **head, int k) { if (k < 0 || head == NULL) return -1; node *p, *q; p = q = *head; for (int count = 0; count < k; count++) { if (q == NULL) return -1; q = q->next; } while (q) { q = q->next; p =...
true
0c2bd79856c3273fa702a5f23d005c51c7c41ef6
C++
tylerfunf555/ParsecSoda
/ParsecSoda/Stringer.h
UTF-8
2,778
3.328125
3
[ "MIT" ]
permissive
#pragma once #include <string> #include <cmath> #include <vector> #define STRINGER_MAX_WEIGHT (uint64_t)63 #define STRINGER_MAX_DISTANCE (uint64_t)(-1) #define STRINGER_DISTANCE_CHARS(N) ((uint64_t)1 << (STRINGER_MAX_WEIGHT - N)) #define STRINGER_DEFAULT_MATCH (uint64_t)3 using namespace std; /** * A pack of utilit...
true
0f07d42df0cda163180728a8c6b12b15bac84b28
C++
7haomeng/Sening_Intelligent_System
/07-Robot_Arm_1/catkin_ws/src/sis_arm/src/vis_workspace.cpp
UTF-8
2,103
2.609375
3
[]
no_license
#include <ros/ros.h> #include <visualization_msgs/Marker.h> #include <geometry_msgs/Point.h> #include <geometry_msgs/Vector3.h> #include <std_msgs/ColorRGBA.h> #include <std_msgs/Header.h> #include <cmath> class FK { private: const double _d0 = 0.045, _d1 = 0.06, _a2 = 0.065, _d3 = 0.07; double x_, y_, z_; ...
true
aee765cc42fd844b8e277bd68c72c8e89b95c555
C++
farhanahad/Basic
/(2)increment,decrement.cpp
UTF-8
347
2.765625
3
[]
no_license
#include<iostream> using namespace std; int main() { int x=6; int y=--x; cout<<x<<endl; cout<<y<<endl; int a=8; int b=x--; cout<<a<<endl; cout<<b<<endl; int c=7; int d=++x; cout<<c<<endl; cout<<d<<endl; int e=9; int f=x++; cout<<e<<endl; ...
true
b1692a9338c0c22aafe1dd076e19922e2ccde3bf
C++
ZhaoboDing/RayTracer
/src/model/Material.h
UTF-8
687
2.71875
3
[]
no_license
/** * Author: Zhaobo Ding (me@dingzhaobo.net) */ #ifndef RAYTRACER_MATERIAL_H #define RAYTRACER_MATERIAL_H #include <glm/glm.hpp> class Material { bool transparency; double shine, refl, refr; glm::vec3 kd, ks; public: Material(); Material( glm::vec3 kd, glm::vec3 ks,...
true
6ccebf83c1da9c1faf2247c2afeda1c8141ad6f1
C++
slowstone/leetcode
/hard/188 Best Time to Buy and Sell Stock IV/web_test/main.cpp
UTF-8
919
2.875
3
[]
no_license
class Solution { public: int maxProfit(int k, vector<int>& prices) { int n = prices.size(); if (n <= 1) return 0; int maxProfit = 0; if (k >= n / 2) { // if k >= n/2, then you can make maximum number of transactions. for (int i = 1; i < n; i++) { ...
true
44061da9f94e22b82554bd605c7bcbeb4de8c0ad
C++
roooodcastro/gamedev-coursework
/Game/Leaderboard.h
UTF-8
1,176
3.359375
3
[ "MIT" ]
permissive
/* * Author: Rodrigo Castro Azevedo * * Description: This class is just a helper to organize the leaderboard. Its purpose is * mainly take a score and check if it will get into the leaderboard, and also loading * and saving the leaderboard to the system. The leaderboard consists of 5 top scores, * and each time a...
true
eb7845fdd48a5e35da16647bd11a7300e5e6d4b3
C++
Nuos/KGLT
/kglt/loaders/opt_loader.h
UTF-8
2,093
2.5625
3
[ "BSD-2-Clause" ]
permissive
#ifndef OPT_LOADER_H #define OPT_LOADER_H #include <map> #include <vector> #include "../types.h" #include "../loader.h" namespace kglt { class SubMesh; namespace loaders { typedef int32_t Offset; class OPTLoader : public Loader { public: OPTLoader(const unicode& filename, std::shared_ptr<std::stringstream> da...
true
2a20e94f7e2146058b218e56c721a62f259c6a04
C++
controlol/project-robotica2021
/vision/headers/place.hpp
UTF-8
1,102
3.484375
3
[]
no_license
#ifndef placeheader #define placeheader #include <iostream> class place { private: /* data */ int x; int y; public: place(int x=0, int y=0); ~place(); int GetX(); int GetY(); void SetX(int); void SetY(int); void ChangeXY(int x, int y); bool operator==(p...
true
2e22606618a027528e5629474188cdb4f84731e7
C++
m2ci-msp/mri-shape-tools
/shared_include/image/segmentation/chanvese/ChanVeseDiffusionTensorFieldBuilder.h
UTF-8
2,600
2.515625
3
[ "MIT" ]
permissive
#ifndef __CHAN_VESE_DIFFUSION_TENSOR_FIELD_BUILDER_H__ #define __CHAN_VESE_DIFFUSION_TENSOR_FIELD_BUILDER_H__ #include <cmath> #include <armadillo> #include "image/segmentation/chanvese/ChanVeseSettings.h" #include "image/filter/diffusion/DiffusionTensorField.h" #include "image/ImageCalculus.h" #include "image/Imag...
true
4e027649a21a40f18dc557143b3366c32f641b4c
C++
Stomach-ache/Codeforces
/Bayan/B.cpp
UTF-8
1,043
2.640625
3
[]
no_license
/************************************************************************* > File Name: B.cpp > Author: Stomach_ache > Mail: sudaweitong@gmail.com > Created Time: 2014年10月05日 星期日 22时22分39秒 > Propose: ************************************************************************/ #include <cmath> #inclu...
true
32acaaf3d603ce89346c6e5a749f94c8e339e777
C++
fuersten/sun_ray
/sun_ray/script/objects/ring_pattern.h
UTF-8
2,529
2.5625
3
[ "BSD-3-Clause" ]
permissive
// // ring_pattern.h // sun_ray // // Created by Lars-Christian Fürstenberg on 07.03.20. // Copyright © 2020 Lars-Christian Fürstenberg. All rights reserved. // #pragma once #include <sun_ray/feature/ring_pattern.h> #include <sun_ray/script/objects/color.h> #include <sun_ray/script/objects/pattern.h> namespace ...
true
9cc9710f2a4859fa57f2c21cfa891b26494fa856
C++
abhi1362/HackerRank
/Algorithms/Implementation/Apple and Orange.cpp
UTF-8
519
2.71875
3
[]
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int s,t,m,n,a,b,temp; cin>>s>>t>>a>>b>>m>>n; int orange_count=0,apple_count=0; for(int i=0;i<m;i++){ cin>>temp; if(temp+a >= s && temp+a <=t) appl...
true
7ca37fe812db066edb856efbd17b9f3a6003a239
C++
gappadyl/sfmlCity
/sfmlCity/MovementComponent.cpp
UTF-8
2,377
3.328125
3
[]
no_license
#include "MovementComponent.h" //Constructor/destructor MovementComponent::MovementComponent(const float maxVelocity, sf::Sprite& sprite, float acceleration, float deceleration):sprite(sprite), maxVelocity(maxVelocity), acceleration(acceleration), deceleration(deceleration) { direction.x = 1; //set a initial directio...
true
c212b8f2c441702b422b7b9acb5733ecd532f3c9
C++
yqbeyond/Algorithms
/uva/uva1585.cpp
UTF-8
412
2.640625
3
[]
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> char str[100]; int main() { freopen("in.txt", "r", stdin); int n; scanf("%d", &n); while(n--) { scanf("%s", str); int len = strlen(str); int score = 0; int tmp = 0; for (int i = 0; i < len; i++) { if (str[i] == 'O') { ++tmp; sco...
true
bd074aef167b17c58bd6c510f4bbe0da8332e8cb
C++
poechsel/raytracer
/python/PythonContext.h
ISO-8859-1
901
2.96875
3
[]
no_license
#ifndef PYTHONCONTEXT_H #define PYTHONCONTEXT_H #include <string> #include <Python.h> #include <vector> #include <iostream> /* Une suite de fonctions permettant de convertir une variable en la variable * python correspondante */ inline PyObject* convertToPy(std::string str) { return PyUnicode_FromString(str.c_st...
true
40810d3964a5f0f23f28f30c03c7a510a1ff464b
C++
xuefrye/PAT-Advanced-Level-Practice
/1142 Maximal Clique (25 分)/1142 Maximal Clique (25 分).cpp
GB18030
1,662
3.28125
3
[]
no_license
/* 1142 Maximal Clique 25 ֣ 201922417:49:01 Ѷ,28 ע. 1.˼·Ҫ öṹʾܺͲ,Ҷӽǽ. */ #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<vector> using namespace std; const int maxn = 210; int G[maxn][maxn] = { 0 }; vector<int> clique; int nv, ne, m, k; int e1, e2; int c; int findNum(vector<int> &v, int &num) { for (int...
true
a9d0f995265eaff8856b7efddc1ffd3f52e0ea94
C++
tomfunkhouser/gaps
/pkgs/R3Utils/R3SurfelClassifier.cpp
UTF-8
8,766
2.609375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/* Source file for the surfel scene classifier class */ //////////////////////////////////////////////////////////////////////// // Include files //////////////////////////////////////////////////////////////////////// #include "R3Utils.h" //////////////////////////////////////////////////////////////////////// ...
true
9fdc1a86cdeb00bae74fc9b92ef48b833fe8dfd2
C++
tangjz/acm-icpc
/leetcode/1001-2000/1836-remove-duplicates-from-an-unsorted-linked-list.cpp
UTF-8
942
3.265625
3
[ "Apache-2.0" ]
permissive
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* deleteDupli...
true
6708fb0ec87ee698763cf445b9f59b91ebc2e006
C++
igoroogle/codeforces
/тренировка 7/ZAD_J_4.cpp
UTF-8
1,780
2.6875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { string s, s1; srand(time(0)); cin >> s; cout << "left: 1 2 3 right: 4 5 6\n"; fflush(stdout); cin >> s; if (s != "equal") { cout << "left: 1 2 3 right: 7 8 9\n"; fflush(stdout); cin >> s1; if (s1 =...
true
3c28ab5c68076c557f22b75f3a3e85472c8687d2
C++
aalto-speech/ftk
/test/msfgtest.cc
UTF-8
3,039
2.53125
3
[ "BSD-3-Clause" ]
permissive
#include <boost/test/unit_test.hpp> #include "defs.hh" #include "MSFG.hh" using namespace std; BOOST_AUTO_TEST_CASE(MultiStringFactorGraphTest1) { MultiStringFactorGraph msfg(start_end_symbol); set<string> vocab = {"k", "i", "s", "a", "sa", "ki", "kis", "kissa", "lle", "kin", "kala"...
true
81f28e5126afa50468d941af1f1d28534f5ced66
C++
Spyka/Class-Projects
/CS530/Final/symtab.h
UTF-8
1,234
3.34375
3
[]
no_license
/* CS 530, Spring 2014 symtab.h */ #ifndef SYMTAB_H #define SYMTAB_H #include <string> #include <map> #include <utility> #include <cstdlib> #include <iostream> #include <sstream> using namespace std; class symtab { public: // ctor symtab(); //Inserts a label and its val...
true
b37bfa4f5bd98dfee911a57cd47a036af07fa290
C++
pingany/poj
/3630/3614682_WA.cc
UTF-8
1,328
2.765625
3
[]
no_license
#include<iostream> using namespace std; const int MAX_NEXT=10;// max length of next array inline char hash(char c){return c-'0';}//use to store element struct Trie { int num; bool allowend; struct Trie *next[MAX_NEXT]; Trie(){init(0);} void init(int cc) { allowend=false; num=cc; me...
true
51f0c946996ae39674f95cc20b02bd2e086e49d5
C++
rjdsilv/OpenGLLib
/OpenGLLib/OpenGLShader.cpp
UTF-8
3,464
3.296875
3
[]
no_license
#include "OpenGLShader.h" #include <stdexcept> #include <fstream> #include <sstream> #include <iostream> #include <stdio.h> /* * Method : Class constructor. * Description: It will initialize the Shader with the path for the shaders files. * Param : vertexShaderPath - The path to the vertex shader code f...
true
3d3db4f51a2d0dbabe5fdb8b39780b1e908e715c
C++
davara13/algoritmicToolbox
/semana4/majority_element.cpp
UTF-8
1,131
3.359375
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> #include <cstdlib> using std::vector; void swap(int* a, int* b){ int t = *a; *a = *b; *b = t; } int RQS(vector<int> &a, int r, int l, int n){ if(l>=r){ return 0; } /*else if(r-l<(n/2+1)){ return 0; }*/ int k = l + rand()%(r-l); int x = ...
true
9cc46ae34f72b7756d21493ed626a6a04fa13e12
C++
JuJinHyeong/DirectX11Engine
/DirectX11Engine/DirectX11Engine/Graphics/PixelShader.cpp
UTF-8
717
2.546875
3
[]
no_license
#include "PixelShader.h" bool PixelShader::Initialize(Microsoft::WRL::ComPtr<ID3D11Device>& device, std::wstring& shaderpath) { HRESULT hr = D3DReadFileToBlob(shaderpath.c_str(), m_shaderBuffer.GetAddressOf()); if (FAILED(hr)) { OutputDebugString("failed to read pixel shader"); exit(-1); } hr = device->Creat...
true
580c933eebda6cea879b6f5baeca216b047992b5
C++
youssefAli11997/Project-Euler-Solutions
/001 - Multiples of 3 and 5.cpp
UTF-8
271
2.90625
3
[]
no_license
// coded by : Hossam Ali #include <iostream> using namespace std; int main() { int Count = 0; for (int i = 3 ; i < 1000 ; i++) { if(i % 3 == 0 || i % 5 == 0) Count = Count + i; } cout<<Count<<endl; return 0; }
true
0ba023320f5278911c52b08c44cdffe27f5e6a31
C++
WhiteStaff/OOP_3sem
/3/main.cpp
UTF-8
1,120
2.890625
3
[]
no_license
#include <iostream> #include "wav_core.h" using namespace std; int main(int argc, char *argv[]) { cout << "************** | WavCore | **************" << endl; // ################ Tests for WavCore ################ const char* input_fname = "c:\\temp\\0.wav"; const char* output_fname = "c:\\temp...
true
3b9001c8b52036a25e1c31f162117cb8db102be2
C++
sunilsarode/allc-programs
/eclerx/BinaryExponentiation.cpp
UTF-8
366
2.53125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef long long int ll; #define MOD 1000000007 ll power(ll x,ll y){ if(y==0){ return 1; }else if(y%2==0){ return power((x*x)%MOD,y/2); }else{ return (x*power((x*x)%MOD,(y-1)/2))%MOD; } } int main(){ ll s,n,m; cin>>s>>n>>m; co...
true
0f1d26bbf68edf9a78da8708e8968fc29846d974
C++
SunBo123/pratice
/每天学习/每天学习/Day1.cpp
GB18030
3,455
2.890625
3
[]
no_license
#include "stdafx.h" #include "Day1.h" Day1::Day1() { } Day1::~Day1() { } void Day1::show() { /*Mat src = imread("1.png",1); resize(src,src,Size(640,480)); imwrite("1.png",src); Mat src2 = imread("5.png", 1); resize(src2, src2, Size(640, 480)); imwrite("5.png", src2);*/ Mat src = imread("1.png", 1); name...
true
f6759b3e124ab2776c92750c4e8ea7589997403a
C++
chuckfairy/liborza
/src/Audio/ControlInterface.h
UTF-8
567
2.765625
3
[]
no_license
/** * Basic control interface */ #pragma once namespace Audio { class ControlInterface { public: /** * Virtual override methods */ virtual void start() {}; virtual void stop() {}; virtual void run() {}; virtual void pause() {}; /** * IO based */ virtual void clearInputs() {}; /** ...
true
4e1da3f43e0621773cbc8b4cd73175fddcbbb8f5
C++
getjump/os_stuff
/task3/main.cpp
UTF-8
733
3.171875
3
[]
no_license
#include <iostream> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> #define CHILD_PROCESS_ID 0 #define INVALID_PID(x) ((x) < CHILD_PROCESS_ID) using namespace std; int main() { pid_t pid = fork(); if(pid == CHILD_PROCESS_ID) { cout << "Child pid = " << getpid() << "; Parent pid = " << getpp...
true
ab4eacff782303170e86963694192ffd5ba25cf9
C++
NoahBGriffin/LoanIt
/LoanIt/Print.cpp
UTF-8
864
3.15625
3
[]
no_license
#include "Print.h" /** * Prints the list of items currently in the LoanIt tracker * @param itemList the list of items in LoanIt to be printed * @param mainMenu if true it will go to Return which creates a prompt to return to the main menu */ void PrintItemList(vector<Item> itemList, bool mainMenu) { cout ...
true
cd24f3d11fb909a910912d6948cb7ae7d0a9bb1c
C++
omochi/cpp-rhetoric
/src/rhetoric/option.h
UTF-8
1,292
2.625
3
[]
no_license
#pragma once #include "./std_dependency.h" #include "./assert.h" #include "./attribute.h" #include "./concept_macro.h" #include "./either.h" #include "./none.h" namespace rhetoric { constexpr Either2Tag NoneTag = Either2Tag::Case0; constexpr Either2Tag SomeTag = Either2Tag::Case1; template <typ...
true
1bfb00eeb649f10d1366bcb3b836f02cbbbf156e
C++
AzureeDev/100-Tangerine-Juice
/100 Tangerine Juice/LButton.cpp
UTF-8
5,702
2.96875
3
[]
no_license
#include "LButton.h" #include "Globals.h" #include "SFXManager.h" /* LButton Manages a button with automatic event handle. */ LButton::LButton() { } LButton::~LButton() { this->buttonVisible = false; } LButton::LButton(const string id, const string btnTexturePath) { this->buttonId = id; this->buttonTexture.se...
true
c9dc3f84ad760bf200d6bb54e8f723753a7803cd
C++
Fikretatr/CSE-241-OBJECT-ORIENTED-PROGRAMMING
/ps 6/ps6_part2.cpp
UTF-8
1,410
3.65625
4
[]
no_license
#include<iostream> using namespace std; class CharPair{ public: CharPair(); CharPair(int x); CharPair(int x,char a[]); int get_size(){return size;}; char& operator[](int index); private: char arry[100]; int size; }; int main(){ CharPair a; int bsize,csize; cout<<"Displays the values of o...
true
a5c72f81126e741f2170b35eb1e929fd06493649
C++
jvgille/Path-Tracer
/src/camera.hpp
UTF-8
2,230
3.125
3
[]
no_license
#ifndef CAMERA #define CAMERA #include <glm/glm.hpp> #include "constants.hpp" using glm::mat3, glm::vec3, glm::vec2, glm::normalize; const vec2 OFFSET{2*EPSILON, EPSILON}; // slightly offset to avoid alignment lightning bugs class Camera { vec3 pos; vec2 rot; mat3 rot_matrix; float focal_length; ...
true
a5505bbf13ce6c2f35d1adda305d1bd6905b781c
C++
aryabartar/BSc-HWc
/Fundamental Programming/HW3/6-2.cpp
UTF-8
432
3.125
3
[]
no_license
#include <iostream> #include <cstring> using namespace std ; int main() { const int aMaxSize = 70 ; char a[aMaxSize] ; int whiteCount = 1 ; cin.get (a ,80) ; if ( strtok (a , " ") == NULL) cout << "No word !" ; else { while (strtok (NULL , " ") != NULL){...
true
0508703db0ee58f70af1143521cb30e62afa11b5
C++
radif/mcbPlatformSupport
/mcbPlatformSupport/utils/mcbAnimationSprite.h
UTF-8
2,899
2.53125
3
[ "MIT" ]
permissive
// // mcbAnimationSprite.h // PlatformSupport // // Created by Radif Sharafullin on 7/24/13. // // #ifndef __mcb__utils__AnimationSprite__ #define __mcb__utils__AnimationSprite__ #include "cocos2d.h" namespace mcb{ namespace PlatformSupport{ class AnimationSprite : public cocos2d::CCSprite{ typedef coc...
true
ae9f74ea9c7f92ba03df3f65ab6a7d4d2c11ca8f
C++
yeyintlwin/learn-cpp
/CH-16 GENERIC ALGORITHMS/ex1601.cpp
UTF-8
976
3.921875
4
[]
no_license
// Listing 16.1: Using adjacent_find() function #include <iostream> #include <set> #include <algorithm> using namespace std; int main() { // Create the set of object. multiset<int, less<int>> intSet; intSet.insert(10); intSet.insert(3); intSet.insert(1); intSet.insert(3); intSet.insert(8); intSet.inse...
true
2597ce657ccad4b8eaeab4fc0eacb0b3d77a63d2
C++
utnapischtim/polygon
/server/unittests/test_TwoOptMoves.cpp
UTF-8
6,675
2.796875
3
[ "MIT" ]
permissive
#include "easylogging++.h" #include "catch.hpp" #include "../src/TwoOptMoves.cpp" bool map_compare(const auto &lhs, const auto &rhs) { auto pred = [](const auto& a, const auto &b) { return a.first == b.first && a.second == b.second; }; return std::equal(lhs.begin(), lhs.end(), rhs.begin(), pred); } TEST_CA...
true
ef1e0ea473a2d756ed78d4f33cb1bcea44f98729
C++
Abigail-Verhelle/CS120
/RI.cpp
UTF-8
620
4.3125
4
[]
no_license
#include <iostream> using namespace std; //function to round int round (int number,int unit) { int digit = number % unit; number = number - digit; return number; } // place * 10 at some point int main (){ //input int a = 0, place= 10; cout << "Enter an integer: ";...
true
e46d152f32ca2ee7fc042bb1771e060dbeeec65b
C++
agnusmaximus/GPU_W2V
/preprocess/wikipedia/create_graph_from_corpus.cpp
UTF-8
1,375
2.78125
3
[]
no_license
#include <iostream> #include <fstream> #include <map> #include <sstream> #include <deque> using namespace std; #define WINDOW 20 #define LIMIT -1 int main(int argc, char *argv[]) { ifstream in(argv[1]); map<int, map<int, int> > graph; map<string, int> word_to_id; deque<int> window; string cur_wor...
true
d306dac610b13bde7cbdd1d6db75ba7b2d984f76
C++
JCvegaDangel/Funciones
/funciones/Programa 3 tarea - mayor que en 3 datos.cpp
UTF-8
622
3.921875
4
[]
no_license
//Vega Del angel Juan Carlos - 2AV6 //Ejercicio 3 Funciones - mayor que en 3 numeros #include<iostream> using namespace std; int max(int a, int b); int main(){ int n1, n2, n3; cout << ("Introduce el valor del primer valor: ") << endl; cin >> n1; cout << ("Introduce el valor del segundo valor: ...
true
280bda46c682c324c86e119574c4969cb5eb05a7
C++
marcosrodriigues/ufop
/conteudo/Introdução à Programação (Prática)/Exercicios/P03_Marcos_Rodrigues/Exercício 92.cpp
UTF-8
1,893
3.53125
4
[]
no_license
/* Numa universidade cada aluno possui os seguintes dados: - Renda pessoal; - Renda familiar; - Total gasto com alimentação; - Total gasto com outras despesas; Criar um programa que imprima a porcentagem dos alunos que gasta acima de R$ 200,00 com outras despesas, o número de al...
true
4fc00fe84a246334273b1b62b331265827096f7a
C++
lizhengdao/imooc_ds
/ds/SelectionSort.h
UTF-8
596
2.796875
3
[]
no_license
// // SelectionSort.h // ds // // Created by Ruby on 2021/5/12. // #ifndef SelectionSort_h #define SelectionSort_h using namespace std; template <typename T> void selectionSort(T a[], int n) { for (int i = 0; i < n; i++) { int minIndex = i; for (int j = i + 1; j < n; j++) { if (a[j...
true
4444087f93c0fb3ffb58b32ba960bb3cecb3eb85
C++
rheehot/BS_Engine
/Engine/Memory/MemoryManager.cpp
UTF-8
473
2.75
3
[ "MIT" ]
permissive
#include "MemoryManager.h" #include <cstdlib> namespace BE { void MemoryManager::Init(std::initializer_list<SizeType> memorySizes) { check(memorySizes.size() == 5); auto sizes{ memorySizes.begin() }; managerMemory.Init (sizes[0]); componentMemory.Init(sizes[1]); resourceMemory.Init (sizes[2]); oneFram...
true
834b9fc58a9b32f6d06d0efab6d2ad5c25992d02
C++
zhaojidabao/MGCode
/Dot.cpp
GB18030
3,327
3.015625
3
[]
no_license
// DotB.cpp: implementation of the CDot class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "Dot.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif /////////////////////////////////////////////////////////////////...
true
25ced2c14086a7b26037d52cce5f0e89b259840e
C++
tz01x/Algorithm
/Singel_source_Bellman_fore_.cpp
UTF-8
2,797
2.671875
3
[ "MIT" ]
permissive
#include<bits/stdc++.h> using namespace std; int infinity=numeric_limits<int>::max(); //class node{ //public: // int key; // int weight; // node(){ // key=0; // weight=0; // } // node(int key,int weight){ // this->key=key; // this->weight=weight; // // } //}temp; /...
true
87929c55fc529fb8e14eb4aae7cdf1da07f02653
C++
Falcon20/Data-Structures-and-Algorithms
/Tree/count_leaves_in_a_binary_tree_iterative.cpp
UTF-8
791
3.875
4
[]
no_license
// Problem link - https://practice.geeksforgeeks.org/problems/count-leaves-in-binary-tree/1 /* A binary tree node has data, pointer to left child and a pointer to right child struct Node { int data; Node* left; Node* right; }; */ /* Should return count of leaves. For example, return value should b...
true
adbf9462478e1451afbbc298893eadc662bbacd6
C++
omarshawky15/Data-Structures-and-Algorithms-solutions-Coursera-
/Strings/Week 2/bwmatching/bwmatching.cpp
UTF-8
3,536
3.234375
3
[]
no_license
#include <algorithm> #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; static const int noCh = 5; int chartoidx(char ch) { switch (ch) { case 'A' : return 0; case 'C' : return 1; case 'G' : return 2; ca...
true
4997e916b940ba5b4c27a9d1190b518f0f035fea
C++
imefisto/catchcmake-modular
/src/PersonModule/src/Person.cpp
UTF-8
421
2.96875
3
[ "MIT" ]
permissive
#include "PersonModule/Person.h" std::string PersonModule::Person::getFullName() { std::string fullName = _name; if(_name.length() > 0 && _surname.length() > 0) { fullName += " "; } fullName += _surname; return fullName; } void PersonModule::Person::setName(const std::string & name) { _name = na...
true
302ac00a2df2485fd5915fdf254d56cfcac71c4c
C++
AlexMaz99/WDI
/lab9,10/zad15.cpp
UTF-8
1,254
3.875
4
[]
no_license
#include <iostream> using namespace std; struct node { int w; node *next; }; bool repeated(node *first, node *p) { while (first != NULL) { if (first != p && first->w == p->w) return true; first = first->next; } return false; } // 3 3 2 1 6 1 9 // 3 2 1 6 9 void remove(node *firs...
true
3a3c25a509c9030b9d375f7ee159145fcad29eb9
C++
olinrobotics/edwin_stereo
/src/rectifier.cpp
UTF-8
2,230
2.5625
3
[ "MIT" ]
permissive
#include <string> #include <iostream> #include "edwin_stereo/rectifier.h" Mat get_matrix(const YAML::Node& node){ int cols = node["cols"].as<int>(); int rows = node["rows"].as<int>(); auto m_base = Mat_<float>(rows,cols); std::vector<float> data; //data.reserve(cols*rows); for (const auto& d : node["data"]){ ...
true
775379ea83e17fbea0e3d7f8e4ae54597855e77d
C++
sunny-aguilar/lab3
/Die.hpp
UTF-8
1,067
3.359375
3
[ "MIT" ]
permissive
/********************************************************************* ** Author: Sandro Aguilar ** Date: Jan 2019 ** Description: This dice class creates an object that has a ** member function that returns a random integer from ** 1 to N (this function is over...
true
e375017d1fe0f10c7f2868258aea1e4b6ad691cb
C++
StevenHickson/CreateNormals
/CreateNormals.h
UTF-8
2,368
2.640625
3
[ "MIT" ]
permissive
#include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> bool ReadParameters(const std::string &filename, std::vector<float> *camera_params, std::vector<float> *normal_params, std::vector<...
true
fcddf2e10d4027084209f0c25f798b5794576de7
C++
chriskatnic/CPSC301
/C-string and arrays/cString.cpp
UTF-8
4,574
3.765625
4
[]
no_license
// Chris Katnic // 09.30.13 // C-strings and arrays #include <cstring> #include <iostream> using namespace std; int welcome(); // welcome(): Prints out a welcome page and returns the number of books that the user wants to enter void readInfo(int, char[][70], char[][70]); // readInfo(): Takes in the inf...
true
c798e598ca5e8f47fda655a4797e7e4a2e70611c
C++
atran126/Musical-Mechanical-Calculator
/Button.h
UTF-8
401
2.828125
3
[ "MIT" ]
permissive
/* Buffer.h Header file for the button class */ /* Ensures no errors if user includes the class twice */ #ifndef Button_h #define Button_h class Button { public: Button(int mult, int pin); int press_button(int val); int get_val(); int get_pin(); int reset(); private: ...
true
bf27e8120f0138fead47bd656dd70c6ca679b819
C++
GilM04/C-Users-Francisco-Desktop-lorenys-documentos
/PROYECTO FINAL.cpp
UTF-8
810
3.125
3
[ "MIT" ]
permissive
#ifdef __MSDOS__ #include <iostream.h> #include <stdlib.h> #else #include <iostream> #include <cstdlib> using namespace std; #endif int main (void) { float cuotas, interes, pago_por_cuota, prestamo; cout << "Ingrese el valor de prestamo: "; cin >> prestamo; cuotas=3; ...
true
8e70d13707ed6e0887cc1000e04eef865012dca9
C++
gghcode/practice-problem-solving
/src/lavida/1727.cpp
UTF-8
557
3.015625
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; bool cmp(const pair<int, float>& o1, const pair<int, float>& o2) { return o1.second > o2.second; } int main() { int TC; scanf("%d", &TC); while (TC--) { pair<int, float> arr[3]; for (int i = 0; i < 3; i++...
true
cf023976902238062df0f4457a6c7a4329384cad
C++
2534537w/Data-Structure
/14-hash-table/main.cpp
UTF-8
1,179
2.90625
3
[]
no_license
#include "hash_table.hpp" #include "file_ops.hpp" #include <ctime> vector<string> words; int main() { cout << "test hash" << endl; // 我们使用文本量更小的共产主义宣言进行试验:) //string filename = "communist.txt"; string filename = "pride-and-prejudice.txt"; //string filename = "a-tale-of-two-cities.txt"; if( Fi...
true
e59d212060aaa25ad273158fd9ff126d9aba3e0e
C++
nrey/eulerProject
/eu0062/eu0062.cpp
UTF-8
1,443
2.828125
3
[]
no_license
#include"eu0062.h" void eu0062 :: solucion(){ // ---------------------------------------------------- // tstart = (double)clock()/CLOCKS_PER_SEC; // ---------------------------------------------------- // output = 0; // ---------------------------------------------------- // std::map<long,int> cubos; ...
true
5338d828fd91a1ec2eee7d4b80070311ea19d94f
C++
huangguojun/cmake
/clang-blueprint/src/main.cpp
UTF-8
400
2.96875
3
[]
no_license
/// \file #include <bits/stdint-intn.h> #include <cstdint> #include <cstdlib> #include <iostream> #include "fact/factorial.h" /// Program entry point. int32_t main(const int32_t /*argc*/, const char** /*argv[]*/) { const int32_t n = 7; const int32_t result = fact::factorial(n); std::cout << "Hello, Wor...
true
78e7ee30c88fa48196470b0e84be6712a6a0c28e
C++
AtlasGooo/Infantry_code
/infantry_serial/include/Packet.hpp
UTF-8
2,165
2.65625
3
[]
no_license
#ifndef PACKET_HPP #define PACKET_HPP #include "StreamBytesBuffer.hpp" namespace stream { class PacketBehaviorProto; enum class StreamType { PacketStreamType = 1, BytesStreamType = 2, }; template<StreamType type> class Stream; template<class PacketProtoType> class PacketTypeList { public: static P...
true
993f0cfd1ba26d0f077bb3185562326a53e2823d
C++
sgc109/algorithm_practice
/ssm1.cpp
UTF-8
1,964
2.59375
3
[]
no_license
#include <cstdio> #include <iostream> #include <cstring> #include <cmath> #include <vector> #include <utility> #include <algorithm> using namespace std; typedef long long ll; const int mod = 1e9 + 7; const int inf = 0x3c3c3c3c; const long long infl = 0x3c3c3c3c3c3c3c3c; class Rumor { public: int N; ...
true
ba91e057148d36252f9477e5d90cbdd8b74a98ab
C++
Ayushtytripatha/Placement-Questions
/sorting/Merge.cpp
UTF-8
1,094
3.125
3
[]
no_license
#include<iostream> using namespace std; void merge(int arr[],int lb,int mid,int ub){ int i = lb; int j = mid+1; int k = lb; int b[ub+1]; while(i<=mid && j<=ub){ if(arr[i]<=arr[j]){ b[k] = arr[i]; k++; i++; } else{ ...
true
2cda5c14de0bf671096ced4afa9031c50130049c
C++
camdenvaughan/Algorithm-Visualization
/src/utility/Button.h
UTF-8
1,147
2.609375
3
[]
no_license
#pragma once #include <SFML/Graphics.hpp> #include <iostream> enum class SceneState; class Button : public sf::Drawable { public: Button(std::string text, sf::Vector2f position, SceneState sceneState, unsigned int fontSize = 25, sf::IntRect defaultTextureCoords = sf::IntRect(0, 0, 192, 64), sf::IntRect clickTextur...
true
07c9a2e177fc794ef61be02c2125967ff3e84605
C++
MariyanMomchilov/HuffmanCoding
/HuffmanCodingProject/include/HuffmanTree.h
UTF-8
1,463
2.859375
3
[]
no_license
#ifndef __HUFFMAN #define __HUFFMAN #include "PriorityQueue.h" #include <string> #include <stack> class HuffmanTree { private: Node *root; friend std::ostream &operator<<(std::ostream &os, HuffmanTree &tree); friend std::istream &operator>>(std::istream &is, HuffmanTree &tree); void clear(Node *node)...
true
3507a3e74d1e934c11cf7d31b23ae12788cef7a2
C++
bancamaria/POO-Lists
/List.h
UTF-8
1,672
3.671875
4
[]
no_license
#ifndef LIST_H_INCLUDED #define LIST_H_INCLUDED using namespace std; ///creating a class for the list class List { ///declaring a structure for node elements struct node{ int value; node *next; }*first, *last; public: ///public type for accessing node elements typede...
true
75ede131b3992b0c5249105661d4b433a051ce1f
C++
Bhutanisachin19/C-and-C-College-Codes
/assignment5.cpp
UTF-8
3,647
3.75
4
[]
no_license
// input 10 intergers /* #include<fstream> #include<iostream> using namespace std; int main() { ofstream outfile("cppfile"); if((outfile.good())==0) // to check whether an error has occured or not cout<<"Unable to open file\n"; int c; int i=1; cout<<"Enter 10 numbers :"<<endl; while (i<=10) { cin>>c; out...
true
11e292399b286f4df6f95a22550c880c099be289
C++
FMMazur/CppTuiGameEngine
/src/Engine/Transform.cpp
UTF-8
1,695
3.078125
3
[]
no_license
#include "Transform.hpp" #include <sstream> Transform::Transform() : Component() , m_position() , m_scale(Vector3f::one()) , m_rotation() {} Transform::Transform(Vector3f position) : Component() , m_position(position) , m_scale(Vector3f::one()) , m_rotation() {} Transform::Transform(...
true
8c0e6caf8aa49ccf67d229a8e096928d33ab8d1c
C++
Coderdu/linux-hook-api
/elf_parser_api_x64/elf_parser.cc
UTF-8
6,055
2.671875
3
[]
no_license
/* * elf_parser.cc * * Created on: Aug 11, 2010 * Author: fify */ #include <iostream> #include <string> #include <string.h> #include <fstream> #include <algorithm> #include "elf_parser.h" using std::string; using std::fstream; using std::cout; using std::endl; namespace ElfParser { int getAllSectionHead...
true
d189b186ea35a44e3d11efd2368bdcd5550f18c3
C++
Jaspr2020/Machi-Koro
/Machi Koro/Player.h
UTF-8
785
2.921875
3
[]
no_license
#ifndef PLAYER_H #define PLAYER_H #include "Establishment.h" #include "Landmark.h" #include <iostream> #include <string> #include <vector> using namespace std; class Player { public: Player(); Player(string name); string GetName(); int GetCoins(); vector<Establishment> GetEstablishments(); vector<Landmark> GetL...
true
754c2c9ccd3c717edbf256cc8a50831ce56d2f2a
C++
elderfd/BeeTracker
/BeeTracker/Experiment.cpp
UTF-8
1,534
2.875
3
[]
no_license
#include "Experiment.h" #include <QMap> Experiment::Experiment() {}; Experiment::Experiment(const ExperimentDesign& design) : _design(design) {} Experiment::~Experiment() {} void Experiment::addEvent(const ExperimentEvent& evt) { events.push_back(evt); } void Experiment::addEvent(ExperimentEvent::Time time, ...
true
3b03eba7dc734e54e869feaf8482c76ee3efa56b
C++
gtraines/robot1
/sketches/libraries/Indicator/Indicator.h
UTF-8
844
2.71875
3
[ "MIT" ]
permissive
#ifndef ROBOT1_INDICATOR_H #define ROBOT1_INDICATOR_H class Indicator { public: static void turnOnLed(int pinNumber); static void turnOffLed(int pinNumber); static void momentaryLedOn(int pinNumber); static void momentaryLedOn(int pinNumber, int delay); static void strobeLed(int pinNumber, int del...
true
8f21282551be2e739f42de666f7c6c42475c97db
C++
kimgea/BusinessObject3
/source/examples/business/User.h
UTF-8
454
2.53125
3
[]
no_license
#pragma once #include "BusinessTable.h" #include "AbstractPerson.h" #include "AbstractPassword.h" #include "Place.h" // class User : public AbstractPerson, public AbstractPassword, public BusinessObject { protected: Place place; // Foregin relation.... must find a better way to do this. Must be able to remove this ...
true
ce23d9805522e557b61dcee2ef0f4543319cf37c
C++
devonhollowood/dailyprog
/2015-05-22/truth_table.cpp
UTF-8
987
3.625
4
[ "MIT" ]
permissive
#include <iostream> #include <iomanip> #include <string> #include <type_traits> template <typename T> typename std::enable_if<std::is_convertible<T, bool>::value, const char*>::type truthiness(T t) { return t ? "True" : "False"; } template <typename T> typename std::enable_if<!std::is_convertible<T, bool>::value,...
true
76a81fe478131937107a7b56f9c1f085ee4a8e27
C++
KendrickAng/competitive-programming
/codeforces/760div3/b/missingbigram.cpp
UTF-8
492
2.5625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; string s = ""; for (int i = 0; i < n-2; i++) { string tmp; cin >> tmp; if (s == "") { s += tmp; } else if (s.back() == tmp[0]) { s += tmp[1]; } else { s += tmp;...
true
b9301281e4b03317f42c85ce9049b1a323627bb3
C++
manuel-fischer/LP-Solver
/src/lp-model-transform.hpp
UTF-8
1,821
2.84375
3
[ "MIT" ]
permissive
#pragma once #include "lp-model.hpp" #include "lp-model-classify.hpp" #include <algorithm> // -> std::partition void make_negative(linear_var_t& linear_var) { linear_var.coefficient *= -1; } void make_negative(linear_t& linear) { for(auto& t : linear.terms) { make_negative(t); } } lp_model_t...
true
1f0c7ec5709e8688b3b1ec8c615d7bf6419af139
C++
BrianErikson/jenkins-notifications
/src/jnotify/UrlHook.cpp
UTF-8
1,713
2.703125
3
[ "MIT" ]
permissive
#include <utility> #include <curl/curl.h> #include <cassert> #include <iostream> #include "UrlHook.h" using namespace url_notify; UrlHook::UrlHook(std::string url, UrlHookCallback callback, long long poll_rate) : poll_rate(poll_rate), next_execution(TimeType::now() + std::chrono::milliseconds(poll_rate)), ...
true
81bbb4539b28d48844885c55983ceb2fbadbc052
C++
isglobal-brge/BigDataStatMeth
/src/hdf5_getSDandMean.cpp
UTF-8
14,064
2.890625
3
[]
no_license
#include "include/hdf5_getSDandMean.h" using namespace Rcpp; // Get mean and corrected sd from each column in dataset in the case of n<<m, this information is used // to normalize data, center or scale. int get_HDF5_mean_sd_by_column_ptr(H5File* file, DataSet* dataset, Eigen::MatrixXd& normalize ) { Integer...
true
b9dc27002ca65649c7fb6cdfe6fc4e9e24fb509a
C++
PunkyIANG/ASDC
/lab4/directAccess.cpp
UTF-8
3,126
3.34375
3
[]
no_license
#include <iostream> #include <math.h> /* pow */ #include <cstdarg> template <typename T> class DirectAccess { private: T *arr = NULL; int *bounds = NULL; int n = 0; bool isRand = true; int GetD(int i) { if (isRand) { if (i == n-1) return 1; ...
true
9fb27667aa694e06517b295d007302b66d27f982
C++
BeamMW/beam
/bvm/unittest/doc_test.cpp
UTF-8
1,270
2.59375
3
[ "Apache-2.0" ]
permissive
#include <iomanip> #include "../bvm2.h" int g_failedTests = 0; class DocProcessor: public beam::bvm2::ProcessorManager { public: void SelectContext(bool bDependent, uint32_t nChargeNeeded) override { } void TestQuotedText(const char* what, const std::string& expected) { std::ostringstream stream;...
true
e0edcf804f243206cf2b84013665645cee3e804f
C++
lunatikub/lunatris
/tests/unit/eval/test_eval_homogeneous.cc
UTF-8
1,203
2.671875
3
[ "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
#include "test_eval.hh" TEST_F(Eval, DeltaLine) { uint32_t dl = 0; EXPECT_EQ(eval_delta_line(wall), dl); // 0 - X......... wall_set(wall, 0, 0); ++dl; EXPECT_EQ(eval_delta_line(wall), dl); // 1 - X.X.X.X.X. wall_set(wall, 1, 0); wall_set(wall, 1, 2); wall_set(wall, 1, 4); wall_set(wall, 1, 6);...
true
d7c6db17f0bb33a75acd4069e0e9540b76944a06
C++
dajoh/Antumbra
/Client/Renderer/Texture2D.cpp
UTF-8
2,309
2.890625
3
[]
no_license
#include <exception> #include "Texture2D.hpp" namespace Antumbra { Texture2D::Texture2D() : m_filled(false) { glGenTextures(1, &m_texture); } Texture2D::~Texture2D() { glDeleteTextures(1, &m_texture); } void Texture2D::Fill(const void *data, int width, int height, GLenum format) { GLenum formatType; ...
true
0ca0b9bc78d9adb27d5ad35d782afff5a6ed14b3
C++
BSkin/Boat
/Boat/Boat.cpp
UTF-8
2,594
2.625
3
[]
no_license
#include "Boat.h" Ocean * Boat::ocean = NULL; list<GameObject *> * Boat::oceanHeightModObjects = NULL; Boat::Boat(string m, string t, string s, glm::vec3 position, glm::vec3 direction, glm::vec3 up, string path) : PropObject(m, t, s, position, direction, up, path) { oceanHeightModObjects->push_back(this); turnRate...
true
359a6e626e699a34f1ffeb30bd238651fb2500e2
C++
ue-sho/Library
/algorithm/Graph/MST_prim.hpp
UTF-8
1,477
3.765625
4
[]
no_license
// 最小全域木(minimum spanning tree) // プリム法 // 重み付き連結グラフの最小全域木のコストを求める #include <queue> #include <vector> using namespace std; struct Edge { int destination; //到達点 int cost; //移動コスト Edge() = default; Edge(int destination, int cost) : destination(destination), cost(cost) {} bool operator>(c...
true
7bed712200d986059ec57c190fa41bf095858f7f
C++
sariq90/GIP1819
/P12/P12_01_FilledRect/MyFilledRectangle.h
UTF-8
211
2.546875
3
[]
no_license
#pragma once #include "MyRectangle.h" class MyFilledRectangle : public MyRectangle { public: MyFilledRectangle(int x1 = 0, int y1 = 0, int x2 = 20, int y2 = 20) : MyRectangle{ x1,y1,x2,y2 } {} void draw(); };
true
c5db572a5f8b6ba3166f67e99932823a7eab5361
C++
syoyo/tinyusdz
/src/handle-allocator.hh
UTF-8
2,382
2.828125
3
[ "MIT", "MIT-0", "Zlib", "BSD-3-Clause", "ISC", "BSL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
// SPDX-License-Identifier: Apache 2.0 // Copyright 2022-Present Light Transport Entertainment Inc. #pragma once #include <cstdint> #include <algorithm> //#include <iostream> //#include <cassert> #include <limits> #include <vector> namespace tinyusdz { /// /// Simple handle resource manager /// Assume T is an unsign...
true
93059d9842ec6c0c2aca54c241bce87da48714cd
C++
pratyush220498/Data_Structure-CPP
/basic/PassByValue.cpp
UTF-8
497
3.328125
3
[]
no_license
#include<iostream> using namespace std; void swap(int,int); int main() { int i,j,k; cout<<"enter first no. :- "; cin>>i; cout<<"enter second no. :- "; cin>>j; cout<<"before swspping no's are :- "<<endl; cout<<"i = "<<i<<endl; cout<<"j = "<<j<<endl; swap(i,j); cout<<"after swspping no's are :- "<<endl; cout<<...
true
e74e7cae23e281672184c7c70f96e4edf4340444
C++
tech-holic/hello-world
/findnum/main.cpp
GB18030
614
3.125
3
[]
no_license
#include <iostream> using namespace std; int binaryFind(int a[],int target,int maxlenth) { int left=0; int right=maxlenth-1; int mid; while(left<right) { mid=(left+right)/2; if(a[mid]==target) return mid; else if(a[mid]>target) right=mid; else if(a[mid]<target) left=mid; } if(left==right) { ...
true
26239e365b8bfcad89afbcf8d38fe27f6d75faf0
C++
hempnall/codeexamples
/cpp/yara/yara/main.cpp
UTF-8
1,142
2.515625
3
[]
no_license
#include <iostream> #include <yara.h> #include <cstring> using namespace std; int callback_function( int message, void* message_data, void* user_data) { YR_STRING* s; if (CALLBACK_MSG_RULE_MATCHING == message) { YR_RULE* rule = static_cast<YR_RULE*>(message_data); yr_rule_strings...
true
4af03c51098f62651e69ab2c8b515470a476b8f5
C++
Pradeep-Gopal/Path_Planning_DepthFirstSearch_CPP14
/rwa3/LandBasedWheeled/LandBasedWheeled.h
UTF-8
2,021
3.28125
3
[]
no_license
// // Created by prade on 4/22/2020. // #pragma once #include <string> #include <memory> #include "../LandBasedRobot/LandBasedRobot.h" #include <iostream> namespace rwa3 { class LandBasedWheeled : public LandBasedRobot { public: //--method prototypes virtual void GoUp(int x_, int y_) overrid...
true
8e27c0651445b62fe294f859bdc5f935e1a60c39
C++
noobcoder1137/data_structures_c-
/doubly_linked_list.cpp
UTF-8
5,994
3.8125
4
[]
no_license
// NoobCoder.com // source code for video tutorial series found here // https://www.youtube.com/playlist?list=PLvTjg4siRgU02UgV08owYouXQSZO1a5W3 #include <iostream> using namespace std; class Node{ public : int data; Node *next; Node *prev; Node(int data){ this->data =...
true
4f6f96a5932c9d2c172414ebd7ad6ad0e64abbac
C++
shota-yamashita/atcoder
/contests/abc120/abc120_b.cpp
UTF-8
366
2.9375
3
[]
no_license
// B - K-th Common Divisor // https://atcoder.jp/contests/abc120/tasks/abc120_b #include <iostream> using namespace std; int main() { int a, b, k; cin >> a >> b >> k; int count; for(int i=min(a, b); i>=1; i--) { if ((a%i==0) && (b%i==0)) count++; if (count == k) { cout << i << ...
true