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
2a4f03c039692f6beb9b3d4afa4338e46bc0e64c
C++
PowerFire/prg_OpenCv
/Ex_B2/ImProc_module/MatchTemplate_Demo.cpp
UTF-8
2,408
3.046875
3
[]
no_license
#include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> #include <stdio.h> using namespace std; using namespace cv; //宣告全域變數 Mat img, templ, result; const char* image_window = "Source Image"; const char* result_window = "Result Image"; int match_method; //拉桿最大值 int max_Trac...
true
f4492d8eecdcd7bffcc66d864959eba3d4388182
C++
17342983498/zhuxu
/Code/C++ 11-7-1/C++ 11-7-1/test.cpp
GB18030
2,336
3.1875
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> using namespace std; #include <vector> #include <stack> #include<string> //bool IsPopOrder(vector<int> pushV, vector<int> popV) //{ // if (pushV.size() != popV.size()) // { // return false; // } // size_t outIdx = 0; // size_t inIdx = 0; // stack<int> s; // whil...
true
a81129ec01fa8f6fcdc2bd74ae198b60dd43a02c
C++
anio0/printers
/HW_11/HW_11/HidingLinePrinter.cpp
UTF-8
936
3.078125
3
[]
no_license
#include "HidingLinePrinter.h" string HidingLinePrinter::PadFancy(const string & line, int N) { string new_line = line; int sharps = N - new_line.size(); int num; if (sharps > 0) { for (int i = 0; i < sharps; i++) { num = rand() % 10; new_line += std::to_string(num); } } return new_line; } Hidi...
true
bd2e4cbc66dfc9a74663f43207c78a3fb98fe200
C++
thefullarcticfox/cpp_experiments
/time/ft_gmtime.cpp
UTF-8
3,444
2.96875
3
[]
no_license
/* ** gmtime function replacement ** made it in case i ever needed to convert from unix timestamp to tm struct ** compile with: ** clang++ -g -Wall -Wextra -Werror ft_gmtime.cpp -o ft_gmtime && ./ft_gmtime */ #include <iostream> #include <string> #include <sstream> #include <ctime> // time_t, struct tm, gmtime, strfti...
true
315ff9310f8796f4e839e4d6c12cfa74d913ad13
C++
damian-pisaturo/datos7506
/CapaIndices/Hash/Hash.h
UTF-8
4,481
2.921875
3
[]
no_license
//////////////////////////////////////////////////////////////////////// // Archivo : Hash.h // Namespace : CapaIndice //////////////////////////////////////////////////////////////////////////// // 75.06 Organizacion de Datos // Trabajo practico: Framework de Persistencia //////////////////////////////////////////...
true
54135b9ebba569fde78a42509853c33de955b889
C++
fan3750060/OpenWow
/owGameM2/M2_Animated.h
UTF-8
3,779
2.609375
3
[ "Apache-2.0" ]
permissive
#pragma once #include "M2_AnimatedConverters.h" #include "M2_Types.h" /* Generic animated value class: T is the values type to animate D is the values type stored in the file (by default this is the same as T) Conv is a conversion object that defines T conv(D) to convert from D to T (by default this is an identi...
true
6783169d981e8c21c38af533558e0d4498b5c50e
C++
marvellouz/fmi_projects
/vsoz/fn71112/graph.h
UTF-8
4,771
3.359375
3
[]
no_license
#ifndef GRAPH_H #define GRAPH_H /*! \file \breif Definition of generic graph. */ #include <map> #include <set> #include <string> #include <vector> #include <iostream> #include <cassert> namespace vss { /*!This class represents a generic graph implementation. \tparam Type of data stored in e...
true
c85c69b2de572ec76973a6b7e2dace6380650047
C++
Moonshile/AlgorithmCandy
/leetcode/131.cpp
UTF-8
1,210
3.078125
3
[ "Apache-2.0" ]
permissive
class Solution { private: vector<vector<bool>> getPalindromeMap(string &s) { vector<vector<bool>> res(s.size(), vector<bool>(s.size(), false)); for (int i = s.size() - 1; i >= 0; --i) { for (int j = i; j < s.size(); ++j) { if (s[i] == s[j] && (j - i < 2 || res[i + 1][j - ...
true
2ce3697acad4a29015283828d0eb7aa168367c7c
C++
Monkeyman520/CPP
/CCF/真题练习/201312-3.cpp
UTF-8
566
2.765625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> rect; for (int i = 0; i < n; ++i) { int x; cin >> x; rect.push_back(x); } int ans = 0; for (int i = 0; i < n; ++i) { int hight = rect[i]; for (int j = i; j < n;...
true
50bf7795485341ebdb71a20c2df169e6c43af8ec
C++
geoffpaulsen/utilities
/include/utility/bit_array.hpp
UTF-8
4,387
3.84375
4
[]
no_license
#ifndef UTILITY_BIT_ARRAY_HPP #define UTILITY_BIT_ARRAY_HPP #include <climits> #include <cstddef> #include <initializer_list> #include <stdexcept> #include <type_traits> namespace utility { /// Holds an array of bools with a built in data type. /** Size is equal to the number of bits in the data type. Array types wor...
true
091e47048aa31ed7f4965c8136d5697d0715f819
C++
Liuyi-Wang/LeetCode
/src/1038_Binary_Search_Tree_to_Greater_Sum_Tree.cpp
UTF-8
717
3.234375
3
[]
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int resolve(TreeNode* root, const int base) { if (NULL == root) { return 0;...
true
a5c47126a5d2822e9e06bb685a466c54f80af2ff
C++
gautamshah6/Coding_Blocks_Solution-c-
/all_indices_by_recursion.cpp
UTF-8
351
2.734375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void all_indices(int a[],int n,int key,int i) { if(n==0) return; if(a[0]==key) { cout<<i<<" "; } all_indices(a+1,n-1,key,i+1); } int main() { int n; cin>>n; int *a=new int[n]; for(int i=0;i<n;i++) cin>>a[i]; int key; cin>>key; all_ind...
true
86efcd8ab85fa3bfb53c19d00e85a60205da1019
C++
Xion-C/practice
/817/flocking_system/StateVector.h
UTF-8
2,873
3.40625
3
[]
no_license
#ifndef __STATEVECTOR_H__ #define __STATEVECTOR_H__ #include <cstring> #include <iostream> #include "Utility.h" template<class T> class StateVector { public: int N; // particle numbers T* data; StateVector(int n); StateVector(const StateVector&); ~StateVector(); StateVector<T>& operator=(co...
true
d457ad8b53b7e8828353c94cee3c0afb92a441f4
C++
JustARegularPlayer/Spotlight
/Spotlight/src/Spotlight/Renderer/Buffer.h
UTF-8
4,770
3.1875
3
[ "MIT" ]
permissive
#pragma once namespace Spotlight { // VERTEX BUFFER LAYOUT ========================================================== enum class ShaderDataType { None = 0, Bool, Float, Float2, Float3, Float4, Int, Int2, Int3, Int4, uInt, uInt2, uInt3, uInt4, Byte, Byte2, Byte3, Byte4, Mat3, Mat4 }; static uint32_t...
true
31b97af4c5210d89b79cb0669585aa4bd510b0a5
C++
i-yana/Study
/Games/Parser.h
UTF-8
9,182
2.53125
3
[]
no_license
#ifndef PARSER_H #define PARSER_H #include "Factory_of_Strategy.h" #include <iostream> #include <memory> using namespace std; namespace Games { struct Arguments { string out_file = ""; string in_file = ""; size_t iteratons = 0; std::shared_ptr<Field<Cell>> universe; std::shared_ptr<Strategy> s...
true
de32592381b914ba097e3c7f0641f652886a2a7e
C++
gutt/figures
/src/app/main.cpp
UTF-8
1,261
2.984375
3
[ "MIT" ]
permissive
#include "area_sumator.h" #include "data_source/binary_data_figures_reader.h" #include "dom/figures/rectangle.h" #include "dom/figures/square.h" #include <iostream> using namespace dom::figures; using namespace std; int main() { try { const char data[] = { 1, 0, 0, 20, ...
true
b0902bbc00375da4726aff5b9995bba20a821390
C++
llylly/LapisParser
/exec/log/Logger.cpp
UTF-8
1,067
3.078125
3
[]
no_license
// // Created by lly on 06/10/2017. // #include "Logger.h" std::vector<Logger*> Logger::logs; Logger::Logger() { this->timestamp = time(0); this->level = 0; this->msg = ""; } BaseDataObject *Logger::toDataObject() { ObjectDataObject *obj = new ObjectDataObject(); (*obj)["timestamp"] = new Intege...
true
c967f18a2c0c8d38bfbaf1f732d182713620602b
C++
storytold/RuntimeAudioImporter
/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporterLibrary.h
UTF-8
13,178
2.71875
3
[ "LicenseRef-scancode-free-unknown", "MIT" ]
permissive
// Georgy Treshchev 2021. #pragma once #include "Sound/SoundWave.h" #include "Async/Async.h" #include "RuntimeAudioImporterLibrary.generated.h" /** Possible audio importing results */ UENUM(BlueprintType, Category = "RuntimeAudioImporter") enum ETranscodingStatus { /** Success importing */ SuccessImporting UMETA(...
true
7813ef1df4b83f07a1233399fc6a2fde1328a963
C++
ojasvishaklya/competitive
/4.Tree/lec027/AVL_basics.cpp
UTF-8
3,062
4.0625
4
[]
no_license
#include <iostream> #include <vector> using namespace std; class Node { public: int val; Node *left = nullptr; Node *right = nullptr; int height; int balance; Node(int val) { this->val = val; this->height = 0; this->balance = 0; } }; Node *create(vector<int> ...
true
8dff6b76e3c775e138a1c4c8f47742872c429ee9
C++
i12n/VortexApplication
/Dynamics/cDirectorModule.h
UTF-8
846
2.671875
3
[]
no_license
#ifndef __C_DIRECTOR_MODULE_H__ #define __C_DIRECTOR_MODULE_H__ #include "cSceneModule.h" #include "cControllerModule.h" class cDirector{ public: cDirector(){ scene = cScene::getInstance();} /// regist entity and controller for sene, override in derived class /// virtual void regist()=0; /// configure sc...
true
9af07021731db0f181cadf908298c0c03982d95b
C++
shivangraina/cf
/codeforces/1283/C.cpp
UTF-8
957
2.53125
3
[]
no_license
#include <bits/stdc++.h> #include <iostream> #define ll long long using namespace std; ll Ceil(ll a, ll b) { return ((a / b) + (a % b != 0)); } # define MAXX 10000000000000 int main() { // out [i]=v[i] // in [v[i]]=i ll n; cin >> n; vector<ll> in(200005, -1); vector<ll> out(200005, -1); for (int i = 1; ...
true
7e7f0d25a89a242fa158dfbd811790a7e8bf0487
C++
IvanVan/Algorithms-and-data-structures-at-university
/queue by vector/main.cpp
UTF-8
2,201
2.578125
3
[]
no_license
#include <bits/stdc++.h> #include <malloc.h> using namespace std; int* a = (int*)(malloc(2 * sizeof(int))); int sz = 2, it1 = 0, it2 = 0; void add (int x){ if (it2 == sz && it1 != 0){ it2 = 0; } if (it1 == it2 && it2 != 0){ int* b = (int*)(malloc(2 * sz * sizeof(int))); int j = 0...
true
c240a60db8cbdb379c02ca9867594c8765b3e928
C++
netanelyo/AdvancedProgramming
/AdvancedProgramming-HW3Official/BoardDataImpl.cpp
UTF-8
445
2.8125
3
[]
no_license
#include "BoardDataImpl.h" #include "BattleshipGameUtils.h" char BoardDataImpl::charAt(Coordinate c) const { auto sq = m_board.getBoardSquare(c); if (sq != BattleshipGameUtils::Constants::EMPTY_SIGN) { if ((isupper(sq) && m_player == BattleshipGameUtils::Constants::PLAYER_A) || (islower(sq) && m_player == Ba...
true
aff8c1cfdffe88c48b55b4d6ed65e0e1b3c0ff68
C++
mmhancxt/HashCode2016
/code/OrderFirst.hpp
UTF-8
2,734
2.8125
3
[]
no_license
#pragma once #include "OrderFirst.hpp" #include "../Common.h" #include "InputLoader.h" #include "Objects.h" #include <iostream> #include <map> #include <numeric> #include <algorithm> using namespace std; fstream fout; class Distribution { public: InputLoader & loader; Distribution(InputLoader & _loader) : loader(_...
true
6103cc2391b4cd9e7befdbfe9c829f9deb5325da
C++
g-ernade/DS2VS2019
/实验报告程序/实验3.cpp
GB18030
3,128
3.21875
3
[ "MIT" ]
permissive
<<<<<<< HEAD #include<stdio.h> #include<stdlib.h> typedef struct node { int data; struct node* next; } Lnode; Lnode* create(int n) { int i; Lnode* h, * p, * r = (Lnode*)malloc(sizeof(Lnode)); //*ṹָ*h*p*r,ֱrһLnodeʹСڴռ䣬ѷռ׵ַǿתLnode *͵* r->data = n;h = r; //*nֵڵrdata,*r*hָβ* for (i = n - 1; i > 0; i--) { p ...
true
97747aff22967010e0498850705806c8e4a55f99
C++
Leandro-Rodrigues/Olimpiada-Brasileira-de-Informatica
/OBI 2017/Fase2/dario_xerxes.cpp
UTF-8
543
2.546875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define lli long long int #define ulli long long unsigned #define INF 0x3f3f3f3f #define LINF 0x3f3f3f3f3f3f3f3fL int main() { ios::sync_with_stdio(false); cin.tie(0); int vet[] = {0, 1, 2, 3, 4, 0, 1}; int n, d, x; int contd = 0, contx = 0; cin ...
true
912f8881061549a17ffd8266ab5e7996e225fb11
C++
JG-11/competitive-programming
/General/Trees/BinaryTree/BinaryTree.cpp
UTF-8
2,596
3.734375
4
[]
no_license
#include <iostream> #include <vector> #include <stack> #include <queue> using namespace std; class Node { public: int data; Node* left; Node* right; }; int main(void){ Node* root = new Node(); Node* leftChild = new Node(); Node* rightChild = new Node(); Node* leftLeftChild = new Node(); Node* leftRight...
true
f01bdddf72dfda27bb82b1b444a867ef42fb1f26
C++
tantrojan/GFG-Questions
/BinarySearch/first_occur.cpp
UTF-8
599
3.359375
3
[]
no_license
// Returns the index of first occurence of the element if present else returns -1 #include<bits/stdc++.h> using namespace std; int first_occur(int arr[], int l, int r, int key) { int m; while(l<=r) { m=l+(r-l)/2; if(arr[m]==key && ( m==0 || arr[m-1]<key)) { return m+1; } else if(arr[m]>=key) { r...
true
2b9e5f2057883415dcd2c126bf75816f8744b51e
C++
theShaswato/CppEasyString
/example07.cpp
UTF-8
348
2.78125
3
[]
no_license
#include <iostream> #include <string> #include "easystring.hpp" using namespace std; int main() { // Writing string to a file string file_name, text; cout << "Enter file name: "; getline(cin, file_name); cout << "Enter your text: "; getline(cin, text); easystring::strtof(text, file_name...
true
aa1b162b7567bbcbbd47d63c5ba97304d16bfd0e
C++
onesketchyguy/LetsBeATroll
/Project/ConsoleGameEngine/Engine.h
UTF-8
53,951
2.65625
3
[ "Unlicense" ]
permissive
/* OneLoneCoder.com - Command Line Game Engine "Who needs a frame buffer?" - @Javidx9 The Original & Best :P One Lone Coder License ~~~~~~~~~~~~~~~~~~~~~~ - This software is Copyright (C) 2018 Javidx9 - This is free software - This software comes with absolutely no warranty - The copyright holder is not liable or respo...
true
4b452f53510c9814e36ecc2c5ad2a4cf6f3d48be
C++
douglasbravimbraga/programming-contests
/UVa Online Judge/00410 - Station Balance/main.cpp
UTF-8
1,189
2.65625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int C, S; int set_num = 0; while (scanf("%d %d", &C, &S) == 2) { int mass[2 * C]; set_num++; for (int i = 0; i < S; i++) { scanf("%d", &mass[i]); } for (int i = S; i < 2 * C; i++) { ...
true
2083bb41b4389550667fc35d7daaaf01b3bbc75b
C++
hilkojj/CG-windesheim-OpenGL
/Project1/source/loaders/texture_loader.cpp
UTF-8
1,673
2.65625
3
[]
no_license
#include "texture_loader.h" #define STB_IMAGE_IMPLEMENTATION #include "../external/stb_image.h" #include <stdexcept> #include <unordered_map> #include <iostream> SharedTexture texture_loader::load(const char* path) { std::cout << "Loading " << path << std::endl; int width, height, channels; unsigned cha...
true
c582ed4eee0d04692853fc8566eb89d04e7a658c
C++
gcc-tan/leetcode
/43.cpp
UTF-8
2,241
4
4
[]
no_license
//Multiply Strings /* Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2. Note: The length of both num1 and num2 is < 110. Both num1 and num2 contains only digits 0-9. Both num1 and num2 does not contain any leading zero. You must not use any built-in BigIntege...
true
a5ec2ca0232502eeb50051bf426285033e8a61c2
C++
vFones/rbhash-galacticgraph
/rbhash/include/nodes/genericnode.hpp
UTF-8
796
3.203125
3
[]
no_license
#ifndef _GENERICNODE_HPP_ #define _GENERICNODE_HPP_ #include <string> #include <iostream> #include <other/item.hpp> /** * @brief Generic Node class * @tparam N template base class */ template <typename D> class GenericNode : public Item<D> { public: GenericNode() : Item<D>() {}; GenericNode(double &k) :...
true
b404da2993f7d24f5b294f00dfd8fb851d9c0eea
C++
BPI-SINOVOIP/BPI-1296-Android6
/android/device/realtek/proprietary/libs/libRTKExtractor/RTKExtractor/Filters/NavigationFilter/InputHDMV/Common/Geometry/GeometryTemplates.h
UTF-8
31,196
2.828125
3
[]
no_license
//----------------------------------------------------------------------------- // GeometryTemplates.h // Copyright (c) 2000 - 2004, Sonic Solutions. All rights reserved. //----------------------------------------------------------------------------- #ifndef GEOMETRY_TEMPLATES #define GEOMETRY_TEMPLATES #inc...
true
4cefe93ed139ab02f944bfb510191b3a0786dba2
C++
drlongle/leetcode
/algorithms/problem_0406/solution.cpp
UTF-8
3,113
3.71875
4
[]
no_license
/* 406. Queue Reconstruction by Height Difficulty: Medium Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or equal to h. Write an...
true
0f0ae8969891af5cd1763714203e5014bb13228f
C++
Bouya12/self-study
/AtCoder/PastContestQuestions/AGC039/A.cpp
UTF-8
1,310
2.8125
3
[]
no_license
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (int)(n); i++) using namespace std; int main() { string s; cin >> s; int k; cin >> k; // 全文字が同じの場合は例外処理の必要があるためチェック bool isSame = true; for (int i = 1; i < s.size(); i++) { if (s.at(i) != s.at(i -1)) { isSame = false; break; }...
true
67acd6c84b044048378cb3069489e19950c66d01
C++
LoveWX/OJ_mycoder
/hdu/1071.cpp
UTF-8
674
2.71875
3
[]
no_license
#include<stdio.h> int main() { int n; double a,b,c,x1,x2,x3,y1,y2,y3; while(scanf("%d",&n)!=EOF) { while(n>0) { n--; scanf("%lf%lf",&x1,&y1); scanf("%lf%lf",&x2,&y2); scanf("%lf%lf",&x3,&y3); if(x1==x2&&x1==x3) { printf("0.00\n"); continue; } if(x2>x3) { a=x2; x2=x3; ...
true
a0c2d3903e1779033fa96496012dee28e8291ebf
C++
viaduct/telim_tmsd
/value.tpp
UTF-8
2,537
2.59375
3
[]
no_license
#pragma once #include "value.h" #include "value_set_event.h" #include "item_event.h" #include "value_subject.tpp" #include "value_track.tpp" #include "item_track_info.h" #include "value_track_info.h" #include "value_type.h" #include "value_stop_refer_info.h" namespace telimtmsd { template<typename T> Value<T>::...
true
19bf820715fdf32b29cabf885feb2d1695108b81
C++
lukevand/kattis-submissions
/wheresmyinternet.cpp
UTF-8
719
2.671875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; VVI G; vector<bool> visted; void dfs(int v) { visted[v] = 1; for (int u : G[v]) { if (!visted[u]) { dfs(u); } } } int main() { int N, M, x, y; scanf("%d %d", &N, &M); G.a...
true
61c0f222f85e53f0ab039cea3e6dbed6fffce31c
C++
SoStealth/dnd_encounter_generator
/test_codes/rules_test.cpp
UTF-8
458
2.9375
3
[]
no_license
#include "rules.hpp" #include <stdio.h> int main(int argc, char* argv[]) { init_random(); printf("Here's a dice: D%d\n",D100); printf("Rolling the dice 5 times...\n"); for(int i=0;i<5;i++) { printf("%d\n",throw_dice(D100)); } printf("Here's the modifier for a 17 stat: %d\n",get_modifier(17)); printf("Here's t...
true
47a4cafb319f25f85f973bf3fb1a6e8ff27bc43f
C++
fkhan6601/StepperTest
/StepperTest.ino
UTF-8
5,712
2.75
3
[]
no_license
/* Suspension Control Script */ #include <Wire.h> #include <Adafruit_MotorShield.h> #include "utility/Adafruit_MS_PWMServoDriver.h" #include <LiquidCrystal.h> #include <EEPROM.h> int data2=0; int x = 0; int stepCount1 = 0; int stepCount2 = 0; int stepCount3 = 0; int stepCount4 = 0; int StoredFL = 0; int StoredFR ...
true
52588061c276e6cd64a72f7ee788b3106426ecc4
C++
benreid24/Peoplemon
/include/Game/TrainerSpottedPlayerState.hpp
UTF-8
892
2.953125
3
[]
no_license
#ifndef TRAINERSPOTTEDPLAYERSTATE_HPP #define TRAINERSPOTTEDPLAYERSTATE_HPP #include "Gamestate.hpp" class Trainer; class BattleState; class ConversationState; /** * Gamestate for when a Trainer has spotted the player and is walking to them * * \ingroup Game */ class TrainerSpottedPlayerState : public Gamestate ...
true
6d3a533e4f855f8445700c4defa3ba715bd3ebf5
C++
jijijijitian/bank
/bank/bankcli/client.cpp
GB18030
5,774
2.578125
3
[]
no_license
#include "myhead.h" SOCKET sock; int do_client() { //Эջװ WORD wVersionRequsted = MAKEWORD(2, 2); WSADATA wsaData; if (WSAStartup(wVersionRequsted, &wsaData) != 0) //ʼ { return 1; } if (wsaData.wVersion != wVersionRequsted) ...
true
e669f52ef4f7078d0092bdd967cbde2960e94ff9
C++
wamor17/computerVision
/10_Hough_transform/hough.cpp
UTF-8
5,135
2.578125
3
[]
no_license
#include <iostream> #include <cstdlib> #include <cmath> #include <opencv2/opencv.hpp> #define pi 3.14159265 using namespace std; using namespace cv; Mat img, imageOut; Mat filledImage; void hough_lines(); void hough_circles(); void plot(Mat in); void plot2(Mat in, Mat out); void plot3(Mat in1, Mat in2, Mat in3); in...
true
170807b31ec6e3fd5bede30a13ae4f2fa67da738
C++
lSnowy100l/SnowEngine
/SnowEngine/SnowEngine/Camera.h
UTF-8
2,470
2.984375
3
[]
no_license
#pragma once #include <iostream> #include "Utils.h" #define CAM_SPEED_NORM 15 #define CAM_SPEED_FAST 50 #define JUMP_FORCE 30 class Camera { private: Vec3GLf _position = Vec3GLf(); Mat4GLf _projectionMatrix; bool _use_abs_movement; //For alternating between jetpack movement bool _on_jump, _start_jump; GLfloat ...
true
fbe48ad68210a570d709637e588856a279ccb0e7
C++
LiuKang1080/Learning_CPP
/Basics_Of_CPP/4_Control_Flow/Sources/5_Do_While_Loops.cpp
UTF-8
916
3.96875
4
[]
no_license
// Do While Loops in C++ /* Do-While Loops: - General syntax: do { statement(s); } while (expression); - The semi-colon is required at the end. - The expression condition check happens at the end (post test loop). - The loop will run at least once guaranteed. ex) Area...
true
fa5f7103c5a3031a0c0a7240c038ebaad85d9ce5
C++
xiaoy/CPrimer
/lfwu/chapter11/12_pair.cc
UTF-8
822
3.140625
3
[]
no_license
// ------------------------------------------------------------------- // Author: lfwu // Date: January-03-2014 // Note: // Email:zgwulongfei@gmail.com // Blog:http://blog.csdn.net/hackmind // ------------------------------------------------------------------- #include <iostream> #include <vector> #include <utility> #i...
true
9ebc4b653699db2b250511efbace2512e8efe67d
C++
BGCX067/fallout-equestria-git
/code/world/include/world/particle_effect.hpp
UTF-8
2,530
2.640625
3
[]
no_license
#ifndef PARTICLE_EFFECT_HPP # define PARTICLE_EFFECT_HPP # include "globals.hpp" # include <panda3d/pointParticleFactory.h> # include <panda3d/zSpinParticleFactory.h> # include <panda3d/baseParticleEmitter.h> # include <panda3d/baseParticleRenderer.h> # include <panda3d/particleSystem.h> # include "datatree....
true
57fcb4c7eceb986647f307ca3c8b0626def738f2
C++
Jtrice/Checkers-game
/Programming Test/PTHeader.h
UTF-8
1,850
3.203125
3
[]
no_license
#ifndef P_T_HEADER #define P_T_HEADER #include <string> #include <array> #include <vector> #include <iostream> #include <iomanip> class GameState { public: GameState(); GameState(int rows, int cols, int blackRows, int redRows); //GameState(int row, int col, std::array<std::array<char, 8>, 8> gameBoard); void t...
true
0af0566719b490dd32fe032979e48e29fa2a04d1
C++
ullasreddy-chennuri/GeeksforGeeks
/Add two numbers represented by linked lists .cpp
UTF-8
2,883
4.21875
4
[]
no_license
/* Given two numbers represented by two linked lists of size N and M. The task is to return a sum list. The sum list is a linked list representation of the addition of two input numbers from the last. Example 1: Input: N = 2 valueN[] = {4,5} M = 3 valueM[] = {3,4,5} Output: 3 9 0 Explanation: For the given two l...
true
a0892878beffab2c9ab5f25ce7a5d29d8924560d
C++
RobertElder/a3
/messages.cpp
UTF-8
17,384
2.984375
3
[]
no_license
#include "messages.h" #include "rpc.h" #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <netdb.h> #include <sys/types.h> #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netdb.h> #include <...
true
b2e47dc57c9a3c50dfc845c74470c7486ddde1d0
C++
chunlinsun/peercode
/hw3/Graph_438.hpp
UTF-8
26,866
3.578125
4
[]
no_license
#ifndef CME212_GRAPH_HPP #define CME212_GRAPH_HPP /** @file Graph.hpp * @brief An undirected graph type */ #include <algorithm> #include <vector> #include <cassert> #include "CME212/Util.hpp" #include "CME212/Point.hpp" /** @class Graph * @brief A template for 3D undirected graphs. * * Users can add and retri...
true
813df18306743039d8390c6a1421fe199fb77eef
C++
Esseh/AetherSoundLibrary
/sound.h
UTF-8
3,784
2.84375
3
[]
no_license
#include<queue> #include<iostream> #include<SFML/Audio.hpp> namespace aether { /// An object that takes certain specifications and fires off a sound effect immediately upon construction. class sound { private: /// Controls the current volume of existing sound effects. static flo...
true
f1ddd4763c7183f3b83eb31b02b5e2aebaa6639b
C++
Ming-J/LeetCode
/966_Vowel_Spellchecker.cpp
UTF-8
1,935
3.3125
3
[]
no_license
#include <algorithm> #include <iostream> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; class Solution { public: vector<string> spellchecker(vector<string> &wordlist, vector<string> &queries) { unordered_set<string> exact; ...
true
b9720189e959c2e061abd13587ce240addcd4840
C++
fxmqs/leetcode
/src/1-100/Solution44.h
GB18030
2,258
3.078125
3
[]
no_license
#pragma once #include "leetcode_defs.h" class Solution44 { public: Solution44(); ~Solution44(); bool dfs(const char *s, const char *p) { if (!*s && !*p) { return true; } if (!*s) { if (*p == '*') return dfs(s, p + 1); else return false; } if (!*p) return false; if (*p == '?' || *s == *p) {...
true
cf7946ba5bdd1794081577a0ca878941b6b88de3
C++
Fergomez0901/PED
/Guia de Ejercicios 5/G4-E3.cpp
UTF-8
1,634
4
4
[]
no_license
#include <iostream> #include <queue> using namespace std; void searchChar(queue<char> q, char carS){ bool found = false; queue<char> clone = q; while(!clone.empty()) { if(clone.front() == carS) { found = true; cout << "Se encontro el caracter. \nBorrando...
true
8ea879d4ebd8ed1108539605f31fa2d14b686129
C++
shnider42/Algo-Repo
/Project1/p1b.cpp
UTF-8
8,540
3.015625
3
[]
no_license
//Project 1b: using exhaustive search to color a graph. // Code to read graph instances from a file. Uses the Boost Graph Library (BGL). #include <iostream> #include <limits.h> #include "d_except.h" #include <fstream> #include <windows.h> #include <direct.h> #include <time.h> #include <string> #include <m...
true
6afd1d3b114f56a84762a0641daaca724bceeb66
C++
ChanghuiN/Exercise
/InterviewQuestions/43_DicesProbability/DicesProbability.cpp
UTF-8
1,664
3.015625
3
[]
no_license
// // Created by ChanghuiN on 2018/1/9. // #include <cstdio> #include <cmath> #include "DicesProbability.h" int g_maxValue = 6; void PrintProbability_Solution2(int number) { if (number < 1) return; int *pProbabilities[2]; pProbabilities[0] = new int[g_maxValue * number + 1]; pProbabilities[...
true
c58f55a08cb3421c1298ae956e0b08d55377dd7d
C++
kamiltalipov/295-a2
/will1995@list.ru/Tasks/Term 2/Task1/Bridges, points/main.cpp
UTF-8
3,892
2.703125
3
[]
no_license
#include <iostream> #include <stdio.h> #include <vector> #include <list> using namespace std; class Graph { public: Graph(int size): size(size), time(0), points(0) { Vert.resize(size); Used.resize(size); Used.assign(size, 0); Added.resize(size); ...
true
b8aa01e3ced6ffc37f412fe445efac2b00448798
C++
eXpl0it3r/Examples
/SFML/FadingDots.cpp
UTF-8
1,716
3.15625
3
[ "Zlib" ]
permissive
#include <SFML/Graphics.hpp> #include <cstdint> #include <list> int main() { auto window = sf::RenderWindow{ sf::VideoMode{ { 500u, 500u } }, "Fading Dots" }; window.setFramerateLimit(60u); auto oldPosition = sf::Vector2f{ 0.f, 0.f }; constexpr auto Step = 1; auto points = std::list<sf::CircleSh...
true
ce30cdbf5d47db2d00f3caba08a1c727dec56fa7
C++
rogalick/Cpp-modern-development-coursera-
/White belt/week4/date/Date.cpp
UTF-8
804
3.5625
4
[]
no_license
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <vector> using namespace std; struct Specialization { explicit Specialization(string spec) { m_spec = spec; } string m_spec; }; struct Week { explicit Week(string week) { m_week = week; } string m_week; }...
true
4f3089d4db027b6e5c1e33266c4477b898ba4358
C++
IgorPTZ/Calculo_de_areas_e_volumes
/Cubo.cpp
UTF-8
504
2.953125
3
[]
no_license
#include "stdafx.h" #include "Cubo.h" Cubo::Cubo(const string &nomeForma, double aresta) :FormaTriDimensional(nomeForma) { setValorAresta(aresta); } void Cubo::setValorAresta(double valorAresta) { aresta = (valorAresta <= 0.0) ? 1.0 : valorAresta; } double Cubo::getValorAresta() const { return aresta; } double ...
true
b331fc0342400e4a333e611ebd91ea9e2d867068
C++
yosabaki/os-net
/server.cpp
UTF-8
3,356
2.9375
3
[]
no_license
#include <iostream> #include <sys/socket.h> #include <netinet/in.h> #include <unistd.h> #include <arpa/inet.h> #include <cstring> using namespace std; void print_usage() { cout << "Usage: server [address] [port]" << endl; } void close_socket(int fd) { if (close(fd) < 0) { perror("Cannot close socket"...
true
2b69d48b8ba3b785bead91afd7504df1b51d0a15
C++
Camixxx/Ros_Windows_Socket
/ros_lib/rosbridge_msgs/ConnectedClient.h
UTF-8
3,049
2.65625
3
[ "MIT" ]
permissive
#ifndef _ROS_rosbridge_msgs_ConnectedClient_h #define _ROS_rosbridge_msgs_ConnectedClient_h #include <stdint.h> #include <string.h> #include <stdlib.h> #include "ros/msg.h" #include "ros/time.h" namespace rosbridge_msgs { class ConnectedClient : public ros::Msg { public: typedef const char* _ip_address...
true
244366d21f4408d67d2d50d4380133cd0b8f96dd
C++
annasochavan777/LogicBuilding-Assignments
/LB Assignment-31/Assignment31_2.cpp
UTF-8
694
3.328125
3
[]
no_license
///////////////////////////////////////////////////////////////////////////////////////////////////// // Write application which accept file name from user and create that file. // Input : Demo.txt // Output : File created successfully. // Author : Annaso Chavan ////////////////////////////////////////////////////////...
true
a7e0e813b31a3a6c9c98d9778dc57b11335db3dd
C++
listopat/Raymond
/Engine/include/Camera.h
UTF-8
577
2.765625
3
[ "MIT" ]
permissive
#pragma once #include <Matrix.h> #include <Ray.h> #include <Canvas.h> #include <World.h> class Camera { public: const int hSize, vSize; const double fieldOfView, pixelSize; static Camera makeCamera(int h, int v, double fov); void setTransform(const Matrix& m); Matrix getTransform() const; Ra...
true
0d244697959976831b35136e26e222e11b693dbb
C++
kamyu104/LeetCode-Solutions
/C++/amount-of-new-area-painted-each-day.cpp
UTF-8
5,112
2.890625
3
[ "MIT" ]
permissive
// Time: O(nlogr), r is the max position // Space: O(r) template <typename T> class SegmentTree { public: explicit SegmentTree( int N, const function<T(const T&, const T&)>& query_fn, const function<T(const T&, const T&)>& update_fn) : base_(N), tree_(2 * N), lazy_(2...
true
bb8fcdbe7ef8327cdf6d0452fa3079860b20cc7b
C++
anbae12/num6man
/Mandatory exercise/main.cpp
UTF-8
3,209
2.75
3
[]
no_license
// // main.cpp // Mandatory exercise // // Created by Anders and Mikkel on 01/03/15. // Copyright (c) 2015 Anders Launer Bæk. All rights reserved. // #include <iostream> #include <fstream> #include "nr3.h" #include "svd.h" int main() { // Reading the data file const int dataRows = 500; const int ...
true
58edb09f70c2773b69d9638d1f2bdd175b1cce96
C++
TOMMYWHY/opengl_learning
/src/demo03/Shader.cpp
UTF-8
1,996
2.828125
3
[]
no_license
// // Created by Tommy on 2019-11-29. // #include "Shader.h" #include <string> #include <iostream> using namespace std; Shader::Shader() { // cout <<"aaaa" <<endl; // 顶点 shader - 确定顶点位置 const char *vertexShaderSource = "#version 400 core\n" "layout (location = 0) in ve...
true
86b6b7a43f46532a39000c82600fd0132002b475
C++
duffyco/embedded-art-engine
/src/VignetteLayer.h
UTF-8
874
2.6875
3
[]
no_license
#ifndef VignetteLayer_h_ #define VignetteLayer_h_ #include <string> #include <iostream> #include "Layer.h" #include <GL/gl.h> #include <GL/glu.h> class VignetteLayer : public Layer { public: VignetteLayer( std::string filename ); ~VignetteLayer(); void turnOn() { if( ( m_currentMode == LAYER_OF...
true
c0fc5931ef744d1db3f803cd8eda7b308d6af489
C++
BioGearsEngine/core
/projects/biogears/libBiogears/include/biogears/cdm/utils/unitconversion/CompoundUnitElement.h
UTF-8
4,798
2.515625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/************************************************************************************** Copyright 2015 Applied Research Associates, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.ap...
true
7d34b7c5be76d16d2ed1c96ae01a6d5d068ed44a
C++
trimone/__TINF_Projekt_2
/__TINF_Projekt_2/Rechteck.cpp
ISO-8859-1
1,355
2.65625
3
[]
no_license
///*====================================================================================================== //'.ccp' Datei zu Klasse 'Rechteck' //======================================================================================================*/ // //// === INCLUDE === // // // //#include "Rechteck.h" // Header-Dat...
true
f15fbfb54611d0a0b53e85d62cc2ae4f8605eef5
C++
TereSolano15/progra2-project-2-app2
/src/Enfermedad.h
UTF-8
758
2.65625
3
[]
no_license
// // Created by Tere Solano on 3/11/2020. // #ifndef MY_PROJECT_NAME_ENFERMEDAD_H #define MY_PROJECT_NAME_ENFERMEDAD_H #include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> using namespace std; class Enfermedad{ private: string nombre; string secuencia; int cantid...
true
f80f756b5c512a7d2d94e84188e59bdb38e0d017
C++
jmcarter9t/PCI-tests
/samples/pci_da12_basic.cpp
UTF-8
3,509
2.515625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/io.h> #include <time.h> #include <unistd.h> #include <termios.h> #include <sys/time.h> #include <sys/select.h> #include "common_objects.h" #include "display.h" #include "io.h" #include "pciutil.h" #include "8254ctr.h" #include "8254ctr.h" #include...
true
9c6c7af2b5d117946ca061b14c3213d9c8f1c778
C++
mr-d-self-driving/PNC
/Planning/common/garbage_deal.cpp
UTF-8
1,655
2.640625
3
[]
no_license
 #include "garbage_deal.h" extern ConfigParam g_config_param; namespace planning { map<int,Garbage> GarbageDeal::garbages_pair_; GarbageDeal::GarbageDeal(ReferenceLineInfo * ref_line_info,const vector<Garbage> &Garbages) :ref_line_info_(ref_line_info),garbages_(Garbages) { Init(); } void GarbageDeal::I...
true
c8fd6f4c1c7ea53fb7ce86bbf086c95732ddb427
C++
nolanreilly/LED-multiplexer-IDEA-hacks-2016
/multiplexController.cpp
UTF-8
8,881
3.203125
3
[]
no_license
#include <wiringPi.h> #include <iostream> //Number of rows and columns (square multiplex) const int NumRCS = 7; const int LED_ROWS[NumRCS] = { 23, 24, 25, 12, 16, 20, 21 }; const int LED_CLMS[NumRCS] = { 17, 27, 22, 10, 13, 19, 26 }; int main(int argc, char**argv) {     wiringPiSetup(); // Initializes wiringPi using ...
true
ec2d99103cfc34f650858d308b43987c26166b1f
C++
etremel/pddm
/src/messaging/OverlayTransportMessage.cpp
UTF-8
3,982
2.609375
3
[]
no_license
/** * @file OverlayTransportMessage.cpp * * @date Oct 14, 2016 * @author edward */ #include "OverlayTransportMessage.h" #include <cstring> #include <cstddef> #include <memory> #include <mutils-serialization/SerializationSupport.hpp> #include "MessageType.h" #include "MessageBodyType.h" #include "PathOverlayMess...
true
ef024fce22e88ca4fddd2c8d39a3985b42b80fa2
C++
beyonddiana/render_engine
/src/Texture.cpp
UTF-8
3,284
3.0625
3
[]
no_license
#include "gl_headers.h" #include "Texture.h" #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" // Texture::Texture(Vec2i size, bool depth_texture) : resolution(size) { this->id = create_render_texture(size, depth_texture); } // Texture::Texture(std::string filepath) { glGenTextures(1, &this->id); in...
true
1f9684352d90e695e581d9101de119056eda8f11
C++
tabris2015/stepper_api
/stepper_api.ino
UTF-8
4,086
3.078125
3
[]
no_license
#include <Arduino.h> #include "motor_api.h" #define STEP_PIN 9 #define DIR_PIN 3 #define ENABLE_PIN 7 #define TIME 15 Motor motor(DIR_PIN, STEP_PIN, ENABLE_PIN); uint8_t done = 0; // serial string parse // Buffer for the incoming data char inData[100]; // Buffer for the parsed data chunks char *inParse[100]; // S...
true
ea7dd81a6aa5d9e0e044eb7c7f9369ff56f5ff96
C++
HanWenfang/Data_Structure_and_Algorithm
/10_SkipList.cpp
UTF-8
1,082
3.234375
3
[ "MIT" ]
permissive
/******************************************************* * Ordered Link-List for INDEX in place of balanced tree * Reference : kenby.iteye.com/blog/1187303 igoro.com/archive/skip-lists-are-fascinating * -Unique Key- * A kind of Data Structure has many kinds of implementation ways!! * ***********************...
true
20b37d8cb165f810896ba01d81f8f25f216e4d2c
C++
Saikikky/MyLeetcode
/算法库/算法分析/算法 实验一/fac.cpp
GB18030
1,272
3.578125
4
[]
no_license
/*쳲 1 i==1||i==2 f(i)={ f(i-1)+f(i-2) i>2 */ #include<iostream> using namespace std; #define MAX 100000 int F[MAX]; //F[i]洢f(i)ֵʼֵ0 int a[MAX]; //a[i]洢f(i)ظ int f(int i)//ݹд { if(i<1) return -1; a[i]++; if(i==1 || i==2) return 1; else return f(i-1)+f(i-2); } int dp1(in...
true
316f3c633c7e950448fa8e1d8e831283e40ec60c
C++
topcodingwizard/code
/zerojudge/a133.cpp
UTF-8
876
2.546875
3
[]
no_license
#include <stdio.h> #include <algorithm> using namespace std; #define MAX 105 int A[MAX], B[MAX]; int dp[MAX][MAX]; int main() { int N1, N2, count = 0; while (scanf("%d%d", &N1, &N2) && N1 && N2) { // input------------------------------------------ for (int i = 0; i < N1; i++) scanf("%d", &A[i...
true
fe675ac8b989584466480b9c8e474486e6dfb5f7
C++
larspm/optfir
/src/filters.cpp
UTF-8
2,766
3.09375
3
[]
no_license
#include <cmath> #include <vector> #include <string> #include <complex> #include <numeric> #include "filters.h" namespace optfir { double signum(double x) { if (x<0) return -1; if (x>0) return 1; return 0; } FirFilter::FirFilter(unsigned int N, const double* coeffs) : m_order(N) , m_rank(...
true
cb55fb600a8851cd5821f86379714bcb8940ab78
C++
abhisheksawarkar/Thesis_Project
/Final_code_receiver_on_UGV/Final_code_receiver_on_UGV.ino
UTF-8
1,376
2.515625
3
[]
no_license
#include <Servo.h> Servo myservo; void setup() { myservo.attach(9); // put your setup code here, to run once: Serial.begin(9600); myservo.write(90); } int acc=0; int magneto=0; String input_acc="",input_magneto=""; char temp =' '; void loop() { // put your mai...
true
1f3afa22b547fe0fb3473a6a5b145f663135f317
C++
chgogos/oop
/lc/live_coding_20201110e.cpp
UTF-8
1,199
3.203125
3
[ "MIT" ]
permissive
#include <iostream> // #include <stdlib.h> #include <cstdlib> using namespace std; int main() { // ------------------- δέσμευση/αποδέσμευση 1 θέσης μνήμης στη C++ int *p = new int; *p = 7; cout << *p << endl; delete p; // ------------------- δέσμευση/αποδέσμευση 1 θέσης μνήμης στη C int ...
true
0a8dea2f9728d4ee1e2bcdd684192a3fddb7137b
C++
bettle123/music_recognization
/music_simulation_3D/DemoFramework/DrawModeNode.h
UTF-8
1,351
3.015625
3
[]
no_license
#pragma once #include "OpenGL.h" #include "StateNodeBase.h" #include <string> namespace Crawfis { namespace Graphics { enum DrawModeType { SOLID, WIREFRAME, POINTS }; // // Concrete implementation of IStateNode that sets // the OpenGL polygon mode (the draw mode). // This probably should have been 3 clas...
true
6379643a4a0f48cf7f64500a3cd3abb97db28109
C++
anishaagg/CIS-PSU
/cs162_lab2.cpp
UTF-8
2,156
3.921875
4
[]
no_license
//Anisha Aggarwal, CS162 //To compute wage for each employee //Be able to gather the employee's initials and make them capitalized. //Then input their hourly wage and how many hours they have worked //in order to calculate how much they have earned. //If there is an increase in cost of living then change the amount of...
true
74ddee09b8973a7fe3c3690b86f9d1321c51e7ca
C++
JosephTesta/c-2017S
/class_11/bits.cpp
UTF-8
983
3.265625
3
[]
no_license
//these operations such as the dividing are faster than regular dividing int main() { //32 bit operations for any int int a = 3 & 5; //bitwise AND 000000011 & 0000000101 //0000000011 //0000000101 //============ //0000000001 = 1 int b = 3 | 5; //bitwise OR //0000000011 //0000000101 //============ //00000001...
true
52b7e64ebd712a425c28fce36f747db381cfaffb
C++
BugShan/bugshan
/include/bugshan/BugShan.h
UTF-8
678
3.015625
3
[]
no_license
#ifndef _BUGSHAN_BUGSHAN_H_ #define _BUGSHAN_BUGSHAN_H_ #define NULLPTR 0 #define NULL 0 /** * Returns value with bit x set (2^x) */ #define BIT(x) (1 << (x)) namespace BugShan { /** * safe delete pointer * @param ptr: the poiter to delete, and ptr will be assigned to NULLPTR */ template<typename T> inli...
true
52fe7cf091f935e877154f958a4e0655f05bfdc0
C++
MikeGWem/ArduinoSudoku
/SudokuWiFi/SudokuWiFi.ino
UTF-8
3,658
2.734375
3
[]
no_license
#define BUFF_SIZE 200 #define BUFF_LIMIT 199 #include <WiFiNINA.h> #include "Secret.h" #include "Sudoku.h" #include <malloc.h> extern char _end; extern "C" char *sbrk(int i); char buffer[BUFF_SIZE]; const long timeOut = 500; unsigned long waitStart; int charCount; const char* mySSID = SECRET_SSID; cons...
true
0dfe5575ab9d25848c70fdce3bac8cea3b80e32d
C++
chris-hong/basic_algorithm
/dp/11048_이동하기/11048_이동하기/main.cpp
UHC
1,534
3.3125
3
[]
no_license
#include <iostream> using namespace std; int Max3(int a, int b, int c) { int max = a; if (max < b) max = b; if (max < c) max = c; return max; } int Max2(int a, int b) { if (a > b) return a; else return b; } int D[1001][1001]; int C[1001][1001]; //int main() { // int N, M; // cin >> N; cin.get(); // cin >> M;...
true
693597a764045c5726ad5f9797b289fd6adee65a
C++
Wizmann/ACM-ICPC
/Codeforces/Codeforces Round #251/439D.cc
UTF-8
1,450
2.5625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <cmath> using namespace std; #define print(x) cout << x << endl #define input(x) cin >> x typedef long long llint; const int MAXN = 1000000001; const int SIZE = 123456; int n, m; vector<int> ...
true
dbe5041135fc20c9720df30a1b7238405a5d0cc7
C++
Kotyarich/BMSTU-4th-semestr
/oop/lab4/objects/mesh/mesh.cpp
UTF-8
777
3.015625
3
[]
no_license
#include "mesh.h" namespace objects { void Mesh::addPoint(math::Point &p) { _points.push_back(p); } void Mesh::addEdge(size_t first, size_t second) { if (first < 0 || second < 0 || first >= _points.size() || second >= _points.size()) { throw exceptions::ModelBuildException("Wrong point number"); ...
true
3bd229a07e796bd063f8895d5fc47345ed8409ef
C++
warrenlp/2015VisionCode
/networktables/include/networktables2/WriteManager.h
UTF-8
2,186
2.625
3
[ "MIT" ]
permissive
/* * WriteManager.h * * Created on: Sep 25, 2012 * Author: Mitchell Wills */ #ifndef WRITEMANAGER_H_ #define WRITEMANAGER_H_ class AbstractNetworkTableEntryStore; class WriteManager; #include "networktables2/thread/PeriodicRunnable.h" #include "networktables2/OutgoingEntryReceiver.h" #inc...
true
d52a91cd3f47228df5cc7bc715672e040f9077f5
C++
sPHENIX-Collaboration/coresoftware
/offline/packages/bbc/BbcOut.cc
UTF-8
2,528
2.546875
3
[]
no_license
#include "BbcOut.h" #include "BbcReturnCodes.h" #include <cmath> #include <iostream> void BbcOut::identify(std::ostream& os) const { os << "virtual BbcOut object" << std::endl; return; } void BbcOut::Reset() { std::cout << "ERROR BbcOut: Reset() not implemented by daughter class" << std::endl; return; } int...
true
a3b00c0edc45646449acc612a916bd7f345e3432
C++
jacktianmo/dataframe
/chapt8/src/8_1.cpp
UTF-8
498
3.015625
3
[]
no_license
/* * 8_1.cpp * * Created on: 2014年11月9日 * Author: young */ #include<iostream> #include"d_sort.h" #include<stdlib.h> #include<vector> #include<stdio.h> using namespace std; void displayVector(const vector<int>& v); int main(){ int i; vector<int> intVector; for(i=0;i<50;i++) intVector.push_back(rand()%...
true
576d48c83a6deb7557c76867ac8a2380cf177b13
C++
JackGHopkins/CSC3221-Project-2
/CSC3221 Project 2/Collision.h
UTF-8
376
2.828125
3
[]
no_license
#pragma once #include "Circle.h" #include "Square.h" /// <summary> /// For checking collisions between Shapes. /// </summary> class Collision { public: void isCollision(Circle& c1, Circle& c2); void isCollision(Square& s1, Square& s2); void isCollision(Circle& c, Square& s); bool IsSameShapeCollide(float x1, floa...
true
bbbd72fb158eef6507f75e26700db168de30f85d
C++
IasonManolas/CompetitiveProgrammingCourse
/Lectures/19_knapsack.cpp
UTF-8
1,372
3.421875
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> using namespace std; template <typename T> vector<T> get_input_sequence(size_t n) { vector<T> sequence(n); for (size_t i = 0; i < n; ++i) cin >> sequence[i]; return sequence; } template <> vector<std::pair<size_t, size_t>> get_input_sequence(size_t...
true
041102abab0debdd3036e0ee4f412c97437c7f15
C++
rootkonda/LeetCode
/721. Accounts Merge.cpp
UTF-8
3,163
3.75
4
[]
no_license
/* Given a list accounts, each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails representing emails of the account. Now, we would like to merge these accounts. Two accounts definitely belong to the same person if there is some email tha...
true