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
2c067708c8be52a2f796ba9202d2e32ddd856577
C++
lobocv/sigproengine
/common_utils/include/domain_conversions.hpp
UTF-8
7,685
3.15625
3
[]
no_license
/*! \file domain_conversions.hpp \authors Calvin Lobo \date August 2006 \brief Conversion routines between sample index, time and depth. Due to finite antenna separation, conversion from time to depth is non-linear (hyperbolic). This library contains common functions to convert between these domains. Def...
true
6fdc55b26b731334fa1f636887a2832d689ebe07
C++
johnmeehan/Game
/cPlayer.h
UTF-8
1,844
2.75
3
[]
no_license
#ifndef INC_CPLAYER_H #define INC_CPLAYER_H //#ifndef INC_CSQUAREDATA_H //#define INC_CSQUAREDATA_H //#ifndef INC_CCHARACTER_H //#define INC_CCHARACTER_H //#ifndef INC_ENUM_H //#define INC_ENUM_H #include"cSquareData.h" #include"cCharacter.h" #include"enum.h" #include"RandomNum.h" #include "cE...
true
94dc32b40cf90d6e491a4a708f81e73226d6657c
C++
adityanjr/code-DS-ALGO
/CodeForces/Complete/1200-1299/1271A-Suits.cpp
UTF-8
493
2.75
3
[ "MIT" ]
permissive
#include <cstdio> int main(){ long a, b, c, d, e, f; scanf("%ld %ld %ld %ld %ld %ld", &a, &b, &c, &d, &e, &f); long x = a; long y = (b < c) ? b : c; long total(0); if(e < f){ y = (y < d) ? y : d; total = f * y; d -= y; x = (x < d) ? x : d; total += e * x; } ...
true
a920cab619c9a2a11c751430a0c3ef483d1f5aa7
C++
alvent98/C-plus-plus_Programming
/FilterBlur.cpp
UTF-8
1,475
3.203125
3
[]
no_license
#pragma once #include "FilterBlur.h" #include "Array.h" // Copy Constructor FilterBlur::FilterBlur(const FilterBlur & aFilter) { N = aFilter.N; } Image FilterBlur::operator<< (const Image & image) { //Create the new image object that is going to be returned Image newImage = image; int N = getN(); ...
true
bcbd9d594a6549f7daa1d48f0be2e95252f009b3
C++
burakbayramli/books
/NumericalRecipes2/recipes/golden.cpp
UTF-8
830
2.671875
3
[]
no_license
#include <cmath> #include "nr.h" using namespace std; namespace { inline void shft2(DP &a, DP &b, const DP c) { a=b; b=c; } inline void shft3(DP &a, DP &b, DP &c, const DP d) { a=b; b=c; c=d; } } DP NR::golden(const DP ax, const DP bx, const DP cx, DP f(const DP), const DP tol, D...
true
d71426a10e4a7bc4a7f07d9d992b3d3421a5ebd2
C++
Pavan281/Functions.cpp
/Functions.cpp
UTF-8
1,127
4.125
4
[]
no_license
# Functions in C++ # Write a C++ program to Check Whether a Number can be Express as Sum of Two Prime Numbers. # Your output need to look something like this : Enter a positive integer: 34 34 = 3 + 31 34 = 5 + 29 34 = 11 + 23 34 = 17 + 17 #include <iostream> using namespace std; int main() { int n, i, a = 1, b = ...
true
74310e320d8c331c379b30f10d7033c6eb312af2
C++
Zixuan-QU/Leetcode
/Code/rotate.cpp
UTF-8
1,508
3.546875
4
[]
no_license
//make a copy class Solution { public: void rotate(vector<vector<int> > &matrix) { int n = matrix.size(); vector<vector<int> > copy(n,vector<int>(n)); cout<<copy.size(); for(int i =0;i<n;i++) for(int j = 0;j<n;j++) copy[j][n-1-i] = matrix[i][j]; ma...
true
8109f4a0acdd7c72a17f504fcbdd39307bf73b6c
C++
lxlenovostar/algorithm
/leetcode/offer_ii_7/main.cc
UTF-8
1,953
3.25
3
[]
no_license
#include <set> #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> rets; std::set<int> check_vals; std::sort(nums.begin(), nums.end()); for (int i = 0; i < (...
true
51dda322943dbb7ea662a3883a7f598751693fa1
C++
liumingzhuo/StructureAlg
/dynamic/SellStockTwo122.cc
UTF-8
1,320
3.640625
4
[]
no_license
/** * 122. Best Time to Buy and Sell Stock II * Say you have an array prices for which the ith element is the price of a given stock on day i. * Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times). * Note: Y...
true
a884a734a115ba1a99e4411b758db855f7429052
C++
mamunhpath/leet-code
/sqrtx-4.cpp
UTF-8
331
3.15625
3
[]
no_license
// https://leetcode.com/problems/sqrtx/description/ class Solution { public: int mySqrt(int x) { if (x < 2) return x; int s = 0, e = x; while(e - s > 1){ int m = s + (e - s)/2; if(m <= x / m) s = m; else e = m; } return s...
true
69a48a434bffc4b837ecfc149650492e88ac1efc
C++
sheeraznarejo/SPOJ
/bytes2.cpp
UTF-8
670
2.96875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> int timesarray[10000008]; int main() { int n; int k, j; k = 5; j = 200; scanf("%d", &n); while(n--) { int arraysize, entry, exit2; int maxexit = 0; scanf("%d", &arraysize); int p = arraysize; while(p--) { scanf("%d %d", &entry, &exit2)...
true
6e5374bc74b07a26e6cc18e67c3c87aead16648c
C++
dongfufu/icp
/main.cpp
UTF-8
4,755
2.59375
3
[]
no_license
#include <iostream> #include <cmath> #include <cstdio> #include <iostream> #include <eigen3/Eigen/Dense> #include <eigen3/Eigen/Geometry> #include <ceres/ceres.h> #include <ceres/rotation.h> #include <vector> using namespace std; // Read a Bundle Adjustment in the Large dataset. // Templated pinhole camera...
true
ee276cd5138bed67714fd591d667a0514bed18fb
C++
niuxu18/logTracker-old
/second/download/squid/gumtree/squid_repos_function_4353_squid-3.3.14.cpp
UTF-8
458
2.53125
3
[]
no_license
int Ssl::ErrorDetail::convert(const char *code, const char **value) const { *value = "-"; for (int i=0; ErrorFormatingCodes[i].code!=NULL; ++i) { const int len = strlen(ErrorFormatingCodes[i].code); if (strncmp(code,ErrorFormatingCodes[i].code, len)==0) { ErrorDetail::fmt_action_t ac...
true
4d68afe28d5635df859206a43fd24ab954c2b446
C++
OTTFFYZY/StandardCodeLibrary
/DataMaker_SpecialJudge_Debug/Checker_spj.cpp
UTF-8
746
2.53125
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <stdlib.h> #include <sstream> using namespace std; ifstream fin,myfin; string s1,s2; const char datamk[]="datamaker.exe > in.txt"; const char mypro[]="myprogram.exe < in.txt > myout.txt"; int f=1; bool check() { // } void spj() { while(!fin.eof(...
true
a14bc0d870f351aa46c7c303f01eb7234e8208b4
C++
UniqueZHY/ZHY
/algorithm/54_炒鸡大整数.cpp
UTF-8
1,371
2.734375
3
[]
no_license
/************************************************************************* > File Name: 54_炒鸡大整数.cpp > Author: > Mail: > Created Time: 2019年12月21日 星期六 18时04分34秒 ************************************************************************/ #include<stdio.h> #include<string.h> #define max_n 1000 int ans[max_n + 5]; in...
true
483ae11db02765ee21ebde485d8af3923c2bb59c
C++
Fao2212/Proyecto-I-Estructuras
/SimulacionRestaurante/Cajero.cpp
UTF-8
1,218
2.75
3
[]
no_license
#include "Cajero.h" #include "Estado.h" #include "Cola.h" #include "Caja.h" #include "ListaSimple.h" #include "Nodo.h" #include "Peticion.h" #include "Plato.h" Cajero :: Cajero(Caja * caja){ this->estado = new Estado(); this->peticiones = new Cola<Peticion>(); this->atendidos = 0; this->ca...
true
d08820217f87c33a465894c36a71ccf16dcb4b3c
C++
raetro-deps/simdutf
/tests/reference/encode_utf16.h
UTF-8
426
2.703125
3
[ "MIT", "Apache-2.0" ]
permissive
#pragma once #include <cstdint> namespace simdutf { namespace tests { namespace reference { namespace utf16 { // returns whether the value can be represented in the UTF-16 bool valid_value(uint32_t value); // Encodes the value using either one or two words (returns 1 or 2 respectively) // Returns 0 if the v...
true
10b44d687d9aaba263bee106417f415af5ebb460
C++
PhantomStorm95/2020-2021-Prog-1-Programs-
/MP2_Wk2_D2_Bad_Credit_Random_Card_Generator.cpp
UTF-8
6,482
3.75
4
[]
no_license
//Bad Credit Random Credit Card Number Generator Souvik Kar Period 4 Petr #include <iostream> #include <vector> #include <math.h> #include<ctime> using namespace std; int main(){ //Variables //A variable that stores the random credit card number for future use, here it is a global variable ...
true
673c7cc58b8a209173acea88ce35434a31d760d5
C++
ScarletMcLearn/UniThings
/CSC101-CPP/CSE-101-master/Aunnoy Sensei Reloaded.cpp
UTF-8
1,609
3.921875
4
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int factorial(int num); void sort_array(int Arr[]); int median(int Arr[]); int main() { while (true) { cout<<endl<<endl<<"Enter Choice: "; string choice; cin>> choice; if (choice == "f") { cout<<endl<<"Enter Number: "; in...
true
95e9cb4726a2f7b0c1c16b4bebc831eb5e173bee
C++
thealberteitor/Metodologia-de-la-Programacion
/Prácticas MP/ConectaN/Version 1/include/Tablero.h
UTF-8
538
2.625
3
[]
no_license
#ifndef __TABLERO_H__ #define __TABLERO_H__ #include<iostream> using namespace std; class Tablero{ private: Matriz m; int fichas; public: Tablero(int fil, int col); int getfils() const; int getcols() const; char get(int fil, int col) const; void setfichas(int fich); bool Finalizado(char valor, i...
true
4d16feef0697045027d3de041f445478482988ee
C++
nnm-t/m5stack-visiting-card
/scroll_text.h
UTF-8
1,395
2.796875
3
[ "MIT" ]
permissive
#pragma once #include <M5Stack.h> #include "rect.h" #include "vector2.h" class ScrollText { static constexpr int32_t width = TFT_HEIGHT; TFT_eSprite* _sprite; const Vector2 _position; const Rect _rect; const uint16_t _dx; int32_t _x; int32_t _y; bool _is_scroll; String _string; int32_t _scroll_width; ...
true
b4df1a60e876f22be6c38681040d8b7924f29005
C++
Emilien-Delevoye/PSU_zappy_2019
/tests/src/forward.cpp
UTF-8
1,424
2.53125
3
[]
no_license
/* ** EPITECH PROJECT, 2020 ** zappy ** File description: ** Created by emilien */ #include "tests.h" #include <gtest/gtest.h> void do_move(data_server_t *data, client_t *cli) { cli->drone.orientation = NORTH; forward(data); EXPECT_EQ(cli->drone.tile->coord[0], 1); EXPECT_EQ(cli->drone.tile->coord[1],...
true
db9f3ddf86046236b7cc3baed5bd0a4a6eb7215c
C++
t12cs015/TileMatrix
/Matrix.cpp
UTF-8
1,514
3.71875
4
[]
no_license
/* * Matrix.cpp * * Created on: 2015/08/31 * Author: stomo */ #include <iostream> #include <cstdlib> #include <cassert> #include "Matrix.hpp" using namespace std; /** * Default constructor */ Matrix::Matrix() { #ifdef DEBUG cout << "Matrix()\n"; #endif m_ = n_ = 0; top_ = NULL; } /** * Constructor...
true
1ea53d77bd79a945758edb723b88aabb7adf292c
C++
tjmahr/adventofcode18
/src/day09.cpp
UTF-8
2,109
3.109375
3
[]
no_license
#include <Rcpp.h> using namespace Rcpp; // This is a simple example of exporting a C++ function to R. You can // source this function into an R session using the Rcpp::sourceCpp // function (or via the Source button on the editor toolbar). Learn // more about Rcpp at: // // http://www.rcpp.org/ // http://adv-r.had...
true
e047582d1edd85cfbce614d38293fe6bad728272
C++
simon0191/ProgrammingExercises
/UVA.10924.PrimeWords/primeWords.cpp
UTF-8
876
2.96875
3
[]
no_license
#include <cstdio> #include <cmath> #include <cstring> #include <cctype> #include <sstream> using namespace std; int f(char c){ if(isupper(c)){ return c-'A'+27; } else{ return c-'a'+1; } } int main(){ char buff[1024]; int isPrime[1062]; memset(isPrime,true,sizeof(isPrime)); ...
true
e8d0033ace899b924c626c4477b7766ad7cb3136
C++
dbetm/cp-history
/LeetCode/BC_BTZigZagLevelOrderTraversal.cpp
UTF-8
1,389
3.390625
3
[]
no_license
#include <bits/stdc++.h> // https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ // Tag(s): Árboles, estructuras de datos // NO COMPLETE IMPLEMENTED HERE using namespace std; /** * Definition for a binary tree node. **/ struct TreeNode { int val; TreeNode *left; TreeNode *right; Tree...
true
42bfb063794bbff139fa0259d5fd71da1539c4b8
C++
EmberCodeEx/Artificial-intelligence
/Search/informedGBS.cpp
UTF-8
2,753
3
3
[]
no_license
#include<iostream> #include<vector> #include<fstream> #include<queue> #include<functional> using namespace std; using Queu = priority_queue < pair<int, pair<int, int>>, vector < pair<int, pair<int, int>>>, greater < pair<int, pair<int, int> > >>; void getFile(ifstream &in, string filename) { in.open(filename); } bo...
true
290af5f2abbc83294cb5a8ad04f5af2c1b1f5c6c
C++
leandrolillo/dev
/playground/src/video/Renderer.h
UTF-8
2,511
2.828125
3
[]
no_license
/* * Renderer.h * * Created on: Apr 1, 2021 * Author: leandro */ #ifndef SRC_VIDEO_RENDERER_H_ #define SRC_VIDEO_RENDERER_H_ #include<resources/ShaderProgramResource.h> #include<VideoRunner.h> #include<Camera.h> class Renderer { protected: const ShaderProgramResource *shader = null; VideoRunner *v...
true
66590a4c9a506ecbe09ead6a5a87a7370a64af55
C++
sinanerdem/algorithms
/objects/recursion/numbinarydigit.cpp
UTF-8
1,405
2.734375
3
[]
no_license
/*---------------------------------------------------------------- Copyright (c) 2015 Author: Jagadeesh Vasudevamurthy file: num_binary_digit.cpp -----------------------------------------------------------------*/ /*---------------------------------------------------------------- All includes here -----------...
true
e06db40af19f60418c8934480f7b6bb3870fea42
C++
095990/programming-kirpicheva-ulyana
/2021.09.20-Homework-2/Solution1/Project1/Source.cpp
WINDOWS-1251
2,311
3.109375
3
[ "Apache-2.0" ]
permissive
#include <iostream> using namespace std; int main(int argc, char* argv[]) { int n = 0; int a = 0; int b = 0; int c = 0; cin >> n; cin >> a; cin >> b; cin >> c; a = n / 100; b = n / 10 % 10; c = n % 10; switch (a) { case 1: cout << " "; break; case 2: cout << " "; break; case 3: cout << " ";...
true
3b617a44e277da09c24843b30beb0ee30e3a98a2
C++
Evalir/Algorithms
/Problems/TOJ/1017/1017/main.cpp
UTF-8
576
2.546875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; using ll = long long; int n; ll dp[510][510]; ll go(int cand, int rem) { if (rem == 0) return 1; ll w = 0; // increase cand if (dp[cand][rem] != -1) return dp[cand][rem]; if (cand + 1 <= rem) { w += go(cand + 1, rem); } // create...
true
1fcd681d075c66a49b6e6861221c4320479f8535
C++
gameraccoon/hide-and-seek
/editor/src/componenteditcontent/typeeditconstructorhelpers.h
UTF-8
1,332
3.0625
3
[ "MIT" ]
permissive
#ifndef TYPEEDITCONSTRUCTORHELPERS_H #define TYPEEDITCONSTRUCTORHELPERS_H #include <memory> #include <functional> #include <QObject> namespace TypesEditConstructor { class BaseEdit { public: using Ptr = std::shared_ptr<BaseEdit>; }; template<typename T> class Edit : public BaseEdit { public: using Ptr = ...
true
c7c2ab910d744fb74321888372fe7cf2992bdb70
C++
luqilinok/Cpp-primer-Personal
/ch16/ex16_05.cpp
UTF-8
361
3.359375
3
[]
no_license
#include<iostream> #include<string> using namespace std; template<typename T, size_t N> void print(const T(&a)[N]) { for (auto iter = begin(a), iter != end(a); ++iter) { cout << *iter << endl; } cout << endl; } int main() { int a[6] = { 0,2,4,6,8,10 }; string vs[3] = { "hello","world","!" }; print(a); pr...
true
97569b87d33b2caf39f0c038af95fd6e871ced36
C++
xpnguyen/GeomAlgoLib
/geom_algo_lib/mesh.h
UTF-8
5,315
2.921875
3
[]
no_license
#pragma once #include "base.h" #include "rtree.h" #include <unordered_map> #include <limits> typedef index_pair edge_type; typedef index_pair_hash edge_type_hash; struct mesh_face { static const mesh_face unset; union { struct { size_t a, b, c; }; size_t indices...
true
47aaf76df7051f152be0c56f0ba44e34bc7974b8
C++
dmirmilshteyn/MIE444
/Follower/LineFollower.cpp
UTF-8
10,535
2.671875
3
[]
no_license
#include "LineFollower.h" // Global variables for line following int followerState = FOLLOWER_STATE_ONLINE; int turnState = TURN_STATE_DEFAULT; /*************LIne following PID constants***********/ float Kp = 2.1; float Ki = 0.003; float Kd = 700; float lastError; long integral = 0; bool leftForward = true; bool ri...
true
5559e89c5ae025cbb8cfa3ab4a27a8388c6eeae2
C++
zerlok/nsu-prog-all
/oop/task6/lifeobject.cpp
UTF-8
3,023
3.140625
3
[]
no_license
#include <vector> #include "lifeobject.h" #include "action.h" #include "populationmap.h" LifeObject::LifeObject(const Point &pos, int health, int damage, int mass) : _position(pos), _ttl(health), _damage(damage), _mass(mass), _type(Type::none) { if (_damage < Config::object_min_damage) _damage = Confi...
true
1567014179f15dfef85a9eb7c549cf21c9536703
C++
Nitish-K15/ADA
/Sorting/Practice.cpp
UTF-8
1,458
3.703125
4
[]
no_license
// Practice.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include<stdlib.h> #include<time.h> void swap(int &a, int &b) { int temp; temp = a; a = b; b = temp; } void SelectionSort(int a[]) { int min; for (int i = 0;i < 9;i++) ...
true
2e5065652edb23ba285f76aaca30f1ff80690984
C++
Rafat001/Solved_UVA_Problems_By_Rafat001
/UVA 294.cpp
UTF-8
796
2.765625
3
[]
no_license
#include<stdio.h> #include<math.h> int main() { long long t,i,a,b,limit,sum,maxx,n,j,k; scanf("%lld",&t); for(i=1; i<=t; i++) { maxx=0; scanf("%lld%lld",&a,&b); for(j=a; j<=b; j++) { sum=0; limit=sqrt(j); for(k=1; k<=limit...
true
fa32cec7b9cfdbf3ad342dc4c69cc4fa89bbd262
C++
rallister/Phasor
/Phasor/PhasorAPI/memory.cpp
UTF-8
10,923
3.046875
3
[]
no_license
#include "memory.h" #include "api_readers.h" #include "../Common/MyString.h" #include <limits> using namespace Common; using namespace Manager; // Not sure why std::numeric_limits<T>::max conflicts with these defines // But it is.. #undef max #undef min static const int kMaxStringElements = 80; // Parses the input ...
true
3d504f7adb2257eb4686666b3e502a8150da2e8f
C++
spott/microcontroller-projects
/projects/drummaster/rev2/src/pad/Pad.cpp
UTF-8
7,423
2.546875
3
[]
no_license
#include "Pad.h" #include "HiHat.h" #include "Drum.h" #include "Cymbal.h" using namespace digitalcave; ADC* Pad::adc = NULL; Pad* Pad::pads[PAD_COUNT] = { // Type MUX Indices DT Fade new HiHat( MUX_0, MUX_1, MUX_15, 50, 0.95), //Hihat + Pedal new Drum( MUX_2, 50), //Snare new Drum( MUX_3, 50), /...
true
8cf1b9ff1f58ae0ea8bf82cb13d6e8540842da6f
C++
Wingxvii/Ubisoft
/GameTest/Network.cpp
UTF-8
1,513
2.734375
3
[]
no_license
#include "stdafx.h" #include "Network.h" Network::Network() { } Network::Network(std::string ip) { //Start Winsock WSADATA data; WORD version = MAKEWORD(2, 2); //startup int wsOk = WSAStartup(version, &data); if (wsOk != 0) { return; } //socket connection tcp = socket(AF_INET, SOCK_STREAM, 0); //socke...
true
e92f84ec568800f9d010fc8911114ac7f2f1825f
C++
cvmfs/cvmfs
/test/unittests/t_uid_map.cc
UTF-8
6,314
2.875
3
[]
permissive
/** * This file is part of the CernVM File System. */ #include <gtest/gtest.h> #include "uid_map.h" #include "util/posix.h" template <typename MapT> class T_UidMap : public ::testing::Test { protected: static const std::string sandbox; protected: typedef typename MapT::key_type key_type; typedef typenam...
true
5e12d15a6b18624a0b7da9da77fd0ad4d58bc194
C++
ptolemyjenkins/sparky-clone
/SparkEngine-core/src/graphics/texture.cpp
UTF-8
2,242
2.671875
3
[]
no_license
#include "texture.h" #include <unordered_map> #include "../../libs/stb_image.h" namespace sparky { namespace graphics { std::unordered_map<std::string, resource::TextureResource> Texture::loadedTextures; Texture::Texture() { this->fileName = ""; resource = &resource::TextureResource(); } Texture::Texture(s...
true
cec306bb2b19b568e56958b423cf064c0afe9e30
C++
M-Rodrigues/Programming
/Cracking the Coding Interview/Chapter 4 - Trees and Graphs/5.cpp
UTF-8
1,079
3.375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define error -1e6 class TreeNode { public: int data; TreeNode * left = NULL; TreeNode * right = NULL; TreeNode(int data = 0): data(data) {} }; bool isBST(TreeNode * node) { if (!node) return false; if (!node->left && !node->right) retu...
true
6e704572f0842c6408872aed8ed2877f4257180d
C++
Cheney0712/SysMonitor
/src/test/common/TestString.cpp
UTF-8
401
2.609375
3
[ "MIT" ]
permissive
#include <iostream> #include "StringUtil.h" #include <vector> #include <string> using namespace std; void test_string_split() { string ip = "127.0.0.1"; vector<string> strs; StringUtil::Split(ip, '.', strs); for (size_t i = 0; i < strs.size(); ++i) { cout << strs[i] << endl; } } i...
true
15231312d36c8e312cfc4f3e7d26443fa65489c1
C++
keithw96/FYP
/FYP/Play.h
UTF-8
1,856
2.53125
3
[]
no_license
#pragma once #include <SFML/Graphics.hpp> #include <string> #include <fstream> #include <istream> #include "Player.h" #include "Coin.h" #include "Gamestates.h" #include "Goal.h" #include "Enemy.h" #include "Pipe.h" #include "Tile.h" #include "MovingPlatform.h" #include "QuestionBlock.h" enum class PlayState { GAME, ...
true
7f29f3a131d7e63d141db93572eb74fdf99d2aea
C++
vencik/libnn
/src/CXX/libnn/misc/fixable.hxx
UTF-8
5,226
2.84375
3
[ "BSD-3-Clause" ]
permissive
#ifndef libnn__misc__fixable_hxx #define libnn__misc__fixable_hxx /** * Fixable value * * \date 2015/09/09 * \author Vaclav Krpec <vencik@razdva.cz> * * * LEGAL NOTICE * * Copyright (c) 2015, Vaclav Krpec * All rights reserved. * * Redistribution and use in source and binary forms, with or with...
true
debd4e8c6614bf2b979bcedb0dd3c76bdb226ffc
C++
kakol20/HFG
/Models/objLoader.cpp
UTF-8
5,405
2.71875
3
[ "GPL-3.0-only" ]
permissive
/* Beginning DirectX 11 Game Programming By Allen Sherrod and Wendy Jones ObjModel - Used to represent an OBJ model. */ #include<fstream> #include<vector> #include<string> #include"objLoader.h" #include"TokenStream.h" ObjModel::ObjModel( ) { vertices_ = 0; normals_ = 0; texCoords_ = 0; ...
true
f5cfbdd0df3790b87c58cc7761cb4ebf4fb2658f
C++
edrumwri/drake
/solvers/minimum_value_constraint.h
UTF-8
6,961
3.0625
3
[ "BSD-3-Clause" ]
permissive
#pragma once #include <functional> #include "drake/solvers/constraint.h" namespace drake { namespace solvers { /** Computes the penalty function φ(x) and its derivatives dφ(x)/dx. Valid penalty functions must meet the following criteria: 1. φ(x) ≥ 0 ∀ x ∈ ℝ. 2. dφ(x)/dx ≤ 0 ∀ x ∈ ℝ. 3. φ(x) = 0 ∀ x ≥ 0. 4. ...
true
375ff83c0f4c4820c9c709e47d126a570a6ad790
C++
keyboard-man/c_cpp
/boost/test/static_assert.cpp
UTF-8
633
3
3
[]
no_license
/************************************************************************* > File Name: static_assert.cpp > Author: He Jieting > mail: rambo@mail.ustc.edu.cn > Created Time: 2016年02月24日 星期三 15时36分06秒 ************************************************************************/ #include <boost/static_assert.hpp> #i...
true
6f935ad59b1f841985c52137c9742ffea2af75f7
C++
Trbonnes/webserv
/core/webserver.cpp
UTF-8
1,145
2.84375
3
[]
no_license
#include "HttpServer.hpp" bool g_ismaster; HttpServer *g_server; int g_singaled; void printUsage() { std::cerr << "Usage: ./webserv [option argument]" << std::endl; std::cerr << std::endl; std::cerr << "Available options:" << std::endl; std::cerr << "\r-c : set the path to configuration file to the next argume...
true
237ae73f52270db351ca2558cac4010e9c8e1d84
C++
treinamento-fc/maratona
/competicoes/2017/Fase - Regional - 2017/M - Máquina de Café/maquinacafe.cpp
UTF-8
983
3.375
3
[]
no_license
//============================================================================ // Name : Problema M - maquinadecafe.cpp // Solução : Calcule os tempos considerando a máquina em cada um dos andares e depois ache o menor dos tempos // Author : Wilson // Version : // Copyright : Your copyright n...
true
4c2f40c5024c18f802e660bd4694a1a57ea67df0
C++
Maserhe/LeetCode
/653.两数之和-iv-输入-bst.cpp
UTF-8
1,474
3.1875
3
[]
no_license
/* * @lc app=leetcode.cn id=653 lang=cpp * * [653] 两数之和 IV - 输入 BST */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(n...
true
46f2c462dc332ec6898a11fb607edbe8036ed24e
C++
RolandoAndrade/NubeUCAB
/client/NubeUCAB-cliente/socket_client.h
UTF-8
1,147
2.84375
3
[]
no_license
#include "socket.h" #include "socket_exceptions.h" #include "commands.h" class ClientSocket : private Socket { public: ClientSocket() { } ClientSocket(int host, int port) { if(!Socket::create()) { throw SocketException(strerror(errno)); } if(!Socket::connect(host,port)) { throw Socke...
true
ee71b7bb9ca0ba4162a044cfc079c7a2124318b9
C++
bbajcetic/BCGameJam20
/src/main.cpp
UTF-8
2,316
2.59375
3
[]
no_license
#include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #include <SDL2/SDL_ttf.h> #include <SDL2/SDL_mixer.h> #include <stdio.h> #include <string> #include <vector> #include "constants.h" #include "game.h" #include "network.h" /* Functions */ // Initialize SDL bool initSDL(); // Free memory, quit SDL void quitSDL(); /...
true
49cc7e1d2180a928fffc20eadc9a2ca7f9412efd
C++
badger-dowdeswell/project-exported-function-blocks
/AGENT_SIFB/AGENT_SERVER_Library.cpp
UTF-8
3,452
2.765625
3
[]
no_license
// // AGENT SERVER LIBRARY // ==================== // Library of custom routines for the AGENT_SERVER diagnostic Service Interface Function Block. // // Note that the 4DIAC type definition section only allows one custom header entry so this file // can be linked in at compile time by referencing it in the Compiler In...
true
645b2cea66770a879d95a2419d9a07bee838a53b
C++
AndrewOsip/Training
/comp4/Umap.h
UTF-8
539
2.71875
3
[]
no_license
#ifndef UMAP_H #define UMAP_H #include <fstream> #include <unordered_map> class Umap : std::unordered_map<uint, std::string> { public: Umap(const std::string& fileName) { mFileName.open(fileName); vocebWrite(); numOfCoinc(); } ~Umap() { mFileName.close(); } const std::unorder...
true
05acdbb4777baa3b6941698b5e807fe2c46a95ce
C++
joedo29/CS300DataStructure
/Assignment04/LinkedList.h
UTF-8
3,761
3.625
4
[]
no_license
#ifndef LINKEDLIST_H_ #define LINKEDLIST_H_ #include <iostream> using namespace std; template<class T> struct nodeLL { T data; nodeLL *next; }; template<class T> class LinkedList { private: LinkedList(const LinkedList &) = delete; //copy constructor protected: int count; nodeLL<T> *head, *last;...
true
8623715e0f06513677073a3c35093c8c20de010b
C++
hope-kim/Course1
/lp15/lp15.cpp
UTF-8
587
3
3
[]
no_license
// Hope Kim // ITP 165, Fall 2017 // Lab Practical 15 // hopekim@usc.edu #include <iostream> #include "Pyramid.h" int main() { // data for Pyramid class const unsigned int bSize = 4; Pyramid myPyramid(bSize); // data for Coordinate class Coordinate cArr[bSize]; cArr[0].setX(0.0); cArr...
true
d96dc6a87e7a9601d5daec3a8aa0e4af1af6eade
C++
brayanhenao/Competitive-Programming
/URI/U1176.cpp
UTF-8
467
2.671875
3
[]
no_license
#include <bits/stdc++.h> #define endl '\n' using namespace std; int main() { ios_base::sync_with_stdio(false);cin.tie(NULL); vector<unsigned long long> fibonacci(61); fibonacci[0]=0; fibonacci[1]=1; for(int i=2;i<61;++i){ fibonacci[i]=fibonacci[i-1]+fibonacci[i-2]; } int T,N; wh...
true
7b985fac042412f4e9a97c32774de01ca89cf106
C++
JanBone/Sieci-computerowe
/Tracerouter/tracerouter.cpp
UTF-8
2,815
2.890625
3
[]
no_license
// Katsiaryna Yalovik 306460 #include "receive.h" #include "send.h" #include "vector" #include <chrono> #include <iostream> #include <chrono> #include <tuple> using namespace std; int line = 1; std::vector<std::chrono::time_point<std::chrono::high_resolution_clock> >time_vec(91); double calculate(int id1, ...
true
a9f694baf41dd4900980713d9aba48d8a54a947a
C++
LeviosaPumpkin/CMO
/CircleQueue.h
UTF-8
235
2.734375
3
[]
no_license
#ifndef CIRCLEQUEUE_H #define CIRCLEQUEUE_H #include <Queue> #include <iostream> template <class T> class CircleQueue : public Queue < T > { private: int size; public: CircleQueue(int size_) : Queue<T>(), size(size_) { } }; #endif
true
03a7582f04cd1badfa3c9faad77568b3ed8087aa
C++
SzymonTheWlod/Apocalypse
/src/gamelib/Source/Resources.cpp
UTF-8
1,710
3.046875
3
[]
no_license
#include "gamelib/Headers/Resources.h" Resources::Resources( int _water, int _food, int _wood, int _metal, int _fuel, int _med) : water(_water), food(_food), wood(_wood), metal(_metal), fuel(_fuel), med(_med) { } Resources Resources::takeDistribution(int amount) { Resources return_resource; while (amount > ...
true
be8946cb6fe333f4b9ae8c0fb05235a994de5a95
C++
spectaclelabs/elvin
/elvin/pattern_event.h
UTF-8
2,708
3
3
[]
no_license
#ifndef ELVIN_PATTERN_EVENT_H #define ELVIN_PATTERN_EVENT_H #include <memory> #include <array> #include "event.h" #include "pattern_value.h" #include "time_data.h" #include "indices.h" #include "collections/interface.h" namespace elvin { template <typename CollectionType, typename DurationPattern, typenam...
true
c120bd67ec37a6cda5500af5f59bd3a53c6d4b98
C++
fwzhuang/zjucad_sdk
/include/hjlib/math_func/coo.h
UTF-8
9,894
2.625
3
[]
no_license
#ifndef HJ_MATH_FUNC_COO_H_ #define HJ_MATH_FUNC_COO_H_ #include <vector> #include <algorithm> #include <iostream> #include "config.h" namespace hj { namespace math_func { //! @brief inline size_t powi(size_t base, size_t pow) { size_t rtn = 1; for(size_t i = 0; i < pow; ++i) rtn *= base; return rtn; } ...
true
520876d3b648c979f1b8197275a12cac6cd45046
C++
adventurer-exp/boat_game
/tut4_boat/main.cpp
UTF-8
4,036
2.703125
3
[]
no_license
// // main.cpp // tut3_velocity // // Created by Simona Bilkova on 20/3/20. // Copyright © 2020 Simona Bilkova. All rights reserved. // #define GL_SILENCE_DEPRECATION #include <math.h> #include <stdio.h> #include <string.h> #include <stdbool.h> #include <stdlib.h> #include <OpenGL/gl.h> #include <OpenGL/glu.h> #in...
true
8bbb6b6d286670b0c8bdabdfc4bc3ab567b2c0dc
C++
Bruin-Spacecraft-Group/SPARTAN
/Software/mock/i2c.h
UTF-8
4,207
3.1875
3
[ "MIT" ]
permissive
#ifndef I2C_H_INCLUDED #define I2C_H_INCLUDED #include "types.h" #include <stdexcept> namespace mraa { class I2c { public: /** * Instantiates an i2c bus. Multiple instances of the same bus can * exist and the bus is not guaranteed to be on the correct address * before re...
true
999a3a043ace49b44520236028b4e2028ed6f6a8
C++
MatiasBaci/TP-2-cuatro-en-linea
/Carta.h
UTF-8
819
2.875
3
[ "BSD-3-Clause" ]
permissive
/* * Carta.h * * Created on: Apr 30, 2021 * Author: algo2 */ // Clase Carta #ifndef SRC_CARTA_H_ #define SRC_CARTA_H_ #ifndef NULL #define NULL 0 #endif class Carta { private: int info; Carta* sig; public: /* * pre: Constructor sin argumentos nodo carta * pos: Genera una carta,que es...
true
0e88e158f3b0e30d1feccc0781d9517b2491d31b
C++
Shikhachandel/COllege
/add.cc
UTF-8
445
2.890625
3
[]
no_license
/*AIM:Program to add two numbers PROGRAM:*/ #include <iostream> using namespace std; int main() { int a,b,c; cout<<"Enter two numbers"; cin>>a>>b; c=a+b; cout<<"The sum is:"<<c; return 0; } /*OUTPUT hermione@granger:~$ cd Desktop h...
true
7635d45bb4d7280eee79cec9aaed9672101f3b12
C++
motxx/AOJ
/repository/10023.cpp
UTF-8
372
2.828125
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main(void) { string str; int n; while (1) { cin >> str; if (str == "-") break; cin >> n; for (int i = 0; i < n; i++) { int l; cin >> l; string left = str.substr(0, l); str = str.substr(l, str.length()) + lef...
true
6db1a14343947c40e2a0e088f6101182b8b5ddec
C++
jakibaki/whatsapp-purple
/libaxolotl-cpp/ratchet/rootkey.cpp
UTF-8
937
2.515625
3
[]
no_license
#include "rootkey.h" #include "curve.h" #include "derivedrootsecrets.h" #include <utility> RootKey::RootKey() { } RootKey::RootKey(const HKDF &kdf, const ByteArray &key) { this->kdf = kdf; this->key = key; } ByteArray RootKey::getKeyBytes() const { return key; } std::pair<RootKey, ChainKey> RootKey::cr...
true
a484e1da12cb799ea1effd806be84673d87edc13
C++
asllanalija/CSCI135
/PROJECT 1/Task D/calc3.cpp
UTF-8
1,223
3.75
4
[]
no_license
/* Author: Asllan Alija Course: CSCI-135 Instructor: Genady Maryash Assignment: Project 1 Task D Can calculate squares of numbers, and can take in multiple expressions. */ #include <iostream> using namespace std; int main() { int num; char symbol; int sum = 0; bool cont = true; bool pos = true; // While ...
true
3893413d13631175d9f53848d76b90673cc29437
C++
b-chae/AlgorithmStudy
/baekjoon/1929.cpp
UTF-8
358
2.90625
3
[]
no_license
#include <iostream> using namespace std; int N, M; bool prime[1000001]; int main() { int i; for (i = 2; i <= 500000; i++) { int multiplier = 2; while (i * multiplier <= 1000000) { prime[i * multiplier] = true; multiplier++; } } prime[1] = true; cin >> N >> M; for (i = N; i <= M; i++) { if (prime...
true
913a0be2d2e18be8e554337210a704ba2585d1cc
C++
TusharJadhav/usaco
/Section 1.3/Prime Cryptarithm/crypt1.cpp
UTF-8
1,997
2.78125
3
[ "MIT" ]
permissive
/* ID: tushar.4 PROG: crypt1 LANG: C++11 */ #include <iostream> #include <fstream> #include <string> #include <sstream> #include <unordered_set> #include <set> #include <unordered_map> #include <map> #include <vector> #include <queue> #include <deque> #include <array> #include <forward_list> #includ...
true
e3abbe093c09deccc75fe2d580fbf2bd34a13cb3
C++
davidjamesmcclure/CodeSamples
/C++/DensityVisualiser/cav2.cpp
UTF-8
4,834
2.625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <GL/glut.h> #define GLUT_KEY_ESCAPE 27 #ifndef GLUT_WHEEL_UP #define GLUT_WHEEL_UP 3 #define GLUT_WHEEL_DOWN 4 #endif #include "Vector.h" #include "Matrix.h" #include "Volume.h" #define WIDTH 756 #define HEIGHT 256 int lowerRed = 75; int upperRed = 85; int lo...
true
bd018654958e64325f0bfdcd5768162bf06261bf
C++
AshifAli007/Algorithm
/encryption.cpp
UTF-8
1,321
2.953125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; // Complete the encryption function below. string encryption(string s) { int size=s.size(); int r,c,flag=0; float width = sqrt(size); cout<<width; for(int i=0;i<size/2;i++){ if(i==width){ flag=1; break; ...
true
ebd0c8d888779efdd97453a2f48e3a544c0e214c
C++
floghos/Estructura-de-Datos
/Boletines/Lab7/MapG.cpp
UTF-8
2,264
3.15625
3
[]
no_license
#include "MapG.h" #include <string> #include <iostream> using namespace std; //Private Methods int MapG::goodhashCode(string key) { int hash = 13; for (int i = 0; i < key.length(); i++) { hash += key.at(i) * (1 << i); } return hash; } void MapG::rehash() { int newCapacity = capacity * 2; box *newMap = new bo...
true
c7c44881016c5c1902f2411438c32e3c577f5fd3
C++
AWildTeddyBear/CSCI-3200-Parallel-Programming
/Classwork Stuff/PThreads/main.cpp
UTF-8
2,556
3.0625
3
[ "MIT" ]
permissive
// g++ main.cpp -Wall -O3 --std=c++17 -o out // ./out #include <iostream> #include <vector> #include <algorithm> #include <chrono> #include <ctime> #include <random> #include <future> #include <iomanip> #include <utility> #include <iterator> #include <numeric> bool isPrime(const unsigned int n); unsigned int countPri...
true
fe2cfb78c6f073d49818a4638ef5ad1128775c19
C++
yusuke-matsunaga/ym-bnet
/include/ym/BnNodeMap.h
UTF-8
1,996
2.796875
3
[]
no_license
#ifndef BNNODEMAP_H #define BNNODEMAP_H /// @file BnNodeMap.h /// @brief BnNodeMap のヘッダファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2023 Yusuke Matsunaga /// All rights reserved. #include "ym/bnet.h" BEGIN_NAMESPACE_YM_BNET ////////////////////////////////////////////////////////////////////// /...
true
71eb5b56bd8e9af48f4bf77f69e2a49082cced3f
C++
Timdpr/maiolica
/src/pvtable.cpp
UTF-8
7,668
3.015625
3
[]
no_license
#include "defs.h" // Macros for extracting specific data out of the 'data' 64-bit int #define EXTRACT_SCORE(x) ((x & 0xFFFF) - INF_BOUND) #define EXTRACT_DEPTH(x) ((x >> 16) & 0x3F) #define EXTRACT_FLAGS(x) ((x >> 23) & 0x3) #define EXTRACT_MOVE(x) ((int)(x >> 25)) // Macro for combining data into the 'data' 64-bit i...
true
760a49444351409f843a5b79010b07aef279eb87
C++
kaanozbudak/cProjects
/calisma2.cpp
UTF-8
261
2.671875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> int main () { int sayi1,sayi2,a; printf("Please enter two numbers:\n"); scanf("%d %d",&sayi1,&sayi2); a=sayi1/sayi2; printf("Bolum:%d\n",a); sayi1%=sayi2; printf("Kalan:%d",sayi1); }
true
960a5f1e6fbe597e5204c2ee7f2f049c32b5d056
C++
tianfangm/Algorithm
/PTA/DataStructure/03-树2 List Leaves.cpp
UTF-8
1,931
3.453125
3
[]
no_license
#include <iostream> #include <vector> #include <queue> using namespace std; struct Node{ int val; int left,right; Node(){} Node(int c,int l,int r):val(c),left(l),right(r){} }; void LevelTraversal(vector<Node>tree,int root,vector<int>&result) { queue<int> q; q.push(root); while(!q.empty())...
true
5f0fcccdbda378f1b0fd71f450866d9d4b67ed40
C++
Radmir2015/OOPLaboratory
/OOPLaba1/OOPLaba1/Student.h
WINDOWS-1251
2,560
3.65625
4
[]
no_license
#pragma once #include <string> #include <tuple> #include <vector> using namespace std; struct Date { int day, month, year; }; class Student { public: Student() { name = ""; surname = ""; orderNumber = ""; phoneNumber = ""; groupNumber = ""; enterDate = {0, 0, 0}; birthDate = {0, 0, 0}; } Student(st...
true
5c354c7672ac4a7e74cc219eb045faec6aae4713
C++
CaoHoaiTan/HCMUTE
/Nhập môn lập trình - Introduction to Programming/Chapter 2/C Cplusplus/B36-Square(DK).cpp
UTF-8
401
3
3
[]
no_license
#include <stdio.h> #include <math.h> void nhap(int &n, float &x); float solve(int n, float x); void xuat(float kq); int main() { int n; float x; nhap(n,x); float kq=solve(n,x); xuat(kq); return 0; } void nhap(int &n,float &x) { scanf("%d%f", &n,&x); } float solve(int n, float x) { float s=0; for (int i=1;i...
true
c0de2768edcd76d979a8bd763a96cc180519e2d8
C++
akileshsadassivam/MyTimepassCode
/cpp/pascal_row.cpp
UTF-8
746
3.0625
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <string> #include <cstdio> #include <list> #include <algorithm> #include <vector> using namespace std; uint64_t fact(uint64_t n){ if(n==1 || n==0){ return 1; } else return n*fact(n-1); } vector<uint64_t> getRow(...
true
45ad535dbf93ff90f635a9c4d8631c4fe0d3553c
C++
tgabor7/OpenGLEngine
/Boring/InstanceRenderSystem.h
UTF-8
1,149
2.65625
3
[]
no_license
#pragma once #include "Mesh.h" #include "system.h" #include "EntityHandler.h" #include "Shader.h" #include "Maths.h" struct MeshInstance { vec3 position; vec3 rotation; vec3 scale; Texture *texture; }; class InstanceComponent : public Component<InstanceComponent> { public: InstanceComponent() {} InstanceCompone...
true
7eab38ff1dc1595585e9042c7702606fa543caaa
C++
bigfatbrowncat/cubes
/sfmlcube/src/movingcubes/Cube.h
UTF-8
666
2.578125
3
[ "LicenseRef-scancode-warranty-disclaimer", "BSD-2-Clause" ]
permissive
/* * Cube.h * * Created on: Nov 20, 2012 * Author: imizus */ #ifndef CUBE_H_ #define CUBE_H_ #include <SFML/Graphics.hpp> namespace sfmlcubes { namespace movingcubes { struct Cube { public: // Inner types enum ModelType { mtVoid, // Empty cube. Doesn't draw itself at all mtPlayin...
true
a8ad1968ca48d6254e9ef3f5f875403db4da5e2a
C++
JakeS271/Intro-To-CPP-Assessment
/ITC++Assignment/Game.cpp
UTF-8
2,846
2.984375
3
[]
no_license
#include "Game.h" #include "Player.h" #include "Room.h" #include "MyString.h" #include <iostream> #include <vector> Game::Game() { } Game::~Game() { } MyString Room::location; MyString Game::UserCommand() { std::cout << "What shall we do?\n"; char command[256]; std::cin.getline(command, m_MAX_SIZE); return ...
true
c4c8b26af1bfeb789da7e9aa32f781600518bce0
C++
asmei1/SFML-IPS
/LClient/ResourceManager.h
UTF-8
798
2.65625
3
[]
no_license
#pragma once #include <string> #include <unordered_map> template<typename Derived, typename T> class ResourceManager { public: ResourceManager(const std::string& l_pathsFile) { LoadPaths(l_pathsFile); }; virtual ~ResourceManager() { PurgeResources(); } T* GetResource(const std::string& l_id); std::string GetPa...
true
e8a1a8893ca18027e55b3c4b1c504225233872d3
C++
alexandraback/datacollection
/solutions_5708921029263360_0/C++/Vikeydr/fashion.cpp
UTF-8
1,123
2.515625
3
[]
no_license
#include <fstream> #include <iostream> #include <set> #include <string.h> #include <algorithm> using namespace std; int main(){ int t; ifstream in("C-small-attempt1.in"); ofstream out("fashion.out"); in >> t; for (int tt = 0; tt < t;tt++){ int jean,p,s,kl; in >> jean >> p >> s >> kl; int j...
true
4c64a7cf626b3a2b8ee83e5e3a55882b7fe7c634
C++
liyupi/sjtuoj
/1209.cpp
UTF-8
401
3.109375
3
[]
no_license
#include <iostream> using namespace std; int N; int getBitNum(int num) { int count = 0; while(num) { num &= num - 1; count++; } return count; } int main() { while (cin >> N) { int sum = 0; for (int i = 0; i < N; ++i) { int num; cin >> num; ...
true
5e2f29c9048bf338a88eeb62e61307c8dac3928f
C++
polaris/hermes
/src/Queue.h
UTF-8
1,239
3.453125
3
[]
no_license
#ifndef _Queue_H #define _Queue_H #include <boost/lockfree/queue.hpp> #include <memory> #include <functional> #include <atomic> template <typename T> class Queue { public: explicit Queue(uint32_t size) : size_(size) , queue_(size_) , count_(0) { } Queue(uint32_t size, std::function<T* ()> cr...
true
b1ee0ad4565487a3137647bee19b3dd738600466
C++
ajfoggia/BowlingProgram
/BowlingImplem.cpp
UTF-8
19,829
3.8125
4
[]
no_license
#include "bowlingHeader.h" #include <iostream> #include <iomanip> //Library used for setw() for formatting using namespace std; void Bowling::MainMenu() //Function that displays the menu to the terminal. { cout << "What would you like to do?\n"; cout << "1. Create a game\n"; cout << "2. Display the frame...
true
31e9d436b318de8149dbb28f0ba327a25cbfde0e
C++
dimatrubca/FloorPlanDSL
/FloorPlanDSL/Objects/Door.cpp
UTF-8
1,402
2.796875
3
[]
no_license
#pragma once #include "Door.h" Door::Door(std::map<TokenType, Object*> params, std::vector<Room*> rooms) : DrawableObject(DOOR_OBJ, params) { // TODO: require props String* idParent = dynamic_cast<String*>(params[ID_PARENT_PROP]); Integer* wallNr = dynamic_cast<Integer*>(params[WALL_PROP]); Measure* startOnWall = ...
true
c212389d3e98465ca9bea015544e222930d35959
C++
pag4k/KingOfNewYork
/gamecontroller.h
UTF-8
1,791
2.546875
3
[]
no_license
// ---------------------------------------------------------------------------- // COMP345 Assignment 4 // Due date: December 2, 2018 // Written by: Pierre-Andre Gagnon - 40067198 // ---------------------------------------------------------------------------- #ifndef GAMECONTROLLER_H #define GAMECONTROLLER_H #include...
true
2ec62a2e979d5335b80444a9128a11441ef0c03c
C++
maknoll/cg
/raytracer/Intersection.hpp
UTF-8
4,002
3
3
[]
no_license
#ifndef _INTERSECTION_HPP_INCLUDE_ONCE #define _INTERSECTION_HPP_INCLUDE_ONCE #include "Math.hpp" #include "Ray.hpp" namespace rt { class Intersection { public: /// Computes the intersection of a ray and an infinite plane defined by three vertices static bool linePlane(const Ray& ray, const Vec3 &...
true
564c2e254608acc248bb57a4f21fe94b03ddbcb6
C++
windfornight/mengguOpenGL
/01_基本入门/快速入门/资源代码/particle.cpp
UTF-8
1,459
2.78125
3
[]
no_license
#include "particle.h" #include "utils.h" Particle::Particle() { mLifeTime = -1; } void Particle::Draw() { glEnable(GL_BLEND); //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE); glDisable(GL_DEPTH_TEST); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D...
true
606967e708f93059e3e714e6b26fd8ff4b52fd9a
C++
mag619/StackADT_MG_MH
/Node.h
UTF-8
1,133
3.5625
4
[]
no_license
/** @file Node.h */ #ifndef _NODE #define _NODE template <class ItemType> class Node { private: ItemType item; // A data item Node<ItemType>* next; // Pointer to next node Node<ItemType>* prev; // Pointer to prev node public: //@post: sets next to NULL Node(); Node(const ItemType& anItem); //@pre: anItem...
true
61d3a9d11fb9dab762403ff4d72897e26bb00a47
C++
csg-tokyo/caldwell
/SyntheticProgramPair/SensorMonitorOO/src/Field.cpp
UTF-8
1,173
2.984375
3
[]
no_license
/* * Field.cpp * * Created on: Mar 27, 2017 * Author: Joe */ #include "Field.h" #include "Display.h" #include "utility.h" Field::Field(String const& name, FieldType type, uint16_t address, uint8_t length): m_name (name), m_type (type), m_address(address), m_length (length) { ...
true
42ec91bf0e020b31aaf47f2df76ddfea7949484f
C++
zhyh329/JPEG_Deblocking
/JPEG/src/PSNR.cpp
UTF-8
3,414
3.125
3
[ "MIT" ]
permissive
/* * PSNR.cpp * * Created on: Feb 27, 2014 * Author: jigar */ #include <iostream> using namespace std; #include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include "FileIO/fileIO.h" #include "definition.h" unsigned char* fileRead(char filename[], int fullsize); float getPSNR(unsigne...
true