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
cd3a20d1061d1e2afb991e13f0d8bf8e77943600
C++
warmwhiten/PS
/BOJ/14000/14501_퇴사.cpp
UTF-8
520
2.6875
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; int N; int d[16], T[15], P[15]; int result = -1; void input() { scanf_s("%d", &N); for (int i = 0; i < N; i++) { scanf_s("%d %d", &T[i], &P[i]); } } void DP() { for (int i = 0; i < N; i++) { if (i + T[i] <= N) { d[i + T[i]] = max(d[i + T[i]...
true
a422a883e0702602ff6b21016f2c760b8c37bbbf
C++
SarmadTanveer/spectrum-analyzer
/Visualizer_1/Visualizer_1.ino
UTF-8
2,982
2.890625
3
[]
no_license
#include "FastLED.h" #include <AudioAnalyzer.h> Analyzer Audio = Analyzer(4,5,5);//Strobe pin ->4 RST pin ->5 Analog Pin ->5 //Analyzer Audio = Analyzer();//Strobe->4 RST->5 Analog->0 int FreqVal[7];// Read Stored Values int LedFreq[7];// Mapped read values to control num leds on // Matrix size #define...
true
ebd790003d89de12c36685f8d6b1d700cad9bcc4
C++
Stenodyon/TUNG_Router
/src/graphics.cpp
UTF-8
3,561
2.796875
3
[]
no_license
#include "graphics.hpp" #include <exception> #define SIZE 20 #define PEG_SIZE 10 #define WIN_SIZE 32 * SIZE GraphicsOutput::GraphicsOutput(int width, int height) : width(width), height(height) { if (SDL_Init(SDL_INIT_VIDEO) != 0) { throw std::runtime_error("SDL: " + std::string(SDL_GetError())); ...
true
862034909352a0c9a596cd12c0dc5370b2b59640
C++
Towerthousand/BiomeNoise
/game/BiomeConst.hpp
UTF-8
553
2.859375
3
[]
no_license
#ifndef BIOMECONST_HPP #define BIOMECONST_HPP #include "BiomeFunction.hpp" class BiomeConst final : public BiomeFunction { public: BiomeConst(std::mt19937* generator, int biome) : BiomeFunction(generator), biome(biome) { } virtual ~BiomeConst() { } std::vector<int> getBiom...
true
776909d94cd4c951875b0e06ae42f4f1094e5bf7
C++
tensorflow/tensorflow
/tensorflow/core/lib/strings/ordered_code.h
UTF-8
4,039
2.71875
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "BSD-2-Clause" ]
permissive
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
true
8e30e001d1ad9fde11447c6cf866443ae63056ae
C++
antonioguerrerocarrillo/1DESARROLLO-DE-APLICACIONES-MULTIPLATAFORMA
/1DAM/programacion en c++/ejercicios y practicas/minipractica UD5 bingo/yobingo.cpp
UTF-8
10,176
3.09375
3
[]
no_license
// // juego del bingo // // // Created by Antonio Guerrero y Pedro Infantes 02/02/2018 // // #include <iostream> #define BLACK_COLOR "\033[1;30m" #define RED_COLOR "\033[1;31m" #define GREEN_COLOR "\033[1;32m" #define YELLOW_COLOR "\033[1;33m" #define BLUE_COLOR "\033[1;34m" #define PURPLE_COLOR "\033[1;35m" #defi...
true
d92e95685d7248dd1047447620ba76d156786ea7
C++
OpenNuvoton/ISPTool
/NuvoISP/CScopedMutex.hpp
UTF-8
2,477
2.890625
3
[]
no_license
#if !defined(_CMUTEX2_H_) #define _CMUTEX2_H_ class CMutex2 { public: CMutex2() : m_bLocked(FALSE) , m_uLockCount(0) , m_dwThread(-1) { m_hMutex = ::CreateMutex(NULL, FALSE, NULL); } virtual ~CMutex2() { ::ReleaseMutex(m_hMutex); } void Lock() {...
true
be72b852f2cd992a0e1a7e6faeb7a50ca268e992
C++
juiceme/libQtSpotify
/listmodels/listmodelbase.h
UTF-8
1,948
3
3
[]
no_license
#ifndef LISTMODELBASE_H #define LISTMODELBASE_H #include <QtCore/QAbstractListModel> #include <QtCore/QList> #include <QtCore/QVariant> /*** Abstract list model class, uses std::shared_pointer to objects it stores. ItemType Requirements: -ItemType should have a dataChanged() signal which is emitted whenever data ...
true
b77c441361da806206eb321dbf6c0b918ddc96ab
C++
lmns1314HuHu/ACM_record
/字符串/HDU_5782_字符串_exkmp.cpp
UTF-8
2,140
2.640625
3
[]
no_license
/**================================== | Author: YunHao | OJ: | Kind: | Date: | Describe: | | =================================**/ #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> using namespace std; typedef long long ll; int n; char s1[100...
true
07d5197b1793827c74900b36866798657bae8f20
C++
formerStudent/POJ
/1000/1002.cpp
UTF-8
1,763
3.140625
3
[]
no_license
#include <iostream> #include <string.h> #include <list> #include <string> using namespace std; //A, B, C -> 2 //D, E, F -> 3 //G, H, I -> 4 //J, K, L -> 5 //M, N, O -> 6 //P, R, S -> 7 //T, U, V -> 8 //W, X, Y -> 9 int main() { char in[200]{ 0 }; list<string> data; int n; cin >> n; if (n > 100000) return -1; w...
true
2780e0afbdec302ff0326b2677bba061ef67689a
C++
prateek1802/Codechef
/cheglove.cpp
UTF-8
865
2.8125
3
[]
no_license
#include<iostream> #include<algorithm> #include<climits> #include<math.h> #include<vector> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; int f[n],g[n]; for(int i=0;i<n;i++) { cin>>f[i]; } for(int...
true
a68a713ee2890535b3e17f56b27971623454eeb1
C++
ericksav21/Maestria
/Semestre 3/Programacion y algoritmos 2/Problemas/UVA_10849/main.cpp
UTF-8
560
2.859375
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t, q, n; int r1, c1, r2, c2; cin >> t; while(t--) { cin >> q >> n; for(int i = 0; i < q; i++) { cin >> r1 >> c1 >> r2 >> c2; int r_abs = abs(r1 - r2); int c_abs = abs(c1 - c2); ...
true
fc4169e4da1fd1e389ba62cdebae7c1961ebeb05
C++
rpuntaie/c-examples
/r/b2.cpp
UTF-8
871
3.265625
3
[ "MIT" ]
permissive
/* g++ -std=c++20 -o ../_build/r/b2.exe r/b2.cpp && (cd ../_build/r;./b2.exe) */ #include <iostream> #include <map> #include <string> using namespace std; // Driver Code int main() { // Key-value pair declared inside // Map data structure map<string, string> fav_lang{ { "John", "Java" }, ...
true
80e0d1e4f48df5e9c8f7c8761250a7864b99196a
C++
ske-ableton/public_sscce
/plugins-using-typeid/mydependency.h
UTF-8
551
2.609375
3
[]
no_license
#pragma once #include "mydependency_export.h" #include <typeinfo> #include <cassert> template <typename T> T* registerType(); MYDEPENDENCY_EXPORT void* registerTypeInternal(const std::type_info & typeinfo, void* def); MYDEPENDENCY_EXPORT void* lookupTypeInternal(const std::type_info & typeinfo); template <typena...
true
1f36c2ceed3644b12a31b743d03353a19bc01bb1
C++
Muhahambr/labhero
/2dGames/LabHero.cpp
UTF-8
3,199
2.953125
3
[]
no_license
#include "SFML/Graphics.hpp" #include "LabHero.h" #include "helpers.h" using namespace sf; LabHeroGame::LabHeroGame() { tiles_tex = new Texture(); tile = new Sprite(); hero_tex = new Texture(); hero_sprite = new Sprite(); //tile tiles_tex->loadFromFile("images/Hero/tilearea.png"); tile->setTexture(*tiles_...
true
7c019af21b458a950bb95675ff05f75df7d1d535
C++
commandblock2/snake_the_game
/core/include/snake_the_game.h
UTF-8
1,633
3.3125
3
[]
no_license
#pragma once #include <atomic> #include <chrono> #include <list> #include <vector> #include <mutex> namespace snake_the_game { using namespace std::literals::chrono_literals; enum class direction { up, down, left, right }; enum class block { death, food, none }; class game { public: //type alias s...
true
e671fda517450a32edd337db97c516ff64948d0b
C++
stockdillon/operating_systems
/proj09/backup.cpp
UTF-8
15,184
3.1875
3
[]
no_license
/* Dillon Stock stockdil@basset 2017-04-03 proj08.student.c Your Comments */ #include <iostream> #include <iomanip> #include <string> #include <string.h> #include <fstream> #include <vector> #include <algorithm> using std::cout; using std::endl; using namespace std; struct process{ public: unsigned pid; uns...
true
2dfaf74ec5f7ce0da6cd992880d3ea2c86659f9f
C++
rfdnl/fyp-engine
/Subsystem/Component/Graphics/RectangleRenderer.hpp
UTF-8
1,679
2.8125
3
[]
no_license
#ifndef RECTANGLE_RENDERER_HPP #define RECTANGLE_RENDERER_HPP #include <memory> #include "VertexArray.hpp" #include "VertexBuffer.hpp" #include "IndexBuffer.hpp" #include "VertexBufferLayout.hpp" #include "Shader.hpp" #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> class RectangleRenderer{ ...
true
23c5757e55c89619d29d44794cd52dc2770dd7ba
C++
carlpatt/college-projects
/CS117 Programming 2/practiceSet1-1.cpp
UTF-8
243
2.671875
3
[]
no_license
#include <iostream> #include <string> using namespace std; struct Student { int idNumver; int asmissionYear; float gpa; }; int main() { Student s1 = {346789, 2014, 3.89}; Student s2 = {980077, 2015}; return 0; }
true
0386d16c29aa52b08245ea4da20f2090fabd7b85
C++
spencerparkin/Junk
/3DPortalSystem/spencer.cpp
UTF-8
1,476
2.65625
3
[]
no_license
// spencer.cpp // Programmed by Spencer T. Parkin #include <glut.h> #include "spencer.h" #include "cell.h" #include "macros.h" #include "camera.h" #include "main.h" #include "wall.h" Spencer *spencer = 0; Spencer::Spencer() { // These should get loaded in the map. t_walk[0] = 0; t_walk[1] = 0; t_walk[2] = 0; t...
true
e90e1948ee13aaf32891e080b88dc1aacf029e73
C++
sedoy-jango-2/Coffe-check
/journal.h
UTF-8
892
2.59375
3
[]
no_license
#ifndef JOURNAL_H #define JOURNAL_H #include "basenote.h" #include "note.h" #include "testnote.h" #include <QFile> #include <QString> #include <QTextStream> #include <QDateTime> class Journal { public: Journal(); Journal(const Journal &copywrite); BaseNote ** mass; BaseNote &operator[](int i); int ...
true
732d7aa7faf0f00f44991bd0e6f78872b95ad2e5
C++
zackkk/leetcode
/Length of Last Word.cpp
UTF-8
355
3.140625
3
[]
no_license
class Solution { public: // use s[i] int lengthOfLastWord(const char *s) { if(s == NULL) return 0; int right = strlen(s) - 1; while(s[right] == ' ') right--; if(right < 0) return 0; int left = right; while(left - 1 >= 0 && s[left-1] != ' ') left--; ...
true
9b3980d9df5297ce57fc04594add5ac6b40cefdf
C++
rushingJustice/C-programming-and-matlab-projects
/Finite Elements - Direct Sitffness Methods/Programs from E-book/Example13_4_2/main.cpp
UTF-8
777
3.1875
3
[]
no_license
/* Example 13.4.2 Copyright(c) 2005-08, S. D. Rajan Object-Oriented Numerical Analysis */ #include <iostream> #include "myaddlibrary.h" int main () { // define a pointer variable to a function // with a specified signature float (CMyAddLibrary::*ptAddFunction) (float, float) = NULL; CMyAddLibra...
true
615e6d5b02454edaacfde0ef424bf9c9c49121d9
C++
nozdrenkov/sp
/codeforces/gcpc-2015/k.cpp
UTF-8
784
2.984375
3
[]
no_license
string rot(const string &s) { string t = s; reverse(all(t)); for (auto &c : t) { if (c == '3' || c == '4' || c == '7') return ""; if (c == '6') c = '9'; else if (c == '9') c = '6'; } return t; } LL toLL(const string &s) { istringstream is(s); LL x; is >> x; return x; } boo...
true
22ba496e35390937fc61f1b92483d15a81931023
C++
cenariusxz/ACM-Coding
/zoj/13/C.cpp
UTF-8
1,892
3.09375
3
[]
no_license
#include<stdio.h> #include<string.h> int pos[10],lab[10]; int num[10]; void s1(){ int d; scanf("%d%d%d%d%d",&d,&num[1],&num[2],&num[3],&num[4]); if(d==1||d==2){ pos[1]=2; lab[1]=num[2]; } if(d==3){ pos[1]=3; lab[1]=num[3]; } if(d==4){ pos[1]=4; lab[1]=num[4]; } printf("%d %d\n",pos[1],lab[1]); } ...
true
e67fc19519143280c2cf6ad9474f620dc72e7e95
C++
Matheusbafutto/needle_in_haystack
/main.cpp
UTF-8
793
3.390625
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <time.h> using namespace std; int main() { string needle, haystack[51],a = "que"; int i = 0; cout << "Enter String to be found:" <<endl; cin >> needle; cout << "Enter array of strings." << endl; cout << "(write"; cout << " stop to termina...
true
3f7416b058235abf3b143cc9c13f69be7b396657
C++
hvotheraccount/Simple-Stock
/Super Simple Stock/StockLibrary/Stock/PreferredStock.cpp
UTF-8
516
2.703125
3
[]
no_license
#include "PreferredStock.h" #include "..\Exceptions\Exceptions.h" namespace simplestock { PreferredStock::PreferredStock(const std::string& stockSymbol, double lastDividend, double parValue, double fixedDividend) : AbstractStock(stockSymbol, lastDividend, parValue), fixedDividend_(fixedDividend) { } Preferred...
true
f08a28a69ffdaaf9136735040b60185f57b74827
C++
shri314/resolver
/include/dns/r_code.h
UTF-8
3,136
2.703125
3
[]
no_license
#pragma once #include <ostream> namespace dns { enum class r_code_t : uint8_t { no_error = 0, /* No Error, [RFC1035] */ form_err = 1, /* Format Error, [RFC1035] */ serv_fail = 2, /* Server Failure, [RFC1035] */ nx_domain = 3, /* Non-Existent Domain, [RFC1035] */ not_i...
true
611bd33619eda088cc02f11fca29a507f2bdb0f4
C++
deepbluev7/mtxclient
/include/mtx/events/encryption.hpp
UTF-8
641
2.734375
3
[ "MIT" ]
permissive
#pragma once #include <nlohmann/json.hpp> using json = nlohmann::json; namespace mtx { namespace events { namespace state { //! Content of the `m.room.encryption` event. // //! A client can enable encryption to a room by sending this event. struct Encryption { //! Defines which encryption algorithm should b...
true
2bd203949e740b0058fd3cfc670a3a87006fc9ba
C++
phongvcao/CP_Contests_Solutions
/cpp/Codeforces/301-350/344A_Magnets.cc
UTF-8
1,213
3.203125
3
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <sstream> #include <vector> #include <tr1/memory> class Magnet { public: Magnet(); Magnet(int left, int right); int left; int right; }; Magnet::Magnet() : left(0), right(0) { } Magnet::Magnet(int left, int right) : lef...
true
0d68e031ebc50741efa1b7b2f72387e8f30665ac
C++
cssanjay/ninja
/standAlone/largestNumberFromArray.cpp
UTF-8
315
3.078125
3
[]
no_license
#include <iostream> using namespace std; int compareFunction(string a, string b){ string ab = a.append(b); string ba = b.append(a); return ab.compare(ba)>0 ? 1:0; } void printLargest(vector<string> arr){ sort(arr.begin(), arr.end(), compareFunction); for(int i = 0; i < arr.size(); i++) cout << arr[i]; }
true
91901b0ea0e37229374babb7854b9b8291b5102d
C++
anbhimi/osrm-backend
/include/engine/datafacade/shared_memory_datafacade.hpp
UTF-8
3,472
2.671875
3
[ "BSD-2-Clause" ]
permissive
#ifndef SHARED_MEMORY_DATAFACADE_HPP #define SHARED_MEMORY_DATAFACADE_HPP // implements all data storage when shared memory _IS_ used #include "storage/shared_barriers.hpp" #include "storage/shared_datatype.hpp" #include "storage/shared_memory.hpp" #include "engine/datafacade/contiguous_internalmem_datafacade_base.hp...
true
cdaf5d1c474835f471201018f4f93a08d43d98f1
C++
Jemoba/CSC412-CourseProject
/CourseProject/Pilot.cpp
UTF-8
2,976
2.953125
3
[]
no_license
#include "Pilot.h" Pilot:: Pilot(NXShield& nxt){ pnxshield = &nxt; maxSpeed = 100; currentSpeed = 0; steerAngle = 0; } Pilot:: Pilot(NXShield& nxt, int ms){ pnxshield = &nxt; maxSpeed = ms; currentSpeed = 0; steerAngle = 0; } void Pilot::fullStop(){ pnxshield->bank_a.motorStop(SH_Motor_1, SH_Next_A...
true
44fda3078fb76538c4a7b37d9b5cb5f25223fbcd
C++
nkhoit/McHAB-1
/Arduino/Bitstream.cpp
UTF-8
697
2.765625
3
[]
no_license
#include "Bitstream.h" void sendToSerial(unsigned short value) { Serial.write(value & 0xff); value = value >> 8; Serial.write(value); } void sendToSerial(short value) { Serial.write(value & 0xff); value = value >> 8; Serial.write(value); } void sendToSerial(unsigned long value) { Serial.write(value & 0...
true
39873327a5500604c6dd8b12a9da2b4a05c1ef37
C++
Thordreck/design-patterns-cpp
/proxy_virtual/src/main.cpp
UTF-8
853
3.53125
4
[ "MIT" ]
permissive
#include <string> #include <sstream> #include <iostream> #include <memory> struct Image { virtual void draw() = 0; }; struct Bitmap : public Image { Bitmap(const std::string& filename) { std::cout << "Loading bitmap from " << filename << std::endl; } void draw() override { std...
true
7688408d0190699875defeb8256e6337a97b7f6a
C++
luigidcsoares/L-programming-language
/src/lexer/dfa.cpp
UTF-8
12,718
3.09375
3
[]
no_license
/** * @author: Gabriel Luciano * @author: Geovane Fonseca * @author: Luigi Domenico */ #include <algorithm> #include <iostream> #include <regex> #include <sstream> #include "core/global.hpp" #include "core/type.hpp" #include "core/token.hpp" #include "lexer/dfa.hpp" #include "lexer/lexer.hpp" #include "util...
true
1fe659b1ff8615517e5e261ebd89208ec70ffcbd
C++
reaper-oss/sws
/Fingers/RprNode.h
UTF-8
1,901
3.203125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
#ifndef RPRNODE_HXX #define RPRNODE_HXX class RprNode { public: virtual ~RprNode() {} RprNode *getParent(); void setParent(RprNode *parent); std::string toReaper(); virtual void toReaper(std::ostringstream &oss, int indent) = 0; virtual int childCount() const = 0; virtual RprNode *getChi...
true
e3c47c3f6606d5f2b7226283bf35ebd2400de91e
C++
CreepSore/HACKMAN-3
/src/kfw/Hacks.cpp
UTF-8
1,649
2.859375
3
[ "MIT" ]
permissive
#include "k-framework.h" kfw::core::IBaseHack::IBaseHack(std::string identifier, std::string hrIdentifier) { this->identifier = std::move(identifier); this->hrIdentifier = std::move(hrIdentifier); this->manager = nullptr; // Gets set during registration inside the HackManager } kfw::core::HackManager::Ha...
true
02365b87282526b3ea46449ada88721ea7437574
C++
BMajs996/Problem-Solving-in-Data-Structures-and-Algorithms-using-Cpp
/Heap/HeapEx.cpp
UTF-8
11,290
3.828125
4
[]
no_license
#include <string> #include <vector> #include <iostream> #include <limits> #include <queue> #include <functional> // for greater<int> #include <exception> #include <algorithm> #include <cmath> int main1() { std::priority_queue<int, std::vector<int>, std::greater<int>> pq;; int arr[] = { 1, 2, 10, 8, 7, 3, 4, ...
true
ffd4f16606bfc46d7c20ba583cf54a5409a37fce
C++
adityasbg/ds-and-algo-
/number_theory/gcd_n_no.cpp
UTF-8
340
2.90625
3
[]
no_license
#include<iostream> #define ll int using namespace std; ll gcd (ll a , ll b ){ if(b==0){ return a; } else return gcd(b,a%b); } int main(){ int n; int a[50]; cin>>n; for(int i =0 ;i<n ;i++){ cin>>a[i]; } int result =a[0]; for(int i =1 ; i<n ;i++) { result= gcd(result ,a[i]); } cout<< r...
true
79d0b6b2b7f57c66bc71275618287597684dd5c7
C++
countryhu/algorithm
/now_coder/cracking_the_code_interview/9_recursion/5_getPermutation.cc
UTF-8
2,238
3.859375
4
[]
no_license
#include <algorithm> #include <iostream> #include <vector> using namespace std; /** 题目描述 编写一个方法,确定某字符串的所有排列组合。 给定一个string A和一个int n,代表字符串和其长度, 请返回所有该字符串字符的排列,保证字符串长度小于等于11且字符串中字符均为大写英文字符, 排列中的字符串按字典序从大到小排序。(不合并重复字符串) 测试样例: "ABC" 返回: ["CBA","CAB","BCA","BAC","ACB","ABC"] ------- 题目分析 **/ clas...
true
e0d8adbaddb361d1c43f761d8767eb96151f6e5f
C++
dream-overflow/o3d
/include/o3d/gui/widgetdrawsimple.h
UTF-8
1,599
2.8125
3
[]
no_license
/** * @file widgetdrawsimple.h * @brief Simple Drawing Mode for Widgets. * @author RinceWind * @date 2006-10-11 * @copyright Copyright (c) 2001-2017 Dream Overflow. All rights reserved. * @details */ #ifndef _O3D_WIDGETDRAWSIMPLE_H #define _O3D_WIDGETDRAWSIMPLE_H #include "widgetdrawmode.h" namespace o3d { ...
true
a7715cc05788664f75c9ab2fa628590ba6775dcf
C++
peti/librfc2822
/test/date.cpp
UTF-8
4,541
2.578125
3
[]
no_license
/* * Copyright (c) 2006-2008 Peter Simons <simons@cryp.to> * * This software is provided 'as-is', without any express or * implied warranty. In no event will the authors be held liable * for any damages arising from the use of this software. * * Copying and distribution of this file, with or without * modificat...
true
b1221fd034991c5de3391e88248073490d651f79
C++
blaze6950/Polymorphism
/Inheritance/Seller.h
UTF-8
381
2.890625
3
[]
no_license
#pragma once #include "Header.h" class Seller : public Employee { public: Seller(); Seller(string name, string surname, int age, string department); ~Seller() { #ifdef TEST cout << "~Seller()" << endl; #endif } void SetDepartment(string department); string GetDepartment() const { return _department; }...
true
b0c93f42028c26d9a53725841de6e25cb5c5f9f1
C++
savvynavi/Intro-to-cpp
/operator overloading/operator overloading question 1/operator overloading question 1/position.cpp
UTF-8
2,544
3.578125
4
[]
no_license
#include"position.h" Position::Position(){ m_x = 5.0f; m_y = 5.0f; } Position::Position(float x, float y){ m_x = x; m_y = y; } Position::~Position(){ } float Position::getX(){ return m_x; } float Position::getY(){ return m_y; } void Position::setX(float x){ m_x = x; } void Position::setY(float y){ m_y =...
true
e43dde818e3a407dd59f19fdc2c0aa88c4bf723f
C++
kamyu104/LeetCode-Solutions
/C++/unique-substrings-with-equal-digit-frequency.cpp
UTF-8
748
2.71875
3
[ "MIT" ]
permissive
// Time: O(n^2) // Space: O(n^2) // rolling hash class Solution { public: int equalDigitFrequency(string s) { static const int MOD = 1e9 + 7; static const int D = 27; unordered_set<int> lookup; for (int i = 0; i < size(s); ++i) { unordered_map<int, int> cnt; ...
true
09d698794287a5e79e85bfbc016b7b57420b7bc0
C++
WolfireGames/overgrowth
/Projects/bullet3-2.89/examples/Experiments/ImplicitCloth/stan/vec3n.h
UTF-8
11,369
3.171875
3
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "Zlib" ]
permissive
// // Big Vector and Sparse Matrix Classes // // (c) S Melax 2006 // // The focus is on 3D applications, so // the big vector is an array of float3s // and the matrix class uses 3x3 blocks. // // This file includes both: // - basic non-optimized version // - an expression optimized version // // Optimized Expressio...
true
7a041c3bab21df65d30d3350d51e352e402bd02b
C++
hpaucar/OOP-C-plus-plus-repo
/Material/CPP_Primer_Plus_Book/Ch.14.2/Ch.14_2 - Exercise 05 - abstr_emp/Support.cpp
UTF-8
4,809
3.015625
3
[ "MIT" ]
permissive
//******************************* // // C++ Template Program - Support Files // //******************************* //******************************* // // Standard Header // //******************************* #include <cstdio> #include <cstdlib> #include <iostream> #include <fstream> #include "header.h" using namesp...
true
a688297b6e0545d49b04db99e37642d5213793b0
C++
saifullah3396/team-nust-robocup
/Src/TNRSModules/VisionModule/include/FeatureExtraction/RegionSegmentation.h
UTF-8
3,765
2.53125
3
[ "BSD-3-Clause" ]
permissive
/** * @file FeatureExtraction/RegionSegmentation.h * * This file declares the class for segmenting the image into different * regions for further processing. * * @author <A href="mailto:saifullah3396@gmail.com">Saifullah</A> * @author AbdulRehman * @date 5 Mar 2018 */ #pragma once #include "Visi...
true
288cff321257bf2bbef2ab93284eafba848c202c
C++
Abiggg/practice
/cpp/map/use.cpp
UTF-8
608
3.296875
3
[]
no_license
#include <iostream> #include <map> using namespace std; int main() { map<string, string> student; student.insert(pair<string, string>("num0", "zhangsan")); student.insert(map<string, string>::value_type("num1", "lisi")); student.insert(pair<string, string>("num0", "testaa")); student["num2"] = "test4"; stude...
true
2f9f520833ae7187621c951c7157de90b551a0a1
C++
adarshyoga/TaskProf_RegionDiffSched
/tests/demo_code/tests/detect_primes_threads.cpp
UTF-8
1,642
3.3125
3
[]
no_license
#include <fstream> #include <iostream> #include <assert.h> #define NUM_THREADS 4 size_t* primes[NUM_THREADS]; size_t num_primes[NUM_THREADS]; struct args { int tid; int lb; int ub; }; bool IsPrime(size_t num) { if (num <= 1) return false; // zero and one are not prime for (size_t i=2; i*i<=num; i++) { ...
true
1ae79ada0f7bb5a54d947086ebd4f544c4865a6a
C++
shizhonghao/leetcode
/387.cpp
UTF-8
827
2.734375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; class Solution { public: int firstUniqChar(string s) { int result = s.length()+1; char ch; map<char,int> last; map<char,int> cnt; map<char,int> ::iterator it; for(int i=0;i<s.length();i++) { last[...
true
6b2e2b48f4d563bfcb64fdc29a0220f4734f1dd9
C++
djperrone/SpaceAdventures_2.0
/SpaceAdventures_2.0/src/GameManagers/CollisionManager.cpp
UTF-8
3,107
2.703125
3
[]
no_license
#include "sapch.h" #include "Math/Vector2d.h" #include "CollisionManager.h" #include "ObjectTemplates/Character.h" #include "ObjectTemplates/GameObject.h" #include "MyObjects/Asteroid.h" CollisionManager::CollisionManager(std::list<std::shared_ptr<Character>>* objList, std::list<std::unique_ptr<Asteroid>>* asteroid...
true
2e60b67bc3ffd14fc0f0ebaa9504bbaf1ad4da8f
C++
ReeniePie/SDI
/Source Code/Image Annotator/Image Annotator/AnnotationsFile.cpp
UTF-8
3,525
3
3
[]
no_license
#include "AnnotationsFile.h" #include "iostream" void AnnotationsFile::newShape() { } void AnnotationsFile::save() { std::ofstream file(annotationsFilePath); file << numOfImages << std::endl; if (file) { for (int i = 0; i < numOfImages; i++) { int t = 0;//shape types counter int p = 0;//shape points co...
true
9880a101d36fb7d2e5af2baa61bb82e628f9b829
C++
madhav-bits/Coding_Practice
/leetAllOOneDataStruc.cpp
UTF-8
7,493
3.640625
4
[]
no_license
/* * //***********************************************************432. All O`one Data Structure.**************************************************** Implement a data structure supporting the following operations: Inc(Key) - Inserts a new key with value 1. Or increments an existing key by 1. Key is guaranteed to be a ...
true
be94571e6cb27058a701d769f61ecadaaf73e37d
C++
zuanfeng/C_learn
/data_structure/graph/shortpath/graph.cpp
UTF-8
1,315
3.09375
3
[]
no_license
#include <stdio.h> #include "queue.h" #include "head.h" #define MAX 20 int visited[MAX]; void (* VisitFunc)(int v); void DFS(ALGraph G,int v){ int w; visited[v] = 1; VisitFunc(v); for(w = FirstAdjVex(G,v);w >= 0;w = NextAdjVex(G,v,w)) if(!visited[w]) DFS(G,w); } void DFSTraverse(ALGraph &G,void...
true
47c7fa79a99eef93c81f49d83dff8ea33c682dab
C++
ssjf409/PS
/라인/6.cpp
UTF-8
1,675
2.71875
3
[]
no_license
#include <string> #include <vector> #include <map> #include <queue> using namespace std; map<string, string> comp_want; map<string, int> comp_cnt; map<string, queue<char>> app_want; // map<string, int> app_cnt; vector<string> stov(string str) { int prev = -1; int cur = 0; vector<string> v; while(tru...
true
dcfea17fa7ed081e8d189b422db97e35dc5a257c
C++
Kokoster/gp4viewer
/gp4viewer/src/note.cpp
UTF-8
6,054
2.8125
3
[]
no_license
#include "note.h" #include <iostream> #include <fstream> GraceNote readGraceNote(std::ifstream& inputStream) { GraceNote graceNote = { .fret = 0, .dynamic = 0, .transition = 0, .duration = 0 }; graceNote.fret = readData<char>(inputStream); graceNote.dynamic = ...
true
330a9b478e4b5ac74a05b2bc6fb274ee0c71f404
C++
JoeCrouch/TextAdventure
/src/menu/mainMenu.cpp
UTF-8
3,045
3.265625
3
[]
no_license
#include <iostream> #include <stdlib.h> #include "mainMenu.h" #include "stringManager.h" using std::cout; using std::endl; using std::cin; using std::getline; MainMenu& MainMenu::instance() { static MainMenu instance; return instance; } void MainMenu::printTitle() { cout << StringManager::repeatedSym...
true
86630c588150b126bf0a1eeb97d97cae9bdce0cf
C++
rikonek/zut
/semestr_2/zaawansowane_programowanie_obiektowe_c++/iostreams.cpp
UTF-8
495
3.796875
4
[]
no_license
// Implement a program that // reads N values from command line // reads N floating point values // checks if values are given in ascending/descending order // if ascending multiply, descending add #include <iostream> #include <vector> int main() { unsigned int number=0; std::vector<float> a; std::cout <...
true
4140e6f1643711f95a5b363ee78ea49c51836269
C++
MrPerfekt/Car
/src/libraries/Car/PartialAdjustmentCalculation.h
UTF-8
928
2.671875
3
[]
no_license
/*! Copyright 2013 Andreas Gruber */ #ifndef PARTIAL_ADJUSTMENT_CALCULATION #define PARTIAL_ADJUSTMENT_CALCULATION #include "DefineLib.h" #include "AdjustmentCalculation.h" class PartialAdjustmentCalculation : public AdjustmentCalculation{ private: double currentValue; double currentResult; protected: void prepa...
true
c24580d0fc58c502a93d1dfa94b4055d5a456042
C++
15831944/slefConference
/court/court/Include/RSMTMCU/AVDataPacket.h
UTF-8
3,116
2.53125
3
[]
no_license
#ifndef __AVDATAPACKET_H__ #define __AVDATAPACKET_H__ //##ModelId=43A0F9F202FD class AFX_EXT_CLASS AVDataOutPacket { public: //##ModelId=43A0F9F202FE AVDataOutPacket(bool bAutoDelete=true,int nBufferLength=1024) :m_pBuffer(NULL) ,m_nBufferLength(nBufferLength) ,m_bAutoDelete(bAutoDelete) { m_pBuffer=(unsig...
true
f21c001f02d2d4c849b0de1efd0f3064f487e062
C++
kuroyam/Sketch
/Projects/Sketch/src/Scenes/Sketch170418.cpp
UTF-8
807
2.765625
3
[]
no_license
// // Sketch170418.cpp // Sketch // // Created by Shun Kuroda on 2017/04/18. // // #include "Sketch170418.hpp" void Sketch170418::setup() { ofSetWindowShape(500, 500); ofBackground(255); } void Sketch170418::update() { for_each(inks.begin(), inks.end(), [](Ink& ink){ ink.update(); }); } v...
true
b45ff886ec4704d8b0083ed20536ee5a415562f5
C++
ytw0728/BOJ
/6086.cpp
UHC
1,326
2.796875
3
[]
no_license
// ǮĿ ˰ / ī ˰ #include <stdio.h> #include <string.h> #include <algorithm> #define LAST_POINT 'Z'-'A'+1 #define WHOLE 'z' - 'a' + 'Z' - 'A' + 2 using namespace std; int pipes[WHOLE+1][WHOLE+1]; int visited[WHOLE+1]; int past_point[WHOLE+1]; void back(int start, int water) { if (start != 1) { int end = past_poi...
true
d1aa7e4b3be7ba0a0c75d75b416f7e0a16e4b8f4
C++
alanwj/mines-solver
/mines/solver/local.cpp
UTF-8
5,907
2.859375
3
[]
no_license
#include "mines/solver/local.h" #include <cstddef> #include <queue> #include <tuple> #include <vector> #include "mines/compat/make_unique.h" #include "mines/game/grid.h" namespace mines { namespace solver { namespace local { namespace { class LocalSolver : public Solver { public: LocalSolver(const Game& game) :...
true
fc8ad5655e3224387c9431fe81970622c6349727
C++
pcw109550/problem-solving
/LeetCode/xor-queries-of-a-subarray.cpp
UTF-8
606
3.546875
4
[]
no_license
// 1310. XOR Queries of a Subarray #include <iostream> #include <vector> class Solution { public: std::vector<int> xorQueries(std::vector<int>& arr, std::vector<std::vector<int> >& queries) { // O(N) std::vector<int> result; int N = arr.size(); std::vector<in...
true
27476ef097fe7f1a1703ccf87b5680695279285f
C++
rajat-29/PRE-UCA
/MULTIPLE DERIVED CLASS/MULTILPLE INHERTIANCE CONSTRUCTOR.cpp
UTF-8
737
3.75
4
[]
no_license
#include<iostream> using namespace std; class base { public: int a; base(int x) { a=x; cout<<"BASE CONSTRUCTOR CALLED"<<endl; } ~base() { cout<<"BASE DESTRUCTOR CALLED"<<endl; } }; class derive:public base { public: int b; derive(int x,int y):base(x) { b=y; cout<<"DERIVE CONSTRUCT...
true
3ad0c56e4873634412890d7a911a6ffac67f43bc
C++
1026minjae/BaekjoonAlgorithm
/11866.cpp
UTF-8
584
2.796875
3
[]
no_license
#include <cstdio> int main() { int N, K, i, cnt = 0, cnt2, cursor; int *people; scanf("%d %d",&N,&K); people = new int[N]; for(i=0;i<N;i++) people[i] = i+1; cursor = K-1; printf("<"); while(true) { printf("%d",people[cursor]); people[cursor] = 0;...
true
6b94d028ff6ba83b432dfc3feb63840f66cf2930
C++
Artexety/inflatecpp
/source/adler32.cc
UTF-8
1,468
2.75
3
[ "MIT" ]
permissive
#include "adler32.h" unsigned int adler32_z(unsigned int adler, const unsigned char *buf, unsigned int len) { unsigned long sum2; unsigned n; /* split Adler-32 into component sums */ sum2 = (adler >> 16) & 0xffff; adler &= 0xffff; /* in case user likes doing a byte at a time, keep it fast */ if (len == 1) { ...
true
3e3dfa02950571f60e7e21e4b685166c424affd5
C++
ajmarin/coding
/uva/Volume CVII/10789.cpp
UTF-8
757
2.53125
3
[]
no_license
///////////////////////////////// // 10789 - Prime Frequency ///////////////////////////////// #include<cstdio> #include<cstring> bool sieve[2005]; unsigned int cnum,i,j,tnum; unsigned short int oc[128]; char ans[100], line[2005],tail; int main(void){ memset(sieve,1,sizeof(sieve)); sieve[0] = sieve[1] = 0; for(i = 4...
true
46419a43535634b0ae50f87d84aa129e0d8cc433
C++
skyformat99/RedisClusterClient
/src/RedisNode.h
UTF-8
1,283
2.640625
3
[ "MIT" ]
permissive
#ifndef __REDISNODE_H__ #define __REDISNODE_H__ #include <string> #include "hiredis.h" #include <memory> #include <functional> #include <list> #include <chrono> typedef std::shared_ptr<redisReply> ReplySptr; typedef std::function<void(redisReply *, const char *command)> PipelineCommandCallback; struct Pipel...
true
bfff97ace471b53246a37fe44c1a747b99e1bf03
C++
tktk2104/TktkLib
/TktkDirectX12GameLib/TktkDX12WrappingLib/inc/TktkDX12Wrapper/Resource/Buffer/Constant/ConstantBuffer.h
SHIFT_JIS
1,344
2.5625
3
[]
no_license
#ifndef CONSTANT_BUFFER_H_ #define CONSTANT_BUFFER_H_ #include <TktkContainer/HeapArray/HeapArray.h> #include "ConstantBufferData.h" namespace tktk { // uConstantBufferDatavǗNX class ConstantBuffer { public: ConstantBuffer(unsigned int constantBufferNum); ~ConstantBuffer() = default; public: // uConstan...
true
ec48356e745a4fc02c6cbb4b70f7b7ba1a83ee61
C++
spencerparkin/Junk
/Cornucopia/Code/Nodes/BoundedFloatPairNode.h
UTF-8
1,422
2.921875
3
[]
no_license
// BoundedFloatPairNode.h namespace Cornucopia { //================================================================================= // This is like the bounded float node, but maintains a pair of values constrained // in such a way that one must always be less then or equal to the other. You could // think of it...
true
e129e3d8b80221e5f687b8a6f7f193ec49e369ac
C++
tuonii/notspot_sim_cpp
/src/notspot_controller/include/notspot_controller/StandController.hpp
UTF-8
1,325
2.640625
3
[ "MIT" ]
permissive
/* * StandController.hpp * Author: lnotspotl */ #pragma once #include <Eigen/Core> #include <sensor_msgs/Joy.h> #include "notspot_controller/StateCommand.hpp" class StandController{ public: // StandController class constructor - set default stance, StandController(Eigen::Matrix<float, 3, 4> ...
true
b57e125f97486654b66e2c6d13c37bb3a3a34cea
C++
YunlongNie/BayDR
/CauEst2.cpp
UTF-8
1,251
2.59375
3
[]
no_license
/** Causal <- apply(CSample,1,function(x) { tem <- phi0+phi2/sqrt(K)*(sum(x[seq(1,((r-2)*K),by=r)])-0.5*K)+ lambda2/sqrt(K)*(sum(x[seq(3,(r*K),by=r)]*x[seq(4,(r*K),by=r)])-Mean34*K) (inv.logit(tem+phi1+lambda1/sqrt(K)*(sum(x[seq(2,(r*K),by=r)])-0.5*K)) - inv.logit(tem)) } ) */ #include <Rcpp.h> using namesp...
true
0d1027f3c8d7cc9f2b64117062f37e7b95b5357f
C++
visualizersdotnl/cookiedough
/code/fast-cosine.h
UTF-8
1,227
2.59375
3
[ "MIT" ]
permissive
// cookiedough -- fast (co)sine #pragma once constexpr unsigned kFastCosTabLog2Size = 10; // Equals size of 1024 constexpr unsigned kFastCosTabSize = (1 << kFastCosTabLog2Size); extern double g_fastCosTab[kFastCosTabSize+1]; void InitializeFastCosine(); // [0..1] equals [0..2PI] CKD_INLINE static float fastcosf(d...
true
c95c4635409c551987643a114de7e0c7b95959c3
C++
Aaryankamboj/Data-Structures-and-algorithms
/dynamically_initialization_of_2D_Arrays.cpp
UTF-8
492
2.890625
3
[]
no_license
#include<iostream> #include<random> using namespace std; int main(){ int row, col; cin >> row >> col; int **arr=new int*[row]; for(int i=0; i<row; i++){ arr[i]= new int[col]; } for(int i=0; i<row; i++){ for(int j=0; j<col; j++){ arr[i][j] = rand()%100; } ...
true
22a7de68c8f8965de1284f09087080223b2961da
C++
renardbebe/myPOJ
/1363.Rails.cpp
UTF-8
827
2.640625
3
[]
no_license
#include <iostream> #include <cstdlib> #include <cstdlib> #include <algorithm> #include <cstring> #include <stack> #include <deque> using namespace std; int a[1001]; int main () { int n; while(cin >> n) { if(n == 0) break; while(1) { memset(a,0,sizeof(a)); deque<int>q; stack<int>s; cin >> a[0]; i...
true
d850b3f84a9fcffded71c7b90f5fd38827cddad6
C++
zjkmxy/algo-problems
/平成26年/其他图论/POJ1659 Havel定理(顶点度数构图).cpp
UTF-8
1,158
2.75
3
[ "LicenseRef-scancode-public-domain", "CC0-1.0" ]
permissive
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<sstream> #include<queue> #include<vector> using namespace std; #define MAXN 20 struct DATA { int deg; int lab; }arr[MAXN]; typedef DATA *PDATA; int n; int mat[MAXN][MAXN]; int comp(const void *A, const void *B) { return PDATA(B)->...
true
3416eeb81680d40288c63edb8805c0c2575423f4
C++
E-TD/CSE_190_Virtual_Reality
/Cave Simulator/Minimal/Cam.cpp
UTF-8
3,589
3.0625
3
[]
no_license
#include "Cam.h" Cam::Cam() { // Default camera parameters cam_pos = glm::vec3(0.0f, 0.0f, 20.0f); // e | Position of camera cam_look_at = glm::vec3(0.0f, 0.0f, 0.0f); // d | This is where the camera looks at cam_up = glm::vec3(0.0f, 1.0f, 0.0f); // up | What orientation "up" is toWorld = glm::mat4(1.0f); ...
true
499f615a6cb01a77d4129ae29288f17b5ec298e7
C++
clangen/autom8
/src/app/util/ConsoleLogger.cpp
UTF-8
2,366
2.671875
3
[ "BSD-3-Clause" ]
permissive
#include "ConsoleLogger.h" #include <cursespp/SimpleScrollAdapter.h> #include <app/util/Message.h> #include <f8n/str/util.h> #include <time.h> using namespace f8n; using namespace f8n::runtime; using namespace autom8::app; using namespace cursespp; static const int MESSAGE_LOG = autom8::app::message::CreateType(); ...
true
55e39af2a384d503009c9db88feb8c8cf7a3f5f9
C++
goodann/AlgorithmsStudy
/SSK/Algorithms/04String/07.Pangrams.cpp
UTF-8
1,060
2.65625
3
[]
no_license
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream> #include <numeric> #inc...
true
95c1ba7606daf8f31e7d44fd927407e0616c3719
C++
nrghosh/Data-Structures
/Trees/BST-Height.cpp
UTF-8
441
3.21875
3
[]
no_license
/* Height of a BST The tree node has data, left child tree and right child tree class Node { int data; Node* left; Node* right; }; */ int height(Node* root){ if(root == NULL){ return -1; } else { int lHeight = height(root->left); int rHeight = height(root->right); ...
true
9ef0d388386e1d857cc8a1288727cc7dc03d5d39
C++
kongakong/StackoverflowCode
/c++/SO-60052050/main.cpp
UTF-8
226
3.09375
3
[]
no_license
#include <iostream> #include <cstdlib> using namespace std; int main() { int var; cout << "What size do you want to choose: "<< endl; cin >> var; int arr[var]; arr[0] = 10; cout << arr[0] << endl; }
true
13251931148b697fbbedccdf28c42cccf1105da7
C++
victorleal/lab_poo_bilheteria
/Bilhete.h
UTF-8
853
2.53125
3
[]
no_license
/* * File: Bilhete.h * Author: victorleal * * Created on 8 de Outubro de 2012, 20:31 */ #ifndef BILHETE_H #define BILHETE_H #include "PersistentObject.h" #include "Cliente.h" #include "Espetaculo.h" #include "Pagamento.h" class Bilhete : public PersistentObject { private: Cliente c...
true
ea6a9b9db362b77490ccf2b917e283bfecb1a51c
C++
epics-extensions/ea-cpp
/src/common/storage/CtrlInfo.cpp
UTF-8
7,658
2.796875
3
[]
no_license
// epics #include <cvtFast.h> // tools #include "tools/GenericException.h" #include "tools/string2cp.h" #include "tools/Conversions.h" // storage #include "storage/CtrlInfo.h" CtrlInfo::CtrlInfo() { size_t additional_buffer = 10; _infobuf.reserve(sizeof(CtrlInfoData) + additional_buffer); CtrlInfoData ...
true
a6c07db3a06bcdcc2fd8808846220d206cde1a38
C++
zeliard/MCServer
/src/BlockEntities/BlockEntity.cpp
UTF-8
2,784
2.59375
3
[ "Apache-2.0" ]
permissive
// BlockEntity.cpp // Implements the cBlockEntity class that is the common ancestor for all block entities #include "Globals.h" #include "BeaconEntity.h" #include "BlockEntity.h" #include "ChestEntity.h" #include "CommandBlockEntity.h" #include "DispenserEntity.h" #include "DropperEntity.h" #include "EnderChestEntit...
true
74191342dc0978ae2413228e83acf06d42125fa2
C++
antimasingh070/CodeChef
/MyCode/Find Second Largest.cpp
UTF-8
294
2.703125
3
[]
no_license
#include <iostream> #include <limits.h> using namespace std; int main() { int a[3],max=INT_MIN,smax=INT_MIN,i; cin>>a[0]>>a[1]>>a[2]; for(i=0; i<3; i++) { if(a[i]>max){ smax=max; max=a[i];} else if(a[i]>smax){ smax=a[i];} } cout<<smax<<endl; return 0; }
true
572f66647fcf170bd5b7bdd5e74be0102b452f3a
C++
jlechem/RetroGaming
/RetroGaming/MontyHall.cpp
UTF-8
1,731
3.125
3
[ "Apache-2.0" ]
permissive
/* This file is part of {{ RetroGaming }}. Copyright [2019] [Justin LeCheminant] 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...
true
0c339dd5a3b5b80605f7e9dbcd9e392ca1447150
C++
cesarl/ThreadsMessagePassing
/TMP/TMP/src/dispatcher.hpp
UTF-8
753
2.59375
3
[]
no_license
#pragma once #include "queue.hpp" namespace TMQ { struct MessageBase; class Dispatcher { private: TMQ::Queue *_queue; bool _chained; Dispatcher(const Dispatcher &) = delete; Dispatcher &operator=(const Dispatcher &) = delete; template < typename _Dispatcher , typename _Message , typename _Func>...
true
f82ab52e590fe46ad65e331f3f3928dd05292783
C++
Vovtshik/project_ex_11.14
/SourceE1114.cpp
UTF-8
2,295
3.828125
4
[]
no_license
#include "../std_lib_facilities.h" void in_file_text(string& name_file, vector<string>&vs); // The function of reading text from file to vector. void number_characters_each_category(const string&s, int& al, int& sp, int& di); // The function for countin...
true
e2a85e58b88293fe64c7ec2e03ffa76c078fd970
C++
JuntaoLiu01/LeetCode
/Array/3SC.cpp
UTF-8
856
3.296875
3
[]
no_license
#include <vector> #include <algorithm> #include <stdlib.h> using namespace std; class Solution { public: int threeSumClosest(vector<int>& nums, int target) { if(nums.size() < 3) return 0; sort(nums.begin(),nums.end()); int closestSum = nums[0]+nums[1]+nums[2]; for(int i...
true
25e58aa6cf532a2c2f801a121378c9112f828408
C++
sumnerjj/6.172
/proj6/icache.h
UTF-8
877
2.625
3
[ "MIT" ]
permissive
#ifndef ICACHE_H #define ICACHE_H #include <cmath> #include "util.h" class ICache { private: struct Sample { Point3D pos; Vector3D norm; double invR0; double r0; double tolerance; Colour irr; bool has_irr; Sample *next; Sample(Point3D& pos, Vector3D& norm);...
true
f4b2d1313f86eec96acc8a27452e40b87e4fe974
C++
AlekseyChi/cpp_project2020
/sort_race/shakersortbyTolstykh.cpp
UTF-8
1,065
3.453125
3
[]
no_license
#include <vector> #include <string> using namespace std; vector<int> ShakerSort_Tolstykh(vector<int> data) { int left = 0; int right = data.size() - 1; while (left <= right) { for (int i = right; i > left; --i) { if (data[i - 1] > data[i]) { swap(data[i - 1], data[i]); ...
true
379a6ccaea8af4da84d14e92b401b99accb2659f
C++
sahilranadive/Public-Private-Keys
/rsa.cpp
UTF-8
3,219
3.34375
3
[]
no_license
#include <iostream> #include <string> #include <time.h> #include <math.h> #include <vector> using namespace std; int generatePrime(int num){ int flag = 0; for(int i = 2; i <= num-1; i++){ if(num%i == 0) break; if(i == num-1) return num; } return generatePrime(num+1); } ...
true
48e5f4a9adce965973141feac0d023213a4ec78a
C++
AugustRush/2017demo
/ARPhysics-master/Engine/Spring.h
UTF-8
2,609
2.828125
3
[ "MIT" ]
permissive
// // Spring.h // // Created by Adrian Russell on 25/03/2014. // Copyright (c) 2014 Adrian Russell. All rights reserved. // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. Permis...
true
16c1263fbe9b8bdb14b851af6a08f4c861636216
C++
we-l-ee/CastAway
/BBM412/BBM412/Moveable.h
UTF-8
1,059
2.875
3
[]
no_license
#pragma once #include <glm\ext.hpp> #include "stddef.hpp" class Moveable { protected: glm::vec3 position; Directions dir; glm::mat4 translation; glm::mat4 rotation; glm::quat quat; void pitch(float angle); void yaw(float angle); void roll(float angle); void pitchAround(float angl...
true
294f8ef0302b39823eaa8c1f6e558d1090ece17f
C++
claywjames/compression
/bytebuffer.hpp
UTF-8
519
2.953125
3
[]
no_license
#ifndef BYTE_BUFFER_HPP #define BYTE_BUFFER_HPP #include <fstream> class byteBuffer { private: unsigned char writeBuffer, readBuffer; int bitsWritten, bitsRead; public: byteBuffer() : writeBuffer(0), readBuffer(0), bitsWritten(0), bitsRead(0) {} void write(bool bit, std::ostream & output); vo...
true
65441b0727b27ca412da7d24eb6b83371974b16a
C++
ciskavriezenga/CSD2_CPP_1920
/CSD2b/session3/sine/writeToFile.cpp
UTF-8
1,028
3.546875
4
[]
no_license
#include "writeToFile.h" WriteToFile::WriteToFile(std::string fileName, bool overwrite) { // check if we are allowed to overwrite file if(!overwrite) { if(fileExists(fileName)){ std::cout << "\n------WriteToFile::WriteToFile------" << "File already exists, not allowed to overwrite!\n"; // N...
true
d751ca9c59f9f22edaa0befa427ca95d3b42c97a
C++
RealChaser/Cpp_Lecture
/C++_4/11_일관된초기화.cpp
UHC
611
3.421875
3
[]
no_license
// 11_ϰʱȭ- 205 page struct Point { int x, y; }; class Complex { int re, im; public: Complex(int a, int b) : re(a), im(b) {} }; int main() { /* int n1 = 0; int n2(0); int x[3] = { 1,2,3 }; Point p = { 1,2 }; Complex c(1, 1); */ // (ü) ϳ ʱȭ ʱȭ . // "Uniform Initialize" /* // copy initialize int n1{ 0...
true