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
468200506411ce54e7056439503b527601c7a123
C++
icl-rocketry/Avionics
/Ricardo_OS/Python_backend/venv/lib/python3.8/site-packages/greenlet/tests/_test_extension_cpp.cpp
UTF-8
3,212
2.84375
3
[ "MIT" ]
permissive
/* This is a set of functions used to test C++ exceptions are not * broken during greenlet switches */ #include "../greenlet.h" struct exception_t { int depth; exception_t(int depth) : depth(depth) {} }; /* Functions are called via pointers to prevent inlining */ static void (*p_test_exception_throw)(int d...
true
aeb6635aa150c2bcaa65f2a663d53ab9574a306b
C++
UG-SEP/DSA-guide
/Arrays/cpp/merge_two_sorted_arrays.cpp
UTF-8
1,551
4.5
4
[ "MIT" ]
permissive
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Function to merge two arrays without extra space void merge_two_arrays(vector <int> &arr1 , vector <int> &arr2) { // The approach is to traverse the first array from right to left and the // second array from left to right and swap ...
true
5c8f1bdf068b216d7bdcdd9972377b880f647e8a
C++
Tudor67/Competitive-Programming
/LeetCode/Explore/March-LeetCoding-Challenge-2021/#Day#2_SetMismatch_sol5_int_sign_as_visited_mark_O(N)_time_O(1)_extra_space_28ms_21.4MB.cpp
UTF-8
695
2.5625
3
[ "MIT" ]
permissive
class Solution { public: vector<int> findErrorNums(vector<int>& nums) { const int N = nums.size(); int duplicate = -1; int missing = -1; for(int num: nums){ int idx = abs(num) - 1; if(nums[idx] < 0){ duplicate = abs(num); ...
true
2c0d668d703f7cd43a987d96244a58d491ba9e81
C++
timmorey/nvn
/libnvn/Layer.hpp
UTF-8
545
2.546875
3
[]
no_license
/** Layer.hpp - Created by Timothy Morey on 1/12/2013 */ #ifndef __LAYER_HPP__ #define __LAYER_HPP__ #include "nvn.h" #include "CartesianCRS.hpp" class Layer { protected: Layer() : _ModelCrs(4) {}; public: virtual ~Layer() {}; public: virtual int Render() = 0; virtual int SetModelCRS(const CartesianC...
true
aa95eb9e4ccb13907db43d6e421438c48436e4c1
C++
widemouthfrog1/Chess
/Chess/Rook.cpp
UTF-8
511
2.78125
3
[]
no_license
#include "stdafx.h" #include "Rook.h" Rook::Rook(std::shared_ptr<Image> image, bool white, POINT pos) { this->image = image; this->white = white; this->pos = pos; } Rook::~Rook() { } void Piece::move(Tile before, Tile after) { before.setPiece(NULL); after.setPiece(shared_from_this()); } void Piece::draw(Grap...
true
78daa79a4ebdf8b6a3771c6bdfb0469ba2764ff6
C++
God-Ra/CP-Library
/Math/Miller Rabin primality test.cpp
UTF-8
1,457
3.265625
3
[]
no_license
#include <iostream> using ull = unsigned long long int; using ll = long long int; ll mulmod(ull a, ull b, ull mod) { ull res = 0; a %= mod; for (; b > 0; b >>= 1) { if (b & 1) res = (res + a) % mod; a = (a + a) % mod; } return res; } ll powmod(ll a, ll b, ll mod) ...
true
0d674969f08b2885628fc7104a46bafa55c3129b
C++
iskislamov/kyapr
/virtual/main.cpp
UTF-8
857
2.78125
3
[]
no_license
#include <iostream> #include "classes.h" VIRTUAL_CLASS(Base) int a = 5; DECLARE_METHOD(Base, Both) std::cout << ptr_->a; END_DECLARE DECLARE_METHOD(Base, OnlyBase) END_DECLARE CONSTRUCTOR_BASE(Base, ADD_METHOD(Base, Both) ADD_METHOD(Base, OnlyBase)) END(Base) VIRTUAL_CLASS_DERIVED(Derived, Base) int b = 10; D...
true
9aefefaa45d183c92988362e913a53e507cedac1
C++
joeykrakowski/enjin-cpp-sdk
/test/unit/models/NotificationsTest.cpp
UTF-8
2,902
2.609375
3
[ "Apache-2.0", "BSD-3-Clause", "OpenSSL", "MIT" ]
permissive
/* Copyright 2021 Enjin Pte. Ltd. * * 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 agreed to...
true
6d75b8d11a8640f1834f2e1951ee46ebde4ff2b3
C++
JAllyn/HighSchool_C-
/WhileLoops.cpp
UTF-8
2,181
3.546875
4
[]
no_license
// WhileLoops.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> using namespace std; int main() {//begin main /******************************** While () loop - pretest loop The condition is tested before ...
true
6f78cf5962e7e185c7b238c92c5580907f60da47
C++
nitikgoyal/C-_prog
/copyconstructor/main.cpp
UTF-8
460
3.46875
3
[]
no_license
#include <iostream> using namespace std; class complex { int a,b; public: complex(int x) /* or write complex(int x):a(x),b(2x) */ { a=x; b=2*x; } complex(complex &ob) { a=ob.a; b=ob.b; } void put() { cout<<a<<endl<<b<<endl; } }; int m...
true
834500f4d271754a095a10cb90e6ca4ec2d64c38
C++
GuerfelMohamed/Syst-me-temps-r-el-embarqu-et-mobile
/CalculePI/Pi_Serial.cpp
UTF-8
1,263
3.53125
4
[]
no_license
#include <iostream> #include <stdlib.h> #include <time.h> using namespace std; /** * @desc: Estime la valeur de Pi par l'experience de DartBoard * @return: Renvoie la valeur estimée de Pi pour une iteration. */ double DartBoard(){ double darts = 5000; double circle_count = 0.0f; // Simul...
true
bc95d5e9ce716e406b0266c7e3266d7670160b90
C++
HelgaEmese/ideiinfo
/hazi04/main.cpp
UTF-8
943
2.625
3
[]
no_license
#include <iostream> #include <string> #include <fstream> using namespace std; int main() { string telefonszam ; ifstream input("input.txt"); ofstream vezetekes("vezetekes.txt"); ofstream orange("orange.txt"); ofstream vodafone ("vodafone.txt"); ofstream digi("digi.txt"); whil...
true
e90b1b4adec26eed942d48f4fa46f7e2bbea2803
C++
sergiosvieira/wrapper
/mid-scroll-area.h
UTF-8
989
2.671875
3
[]
no_license
#ifndef MID_SCROLL_AREA_H #define MID_SCROLL_AREA_H #include "mid-object.h" #include "mid-window.h" #include "definitions.h" /*! * \brief MidScrollArea Template */ template <class T> class MidScrollArea : public MidObject { public: /*! * \brief MidScrollArea * \param id * \param parent */ ...
true
874f50946c60cb99d3adb5a4f4b5d1df4bbe53ba
C++
BogdanYaroslav/Shariy-C-
/laba 3/Musician.cpp
WINDOWS-1251
3,101
3.28125
3
[]
no_license
#include "Musician.h" #include <iostream> #include <fstream> Musician::Musician() : Personality(), tool_(Tools::Strings), rating_(0), experience_(0) { cout << " " << name_ << " " << surname_ << " " << endl << endl; } Musician::Musician(const string& name, const string& surname, char gender, int year, co...
true
706222bf166645429fdba7735de4a2df5b0a5825
C++
cl-kn/cpp_study
/b_dokushu_cpp/ch05/list_5.18/main.cpp
UTF-8
723
4.09375
4
[]
no_license
//*************************************************** /** 21/4/6 * P279 「メンバー変数を参照で返す」 */ //*************************************************** #include <iostream> #include <string> class Object { std::string name; public: Object(std::string name); const std::string &get_name() const; }; Object::Objec...
true
6fe35b1fe14d3cd25f82f0c8883ee4a8cb36e485
C++
nitind10/levelUp
/7_DP/04_targetSet.cpp
UTF-8
13,728
3.234375
3
[]
no_license
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; void print1D(vector<int>& arr) { for (int ele : arr) { cout << ele << " "; } cout << endl; } void print2D(vector<vector<int>>& arr) { for (vector<int>& ar : arr) { print1D(ar); } } //inf...
true
532d89981080217f65a1842599475df923cadcdf
C++
xibeilang524/QtFtpServer
/ftpsqlconnection.cpp
UTF-8
7,330
2.9375
3
[]
no_license
#include "ftpsqlconnection.h" #include <QDebug> /* * FtpSqlConnection包含所有数据库的操作 */ FtpSqlConnection::FtpSqlConnection(QString path,QString username,QString password) { database=QSqlDatabase::addDatabase("QSQLITE"); database.setDatabaseName(path); database.setUserName(username); database.set...
true
7da8b6b8bea08ec8996f859b446c02be2e6e34e8
C++
larrylebron/CMPS164
/gameEngine/gameEngine/fileReader.cpp
UTF-8
10,652
2.890625
3
[]
no_license
#include "fileReader.h" fileReader::fileReader() { } fileReader::~fileReader() { } bool fileReader::readCourseFile(char* filename, CMMPointer<Course> course) { // read files into streams ifstream mapInput(filename); if (mapInput.fail()){ std::string stringFile(filename); //string filename ...
true
0bf17b9d4b7c39303d6a8e7ab0fd3320ff01ab6d
C++
PositronicsLab/Moby
/include/Moby/GaussianMixture.h
UTF-8
3,082
2.53125
3
[]
no_license
#ifndef _GAUSSMIX_H_ #define _GAUSSMIX_H_ #include <Moby/Primitive.h> namespace Moby { class GaussianMixture : public Primitive { public: struct Gauss { double A; // height of the Gaussian double sigma_x; // variance in x direction double sigma_y; // variance in y direction ...
true
31b87443330f59683e58070af5c2c761ce71ac27
C++
respu/allium
/test/write_metadata_test.cpp
UTF-8
2,802
2.53125
3
[]
no_license
#define BOOST_TEST_DYN_LINK #include <canard/network/protocol/openflow/v13/instruction/write_metadata.hpp> #include <boost/test/unit_test.hpp> #include <cstdint> #include <utility> #include <vector> namespace canard { namespace network { namespace openflow { namespace v13 { BOOST_AUTO_TEST_SUITE(write_metadata_test) ...
true
66a575c48fadb7c74f20fdc6070006df21292109
C++
cozyBoi/BOJ-algorithm-practice
/10971.cpp
UTF-8
1,076
2.984375
3
[]
no_license
#include <iostream> #include <algorithm> #include <functional> #include <vector> const int VERY_BIG = 100000001; int main(){ std::ios_base::sync_with_stdio(false); std::vector<std::vector<int> > dist; int n; std::cin >> n; dist.resize(n); for(int i = 0; i < n; i++){ for(int j = 0; j < ...
true
eecd0b16eb75f16312945e0232caafe214b62180
C++
vvvictorlee/eossmartcontractssafeframeworks
/contractscxx/mocks/ERC721BasicTokenMock.hpp
UTF-8
419
2.703125
3
[]
no_license
#include "../token/ERC721/ERC721BasicToken.hpp" /** * @title ERC721BasicTokenMock * This mock just provides a public mint and burn functions for testing purposes */ class ERC721BasicTokenMock :public ERC721BasicToken { public: void mint(account_name _to, uint256_t _tokenId) { super._mint(_to, _tokenId);...
true
0bbfbcccc895cd0ba6bae9222de3d95c33dd2cfe
C++
justaneee/WebServer
/WebServer/QuickFile/QuickFile.cpp
UTF-8
564
2.78125
3
[]
no_license
#include "QuickFile.h" std::string QuickFile::readFile(std::string filename) { std::string fileContent, fileLine; std::ifstream fileStream(filename); if (fileStream.is_open()) { while (std::getline(fileStream, fileLine, '\n')) fileContent += fileLine + "\n"; fileStream.close(); ...
true
fb5b364f6dd6714ca11b6b63f07848cba875cae2
C++
Babtsov/Symbolic-Calculator
/COP3503_Project/Addition.cpp
UTF-8
7,565
3.234375
3
[]
no_license
// // Addition.cpp // COP3503_Project // // Created by Ben on 7/21/15. // Copyright © 2015 Ben. All rights reserved. // #include "Addition.hpp" #include "Integer.hpp" #include <algorithm> using namespace std; bool Addition::sortTerms(Expression *lhs, Expression *rhs){ return !lhs->isNegative(); } Addition::A...
true
457e43b813d67f4801182e2af52a7494f063a6fb
C++
EDAII/Lista3_BrunoNunes_GuilhermeDourado
/inc/cliente.hpp
UTF-8
712
2.5625
3
[]
no_license
#ifndef CLIENTE_HPP #define CLIENTE_HPP #include <string> #include <vector> #include <fstream> #include "produto.hpp" using namespace std; class Cliente{ private: string nomeCliente; string cpf; char socio; public: vector<Produto *> lista_produtos; vector<Categoria *> recomendacoes; Clie...
true
63ec05850175d2aa21a95489d22230f4c65b1c0d
C++
sinairv/Cpp-Tutorial-Samples
/Math Library Functions/Prog.cpp
UTF-8
2,056
3.78125
4
[]
no_license
// All functions in math.h library get and return values of type double. // Note that function abs() returns an integer. In order to return a float use fabs() instead. #include <iostream> #include <iomanip> #include <cmath> //also <math.h> using namespace std; int main() { int Col1 = 13 , Col2 = 15 , Co...
true
c1672e12795e986c9920a01e813dfe716db64ccf
C++
kumaran-14/cp
/cpp/Dynamic Programming/editdistance.cpp
UTF-8
1,213
2.671875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define debug(x) cout << '>' << #x << ':' << x << endl; #define all(v) v.begin(), v.end() #define pii pair<int, int> #define mxN 1e7 #define newl cout << "\n" #define vi vector<int> #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ...
true
f92f048115076921c4b274c6542d3b4ce35595d7
C++
jkennel/aquifer
/src/ogata_banks.cpp
UTF-8
3,236
2.546875
3
[]
no_license
#include "aquifer.h" // Ogata, A., Banks, R.B., 1961. A solution of the differential equation of // longitudinal dispersion in porous media. U. S. Geol. Surv. Prof. Pap. 411-A. // // 1-D // infinite source // uniform flow // constant parameters // no decay // no retardation //==========================================...
true
e227728cc013c8c7eea59fbb2cc185b95140f198
C++
hyunho9304/Practice_Algorithm
/Practice_Algorithm/difficulty2/1979.cpp
UTF-8
1,307
2.703125
3
[]
no_license
/* 1979. 어디에 단어가 들어갈 수 있을까 https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PuPq6AaQDFAUq&categoryId=AV5PuPq6AaQDFAUq&categoryType=CODE < input > 1 5 3 0 0 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 0 1 < output > #1 2 */ #include<iostream> #include<vector> #include<cst...
true
1828e7e36474a222478b11343ae72ee571e03b07
C++
kutiny/ApoyoCpp
/Curso/Clase6/03-inicializacion_arreglos.cpp
UTF-8
528
3.546875
4
[]
no_license
#include <iostream> using namespace std; const int SIZE = 3; int main() { int datos[SIZE][SIZE] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; // Tambien es posible definirlos en una sola linea ya que el compilador ignora los espacios y saltos de linea del codigo. // int datos[SIZE][SIZE...
true
6603321619b2c366987757ccd1dea2721e7c9744
C++
apache/arrow
/cpp/src/arrow/util/time.h
UTF-8
2,988
2.546875
3
[ "Apache-2.0", "MIT", "BSD-3-Clause", "BSD-2-Clause", "ZPL-2.1", "BSL-1.0", "LicenseRef-scancode-public-domain", "NTP", "OpenSSL", "CC-BY-4.0", "LLVM-exception", "Python-2.0", "CC0-1.0", "LicenseRef-scancode-protobuf", "JSON", "Zlib", "CC-BY-3.0", "LicenseRef-scancode-unknown-licens...
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
true
9955db4a06104c76f9cb409576452306e5802790
C++
Renl1001/Template
/1_Math/2_Gauss/2_01.cpp
UTF-8
946
3.203125
3
[]
no_license
//有equ个方程,var个变元。增广矩阵行数为equ,列数为var+1,分别为0到var int a[MAXN][MAXN]; int b[MAXN][MAXN]; //返回值为-1表示无解,为0是唯一解,否则返回自由变元个数 int Gauss(int equ, int var) { int max_r, col, k; for(k = 0, col = 0 ; k < equ && col < var ; k++, col++) { max_r = k; for(int i = k + 1; i < equ; i++) { if(...
true
962772c7a233a689fb8780cb47c315c5b5a34174
C++
fengwang/operator_traits
/operator_traits.hpp
UTF-8
14,546
2.828125
3
[]
no_license
#ifndef _OPERATOR_TRAITS_HPP_INCLUDED_OJISDFLJASOIJ498UAFDKLJ489UALFKJALDFKJF #define _OPERATOR_TRAITS_HPP_INCLUDED_OJISDFLJASOIJ498UAFDKLJ489UALFKJALDFKJF #include <type_traits> #include <utility> #include <iostream> namespace operator_traits { template< typename, typename = void, typename = void > struct has_assig...
true
65369113b935b4846a1fb1ea5e93592d8a3c243a
C++
Ben-Weisman/E-Store-Project
/E-Store-Project-Updated/Date.h
UTF-8
552
3.171875
3
[]
no_license
#ifndef __Date_h #define __Date_h #include <iostream> using namespace std; class Date { int m_day; int m_month; int m_year; public: Date(int day, int month, int year); ~Date() = default; public: bool setDay(int day); bool setMonth(int month); bool setYear(int year); public: inline int getDay()const { r...
true
b929dee60b2189b078796d1f21c984a3546d4236
C++
CarlosMa15/Linux
/cs3505/Assignment3/tester1.cpp
UTF-8
4,880
3.84375
4
[]
no_license
/* * This is a tester that I started to write in class. It reads * words from a text file, then adds the words to two sets: A built-in * set class, and our string_set class. After reading the file, it * prints out all the words stored in the STL set object. At the end * of the test, it prints out the sizes of b...
true
89ffdafccb1796e4dd56d91391b0af373702db04
C++
KingWapo/GenesisEngine
/GenesisEngine/GenesisEngine/CircCollidableComponent.h
UTF-8
937
2.640625
3
[]
no_license
#pragma once #include "CollidableComponent.h" #include "Transform2dComponent.h" #include "Vector2.h" class CircCollidableComponent : public CollidableComponent { public: CircCollidableComponent(); CircCollidableComponent(float p_r); CircCollidableComponent(Circ2D p_circ, bool p_static); ~CircCollidableComponent()...
true
24b558b2ba6e0adce21ad0b88524e9f353b89cc1
C++
nanno-nanno/RandomCreations
/PROG3_Project/NEngine/Label.h
UTF-8
834
2.984375
3
[]
no_license
#ifndef LABEL_H #define LABEL_H #include "Component.h" #include <string> #include <SDL2_ttf/SDL_ttf.h> /* En klass som placerar en textstrang i ett SDL_Window. Anvander sig av NGameEngine-objektets givna typsnitt och en SDL_Texture att rita med. - Subklass till Component */ namespace nengine { class Label :...
true
258776d7db2ce6371f1f61d5573c9e1e138d1351
C++
bluekingsong/convergence-analysis
/code/vec_op.cpp
UTF-8
773
3.109375
3
[]
no_license
#include <cstring> #include <cmath> #include "vec_op.h" using namespace std; double vec_dot(double *vec1,double *vec2,int vec_len){ double result=0; for(int i=0;i<vec_len;++i) result+=vec1[i]*vec2[i]; return result; } void vec_add(double *result_vec,double *vec1,double *vec2,int vec_len,double factor1,double facto...
true
c2e0bd84475842988ec00a0f8b60c0a6db859736
C++
Yang-zhizhang/pat
/03-7-10.cpp
UTF-8
369
3.703125
4
[]
no_license
/*基础编程题库集 编程题7-10 计算工资*/ #include<stdio.h> int main() { int year; int hour; float salary; scanf("%d %d",&year,&hour); if(year<5) { if(hour<=40) salary=hour*30; else salary=1200+(hour-40)*30*1.5; } else { if(hour<=40) salary=hour*50; else salary=2000+(hour-40)*50*1.5; } printf("%.2f", ...
true
e1db021cfb434a789938975ffe19bb9eb3a33fe9
C++
raxracks/chadOS
/userspace/libraries/libio/Path.h
UTF-8
8,279
3.140625
3
[ "MIT", "BSD-2-Clause" ]
permissive
#pragma once #include <abi/Filesystem.h> #include <libio/MemoryReader.h> #include <libio/MemoryWriter.h> #include <libio/Scanner.h> #include <libio/Write.h> #include <libutils/String.h> #include <libutils/Vector.h> namespace IO { struct Path { private: bool _absolute = false; Vector<String> _elements{}; publ...
true
7a58d2b364dcde8e6e9e91fafdeedd50bdea9edd
C++
chinoudea/LabInfo2
/Practica4/router.h
UTF-8
729
3.046875
3
[]
no_license
#ifndef ROUTER_H #define ROUTER_H #include <map> #include <iostream> using namespace std; class router { private: string name; map<string,int> links; public: // Constructor con nombre de router router(string routerName); // Destructor ~router(); // Funcion para obtener el nombre del router ...
true
439b1250f756e10011bd0f42bb6c587d34adc1a4
C++
keuhdall/Piscine_cpp
/rush00/Object/AObject.hpp
UTF-8
621
2.921875
3
[]
no_license
#ifndef AOBJECT_HPP # define AOBJECT_HPP # include <iostream> # include <string> typedef struct { int x; int y; } t_point; class AObject { public: AObject(void); AObject(const AObject &copy); AObject &operator=(const AObject &copy); virtual ~AObject(void); virtual bool g...
true
0bc9b3ca1106e16b6d9b8b18815892af16ef686f
C++
ArtyomAdov/learning_sibsutis
/learning/thirdparty/2k2s/2k2s/PVT/pruf/main.cpp
UTF-8
1,660
2.578125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include "hpctimer.h" enum { N = 512, NREPS = 99999999 }; int main(int argc, char **argv) { int i; double t; int rand_num; int counter_one; printf("vetki: "); /* t = hpctimer_getwtime(); for (i = 0; i...
true
aaa9e01786df789282e0a7197db12f5802fce0fc
C++
no-glue/chained-hash-table
/hash_simple_string.h
UTF-8
295
3.0625
3
[]
no_license
template<typename Type>class HashSimpleString { public: unsigned int position(Type key, unsigned int size) { // simple hash just add up bytes and return unsigned int length = key.length(), i, sum; for(i = 0, sum = 0; i < length; i++) sum += key.at(i); return sum % size; } };
true
ed0af3be54d762e7cac56408c312c1cc3cac883c
C++
Snigdhabhatnagar/Competitive-Programming
/Code Forces Problems/CFnearest Interesting Num(1183A).cpp
UTF-8
457
2.859375
3
[]
no_license
#include<iostream> using namespace std; int main() { int a; cin>>a; int n=a; int sum=0; while(a!=0) { sum+=a%10; a/=10; } if(sum%4==0) { cout<<n; } else { int sum1=sum; while(sum1%4!=0) { n+=1; a=n; ...
true
6d72daafed119eac565afe08c6eced789e7c7bb9
C++
xeon2007/WSProf
/Projects/bdda/src/CPP/Excel/XlCharts/XlChartDataModel/inc/XlChartBar.h
UTF-8
3,992
2.828125
3
[]
no_license
/** * @file XlChartBar.h * * Header file for Excel Chart Bar record. * Definition of a bar or column chart group * * (c) Schema Software Inc., 2003 * @ingroup ExcelChart */ #if !defined __XLCHART_BAR_H__ #define __XLCHART_BAR_H__ #include "XlObject.h" #include "XlRecord.h" /** * Excel Chart Bar record re...
true
a9c00e3129d4303175b290c3eb6afff0d6a37002
C++
shravya-bhaskara/ctf2021
/baby_ctf_simulator/private/chall.cpp
UTF-8
7,941
3.03125
3
[]
no_license
#include <cstdio> #include <cstdlib> #include <unistd.h> #include <string.h> #include <string> #include <iostream> #include <exception> #include <sstream> #include <map> #include <limits> #include <alloca.h> #include "Exceptions.hpp" #include "Colors.hpp" #include "chall.hpp" #define DEBUG using namespace std; Releas...
true
705647910bcf669efe421b940303b027c51dd7a6
C++
ueclectic/step-homeworks
/Cpp/wapi_exam/AlarmDll/AlarmDlg.cpp
UTF-8
2,201
2.59375
3
[]
no_license
#include "AlarmDlg.h" AlarmDlg* AlarmDlg::ptr = nullptr; AlarmDlg::AlarmDlg(std::wstring action, const time_t alarmTime) { ptr = this; mAction = action; mAlarm = alarmTime; } BOOL CALLBACK AlarmDlg::DlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { HANDLE_MSG(h...
true
9c5e91ceb62761301b96d49dd06091add38ba629
C++
ncompere/Interpreter
/parser.hpp
UTF-8
1,409
3.28125
3
[]
no_license
#ifndef PARSER_HPP #define PARSER_HPP #include <exception> #include <string> /* Token type */ enum TOKEN { TOKEN_OPEN, TOKEN_CLOSE, TOKEN_VAR, TOKEN_PRINT, TOKEN_ERROR, TOKEN_INCREMENT, TOKEN_DECREMENT }; // des tokens ont été rajoutés ici /* Parser of a line of the asd2 language */ class parser { public: // const...
true
e1fd01a8a7c8c0f3544a1337d4165853e641f89a
C++
YIUECHEN/Practice
/第一个只出现一次的字符/第一个只出现一次的字符/test.cpp
UTF-8
717
3.109375
3
[]
no_license
#include<iostream> #include<string> #include<map> using namespace std; //int FirstNotRepeatingChar(string str) { // if (str.size() == 0){ // return -1; // } // char ch[256] = { 0 }; // for (int i = 0; i<str.size(); i++){ // ch[str[i]]++; // } // for (int i = 0; i<str.size(); i++){ // if (ch[str[i]] == 1){ // ret...
true
846e686a4a69985a2675b6813d397e377f3914d1
C++
stauntonknight/algorithm
/euler/39.cc
UTF-8
582
2.78125
3
[]
no_license
#include <iostream> #include <cstdio> #include <vector> #include <map> #include <cmath> using namespace std; int P = 1000; int main() { map<int, int> count; int total = 0; int p = 0; for (int i = 1; i < P/2 ; i++) { for (int j = 1; j < i ; ++j ){ int zs = i * i - j * j; int z = sqrt (zs); ...
true
839c4f5f87d613d864b247dea243d5d769314c77
C++
subnr01/stapi
/fork.h
UTF-8
699
2.734375
3
[]
no_license
#ifndef FORK_H #define FORK_H #include <unistd.h> #include <signal.h> #include <errno.h> class Fork { private: pid_t pid; pid_t parent; static Fork * instance; static void Signal(int sig); protected: void SignalParent(int sig); virtual void Execute(void)=0; ...
true
f93d68f5fc42a51484259f0590a47ef87cfa3904
C++
rishirv/competitive-programming
/USACO Training/4/4.3/race3/r.cpp
UTF-8
1,489
2.828125
3
[]
no_license
/* ID: verma.r1 PROG: race3 LANG: C++11 */ #include <fstream> #include <deque> #include <vector> using namespace std; ifstream cin ("race3.in"); ofstream cout ("race3.out"); vector<int> to[50]; vector<int> from[50]; vector<int> unavoidable; vector<int> splitting; int n=0; void isSplitting(int x, bool visit0[]){ d...
true
5d9c2ef022c0b1969059f1e3931a352ccd2cfca1
C++
yk220284/chess
/util.cpp
UTF-8
2,369
3.578125
4
[]
no_license
#include "util.hpp" /* ----Piece/Player Color---- */ std::ostream& operator<<(std::ostream& out, Color color) { switch (color) { case Color::white: out << "White"; break; case Color::black: out << "Black"; break; } return out; } /* ----Piece Type---- */ std::ostream...
true
adace6a5e6d63c4d1573279a15e4fc418a5c2e27
C++
vasilegroza/SI
/Tema1/Ex1/criptor.cpp
UTF-8
2,798
3.125
3
[]
no_license
#include <stdlib.h> #include <string.h> #include <iostream> #include "file_service.h" #include "over_AES_service.h" #include <time.h> #include <string> using namespace std; bool validate_input(char *file_in, char *file_out, char *mode) { if (!file_exists(file_in)) { perror(file_in); return false;...
true
726e06dfc5a4c5a0087cf3f0be19d51fbedf18c6
C++
Mike2208/Monte_Carlo
/Monte_Carlo/map_2d_bool.h
UTF-8
1,701
3.03125
3
[]
no_license
#ifndef MAP_2D_BOOL_H #define MAP_2D_BOOL_H #include "map_2d.h" template<> class Map2D<bool> { public: typedef std::vector<bool> CELL_STORAGE; typedef bool CELL_TYPE; Map2D(const POS_2D_TYPE &NewWidth, const POS_2D_TYPE &NewHeight, const bool &DefaultCellValue) : _Height(NewHeight), _Width(NewWidth), _CellDat...
true
3448644d6fd04ea607affa5476f913c853eea6bb
C++
kenziecalvert1/FreshmenYear
/CS162/Assignment 4/onix.cpp
UTF-8
1,169
2.640625
3
[]
no_license
/********************************************************************* ** Program Filename:onix.cpp ** Author:McKenzie Calvert ** Date:May 29,2017 ** Description:determines if the onix is captured or not ** Input:the field calls this ** Output:true or false *******************************************************...
true
b451f552ca4184e55dc33f5cd0d0b61c97a04a65
C++
pytorch/pytorch
/torch/csrc/api/src/nn/modules/padding.cpp
UTF-8
3,708
2.515625
3
[ "BSD-3-Clause", "BSD-2-Clause", "LicenseRef-scancode-secret-labs-2011", "LicenseRef-scancode-generic-cla", "BSL-1.0", "Apache-2.0" ]
permissive
#include <torch/nn/modules/padding.h> #include <torch/expanding_array.h> namespace F = torch::nn::functional; namespace torch { namespace nn { template <size_t D, typename Derived> ReflectionPadImpl<D, Derived>::ReflectionPadImpl( const ReflectionPadOptions<D>& options_) : options(options_) {} template <si...
true
5cc2be8d40cae01e2c7c71e5049dae5f283ce76b
C++
MannoverBoard/CPE212
/utilities/print_utilities.h
UTF-8
596
3.1875
3
[]
no_license
#ifndef PRINT_UTILITIES #define PRINT_UTILITIES #include <ostream> #include <sstream> template<typename T,size_t R,size_t C> std::string toString(const T(&a)[R][C]) { std::ostringstream os; os << '['; for(size_t r;r<R;++r) { os << '['; for(size_t c;c<(C-1);++c) { os << a[r][c] << ','; } os...
true
b5de83c62b3962982e0818984eff272f1bcb5ea2
C++
maks1401/Laboratory
/№28 (последовательные контейнеры библиотеки STL)/№28 №3/№28 №3.cpp
UTF-8
2,373
3.234375
3
[]
no_license
//Трегубов Максим, лаб. №28, задача №3 #include <iostream> #include <vector> #include <ctime> #include <cstdlib> #include <cmath> #include "list.h" using namespace std; void main() { setlocale(LC_ALL, "ru"); srand(time(0)); int amount; cout << "Введите количество списокв: "; cin >> amount; vector ...
true
a241ce1e87c9bccb38ae015a78b894460ce016ba
C++
GreateLi/cross-platform-multithreading
/ThreadDemo/ThreadDemo/MyAutoLock.h
UTF-8
409
2.5625
3
[]
no_license
#pragma once #ifndef _MY_AUTO_LOCK_H #define _MY_AUTO_LOCK_H #ifdef _WIN32 #include<windows.h> #else #include <pthread.h> #endif #include "MyMutex.h" class AutoLock { private: MyMutex *m_mutex; public: AutoLock(MyMutex * mutex) : m_mutex(mutex) { if (m_mutex) m_mutex->lock(); } ~Au...
true
965043ef310b6290fa34ecccadee9e1f663fd13a
C++
NicolasMDuarte/Pibic20192020
/ProjetoArduino/sensores e componentes/mq135/mq135.ino
UTF-8
454
2.703125
3
[ "MIT" ]
permissive
#define MQ_analog A0 #define MQ_dig 4 int valor_analog; int valor_dig; void setup() { Serial.begin(9600); pinMode(MQ_analog, INPUT); pinMode(MQ_dig, INPUT); } void loop() { valor_analog = analogRead(MQ_analog); valor_dig = digitalRead(MQ_dig); Serial.print(valor_analog); Serial.print(" || ...
true
4fb76c76e24cba70b6c831c3d89d27896843116f
C++
bk211/Projet-POO-M1
/lib/Parseur.cpp
UTF-8
2,091
3.015625
3
[ "MIT" ]
permissive
#include "../libCardGame.hpp" Parseur::Parseur(std::string filename, const int nb_column, const bool strict) : filename(filename), nb_column(nb_column), strict_reading(strict) { //debug //std::cout<< "filename = <"<< filename<<">\n"; std::ifstream ifs(filename); if(!ifs.good()){ throw std::...
true
1b2907115100a687b5787d990035e970e9822219
C++
Relag/Minigolf_Dungeon_Submission
/Minigolf Dungeon Code/NetworkManager.cpp
UTF-8
1,635
3.15625
3
[]
no_license
#include "NetworkManager.h" // Check to see if there can be a connection made void NetworkManager::CheckConnection() { // Start of the CheckConnection function // try the connection try { Connect(); // Calling the TCP Connection for the CLIENT (Game) to Server (Database) } catch (exception error) { // di...
true
3d8541b683487a7b315c6bf347b10bc1457fb758
C++
IgorMoiseev1988/Like_permutation
/main.cpp
UTF-8
4,687
3.25
3
[]
no_license
#include <vector> #include <string> #include <iostream> #include <algorithm> #include <numeric> #include <array> #include <cstdlib> #include <ctime> #include <set> using namespace std::string_literals; template<typename T> std::ostream& operator<< (std::ostream& os, std::vector<T> v) { os << "["s; bool first {tru...
true
d046e3d0fd4bb823db6868b5a54d90d58d072cbc
C++
SHITHANSHU/LeetCode30DaysChallenge
/LeetCode30DaysChallengeMay2020/Week1/RansomeNote.cpp
UTF-8
2,824
3.671875
4
[]
no_license
/* Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false. Each letter in the magazine string can only be used once in your ransom note. Note...
true
e6a9ea066de8611daef6347c901217bedfba1dec
C++
ailyanlu/my-acm-solutions
/leetcode/sqrtx.cc
UTF-8
774
3.171875
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> using std::vector; #define ABS(X) ((X) > 0 ? (X) : -(X)) static const float EPSILON = 0.000000001; class Solution { public: int sqrt(int x) { if (x == 0) { return x; } float dividend = x, divisor = x, prev; do ...
true
4a0658351def00176e01ec3d4bc1698e1c35a44b
C++
SSU-SSORA/2017_CppAdvanced
/8장/PROGRAM8_5.cpp
UHC
976
3.546875
4
[]
no_license
#include <iostream> #include <string> struct W { W(int &, int&) { std::cout << "W(int&,int&)" << std::endl; } }; struct X { X(const int&, int&) { std::cout << "X(const int &, int&)" << std::endl; } }; struct Y { Y(int &, const int&) { std::cout << "Y(int&, const int&)" << std::endl; } }; struct Z { Z(c...
true
4fd0064b7abd48e3633d51b12f0dda070f7ce638
C++
destroierdam/Object-Oriented-Programming
/Lectures/27_05_2019/Alcohol.h
UTF-8
295
3.265625
3
[]
no_license
#pragma once #include "Drink.h" using std::cout; using std::endl; class Alcohol : public Drink { double alcohol; public: Alcohol() { this->alcohol = 50; } void drink() override { std::cout << "Drink with mood" << std::endl; } void getMaker() const { cout << "Vineks Preslav" << endl; } };
true
4a353ed5b22a333c875d4413f10f507b76287083
C++
robinhoodmarkets/engine
/slack/web/oauth.access.h
UTF-8
2,595
2.671875
3
[ "MIT" ]
permissive
// // engine // // Copyright © 2015–2016 D.E. Goodman-Wilson. All rights reserved. // #pragma once #include <slack/types.h> #include <slack/set_option.h> #include <slack/base/response.h> #include <string> #include <vector> #include <slack/optional.hpp> namespace slack { namespace oauth { class access : publ...
true
0078960186c043f33502d088ecbeb781dafa9ccf
C++
liyunfei1994/MyProject
/Learning_C++/access_permission.cpp
UTF-8
2,901
4.1875
4
[]
no_license
/* 2020年4月18日14:11:27 C++ 类成员的访问权限 C++通过 public、protected、private 三个关键字来控制成员变量和成员函数的访问权限, 它们分别表示公有的、受保护的、私有的, 被称为成员访问限定符。 所谓访问权限,就是你能不能使用该类中的成员。 Java、C# 程序员注意, C++ 中的 public、private、protected 只能修饰类的成员, 不能修饰类, C++中的类没有共有私有之分。 在类的内部(定义类的代码内部), 无论成员被声明为 public、protected 还是 private, 都是可以互相访问的, 没有访问权限的限制。...
true
0c28d2c9bb3113caebe8ce25043ac665e37b8dbd
C++
gzmnursena/veri_yapilari
/graphs/graphs2/main.cpp
UTF-8
2,661
3.78125
4
[]
no_license
#include <iostream> using namespace std; //Graf oluşturma... //bağlı liste elemanları tutar struct adjNode { int val, cost; adjNode* next; }; //kenarları saklamak için oluşturulan struct struct graphEdge { int start_ver, end_ver, weight; }; class DiaGraph{ //verilen graftaki bağlı listesine yeni düğ...
true
932c3d6d652eb36f72770df78f3d316f3d8309c8
C++
xyyyt/Aggregation-Processing-and-Visualisation
/Include/ConvertissorTemp.hpp
UTF-8
2,303
3.234375
3
[]
no_license
#ifndef CONVERTISSOR_TEMP_HPP_ # define CONVERTISSOR_TEMP_HPP_ # include "IConvertissor.hpp" namespace Convertissor { template <typename T = double, typename U = double> class ConvertissorTemp : public IConvertissor<T, U> { private : enum ConvertissorMode { ...
true
bcab1962ac627cbe5685720e6924f589443dce0e
C++
doraneko94/AtCoder
/ABC/ABC076/c.cpp
UTF-8
787
2.859375
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main() { string S, T; cin >> S; cin >> T; int lenS = S.size(); int lenT = T.size(); int ans = -1; for (int i=0; i<(lenS - lenT + 1); ++i) { string cand = S.substr(i, i+lenT); bool can = true; for (int t=...
true
2aad61746dc66f058c69cf6e556f6c39e801c9f1
C++
rweigel/kameleon
/python/kameleonV.cpp
UTF-8
1,600
2.890625
3
[]
no_license
#include <iostream> #include <iomanip> #include <sstream> #include <string> #include <ctime> #include <cmath> #include <cstdlib> #include <ccmc/Kameleon.h> #include <ccmc/FileReader.h> std::vector<float> interpolate (char* filename, std::vector<float> x, std::vector<float> y, std::vector<float> z, int N, char* var, in...
true
c4fbc609fb97668a9db2d3975f8533aa8f5e2e83
C++
JhengHan/Shock_Wu
/n1.cpp
BIG5
729
3.546875
4
[]
no_license
// n1.cpp : wqDxε{iJIC // #include "stdafx.h" #include "stdio.h" #include "stdlib.h" int n_factorial(int n) { int temp = 1, x = 1; for (x = 1; x <= n; x++) { temp *= x; } return temp; } int n_match(int m, int n){ int tmp = 0; tmp = (n_factorial(m) / (n_factorial(m - n)*n_factorial(n))); return tmp; } int main...
true
20c7f12bde0354ef7c9df8ca3ca101619766feb6
C++
yachay-tech-ai/DataStructures-n-Algorithms
/data structures implementation/Trie/Trie.cpp
UTF-8
1,013
3.078125
3
[]
no_license
#include "Trie.h" TrieNode::TrieNode() { } TrieNode::~TrieNode() { } TrieNode* TrieNode::getNode() { TrieNode* pnode = new TrieNode; pnode->isEndOfWord = false; for (int i = 0; i < 26; i++) pnode->children[i] = NULL; return pnode; } int TrieNode::getCharIndex(char c) { return c -'a'; ...
true
feaffb9ca863d36422fa9863f0d471091563048c
C++
LegendaryZReborn/Interactive-3D-Graphics
/Island Project/GraphicsProject3_ReadModels/Cube.h
UTF-8
1,466
2.875
3
[]
no_license
#pragma once #include "Angel.h" typedef Angel::vec4 color4; typedef Angel::vec4 point4; const int NumVertices = 36; //(6 faces)(2 triangles/face)(3 vertices/triangle) class Cube { public: Cube(); void quad(int a, int b, int c, int d); //draws cube with specified colors void colorcube(); void Lo...
true
ecc9cdd48356f69c1ebb75d3ab0c3863d26c67cd
C++
DoxelCreations/Doxel-Engine
/Doxel-Engine Solution/Doxel-Engine/SimpleErrors.h
UTF-8
535
3.515625
4
[ "MIT" ]
permissive
/* FILE DESCRIPTION This is a simple header that define a simple console printing function. */ #pragma once #include <iostream> /* This function print things to the console. How to use: When you want to print something to the console, type: Debug_Log("X") where X is the text you want to print. If you want to ...
true
c68f12bab373d2b4afffad41a6e4767b7780d7b6
C++
llersch/fcg20111
/src/Camera.cpp
UTF-8
1,354
3.03125
3
[]
no_license
#include "Camera.h" Camera::Camera(void) { eye[0] = 0.0f; eye[1] = 0.1f; eye[2] = 0.0f; up[0] = 0.0f; up[1] = 1.0f; up[2] = 0.0f; side[0] = 1.0f; side[1] = 0.0f; side[2] = 0.0f; look[0] = 1.0f; look[1] = 0.0f; look[2] = 0.0f; } Camera::~Camera(void) { } void Camera::Update_glMatrix(vo...
true
58abd6e557549128c59ca7a02ee40ccb6a2a6a45
C++
Ri0ee/memory-editor
/TestSubject/src/main.cpp
UTF-8
299
2.703125
3
[]
no_license
#include "windows.h" char str_1[] = "TestStringOne"; char str_2[] = "TestStringTwo"; int main() { while(true) { MessageBox(0, str_1, str_2, MB_OK); MessageBox(0, (IsDebuggerPresent())?"Debugger present":"Debugger not present", "Message box", MB_OK); } return 0; }
true
b0a3a2edc662131678b53c1ad61b6425acaf224b
C++
bmikaeli/abstractVm
/OpInt16.class.cpp
UTF-8
2,539
2.921875
3
[]
no_license
#include "OpInt16.class.hpp" OpInt16::OpInt16(std::string value) { this->value = value; this->type = Int16; } OpInt16::~OpInt16() { } int OpInt16::getPrecision() const { return Int16; } eOperandType OpInt16::getType() const { return this->type; } std::string const &OpInt16::toString() const { r...
true
41d35ac77c160e372a8839636f2f29e1db2fac6b
C++
romanbtt/42-Piscine-Cpp
/cpp00/ex01/main.cpp
UTF-8
1,622
3.078125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
true
249fb682ede1e29649b3a9b7b658fc88bf18fac7
C++
pawnlord/chess-engine
/inc/Unit.hpp
UTF-8
415
2.65625
3
[]
no_license
#ifndef UNIT_HPP #define UNIT_HPP #define SIDE1 0 #define SIDE2 1 class Unit{ public: Unit(int x, int y, int maxX, int maxY, int side, char identifier_); virtual bool validateMovement(int to_x, int to_y){ return true; } char identifier; struct { int x; int y; ...
true
fe83750bc47bcee78b30918bd963c3cdb1d4a2f5
C++
NateRiz/OpenGL4
/Engine/MeshHandler.cpp
UTF-8
1,389
2.703125
3
[]
no_license
// // Created by nathan on 6/9/19. // #include "MeshHandler.h" #include <glad/glad.h> MeshHandler::MeshHandler() { unsigned int vao; glGenVertexArrays(1, &vao); mVAOs.push_back(vao); //TODO this shouldn't be here later. vaotype will just be passed in to createmesh() } MeshHandler::~MeshHandler() { f...
true
1a4350f0c9dddcb96194a158f526c7c1da5d794d
C++
alorkowski/N2ChessPuzzleMPI
/003-mpi2/MemoryAllocationTool.hpp
UTF-8
1,562
3.15625
3
[]
no_license
//! MemoryAllocationTool.hpp /*! \brief A class responsible for dynamic allocation of memory. \author Lorkowski, Alexander <alexander.lorkowski@epfl.ch> \version 1.0 \date 21 May 2017 \remark Ecole Polytechnic Federal de Lausanne (EPFL) \remark MATH-454 Parallel and High-Performance Computing */ #ifndef M...
true
fcca47e30cc66d4e271fcc1a5f04281a9c883d17
C++
cjglo/cs052
/module5/Project 3/GoldClient.cpp
UTF-8
2,034
3.09375
3
[]
no_license
/* * GoldClient.cpp * * COSC 052 2020 * Project 3 * * Due on: August 2nd * Author: Christopher Gallo * * * In accordance with the class policies and Georgetown's * Honor Code, I certify that, with the exception of the * class resources and those items noted below, I have neither * given nor received any assistance on t...
true
d0d4594a10b44ee2cbdbd3454b7413face738d61
C++
cheersfan/My-C-Plus-Plus-Practice
/ExerciseCodes/10-8-stock20.h
UTF-8
663
2.875
3
[]
no_license
// // Created by root on 12/1/18. // #ifndef MYCLIONPROJECT_10_8_STOCK20_H #define MYCLIONPROJECT_10_8_STOCK20_H #include <string> #include <iostream> class Stock3{ private: std::string company; long shares; double share_val; double total_val; void set_tot(){total_val = shares * share_val;}; publi...
true
e44d21cf9f109b96025507be9a0e5a8c5af6ccb6
C++
google/swiftshader
/third_party/llvm-16.0/llvm/lib/Support/IntervalMap.cpp
UTF-8
4,501
2.625
3
[ "Apache-2.0", "Spencer-94", "BSD-3-Clause" ]
permissive
//===- lib/Support/IntervalMap.cpp - A sorted interval map ----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
true
ff1941a308417a55bb164f3947756e4bccaa761f
C++
en30/online-judge
/atcoder/abc015_3.cpp
UTF-8
402
3.046875
3
[]
no_license
#include <bits/stdc++.h> #include "../include/template" int N, K; vector<vector<int>> T; bool buggy(int i, int curr) { if (i == N) return curr == 0; rep(j, K) if (buggy(i + 1, curr ^ T[i][j])) return true; return false; } int main() { cin >> N >> K; T.resize(N, vector<int>(K)); rep(i, N) rep(j, K) cin >...
true
451c13fe42480ece512b9f52c2918d5254b76aaf
C++
ltabis/epitech-projects
/cpp_d09_2018/tests/ex04/unit_tests_4.cpp
UTF-8
816
2.625
3
[ "MIT" ]
permissive
/* ** EPITECH PROJECT, 2019 ** unit_tests_1.cpp ** File description: ** battery */ #include <criterion/criterion.h> #include "Paladin.hpp" Test(ex04, Paladin) { Paladin c("palachiasse", 15); cr_assert_eq(c.getName(), "palachiasse"); cr_assert_eq(c.getLvl(), 15); cr_assert_eq(c.getPv()...
true
0586433f61114dfb04edb2967a1979e716db3ad0
C++
sdirienzo/legend-of-adlez-game
/Enemy.cpp
UTF-8
1,021
3.328125
3
[]
no_license
/******************************************************************************* ** Author: Stephen Di Rienzo ** Date: 11/28/2018 ** Description: Enemy.cpp is the class implementation file for the Enemy ** class, which models a non-playable Enemy game character *********************************...
true
1f7f9ec7934055d8f805c83c43b47e1bdbe73c73
C++
hamukawa0406/imageProcessing
/topic1/1-3/statistic.cpp
UTF-8
900
2.578125
3
[]
no_license
#include "ifstream_string.h" #include "statistic.h" Statistic::Statistic() { } Statistic::Statistic(InctImage _img): img{_img} { ave = calcAve(); var = calcVar(); max = calcMax(); min = calcMin(); med = calcMed(); mode = calcMode(); setHist(); } double Statistic::calcAve(){ double sum...
true
2fb7ef396a76c2111d85ee01a0c3f336f88f5eb2
C++
CasarinDavide/CasarinDavide_A_Semaforo
/SEMAFORO/SEMAFORO.ino
UTF-8
2,204
2.84375
3
[]
no_license
int rosso1 = 6; int giallo1 = 4 ; int verde1= 2 ; int rosso2 = 12 ; int giallo2= 10 ; int verde2= 8 ; int numLampeggi ; int DurataGiallo; int DurataRosso; int DurataVerde; int tempoLampeggi; void setup() { // put your setup code here, to run once: pinMode (rosso1, OUTPUT); pinMode (giallo1, OUTPUT); pinMode (...
true
4f6e5c05f57e20a65586215329af1f7dc220c6e7
C++
ide-an/DummyCCompiler
/src/codegen.cpp
UTF-8
8,894
2.890625
3
[]
no_license
#include "codegen.hpp" /** * コンストラクタ */ CodeGen::CodeGen(){ Builder = new IRBuilder<>(getGlobalContext()); } /** * デストラクタ */ CodeGen::~CodeGen(){ SAFE_DELETE(Builder); } /** * コード生成実行 * @param TranslationUnitAST Module名(入力ファイル名) * @return 成功時:true 失敗時:false */ bool CodeGen::doCodeGen(TranslationU...
true
d6f793d7974582cd95e22a99daed68b468e37789
C++
Ketan-Suthar/Algorithms
/Bit Algorithms/MakeSumEvenByAddingMinNum.cpp
UTF-8
396
3.640625
4
[]
no_license
#include <iostream> using namespace std; // Function to find out minimum number int minNum(int arr[], int n) { // Count odd number of terms in array int odd = 0; for (int i = 0; i < n; i++) if (arr[i] % 2) odd += 1; return (odd % 2)? 1 : 2; } // Driver code int main() { int arr[] = { 1, 2, 3, 4, 5, 6, 7, 8}; ...
true
a43a9f7143559291f4ac6f41495d421ac1c1dca2
C++
skryabiin/core
/console/src/DebugConsole.cpp
UTF-8
9,078
2.8125
3
[ "MIT" ]
permissive
// DebugConsole.cpp : Defines the entry point for the console application. // // Echoes all input to stdout. This will be redirected by the redirect // sample. Compile and build child.c as a Win32 Console application and // put it in the same directory as the redirect sample. // #include "DebugConsole.hpp" namespace c...
true
849a048d520819931b4a0b66e8ff176447eaf885
C++
YaniAngel/CG_2DSnakeGame
/CG_2DSnakeGame/CG_2DSnakeGame/src/main.cpp
UTF-8
2,362
3
3
[]
no_license
#include <GL/glut.h> #include <iostream> #include "Game.h" const unsigned int tileCount = 30; Game snake(tileCount); void renderScene(); void processKeyboard(int, int, int); void changeSize(int, int); void refreshScene(int); int main(int argc, char** argv) { // Init GLUT and create window glutInit(&...
true
fb66bab60c90fa26b1544f8d5ad3516e1684c954
C++
its-sachin/InterviewBit
/Array/largetNum.cpp
UTF-8
735
3.171875
3
[]
no_license
#include <iostream> #include <bits\stdc++.h> using namespace std; bool comp(string a, string b){ string one = a.append(b); string two = b.append(a); return one>two; } string largestNumber(vector<int> &A){ vector<string> a; for(int i:A){ a.push_back(to_string(i)); } sort(a.begin()...
true
f59a866d2c2911fa821c45ccf7893d76591a3e19
C++
RichardTimothy1307/DSA_in_CPP
/Bit_Manipulation/string_diff.cpp
UTF-8
362
2.90625
3
[]
no_license
class Solution { public: char findTheDifference(string s, string t) { char becomenull=0; int i=0; for(i=0;i<s.size();i++){ becomenull^=s[i]^t[i]; //will make all character null till n-1 } return becomenull^t[i]; //null xor with last char will gi...
true