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
4cbc5e98d34fe17d33a575753d59c9bdb7789d1c
C++
willimius/leetcode
/Basic Calculator.cpp
UTF-8
993
3.015625
3
[]
no_license
class Solution { public: int calculate(string s) { int cursign = 1, res = 0, sum; stack<int> signs; signs.emplace(1); for (size_t i = 0; i < s.size(); i++){ auto c = s[i]; switch(c) { case ' ': continue; case '+': ...
true
e36da8ecd7cc01bee21283e443cc7a4ad255fa0a
C++
Junch/StudyCppUTest
/cpputest/interview1/interview1/ltoj_word_ladder_bfs_ii.cpp
UTF-8
4,124
3.03125
3
[]
no_license
// ltoj_word_ladder.cpp // // interview1 // http://oj.leetcode.com/problems/word-ladder-ii/ // http://discuss.leetcode.com/questions/1051/word-ladder-ii // Created by wolf76 on 13-8-24. // Copyright (c) 2013年 com.wolf76. All rights reserved. // #include <iostream> #include <unordered_set> #include <unordered_map...
true
a12a6694dc2ab1dff35ec18f9e10358b0aa9ec29
C++
headdeskdev/procjam2016
/code/engine/collision.cpp
UTF-8
17,326
3.125
3
[ "MIT" ]
permissive
enum collision_ObjectType { COLLISION_OBJECT_CUBOID, COLLISION_OBJECT_CAPSULE, COLLISION_OBJECT_QUADPRISM }; struct collision_Cuboid { Vector3 halfSizeAxes[3]; }; struct collision_Capsule { F32 middleHeight; F32 capRadius; Vector3 up; }; struct collision_QuadPrism { Vector3 up; Vector3 x; Vector3 y; Vecto...
true
9a8e2239a13a8a2a5e9eac20aa5b8213c14ecf28
C++
Danny1101/Cpp_generic
/Base Classes/Date/Date.cpp
UTF-8
3,566
3.625
4
[]
no_license
// // Date.cpp // C++ cours // // Created by Adam Boukhssimi on 12/11/2017. // Copyright © 2017 Adam Boukhssimi. All rights reserved. // #include "Date.hpp" #define $ Date #define defaultDay 1 #define defaultMonth 1 #define defaultYear 1970 #define __INF_LOOP while(true) $::Date(){ // Par défaut`` this->jou...
true
d99ab8bdcece56b3d035d114989747b30eb72455
C++
hjc0720/finace-account
/basefunction.cpp
UTF-8
1,267
3.34375
3
[]
no_license
#include "basefunction.h" #include <sstream> const unsigned long monthOfDay[12]={31,29,31,30,31,30,31,31,30,31,30,31}; string dateToString(unsigned long date) { ostringstream dateStream; dateStream << getYear(date) << "-" << getMonth(date) << "-" << getDay(date) ; return dateStream.str(); } unsigned long stringToD...
true
1a997864ecd03159b0266d8e837e43f6187795dd
C++
yashrajsingh11/A2OJ
/35)Parallelepiped.cpp
UTF-8
290
2.953125
3
[]
no_license
#include <iostream> #include <math.h> using namespace std; int main() { float xy, yz, xz; cin >> xy; cin >> yz; cin >> xz; float temp = xy * yz * xz; temp = sqrt(temp); xy = temp/xy; yz = temp/yz; xz = temp/xz; int result = (xy + yz + xz) * 4; cout << result; return 0; }
true
75b04cdc920258017deed9f7a567b679eb0f0e08
C++
TylerLeite/Roy-G-Biv
/other/tile.h
UTF-8
1,098
2.640625
3
[]
no_license
#ifndef GAME_H #define GAME_H // STL dependencies #include <string> #include <map> #include <iostream> #include <fstream> using namespace std; // Local dependencies #include "defines.h" #include "tile.h" #include "mob.h" class Game { Tile** _board; map<int, Mob*> _mobs; size_t _width, _height public: Game(...
true
0d16caa98f460666fa24395341e7094ab547eaf4
C++
coeducated/Projects
/Object-Oriented Programming/Data Encryption/encrypt.h
UTF-8
862
3.75
4
[]
no_license
// ......................................... // Telephone number encryption program - // Purpose - A program that encrypts telephone data so that it can be transmitted more securely. using namespace std; // program uses names from the std namespace class Encrypt { public: static const int arraySize = 8; // Size of a...
true
715d9844560ea49d354bbb75aa21c4a319dafb58
C++
Ibrahimgamal99/c-
/payroll_system.cpp
UTF-8
10,520
3.5625
4
[]
no_license
#include <iostream> #include<fstream> #include <string> #include<cstdlib> #include <algorithm> using namespace std; struct // struct array { string name; float hours; float price; float tax; float gross; float net; } employ[10]; double total; //read file void rfile...
true
5b780217ef1cc6da3cc1c23092ff0adfd11d5090
C++
Dymik1/lab4
/Card.h
UTF-8
278
2.6875
3
[]
no_license
#pragma once #include <string> using namespace std; enum result { win='w', lose='l', dravs='d' }; class Card { private: int figure, colour; static int counter; public: Card(); result compare(Card*); string description(); void show(); };
true
41c85e11dc74032438408c2ad1a63bdbe6871ba1
C++
gfxcc/test
/virtual_inheritence/test.cc
UTF-8
657
2.953125
3
[]
no_license
class A { private: int a; public: void f() { //cout << 1 << endl; } }; class B : public A { public: int d; virtual void g() { //cout << 2 << endl; } }; class C : public A { public: virtual void f() { //co...
true
81e44cfd4a4d385cc7712f61904367f1bf98801f
C++
0000duck/Astar_ocv
/main.cpp
UTF-8
11,307
2.6875
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <algorithm> #include <time.h> #include <unistd.h> #include <sys/time.h> #include <stack> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; #define WIDTH 50 #define HEIGHT 50 //https://blog.csdn.net/tanjia6999/article/details/79966694 struct b...
true
e657e767896b324e29021fe6df846a113f7ddfb8
C++
Sylenths/PI2018
/source/Atmosphere.h
UTF-8
5,516
2.734375
3
[]
no_license
/// \brief Gestion de l'atmosphère /// \details Permet de changer l'opacité du filtre et la couleur de l'Atmosphère. Gère aussi le ciel; /// \author Mathilde Harnois, Guillaume Julien-Desmarchais /// \date 17 avril 2018 /// \version 0.7 /// \warning /// \bug #ifndef SOURCE_ATMOSPHERE_H #define SOURCE_ATMOSPHE...
true
b002d2f10a3dc68b86a30b1cb4e49af6f1bd2760
C++
Miserlou/RJModules
/src/Noise.cpp
UTF-8
657
2.765625
3
[ "MIT" ]
permissive
/***************************************************/ /*! \class Noise \brief STK noise generator. Generic random number generation using the C rand() function. The quality of the rand() function varies from one OS to another. by Perry R. Cook and Gary P. Scavone, 1995--2019. */ /****************...
true
30c0b4ef8b64d1b60eb3310c62c8d32476f6e7f0
C++
sfaxi19/video-coding
/src/coding/BitStream/BitStream.hpp
UTF-8
1,588
2.6875
3
[]
no_license
// // Created by sfaxi19 on 18.02.18. // #ifndef VIDEO_COMPRESSION_BITSTREAM_HPP #define VIDEO_COMPRESSION_BITSTREAM_HPP #include "iostream" #include "coding/Binarization.hpp" #include <vector> struct code_info; class BitStream { private: std::vector<uint8_t> m_bitStream; int m_bit_pos = -1; int m_read_...
true
36cde1925faef2160101c71c90f3356098f9c1e5
C++
alelievr/md5
/includes/EnemyShip.class.hpp
UTF-8
578
2.8125
3
[]
no_license
#ifndef ENEMYSHIP_HPP # define ENEMYSHIP_HPP # include "Ship.class.hpp" class EnemyShip : public Ship { private: EnemyShip* _next; EnemyShip* _prev; public: EnemyShip(void); EnemyShip(std::string name, int x, int y, int hp, int mhp); virtual ~EnemyShip(void); EnemyShip * next; EnemyShip * prev; v...
true
dbc66a44f6dead607ece827b1ebb9b65ef28e9c8
C++
kumar1701/basic_linux
/util.h
UTF-8
8,995
2.671875
3
[]
no_license
#include<iostream> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <signal.h> #include <sys/wait.h> #include <fcntl.h> #include <termios.h> #include <sys/stat.h> #include <dirent.h> using namespace std; #define ANSI_COLOR_BLUE "\x1b[34m" #define ANSI_COL...
true
66a3f060016b0c4e59f2660a308424931986962c
C++
RileyCodes/RFramework
/RLog.h
UTF-8
1,822
2.90625
3
[]
no_license
#pragma once #include <iostream> #include <fstream> #include <iomanip> #include "RFrameworkException.h" namespace RFramework { //Framework LogTypes, reserve log id up to 99 enum class LogType : int { FatalError, LanguageNotFound, TaskStarted, TaskStopped, }; enum class LogLevel { Info, Warning,...
true
f4a504b3af60c404c273e1e36fddb0c6b6fcf179
C++
marcellfischbach/CobaltSKY
/Editor/editor/assetmanager/actions/new/assetmanagernewassetdialog.cc
UTF-8
1,757
2.609375
3
[]
no_license
#include <editor/assetmanager/actions/new/assetmanagernewassetdialog.hh> #include <editor/editor.hh> #include <editor/assetmodel/asset.hh> #include <editor/assetmodel/folder.hh> #include <QMessageBox> namespace asset::actions { NewAssetDialog::NewAssetDialog(QWidget *parent, asset::model::Folder *folder) : QDialo...
true
78cc1e6c98622fc4aab193986c9988b196dd1e83
C++
mmxsrup/atcoder-practice
/s8pc-6/c/c.cpp
UTF-8
943
2.546875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<(n);i++) bool used[110][110 * 110]; const int dy[] = {1, 0}; const int dx[] = {0, 1}; void solve(int h, int w, const vector<string>& c) { queue<pair<int, int>> que; que.push(make_pair(0, 0)); used[0][0] = true; whil...
true
b6f7b95ebdd8fef519df6c0e67db94bda22d3c77
C++
uniyalabhishek/LeetCode-Solutions
/C++/1046. Last Stone Weight.cpp
UTF-8
1,585
3.953125
4
[ "MIT" ]
permissive
// problem - 1046. Last Stone Weight /* We have a collection of stones, each stone has a positive integer weight. Each turn, we choose the two heaviest stones and smash them together. Suppose the stones have weights x and y with x <= y. The result of this smash is: > If x == y, both stones are totally destroye...
true
dd04f074ceeb1789bfab136e97ede1e75d7c927a
C++
edu929/portafolio-amp0-ciclo01-2021
/Unidad 1/alfabeto.cpp
UTF-8
212
2.640625
3
[]
no_license
#include <iostream> using namespace std; void imprimirAlfabeto() { char letra = 'A'; while (letra <= 'Z'){ cout << letra << " "; letra++; } cout << endl; } int main(){ imprimirAlfabeto(); }
true
8718b69f54624c7dbdded9e7a82b16752c028335
C++
AotY/Play_Interview
/WordSearchII/main2.cpp
UTF-8
3,697
3.09375
3
[]
no_license
#include <iostream> #include <vector> #include <string> #include <queue> #include <stack> #include <set> using namespace std; struct SearchStatus { int i; int j; int matchIndex; // 准备match的位置 SearchStatus(int i, int j, int matchIndex) : i(i), j(j), matchIndex(matchIndex) {}; }; // 回溯法搜索,可以用队列来实现 ...
true
eca96241ad7652e935c9bd645e682b8a402505f2
C++
BinaryMelody/Compiler_Principle
/5120309626-prj2/SymbolTable.h
UTF-8
1,758
2.984375
3
[]
no_license
//////////////////////////////////////////////////////////////////////// /* File Name: SymbolTable.h I have implemented all the things required for implementing a SymbolTable in this file. For each StatementBlock SymbolTable, it has a variable name symbol table and a struct type information symbol table. */ ...
true
57dba4588acbe63b9e7b982b1b0d5235811a8471
C++
mrerro/2D-Game
/thirdparty/NoesisGUI/Include/NsCore/Atomic.h
UTF-8
1,904
2.703125
3
[]
no_license
//////////////////////////////////////////////////////////////////////////////////////////////////// // NoesisGUI - http://www.noesisengine.com // Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved. //////////////////////////////////////////////////////////////////////////////////////////////////// ...
true
7d9c67cd6835eb8981f294860388cdd558f51011
C++
vitellet/Gitcode
/correlation.cpp
UTF-8
3,556
3.65625
4
[]
no_license
// //CSE455 Software Engineering assignment //Program that calculates the correlation between two sets of data // #include <iostream> #include <list> #include <cmath> using namespace std; class Correlation { public: double calculation(list<double> x, list<double> y) { list<double>::iterator it = x...
true
2fbcbc020915f3896561de4c24554aa69d50fee4
C++
jpleitao/projecto-cg
/ModelArrays.cxx
UTF-8
1,408
2.8125
3
[]
no_license
#include "ModelArrays.h" #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> ModelArrays::ModelArrays(){ } ModelArrays::ModelArrays(std::vector<glm::vec3> vertex, std::vector<glm::vec2> texture, std::vector<glm::vec3> normals) :objectVertex(vertex), objectTexture(texture), objectNormals(normals) ...
true
a6b6d3048671ab1de6813ccd5c347082fe4de1ed
C++
Toxe/project-euler
/euler006.cpp
UTF-8
304
3.421875
3
[ "MIT" ]
permissive
// Sum square difference #include <iostream> int euler006() { int sum = 0; int sum_of_squares = 0; for (int i = 1; i <= 100; ++i) { sum += i; sum_of_squares += i * i; } return sum * sum - sum_of_squares; } int main() { std::cout << euler006() << std::endl; }
true
103578d57139a1fe0f74e44e11591dd19d949f3c
C++
Jiffer/kitsch-instrument
/kitsch-instrument.ino
UTF-8
5,283
2.546875
3
[]
no_license
// The Kitsch-Instrument code // // Jiffer Harriman // modular-muse.com #include "buttonStruct.h" // this version also can blink some lights to the // beat using the AdaFruit neopixel #include <Adafruit_NeoPixel.h> buttonStruct playButton = { 2, LOW, LOW, 0, 0}; buttonStruct solButton1 = { 4, LOW, LOW, 0, 0};...
true
b5db41f0e00aba52cc0eba90827851b736496759
C++
grayondream/Primer-Learing
/chapter3/3.5/main.cpp
UTF-8
559
3
3
[]
no_license
/************************************************************************* > File Name: main.cpp > Author: > Mail: > Created Time: 2018年01月05日 星期五 21时44分11秒 ************************************************************************/ #include <string> #include <iostream> using namespace std; int main(int argc, cha...
true
d572a780be561e05eb04fb5e99ab2d3a56200171
C++
SeongHyeon0409/codes
/C&CPP_PROJECTS/4.18/CCharacter.h
UTF-8
239
2.828125
3
[]
no_license
#include <string> #include <iostream> class CCharacter { public : CCharacter (); ~CCharcter (); void SayMyName() { std::cout << "My Namie is " << m_Name << std::endl; } protected: std :: string m_Name; }
true
a5c40d2160d3bdc541dd7ce68eb3e21350720347
C++
EishaMazhar/Semester3-Resources
/DS Lab/lab 2 Activities/vector array.cpp
UTF-8
453
2.859375
3
[]
no_license
#include<iostream> #include<vector> using namespace std; main(){ int r,c,a=0; vector<vector<int> > vec; cout<<"Enter no of rows : "; cin>>r; int b[r]; for(int i=0;i<r;i++) { vector<int>t; cout<<"Enter row size : ";cin>>c; b[i]=c; for(int j=0;j<c;j++) { cin>>a; t.push_back(a); } vec.push_b...
true
38081f0dcde5936ebddca79109f9f8ca2101f74d
C++
kais66/leetcode-git
/rotate_image/solution.cc
UTF-8
696
3.03125
3
[]
no_license
class Solution { public: // http://blog.csdn.net/kenden23/article/details/17200067 void rotate(vector<vector<int> > &matrix) { int n = matrix.size(); for (int i=0; i<n/2; ++i) { // m=n/2 layers, initial values of outer loop are (0,0), (1,1).. for (int j=i; j<n-1-i; ++j) { ...
true
2954c4837541726708dac8bcc0b30ec8fc1dea94
C++
m2ci-msp/mri-shape-tools
/ema-tools/ema-tracker/src/include/TrackerUpdate.h
UTF-8
3,671
2.6875
3
[ "MIT" ]
permissive
#ifndef __TRACKER_UPDATE_H__ #define __TRACKER_UPDATE_H__ #include "TrackerData.h" #include "TrackerState.h" #include "TrackerFitting.h" class TrackerUpdate{ public: /*--------------------------------------------------------------------------*/ TrackerUpdate( TrackerData& trackerData, TrackerState& tra...
true
615f5732c6d353a3c02579c3c23e596aa07431e0
C++
Delta-Sama/AI-Assignment-3
/GAME1017_Template_W01/Pathing.h
UTF-8
1,476
3.03125
3
[]
no_license
#pragma once #ifndef _PATHING_H_ #define _PATHING_H_ #include <SDL.h> #include <vector> #include "Vector2.h" class PathConnection; class PathNode : public SDL_FPoint { public: PathNode(float x, float y); ~PathNode(); void Update(); void AddConnection(PathConnection* c); std::vector<PathConnection*>& GetConnecti...
true
1931c3f6acac22a1f673b6a79b0d25b1182128f0
C++
waddlesplash/WonderBrush-v2
/common/src/keyfile/keyfile_support.cpp
UTF-8
2,165
2.671875
3
[ "MIT" ]
permissive
// keyfile.cpp #include <algorithm> #include <cstdio> #include <File.h> #include <Message.h> #include "keyfile_support.h" #include "LicenceeInfo.h" static const char kXORCharacter = (unsigned char)0xff; static const off_t kMaxKeyFileSize = 10240; /*static void print_buffer(const void* buffer, size_t size) { const...
true
5cccd8ed56bee3932c4770aa2bf6ca02e3d93fd3
C++
Jos3f/AI-Labs
/lab1/duckhuntV2/Player.cpp
UTF-8
23,834
3.03125
3
[]
no_license
#include "Player.hpp" #include <cstdlib> #include <iostream> #include "Matris.cp" #include <vector> #include <map> #include <cmath> #include <algorithm> #include <time.h> /** * Algorithm explanation * * We start by not shooting anything the first round * * After the first round, we guess that each bird is species...
true
5058d6c534578f61ccfb39f0d97652e55c6bd3d0
C++
eduardoRod/Pessoal
/Arduino/Comando/Comando.ino
UTF-8
1,881
2.53125
3
[]
no_license
#include <SPI.h> #include <Adafruit_GFX.h> #include <Adafruit_PCD8544.h> #define CS 10 #define btn1 2 #define btn2 3 #define btn3 4 #define btn4 5 int centroXY[] ={ 21 , 12 , 63 , 12 , 21 , 36 , 63 , 36}; uint8_t codCanal[8] ={ 0x80 , 0x90 , 0xA0 , 0xB0, 0xC0 , 0xD0 , 0xE0 , 0xF0}; /* Inicialização de ecrãn 84x4...
true
4f11dcdf8d8db947e7127163f39bb38a1fa29781
C++
rocfatcat/nano51822
/uCXpresso.NRF/inc/class/spi_master.h
UTF-8
4,263
2.5625
3
[]
no_license
/* =============================================================================== Name : spi_master.h Author : uCXpresso Version : v1.0.0 Date : 2014/10/16 Copyright : Copyright (C) www.embeda.com.tw Description : SPI master class ============================================================...
true
6693ff06bedc989c92a538493cc79a90820522dc
C++
junlong-gao/recreations
/code_practise/leetcode/00647.cpp
UTF-8
725
2.671875
3
[]
no_license
class Solution { public: int countSubstrings(string s) { int ret = 0; vector<vector<bool>> dp(s.size(), vector<bool>(s.size(), false)); for (int l = 1; l <= s.size(); ++l) { for (int i = 0; i + l - 1 < s.size(); ++i) { int j = i + l - 1; i...
true
29da24197f992e5c1d88cf60da0c3c013dbfcc60
C++
jaemin2682/BAEKJOON_ONLINE_JUDGE
/12791.cpp
UTF-8
1,222
2.765625
3
[ "MIT" ]
permissive
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; int main() { int q; vector<pair<int, string>> list = {{1967, "DavidBowie"}, {1969, "SpaceOddity"}, {1970, "TheManWhoSoldTheWorld"}, {1971, "HunkyDory"}, {1972, "TheRiseAndFallOfZiggyStardustAndTheSpidersFromM...
true
6a14ca750edc1452a5c68aee1b559506ca0676f4
C++
drthomas21/CS332C
/HuntTheWumpus/HuntTheWumpus/Wumpus.cpp
UTF-8
358
2.59375
3
[]
no_license
#include "Wumpus.h" #include "Board.h" #include <string> namespace game { namespace pieces { Wumpus::Wumpus(int i, std::string name) :Piece(i, name) { } void Wumpus::doAction(int id = 0) { Board::getInstance()->setEvent(Board::ATE_BY_WAMPUS); } std::string const Wumpus::makeSound() { return "You...
true
e2cb4e7633fe2602d4582aab9c8f3f3604cd3ed4
C++
yinchunxiang/LeetCode
/ReverseWord/ReverseWord.cc
UTF-8
1,358
3.203125
3
[]
no_license
class Solution { public: string reverseString(string& s) { string ret = ""; bool is_pre_space = true; for(int i = s.size() - 1; i >= 0; --i) { if (is_pre_space) { if (s[i] != ' ') { ret += s[i]; } } else ...
true
268074c651f439900b8afb6a65e9685048b8ccfd
C++
kean0212/learning
/wordBreakII.cpp
UTF-8
2,197
3.25
3
[]
no_license
#include <string> #include <vector> #include <unordered_set> #include <iostream> using namespace std; class Solution { bool wordBreakI(string s, unordered_set<string>& wordDict) { int length = s.length(); bool* flags = new bool[length + 1](); flags[0] = true; for (int i = 1; i <= l...
true
918d393b825494f226ae90ac1253c7c22851f469
C++
Marvelous-Artoria-Pendragon/Student-Address-List-System-BinaryTree-
/graphical interfaces codeFile/SearchWindow.cpp
UTF-8
3,185
2.640625
3
[]
no_license
#include "SearchWindow.h" #include "ui_searchwindow.h" #include <QMessageBox> #include <string.h> SearchWindow::SearchWindow(CompleteBinaryTree<Student> *c, QWidget *parent) : QDialog(parent), ui(new Ui::SearchWindow), bt(c), temp(NULL) { ui->setupUi(this); ui->tableWidget->setSelectionBehavior(QAbstractIt...
true
787287742adde2f11b93bba04bac6cde00e466d3
C++
fmallaba/cpp
/d01/ex06/Weapon.hpp
UTF-8
226
2.6875
3
[]
no_license
#ifndef WEAPON_HPP # define WEAPON_HPP # include <iostream> class Weapon { public: Weapon(std::string ntype); ~Weapon(); std::string type; void setType(std::string ntype); std::string const & getType(void); }; #endif
true
e845b7d25a1ba437183c808578ac1f3fe7b53e75
C++
lsjkeh9683/C-langue
/4.디버깅/527.cpp
UHC
212
2.875
3
[]
no_license
#include<stdio.h> int main (void){ int num1,num2; printf(" 2 ԷϽÿ : "); scanf("%d %d", &num1, &num2); printf("%d ",num1/num2); printf("%.2f",(float)num1/num2); return 0; }
true
cc8fe5c9f4309e4a995d7bd36a36e029e4c19be2
C++
qedpi/Topcoder_SRMs_Commented_Div2_Easy_InProgress
/207 two a - TransportCounting - Number of busses passed given position and speed.h
UTF-8
1,580
2.703125
3
[]
no_license
/* This is a skeleton for writing C++ contest solutions.*/ #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <numeric> #...
true
5594164703924b3fa036f484eb8274131081b49c
C++
eduellery/cses-problemset-cpp
/sort_search/concert_tickets.cc
UTF-8
437
2.53125
3
[ "MIT" ]
permissive
#include <iostream> #include <set> using namespace std; using ll = int64_t; int main() { ll n, m; cin >> n >> m; multiset<ll, greater<ll>> A; for (ll i = 0; i < n; i++) { ll p; cin >> p; A.insert(p); } for (ll i = 0; i < m; i++) { ll p; cin >> p; auto it = A.lower_bound(p); if ...
true
860baca67c0abf700aadca402d36f91e11b3bf1d
C++
imjch/jcSQL
/val_type.h
UTF-8
430
2.875
3
[]
no_license
#pragma once #include <string> #include <unordered_map> enum val_type { JC_INT = 0, JC_DOUBLE, JC_STRING, NULLABLE,VAL_TYPE_INVALID }; const static std::string val_type_to_s[] = { "INT", "DOUBLE", "STRING","NULLABLE", "VAL_TYPE_INVALID" }; const static std::unordered_map<std::string, val_type> val_type_to_i =...
true
89041d4f0ed9d8105358940b25734dc3a7c4985f
C++
udservaites/CIS-2207
/LinkedListsClassExamples/LinkedListsClassExamples/LinkedListsClassExamples/Car.h
UTF-8
252
2.765625
3
[]
no_license
#pragma once #include <string> class Car { private: string make; string model; string licensePlate; public: Car(void); Car(string, string, string); ~Car(void); string getMake() {return make;} string getModel(); string getLicensePlate(); };
true
db3664949356d6ee4c6e13ea9ed5091cc474b2e1
C++
bugcheck/gsra
/anomalyDetection/event_detection/Torch3/core/ClassMeasurer.cc
UTF-8
2,376
2.625
3
[ "BSD-3-Clause" ]
permissive
#include "ClassMeasurer.h" namespace Torch { ClassMeasurer::ClassMeasurer(Sequence *inputs_, DataSet *data_, ClassFormat *class_format_, XFile *file_, bool calc_confusion_at_each_iter_) : Measurer(data_, file_) { inputs = inputs_; class_format = class_format_; calc_confusion_at_each...
true
fd43d74e6e4c163866b9a5d756c07ae033b6df22
C++
vector-of-bool/batteries
/src/btr/native_io.nix.cpp
UTF-8
1,063
2.671875
3
[ "BSL-1.0" ]
permissive
#include "./native_io.hpp" #include "./syserror.hpp" using namespace btr; #if !_WIN32 #include <unistd.h> void posix_fd_traits::close(int fd) noexcept { ::close(fd); } std::size_t posix_fd_traits::write(int fd, const_buffer cbuf) { neo_assert(expects, fd != null_handle, "Attempte...
true
75b2f488fee09b0906296275139e56ac3c693778
C++
KyungBin7/Trainning
/Datastructures/LinkedList/LinkedList/DoubleLinkedList/DoubleLinkedList/main.cpp
UTF-8
374
2.53125
3
[]
no_license
#include "Web_browser.h" #include <iostream> using namespace std; int main() { Web_browser wb; string addr; string command; while (1) { cin >> command; if (command == "exit") break; if (command == "go") { cin >> addr; wb.go(addr); } else if (command == "forward") wb.forward(); else if (co...
true
00f84890a90dd796003ed70debd6a941d5b4e926
C++
OpenVietcong/veles
/src/util/sampling/uniform_sampler.cc
UTF-8
5,300
2.546875
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2016 CodiLime * * 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 or agreed to in writ...
true
f016091d85addfe28e72be667007a990a9467749
C++
zruslan2/KR2201
/ConsoleApplication2/Source.cpp
WINDOWS-1251
5,598
3.3125
3
[]
no_license
#include <stdio.h> #include <iostream> #include <locale.h> #include <time.h> using namespace std; short int nz; void main() { setlocale(LC_ALL, "Ru"); srand(time(0)); int i; while (true) { cout << " , 0 "; cin >> nz; if (nz == 0) { break; system("exit"); } else if (nz == 1) { /*1. *, , ...
true
ba59c25bd9cb268dfdd2c3b4e073484fba74e2fd
C++
GabMeloche/Identity-Engine
/Identity/Engine/src/Rendering/Lights/DirectionalLight.cpp
UTF-8
4,348
2.78125
3
[]
no_license
#include <stdafx.h> #include <Rendering/Lights/DirectionalLight.h> using namespace Engine::Rendering; Lights::DirectionalLight::DirectionalLight() : ILight{LightData{}} { GetLightData().set = -1.f; } Lights::DirectionalLight::DirectionalLight(const Vector4F& p_position, const Vector4F& p_ambient, ...
true
3bc6d066dd32c75ef1c19a94bbb47069b6e89f27
C++
FahimMuntashir/theAlgorithms
/Queue/generateBinary.cpp
UTF-8
841
3.078125
3
[ "MIT" ]
permissive
/* * * Author : Fahim Muntashir * Handle: f12r * */ #include <bits/stdc++.h> using namespace std; #define f12r ios_base::sync_with_stdio(false), cin.tie(NULL) const double EPSILON = 1e-9; #define MOD 1000000007 #define pi acos(-1) #define ll long long #define endl "\n" vector<string> generateBinary(int n) { q...
true
e8c7c10bf55aa415a2571f8a7d83fa99ff81a347
C++
SIMRAN1/Coding-practice
/validMountainArray.cpp
UTF-8
646
2.9375
3
[]
no_license
class Solution { public: bool validMountainArray(vector<int>& arr) { if(arr.size()<3) { return false; } int c1=0; int c2 = 0; int i=0; for(i=0;i<arr.size()-1;i++) { if(arr[i+1]-arr[i]>0) { c1++; } else { ...
true
59cd466c0ad9a583bf599af707b352fa314f93a8
C++
ohager/kantalupe
/include/AbstractTreeModel.h
UTF-8
2,783
2.71875
3
[]
no_license
#ifndef ABSTRACTTREEMODEL_H #define ABSTRACTTREEMODEL_H #include <QStandardItemModel> #include "ModelInsertionInterface.h" class QStandardItem; class QIODevice; namespace k{ class TreeItem; class AbstractTreeModelVisitor; /** A generic tree-structured model @author O. Haeger */ class AbstractTreeModel : pub...
true
c00a6d4e0a7915873e75992d9651735a9702ed62
C++
114-l-l-255/OI_codes
/Bashu(code)/4557.cpp
UTF-8
1,986
2.5625
3
[]
no_license
#include <algorithm> #include <cstring> #include <cstdio> using namespace std; const int maxn = 500005; struct BIT { int n, c[maxn]; inline int Lowbit(int x) { return x & (-x); } void init(int n) { this->n = n; memset(c, 0, sizeof(c)); } void add(int x, int ...
true
dd0319c168d1a802434fe2e0137621e23e2a57f5
C++
marcoffee/util-cpp
/util_macro.hh
UTF-8
3,933
2.78125
3
[ "Apache-2.0" ]
permissive
#pragma once #include <iterator> // An empty macro argument #define EMPTY_ARG // A comma for macro expansion #define COMMA , #ifndef RST_LINE // Clear terminal line #define RST_LINE "\r\033[K" #endif #ifndef WHITESPACE // Whitespace characters #define WHITESPACE " \f\n\r\t\v" #endif // Convert parameter t...
true
7ae2424b4ea59e78b78cb25917846b5c5ab7645d
C++
rahulrajaram/scheme_compiler
/atrium/tokens/digit.cpp
UTF-8
1,150
2.875
3
[]
no_license
#include "token.h" namespace Atrium { bool Token::is_digit(char ch) { switch (ch) { case '0': break; case '1': break; case '2': break; case '3': break; case '4': break; case '5': break; case '6': break; case '7': break; case '8': break; case '9': break; default: return false; } ...
true
b99d75d3ec673f6627781b5670803247f50a3550
C++
ilee2914/schoolprojectsandmore
/sendbobspls/CPU.cpp
UTF-8
1,316
3.078125
3
[]
no_license
#include "CPU.h" #include "Schedule.h" #include "Memory.h" #include "HardDisk.h" #include <iostream> CPU::CPU() { currentProcess = nullptr; } void CPU::loadProcess(Process *temp, Schedule *q) { sendToQueues(q); currentProcess = temp; } void CPU::sendToQueues(Schedule *q) { q->addToQueues(currentProcess); current...
true
96f310de8a33f83739bdfa37e5963fca7ecbfbf8
C++
FuelFighter/Dashboard_2019-SteeringWheel_2019
/PrototypingTestingFeilsøking dash/can_test_full/graphics.cpp
UTF-8
1,219
2.953125
3
[]
no_license
/* SEM 2019 * by Ludvik Rønning & Jørgen Wisløff * */ #include "graphics.h" void clearScreen(Adafruit_SharpMem& screen) { screen.clearDisplay(); } /*void drawBackground(Adafruit_SharpMem& screen, bool right) { int X = 0, Y = 0; if (right) { screen.drawXBitmap(X, Y, fi...
true
44a053be48096ca8b408444c50618cc2d491ab3b
C++
crithead/misc-tools
/cpp/read-write.cpp
UTF-8
2,333
3.796875
4
[ "Unlicense" ]
permissive
// Read-Write number from/to stdin #include <cmath> #include <algorithm> #include <iostream> #include <iterator> #include <vector> static double calc_mean( std::vector<double>& ); static double calc_median( std::vector<double>& ); static double calc_stdev( std::vector<double>&, double ); static double find_min( std::v...
true
433ef51349cffb9749d1647a17b91636031f8ef3
C++
pletzer/mint
/src/mntVecN.cpp
UTF-8
18,129
3.078125
3
[ "0BSD" ]
permissive
#include "mntVecN.h" #include <cmath> template<std::size_t N, class T> VecN<N, T>::VecN() { } template<std::size_t N, class T> VecN<N, T>::VecN(T e) { for (std::size_t i = 0; i < this->size(); ++i) { (*this)[i] = e; } } template<std::size_t N, class T> VecN<N, T>::VecN(const T* ptr) { ...
true
cbe009f7c26f535f5925ab18c4a32cf343e766e3
C++
YamagutiHikato/Car_games
/game/source/Camera.h
SHIFT_JIS
1,399
2.703125
3
[]
no_license
#pragma once #include <memory> class Car_A; class Car_A_E; /* TODO: J̐ݒ肪s\ */ class Camera { private: //class std::shared_ptr<iexView>view; //iexView Camera() = default; //constructor ~Camera() = default; //destructor //Vector3 Vector3 pos; //position // Vector3 angle; //cameraAngle ...
true
b39dd6f5c87257526139a2b927938d6c8860136c
C++
lilelr/LeecodeProblemsSolutionsByC-
/binary-tree/construct_binary_tree_from_preorder_and_postorder_traversal_889.cpp
UTF-8
2,117
3.28125
3
[]
no_license
#include <string> #include <iostream> #include <vector> #include <cstdio> #include <unordered_map> #include <unordered_set> #include <set> #include <map> #include <cstdlib> #include <algorithm> #include <queue> // accumulate example #include <functional> // std::minus #include <numeric> // std::accumulate using...
true
f6706e00de9624af4f6e6f30bcf807aa96f7242b
C++
celceta/arduino
/ATTiny85/test1/test1.ino
UTF-8
278
2.515625
3
[ "MIT" ]
permissive
void setup() { // put your setup code here, to run once: pinMode(1, OUTPUT); } void loop() { // put your main code here, to run repeatedly: int current; current = analogRead(1); digitalWrite(1, HIGH); delay(current); digitalWrite(1, LOW); delay(current ); }
true
3b6f1e708f8486a242b3d9e7ae9312feba773f08
C++
akhileshJ7/Computer-Graphics
/MyDrawing/Triangle.h
UTF-8
805
2.671875
3
[]
no_license
#ifndef __TRIANGLE_H_ #define __TRIANGLE_H_ #include "Shape.h" #include <string> #include <sstream> #include <iostream> #include <fstream> #include "ViewContext.h" class ViewContext; class Triangle : public Shape { protected: Shape& operator=(const Shape& shape); public: Triangle(); Triangle(const Triangle& from...
true
35d58f428efc48a9c33b8d229d0529d6fe6e5da5
C++
sxyugao/Codes
/Luogu/P5524/P5524.cpp
UTF-8
2,154
2.59375
3
[]
no_license
#include <cmath> #include <cstdio> #include <iostream> using namespace std; char buf[1 << 14], *p1 = buf, *p2 = buf; inline char gc() { return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 14, stdin), p1 == p2) ? EOF : *p1++; } inline int read() { int x = 0, f = 1; char c = gc(); while (!isdigit(c)) c = gc(...
true
3667b9a19f336004d2092986cc26fccd2510b929
C++
seranu/TS2RAW
/src/utils.cpp
UTF-8
1,447
3.078125
3
[]
no_license
#include "utils.h" #include <cassert> #include <cstdint> namespace ts2raw { namespace utils { uint8_t ReadUInt8(const unsigned char* aFrom) { assert(aFrom != nullptr); return static_cast<uint8_t>(aFrom[0]); } // read an unsigned 16bit integer from a BigEndian format uint16_t ReadUInt16BE(const unsigned char* aF...
true
da49f1ff055b9f588e8f8356a01d1b06058257dd
C++
Deawood/Binary-Search-Tree
/BST.cpp
UTF-8
2,728
2.703125
3
[]
no_license
#include <vector> #include <string> #include <iostream> #include <stdio.h> #include <sstream> #include <utility> #include <cstring> #include <algorithm> using namespace std; typedef long long ull; class BST { private: pair<string, ull> FandW; vector<pair<string, ull> > wAndf; vector<vector<ull> > tableRtCt; v...
true
baead4fe8f3acb9709ba273f6c0d96d7bc6f48bc
C++
mycode-hub/LeetCode
/Reduce Array Size to The Half.cpp
UTF-8
522
2.75
3
[]
no_license
class Solution { public: int minSetSize(vector<int>& arr) { map<int , int> m; for(auto x: arr) m[x]++; int ans = 0, sum = 0 ; vector<int> v; for(auto [_, x ] : m ) v.push_back(x); sort(v.begin(),v.end(), greater<int> ()); for(auto x: v)...
true
91e3dda9b6e9874759051a27b5209e409a9c681e
C++
dmkrch/StolyarovPractice
/CPPpractice/CopyConstructor/copyConstructor.cpp
UTF-8
1,524
3.96875
4
[]
no_license
#include <math.h> #include <stdio.h> #include <string.h> class Human { private: char* name; int age; public: /* default constructor */ Human() { name = new char[20]; } /* copy constructor */ Human(const Human& hm) { name = new char[20]; ...
true
5c39b5736ea2f18f396fee2cc6fdf264b4b3e045
C++
ramazansakin/Uni_2_Workspace
/C++/Hmwrks/111044069HW07/111044069HW07.cpp
UTF-8
6,101
3.390625
3
[]
no_license
/* * File: 111044069HW07.cpp -- main.cpp * Author: Ramazan SAKIN -- 111044069 */ #include<iostream> #include "List.cpp" #include "List.h" #include "UniqueList.cpp" //for template class #include "SortedList.cpp" using namespace std; using namespace sakinSpace; int main( ){ // Exception-handling ... tr...
true
8691c08dcd5c91766d4810a87cdeab43075681d3
C++
Justme0/leetcode
/2195-append-k-integers-with-minimal-sum.cpp
UTF-8
1,547
2.8125
3
[]
no_license
#include <iostream> #include <vector> #include <set> #include <cassert> class Solution { public: long long minimalKSum(std::vector<int>& nums, int k) { std::set<int> s(nums.begin(), nums.end()); s.insert(0); assert(s.size() >= 2); int64_t ret = 0; ...
true
4daa05189d1e1fa10337e9f742ba7505a53d79ac
C++
CoreTrackProject/ZittelmenEngine
/Source/Vulkan/VulkanDebug.cpp
UTF-8
1,794
2.71875
3
[ "Apache-2.0" ]
permissive
#include "VulkanDebug.h" VulkanDebug::VulkanDebug(VulkanDebugCreateInfo createInfo) : createInfo(createInfo) { this->init_vulkanDebug(); } VulkanDebug::~VulkanDebug() { this->destroy_vulkanDebug(); } void VulkanDebug::AddInstanceDebugExtensionCollection(std::vector<const char*> *extensionCollection) { if (extens...
true
04018699eb86e9e56b0733c6a158be6d271bbcaf
C++
Pammenjk36/graphics_test
/camera.h
UTF-8
718
2.921875
3
[]
no_license
/* * File: camera.h * Author: jad * * Created on April 7, 2013, 12:31 AM */ #ifndef CAMERA_H #define CAMERA_H class camera { private: float l_posX; float l_posY; float l_posZ; float l_locX; float l_locY; float l_locZ; float l_oriX; float l_oriY; float l_oriZ; vector <f...
true
b2d72983b66617c61c5cb16576fad0eb43884032
C++
edmondzxz/discreteMathematic
/d_discreteProbability/retalivelyPrime.cpp
UTF-8
1,405
3.625
4
[]
no_license
#include<cstdlib> #include<iostream> #include<random> using namespace std; /* Estimate the probability that two integers selected at random are relatively prime by testing a large number of randomly selected pairs of integers */ // assume a>=1,b>=1 int gcd(int a,int b){ int mid=0; whi...
true
2622bcb363feae2e7abd94e6c06d3ad2bf6e181d
C++
flameshimmer/leet2019.io
/Leet2019/NaryTreePostorderTraversal.cpp
UTF-8
1,329
3.640625
4
[]
no_license
#include "stdafx.h" //Given an n - ary tree, return the postorder traversal of its nodes' values. //For example, given a 3 - ary tree : //Return its postorder traversal as : [5, 6, 3, 2, 4, 1] . // //Note : //Recursive solution is trivial, could you do it iteratively ? namespace Solution2019 { namespace NaryTreePosto...
true
7f24146e2dc2a4fe6a340e306625e1850687a88a
C++
wataugasudo/3DScanner
/code/firmware/v2/Routines.cpp
UTF-8
2,802
2.828125
3
[ "MIT" ]
permissive
#include "Arduino.h" #include "Routines.h" #include "src/AccelStepper/src/AccelStepper.h" #include "Ultrasonic.h" #include "Configuration.h" // Inits all universal values & pinModes Routines::Routines() : sensorH(H_TRIG, H_ECHO, H_MAX_PING, CAL_MAP_H), // Construct HC-SR04 Sensors sensorV(V_TRIG, V_ECHO, V_MAX_PING, C...
true
705e52ea7c4e5a9513d32533a79504e77320a35c
C++
chromium/chromium
/components/performance_manager/execution_context_priority/root_vote_observer.h
UTF-8
1,852
2.515625
3
[ "BSD-3-Clause" ]
permissive
// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_ROOT_VOTE_OBSERVER_H_ #define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_ROOT_VOTE_OBSERVER_H_ ...
true
4ee5acac882d8f21a81d3fb664affd3048c2f28f
C++
sunny-jang/c-data-structure
/stack.cpp
UHC
2,191
3.453125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> //<stack> // // // /// struct Stack { int* stack; int top; }; void InitStack(Stack* st, int cap) { st->stack = (int*)malloc(sizeof(int) * cap); st->top = 0; } void UninitStack(Stack* st) { free(st -> stack); st->top = 0; } void Push(Stack* st, int data) { st->...
true
acdb43416a9fc5e97914ab12ce55505918386170
C++
Lemiort/NEE
/include/math_3d.h
UTF-8
4,685
3
3
[]
no_license
#ifndef MATH_3D_H_INCLUDED #define MATH_3D_H_INCLUDED #define _USE_MATH_DEFINES // for C++ #include <cmath> #include <cstdio> #include <iostream> #ifndef M_PI #define M_PI (3.14159265358979323846) #endif // M_PI #define ToRadian(x) ((x)*M_PI / 180.0f) #define ToDegree(x) ((x)*180.0f / M_PI) float RandomFloat(); c...
true
0b6f280b751b9cdbd00fc5554eb560cc3750e8e1
C++
Zu-rin/AOJ-Courses
/ITP2/Topic_10/10_A.cpp
UTF-8
820
2.875
3
[]
no_license
#include <iostream> #include <vector> #include <string> #include <algorithm> #define rep(i, n) for(i = 0; i < (n); i++) #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) #define MOD 1000000007 #define PI 3.14159265358979323846 #define INF 1 << 30 using namespace std; typedef long long ll; typedef pai...
true
5b9ef4900ddfecdf05b10be6887ee9df270639d6
C++
timerz98/ArduinoFPSDoorLockSMSOTP
/FPS_DoorLock_SMS_OTP/FPS_DoorLock_SMS_OTP/Button.cpp
UTF-8
387
3
3
[]
no_license
// // // #include "Button.h" Button::Button(uint8_t pin) { debouncer = new Bounce(); pinMode(pin, INPUT_PULLUP); debouncer->attach(pin); debouncer->interval(5); // interval in ms } Button::~Button() { if (debouncer) delete debouncer; } void Button::Update() { debouncer->update(); } bool Button::Read(...
true
506671885ef200a2b317e2857855b952ebcd9906
C++
kongbawa/UE4_Plugin_FSMNameDrived
/FSMNameDrived/Source/FSMAsset/Private/FSM.cpp
UTF-8
5,349
2.734375
3
[]
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "FSM.h" FName FTransRule::MeetCondition(const FName& RuleName) const { if (!IsValidRule(RuleName)) { return NAME_None; } return Keyword_mapping_TargetState[RuleName]; } bool FTransRule::IsValidRule(const FName & RuleName) co...
true
9dd926742bc7d11d85223444837912152bec71c0
C++
kenthe3rd/bin-packing-OSU
/inputGenerator.cpp
UTF-8
516
2.671875
3
[]
no_license
#include <fstream> #include <stdlib.h> #include <time.h> using namespace std; int main(){ srand(time(NULL)); ofstream oFile; oFile.open("random.txt"); oFile << 10 << "\n"; for(int i=0; i<10; ++i){ int binCap = rand() % 30 + 10; int numItems = rand() % 100 + 20; oFile << bi...
true
89af055ad479d137cb2f232c166f34051fe1dcda
C++
lee-gyu/happy_algorithm
/20_07_July/0729_42890_후보키/Solution.cpp
UTF-8
1,477
2.9375
3
[]
no_license
#include <cassert> #include <string> #include <vector> #include <unordered_set> using namespace std; hash<string> hashing; bool is_unique(vector<vector<string>>& relation, int columns) { unordered_set<int> set; for (vector<string>& record : relation) { int tmp = 0; for (size_t i = 0; i...
true
e866b269ea8df9c4e98f17b3a3a072d6a94e8936
C++
Dayof/concurrent-programming
/locks/file_descriptor.cpp
UTF-8
1,808
3.1875
3
[ "MIT" ]
permissive
// Aluna > Dayanne Fernandes da Cunha // Matrícula > 130107191 #include <pthread.h> #include <iostream> #include <cstdlib> #include <unistd.h> pthread_mutex_t lock_writter_file = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t lock_reader_file = PTHREAD_MUTEX_INITIALIZER; #define W_N 3 #define R_N 3 pthread_t all[W_N + ...
true
701e9531f5c4e0c072909193f4b424c99d3f0b0f
C++
hjw21century/Algorithm
/LeetCode/FindTheHighestAtitude/main.cxx
UTF-8
517
2.546875
3
[]
no_license
#include <bits/stdc++.h> #include <gtest/gtest.h> using namespace std; class Solution { public: int largestAltitude(vector<int>& gain) { int high = 0,now = 0; for (int g : gain){ now +=g; high = max(high,now); } return high; } }; struct T{ }; TEST(...
true
4b948a5ae31b8503112f000ae9a68af92ba4ccf0
C++
whiteJadeSoup/MsgSvr
/src/User.hpp
UTF-8
1,174
3.0625
3
[]
no_license
#ifndef USER_HPP_INCLUDED #define USER_HPP_INCLUDED #include <string> #include "Connection.hpp" using namespace std; class ImUser { public: ImUser(); inline const string& get_name () const { return m_strName; } inline void set_name (string name_) { m_strName = name_; } inline void set_id (int6...
true
6829eb773c7adacedda3a161e0cb93cb7ed62767
C++
kinjal2110/cplusplusTutorial
/3_1.CPP
UTF-8
336
3.28125
3
[]
no_license
#include<iostream.h> #include<conio.h> void main() { int a,b; clrscr(); void exchange(int &,int &); cout<<"Enter any two values:"; cin>>a>>b; cout<<"\nBefore interchange a:"<<a<<"b:"<<b; exchange(a,b); cout<<"\nAfter interchange: a:"<<b<<"b:"<<b; getch(); } void exchange(int &x.int &y) { int temp; temp=x; ...
true
ec47191572f2eb0e94c3a313a75aa708b15506a2
C++
OyunaM/Homework-2
/HW030404.cpp
UTF-8
360
3.234375
3
[]
no_license
#include<iostream> using namespace std; int main(){ int year; cout<<"Input year : "; cin>>year; if(year%4 !=0){; cout<<year<<" is a common year"; }else if(year%100 !=0){ cout<<year<<" is a leap year"; }else if(year%400 !=0){ cout<<year<<" is a common year"; }else{ cout<<year<<" is ...
true
0e68c3ea3ea06bb485d2d486bf3703450a211b79
C++
kerchen/CodeKata_RPG_Combat
/src/position.hpp
UTF-8
241
2.703125
3
[]
no_license
#ifndef POSITION_GUARD_HPP #define POSITION_GUARD_HPP #include <cmath> struct Position { double value { 0.0 }; double getDistance(Position const & other) const { return abs(other.value - value); } }; #endif // POSITION_GUARD_HPP
true
6e18a0ac75f666dbaadc193ad4b44c95f56c72fb
C++
ziyezhou-Jerry/Project1-CUDA-Introduction
/Project1-Part2/src/main.cpp
UTF-8
5,732
2.515625
3
[]
no_license
/** * @file main.cpp * @brief Example N-body simulation for CIS 565 * @authors Liam Boone, Kai Ninomiya * @date 2013-2015 * @copyright University of Pennsylvania */ #include "main.hpp" // ================ // Configuration // ================ #define VISUALIZE 1 #define checkCUDAErrorWithLine2...
true
0ce8c94ee4ecfa0e0e732f70dc8834daf7a896af
C++
maxortner01/SGAL
/include/SGAL/Graphics/GL/BufferObject.h
UTF-8
1,209
2.765625
3
[]
no_license
/** * @file BufferObject.h * @author Max Ortner * @date 4-12-2020 * * Description... * * @copyright Copyright (c) 2020 **/ #pragma once #include <SGAL/decl.h> #include "Object.h" namespace sgal { namespace GL { enum BufferDataType { Float, Int }; /** * @brief High-level abstraction of OpenGL...
true
535e54a21d11c6e58c50cb52a4564c5cbfed432e
C++
rmxhaha/phantasia
/zero/WalkMap/1.2/RWMAP.cpp
UTF-8
2,204
2.78125
3
[]
no_license
#include <iostream> #include <fstream> #include <vector> #include <cassert> #include "Array2D.cpp" #include "RString.cpp" using namespace std; struct tile_t { int gak_kopong; } ttt; tile_t * get_tile( const string& n){ return &ttt; } int main(); class WanderMap { public: void init(){ map_width = 0; ...
true