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
437c78c81a971682854f4732f8585b5b343970e4
C++
heyjessiehey/CPP1
/ws4_inlab/Passenger.cpp
UTF-8
1,387
3.15625
3
[]
no_license
// TODO: add file header comments here //Name: (Jessie) Gayeon Ko //Section: OPP244SGG //Student ID: 040704124 //Email: gko4@myseneca.ca //Date: Feb 13 2018 // TODO: add your headers here #include <iostream> #include <cstring> #include "Passenger.h" using namespace std; // TODO: continue your namespace h...
true
9ce65af38f001395121ff2c4a44d909f36f23842
C++
BilalAli181999/Programming-Fundamentals-in-C_Plus_Plus
/practice file loops/practice file loops/Source.cpp
TIS-620
1,269
3.25
3
[]
no_license
#include<iostream> #include<ctime> using namespace std; int main() { int counter = 1, i = 1; while (counter <= 10) { while (i <= counter) { cout << "+"; i = i + 1; } i = 1; counter = counter + 1; cout << "\n"; } cout << "\n\n\n"; int count = 10; int y = 1; while (count > 0) { ...
true
c7037e2687fbc5201805f270f31aeb7fb108257f
C++
TyRoXx/silicium
/test/html_tree.cpp
UTF-8
11,154
2.6875
3
[ "MIT" ]
permissive
#include <silicium/html/tree.hpp> #include <silicium/sink/iterator_sink.hpp> #include <boost/test/unit_test.hpp> #if SILICIUM_HAS_HTML_TREE BOOST_AUTO_TEST_CASE(html_tree) { using namespace Si::html; auto document = tag( "html", tag("head", tag("title", text("Title"))) + tag("body"...
true
809a3ad80f64d8e42207108c4adcbfe37858f10b
C++
cakkae/tasks-in-cpp
/niz2.h
UTF-8
1,855
2.953125
3
[]
no_license
// niz2.h - Klasa nizova apstraktnih podataka. #ifndef _niz2_h_ #define _niz2_h_ #include "podatak.h" #include "niz2gr.h" class Niz: public Podatak { // Atributi: Podatak** niz; // - niz pokazivaca na podatke, int kap; // - kapacitet niza. ...
true
026c2f7b196c0ead04ea0c829867f9291b0cb824
C++
seqan/seqan
/include/seqan/sequence/sequence_lexical.h
UTF-8
22,287
2.6875
3
[ "BSD-3-Clause" ]
permissive
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2021, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
true
6ef455cd060c858864c8c4c00c67b7fdfa8ceb24
C++
nayuta1019/AtCoder
/ABC/ABC021-030/ABC030/B/B.cpp
UTF-8
593
2.578125
3
[]
no_license
/** ABC030 2018/12/30/ 解説AC **/ #include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() inline int toInt(string s) {int v; istringstream sin(s);sin>>v; return v;} typedef lo...
true
27923cd02f19fa0f5749dc0a9e692d9a071be606
C++
jbji/2019-Programming-Basics-C-
/Other Works/20_7_5_p3/main.cpp
UTF-8
708
3
3
[]
no_license
#include <iostream> using namespace std; int main() { int h; cin >> h; for(int line=0;line<h;line++){ //第line行,需要输出h-line-1个横杠,1个左斜边,line个空格; //line个空格;1个右斜边;h-line-1个横杠, for(int i=0;i<h-line-1;i++){ cout << '-'; } cout << '/'; if(line!=h-1){ ...
true
6d35ca75204bbdd104df43980681f38e627c752e
C++
nameisshenlei/1.0.0.beta2
/Source/dataInfo.h
UTF-8
1,039
2.546875
3
[]
no_license
#ifndef _DATA_INFO_H__ #define _DATA_INFO_H__ #include "publicHeader.h" class dataInfo : public Timer { public: dataInfo(String strVMemoryName, String strAMemoryName); virtual ~dataInfo(); void VUpdataData(guint64 iVCurrentPts); void AUpdataData(guint64 iACurrentPts); void BeginTimer(int intervalInMilliseconds);...
true
d8651af74f368872413198587c3d43d6f32f858b
C++
pranshu2610/Algorithms-2
/Bits Manipulation/reverse_bits.cpp
UTF-8
577
2.59375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; long long reverse_bits(unsigned int n) { unsigned long long rev = 0; unsigned long long n1 = A; int count = 0; while(n1) { n1 = n1 >> 1; count++; } while( A > 0) { rev = rev << 1; if((A & 1) == 1) ...
true
be50ee2144643479881bf2c11d3feb427a0e1663
C++
AbhishekPratik1810/my_cpp_dsa_practice
/3.03 Strings - Permuations.cpp
UTF-8
828
3.109375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; vector<string> getPermutations(int currPos,string &s){ if(currPos==s.size()-1){ string a; a.push_back(s[currPos]); return vector<string> (1,a); } vector<string> fwd = getPermutations(currPos+1, s); vector<string> ans; for(auto...
true
8c3347bb887d9999265d6e5ae29b8a74c08b09c4
C++
thaohien97/school_homework
/main_thread.cpp
UTF-8
4,327
2.734375
3
[]
no_license
// // main.cpp // COSC3360_Hw3 // // Created by Hien Nguyen on 4/6/19. // Copyright © 2019 Hien Nguyen. All rights reserved. // #include <iostream> #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> #include <unistd.h> #include <vector> #include <stdio.h> #include <semaphore.h> #include <sys/stat.h> ...
true
0463e54ea8b9022403fef8faf3795314dd5b95b7
C++
idunnowhy9000/Projects
/SOURCE/C++/Numbers/Tile Cost.cpp
UTF-8
772
3.90625
4
[ "MIT" ]
permissive
/** * Tile Cost: Find Cost of Tile to Cover W x H Floor */ #include <iostream> #include <string> #include <cmath> float calcCost (float cost, float width, float height) { return cost*width*height; } int main() { float width; std::string str_width; float height; std::string str_height; float cost; std::string...
true
07307219a289cf338ed86e5c04c7e8d661204818
C++
bmcclelland/586-backend
/src/lib/util/color.h
UTF-8
978
2.8125
3
[]
no_license
#pragma once #include <string> #include <iosfwd> namespace mvc { enum class Color { off = 0, default_ = 39, black = 30, red = 31, green = 32, yellow = 33, blue = 34, magenta = 35, cyan = 36, lgray = 37, gray = 90, lred = 91, l...
true
934f52a3a0a082d048a4288f6584a7011b09ba79
C++
NickArust/COP_3504C
/main.cpp
UTF-8
2,240
3.640625
4
[]
no_license
#include <iostream> #include "StringData.h" using namespace std; int linearSearch(vector<string> dataset, string element); int binarySearch(vector<string> dataset, string element); vector<long long> timerSearch (vector<string> dataset, string element); int main() { vector<string> dataset = getStringData(); // gets ...
true
96eccb91d431b2a04ee2e8e34d479af8f3331f1f
C++
gusrl4025/algorithm
/d.com algorithm study/week 3/1260 - DFS와 BFS.cpp
UHC
1,554
3.203125
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<vector> #include<queue> #include<algorithm> using namespace std; int n, m, v, from, to; vector<int> a[1005]; queue<int> q; int check[10005]; void dfs(int v) { printf("%d ", v); check[v] = true; // ڽ ģ. for (int i = 0; i < a[v].size(); i++) ...
true
9cb94f8c4074187bcd43755dad5b5f1f54cc0e51
C++
EvgeniyMsk/CPP_modules
/08/ex00/easyfind.hpp
UTF-8
1,477
2.78125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* easyfind.hpp :+: :+: :+: ...
true
e521ca34caa01b0b582570ace28c95bd86ab2dba
C++
yuyuyu00/Tesi
/RHeroes/slam/support/nearestmatrices.h
UTF-8
1,318
2.75
3
[]
no_license
/* * nearestmatrices.h * * Created on: 01/feb/2013 * Author: Mladen Mazuran */ #ifndef NEARESTMATRICES_H_ #define NEARESTMATRICES_H_ #include <Eigen/Core> #include <Eigen/Cholesky> #include <Eigen/SVD> #include "shared/utilities.h" namespace SLAM { namespace Support { /* Fan, K. and Hoffman, A.J. (19...
true
89a93dedfe68bf6e4602c42712584186d02328ac
C++
Zirias/shuttercontrol
/src/controlleraction.h
UTF-8
683
2.6875
3
[]
no_license
#ifndef SCTL_CONTROLLERACTION_H #define SCTL_CONTROLLERACTION_H #include <QVector> class ControllerAction { public: class Step { friend class ControllerAction; friend class QVector<Step>; public: enum Type { Direction, Write, Read, WaitClock, Done }; Type t...
true
eeab4f3604232aa745e56da97a2342651c6daef0
C++
OldSchmitty/CS457
/Server/OutputManager.h
UTF-8
1,070
2.625
3
[]
no_license
// // Created by Mark Smith on 10/29/18. // #ifndef SERVER_OUTPUTMANAGER_H #define SERVER_OUTPUTMANAGER_H #include <string> #include <mutex> #include <vector> #include "Server.h" #include <queue> #include <condition_variable> #include <thread> class OutputManager { class Message{ public: std::...
true
b614de261939c39dc110d480ed1867eb7517b727
C++
wikijin/92
/hw12/InsertionSort.cpp
UTF-8
878
3.09375
3
[]
no_license
// // Created by TwoDog on 2017/4/25. // #include "InsertionSort.h" /** * Constructor. * @param name the name of the algorithm. */ InsertionSort::InsertionSort(string name) : VectorSorter(name) {} /** * Destructor. */ InsertionSort::~InsertionSort() {} /** * Run the insertion sort algorithm. * @throws an exc...
true
3d42be699fb24477e01fde417dbc859cb20358e0
C++
WangDrop/WangDropExercise
/algorithm/LeetCode/UniqueBinarySearchTreeII.cpp
UTF-8
1,278
3.046875
3
[]
no_license
class Solution { public: vector<TreeNode*> generateTrees(int n) { return createNode(1, n); } vector<TreeNode*> createNode(int start, int end) { vector<TreeNode*> result; if(start > end){ result...
true
47ee31b1162c6b8fa4a680eb5a005c62e9bbee69
C++
baibaixue/my_raytracer
/raytracer/geometry/Union.cpp
GB18030
1,258
2.703125
3
[]
no_license
#include"geometry/Union.h" namespace rt { Union::Union(std::vector<rt::Generation*> generations) { generation = generations; } IntersectResult Union::intersect(Ray3& _ray) { //printf("x:%lf y:%lf z:%lf\n", _ray.origin.x, _ray.origin.y, _ray.origin.z); float minDistance = Mathf::inifinity; //̾ Intersect...
true
19dc1af35f8a4779884526cb90e3a3fac630f00d
C++
cdsama/LeetCode
/src/0714.cpp
UTF-8
1,462
3.3125
3
[]
no_license
#include "LeetCode.hpp" /* 714. Best Time to Buy and Sell Stock with Transaction Fee Medium Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer fee representing a transaction fee. You may complete as many transactions as you like, b...
true
5ecaa85f731cd53c7c5a62fb8e0ca31a9688d558
C++
nghiaho12/CellCounter
/OpenGLPanZoom.cpp
UTF-8
2,974
2.8125
3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
#include <cmath> #include <cstdio> #ifdef _WIN32 #include <windows.h> // This needs to preceed the GL includes #endif #include <GL/gl.h> #include <GL/glu.h> #include "OpenGLPanZoom.h" OpenGLPanZoom::OpenGLPanZoom() { m_tx = 0.0f; m_ty = 0.0f; m_scale = 1.0f; m_zoom_level = 0; m...
true
a5b92a32a6db5cc880e5d2fa8d281e602e46587b
C++
DionysiosB/CodeChef
/PRB01.cpp
UTF-8
289
3.28125
3
[]
no_license
#include <cstdio> bool isPrime(long x){ for(long p = 2; p * p <= x; p++){if(x % p == 0){return false;}} return true; } int main(){ int T; scanf("%d\n", &T); while(T--){ long n; scanf("%ld\n", &n); puts(isPrime(n) ? "yes" : "no"); } return 0; }
true
924f2865eb8a6182719277dbab77349db8771ee4
C++
CaseyYang/Academics
/WordSegmentationByHMM_1/HMM2.cpp
GB18030
6,111
2.59375
3
[]
no_license
#include<iostream> #include<fstream> #include<sstream> #include<string> #include<stack> #include<sys/stat.h> #include<gdbm.h> #include<cstdlib> using namespace std; const string DB_FILE_BLOCK = "dict_db"; GDBM_FILE dbm_ptr; const int SNUM = 4; //״̬ϴС const int ONUM = 4782; //۲ֵϴС /*HMMģͲ*/ double PI[SNUM]; ...
true
9cd8f664bee154bc2acf9c69b2db40d2c952f828
C++
germanohn/competitive-programming
/uri/1237-comparaSubstr.cpp
UTF-8
1,359
2.71875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int me[55][55]; char s1[55], s2[55]; //recursivo /*int dp (int a, int b) { if (a < 0 || b < 0) return 0; if (me[a][b] != -1) return me[a][b]; if (s1[a] == s2[b]) return me[a][b] = 1 + dp (a - 1, b - 1); dp (a - 1, b), dp (a, b - 1); return me[...
true
fc2de801a6f9cddd0a5ab6cc779a9cf77cb353f7
C++
iserramacsa/mcomms
/printers/jet/src/jetio.cpp
UTF-8
578
2.671875
3
[]
no_license
#include "jet/jetio.h" using namespace Macsa::Printers; JetIO::JetIO(const std::string &id) : _id(id) { _value = false; } JetIO::JetIO(const JetIO &other) : _id(other._id) { _value = other._value; } std::string JetIO::id() const { return _id; } bool JetIO::value() const { return _value; } void JetIO::setVal...
true
5d6149dae9520f6d53d1e4e665172c98b2ee9fb6
C++
DeftHaHa/ACM
/牛客网/2019寒假训练赛1/G.cpp
UTF-8
1,022
2.671875
3
[]
no_license
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> using namespace std; int a[100005],pos[100005]; int main() { int N,x,y; scanf("%d%d%d",&N,&x,&y); int l,r,mx,mi; for(int i = 1;i <= N;i++){ scanf("%d",&a[i]); pos[a[i]] = i; } l = pos[x],r = pos[y]; if(l>r) swap(l,r); ...
true
6f08f3157031d0bd8eec8f13aa77f2464e5b27ca
C++
G-GFFD/Cendric2
/src/GUI/ModifierSlot.cpp
UTF-8
4,634
2.640625
3
[]
no_license
#include "GUI/ModifierSlot.h" using namespace std; const float ModifierSlot::SIDE_LENGTH = 50.f; const float ModifierSlot::MARGIN = 2.f; ModifierSlot::ModifierSlot(const SpellModifier& modifier) { m_spellModifier = modifier; setBoundingBox(sf::FloatRect(0.f, 0.f, SIDE_LENGTH, SIDE_LENGTH)); setDebugBoundingBox(s...
true
2f601dfa0fff6ba180b8372421c30858045fde65
C++
math715/cpp
/fp.cc
UTF-8
11,343
3.296875
3
[ "MIT" ]
permissive
#include <iostream> #include <tuple> #include <utility> #include <string> #include <vector> #include <sstream> template <typename T> void print( T t) { std::cout << t << std::endl; } class tfn_print{ public: template <typename... Args> auto operator()(Args&& ... args) const -> decltype( print(std::for...
true
9c539fa145a7f2acd7a0d8fe1fbb76813f376bea
C++
AyiStar/CppPrimer
/Chapter10/EXC10_14.cpp
UTF-8
234
3
3
[]
no_license
// // Created by ayistar on 2/20/17. // #include <iostream> int add_9 (int x) { auto sum = [x] (int i) { return x + i; }; int z = sum(9); return z; } int main() { std::cout << add_9(18) << std::endl; return 0; }
true
5c140800cac8e74d672a9430a5a8aad95ea28c73
C++
chigichan24/kyogi2015
/main/GA/ga-max.cpp
UTF-8
3,216
2.71875
3
[]
no_license
#include "bits/stdc++.h" struct GAData{ int score,time; double f_pass,f_cir,f_hole; double m_pass,m_cir,m_hole; GAData(){} GAData(int score,int time,double f_pass,double f_cir,double f_hole,double m_pass,double m_cir,double m_hole){ this->score = score; this->time = time; this->f_pass = f_pass; this->f...
true
9a5cc059a5b8b7d87de12d34633182d87548ab21
C++
dalalsunil1986/OnlineJudge-Solution
/UVa Online Judge/uva 488.cpp
UTF-8
439
2.953125
3
[]
no_license
#include<iostream> using namespace std; char *arr[] = {"", "1", "22", "333", "4444", "55555", "666666", "7777777", "88888888", "999999999"}; int main() { int tc,a,f,i,j; cin>>tc; while(tc--){ cin>>a>>f; while(f--){ for(i = 1; i<a; i++) cout<<arr[i]<<endl; for(j =...
true
1b1a9cbef1155c8a32f986b6bd2cb40cc39ed4be
C++
chtld/Programming-and-Algorithm-Course
/cplusplus/MyString2.cpp
UTF-8
3,749
3.21875
3
[ "MIT" ]
permissive
#include <cstdlib> #include <iostream> using namespace std; int strlen(const char * s) { int i = 0; for(; s[i]; ++i); return i; } void strcpy(char * d,const char * s) { int i = 0; for( i = 0; s[i]; ++i) d[i] = s[i]; d[i] = 0; } int strcmp(const char * s1,const char * s2) { for(int i = 0; s...
true
016ea95f9aab9f25a94e7cd568d0225025665f2d
C++
sunil-sopho/Cop290
/code/include/node.h
UTF-8
1,425
3.78125
4
[]
no_license
#ifndef NODE_H #define NODE_H #include "point.h" /* Wrapper class to store basic shapes (i.e., point,line,triangle and quadrilateral)*/ class node { int code; /*! Represents if the shape is point,line,triangle or quadrilateral*/ point p1; /*! First point*/ point p2; /*! Second point*/ point p3; /*! Third point*/ ...
true
2ace985fba37edea9f9ace82592723d062e600fc
C++
BeatrizHanae/OOEP1-Jogo-da-Vida
/src/main.cpp
UTF-8
1,788
2.90625
3
[]
no_license
//Aluna: Beatriz Hanae Fujimoto (160113814) #include <iostream> #include "glider.hpp" #include "campo.hpp" #include "block.hpp" #include "blinker.hpp" #include "gosper.hpp" #include <unistd.h> #include <stdlib.h> int main (int argc, char ** argv){ int i, j, numero; int celulas; int geracao = 0; Campo ...
true
7c61bfe84c8e93737d6b26cac3d115facfc8457b
C++
corrvax/DataStructure
/StackQueue/Polynomial/Polynomial.cpp
UTF-8
10,965
3.375
3
[]
no_license
#include <iostream> using namespace std; template <typename T> class Chain; template <typename T> class ChainNode { private: T data; ChainNode<T> *link; public: ChainNode(T element = 0, ChainNode *next = NULL) :data(element), link(next) { } T getData() ...
true
8a8fdbd3c734aa169cf63c3b183abf3d33fa1bea
C++
GEPTON-INFOTECH/flutter-practice
/calc.cpp
UTF-8
339
3.296875
3
[]
no_license
#include <iostream> using namespace std; void add() { int a,b,c; cout<<"enter two number\n"; cin>>a>>b; c=a+b; cout<<"your addition is "<<c; } int main() { char n; cout <<"Enter your choice\n"; cout<<"a for addtion\n"; cout<<"s for sub\n"; cin >>n; if(n == 'a') { a...
true
22c2d5e42d60d3bfcbf0d7ecb37133ad24071dac
C++
chaeonee/baekjoon
/C++/4889_안정적인문자열.cpp
UTF-8
1,442
3.84375
4
[]
no_license
#include <iostream> #include <string> #include <stack> using namespace std; int main() { int T = 0; // 루프의 순서 알려줄 변수 while(true){ string S; cin >> S; int s_len = S.length(); if(s_len > 0 && S[0] == '-'){ // 만약 '-'가 한 개 이상 존재하면 종료 break; } T++; int cnt = 0; // 연산의 수를 세기 위한 변수 stack<bool> s...
true
8a684fa9f8e9f82b1484aa9815e5d699a33c94b1
C++
BGCX067/ezgame-svn-to-git
/EzGame-1.0.0/CoreLibs/EzRenderer/Ez3DBuffer.h
UTF-8
2,874
2.65625
3
[]
no_license
#pragma once #include "../EzCore/EzRTTI.h" #include "../EzCore/EzTypes.h" #include "../EzCore/EzDebugHelper.h" #include "../EzCore/EzSystem.h" #include "../EzCore/EzRefObject.h" class Ez3DBuffer : public EzRefObject { EzDeclareRootRTTI(Ez3DBuffer); public: enum EUsage { ESTATIC = 1, EDYNAMIC...
true
aff136df12bdb03a94b1bdd0e00592af6616aa80
C++
mauroFH/OptiDAR_DEV
/Dev/Modulo-Opti/src/random.cpp
UTF-8
927
3.125
3
[]
no_license
/** \file random.cpp * -------------------------------------------------------------------------- * Licensed Materials - Property of * -------------------------------------------------------------------------- */ #define IA 7141 /// random parameter */ #define IC 54733 /// random parameter */ #define IM 259200 ...
true
3e059d043f797e5fcd5dd6ffa762c6871adec46e
C++
Volgara/R-Type
/server/GameManager.cpp
UTF-8
3,172
2.65625
3
[]
no_license
// // Created by Volgar on 11/01/2018. // Contact: volgar.dev@gmail.com // #include <iostream> #include <cstring> #include <network/Socket.hpp> #ifdef _WIN32 #include <winsock2.h> #include <Ws2tcpip.h> #endif #if defined(linux) || defined(__APPLE__) #include <sys/socket.h> #endif #include "GameManager.hpp" RTypeS...
true
44d7bdb0f0ee60a177edaa961c064b17f62e8f20
C++
teju85/nvgraph
/cpp/tests/readMatrix.hxx
UTF-8
11,986
2.640625
3
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2019, NVIDIA CORPORATION. * * 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.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
true
832e5c22a7e3ca5109cece4366fc631fb5adfeb4
C++
RyanARinger/HackerRankProjects
/InterviewPrep/3MonthPrepKit/Week2/7_Pangrams/Pangrams.cpp
UTF-8
812
3.40625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; /* * Complete the 'pangrams' function below. * * The function is expected to return a STRING. * The function accepts STRING s as parameter. */ string pangrams(string s) { int len = s.size(); int sum = 0; int A = 65; //ascii int alSize = 26; vecto...
true
01f1e7943910c76f1ba7b2b2da028a306c04116e
C++
Sudoka/D3
/D3/Mat3.hpp
UTF-8
5,120
2.953125
3
[ "CC-BY-3.0" ]
permissive
// // Mat3.hpp // // // Created by Srđan Rašić on 8/11/12. // Copyright (c) 2012 Srđan Rašić. All rights reserved. // #ifndef _Mat3_hpp #define _Mat3_hpp namespace d3 { #pragma mark Interface class Mat3 { public: union { struct { float a00, a01, a02; ...
true
9cabc2a5440f69686d24f7836f8d880d1d88ec7c
C++
Park18/Algorithm
/boj/gold/2533.cpp
UTF-8
1,930
3.265625
3
[]
no_license
/** * @url https://www.acmicpc.net/problem/2533 */ #include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; #define YES true #define NO false struct EDGE_INFO { int a; int b; }; void input_edge_info(EDGE_INFO* edge_info_group, int size) { for (int loop = 1; loop < siz...
true
c6ccf94bb1d26887a720fb4d35b68a86b51272e9
C++
Phuc-T-Tran/Brick-Breaker
/Brick Breaker/Brick Breaker/Ball.cpp
UTF-8
6,126
2.71875
3
[]
no_license
#include "Ball.h" #include "Paddle.h" #include "Brick.h" #include <stdlib.h> #include "Constants.h" #include "PlayState.h" #include <iostream> using std::cout; using std::endl; Ball::Ball(PlayState* playState) : playState(playState), image(playState->getResources().getTexture("ball")), velocity(0,-BallCo...
true
90b8271ae4ae6854f029543fe14e17134244942c
C++
dbstkd1101/SW_PRO
/PRO_ONLINE/구간성분_2918_YSL(미완성).cpp
UTF-8
2,794
2.625
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define NULL 0 #define MAX_BUCKET_SIZE 15000 #define MAX_BUF_SIZE 15000 typedef unsigned long long ULL; char sA[MAX_BUF_SIZE]; char sB[MAX_BUF_SIZE]; int lenSA; int lenSB; int sumA[MAX_BUF_SIZE]; int sumB[MAX_BUF_SIZE]; int strLen(const char* str) { int cnt = 0...
true
8b183508fbe3a3e5b8ca5167086302be464ce344
C++
dk-dev/rethinkdb
/src/concurrency/watchable_map.hpp
UTF-8
8,865
2.703125
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Copyright 2010-2014 RethinkDB, all rights reserved. #ifndef CONCURRENCY_WATCHABLE_MAP_HPP_ #define CONCURRENCY_WATCHABLE_MAP_HPP_ #include <functional> #include <map> #include "concurrency/signal.hpp" #include "concurrency/pubsub.hpp" #include "concurrency/watchable.hpp" #include "containers/map_sentries.hpp" #inc...
true
f3ab5bb563c40238680bdb3e3537813d771d2584
C++
KusumaAonsatit/Maze-Robot
/PID_Motor/PID_Motor.ino
UTF-8
3,489
2.953125
3
[]
no_license
// Motor A Left int dir1PinA = 2; int dir2PinA = 3; int speedPinA = 6; // เพื่อให้ PWM สามารถควบคุมความเร็วมอเตอร์ // Motor B Right int dir1PinB = 4; int dir2PinB = 5; int speedPinB = 7; // เพื่อให้ PWM สามารถควบคุมความเร็วมอเตอร์ //Counter speed sensor--------------------------------------...
true
abc36ceed66ffaab10b3b148b1b70bce59c662e1
C++
Mohumeddahir/Assignment10
/main.cpp
UTF-8
3,599
3.390625
3
[]
no_license
#include<iostream> #include"LinkedList.hpp" using namespace std; int main(){ LinkedList test1; cout<<"is it empty "<<test1.is_empty()<<endl; //test1.remove_first(); try{ //test1.remove_first(); //test1.remove_last(); //test1.remove_current(); //test1.next(); //test1.prev(); //test1.get_first(); //te...
true
43f84d9d9ef75b336bfd558c5b11ac93db673e5c
C++
dantasunifei/UCTP
/CP-Empty/src/CP-Empty.cpp
UTF-8
6,727
2.625
3
[]
no_license
#include <ilcp/cp.h> #include <math.h> #include <iostream> #include <string.h> using namespace std; int array1[25] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24}; int array2[15] = {0,2,3,5,7,8,10,12,13,15,17,18,20,22,23}; int array3[5] = {2,7,12,17,22}; int main(int, const char * []) { IloEn...
true
5d2bc4a79d499a97126bb645820966006915e8a6
C++
Alybaev/UVA
/11629.cpp
UTF-8
1,240
3.265625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; double round(double var) { // 37.66666 * 100 =3766.66 // 3766.66 + .5 =37.6716 for rounding off value // then type cast to int so value is 3766 // then divided by 100 so the value converted into 37.66 double value = (int)(var * 10 + .5); return (double)value /...
true
a1c42d551cc62b2365ba6728ac3a587a804f98e6
C++
Acejoy/LeetcodePrep
/22. Generate Parentheses/solution.cpp
UTF-8
1,013
3.34375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void printArray(vector<string> v) { for(auto e: v) { cout<<e<<endl; } cout<<"-----------------------"<<endl; } void getAns(int n, string s, stack<char> st, vector<string> &v) { if(n>=1) { int n1=n; stack<char> new_st = st; n1--; new_st.push(')'); getAns(n1,...
true
0708a2df298e7cc5d9ed47c9c36e8a54c6546ccd
C++
jamloya/coding-practice
/leetcode/Binary tree inorder traversal .cpp
UTF-8
1,024
3.40625
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: vector<int> inorderTraversal(TreeNode* root) { vector<int> result; TreeNode* cu...
true
0694de8792d98eeb27c834fc2c6eb2995dd56596
C++
ToLoveToFeel/LeetCode
/Cplusplus/_1310_XOR_Queries_of_a_Subarray/_1310_main.cpp
UTF-8
1,186
3.265625
3
[]
no_license
// Created by WXX on 2021/5/12 10:04 #include <iostream> #include <vector> using namespace std; /** * 执行用时:80 ms, 在所有 C++ 提交中击败了63.53%的用户 * 内存消耗:32 MB, 在所有 C++ 提交中击败了32.15%的用户 */ class Solution { public: vector<int> xorQueries(vector<int> &arr, vector<vector<int>> &queries) { int n = arr.size(); ...
true
4ad66be24fcdaf68eea639ebee01631c5762058f
C++
hbursk/shout-drums
/shout-drums/AdditionalSourceCode/Property.h
UTF-8
1,566
3.015625
3
[]
no_license
#pragma once #include "nod/nod.hpp" #include <functional> class AlwaysUpdatePolicy { public: template <typename T> bool operator()( const T&, const T& ) const { return true; } }; template <typename T, typename UpdatePolicy = std::not_equal_to<T>> class Property { public: Property() = def...
true
4627bfbda2ea68a239b912e3d418154c85c7c19e
C++
green-fox-academy/hrumocsaba
/week-03/day-3/petrolstation/main.cpp
UTF-8
347
2.53125
3
[]
no_license
#include <iostream> #include "Car.h" #include "Station.h" #include <vector> #include <string> using namespace std; int main() { Car car1; Station fill; do{ for (int i = 0; i < car1._capacity-car1._gasamount ; ++i) { car1.fill(); fill.fill(); } }while (!car1.isFul...
true
f03eaae5ed241919ad59a6ff5276e7f22f871108
C++
2464599943/PAT
/A1078/main.cpp
UTF-8
1,325
2.5625
3
[]
no_license
#include <iostream> #include<stdio.h> #include<algorithm> #include<math.h> #define inf 100000000 using namespace std; bool ifprime(int num){ if(num<=1)return false; else{ int sqr=(int)sqrt(1.0*num); for(int i=2;i<=sqr;i++){ if(num%i==0)return false; } } ...
true
aca2aa6165f9d9958d575fc9c02d28b66eed928a
C++
H2odude/C-867
/C-867/roster.h
UTF-8
1,192
2.546875
3
[]
no_license
#pragma once #include <iostream> #include <stdio.h> #include <string> #include "degree.h" #include "networkStudent.h" #include "securityStudent.h" #include "softwareStudent.h" #include <vector> using namespace std; const string studentData[5] = { "A1,John,Smith,John1989@gm ail.com,20,30,35,40,SECURITY...
true
2035b36b8deceab0bfa53bd80a8de8a9eec176ad
C++
GabeG1/CS_2336_Project_4
/include/Order.h
UTF-8
1,275
2.9375
3
[]
no_license
//Gabriel Goldstein //gjg180000 #ifndef ORDER_H #define ORDER_H #include "TheaterSeat.h" class Order { public: Order(); Order(int, TheaterSeat*, int, int, int); virtual ~Order(); void setNextOrder(Order* ord) { nextOrder = ord; } Order* getNextOrder() { ...
true
ec13955a4ab36db6d40a959560383c1ac535ba07
C++
RanjeetKumarMaurya/Data-Structures-and-Algorithms-Using-CPP
/Array/missingNumberInArray.cpp
UTF-8
858
3.296875
3
[]
no_license
// { Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution{ public: int MissingNumber(vector<int>& array, int n) { // Your code goes here int sum = (n * (n + 1)) / 2...
true
ba1ee2e8e411533dd89267bf357756e759d21275
C++
ThinkerBoy/soccerbot
/soccer/src/control/math/Geometry.cpp
UTF-8
74,728
3.484375
3
[]
no_license
#include <assert.h> #include <stdio.h> #include "Geometry.h" using namespace std; namespace SIM { Point2D testPoint; /*! This function returns the sign of a give double. 1 is positive, -1 is negative \param d first parameter \return the sign of this double */ int Sign(double d) { ...
true
181a9786f892014fe36438d88134953175f0c02b
C++
jifmarais/meicem
/src/libraries/mesh/include/TriangleContainer.hpp
UTF-8
1,163
3.0625
3
[]
no_license
#pragma once #include <vector> #include <limits> #include "NodeContainer.hpp" #include "Triangle.hpp" class TriangleContainer { public: typedef std::vector<double>::size_type SizeType; static const SizeType invalidIndex = std::numeric_limits<SizeType>::max(); TriangleContainer(NodeContaine...
true
ce3c0f5b24544e45442ca93fa3a873aff73a9d30
C++
confi-surya/pythonicPracto
/conditionCompleteion/src/common/communication/unittest/unix_sock.cpp
UTF-8
1,275
2.546875
3
[]
no_license
#include <iostream> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/socket.h> #include <sys/un.h> #include <netinet/in.h> #include <arpa/inet.h> #include "communication/communication.h" int main(){ FILE *fp; int s, len; struct sockaddr_un saun; //Open socket i...
true
23672cc4d752b54d469d5fd8e989834c65ba7c9f
C++
2018hsridhar/Leetcode_Solutions
/leetcode_640.cpp
UTF-8
3,876
3.125
3
[]
no_license
class Solution { public: string solveEquation(string equation) { // std::regex rxSplit(std::string("\\") + "s+"); // std::OutputIterator output; // NOT all types are available in the std namespace! // std::copy(std::sregex_token_iterator(std::begin(equation),std::end(equation),rxSplit,-1), ...
true
c20fa9c89793bbf6cd8c60c4bfbbf42b586e822d
C++
HALIP192/OOP_LAB
/lab6_7/student.cpp
UTF-8
579
3.03125
3
[]
no_license
#include "student.h" Student::Student() : mark(0) { } Student::Student(std::string f, std::string d, Sex s, const int& p) : Person(f, d, s), mark(p) { } Student::Student(std::string f, std::string d, std::string s, const int& p) : Person(f, d, s), mark(p) { } Student::Student(Student&& a) { id = a.i...
true
ea30f88efd16e4cbeba13025ff52125ccec69c96
C++
SoMa-Project/vision
/thirdparty/GeometricTools/WildMagic5/SampleGraphics/MorphFaces/CubicInterpolator.h
UTF-8
2,332
2.6875
3
[ "BSD-2-Clause-Views" ]
permissive
// Geometric Tools, LLC // Copyright (c) 1998-2014 // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // // File Version: 5.1.0 (2010/04/14) #ifndef CUBICINTERPOLATOR_H #define CUBICINTERPOLATOR_H...
true
fd81e13333ad513683f8ad0c6bfd487a089c3bb6
C++
Hikaru-4/SourceTree
/GameSources/StageObject.h
SHIFT_JIS
403
2.765625
3
[]
no_license
#pragma once #include "stdafx.h" namespace basecross { class StageObject : public GameObject { std::wstring m_name; // IuWFNg̎ޖ public: enum Type { Block, Grass }; public: StageObject(const std::shared_ptr<Stage>& stage, const std::wstring& name) : GameObject(stage), m_name(name) { } const ...
true
155663155f55cb5d35294ba4c29e3071e97f6256
C++
GokulVSD/ScratchPad
/LeetCode/1080 - Insufficient Nodes in Root to Leaf Paths.cpp
UTF-8
1,050
3.4375
3
[ "Unlicense" ]
permissive
// https://leetcode.com/problems/insufficient-nodes-in-root-to-leaf-paths/submissions/ // Simple recursive tree pruning. Leetcode annoyingly accesses root after execution, preventing me from being able to deallocate memory pointed by root. class Solution { public: bool prune(TreeNode* cur, int sum, int limit){ ...
true
c9190eb163d9b3755781f96d33533d2e3352dc35
C++
rachit-geek/code-daily
/450dsa/Arrays/prob5.cpp
UTF-8
519
2.890625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void swap() void rearrange(int arr[],int n) { int j=0; for(int i=0;i<n;i++) { if(arr[i]<0) { if(i!=j) { swap(arr[i],arr[j]); j++; } } } } void print(int ...
true
ac6f2fff732ea2224e5f6020d243aa175b52ec62
C++
Sagar-2-99/Finding-all-the-index-where-element-is-present-using-Recursion
/main.cpp
UTF-8
750
3.5
4
[]
no_license
#include <iostream> using namespace std; int findall(int b[],int a,int c,int x,int y) { if(a==0) { return x; } else if(b[0]==c) { cout<<"The element is at: "<<y-a<<endl; return findall(b+1,a-1,c,x+1,y); } else { return findall(b+1,a-1,c,x,y); } } i...
true
308d7d9accc3d4e830dd651a9cfc8057b8aa56d7
C++
rap2363/huffmancoding
/datastructures/BinaryEncoder.cpp
UTF-8
3,392
2.75
3
[]
no_license
#include <fstream> #include <iostream> #include "../utilities.hpp" #include "BinaryEncoder.hpp" const unsigned NUM_CHAR_BITS = 8; void BinaryEncoder::addBinarySequenceToCharacterBuffer(char* &char_buffer, const std::vector<bool> &bits, int &buffer_index, int &bit_index) { unsigned char last_buffer_char = bit_ind...
true
59f36e7d9f390fed2ab1001c7978d0f93e005b9c
C++
Ukio-G/live
/World.cpp
UTF-8
4,736
2.90625
3
[]
no_license
#include <cstdlib> #include <iostream> #include "include/World.h" #include "include/Executing.h" void World::fillVectices() { int counter = 0; for (int y = 0; y < Settings::height; ++y) for (int x = 0; x < Settings::width; ++x) vertices[counter++] = {((float)1.8*x/Settings::width) -...
true
7fc11e1b7cb6f3681813505ea5756cd928750f17
C++
chih7/c_learning
/fs/DBManager.h
UTF-8
1,201
2.625
3
[]
no_license
#ifndef DBMANAGER_H #define DBMANAGER_H #include<cstdlib> #include <string> #include "User.h" using namespace std; class DBManager { public: static void fresh(); //界面头 static void Login(); //登录界面 void start(); //初始化数据(从文件中读入)显示首界面 static void User_W...
true
138fd2b87a70e896e0b3e46987766e0ba459f606
C++
yiuyh/ACM
/二叉树.cpp
GB18030
1,649
3.390625
3
[]
no_license
#include<iostream> #include<cstring> #include<queue> #define maxn 100000+10 using namespace std; int arr[maxn] = {0}; // 鴢Ķı ԭ // α void lev_tra(int *arr){ queue<int> q; q.push(1); while(q.size()){ int cur = q.front(); cout << arr[cur] << " "; q.pop(); if(arr[cur*2]) q.push...
true
9ee1ebb14184d249e8099ff347ed5237a231525b
C++
Hen0k/Camera-Wrapper-Class
/app.cpp
UTF-8
432
2.5625
3
[]
no_license
#include "./cameraWrapper.cpp" int main() { // Create the Singleton instance with defaul cam and 400X400 dimentions Singleton *Sing = Sing->Instance(0, 1000, 1000); // hold the return value from the openCam function // inside a VideoCapture class variable VideoCapture c = Sing->openCam(); for(int i=0;i<100;...
true
14f2f5f9245e8e419169000c4c545c4c930d26c2
C++
vslavik/poedit
/deps/boost/libs/multiprecision/test/bug12039.cpp
UTF-8
1,533
2.578125
3
[ "GPL-1.0-or-later", "MIT", "BSL-1.0" ]
permissive
/////////////////////////////////////////////////////////////////////////////// // Copyright 2016 John Maddock. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <boost/multiprecision/cpp_bin_float.hpp> ...
true
bd49702f9dcff784a2369b97b13162ac6b02a1e5
C++
BansiddhaBirajdar/C-
/program3.cpp
UTF-8
434
3.625
4
[]
no_license
// 3. Write a C++ program to check two given integers, and return true if one of them is 30 or if their sum is 30. // Sample Input: // 30, 0 // 25, 5 // 20, 30 // 20, 25 // Sample Output: // 1 // 1 // 1 // 0 #include<bits/stdc++.h> using namespace std; bool check(int ino1,int ino2){ return (ino1==30)||(ino2==30)||(ino...
true
b0d5f40b22c2d89d8de1f199dd596862f5bacaad
C++
EduardoReisDev/EstruturaDeDados
/BoubleSort/Caractere/Nome composto/nomecomposto.cpp
UTF-8
631
3.296875
3
[]
no_license
#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; int main (){ int TAM=7, x=0, y=0; string vetor[7],aux; for (x = 0; x < TAM; x++){ cout << "Entre com um inteiro para o vetor: "; getline(cin, vetor[x]); } system("cls"); for (x = 0; x < TAM; x++){ for...
true
d6acb897d4770c0bd4fb59ddc8c9af8db30ee418
C++
WhiZTiM/coliru
/Archive2/ef/80154164218dd8/main.cpp
UTF-8
274
2.703125
3
[]
no_license
template<typename> struct type { template<typename Up> constexpr void operator()(Up&&) const noexcept { } }; template<typename Tp> struct wrapper { using type_ = type<Tp>; static constexpr type_ object{}; }; int main() { wrapper<void>::object(1); return 0; }
true
34c7d4889f7534434b3e11f70563c608940a6328
C++
milanpro/ParProg20Assignments
/assignment4/task4.3/colorfilter_tb.cpp
UTF-8
693
2.703125
3
[]
no_license
#include "colorfilter.h" #include <fstream> int main() { mtl_stream in; mtl_stream out; mtl_stream_element element; std::ifstream infile("/workspace/apples.bmp", std::ifstream::in | std::ifstream::binary); do { infile.read((char *)&element.data, STREAM_BYTES); element.keep = (mtl_stream_keep)-1; ...
true
e65cb7d24ab84759068e4b7cd814e389beaccc0a
C++
VinInn/FPOptimization
/examples/multilib.cc
UTF-8
2,035
2.734375
3
[]
no_license
typedef float __attribute__( ( vector_size( 16 ) ) ) float32x4_t; typedef float __attribute__( ( vector_size( 32 ) ) ) float32x8_t; typedef float __attribute__( ( vector_size( 64 ) ) ) float32x16_t; float //__attribute__ ((__target__ ("default"))) mySum(float vx, float vy) { return vx+vy; } float __attribute__ (...
true
583dbb7924083ecbfb392016c498d923eb1e39a1
C++
RazorzMcLazorz/C-Console-Projects
/Calendar Operations/Calendar Operations/Driver.cpp
UTF-8
1,386
3.0625
3
[]
no_license
#include "Vector2.h" using namespace std; int main() { // type of day int day = 0, mon = 0; string ay, mo; Vector2 Month(0, 0); Vector2 Day(0, 0); Vector2 Year(2017, 2000); helo: int hi = 0; cout << mo << " ,"; cout << ay << " " << Day.x << " ,"; cout << Year.x << endl; cin >> hi; switc...
true
65ee6cbf1bbdd47aa9539e39adc1f1cf12b58065
C++
lheckemann/namic-sandbox
/MistSlicer/Applications/CLI/UtahBSpline/ImageTransform.cxx
UTF-8
2,492
2.671875
3
[ "LicenseRef-scancode-3dslicer-1.0", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include <fstream> #include "Point2D.h" #include "Point3D.h" #include "BSpline3D.h" #include "BSpline2D.h" #include "ParametricImageTransformation3D.h" #include "ParametricImageTransformation2D.h" #define PRECISION double #define DIMENSION 3 #if DIM...
true
354c0db7e1609ac20453a2d0acd507522d036f7e
C++
WRodewald/GPOsc
/src/GPVarianceKernel.cpp
UTF-8
252
2.65625
3
[]
no_license
#include "..\include\GPVarianceKernel.h" using namespace GP; GP::VarianceKernel::VarianceKernel(float sigma) : sigma(sigma) { } float VarianceKernel::valueAt(float x, float y) const { return std::exp(-(x - y) * (x - y) / (2.f * sigma *sigma )); }
true
76c0d396bce05fd146b0f789778b3f28642b8a92
C++
jlbren/hamper
/GenomeHash.cpp
UTF-8
16,070
2.703125
3
[]
no_license
/****************************************************** Code Written and Developed @ Loyola Unviersity Chicago Jonathon Brenner, Catherine Putonti 2015 www.putonti-lab.com/software ******************************************************/ #include <vector> #include <bitset> #include <cstring> #include <fstream>...
true
543329bfc845764fdd590ff61accecb0b37837e4
C++
fyjet/gps32
/lib/Geodesic/Geodesic.cpp
UTF-8
1,789
3.359375
3
[]
no_license
/* * Class to compute distance and bearing from geographical coordinates * * formulas and explanation, see https://www.movable-type.co.uk/scripts/latlong.html */ #include "Arduino.h" #include "math.h" #include "Geodesic.h" Geodesic::Geodesic(float destination_latitude,float destination_longitude) { _destination_l...
true
dfe3a7ae9bea710b0073d0788656d3b406bf1488
C++
xwj95/Airwriting
/src/Task.cpp
UTF-8
3,644
2.75
3
[]
no_license
// // Task.cpp // Airwriting // // Created by 徐炜杰 on 15/12/4. // Copyright © 2015年 徐炜杰. All rights reserved. // #include "Task.h" #include "Canvas.h" Task *Task::instance = new Task(); Task::Task() { cvImage = cvCreateImage(cvSize(COMPRESS_M * COMPRESS_K, COMPRESS_N * COMPRESS_K), 8, 3); cvZero(cvImage);...
true
a5dd73d17f14cc2a22c183c4c540df122180baa5
C++
sureshyhap/C-plus-plus-Primer
/Chapter 9/15/15.cpp
UTF-8
259
3.53125
4
[]
no_license
#include <iostream> #include <vector> int main(int argc, char* argv[]) { std::vector<int> v1 {1, 2, 3, 4, 5}, v2 {1, 2, 3, 4, 5}; if (v1 == v2) { std::cout << "They are equal\n"; } else { std::cout << "They are unequal\n"; } return 0; }
true
d04172c467e0c545e5b694fd573e6309f740fc28
C++
kakigori12345/My-Creating-Games
/MonsterFactory.cpp
SHIFT_JIS
5,954
2.5625
3
[]
no_license
#include "GameLib/Framework.h" #include "MonsterFactory.h" #include "Action.h" #include "ContentReader.h" #include <string> using namespace std; using namespace GameLib; const char* MonsterFactory::filename = "data/monster_book.txt"; const char* MonsterFactory::defaultName = "Default"; MonsterFactory::Mons...
true
e2c817e34b7d85ab8bf7fafc21330ebec552d9ac
C++
bearxiong99/arduino-m5451-current-driver
/latest/apps/ccshield_m5451_test/ccshield_m5451_test.cpp
UTF-8
5,934
2.640625
3
[]
no_license
#include <CCShield.h> /* * Constant-Current Shield M5451 LED driver chip test and example * Author: G. Andrew Stone * Public Domain */ #include "WProgram.h" void setup(); void loop(); int myClockPin = 3; // Arduino pin that goes to the clock on all M5451 chips int mySerDataPin = 9; // 7; //9; ...
true
0468a51d81a8d365ba9fbb5d2cbd72488a41357a
C++
keisuke-kanao/my-UVa-solutions
/Contest Volumes/Volume 110 (11000-11099)/UVa_11086_Composite_Prime.cpp
UTF-8
1,697
3.3125
3
[]
no_license
/* UVa 11086 - Composite Prime To build using Visual Studio 2012: cl -EHsc -O2 UVa_11086_Composite_Prime.cpp */ /* 4 3 4 6 8 3 3 is a prime number 4 = 2 * 2 6 = 2 * 3 8 = 2 * 4 4 is an element in M 5 12 13 21 22 23 12 = 3 * 4 4 is an element in M 13 13 is a prime number 21 = 3 * ...
true
2efd0ca6d6065eba8e0a40f0dbe5b071b4795bbe
C++
shugo256/AlgorithmLibrary
/DataStructures/doubling.cpp
UTF-8
1,678
2.984375
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string> using ll = long long; using namespace std; /* verified on 2019/10/16 https://atcoder.jp/contests/arc060/submissions/7988691 */ #define LOG_MAX 30 // 1つ先が無い(木の根など)場合、値を負かn以上とする template <typename T> class Doubling { con...
true
77e650321f19fcdf3d7fac5d10b68fb40179d7f2
C++
greenfox-zerda-sparta/juliabaki
/week_05/day_1_jukebox/Song.cpp
UTF-8
514
3.203125
3
[]
no_license
#include "Song.h" Song::Song(string artist_of_song, string title) { this->artist_of_song = artist_of_song; this->title = title; this->genre = ""; this->sum_rating = 0; this->rating_counter = 0; } Song::~Song() {} string Song::getName() { return artist_of_song + ", " + title; } float Song::getAverageRati...
true
ea25491f439d8521866568d3ec675b4d34edc8c8
C++
donovan680/UAC-bypass
/testDll/Main.cpp
UTF-8
1,138
2.5625
3
[]
no_license
#include <windows.h> #include <iostream> #include <fstream> #include <string> BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, VOID* reserved) { OutputDebugString(TEXT("Testing output Debug string")); std::ifstream infile; char tempBuf[MAX_PATH]; GetTempPathA(MAX_PATH, tempBuf); std::string tempFolder = tem...
true
0e67a480c61bf9a9557af17a5a83613107dc483b
C++
nathanesau-competitive/Algorithms
/cpp/tests/graph_algorithms_test.h
UTF-8
1,401
2.953125
3
[ "WTFPL" ]
permissive
#ifndef TESTGRAPHALGORITHMS_H #define TESTGRAPHALGORITHMS_H #include "../graphs/graph_algorithms.h" #include <assert.h> #ifndef ASSERT_RAISES #define ASSERT_RAISES template <class Type> void assertRaises(Type &&f) { try { f(); assert(false); } catch (exception &) { assert(true); } } #endif class Graph...
true
c84e98aa05aca0fd22d193670cc2a9310ee0304f
C++
TomashuTTTT7/c4stl
/src/c4/hash.hpp
UTF-8
1,812
2.84375
3
[ "MIT" ]
permissive
#ifndef _C4_HASH_HPP_ #define _C4_HASH_HPP_ #include "c4/config.hpp" #include <climits> C4_BEGIN_NAMESPACE(c4) /** @see http://aras-p.info/blog/2016/08/02/Hash-Functions-all-the-way-down/ */ C4_BEGIN_NAMESPACE(detail) /** @see this was taken from a stack overflow answer. get the link and put it here. */ template< t...
true
36b95e0b32eaaa11bd58665e3786feaa04a88feb
C++
MarufurRahman/Object-Oriented-Programming-CPP
/Source/simple_cls_and_obj.cpp
UTF-8
321
3.4375
3
[]
no_license
// Create a simple class and object // Programmed by Marufur Rahman #include <iostream> using namespace std; class Hello { public: void sayHello() { cout << "Hello World" << endl; } }; int main() { Hello classObject1; classObject1.sayHello(); ret...
true