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
9ff5a4d2654faeac5539abe7a2ff68adaba87205
C++
doanhtdpl/game-cashtle-vania
/GameCashtleVania/GameCashtleVania/ObjectFactory.cpp
UTF-8
633
2.765625
3
[]
no_license
#include "ObjectFactoty.h" using namespace std; ObjectGame* ObjectFactory::createObj(int ID) { return NULL; } ObjectGame* ObjectFactory::createObj() { return NULL; } ObjectGame* ObjectFactory::createObj(std::vector<std::string> arr) { return NULL; } void ObjectFactory::addInfo(vector<string> ar...
true
ac7224b0f1cfc327f832ad69a7150fcbcea964ea
C++
shurik111333/spbu
/olympic/CodeJam/29.05.16_disturbed_round1/untitled/main.cpp
UTF-8
225
2.625
3
[]
no_license
#include <iostream> using namespace std; int main() { int size = (1 << 27); int ans = 0; while (size > 1) { ans += size / 100 + 1; size >>= 1; } cout << ans << endl; return 0; }
true
55c1c7cf5ba8baadb80ecd433321be0eead40658
C++
Abhinav1997/TC-Programs
/Arrays/triangles.cpp
UTF-8
1,233
3.21875
3
[]
no_license
#include<iostream.h> #include<conio.h> static void triangles(char ar[][100], int); void main() { clrscr(); int m; char ar[100][100]; cout<<"--------------------------------TRIANGLES------------------------------\n\n\n"; cout<<"Enter the number of rows/columns you want in your 2D array - "; cin>>m; cout<<...
true
bbef5cdab7a4b447fd0e342382d168d18a4c26bf
C++
trashcrash/TimeManager
/GUI/mainwindow.cpp
UTF-8
1,489
2.640625
3
[]
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include <chrono> #include <iostream> #include <QFile> #include <QTextStream> #include <QDateTime> using namespace std; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); this->setWindowTitle("Tim...
true
a2e23fdecd33d17a66e579f305386c5b856a96a4
C++
DancingOnAir/LeetCode
/Leetcode/Array/1337_TheKWeakestRowsinaMatrix.cpp
UTF-8
1,503
3.34375
3
[]
no_license
#include <iostream> #include <vector> #include <numeric> using namespace std; class Solution { public: vector<int> kWeakestRows(vector<vector<int>>& mat, int k) { int n = mat.size(); vector<pair<int, int>> v; for (int i = 0; i < n; ++i) { v.emplace_back(make_pair(i, accumulate(m...
true
66e394c6ec3a2b28a412a19862b790b300e46a44
C++
Vilanya/SIT315
/Module1/SIT315_M1T3.cpp
UTF-8
957
2.859375
3
[]
no_license
int LED = 13; int PIR = 2; int PIR2 = 3; void setup() { Serial.begin(9600); pinMode(LED, OUTPUT); pinMode(PIR, INPUT); pinMode(PIR2, INPUT); digitalWrite(LED, LOW); Serial.println("Ready"); Serial.println("LED off"); attachInterrupt(digitalPinToInterrupt(PIR), motion, CHANGE); attachInterrupt(digit...
true
c651809ba3ebe117c8ae10d66c5355964d77d7c7
C++
Xaeoz/TDA362
/project/Water.cpp
UTF-8
4,972
2.53125
3
[]
no_license
#include <vector> #include <stb_image.h> #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> #include <iostream> #include "Water.h" using namespace glm; using std::string; using std::vector; Water::Water() : m_texid_dudv(UINT32_MAX) , m_texid_normalMap(UINT32_MAX) , m_vao(UINT32_MAX) , m_positionBuffer(U...
true
f0a2bf883a036250625f1c2b2cd1efc53acce9b9
C++
scudrt/gobang
/gameContainer.cpp
UTF-8
4,831
2.734375
3
[]
no_license
#include <graphics.h> #include "gameContainer.h" Position::Position(int nowx,int nowy) { x=nowx; y=nowy; } Position::Position() { x=y=0; } PlayerController::PlayerController(bool _isAIPlayer_,bool _isBlackChess_) { _isAIPlayer = _isAIPlayer_; _isBlackChess = _isBlackChess_; } bool PlayerController::isAIPlayer(...
true
e988f7095e73888a750eca77c46f8cad6111ff8b
C++
shorn1/OI-ICPC-Problems
/luogu/3366_prim.cpp
UTF-8
1,598
2.578125
3
[ "MIT" ]
permissive
#include<cmath> #include<cctype> #include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> #include<algorithm> #define ns namespace #define lol long long using ns std; const int M = 233333; struct Edge { int tow,nxt,dat; }; Edge e[2 * M]; int n, m, s, a, b, c, sume = 0, vis[2 * M],hea[2 * M],dis[2 *...
true
8ce3cc834c49ae8fd9d0d435f03bc67cd9b25a69
C++
ElitCoder/EITN50
/project2/src/Cryptography.cpp
UTF-8
2,585
3.171875
3
[]
no_license
#include "Cryptography.h" #include <iostream> #include "crypto++/aes.h" #include "crypto++/filters.h" #include "crypto++/hmac.h" #include "crypto++/sha.h" using namespace std; byte *Cryptography::m_iv = new byte[CryptoPP::AES::BLOCKSIZE]; byte *Cryptography::m_key = new byte[CryptoPP::AES::DEFAULT_KEYLENGTH]; stri...
true
b28d974e301c4e82f56118646fb3dbc4345b2c90
C++
himichael/LeetCode
/src/301_400/0376_wiggle-subsequence/wiggle-subsequence.cpp
UTF-8
505
2.859375
3
[ "Apache-2.0" ]
permissive
class Solution { public: int wiggleMaxLength(vector<int>& nums) { int n = nums.size(); if(n < 2) { return n; } int pre_diff = nums[1] - nums[0]; int res = pre_diff != 0 ? 2 : 1; for(int i = 2; i < n; ++i) { int diff = nums[i] - nums[i - 1]; ...
true
5b66fae5a880398bc1c8606bac2e860f2a8f08e2
C++
ha6017/MIPS_SIMULATOR
/src/memory.cpp
UTF-8
11,665
3.046875
3
[]
no_license
#include "memory.hpp" #include <iostream> #include <fstream> memory::memory(std::string name_bin) { ADDR_DATA.resize(0x4000000); //ADDR_INSTR.resize(0x1000000); std::fill(ADDR_DATA.begin(), ADDR_DATA.end() , 0); //std::cout<< "data zeroed\n"; //std::fill(ADDR_INSTR.begin(), ADDR_INSTR.end() , 0); //std:...
true
2bf564e52de37b3295e4555bb08b7b60a1e0b4ff
C++
Sayak9495/_100daysofcoding_
/_100daysofcoding_/CCI/2. Linked List/linked_list_2.6.cpp
UTF-8
1,381
4
4
[ "MIT" ]
permissive
// check if a linked list is a palindrome #include<iostream> #include<string> using namespace std; struct node{ int data; node *next; }; node* create_list(){ int x; cin>>x; node* list; list = NULL; while (x--){ node* temp = new node(); cin>>(*temp).data; if (list==NULL){ list=temp; } else{ ...
true
9b59685301c37974a586e382a3c46b7482d8c999
C++
JamieAgate/Hangman
/Hangman 2/Main.cpp
UTF-8
13,829
3.65625
4
[]
no_license
#include <iostream> #include <iomanip> #include <random> #include <chrono> #include <Windows.h> //List of all game functions. int mainmenu(); void boards(int i); void instructions(); char* difficulty(char* currentWord); bool Replay(bool replay); int drawTheGame(int length, bool guessedCorrectly[], char* currentWord, c...
true
d6e66d2c5566fc8bce95d4e76282ddf2a1727ae0
C++
CodeDiary18/CodeUp
/1001-1100/1093.cpp
UTF-8
270
2.6875
3
[]
no_license
#include<iostream> int main(){ int n; std::cin>>n; int arr[24]={0,}; int temp; for(int i=0;i<n;i++){ std::cin>>temp; arr[temp]=arr[temp]+1; } for(int i=1;i<=23;i++){ std::cout<<arr[i]<<" "; } return 0; }
true
2b149228e7d4fe0f68c810e0ca8567d333e7fd1f
C++
JRTitor/CppDevelopment
/yellowBelt/week3_1/week3_1.cpp
UTF-8
281
3.03125
3
[]
no_license
#include "sum_reverse_sort.h" #include <algorithm> int Sum(int x, int y){ return x+y; } string Reverse(string s){ string out; for(size_t i = s.length() - 1; i >0 ; --i) { out += s[i]; } return out; } void Sort(vector<int>& nums){ sort(nums.begin(), nums.end()); }
true
9b7cd4adb55d67ea61cbb1270c8108d083d05a3e
C++
misule0423/BOJ
/10870.cpp
UTF-8
463
2.90625
3
[]
no_license
// // main.cpp // 10870 // // Created by 이민석 on 2016. 9. 1.. // Copyright © 2016년 Roop. All rights reserved. // #include <iostream> using namespace std; int fibonacchi(int n){ if(n==0) return 0; else if(n==1) return 1; else return fibonacchi(n-1) + fibonacchi(n-2); } int ...
true
a87fe99f1925dbf80f82ae6523c7d769ab4514b6
C++
NuChitsanupong/prob-solve
/pdf_week3/ic.cpp
UTF-8
1,739
2.5625
3
[]
no_license
<<<<<<< HEAD #include <iostream> #include <stdio.h> #include <list> using namespace std; list<int> ll; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { string c; int num; cin >> c; if (c == "li") { cin >> num; ll.push_front(num...
true
30fc3b7efef6bf39b6378ab40536402a4a70aab8
C++
HubStew/algorithmProblem
/1152_단어의 개수.cpp
UTF-8
530
3.0625
3
[]
no_license
#include<iostream> #include<string> using namespace std; string str[1000000] = {"", }; int main() { string input; getline(cin, input); //for (int i = 0; i < 1000000; i++) // str[i] = ""; int count = 0; for (int i = 0; i < input.length(); i++) { if (input[i] == ' ') { count++; continue; } ...
true
9ee069b045516586ac9153678dd82a07ec6bbc8e
C++
LArSoft/lardata
/lardata/RecoObjects/Surface.h
UTF-8
4,032
3.015625
3
[]
no_license
//////////////////////////////////////////////////////////////////////// /// /// \file Surface.h /// /// \brief Base class for Kalman filter surface. /// /// \author H. Greenlee /// /// Surfaces may have the following distinct uses in the context /// of the Kalman filter. /// /// 1. Destination for track propagatio...
true
0316aa65b24279c4154b6ddbff796e7e5740959c
C++
zacharyvincze/chip8
/src/display.cpp
UTF-8
1,798
3.109375
3
[]
no_license
#include "display.h" #include "easylogging++.h" Display::Display() { clear(); LOG(INFO) << "Initialized Chip8 64x32 display"; }; Display::~Display() { SDL_DestroyRenderer(_renderer); SDL_DestroyWindow(_window); } void Display::clear() { for (int y = 0; y < 32; y++) { for (int x = 0; x < ...
true
b90d02309a910f677835f9e89caee9a67b93fe96
C++
bakinboy1/BigDump
/c++/Project1/Project1/Source.cpp
UTF-8
1,740
2.984375
3
[]
no_license
#include "windows.h" #include <iostream> #include <string> #include <vector> using namespace std; int main() { cout << "Hello World! "; return 0; }; class bunny { private: int bunnyID; bool gender; int age; string name; string color; boolean mutant; public: void setID(int ID); int getID(void); void setGe...
true
2fc2c963e16a7c1345e7fa10c73cd8880cc1cf8c
C++
ParkDaeYi/Algorithm_Study
/10448.cpp
UTF-8
582
2.875
3
[]
no_license
#include <iostream> using namespace std; int dp[45], n, num; bool backt(int, int); int main() { ios_base::sync_with_stdio(0); cin.tie(0); for (int i = 1; i < 45; ++i) dp[i] = dp[i - 1] + i; cin >> n; for (int i = 0; i < n; ++i) { cin >> num; if (backt(0, 0)) cout << 1 << '\n'; else cout << 0 << '\n'; } ...
true
6eae02b66f88550dbf63fdc6069edac58b75542f
C++
xlyoshi/Arduino
/2 - Efeitos com LEDs/Projeto 10 - Mood lamp com controle serial/Projeto_10_-_Mood_Lamp_com_controle_Serial/Projeto_10_-_Mood_Lamp_com_controle_Serial.ino
UTF-8
2,475
3.515625
4
[]
no_license
//Projeto 10 - Mood Lamp com controle Serial char buffer[18];//Armazena os parametros dos leds int red,green,blue;//parametros PWM dos leds int redPin=9,greenPin=10,bluePin=11;//portas dos LEds void setup() { Serial.begin(9600);//Inicia a comunicação serial while(Serial.available())//Limpa o serial Serial.rea...
true
3bfc10597d5d5976b527f494312842c610112e0e
C++
tom3097/EiTI-Projects
/PROI/SymulacjaFirmyKurierskiej/Baza.cpp
WINDOWS-1250
9,856
2.703125
3
[]
no_license
//Projekt 3: Symulacja Firmy Kurierskiej //Przygotowal: Tomasz Bochenski //Prowadzacy: Piotr Witoski #include "Baza.h" extern std::vector<tymczasowa_przestrzen> vector_przestrzeni; extern std::vector<std::string> dozwolone_lokalizacje; extern std::ofstream plik_wynikowy; //konstruktor domyslny Baza::Baza(void) { } ...
true
5e5b5ea52df704c81e2108b8c34d0608f22594a8
C++
CCLPRO/ArduinoFoundations
/DigitalReadSerial1.ino
UTF-8
497
3.375
3
[]
no_license
/* DigitalReadSerial Reads a digital input on pin 2, prints the result to the serial monitor This example code is in the public domain. */ int buttonState = 0; void setup() { pinMode(2, INPUT); Serial.begin(9600); } void loop() { // read the input pin buttonState = digitalRead...
true
432bd6fb7fbfcb80a9ee1504a04d301605686e55
C++
ademjemaa/C-
/C04/ex02/AssaultTerminator.cpp
UTF-8
1,747
2.765625
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* AssaultTerminator.cpp :+: :+: :+: ...
true
a556a701a5469110a1657ac5de90e5dee498710a
C++
imshyam/algos
/CLRS/dll.cpp
UTF-8
687
3.71875
4
[ "MIT" ]
permissive
#include<iostream> using namespace std; struct node { int val; node* next; node* prev; }; node* head = NULL; void insert_node(int n) { node* new_node = new node(); new_node->val = n; new_node->next = NULL; new_node->prev = NULL; if(head == NULL){ head = new_node; } else{ node* current = head; while(cu...
true
5db914d704f2a2d10cabd9745f7a5bd427fbb28e
C++
Arniox/Game-Programming-Work
/COMP710-2019-S2/students/nikkolas.diehl/Unit 1 - Exercises/Simple Dice Game - Ex1/MainEx1.cpp
UTF-8
3,577
3.203125
3
[]
no_license
#include <iostream> #include <ctime> #include <random> #include <string> #include "HeaderEx1.h" #define nl std::endl; #define cls system("CLS"); #define wait cin.ignore(); #define clr cin.clear(); using namespace std; //Create players struct struct Player { int diceRollOne; int diceRollTwo; }; Player players[2]; ...
true
2b5cfc4febd17e2fbd5f4e0e0ce069bd203c254f
C++
mikeb01/nonblock
/src/util.h
UTF-8
1,756
2.78125
3
[]
no_license
#include <time.h> #include <pthread.h> #include <stdint.h> #include "cpucounters.h" using std::cout; using std::endl; class Affinity { private: cpu_set_t old_affinity_; cpu_set_t new_affinity_; public: Affinity(uint32_t); ~Affinity(); }; Affinity::Affinity(uint32_t core_id) { #ifdef _LINUX_V...
true
8637cc317ffc59b410e3b1d85d8c52256b3d06ac
C++
Vuean/AlgorithmNote
/Chapter10/Chapter10/Sec5Exe1MinimumSpanningTree_Prim/main.cpp
GB18030
1,299
2.96875
3
[]
no_license
#include <cstdio> #include <algorithm> using namespace std; const int MAXV = 1000; // 󶥵 const int INF = 100000000000; // INFΪһܴ int n, m, G[MAXV][MAXV]; // nΪMAXVΪ󶥵 int d[MAXV]; // 뼯S̾ bool vis[MAXV] = { false }; // // Ĭ0Ϊʼ㣬СıȨ֮ int prim() { fill(d, d + MAXV, INF); d[0] = 0; int ans = 0; for (in...
true
8ae109f354d57040eac8c72d2590d0aa4dd22ad0
C++
D000M/Games
/Dijkstra/Dijkstra.h
UTF-8
1,540
3.1875
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: Dijkstra.h * Author: default * * Created on February 20, 2019, 1:22 PM */ #ifndef DIJKSTRA_H #define DIJKSTRA_H #...
true
b4fcdc40216a2f547b0528cf318729afb1bccf43
C++
andy489/Object_Oriented_Programming_with_CPP
/HW.1.SE.17-18/Task2/BrowserHistory.cpp
UTF-8
5,665
3.609375
4
[]
no_license
#include "BrowserHistory.h" #include "String.h" #include <iomanip> String months[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; Month BrowserHistory::strToMonth(const String& s) { /* Convert a string to Month enum, assuming the ...
true
35ad4ca48aead9576c37990eefc8268b09a63660
C++
eunjineunjin/Programming-Study
/C/DataStructure_RoundQueue.cpp
UTF-8
1,162
3.875
4
[]
no_license
/* Round Queue with C language only for integer, based on array */ #include <stdio.h> #define MAXSIZE 10 typedef struct Queue{ int arr[MAXSIZE]; int front; //front부터 데이터 존재 int rear; //rear-1까지 데이터 존재 }Queue; void Init(Queue* q) { q->front = 0; q->rear = 0; } int isFull(Queue* q) { retu...
true
b1f9e742e41dcdf17066af8c8ba19b0c8bde242d
C++
stopiccot/googlecode
/different/fdom2/code/RenderTarget.cpp
UTF-8
7,252
2.765625
3
[]
no_license
#include "RenderTarget.h" #include "log.h" RenderTarget RenderTarget::screen; const RenderTarget RenderTarget::null; //========================================================================== // Default constructor to null everything //========================================================================...
true
4a90390eba4b13c6cf040fa2f1177f216da01906
C++
bbsekiya/ichiro
/meta/fff.cpp
UTF-8
547
3.578125
4
[]
no_license
#include <iostream> void fun(int& n) { std::cout << "--- fun(int& n) ---\n"; } void fun(int&& n) { std::cout << "--- fun(int&& n) ---\n"; } void fun(const int& n) { std::cout << "--- fun(const int& n) ---\n"; } template <typename T> void f(T&& t) { fun(std::forward<T>(t)); } int main() { ...
true
fe97b0596fa6acc2694b4e31a8210b316dfc6826
C++
Yaseungho/myCodes
/Baekjoon_Solving/Baekjoon_2178.cpp
UTF-8
1,049
2.8125
3
[]
no_license
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <string> using namespace std; int n, m; int dx[4] = { 1,0,-1,0 }; int dy[4] = { 0,1,0,-1 }; char graph[102][102]; bool visited[102][102] = { false }; int result = -1; void BFS() { queue<pair<int,int>> q; q.push({ 1, 1 }); visited[1...
true
05a496fa57ade056df23627f319a9d2886070955
C++
verra11/Competitive_Programming
/LeetCode/April_Challenge/LeetCode-Day11.cpp
UTF-8
801
3.296875
3
[]
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
true
ee0c3918a8e85504730a7cb1c9c3134687deade5
C++
saif86/Printing-an-unsigned-integer-in-bits
/Source.cpp
UTF-8
870
3.765625
4
[]
no_license
// Fig. 18.5: fig18_05.cpp // Printing an unsigned integer in bits. #include <iostream> using std::cout; using std::cin; using std::endl; #include <iomanip> using std::setw; void displayBits(unsigned); // prototype void main(){ unsigned inputValue; cout << "Enter an unsigned integer: "; cin >...
true
654ea2eed4042ecec541348158a9de60fb27faa9
C++
HolyBlackCat/modular-forms
/src/main/file_dialogs.h
UTF-8
1,392
2.546875
3
[ "Zlib" ]
permissive
#pragma once #include <string> #include <optional> #include <vector> #include <utility> #include "options.h" namespace FileDialogs { std::optional<std::string> Open(std::string title, const std::vector<std::pair<std::string, std::string>> &filters, std::string default_path = ""); std::optional<std::string> S...
true
6dcb082cec722315882eb8c47d5fc0d64a3f98ee
C++
natiiix/SeePlusPlus
/src/instrCALL.cpp
UTF-8
1,431
2.65625
3
[ "MIT" ]
permissive
#include "h/Processor.hpp" bool Processor::instrCALL(const std::string& strDest) { unsigned programCounterOld = m_programCounter; if (instrJMP(strDest)) { m_stack.push_back(programCounterOld); return true; } else return false; } bool Processor::instrRET() { if (m_stack...
true
2471225d7e8a095a022224808682855167f0730f
C++
dlee67/ArduinoWorkShop
/ProjectOneArduinoWorkshop/ProjectOneArduinoWorkshop.ino
UTF-8
1,144
3.28125
3
[]
no_license
//About the PWM /* lol * Am not entirely sure how this thing works.... */ int d = 5; void setup(){ pinMode(3, OUTPUT); } void loop(){ for(int a = 0; a < 256; a++){ analogWrite(3, a); delay(d); } for(int a = 255; a >= 0; a--){ analogWrite(3, a); delay(d); } delay(200); } /* void set...
true
828de76557d224a48cb7fe3b4b682f24d0e04955
C++
sub-res/cool-compiler
/src/compiler/StringContainer.cpp
UTF-8
349
2.625
3
[]
no_license
/* * File: StringContainer.cpp * Author: len * * Created on December 25, 2015, 9:11 PM */ #include "StringContainer.h" namespace Cool { std::unordered_set<std::string> StringContainer::strings; const std::string& StringContainer::get(std::string && forText) { return *strings.insert(std::...
true
b29e9e2abff5d490c099cc33c907bb673f036669
C++
liyinxin/Data-Structures-Algorithms
/5/listMap.cpp
UTF-8
5,357
3.828125
4
[]
no_license
#include "listMap.h" template<typename T> void listMap<T>::insert(int i,int index,const T &theElement){ bool rightFullFlag = 0,leftFullFlag = 0; int listSize = last[i] - front[i];//首先得到数组的大小 //判读索引是不是有效的 if(index < 0 || index > listSize)//你要插入的元素的索引不能小于0也不能超过当前数组的大小 throw illeagleParameter("the...
true
43b22dbc060b72258cb6a09d81b26223794cdee6
C++
MultivacX/leetcode2020
/algorithms/medium/1079. Letter Tile Possibilities.h
UTF-8
1,110
3.390625
3
[ "MIT" ]
permissive
// 1079. Letter Tile Possibilities // Runtime: 12 ms, faster than 62.07% of C++ online submissions for Letter Tile Possibilities. // Memory Usage: 6 MB, less than 100.00% of C++ online submissions for Letter Tile Possibilities. class Solution { public: int numTilePossibilities(string tiles) { sort(begin(t...
true
e17fe911c96d1c2d48ec262df05f30defb3cbccd
C++
kumina/awssyncer
/src/recursive_inotify_poller.cc
UTF-8
1,126
2.625
3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Copyright (c) 2016 Kumina, https://kumina.nl/ // // This file is distributed under a 2-clause BSD license. // See the LICENSE file for details. #include "recursive_inotify_poller.h" #include <dirent.h> #include <cstring> #include <experimental/optional> bool RecursiveInotifyPoller::AddWatch(const std::string& pa...
true
dbf29450eac3f4779c970419469b1f0f52de8e1d
C++
Elojah/Meuh2.0
/util/Rool/src/menus/MemberList.cpp
UTF-8
3,379
2.953125
3
[]
no_license
#include "MemberList.hpp" #include "MemberTemplate.hpp" #include "SortItems.hpp" #include <algorithm> #include <fstream> MemberList::MemberList(void) { } MemberList::MemberList(int h, int w, int y, int x) : Menu(h, w, y, x){ } MemberList::~MemberList(void) { } void MemberList::sortMenu(size_t length) { SortItems ...
true
ed8b0a7fb8f8fdb468014f86f94f1a041e436fdf
C++
CGTGPY3G1/AGP-Group-Project
/src/MeshRenderer.cpp
UTF-8
2,444
2.65625
3
[]
no_license
#include "MeshRenderer.h" #include "Material.h" #include "GameObject.h" #include "Transform.h" #include "Shader.h" #include "Mesh.h" namespace B00289996B00227422 { MeshRenderer::MeshRenderer(const std::weak_ptr<GameObject>& g) : Component(g), dirty(false){ } MeshRenderer::~MeshRenderer() { } void MeshRenderer::A...
true
af64b0073b10f260bb9543b8a76817681ca8db18
C++
davidzyc/oi
/codeforces/253813/j.cpp
UTF-8
1,468
2.734375
3
[]
no_license
#include<cstdio> #include<iostream> #include<cstring> using namespace std; int total_num = 0; char s[200]; int v[100]; bool f(int x, int y) { // cout << x << " " << y << endl; if(x > strlen(s)) { return false; } // cout << "Hi"; if(x == strlen(s)) { int flag = 1; for(in...
true
7c6438c0f88b9a35b61e361bdbb4557763073961
C++
corinrose/Intro-to-Programming-2013-
/Hwk10rosec/main.cpp
UTF-8
5,708
3.03125
3
[]
no_license
#include <iostream> #include <time.h> #include <vector> #include <iomanip> #define clearScreen cout<<string(25,'\n') using namespace std; string descriptions[] = { "Aces:", "Twos:", "Threes:", "Fours:", "Fives:", "Sixes:", "3 of a Kind:", "4 of a Kind:", "Full House:", "Sm. Straight:", "Lg. S...
true
d96b87758b1948c4fdb4ce3c00b304b5bdce8f9d
C++
codedim/nv12stream
/main.cpp
UTF-8
2,015
2.953125
3
[]
no_license
#include "main.h" #include "v4l2_dev.h" #include "v4l2_frame.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> int main(int argc,char* argv[]) { string dev_name = "/dev/video0"; // default dev name int fps; // parsing cli arguments if (argc == 4) dev_name = argv[3]; ...
true
0d8437352ee654f654be546b91390781cb62797b
C++
vibhamasti/battleship
/ship.cpp
UTF-8
683
3.1875
3
[]
no_license
// // ship.cpp // Battleship // #include "ship.h" #include <iostream> using namespace std; Ship::Ship() { len = 0; } int Ship::getLen() { return len; } Coord Ship::getPos() { return pos; } char Ship::getOri() { return ori; } // sets length of each ship void Ship::setLen(int l) { len = l; ...
true
5d81b675ebc67a04e86ef157d8a0b2d821f73dae
C++
fsp-ending/OJ
/gcd.cpp
UTF-8
489
2.9375
3
[]
no_license
/************************************************************************* > File Name: gcd.cpp > Author: > Mail: > Created Time: 2020年05月07日 星期四 20时27分38秒 ************************************************************************/ #include<iostream> #include<cstdio> using namespace std; int gcd(int a, int b) { ...
true
66d8a4195bd86988d566270c33414af3f421c234
C++
ut0s/atcoder
/AGC/AGC036/a.cpp
UTF-8
1,441
3.078125
3
[]
no_license
/** @file a.cpp @title A - Triangle @url https://atcoder.jp/contests/agc036/tasks/agc036_a **/ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define ALL(obj) (obj).begin(), (obj).end() #define REP(i, N) for (int i = 0; i < (N); ++i) vector<LL> div_list(int n) { vector<LL> ret; for (LL...
true
19b2fcc582469241b2f13665d14cfdb37674db23
C++
DMHACYJ/work1
/acm训练/7.23.随.cpp
GB18030
1,408
3.5625
4
[]
no_license
/* Ŀ XXŵXX֮䣬ߵǼ Ŀԣ봦ļ ÿԵĵһУ N M ( 0<N<=200<M<10 )ֱѧĿѯʴ ѧIDŷֱ1ൽN ڶаNNѧijʼɼеiIDΪiѧijɼ ʣMÿ֣ѯIDAB(AB)ѧУɼߵǶ ÿһѯʲһ߳ɼ*/ #include<iostream> using namespace std; struct tree { int l; int r; int grade; }stu[200]; int num[200]; void build(int k,int l,int r) { stu[k].l=l; stu[k].r=r; if(l==r) ...
true
22776695c1867a8fcdb9c3708fbd6e351a3c213f
C++
dengbohhxx/vscode
/leetcode/找不同.cpp
UTF-8
456
3.078125
3
[]
no_license
class Solution { public: char findTheDifference(string s, string t) { int n=s.size(); unordered_map<char,int> hash; for(int i=0;i<n;i++) { hash[s[i]]++; } int m=t.size(); char c; for(int i=0;i<m;i++) { hash[t[i]]--; ...
true
43ff06ea35f31404c3f1c827ecf80202a64f64c1
C++
mrFlatiron/project1
/Project1/src/error_prone.h
UTF-8
573
2.75
3
[]
no_license
#pragma once #include <string> #include <cstdio> enum base_error_code { FATAL = -1, FILE_NOT_FOUND = -2, READING_ERROR = -3 }; class error_prone { protected: int m_error_code; std::string m_error_msg; public: error_prone (); virtual ~error_prone (); std::string error_msg () const; void error_log_to...
true
2fcf69eec859bc2e63c3b0f124bb289bf75043c5
C++
Nuurek/Augmented-Reality
/Augmented Reality/RegionBasedOperator.h
UTF-8
683
2.90625
3
[]
no_license
#pragma once #include "Buffer.h" class RegionBasedOperator { protected: const size_t BORDER_SIZE; const size_t REGION_SIZE; const size_t STEP_SIZE; Buffer* buffer; inline bool isPointOutsideBorder(float x, float y) const { return ( x < BORDER_SIZE || x > buffer->getWidth() - BORDER_SIZE || y < BORDER...
true
e8fed51d11d17cdc0f6ad9a5f93653a63b74a241
C++
AndersonS001/Estrutura-de-Dados
/Agenda/ldde.h
UTF-8
2,244
2.921875
3
[]
no_license
#ifndef LDDE_H #define LDDE_H #include "compromisso.h" #include "no.h" #include <fstream> class Iterador; class LDDE{ private: No* primeiro; No* ultimo; void atualizaLista(); int n; public: LDDE(); ~LDDE(); /*Os argumentos "flag" são apenas para identificar onde serão usad...
true
a0d03d3f23c9988c424bce2412e215a10162d18e
C++
programmerPhysicist/tomato
/src/display.h
UTF-8
734
2.6875
3
[]
no_license
/*********************************************************************** * display.h: * display class * Author: * Alexander Marvin * Summary: * Displays the timer and messages for pomodoro class ************************************************************************/ #ifndef TOMATO_DISPLAY_H #define TO...
true
e5d7a1bc026cc9dd7cb0041290cc82c2c7327d1e
C++
sunalii/MyNotebook-Desktop-Application
/notesdoodle.cpp
UTF-8
6,622
2.640625
3
[ "MIT" ]
permissive
#include "notesdoodle.h" #include "ui_notesdoodle.h" #include <QPainter> #include <QMouseEvent> #include <QFileDialog> #include <QPrinter> #include <QPrintDialog> #include <QMessageBox> #include <QCloseEvent> #include <QDesktopServices> #include <QUrl> //// NotesDoodle Constructor //// NotesDoodle::Note...
true
e6113d7a6dadf69c816fdac2465b182745c289d1
C++
OlmoPrieto/bingo
/Project/common/include/card.h
UTF-8
770
3.046875
3
[]
no_license
#ifndef __CARD_H__ #define __CARD_H__ #include <random> #include <SFML/Graphics/RectangleShape.hpp> #include <SFML/Graphics/Text.hpp> #include <SFML/Graphics/RenderWindow.hpp> constexpr uint8_t NUMBERS_AMOUNT_IN_CARD = 15; class Card { public: Card(); Card(const sf::Vector2f& size, const sf::Vector2f& position); ...
true
f63170fe4ccbe4c011495124267bf842b15d8458
C++
jasjeetIM/OlympicMedalistSearch
/src/BinaryTree.cpp
UTF-8
5,175
3.203125
3
[]
no_license
#include "stdafx.h" #include "BinaryTree.h"; template<class AthleteType> BinaryNode<AthleteType>* BinaryTree<AthleteType>::_copyTree(const BinaryNode<AthleteType>* nodePtr, vector <AthleteType> &arr, AthleteType visit(AthleteType)) { BinaryNode<AthleteType>* newNodePtr = 0; if (nodePtr != 0) { AthleteType tempCo...
true
bdb64985c1059188b7e70ba9c4935df6aacdc92d
C++
lehuuvinh92/arduino-examples
/dht-arduino/dht-lcd.ino
UTF-8
910
2.9375
3
[]
no_license
#include "DHT.h"//Khai báo thư viện DHT #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int dht_pin = 7;//Khai báo chân kết nối DHT với Arduino int DHTTYPE = DHT11;//Khai báo loại cảm biến DHT DHT dht(dht_pin, DHTTYPE);//Khai báo một đối tượng DHT void setup() { lcd.begin(16, 2); dht.begin...
true
4f0b6ad1cb932e5edf5ffa150cbf860da846c96d
C++
nichols/polynomial-mxplus1
/f2t_findcycles.cpp
UTF-8
2,861
3.0625
3
[]
no_license
#include "f2t_findcycles.h" #include <cstdio> #include <cstdint> // find cycle in sequence starting at f using Brent's algorithm // mu is the number of iterations until it becomces periodic // lambda is the length of the period // sigma is the stopping time // returns 0 unless the iteration times out, in which case...
true
1ff3391befb32ff975be231a5b8271e753849fc8
C++
binc74/mc
/MC/game/objects/cube.cpp
UTF-8
5,620
2.71875
3
[]
no_license
#include "cube.h" namespace mc { Cube::Cube() : pos(0, 0, 0) { } Cube::Cube(World* world, float px, float py, float pz) : world(world), pos(px, py, pz) { } Cube::~Cube() { } void Cube::pushVerticesData(ChunkRenderer* cr, SpriteType top, SpriteType front, SpriteType right, SpriteType back...
true
282ed9b8e4adf68f5055dbfb454eec018e59b799
C++
Dracono99/Mav-Games-Chimera-ProtoType
/DragonXMath.h
UTF-8
8,976
2.90625
3
[]
no_license
#pragma once #include "d3dUtility.h" class DragonXVector3 : public D3DXVECTOR3 { public: DragonXVector3():D3DXVECTOR3() { } DragonXVector3(D3DXVECTOR3 v3):D3DXVECTOR3(v3) { } DragonXVector3(real x,real y,real z):D3DXVECTOR3(x,y,z) { } inline void operator+=(const DragonXVector3& v) { x+=v.x; y+=v.y; ...
true
ac07ed8b4cd2a6773faec7ccc72ed24b9a41c08a
C++
jiku100/ShadowDetectionMethod
/OpenCV_Version/Entropy_Lab_Invariant/entropy.h
ISO-8859-7
2,582
2.828125
3
[]
no_license
#pragma once #include "header.h" #include <numeric> #include <math.h> void RGB2LCS(Mat& src, vector<Point2f>& lcs) { for (int j = 0; j < src.rows; j++) { for (int i = 0; i < src.cols; i++) { Vec3b& pixel = src.at<Vec3b>(j, i); double b = pixel[0]; double g = pixel[1]; double r = pixel[2]; if (b < 0.1...
true
3eb2bfa557684c2250b4d68b618276277869df96
C++
gilbertoalexsantos/judgesolutions
/Solved/URI/@URI 1433 - The Splitting Club/1433 - The Splitting Club.cpp
UTF-8
1,085
2.84375
3
[]
no_license
//Author: Gilberto A. dos Santos //Website: https://www.urionlinejudge.com.br/judge/en/problems/view/1433 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <vector> #include <algorithm> using namespace std; const double EPS = 1e-9; struct type { int q, y; type(int q=0, int y=0...
true
1cc5d66e93fe718520cd225b194181bdf855f223
C++
antoniovazquezaraujo/8x8
/events/Page.cpp
UTF-8
1,490
2.875
3
[]
no_license
#include "Component.h" #include "Page.h" Page::Page() :levels(1, vector<int>()) ,colorBlock(1, COLS, ROWS){ this->componentW = 200/ COLS; this->componentH = 200/ ROWS; reset(); } Page::~Page(){ for(vector<Component*>::iterator i = components.begin(); i != components.end(); i++){ delete (*i); } } void Pa...
true
e6a534ec4bdf271bc2de97de57186713f609541b
C++
FireFox2000000/GbaGameEngine
/GbaGameEngine/src/engine/base/core/stl/FixedPoint.h
UTF-8
6,036
3.15625
3
[]
no_license
#pragma once #include <type_traits> // for is_integral #include "engine/base/Typedefs.h" #include "engine/base/Macros.h" // If you don't provide an integer type as the IntType parameter then I hate you. template<class IntType, u8 FRACTIONAL_BITS> class FixedPoint { IntType storage; inline IntType GetIntStorage() c...
true
2eee635f7001674bd5ad93e18243ea2e5bc5c893
C++
cocokechun/Programming
/College/USACO/gift1.cpp
UTF-8
988
2.65625
3
[]
no_license
/* ID: kmao1 PROG: gift1 LANG: C++ */ #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> using namespace std; int main() { ofstream fout ("gift1.out"); ifstream fin ("gift1.in"); int n; vector<string> names; map<string, int> acc; fin >>...
true
20c24a9a4cee5e23d5d46b35aca2c940f1e28adc
C++
Ahiganbana/leetcode
/findPeakElement.cpp
UTF-8
1,023
3.640625
4
[]
no_license
#include <iostream> #include <vector> using namespace std; //找到数组中的峰值元素(使用O(logN的时间复杂度)) class Solution { public: int findPeakElement(vector<int>& nums) { int size = nums.size(); if(size == 0) { return 0; } int maxIndex = getMaxIndex(nums, 0, size - 1, 0); return...
true
3bb64a6a96bbaae4667b41b7361425fa726e2a7d
C++
GadyPu/OnlineJudge
/other-oj/ACdream/1738 世风日下的哗啦啦族I.cpp
UTF-8
13,208
2.546875
3
[]
no_license
/* * this code is made by Bug_Pu * Problem: 1738 * Verdict: Accepted * Submission Date: 2015-05-19 19:26:48 * Time: 420MS * Memory: 40160KB */ #include<algorithm> #include<iostream> #include<cstdlib> #include<cstring> #include<cstdio> #define lc root<<1 #define rc root<<1|1 const int Max_N = 50010; const int INF = ~0u ...
true
459f809166ce1d87288592136daadd0dcd87da4f
C++
pgentile/eva-mini-projet
/src/road-block.cpp
UTF-8
2,129
2.765625
3
[]
no_license
#include "road-block.h" #include <GL/glut.h> #include <GL/gl.h> #include "vector-3d.h" RoadBlock::RoadBlock(double width, Vector3D startPoint, Vector3D endPoint) :_width(width),_startPoint(startPoint),_endPoint(endPoint) { } RoadBlock::~RoadBlock() {} void RoadBlock::render() { glPushMatrix(); // ---- R...
true
ece7a69c27d2ce6957a8e747645198d3dcbf3c34
C++
erkang/design
/Builder/PizzaBuilder.h
UTF-8
687
2.671875
3
[]
no_license
#include "Pizza.h" // "Abstract Builder" class PizzaBuilder { public: const Pizza & pizza(); virtual ~PizzaBuilder(); virtual void buildDough() = 0; virtual void buildSauce() = 0; virtual void buildTopping() = 0; protected: Pizza pizza_; }; //-----------------------------------...
true
2cbb0f9783e74313f3226f2d3c291a076b0e2185
C++
mshmnv/ft_containers
/list.hpp
UTF-8
24,723
3.125
3
[]
no_license
#ifndef LIST_HPP #define LIST_HPP #include <iostream> #include "Node.hpp" namespace ft { template <class Type, class Alloc = std::allocator<Type> > class list { private: typedef Alloc allocator_type; typedef Type value_type; typedef value_type& reference; typedef const value_type& const_reference; ...
true
8753d610f9ff6e26bf227caaf88c578b5de92b49
C++
SergeyGaluzov/Lab9
/Source.cpp
UTF-8
1,360
3.46875
3
[]
no_license
7. Із заданого рядка символів вилучити слова, довжина яких менша, за вказану користувачем. #include <iostream> #include <string> using namespace std; string input_string(); string changing_the_string(string str); void output_the_changed_string(string str_final); string input_string() { string str; co...
true
787356d5dd24c80cabba07e3b0d399efedf204d0
C++
Jackiebarman/PnC_Lab_IT
/lab6.cpp
UTF-8
2,494
2.640625
3
[]
no_license
#include<bits/stdc++.h> #include<omp.h> using namespace std; int main() { ifstream ptr; int R,G,B,i; double Gray; ptr.open("KittenRGB.txt"); double t1,t2; vector<vector<int>> v; vector<int> m; int size=300*300; vector<double>Y(size,0),I(size,0),Q(size,0),Gr(size,0); for(int i=0;i<size;i++) { m.clear(); ptr>>R; ptr>>G; ...
true
f82fa25fb9bf1ac61990be6b24bfb3761232c7d1
C++
JangMiKyung/DX2_pf_ver_2
/Direct3D_14/Direct3D_14.v12.v12/cTerrain.cpp
UHC
4,605
2.765625
3
[]
no_license
#include "stdafx.h" #include "cTerrain.h" cTerrain::cTerrain() { } cTerrain::~cTerrain() { } //ʱȭ HRESULT cTerrain::Init(int vertexNum, float cellSize) { // this->nVerNumX = vertexNum; this->nVerNumZ = vertexNum; this->nTotalVerNum = this->nVerNumX * this->nVerNumZ; // this->nCellNumX = this->nVerNumX - 1;...
true
35331da6c878399e1d965a57d52c079a239fa1a6
C++
likhitgarimella/OOPS-CPP
/CountInversion.cpp
UTF-8
794
4.1875
4
[]
no_license
// C++ Program to Count Inversion in an Array // The number of switches required to make an array sorted is termed as inversion count. // The time complexity is O(n^2). #include<iostream> using namespace std; int CountInversion(int a[], int n) { int i, j, count = 0; for(i = 0; i < n; i++) { for(j...
true
e2029f2e0bf6a25cc1331736d7964239bb897a40
C++
whysofar72/SOME-Projects
/C Lang/029/029/029.cpp
UTF-8
173
2.890625
3
[]
no_license
#include <stdio.h> int main() { int num1 = 10, num2 = 10; int a, b; a = ++num1; printf("%d, %d \n", a, num1); b = num2++; printf("%d, %d \n", b, num2); return 0; }
true
e717a3c6f915c7a93d6b3b1f37fe5469353f0c6b
C++
reshmasivakumar/CSE-342-Data-Structures-And_Algorithms-In-CPP
/ImageSegmentation/ImageSegmentation/PixelContainer.cpp
UTF-8
15,467
3.859375
4
[]
no_license
/* Program 4: PixelContainer.cpp Author: Reshma Maduri Sivakumar Design Due Date: 03/08/2017 Purpose: Purpose: This is a container class for storing a set of image pixels and additional support information related to the pixels such as the list size, seed pixel, count of all pixels RGB values (redp...
true
40e7efae453b0590f13dc0c5e28bbde1de3cf7e4
C++
stephen-soul/CPP-Code-Samples
/phonebook/programState.cpp
UTF-8
2,096
3.140625
3
[]
no_license
/*Stephen Fetinko 2018*/ #include "programState.h" state::state() { programRunning = true; mainMenuActive = true; askingForName = true; askingForNumber = false; askingForEditedSpot = true; askingForEditedName = false; askingForEditedNumber = false; } state::~state() = default; /* All ...
true
d391242483f47b73d8398137d98d9b1a755f2699
C++
Deep9110/coders-archive
/DSA/Beginner level FAQ/day1.cpp
UTF-8
251
2.703125
3
[]
no_license
#include<iostream> using namespace std; int main(){ int i = 12; float f = 4.0f; string s = "hackerRank "; cout<<i + 4<<endl; cout<<f + 4.0<<endl; cout<<s<<"is the best place to learn and practice coding!"<<endl; return 0; }
true
ec46c47bc6208de7722cdfb84eb908678e7b4f79
C++
Angelos-89/membrane_project
/src/Vec3dLib.cpp
UTF-8
792
3.515625
4
[]
no_license
#include <iostream> #include <cmath> #include "Vec3dLib.hpp" double Dot(const Vec3d& v, const Vec3d& w) { return v.X()*w.X() + v.Y()*w.Y() + v.Z()*w.Z(); } Vec3d Cross(const Vec3d& v, const Vec3d& w) { return {v.Y()*w.Z()-v.Z()*w.Y(), v.Z()*w.X()-v.X()*w.Z(), v.X()*w.Y()-v.Y()*w.X()}; } double Square(con...
true
daf7adc0fb03ed28ade5b1d30b53b7dc6de00032
C++
gbakkk5951/OI
/__history/17.8/cdvs1038牛顿法标程.cpp
UTF-8
656
2.578125
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; const double eps=1e-3; double a,b,c,d; inline double f(double x){return ((a*x+b)*x+c)*x+d;} inline double df(double x){return (3*a*x+2*b)*x+c;} double sol(double l,double r){//printf("sol %lf %lf\n",l,r);...
true
52628e06af15d49cfe3dd150bf52fad62ddc9746
C++
joss185/PECUS
/simple_test/simple_test/simple_test.ino
UTF-8
2,704
2.84375
3
[]
no_license
#include <SoftwareSerial.h> #include <TinyGPS.h> /* This sample code demonstrates the normal use of a TinyGPS object. It requires the use of SoftwareSerial, and aSerial3umes that you have a 4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx). */ TinyGPS gps; //SoftwareSerial Serial3(4, 3); void setu...
true
ca660a98f15dd1238e481567ea788a1164b712eb
C++
garyhubley/ProjectEuler
/src/problem032.cpp
UTF-8
1,457
3.265625
3
[]
no_license
/* * File: Problem032.cpp * Author: Gary Hubley * Company: Self * Description: * We shall say that an n-digit number is pandigital if it makes use of all * the digits 1 to n exactly once; for example, the 5-digit number, 15234, is * 1 through 5 pandigital. * * The product 7254 is unusual, as the id...
true
0b8c8eeca08e5b50d80c5105d2b1a5c030b3b82a
C++
jack-maber/bsc-live-coding
/COMP220/COMP220_Examples/15_Camera/main.cpp
UTF-8
17,762
2.71875
3
[]
no_license
//main.cpp - defines the entry point of the application #include "main.h" #pragma region "Initilisation" int main(int argc, char* args[]) { //Initialises the SDL Library, passing in SDL_INIT_VIDEO to only initialise the video subsystems //https://wiki.libsdl.org/SDL_Init if (SDL_Init(SDL_INIT_VIDEO) < 0) { //D...
true
cc2beae8b1287e464c00e078a4c4e5f5d954bf98
C++
Yaseungho/myCodes
/Baekjoon_Solving/Baekjoon_10448.cpp
UTF-8
547
2.96875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { int sum = 0, i, j, k, num, T; bool is = true; vector<int> Tvec; for (i = 1; sum < 1000; i++) { sum += i; Tvec.push_back(sum); } cin >> T; while (T--) { cin >> num; is = true; for (i = 0; i < Tvec.size() && is; i++) { for (j = 0...
true
5e5f73a4e49e7cd30812120e44f35e20b120dd9a
C++
Snake174/PipmakAssistant
/LoadingEffect.h
UTF-8
2,182
2.5625
3
[]
no_license
#ifndef LOADINGEFFECT_H #define LOADINGEFFECT_H //================================================================================================= #include <QObject> #include <QWidget> #include <QLabel> #include <QToolButton> #include <QStackedWidget> //================================================================...
true
584796e59d6393002d29888ec977d7b9bf8f39d1
C++
liutuoni/skia
/src/gpu/tessellate/shaders/GrPathTessellationShader.h
UTF-8
9,848
2.78125
3
[ "BSD-3-Clause" ]
permissive
/* * Copyright 2019 Google LLC. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrPathTessellationShader_DEFINED #define GrPathTessellationShader_DEFINED #include "src/gpu/tessellate/shaders/GrTessellationShader.h" // This is the base class for ...
true
025cabbb17d98ede28e894af257d2089bfbfc430
C++
MheZa/ALFBM
/bladeInfo.H
UTF-8
6,180
2.53125
3
[]
no_license
/****************************************************************************\ This program is based on the openFOAM, and is developed by MaZhe. The goal of this program is to build an bladeInfo class . \****************************************************************************/ #ifndef bladeInfo_H #define bladeInfo...
true
3fbc4981cd68b04faa862caa5439e982e7071ad1
C++
Noymul-Islam/problems
/The Party, Part I.cpp
UTF-8
1,506
2.609375
3
[]
no_license
#include<cstdio> #include<cstring> #include<cmath> #include<vector> using namespace std; void bfs(int node, int source); vector<int>G[1100],v1,v2; int main() { int c=0,cases,folow; while(scanf("%d",&cases)==1) { for(folow=1;folow<=cases;folow++) { int nodes,edges,i,j,m,n; sca...
true
5ff4694c9551ad682fc531c26cbe2a4262a2920e
C++
yieldthought/hemelb
/Code/util/fileutils.cc
UTF-8
5,135
2.75
3
[]
no_license
// // Copyright (C) University College London, 2007-2012, all rights reserved. // // This file is part of HemeLB and is CONFIDENTIAL. You may not work // with, install, use, duplicate, modify, redistribute or share this // file, or any part thereof, other than as allowed by any agreement // specifically made by you ...
true
0a13b3e2ffaeb7d20fa86881806f576d3149c3fc
C++
kohnakagawa/LSCMD
/test/test_tensor2.cpp
UTF-8
3,569
2.921875
3
[ "BSD-3-Clause" ]
permissive
#include "gtest/gtest.h" #include "../tensor2.hpp" using namespace LocalStress; typedef Tensor2<double> dtensor; typedef Vector2<double> dvec2; TEST(Constructor, test0) { dtensor dt; ASSERT_EQ(dt.xx, 0); ASSERT_EQ(dt.xy, 0); ASSERT_EQ(dt.yx, 0); ASSERT_EQ(dt.yy, 0); } TEST(Constructor, test1) { dtensor...
true
e111f4690d085f44accdf96b2e1ad0e237b4d885
C++
pmiddend/fcppt
/test/container/array/map.cpp
UTF-8
1,625
2.71875
3
[ "BSL-1.0" ]
permissive
// Copyright Carl Philipp Reh 2009 - 2018. // 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 <fcppt/make_strong_typedef.hpp> #include <fcppt/output_to_std_string.hpp> #include <fcppt...
true
2560fc99d1915e7dd49f2198aed56a1992471e27
C++
a1clark1a/ParticleExplosion
/SDL2_Project(Particles)/SDL2_Project(Particles)/Screen.h
UTF-8
512
2.515625
3
[]
no_license
#pragma once #include <SDL.h> namespace ParticleExplosion { class Screen { public: const static int SCREEN_WIDTH = 800; const static int SCREEN_HEIGHT = 600; Screen(); bool Init(); bool ProcessEvents(); void Close(); void SetPixel(const int x, const int y, const Uint8 red, const Uint8 green, const ...
true
502db188b8bb43aee3082b8cda40c311e2e49720
C++
zhouguoguo/C-plus-plus-Primer
/Chapter13/13.4.cpp
UTF-8
530
3.359375
3
[]
no_license
#include <iostream> using namespace std; class Point { public: Point() = default; Point(Point& p) : m_x(p.m_x), m_y(p.m_y) { ++i; cout << "copy constructor, i = " << i << endl; } private: double m_x; double m_y; static int i; }; int Point::i = 0; Point global; Point foo_bar(Point arg) {...
true