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
acf50aec3ea04d881384fa8741610b3bfc11301b
C++
mei-t/algorithm_study
/cracking_the_coding_interview/17-16.cpp
UTF-8
979
3.4375
3
[]
no_license
#include <iostream> #include <vector> #include <unordered_map> using namespace std; int masseur(const vector<int>& times, size_t i, unordered_map<int, int>* memo){ if(i >= times.size()){ return 0; }else if(memo->find(i) != memo->end()){ return (*memo)[i]; } int timeSum = max(times[i] +...
true
2a58a738acf1d56972fc98fb4f631a5c6bad3df7
C++
yalishanda42/oop2021
/week4/1/Product.hpp
UTF-8
420
2.84375
3
[]
no_license
#pragma once class Product { public: Product(const char *, double, unsigned int); /* THE BIG 4: */ Product(); Product(const Product&); Product& operator=(const Product&); ~Product(); /* ========== */ const char *getName() const; void setName(const char *); double price; u...
true
5cdfc4a6ce7a2fb9328ea9851b1f32a93d6d979c
C++
mshafer1/SteilHU
/170/NeedsOrganized/Organize last---messy/rough/cin.getline_example.cpp
UTF-8
668
3.28125
3
[]
no_license
//this does not work #include<iostream> using namespace std; int main() { //advantages of using getline over >> //can get multiple words (it does not stop at white space) //has bounds checking //when more characters are entered than the limit // set, an error flag is set char s[100]; ...
true
fa44b10eaf723efb8b1e4ffc480873e04fc5090a
C++
hunterbeebe/Codebreakers
/Game.cpp
UTF-8
23,936
3.59375
4
[]
no_license
#include "Game.h" Game::Game() { dealCards(); dealQuestions(); } int Game::dealCards() { m_deck.shuffle(); // shuffle the deck for (int i = 0; i < 5; i++) { m_human.addCardtoHand(m_deck.draw()); // draw cards for the human } m_human.sortHand(); // sort the humans hand for (int j = 0; j < 5; j++)...
true
5b7481413c2d2a25f454ca46266d98e0fe13711d
C++
RobertoLorenzoAguilar/UsingCorCplusplusFunctions-inPython
/main.cpp
UTF-8
364
3.234375
3
[]
no_license
#include "main.h" #include <iostream> int main(char * path_str) { // Using strcmp() int res = strcmp(path_str, "Santiago & Roberto"); if (res==0) printf("Strings are equal"); else printf("Strings are unequal"); printf("\nValue returned by strcmp() is: ...
true
38798960901c0bb342f285c6494dc4fab42c0d73
C++
profrog-jeon/cppcore
/Src/300_Formatter/HelperFunc.cpp
UTF-8
3,014
2.921875
3
[]
permissive
#include "stdafx.h" #include "HelperFunc.h" namespace fmt_internal { ////////////////////////////////////////////////////////////////////////// void TokenToVector(std::tstring& strContext, std::tstring strDelimiter, std::vector<std::tstring>& outTokenVec) { int nOffset = 0; while(nOffset >= 0) { std::tstr...
true
65f2e2f5560e09b9d0c5a0642e5b699ae5c4da78
C++
j-a-h-i-r/Online-Judge-Solutions
/LightOj/1238 - PowerPuffGirls.cpp
UTF-8
1,729
2.515625
3
[]
no_license
#include<iostream> #include<queue> #include<vector> #include<cstdio> using namespace std; int fx[] = {0, 0, 1, -1}; int fy[] = {1, -1, 0, 0}; int bfs(int sx,int sy, char ara[30][30]) { int dis[30][30]; for (int i=0; i<30; i++) { for (int j=0; j<30; j++) dis[i][j] = -1; } queue<i...
true
6628f96ceeabf5bce14d56e5795dc66df67f1bfd
C++
ktonon/cog
/spec/fixtures/seeds/lib/trainer.cpp
UTF-8
192
2.90625
3
[ "MIT" ]
permissive
#include "Dog.h" #include <iostream> using namespace std; int main(int argc, char** argv) { Animals::Dog dog; cout << "A dog says: " << dog.speak("hungry!") << endl; return 0; }
true
51aa67ee732a7b0482dfd042382179ddcd1d7a72
C++
15831944/TRiAS
/TRiAS/TRiAS/Fachschalen/Kompakt (Fachschale Gewässer)/GEWBAUM.HXX
ISO-8859-1
15,078
2.59375
3
[]
no_license
// Klassendefinitionen fuer Identifikator-Baum ------------------------------------------ // File: GEWBAUM.HXX #if !defined(_GEWBAUM_HXX) #define _GEWBAUM_HXX class TR_OCL { // In Trias definierte Gew.Klassen private: long _lIdent; long _lMCode; short _isValid; short _iDefine; class TR_OBJTree *_pO...
true
41fb3860d0b5009121d99ca7574c15b8d97b02ad
C++
HersonaREAL/my_cpp_primer_code
/chapter06/611.cpp
UTF-8
273
2.796875
3
[]
no_license
#include<iostream> #include<vector> #include<cctype> #include<stdexcept> using std::cin; using std::cout; using std::endl; using std::string; using std::vector; void reset(int &x){ x = 0; } int main(){ int x; cout<<"x:"; cin>>x; reset(x); cout<<"reset x:"<<x<<endl; }
true
947fd59515d4114d8e8eaa2e97b3c466130a1e34
C++
crstyhs/algoritmos-e-programacao
/lista 1/ex4.cpp
UTF-8
327
2.90625
3
[]
no_license
#include<stdio.h> #include<iostream> int main(){ int A,B,RESTO,QUOCIENTE; printf("insira o dividendo: "); scanf("%d", &A); printf("insira o divisor: "); scanf("%d", &B); QUOCIENTE=A/B; RESTO=A%B; printf("o quociente e: %d\n", QUOCIENTE); printf("o resto e: %d\n", RESTO); system("pause"); return ...
true
44a05312cf57fb56d09ea1e733f07f58f593023d
C++
NataliVol4ica/UF-CPP-Pool
/Day05/ex04/Intern.hpp
UTF-8
765
2.625
3
[]
no_license
#ifndef INTERN_HPP # define INTERN_HPP #include "defines.hpp" #include "Form.hpp" #include "PresidentialPardonForm.hpp" #include "RobotomyRequestForm.hpp" #include "ShrubberyCreationForm.hpp" class Intern { public: /* EXCEPTIONS */ class UnknownFormException : public exception { public: UnknownFormException();...
true
55d02a70cc249396d7cf681e2451abaabdef4eac
C++
neeji/codechef_solution
/codechef/beginner/sort.cpp
UTF-8
1,416
3.046875
3
[]
no_license
#include <iostream> #include <vector> #define ll long long #define ull unsigned long long #define ui unsigned int using namespace std; void merge(vector<int> &a, int start, int mid, int end) { int left = mid - start + 1; int right = end - mid; vector<int> left_part; vector<int> right_part; for (in...
true
53a8b909315fbb2646b3cc74c4114815d0b958d2
C++
jgabriel98/EcoSimulation
/code_in_C++/Simulation/src/Grid.h
UTF-8
1,881
2.53125
3
[]
no_license
#ifndef GRID_H #define GRID_H #include "SimTypes.h" #include "Helper.h" #include <unordered_map> #include <vector> //#define MAX_CELLS 2566 //#define NUM_FOUNDERS 4 using namespace std; namespace SimEco { class Grid{ public: //Specie *species; vector<Specie> species; //uint speciesSize; //stat...
true
b3ce57968dc2adff0d358c7de803c373b57c251d
C++
Nikita-L/Study
/ipt/year_1/cpp_and_cs/labs/labs/2.lab4 (ред.3) (menu)/2.lab2/head.h
UTF-8
10,271
2.84375
3
[]
no_license
#include <iostream> #include <string> #include <typeinfo> #include <windows.h> #include <typeinfo> using namespace std; void menu(); class Worker { protected: string name; int age; string post; int experience; public: Worker() : name("UNKNOWN"), age(0), post("UNKNOWN"), experience(0)...
true
cd1bfebfe0886af15aad30c2a479452e534fb50f
C++
GLUD/GomA
/Arduino/NFC_W_R/reader/reader.ino
UTF-8
2,202
2.59375
3
[]
no_license
#include <SPI.h> #include <MFRC522.h> #define RST_PIN 9 // Configurable, see typical pin layout above #define SS_PIN 10 // Configurable, see typical pin layout above MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance. MFRC522::MIFARE_Key key; /** * Initialize. */ void setup() { Serial.begin(9600); // ...
true
741e1de1d37ade5e5e6b7072b575dcc8de56d49e
C++
rmros/swagger
/qt5cpp/client/SWGPasswordChangeBody.cpp
UTF-8
2,468
2.578125
3
[]
no_license
#include "SWGPasswordChangeBody.h" #include "SWGHelpers.h" #include <QJsonDocument> #include <QJsonArray> #include <QObject> #include <QDebug> namespace Swagger { SWGPasswordChangeBody::SWGPasswordChangeBody(QString* json) { init(); this->fromJson(*json); } SWGPasswordChangeBody::SWGPasswordChangeBody() ...
true
c37d04f33bf7df367f315cc143cd83126e849a7d
C++
stamaniorec/playing-with-c-and-cpp
/exercise_problems/sieve_oop.cpp
UTF-8
673
3.46875
3
[]
no_license
#include <iostream> #include <math.h> using namespace std; class Sieve { private: int n; bool array1[100]; public: Sieve(int a) : n(a){}; void init_sieve() { for(int i = 0; i <= n; i++) { array1[i] = true; } } void run_sieve() { array1[0] = array1[1] = false; for(int i = 2; i <= sqrt(n); i++) {...
true
3527f0fa4635026685e40ab60747cfe41c47a9c3
C++
HTC77/cocos2d-x-Bazooka
/Classes/ParticleSpin.cpp
UTF-8
1,013
2.546875
3
[ "MIT" ]
permissive
#include "ParticleSpin.h" ParticleSpin::ParticleSpin() { spinCounter = 0; } ParticleSpin::~ParticleSpin() { } ParticleSpin* ParticleSpin::create(Vec2 _cp, char* _fileName) { ParticleSpin *pc = new ParticleSpin(); if (pc && pc->initWithFile(_fileName)) { pc->setPosition(_cp); pc->init(); pc->autorelease();...
true
9db6dba2cef5fac4c3c16473be53c0e17aaf474c
C++
qq1679781770/Mushroom
/src/latch_manager.hpp
UTF-8
1,118
2.78125
3
[]
no_license
/** * > Author: UncP * > Mail: 770778010@qq.com * > Github: https://www.github.com/UncP/Mushroom * > Description: * * > Created Time: 2016-10-21 16:50:18 **/ #ifndef _LATCH_MANAGER_HPP_ #define _LATCH_MANAGER_HPP_ #include <mutex> #include "shared_lock.hpp" namespace Mushroom { class L...
true
4e624dc1f4a258660bf98161d931e951d405b2b6
C++
GUAN-XINGQUAN/LeetCode
/Unclassified/50Anagrams.cpp
UTF-8
1,194
3.515625
4
[]
no_license
#include <iostream> #include <vector> #include <string> #include <unordered_map> #include <algorithm> using namespace std; class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { vector<vector<string>> result; unordered_map<string, int> map; for (unsigned i = 0; i < strs.size(); ...
true
a1602c8b33a2c8c658f9c75d745185bc8f243644
C++
wydahai/datastructure_algorithm
/bit_operation/excel_sheet_column_number.cc
UTF-8
1,682
4.5625
5
[]
no_license
/** * 题目:Excel Sheet Column Number * 描述:在Excel中,用A表示第一列,B表示第二列...Z表示第26列,AA表示第27列, * AB表示第28列...依次列推。请写出一个函数,输入用字母表示的列号编码, * 输出它是第几列。 * 分析:这道题实际上考察的是把二十六进制表示成十进制数字,将输入的字符串先 * 转换成字符数组,遍历数组中的每一个字符,用这个字符减去A再加1就是该 * 位对应的十进制数,然后乘以26的相应次方,最后把这些数加起来就是结果 * 了。 * 可能很多人会有疑惑为什么要加1,因为十进制...
true
4d00c1c1ba90d2f127383cc3e9d7e02ab522efa8
C++
AmberWangjie/qsx_duke_course
/ece551AlgorithmAndDataStructure/classwork/c17/p4/bstset.h
UTF-8
5,230
3.453125
3
[]
no_license
#include"set.h" #include<iostream> template<typename K> class BstSet : public Set<K> { public: int size; ////////////////////////////////////////////////////// class Pair{ public: K key; Pair* left; Pair* right; Pair(const K & in_key, Pair* in_left, Pair* in_right):key(in_key),left(in_left),ri...
true
b9ab0137c15fce95968eed9ce4dd9bc788cba643
C++
hunanhd/pyga
/ga/bpy_wrapper.h
GB18030
592
2.53125
3
[]
no_license
#pragma once #include <boost/python.hpp> using namespace boost; /* boost pythonװһЩ: (1) ַʹconst char* (2) ֵַstd::string (3) ͷֵһ(arrayvectorlist),ijpython::object(һpython) (4) жֵ,ֵʹpython::tuple(pythontupleǶӦ) */ namespace ga { extern int add( int a, int b ); extern python::object test( const char* name, pytho...
true
b3bd8dfb100554f5290237b98900ac4904036a2f
C++
janplaehn/MinecraftClone
/Jan's Minecraft/halcyon/halcyon/source/halcyon_render_system.cc
UTF-8
18,083
2.59375
3
[]
no_license
// halcyon_render_system.cc #include <halcyon.h> #define HC_ARRAYCOUNT(x) (sizeof(x) / sizeof(x[0])) vertex_format::vertex_format() : stride_(0) , attribute_count_(0) { //for (int i = 0; i < RENDER_SYSTEM_MAX_VERTEX_ATTRIBUTES; i++) for (auto &attrib : attributes_) { attrib = {}; } } void vertex_format::add_...
true
5881bbd2c125f30736a6efc066ecd02a7d592db6
C++
sork777/PortFolio
/Framework/Utilities/Path.h
UTF-8
3,563
2.671875
3
[]
no_license
#pragma once struct DirectoryHierarchy { wstring DirectoryPath; wstring DirectoryName; vector< DirectoryHierarchy> Children; }; class Path { private: static vector<string> TextureFormats; static vector<string> AudioFormats; static vector<string> RawModelDataFormats; static vector<string> MeshFormats; static ve...
true
af6e906b7d0e01d6f6c642554f552fab65b73262
C++
prestonneal/TempleOS-TomAwezome-ZenithOS
/src/Home/Net/NetQueue.CC
UTF-8
2,090
2.9375
3
[ "Unlicense", "LicenseRef-scancode-public-domain" ]
permissive
/* Shrine mentions possibly using two FIFOs (in our case, Queues) for pending and empty frames. If logical to implement, perhaps Zenith NetQueue code should do something similar to that idea. Each Ethernet Frame will be represented as an entry in a CQueue. */ class CNetQueueEntry:CQueue { I64 length; //todo: c...
true
a8d91123758870b67df2ccf5e4bc803415967fe0
C++
billtong/data-structure-and-algorithm
/leetcode/1462CourseScheduleIV.cpp
UTF-8
1,582
3.34375
3
[]
no_license
#include "stdafx.h" /** * There are a total of n courses you have to take, labeled from 0 to n-1. * Some courses may have direct prerequisites, for example, to take course 0 you have first to take course 1, which is expressed as a pair: [1,0] * Given the total number of courses n, a list of direct prerequisite pair...
true
67b734b9f70153a46829751096cfd59a14118240
C++
armageddon89/AdrianProjects
/Project/GraphMatcher/include/Node.h
UTF-8
2,097
3.25
3
[]
no_license
#pragma once #include "Statistics.h" template <typename N> class Node { public: Node(/* in */ const N &node, /* in */ const std::function<const std::wstring(const N &)> toString = [] (/* in */ const N &n) { return n; }) :m_node(node), m_label(toString(node)), m_bUnknown(false), m_bHasCorrespondent(fa...
true
5f9f562aea8250d6837acc30f34da4886140824d
C++
maunsell/MWorks
/0.4.3_dev/MonkeyWorksTools/MonkeyWorksStreamUtilities/monkeyWorksStreamUtilities.cpp
UTF-8
11,300
2.578125
3
[]
no_license
/* * monkeyWorksStreamUtilities.cpp * MonkeyWorksMatlab * * Created by David Cox on 12/20/06. * Copyright 2006 MIT. All rights reserved. * */ #include <string> #include "monkeyWorksStreamUtilities.h" double scarab_extract_float(ScarabDatum *datum){ #if __LITTLE_ENDIAN__ return *((double *)(datum->data.opa...
true
558fbeaf7533df222e1ec2d395b10d240b2e88ad
C++
DISTRHO/DISTRHO-Ports
/ports-juce5/drowaudio-common/dRowAudio_TappedDelayLine.h
UTF-8
5,021
2.875
3
[]
no_license
/* * dRowAudio_TappedDelayLine.h * * Created by David Rowland on 13/04/2009. * Copyright 2009 dRowAudio. All rights reserved. * */ #ifndef _DROWAUDIO_TAPPEDDELAYLINE_H_ #define _DROWAUDIO_TAPPEDDELAYLINE_H_ #include "includes.h" // #include "../../utility/dRowAudio_Utility.h" // #include "../dRowAudio_Audio...
true
0def44d019e3576f8c882d9ebbb4918c8d563c68
C++
killf/leetcode_cpp
/src/0171.cpp
UTF-8
349
3.03125
3
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <vector> #include <sstream> #include <algorithm> using namespace std; class Solution { public: int titleToNumber(string s) { int sum = 0, m = 1; for (int i = s.size() - 1; i >= 0; i--) { int c = s[i] - 'A' + 1; sum += m * c; if (i > 0)m *= 26;...
true
a5b70de29f8a138b163bac92c6e6744ecce9c907
C++
SotaLuciano/Library
/Code/2. ArraySortSumLine/functions.cpp
UTF-8
848
3.15625
3
[]
no_license
#include<iostream> #include "functions.h" using namespace std; void matrixInput(int** a, int n, int m) { cout << "Enter matrix: " << "\n"; for (int i = 0; i < n; ++i) for (int j = 0; j < m; ++j) { cout << "A[" << i << "][" << j << "]= "; cin >> a[i][j]; cout << "\n"; } } void matrixSum(int** a, int*...
true
4f4b47710bab3f602263175b63fdd2d1411d7c85
C++
hjarmstrong/cs247
/model/Model.h
UTF-8
898
2.609375
3
[]
no_license
#ifndef MVC_MODEL_H #define MVC_MODEL_H #include "subject.h" #include <Card.h> #include <Game.h> #include <Player.h> #include <Table.h> #include <sstream> #include <string> class Model : public Subject { public: // Constructor Model(); // GUI event handelers void newGame(int seed, bool*); void en...
true
eba47b73cf64ff0975d5dbd16491f90473390197
C++
frankiescott/coursework
/CS 240/Project 3/LLC.h
UTF-8
566
2.96875
3
[]
no_license
#include <string> using namespace std; struct Node { string data; Node* next; }; class LLC { public: LLC(); LLC(const LLC &source); ~LLC(); bool insert(const string &s); void head(int n); friend ostream& operator<<(ostream &os, const LLC &list); int len(); bool contains(const string &s); string...
true
7b6a4a347ad33aaa2c0d4095ee36413c66a82a8d
C++
olalatr-js/LeetCodeTasks
/LeetCodeTasks/ClimbingStairs.cpp
UTF-8
800
3.25
3
[]
no_license
#include <cassert> namespace { class Solution { public: int climbStairs(int n) { m_N = n; m_res = 0; recursive(1); recursive(2); return m_res; } private: void recursive(int count) { if (count > m_N) return; if (count == m_N) ...
true
d73d24ef36cf977ac5529a73cee4fb32c74cf853
C++
Lbardoux/file_io
/src/file_io.hpp
UTF-8
3,127
3.484375
3
[]
no_license
/** * @brief This file provides some simple functions to read files with * the *stream libraries from C++ standard * @example example.cpp * @author MTLCRBN * @version 1.0 */ #ifndef FILE_IO_HPP_INCLUDED #define FILE_IO_HPP_INCLUDED #include <fstream> #include <sstream> #include <string> #include <vector> #if de...
true
a1cbc2fa89fe5ac8032c803be949d1f29a29fbfa
C++
Lreneee/IROB
/PotmeterLed/PotmeterLed.ino
UTF-8
656
2.515625
3
[]
no_license
int potPin = A0; int ledPin = 13; int val = 0; int newVal = 0; int difference = 0; String offset = "Hoog"; void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); } void loop() { val = analogRead(potPin); if(val > 510 && offset!="Hoog"){ Serial.println("Hoog"); offset = "Hoog";...
true
6980022408f3ff2224b0061035f5fd378cd15273
C++
Abhishek-s-1902/C_codes
/assign 5/backup/SAE.cpp
UTF-8
2,822
3.265625
3
[]
no_license
#include "SAE.h" #include <cmath> SAE::SAE(float x1,float x2) { a = x1*12; b = x2; inches = a+b; degree = 1; } float SAE::getInches() const{ return inches; } float SAE::putInches(float inches) { return this->inches = inches; } SAE SAE::operator +( SAE S1){ SAE S2(0,0); float inches = this->getIn...
true
b97e58b26726c92c6054d02248a81bbd65ab7609
C++
Mirjang/BA_PointClouds
/LoD4ptC/src/lod/LodUtils.cpp
UTF-8
3,670
2.53125
3
[]
no_license
#include "LodUtils.h" namespace LOD_Utils { VertexBuffer createVertexBufferFromNode(NestedOctreeNode<Vertex>* pNode, ID3D11Device* device) { HRESULT result; ID3D11Buffer* vbuffer = nullptr; //create vertex buffer D3D11_BUFFER_DESC descVertexBuffer; ZeroMemory(&descVertexBuffer, sizeof(D3D11_BUFFER_DE...
true
5e7aa63b7e10e93b2100c051d527f08b4df5a645
C++
pkoppise/CSCI104
/7.2_vect.cpp
UTF-8
4,311
3.671875
4
[]
no_license
#include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; template <typename T> void printVector(vector<T> gvector) { for(unsigned int i=0; i < gvector.size(); i++) { //cout << gvector[i] << endl; cout << gvector.at(i) << endl; } c...
true
677a0a1b0c411a553220ec7ceb806973855b74b3
C++
Alesh/Squall
/tests/core/test_OutcomingBuffer.cxx
UTF-8
7,870
2.96875
3
[]
no_license
#include <string> #include <memory> #include <iostream> #include <squall/core/Buffers.hxx> #include "../catch.hpp" using squall::core::Event; using squall::core::OutcomingBuffer; using std::placeholders::_1; using std::placeholders::_2; enum : intptr_t { MARK = -1, HANDLER = -2, TRANSMITER = -3, TRANSMITER_ERR = -4,...
true
55a5282db8b86367fc8ada0130d7105bf4148a61
C++
thec0dewriter/AlgoGI2020
/pongrczrebekakitty_2037_147028_feladat4_parcialis-1.cpp
UTF-8
742
2.890625
3
[]
no_license
#include <iostream> using namespace std; int alakit(int szam) { int uj=0; int h=1; while(szam !=0){ uj = (szam %2)*h+ uj; h = h*10; szam = szam /2; } return uj; } void megold( int a, int b, int k) { int szj,db,szam; for(int i= a; i<=b; i++){ szam = alakit(i)...
true
6cfeea7c84bb1cf13f8e89afc98eb10c56adc8e6
C++
skilincer/DfsAlgorithmC
/dfsalgorithm.cpp
ISO-8859-9
884
2.90625
3
[]
no_license
#include<stdio.h> #include<conio.h> #include<stdbool.h> int graph[7][7]; bool ziyaret[7]; void matrisoku(){ int i = 0; FILE *fp = fopen("dfs.txt", "r"); while(fscanf(fp, "%d %d %d %d %d %d %d", &graph[i][0], &graph[i][1], &graph[i][2], ...
true
5b26cab255cfa71030728759557a4b6aaa51aaf8
C++
sshyran/Computational-Agroecology
/viz/model/material.h
UTF-8
332
2.65625
3
[]
no_license
#ifndef __MATERIAL_H__ #define __MATERIAL_H__ class Material { public: Material(float aborption = 0.5, float reflection = 0.5, float transmision = 0.0) :aborption(aborption), reflection(reflection), transmision(transmision) {} ~Material() {}; float aborption; float reflection; float transmision; }; #endif /* __MAT...
true
96a9fd30e0113fb74efc9e4bfd8fefce2c27c8d8
C++
simonc312/cs184raytrace
/Assignment2/Scene.cpp
UTF-8
11,771
2.859375
3
[]
no_license
#include "Scene.hpp" #include <iostream> using namespace std; #include <fstream> #include <sstream> #include <cstdlib> #include <stack> #include <math.h> #include <time.h> Scene::Scene(std::string file, int progressWait){ bool showProgress = (progressWait > 0); //store variables and set stuff at the end outputNa...
true
0c6aafbd3b73849b1f9e477073c866bcc668536a
C++
CyJay96/Lab-cpp
/lab_7/lab_7.7/lab_7.7.cpp
UTF-8
1,294
2.96875
3
[]
no_license
/* Дата сдачи: 04.03.2021 По заданной последовательности различных целых чисел построить соответствующее бинарное дерево поиска T как динамическую структуру данных. Выполнить следующие задания и вывести элементы дерева на экран. Оценить асимптотическую сложность алгоритма. Определить число листьев дерева. 8 20 10 ...
true
fecb8417d04a0b2854f55da2d22c64c395309d4a
C++
yogeshvishnole/cliondsalgo
/Recursion/23removeCharacter.cpp
UTF-8
473
3.4375
3
[]
no_license
#include<iostream> using namespace std; void replaceCharacter(char arr[],int elToReplace){ if(arr[0] == '\0') return; if(arr[0] == elToReplace){ for(char* p = arr;*p != '\0';p++){ *p = *(p+1); } replaceCharacter(arr,elToReplace); }else{ replaceCharacter(arr+1,elT...
true
884b5167dfe1d7473505dd310f9651e5f2038135
C++
kpilkk/Interviewbit
/Strings/roman-to-integer.cpp
UTF-8
541
3.421875
3
[]
no_license
// https://www.interviewbit.com/problems/roman-to-integer/ int Solution::romanToInt(string A) { int ans = 0, n = A.size(); unordered_map<char, int> roman = {{'I', 1}, {'V', 5}, {'X', 10}, {'L', 50}, {'C', 100}, {'D', 500}, {'M', 1000}}; int temp = roman[A[n - 1]]; ans += temp; for(int i =...
true
aadb6c760e8bdcc59d122188985f1170769fcc2f
C++
etrizzo/PersonalEngineGames
/DFS1/Adventure/Code/Game/Tile.cpp
UTF-8
6,998
2.640625
3
[]
no_license
#include "Tile.hpp" #include "Game/Game.hpp" #include "Game/Map.hpp" #include "Game/DebugRenderSystem.hpp" Tile::~Tile() { } Tile::Tile(int x, int y, TileDefinition* tileDef) { m_coordinates = IntVector2(x,y); m_tileDef = tileDef; m_extraInfo = new TileExtraInfo(); m_extraInfo->m_variant = GetRandomIntLessThan...
true
4414d05154e7a1c0901076a4d62a2d76ddee8707
C++
Ventura-College-CS/assignments-DavReggae
/CSV15_Arrays/array3.cpp
UTF-8
824
3.21875
3
[]
no_license
#include <iostream> #include <cstring> using namespace std; int main() { //string mainstr = "chocolate"; //string substr = "col"; char mainstr[10] = "chocolate"; char substr[10] = "col"; int pos, i, j; int flag = 0; // pos = mainstr.find(substr); cout << sizeof(mainstr) << endl; cout << sizeof(sub...
true
3be5fe4b758b81fd52834ec654b3858947f19d4b
C++
hpuxiaoqiang/coding
/DataStrcture/数据结构书中算法的实现/BasicOperate/SQStack.cpp
GB18030
803
3.359375
3
[]
no_license
/* ˳ջĻ */ #include <iostream> using namespace std; #define OK 1 #define ERROR 0 #define MaxSize 100 typedef int ElemType; typedef struct { ElemType *top; ElemType *base; int StackSize; }SQStack; //ʼ int Init(SQStack &S){ S.base = new ElemType[MaxSize]; if(!S.base) return ERROR; S.top = S.base; S.StackSize =...
true
2b6c359e9bb849fc3950b8946b8a767a1880abc6
C++
marromlam/lhcb-software
/Boole/VP/VPDigitisation/src/VPDepositMonitor.cpp
UTF-8
3,225
2.53125
3
[]
no_license
// Gaudi #include "GaudiKernel/SystemOfUnits.h" // Kernel/LHCbKernel #include "Kernel/VPChannelID.h" // Local #include "VPDepositMonitor.h" using namespace Gaudi::Units; DECLARE_ALGORITHM_FACTORY(VPDepositMonitor) //============================================================================= // Standard constructor...
true
9eec5593510bb72e9f2b9c5110eff3a17d560586
C++
xrisk/cc2
/Codeforces/anatoly.cpp
UTF-8
923
3.109375
3
[ "Unlicense" ]
permissive
// http://codeforces.com/contest/719/problem/B #include <iostream> #include <algorithm> #include <vector> #include <cstdio> using namespace std; int f1(int len, string s) { int wb = 0, wr = 0; for (int i = 0; i < len; i++) { if (i % 2 == 0 && s[i] == 'b') wb += 1; else if (i % 2 =...
true
23672514b375aecaa65933ed621f29e29fd070da
C++
karolinaWu/leetcode-lintcode
/leetcode/binary_search/154.find_minimum_in_rotated_sorted_array_ii/154.FindMinimuminRotatedSortedArrayII_henrytine.cpp
UTF-8
1,545
3.53125
4
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
// Source : https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/ // Author : henrytine // Date : 2020-07-22 /***************************************************************************************************** * * Suppose an array sorted in ascending order is rotated at some pivot unknown to yo...
true
eccd0173933abf88bb03319551aac125f3497b6b
C++
LeFou-k/RTRenderer
/include/rtweekend.h
UTF-8
1,263
2.9375
3
[]
no_license
#ifndef RTWEEKEND_H #define RTWEEKEND_H //set portable utilizable usings, constants, functions #include <cmath> #include <memory> #include <limits> #include <random> //Common Headers //using using std::shared_ptr; using std::make_shared; using std::sqrt; //constants const double infinity = std::numeric_limits<dou...
true
c540934b227f38b125035351f5ae59298508dd44
C++
Wednesnight/lostengine
/source/lost/fs/Path.cpp
UTF-8
3,314
2.625
3
[ "MIT" ]
permissive
/* Copyright (c) 2011 Tony Kostanjsek, Timo Boll Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
true
e0b78a954f5f4d5cca08d8216241a8a85e5dd7f0
C++
uc4w6c/CompetitiveProgramming
/atcoder/past/20200516_167/d/main.cpp
UTF-8
2,130
2.875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; // D - Teleporter // TODO: 失敗しているからどこかのタイミングでもう一度やりたい int main() { int N; long K; cin >> N >> K; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } vector<int> rated; int nowPoint = 1; for (long i = 1; i <= K; i+...
true
872debfc31e72ccb9216fd18d087dbd00535db87
C++
slayerwalt/LeetCode
/OJ/leet992/leet992.cpp
UTF-8
1,578
3.015625
3
[]
no_license
/* leet992 */ #include <iostream> #include <tuple> #include <vector> #include <queue> #include <stack> #include <string> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <numeric> #include <cassert> #include <functional> #include <uti...
true
8d6e32a8798db7f0d2f36bd412d4b2de1cf064d4
C++
CorpseParty911/CS225TextAdventure
/TheMap.cpp
UTF-8
5,458
2.84375
3
[]
no_license
#include "RPG Game.h" #include <iostream> #include <fstream> #include <string> using namespace std; Item* nothing = (Item*)new Item("", 0, 0, 0); Enemy* nobody = (Enemy*)new Enemy("", 0, 0, 0.0); Enemy* Room::ENEMY_LIST[10] = { nobody,(Enemy*)new Enemy("Vampire Spawn",15,10,0.5),(Enemy*)new Enemy("Vampire",20,...
true
fe713fed4a7db84cb6f149c36f775850e6937b53
C++
camilo1505/Cliente-Servidor
/Matrix/multMatrix.cpp
UTF-8
2,670
3.25
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<malloc.h> #include<time.h> #include<string.h> #include<limits> #include<iostream> using namespace std; const int inf = numeric_limits<int>::max(); void print(float *M, int rows, int cols) { printf("----------MATRIX----------\n"); for(int i=0; i<rows;i++) { ...
true
2725869a4320f40a97fd473da9fac27b46fac56a
C++
dabaldassi/Remote-Shared-Controller
/src/rsclocal_com/message.hpp
UTF-8
3,130
3.046875
3
[]
no_license
#ifndef MESSAGE_H #define MESSAGE_H #include <sstream> #include <vector> #include <tuple> namespace rsclocalcom { class Message { public: enum Command : unsigned { IF, GETIF, GETLIST, SETLIST, ACK, START, STOP, PAUSE, LOAD_SHORTCUT, SAVE_SHORTCUT, CIRCULAR, PASSWD, NA }; enum AckType { OK, ERR...
true
ae0b2506b834717bad7117527b7ef317933f40c6
C++
FRENSIE/FRENSIE
/packages/monte_carlo/manager/src/MonteCarlo_ParticleSimulationManager_def.hpp
UTF-8
27,559
2.703125
3
[ "BSD-3-Clause" ]
permissive
//---------------------------------------------------------------------------// //! //! \file MonteCarlo_ParticleSimulationManager_def.hpp //! \author Alex Robinson //! \brief Particle simulation manager template definitions //! //---------------------------------------------------------------------------// #ifndef...
true
81bffe1401214b437aaf351395745dfb0cba1310
C++
gthparch/sst-core
/stats/basestats.h
UTF-8
2,605
2.671875
3
[]
no_license
// Copyright 2009-2015 Sandia Corporation. Under the terms // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2015, Sandia Corporation // All rights reserved. // // This file is part of the SST software package. For license ...
true
85665bf8d7fd49912e3e2cba2f5a82161b64d971
C++
Azi-824/iai
/iai/MUSIC.hpp
SHIFT_JIS
3,039
3
3
[]
no_license
//MUSIC.hpp //ypNX /* lj@ EtH_At@C}N` Elj̎ނƂɁA񋓌^ɒlj @F퓬ŎgpSEljꍇ @BT_SE_TYPEɒlj EAddgpāASEBGMlj邱Ƃł */ #pragma once //##################### wb_t@Cǂݍ ####################### #include "DxLib.h" #include <string> #include <vector> //##################### }N`Ft@CpXAO ################### #define MUSIC_DIR_SE R"(.\MY_MUSIC...
true
d502bef2a87f7d72cf7ce1ac5c53bfb355ec194f
C++
matias1379/ArduinoVibrador
/CodigosEjemplos/JSON/arrayJson/arrayJson.ino
UTF-8
958
2.953125
3
[]
no_license
#include <ArduinoJson.hpp> #include <ArduinoJson.h> void SerializeArray() { String json; StaticJsonDocument<300> doc; doc.add("B"); doc.add(45); doc.add(2.1728); doc.add(true); serializeJson(doc, json); Serial.println(json); } void DeserializeArray() { String json = "[\"B\",45,...
true
3c4e6dfcddba11488305c0f411fbc30ebc4d0579
C++
bksaiki/MathSolver
/lib/expr/arithmetic.h
UTF-8
1,805
2.9375
3
[]
no_license
#ifndef _MATHSOLVER_ARITHMETIC_EXPR_H_ #define _MATHSOLVER_ARITHMETIC_EXPR_H_ #include "../common/base.h" #include "../expr/expr.h" namespace MathSolver { // Returns true if the node only contains the following: // numbers, constants, variables, // operators: +, -, *, /, % (mod), !, ^ // functions: ex...
true
acee7943fc3f58740d43c3160e7f2f36b0baf04e
C++
NPIPHI/sdf-generator
/src/gfx/texture.cpp
UTF-8
1,633
2.921875
3
[]
no_license
// // Created by 16182 on 7/20/2020. // #include "texture.hpp" #include "../io/io.hpp" GLuint get_BMP(const std::string &file_name) { auto buffer = getFileRaw(file_name); unsigned char * header = buffer.data(); unsigned char * data; unsigned int dataPos; unsigned int imageSize; int width, heig...
true
f5d543911c88997a35ac02688baa0fff70b7e296
C++
btcup/sb-admin
/exams/2559/02204111/2/midterm/2_2_712_5920503513.cpp
UTF-8
251
2.8125
3
[ "MIT" ]
permissive
//5920503513 #include<iostream> #include<cmath> using namespace std; int main() { int a,x,i; cout<<"Enter an integer : "; cin>>a; for(x=0,i=0;x>=1;i++) { x=a/10; } cout<<"Number of digit is "<<i<<endl; system("pause"); return 0; }
true
696455acb6610e5044169b3ecbf9218b529bdd02
C++
xmansyis/CSCI-21-Spring-2014
/Projects/p4/BSTNode.h
UTF-8
2,631
3.859375
4
[]
no_license
/* *Project 4, BSTNode.h * *CHEE YEE XIONG *Date created: 4-29-14 *Last date modified: 5-16-14 */ #pragma once #include <cstdlib> #include <string> #include <iostream> using namespace std; template <typename T> class BSTNode{ public: /* *overloaded constructor, leftChild = NULL, rightChild...
true
033de8e63c1768df6ff652e6687c0f95f29b32a3
C++
jeffamstutz/rfManta
/Core/Math/ipow.h
UTF-8
709
2.515625
3
[ "MIT" ]
permissive
#ifndef Manta_Core_ipow_h #define Manta_Core_ipow_h #include <MantaSSE.h> #include <Core/Math/SSEDefs.h> namespace Manta { inline double ipow(double x, int p) { double result=1; while(p){ if(p&1) result*=x; x*=x; p>>=1; } return result; } inline float ipow(float x, ...
true
aa12a30940a3d5127b3e9412e994d760c5bf276f
C++
pipilove/cpp_workspace
/firstprogram/StoneMerge/StoneMerge/StoneMerge.cpp
GB18030
790
3.328125
3
[]
no_license
/** ԲʯӺϲ */ #include <iostream> using namespace std; int minFuction(); int main(){ int n,i,j,k; cout<<"ʯӶ "; cin>>n; int *stone=new int[n]; cout<<"ʯӵĸ "; for(i=0;i<n;i++) cin>>stone[i]; int **m=new int*[n]; for(i=0;i<n;i++) m[i]=new int[n]; //m[i][j]ʾӴӵijʯӺϲƶ for(i=0;i<n;i++) for...
true
0ade3167d8fba2476f5c924b456d8d8b9dbb7476
C++
jomei/graph_algorithms
/02/acyclicity.cpp
UTF-8
867
3.375
3
[]
no_license
#include <iostream> #include <vector> using std::vector; using std::pair; int step( vector<pair<bool, vector<int>>> &adj, int n) { // std::cout<< "step into " << n + << "\n"; if(adj[n].first) {return 1;} adj[n].first = true; for(int i = 0; i < adj[n].second.size(); ++i) { int r = step(adj, adj[n].second[i...
true
81d38a52fb4ae08d9fc54a331fd88d50443eb0d1
C++
YefersonPerez/proyecto-1er-Parcial
/Codificando.cpp
UTF-8
826
2.90625
3
[]
no_license
#include "Codificando.h" Codificando::Codificando() { } void Codificando::RecibirParametro() { //b= Esto es una prueba para el parcial de programacion I de la Unet. string Inicio="PRUEBA.txt"; string Final="ENTEROS.txt"; ifstream Codigo; ofstream Palabra; char X; int var=1; int var2=1; int numero; Codi...
true
1165f1de32e3959842e02ff864138de771b8bb0a
C++
sjm767/Algobay
/RollingString.cpp
UTF-8
1,280
3.03125
3
[]
no_license
//#include<iostream> //#include<string> //#include<algorithm> //#include<vector> //#include<sstream> // //using namespace std; //string rollingString(string s, vector<string>operations); //int main() //{ // // vector<string> operations; // operations.push_back("0 0 L"); // operations.push_back("2 2 L"); // operations....
true
01bfc769a9ce6efa06d37d0a794f38222af00d03
C++
BackTo2012/homework
/Data_Structure/sequence/sequence.cpp
UTF-8
3,959
3.203125
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstdlib> #include <ctime> using namespace std; const int maxn = 20000; int s[maxn + 10]; int t[maxn + 10]; clock_t runtime, op, ed; void init() { for (int i = 1; i <= maxn ; i++) { s[i] = rand(); t[i] = s[i]; } } // Here is Bubble sort void Bubb...
true
f2a8bb804c2422eeaa536b76858df797a3e46e35
C++
nonanonno/CarND-Extended-Kalman-Filter-Project
/src/kalman_filter.cpp
UTF-8
1,545
2.890625
3
[ "MIT" ]
permissive
#include "kalman_filter.h" #include "tools.h" #include <cmath> #include <iostream> using Eigen::MatrixXd; using Eigen::VectorXd; // Please note that the Eigen library does not initialize // VectorXd or MatrixXd objects with zeros upon creation. void KalmanFilter::Initialize(const Eigen::VectorXd &x, const Eigen::Mat...
true
1524d1a57f6f6174654aec7a059a7c933361a804
C++
xfw5/path-finder
/DepthStencilTarget.cpp
UTF-8
1,508
2.671875
3
[]
no_license
#include "DepthStencilTarget.h" #include "base\ccMacros.h" DepthStencilTarget::DepthStencilTarget() :_id("") , _packed(false) , _depthBuffer(0) , _stencilBuffer(0) , _width(0) , _height(0) { } DepthStencilTarget::~DepthStencilTarget() { if (_depthBuffer) { glDeleteRenderbuffers(1, &_depthBuffer); CHECK_GL_ERROR...
true
ac67d604d65f8c54ffd4f72c7041fb571b301254
C++
arashnh11/Tetrahedra_pack
/Script/tet_script.h
UTF-8
1,430
2.890625
3
[ "MIT" ]
permissive
#include <vector> #include <math.h> using namespace std; int write_basis(){ vector<vector<double> > Base(3, vector<double>(3,0)); for (int i = 0; i <= Base.size() - 1; i++){ Base[i][i] = 1; } for (int j = 0; j <= Base.size() - 1; j++){ for (int i = 0; i <= Base[1].size() - 1; i++){ printf("%8.4f ", Base[j][...
true
c207ddacb582b6e8d24e1e3375373eb268fad9ba
C++
GregVanK/PibbliePums
/Game/PibbliePums/PibbliePums/SoundNode.cpp
UTF-8
439
2.515625
3
[]
no_license
/* *@author: Greg VanKampen *@file: SoundsNode.cpp *@description: A class which contains sounds and its location */ #include "SoundNode.h" #include "SoundPlayer.h" GEX::SoundNode::SoundNode(SoundPlayer & player) :SceneNode(), _sounds(player) { } void GEX::SoundNode::playSound(SoundEffectID sound, sf::Vector2f posi...
true
dede21d208324ba063b1e83c717b6f37beafa976
C++
jbuzzell/cacophony
/lib/Interval.h
UTF-8
1,148
3.171875
3
[ "MIT" ]
permissive
#ifndef INTERVAL_H #define INTERVAL_H #include "Note.h" /* ------------------------------------------------------------------------------------------------ - INTERVAL: a class containing dissonance information for two given notes and methods for - calculating dissonance - - members: - - numerator: the numerator of...
true
036599a055192cf3df82854c4889ebeb9d2256c6
C++
Moumou38/FlappGL_Monia
/include/Cube.hpp
UTF-8
5,691
3.015625
3
[]
no_license
#pragma once #include <vector> #include <GL/glew.h> #include <Vertex.hpp> class Cube { private: unsigned int m_verticesCount; GLuint m_VAO; std::vector<Vertex> m_vertices; Cube(const Cube& cube); GLuint m_VBO[2]; Cube& operator=(const Cube& cube); public: Cube(){ } void initVertices(){ // Bot...
true
66d0ff60bf8545865a95063fdbad930cf6087d55
C++
hamzaig/cplusplus
/Calculator.cpp
UTF-8
181
3.078125
3
[]
no_license
#include <iostream> using namespace std; int main() { int x,y,z,sum; cout<<"Enter First Second And Third Number\n"; cin>>x>>y>>z; sum=x+y+z; cout<<"Your Answer Is: "<<sum; }
true
60982a621e997c16ce90fd388a941b675bf379c7
C++
Jvanrhijn/hopscotch
/lib/game/tile.h
UTF-8
966
2.75
3
[]
no_license
// // Created by Guthorak on 10/22/18. // #ifndef __PIE_SRC_TILE_H #define __PIE_SRC_TILE_H #include <utility> #include <vector> #include <memory> #include "optional.h" #include "renderer/drawable.h" namespace pie { //! Class representing a single Tile on the game board class Tile { public: Tile(size_t row, siz...
true
b314ee9a27afa85e21f0a0bac07c75b25b93b73f
C++
WeakBoss/hello-world
/Clock.cpp
GB18030
2,129
3
3
[]
no_license
#include <iostream> #include <windows.h> #include <time.h> #include <conio.h> using namespace std; class Clock { public: Clock(int h, int m, int s); Clock(); ~Clock() {}; void tick(); void show(); void adjust(); void alarm(); void system(); void rang(); private: time_t timep; time_t timea; bool is_alarm; b...
true
255e2e5a5c20d9796390887cc4d35bcd893a0299
C++
basimkhajwal/ProgrammingChallenges
/Code Forces/0982/b.cpp
UTF-8
864
2.546875
3
[]
no_license
#include <cstdio> #include <algorithm> #include <set> using namespace std; #define MAXN 210000 int N; pair<int,int> W[MAXN]; set<pair<int, int> > empty, ones; int main() { scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d", &W[i].first); W[i].second = i+1; } empty = s...
true
fb409908603f81445edeea9807fb7f3570169e86
C++
GuanqunGe/Cpp-Primer_Exercise
/Chapter_15/ex_15_37/Query_base.h
UTF-8
687
2.703125
3
[]
no_license
#ifndef QUERY_BASE #define QUERY_BASE #include "TextQuery.h" #include "QueryResult.h" #include <string> class Query_base{ // don't know why we need a friend class Query // --> so that we can call the virtual rep() function and destructor of Query_base class through Query. // but why isn't Query also frie...
true
36d58f869a1ff97dd5840f25c195b31c63baaff7
C++
SergeyLebedkin/VulkanPlayground
/build/msvs2017/apps/vulkan_glfw_app/vulkan_loaders.cpp
UTF-8
1,566
2.828125
3
[ "MIT" ]
permissive
#include "vulkan_loaders.hpp" #include <algorithm> #include <string> #define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_WRITE_IMPLEMENTATION #pragma warning(push) #pragma warning(disable: 4996) #include <stb_image.h> #include <stb_image_write.h> #pragma warning(pop) // createImageProcedural void createImageProcedural...
true
68bf12fcef4b08ee749592cc5985e517cf5e243e
C++
pastly/yaps-cli
/Database.h
UTF-8
1,018
3.078125
3
[]
no_license
#ifndef DATABASE_H #define DATABASE_H #include "Tree.h" #include "Entry.h" #include "FileIO.h" #include <string> class Database { private: //std::string m_name; std::string m_path; std::string m_password; // may not be needed, not sure Tree<Entry> m_entries; public: void setName(std::string name) {...
true
ba0ccb0b40a27d9cb22699ae687127a0a96e9233
C++
benbraide/ewin
/ewin/ewin/drawing/com_native.h
UTF-8
1,898
3.0625
3
[ "MIT" ]
permissive
#pragma once #ifndef EWIN_COM_NATIVE_H #define EWIN_COM_NATIVE_H #include "../common/boolean_property.h" #include "../common/object_property.h" namespace ewin::drawing{ template <class native_type> class com_native{ public: typedef native_type native_type; struct create_info{}; com_native() : native_(n...
true
d1082e74c7b49d6a299a1a781296554681054094
C++
mukuld/cpp
/alphabet.cpp
UTF-8
182
3.109375
3
[]
no_license
#include <stdio.h> int main(void) { //Loop to print the alphabets in capitals for (char i = 30; i < 127; i++) printf("%c ", i); char endline = '\n'; printf("%c", endline); }
true
682fc97f48139e5d6a1ed2e50b410b30d65dcb14
C++
BGMer7/LeetCode
/33. Search in Rotated Sorted Array/search.cpp
UTF-8
2,064
3.75
4
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; class Solution { public: int search(vector<int> &nums, int target) { // nums = { 4,1,2,3 }; int size = nums.size(); if (size == 0) return -1; if (size == 1 && nums[0] != target) return -1; else if (size == 1 && nums[0] ==...
true
6d73210cc523cde436de6ec60ac88687ebc43dfb
C++
TWA2Jerry/PCS
/Problems/Moocast.cpp
UTF-8
1,057
2.734375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main(void){ int num_cows; scanf("%d", &num_cows); vector <tuple<int, int, int>> cows_vector; queue <int> q; bool visited[num_cows]; for(int i = 0; i<num_cows; i++){ int x,y,p; scanf("%d %d %d", &x, &y, &p); cows_vector.push_back({x,y,p}); visited[i] ...
true
a3cae87a4b470aed7dc33d9423f5120a25dcb4c0
C++
ankushgarg1998/Competitive_Coding
/contests/codechef-contests/LTIME54/second.cpp
UTF-8
1,286
3
3
[]
no_license
#include <iostream> #include<cmath> #include<vector> using namespace std; int main() { int t; long int X, Y, M, i; cin>>t; while(t--) { cin>>M>>X>>Y; if(X == 0) { cout<< (M^(M-1)) <<"\n"; continue; } vector<long int> A(M...
true
0f4d488aaadda869197d77fabf03cc9ee8647849
C++
microsoft/onnxruntime-openenclave
/samples/c_cxx/imagenet/local_filesystem_win.cc
UTF-8
2,396
2.703125
3
[ "MIT" ]
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "local_filesystem.h" #include <assert.h> #include <mutex> static std::mutex m; void ReadFileAsString(const ORTCHAR_T* fname, void*& p, size_t& len) { if (!fname) { throw std::runtime_error("ReadFileAsString...
true
eba7d514fdb4402c9a3f7aca066e186bf165daa9
C++
lmd-luxoft/labwork-MaximWeingarten
/qt-03-containers-and-qstring/main.cpp
UTF-8
2,047
3.53125
4
[]
no_license
#include <QCoreApplication> #include <QDebug> #include <QStack> int main(int argc, char *argv[]) { QList<QString> names; names << "Mary" << "Ann" << "Charlynn" << "Marylynn" << "Margaret" << "Kate" << "Rose" << "Gwendolyn"; // TODO: using Java-style iterators print the longest name from the list...
true
31d138e22cb6869b844f1da1946574aa59730a72
C++
rahulr56/OpenMP
/OpenMP_examples/OpenMP_Course/intergal.cpp
UTF-8
298
2.875
3
[]
no_license
#include <iostream> static long num_steps =100000; double step; int main() { int i; double x,pi,sum=0.0; step = 1.0/(double)num_steps; for (i=0; i<num_steps;i++) { x=(i+0.5)*step; sum += 4.0/(1.0+x*x); } pi = step * sum; std::cout<<pi<<std::endl; }
true
7ba4a3526c8f187f0fb9e3b9dc5fabfdf8e1e8af
C++
MRdoulestar/userAVL
/dog4u.h
UTF-8
2,313
2.78125
3
[ "MIT" ]
permissive
//@author //Xingxin YU #include<iostream> #include<string.h> #include<cstring> #include<vector> #include<unistd.h> #include<cstring> #include<sys/socket.h> #include<netinet/in.h> #include<arpa/inet.h> #include<stdio.h> #include<stdlib.h> #define USER_FILE "user.txt" //工具类 class Utils { public: static std::vecto...
true
ffaf6871fdcea4988be0b113104a5c65a4e7ac9d
C++
jfhamlin/perry
/Romulus/Source/Resource/SphereGeometryProvider.cpp
UTF-8
6,101
2.734375
3
[]
no_license
#include "Math/Constants.h" #include "Math/Vector.h" #include "Math/Bounds/BoundingVolumes.h" #include "Resource/SphereGeometryProvider.h" #include "Render/SimpleGeometryChunk.h" #include <boost/scoped_array.hpp> #include <cmath> namespace romulus { using math::Pi; using math::Vector2; using math::Vector3; IMPLEMENT...
true
eb2a9a7fe3ec0d69f8de80356791a10f5d556004
C++
mzry1992/workspace
/OJ/sgu/500_gen.cpp
UTF-8
2,230
2.859375
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; const double eps = 1e-8; struct Point { double x,y; Point(){} Point(double _x,double _y) { x = _x; y = _y; } Point operator -(const Point& b)const { return Point(x-b.x,y-b.y); } double op...
true