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
ea0efd8042ba0b0ab2daf83984700b10b2386fb7
C++
dapperfu/bot_01
/HAL/HAL.ino
UTF-8
518
2.953125
3
[ "BSD-3-Clause" ]
permissive
int analogValue_3 = 0; void setup() { Serial.begin(115200); } void loop() { // Analog Input 3 Serial.print("A3="); Serial.print(analogValue_3); delay(250); Serial.print(","); // Analog Input 4 analogValue_4 = analogRead(4); Serial.print("A4="); Serial.print(analogValue_4); Serial...
true
7c7667382ba2def64d525e57158fa96304ddaf40
C++
Salanyel/PlateFormer
/Tile.cpp
UTF-8
423
3
3
[]
no_license
#include "Tile.h" Tile::Tile(TILE_TYPE type) : m_type(type) { } Tile::~Tile() { } TILE_TYPE Tile::getType() { return m_type; } void Tile::setType(TILE_TYPE type) { m_type = type; } bool Tile::isSolid() { switch (m_type) { case T_BLOCK: return true; case T_MAPWALL: return true; default: return fals...
true
646ba19a22116ba3b9241e7916a1876ee57e6e3f
C++
MajorasCoffee/New-Projects
/Project39/Project39/Source.cpp
UTF-8
256
3.046875
3
[]
no_license
#include <iostream> #include <string> using namespace std; class animal { public: void emotions(string emotion) { cout << emotion << endl; } }; class cat: public animal{}; int main() { cat cat; cat.emotions("Grrrr"); system("PAUSE"); return 0; }
true
265d4fc3350c335d689c4c0ac4be1900d26e9ad5
C++
mkalafut/matt-statics
/src/main.cpp
UTF-8
323
2.90625
3
[]
no_license
#include "Person.cpp" int main() { // Initialize both Person classes. Person person1 = Person("Jake the Dog", "512 Treehouse Lane"); Person person2 = Person("Mike Wazowski", "22 You-Got-Your-Life-Back-Lane"); // Call the display functions of both classes. person1.display(); person2.display(); ...
true
4ab2cc2220e7be1ddf8ca12197bd94fdbd72c28a
C++
fredmorcos/attic
/Projects/Autocal/attic/autocal-20100821/src/schedule.cpp
UTF-8
1,161
2.703125
3
[ "Unlicense" ]
permissive
#include "schedule.h" #include <limits> Schedule::Schedule(QObject *parent) : QObject(parent), _fitness(std::numeric_limits<int>::min()) { } void Schedule::_putUnfixedTasks() { _unfixedTasks.clear(); for (int i = 0; i < _tasks.length(); i++) if (!(_tasks.at(i)->fixed())) _unfixedTasks.append(_tasks.at(i)); } ...
true
52343c94199782b870345fc6407462ee4bac3c4e
C++
aljozu/OOP2_FP
/particles_container.h
UTF-8
1,127
2.953125
3
[]
no_license
// // Created by lojaz on 23/11/2020. // #ifndef PLSDIOSITO_PARTICLES_CONTAINER_H #define PLSDIOSITO_PARTICLES_CONTAINER_H #include "Particle.h" class particles_container : public sf::Drawable { std::vector<std::shared_ptr<Particle>> particle_container; bool sick; //std::vector<Particle> particle_contain...
true
572d70b0bcfaf335ffe6260e33a8850eb0abc2ff
C++
onartz/AmbifluxRobot
/AmbifluxRobotARNL/AmbifluxRobot/MessagePool.cpp
UTF-8
874
2.71875
3
[]
no_license
#include "MessagePool.h" Pool::Pool(size_t max_size = 10, size_t spin_time = 50) : max_size(max_size), spin_time(spin_time) {} Pool::~Pool() { myMutex.lock(); //mtx.lock(); while (data.size()) data.pop(); myMutex.unlock(); //mtx.unlock(); } size_t Pool::size() const { myMu...
true
72e174bdbfba15237993c5f44494845c08f2601c
C++
ian-wigley/Xenon
/Xenon-Original_C++_Code/demo3/demo3.cpp
UTF-8
3,819
2.984375
3
[]
no_license
//------------------------------------------------------------- // // Program: Demo 3 // // Author: John M Phillips // // Started: 20/08/00 // // Remarks: This is a simple program using the GameSystem library // which lets you view a 2 layer scrolling tile map. // //----------------------------------------...
true
81017822ea2fb73c4ab2c874a174be56f3ae6bf3
C++
takayoshi-k/neopixelsheet
/src/HappyReiwa.cpp
UTF-8
1,443
2.859375
3
[ "BSD-3-Clause" ]
permissive
#include "HappyReiwa.h" namespace SpresenseNeoPixel { HappyReiwa::HappyReiwa() : font() { step = 0; shuku_color[0] = 0x00041400; shuku_color[1] = 0x00061800; shuku_color[2] = 0x00081C00; shuku_color[3] = 0x000A2000; shuku_color[4] = 0x000C2400; shuku_color[5] = 0x000E2800; shuku_color[...
true
73d2577b14967e07b4d476b880308e15821acb5f
C++
fuchsto/waitfree-containers-mc
/include/mc/atomic.h
UTF-8
2,033
3.25
3
[]
no_license
#ifndef __MC__ATOMIC_H__ #define __MC__ATOMIC_H__ #ifdef _MC__SIMULATE_STDATOMIC #include <mutex> #else #include <atomic> #endif namespace mc { #ifndef _MC__SIMULATE_STDATOMIC /** * @brief Alias for ::std::atomic<T>. */ template<typename T> using Atomic = ::std::atomic<T>; #else /** * @brief Custom blocking ...
true
b4351e702d33a470c14b34ed0af72ce09e49dce7
C++
mastayb/config-parser
/config_lexer_test.cpp
UTF-8
6,044
2.984375
3
[]
no_license
#include "config_lexer.h" #include "gtest/gtest.h" #include <sstream> #include <stdexcept> namespace { TEST(ScanTest, EOFTokenLexed) { SimpleConfig::ConfigLexer l; std::istringstream testSource(""); const std::vector<SimpleConfig::Token> testTokens = l.Scan(testSource); SimpleConfig::Token testToken= {Si...
true
3e7588fd36276a2cd7829145b49e550e3a53fa0d
C++
Kiritow/OJ-Problems-Source
/HDOJ/4549_autoAC.cpp
UTF-8
1,396
2.984375
3
[]
no_license
#include <stdio.h> #include <algorithm> #include <iostream> #include <string.h> using namespace std; const int MOD=1e9+7; struct Matrix { long long mat[2][2]; }; Matrix mul(Matrix a,Matrix b) { Matrix ret; for(int i=0;i<2;i++) for(int j=0;j<2;j++) { ret.mat[i][j]=...
true
ffe5757c8ef757b05f28572d9b7f4e1ddfa62798
C++
LaoZZZZZ/bartender-1.1
/src/patternparser.h
UTF-8
1,723
2.640625
3
[ "MIT" ]
permissive
/* * Copyright 2015, Lu Zhao <luzhao1986@gmail.com> * * This file is part of bartender project. */ #ifndef PATTERNPARSER_H #define PATTERNPARSER_H #include "filebuf.h" #include "sequence.h" #include <memory> #include <string> #include <fstream> #include <algorithm> namespace barcodeSpace{ /** * A general patt...
true
8132f0bb040950e5ea38901002130582bcfa2c1a
C++
tmtmazum/sfml-wrappers
/2dGraphics.h
UTF-8
1,408
3.125
3
[]
no_license
#ifndef GRAPHICS_2D #define GRAPHICS_2D #include <vector> namespace Graphics2d { class color { int r,g,b; color(int rv = 0, int gv = 0, int bv = 0); } /*black(0,0,0), red(255,0,0), blue(0,0,255), green(0,255,0)*/; class drawable { int a; }; class po...
true
306b4925b54d93497265633b842206c8cb1c6a14
C++
aljo242/pt-three-ways
/src/oo/Scene.h
UTF-8
527
2.75
3
[ "MIT" ]
permissive
#pragma once #include "oo/Primitive.h" #include <memory> #include <vector> namespace oo { class Scene : public Primitive { std::vector<std::unique_ptr<Primitive>> primitives_; Vec3 environment_; public: void setEnvironmentColour(const Vec3 &colour) { environment_ = colour; } void add(std::unique_ptr<Primit...
true
af551f8637fb214fb953b0d5a032afb6ea6329ce
C++
cristian0710/Taller_2
/4_struct_anidada.cpp
UTF-8
1,223
3.546875
4
[]
no_license
#include <stdio.h> struct promedio { float n1, n2, n3; }; struct alumno { char nom[30]; int edad, grd; promedio prom; }; //PROTOTIPOS void datos(); void prom(float a,float b,float c); void imprimir(); //DIFINICION DE ESTRUCTURA alumno estudiante; int main() { datos(); imprimir(); } void prom...
true
e98c36160c8e72b673235e6422b1c7f25ea9fa3c
C++
tomn46037/Arduino-MQTT-Desklamp
/MQTT_Lights/MQTT_Lights.ino
UTF-8
4,636
2.546875
3
[]
no_license
// tomn CLS (Cubicle Lighting System) #include <avr/wdt.h> // Stuff for the motors #include <AFMotor.h> #include <Servo.h> // Able to control 4 lights! // AF_DCMotor motor1(1); Cannot use motor 1 as Digital Pin 11 is used with SPI and Ethernet AF_DCMotor motor2(2); AF_DCMotor motor3(3); AF_DCMotor motor4(4); ...
true
7ea8ca64cbc1a29fb56348b289a8d48f38e7e40a
C++
VishnuArun/Robot-Simulation
/Robot_Simulator/iteration3/src/pose.h
UTF-8
2,023
2.859375
3
[ "MIT" ]
permissive
/** * @file pose.h * * @copyright 2017 3081 Staff, All rights reserved. * */ #ifndef SRC_POSE_H_ #define SRC_POSE_H_ /******************************************************************************* * Includes ******************************************************************************/ #include "src/common.h...
true
4fc4ade50b34695eb6b687d18f2d58910e105df6
C++
Jeremy-Martin4794/CS2-projects
/infix2prefix/stack.hpp
UTF-8
3,417
3.296875
3
[]
no_license
// Jeremy Martin // Project 3 stack interface header file // 11/1/2020 #ifndef CS2_STACK_HPP_ #define CS2_STACK_HPP_ //////////////////////////////////////////////////////////////////////////// // // File: stack.hpp // // Programmer: // Updated: 10/2019 // // // Do not change the names of the classes or methods. O...
true
748ca5932b63d38d4c8bad15c8a34e6b9172cb50
C++
bentglasstube/gam
/text.cc
UTF-8
1,012
3
3
[ "MIT" ]
permissive
#include "text.h" // TODO replace with spritemap Text::Text(const std::string& file, int width, int height) : file_(file), width_(width), height_(height) {} void Text::draw(Graphics& graphics, const std::string& text, int x, int y, Text::Alignment alignment) const { SDL_Rect source = { 0, 0, width_, height_ }; S...
true
dcbc63ce95390ba9b034234cce57815763bb2883
C++
aldoshkind/y_me
/projector_elliptic.h
UTF-8
1,336
3.03125
3
[]
no_license
#pragma once #include "projector.h" class projector_elliptic : public projector { public: /*constructor*/ projector_elliptic () { // } virtual /*destructor*/ ~projector_elliptic () { // } double x_to_lon (double x) const { return x / ((1 / 2.0) * (1 / M_PI)) - M_PI; } double y_to_lat...
true
e212c504f2f0d6afedcd0d2ea22aa4ce1088ddd9
C++
kimphuongtu135/OOP345
/opp2/RecordSet.cpp
UTF-8
2,733
3.046875
3
[]
no_license
// Name:Kim Phuong Tu // Seneca Student ID:148886179 // Seneca email: kptu@myseneca.ca // Date of completion: Jan 22,2020 // // I confirm that the content of this file is created by me, // with the exception of the parts provided to me by my professor. #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <iom...
true
8f2b9db6cb16762a067af5a97450f6a654de30e7
C++
vastamat/Data-Oriented-Design-Practice
/Dode/Dode/ECS/World.cpp
UTF-8
2,860
2.671875
3
[ "MIT" ]
permissive
#include "World.h" namespace dode { World::World( const std::string& _IdentificationName ) : m_IdentificationName(_IdentificationName) { } World::~World() { } World::World( World && _Other ) noexcept : m_EntityManager(std::move(_Other.m_EntityManager)) , m_Component...
true
3a332fa33dfc313f5728006adf78ccde1f74f13a
C++
kenrick95/code-archive
/2015-04-09 NTUACM Session 7/aa.cpp
UTF-8
1,495
2.90625
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <algorithm> #include <cstring> #include <string> //#include <bits/stdc++.h> #define INF 1000000007 #define INFLL 9223372036854775807LL typedef long long int64; typedef unsigned long long qword; using namespace std; /** * @problem * ...
true
c3e75b7039d84adfd9a9e83126a1716f50e7b92f
C++
Devenda/Cuby_Firmware
/components/ui/touch.cpp
UTF-8
4,299
2.59375
3
[]
no_license
/* Touch Pad Interrupt Example This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #include <std...
true
474f1b586b57df4467f77b50165e9eb29bb07d19
C++
GreatDanton/Training
/Cpp/thinkLikeAProgrammer/6.recursion/1.sum_of_integers.cpp
UTF-8
988
4.5625
5
[]
no_license
/* * Problem 1: * * Write a recursive function that is given an array of integers and the size of * the array as parameters. The function returns the sum of the integers in the * array. */ #include <iostream> int arraySumRecursive(int integers[], int size) { if (size == 0) { return 0; } int l...
true
0cbbb510e92d01cb6a680e201233863eccc57517
C++
kalyankondapally/temp
/common/HwcList.h
UTF-8
5,018
2.8125
3
[]
no_license
/* // Copyright (c) 2017 Intel Corporation // // 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...
true
be2b9ba5801d1a95f31d1ca585bec6ad84bff826
C++
MarcToussaint/rai
/rai/Optim/retired/optimization_obsolete.cxx
UTF-8
30,101
2.5625
3
[ "MIT" ]
permissive
/* ------------------------------------------------------------------ Copyright (c) 2011-2020 Marc Toussaint email: toussaint@tu-berlin.de This code is distributed under the MIT License. Please see <root-path>/LICENSE for details. -------------------------------------------------------------- */ ...
true
7eaf073391bd4eb8c41f4a47a9d8988333c5d2d0
C++
KitFung/competitive-programming
/hdu1847.cpp
UTF-8
1,478
3.140625
3
[]
no_license
#include <cstdio> #include <cstring> #define MAXN 1010 /** 当 g(x)=k 时,表明对于任意一个 0≤i<k,都存在 x 的一个后继 y 满足 g(y)=i。也就是说,当某枚棋子的 SG 值 是 k 时,我们可以把它变成 0、变成 1、⋯、变成 k−1,但绝对不能保持 k 不变。不知道你能不能根据这个联想到Nim游戏,Nim游戏的规则就是:每次 选择一堆数量为 k 的石子,可以把它变成 0、变成 1、…、变成 k−1,但绝对不能保持 k不变。这表明,如果将 n 枚棋子所在的顶点的 SG值看 作 n 堆相应数量的石子,那么这个Nim游戏的每个必胜策略都对应于原来这 n ...
true
127b4dae8e25a346729c36cbc09a484155ca241d
C++
BisonRobotics/NRMC2019
/src/utilities/src/config.cpp
UTF-8
1,272
2.578125
3
[]
no_license
#include <utilities/config.h> using namespace utilities; Config::Config(std::string package_name) : package_name(package_name) { } void Config::loadParam(ros::NodeHandle *nh, std::string name, std::string &param, std::string default_param) { nh->param<std::string>(name, param, default_param); ROS_INFO("[%s::Co...
true
793b68d3230d84a1980b1325f4e338758055242b
C++
alourei/Digit
/DetectorPadGeometry.C
UTF-8
3,151
2.953125
3
[]
no_license
#include <iostream> #include "DetectorPadGeometry.h" ClassImp(DetectorPadGeometry); DetectorPadGeometry::DetectorPadGeometry(){ //Default Constructor } DetectorPadGeometry::DetectorPadGeometry(const Int_t nRows){ X0=-90; Y0=-30; numberOfRows=nRows; numberOfColumns=new Int_t[numberOfRows]; padSizeX=new ...
true
f88f1b21a2e440c4e38085991bc7c4ce44f3a320
C++
PennTao/TestGUI
/socketcomm.cpp
UTF-8
833
2.953125
3
[]
no_license
#include "socketcomm.h" SocketComm::SocketComm(QObject *parent) : QObject(parent) { } void SocketComm::connectToServer(QString host, qint16 port){ socket = new QTcpSocket(); socket->connectToHost(host,port); socket->waitForConnected(2000); connect(socket,SIGNAL(connected()),this,SLOT(onConnect())...
true
33be546c33a2381423c51ae0952a8d8b3fb0c1f1
C++
moevm/oop
/6304/Timofeev_A/lab2/basis.cpp
UTF-8
1,322
3.484375
3
[]
no_license
#include "basis.h" Point::Point() { x = 0.0; y = 0.0; } Point::Point(double _x, double _y) : x(_x), y(_y) { } void Point::Set_X(double _x) { x = _x; } void Point::Set_Y(double _y) { y = _y; } double Point::Get_X() const { return this->x; } double Point::Get_Y() const { return ...
true
ad8ebac47fd4937282393a433a984b00ff811bbe
C++
alexandraback/datacollection
/solutions_5686275109552128_1/C++/Prime21/B.cpp
GB18030
1,505
2.515625
3
[]
no_license
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #include <cmath> #include <ctime> #include <queue> #include <set> #include <map> #define REP(I,A,B) for(int I=A,END=B;I<=END;I++) #define REPD(I,A,B) for(int I=A,END=B;I>=END;I--) #define RI(X) scanf("%d",&X) #...
true
57023666e4442fa68169787a5eb74c86dbcc7da5
C++
MugenMan/mugen
/61_бинарн ifstream.cpp
UTF-8
437
2.796875
3
[]
no_license
#include <iostream> #include <string> #include <fstream> int main() { int a; short i; //std::cout<<"Enter number: "<<std::flush; //std::cin >> a; std::ifstream f("binary.txt", std::ios::binary); while (!f.eof()) { while (f.read((char *)&i, sizeof(short))) f.read((char *)&i,...
true
f41f7bd70cf2e17038ca5e5f3b27fc32f24bfbed
C++
ZNLeskowsky/znl-repo
/mpscqueue.hpp
UTF-8
6,298
2.546875
3
[ "BSL-1.0" ]
permissive
// Lock-free MPSC intrusive and non-intrusive queues based on // Vyukov, Dmitry, // http://www.1024cores.net/home/lock-free-algorithms/queues/ // // Copyright (C) 2018 Zoltan N. Leskowsky // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http...
true
5ef76ab790f38adf9005b68e8706366ee67d63cb
C++
jonathenzc/Algorithm
/LeetCode/iter1/c++/652.find-duplicate-subtrees.cpp
UTF-8
2,224
3.296875
3
[]
no_license
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <sstream> #include <unordered_map> #include <unordered_set> #include <utility> #include <queue> #include <stack> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(NU...
true
2eb833934f7e27663b8827ae1c5b96af36d2fd1b
C++
xlcy32x/LeetCodeQuestions
/Questions/easy/Plus_One.cpp
UTF-8
1,745
3.75
4
[]
no_license
#include "..\..\Header\inc.h" class Solution : public SolutionBase<Solution> { public: Solution() { std::cout<<"Given a non-empty array of digits representing a non-negative integer, plus one to the integer."<<std::endl; std::cout<<"The digits are stored such that the most significant digit is ...
true
673d8c2509ef6b4d3658f854d4fb65f7cbec9e42
C++
weifangwei86/sat_atpg
/src/circuit_graph.cpp
UTF-8
5,846
2.578125
3
[ "MIT" ]
permissive
#include "circuit_graph.h" #include "util/log.h" #include <sstream> #include <map> #include <set> const char* make_gate_name(Gate::Type type) { switch(type) { case Gate::Type::And: return "AND"; break; case Gate::Type::Nand: return "NAND"; break; case Gate::Type::Not: return "NOT"; break; ...
true
d6fa82eacbacfdef4a4f5fd5a55dde30a216949e
C++
rongwl/btclite
/src/unit_test/network/src/protocol/message_tests.cpp
UTF-8
3,153
2.546875
3
[]
no_license
#include "protocol/message_tests.h" #include "stream.h" namespace btclite { namespace unit_test { using namespace network::protocol; TEST_F(MessageHeaderTest, Constructor) { EXPECT_EQ(0, header1_.magic()); EXPECT_EQ("", header1_.command()); EXPECT_EQ(0, header1_.payload_length()); EXPECT_EQ(0, head...
true
2843c4c51e39412b81d6ceb7992ca3be70df5c2b
C++
glorianayeli/Multiplo
/tareaa3.cpp
UTF-8
2,322
4
4
[]
no_license
//1.- Leer un numero y mostrar el factorial del numero, mismo que se describe con el símbolo n! ejemplo: //5! y se obtiene multiplicando todos los números de el 1 al numero = 1 *2 *3 *4 *5 = 120. No probar con números mayores a 19. #include <iostream> using namespace std; int main() { int numero,factorial=1; ...
true
d7568395e3fba889d787d412ab5f13c45998d1f0
C++
DonCastillo/go-fish-mvc
/include/MockCard.h
UTF-8
494
2.609375
3
[]
no_license
/*! \file MockCard class header */ #ifndef MOCKCARD_H_INCLUDED #define MOCKCARD_H_INCLUDED #include <string> #include "gmock/gmock.h" class MockCard : public Card { public: explicit MockCard(int s, int r) : Card(s, r) {} virtual ~MockCard() {} MOCK_METHOD0(getSuit, std::string()); MOCK_M...
true
8b496312e3b6645265f111819ac6f5c8fb52a7b1
C++
XiaoHsiang/A9
/Advanced-homework09.cpp
BIG5
566
3.0625
3
[]
no_license
#include<stdio.h> #include<stdlib.h> void is_fortunate(int,int,int); int main(void){ int born_year,born_month,born_day; printf("пJXͤ:"); scanf("%d%d%d",&born_year,&born_month,&born_day); is_fortunate(born_year,born_month,born_day); return 0; system("pause"); } void is_fortunate(int year,i...
true
72066359f6742082936995c0bde78d516f2d21e6
C++
chromium/chromium
/remoting/ios/persistence/host_pairing_info.h
UTF-8
2,077
2.59375
3
[ "BSD-3-Clause" ]
permissive
// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef REMOTING_IOS_PERSISTENCE_HOST_PAIRING_INFO_H_ #define REMOTING_IOS_PERSISTENCE_HOST_PAIRING_INFO_H_ #include <string> namespace remoting { class Keychain; // A Host...
true
422aedebd81f3927e45ef0961da02d11b075d479
C++
YXL76/my-cpp-library
/my-cpp-library/include/BinaryTree/BinaryTree.h
UTF-8
1,361
2.78125
3
[ "MIT" ]
permissive
#pragma once /** * \Author: YXL * \LastUpdated: 2018/04/02 22:30:00 * \Description: */ #ifndef BINARY_TREE_H #define BINARY_TREE_H #include <functional> namespace yxl { template <typename T> class BinaryTree { public: using ttask = std::function<void(T*&)>; us...
true
cb71e9dbda8b76f9b94f066e2850362693a9d798
C++
awrucker/Lab-7-CSC-2111
/2111/CSC2110/Permutation.h
UTF-8
418
2.65625
3
[]
no_license
#if !defined (PERMUTATION_H) #define PERMUTATION_H #include "ListArray.h" using CSC2110::ListArray; #include "Integer.h" using CSC2110::Integer; #include "Random.h" using CSC2110::Random; namespace CSC2110 { class Permutation { private: int r; ListArray<Integer>* numbers; Random* random; publ...
true
88b359beb7a7a58299775f3cc1eea3773e99d320
C++
Arjunkhera/Competitive_Programming
/HackerBlocks/factorial_problem.cpp
UTF-8
963
2.921875
3
[]
no_license
#include<iostream> #include<map> #include<cmath> #include<climits> using namespace std; typedef long long int ll; map<ll,ll> factors; int answer; void solve(ll n,ll k){ ll lowest=INT_MAX,minimum; ll factor,temp; map<ll,ll>::iterator i = factors.begin(); while(i != factors.end()){ minimum = 0; factor...
true
c3611c5002df425686a7b47ddfde9750a1be8e88
C++
delsner/goldene-sieben
/card.cpp
UTF-8
825
3.28125
3
[]
no_license
// // Created by Daniel Elsner on 17.03.17. // #include <iostream> #include "card.h" using namespace std; Card::Card(const Color &color_, CardValue value_) : color_(color_), value_(value_) {} const Color &Card::getColor_() { return color_; } void Card::setColor_(const Color &color_) { Card::color_ = color_...
true
85f84b337c826207ea697bc0e7e37ec6d7b7a8e0
C++
kyler618/Dijkstra-Implementation-with-Qt
/vertex.cpp
UTF-8
4,077
2.671875
3
[]
no_license
#include <QMouseEvent> #include <QEvent> #include <QtDebug> #include "vertex.h" #include "impl.h" #include "edge.h" Vertex::Vertex(int x, int y, QWidget *parent) : QLabel(parent) { setVisible(true); setAlignment(Qt::AlignCenter); setGeometry(x-20, y-20, 40, 40); setStyleSheet("border...
true
8698732adcecb5b34759becce0413d9ac2d3ba5e
C++
MartinKrat/chip-8
/key_opcode.cpp
UTF-8
1,778
3.34375
3
[]
no_license
#include<stdio.h> /*Function key_opcode reads each character from the input. * Moreover key_opcode checks if each opcode consists of 4 characters * and if each character is a number (1 to 9) or a letter (a,b,c,d,e,f). * Then, key_opcode transforms this string to a real hex-number and * stores it i...
true
a84822026a879e8c33733e8cab25af7decb647ba
C++
Marseloz/PoolsideGUI
/udp_client.cpp
UTF-8
2,329
2.703125
3
[ "MIT" ]
permissive
#include "udp_client.h" #include <QNetworkDatagram> #include <sstream> UDP_Client::UDP_Client() { uv_interface = new IServerData(); udpSocket = new QUdpSocket(this); udpSocket->bind(QHostAddress::LocalHost, 7755); connect(udpSocket, &QUdpSocket::readyRead, this, &UDP_Client::readPend...
true
7206121320573fe4e4322b8210c5a3edd6062f43
C++
sky-lzy/Homework
/Code/9-1.cpp
UTF-8
826
2.671875
3
[]
no_license
#include <iostream> #include <iomanip> using namespace std; int main() { cout << " ++++++++++++++++ " << endl; cout << " XX公司人事管理系统 " << endl << endl; cout << " ++++++++++++++++ " << endl << endl; cout << "#################" << endl << endl; cout << " 主菜单 " << en...
true
087d3d42713cdba6f22b4ec6fa58a70c03b2ee18
C++
roonm813/teamnote-2019
/stl_reference/vector.cpp
UHC
2,741
3.59375
4
[]
no_license
//2018.00.00 roonm813 writes. #include <iostream> #include <vector> #include <algorithm> using namespace std; void printV(vector<int>* v){ for(int i = 0; i < v->size(); i++) cout << (*v).at(i) << " "; cout << endl<<endl; } int main(void){ vector<int> v; v.reserve(8); // vector size 8 cout...
true
1fcf2d70f38e8e566ce8c290ba753fa4e316f9e9
C++
tgxworld/CS1020E
/tutorials/8/sorted_stack.cpp
UTF-8
1,687
3.875
4
[]
no_license
#include <iostream> #include <stack> using namespace std; void printStack(stack<int> intStack) { while(!intStack.empty()) { cout << intStack.top() << " "; intStack.pop(); } cout << endl; } void insertOrder(stack<int>& intStack, int value) { int temp; if(value < intStack.top()) { temp = intSt...
true
1a7f8cd5f568362b62ca41f64452b14daff8c88f
C++
alisezgin/ARALGIS
/ARALGIS/ChangeDetection/ProcessingAlgorithms/RobustMatcher.h
UTF-8
10,518
2.703125
3
[]
no_license
#pragma once #include "DisplayMatches.h" #include "Settings.h" class RobustMatcher { private: // pointer to the feature point detector object cv::Ptr<cv::FeatureDetector> detector; // pointer to the feature descriptor extractor object cv::Ptr<cv::DescriptorExtractor> extractor; float ratio...
true
8e024cda7e32af086709c2bcb3ac8e7e2e290a41
C++
kunal121/C-And-Cpp-Questions
/Kartik/constructorparameterized.cpp
UTF-8
384
3.625
4
[]
no_license
#include<iostream> using namespace std; class test { int i; public: test() { cout<<"default constructor\n"; i=10; } test(int a) { cout<<"parameterized constructor\n"; i=a; } void show() { cout<<i; } }; int main() { test obj1,obj2(25); ...
true
7a594eff477bea6a993828da5a07090aab829b75
C++
zjucsxxd/Kazaam
/ReadWAV/ReadWAV/WavBot.hpp
UTF-8
3,025
3
3
[]
no_license
#ifndef __AudioThread #define __AudioThread #include "byteStructure.hpp" #include "fmodRecord.h" #include <cstdio> #include <exception> #include <iostream> #include <string> #include <time.h> #include <vector> using namespace std; typedef enum { waitingForFile, waitingOnRead, reading, waitingOnFFT, F...
true
6083768f7da32181676b577401dab50ecba38c7b
C++
ravi-ojha/competitive-sport
/spoj/FASHION/fashion.cpp
UTF-8
394
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int t; scanf(" %d",&t); while(t--) { int n; scanf("%d",&n); int res = 0; int a[n]; int b[n]; for(int i=0;i<n;i++) { scanf(" %d",&a[i]); } for(int i=0;i<n;i++) { scanf(" %d",&b[i]); } sort(a,a+n); sort(b,b+n); for(int i=0;i<...
true
4789182c18a8eb3063764f73657b940bbfead44b
C++
SOFTK2765/PS
/BOJ/10813.cpp
UTF-8
444
2.640625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int a[101]; void swap(int *a, int *b) { int tmp; tmp = *a; *a = *b; *b = tmp; return; } int main() { int n, m; scanf("%d %d", &n, &m); for(int i=0;i<n;i++) a[i] = i+1; while(m--) { int n1, n2; scanf(" %d %d...
true
431bf922b0141c703fff2ce3d625adbf4ff09018
C++
clw5180/My-notes-of-C-and-exercises-of-CppPrimer-5th
/C++ Primer第5版个人答案/Chapter8/Exercise 8.9.cpp
UTF-8
280
2.953125
3
[]
no_license
#include <iostream> #include <sstream> #include <string> using namespace std; istream &Print(istream& is) { string str; while (is >> str) cout << str << endl; is.clear(); return is; } int main() { istringstream inStringStream("aaa"); Print(inStringStream); return 0; }
true
d87df631f2a56bd9a8b9a4b7422a1402879adbbd
C++
jnrdrgz/SDL_Playground
/opengl/test/f.cpp
UTF-8
998
3.03125
3
[]
no_license
#include <iostream> #include <fstream> #include <sstream> #include <alloca.h> struct ShaderProgramSource { std::string VertexSource; std::string FragmentSource; }; static ShaderProgramSource ParseShader(std::string filepath) { std::ifstream stream(filepath); enum class ShaderType { NONE = -1, VERTEX = 0, FRAG...
true
5d46e450a3f65465a28115370f45833371b93e36
C++
Jerromylynn/The-first-stage
/求a+aa+aaa……的值.cpp
UTF-8
210
2.875
3
[ "MIT" ]
permissive
#include<stdio.h> void plus(int *m,int a){ *m=(*m)*10+a; } int main(){ int a,n,m=0; int sum=0; scanf("%d%d",&a,&n); m=a; for(int i=0;i<n;i++){ sum+=m; plus(&m,a); } printf("%d",sum); return 0; }
true
c75936992d6e5e274ef472ea57f908262a713642
C++
lozinska/OOP345
/ws4/at_home/Notifications.cpp
UTF-8
2,894
3.390625
3
[]
no_license
// Workshop 4 - Containers // w4.cpp // Krystyna Lopez // 2019/02/13 #include"Notifications.h" namespace sict { //Default constructor // Notifications::Notifications() {}; //A one argument constructor that dynamically allocate memory for the specified number of pointers // Notifications...
true
d3b7d443cb174a734f1ae73f90232c742db52dec
C++
ElizabethYasmin/MoveSeman
/stdMove.cpp
ISO-8859-1
2,281
4.03125
4
[]
no_license
/* el move estndar funciona en realidad como un conversor de tipo se utiliza para decirle al compilador que utilice un objeto como si fuera un rvalue,lo que significa que se puede mover*/ #include <cstdio> #include <vector>//para usar std::vector #include <string> #include <utility> void message(const std::string & ...
true
48363d29bd713b9a91013080137ed6fae51c88b1
C++
team3130/Granite
/Granite/src/Commands/RobotSensors.cpp
UTF-8
2,118
2.59375
3
[ "Apache-2.0" ]
permissive
#include "RobotSensors.h" #include "Subsystems/Chassis.h" #include "Video.h" RobotSensors::RobotSensors() { arduino = new SerialPort(57600, SerialPort::kMXP); arduino->SetWriteBufferMode(SerialPort::kFlushOnAccess); timer = new Timer(); this->SetRunWhenDisabled(true); } RobotSensors::~RobotSensors() { delete ard...
true
699d256f7572839203bbb95ebd573a430295d3d1
C++
yujincheng08/bisoncpp
/bisonc++/atdollar/operatorinsert.cc
UTF-8
552
2.5625
3
[]
no_license
#include "atdollar.ih" std::ostream &operator<<(std::ostream &out, AtDollar const &atd) { out << "At line " << atd.d_lineNr << ", block pos. " << atd.d_pos << ", length: " << atd.d_length << ": `" << atd.text() << "' (Pattern = " << atd.d_pattern << ')'; if (atd.d_tag.length()) ...
true
25a193061dc5e827f419049841898e46659c189c
C++
chiawei716/Course-OOP2019
/HW05/E14056431/HW05_01/HW05_01.cpp
UTF-8
1,201
3.34375
3
[]
no_license
// Copyright © 2019 趙珈葦. All Rights Reserved. // 系級: 機械109 // 學號: E14056431 #include <iostream> #include <list> #include <iterator> #include <algorithm> // #1: outint() -> lambda_1 auto lambda_1 = [](int n) { std::cout << n << " "; }; // #2: f100 -> lambda_2 auto lambda_2 = [](const int & n) { return n ...
true
8b7529cf16b0ef59858459d26c1fad79ddf9cb00
C++
famo7/project-trains
/include/PersonVagn.h
UTF-8
711
2.765625
3
[]
no_license
// Filename: PersonVagn.h // Written by: Farhan Mohamed // Created date: 14/10/2020 // Last modified: 11/01/2020 /* Description: Header file containing the class definition for PersonVagn class. */ #ifndef PROJECT_PERSONVAGN_H #define PROJECT_PERSONVAGN_H #include "Vagn.h" class PersonVagn: public Vagn { private:...
true
c8240aca953a050aa419aece3f3069b9befa34b0
C++
xellie4/IEP_LAB
/Lucrarea4/VladAdrian/main.cpp
UTF-8
1,006
3.765625
4
[]
no_license
#include <iostream> using namespace std; class Countries{ private: string name, climate; float population; public: Countries(string name, string climate, float population):name(name), climate(climate), population(population){} ~Countries(){}; void getName(){ ...
true
7a3b32596bdb2971d970b5d2d08475809671b44a
C++
zinsmatt/Graph
/graph_kernel/include/adjacencymatrix.h
UTF-8
3,135
3.390625
3
[]
no_license
#ifndef ADJACENCYMATRIX_H #define ADJACENCYMATRIX_H #include "edge.h" #include "squarematrix.h" #include "graphcontainer.h" #include "types.h" #include <map> class AdjacencyMatrix : private SquareMatrix<Edge*>, public GraphContainer { private: std::map<ElementId, int> idToIndex; //!< map between node id and ...
true
8b917662e596365801b4850d1127598d84d054bc
C++
narodnik/zkfrag
/include/libdark/pirromean/gate.hpp
UTF-8
1,714
2.546875
3
[]
no_license
#ifndef LIBDARK_PIRROMEAN_GATE_HPP #define LIBDARK_PIRROMEAN_GATE_HPP #include <memory> #include <vector> #include <libdark/pirromean/portal.hpp> namespace libdark { template <typename CurveType> class pirr_gate { public: typedef typename CurveType::ec_scalar ec_scalar; typedef typename pirr_portal<CurveType...
true
d2ce22f736646aa82e84ef3fb2f5c7ce655f3d38
C++
nileshkulkarni/Compilers
/Level3/110050007-110050034/ast.cc
UTF-8
20,695
2.53125
3
[]
no_license
/********************************************************************************************* cfglp : A CFG Language Processor -------------------------------- About: Implemented by Tanu Kanvar (tanu@cse.iitb.ac.in) and Uday ...
true
edadd59b2d690c815be4a441b136235451cbf1b3
C++
ninghang/accompany
/UHCore/CppInterface/base.cpp
UTF-8
1,505
2.78125
3
[]
no_license
#include "history.h" #include "Python.h" #include <string> #include <iostream> #include <exception> #include <stdio.h> PythonInterface::PythonInterface(const char* modulePath) { PythonInterface::modulePath = modulePath; } PythonInterface::~PythonInterface() { if (pInstance != NULL) { Py_DECREF(pInstance); } Py...
true
149f1d365a7e7505a7026e959a0d83e655bb0774
C++
jonjesbuzz/cards
/cpp/src/cards.cpp
UTF-8
2,415
3.5
4
[ "MIT" ]
permissive
#include "cards.h" #include <cstdlib> #include <ctime> #include <sstream> Card::Card(Rank rank, Suit suit) : rank(rank), suit(suit) { } Card::Card(const Card& c1): rank(c1.rank), suit(c1.suit) { } Card::~Card() { } std::string Card::to_string() const { std::string suit_s; switch(suit) { case Suit:...
true
87c4fd695a5d1e5f7867cb046fd123c483d9bf5a
C++
hoboaki/engineplan
/Scratch/LowLevelGraphics/VulkanSample/AeVulkanLib/ae/base/AutoSpPtr.hpp
UTF-8
10,311
2.8125
3
[]
no_license
// 文字コード:UTF-8 #if defined(AE_BASE_INCLUDED_AUTOSPPTR_HPP) #else #define AE_BASE_INCLUDED_AUTOSPPTR_HPP #include <ae/base/IAllocator.hpp> #include <ae/base/Pointer.hpp> //------------------------------------------------------------------------------ namespace ae::base { /// @addtogroup AeBase-Memory //@{ /// AutoPtr...
true
e3b11bdcfafa840a949e2296022c0b5c65036693
C++
tres-xxx/Codeforces-Exercises
/A/1300-1399/1399A-RemoveSmallest.cpp
UTF-8
443
2.59375
3
[]
no_license
#include <algorithm> #include <iostream> using namespace std; int main(){ int t; cin >> t; string ans[t]; for(int i = 0; i < t; i++){ ans[i] = "-"; int n; cin >> n; int a[n]; for(int j = 0; j < n; j++){ cin >> a[j];} sort(a,n+a); for(int j = 0; j < n-1; j++){ if((a[j+1]-a[j]) > 1){ ans[i] = "NO";b...
true
5e4b60439e5d6068cfb38fa25a3b4422c59a3948
C++
vostokorient/vostok
/C++2/wifi.cpp
UTF-8
443
3.171875
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main() { int pasw, x, n, m=10; cout<<"Введите пароль: "<<endl; cin>>pasw; cout<<"Введите разрядность: "<<endl; cin>>n; for(x=pow(m,n); x>0; x--) { cout<<x<<endl; if(x==pasw) { cout<<endl...
true
e005aad06c3da6cf31290ed016507661eb2f494b
C++
syanush/rhotetris
/tests/test1.cpp
UTF-8
2,871
3
3
[ "MIT" ]
permissive
#include "gtest/gtest.h" #include "Piece.hpp" using namespace RhoTetris; namespace { // The test case name and the test name. // You should not use underscore (_) in the names. TEST(PieceTestCase, CheckPieces) { auto& pieces = Piece::getPieces(); Body actual = pieces[0].getBody(); Body expected {{0, 0}, {0, 1}...
true
fbfd80af475356e9e3c4c0e0c5c8bf73c6dc92a2
C++
Dream-Dev-Team/Labor_OOS1
/Labor_3/L3_A4/main.cpp
UTF-8
1,356
2.734375
3
[]
no_license
////////////////////////////////////////////////////// //Dateiname: L3_A4 //Autoren: Maxim Becht (mabeit10@hs-esslingen.de), Aaron Müller (aamuit00@hs-esslingen.de) //Enthaltene Module: Point.h, Ciurcle.h, Polygonline.h, PolygonElement.h //Entwicklungsbeginn: 11.06.2020 Entwicklungsende: 18.06.2020 //Zeitaufwand gesam...
true
1d9c5a8b9f5db42dfc2df16362439f38d359c425
C++
jayjayjetpain/CS3353-Algorithms
/Lab1/src/SortAlgos.h
UTF-8
6,048
4.03125
4
[]
no_license
#pragma once #ifndef SORTALGOS_H #define SORTALGOS_H #include <iostream> #include <string> #include <vector> /* SortAlgos holds the implementation of the three main sorts of the lab - Bubble Sort, Insertion Sort, and Merge Sort - as well as their * "inner" functions that need to be called to execute them. This class...
true
40f2418d06be77de0ced1ef5358e79f50708ed0d
C++
Sireis/SelfDrivingCar
/SelfDrivingCar/SelfDrivingCar/Source/Circle.cpp
UTF-8
2,610
2.828125
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "Circle.h" #include "Rectangle.h" namespace Drawing { void Circle::init () { original_vertices[0] = m[0]; original_vertices[1] = m[1]; original_vertices[2] = 0.0; for (int i = 1; i < number_of_points; ++i) { original_vertices[9 * i + 0] = m[0] + radius * sin (2 * 3.1415926535...
true
f756ad00ee31d8bbc05a55c04abb87fce0ecb0f3
C++
johnw188/me405
/tests/radio_test.cc
UTF-8
4,628
2.953125
3
[]
no_license
//====================================================================================== /** \file radio_test.cc * This file contains a program to test the packet and/or text mode drivers for * the nRF24L01 radio modems on the ME405 boards. * * Revisions * \li 02-03-08 JRR Original file, for test...
true
9c99ead6f24f51d4d49f16d2bd07076eb7bd7234
C++
ErickCR12/Scrabble
/ClientProject/gui/DraggableTile.h
UTF-8
1,646
2.921875
3
[]
no_license
#ifndef DRAGGABLETILE_H #define DRAGGABLETILE_H #include <QGraphicsRectItem> #include <QGraphicsSceneMouseEvent> #include <iostream> #include <QTextStream> #include <string> #include "clientlogic/Board.hpp" //! \brief The DraggableTile class is a QGraphicsRectItem that can be dragged around a QGraphicsView. Is used ...
true
869da352d93b4247508b36f76bb6b5b2cd6eba59
C++
votslot/pvc
/lib/cbuff.cpp
UTF-8
5,346
2.609375
3
[]
no_license
#include <iostream> #include <assert.h> #include "GL/glew.h" #include "cbuff.h" int BaseBuffer::m_globCount = 0; void BaseBuffer::checkError() { GLenum err; while ((err = glGetError()) != GL_NO_ERROR) { printf("Buffer operation error %d %x \n", err,err); } } BaseBuffer::BaseBuffer() { m_ndx = m_globCount; m_...
true
eb4a70c51d39ace944773e5b979806b4405b0161
C++
mrtakata/competitive-programming
/codeforces/59 - Codeforces Beta Round #55 (Div. 2)/a.cpp
UTF-8
916
2.78125
3
[]
no_license
#include <bits/stdc++.h> #define ll long long int using namespace std; char toLowercase(char c){ return char(c - 'A' + 'a'); } char toUppercase(char c){ return char(c + 'A' - 'a'); } int main(){ cin.tie(0); ios_base::sync_with_stdio(0); char input[100]; cin >> input; // count occurrences int n_lowe...
true
4f9c485ed8a6c56798783eac3d46f0a9d6f4cce6
C++
guigzzz/HPC
/Coursework 5/include/puzzler/puzzles/edit_distance.hpp
UTF-8
4,290
2.65625
3
[]
no_license
#ifndef puzzler_puzzles_edit_distance_hpp #define puzzler_puzzles_edit_distance_hpp #include <random> #include <sstream> #include <vector> #include <climits> #include <cassert> #include <algorithm> #include "puzzler/core/puzzle.hpp" namespace puzzler { class EditDistancePuzzle; class EditDistanceInput; class ...
true
4e8b158720c24d68bc6631bec8fcd0793f9410f7
C++
phisn/PixelJumper2
/source/EditorCore/classiccontext/ClassicContextManager.h
UTF-8
8,557
2.5625
3
[]
no_license
#pragma once #include "ClassicContextWorldNode.h" #include "TransitiveContextNode.h" #include "EditorCore/WindowManager.h" #include "EditorCore/EditorFailureScene.h" namespace Editor::ClassicContext { class ClassicContextManager { public: ClassicContextManager(Resource::ContextID contextID) : contextID(co...
true
cc9d8dfaa977d31ece447ca1358f65cedb563309
C++
Klarmanj/AverageBowlingCalulator
/BowlingCalculator.cpp
UTF-8
2,425
3.796875
4
[]
no_license
#include <iostream> #include <iomanip> #include <fstream> using namespace std; // Function is called to display the *'s and welcome message to welcome the user to the program. void welcomeMessage() { const int STARS_LENGTH = 60; const int SIDE_STAR_LENGTH = 7; cout << setw(STARS_LENGTH) << setfill('*') <<...
true
894cac0109934df072b5e0ad88092b2d5e2c7384
C++
FrankBotos/SFML-Topdown-Player-Character
/worldObject.h
UTF-8
797
2.828125
3
[ "MIT" ]
permissive
//This is a class that should be inherited from by all "physical objects" in the game world //Inheriting from this class will enable collision checking with player character #pragma once #include <SFML\Graphics.hpp> #include <string> //inhereting from drawable for syntactically clean drawing //inheriting from Transfor...
true
2b4426f5989eb255cf49bb3f8f21d93a22c79d27
C++
Infinidat/infinitrace
/trace_instrumentor/util.cpp
UTF-8
3,488
2.59375
3
[]
no_license
/* * util.cpp: Various stand-alone functions for getting and manipulating string representations. * * File Created on: Feb 4, 2013 by Yitzik Casapu of Infindiat * Original code by Yotam Rubin <yotamrubin@gmail.com>, 2012, Sponsored by infinidat (http://infinidat.com) * Maintainer: Yitzik Casapu of Infindiat ...
true
d206d964e41b7c598d15e8915e4e587f91a84cff
C++
onsar/osec
/arduino/libraries/FaBo_212_LCD_PCF8574/examples/Scroll/Scroll.ino
UTF-8
1,544
2.984375
3
[ "Apache-2.0" ]
permissive
/* This is an Example for the FaBo LCD I2C Brick. Library originally added 18 Apr 2008 by David A. Mellis library modified 5 Jul 2009 by Limor Fried (http://www.ladyada.net) example added 9 Jul 2009 by Tom Igoe modified 22 Nov 2010 by Tom Igoe compatible library 23 Mar 2016 by Hideki Yamauchi This exampl...
true
8110a43cb82eda07556144d95121f702c1ffb644
C++
zlaval/ELTE_Prog
/objektum_elvu_programozas/complex/Complex.cpp
UTF-8
728
3.40625
3
[]
no_license
#include "Complex.h" #include <cmath> Complex::Complex(double r, double i) { this->r = r; this->i = i; } Complex Complex::operator+(Complex oc) const { return Complex(r + oc.r, i + oc.i); } Complex Complex::operator-(Complex oc) const { return Complex(r - oc.r, i - oc.i); } Complex Complex::operator...
true
0aea4b50acaedfca049f22180c1c86e04a697048
C++
raghuramos1987/personal
/leet/threeSum.cpp
UTF-8
1,107
2.96875
3
[]
no_license
/******************************************************************* * File Name : * Purpose : * Created By : Raghuram Onti Srinivasan * Email onti@cse.ohio-state.edu *******************************************************************/ #include <stdio.h> #include <vector> #include <map> #include <sstream> #inc...
true
cb3e5ec90ec5b1e894f5d76e08553d57d0038e2d
C++
dugo/practicas-sistemas-ugr
/ed/Curso 05-06/matriz T/ejemplos.h
UTF-8
681
2.875
3
[]
no_license
//fichero ejemplos.h #ifndef __EJEMPLOS_H #define __EJEMPLOS_H #include <list> #include "matriz.h" template <class T> class coordenadas{ public: coordenadas(T d, int f, int c); int nfila() const; int ncol() const; T dato() const; private: T dat; int fila; int columna; }; template <c...
true
ddc319dfc40ffea714a7d3e1766456af0ed06072
C++
luciocf/Problems
/IOI/IOI 2010/quality.cpp
UTF-8
968
2.734375
3
[]
no_license
// IOI 2010 - Quality of Living // Lúcio Cardoso #include <bits/stdc++.h> #include "quality.h" using namespace std; const int maxn = 3e3+10; int n, m, a, b; int num[maxn][maxn], soma[maxn][maxn]; bool ok(int x) { for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { soma[i][j] = soma[i][j-1]+soma[...
true
61b2841c32eb8571cbff44a6311b1fa69b8c6e98
C++
alkaidlong/PaperDemo
/Dev/Common/MedusaCore/Core/Geometry/Rect2.h
UTF-8
6,012
3.09375
3
[]
no_license
#pragma once #include "Core/Geometry/Point2.h" #include "Core/Geometry/Size2.h" #include "Core/Math/MathHeader.h" MEDUSA_BEGIN; template<typename T> class Rect2 { public: const static Rect2 Zero; const static Rect2 Max; Point2<T> Origin; Size2<T> Size; T* GetBuffer(){return (T*)this;} T Left()const{re...
true
7d7b69282cadf8e99f159ce5b6ffb76dcd861935
C++
goatman/M5AtomMatrix
/serial01/Touchdesigner-Arduino/Serial_Input_Rev1/Serial_Input_Rev1.ino
UTF-8
795
3.015625
3
[ "MIT" ]
permissive
int thirdSensor = 0; // digital sensor int inByte = 0; // incoming serial byte int switchPin = 12; int ledPin = 11; void setup() { // start serial port at 9600 bps: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } pinMode(ledP...
true
24c9fa4820981bf0555998025d71d576e78ab192
C++
PhenomJ/2D_TileMap_Games
/RPG_Game/Sprite.cpp
UTF-8
3,357
2.515625
3
[]
no_license
#include <fstream> #include <reader.h> #include "Sprite.h" #include "GameSystem.h" #include "Frame.h" #include "Texture.h" #include "ResourceManager.h" Sprite::Sprite(LPCWSTR texturefileName, LPCWSTR scriptfileName, float rotate) : _currnetFrame(0), _frameTime(0.0f), _srcTexture(NULL), _texturefileName(texturefileNa...
true
1952666c45786663b24ae35a23f90f19a13f639b
C++
lukaszwoznica/algorithms-and-data-structures
/bst.cpp
UTF-8
3,128
3.65625
4
[]
no_license
<iostream> #include <queue> #include <cmath> using namespace std; struct Details{ string name; double ratio; int position; }; struct Compare{ bool operator ()( Details & el1, Details & el2){ if(el1.ratio < el2.ratio) return true; if(el1.ratio > el2.ratio) ...
true
3a1c0161744fa72dcba11c26f9e5277607e9ffac
C++
crimsondusk/cobalt
/src/types/udp.cc
UTF-8
3,431
2.71875
3
[]
no_license
#include <sys/socket.h> #include <sys/types.h> #include <sys/time.h> #include <netinet/in.h> #include <string.h> #include <fcntl.h> #include "udp.h" #include "bytestream.h" #include "format.h" #include "flood_throttle.h" namespace cbl { // ----------------------------------------------------------------------------- ...
true