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
8c6a44cdb332cfa1694a293ec3ad31fc2f399254
C++
kamyu104/LeetCode-Solutions
/C++/the-skyline-problem.cpp
UTF-8
5,722
3.171875
3
[ "MIT" ]
permissive
// Time: O(nlogn) // Space: O(n) // BST solution. class Solution { public: enum {start, end, height}; struct Endpoint { int height; bool isStart; }; vector<pair<int, int> > getSkyline(vector<vector<int> >& buildings) { map<int, vector<Endpoint>> point_to_height; // O...
true
fb473cf5800acc923b00c27c679f4032194fa738
C++
csg-tokyo/caldwell
/SyntheticProgramPair/SensorMonitorOO/src/platform.cpp
UTF-8
527
3.015625
3
[]
no_license
/* * new.cpp * * Created on: Mar 29, 2017 * Author: Joe */ #include <stdint.h> typedef unsigned int size_t; uint8_t* g_heap_memory[8096]; uint32_t position; void* operator new (size_t size) { uint32_t allocatedPosition = position; position += size; return (void*) g_heap_memory[a...
true
ea2346dc1e5a1cd7377fb72dbf4d128b60bcfa61
C++
AnjaliG1999/DSA
/cpp/dynamic-programming/countSubset.cpp
UTF-8
736
3.015625
3
[]
no_license
// Online C++ compiler to run C++ program online #include <bits/stdc++.h> using namespace std; int countSubsetSum (int *arr, int sum, int n) { int t[n+1][sum+1]; for(int i=0; i<=n; i++){ for(int j=0; j<=sum; j++){ if(i == 0) t[i][j] = 0; if(j == 0) t[i][j] = 1; ...
true
a2008ac1e838f49208c3560c8e3de4610822de37
C++
onehundredfifteen/autotest
/test_process.h
UTF-8
1,210
2.53125
3
[]
no_license
#ifndef TEST_PROCESS_H #define TEST_PROCESS_H #include <windows.h> #include <string> typedef unsigned long int time_int; class TestProcess { public: TestProcess(std::string cmd, std::string input, int max_waitfor = 0 ); //TestProcess() : TestProcess("cmd", "echo no argument passed") {}; short getError...
true
e0fafa0b9b4fcdffe0b3d0a67a0daaf481287e4e
C++
rleonborras/Development
/String_Class/String_Class/String_Class.h
UTF-8
1,452
3.3125
3
[]
no_license
#ifndef STRING_CLASS #define STRING_CLASS #include <string.h> class String { private: char* str = nullptr; unsigned int mem_allocated = 0; public: String(const char* string){ if (string != NULL) { mem_allocated = strlen(string) + 1; str = new char[mem_allocated]; strcpy(str,string); } }; Strin...
true
e00e93529df5294cbb4166624d67523e5bbb744e
C++
caniro/algo-note
/Baekjoon/Step8/1011/main.cpp
UTF-8
739
3.1875
3
[]
no_license
#include <iostream> void calc(int& count, int i, int len) { if (len <= 0) return ; if (i - 1 <= len && len <= i + 1) count++; else if (len == i + 2 && i != 0) count += 2; else if (i + 2 < len && len < 2 * (i - 1)) count += 2; else if (2 * (i - 1) <= len && len <= 2 * (i + 1)) count += 2; else if (2 * ...
true
30b15ddd6f8bacbc07ff90553958a9b897d3a3cd
C++
zsebastian/LD26
/LD26/LD26/Tree.h
UTF-8
708
2.546875
3
[]
no_license
#ifndef TREE_H #define TREE_H #include "Entity.h" #include <SFML\System\Vector2.hpp> class Canvas; class Tree : public Entity { public: Tree(float x, float y); virtual void update(); virtual void render(Canvas& canvas); virtual void handleCollision(std::shared_ptr<Entity>); virtual void setAblaze(); virtual b...
true
f57fa489eae4cd288b87ebb54f756df189b97f64
C++
juakofz/SuperPong
/Pong/source/Globals.h
UTF-8
407
2.890625
3
[]
no_license
#pragma once #include <algorithm> // ------------------------------------------------- Global objects and constants //Screen dimension constants const int SCREEN_WIDTH = 640; const int SCREEN_HEIGHT = 480; // ------------------------------------------------- Useful functions template <typename T> T clip(const T & n...
true
bf64f8def0ea670ea3504f5f0a33275e4885e516
C++
whunt1965/EC535_Final_Project
/fighterguy/fighter.cpp
UTF-8
3,174
3.140625
3
[]
no_license
#include "fighter.h" #include<QtMath> //default constructor Fighter::Fighter() : name("default"), health(20), blocking(false){} //parameterized constructor Fighter::Fighter(const QString &fname, const QVector<QPixmap>& pics) : name(fname), pics(pics), health(20), blocking(false){...
true
cff6e7f78a580e71306431bf57dec22354f6ae78
C++
Evalir/Algorithms
/Lectures/Mathematics/Fibo-Fact/DPFactFib.cpp
UTF-8
1,021
2.78125
3
[]
no_license
#include <iostream> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <cmath> #include <algorithm> #include <list> #include <bitset> #define INF (int)1e9; using namespace std; typedef long long llong; typedef unsigned long long uint64; typedef vector<int> VI; type...
true
a3e3d4259c05799b9350488e45905e9503057a24
C++
jwaterworth/snooker_scoreboard
/rgb_test/rgb_test.ino
UTF-8
375
2.609375
3
[]
no_license
#include <RGBLed.h> #define RED_PIN 9 #define GREEN_PIN 10 #define BLUE_PIN 11 RGBLed led(RED_PIN, GREEN_PIN, BLUE_PIN); void setup() { } void loop() { led.Red(); delay(1000); led.Yellow(); delay(1000); led.Green(); delay(1000); led.Brown(); delay(1000); led.Blue(); delay(1000); led.Pin...
true
269ab41a908a95227938c889b201dde7d0024276
C++
dburian/cpp_mfo
/src/operation_result.h
UTF-8
2,708
2.890625
3
[]
no_license
#ifndef MFO_OPERATION_RESULT_HEADER #define MFO_OPERATION_RESULT_HEADER #include <filesystem> #include <future> #include <vector> #include "operation_result.h" namespace mfo { template<class ReturnType, class ArgumentType> class operation_result { public: using argument_t = Argumen...
true
cad46b92a29b88b9a928aa0c7587e312908ed378
C++
Salyel/QtGame
/player.h
UTF-8
3,519
2.734375
3
[]
no_license
#ifndef PLAYER_H #define PLAYER_H #include <QPropertyAnimation> #include <QEasingCurve> #include "entities/entity.h" /** * Le joueur (c'est toi!) */ class Player : public Entity { Q_OBJECT Q_PROPERTY(qreal jumpFactor READ getJumpFactor WRITE setJumpFactor NOTIFY jumpFactorChanged) public: Player(); ...
true
2a38f9d6afddb319611e364fcdd577eebfc71d08
C++
overnew/CodeSaving
/LeetCode/1.Two Sum.cpp
UTF-8
515
3.140625
3
[]
no_license
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { vector<pair<int, int>> arr(nums.size()); for (int i=0; i<nums.size() ; ++i) arr[i] = {nums[i], i}; sort(arr.begin(), arr.end()); int left = 0, right = arr.size() - 1; int add_num; while (1) { add_num = arr[left].firs...
true
8c41c864e57b2bd4c71ac11b0128891238ba51c0
C++
mls-m5/xml-loader
/src/xmldocument.cpp
UTF-8
7,861
2.953125
3
[]
no_license
/* * xmldocument.cpp * * Created on: 6 okt 2014 * Author: Mattias Larsson Sköld */ #include "xmldocument.h" #include <sstream> #include <fstream> #include <stack> #include <ctype.h> using std::istream; using std::ostream; using std::stringstream; using std::string; #define DEBUG if(0) class Token: public...
true
f9ed820beb4d599af81a1befd2bd958d62ffce3e
C++
kenii28/CS-1124
/Object-Oriented Programming/rec09/rec09.cpp
UTF-8
3,047
2.6875
3
[]
no_license
#include "Registar.h" #include <iostream> #include <fstream> #include <vector> #include <string> using namespace BrooklynPoly; using namespace std; //int main() { // // Registar registrar; // // cout << "No courses or students added yet\n"; // registrar.printReport(); // // cout << "AddCourse CS101.00...
true
1b83151a587da3dda71d8d0124286818af47e7e9
C++
satyampandey9811/competitive-programming
/2. Leetcode/hard level/045. unique paths III.cpp
UTF-8
1,372
2.890625
3
[]
no_license
// link to question - https://leetcode.com/problems/unique-paths-iii/ class Solution { public: int m, n; vector<vector<int>> a; vector<vector<bool>> vis; int ans; void go(int i, int j, int& ex, int& ey) { if(i < 0 or j < 0 or i == m or j == n or a[i][j] == -1 or vis[i][j]) return; ...
true
ad81b1d26731d92e3be390c08ddcd1c79a0f4750
C++
sarah2627/IMACWorld
/Imac_World/libs/glimac/src/Grid.cpp
UTF-8
4,330
2.9375
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include "glimac/Grid.hpp" #include "glimac/RadialBasisFunction.hpp" namespace glimac{ Grid::Grid() { for(int i=0; i < 10; i++) { for(int j=0; j<10; j++) { for(int k=0; k<3; k++) { m_Grid.push_back(ShapeGrid(i,-k,j, glm::vec3(0....
true
3e9374243f42b620d6d1d2fff4498cce915c353d
C++
SamVargas14/LabosFunda
/Laboratorio4/Lab4ej1.cpp
UTF-8
332
3.453125
3
[]
no_license
#include <iostream> using namespace std; int main(void){ int n1,n2,r; cout<<"Ingrese valores a dividir\nValor 1: ";cin>>n1;cout<<"\nValor 2: ";cin>>n2; r = n1/n2; if (r % 2 == 0){ cout<<n1<<" es divisible entre "<<n2; } else { cout<<n1<<" no es divisible entre "<<n2; ...
true
b1968935254d376c6aeaf942c82d2e38c627f379
C++
tudoroancea/cube-timer
/test/durationUnitTest.cpp
UTF-8
1,202
2.765625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// // Created by Tudor Oancea on 13/04/2021. // Copyright (c) 2021 Tudor Oancea.. All rights reserved. // Licensed under the MIT licence (see details at https://github.com/tudoroancea/cube-timer/blob/develop/LICENSE) // #include <gtest/gtest.h> #include "MainWindow.hpp" #include "Duration.hpp" #include <random> TEST...
true
3aa08cc682426438f4b736a723e41b06f4832577
C++
mridul-mc/all_c_part2
/sum_of_number_return.cpp
UTF-8
403
3.59375
4
[]
no_license
#include<stdio.h> #include<conio.h> int sum(int,int); //create function int main() { int num1,num2; printf("Enter first number:"); scanf("%d",&num1); printf("Enter second number:"); scanf("%d",&num2); printf("Sum of two number:%d",sum(num1,num2)); //call function } int sum(int num1,int num2) { in...
true
0ace8a32944e28560a2464d75a7e4f065b4b85db
C++
sanjusss/leetcode-cpp
/0/800/820/825.cpp
UTF-8
2,063
2.78125
3
[]
no_license
/* * @Author: sanjusss * @Date: 2021-12-27 08:46:24 * @LastEditors: sanjusss * @LastEditTime: 2021-12-27 09:30:43 * @FilePath: \0\800\820\825.cpp */ #include "leetcode.h" // class Solution { // public: // int numFriendRequests(vector<int>& ages) { // int n = ages.size(); // int ans = 0; // ...
true
be30589409f867be36d94c78845ec4f80a45e96f
C++
SomeTake/HF21MisotenH206
/project/Framework/Resource/PolygonResource.cpp
SHIFT_JIS
2,210
2.5625
3
[ "MIT" ]
permissive
//===================================== // //PolygonResource.cpp //@\:|S\[X //Author:GP12B332 21 ԗY // //===================================== #include "PolygonResource.h" #include "../Renderer3D/BoardPolygon.h" /************************************** RXgN^ ***************************************/ PolygonResource::Pol...
true
fbbedaad39a3e83d5e4720e00cf9015f9ff3aafc
C++
LeeeeoLiu/DBMS
/DBMS.cpp
UTF-8
2,842
2.96875
3
[]
no_license
/* * DBMS.cpp * * Created by Leeeeo on 2017.3.30 * * Input 学生(学号:是,姓名:否,性别:否,年龄:否) * 课程(课程号:是,课程名:否,学分:否) * 选课(学生:学号,课程:课程号,成绩) * * Output 学生.txt * #学生,学号:主键,姓名,性别,年龄 * 课程.txt * #选课,学生:主键,课程:主键,成绩 * * Description just a easy case for simple m:n convert from ER Mo...
true
819a743ca3e3cd9bc1579df6c1037b5ec28f8bee
C++
Rodrigo61/GUAXINIM
/CodeBook/Graphs/EulerTour.cpp
UTF-8
3,591
3.25
3
[]
no_license
/* [DEFINITION] a) Eulerian Path: visits every edge only once, but can repeat vertices. b) Eulerian Cycle: is a eulerian path that is a cycle (start vertice == end vertice) OBS: We disconsider vertices that have indegree==outdegree==0 (we call them as useless vertices) [CONDITIONS] ...
true
8dfa55faaede591fafee7fa720b4e93a19e2edc9
C++
HK-Dilip-kumar/H-CKeR_3-RTH_SOLUTIONS
/prime2nd.cpp
UTF-8
201
2.78125
3
[]
no_license
#include<iostream> int main() { int j=1; int n; std::cin>>n; for(int i=2;i<=n;i++) { int c=0; while(j<=i) { if(i%j==0) { c++; }j++; if(c==2){std::cout<<i<<" ";} } } }
true
d939f2020c6c369653d07bb8b6e3a2873e7cb7be
C++
cyrillev/qgameoflife
/generic/model/golquadtreenode.h
UTF-8
1,363
2.75
3
[]
no_license
#ifndef GOLQUADTREENODE_H #define GOLQUADTREENODE_H #include "golquadtreenodebase.h" namespace gol { /** * Each GolQuadtreeNode has exactly 4 children, * one for each cardinal direction. * */ class GolQuadtreeNode : public GolQuadtreeNodeBase { public: enum Quadrant { NorthWest, NorthEas...
true
1d8784172eea417b5f1595fb87bc8c2d9f7de73e
C++
chadlayton/sparky
/sparky/source/handle.h
UTF-8
1,800
3.1875
3
[]
no_license
#pragma once #include <cstdlib> #include <cstdint> #include <cassert> #include <intsafe.h> struct sp_handle { short index = SHORT_MAX; operator bool() const { return index != SHORT_MAX; }; }; struct sp_handle_pool { short _count = 0; short _capacity = 0; sp_handle* _dense = nullptr; sp_handle* _sparse = nullp...
true
7f40e573a470dbb6090296e8d705885d6c4a4528
C++
samueldong-us/ARHideAndGoSeek
/AR Hide And Go Seek/C++ Source/BasicMesh.hpp
UTF-8
1,461
2.6875
3
[]
no_license
// // BasicMesh.hpp // Model Based Tracking // // Created by Samuel Dong on 11/11/15. // Copyright © 2015 Samuel Dong. All rights reserved. // #pragma once #import "OpenGLES/ES3/gl.h" #import "glm/glm.hpp" #import "ShaderProgram.hpp" #import "TextureManager.hpp" #import <string> #import <vector> #import <map> c...
true
24f2b1dab8486d643d75346b778379a1500984ae
C++
jacarvalho/SimuRLacra
/RcsPySim/src/cpp/core/util/BoxSpaceProvider.h
UTF-8
1,405
2.9375
3
[ "BSD-3-Clause" ]
permissive
#ifndef RCSPYSIM_BOXSPACEPROVIDER_H #define RCSPYSIM_BOXSPACEPROVIDER_H #include "BoxSpace.h" #include "nocopy.h" namespace Rcs { /** * A class that lazily provides an 1D box space. */ class BoxSpaceProvider { private: mutable BoxSpace* space; public: BoxSpaceProvider(); virtual ~BoxSpaceProvider(); ...
true
2d2b3333d4cac616941d8fb4bffc7c4143648dda
C++
MOON-CLJ/learning_cpp
/algorithm/queue.h
UTF-8
787
3.65625
4
[]
no_license
#include <iostream> template<typename T> class queue { public: queue(): first(NULL), last(NULL), N(0) {} bool isEmpty() { return (first == NULL); } int size() {return N;} void enqueue(T item) { Node* oldLast = last; last = new Node; last->val = item; last->ne...
true
bd3b6ca155a182606b169077550976e0a0f4e8be
C++
spd-user/GeneralSPD
/src/spd/output/ConsoleOutput.hpp
UTF-8
1,554
3.03125
3
[]
no_license
/** * ConsoleOutput.hpp * * @date 2012/12/18 * @author katsumata */ #ifndef CONSOLEOUTPUT_H_ #define CONSOLEOUTPUT_H_ #include <memory> #include "OutputVisitor.hpp" namespace spd { namespace core { class Player; } namespace output { /** * 空間状態を標準出力へ表示するクラス */ class ConsoleOutput: public OutputVisitor { publi...
true
aa6aabf76beb21bd7821d7369da5f3d4bcb7ba45
C++
SegwayRase2019/SegwayRace
/data/src/client/ui/Canvas.h
UTF-8
1,238
2.625
3
[]
no_license
#pragma once #include "../../common/math/Math.h" #include "./Button.h" #include <SDL2/SDL.h> #include <cstdint> #include <string> #include <functional> #include <vector> class Canvas { public: Canvas(class Game *game); virtual ~Canvas(); virtual void Update(float deltaTima); virtual void Draw(SDL_Renderer *r...
true
8eae364dd7c31f1e3b008f1286d279eb379c2590
C++
ak9999/structures-and-algorithms
/cpp/DataStructures/LinkedQueue/test.cpp
UTF-8
886
3.734375
4
[]
no_license
/* * @Author: Abdullah Khan * @File: main.cpp * @Description: Test LinkedQueue. */ #include <iostream> #include <cassert> #include "LinkedQueue.hpp" using namespace std; int main() { // We create the blank LinkedQueue a here. LinkedQueue<int> a; assert( a.size() == 0 ); // If the size isn't 0, the program st...
true
62089bbc8ea12cb4949bf88a57b227dd3becfa35
C++
collinskoech11/DSA-Practice-Problems
/Arrays/Transition_point.cpp
UTF-8
1,369
3.625
4
[]
no_license
/*Find Transition Point You are given a sorted array containing only numbers 0 and 1. Find the transition point efficiently. Transition point is a point where "0" ends and "1" begins. Note that, if there is no "1" exists, print -1. Input: You have to complete the method which takes 2 argument: the array arr[] and siz...
true
864c60d659e9afb1b418532b3f34006c52787afe
C++
georgeganea/cgymnachos
/nachos/userprog/timerdriver.cc
UTF-8
1,221
3.34375
3
[]
no_license
#include "timerdriver.h" ntimer_t TimerDriver::timers[MaxTimerCount]; TimerDriver::TimerDriver() { int i; for (i = 0; i < MaxTimerCount; i++) initTimer(i); } TimerDriver::~TimerDriver() { } /* Adds a new timer for a thread. The timer will activate * after the number of ticks given. */ int TimerDriver::addTime...
true
84f60bb356a408a13e859dbc704a8bb82ffbed82
C++
kiwonyun/LeetCode
/C++/addTwoNumbers.cpp
UTF-8
1,232
3.234375
3
[ "MIT" ]
permissive
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { int n1, n2, sum, c = 0; ListNode* prev = NULL; ListNod...
true
bbee34c7c43d92e81ccd7577a0c6b7681ffeff8f
C++
san-kir-k/oop_exercise_04
/tuple_handler.hpp
UTF-8
3,222
3.34375
3
[]
no_license
// Киреев А.К. 206 #include <iostream> #include <tuple> #include <utility> #include <cmath> #include <string> #include <typeinfo> #define _USE_MATH_DEFINES #include "octagon.hpp" #include "square.hpp" #include "triangle.hpp" template <class T> double getArea(T& figure) { using Type = typename T::type; double ...
true
263086cc5076a572d667a92af8cbf6c50e912b88
C++
isliulin/PythonDemoRepository
/项目/格子机2.0/wine_grid2018_11_10/temp/dialog.h
UTF-8
1,636
2.671875
3
[]
no_license
#ifndef DIALOG_H #define DIALOG_H #include <QObject> #include <QWidget> #include <QLabel> #include <QPushButton> #include <QStyleOption> #include <QPainter> #include <QTimer> #include "app.h" class Dialog : public QWidget { Q_OBJECT public: Dialog(QString str,int _ms=11000, QWidget *parent=0); Dialog(QWi...
true
1cfa7751e919a83501c4232343f7f9831497e8aa
C++
Peydon/LeetCode
/LeetCode/Q4.cpp
UTF-8
1,343
3.21875
3
[]
no_license
//#include<Vector> //#include<iostream> //#include <algorithm> //using namespace std; //class Solution { //public: // // double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { // int m = nums1.size(); // int n = nums2.size(); // if (m > n) { return findMedianSortedArrays(nums2, nums1); } // int le...
true
a8e84bb2842517133fe04c175bb19ff72e182076
C++
ehonda/dominion_online_log_prettifier
/dominion_online_log_prettifier_2_app/inc/string_utils.h
UTF-8
607
2.671875
3
[ "Unlicense" ]
permissive
#pragma once #include <string> namespace dominion_online { namespace string_utils { std::string removeAll(std::string s, const char& target); std::string replaceAll(std::string s, const char& target, const char& replacement); //Removes blank (' ' '\t') characters in front of the following special characters: '.' ','...
true
4cc07785ccb96363806ab5d7657c437defd1cbd9
C++
chffy/ACM-ICPC
/topcoder/srm610-619/srm611/550.cpp
UTF-8
1,906
2.796875
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <cmath> using namespace std; double sqr(double x) { return x * x; } double dis(double x, double y) { return sqrt(sqr(x) + sqr(y)); } double len[500], event[500000]; int ll[500], rr[500]; const double esp...
true
fcc19e0fb6c51d557d505d32480e41c18b175b9b
C++
mandaltj/Parallel_Computing
/matrix_multiply/matrix_multiply.cpp
UTF-8
5,020
3.203125
3
[]
no_license
#include <iostream> #include <vector> #include <chrono> #include <math.h> using Matrix = std::vector<std::vector<int>>; void print_matrix(Matrix & A) { int dimension = A.size(); for (int i=0; i<dimension; i++){ std::cout << "["; for (int j=0; j<dimension; j++){ std::cout << A[i][j]...
true
bec0930ea33153e3de4e08e8f1205d95f18e444d
C++
akshpreetsingh988/Introduction-To-C-
/Character Arrays/ReverseWordwise.cpp
UTF-8
1,543
4.0625
4
[]
no_license
/* Reverse Word Wise Send Feedback Reverse the given string word wise. That is, the last word in given string should come at 1st place, last second word at 2nd place and so on. Individual words should remain as it is. Input format : String in a single line Output format : Word wise reversed string in a single li...
true
110d8122d2e41774a1fcd369cd11d1db4960df44
C++
ahdemitalug/Algorithms-Programs
/Algorithms/insertion_sort.cpp
UTF-8
1,145
2.984375
3
[]
no_license
// // insertion_sort.cpp // // // Created by Medha gulati on 9/3/19. // #include<iostream> #include<fstream> using namespace std; int main(int argc,char **argv) { ifstream inputfile(argv[1]); ofstream outfile(argv[2]); int arr[10000],n,m,x; x=0; while(inputfile) { string str; ...
true
be0ed927c86685d4e547707fcfaa61ff1d5f11f6
C++
mbaldwin2015/CSE340-Project-2
/parser.cc
UTF-8
7,759
2.796875
3
[]
no_license
/* Michael Baldwin 1208386656 7/29/2016 */ #include <iostream> #include <istream> #include <fstream> #include <vector> #include <string> #include <cctype> #include <stdio.h> #include <cstring> #include <cstdlib> #include <cstdio> #include "lexer.h" #include "inputbuf.h" #include "parser.h" using namespace std; /*st...
true
bfd650e76847162d05c6cb914d4e8fcd995d6eb9
C++
bsu2019gr9/Graneva
/5-1.cpp
UTF-8
2,197
3.75
4
[]
no_license
//Класс французские деньги(1 франк = 20су) #include <iostream> using namespace std; class FrenchMoney { private: int frank; int soo; public: FrenchMoney(); FrenchMoney(int a, int b=0); ~FrenchMoney(); void operator=(const FrenchMoney& m); FrenchMoney operator+(const FrenchMoney& m); FrenchMoney operator-(const ...
true
0efb395ade29f86e32e65afc029bcf607f976971
C++
Auram20/CPP_IMAC2
/TP3/ImagesRGBU8.cpp
UTF-8
738
3.09375
3
[]
no_license
// ================================ // POO C++ - IMAC 2 // TP 4 - Exercice 1 // ================================ #include "ImageRGBU8.hpp" #include <vector> // Créer une image // Constructeur ImagesRGBU8::ImagesRGBU8(const unsigned int width, const unsigned int height):m_width(width), m_height(height), m_data(w...
true
1bb3b53ee41241b5653a72fe0634d22a71b8639e
C++
lvan100/PrettyFramework
/PrettyFramework/Typedef.h
GB18030
2,793
2.875
3
[ "Apache-2.0" ]
permissive
#pragma once #include <array> #include <functional> using namespace std; #include "Coordinate.h" namespace PrettyFramework { /** * ȡöٵԪ */ template<typename T> struct enum_size { const static int size = 0; }; /** * 뷽ʽ */ enum Gravity { Top = 0x0000, Left = 0x0000, CenterH = 0x0001, Right =...
true
c4790e08415f96f9e7a8f26474d41eb8cd0c4d05
C++
balooop/cplusplus_projects
/maze_solver/maze.h
UTF-8
1,547
3.21875
3
[]
no_license
/* Your code here! */ #pragma once #include <stdint.h> #include <vector> #include <utility> #include "cs225/PNG.h" #include "cs225/HSLAPixel.h" #include "dsets.h" using namespace cs225; using namespace std; class SquareMaze { private: int maze_width_; int maze_height_; int maze_size_; ...
true
d3688db217818a73da79e3d8e40b3b8b1c9b121f
C++
minuby963/other-projects
/Języki programowania/C++/JIMP 2/zajecia 3/operator3/functions.cpp
UTF-8
547
3.046875
3
[]
no_license
/*#include <iostream> using namespace std; class complex2 { public: int real; int imaginary; complex2 & operator+(complex2 & com) { int i=0,j=0; static complex2 com3(i,j); com3.real=this->real+com.real; com3.imaginary=this->imaginary+com.imaginary; return com...
true
b34342d7ca3a6432b8b4334b732730d9c20fb9c6
C++
wovert/CTutorials
/C++/oop/data.cpp
UTF-8
728
3.109375
3
[]
no_license
#include "data.h" void Data::setNum(int n) { num = n; } int Data::getNum(void) { return num; } void Data::setAge(int n) { age = n; } int Data::getAge(void) { return age; } void Data::setName(char *name) { this->name = name; } char * Data::getName(void) { return this->name; } // const 修饰成员变量,函...
true
caab478450bc10a4475614bc31b32698dd346b01
C++
quentinplessis/projet3D_rendu
/RayTracer.cpp
UTF-8
8,917
2.640625
3
[]
no_license
// ********************************************************* // Ray Tracer Class // Author : Tamy Boubekeur (boubek@gmail.com). // Copyright (C) 2012 Tamy Boubekeur. // All rights reserved. // ********************************************************* #include "RayTracer.h" #include "Ray.h" #include "Scene.h" #include ...
true
5c14c9f0beba68f69855183d74122680e288d95b
C++
Satori32/GlobalObject
/NGグローバル??/Source.cpp
UTF-8
207
2.828125
3
[]
no_license
#include <iostream> template<class T,class... A> T& Global(const A&... Arg) { static T V(Arg...); return V; } int main() { Global<int,int>(25)++; int N = Global<int,int>(0);//return 26; return 0; }
true
65dabe714b3e79c5097b37ccf299158fc23fc5e9
C++
jordantonni/Design_Patterns
/9 Strategy/DynamicStrategy.cpp
UTF-8
2,706
3.765625
4
[]
no_license
#include <iostream> #include <string> #include <sstream> #include <vector> #include <memory> using namespace std; /* * ABSTRACT: * TextProcessor class is the high level algorithim section. It drives the overall algorihim by defining what to do. * * Both Markdown and Html strategies derive from the ListStrategy, w...
true
ff5dd9f8f4f524cbbbdb3c1cf46463f71c7178f4
C++
H-Shen/Collection_of_my_coding_practice
/Kattis/cantinaofbabel.cpp
UTF-8
5,414
2.515625
3
[]
no_license
// https://open.kattis.com/problems/cantinaofbabel // #include <bits/extc++.h> using namespace std; using namespace __gnu_pbds; using ll = long long; constexpr int MAX_NODES = 105; struct custom_hash { static uint64_t splitmix64(uint64_t x) { // http://xorshift.di.unimi.it/splitmix64.c x += 0x9e3...
true
8c05a12cb01154c6e4f0e14fab532b24a96af30e
C++
amumu/nokuno
/cc/topcoder/Chessboard.cpp
UTF-8
2,510
2.859375
3
[]
no_license
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include...
true
9ada422f4ab017e2f5d38f2a8ae0340cd5169bd1
C++
iamjatin08/competitive
/DP/LCS.cpp
UTF-8
1,147
2.96875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int lcs(char* s1, char* s2){ if(s1[0]=='\0' || s2[0]=='\0'){ return 0; } if(s1[0]==s2[0]){ return 1+lcs(s1 + 1,s2 + 1); } else{ int opt1 = lcs(s1,s2+1); int opt2 = lcs(s1+1,s2); return max(opt1,opt2); } } int lcsHelper(char* s1, char* s2, ...
true
087b8ffc06b8a06f963cbecf9043c14437193363
C++
tprice108/School-Projects
/COP 3330 - Object Oriented Programming/Assignments/proj-5/matrix.cpp
UTF-8
7,086
3.875
4
[]
no_license
/* Name: Caijun Qin Course and Section: COP3330-0009 Project: 5 Summary: Creates representations of matrices using a single array of unsigned integers. Allows basic matrix operations including summation and matrix product. */ #include <iostream> #include "matrix.h" //CONSTRUCTORS Matrix::Matrix(unsigned int row, unsi...
true
5f53ee9f65b08e9aa7282c9348ad1bc603e9c9ad
C++
timrobot/Tachikoma-Project
/interface/ovr/ovr.cpp
UTF-8
2,194
2.890625
3
[ "MIT" ]
permissive
#include "highgui.h" #include "imgproc.h" #include <cmath> using namespace arma; /* Rift dimensions are generally 2 screens, each 800x640 pixels * so in total 800x1280 * the recommended parameters are 1.0, 0.22, 0.24, 0.0 */ const double u_distortion[4] = { 1.0, 0.22, 0.24, 0 }; // distortion parameters double d...
true
7b9a2e135627ef0d45c6d7295c280c3443f06a59
C++
jnawrocki33/mit_coursework
/calculate_pi.cpp
UTF-8
720
3.34375
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; int const SIZE = 100000000; // int distance(double x, double y) { // return (x*x + y*y) // } int main() { int count = 0; for(int i = 0; i < SIZE; i++) { do...
true
13207c4cb035e68c638379fb8446d6d42e173ae7
C++
dsw5775/bspline
/OpenMP_template/testbspline.cpp
UTF-8
5,968
3.125
3
[]
no_license
#include <iostream> #include "bspline.h" #include "common.h" using std::cout; int main(int argc, char *argv[]) /* testing bspline_1d to bspline_5d with order 6 you can change order with command line parameter, e.g. ./bspline 4 */ { double start, end; int order = 6; if(argc > 1 && isdigit(argv[1][0])) ord...
true
11628b947a6412950cc581239f5e6281c74efcea
C++
N-eeraj/code_website
/Code/cpp/circle.cpp
UTF-8
234
3.3125
3
[]
no_license
#include<iostream> using namespace std; int main() { float radius; cout << "Enter radius: "; cin >> radius; cout << "Area: " << 3.14 * radius * radius; cout << "\nCircumference: "<< 6.28 * radius; return 0; }
true
e4210cc670569638b6034f3b3892880f164e1a3d
C++
vukovic/so1
/src/HEAP.H
UTF-8
465
2.53125
3
[]
no_license
//File: Heap.h #ifndef _HEAP_H_ #define _HEAP_H_ class PCB; class Heap{ public: void insert(PCB* pcb, int key); void remove(Elem* e) private: void siftUp(Elem* e); void siftDown(Elem* e); class Elem{ int prio; PCB* pcb; Elem* childL, *childR, *parent; }; Elem* head; *tail; }; #endif /*-----------...
true
88d168931b4d6c0faf1d8a93e5d5a1950618f6db
C++
Kumarasamy/CloudPushServerDBUSAPI
/Cloud_Push_Curl.cpp
UTF-8
2,145
2.90625
3
[]
no_license
#pragma once #include<cstring> #include<curl/curl.h> #include<cstdlib> #include<iostream> #include<string> #define EMPTY "" using namespace std; class Cloud_Push_Curl { private: typedef struct s_curl { CURL *curl; CURLcode res; struct curl_slist *headers; string cloudURL;...
true
2cbb604a2aa677327966e9475f2a1aee334af465
C++
M4573R/UVa-Online-Judge-1
/11747/11747.cpp
UTF-8
2,022
2.703125
3
[]
no_license
//============================================================== // Coded by: Huynh Nhat Minh // Problem Number: 11747 - Heavy Cycle Edges //============================================================== #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <cctype> #...
true
12d3073e7f0f1301de7a640951707de44e1a5c8e
C++
gonglixue/Mandala-Painting-System
/hybridimage.cpp
UTF-8
5,875
2.796875
3
[]
no_license
#include "hybridimage.h" HybridImage::HybridImage() { } QImage HybridImage::Mat2QImage(const Mat &mat) { // 8-bits unsigned, NO. OF CHANNELS = 1 if(mat.type() == CV_8UC1) { QImage image(mat.cols, mat.rows, QImage::Format_Indexed8); // Set the color table (used to translate co...
true
8adf610ee990e82108734dfaf76a6c4330ab05d3
C++
KnewHow/studyCPlusPlus
/chapter08IO/8.1.cc
UTF-8
297
2.671875
3
[]
no_license
#include<iostream> using std :: cout; using std :: cin; using std :: endl; using std :: istream; istream& same(istream& in) { char c; auto oldState = in.rdstate(); while(in >> c) { cout << c << endl; } in.setstate(oldState); return in; } int main (){ same(cin); return 0; }
true
a8d86ece55797f1aed8995f8a1005cdca7a30fbf
C++
windystrife/UnrealEngine_NVIDIAGameWorks
/Engine/Source/Editor/Persona/Private/EditorObjectsTracker.h
UTF-8
1,065
2.515625
3
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "UObject/GCObject.h" ////////////////////////////////////////////////////////////////////////// // FEditorObjectTracker class FEditorObjectTracker : public FGCObject { public: FEditorObjectTracker(bool bInAl...
true
29e68df56664e88784b515b8fe3b759c6eda998f
C++
kmichaelfox/phase_01
/src/DynamicEvent.cpp
UTF-8
2,238
2.765625
3
[]
no_license
// // DynamicEvent.cpp // phase_01 // // Created by Kelly Fox on 5/7/16. // // #include "DynamicEvent.hpp" #include "ofMain.h" #include "ofxAnimatableFloat.h" using namespace std; DynamicEvent::DynamicEvent(Dynamic d, float offset) : type(STATIC) , dynamic(d) , offset(offset) { } DynamicEvent::DynamicEvent(float...
true
bd5d7a7a3acec996f7d2eb9d8920e5b3d1c8e382
C++
BekzhanKassenov/olymp
/acm.kbtu.kz/Programming langs/93/93.cpp
UTF-8
316
2.53125
3
[]
no_license
#include <iostream> using namespace std; int main() { int n; cin >> n; int tmp1, tmp2, ans = -1,nmb = -1; for (int i = 0; i < n; i++) { cin >> tmp1 >> tmp2; if (tmp2 == 1 && tmp1 > ans) { ans = tmp1; nmb = i + 1; } } if (ans != -1) cout << nmb; else cout << -1; return 0; }
true
977f4edde2a5b2d3d0798ecff5031dc03a3067a9
C++
jacson-junior/openpnp-capture
/win/tests/main.cpp
UTF-8
14,035
2.578125
3
[ "MIT" ]
permissive
/* openpnp test application Niels Moseley */ #include <stdio.h> #include <conio.h> #include <windows.h> // for Sleep #include <chrono> #include "openpnp-capture.h" #include "../common/context.h" void myCustomLogFunction(uint32_t level, const char *string) { printf("== %s", string); } std::string F...
true
ebe2629b7ff0849c13dedeaaa805775e57f80e29
C++
Rampo99/Gravitar
/src/Bunker.cpp
UTF-8
3,041
2.828125
3
[]
no_license
#include "Bunker.h" #include <cstdlib> #include <ctime> #include <iostream> #include <math.h> #define PI 3.141592653589793 double fRand(double fMin, double fMax) // restituisce un reale compreso tra fMin e fMax { double f = (double)rand() / RAND_MAX; return fMin + f * (fMax - fMin); } Bunker::Bunker() { health...
true
107479aeae33dd229c1b46e96c2103b94e5dbed1
C++
mbartling/uTensor-image-tools
/main.cpp
UTF-8
3,766
3.15625
3
[]
no_license
/** * Super hacky host side example program showcasing how to slice up an image in a buffer * and resize the results using uTensor. * */ #include <iostream> #include <stdexcept> #include <string> #include "Interpolation.hpp" #include "SlicedImage.hpp" #include "bitmap_image.hpp" #include "uTensor.h" using std::c...
true
49b8bb59b133e650ad16127fe90a5a3d5214e0b9
C++
cleonro/ThreadBenchmark
/Cpp/resource.cpp
UTF-8
578
3.140625
3
[]
no_license
#include "resource.h" #include <cmath> //#include <random> #include <algorithm> Resource::Resource(size_t size) : m_size(size) { m_v.resize(m_size); } void Resource::generate() { // std::random_device rnd; // std::default_random_engine rne(rnd()); // std::uniform_real_distribution und(0.0, 1.0); ...
true
1243789b846c207b7758558c1a31b7ac68f20ef8
C++
smallHW89/comm_util
/lock_free_list/1p1c_ring_buffer/fifo.h
UTF-8
1,488
3.1875
3
[]
no_license
/******************************************************** * Copyright (C) 2016 All rights reserved. * * Filename:fifo.h * Author :huangwei 497225735@qq.com * Date :2016-12-10 * Describe: 环形队列,定长元素 * * |----------------------------| * in out * out in * ...
true
246cafe53abf3493dc9f90017ce9c6e4bbf2b336
C++
reedboat/applib
/tmp/src/Timer.cpp
UTF-8
271
2.625
3
[]
no_license
/* * */ #include"../include/Timer.h" Timer::Timer() { } Timer::~Timer() { } clock_t Timer::GetCurrentTime() { return clock(); } float Timer::TimeDuration(clock_t & begin,clock_t & end) { return (float)((float)(end-begin)/(float)CLOCKS_PER_SEC); }
true
16aeb355520f45eebf8a3e715c8e404093a21485
C++
JJungwoo/algorithm
/baekjoon/code_plus/basic1/2004.cc
UTF-8
699
3.34375
3
[]
no_license
/* [BOJ] 2004. 조합 0의 개수 nCm = n! / m!*(n-m)! 왜 2와 5의 배수 개수를 구한다음 최소 값을 해줘야 할까?.. 당연히 5의 배수 값이 훨씬 적지 않을까? 이에 대한 반론 예시가 필요하다.. ref: https://jaimemin.tistory.com/908 */ #include <cstdio> #include <algorithm> using namespace std; long long zero_cal(long long num, long long div) { long long sum = 0; while(num) { ...
true
909599256688b6ee4bb20cc9ae109810a7aafb6a
C++
timothybaker/mites_and_stars_simulation
/src/mite.cpp
UTF-8
6,045
3.28125
3
[]
no_license
// // Author: Timothy Baker // cs361: Assignment 2 //"A story of Mites and Stars" // //mite.cpp //////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////...
true
ef29af195cf0f0a85c94745a934af7f0e716ec4c
C++
singhdotabhinav/Arrays
/05_Maximum_Sum_Increasing_Subsequence.cpp
UTF-8
379
2.578125
3
[]
no_license
int msis(int arr[], int n){ int msi[n]; for(int i=0;i<n;i++) msi[i]=arr[i]; for(int i=1;i<n;i++){ for(int j=0;j<i;j++){ if(arr[i]>arr[j]&&msi[i]<arr[i]+msi[j]) msi[i]=arr[i]+ msi[j]; } } int best=0; for(int i=0;i<n;i++){ if(best<...
true
f2fa19cd64443658665c50f949cef8e9f9abc10b
C++
a12fghoen/pcl_cuda
/pcl/cuda/cuda_common.h
UTF-8
1,367
2.53125
3
[]
no_license
#pragma once #include "../pcl/pcl_base.h" #include <thrust/host_vector.h> #include <thrust/device_vector.h> #include <vector_functions.hpp> namespace pclcuda { template<typename T> using PointCloudHost = thrust::host_vector<T>; template<typename T> using PlaneParamHost = thrust::host_vector<T>; template<type...
true
a7485724d7442886d6cdb2f0069d84ecbcf48044
C++
CSIT-GUIDE/THIRD_SEMESTER
/OOP/C++ Lab Works/C++ 5/AMBUIGUITY_MULTIPLE.cpp
UTF-8
1,207
3.203125
3
[]
no_license
/* THIS C++ PROGRAM ILLUSTRATES THE CONCEPT OF AMBUIGITY * ASSOCIATED WITH THE MULTIPLE INHERITANCE */ /* NAME : SAGAR GIRI, ROLL : 205, SECTION : A */ #include <iostream> using namespace std; class Employee //define base class Employee { protected: char name[20]; public: void getName() { cout<<endl<...
true
7ffac24fbf25e67f3dab2a5e5aff68ad22aaa56d
C++
zhanglei/arch
/src/concurrent/thread_rwlock.cpp
UTF-8
2,175
2.78125
3
[]
no_license
/* * thread_rwlock.cpp * * Created on: 2011-4-4 * Author: wqy */ #include "concurrent/thread_rwlock.hpp" #include "exception/api_exception.hpp" #include "util/time_helper.hpp" using namespace arch::concurrent; using namespace arch::exception; using namespace arch::util; ThreadReadWriteLock::T...
true
397cb4f0747010b7b7467e4147c58a7469f1f937
C++
joaopfg/Simple-editor-and-viewer-for-3D-shapes-
/TD1.3/main.cpp
UTF-8
4,298
2.765625
3
[]
no_license
#include <igl/opengl/glfw/Viewer.h> #include <igl/readOFF.h> #include <iostream> #include <ostream> using namespace Eigen; MatrixXd V1; // vertex coordinates of the input mesh MatrixXi F1; // incidence relations between faces and edges RowVector3d rotation_axis(1., 0., 0.); // rotation axis /** * ...
true
02528e78a9dd7c89b80b6e3fbd85818ed9dfceea
C++
rawatamit/lox
/cpplox/include/ASTPrinter.h
UTF-8
3,997
3.125
3
[]
no_license
#include "Expr.h" #include "Stmt.h" #include "Token.h" #include <any> #include <iostream> #include <memory> #include <string> #include <vector> namespace lox { class ASTPrinter : public ExprVisitor, StmtVisitor { public: std::any print(Expr *expr) { return expr->accept(this); } std::any print(Stmt *stmt) { return ...
true
3112732844d0fedf3331bdcfc0ed95ec7179bc7e
C++
Faaux/DingoEngine
/src/graphics/Framebuffer.h
UTF-8
947
2.640625
3
[ "MIT" ]
permissive
/** * @file Framebuffer.h * @author Faaux (github.com/Faaux) * @date 11 February 2018 */ #pragma once #include "Texture.h" #include "engine/Types.h" #include "math/GLMInclude.h" namespace DG { class Framebuffer { public: Framebuffer() = default; ~Framebuffer() = default; void Initialize(...
true
7c8e1da2ad5e6828a37d145d83a81bab07d27bfa
C++
gitahn59/Algorithm
/backjoon/boj_01473_미로 탈출-bfs.cpp
UHC
2,942
2.703125
3
[ "MIT" ]
permissive
/* boj_01473_̷ Ż(̵ : 1) bfs ̵ Ǵܰ bitmask ̿ 湮 θ Ȯϴ ٷο */ #include <iostream> #include <queue> #include <vector> #include <map> #include <algorithm> #include <string> #include <cstring> #include <stack> #include <cmath> #include <set> #include <bitset> #include <climits> #include <tuple> #define...
true
bb5f27c936e7f7608fdcd8fe800bc0f7e015ccca
C++
Joseph-Castrejon/Harmonic-Series
/harmonics.cpp
UTF-8
1,020
3.5625
4
[]
no_license
#include<math.h> #include<iostream> #include<cstring> #include<stdlib.h> using namespace std; double HarmonicSeries(long int n); int main(int argc, char *argv[]) { long int n; if(argc == 2) { cout << "Harmonic Series Calculator by JC" << endl; cout << "Calculating for " << atoi(argv[1]) << " terms" << endl;...
true
35130e578ffce65537b78e133b197d88f3b11627
C++
ljjhome/CPrimerPractice
/chp15/Basket.hpp
UTF-8
897
3.203125
3
[]
no_license
#ifndef BASKET_HPP #define BASKET_HPP #include "Sales_data.hpp" #include <set> #include <memory> #include "Quote.hpp" class Basket { public: void add_item(const Quote & sale){ items.insert(std::shared_ptr<Quote>(sale.clone())); } void add_item(Quote && sale){ items.insert(std::shared_ptr<Quote>(std::move(sale)...
true
f5a1ced91ad9bb024fd57b832635639626a30b98
C++
fredfeng/compass
/compass/summary/SummaryClosure.h
UTF-8
11,386
2.671875
3
[]
no_license
/* * SummaryClosure.h * * Created on: Mar 9, 2009 * Author: isil */ #ifndef SUMMARYCLOSURE_H_ #define SUMMARYCLOSURE_H_ #include <vector> #include <string> #include <set> #include <map> #include "Constraint.h" #include "Edge.h" using namespace std; class SummaryGraph; class AccessPath; class MemoryLocati...
true
8fb7fce44f9a9baabac87b5b8faabb3fba9de556
C++
ekaan/CS406-Parallel-Computing
/HW2/seq_v2.cpp
UTF-8
17,711
2.703125
3
[]
no_license
#include <stdio.h> #include <iostream> #include <fstream> #include <sstream> #include <omp.h> #include <string> #include <cmath> #include <cstring> #include <vector> #include <algorithm> #include <unordered_map> #include <unordered_set> #include <boost/functional/hash.hpp> using namespace std; struct CRS { int* col;...
true
16c10f0a0575571465ce435e8a7fa38e20aab628
C++
Madhuraaaaa/cpp-stl_assignments
/speed_average.cpp
UTF-8
625
3.1875
3
[ "BSD-2-Clause" ]
permissive
#include <string> #include <list> #include <iterator> #include <iostream> #include <utility> #include <bits/stdc++.h> using namespace std; double average(vector<int> vec, int length_l) { double sum=0; for (auto i = vec.begin(); i != vec.end(); ++i) { sum=sum+*i; } return sum/...
true
1651573b8f2d0c0e57c419bf2476211f6e391747
C++
lvyong1943/EvHttp
/Utilis/Logger.h
UTF-8
2,705
2.59375
3
[ "MIT" ]
permissive
/** * Copyright (c) 2019, ATP * All rights reserved. * MIT License */ #ifndef __UTILIS_LOGGER_H__ #define __UTILIS_LOGGER_H__ #include <string> #include <list> #include <thread> #include <mutex> #include <condition_variable> #include "NonCopyable.h" namespace Utilis { const int kLogMsgLen = 4...
true
bd79f8d0c895a7c7d1eb0013545e2cdc62d576d9
C++
kbu1564/SimpleAlgorithm
/acmicpc.net/1173.cpp
UTF-8
421
2.75
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; int BEAT[201]; int main() { int N, m, M, T, R; cin >> N >> m >> M >> T >> R; int turn = 0; int count = 0; int beat = m; while (count < N) { if (beat + T <= M) { beat += T; count++; } else { beat -= R; if (BEAT[beat] == count) { turn = -1; break; } ...
true
422a0ad824d488aa6b7960cd15fe115dc988a075
C++
Trietptm-on-Security/SoNew
/SoNewCmd/sonewargumentparser.cpp
UTF-8
616
2.765625
3
[]
no_license
#include "sonewargumentparser.h" namespace SoNew { void SoNewArgumentParser::showHelp(const std::string& programName, const int spacing) const { cout << programName << endl; cout << "Options:" << endl; for (vector<Argument>::const_iterator i = vargs.begin(); i != vargs.end(); ++i) { string options = ""; i...
true
4332397c118a78b3945115123fd3e4e37c39113c
C++
huangwei1024/my_lib
/CompressMap.h
GB18030
6,075
2.859375
3
[]
no_license
/* @file CompressMap.h @author huangwei @param Email: huang-wei@corp.netease.com @param Copyright (c) 2004-2013 ׵繤 @date 2013/4/28 @brief */ #pragma once #ifndef __COMPRESSMAP_H__ #define __COMPRESSMAP_H__ #include <map> #include <vector> #include <algorithm> /** * CompressStorage * * ѹ洢 * ڻֻ֧ջ * ̰߳ȫ ...
true
358a647595c83bdf6312ac6bfeb837362605c9fd
C++
bertbuchholz/Particular
/src/Fps.h
UTF-8
1,073
3.125
3
[]
no_license
#ifndef FPS_H #define FPS_H #include <chrono> class Fps_meter { public: Fps_meter() : _fps(0.0f), _frame_counter(0) { start(); } void start() { _last_check = std::chrono::steady_clock::now(); } float get_fps() { _has_new_value = false; ...
true
6864c4e83c693632e8650eefe0d194ab6eece848
C++
zxcvbnmmz/GraDeath
/GraDeath/Source/Pool/ObjectPool.cpp
SHIFT_JIS
2,130
3.09375
3
[]
no_license
#include "Pool/ObjectPool.h" #include "Pool/Ref.h" #include <algorithm> ObjectPoolManager* ObjectPoolManager::manager = nullptr; ObjectPool::ObjectPool(){ managedObject.reserve(200); ObjectPoolManager::GetInstance()->Push(this); } ObjectPool::~ObjectPool(){ Clear(); ObjectPoolManager::GetInstance()->Pop(); } v...
true
23163b6b1d665865045c33e64d738f8894719a1d
C++
EmadRajeh/Beginning-C-Programming-From-Beginner-to-Beyond-Problem-solutions
/STLSets.cpp
UTF-8
2,431
3.4375
3
[]
no_license
// // main.cpp // Standard Template Library // // Created by Emad Rajeh on 27/06/2020. // Copyright © 2020 Emad Rajeh. All rights reserved. // #include <iostream> #include <algorithm> #include <vector> #include <bits/stdc++.h> #define nline "\n" using namespace std; class Person{ friend ostream &operator<<(o...
true
52f2d74e4388dfe8e43331d55fd2b00fbd52b19a
C++
ChangguHan/studyAlgorithm
/ETC/BJ-11328.cpp
UTF-8
807
3.21875
3
[]
no_license
// 개수만 비교하면 될듯 #include <iostream> #include <string> using namespace std; int alpha1[26]; int alpha2[26]; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; while(n--) { fill(alpha1, alpha1+26, 0); fill(alpha2, alpha2+26, 0); string a, b; cin >> a >...
true