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
8f464b713a60aab24fdd56c4969f571cc7e8d762
C++
4nc3str4l/CrisIGuillem
/Grafics/p0/Poligons/circle.cpp
UTF-8
232
2.890625
3
[]
no_license
#include "circle.h" Circle::Circle() { } Circle::Circle(double r): radius(r) { } Circle::~Circle() { } double Circle::getPerimeter() { return 2*M_PI*radius; } void Circle::setRadius(double r) { this->radius = r; }
true
c6a456c1e2d25550dfd938254466bde793554101
C++
ArduinoMeetsZXSpectrum/ZX-Modern-Controller-Interface
/KeyboardMapping.h
UTF-8
701
2.609375
3
[]
no_license
/* * KeyboardMapping.h * * Created on: 11. 8. 2017 * Author: aluchava */ #ifndef KEYBOARDMAPPING_H_ #define KEYBOARDMAPPING_H_ #include <stdint.h> class KeyboardMapping { private: uint8_t keyUp; uint8_t keyDown; uint8_t keyLeft; uint8_t keyRight; uint8_t keyFire1; uint8_t ...
true
5263e732bbdc60dd588f811ae1eab65ddd8253aa
C++
alexfordc/Quan
/StockAnalysis/StockAnlysis/ema.cpp
UTF-8
381
2.71875
3
[]
no_license
#include "StdAfx.h" #include "ema.h" EMA::EMA(int cycle) :cycle_(cycle) { } EMA::~EMA(void) { } void EMA::Calculate(const double value) { if (items_.empty()) { items_.push_back(value); return; } double d = (2 * value + (cycle_ - 1) * items_[items_.size()-1]) / (cycle_ + 1); items_.push_back(d); } double...
true
e08f12a4eb2f139dc5a1b23642a338fb7df1909e
C++
andmcgregor/project_euler
/020.cpp
UTF-8
644
3.359375
3
[]
no_license
#include <stdio.h> #include <vector> int factorial_sum(int num) { std::vector<int> bignum = { num }; int sum = 0, remainder = 0; for (int i = num - 1; i > 0; i--) { for (int j = bignum.size() - 1; j >= 0; j--) { bignum[j] *= i; bignum[j] += remainder; remainder = bignum[j] / 10; ...
true
1904b0b17904b87365b19030aa3985fbe6d92849
C++
DyingBunny/C-Plus-Plus
/课堂代码/Person.h
UTF-8
161
2.609375
3
[]
no_license
#pragma once class Person { void SetPersonInfo(char* name, char* gender, int age); void PrintPersonInfo(); char _name[20]; char _gender[3]; int _age; };
true
cec8073dc9be1ac679a93f19fee49362fb363cbf
C++
Suqu13/ZMPO_Lab
/List_Live/CPunkt.cpp
UTF-8
728
3.5
4
[]
no_license
// // Created by Jakub on 22.11.2018. // #include <sstream> #include "CPunkt.h" CPunkt::CPunkt(int x, int y) { this->x = new int(x); this->y = new int(y); } CPunkt::CPunkt(CPunkt &pcOther) { x = new int(); y = new int(); *x = *(pcOther.x); *y = *(pcOther.y); } CPunkt::~CPunkt() { delete ...
true
8b150cfe5b2b43bc926309649ca6cb5f6692d91c
C++
Tachone/AVL
/Lend/UserInfo.cpp
GB18030
787
3.375
3
[]
no_license
#include "UserInfo.h" //ֹ캯ʵ UserInfo::UserInfo(string name, string pass) { username = name; password = "123456"; } UserInfo::UserInfo(string name) { username = name; password = "123456"; } UserInfo::UserInfo(const UserInfo &b)//ƹ캯 { username = b.username; password = b.password; } // bool operator <(const UserIn...
true
c171538d3a3d9347483e40a93aeada6a4776b088
C++
esalagran/practicaPro2
/Cjt_Clusters.cc
UTF-8
3,073
2.640625
3
[]
no_license
#include "Cjt_Clusters.hh" #include "Taula_de_distancies.hh" #include <iostream> using namespace std; Cjt_Clusters::Cjt_Clusters() { Arbre = map<string, BinTree< pair<string, double>>>(); } void Cjt_Clusters::ejecutar_paso_wpgma() { pair<string,string> id_minims = Taula_Clusters.dist_min(); string nou_cl...
true
86aa194cd2c6e924b03697862e58ec032ba44759
C++
Fraguinha/BSc
/CG/Projecto/src/game.cpp
UTF-8
10,092
2.671875
3
[ "MIT" ]
permissive
#include "game.hpp" // ----------------------------------------------------------------------------- // Private methods void Game::processInput(Window *window, Pacman *pacman) { if (Game::state == active) { if (glfwGetKey(window->getWindow(), GLFW_KEY_W) == GLFW_PRESS || glfwGetKey(window->getWindow(), ...
true
e1cf693cab9717e8ae58e13568c8f42c3183ba37
C++
Rorenzuru/group-13-lab-3
/Generator.cc
UTF-8
1,683
2.609375
3
[]
no_license
#include <stdio.h> #include <string.h> #include <omnetpp.h> using namespace omnetpp; class Generator : public cSimpleModule { private: cPacket *packet; cMessage *event; int generated; protected: // The following redefined virtual function holds the algorithm. virtual void initialize() override; ...
true
6c7c2fd5eda4440008a495c6f0cb96b3acd2198e
C++
anyWareSculpture/physical
/arduino/Test sketches/HandshakeTester/LEDStrip.h
UTF-8
2,969
2.96875
3
[ "MIT" ]
permissive
#ifndef LEDSTRIP_H_ #define LEDSTRIP_H_ #include "Pixel.h" #include "AnywareEasing.h" #include "./FastLED.h" struct Pair { Pair(uint8_t stripid = -1, uint8_t pixelid = -1) : stripid(stripid), pixelid(pixelid) {} int8_t stripid; int8_t pixelid; }; class LEDStripInterface { public: LEDStripInterface(uint8_t nu...
true
714468583b727f380ffa02fb5d654b2ae4f237c4
C++
mbradber/tc_solutions
/574/TheNumberGameDiv2.cpp
UTF-8
3,848
3.265625
3
[]
no_license
#include <cstdio> #include <cmath> #include <cstring> #include <ctime> #include <iostream> #include <algorithm> #include <set> #include <vector> #include <sstream> #include <typeinfo> #include <climits> using namespace std; int Reverse(int op){ int reverse = 0; for(; op != 0 ;) { reverse = re...
true
e1456bc4ef6ed36f1708abc74ed76d8b42693983
C++
RobbeDGreef/ASWJ
/src/stlparser/stlparser.cpp
UTF-8
4,424
2.796875
3
[ "MIT" ]
permissive
#include <stlparser/stlparser.h> StlParser::StlParser(std::string file) { m_stlfile.open(file, std::ios::binary); LOG("Opened file " << file); } StlParser::~StlParser() { m_stlfile.close(); } void StlParser::parse() { LOG("parsing file"); // The first 80 bytes are a unimportant ascii, however ...
true
5f48db11f92036888814624a81ff2e6e3389b064
C++
TXC4/DataStructuresHash
/DataStructuresHash/myStack.h
UTF-8
329
3.046875
3
[]
no_license
#pragma once #include <string> struct stackNode { stackNode* next; stackNode* previous; std::string data; }; class myStack { private: stackNode* head = new stackNode; stackNode* top; public: myStack() { top = head; } void push(std::string); void pop(); stackNode* getTop(); bool isEmpty(); void pr...
true
2ce08d7777e200746ae1d65f3ee67dba9b868403
C++
yanohitoshi/test
/Action/LandingEffectManeger.cpp
SHIFT_JIS
1,751
2.59375
3
[]
no_license
#include "LandingEffectManeger.h" #include "LandingEffect.h" #include "PlayerObject.h" LandingEffectManeger::LandingEffectManeger(GameObject* _owner) : GameObject(false, Tag::PARTICLE) { particleState = ParticleState::PARTICLE_DISABLE; owner = _owner; position = Vector3(0.0f, 0.0f, 0.0f); ChackOnFlag = false; tm...
true
889748364176f19125485dc94778f6973f24e963
C++
carllinley/3D-Model-Viewer
/Light.cpp
UTF-8
151
2.5625
3
[]
no_license
#include "Light.h" void Light::setPosition(Vector3 & position) { this->position.set(position); } Vector3& Light::getPosition() { return position; }
true
3a3c3e99da6c7e6d5f2310fc491ca79b13c99ee7
C++
ToruTakefusa/AtCoder
/ABC090/B/main.cpp
UTF-8
482
3.703125
4
[]
no_license
#include <iostream> using namespace std; bool isPalindromic(string s); int main() { int a, b; cin >> a >> b; int count = 0; for (int i = a; i <= b; ++i) { if (isPalindromic(to_string(i))) { ++count; } } cout << count << endl; return 0; } bool isPalindromic(stri...
true
3002e54dd9bd8138fbcb54187e1010eca6717cb3
C++
tom-fougere/Projets
/Tools/sources/colorOperation.cpp
UTF-8
2,375
2.859375
3
[]
no_license
#include "../colorOperation.h" #include <iostream> #include <math.h> using namespace std; void rgb2hsv(int R, int G, int B, int &H, int &S, int &V){ int RGB[3]; RGB[RED] = R; RGB[GREEN] = G; RGB[BLUE] = B; float HSV[3]; rgb2hsv(RGB, HSV); H = (int)HSV[HUE]; S = (int)round(HSV[SAT]*10...
true
3f3c766e9b709453c7bc94ccb3cc9055ef6d453f
C++
frouioui/plazza
/tests/test_Kitchen_CookBook.cpp
UTF-8
2,792
2.890625
3
[]
no_license
/* ** EPITECH PROJECT, 2017 ** Test_criterion ** File description: ** Test de CookBook */ #include <criterion/criterion.h> #include <criterion/redirect.h> #include "Kitchen/CookBook.hpp" #include "Kitchen/Error.hpp" #include <iostream> TestSuite(Kitchen_CookBook, .init = NULL, .fini = NULL, .signal = 0, .exit_code = ...
true
71a8b648fff7f9d3f7a875be2051c9245a5d72e6
C++
Matix426/gitrepo
/cpp/petla_5.cpp
UTF-8
191
2.6875
3
[]
no_license
/* * petla_5.cpp */ #include <iostream> using namespace std; int main(int argc, char **argv) { int x; cin>>x; for (int i=0;i <=x;i++) cout <<i*i<<endl; return 0; }
true
bb3247c131de1e3a5978d733696d584940dd163c
C++
supertask/icpc
/atcoder/003/b.cpp
UTF-8
431
2.75
3
[]
no_license
#include<iostream> #include<map> #include<vector> #include<algorithm> #define REP(i,p,n) for(int i=p;i<(int)(n);i++) #define rep(i,n) REP(i,0,n) #define all(c) (c).begin(), (c).end() using namespace std; int main() { int n; cin >> n; vector<string> words(n); rep(i,n) { cin >> words[i]; reverse(all(words[i...
true
ad3103033bb35dafb1d0955540f9ef2d0a6c47b1
C++
ryantherileyman/riley-colon-case
/src/test/r3/colon-case/level-data/GameMapTests/GameMapTests-main.cpp
UTF-8
8,859
2.578125
3
[]
no_license
#include <assert.h> #include <iostream> #include <r3/colon-case/level-data/r3-colonCase-levelDefn.hpp> #include <r3/colon-case/level-data/r3-colonCase-GameMap.hpp> using namespace r3::colonCase; GameTileImageDefn createAtlasTileImageDefn(int x, int y) { GameTileImageDefn result; result.tileId = y * 4 + x; result....
true
9ca069baa63695a5df2dbf7be3a976939be9bcee
C++
krazychase/SchoolStuff
/CS2/Xtra1/Xtra1/Xtra1.cpp
UTF-8
1,652
3.125
3
[]
no_license
//Chase Brown //Xtra Credit 1 #include <fstream> #include <iostream> #include <iomanip> #include <string> using namespace std; const int maxlist = 50; struct listtype { string last, first; int id; }; void createlist(listtype l[], int &numlist) { int i; for (i = 0; i < maxlist-1; i++) { l[i].last = "NoLast"; l[...
true
1693b06cefa975fc28aa49735c6cbd99d3f1d4b9
C++
hitwlh/leetcode
/200_Number_of_Islands/solution.cpp
UTF-8
1,179
3.109375
3
[]
no_license
class Solution { public: int numIslands(vector<vector<char>>& grid) { if(grid.empty()) return 0; my_grid = grid; int ret = 0; for(int i = 0; i < my_grid.size(); i++){ for(int j = 0; j < my_grid[i].size(); j++){ if(my_grid[i][j] == '1'){ ...
true
7e5a8caf53b97b6139544d58f23191d80df96bc0
C++
RicardoAltamiranoSanchez/C-_Programas
/fecha con asignacion dinamica.cpp
ISO-8859-10
1,044
3.546875
4
[]
no_license
#include<iostream> #include <windows.h> using namespace std; class dianio{ private: int dia,mes; public: dianio(int,int); bool igual(dianio&); void visualizar(); }; dianio::dianio(int _d,int _m) { dia=_d; mes=_m; } bool dianio::igual(dianio &n) { if(dia==n.dia && mes==n.mes) { return true; } else { retu...
true
e2c4448afec8a8c68773564a06b628f944e6acdc
C++
wuxin20/my_git
/C++/vector/vector/test.cpp
UTF-8
1,048
3.390625
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS 1 #if 0 #include <iostream> #include <vector> using namespace std; int main() { std::vector<int> v1; vector<int> v2(10, 5); int array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; vector<int> v3(array, array + sizeof(array) / sizeof(int)); vector<int> v4(v3); return 0; } #endif #i...
true
75bbb07f22b2073a61eaf6e01c55d7906916bafc
C++
adishavit/mesh
/IsenburgStreamingMesh/OOC/psreader_dist/src/littlecache.h
UTF-8
1,798
3.09375
3
[]
no_license
/* =============================================================================== FILE: littlecache.h CONTENTS: PROGRAMMERS: martin isenburg@cs.unc.edu COPYRIGHT: copyright (C) 2003 martin isenburg@cs.unc.edu This software is distributed in the hope that it will be useful, but WITHOUT...
true
51a87e4158204e270698b1630b73d6ddc5f42bf7
C++
booknu/PS_Relative
/Books/C++프로그래밍/Chapter 13/OOP_NormalAccount.h
UHC
494
2.515625
3
[]
no_license
/************ <ּ> : p553 - OOP Ʈ 10ܰ ********** <ذ> : Entity Ŭ ּ ڸ ϴ ********** <Ʈ> : */ #ifndef __NORMAL_ACCOUNT_H__ #define __NORMAL_ACCOUNT_H__ #include "OOP_Account.h" class NormalAccount : public Account { private: int interest; public: NormalAccount(int accID, String name, int money, int interest); v...
true
45e185075a5860dfb72a51205e9311486b7e07b9
C++
Andrey-Uvarov/the-riddle-of-jacques-fresco-when-Obeme
/main.cpp
WINDOWS-1251
4,510
3.765625
4
[]
no_license
#include<iostream> #include<time.h> using namespace std; /* int main() { srand(time(NULL)); const int size = 10; int arr[size]; // for (int i = 0; i < size; i++) { arr[i] = rand() % 20; arr[i] = arr[i] - 10; } // for (int i = 0; i < size; i++) { cout << arr[i] << " "; } cout << endl; int sum1 ...
true
d4ea2db86290dbeed0c837807e43db76e7ce64e9
C++
TaIos/text_rpg
/src/Item.h
UTF-8
828
3.03125
3
[]
no_license
#ifndef GAMEBOOK_ITEM_H #define GAMEBOOK_ITEM_H #include <iostream> #include <string> #include "Display.h" #include "Equipment.h" #include "HeroStats.h" class CItem { public: CItem() = default; CItem(int id, int gold, std::string text) : itemID(id), price(gold), name(text) {} ...
true
66218bff6293f68b5037c9cf7234eda90b465c6f
C++
hzh0/LeetCode
/350. 两个数组的交集 II.cpp
UTF-8
347
2.640625
3
[]
no_license
class Solution { public: vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { vector<int> ans; map<int, int> m; for (auto& i : nums1) m[i]++; for (auto& i : nums2) { if (m[i]) { ans.push_back(i); m[i]--; } } ...
true
385fb8428bb54b93769857d7abb878f0471783f7
C++
6uclz1/idd_medilab15
/example/21_particleStartpoint/src/ParticleVec2.cpp
UTF-8
961
2.9375
3
[ "MIT" ]
permissive
#include "ParticleVec2.h" ParticleVec2::ParticleVec2(){ position.set(ofGetWidth()/2.0, ofGetHeight()/2.0); velocity.set(0, 0); acceleration.set(0, 0); mass = 1.0; radius = 5.0; friction = 0.01; } void ParticleVec2::update(){ acceleration -= velocity * friction; velocity += acceleration...
true
03ad5c69c376c1e120ec01e167205c7a0f312c88
C++
kukaro/KamangBlogData
/ZZZ-MyStudy/question/DynamicProgramming/11057/main.cpp
UTF-8
740
2.984375
3
[]
no_license
#include <iostream> #include <vector> #define MAXSIZE 1005 using namespace std; int N; vector<vector<int>> memo(MAXSIZE, vector<int>(10, -1)); int f(int n, int start) { int sum_val = 0; if (n == 1) { return 1; } for (int i = start; i < 10; i++) { if (memo[n - 1][i] == -...
true
afe9beaf6fa9ef24008f72f2105a673fdc116e1f
C++
opencor/llvmclang
/tools/clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp
UTF-8
4,605
3.171875
3
[ "Apache-2.0", "LLVM-exception", "NCSA" ]
permissive
// RUN: %clang_cc1 -std=c++1z -verify %s // RUN: %clang_cc1 -std=c++1z -verify %s -DUNDEFINED #ifdef UNDEFINED // "used but not defined" errors don't get produced if we have more interesting // errors. namespace std_example { template <typename T, typename... Rest> void g(T &&p, Rest &&... rs) { // use p if ...
true
fa5829e922376225635e92ece990db25d058f165
C++
Roger-Chuh/plane-sweeping-stereo
/stereo.cpp
UTF-8
9,987
3.171875
3
[ "BSD-3-Clause" ]
permissive
/*cpp file that has the definitions for the function in epipoles.h Author: Sasidharan Mahalingam Date Created: March 10 2018 */ #include "stereo.h" /*Function that scales the translation vectors Usage: Parameters: R_list: vector of matrices that contains all the rotation matrices t_list: vector of matrices that conta...
true
030edee4fb96a9b4fc2069e04de42533ae83d8c2
C++
isliulin/jashliao_VC
/001_C++基本觀念/29_VC_組合語言/test/test.cpp
BIG5
261
2.65625
3
[]
no_license
#include <iostream> using namespace std; //CyB~W[ܼƱN2ܼƭȤ! void main() { float a=9.004, b=-28.5; //@k... for int or float _asm { push a push b pop a pop b} cout<< a <<" "<<b<<"\n"; }
true
dd2ea15794c16da1b3f862b75c5ee0f3925d2366
C++
EijiSugiura/TinyLecture
/cplusplus/main2.cc
UTF-8
753
3.09375
3
[]
no_license
#include <iostream> #include <iterator> #include <vector> #include <algorithm> #include <regex> #include <boost/filesystem.hpp> #include <boost/range/algorithm.hpp> using namespace std; using namespace boost::filesystem; void dump(vector<path>& v) { for_each(begin(v),end(v),[](path &x){ cout << x << endl; }); } in...
true
2b118c998959d5bb9cd1665faa709b8bc8f45945
C++
ybai62868/BlackMa_Learning
/P117/main.cpp
UTF-8
890
2.640625
3
[]
no_license
/* * @Author: your name * @Date: 2020-02-18 15:27:53 * @LastEditTime: 2020-02-18 15:27:53 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /glow/Users/apple/Desktop/BlackMa_Learning/P117/main.cpp */ /* * @Author: your name * @Date: 2020-02-18 15:27:53 * @LastEditTime: ...
true
692df8bedd3899cab9209f730c9d1ae263e38825
C++
linuxaged/BansheeEngine
/Source/BansheeEditor/Include/BsEditorWidget.h
UTF-8
7,468
2.625
3
[]
no_license
//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************// #pragma once #include "BsEditorPrerequisites.h" #include "BsEdit...
true
2d571a7b5de03322075845ff721f9bc81965f8a6
C++
OpenLocalizationTestOrg/ECMA2YamlTestRepo2
/fulldocset/add/codesnippet/CPP/p-system.windows.forms.r_23_1.cpp
UTF-8
908
2.65625
3
[ "CC-BY-4.0", "MIT" ]
permissive
private: void WriteIndentedTextToRichTextBox() { // Clear all text from the RichTextBox; richTextBox1->Clear(); // Specify a 20 pixel indent in all paragraphs. richTextBox1->SelectionIndent = 20; // Set the font for the text. richTextBox1->Font = gcnew System::Drawing::Font( ...
true
d45789302259633dc0bb2834283bdd37f1f036fd
C++
CreoValis/MiniWebSrv
/MiniWebSrv/HTTP/IResponse.h
UTF-8
1,391
2.734375
3
[ "MIT" ]
permissive
#pragma once #include <boost/asio/spawn.hpp> #include "Common.h" #include "Header.h" namespace HTTP { class ConnectionBase; /**Base class for response reader classes.*/ class IResponse { public: virtual ~IResponse() { } virtual unsigned int GetExtraHeaderCount() { return 0; } virtual bool GetExtraHeader(unsign...
true
a20048e0928a743c6e51f2f22e3737f4af37a6f2
C++
songgaoxian/NumericalMethods
/MTH9821/MonteCarlo/MonteCarlo/MonteCarlo/MCBasketOption.hpp
UTF-8
3,911
2.640625
3
[]
no_license
//implement BasketOption pricing using Monte Carlo Simulation #ifndef MCBasketOption_HPP #define MCBasketOption_HPP #include "MonteCarlo.hpp" #include<cmath> class MCBasketOption : public MonteCarlo { protected: std::tuple<double, double,double> stock2; double rho; public: MCBasketOption(long size_, s...
true
4587f056a713a4647247e9090a63aa2720faf921
C++
pianista215/arduinoexamples
/project3/project3.ino
UTF-8
1,287
3.046875
3
[]
no_license
const int sensorPin = A0; const float baseLineTemp = 26.5; void setup() { Serial.begin(9600); for(int pinNumber = 2; pinNumber < 5 ; pinNumber++){ pinMode(pinNumber, OUTPUT); digitalWrite(pinNumber, LOW); } } void loop() { // put your main code here, to run repeatedly: int sensorVal = analogR...
true
1aec1677ab6546596a04b04bb821bc5938eeaac8
C++
ftanvir/Bit-Manipulation-Basic
/XxOoRr.cpp
UTF-8
640
2.65625
3
[]
no_license
/* Codechef July Long Challenge 2021 problem problem link: https://www.codechef.com/JULY21C/problems/XXOORR */ #include <bits/stdc++.h> using namespace std; void solve() { int n, k; cin>>n>>k; vector<int>arr(n); for(int i=0; i<n; i++) { cin>>arr[i]; } int ans =0; for(int i =0; i<32;...
true
3b994da8b539b8e390c55bc663021c4262be0eed
C++
robotics-upo/siar_packages
/localization_siar/functions/include/functions/RealVector.h
UTF-8
4,591
3.46875
3
[]
no_license
#ifndef __REAL_VECTOR_H__ #define __REAL_VECTOR_H__ #include <string> #include <sstream> #include <cmath> #include <iostream> #include <vector> /** @brief 3D Point structure and operators */ #include "Point3D.h" namespace functions { class RealVector:public std::vector<double> { protected: //! init wit...
true
497dd3f9cdb7453070cf3f7aca53d1865326865a
C++
TurbulentRice/stack-searching-sorting
/StackModel.h
UTF-8
6,819
3.765625
4
[]
no_license
// // StackModel.h // TemplateLibrary // // Created by Sean Russell on 4/5/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #ifndef TemplateLibrary_StackModel_h #define TemplateLibrary_StackModel_h using namespace std; // vector stack template <typename Type> class stack { Type* container...
true
08de41596108d7d5980d42b4f046d84a2294e324
C++
VinInn/ctest
/vecfunBench/hex.cc
UTF-8
950
2.796875
3
[]
no_license
union hexdouble { double d; struct { unsigned long long mant:52; unsigned int exp:11; unsigned int sign:1; } s; }; inline void d2hex(double x, unsigned long long & mant, int & e) { hexdouble h; h.d=x; mant = h.s.mant; e = h.s.exp-1023; } inline void hex2d(double & x, unsigned long long mant, in...
true
1a6707314c2c66af896ba9fba9d1d33a5d858974
C++
mangalaman93/netlib
/examples/lserver.cpp
UTF-8
669
2.734375
3
[]
no_license
/* written by Aman Mangal <mangalaman93@gmail.com> * on Oct 28, 2014 * server to test large number of connections */ #include "base_network.h" const int PORT = 8000; BaseNetwork *rnet; void receive_handler(std::string address, unsigned port, const std::vector<unsigned char>& data, uint64_t re...
true
0a346abc645dead6dd5530d52201221c9ee69c47
C++
nsq974487195/DPTree-code
/misc/ARTOLC/ARTOLC.hpp
UTF-8
4,846
2.59375
3
[ "MIT" ]
permissive
#pragma once #include "Tree.h" #include "index_key.h" template <typename KeyType> class ArtOLCIndex { public: ~ArtOLCIndex() { delete idx; } static void setKey(Key &k, uint64_t key) { k.setInt(key); } static void setKey(Key &k, GenericKey<31> key) { k.set(key.data, 31); } template<typename F> ...
true
dc4c703d2660111b43132da1eeab23a0e15b1faa
C++
PathogenDavid/trdrop
/trdrop_c/trdrop_c/Tasks.h
UTF-8
1,293
2.515625
3
[ "MIT" ]
permissive
#pragma once #ifndef TRDROP_TASKS_H #define TRDROP_TASKS_H #include <functional> #include <opencv2/core.hpp> namespace trdrop { namespace tasks { // preprocessing task which gets // * the previous frame // * the current frame // * the frame index // * the video index to access the respective configuratio...
true
b80a31d14085eb6f602ce4763f35ce2f4cabcc77
C++
lizhiwill/LeetCodeStudy
/算法/1046_最后一块石头的重量/Solution02.cpp
UTF-8
1,001
2.984375
3
[]
no_license
class Solution { public: int lastStoneWeight(vector<int>& stones) { priority_queue<int> pqi; int maxdata1 = 0; int maxdata2 = 0; int i = 0; for(i = 0;i<stones.size();i++) { pqi.push(stones[i]); ...
true
0e20b4a96222a6ca3c4b5631def6b591ec4c7e5f
C++
WhiZTiM/coliru
/Archive2/26/4c6bec14143bd3/main.cpp
UTF-8
15,649
3.203125
3
[]
no_license
#include <type_traits> #include <utility> #include <iterator> #include <cstdint> #include <functional> #include <algorithm> #include <iostream> #include <vector> #define sgi_assert(cond) ((void)0) namespace sgi { namespace detail { template<typename T> struct remove_cvr : std::remove_cv<std::remove_reference_t<...
true
1e27d17ddba422367c809d6a5d7b86427e079c49
C++
jurses/p2cya
/word.cpp
UTF-8
1,795
3.578125
4
[]
no_license
#include "word.hpp" #include <iostream> namespace CYA{ Word::Word(){ word_.resize(0); empty_ = true; } Word::Word(const Alphabet& A) { alphabet_ = A; } Word::Word(char c){ if(c == '&') empty_ = true; word_.push_back(c); } Word::Word(const std::string& ws){ word_ = ws; empty_ = false; } W...
true
801c359a05999ec1520c7a0c814f7e9183abb117
C++
Stephen1993/ACM-code
/hdu1236.cpp
UTF-8
882
2.734375
3
[]
no_license
#include<iostream> #include<string> #include<algorithm> using namespace std; struct point { string number; int n,s[11],sum; }student[1002]; bool cmp(point a,point b) { if(a.sum!=b.sum)return a.sum>b.sum; return a.number<b.number; } int main() { int m,num,grade[11],mingrade,student_num; while(cin...
true
2ea58e1dd2f9fa082337546ae441411b921cec57
C++
ananthanandanan/academics
/CPP/tutorial/Bitsets.cpp
UTF-8
290
2.84375
3
[]
no_license
#include <bits/stdc++.h> #define Max 8 int main() { std::bitset<Max> visited; for(int i=0 ;i<Max;i++) { int x; std::cin>>x; visited[x] = true; } std::cout << visited.count()<<std::endl; std::cout << visited << std::endl; return 0; }
true
97b70537f64d8434fe425db76fa97896f69528c7
C++
phuonghtruong/cplusplus
/practice/designpattern/abstractFactory/ConcreteProductB2.h
UTF-8
467
3
3
[]
no_license
#pragma once #include "AbstractProductB.h" class ConcreteProductB2 : public AbstractProductB { public: std::string UsefulFunctionB() const override { return "The result of the product B2"; } std::string AnotherUsefulFunctionB(const AbstractProductA &collaboration) const override { ...
true
6eeb5e94c53038a8592c083dda4b3c4ec9083a84
C++
whytui/code4cpp
/ch13/thread_print.cpp
UTF-8
533
3.109375
3
[]
no_license
/** * 作者:刘时明 * 时间:2020/11/19 0019 */ #include "main.h" void print_work(const int &i, char *buf) { cout << i << endl; cout << buf << endl; } void print_work_ok(int i, const string &buf) { cout << i << endl; cout << buf.c_str() << endl; } void thread_print() { int v = 1; int &vy = v; char ...
true
548eaee7bc15a508285b60fc2377ce814879f7be
C++
javang/mlearning
/trunk/cplusplus/include/trees/information_gain.h
UTF-8
3,765
2.984375
3
[]
no_license
#ifndef INFORMATION_GAIN_H #define INFORMATION_GAIN_H #include "utility/eigen_helper.h" #include "definitions.h" #include "types.h" #include <utility> #include <set> #include <vector> namespace ml { namespace trees { enum InformationMeasure { GINI, ENTROPY }; //std::vector<InformationMeasure> InformationMeasures...
true
6563342b76003413764c59c41527821b732b13c1
C++
thirtiseven/CF
/EDU 32/D.cc
UTF-8
589
2.640625
3
[]
no_license
#include <iostream> typedef long long LL; const int Maxn = 1000 + 10; LL CArr[Maxn + 10][Maxn + 10]; void CInit(int n) { for (int i = 0; i <= n; i++) { CArr[i][0] = CArr[i][i] = 1; for (int j = 1; j < i; j++) CArr[i][j] = (CArr[i - 1][j - 1] + CArr[i - 1][j]); }} LL C(int n, int m) { return CArr[n][m]; } int main(in...
true
f950e13c05e51f3641392dc82fa527227644962f
C++
wkerstiens/MissileCommand
/source/MissileCommand.cpp
UTF-8
3,239
2.8125
3
[]
no_license
// // Created by William Kerstiens on 11/6/20. // #include <mutex> #include <iostream> #include "MissileCommand.h" #include "EventHandler.h" #include "Renderer.h" #include "SDL.h" MissileCommand::MissileCommand(std::size_t width, std::size_t height, std::size_t target_frame_duration) : _width(width), _height(h...
true
53745bcd09e37923b79c99181629d640d5eb5a97
C++
IanJoseph/CPP-Code
/SDL Basic/src/Screen.cpp
UTF-8
3,695
3.109375
3
[]
no_license
/* * Screen.cpp * * Created on: Aug 2, 2017 * Author: Ian J */ #include "Screen.h" #include <iostream> #include <stdio.h> namespace CPPTutorials { Screen::Screen() : m_window(NULL), m_renderer(NULL), m_texture(NULL), m_buffer1(NULL), m_buffer2(NULL) { } // Initialize screen, create window. bool Screen...
true
d33a192bfdeb7fbd0f60d68d69e2767c73c80082
C++
Cthutu/agf
/src/agf/platform/fad.h
UTF-8
3,331
2.78125
3
[]
no_license
//---------------------------------------------------------------------------------------------------------------------- // FAD API //---------------------------------------------------------------------------------------------------------------------- #pragma once #include <cstdint> #include <fstream> #include <map>...
true
ac444ef826e4d5636d91a59fd39572f92baf1f02
C++
opendarkeden/server
/src/server/gameserver/skill/ReactiveArmor.h
UTF-8
1,197
2.59375
3
[]
no_license
////////////////////////////////////////////////////////////////////////////// // Filename : ReactiveArmor.h // Written By : // Description : ////////////////////////////////////////////////////////////////////////////// #ifndef __SKILL_REACTIVE_ARMOR_HANDLER_H__ #define __SKILL_REACTIVE_ARMOR_HANDLER_H__ #inc...
true
635074de1407e9cab84124bae5b03faa179f5b9a
C++
utec-poo/tarea-semana-1-3-LordGlovaton
/ejercicio2/main.cpp
UTF-8
934
2.828125
3
[]
no_license
#include <iostream> #include "Tipos.h" using namespace std; int main(){ int zona=0; char dato; cout<<"diga zona:"; cin>>zona; cout<<"el cliente es claro (responder V(verdadero) o F(falso):"; cin>>dato; if (char(102)==dato){ switch(zona){ case 1: cout<<"Super Vip:"<<212<<" soles"; break; case 2:co...
true
f8367b5665d71bb2351a4e5ff18c56cadab2a4d0
C++
acelster/noise-terrain-gen
/nmlib/model/moduleoutput.hpp
UTF-8
1,022
2.96875
3
[]
no_license
#ifndef NM_MODULEOUTPUT_HPP #define NM_MODULEOUTPUT_HPP #include <nmlib/model/signaltype.hpp> #include <nmlib/util/userdataprovider.hpp> #include <nmlib/util/signals.hpp> #include <string> namespace nm { class ModuleType; /** * @brief Describes one of a ModuleType's outputs (name, SignalType) * @ingroup model ...
true
314afb8f708553efb85aaaa9b34a2cb545acc74e
C++
pratyush2311/Spoj-Solutions
/debug 2 year.cpp
UTF-8
135
2.5625
3
[]
no_license
#include<iostream> using namespace std; struct code { int a,b; code *c; }a; int main() { cin>>a.a>>a.c->b; cout<<a.b; return 0; }
true
12297b3504046d43c9e303ee6ac824d3f2d14b71
C++
sreekanth025/coding-problems
/DynamicProgramming/Longest-Increasing-Subsequence/54d_longestStringChain.cpp
UTF-8
2,506
3.515625
4
[]
no_license
/* Given a list of words, each word consists of English lowercase letters. Let's say word1 is a predecessor of word2 if and only if we can add exactly one letter anywhere in word1 to make it equal to word2. For example, "abc" is a predecessor of "abac". A word chain is a sequence of words [word_1, word_2, ..., word_...
true
1074b5343dae2f276b800a4d1096114cb68d6be7
C++
bangalcat/Algorithms
/graph/network-flow/9577.cc
UTF-8
1,482
2.859375
3
[]
no_license
/* 백준 : 토렌트 */ #include <bits/stdc++.h> using namespace std; vector<int> A, B; vector<vector<int>> adj; vector<bool> visited; int n, m; bool dfs(int a){ if(visited[a]) return false; visited[a] = true; for(auto v : adj[a]){ if(B[v] == -1 || !visited[B[v]] && dfs(B[v])){ A[a] = v; ...
true
d16840c9cdedd741f0e022ee1ba72cfc6fb8275c
C++
linoyda/Even2
/State.h
UTF-8
2,003
3.5
4
[]
no_license
// // Created by yael and linoy on 14/01/2020. // #ifndef EVEN2_STATE_H #define EVEN2_STATE_H #include <vector> template <class T> class State { private: T vertexIndex; double vertexValue; //This field actually represents the COST of each vertex double subCost; State* fatherVertex; bool isVisited...
true
8f433bcf089aea7ba57131370fd8035f8067e01e
C++
yhyhUMich/cxx11
/c6.cpp
UTF-8
5,580
3.15625
3
[]
no_license
#include <iostream> #include <string> #include <ctime> #include <cstdlib> #include <cstdio> #include <vector> #include <list> #include <deque> #include <set> #include <typeinfo> #include <cstring> using namespace std; class MyString { public: static size_t DCtor; static size_t Ctor; static size_t CCtor; static si...
true
b7ea57901a7a1d09a81635ebd796ccf49f66a8de
C++
Michidu/ARK-Server-API
/version/Core/Public/Logger/Logger.h
UTF-8
775
2.5625
3
[ "MIT" ]
permissive
#pragma once #include "../API/Base.h" #include "Logger/spdlog/spdlog.h" ARK_API std::vector<spdlog::sink_ptr>& APIENTRY GetLogSinks(); class Log { public: Log(const Log&) = delete; Log(Log&&) = delete; Log& operator=(const Log&) = delete; Log& operator=(Log&&) = delete; static Log& Get() { static Log instan...
true
f43450f2220775d0de92b14ebc4182b1ddc55724
C++
bancsdan/3DMeshConverter
/src/reader/obj_reader.cpp
UTF-8
5,482
2.640625
3
[]
no_license
#include <Eigen/Dense> #include <algorithm> #include <array> #include <exception> #include <fstream> #include <iostream> #include <optional> #include <sstream> #include <string> #include <vector> #include "exception.hpp" #include "geometry/meshdata.hpp" #include "obj_reader.hpp" #include "utility.hpp" namespace Conve...
true
43e10da4a97b8db0c060dbd8c30568d30c557723
C++
zj4775/cprojects
/排序树创建与删除.cpp
GB18030
1,645
3.515625
4
[]
no_license
#include<stdio.h> #include<sys/malloc.h> #include<stdlib.h> typedef struct node { int elem; node *lchild; node *rchild; }node; void insert(node **root,int n) { node *p; if(!(*root)) { p=(node *)malloc(sizeof(node)); p->elem=n; p->lchild=p->rchild=NULL; *root=p; } else { if((*root...
true
5b56c96314d3abd3857cae01a910847fbc486174
C++
sanikakharkar/atm
/include/BankDatabase.hpp
UTF-8
870
3.234375
3
[]
no_license
#pragma once #include <map> #include <iostream> template <class Key, class Data> class BankDatabase { public: friend class BankInterface; BankDatabase() = default; ~BankDatabase() = default; protected: bool isValidKey(const Key key); Data& getAccountData(const Key key); void addDatabaseEntr...
true
c1128ac2b5e36c305213bb952e4c6a36cc40a64a
C++
smealum/SPACECRAFT
/src/utils/Tools.cpp
UTF-8
817
2.859375
3
[]
no_license
#include "utils/Tools.h" //#include <cstdlib> //#include <cstdio> //#include <sys/types.h> //#include <sys/stat.h> //#if defined(_WIN32) || defined(__WIN32__) //#include <direct.h> // _mkdir //#endif bool createDir(const char *dir) { return true; //bool success = false; //#if defined(_WIN32) || defined(__WI...
true
a8c6d2403b47218e6507f3714ffa4837772879dd
C++
yjbong/problem-solving
/leetcode/42/42.cpp
UTF-8
839
2.859375
3
[]
no_license
int D[30000]; // D[i] = 지형 height[0~i]에 담을 수 있는 물의 양 int lMax[30000]; // lMax[i] = max(height[0], height[1], ... , height[i]) int rMax[30000]; // rMax[i] = max(height[n-1], height[n-2], ... , height[i]) class Solution { public: int trap(vector<int>& height) { int n=height.size(); if(n==0) return 0;...
true
b84330147661566a001f231f049f89e869af8053
C++
pramod3009/leetcode
/oddEvenList.cpp
UTF-8
1,027
3.296875
3
[]
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* oddEvenList...
true
c12344c9bab4cf66c88843d4d4b301c50a64558b
C++
jjsullivan5196/cst311-classwork
/project/pong.h
UTF-8
2,834
2.875
3
[]
no_license
#pragma once #include <cstdint> #include <iostream> #include <array> #include <algorithm> #include <SFML/Graphics.hpp> // display constants const uint32_t WIDTH = 800, HEIGHT = 400; const uint32_t BALL_R = WIDTH * 0.01f; const uint32_t BAT_W = WIDTH * 0.03f, BAT_H = HEIGHT / 4; const uint32_t BAT_HH = BAT_H / 2; // g...
true
185da8191b99639d72d961c13f38cb3d8dd18702
C++
prampec/IotWebConf
/src/IotWebConfTParameter.h
UTF-8
26,015
2.5625
3
[ "MIT" ]
permissive
/** * IotWebConfTParameter.h -- IotWebConf is an ESP8266/ESP32 * non blocking WiFi/AP web configuration library for Arduino. * https://github.com/prampec/IotWebConf * * Copyright (C) 2021 Balazs Kelemen <prampec+arduino@gmail.com> * rovo89 * * This software may be modified and distributed...
true
2e2006c5fb911d33f71d4216692d6aefc57cff37
C++
Osch-1/oop
/FindMaxEx/FindMaxEx/FindMaxEx.h
UTF-8
448
3.203125
3
[]
no_license
#include <iostream> #include <vector> using namespace std; template <typename T, typename Less> inline bool FindMax(vector<T> const& arr, T& maxValue, Less const& less) { if (arr.empty()) { return false; } int maxElementIndex = 0; for (int i = 1; i < arr.size(); ++i) { if (les...
true
a06c29e73a55939141a0fd232592bdd7b656561d
C++
alexandraback/datacollection
/solutions_5744014401732608_1/C++/VsonicV/main.cpp
UTF-8
1,344
2.84375
3
[]
no_license
// // main.cpp // Slides // // Created by Qiu Xin on 8/5/16. // Copyright © 2016 Qiu Xin. All rights reserved. // #include <iostream> #include <vector> #include <cmath> using namespace std; int main(int argc, const char * argv[]) { int runNum, B, M; cin >> runNum; for (int i=1;i<=runNum;i++) { ...
true
fe2126828b312207a6c6dd611a297d9bc5ffe18c
C++
compscisi/Programming-Fundamentals-1-SI
/Activities/Session 09 - 5 Feb/staticcastSOLUTION.cpp
UTF-8
864
3.84375
4
[]
no_license
/*******************************************************************************] This is the solution to the problem presented in staticcast.cpp This program should be able to tell you the ASCII value of any character you enter into the program. ***********************************************************************...
true
6e970482429f4b6b1df8ceb0521a73fd13254ea4
C++
PPL-IIITA/ppl-assignment-faheemzunjani
/Q4/library/utility.cpp
UTF-8
5,770
3.109375
3
[]
no_license
#include <cstdio> #include <string> #include "utility.hpp" using namespace data; using namespace std; void utility::read_boys_data(vector <geek_boy> &geek_boys, vector <generous_boy> &generous_boys, vector <miser_boy> &miser_boys) { FILE * fptr; std::string name, type; char name_in[100], type_in[100], flush_...
true
01b5a58f320a78ab69665bff885674f994627edf
C++
musicalentropy/Font-Rendering
/Source/CustomLookAndFeel.cpp
UTF-8
4,134
2.6875
3
[ "MIT" ]
permissive
/* ============================================================================== ============================================================================== */ #include "CustomLookAndFeel.h" CustomLookAndFeel::CustomLookAndFeel() { setDefaultLookAndFeelBaseColours(); } CustomLookAndFeel::~CustomLookAndFe...
true
37f74b07304c13b491ff76d2df76f2997b799935
C++
gaoji1/algorithm
/test/Zero-complexity_Transposition.cpp
UTF-8
514
3
3
[]
no_license
#include<iostream> using namespace std; int main() { int n; while(cin>>n) { int input[n]; for(int i=0;i<n;i++) { int temp; cin>>temp; input[i] = temp; } for(int i=0,j=n-1;i<=j;i++,j--) { int temp = input[i]; ...
true
1546f298fef608897685d841b68b697194a75ebf
C++
vladfaust/kaleidoscope
/ast/prototype.cpp
UTF-8
365
2.96875
3
[]
no_license
#pragma once #include <string> #include <vector> using namespace std; namespace AST { class Prototype { string _name; vector<string> _args; public: const string &name() const { return _name; }; vector<string> args() { return _args; }; Prototype(const string &name, vector<string> args) : _name(name)...
true
603f647c2810a838a0448de13659d97567f74999
C++
skalyanasundaram/BrainTuners
/uva/106-fermat-pythagoras.cpp
UTF-8
3,272
3.265625
3
[]
no_license
#include <iostream> #include <math.h> using namespace std; // #define MAX_SIZE 1000000 // #define COUNT(x) if(!flags[x]) { count--; flags[x] = 1; } // inline int GCD(unsigned long a, unsigned long b) { // unsigned long temp = 0; // while(b > 0) { // temp = b; // b = a % b; // a = te...
true
e3e9fb5a447df190721a2bd9967d0471e441cd3f
C++
garamizo/poker
/poker/include/poker.h
UTF-8
1,059
3.046875
3
[]
no_license
#ifndef _H_POKER_ #define _H_POKER_ #include <iostream> #include <vector> #include <algorithm> namespace poker { class Card { public: int id; Card(int suit, int number) : id(number + suit*13) {}; Card() {Card(0, 0);}; int Suit() const { return(id / 13); }; int Number() const { return(id % 13); }...
true
32028a958f143299e4827186adef0bcf9feb3e4d
C++
bisakhmondal/InterviewPrep
/Solutions/DeepCopyLL.cpp
UTF-8
1,423
3.4375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* next; Node* random; Node(int data) : data(data), next(NULL), random(NULL) {} }; Node* clone(Node* head){ if(head == NULL) return NULL; Node* travellingPtr = head; // Insert clone node of n-th node bet...
true
8cad9422e86ffe2190d70baf715ab7ba76b9321d
C++
xidianlina/cppplus
/chapter_11_complex.h
UTF-8
586
3
3
[]
no_license
#ifndef COMPLEX_H_ #define COMPLEX_H_ #include <iostream> class Complex { private: double real; double imag; public: Complex(); Complex(double r); Complex(double r, double i); ~Complex(); Complex operator+(const Complex &c)const; Complex operator-(const Complex &c)const; Complex operator*(const Complex &c)con...
true
68e97aa426d7c148f3fc6e16548350bd7710063e
C++
Kronecker/WissRech2
/Task4/aufg13a.cpp
UTF-8
3,548
2.796875
3
[]
no_license
// // Created by grabiger on 08.06.2018. // using namespace std; void aufg13a(); flouble* initMatrixRightHandSide(int n, flouble h ); flouble* jacobiIter(int n, flouble *f, flouble valBoundary, int* numberOfIterations, flouble h); void aufg13a() { // Init Chrono std::chrono::high_resolution_clock::time_poi...
true
0d7052338bcd56440795586f9f37613933fde6b1
C++
Ashatta/study
/semester_2/hw_6/hw6_task2/settest.h
UTF-8
1,865
3.0625
3
[]
no_license
#pragma once #include <QtTest/QtTest> #include <sstream> #include <string> #include "set.h" class SetTest : public QObject { Q_OBJECT private slots: void init() { set = new Set<int>(); } void cleanup() { delete set; } void testAddSet() { set->add(6); ...
true
5e6107df77a44e503fdb97b251ade9c463d65dcf
C++
adityanjr/code-DS-ALGO
/GeeksForGeeks/Practice/VerticalSum.cpp
UTF-8
620
3.625
4
[ "MIT" ]
permissive
/*Complete the function below Node is as follows: struct Node{ int data; Node *left,*right; }; */ void make(Node* root, int width, map<int, int>& m){ if(!root){ return; } if(m.find(width) == m.end()){ m[width] = root->data; } else{ m[width] += root->data; } ...
true
48321bde01d1457394fb11563ccfdebd654e55d9
C++
izabera/ulam
/ompulam.cpp
UTF-8
941
3.3125
3
[ "LicenseRef-scancode-public-domain" ]
permissive
/* prints ulam numers a(1) = 1 a(2) = 2 a(n) = minimum number > a(n-1) that can be espressed as the sum of two distinct ulam numbers in exactly one way */ #include <iostream> #include <vector> using namespace std; vector<int> ulam, sums(2,1); int nextulam (int n) { int i; for (i = sums.size(); i < ulam[n-1]*2; i++...
true
03ed69b2bb764289d5e63857847ea477aa192c4c
C++
FerCremonez/College-3rd-semester
/ex4.cpp
UTF-8
197
2.984375
3
[]
no_license
#include <stdio.h> main() { int x; printf("Insira o valor desejada para o numero : "); scanf("%d",&x); for (int i = 1;i <= x;i++){ if (x % i == 0){ printf("%d\n",i); } } }
true
d6e9d2c4b7df52c50d8900f5c21524b100930745
C++
Ga-PaYin/MySuckWorks
/BigballEatLittleball/源.cpp
GB18030
4,376
2.890625
3
[]
no_license
#include"circle.h" #include<ctime> #include<fstream> #include<iostream> using namespace std; int versusEnermy(myCircle *user, Circle *enermy) { if (sqrt(pow(user->getX() - enermy->getX(), 2) + pow(user->getY() - enermy->getY(), 2)) - user->getRadius() - enermy->getRadius() <= 0.00001) { if (user->getRadius() > ener...
true
d99463d59d3768814ee7a96f6df1a41c7abf0dbc
C++
deepthombare/SPPU-Computer-graphics-assignments
/Sunrise sunset/Source.cpp
UTF-8
4,098
2.90625
3
[]
no_license
#include<iostream> #include<GL/glut.h> using namespace std; float ballX = -0.8f; float ballY = -0.3f; float ballZ = -1.2f; float colR = 3.0; float colG = 1.5; float colB = 1.0; float bgColR = 0.0; float bgColG = 0.0; float bgColB = 0.0; static int flag = 1; void drawSun(void) { // to draw sun ...
true
642e49786eef84ed9cb1d7aa0f89c6c39b51816a
C++
FionaQi/LeetCode
/BTree/zigzagLevelOrder.cpp
UTF-8
1,586
3.4375
3
[]
no_license
#include<iostream> #include <vector> #include <queue> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; vector<vector<int>> zigzagLevelOrder(TreeNode* root) { vector<vector<int>> res; if(!ro...
true
351f6a667ca06fe98cf7df6cdea29199298223fa
C++
davidflogo12/POO-FINAL-C-
/untitled/Alumno.cpp
UTF-8
792
2.6875
3
[]
no_license
// // Created by balta on 16/02/2018. // #include "Alumno.h" #include "Horario.h" Alumno::Alumno() { this->matricula=""; this->gene=""; } Alumno::Alumno(std::string &mat, std::string &gen, char &c, std::string &b, std::string &a) { this->matricula = mat; this->gene = gen; this->Persona::genero =...
true
aa43c177af4df6340440129470b048b198b407b4
C++
AnaDz/3DGraphic
/src/students/ParticleExplosion.cpp
UTF-8
1,983
2.578125
3
[]
no_license
#include"../../include/students/ParticleExplosion.hpp" #include <glm/gtc/type_ptr.hpp> #include <GL/glew.h> #include <iostream> #include "../../include/gl_helper.hpp" #include "../../include/log.hpp" #include "../../include/Utils.hpp" #include "./../../teachers/Geometries.hpp" #include"../../include/dynamics/Particle....
true