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
f0f340f2dcbf14a30688d3d2558b072047cff143
C++
h005/vptools
/amtclassify/svm2k/feaExtra.cpp
UTF-8
999
2.796875
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <string.h> // input 2D fea file name and 3D fea file name // remove the case name only remains the fea vector int main(int argc,char *argv[]) { if(argc < 3) { std::cout << "parameter not enough "<< std::endl; } else { // deal 2D ...
true
9df038f72cc23f934ce16488cf2adecd0c6cc6d7
C++
lmoz25/NES_Emulator
/src/cpu/CPU_Timer.cpp
UTF-8
722
3.109375
3
[]
no_license
#include "CPU_Timer.h" #include "ThreadUtils.h" volatile uint8_t CPU_Timer::extra_cycles = 0; CPU_Timer::CPU_Timer(const uint8_t& cycles) { runner = std::make_unique<std::thread>(time, cycles); } CPU_Timer::~CPU_Timer() { runner->join(); } void CPU_Timer::time(const uint8_t& cycles) { auto instruction_...
true
556b506d0cfaddc56b7d8129abf730416a49504c
C++
jeafleohj/GameOfLife
/src/world.cpp
UTF-8
1,540
2.625
3
[]
no_license
#include "world.h" #include <random> #include <chrono> #include <thread> World::World(int n) :n(n) { std::default_random_engine generator; std::bernoulli_distribution dist(0.06); //std::binomial_distribution<int> dist(20,.00001); //std::poisson_distribution<int> dist(.0004); p=new Cell***[n]; const GLfloat l=3....
true
583663b5f95927923cb6ffa321d9503fff12a407
C++
AskuSU/GB_P2_HW_L7
/Task2.cpp
UTF-8
787
3.296875
3
[]
no_license
#include"Task2.h" std::shared_ptr<Date> maxDate(const std::shared_ptr<Date>& date1, const std::shared_ptr<Date>& date2) { if (date1.get()->getYear() > date2.get()->getYear()) return std::shared_ptr<Date>(date1); else if(date1.get()->getYear() < date2.get()->getYear()) return std::shared_ptr<Date>(date2); else if(da...
true
fd87721db6a0c390cc9b3c890d8843f7fd1bffc0
C++
martin-favre/asciigraphicsv2
/textgraphics.hpp
UTF-8
1,721
2.59375
3
[]
no_license
#ifndef TEXTGRAPHICS_HPP #define TEXTGRAPHICS_HPP #include <vector> #include <string> #include <chrono> #include <climits> #include <map> #include "pixel.hpp" #include "gameobject.hpp" #include "imgcontainer.hpp" class Textgrafs{ public: Textgrafs(); void add_border(const Pixel & p, int px, int py, int sizex, int ...
true
5c4dbbab476451232e76dfb356d728269dea215b
C++
slollo/basachky
/List.hpp
UTF-8
1,402
2.875
3
[ "MIT" ]
permissive
/* * List.hpp * * * Copyright (C) 2019 Max V. Stotsky <maxstotsky@gmail.com> * */ #ifndef LIST_HPP #define LIST_HPP #include <iostream> #include "HeadTail.hpp" #include "IsEmpty.hpp" template <class EType> struct ListNull { typedef EType Type; typedef size_t KeyT; }; template <class EType, EType ele...
true
7a555f9dcbfd4cab2a640f245171985fddeb143e
C++
Bpara001/CS_UCR
/cs12/cs12old/assignment5/clickable.cpp
UTF-8
3,314
3.390625
3
[]
no_license
// Course: CS 12 quarter 2 , 2010 // // First Name: Christopher // Last Name: Wong // Login id: wongc // email address: cwong030@student.ucr.edu // Student id: 860 923 521 // // Lecture Section: 001 // Lab Section: 021 // TA: Denise Duma // // Assignment: Programming Assignment 5 // // I hereby certify that the code in...
true
9296f21ba2544fcc7faa6fd9aea7c360773568e6
C++
huangzhemin/LeetCode
/9 Palindrome Number.cpp
GB18030
1,146
3.578125
4
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <stack> #include <sstream> #include <map> #include <set> using namespace std; typedef struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} ...
true
aa61a92ea12c4d28217529165bab3020d5546985
C++
aqlan-hussin/USCS20
/payRoll.cpp
UTF-8
1,060
3.1875
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdlib> #include <iomanip> using namespace std; int main() { int id, hours; double gross, tax, kwsp, deduct, netPay; double const empUnion = 10; ofstream pay("payRoll.dat"); if (pay.fail()) { cout << "The file was not successfully opened"; exit(1); } wh...
true
7d538c6f552adedb87f65d49ede89f0ca181ee1e
C++
brucexia1/DesignPattern
/src/algorithm/xsSearch.cpp
GB18030
1,305
3.453125
3
[ "MIT" ]
permissive
#include "xsSearch.h" //ֲ㷨 template<typename T> int BinSearch(std::vector<T> &vec, int key) { if (vec.empty()) return -1; int low(0), high(vec.size() - 1), mid(0); while (low <= high){ mid = low + (high - low) / 2; if (vec[mid] == key) return mid; if (vec[mid]>key) high = mid - 1; else l...
true
3a34a173fdd91ed4daa5361c63db7c932ac3e0a2
C++
lyubolp/OOP-SI-2021
/week10/code/main.cpp
UTF-8
720
3.5
4
[]
no_license
#include <iostream> #include <fstream> class Foo{ public: Foo() = default; friend std::istream& operator>>(std::istream& in, Foo& object); friend std::ostream& operator<<(std::ostream& out, const Foo& object); private: int first; int second; int third; }; std::istream& operator>>(std::istream...
true
ca0baecb0c7035855cd86181e0c52e40a2cfdd48
C++
havocykp/Project-Development
/密码本/密码本/密码本.cpp
GB18030
5,998
2.75
3
[]
no_license
// 뱾.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include "data.h" #include <stdlib.h> #include "ctrl.h" #include <string.h> #include <windows.h> #include <conio.h> #pragma comment(lib, "winmm.lib") //void setColor(int color); //void setCurson(int x, int y); //ҪʾIJ˵ char *menu[] = { "\t\t\t\t 1. 鿴\t ...
true
43ac969d2427162cda39ac8633994d224cb63c82
C++
Starterware/MyCraft
/Playground/Languages/c++/DataStructures/Stack.cpp
UTF-8
1,032
3.640625
4
[]
no_license
#include "gmock/gmock.h" #include <stack> using namespace ::testing; /* Stacks are a type of container adaptor, specifically designed to operate in a LIFO context (last-in first-out). The standard container classes vector, deque and list fulfill these requirements. */ class Stack : public Test { protected: std::st...
true
aceca5920e5a0b93381a15f67d796ba871f142e8
C++
mz-zajaczkowski/boost_serialize
/main.cpp
UTF-8
3,030
3.234375
3
[]
no_license
#include <bitset> #include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/ptree.hpp> #include <iostream> #include <list> #include <memory> #include <vector> using namespace std; class Attribute { public: Attribute() { m_flags.set(static_cast<size_t>(Flags::isSerializable)); } enum class Flags...
true
0954358fb2e41d4ea88cc2026892f85042e53ecc
C++
averbukh/omniscidb
/Shared/json.h
UTF-8
11,474
2.75
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
// Copyright (c) 2021 OmniSci, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
true
9f6e905daf514ff5ec02bdbc1469328d72d6ce0f
C++
fullsaildevelopment/FSGDEngine
/EDRendererD3D/ViewPortManager.h
UTF-8
6,471
2.609375
3
[]
no_license
#pragma once #include "..\EDRendererD3D\RenderShapeTarget.h" #include "..\EDMath\Float4x4.h" namespace EDRendererD3D { class ViewPortManager { class ViewPort { public: /// The concatenated view and projection matrices to be used with this view port EDMath::Float4x4 viewProjection; EDMath::Float4x4 ...
true
3902924b89ca7cedc6853f3061e45286b2f9b839
C++
PramodShenoy/Competitive-Coding
/Hackerrank/UniversityCodeSprint/volcano.cpp
UTF-8
1,388
2.828125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void print_matrix(int area[][300],int n) { for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { cout<<area[i][j]<<" "; } cout<<endl; } } void calc_effect(int area[][300],int n,int w,int x,int y) { int i,j,k; area[x][...
true
5ba674ee4ba4dd733f6ec8ad3383a22a28ae1f58
C++
gillesgold/ProcessNotification
/EventTracing/event_tracing/event_trace_error.h
UTF-8
430
2.6875
3
[]
no_license
#pragma once #include <cstdint> #include <stdexcept> #include <string> namespace event_tracing { class event_trace_error : public std::runtime_error { public: event_trace_error(const std::string& text, std::uint32_t error_code); explicit event_trace_error(const std::string& text); std::uint32_t get_error_code() co...
true
f6e4505e87520295f0ef0aa203abbb6a8804a1d5
C++
1kzpro/international
/Kazybek/COMP 2710/Exam 2/node_example.cpp
UTF-8
472
2.921875
3
[]
no_license
#include <iostream> #include "single_node.h" using namespace std; int main() { SinglyLinkedList *myListS = new SinglyLinkedList; myListS->insertNode(0, 1); myListS->insertNode(0, 2); myListS->insertNode(0, 3); myListS->insertNode(0, 4); myListS->insertNode(0, 5); myListS->display(); my...
true
6111b3ee978afeb4eb5491d095b12871ea5f766f
C++
zorbathut/glop
/Glop/glop3d/Mesh.h
UTF-8
4,534
3.03125
3
[ "BSD-3-Clause" ]
permissive
// TODO: Add raw accessor for textures and add comments // Add comments // Allow removing points // glBlend // // A simple triangle-based mesh that can be edited and rendered. All data is stored in flat arrays // and rendering is done with vertex arrays. #ifndef GLOP_GLOP3D_MESH_H__ #define GLOP_GLOP...
true
a470b0f23eb27b654428547195c224881d3c1705
C++
LINxu233/Algorithm
/LintCode/407. 加一.cpp
UTF-8
438
2.859375
3
[]
no_license
class Solution { public: vector<int> plusOne(vector<int>& digits) { vector<int> result; int jin_wei=1; for(int i=digits.size()-1;i>=0;--i) { int temp=digits[i]+jin_wei; result.push_back(temp); jin_wei=temp/10; } if(jin_wei>0)...
true
ce525fae62b004a5ce3fe47936d4cdcbc6cd1131
C++
tankiJong/morph-engine
/Engine/Math/Primitives/aabb3.hpp
UTF-8
945
2.546875
3
[]
no_license
#pragma once #include "Engine/Core/common.hpp" #include "Engine/Math/Primitives/vec3.hpp" #undef min #undef max struct aabb3 { aabb3() : min(INFINITY) , max(-INFINITY) {} aabb3(const vec3& center, float size); aabb3(const vec3& center, const vec3& size); /* * 7 ----- 6 * / |...
true
09bd0a4176ee3fe33a55eb470cc646fe6560a161
C++
ecfrantz/AlgoBowl
/verify.cpp
UTF-8
4,606
3.78125
4
[]
no_license
#include <string> #include <iostream> #include <fstream> #include <set> #include <vector> using namespace std; // !!!!! TO VERIFY FILES SIMPLY RUN THIS PROGRAM WITH INPUT AND OUTPUT FILES IN THE SAME DIRECTORY !!!!! // /// Structure that represents an addition action. /// int:sum - summand1 + summand2 (result of act...
true
374444563e58f69e5f6643e375ed16e35960039d
C++
ayushiborkar/Basic-cpp
/palindrom.cpp
UTF-8
380
3.109375
3
[]
no_license
// while-loop // updated 2021-08 #include<stdio.h> #include<conio.h> main() { int a,b,c; b = 0; printf("enter any number:"); // enter 121 scanf("%d",&a); c = a; while(a>0) { b = b*10+a%10; a = a/10; } if(b==c) { printf("%d is a palindrom number",b); } else { printf("%d is not a palin...
true
d6115db5dea7a8335af8d234debd2b7127bd7909
C++
Alpha-car/Baekjoon-Algorithm-Study
/Coding/Baekjoon/C:C++/17140.cpp
UTF-8
2,293
2.78125
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; #define MAX 102 int r, c, k; int A[MAX][MAX]; int row, col; void testprint(){ cout << endl; for(int i = 0; i<row; ++i){ for(int j = 0; j<col; ++j){ cout << A[i][j] << " "; }cout << endl; }cout << endl; } void R_opr(){ for(int ...
true
6b727410fab7238c3acfc7b1e1e407ad70e2d834
C++
ailyanlu1/ACM-10
/Online Judge/uva online judge/uva11859.cpp
UTF-8
1,987
2.8125
3
[]
no_license
/************************************************************** AUTHOR: Hardy TIME: 2016年 08月 05日 星期五 13:59:27 CST ID: uva 11859 TYPE: Nim 博弈 DETAIL: 给出n*m的矩阵,每次选择一行,任选其中大于1的数,把其变成自己的真因 子,当所有的数都变成1的时候游戏结束,最后不能走的人输 TACTICS: 求出没一行的质因子数目的和(包括重复的),每一次操作相当于从一堆 石子中取出k个石子,转变成n堆石子的Nim游戏,求出没一行质因子数目的异或和, 为0则输,否则赢。 *******...
true
0732bd2ee86654d601ee3df798138b9da8a8cbdd
C++
ngk123/algorithms
/spoj/ETF.cpp
UTF-8
1,077
2.75
3
[]
no_license
#include<iostream> #include<cmath> #include<cstdio> using namespace std; typedef unsigned long long ull; bool isPrime[1001]={0}; int ans[1001]; int idx=0; void sieve(int n) { int i,temp,j; isPrime[0]=isPrime[1]=1; isPrime[2]=isPrime[3]=0; temp=sqrt(n); for(i=4;i<=n;i+=2) { isPrime[i]=1; } for(i=3;i<=tem...
true
34733b0a3edf524d0456fbcde5441a19a8071ec6
C++
UNIVERSAL-IT-SYSTEMS/mathgraphica
/gui/functions_gui.cpp
UTF-8
2,554
2.53125
3
[]
no_license
#include "functions_gui.h" #include "ui_functions_gui.h" #include "globalfunctions.h" #include <QMessageBox> Functions_gui::Functions_gui(QWidget *parent) : QWidget(parent), ui(new Ui::Functions_gui) { ui->setupUi(this); valueReturn = -1; m_functionsListPtr = NULL; } Fu...
true
5969c126fa66a47a075fd532979b6144e7e257af
C++
langkamil/Application_Programming_Course_2021
/Bank_simulation/Client.cpp
UTF-8
791
3.53125
4
[]
no_license
#pragma once #include "Client.h" Client::Client(): name("John"), surname("Doe") { cout << "Constructor of class Client without arg. is working.\n"; } Client::Client(string _name, string _surname, Address _address): name(_name), surname(_surname), address(_address) { cout << "Constructor of class Client with 3 arg...
true
f40327153473076fb0fd37dcca0da4b812263739
C++
aeremin/Codeforces
/alexey/Solvers/6xx/676/Solver676E.cpp
UTF-8
2,306
3.015625
3
[]
no_license
#include <Solvers/pch.h> #include "algo/io/baseio.h" #include "iter/range.h" #include "algo/polynomial/polynomial.h" using namespace std; // Solution for Codeforces problem http://codeforces.com/contest/676/problem/E class Solver676E { public: void run(); }; bool isRoot(const Polynomial<int>& p, int x) { if (...
true
cd2703478d47b7560e8397f669c821b0976f09f9
C++
yingwang/Invaders
/Invaders/Bomb.hpp
UTF-8
639
2.515625
3
[]
no_license
// // Bomb.hpp // Invaders // // Created by Ying Wang on 2017-03-26. // Copyright © 2017 Ying. All rights reserved. // #ifndef Bomb_hpp #define Bomb_hpp #include "Bomb.hpp" #include "Sprite.hpp" class Bomb { private: Sprite *sprite; int x; int y; bool rowUpdated; public: Bomb(SDL_Renderer* r,...
true
6c72dfcd1b7697a3377fae35b69f22e74cdf64f8
C++
colvez2020/MQQTTESP32OTAV4
/RTC_user.cpp
UTF-8
4,508
2.8125
3
[]
no_license
#include <MCP7940_ADO.h> #include "RTC_user.h" #define RTC_DEBUG String daysOfTheWeek[7] = { "Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado" }; String monthsNames[12] = { "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio","Agosto","Septiembre","Octubre","Noviembre","D...
true
d3b4d9c5f149cd926558cadfb0b0035ed42ef1eb
C++
JohnSpirit/2048Ai_V4
/treenode.cpp
GB18030
7,240
2.515625
3
[]
no_license
#include "treenode.h" float TreeNode::_weight[4] = { 0.5F,0.0F,0.5F,0.0F }; TreeNode::TreeNode(const Board & origin) :Board(origin) { _eval(); } TreeNode::TreeNode(const TreeNode & origin, int8 dir) : Board(origin) { this->_depth = origin._depth + 1; _root = (TreeNode*)&origin; if (Move(dir)) { AddNum...
true
46c28502ffe8d04856ea9a133524459972aec86f
C++
jsonpark/iplanner2
/src/iplanner/mesh/mesh.h
UTF-8
1,087
2.953125
3
[ "MIT" ]
permissive
#ifndef IPLANNER_MESH_MESH_H_ #define IPLANNER_MESH_MESH_H_ #include <vector> #include <string> namespace iplanner { class Mesh { public: Mesh(); ~Mesh(); void AddVertex(float x, float y, float z); void AddNormal(float x, float y, float z); void AddTexCoord(float u, float v); void AddIndex(int i); voi...
true
bdbbddabd70fba320564d2af7bd13a99cbd91731
C++
boxerprogrammer/TestCode
/NjTest/NinjaSprit/Game/Enemy/Kunai.h
SHIFT_JIS
1,026
2.546875
3
[ "Unlicense" ]
permissive
#pragma once #include "../Projectile.h" class EffectManager; class Kunai : public Projectile { private: int frame_ = 0; int bulletH_ = -1; float speed_ = 1.0f; float centripetalSpeed_ = 0.0f; Vector2f initVel_; std::shared_ptr<EffectManager> effectMgr_; public: /// <summary> /// CeR...
true
4148907999b9040d6566692930a6822935c09a48
C++
green-fox-academy/mate0905
/CLionProjects/Week-4 /Day-1 /Practice 2/main.cpp
UTF-8
298
3.53125
4
[]
no_license
#include <iostream> using namespace std; int main() { int a=5,b,c,amount; cout << "Gave me a random number: "; cin >> b; cout << "Gave me another number: "; cin >> c; amount = a + b + c; cout << "Value of the three variable: " << amount << endl; return 0; }
true
1c973b57b939a0d0a9a5ed3afd92e3e90eb8cee7
C++
saswatsk/Comprehensive-C
/STL And DS & Algo/Stack/Programs/Program to find redundant parenthesis/main.cpp
UTF-8
975
3.921875
4
[]
no_license
// Duplication of balanced parenthesis // https://www.youtube.com/watch?v=aMPXhEdpXFA #include<iostream> #include<cstring> #include<stack> using namespace std; bool findRed(string str) { stack<int> s; for (char temp : str) { // push if you get opening brackets or any other characters if (temp...
true
3e0e94403eb3e905a04c55bd468df0504af6ec64
C++
manolo5535/MyInvicibleLibrary
/InvincibleServer/DataBase.h
UTF-8
1,610
2.8125
3
[]
no_license
#ifndef INVINCIBLESERVER_DATABASE_H #define INVINCIBLESERVER_DATABASE_H #include <iostream> #include <fstream> #include <SFML/Network/Packet.hpp> #include "Singleton.h" #include "FaultTolerance.h" class DataBase { private: /** * @brief Almacena la tabla en los discos * @param string content * @par...
true
3f5ea29a25608443240c0d347839514340dd8b3f
C++
Chris--B/CSCI441-Zelda64
/include/Cameras/ArcBallCamera.hpp
UTF-8
597
2.515625
3
[]
no_license
#pragma once #include "Utils.hpp" #include "Cameras/CameraBase.hpp" /* * Arc Ball Camera, the camera moves around a control point while mantaining * a radius around the point. * * This camera class assumes an x,z plane and y with the up direction. * */ /************************* DRAW ARC BALL CAMERA ******...
true
e3ce3abfc9ce266de99adcdb72c1fceda15ffdb5
C++
alex-Symbroson/Advent-of-Code
/2018/092_-2.cpp
UTF-8
1,310
2.765625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <vector> const uint players = 400, marbles = 7186400; uint score[players], cur = 0; std::vector<uint> marble = {0}; #define D(...) //__VA_ARGS__ int main() { uint i, n, max; for(i = 0; i < players; i++) score[i] = 0; for(i = 1; i <= marbles; i++)...
true
8a5f62fd0aa3b0d3d5d581f0f4719c03dcb1cd13
C++
cemysf/itu-blg
/blg252e/objehw1_yedek/SystemManager.h
UTF-8
7,572
3.453125
3
[]
no_license
#ifndef SYSTEMMANAGER_H_INCLUDED #define SYSTEMMANAGER_H_INCLUDED #include <string> #include <iostream> using namespace std; class Seat { unsigned short int rowNumber; char column; bool booked; Seat *next; public: }; class FlightSection { int seatClass; Seat *head; FlightSection...
true
867e3b48e10c796d58cf1c8a1d75a9c0c68b0bb4
C++
ParamDeshpande/micromouse
/mbed/src/path_planner.cpp
UTF-8
13,935
2.53125
3
[]
no_license
#include "../include/commons.h" #include "../include/path_planner.h" #include "../include/sensor_commons.h" #include "../include/motor_commons.h" #include "../include/maze_commons.h" bool check_left_wall(void) { if ((side_left_IR > hasLeftWall)){ return TRUE; } return FALSE; } bool check_right_wall(void) {...
true
76497947e33776f9cbfab5acef047c23d243b43c
C++
joakimvrangum/photon-rickroll-alarm-clock
/src/photon-AlarmClock/src/tft_screen.cpp
UTF-8
3,412
2.75
3
[]
no_license
#ifndef TFT_SCREEN_CPP #define TFT_SCREEN_CPP /* * Project VekkerklokkePhoton * Description: -- * Author: Joakim Vrangum * Date: 06.04.18 */ #include "tft_screen.h" String currDay; int ukedagNum; int mndNum; int timeNum; int minuttNum; int sekundNum; void Scre...
true
298704390245c541f087f52851100023d486cc3d
C++
Mesywang/EPSILON_Noted
/EPSILON/core/vehicle_model/src/vehicle_model/vehicle_model.cc
UTF-8
2,292
2.5625
3
[ "MIT" ]
permissive
#include "vehicle_model/vehicle_model.h" #include "common/math/calculations.h" #include "odeint-v2/boost/numeric/odeint.hpp" namespace odeint = boost::numeric::odeint; namespace simulator { VehicleModel::VehicleModel() : wheelbase_len_(2.5) { UpdateInternalState(); } VehicleModel::VehicleModel(double wheelbase_le...
true
824b85dcdbff4bbffb470182acd3e19b7ea74ebc
C++
mscoccimarro/odd-sentiment-analysis
/Grupo3/src/ProcesadorSet.cpp
UTF-8
2,823
2.9375
3
[]
no_license
#include "ProcesadorSet.h" #include "ProcesadorReviews.h" #include "UtilesTexto.h" #include <iomanip> #include <vector> #include <iostream> #include <fstream> #include <time.h> #define MAX_REVIEWS_PROC 5000 #define TOTAL_REVIEWS 25000 #define SEC_PER_MIN 60 #define OK 0 using namespace std; ProcesadorSet::ProcesadorSe...
true
b8d89e5389db28c505001d7877a7dce6a0bad7c5
C++
chrisdembia/pyne
/cpp/data.cpp
UTF-8
14,631
2.734375
3
[ "BSD-2-Clause" ]
permissive
// Implements basic nuclear data functions. #include "data.h" /*****************************/ /*** atomic_mass Functions ***/ /*****************************/ std::map<int, double> pyne::atomic_mass_map = std::map<int, double>(); void pyne::_load_atomic_mass_map() { // Loads the important parts of atomic_wight tab...
true
495b08f89a40dd4c13d80944ecc49382bdc66898
C++
FullscreenSauna/School-12th-grade
/First Semester/exam_task_AlexanderDzhekov/exam_task_AlexanderDzhekov/exam_task_AlexanderDzhekov.cpp
UTF-8
2,154
3.65625
4
[ "MIT" ]
permissive
#include <iostream> using namespace std; //triangle area by points coordinates double area(int x1, int y1, int x2, int y2, int x3, int y3) { return abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0); } bool isInTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int x, int y) { float A = area(x1, y...
true
313b1062d2212422fc7435460f57e266010d36e3
C++
denis-shcherbinin/snake-game
/src/input.cpp
UTF-8
1,432
2.921875
3
[]
no_license
#include "engine.hpp" void Engine::input() { sf::Event event = {}; while(window_.pollEvent(event)) { switch (event.type) { case(sf::Event::Closed): { window_.close(); break; } case(sf::Event::KeyPressed): { // Quit if(sf::Keyboard::isKeyPress...
true
178e8fd259c012b8a86f568ad3f810415780c783
C++
danielondon/algorithms
/cpp/include/common.h
UTF-8
6,633
3.25
3
[]
no_license
#include <sstream> #include <iostream> #include <vector> #include <unordered_set> #include <iterator> // for ostream_iterator #include <algorithm> #include <memory> #include <map> #include <queue> #include <climits> #include <cmath> using namespace std; template<typename EnumType> using UnderlyingType = typename std:...
true
dbfa7143c6d2e9e16b2fc41fa9f6e1e7af8a86d6
C++
LYHyoung/BaekJoon
/BOJ solve/10000~19999/10000~10999/10844/main.cpp
WINDOWS-1252
670
2.734375
3
[]
no_license
#include <iostream> #include <cstring> #define MOD 1000000000 using namespace std; int n, ans; int dp[101][10]; int func(int l, int x) { if (l == 1) return x == 0 ? 0 : 1; int& ref = dp[l][x]; // ۷ if (ref != -1) return ref; if (x == 0) return ref = func(l - 1, 1) % MOD; if (x == 9) r...
true
34b148e80f803c6446abfc46044e7766fda2ac78
C++
xylifyx2/humitemp
/src/main.cpp
UTF-8
2,585
2.5625
3
[]
no_license
#include <Arduino.h> #include <ESP8266WiFi.h> #include <PubSubClient.h> #include "config.h" #include "DHT.h" extern void setup_dht(); extern void setup_wifi(); extern void setup_mqtt(); extern void read_dht_values(); extern void publish_data(); extern void reconnect(); WiFiClient espClient; PubSubClient client(espClie...
true
84b4b5dbfe09aa2396e14972da65bbbcd4f55052
C++
rdg/cao001
/cao001/src/system/Strand.h
UTF-8
456
2.609375
3
[]
no_license
#pragma once #include "ofMain.h" // Line class Line { public: ofPoint start; ofPoint end; }; // Group of Lines class Strand { public: Strand(); void update(int maxLines); void render(); void addLine(); void extendLine(); void reset(); void setInfluence(float value); const float & getInfluence(); const ofP...
true
291266707efaf59c7eea5d53ef40cb0525f3d56e
C++
SashaKryzh/CPP_Pool
/d05/ex05/CentralBureaucracy.hpp
UTF-8
673
2.546875
3
[]
no_license
#if !defined(CENTRAL_BUREAUCRACY_HPP) #define CENTRAL_BUREAUCRACY_HPP #include <string> #include "OfficeBlock.hpp" class CentralBureaucracy { private: struct s_queueTargets { std::string name; s_queueTargets *next; }; OfficeBlock blocks_[20]; s_queueTargets *queueTargets_; s...
true
4c54ff142e60b6ebc13f05d34c6c18e8851b9f7d
C++
sust18023/ACM
/KuangBin/专题四 最短路练习(AK)/Subway.cpp
UTF-8
1,664
2.96875
3
[]
no_license
/* Subway POJ - 2502 https://cn.vjudge.net/problem/POJ-2502#author=0 题面: 从家到学校,可以选择坐(40km/s)地铁或(10km/s)步行,求最短时间 输入 第一行 起点坐标,终点坐标 下面是每个地铁经过的站 知道-1 -1结束 样例输入: 0 0 10000 1000 0 200 5000 200 7000 200 -1 -1 2000 600 5000 600 10000 600 -1 -1 样例输出: 21 解法: 建图,跑一遍Floyed-Warshall */ #include ...
true
ab119b1e787fd3475a2a1416f814409b764f894c
C++
satyaaditya/My_C
/placing 2n elements in array_backtracking.cpp
UTF-8
841
3.640625
4
[]
no_license
//this program is placing arrray of 2*n elements in array with i th element in i distance to other ith element #include<stdio.h> #include<conio.h> #include<stdlib.h> bool make_array(int *, int , int ); int main(){ int n; printf("enter size of array ::: "); scanf("%d", &n); int *arr = (int*)calloc(2 * n, sizeof(int)...
true
c5e9a0d2c7b0368e0c3e80b5e62fe6d46e2791ca
C++
huleiak47/leetcode
/1.两数之和.cpp
UTF-8
1,407
3.5625
4
[]
no_license
/* * @lc app=leetcode.cn id=1 lang=cpp * * [1] 两数之和 * * https://leetcode-cn.com/problems/two-sum/description/ * * algorithms * Easy (46.48%) * Likes: 5997 * Dislikes: 0 * Total Accepted: 506.3K * Total Submissions: 1.1M * Testcase Example: '[2,7,11,15]\n9' * * 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出...
true
8161c649a309adf0ff402600b6191f50fee4e817
C++
anupamkaul/robot_ball_chaser
/samples/simple_arm/workspace/catkin_ws/src/simple_arm/src/look_away.cpp
UTF-8
4,063
3.265625
3
[ "MIT" ]
permissive
// A good example of clients of nodes that invoke services , and also how a node can subscribe to multiple topics //To see a ROS subscriber and client in action, you'll write a node called look_away. The look_away node will subscribe to the /rgb_camera/image_raw topic, which has image data from the camera mounted on t...
true
8621610579eb052ea462a5b92f5a1d4206ee5164
C++
TotteKarlsson/atapi
/source/arraybot/process/atTrigger.h
UTF-8
3,989
2.78125
3
[ "BSL-1.0", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
#ifndef atTriggerH #define atTriggerH #include "atABExporter.h" #include "atATObject.h" #include <string> #include "dslTimer.h" #include <vector> #include "dslXMLUtils.h" #include "atUtils.h" //--------------------------------------------------------------------------- using std::string; using std::vector; namespace ...
true
c26d350a43c2f1d8e00c8ee8e1ced86038c3733e
C++
BigDeviltjj/design-patterns
/builder_maze.cpp
UTF-8
2,814
3.515625
4
[]
no_license
#include<algorithm> #include<iostream> #include<cstdio> #include<vector> #include<string> using namespace std; enum Direction { EAST, WEST, NORTH, SOUTH }; class MapSite { public: virtual void Enter() = 0; }; class Room : public MapSite { public: Room(int roomNo){ _roomNumber = roomNo; ...
true
1ac38db6d3cca8dd9334d7da4ac74d83c881ba6c
C++
JISyed/LGE-Game-Engine
/LGE_GameEngine/LittleGameEngine/src/PCS/PCSTree.cpp
UTF-8
13,820
2.9375
3
[ "MIT" ]
permissive
#include <stdio.h> #include <assert.h> #include <string.h> #include "PCSTree.h" #include "PCSNode.h" #include "PCSTreeForwardIterator.h" #include "PCSTreeReverseIterator.h" namespace lge { // // C-Helper Functinos // // Used to unlink an entire local branch of the tree void unlinkBranchesFrom(PCSNode* headNode)...
true
31bd90741404840ede6a06c8a4bd2375bacd9945
C++
vmware/concord-bft
/utt/libutt/test/TestRootsOfUnity.cpp
UTF-8
5,589
2.6875
3
[ "Apache-2.0", "MIT" ]
permissive
#include <utt/Configuration.h> #include <utt/PolyCrypto.h> #include <utt/PolyOps.h> #include <xassert/XAssert.h> #include <xutils/Log.h> #include <xutils/Utils.h> #include <libfqfft/polynomial_arithmetic/basic_operations.hpp> #include <set> #include <iomanip> #include <vector> #include <queue> using namespace libu...
true
a15d625eacc8420d9239117b5cabb55f944971a8
C++
s1ddb/ClassesDone
/database.cpp
UTF-8
498
3.03125
3
[]
no_license
#include <iostream> #include "database.h" using namespace std; //funt header database::database() { title = new char[20]; } //title header char* database::getTitle() { return title; } void database::setTitle(char* userinput) { strcpy(title, userinput); //sets the title to userinput } int database::ge...
true
9a262d887f7a208d58a4afb6ccc1545fc9f72407
C++
sirecho/Sheila
/src/piece.h
UTF-8
2,540
3.53125
4
[]
no_license
/* * piece.h * * Created on: Dec 21, 2015 * Author: Eirik Skogstad */ #ifndef PIECE_H_ #define PIECE_H_ #include <vector> #include "side.h" #include "board.h" #include "position.h" class Piece { public: Piece(Side side, Position position); virtual ~Piece(){} Side getSide() { return side_; }...
true
be61ef40a2e0f4fcb3c4b8b2226f91255a8dd5ac
C++
PranakBarua/CodeForces
/1054a.cpp
UTF-8
383
2.78125
3
[]
no_license
#include<iostream> #include<cstdio> using namespace std; int main() { int a,b,c,d,e,f,x,y,z; cin>>a>>b>>c>>d>>e>>f; x=(a-b)*d; if(x<0) x=x*(-1); y=((a-c)*e); if(y<0) y=y*(-1); y=y+(2*f); z=((a-b)*e); if(z<0) z=z*(-1); z=z+y+f; if(z<=x) cout<<"Y...
true
0725e1a620d974e9e5a53b70b9cba9e315343dcd
C++
kolya-t/PillClicker
/mainwindow.cpp
UTF-8
4,450
2.5625
3
[]
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QRect> #include <QDesktopWidget> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), _timer(new QTimer(this)), _pillsCount(0), _step(1) { connect (_timer, SIGNAL(timeout()), this, SLOT(nullMultiplier())...
true
7de64958b1906e66b30f3845c8dfaff51dbc233f
C++
dumpinfo/CppConcurrency
/chap9/WorkStealingQueue.h
UTF-8
1,025
3.5
4
[]
no_license
#pragma once #include <deque> #include <mutex> #include "FunctionWrapper.h" class WorkStealingQueue { using DataType = FunctionWrapper; public: WorkStealingQueue() = default; WorkStealingQueue(const WorkStealingQueue& other) = delete; WorkStealingQueue& operator=(const WorkStealingQueue& other) = delete; ...
true
91d4da6140137c2d55cb8ff100dfbffc6f26ad16
C++
jrl-umi3218/tvm
/src/constraint/BasicLinearConstraint.cpp
UTF-8
6,810
2.5625
3
[ "BSD-3-Clause" ]
permissive
/** Copyright 2017-2020 CNRS-AIST JRL and CNRS-UM LIRMM */ #include <tvm/constraint/BasicLinearConstraint.h> #include <tvm/Variable.h> namespace tvm { namespace constraint { BasicLinearConstraint::BasicLinearConstraint(const MatrixConstRef & A, VariablePtr x, Type ct) : BasicLinearConstraint(std::vector<MatrixCons...
true
6141a24d684af4259e6c82913afb1bfe251dc3c4
C++
chetanpatil5/Reference
/Reference.cpp
UTF-8
1,254
3.734375
4
[]
no_license
#include<iostream> #include<string> using namespace std; int main() { int Data = 5; cout << "\nData : " << Data<<endl; int &ref = Data; cout << "Address of Data : " << &Data << endl; cout << "Address of Reference : " << &*&ref << endl; cout << "Ref : " << ref<<endl; int x = 1; ref = x; cou...
true
34e3ea55236679c92644a5db19d62653c6e33d3d
C++
kronicler/cs2040_DSnA
/KattisPractices/James/judgingmoose.cpp
UTF-8
299
3.453125
3
[]
no_license
#include <iostream> using namespace std; int main () { int left, right; cin >> left >> right; if (left + right == 0) { cout << "Not a moose" << endl; } else if (left == right) { cout << "Even " << 2*left << endl; } else { cout << "Odd " << 2*max(left,right) << endl; } return 0; }
true
d6897c635b57eb7a76e83bdc3433779f41c55a4e
C++
pxhmeiyangyang/USC_SDK_PXH
/sourcecode(occode)/Common/WaveHeader.cpp
UTF-8
5,379
2.578125
3
[]
no_license
// // WaveHeader.cpp // usc // // Created by hejinlai on 13-11-8. // Copyright (c) 2013年 yunzhisheng. All rights reserved. // #include <stdlib.h> #include "WaveHeader.h" // wav头部结构体 struct wave_header { char riff[4]; unsigned long fileLength; char wavTag[4]; char fmt[4]; unsigned long siz...
true
0c29fdd896321a40a2888078c113001523bad456
C++
BigSirj1993/AP_Assignment2_2021_NickSirju-TextAdventure-
/AP_Assignment2_2021_NickSirju(TextAdventure)/Enemy.cpp
UTF-8
906
3.015625
3
[]
no_license
#include "Enemy.h" //Done Enemy::Enemy(int level) { this->level = level; this->healthMax = rand() % (level * 10) + (level * 2); this->health = this->healthMax; this->damageMax + this->level * 2; this->damageMin + this->level * 1; this->dropChance = rand() % 100 + 1; this->defense = rand() % level * 5 + 1; thi...
true
8e32f97005cd4b2349c1680b27a763f468fac6c0
C++
abhiga/WebServer
/myhttpd.cpp
UTF-8
9,334
2.625
3
[]
no_license
const char * usage = " \n" "myhttpd <port> for iterative server \n" "myhttpd -f <port> for server with fork/processes \n" "myhttpd -t <port> for server with multiple threads \n" "myhttpd -p <port> for server with ...
true
ed89f60b5fc7755b5c8444a32f2b5da7d7fedadb
C++
yotamra/AIProject
/include/image.h
UTF-8
12,459
2.8125
3
[]
no_license
#ifndef H_IMAGEPP #define H_IMAGEPP #include <Windows.h> #include <cv.hpp> #include <cxcore.h> #include <cvaux.h> #include <boost/shared_ptr.hpp> #include <vector> #include <string> #include "prims.h" typedef unsigned char byte; namespace CPP { using cv::Mat; typedef std::pair<int,int> int_pair; inline void cal...
true
5313a6663ba0b69ca1173cc984a3da08c9f1b0a4
C++
raf-iq/Uva-solved-problems
/Accepted C++ codes/uva12157.cpp
UTF-8
707
2.765625
3
[]
no_license
#include<bits/stdc++.h> #define ll long long int using namespace std; int main() { int T,test=1; cin >> T; while(T--){ int n; cin >> n; int mile=0,juice=0; for(int i=0; i<n; ++i){ int nn; cin >> nn; mile+=(nn/30+1); ...
true
4db4c84bd2cb97613e4921e79465590fa0088097
C++
Vegtam/Roguelike
/src/Random.cpp
UTF-8
426
3
3
[]
no_license
#include <cstdlib> #include <ctime> #include "Random.hpp" Random* Random::rnd = NULL; bool Random::init = false; Random::Random() { srand(time(NULL)); init = true; } Random* Random::get() { if(!init) { rnd = new Random(); } return rnd; } int Random::randInt() { return rand(); } float Random::randFloat(fl...
true
9770107752b571e5e700f363d6e471ef723f4de9
C++
sudo-logic/ballistica
/src/ballistica/scene_v1/node/locator_node.h
UTF-8
1,921
2.625
3
[ "MIT" ]
permissive
// Released under the MIT License. See LICENSE for details. #ifndef BALLISTICA_SCENE_V1_NODE_LOCATOR_NODE_H_ #define BALLISTICA_SCENE_V1_NODE_LOCATOR_NODE_H_ #include <string> #include <vector> #include "ballistica/scene_v1/node/node.h" namespace ballistica::scene_v1 { class LocatorNode : public Node { public: ...
true
93ebe80feee8366c377662f19835990b0f5d6c44
C++
91khr/91khr.github.io
/dev/helpers.hpp
UTF-8
2,005
3.09375
3
[]
no_license
#ifndef HELPERS_HPP_INCLUDED #define HELPERS_HPP_INCLUDED #include <cstdio> #include <cstdarg> #include <string> #include <unordered_map> #include <chrono> namespace chrono = std::chrono; struct FileIO { FILE *handle; FileIO() : handle(nullptr) {} FileIO(const FileIO &) = delete; FileIO(FileIO &&) = d...
true
72a38c7bfd777a23d8c5ac5b30274cd3c503a515
C++
zhichengzhang1995/16
/lab04/countEvens.cpp
UTF-8
299
2.84375
3
[]
no_license
#include "arrayFuncs.h" #include <cstdlib> #include <iostream> int countEvens(int a[], int size) { int c = 0; int x; for (int i=0; i<size; i++) { x = a[i]; if (x < 0) x = x * (-1); if (x == 0) c++; else if (x % 2 == 0) c++; } return c; // STUB! Replace with correct code. }
true
a40fb3b5f3ee84c3bf6e95ead06fcd8685469f45
C++
ProjectViman/viman
/viman_control/src/utility/vm_sensor_data.cpp
UTF-8
1,670
2.515625
3
[ "BSD-3-Clause" ]
permissive
#include <ros/ros.h> #include <geometry_msgs/PointStamped.h> #include <sensor_msgs/Imu.h> #include "imumath_brief.h" // If set displays quaternion read by IMU #define SHOW_QUAT 0 Quaternion q; Cardan angles; double height; void HeightCallbck(const geometry_msgs::PointStamped& height_){ height = height_.point.z; }...
true
df5d07451ba0e7fce2782a02a7488f15cb03997f
C++
leisheyoufu/study_exercise
/algorithm/leetcode/69_sqrt_x/main2.cpp
UTF-8
1,017
3.890625
4
[]
no_license
/* 69. Sqrt(x) Implement int sqrt(int x). Compute and return the square root of x. */ #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; class Solution { public: int mySqrt(int x) { if(x <=0) { return 0; } int left = 1; i...
true
df7b936873e6abde55b1f2fc99a8e90b59c0ac83
C++
DemjanGolubovski/Qt_Project
/C++/Vezbi_09_Site_Zadaci/Matrica.cpp
UTF-8
4,862
3.3125
3
[]
no_license
#include <iostream> #include <cassert> #include "Matrica.h" using namespace std; // Constructor Matrica::Matrica(int red, int kol){ redici=red; koloni=kol; matrica=new int[red*kol]; assert(matrica!=0); for(int i=0; i<red*kol; i++){ matrica[i]=0; } } // Constructor Matrica::Matrica(int ...
true
9b42aa5ebb56fe9032f232baa99bbd402eb01712
C++
yclizhe/acm
/POJ/1953/1.cpp
UTF-8
318
2.953125
3
[]
no_license
#include <iostream> using namespace std; int f(int n, int e) { if(n==1) return 1; if(e==0) return f(n-1,0)+f(n-1,1); else return f(n-1,0); } int main() { int N; cin >> N; int count = 0; while(N--) { int n; cin >> n; cout << "Scenario #" << ++count << ":\n" << f(n,0)+f(n,1) << endl << endl; } }
true
caff4777c9da4fcf699bdeef0980c4cb1acc7723
C++
MHDante/CPS511_Assignment1
/Game.cpp
UTF-8
8,248
2.609375
3
[]
no_license
#include "Game.h" #include "Camera.h" #include "GLUtils.h" #include <iostream> #include <thread> #include "VarMesh.h" Game* Game::instance = nullptr; //=****************************************************************** //Scene Modelling Program //=******************************************************************** ...
true
ded4dd15714c16eb625af758648e741e0b714588
C++
eduardo-mior/URI-Online-Judge-Solutions
/Iniciante/URI 1008.cpp
UTF-8
291
3.0625
3
[]
no_license
#include <iostream> int main() { int funcionarios, horas; float valorPorHora, salario; scanf("%d %d %f", &funcionarios, &horas, &valorPorHora); salario = horas * valorPorHora; printf("NUMBER = %d\n", funcionarios); printf("SALARY = U$ %.2f\n", salario); return 0; }
true
00ac4ec08e7d371715122726fcf67fefcda9a56d
C++
joaorabelo1121/Sistema-de-Operadora-de-Celular
/Date.h
UTF-8
444
2.609375
3
[]
no_license
#ifndef _DATE_H #define _DATE_H #include <iostream> using namespace std; class Date{ private: unsigned int dia; unsigned int mes; unsigned int ano; unsigned int hora; unsigned int minuts; public: Date(); Date(unsigned int _dia, unsigned int _mes, unsigned int _ano, unsigned int _hora, unsi...
true
84a4c778c91d999e6893083957fac983ba766782
C++
sg-p4x347/ECS-Database-Test
/ConsoleApp/main.cpp
UTF-8
1,504
2.96875
3
[]
no_license
#include <iostream> #include "WorldEntityManager.h" #include "WorldEntityCache.h" #include "Position.h" #include "ComponentA.h" #include "ComponentB.h" typedef WorldEntityManager<Position, ComponentA, ComponentB> WEM; template < typename CacheType> void Print(CacheType & cache) { for (auto & entity : cache) { cout...
true
b7c2c06d279b022790f032cef2b1f2b19131a524
C++
ahmadalsajid/UVaCodes
/10935.cpp
UTF-8
508
2.6875
3
[]
no_license
#include<iostream> #include<queue> using namespace std; int main() { int n,i,t; while((cin>>n)&&n){ queue<int>q; for(i=1;i<=n;i++) q.push(i); cout<<"Discarded cards:"; while(q.size()>1){ cout<<" "<<q.front(); q.pop(); if(q.size()>1) cout<<","; ...
true
f73929b46f6b1a0ea4e64e57416d3e329f9a3001
C++
ordinary-developer/education
/cpp/std-11/a_williams-cpp_concurrency_in_action/code/ch_05-cpp_mem_model_and_operations_on_atomic/15-transitive_sync_using_acquire_release_ordering_01/main.cpp
UTF-8
979
3.203125
3
[ "MIT" ]
permissive
#include <atomic> #include <thread> #include <assert.h> std::atomic<int> data[5]; std::atomic<bool> sync1(false), sync2(false); void thread_1() { data[0].store(42, std::memory_order_relaxed); data[1].store(97, std::memory_order_relaxed); data[2].store(17, std::memory_order_relaxed); data[3].store(-141...
true
dd8e9d92ffb33e3435594f4ec31fd2fcc14be65a
C++
wxkkk/edge-computing-practices
/ncnn_mobilenet_yolo/mobilenet.cpp
UTF-8
6,809
2.546875
3
[]
no_license
#include <iostream> #include <vector> #include <string> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/videoio.hpp> #include "net.h" //#include "mat.h" #include "platform.h" #include "timer_counter.h" struct Object { cv::Rect_<floa...
true
f3491ae7da49169e74bbd360eea86402082577d1
C++
kohyatoh/contests
/pku/2504/2504.cpp
UTF-8
1,367
2.734375
3
[]
no_license
#include <stdio.h> #include <math.h> #include <complex> #include <algorithm> using namespace std; #define rep(i, n) for(int i=0; i<(int)(n); i++) const double pi = atan2(0, -1); #define EPS (1e-08) typedef complex<double> P; double cross(const P& a, const P& b) { return imag(conj(a)*b); } P rot90(const P& p) { return ...
true
bd32a1baf017e389942eb9b4fd3b3f494c52284a
C++
Vidyadhar-Mudkavi/gitApplications
/Calendar/calIso.h
UTF-8
1,967
2.546875
3
[ "MIT" ]
permissive
#ifndef _CALISO_ #define _CALISO_ /** *File: calIso.h *Description: this file declares class calIso *Version: 1.2 "@(#) calIso. header. ver. 1.2. Premalatha, Vidyadhar Mudkavi, CTFD, NAL." *Dependencies: *Authors: Premalatha, Vidyadhar Mudkavi, CTFD, NAL. *Date: */ // system in...
true
190f23455fcf96ffe86a60d9221a632accbed5c1
C++
vgerber/projectdraw
/src/Core/Renderer/FlatRenderer/Interface/flat_drawable.h
UTF-8
866
2.859375
3
[]
no_license
#pragma once #include "Core/Scene/drawable.h" #include "Core/Renderer/FlatRenderer/Interface/flat_sceneobject.h" /** * @brief Interface for drawables in FlatRenderer * */ class FlatDrawable : public FlatSceneObject { public: /** * @brief Construct a new Flat Drawable from @ref Drawable * Calls setup ...
true
3c3dd4e0d9b8a15f936a7f1a5cd1bd57515e1c83
C++
rodins/gtk-online-life
/ResultsNet.hpp
UTF-8
1,558
2.515625
3
[]
no_license
// ResultsNet.hpp class ResultsNet { CURL *curl_handle; ResultsParser *parser; string url; public: ResultsNet(ResultsParser *parser) { this->parser = parser; /* init the curl session */ curl_handle = curl_easy_init(); if(curl_handle) { /* remove crash bug */ curl_easy_setopt(curl_handle, CURLOPT_NO...
true
41ef392a72396853b96f822d3234e10d40e093d4
C++
zhr1201/Algorithms
/MedianMaintenance/MedianMaintenance/MedianMaintenance/heap.cpp
UTF-8
1,481
3.59375
4
[]
no_license
#include "heap.h" int BinaryHeap::find_top() { if(current_size == 0) return -1; else return num_array[1]; } void BinaryHeap::insert(int new_element) { int hole = ++current_size; num_array[0] = new_element; if(max_heap) { num_array.push_back(new_element); for(; new_element > num_arr...
true
74b0a808674dab62434325c4d14123db569ecbd2
C++
JayJ72/OSU2016
/Cpp Stuff/Linear Geometry Stuff/Line.cpp
UTF-8
674
3.140625
3
[]
no_license
//Jay Banerji //Assignment 2 CS162 2016 #include "Line.hpp" #include "Point.hpp" #include <cmath> using namespace std; Line::Line (Point point1, Point point2) { this->point1 = point1; this->point2 = point2; } Point Line::getPoint1() { return point1; } Point Line::getPoint2() { return point2; } ...
true
1a76a65ec7991237a0559b1d9fcf127837e98aa9
C++
yananliu000/Projects
/GlarekEngineProject/Engine/Engine/Source/Application/Texture/SFMLSprite.h
UTF-8
1,924
2.90625
3
[]
no_license
#pragma once /** \file SFMLSprite.h */ /** TODO: File Purpose */ // Created by Billy Graban #ifdef _SFML #include <SFML/Graphics/Sprite.hpp> #include <SFML/Graphics/Texture.hpp> #include ".\ISprite.h" namespace Engine { /** \class SFMLSprite */ /** TODO: Class Purpose */ class SFMLSprite : public ISprite { publ...
true
05370fe21002c0d150b321eed818c06ce7bcefab
C++
mbcolson/Academic-Programming-Projects
/Heap/HeapMain.cpp
UTF-8
492
3.265625
3
[]
no_license
#include "Heap.h" using namespace std; int main() { Itemtype i1; Heap h; h.Insert(4); h.Insert(1); h.Insert(7); h.Insert(3); h.Insert(9); h.Insert(2); h.Insert(8); h.Insert(5); cout << "Heap is full: " << (h.IsFull() ? "true" : "false") << endl; c...
true
0a06c0ad54fe636165f8e45eae47616c7ac63b3a
C++
Alpha-0010/Company-Wise-Problems-Leetcode
/Top Interview Questions/Rotate_Image.cpp
UTF-8
663
3.5625
4
[]
no_license
class Solution { public: void rotate(vector<vector<int>>& matrix) { int rows=matrix.size(); if(rows==0){ return; } int cols=matrix[0].size(); // Transpose of the matrix. for(int i=0;i<rows;i++){ for(int j=i+1;j<cols;j++){ swap(m...
true
d038ac1d3838cec9263dce37dda3b1cc86036f12
C++
aurialLoop/kimchiandchips
/oF/addons/ofxCVgui/src/scrBaseMarkers.cpp
UTF-8
858
2.5625
3
[]
no_license
/* * scrBaseMarkers.cpp * pixel correlation * * Created by Elliot Woods on 20/03/2010. * Copyright 2010 Kimchi and Chips. All rights reserved. * */ #include "scrBaseMarkers.h" scrBaseMarkers::scrBaseMarkers() { _hasMarkers=false; } void scrBaseMarkers::setMarkers(std::vector<ofPoint> *x) { _markers=x; ...
true
b0a33c700ad87a7c93dfe19f2914303b64b1c7cd
C++
bibaev/arkanoid
/arkanoid/main.cpp
UTF-8
2,668
2.59375
3
[]
no_license
#include <chrono> #include <string> #include <gl/freeglut.h> #include <algorithm> #include "gl_helpers.h" #include "game.h" #include "config.h" game* game_ptr; static const GLint GAME_FIELD_WIDTH = DEFAULT_GAME_WIDTH; static const GLint GAME_FIELD_HEIGHT = DEFAULT_GAME_HEIGHT; using time_point = std::chrono::high_reso...
true