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
5d3651db36c3f941cf3a4aeb0f40fcd61fe87109
C++
Sunspawn/CollegeHomework
/Assignment4/src/Standing.cpp
UTF-8
388
2.59375
3
[]
no_license
/* * Standing.cpp * * Created on: 22 May 2019 * Author: nikolay */ #include "Standing.h" Standing::Standing(std::string name, std::string cName, float weight, float height, float width, int year, std::string style): Painting(name,cName,weight,height,width,year,style) {} Standing::~Standing() {} floa...
true
d3ba422e682a73eab1f7bc5a57ee54427856cd5f
C++
elsys/oop
/materials/2019-2020/consultations/2019-11-28/doctor/surgeon.cc
UTF-8
816
3.09375
3
[]
no_license
#include "surgeon.hh" #include <cstring> Surgeon::Surgeon( std::string name, unsigned int experience, char const* speciality) : Doctor(name, experience), speciality(new char[strlen(speciality) + 1]) { strcpy(this->speciality, speciality); } Surgeon::Surgeon(Surgeon const& other) : Doctor(other),...
true
3da56ba393a98c322d68a3191de78f04dc12879a
C++
siklosid/co-cluster
/src/Similarity/KernelSimilarity.cpp
UTF-8
4,660
2.53125
3
[]
no_license
#include "KernelSimilarity.h" #include <math.h> #include <fstream> #include <utility> using std::pair; KernelSimilarity::~KernelSimilarity() { log_status("Ending Kernel similarity"); delete local_info_; } void KernelSimilarity::Init() { local_info_ = new LocalInfo<KernelItemInfo, KernelClusterInfo, KernelCo...
true
270eea571f17a2e94d7eb7a631bc4b1927e80f06
C++
ModischFabrications/PC_CTRL
/RF24_Debug_Board/lib/HomeNet/HomeNet.cpp
UTF-8
1,298
2.9375
3
[]
no_license
#include "HomeNet.h" void HomeNet::print_payload(HomeNet::payload &pl){ Serial.println(F("-- Payload is: --")); Serial.print(F("\n From Node: ")); Serial.print(pl.from_node); Serial.print(F("\n To Node: ")); Serial.print(pl.to_node); Serial.print(F("\n category: ")); Serial.print(pl.category); Serial....
true
2b130dffa5b8f6da0976078e5265ededfd76a7ba
C++
flytigerw/Computer
/Codes/Pratice/code6.cpp
UTF-8
2,674
3.515625
4
[]
no_license
#include <iostream> #include <unistd.h> #include "myArray.h" using namespace std; bool duplicate(int numbers[],int size,int* dup){ //参数检查 if(numbers == nullptr || size <= 0) return false; for(int i=0;i<size;i++){ if(numbers[i] == i) continue; if(numbers[numbers[i]] == numbers[i]){ *dup...
true
144169f4c586e658f5ed2b36baaa52b9b9b3efa1
C++
ilanit1/matala7
/TicTacToe.cpp
UTF-8
2,938
3.28125
3
[]
no_license
#include "TicTacToe.h" TicTacToe::TicTacToe(int dim) { m_board.init_Board(dim); win=false; turn= true; m_winner= nullptr; } Board TicTacToe::play( Player& p1, Player& p2) { m_board='.'; win=false; p1.setChar('X'); p2.setChar('O'); turn=true; m_winner=&p2; ...
true
1823d6a1c575cf90399f12d0562b0e624196b939
C++
Meem0/cs488
/A5/Collider.cpp
UTF-8
1,273
2.875
3
[]
no_license
#include "Collider.h" #include "cs488-framework/OpenGLImport.hpp" #include "Utility.hpp" using namespace glm; Collider::Collider(glm::vec2 position, float radius) : m_position(position) , m_radius(radius) { } void Collider::debugDraw() const { #if RENDER_DEBUG glColor3f(0, 1.0f, 0); glBegin(GL_LINES); float ...
true
6c19534e4fc72dc04a604c8d782ea96b545e20fc
C++
youarefree123/408-DataStructure
/src/2019年/408_2019.cpp
UTF-8
1,907
3.75
4
[ "Apache-2.0" ]
permissive
#include <stdio.h> #include <time.h> #include <stdlib.h> typedef struct node { int data; struct node* next; }NODE; //初始化一个链表,用到了随机数 NODE* init_List(){ NODE* L = (NODE*)malloc(sizeof(NODE));//头节点初始化 NODE* ss = L;//用于操纵的指针 L->next = NULL; srand((unsigned)time(NULL)); int n = 3+rand()%22; for(int i = 0; i < ...
true
0d8e99dfcae6f1b87282399a6ca81b8c593b945e
C++
mchalek/euler
/solved/p056/p56.cpp
UTF-8
901
3.375
3
[]
no_license
#include<iostream> #include<cstring> using namespace std; int main(void) { int a0; int maxa = 0; int maxb = 0; int maxsum = 0; int digits[200]; int dsum; int carry; int prod; int AMIN = 2; int AMAX = 100; int BMAX = 100; for(int a = AMIN; a <= AMAX; a++) { memset(digits, 0, 200*si...
true
ea9016658f38945fd9685de28ec89323015d7d52
C++
kobe24o/LeetCode
/algorithm/leetcode379.cpp
UTF-8
955
3.34375
3
[]
no_license
class PhoneDirectory { unordered_set<int> unused, used; int tel; public: /** Initialize your data structure here @param maxNumbers - The maximum numbers that can be stored in the phone directory. */ PhoneDirectory(int maxNumbers) { for(int i = 0; i < maxNumbers; ++i) unused.i...
true
18d74bb344d3a996d3a6287f3b881ccf75921088
C++
20k/color_proposal_implementation
/src/tests/slow_sRGB.hpp
UTF-8
1,743
2.859375
3
[]
no_license
#pragma once #include <color.hpp> struct slow_sRGB_space { static inline constexpr temporary::matrix_3x3 impl_linear_to_XYZ = color::sRGB_parameters::linear_to_XYZ; static inline constexpr temporary::matrix_3x3 impl_XYZ_to_linear = color::sRGB_parameters::XYZ_to_linear; }; struct slow_sRGB_model { float r...
true
db1aac29e0062f11f5fbe0f7a5f00792ceb36702
C++
MaelQuemard/Compilation
/src/foretGenerateur.cpp
UTF-8
5,533
2.96875
3
[]
no_license
#include "foretGenerateur.hpp" foretGenerateur::foretGenerateur() { this->foret["s"] = genA1(); this->foret["n"] = genA2(); this->foret["e"] = genA3(); this->foret["t"] = genA4(); this->foret["f"] = genA6(); } OperationElementaire* foretGenerateur::genA1() { OperationElementaire* n = new Atom(...
true
c597e2e28a65821cbc9356c497c7617cadd41940
C++
Laerke91/PCSS-Project
/Server/GameManager.h
UTF-8
1,584
2.953125
3
[]
no_license
#ifndef gameManager_H #define gameManager_H #include "Hero.h" #include "Enums.h" #include "CPU.h" using namespace std; class GameManager { private: bool attacksAreEqual; bool isP1Effective; int dmgBonus = 5; public: Hero player1; CPU player2; //Constructor GameManager(); //Getters,...
true
6f88c6597124b4106f5f6738054a0ebd19b194b8
C++
kapil8882001/Coding-Practice-1
/C++ Solutions/Stack & Queue & Heap/LC692_TopKFrequentWords.cpp
UTF-8
2,146
3.5
4
[]
no_license
// Top K Frequent Words /* Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words have the same frequency, then the word with the lower alphabetical order comes first. Example 1: Input: ["i", "love", "leetcode", "i", "love"...
true
e4e9833f72b5fbca58d06d2e4c7b866cf727230a
C++
pandey7ajay/Covid
/ConsoleApplication1/CovidManagement.cpp
WINDOWS-1250
7,199
3.375
3
[]
no_license
#include<iostream> #include<conio.h> #include<string.h> #include<stdlib.h> using namespace std; // define maximum number of patients in a queue #define MAXPATIENTS 2 // define structure for patient data struct patient { char FirstName[50]; char LastName[50]; char ID[20]; }; // define class for queue class queue { pu...
true
8c61a0ff0e9276b2bc9d20ac858af34f84b0cb18
C++
yusuke-matsunaga/ym-cell
/include/ym/ClibPin.h
UTF-8
5,238
2.640625
3
[]
no_license
#ifndef YM_CLIBPIN_H #define YM_CLIBPIN_H /// @file ym/ClibPin.h /// @brief ClibPin のヘッダファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2023 Yusuke Matsunaga /// All rights reserved. #include "ym/ClibHandle.h" #include "ym/logic.h" BEGIN_NAMESPACE_YM_CLIB //////////////////////////////////////////...
true
f8e453e92a3e5721cdd9cb428842fce4b220c5ee
C++
DaftMat/Waters
/src/Minimal-Engine/ShaderPrograms/StaticShader.cpp
UTF-8
2,621
2.796875
3
[]
no_license
// // Created by mathis on 01/06/2020. // #include "StaticShader.hpp" #include <Minimal-Engine/Material/Material.hpp> void StaticShader::setMaterial(const Material &material, const std::string &name) const { /// Textures for (int i = 0; i < material.textures().size(); ++i) { setInt(name + "." + materi...
true
5c4114a53b5a5ea611016a0b47c64eeac1d8e8a8
C++
Moyuers/Codeup-practise
/1015-Maxtin.cpp
GB18030
759
3.4375
3
[]
no_license
#include <stdio.h> //1015. /*Ŀ 㹹һN*Nľ󣬵ijеԪΪijij˻ij1ʼ ĵһΪһCʾĸ ȻCвÿΪһN1<=N<=9ʾ ÿһ룬ľ 2 1 4 1 1 2 3 4 2 4 6 8 3 6 9 12 4 8 12 16*/ int main(){ int m,n; scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%d",&m); for(int j=1;j<=m;j++){ for(int k=1;k<=m;k++){...
true
fe404b28dabc2b5c07621182c583ba4a580ddac2
C++
AxelLavielle/Barde
/Software/Source/MidiManager/AMidiManager.hh
UTF-8
1,393
2.546875
3
[]
no_license
/* ============================================================================== AMidiManager.h Created: 7 Mar 2017 5:25:06pm Author: Anthony ============================================================================== */ #ifndef AMIDIMANAGER_HH_INCLUDED #define AMIDIMANAGER_HH_INCLUDE...
true
42bebadaa23f073665e73a3b53b44e1b007d8c1f
C++
sinkerdPhoutthavong/Arduino-IoT
/SMDHT22/src/main.cpp
UTF-8
2,551
2.96875
3
[]
no_license
#include <Arduino.h> #include "DHT.h" #include <Adafruit_Sensor.h> #define inDHT 8 // what digital pin we're connected to #define outDHT 9 // Uncomment whatever type you're using! //#define DHTTYPE DHT11 // DHT 11 #define inDHTTYPE DHT22 // DHT 22 (AM2302), AM2321 #define outDHTTYPE DHT22 //#define DHTTYPE DHT21 ...
true
13e8608fea217d619ead00a80de177c5a507438f
C++
sighingnow/bad
/include/bad/common.hh
UTF-8
2,609
2.921875
3
[]
no_license
#ifndef BAD_COMMON_HH #define BAD_COMMON_HH #include <algorithm> // std::max #include <cstddef> // std::size_t, std::ptrdiff_t #include <utility> // std::integer_sequence #include "attributes.hh" /// \file /// \brief common definitions, shared across all modules /// /// other modules may extend this functionalit...
true
688f86720f5c76f8234c823e741633f75fa9513d
C++
Koios1143/Algorithm-Code-Saved
/TOJ/toj29.cpp
UTF-8
688
2.8125
3
[]
no_license
#include<iostream> using namespace std; int main() { int t; cin>>t; string s,s2; bool YN=0; for(int i=0,n ; i<t ; i++) { YN=0; cin>>s; cin>>n; for(int j=0,flag=-1 ; j<n ; j++) { cin>>s2; for(int k=0 ; k<s.size() ; k++) { if(s2[0]==s[k]) { flag=k; break; ...
true
2487f53e2ce95570bfddf5f3dd006cebf762a5cb
C++
sebicarhat/Cplusplus
/Urionlinejudge - projects/Square Matrix III/main.cpp
UTF-8
908
2.59375
3
[]
no_license
#include <iostream> #include<algorithm> using namespace std; int main() { int n,i,j,x,y,a[100][100],aux,k,c,h; cin>>n; while(n!=0) { x=1; k=0; for(i=1;i<=n;++i) //crearea matricei { y=x; for(j=1;j<=n;++j) {a[i][j]=y; y*=2;} ...
true
ece6b6874f27e72f4c0de39b6b8ed8502a57abd5
C++
BlurEffect/SquadAI
/SquadAI/ColliderFactory.h
UTF-8
458
2.625
3
[]
no_license
/* * Kevin Meergans, SquadAI, 2014 * ColliderFactory.h * Class with a static member function serving as factory function * for different types of colliders. */ #ifndef COLLIDER_FACTORY_H #define COLLIDER_FACTORY_H // Includes #include "Collider.h" #include "CircleCollider.h" #include "AxisAlignedRectangleCollid...
true
4801613ddd08a86f5131d3917e8ce850689a57bc
C++
venkycode/OOAD_Project
/admin.h
UTF-8
49,432
3.125
3
[]
no_license
#include <sqlite3.h> #include <chrono> #include <ctime> #include <bits/stdc++.h> #include <unistd.h> #include "checks.h" #include "PasswordGenerator.h" #include "forgotPassword.h" #include "sha256.h" // System state is used to store current count of shopkeepers // delivery persons and Customers and also the...
true
0f18b87947c7310da86dc6ecefe9a3890572d5e8
C++
yzq986/cntt2016-hw1
/TC-SRM-559-div1-500/Remilia.cpp
GB18030
1,135
2.5625
3
[]
no_license
#include <algorithm> using namespace std; struct HatRack{ int n, mmm, sz[51]; bool e[51][51]; void fafafa(int u, int v){e[u][v]=e[v][u]=1;} // size void gsz(int u, int ff){ sz[u]=1; for(int v=0;v<n;++v) if(e[u][v] && v^ff)gsz(v,u),sz[u]+=sz[v]; } long long gao(int u, int ff, int id){ mmm=max(mmm,id); ...
true
19ae91d4d2ce5dacb65231b9b4b190409d33d020
C++
lhp3851/CPPDemo
/C++Demo/Vector/VectorDemo.cpp
UTF-8
1,153
3.25
3
[]
no_license
// // VectorDemo.cpp // C++Demo // // Created by lhp3851 on 2018/12/30. // Copyright © 2018 Jerry. All rights reserved. // #include "VectorDemo.hpp" #include <iostream> #include <vector> using namespace std; //函数 template<typename T> void printer(const T& val) { cout << val << endl; } //仿函数 template<typename...
true
55aaeabd3faaeef50acb1550a51dd9f101f86493
C++
pdxjohnny/cplusplus
/3/gen.h
UTF-8
3,547
3.234375
3
[]
no_license
/* Author: John Andersen Date: 11/5/2014 Description: General functions I always use */ #include <cstring> #include <cstdlib> #include <cstdio> #include <iostream> #include <cctype> #include <sys/ioctl.h> #include <unistd.h> #ifndef GEN #define GEN 1 // General functions I always use namespace ...
true
15cdecad709ed861971354be1a90c3dbe66767da
C++
FunkMonkey/Bound
/Wrapping/Spidermonkey/SpidermonkeyWrapper/include/wrap_helpers/wrap_helpers_x.hpp
UTF-8
888
2.78125
3
[]
no_license
#ifndef WRAP_HELPERS_X_HPP #define WRAP_HELPERS_X_HPP #include <jsapi.h> #include "exceptions.hpp" /** * @namespace jswrap * Contains helper functions for wrapping SpiderMonkey */ namespace jswrap { /** * Checks the number of arguments and throws exception if wrong * * \param given Given number of arg...
true
444b5b474ab15c663e2341078d083f6a84e804d2
C++
tenegon/genetic-algorithm
/realindividual.cpp
UTF-8
2,805
3.03125
3
[]
no_license
#include "realindividual.h" RealIndividual::RealIndividual(uint t): Individual(t), genes(std::vector<double>(t, 0.0f)), sum(0.0f) { } RealIndividual::~RealIndividual() { } double RealIndividual::getGene(const uint &i) const { if(i < t){ return genes.at(i); } else{ return 0.0f; ...
true
8d83d0f06ea1e068fc47ad30cd0bd732beb1c9c5
C++
junior-2016/Compiler
/Util.h
UTF-8
1,129
2.953125
3
[]
no_license
// // Created by junior on 19-4-17. // #ifndef COMPILER_UTIL_H #define COMPILER_UTIL_H #include "Compiler.h" namespace Compiler { /** * 判断数值(NUM型)TokenString的具体类型(10进制/16进制/8进制/浮点), * 主要有两个用途: * 一是用于打印NUM Token的信息; * 二是在后面语法分析的时候要真正cast数据的时候判断用. */ enum class NUM_TYPE { DECIM...
true
a5e7cbebc18672f1976f097c92b081709c7024dd
C++
FluorineDog/doglib
/doglib/common/iter.h
UTF-8
2,475
3.25
3
[]
no_license
#pragma once #include <unistd.h> #include <type_traits> #include <iterator> namespace doglib { namespace common { template <typename T> class DataIter { public: using difference_type = ssize_t; using value_type = T; using pointer = T*; using reference = T&; using iterator_category = std::random_a...
true
0b48bb858142a7244eaed4c8d8199b44cdac3231
C++
shuklasaharsh/DSA-CPP
/DSA-CPP/CodingBlocks/String-Challenges/9.cpp
UTF-8
2,816
3.90625
4
[]
no_license
/* Prateek is an extremely gifted student. He is great at everything including Combinatorics, Algebra, Number Theory, Geometry, Calculus, etc. He is not only smart but extraordinarily fast!. One day Prateek was trying to find out if any one can possibly do calculations faster than him. As a result he made a very gre...
true
f7cd4b218c723941f9568b71a977b9c9fa4830a8
C++
wjddlsy/Algorithm
/Baekjoon/baek_2503_숫자야구/main.cpp
UTF-8
1,163
2.96875
3
[]
no_license
#include <iostream> #include <vector> #include <map> #include <set> #include <tuple> using namespace std; bool isRight(const string& q, const string& n, int s, int b) { int ns=0, nb=0; for(int i=0; i<3; ++i) { for(int j=0; j<3; ++j) { if(n[i] == q[j]) { i==j? ns++ : nb++; ...
true
e0b2b434b840bb397fd152e0c2366860d362c6ae
C++
gkikola/optionpp
/test/tst_result_iterator.cpp
UTF-8
4,579
2.546875
3
[ "BSL-1.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
/* Option++ -- read command-line program options * Copyright (C) 2017-2020 Greg Kikola. * * This file is part of Option++. * * Option++ is free software: you can redistribute it and/or modify * it under the terms of the Boost Software License version 1.0. * * Option++ is distributed in the hope that it will be ...
true
1bbebe67491903c3aed8c2e08b16fa95c1db84f5
C++
Sriram-96/SPOJ
/HACKRNDM.cpp
UTF-8
381
2.71875
3
[]
no_license
# include<bits/stdc++.h> using namespace std; int main() { int n,k,i,element; cin>>n>>k; int a[n]; unordered_set<int> hashmap; for(i=0;i<n;i++) { cin>>a[i]; hashmap.insert(a[i]); } int count=0; for(i=0;i<n;i++) { if(hashmap.count(a[i]-k) == 1) { count++; } if(hashmap.count(a...
true
a0e130bc23a09d3f9363679310b84c38bdb83648
C++
CJHMPower/Fetch_Leetcode
/data/Submission/253 Meeting Rooms II/Meeting Rooms II_1.cpp
UTF-8
1,191
2.921875
3
[]
no_license
//-*- coding:utf-8 -*- // Generated by the Fetch-Leetcode project on the Github // https://github.com/CJHMPower/Fetch-Leetcode/ // 253 Meeting Rooms II // https://leetcode.com//problems/meeting-rooms-ii/description/ // Fetched at 2018-07-24 // Submitted 5 months ago // Runtime: 15 ms // This solution defeats 8.0% cpp ...
true
1ffa24e72715137911ab9dc37045e795fd576897
C++
andresthor/eda031_projekt
/src/connection/exceptions/ngdoesnotexistexception.h
UTF-8
684
2.6875
3
[]
no_license
/* --------------------------------------------------------------------------- ** Project for the course EDA031 at Lunds University, spring 2016. ** ** ngdoesnotexistexception.h ** ** Exception to be thrown when the client tries to access a non-existant ** newsgroup. ** ** Authors: Andres Saemundsson, Anton Friberg, Os...
true
33382842e5bf781ba0c487772709cdd2c622d2b5
C++
venture21/raspberryPiEx
/qt5/CustomWidget/exRadioButton/main.cpp
UTF-8
958
2.65625
3
[]
no_license
#include <QApplication> #include <QWidget> #include <QRadioButton> #include <QButtonGroup> void DrawRadioButton(); int main(int argc, char *argv[]) { QApplication a(argc, argv); DrawRadioButton(); return a.exec(); } void DrawRadioButton() { QWidget *widget = new QWidget(0); QButtonGroup *bg = ...
true
c68277e5306a54265cc02d44e70bb58e621d4756
C++
ToTYToT/learn_c-
/c++_009/String.cc
UTF-8
2,724
3.375
3
[]
no_license
/// /// @file String.cc /// @author lemon(haohb13@gmail.com) /// @date 2016-10-26 09:59:43 /// #include <string.h> #include <iostream> using std::ostream; using std::istream; using std::cin; using std::cout; using std::endl; class String { friend ostream & operator<<(ostream & os, const String & rhs)...
true
abc0daf132caf52f7c4c1aaa52f6a6694e92b09d
C++
lucasbivar/object-oriented-programming
/U2A4/7/Imovel.cpp
UTF-8
371
3.09375
3
[]
no_license
#include "Imovel.h" Imovel::Imovel(string address, double price) { setAddress(address); setPrice(price < 0 ? 0 : price); } void Imovel::setAddress(string address){ this->address = address; } string Imovel::getAddress() const { return address; } void Imovel::setPrice(double price){ this->price = price; } ...
true
1aa2053d6b869545c1e693b3cf3bbb16c5a133f2
C++
skyformat99/text
/include/boost/text/detail/iterator.hpp
UTF-8
20,654
3.375
3
[ "LicenseRef-scancode-unknown-license-reference", "BSL-1.0" ]
permissive
#ifndef BOOST_TEXT_DETAIL_ITERATOR_HPP #define BOOST_TEXT_DETAIL_ITERATOR_HPP #include <iterator> namespace boost { namespace text { namespace detail { struct const_reverse_char_iterator; struct reverse_char_iterator { using value_type = char; using difference_type = int; using ...
true
2ea624d96e128f2b1ff0fa8d3d7d956955be524e
C++
9sheng/leetcode
/19.remove-nth-node-from-end-of-list.cpp
UTF-8
1,103
3.5
4
[]
no_license
#include "testharness.h" #include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode *removeNthFromEnd(ListNode *head, int n) { if (head == NULL || n <= 0) return head; if (head->next ...
true
5bdfb424840de0d049b8b91d9f28123e9893a5d1
C++
igorsan98v2/digitTempLCD
/LBTemp.ino
UTF-8
2,895
2.78125
3
[]
no_license
#include <MsTimer2.h> class LedControl{ private: byte *pins; byte *comPins; byte numbers[10] = { B11111100, B11000000, B10011111, B11001110, B11100010, B01101110, B01111110, B11000100, B11111110, B11101110}; bool isAnnode; int8_t forPINS; int8_t forCOMs; byte number[5]={0,0,0,0,0}; void parseTo...
true
4234389446d230b592a4abf5079a30b54cfa0510
C++
jinwookh/fileproject2
/ConsoleApplication1/member.h
UTF-8
1,267
2.859375
3
[]
no_license
#pragma once #include <iostream> #include <string> #include "delim.h" #define MEMBERID 10 #define MEMBERPASS 10 #define MEMBERPHONE 13 #define MEMBERMILEAGE 10 #define STDMAXBUF 256 using namespace std; class Member { string id; string password; string name; string phoneNumber; string address; char mileage[10]...
true
974310493b5c74cf5668d379a82ac701889f23bd
C++
mdqyy/FeatureDetection
/libTracking/src/tracking/DensityPositionExtractor.cpp
UTF-8
2,406
2.921875
3
[]
no_license
/* * DensityPositionExtractor.cpp * * Created on: 19.07.2012 * Author: poschmann */ #include "tracking/DensityPositionExtractor.h" #include "tracking/Rectangle.h" #include <iostream> namespace tracking { DensityPositionExtractor::DensityPositionExtractor(int bandwidth) : invertedBandwidth(1.0 / bandwidth)...
true
83ff2226dfddf2228c9c014528c75ea1a77e42e9
C++
pasolano/pong
/src/player.cpp
UTF-8
3,262
3.296875
3
[]
no_license
#include <string> #include "player.h" // constructor Player::Player(sf::RenderWindow &app, Game &gameObj) { this->window = &app; this->game = &gameObj; // define score if (!this->font.loadFromFile("../data/font.ttf")) { throw "Failed to load font from file"; } this->scoreText.setFo...
true
2b4ccf406e5d9af471cfca2271a93b86a864816b
C++
vitoraugustoa/AlgoritmoEstruturaDeDados
/RotasOnibus.cpp
ISO-8859-1
6,852
3.203125
3
[]
no_license
#include <stdlib.h> #include <stdbool.h> #include <stdio.h> #include <conio.h> #include <iostream> // Estrutura da Lista typedef struct dadosrota{ char parada[30]; } DadosRota; typedef struct norota { DadosRota dado; struct norota* proxima; }NoRota; typedef struct listaderotas{ int tamanho; NoRota* cabeca; }L...
true
bcc448ea875aa8ff7f7998e869d9d8390bead702
C++
zhukangli/mooc
/patBasic/1004.cpp
UTF-8
522
2.78125
3
[]
no_license
#include <iostream> #include <cstring> using namespace std; int main() { int n; cin >> n; string name, no; int score; string maxName, maxNo; int maxScore = 0; string minName, minNo; int minScore = 100; for (int i = 0; i < n;i++) { cin >> name >> no >> score; if (score > maxScore) { maxScore = score; ...
true
0b37c867da0e53c3979bc94ca377e3eb1d3ee4a1
C++
CodingZwen/FairyOfLife
/AnimatedSprite.h
ISO-8859-3
1,893
2.65625
3
[]
no_license
#pragma once #include "Animation_extended.h" #include <iostream> class AnimatedSprite : public sf::Drawable, public sf::Transformable { bool firstanimationdone = false; public: sf::Transform myTransform; //explicite konstruktoiren mssen immer mit klammer aufgerufen werden explicit AnimatedSprite(sf...
true
df0e922fbcbf23c6d6bb09b425282636311d319b
C++
monman53/online_judge
/AtCoder/ABC/053/b.cpp
UTF-8
581
2.515625
3
[]
no_license
// header {{{ #include <bits/stdc++.h> using namespace std; // {U}{INT,LONG,LLONG}_{MAX,MIN} #define ALPHABET (26) #define INF INT_MAX #define MOD (1000000007LL) using LL = long long; // }}} int main() { std::ios::sync_with_stdio(false); string s;cin >> s; int n = s.size(); int l,...
true
77c8d51b54566b83c36bea024e5a065cb5312fb2
C++
lvniqi/STM32F4xx_DSP_StdPeriph_Lib_V1.3.0
/Project/TEST_ADC_2_soft/String_L.cpp
UTF-8
2,775
2.859375
3
[]
no_license
#include "String_L.h" void String_L::String_L_ASCII_Init(u16 x,u16 y,char* d,LCD_PLACE_TYPE type,u16 color){ isShow = false; this->y = y; string.type = _LCD_STRING_ASCII; string.string.ascii = d; u16 t_len = strlen(d); this->color = color; switch(type){ case LCD_STRING_LEFT: start_x = x; e...
true
26b9adb1149bbbf9f3b0b0e3b886077776dbd9c0
C++
peterpolidoro/SavedVariable
/examples/SavedVariableConstantString/SavedVariableConstantString.ino
UTF-8
2,038
2.9375
3
[ "BSD-3-Clause" ]
permissive
#include <Arduino.h> #include <Streaming.h> #include <EEPROM.h> #include <SavedVariable.h> #include <ConstantVariable.h> const long BAUD = 115200; union SubsetMemberType { const long l; ConstantString * const cs_ptr; }; const int EEPROM_INITIALIZED_VALUE = 98; enum{MODE_SUBSET_LENGTH=3}; CONSTANT_STRING(mode_r...
true
57f3eb95c29228b29924a71fb354da3dd7ee56d1
C++
Aleksandra24503/OOP
/ex.8 tempelate/main.cpp
UTF-8
1,847
4.25
4
[]
no_license
#include <string> #include <iostream> using namespace std; template <class T> class stack { private: int size; T tab[200]; public: stack() { size = 0; } void push(T elem) { tab[size] = elem; size++; } void pop() { size-...
true
36bcaeeb1768d0f04116fa2fd6b3aad9fcefc652
C++
Anosy/C-Primer5
/Chapter16/Section2/Exercise16_47/源.cpp
UTF-8
548
3.390625
3
[]
no_license
#include<iostream> #include<utility> #include<type_traits> using namespace std; template <typename F, typename T1, typename T2> void filp(F f, T1 &&t1, T2 &&t2) { f(std::forward<T2>(t2), std::forward<T1>(t1)); } void func1(int v1, int v2) { cout << v1 << " " << v2 << endl; } void func2(int &v1, int v2) { cout <<...
true
d4b3e5765b456794fe9735765fdd31828a2758fc
C++
Mario173/ClosestPoints
/Divide&Conquer.cpp
UTF-8
5,584
3.625
4
[]
no_license
//Divide and Conquer algoritam --> O(nlogn) #include <iostream> #include <cmath> typedef struct{ double x, y; } tocka; //provjera udaljenosti između 2 točke u O(1) operacija double udaljenost(tocka a, tocka b) { return sqrt((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y)); } //potrebno za slučaj kad proma...
true
a24f59bc697cf2cacaa05148e1db1cd8a58c9310
C++
HaochengLEE/PAT
/Basic/1011.cpp
UTF-8
898
2.734375
3
[]
no_license
// // Created by 李昊城 on 2019/10/27. // #include <stdio.h> int main(void){ long long a,b,c; int count,start=0; scanf("%d",&count); int at[count]; int ac=0; while (count--){ scanf("%lld%lld%lld",&a,&b,&c); if(a+b>c){ at[start]=1; } else { at[start]=...
true
bff85dc2f261dd044538d7d8178c25b8766e184a
C++
colinhp/learngit
/reference.cc
UTF-8
824
3.25
3
[]
no_license
/// /// @file reference.cc /// @author hoping(stevenfok@126.com) /// @date 2020-06-07 22:44:51 /// #include <iostream> using std::cout; using std::endl; void test0(void) { int num = 100; int &ref = num; cout<< "num = "<< num << endl; cout<< "ref = "<< ref << endl; cout<< "num = "<< &num << en...
true
cb24b0e7f20455c31c5f3e4c9d387ced653a285f
C++
VictorGuerrah/Estrutura-de-Dados-2
/src/hashMap.cpp
UTF-8
7,299
2.875
3
[]
no_license
#include "hashMap.h" #include "hashNode.h" hashMap::hashMap(int n){ tamMax = n+1337; tam = 0; table = new hashNode*[tamMax]; for(int i = 0; i<tamMax; i++){ //iniciando todos os valores da tabelo com NULL table[i] = NULL; } tabela=new list<int>[tamMax];//lista utilizada no encadeamento sepa...
true
eb7bd83f557f171c991f3ca0a9926e5bd992f680
C++
subbug18/CPP
/cpp/producer_consumer.cpp
UTF-8
803
3.265625
3
[]
no_license
#include<iostream> #include <thread> #include <mutex> #include <condition_variable> #include <queue> using namespace std; bool finished = false; mutex mx; condition_variable cv; queue<int> q; void producer(int argN) { for (int i=0; i<argN; i++) { lock_guard<mutex> lk(mx); q.push(i); cout<<" pushing:"<<...
true
3ae434cf14ed2b32d998eab46940ea5b105a2dbe
C++
mgroovyank/data-structures-and-algorithms1
/GraphTheory/MultiSourceBFS-Efficient Approach.cpp
UTF-8
1,594
2.8125
3
[]
no_license
#include <iostream> #include <vector> #include <set> using namespace std; #define N 100000+1 #define inf 1000000 int source[N]; int dist[N]; set<pair<int,int> > q; void multiSourceBFSUtil(vector<int> graph[],int s){ set<pair<int, int> >::iterator it; int i; for(i=0;i<graph[s].size();i++){ int v=graph[s][i]; ...
true
a4946ffb95dee96d60b244e80585c4931be0a8a4
C++
NickLuGithub/school_homework
/問題與解析/第一堂課/1315A_2.cpp
UTF-8
438
3.203125
3
[]
no_license
#include <iostream> using namespace std; int main() { int t, a, b, x, y; cin >> t; while(t--) { cin >> a >> b >> x >> y; x++; y++; int maxY, maxX; maxY = max(b-y, y - 1); maxX = max(a-x, x - 1); //cout << maxX << " " << maxY << endl; int area1 = maxX * b; int area2 ...
true
74880c462bef822d0fb2f34b2d394726fd7bf2bd
C++
JayPolanco/CS_211
/Hanoi_Towers.cpp
UTF-8
1,483
3.40625
3
[]
no_license
/*Objective: Solve the Hanoi Towers Problem with the number of rings as user inputs*/ #include <iostream> #include <vector> using namespace std; int main(){ vector<int> t[3]; int from, move =0, n, to, candidate; cout << "Please enter the number of rings to move: "; cin >> n; for(int i = ...
true
f4e4e1cf38b50208045dc6e490835c66a5b54af1
C++
presscad/LDS
/LDS/IntelliAgent/IntelliCore/MonoImage.cpp
GB18030
19,366
2.59375
3
[]
no_license
#include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include "MonoImage.h" #include "LogFile.h" #if defined(APP_EMBEDDED_MODULE)||defined(APP_EMBEDDED_MODULE_ENCRYPT) #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #endif int CMonoImage::WriteMonoBmpFile(const ch...
true
79315e08e50509df8b268719496be0375ab6d8d5
C++
Tina-Yin-2001/Library
/studentstore.h
UTF-8
702
2.65625
3
[]
no_license
#ifndef STUDENTSTORE_H #define STUDENTSTORE_H #include <iostream> #include <cstdio> #include <cstdlib> #include <vector> #include "student.h" using namespace std; using namespace student; namespace studentstore { //构造用户 Student* creatStudent(); Student* creatStudent(string name, string stu_id, string code, string majo...
true
46a6a337c323b6ac1a1f246ddeea4ef441a33fcf
C++
chloearluck/drone-freespace
/rbtree.h
UTF-8
3,770
3.03125
3
[]
no_license
#ifndef RBTREE #define RBTREE #include <vector> using namespace std; template <class V> class RBTree { public: class Node { public: Node () : v(0), p(0), l(0), r(0), red(false) {} Node (V v, Node *p, Node *l, Node *r, bool red) : v(v), p(p), l(l), r(r), red(red) {} void list (vector<V...
true
1d8974355b75a86406a3cef066093604c7786633
C++
vietanh2222/Nguyenn-Viet-Anh
/L3B1.cpp
UTF-8
181
2.5625
3
[]
no_license
#include <stdio.h> int main(){ int x; printf("Nhap x = "); scanf("%d",&x); int n=0; while(x%10!=0){ n=n*10+x%10; x/=10; } printf(" So nghich dao la %d",n); }
true
d0cccad455cec4a7427695143f5dc2455f27155d
C++
crabyh/PAT
/PAT1014/PAT1014/main.cpp
UTF-8
3,631
2.671875
3
[]
no_license
// // main.cpp // PAT1014 // // Created by Myh on 10/14/14. // Copyright (c) 2014 Myh. All rights reserved. // #include <iostream> #include <deque> using namespace std; void print_time(int minutes){ if(minutes==-1){ cout<<"Sorry\n"; return; } int hours=8; hours+=minutes/60; minu...
true
9f3f6b2946405b178fe2208adb6f0b64075a6c24
C++
Phoenixcom1/SFND_2D_Feature_Tracking
/src/dataStructures.h
UTF-8
2,831
3.3125
3
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
#ifndef dataStructures_h #define dataStructures_h #include <vector> #include <opencv2/core.hpp> struct DataFrame { // represents the available sensor information at the same time instance cv::Mat cameraImg; // camera image std::vector<cv::KeyPoint> keypoints; // 2D keypoints within camera image ...
true
43abc21f9d7f3b1f0edfb8935949e6eb87ccbaa1
C++
rpuntaie/c-examples
/cpp/utility_optional_operator.cpp
UTF-8
818
3.4375
3
[ "MIT" ]
permissive
/* g++ --std=c++20 -pthread -o ../_build/cpp/utility_optional_operator.exe ./cpp/utility_optional_operator.cpp && (cd ../_build/cpp/;./utility_optional_operator.exe) https://en.cppreference.com/w/cpp/utility/optional/operator* */ #include <optional> #include <iostream> #include <string> int main() { using namespace...
true
f5cda787aee0935c65c42f6bbfed2f91d81b3a4a
C++
rzinkstok/starmap
/StarMap/Tikz/Tikz.cpp
UTF-8
842
2.71875
3
[]
no_license
// // Tikz.cpp // StarMap // // Created by Roel Zinkstok on 01/05/2018. // Copyright © 2018 Roel Zinkstok. All rights reserved. // #include <stdio.h> #include <iostream> #include <sstream> #include <memory> #include <stdexcept> #include <string> #include <array> #include <math.h> using namespace std; /** * @b...
true
420a31955c6de6f2e0979e0816e0cf1b5957539c
C++
arkdchst/mephi-3-lab-3
/include/sort.hpp
UTF-8
1,032
3.203125
3
[]
no_license
#pragma once #include <stack> #include <utility> #include <iostream> #include <string> #include <memory> #include "sequence.hpp" template <typename T> std::unique_ptr<Sequence<T>> sort(Sequence<T> *seq, int (*cmp)(T,T) ){ auto newSeq = std::unique_ptr<Sequence<T>>(seq->clone()); auto swap = [&newSeq](int i, int ...
true
b9d969029cdc6387aa2a71e31b38b048b7f4a765
C++
nilsoberg2/rvrmeander
/contrib/inih_r7/cpp/INIReader.h
UTF-8
2,652
2.703125
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "NCSA" ]
permissive
// Read an INI file into easy-to-access name/value pairs. // inih and INIReader are released under the New BSD license (see LICENSE.txt). // Go to the project home page for more info: // // http://code.google.com/p/inih/ #ifndef __INIREADER_H__ #define __INIREADER_H__ #if defined(_MSC_VER) #define INIH_DLL_EXPORT __...
true
814e45f8ac487f2f7aa2de1a47ac37d3153b8669
C++
YarinAVI/Leet-code-Solutions
/Backtracking + recursion_dfs_bfs/Solutions/430. Flatten a Multilevel Doubly Linked List.cpp
UTF-8
798
3.140625
3
[]
no_license
/* // Definition for a Node. class Node { public: int val; Node* prev; Node* next; Node* child; }; */ class Solution { public: Node* flatten(Node* head) { if(!head)return head; queue<Node*> q; dfs(head,q); Node* flat = q.front(); int i =0; Node * temp ...
true
3d86f11d066a4b851a68a05b2710b15ea798bc36
C++
CubicPill/PDES-MAS
/include/lp/GvtCalculator.h
UTF-8
1,875
2.640625
3
[ "BSD-3-Clause" ]
permissive
#ifndef _GVT_CALCULATOR_H_ #define _GVT_CALCULATOR_H_ /** *\brief Class used for GVT calculation (uses Mattern's) * *GvtCalculator.h * *Author: Michael Lees (mhl) *Date: (08/02/05) * * *Description: This is a class which maintains gvt values on an LP. Each *Lp in the simulation has a GvtCalculator which is...
true
b509482e9bd0ecaf60e185b1ec1d680a1cefc582
C++
sylvainma/UTComputer
/Interpreteur.cpp
UTF-8
10,842
3.0625
3
[]
no_license
#include "Interpreteur.h" /************************* * Interpreteur ************************/ const map<string, string> Interpreteur::regexs = { {"LitteraleEntiere", "-?[[:digit:]]+"}, {"LitteraleReelle","(-?[[:digit:]]+)(\\.|\\,)([[:digit:]]+)"}, {"LitteraleRationnelle", "-?[[:digit:]]+/-?[[:digit:]]+"},...
true
306bcbd55545a35796a3a2a16aca374bd2147055
C++
Jang355/SUZandJANG-1
/Programmers/Level 2/타겟 넘버/Solution.cpp
UTF-8
892
2.9375
3
[]
no_license
#include <string> #include <vector> #include <queue> using namespace std; vector<int> graph; int t; int bfs(int x){ int result = 0; queue<pair<int,int>> q; q.push({0,x}); q.push({0,x*(-1)}); while(!q.empty()){ int index = q.front().first; int sum = q.front().second; q...
true
d3217f1e569c05da7b65ba69fc0a5050a180f4e9
C++
IceCoffee2011/ChessGame
/ChessServer/RoSpace/RoSingleton.h
UTF-8
485
2.9375
3
[ "MIT" ]
permissive
#ifndef ROSINGLETON_H #define ROSINGLETON_H namespace RoSpace { // 单例模式的一种实现 // 注意: 这里的单例模式并不是指不能new 只能Instance()获得, // 而是一种库程序员与库用户的一种约定, 普通用户只通过 Instance() 函数获得 // 全局唯一的实例化对象 template <typename T> class CSingleton { public: static T* Instance() { static T x; return &x; ...
true
05f478cf91351313575a8337a11f403987d72e26
C++
prat31/Programming
/Competitive_Programming/GFG/nextGreaterElement.cpp
UTF-8
670
2.515625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int testCases; cin>>testCases; while(testCases--){ int n; cin>>n; vector<int> arr; int temp; for(int i=0; i<n; i++){ cin>>temp; arr.push_back(temp); } bool found=false; ...
true
28d9d2dbac63c7b60ae9e7db3844b4ad7006f79f
C++
haoyu987/multithread-downloader
/mydownload.cpp
UTF-8
2,733
2.828125
3
[]
no_license
// MyDownload.cpp: implementation of the MyDownload class. // ////////////////////////////////////////////////////////////////////// #include <afxsock.h> #include "helper.h" #include "Mydownload.h" #include <io.h> ////////////////////////////////////////////////////////////////////// // Construction/Destruction /////...
true
51e845e9258bff3a20665f9af2b70148287c8d0d
C++
fish-ball/acm.zju.edu.cn
/32XX/zoj.3279.src.1.cpp
GB18030
2,394
3.03125
3
[]
no_license
// 2056448 2009-12-13 18:19:58 Accepted 3279 C++ 400 5196 ͵ // ϣݽṹ⣬ // ߶ڵ㱣ڵͳ // ֵ֧IJijһλõֵ(ҪҶӵֵµ) // Ͳѯijһۻͳλֵ // 帴Ӷ O(nlog(n)) #include <iostream> using namespace std; struct TreeNode { int c, b, e; TreeNode *l, *r; TreeNode() : c(0), b(0), e(0), l(NULL), r(NULL) {} } *root; int n, q, v[100000]; int ge...
true
887de9fc7acab32be72fa35bc0ad4d9174249e40
C++
tommasoocari/exercises_LSN
/lib/lib.cpp
UTF-8
255
2.75
3
[]
no_license
#include <cmath> #include "lib.h" using namespace std; double length(vector<double> v1, vector<double> v2){ if(v1.size() != v2.size()) return 0; double su2=0; for(int i=0 ; i<v1.size(); i++) su2 = su2 + pow(v1[i] - v2[i],2); return sqrt(su2); }
true
658cbf7d8a385dc9b98969309e7ab20d3cdc3c9f
C++
matherno/MathernoGL
/src/maths/RaycastOperations.cpp
UTF-8
1,105
2.953125
3
[ "BSD-3-Clause" ]
permissive
#include <maths/RaycastOperations.h> namespace mathernogl { Vector3D getRaycastIntersectionOnXZPlane(const Raycast& raycast, const double planeOffset){ Vector3D intersectPoint; if(raycast.direction.y == 0){ if(raycast.position.y == planeOffset){ throw mgl_no_intersection("Raycast does not intersect at a point...
true
ead9c3e21d35963481ace38ea5542012f9d5609b
C++
Abhi-BearMunk/R-Game-Engine-DX12
/DX12Engine/Core/RGame.cpp
UTF-8
1,590
2.90625
3
[ "MIT" ]
permissive
#include <algorithm> #include <iostream> #include "RGame.h" //#include "RWindow.h" #include "REntity.h" namespace R { RGame::RGame() { } std::weak_ptr<REntity> RGame::CreateEntity() { auto entity = std::make_shared<REntity>(*this); entity->SetSelf(entity); entities.push_back(entity); return entity; } ...
true
cd07446a417f23e97b939263c3d3d9064150ba56
C++
HackerEva/RebornEngine
/RebornEngine/RBScene/RBScene.cpp
UTF-8
9,071
2.5625
3
[]
no_license
#include "RBScene.h" #include <sstream> namespace RebornEngine { void RBScene::Initialize() { cbPerObject.Initialize(); cbScene.Initialize(); cbBoneMatrices.Initialize(); cbLight.Initialize(); cbMaterial.Initialize(); cbGlobal.Initialize(); } void RBScene::Release() { DestroyAllObjects(); cbPerO...
true
d2a600373304ad3486da4db7d30e8ee1876a40d0
C++
vishuchhabra/cp_programs
/equivalent_string_codefroces.cpp
UTF-8
1,526
3.03125
3
[]
no_license
#include<iostream> #include<bits/stdc++.h> using namespace std; bool check_e(string first,string second) { sort(first.begin(),first.end()); sort(second.begin(),second.end()); if(first==second) return true; return false; } int main() { string first,second; cin>>first>>second; if(first.si...
true
8f7ec8474a703481568249406df7616f3059258f
C++
Girl-Code-It/Beginner-CPP-Submissions
/Urvashi/milestone-20(bitwise manipulation)/geeks basic bits questions/check if k'th bit is set or not in a number.cpp
UTF-8
202
2.828125
3
[]
no_license
#include <iostream> using namespace std; int main() { int n, k; cin >> n >> k; //check if kth bit is set or not means it is 1 or not. (n & (1 << (k - 1))) ? cout << "SET\n" : cout << "UNSET\n"; }
true
5e0e20d13cc599fe995ee5692527662869edbc57
C++
linhanyu/ACM
/newStudent/4442.cpp
UTF-8
866
2.8125
3
[]
no_license
// // Created by Henry on 17/3/5. // #include <cstdio> #include <algorithm> typedef long long LL; using namespace std; const int MOD = 365*24*60*60; const int MAXN = 100000 + 10; struct node{ LL a,b; double cost; bool operator<(const node & n)const{ return cost > n.cost; } }s[MAXN]; void c...
true
01ad9816cd89aa8bd78d1bceb8fed1b7c69365ed
C++
macias2k4/ExploreBot
/exploreBot/app/App.cpp
UTF-8
1,576
2.53125
3
[]
no_license
#include "App.hpp" #include "stm32f4xx_hal.h" using namespace std; namespace ExploreBot { // ────────────────────────────────────────────────────────────────────────────────────────────── // App::App(funct::AppModeChange::IAppModeChanger& appModeChanger, funct::InterruptHandling::InterruptsHandlerCaller& interr...
true
e2d10d50db723b3a7f50c04239e6f1745fde9394
C++
tia337/ownProgbase
/progbase2/tasks/qt_windows/qt_windows/taxidriver.h
UTF-8
385
2.671875
3
[]
no_license
#ifndef TAXIDRIVER_H #define TAXIDRIVER_H #include <iostream> using namespace std; class TaxiDriver { string _name; int _age; double _salary; int _clients; public: TaxiDriver(); TaxiDriver(string name, int age, double salary, int clients); ~TaxiDriver(); string name(); int age(); ...
true
731c3e8ae802fa4848dd1deacc88639698818c54
C++
joshpintea/ChessBoardDetection
/Util.cpp
UTF-8
1,440
2.84375
3
[]
no_license
#include "stdafx.h" #include "Util.h" #include <opencv2/shape/hist_cost.hpp> #include <opencv2/highgui.hpp> bool isInside(Mat img, int row, int col) { return (row >= 0 && row < img.rows) && (col >= 0 && col < img.cols); } float filter(Mat source, Mat mask, int row, int col) { int hs_r = (mask.rows / 2); int hs_...
true
403bcca6f96efbebd171ff1c6bf83f70d45dbeac
C++
Miguel235711/CompetitiveProgrammingAndMore
/Oracle Top Tec Programmer 2020/Virtual Contest 2/F/main.cpp
UTF-8
1,057
2.5625
3
[]
no_license
#include<bits/stdc++.h> using namespace std ; int n,ai; struct es{ int hi,oc; es(){} es(int hi,int oc){ this->hi=hi; this->oc=oc; } }; int64_t checkAns(int hi,int totalOccurrences,int64_t ans){ return max(ans,(int64_t)totalOccurrences * hi); } int main(){ ios_base::sync_wit...
true
16aead9994ff9cfa9e475bd4d293872bcc2d7be5
C++
chuanran/parallel-merge-sort
/ParallelMergeSort/Timer.h
UTF-8
559
3.078125
3
[]
no_license
#ifndef TIMER_H #define TIMER_H // 0 - ClockTimer, 1 - QPCTimer, 2 - CudaTimer #define TIMER_TYPE 1 #include <string> #include <sstream> using std::ostringstream; class Timer { protected: bool started; bool paused; double accumulatedTime; virtual void MeasureStartTime() = 0; virtual void Measur...
true
b1a1b24d1c4912acace96d7824c8424896d48406
C++
alanpreed/ArduinoOBD
/ArduinoOBD/ArduinoOBD.ino
UTF-8
4,361
2.6875
3
[]
no_license
#include "Block.h" #include "KW1281.h" #include "Debug.h" #include "Error.h" #include "Display.h" #include "Button.h" #include "ControlPanel.h" #define CONNECT_BUTTON 4 #define PLUS_BUTTON 2 #define MINUS_BUTTON 3 #define OBD_RX 0 #define OBD_TX 1 typedef enum { DISCONNECTED, CONNECTING, RECEIVE_HEADER, RECEI...
true
bcb521c56a0f12ae7c87425752160ccf717c2964
C++
gorbunov-dmitry/rucode-spring-2021-d
/3/c3.cpp
UTF-8
2,781
3.296875
3
[ "MIT" ]
permissive
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> long long dot ( const std::pair<long long, long long>& a, const std::pair<long long, long long>& b ) { return a.first * b.first + a.second * b.second; } long double distance ( const std::pair<long long, long long>& a, const std::pair<lo...
true
321b67d96ac4955623fb09decb7b54c685d54690
C++
adamgann/arduino_halloween
/arduino_halloween.ino
UTF-8
2,304
3.203125
3
[]
no_license
/* Halloween Costume 2014 Version 1.1 */ // Pin Setup int tleft = 2; int bleft = 5; int tright = 6; int bright = 3 ; int center = 9; //Timing int delayBetweenCycles = 30*1000; void setup(void) { pinMode(tleft,OUTPUT); pinMode(bleft,OUTPUT); pinMode(tright,OUTPUT); pinMode(bright,OUTPUT); pinMode(cen...
true
0e01c476f097c32229951e59d2ed06d9a6149d14
C++
gcorcorann/raytracing
/tests/test_triangle.cpp
UTF-8
527
2.765625
3
[]
no_license
#include <iostream> #include <cassert> #include "../triangle.h" #include "../ray.h" #include "../vector.h" int main() { Vector a = {-100, 0, -10}; Vector b = {100, 0, -10}; Vector c = {0, 100, -10}; Vector colour = {1, 0, 0}; Triangle tri = {a, b, c, colour}; Vector e = {0, 10, 0}; Vector...
true
73991fc5a216ade2fbc9718549f2e5c6b2b6fb13
C++
sstopkin/my-car-pc
/client/Desktop/joystick.h
UTF-8
2,318
2.71875
3
[]
no_license
#ifndef JOYSTICK_H #define JOYSTICK_H #include <QObject> #include "SDL/SDL_joystick.h" #include <QThread> #include <QStringList> class JoystickAdapter : public QObject { Q_OBJECT Q_DISABLE_COPY(JoystickAdapter) public: enum HatPosition { JOYSTICK_HAT_CENTERED = SDL_HAT_DOWN, ...
true
3ac205a398abd3d1ee482ebcc0582a395d360e29
C++
lainproliant/moonlight
/test/color.cpp
UTF-8
1,416
2.921875
3
[ "MIT", "BSL-1.0", "LicenseRef-scancode-unknown-license-reference", "Zlib" ]
permissive
/* * color.cpp * * Author: Lain Musgrove (lain.proliant@gmail.com) * Date: Thursday March 18, 2021 * * Distributed under terms of the MIT license. */ #include "moonlight/color.h" #include "moonlight/test.h" using namespace moonlight; using namespace moonlight::color; using namespace moonlight::test; int main(...
true
3f2cd3baf2ff5468d2f0817adf567bc3a0d90763
C++
williamokano/uri-judge-answers
/1/1071.cpp
UTF-8
440
3.03125
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; /* solucao 1067 */ int main() { int A, B, limite1, limite2, counter = 0; cin >> A >> B; limite1 = A; limite2 = B; if (A > B) { limite1 = B; limite2 = A; } limite1++; for (int i = limite1; i < limite2; i++) { ...
true