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
e74fbd94e3fcfb5d8ae67d9356d04cc29cc6a8d3
C++
wzit/CPP-Actor-framework
/MyActor/actor/async_buffer.h
GB18030
19,822
2.890625
3
[]
no_license
#ifndef __ASYNC_BUFFER_H #define __ASYNC_BUFFER_H #include <memory> #include "my_actor.h" struct async_buffer_close_exception {}; template <typename T> class fixed_buffer { struct node { void destroy() { ((T*)space)->~T(); #if (_DEBUG || DEBUG) memset(space, 0xcf, sizeof(space)); #endif } template <...
true
04cd5b2cc78c3d8fb714f0e6e317c18f36760917
C++
SherlockUnknowEn/leetcode
/字符串/1234.替换子串得到平衡字符串.cpp
UTF-8
2,834
3.53125
4
[]
no_license
/* * @lc app=leetcode.cn id=1234 lang=cpp * * [1234] 替换子串得到平衡字符串 */ // @lc code=start class Solution { public: int balancedString(string s) { unordered_map<char, int> memo; for (int i = 0; i < s.size(); i++) { memo[s[i]]++; } int avg = s.size() / 4; unordered...
true
0848e8561756570937a315d3ab7834b55cddc583
C++
Ethiraric/demangler
/include/demangler/details/node/Decltype.hh
UTF-8
840
2.59375
3
[ "MIT" ]
permissive
#ifndef DEMANGLER_DETAILS_NODE_DECLTYPE_HH_ #define DEMANGLER_DETAILS_NODE_DECLTYPE_HH_ #include <demangler/details/Node.hh> namespace demangler { namespace details { namespace node { class Decltype : public Node { public: Decltype() noexcept; Decltype(clone_tag, Decltype const& b); Decltype(Decltype const& b) ...
true
7874fffe3062ba7ec577a18bd3ab15dfb871ad34
C++
IIvexII/Noodle
/lib/core/student.h
UTF-8
6,836
3.28125
3
[]
no_license
#include "header.h" #include "customInput.h" #include "question.h" #pragma once #define FILENAME "resources/student.bin" class Student{ public: char name[50]; int rollNo; char password[100]; double marks=-1; }; class StudentManagement{ private: Student student, tmpStudent; QuestionHandle...
true
ff0d175a54cfa450c4177a82846bd5f671c6d37c
C++
YiheWang/ECE4320Robotics
/project3/project3.ino
UTF-8
6,155
2.8125
3
[]
no_license
int chairState; int button = 6; int buttonState; int pressSensor = A8; int smDirectionPin1 = 24; //Direction pin int smStepPin1 = 26; //Stepper pin int smEnablePin1 = 22; //Motor enable pin int smDirectionPin2 = 32; //Direction pin int smStepPin2 = 30; //Stepper pin int smEnablePin2 = 28; //Motor enable pin int sm...
true
d33cad431d9d60cfba4614b07bd97e33b8655f4c
C++
JosephFoster118/TPPDatabase
/DBPopulate/src/main.cpp
UTF-8
2,980
3.09375
3
[]
no_license
#include <stdio.h> #include <string.h> #include <mysql.h> #include <unistd.h> #include <ctype.h> #include "Pokemon.h" #define BUFFER_SIZE 16384 int deleteTable(MYSQL *db, const char* table) { int result = 0; char output[BUFFER_SIZE]; memset(output,0,BUFFER_SIZE); sprintf(output,"DROP TABLE %s;",table); result...
true
33d2634b57212834ce8ea544e42c4a3ac8674d24
C++
iRail/libqtrail
/api/reader/vehiclereader.h
UTF-8
1,023
2.515625
3
[]
no_license
// // Configuration // // Include guard #ifndef VEHICLEREADER_H #define VEHICLEREADER_H // Includes #include <QHash> #include <QDateTime> #include "api/reader.h" #include "api/data/stop.h" #include "api/data/vehicle.h" namespace iRail { class VehicleReader : public Reader { Q_OBJECT public: /...
true
ac0668661b143c460a6910453adcdfdc71850e62
C++
lips-hci/ae400-realsense-sdk
/unit-tests/utilities/number/stabilized/test-empty.cpp
UTF-8
767
2.53125
3
[ "GPL-1.0-or-later", "OFL-1.1", "GPL-2.0-only", "GPL-3.0-only", "BSL-1.0", "MIT", "Apache-2.0", "LGPL-2.1-only", "LicenseRef-scancode-public-domain", "Zlib", "BSD-2-Clause", "BSD-3-Clause", "BSD-1-Clause", "Unlicense" ]
permissive
// License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. //#cmake:add-file ../../../../common/utilities/number/stabilized-value.h #include "../../../test.h" #include <../common/utilities/number/stabilized-value.h> using namespace utilities::number; //...
true
52500c88a6bb8c068e70bd135b34947599590c05
C++
ruisebastiao/LibGairp
/LibGairP/LibGairP/Polygon.h
UTF-8
1,651
2.71875
3
[]
no_license
// // Polygon.h // LibGairP // // Created by Giorgi Pataraia on 27/12/2013. // Copyright (c) 2013 Giorgi Pataraia LLC. All rights reserved. // #ifndef LibGairP_Polygon_h #define LibGairP_Polygon_h #include "DrawableObject.h" const int MaxPointCount = 4; class Polygon : public DrawableObject { protected: int...
true
01ce27100db2cf5cb8e8beaddb8732e5b8fd7796
C++
boyuandong/C-Practice
/C++/file_stream/bookstore/bookstore_manage.cpp
UTF-8
923
3.25
3
[]
no_license
// bookstore_manage.cpp // create main menu and choos option #include "bookstore_manage.h" const char *fileDat = "booksFile.dat"; int main() { char choice; while(1) { cout<<"************ 书库管理 *************\n请输入操作选择\n" <<"1: 入库\t2: 售出\t3: 查询\t4: 建立文本\t0: 初始化\tQ: 退出\n"; cin>>choic...
true
e57c13c04326f8ab6a084db3830d7898da2adf49
C++
jmlien/shepherding
/simulator/release/release-Nov-04-2009/include/behaviors/behaviors.c/multi_herding/distributeShepherds.h
UTF-8
3,703
2.59375
3
[ "MIT" ]
permissive
#ifndef SHEPHERD_DISTRIBUTION_H #define SHEPHERD_DISTRIBUTION_H #include "sh_ForceRules.h" #include "sh_BehaviorRules.h" #include "sh_MapBasedFlockState.h" #include "func/sh_FlockFunc.h" #include "simple_herding.h" #include "sh_dyPRM.h" #include "sh_CollisionDetection.h" #include "simple_herding.h" //# Here the shep...
true
b10c4393323222b5d607a6bc3721789580fcef4a
C++
tangxifan/libOpenFPGA
/libs/EXTERNAL/libtatum/libtatum/tatum/SetupHoldAnalysis.hpp
UTF-8
4,117
2.515625
3
[ "MIT" ]
permissive
#pragma once #include "SetupAnalysis.hpp" #include "HoldAnalysis.hpp" #include "tatum/delay_calc/DelayCalculator.hpp" #include "tatum/graph_visitors/GraphVisitor.hpp" namespace tatum { /** \class SetupHoldAnalysis * * The SetupHoldAnalysis class defines the operations needed by a timing analyzer * to perform a com...
true
1a7a4a3aa526d163c3ce05e7c63340f7e61e91e2
C++
AnkurSheel/codingame_old
/c++/tests/Medium/MayanCalculationTest.cpp
UTF-8
5,365
2.6875
3
[]
no_license
#include <fstream> #include "Common/Includes.h" #include "Common/RedirectIO.h" #include "Medium/MayanCalculation.h" #include "gtest/gtest.h" using namespace std; class MayanCalculationTest : public ::testing::Test { virtual void SetUp() override { Common::RedirectCin(inputFile); Common::RedirectCout(outp...
true
12c811cd02ba64aaba98ededf2315328b01c8d98
C++
kks227/BOJ
/6100/6125.cpp
UTF-8
447
2.578125
3
[]
no_license
#include <cstdio> #include <stack> using namespace std; int main(){ int P, NS, T, p[5000], l[5000], r[5000]; scanf("%d %d %d", &P, &NS, &T); T--; for(int i=0; i<NS; i++){ int u, v, w; scanf("%d %d %d", &u, &v, &w); u--; v--; w--; l[u] = v; r[u] = w; p[v] = p[w] = u; } stack<int> S; S.push(T); while(...
true
c4a3d4c6f3420acb0f1024ad320280ff451468b7
C++
JuliaYu2002/HunterDE
/Comp Sci 127 hw/tempConvert_jy.cpp
UTF-8
474
3.734375
4
[]
no_license
// Name: Julia Yu // Date: November 8, 2019 // Email: julia.yu83@myhunter.cuny.edu // This program takes in a temperature in farenheit and converts it to celsius #include <iostream> using namespace std; int main() { float temp; cout << "Enter temperature in farenheit: "; cin >> temp; temp...
true
9743953a7e77f83496f02cc52895a1658616408a
C++
vienbk91/gunbound
/Classes/Object/Character/Character.cpp
UTF-8
6,285
2.671875
3
[]
no_license
#include "Object/Character/Character.h" ////////////////////////////////////////////////////////////////////////////////////////////// // KHOI TAO DOI TUONG CHARACTER ////////////////////////////////////////////////////////////////////////////////////////////// Character* Character::createCharacterWithId(int characte...
true
fa10f687a6cb60ccd9a7d8441d46b0622781d073
C++
MarqSevadera/InBetween
/RockPaperScissor.cpp
UTF-8
7,958
2.828125
3
[]
no_license
#include "stdafx.h" #include "RockPaperScissor.h" #include <iostream> RockPaperScissor::RPSWinner RockPaperScissor::PlayRPS(sf::RenderWindow& renderWindow) { bgImg.loadFromFile("images/rps-bg.png"); InitializeWeapons(); LoadImages(); InitializeSprites(); srand(time(NULL)); sf::Event event; while (true...
true
2a62b8c1b5e5e7b415db23344e3cd782d8ee37b3
C++
hardikvaniya/Operating-System-Lab
/6-deadlock_detection.cpp
UTF-8
5,273
2.640625
3
[]
no_license
#include <iostream> using namespace std; #define res 1 int Allocation[10][2] , Max[10][2] , Available[2], Need[10][2] , c_Available[2]; // 2 resources int Request[10][2], n , i , j , flag=0 , counter=0, pcom=0 , rp; int safety_check(); void resource_request(); int req_allo(); int req_need(); int mai...
true
ba707e7d8d5e390ca8754e558d2e72f6bc7d991d
C++
kimngoc58131350/TTCS58-Nhom1
/Bai3/bai4kimngoc58131350.cpp
UTF-8
1,545
2.6875
3
[]
no_license
#include <iostream> #include <conio.h> #include <iomanip> #include <vector> #include <fstream> using namespace std; int dem=0, n; vector< int > cachTang; vector< vector< int > > xuat; void docFile(int &n, int &m, vector< int > &a){ ifstream infile; infile.open("input4.txt"); infile>>n; infile.ignore(255, ' '); i...
true
ffd8fe6b66409f3402b8a6b23ec0021daddcc104
C++
bmw147/dictionary
/program1/src/second/Timer.cc
UTF-8
940
2.765625
3
[]
no_license
#include "Timer.h" #include "Mylogger.h" #include <unistd.h> #include <sys/timerfd.h> namespace mysp { Timer::Timer(int initialTime, int intervalTime, TimerCallBack cb) : _timerfd(createTimerfd()) , _initialTime(initialTime) , _intervalTime(intervalTime) , _isStarted(false) , _cb(cb){ } void Timer::start(){ _isSt...
true
e1c10add09ab1efcbe9b31eb3348c53a6abfb4c3
C++
nathan-tagg/asteroids
/superSpacer.h
UTF-8
2,089
2.84375
3
[ "MIT" ]
permissive
#ifndef SUPERSPACER_H #define SUPERSPACER_H #include <math.h> #include "uiDraw.h" #include "ship.h" class SuperSpacer : public Ship { private: bool thrust; bool scope; public: /*********************************************** * Constructors. ***********************************************/ SuperSpacer(...
true
438c4305458659111abff0ad138461438b551e2e
C++
organicmaps/organicmaps
/platform/battery_tracker.hpp
UTF-8
664
2.78125
3
[ "Apache-2.0" ]
permissive
#pragma once #include <chrono> #include <cstdint> #include <vector> namespace platform { // Note: this class is NOT thread-safe. class BatteryLevelTracker { public: class Subscriber { public: virtual void OnBatteryLevelReceived(uint8_t level) = 0; protected: virtual ~Subscriber() = default; }; vo...
true
6d2fb6547314f0db395c195d745df1dd3dcbeb99
C++
pxie08/WAR-Card-Game
/hw7/cards.cpp
UTF-8
3,357
3.65625
4
[]
no_license
/*************************************************** ** cards.cpp ** Definitions of the Card and Player class member functions. ** Patrick Xie, 2/26/10 ****************************************************/ #include "cards.h" #include <string> #include <ctime> /*************************************************** ** Car...
true
d7c605ba3749c8f8be0abcab79529249f40e76de
C++
greggS/QEES-ROS2-Labs
/src/test_score/test_score.cpp
UTF-8
4,266
2.53125
3
[]
no_license
#include "rclcpp/rclcpp.hpp" #include "std_msgs/msg/float32.hpp" #include "std_msgs/msg/bool.hpp" #include <sensor_msgs/msg/laser_scan.hpp> #include <sys/time.h> using std::placeholders::_1; #define TEST_PASS_ODOMETRY_DISTANCE 100 #define TEST_FAILE_SAFETY_DISTANCE 0.3 #define EFFICIENCY_WEIGHT 0.2 #define SAFETY_...
true
3c5bedf6daf8746d3dddb1f1747df0dc683893be
C++
KevinThelly/Code-Chef
/January 2020/Breaking_bricks.cpp
UTF-8
487
2.5625
3
[]
no_license
#include <iostream> using namespace std; int main() { int t,s,w[3]; cin>>t; for(int i=0;i<t;i++){ cin>>s>>w[0]>>w[1]>>w[2]; int ans=0; if(w[0]+w[1]>s){ if(w[1]+w[2]>s){ ans=3; } else{ ans=2; } } else if(w[2]+w[1]>s){ if(w[1]+w[0]>s){ ans...
true
17dc27143e25316bcbfa3e8e4542e2bb6d6e6ca9
C++
prakharR534/GFG-Practice-
/Krishnamurthy number .cpp
UTF-8
716
3.21875
3
[]
no_license
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int fact(int n){ if(n==0) return 1; return n*fact(n-1); } string isKrishnamurthy(int N) { // code here int n=N,r,sum=0; while(n){ r...
true
d8480a6f7f8130110bdcfc9216e9aadb32864c10
C++
isl-org/Open3D
/examples/cpp/Image.cpp
UTF-8
6,440
2.734375
3
[ "MIT" ]
permissive
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // Copyright (c) 2018-2023 www.open3d.org // SPDX-License-Identifier: MIT // ---...
true
516d4d7cad64e229d02272a12d598a14df58f531
C++
AbiterVX/In-ClassLearning
/数据结构/实习4/第二题/MST/mstheap.h
UTF-8
2,943
3.71875
4
[]
no_license
#ifndef MSTHEAP_H #define MSTHEAP_H #endif // MSTHEAP_H #include<algorithm> #include<iostream> using namespace std; #define Max 2147483647 struct Node { int FirstAddress; int SecondAddress; int Weight; Node(int first=-1, int second=-1, int weight= Max) { FirstAddress = first; seco...
true
8b63baaa2f52bbd72bba411f3196a57eecfe1538
C++
RobbieCyy/Computational_Physics
/Exercise_1/src/cpp/Problem_3/main.cpp
UTF-8
3,163
3
3
[]
no_license
#include <iostream> #include <iomanip> #include <fstream> using namespace std; double a, b, tau_a, tau_b, t, delta; double a_prev; double b_prev; ofstream out("result.txt"); // The core of the ODE solver, where magic happens (lol) void solve_core() { // Method 1 // Naive iteration /* a -= delta * a_prev / tau_a; ...
true
476335e1054fa5e97b2e91d2f1a4e1847b5c873e
C++
80mdelccc/Programas-2do-parcial
/programa 24/main.cpp
UTF-8
893
3.40625
3
[]
no_license
#include <iostream> using namespace std; char nombre[30]; int turno; double ventas, comis, pcomis; void Datos(char nombre[], int &turno, double &ventas) { cout<<"Ingresar nombre...."; cin>>nombre; do { cout<<"Ingresar turno 1-3...."; cin>>turno; } while (!(turno==1 or turno==2...
true
7375cab6fc72807f9d618328000498d0ed3ec5e2
C++
Owenyang1997/Cproject
/数据结构/ConsoleApplication3/ConsoleApplication3/Dog.cpp
GB18030
269
2.578125
3
[]
no_license
#include "stdafx.h" #include "Dog.h" #include<iostream> using namespace std; Dog::Dog() { cout << "Dog캯" << endl; } Dog::~Dog() { cout << "Dog캯xiaoshi" << endl; } void main() { Dog b; b.setName(""); b.SetAge(6); b.print(); }
true
37df3a38b81030f7761fdc9aa4c0f337956f4c79
C++
ErikHorus1249/SPOJ-MS
/May/bai9.cpp
UTF-8
287
2.703125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; bool check = true; for (int i = 2; i <= sqrt(n); i++) { if(n % i == 0) check = false; } if(check) cout << " So n la so nguyen to : " ; else cout << " So n khong phai la so nguyen to : " ; }
true
2351338a716da8cb3b62e1bab71fa5057a40707b
C++
Tomelinski/Snake
/Source.cpp
UTF-8
9,166
2.9375
3
[]
no_license
/* Author: Tom Zielinski Date: 3/23/2020 Program: Snake Program Description: */ #include "iostream" #include "windows.h" // For colours, Beep(), and Sleep() #include "conio.h" // For using the arrow keys #include "Random.cpp" #include "Console.cpp" #include "fstream" #include "vector" #include "Users.cpp" #include "a...
true
92c00810c56e2a902e8d5e7adf59f6cb7ba4a5a6
C++
opencv/opencv_contrib
/modules/cvv/src/qtutil/matchview/falsecolorkeypointpen.hpp
UTF-8
929
2.6875
3
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
#ifndef CVVISUAL_FALSE_COLOR_KEY_POINT_PEN #define CVVISUAL_FALSE_COLOR_KEY_POINT_PEN #include <vector> #include "opencv2/features2d.hpp" #include "keypointvaluechooser.hpp" #include "keypointsettings.hpp" namespace cvv { namespace qtutil { /** * @brief this pen gives the falsecolor of the distance value to the k...
true
455f4eca58cbb246f24878f7e1d66c7720f18943
C++
skagnihotri/algorithm
/basics/100 door problem.cpp
UTF-8
241
2.8125
3
[]
no_license
#include <iostream> using namespace std; int main(){ int flag; for(int i = 1; i<101; i++){ flag = 0; for(int j = 1; j <= i; j++){ if(i % j == 0){ flag += 1; } } if(flag % 2 != 0){ cout<<i<<endl; } } return 0; }
true
bbd1c096799f8ef6e007931368b07c6c3a207b2e
C++
Keeganfn/CS-162
/assignment5/linked_list.cpp
UTF-8
9,669
3.875
4
[]
no_license
/****************************************************** ** Program: linked_list.cpp ** Author: Keegan Nave ** Date: 06/09/2019 ** Description: This is the implementation of my linked list class, it does all list functions and has sorting ** Input: takes input through push_back, push_front, and insert ** Output: outpu...
true
ba4093337924957700f497e0094feac5ffcc94fb
C++
flyq/datastruct-algorithm
/others/fast_sqrt/c_version/test.cpp
UTF-8
2,654
2.984375
3
[ "MIT" ]
permissive
// TestC.cpp : 定义控制台应用程序的入口点。 // //#include <stdafx.h> #include <math.h> //#include <windows.h> #define eps 1e-7 float InvSqrt(float x) { float xhalf = 0.5f*x; int i = *(int*)&x; // get bits for floating VALUE i = 0x5f375a86- (i>>1); // gives initial guess y0 x = *(float*)&i; // convert bits BACK to float x = x*...
true
7a8ef73e9f6d2684e4e7d7576448bfbf0797f3e5
C++
du0002in/stereovision-on-road-detection
/P_RANSAC.cpp
UTF-8
11,720
2.5625
3
[ "MIT" ]
permissive
// mex file to run RANSAC to improve speed // input: 2xn matrix with 1st row being x and 2nd row being y. n refers to the number of points // ouput: 1xn matrix (or row vector) to indicate whether the corresponding points are inliers (1) or not (0) // fitting left and right img seperately #include "mex.h" #include ...
true
8b8f0a142eb80dd27bde2b8b899285d0c48448b8
C++
jhemdan/collision
/collision/src/world.cpp
UTF-8
2,834
2.703125
3
[]
no_license
#include "world.h" #include "entity.h" #include "jaw_macros.h" #include "cam_ent.h" #include <algorithm> namespace jaw { World::World() { layer_flag = false; cam_ent = new CamEnt(); cam_ent->size = { 400.0f, 300.0f }; add_entity(cam_ent); } World::~World() { delete cam_ent; } void World::add_ent...
true
b7895e0ac23a5d5e2f8a365454c9562d9bc4fb05
C++
George-Tech/cpp_stl
/data_search.cpp
GB18030
1,523
3.5
4
[]
no_license
#include "data_struct_head.h" #include <vector> void proc_search() { vector<int> seq{ 2, 4, 1, 3, 6, 8 }; vector<int> hal{ 1, 2, 3, 4, 5, 6, 9 }; cout << "˳ң3 = " << seq_search(seq, 3) << endl; cout << "԰ң3 = " << half_search(hal, 2) << endl; cout << "԰ң6 = " << half_res_search(hal, 2, 0, 6) << endl; vector<int>...
true
b93e07799496d48ec3f4113435bfa712d0c3c4c0
C++
dmoa/vision-blurry
/Depricated/_StateMachine/State.hpp
UTF-8
403
2.53125
3
[]
no_license
namespace { class State { private: Draw(sf::RenderWindow* window); Update(sf::Int32* dt, sf::Event* event); // we don't need to pass the window (into update), because we already polled the window for events and filled "event" up // with things such as keys pressed, so there's no need to poll again. /...
true
6dd3a9acea50c244fad449697074dfb273da4586
C++
xiaochun-yang/19-ID
/RobotDHS/src/activeObject.cpp
UTF-8
1,369
2.609375
3
[]
no_license
#include "activeObject.h" #include "XOSSingleLock.h" activeObject::activeObject( ): m_Status(STOPPED), m_CmdStop(FALSE), m_CmdReset(FALSE), m_FlagEmergency(FALSE), m_ObserverList( 10 ) { xos_mutex_create( &m_ObserverQLock ); } activeObject::~activeObject( ) { xos_mutex...
true
33623bd5ff8e10ed9bb59e778ca7ec6e4d138bd4
C++
Xu-Xihe/codes-and-docs-xxh
/openjudge/1.2/10.cpp
UTF-8
143
2.578125
3
[]
no_license
#include<iostream> #include<cstring> using namespace std; int main() { char d[]="Hello, World!"; int a; a=sizeof(d); cout<<a; }
true
ec949c2802a793e97cc0a243ffb7762177e3e5d8
C++
vshyshkin/pwr
/semester-3/tep/lab11/diffindividual.h
UTF-8
834
2.703125
3
[]
no_license
#ifndef DIFFINDIVIDUAL_H #define DIFFINDIVIDUAL_H #include "mscnproblem.h" class DiffIndividual { public: DiffIndividual(); DiffIndividual(double fitness, Table<double> &genotype, bool areConstraintsSatisfied); double getFitness() const; void setFitness(double value); Table<double> getGenotype() ...
true
b7739f1d927402bb6c5336f4d0dd98a2a64fdc32
C++
Kallaf/UVA
/MATHEMATICS/NUMBER THEORY/Functions involving Prime Factors/UVa 00294.cpp
UTF-8
1,412
2.609375
3
[]
no_license
#include<bits/stdc++.h> #define ll long long int #define vi vector<int> using namespace std; ll _sieve_size; bitset<1000000010> bs; vi primes; void sieve(ll upperbound) { _sieve_size = upperbound + 1; bs.set(); bs[0] = bs[1] = 0; for (ll i = 2; i <= _sieve_size; i++) if (bs[i]) { ...
true
2238f064c5318d0acb542bf79d78be05fc716797
C++
clwyatt/CTC
/Reference/HongLi/src/common/Dicom.cc
UTF-8
5,945
2.859375
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/******************************************************** File: Dicom.cc Abstract: Implementation for Dicom See header (Dicom.hh) for documentation Last Revision ($Revision: 1.1.1.1 $) by $Author: hongli $ on $Date: 2002/12/06 21:49:32 $ *********************************************************/ #include "Dicom.hh...
true
c12a712e0d580640594c1ca56f7b4a6ff7d49be6
C++
BitJetKit/FastHumanDetection
/src/fhd_block_allocator.cpp
UTF-8
2,641
2.953125
3
[ "MIT" ]
permissive
#include "fhd_block_allocator.h" #include <stdint.h> #include <stdlib.h> #include <assert.h> struct fhd_alloc_slot { void* ptr; int idx; }; struct fhd_block_allocator { int block_size; int num_bytes; int num_blocks; uint8_t* memory; int free_indices_len; int* free_indices; int full_slots_len; fhd...
true
23010bd98cb6b4a94bf877163300727f704568da
C++
VoronovaMasha/nrtl
/core/meshalgorithm/MeshAlgorithm.h
UTF-8
3,753
2.546875
3
[]
no_license
#ifndef MESHALGORITHM_H #define MESHALGORITHM_H #include "meshmodel.h" #include <QMatrix4x4> #include <string> #include <QMutex> struct MeshTopology { static QString errorString() { return _error_string; } static PolygonMatrix makePolygonMatrix(MeshModel* mesh); static MeshBorder makeBorder...
true
e008ca371892535f664ab3f5986649cc373d15e3
C++
IanFeldman/dungeon-crawler
/dungeon.cpp
UTF-8
15,598
3
3
[]
no_license
#include "dungeon.h" #include "game.h" #include "node.h" #include "room.h" #include "wall.h" #include "collisioncomponent.h" #include "spritecomponent.h" // unneeded #include "player.h" // unneeded #include <vector> #include <set> #include <iostream> #include <string> #include <map> Dungeon::Dungeon(Game...
true
46e3144ca15a00fbaa5a4cfd038c59bfef814ab9
C++
simeonfilev/Tickets
/sources/Event.cpp
UTF-8
2,468
3.390625
3
[]
no_license
// // Created by Moni on 04-May-20. // #include "../headers/Event.h" const std::string &Event::getName() const { return name; } void Event::setName(const std::string &name) { Event::name = name; } const Hall Event::getHall() const { return this->hall; } void Event::setHall(const Hall hall) { Event...
true
484d7a54e534f673c98b6a6943d3080dcc6444ff
C++
HaikuArchives/Paladin
/Paladin/PreviewFeatures/CommandOutputHandler.cpp
UTF-8
2,064
2.796875
3
[ "MIT" ]
permissive
#include "CommandOutputHandler.h" #include <string> #include <iostream> #include <Handler.h> #include "CommandThread.h" CommandOutputHandler::CommandOutputHandler(bool reto) : BHandler(), out(), err(), redirectErrToOut(reto), exited(false), failed(false) { ; } CommandOutputHandler::~CommandOutputH...
true
5d1403a2e0bc223bc36c8d6cb0686764f3459f6f
C++
P79N6A/mygoodcoder
/src/util.h
UTF-8
1,576
3.140625
3
[]
no_license
/* * @File_name: utin.h * @Description: * @Author: liuyuan21@baidu.com * @Date: 2019-08-28 10:53:16 * @LastEditTime: 2019-08-28 11:30:17 */ #ifndef GOODCODER_UTIL_H #define GOODCODER_UTIL_H #include <string> #include <vector> #include <sstream> #include <boost/algorithm/string/classification.hpp> #include <boos...
true
552f9ecd59731e13f09900b4e98605a286911551
C++
rmfmd1345/Philosopher-s-Stone
/Win32APIGameBase/System.cpp
UHC
2,546
2.53125
3
[]
no_license
#include "stdafx.h" #include "System.h" void ApiSystem::Initialize() //ʱȭ { DrawManager::Initialize(); FrameManager::Initilaize(); SetFramePerSec(60.0f); // 60 ApiSystem::CreateApiWindow(); // (= BaseWindow ) ObjPool->CreateObject(m_hWnd); //ƮǮ Ʈ ʱȭ m_bIsActive = true; } void ApiSystem::Run() { MSG msg...
true
7402a8e9ead4aa510352ec15241d6d96cf2fba15
C++
kumarNith/ProblemSolving
/c++/Cracking the Coding Interviw/urlify.cpp
UTF-8
665
3.40625
3
[]
no_license
#include<iostream> #include<cstring> using namespace std; void urlify(char *s1){ int length; length = strlen(s1); int spaceCount = 0; for(int i =0; i < length;i++){ if(s1[i] == ' ') spaceCount++; } int newLen = length + (spaceCount * 2); cout<<"space count"<<spaceCount<<endl; s1[newLen--] ='\n'; ...
true
84a1d02a8d0cb8acb88187bba59038af17434c46
C++
Bohdashga/OOP_6
/Date.cpp
UTF-8
1,789
3.921875
4
[]
no_license
#include "Date.h" Date::Date() { day = 0; month = 0; year = 0; hours = 0; minutes = 0; } Date::Date(int day, int month, int year, int hours, int minutes) { this->day = day; this->month = month; this->year = year; this->hours = hours; this->minutes = minutes; } Date::Date(const...
true
1ed76f513016d3046bc04a2b0aea04d2edc5cf11
C++
WazeAzure/C-Projects
/ALC/cotest/F.cpp
UTF-8
286
2.796875
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; int temp; for(int i=0;i<n;i++){ cin >> temp; cout << temp/2 + 1 << endl; } return 0; }
true
0310be2d246da3922f43710c36a9680f82af7a15
C++
caiush/DataView
/dataview.h
UTF-8
8,669
2.890625
3
[]
no_license
#ifndef _DATAVIEW_H_ #define _DATAVIEW_H_ #include <stdlib.h> #include <stdio.h> #include <iostream> #include <vector> using std::vector; #include "timeStamp.h" // // TODO: strip out colMajor stuff again. // class DataContainer{ // // This class just takes care of the polymorphism, at some point // the mem...
true
1abb33ce669e9645248e1464eaffd6b5995b628d
C++
Aisore/LABS_MAI_2
/OOP/1/pentagon.cpp
UTF-8
634
3.234375
3
[]
no_license
#include <iostream> #include <cmath> #include "pentagon.h" using namespace std; Pentagon::Pentagon(double len) : lenght(len) { cout << "Pentagon created:" << endl; this->Print(); } Pentagon::Pentagon(std::istream &is) { is >> this->lenght; } Pentagon::Pentagon(const Pentagon &orig) { this->lenght = orig.lenght;...
true
e3dd9832bd23bc5eadeb0f1f7f8a7acff9c8fffb
C++
AlanLee97/Study_C_CPP
/C-C++/xt10.2/xt10.2/xt10.2.cpp
GB18030
1,620
3.828125
4
[]
no_license
#include<iostream> using namespace std; class Complex { protected: double real; double imag; public: Complex(); Complex(double r,double i); void show(); Complex operator+(Complex&c2); Complex operator-(Complex&c2); Complex operator*(Complex&c2); Complex operator/(Complex&c2); }; Complex::Complex() { real = 0;...
true
2d7b1a8c8967535f40f5cbc5022431ae601138cc
C++
orange08160394/2021-CG
/6-2-hand.cpp
BIG5
1,590
2.59375
3
[]
no_license
#include <GL/glut.h> #include <stdio.h> float angle=0; void hand(){ glPushMatrix(); glScaled(0.5,0.1,0.1); glutSolidCube(1); glPopMatrix(); } void display() { glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glPushMatrix();// glTranslated(-0.25,0,0);//Twhandm ...
true
888fdfbbb72dda20ead8e76f2ea6f11e07be3bd1
C++
MathieuAndrade/Arduino-Programs
/433Mhz/Recepteur_LED/Recepteur_LED.ino
UTF-8
1,342
2.78125
3
[]
no_license
#include <VirtualWire.h> // Vous devez télécharger et installer la librairie VirtualWire.h dans votre dossier "/libraries" ! int led=13; void setup() { Serial.begin(9600); vw_setup(2000); // Bits par seconde (vous pouvez le modifier mais cela modifiera la portée). Voir la documentation de la ...
true
b42d1408853d2951bc5fe45aba0c0a3455d3c3c2
C++
venkatdeepak12/CodeChefProblems
/November Long Challenge/Hard Sequence.cpp
UTF-8
2,173
3.640625
4
[]
no_license
/* Chef decided to write an infinite sequence. Initially, he wrote 0, and then he started repeating the following process: Look at the last element written so far (the l-th element if the sequence has length l so far); let's denote it by x. If x does not occur anywhere earlier in the sequence, the next element in th...
true
7d490f80edeaf9e50e512ec7d528677ebd4d68c9
C++
sjfjoel/CPP
/INHDESDE.CPP
UTF-8
741
3.765625
4
[]
no_license
// Default destructor in inheritance /* when the object is created for derived class 1st derived class destuctor is invoked after that base class destructor will be invoked */ #include<iostream.h> #include<conio.h> // classe class Base // base class { public: // default destructor ~Base() ...
true
8954601ee8646bb969226ebd988e938f50673e09
C++
devilzCough/Algorithm
/DP/C++/acm2225.cpp
UTF-8
537
2.546875
3
[]
no_license
#include <stdio.h> int n, k; int dp[201][201]; void init(); int main() { scanf("%d %d", &n, &k); init(); for (int k_i = 3; k_i <= k; k_i++) { dp[k_i][0] = 1; for (int n_i = 1; n_i <= n; n_i++) { for (int i = 0; i <= n_i; i++) { dp[k_i][n_i] = (dp[k_i][n_i] + d...
true
2a2409af3ccfa18299418baecb5627e70a51a3ad
C++
Vegctrp/AOJ_courses
/NTL/1e.cpp
UTF-8
719
2.890625
3
[]
no_license
#include<stdio.h> #include<vector> #include<iostream> #include<map> #include<tuple> using namespace std; typedef long long ll; #define REP(i,n) for(int i=0;i<(int)(n);i++) std::vector<ll> extended_gcd(ll a, ll b){ //ax+by=zとなる(x,y,z) ll s=0; ll old_s=1; ll t=1; ll old_t=0; ll r=b; ...
true
bcea24fa661910abf1a2c6efc6dfd685cbe16e1c
C++
alexandraback/datacollection
/solutions_5631572862566400_0/C++/B12040331/k.cpp
UTF-8
1,558
2.671875
3
[]
no_license
#include <cstdio> #include <cmath> #include <cstring> #include <string> #include <vector> #include <queue> #include <algorithm> using namespace std; const int MAXN = 1e3+10; int ia[MAXN]; int n, ans; bool used[MAXN]; void dfs(int root, int pre, int cur, int cnt); int main(){ freopen("C-small-a...
true
69bdfe62f2b03ed6621592d8bec9dfaa757b8bc9
C++
1ukash/makeblock-sketches
/gripper_robot.xcf/gripper_robot.xcf.ino
UTF-8
2,516
2.640625
3
[ "MIT" ]
permissive
#include <Makeblock.h> #include <Arduino.h> #include <SoftwareSerial.h> #include <Wire.h> MeDCMotor MotorL(M1); MeDCMotor MotorR(M2); MeDCMotor MotorG(PORT_1); MeDCMotor MotorM(PORT_2); MeInfraredReceiver infraredReceiverDecode(PORT_6); int moveSpeed = 190; boolean leftflag,rightflag; int minSpeed = 55; int factor =...
true
7cfd96b135e38ca7af27631f550c1b361c8e3937
C++
sriram20/thingspeak-dotnet-weatherstation
/ArduinoEnvironmental/Arduino Sketch/DigioleLCD.ino
UTF-8
2,504
2.9375
3
[]
no_license
#include <DigoleSerialDisp.h> #include <Wire.h> //DigoleSerialDisp_UART mydisp(&Serial, 9600); //Pin 1(TX)on arduino to RX on module DigoleSerialDisp_I2C mydisp(&Wire,'\x27'); //SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5 //DigoleSerialDisp_SPI mydisp(8,9,10); //Pin 8: d...
true
5c617a023f25c8be021fecfc774b91e7076ecee2
C++
Malory9/data-structure
/CPP/JpBinaryHeap.h
WINDOWS-1252
1,834
3.546875
4
[]
no_license
//д2016.3.19 #pragma once #include<vector> #include <iostream> #include<initializer_list> namespace CjpSTL{ template<typename ComparableT> class JpBinaryHeap { private: enum{DEFAULTCAP = 100}; std::vector<ComparableT>array; int currentSize; public: explicit JpBinaryHeap(int cap = DEFAULTCAP); JpBinaryHeap(std::i...
true
2e32616a3332f6328d1c0a30f96217109fb952af
C++
namelessvoid/qrwar
/include/gui/ng/signal.hpp
UTF-8
2,465
3.734375
4
[ "MIT" ]
permissive
#ifndef NAMELESSGUI_SIGNAL_HPP #define NAMELESSGUI_SIGNAL_HPP #include <functional> #include <vector> namespace namelessgui { /** * A generic Signal class. * * A Signal can be used to register callback methods which are notified * when the Signal is emitted using emit(). The parameters that are passed * are spe...
true
f9fd60c59a267b27e72d7cec2cb36a03f00fb3a6
C++
Rock-and-Stone/academyStorage
/31.이미지 뿌리기/20210611_0/playGround.cpp
UHC
3,104
2.625
3
[]
no_license
#include "pch.h" #include "playGround.h" playGround::playGround() { } playGround::~playGround() { } //ʱȭ ⿡ ض!!! HRESULT playGround::init() { gameNode::init(); _background = new image; _background->init(".bmp", WINSIZEX, WINSIZEY, true, RGB(255, 0, 255)); _smile = new image; _smile->init(".bmp", 50, 45, true...
true
8dba46a2bd30867a96ac73de4066c5951069fce3
C++
mamunhpath/leet-code
/find-all-anagrams-in-a-string-1.cpp
UTF-8
855
3.1875
3
[]
no_license
// https://leetcode.com/problems/find-all-anagrams-in-a-string/description/ class Solution { public: vector<int> findAnagrams(string s, string p) { vector<int> S(26, 0), P(26, 0), ans; int m = s.length(), n = p.length(); for(char c : p) P[c-'a']++; int j = 0; ...
true
d08e19026e02131ef4a1b692a29145e740b3a41b
C++
marcobarlo/greenhouse
/greenhouseArduino/Greenhouse/func.cpp
UTF-8
1,919
3.0625
3
[]
no_license
#include "func.h" void array_to_string(byte array[], unsigned int len, char buffer[]) { for (unsigned int i = 0; i < len; i++) { byte nib1 = (array[i] >> 4) & 0x0F; byte nib2 = (array[i] >> 0) & 0x0F; buffer[i * 2 + 0] = nib1 < 0xA ? '0' + nib1 : 'A' + nib1 - 0xA; buffer[i * 2 + 1] ...
true
0624aa5912285fb904b61a66422de97838fc32a4
C++
taekout/fast_raytracer
/fast_raytrace/Sphere.cpp
UTF-8
2,213
3.03125
3
[]
no_license
// implementation code for Sphere object class // include this class include file FIRST to ensure that it has // everything it needs for internal self-consistency #include "Sphere.hpp" // other classes used directly in the implementation #include "Ray.hpp" #include "aabb.hpp" // sphere-ray intersection float Sphere...
true
44d703feb0aaf6e9e03bdd4025fa92167455ad73
C++
DK-s-C-Project/Chapter-02
/Chapter 2-8.cpp
WINDOWS-1253
978
3.765625
4
[]
no_license
/* Literal Constants ͷ */ #include<iostream> using namespace std; int main() { float pi = 3.14f; // pi is a memory that it is changeable. //const float pi = 3.14; // with the const the pi is unchangeable. unsigned int n = 5u; long n2 = 5L; double d = 6.0e-10; // review the sign&unsigned. int x ...
true
609a63559e9531937d6216096705ad876b716e44
C++
jpbida/MiSeq_Scripts
/cpp/docs/iterator.cpp
UTF-8
696
2.65625
3
[]
no_license
#include <iostream> #include <seqan/sequence.h> #include <seqan/file.h> int main() { seqan::String<char> str = "admn"; seqan::Iterator<seqan::String<char> >::Type it = begin(str); seqan::Iterator<seqan::String<char> >::Type itEnd = end(str); while (it != itEnd) { ::std::cout << *it; ++it; } ::std::cout << ::...
true
60a52f8aa655963cb9defebdb7a469e3a02c7cc7
C++
kmhofmann/selene
/selene/img/typed/access/GetPixel.hpp
UTF-8
4,070
3.078125
3
[ "MIT" ]
permissive
// This file is part of the `Selene` library. // Copyright 2017-2019 Michael Hofmann (https://github.com/kmhofmann). // Distributed under MIT license. See accompanying LICENSE file in the top-level directory. #ifndef SELENE_IMG_ACCESS_GET_PIXEL_HPP #define SELENE_IMG_ACCESS_GET_PIXEL_HPP /// @file #include <selene/i...
true
a03a03c309e4bc1c776bc40b50c2f4198ccaca86
C++
Girl-Code-It/Beginner-CPP-Submissions
/Urvashi/milestone-03&04(while loops)/product of digits of a no.cpp
UTF-8
275
3.453125
3
[]
no_license
#include <iostream> using namespace std; int main() { int num, mul = 1; cout << "enter the number"; cin >> num; while (num != 0) { mul *= num % 10; num = num / 10; } cout << "product of digits of the number is :" << mul << endl; }
true
7a829c5d7582a3dac11632a8adc0c665cedc1935
C++
nxvu699134/Radix_sort_GPU
/test_sort/sort0.cpp
UTF-8
3,330
3.015625
3
[]
no_license
#include <stdio.h> #include <algorithm> #include <cstring> //memset #include <ctime> #define MAX_INT_BITS 32 void printArray(unsigned int* const h_input, const size_t numElems) { for (unsigned int i = 0; i < numElems; ++i) printf("%u ", h_input[i]); printf("\n"); } unsigned int getMaxNumOfBits(unsigned int* h_...
true
441721adc7f9d7fed83999380a9c28805a3785f7
C++
poxiaowu/introduction-to-algorithm
/堆栈和队列实现二叉树的层次和递归排序.cpp
UTF-8
2,590
3.546875
4
[]
no_license
#include<iostream> #include <limits> #include <ctime> using namespace std; typedef struct node{//二叉树节点 int value; node *left; node *right; }node,*pnode; typedef struct list{//队列的基本结构 pnode pn; list *next; }list,*plist; typedef struct queue{//层次遍历时存储节点 list *head; list *tail; }queue,*pqueue; typedef struct st...
true
9db65098fe0188e899a574e540ca5f70929e650f
C++
KDE/kdiamond
/src/board.h
UTF-8
2,032
2.515625
3
[ "BSD-3-Clause", "CC0-1.0" ]
permissive
/* SPDX-FileCopyrightText: 2008-2010 Stefan Majewsky <majewsky@gmx.net> SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef KDIAMOND_BOARD_H #define KDIAMOND_BOARD_H class Diamond; class QAbstractAnimation; #include <QGraphicsItem> class KGameRenderer; namespace KDiamond { class Board : public QGraphicsOb...
true
8aa48ebb3abc403c5ab96bb38527db5af4e2d178
C++
q349wang/SE-101-Project
/Testing/ArduinoRecieverTest/ArduinoRecieverTest.ino
UTF-8
912
2.96875
3
[]
no_license
#define rfReceivePin A0 //RF Receiver pin = Analog pin 0 #define ledPin 13 //Onboard LED = digital pin 13 unsigned int data = 0; // variable used to store received data const unsigned int upperThreshold = 70; //upper threshold value const unsigned int lowerThreshold = 50; //lower threshold value void...
true
fb7edafff596867ca0c131a32855857e82a6e513
C++
anant-pushkar/competetive_programming_codes
/cpp/Delete_N_nodes_after_M_nodes_of_a_linked_list/main.cpp
UTF-8
1,849
3.078125
3
[]
no_license
/* Project name : Delete_N_nodes_after_M_nodes_of_a_linked_list Created on : Thu Oct 2 21:37:30 2014 Author : Anant Pushkar http://www.geeksforgeeks.org/delete-n-nodes-after-m-nodes-of-a-linked-list/ */ #include<iostream> #include<cstring> #include<cstdio> #include<deque> #include<queue> #include<utility> #include<vec...
true
183aeb0852ed548253ca3ad4f746dd5bfee21f2c
C++
XiaoyangXu1988/CFI-Benchmark-Suite
/veh.cpp
UTF-8
1,297
2.84375
3
[]
no_license
#include "helper.h" NANOSECOND start_time; NANOSECOND end_time; NANOSECOND total_time; LONG WINAPI VectoredHandlerSkip(struct _EXCEPTION_POINTERS *ExceptionInfo); int main() { DWORD loop_count = 10000L; PVOID pv = NULL; // record starting time start_time = get_wall_time(); /...
true
335dd7e9efb506ad7129ea009891b61297d1a69c
C++
Manuelacosta98/competitive-programing
/spoj/CDC12_B.cpp
UTF-8
1,126
2.84375
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; class Rutina { public: string nombre; int energia; Rutina(){}; Rutina(string cadena, int valor) { nombre= cadena; energia= valor; } bool operator< (const Rutina &otro)const { if (energia==otro.energia) { return nombre< otro.nombre; }else { ...
true
ce3a7a060007777bd37dfc6d50b5e130c7480b4b
C++
yangyiko/esp32_4
/src/example/网络服务器/webserver.cpp
UTF-8
5,601
2.8125
3
[]
no_license
// #include <Arduino.h> // /********************************************************************** // * 按flash键读取 D3 // * http://www.taichi-maker.com/homepage/-nodemcu-iot/iot-c/-nodemcu-web-server/pin-state/ // 项目名称/Project : 零基础入门学用物联网 // 程序名称/Program name : 3_2_3_Pin_State_Display // 团队/Team ...
true
258e4f4ecc5dffa19a27b3a0142a001e0143a789
C++
FRC900/2020RobotCode
/zebROS_ws/src/talon_interface/include/talon_interface/sensor_initialization_strategy.h
UTF-8
330
2.515625
3
[ "BSD-3-Clause" ]
permissive
#pragma once namespace hardware_interface { enum SensorInitializationStrategy { /** * On boot up, set position to zero. */ BootToZero, /** * On boot up, sync to the Absolute Position signal. The Absolute position signal will be signed according to the selected Absolute Sensor Range. */ BootToAbsolutePosit...
true
b4279424140a929ea2ef526a750972b36b099efe
C++
ds759/Data-Structures
/SingularLinkedList.cpp
UTF-8
1,882
4.40625
4
[]
no_license
#include <iostream> class LinkedList { public: class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = nullptr; } }; Node *head; Node *tail; int length; LinkedList() { this->h...
true
58a3fee29d1b9c7d4c7a0d2b5b5b0fb08d16c925
C++
LeyuGao/ncat-comp280-repository
/COMP280_Assignment5/COMP280_Assignment5/COMP280_Assignment5/main.cpp
UTF-8
3,109
3.6875
4
[ "LicenseRef-scancode-public-domain", "Unlicense" ]
permissive
// // main.cpp // COMP280_Assignment5 // // Created by Christopher Cannon on 6/26/16. // #include <iostream> #include "Graph.h" int main() { int n = 0; std::cout<<"Undirected Graph Program"<<std::endl; std::cout<<std::endl; std::cout<<"Enter the number of verticies for your graph:"<<std::endl; ...
true
67c9a546b527c0354d788e903aeaea3416b8799c
C++
lisendong/ACM
/usaco/1/transform.cpp
UTF-8
2,782
3.09375
3
[]
no_license
/* ID:lisendo1 PROG:transform LANG:C++ */ #include <iostream> #include <fstream> using namespace std; char a[20][20], b[20][20], temp[20][20]; int N; int equals(char a[20][20], char b[20][20]) { int flag = 1; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (a[i][j] != b[i][...
true
bdbd07eb3ae1899d03cd406c6b0c08104bc0942c
C++
skyformat99/fidelity
/fidelity/base/Thread.cpp
UTF-8
6,365
2.640625
3
[]
no_license
#include "Thread.hpp" #include <sched.h> #include <sys/mman.h> #include <sys/resource.h> #include <contract/contract_assert.hpp> #include <algorithm> #include <climits> #include <cstdlib> #include <memory> #include <mutex> #include <thread> #include "PrioMutex.hpp" #include "SystemAdapter.hpp" using namespace std:...
true
a1625102b9fee338ff5c4f59ebcbd4ca89fec4fa
C++
nalualvarez/tp1t1
/testes_dominios.h
UTF-8
2,535
2.625
3
[]
no_license
#ifndef TESTES_DOMINIOS_H_INCLUDED #define TESTES_DOMINIOS_H_INCLUDED #include "dominios.h" using namespace std; class TUNome{ /**teste da classe do nome*/ private: char valido[20], invalido[25]; const static int LIMITEVALIDO = 20, LIMITEINVALIDO = 25; Nome *nome; /**referencia ao obje...
true
5794ea5dafca23b691ed80243e73421d24a8c686
C++
SeongHwanJin/2013440148
/HW1-4/4번.cpp
UHC
635
3.703125
4
[]
no_license
/*4. () Է ޾Ƽ (A, B, C, D, E) ϴ α׷ ۼϽÿ. (A : 100-80, B: 79-60, C: 59-40, D: 39-20, E: 19-0) */ #include <stdio.h> int main () { int a; printf(" ԷϽÿ(0 100̿) : " ); scanf("%d", &a); if (a >= 80 && a <=100) printf(" AԴϴ. "); else if (a <= 79 && a >= 60 ) printf(" BԴϴ. "); else if (a <= 59 && a >= 40...
true
1d72b254a844448de401bab4f40c91c54078ba5e
C++
brucewillis13/Filter
/Source.cpp
UTF-8
2,907
2.890625
3
[]
no_license
//libraries #include <stdio.h> //for sqrt (square root) #include <math.h> #include "allegro5/allegro.h" //use image addon for loading images, dialog boxes, and primitive shapes #include <allegro5/allegro_image.h> //global variable for display ALLEGRO_DISPLAY* display = NULL; //ALLEGRO_DISPLAY is a "user de...
true
325d63e33366e5a4783ca6dc2566429a14e5a4fc
C++
pick56/ACMTemplet
/制作模板/归并排序函数.cpp
UTF-8
478
2.953125
3
[]
no_license
void merge_sort(int *A,int x,int y,int *T){ if(y-x>1){ int m = x +(y-x)/2 ; int p = x ; int q = m ; int i = x ; merge_sort(A,x,m,T) ; merge_sort(A,m,y,T) ; while(p<m||q<y){ if(q>=y||(p<m && A[p] <= A[q])) { T[i++] = A[p++] ; ...
true
a2a8b2554c32e64074cef8de127f2b31c8d115af
C++
Priya2410/Competetive_Programming
/BinarySearch.com/powerOfTwo.cpp
UTF-8
261
2.984375
3
[]
no_license
// https://binarysearch.com/problems/Check-Power-of-Two bool solve(int n) { int rem,sum=0; if(n==0) return false; while(n>0){ rem=n%2; sum=sum+rem; if(sum>1) return false; n=n/2; } return true; }
true
c6a43cd084981bd05295e87b12bb60dcbcd3ccb6
C++
DekhanFraser/Galaxians_clone_in_C-
/Source/GD1P04 3DGame - Alex (Valeriy) Ruzhitskiy/Player.cpp
UTF-8
6,092
2.515625
3
[]
no_license
// // Bachelor of Software Engineering // Media Design School // Auckland // New Zealand // // (c)2005 - 2016 Media Design School // // File Name : Player.cpp // Description: Player gameobject implementation // Author: Alex (Valeriy) Ruzhitskiy // Mail: alexander.izmaylov@gmail.com // #inclu...
true
41c5a486557fe7635caff34525fbf309183c7ce4
C++
RedBeard0531/mongo_utils
/base/data_type_terminated_test.cpp
UTF-8
8,516
2.65625
3
[ "Apache-2.0" ]
permissive
/** * Copyright (C) 2015 MongoDB Inc. * * 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 applicabl...
true
5cf65efd5f0cd635f89d7dec494831ae72d7f117
C++
goodcodedev/lang-base
/test-lang.hpp
UTF-8
1,140
2.734375
3
[ "MIT" ]
permissive
enum Type { INT, VOID }; static std::string enumTypeToString(Type item) { switch (item) { case INT:return "int"; case VOID:return "void"; default: return ""; } } class Expression { }; class Function { Type Type; std::vector<Expression*>* argExprs; std::string identifier; Function...
true
1deceda2b062a489c01bcea39a99476cd87807ef
C++
wildparky/materialXToArnold
/src/materialx_to_arnold/implementation.h
UTF-8
1,446
2.5625
3
[]
no_license
#ifndef MTLX_TO_A_IMPLEMENTATION_H #define MTLX_TO_A_IMPLEMENTATION_H #include "arnold/facade.h" // // These functions: // - Facilitate the dependency injection (template method) of the Arnold and // MaterialX facade classes into the implementation // - Handle the Arnold User Data resource management // - Dispa...
true