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
e78080ef560c2a336b5a6c26e8a782c3d3343c5c
C++
huipengly/Cpp-Primer
/ch17/ex17.3/query_result_tuple.h
UTF-8
981
3.015625
3
[ "CC0-1.0" ]
permissive
/** * @brief QueryResult use tuple * * @file query_result_tuple.h * @author huipengly * @date 2018-09-22 */ #ifndef _QUERY_RESULT_H_ #define _QUERY_RESULT_H_ #include <iostream> #include <memory> #include <string> #include <vector> #include <map> #include <set> #include <tuple> typedef std::t...
true
46aab804a38ddf8ca19f281fa0be49341a296be1
C++
lidan233/newCpuRender
/util/manipulation.cpp
UTF-8
4,600
3.171875
3
[]
no_license
// // Created by 李源 on 2019-11-29. // #include "manipulation.h" Vec3f manipulation::m2v(Matrix41 m) { return Vec3f(m[0][0]/m[3][0],m[1][0]/m[3][0],m[2][0]/m[3][0]) ; } Matrix41 manipulation::v2m(Vec3f v) { Matrix41 m ; m[0][0] = v[0] ; m[1][0] = v[1] ; m[2][0] = v[2] ; m[3][0] = 1.f ; ...
true
1c9ea8fb6feef4a6753f7fccafb6b03a8719b8e0
C++
DivyaGoyal28/C_plus_plus
/smartPointer.cpp
UTF-8
1,169
3.515625
4
[]
no_license
#include <iostream> #include <memory> using namespace std; template <typename T> class SP { private: T *ptr; public: static int refcount; SP(T *ptr =NULL):ptr(ptr) { refcount++; } SP(const SP<T>& sp):ptr(sp.ptr) { cout << "copy ctor" <<endl; refcount++; } ~SP() { cout << "delete ptr" <<endl; ref...
true
0559c5050f3f8fa373db231d02fceb4abcc04aca
C++
LiZhenhuan1019/Caculator
/copyable_unique_ptr.h
UTF-8
669
2.9375
3
[]
no_license
#ifndef COPYABLE_UNIQUE_PTR_H #define COPYABLE_UNIQUE_PTR_H #include <c++/bits/unique_ptr.h> template <typename _Tp, typename _Dp = std::default_delete<_Tp> > class copyable_unique_ptr:public std::unique_ptr<_Tp,_Dp> { public: copyable_unique_ptr() = default; using std::unique_ptr<_Tp,_Dp>::unique_ptr; copy...
true
1c58c9258ed2ada09d00e08b149668d21f12cd1a
C++
Benoit3/Sumd-for-Arduino
/Sumd.ino
UTF-8
1,025
2.703125
3
[ "MIT" ]
permissive
#include <ESP8266WiFi.h> #include "SumdRx.h" //remote control status bool failSafe=true; SumdRx *sumdDecoder; void setup() { //Start communication to serial port Serial.begin(115200); delay(100); //Attach SUMD decoder to the serial port sumdDecoder= new SumdRx(); } void loop() { uint8_t index; /...
true
da099e21b2488b3e2d0e43ece03a900beacd9ca9
C++
ciaranegan/graphics_game
/hud.cpp
UTF-8
1,327
3
3
[]
no_license
#include "hud.hpp" HUD::HUD(int gl_width, int gl_height) { assert(init_text_rendering ("freemono.png", "freemono.meta", gl_width, gl_height)); } void HUD::draw(int lives, int level) { _lives_id = add_text("Lives Remaining: ", 0.0f, 1.0f, 75.0f, 0.0f, 0.8f, 0.2f, 0.5f); _level_id = add_text("Level: ", -1.0f, 1.0f,...
true
575adc15e0d27a08dc363602de9088145faadb86
C++
WankaiLiu/pa3-yil317-wal033
/Vertex.cpp
UTF-8
1,495
3.625
4
[]
no_license
#include "Vertex.hpp" #include <iostream> // Method implementations here using namespace std; Vertex::Vertex(const std::string &name){ this->name = name; this->visited = 0; this->distance = 4294967294; } //Add a new edge to the vertex. void Vertex::Addedge(const std::string node,Edge newEdge){ this->edges.inser...
true
9664e74e0afb726df344a3d5d066561e9c319ba1
C++
SAKET-SK/Semester4-SPPU-Data-Structures-and-Files-Lab
/SeqFile.cpp
UTF-8
3,693
3.078125
3
[]
no_license
#include<fstream> #include <iostream> #include<string.h> using namespace std; struct stud { int rno; char nm[10]; }s; void create() { ofstream fout; int n,i; fout.open("stud1.txt",ios::out); //fout=write into file cout<<"\nEnter the Number of record="; cin>>n; for(i=0;i<n;i++) { cout<<"\nEnter roll no...
true
58ec26af5bfa19683c207977aa8c2402234afe77
C++
slallement/domnetwork
/include/Cell.h
UTF-8
1,025
2.640625
3
[]
no_license
#ifndef CELL_H #define CELL_H #include <SFML/Network.hpp> #include <SFML/Graphics.hpp> class Gameboard; sf::Packet& operator>>(sf::Packet& packet, Gameboard& gameboard); sf::Packet& operator<<(sf::Packet& packet, const Gameboard& gameboard); class Cell { public: Cell(){}; Cell(float cellradius, s...
true
98d7585207bd53319af552bb4c997c717606e9af
C++
ligi214/2019-2_DS_project
/hw5/algorithms.cpp
UTF-8
5,687
3.078125
3
[]
no_license
#include <iostream> #include <stdio.h> #include <stdlib.h> #include "algorithms.hpp" using namespace std; #define WHITE 0 #define GRAY 1 #define BLACK 2 int dfs_time = 0; void dfs_visit(Adj_Node** adj_list, DFS_Node** vertices, int s){ dfs_time++; vertices[s]->d_time = dfs_time; vertices[s]->color = GRAY; Adj_N...
true
c0409c021bc81e4048acbd76cb1a3d8b7f6f5d0d
C++
pareddy113/Vehicle-Inventory-System
/src/FileHandle.cpp
UTF-8
1,543
2.953125
3
[]
no_license
#include "FileHandle.h" void FileHandle::writeFile(int id,Car& car){ ofstream myfile; switch(id){ case 1: myfile.open("1.txt"); myfile<<car.id()<<endl<<car.make()<<endl<<car.model()<<endl<<car.year()<<endl<<car.date()<<endl<<car.cost()<<endl<<car.picture(); myfile.close(); break; case 2: myfile.open("2.txt"...
true
88bbef02e24010727576f7745deb3e3150f4c9f7
C++
tenquitran/GreenTopazTracer
/GreenTopazTracer/GreenTopazTracer.h
UTF-8
2,555
2.84375
3
[]
no_license
#pragma once #include "ImagePlane.h" namespace GreenTopazTracerApp { // The ray tracer. class GreenTopazTracer { public: // Parameters: imageWidth - width of the image to trace (in pixels); // imageHeight - height of the image to trace (in pixels); // threadCount - number of thread...
true
50db3eeec44a7fb9c413cbd4a335ee6354f80992
C++
15831944/miniSQL
/miniSQL/miniSQL/index_list.h
UTF-8
1,085
2.625
3
[]
no_license
#pragma once #include <map> #include "typedef.h" #include "element.h" #include <string> #include <vector> using namespace std; class index_list { public: index_list(); ~index_list(); NODE_TYPE m_node_type; int m_parent_offset; int m_next_offset; ATTRIBUTE_TYPE m_attr_type; int m_char_num; map<string, int>...
true
e7a65013bdf0226b76dea17b73919cec87577a51
C++
jungvely97/vending_machine1
/widget.cpp
UTF-8
1,445
2.78125
3
[]
no_license
#include "widget.h" #include "ui_widget.h" #include <QMessageBox> int money = 0; Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); } Widget::~Widget() { delete ui; } void Widget::change_money(int n){ money += n; ui->lcdNumber->display(money); butt...
true
6aec43a4a3979c3f218ec982d5f80875f54230e7
C++
allscale/allscale_compiler
/test/data_requirements/matrix_transpose/matrix_transpose.cpp
UTF-8
870
2.921875
3
[]
no_license
#include <chrono> #include <allscale/api/user/algorithm/pfor.h> #include <allscale/api/user/data/static_grid.h> const int N = 1000; using namespace allscale::api::user::data; using namespace allscale::api::user::algorithm; using Element = double; using Matrix = StaticGrid<Element,N,N>; using Point = typename Matri...
true
bd116c9298e136ebcae44f5b5749c06b63099f80
C++
eujuu/Algorithm
/baekjoon/백준 2522 별 찍기 - 12.cpp
UTF-8
390
2.828125
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { for (int k = n - i; k > 0; k--) cout << " "; for (int s = 0; s < i; s++) cout << "*"; cout << "\n"; } for (int i = 1; i < n; i++) { for (int s = 0; s < i; s++) cout << " "; ...
true
2abf2f8770e7ce2aff68f3089341604bfdce2dda
C++
korslund/UnpackCpp
/zip/tests/zipfile_test.cpp
UTF-8
1,087
2.78125
3
[]
no_license
#include "zip/zipfile.hpp" #include <mangle/stream/servers/file_stream.hpp> #include <iostream> #include "misc/dirwriter.hpp" using namespace std; using namespace UnpackCpp; using namespace Mangle::Stream; int main(int argc, char **argv) { ZipFile zip; std::string file = "test.zip"; std::string where = ""; ...
true
b53919714a721894142c2f3957956cdbb42da4c1
C++
Esme01/C-codingPractise
/build/array/VerticalQuestion.cpp
UTF-8
1,305
3.109375
3
[]
no_license
#include<iostream> #include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> using namespace std; int main() { int i,ok,abc,de,x,y,z,count=0; char s[20],buf[99]; scanf("%s",s);//输入的字符串前面不用加定位符,与输入数字不同 for (abc =111; abc <= 999; abc++) { /* code */ for ( de = 11; de <=...
true
0d088b15e61ca4e60346c0f956d677ca08acb897
C++
snulion-study/algorithm-int
/sangwon/ch25_DisjointSet/25-3.cpp
UTF-8
803
3.125
3
[]
no_license
// 25.3 에디터 전쟁 문제를 해결하는 상호 배타적 집합의 구현 #include <vector> using namespace std; struct BipartiteUnionFind { vector<int> parent, rank, enemy, size; BipartiteUnionFind(int n): parent(n), rank(n, 0), enemy(n, -1), size(n, 1) { for(int i = 0; i < n; ++i) parent[i] = i; } int find(int u) { if(...
true
8f67c480ce1602f9bb87abd916988f4b7a8f28fa
C++
shilpiroy98/SDL-ConnectFour
/SDL_tutorial/GameManager.cpp
UTF-8
1,014
2.890625
3
[]
no_license
// // GameManager.cpp // SDL_tutorial // // Created by Shilpi Roy on 15/12/20. // Copyright © 2020 Shilpi Roy. All rights reserved. // #include "GameManager.hpp" GameManager::GameManager(SDL_Renderer* renderer) { SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); SDL_RenderClear(renderer); boar...
true
93bf036665f0ed055817f0c62cdf05569a7dc23a
C++
0xC4m3l-jiang/TheWayToHeaven_sakura
/llvm/asst2/src/liveness.cpp
UTF-8
5,271
2.71875
3
[]
no_license
#include "framework.h" namespace { // 声明一个Variable类,便于打印 // 直接用Value* 输出会输出地址 class Variable { private: const Value * _val; public: Variable(const Value * val) : _val(val) {} bool operator==(const Variable & val) const { return _val == val.getValue(); } const...
true
c095beb988d88043ca9efeaa766e08d107403957
C++
hkt0504/Android-Card-Game
/Trix/src/CardGame/Classes/engine/level/ComplexLevel.cpp
UTF-8
12,474
2.640625
3
[]
no_license
#include "ComplexLevel.h" #include "Hand.h" #include "Player.h" USING_NS_CC; ComplexLevel::ComplexLevel() { playedCount = 0; duplicateK = INVALID; duplicateQ[0] = INVALID; duplicateQ[1] = INVALID; duplicateQ[2] = INVALID; duplicateQ[3] = INVALID; kingPlayed = false; queenPlayed = 0; } ComplexLevel::~Complex...
true
df5fbae2c7ba3d722d0c246539b514487fa1c2ce
C++
5l1v3r1/go-engine
/engine/src/engine/_engine.cpp
ISO-8859-1
2,692
2.53125
3
[]
no_license
#include "engine/_engine.h" #include "engine/_instance.h" #include "_systems.h" // User #include "instances.h" CEngine gEngine; using namespace std; CEngine::CEngine(): title("GO-Engine"), running(false) { } bool CEngine::Init(int argc, char* argv[]) { for(int i = 0; i < argc; i++) arguments.push_back(strin...
true
8c73824ecd3839dbae66dff0ac5692a398335469
C++
Cmdeew/r-type
/client/Element.h
UTF-8
967
2.84375
3
[]
no_license
#ifndef ELEMENT_H #define ELEMENT_H #include <iostream> #include <list> #include <SFML/System.hpp> #include <SFML/Graphics.hpp> #include <SFML/Window.hpp> class Element { private: unsigned char _posX; unsigned char _posY; unsigned char _life; unsigned char _ID; unsigned char _type; std::list<sf::Spr...
true
673d4196e2f15d4664a73a49035afb8888667a4d
C++
jonathan500/TPA
/exercicio02.cpp
ISO-8859-1
506
2.765625
3
[]
no_license
/* Programa: rea de um triangulo. Autor: Jonathan Ricardo Pereira Izidoro. Data: 29/09/2019. Data da Alterao: 30/09/2019 */ #include<stdio.h> #include <conio.h> #include <windows.h> #include<locale.h> int main(){ setlocale(LC_ALL,""""); int base = 0, altura = 0, area = 0; printf("Informe o tamanho da base do tring...
true
8497215ea64ef7c80e2c2cf0cb555fd0f6fa0033
C++
dariuszlesiecki/OOP-1
/lab13/lab13.cpp
UTF-8
1,132
3.546875
4
[]
no_license
/* Celem zadania jest przećwiczenie wyjątków. Proszę napisać klasę Number, która pozwala na przechowanie liczb tylko w pewnym określonym zakresie. Proszę uzupełnić brakujące metody tak, by wynik programu był taki jak na końcu tego pliku. */ #include "Number.h" #include <iostream> #include <stdexc...
true
af9e1b3f165594b49887aaeb4d5bce6e939661ca
C++
ShwetaArora12/myDSA_code-base
/BinarySearch.cpp
UTF-8
2,605
4.21875
4
[]
no_license
#include <iostream> // Recursive implementation of Binary Search Algorithm to return // the position of target x in the sub-array array[low..high] int binarySearch(int array[], int low, int high, int key) { // Base condition (search space is exhausted) if (low > high) return -1; // we find the mi...
true
f91aa141b5eba4ddb2d3762dd417ac75b128469f
C++
STabaresG/CursoFCII_UdeA-2020-2
/Documentos/Seguimiento1/CC1152704745/exp_func/exp_f.h
UTF-8
688
2.921875
3
[]
no_license
#include <iostream> #include <cmath> class exp_f{ public: exp_f(); void print_expval(); void set_x(double); // Resets the argument of exp function. Recalculates exp() function void set_N(unsigned long long int); // Resets the truncation number of the series. Recalculates exp() function unsigned long long i...
true
98d3e1ddefb9358c2aee8deeb457eb0686fbafc1
C++
Mesiow/Illusion-Engine
/IllusionEngine/src/Gui/Button.cpp
UTF-8
3,804
2.625
3
[]
no_license
#include "../pcHeaders.h" #include "Button.h" #include "../Engine.h" namespace Illusion { namespace gui { Button::Button(sf::Vector2f position, Size size, sf::Color idle, sf::Color hover, sf::Color pressed) { flag_ = Flag::idle; btnColors_[Colors::idleColor] = idle; btnColors_[Colors::hoverColor] = h...
true
e4c5ddddcc3538a87427a3b1adc07efe5164bfcc
C++
BlackLunx/projectMAM
/menu.cpp
UTF-8
4,865
2.703125
3
[]
no_license
// // Created by JG on 03.06.2019. // #include <SFML/Graphics.hpp> #include "game.cpp" #include <vector> #include <iostream> using namespace sf; void selectLevel(RenderWindow& window); void menu(RenderWindow &window){ Texture newGame_TX1, newGame_TX2, exit_TX1, exit_TX2, background_TX, cursorTX; newGame_TX1....
true
0736848fe90aeee868d961008fa9a60e13122118
C++
capcoders/SPOJ_PTIT
/P166SUMA-src.cpp
UTF-8
915
2.515625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ //package p166suma; import java.util.Scanner; /** * * @author Cuong Nguyen */ public class Main { /** * @param args the ...
true
b148b70463db22edd079f562584569b50ad03e2a
C++
Sigrids/Compiler
/staticSemantics.cpp
UTF-8
3,523
2.984375
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include "exceptions.h" #include "tree.h" #include "staticSemantics.h" int find(std::vector<std::string> varStack, std::string str) { for (int i = varStack.size() - 1; i >= 0; i--) { if (varStack[i] == str) { return i; } } return -1; } void printSta...
true
9bc8dfcf238c58ef525ad49674c8be4864e16ab5
C++
NanguangChou/algoritm_solution
/algorithm_005_longestPalindrome/algorithm_005_longestPalindrome/main.cpp
UTF-8
1,211
3.25
3
[]
no_license
// // main.cpp // algorithm_005_longestPalindrome // // Created by zhounanguang on 15/12/17. // Copyright © 2015年 zhounanguang. All rights reserved. // #include <iostream> #include <string> using namespace std; class Solution { public: string longestPalindrome(string s) { unsigned long len = s.length(); ...
true
3a815e5b68fb2ad8b57cc7a76d8e0c31b3917b31
C++
mridul88/Programs
/self made - not working/merg_2sorted_array.CPP
UTF-8
1,180
3.171875
3
[]
no_license
#include<cstdio> using namespace std; /* this program is to merge two sorted array into a sorted array*/ int c[7]; void enter(int n) { int static k=0; c[k]=n; k++; } int main() { int i,j,l,*a,*b,n,m; char flag='z'; printf("enter the size of one array"); scanf("%d",&n); printf("\n enter the el...
true
03c03fcc4c6b0c32f5a3f528d7e36545ceaadb44
C++
SierraBOI/sierra
/CurrentBlinkSetup.ino
UTF-8
2,771
2.796875
3
[]
no_license
const int ledPin = 12; // the number of the LED pin int ledState = LOW; int commandState; int buttonState; int a = 0; int blinkCount = 0; bool startBlink = false; unsigned long previousMillis = 0; // will store last time LED was updated // constants won't change: const long interval = 1000; // interval at which to...
true
41ec4f44324d6126207d809eb88db5a6b5d355a5
C++
ZyronMelancon/Bunnies
/Bunnies/LinkedList.h
UTF-8
274
2.6875
3
[]
no_license
#pragma once #include "Bunny.h" class ListNode { private: Bunny bunny; ListNode * next; public: ListNode(Bunny b, ListNode * next); }; class LinkedList { private: public: LinkedList(); ~LinkedList(); bool Empty(); void Insert(Bunny b); void Remove(ListNode n); };
true
b39327128294f202ef30fcaf28b0e9c7dd0e53cc
C++
bedomohamed/jumpingIntoCpp
/Chapter 5/99Bottles/main.cpp
UTF-8
315
3.390625
3
[]
no_license
#include <iostream> using namespace std; int main() { int x; for(x = 99; x > 0; x--){ cout << x << " bottles of beer on the wall, " << x << " bottles of beer." << "\n"; cout << "take one down and pass it around " << x - 1 << " bottles of beer on the wall." << "\n"; } return 0; }
true
f507b3039d4f30ce91e2a130cf54416eaf539021
C++
shreyasbalaji/cilk_alg_tmp
/cilk_stable_sort.h
UTF-8
6,169
2.859375
3
[]
no_license
#ifndef CILKSTL_STABLE_SORT_H #define CILKSTL_STABLE_SORT_H #include <cilk/cilk.h> #include <cilk/reducer.h> #include <cilk/reducer_opadd.h> #include <algorithm> #include <cstdlib> #include <iterator> namespace cilkstl { namespace __parallel { namespace __sort { constexpr int CILKSTL_PARALLEL_CUTOFF = 4000; //...
true
fe1c02f1fb2e0196f976f79cae28bc677f26d70f
C++
lamboxn/MCF
/MCF/Core/ArrayView.hpp
UTF-8
4,371
2.703125
3
[]
no_license
// 这个文件是 MCF 的一部分。 // 有关具体授权说明,请参阅 MCFLicense.txt。 // Copyleft 2013 - 2015, LH_Mouse. All wrongs reserved. #ifndef MCF_CORE_ARRAY_VIEW_HPP_ #define MCF_CORE_ARRAY_VIEW_HPP_ #include "../Utilities/Assert.hpp" #include "../Utilities/CountOf.hpp" #include <type_traits> #include <initializer_list> #include <cstddef> #inc...
true
125f683f589f31642a9f288cbe463caf1f05611c
C++
Md-Sanaul-Haque-Shanto/Competitive-Contest-Problesm-Solutions
/PEG Judge/BlueBook - Cross Country.cpp
UTF-8
769
3.03125
3
[]
no_license
/* Bismillah Hir Rahmanir Rahim Md Sanaul Haque Shanto Email : mdsanaulhaqueshanto@gmail.com Solution Date : Feb 26/17, 2:01:46 am BDT Problems Link: https://wcipeg.com/problem/p100ex4 */ #include <iostream> #include <map> #include <string> using namespace std; const map<string, string> descriptions { {"MG",...
true
61f5b3f3c596b7e27db2619c0067483b86ce9a5b
C++
SherifOmarAbdelAziz/ArcadeApp
/src/Shapes/Shape.h
UTF-8
427
2.625
3
[]
no_license
/* * Shape.h * * Created on: Feb 13, 2021 * Author: sherif */ #ifndef SHAPES_SHAPE_H_ #define SHAPES_SHAPE_H_ #include <vector> #include "Vec2D.h" using namespace std; class Shape { public: virtual Vec2D GetCenterPoint() const = 0; virtual ~Shape() {} void MoveBy(const Vec2D &mypoint); virtual vector...
true
41a235f8ed97a3bbc7cbf816c461e7e508b87b09
C++
mstrechen/competitive-programming
/CodeForces.com/regular_rounds/#497/C.cxx
UTF-8
563
2.796875
3
[ "MIT" ]
permissive
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector<int> a(n); for(auto & i : a) cin >> i; sort(a.begin(), a.end()); int ans = 0; int unused = 0; for(auto it = a.b...
true
bb077cd15bb84e8e722c970dd0be6a8832683325
C++
mugur9/cpptruths
/cpp0x/multi_inheritance.cpp
UTF-8
5,214
3.484375
3
[]
no_license
#include <iostream> void test1(void) { class A { public: virtual ~A() = default; }; class B : public A { public: virtual ~B() = default; }; class C { public: virtual ~C() = default; }; class D : public B, public C { public: virtual ~D() = default; }; D *pd = new D(); std::cout << "pd=" << pd <<...
true
fc9c856c7ff45f82ac8e7525815a4d974e9ff2b3
C++
jafffy/VKGL
/src/OpenGL/frontend/gl_formats.cpp
UTF-8
32,594
2.5625
3
[ "MIT" ]
permissive
/* VKGL (c) 2018 Dominik Witczak * * This code is licensed under MIT license (see LICENSE.txt for details) */ #include "Common/macros.h" #include "OpenGL/frontend/gl_formats.h" typedef struct InternalFormatData { OpenGL::FormatDataType data_type; uint32_t n_components; /* For base and com...
true
5fc596fdd10eae2f1c6730095673bcbd54b0a01a
C++
dh434/leetcode
/tree/938. 二叉搜索树的范围和.cpp
UTF-8
901
3.703125
4
[]
no_license
/* 给定二叉搜索树的根结点 root,返回 L 和 R(含)之间的所有结点的值的和。 二叉搜索树保证具有唯一的值。   示例 1: 输入:root = [10,5,15,3,7,null,18], L = 7, R = 15 输出:32 示例 2: 输入:root = [10,5,15,3,7,13,18,1,null,6], L = 6, R = 10 输出:23   提示: 树中的结点数量最多为 10000 个。 最终的答案保证小于 2^31。 */ // 都为闭区间 class Solution { public: int rangeSumBST(TreeNode* root, int L, in...
true
15c95b9787eee18a2731f01e704de527381d7963
C++
MultivacX/leetcode2020
/algorithms/hard/1793. Maximum Score of a Good Subarray.h
UTF-8
2,052
3.15625
3
[ "MIT" ]
permissive
// 1793. Maximum Score of a Good Subarray // https://leetcode.com/problems/maximum-score-of-a-good-subarray/ // Runtime: 296 ms, faster than 100.00% of C++ online submissions for Maximum Score of a Good Subarray. // Memory Usage: 179.1 MB, less than 100.00% of C++ online submissions for Maximum Score of a Good Subarra...
true
d280576e1ce4b2f5c8b0912736dbe4965d126ca4
C++
gstonge/spreading_CR
/src/io_data.cpp
UTF-8
2,132
3.40625
3
[ "MIT" ]
permissive
/** * \file io_data.cpp * \brief functions definition for input/output data for networks * \author Guillaume St-Onge * \version 1.0 * \date 07/02/2018 */ #include <io_data.hpp> using namespace std; namespace net {//start of namespace net /** * \brief Output edge list to a file * \param[in] path path name to the f...
true
49df26d32db5ea0bf26a38614ebb040682f01eb1
C++
StandNotAlone/ACM
/王子超的codeforce/2020.1.22Codeforces Round #615(Div.3)E(思维).cpp
UTF-8
4,283
2.59375
3
[]
no_license
#include<algorithm> #include<iostream> #include<cstring> #include<cstdio> #include<fstream> #include<string> #include<vector> #include<cmath> #include<queue> #include<map> #include<set> //#include<bits/stdc++.h> #define INF 0x7f7f7f7f //2139062143 #define INF1 0x3f3f3f3f //1061109567 #define INF2 2147483647 #define llI...
true
3f46b8aec62f58a2781e343beb9295080413e87e
C++
tyrowang/CC
/lru-cache.cc
UTF-8
1,364
3.359375
3
[ "MIT" ]
permissive
struct Node{ int key; int value; Node(int k,int v){key=k;value=v;} }; class LRUCache{ public: // the list.remove is O(n), so the map is neccessary to store the point to the list. map<int,list<Node*>::iterator> cache_map; list<Node*> cache_list; int c; LRUCache(int capacity) { c=capa...
true
92af78eafa66d878e6a65c6cb14a2569a840c353
C++
Franco1010/ACM-ICPC
/COJ/1136.cpp
UTF-8
1,157
2.65625
3
[ "LicenseRef-scancode-public-domain" ]
permissive
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> #include <cmath> #include <stack> using namespace std; vector<long long int>primos; long long l; vector<bool> p(1000000,true); void criba(){ for (int i=2; i<1000000; i++) { if (p[i]) { for (int j=i+i; j<1000000; j...
true
03973bcae7a654c516a88f71a77cc94952cb1758
C++
hy-eom/Algorithm
/BOJ/11022.cpp
UTF-8
352
3.15625
3
[]
no_license
#include <iostream> using namespace std; int main() { int input; cin >> input; int* a = new int[input]; int* b = new int[input]; for (int i = 0; i < input; i++) { cin >> a[i] >> b[i]; } for (int i = 0; i < input; i++) { cout << "Case #" << i + 1 << ": " << a[i] << " + " << b[i] << " = " << a[i] + b[...
true
dcede4a4ebfd9dca96fb315dd6dcc3ec12d8c138
C++
paperjuice/Cpp---References
/const_usage.cpp
UTF-8
796
3.625
4
[]
no_license
class Test{ public: void function_1() const { //because the function is const, memeber variables can't //m_number += 1; } int function_1(const int& a) { //the reference is constant and therefore it cannot be changed //a += 2; return a; } pr...
true
81fa68d09304c338a04da3a867f2a865d46dafcd
C++
hitwlh/leetcode
/301_Remove_Invalid_Parentheses/solution1.cpp
UTF-8
889
3.28125
3
[]
no_license
class Solution { public: vector<string> removeInvalidParentheses(string s) { dfs(s, 0, ')'); return ret; } private: void dfs(string s, int last, char c){ int ch = 0; for(int i = 0; i < s.length(); i++){ if(s[i] != '(' && s[i] != ')') continue; s[i] == ...
true
ef1e4ff735dab4ea57388a5fb2d63f86ebab014f
C++
HimanshuGunjal10/CPP-Programs
/Trees/MaxWidthOfTree.cpp
UTF-8
1,332
3.875
4
[]
no_license
/* * Program to get the max width of a Binary Tree */ #include <iostream> using namespace std; class Node { public: int data; Node *left, *right; Node(int val) { this->data = val; this->left = nullptr; this->right = nullptr; } }; int getHeight(Node* node) { if(node == nullptr) return 0; Node* curr...
true
a97c46a2e3da35115e6e819e8960960c46316200
C++
intellhave/geocam
/Deprecated/unix/topology/triangulation.cpp
UTF-8
5,801
3.421875
3
[]
no_license
/************************************************************** Class: Triangulation Author: Alex Henniges, Tom Williams, Mitch Wilson Version: July 16, 2008 **************************************************************/ #include "triangulation/triangulation.h" // class's header file #include <cstdlib> #inc...
true
a9d91c77af9f7799f3beda8af7d155d874ef23a8
C++
atrin-hojjat/CompetetiveProgramingCodes
/ICPC/AUT2018_pre3/K.cpp
UTF-8
470
2.625
3
[]
no_license
#include <iostream> #define int long long using namespace std; int32_t main(){ int n,k; int cnt = 0; while(cin >> n){ cnt++; cin >> k; k -= n + 1; cout << "Case #" << cnt << ": "; if (k <= n){ cout << k << endl; continue; } int md = k % (n - 1); if (md != n - 2) ...
true
8e901b4f432ab135903ae7f7db2c450576f350b2
C++
morymobile/algos
/stl/stl_sort_compare.cpp
UTF-8
411
3.328125
3
[]
no_license
#include <algorithm> #include <string> #include <vector> #include <iostream> using namespace std; bool comparator(const int &a, const int&b) { return a < b; } int main() { vector<int> nums; nums.push_back(3); nums.push_back(7); nums.push_back(-1); nums.push_back(-4); sort(nums.begin(),...
true
3b51e783a1bd5cdc79d4e6e3eb499320bb77f655
C++
CoderDXQ/Brush-Algorithm-problem
/合法括号序列判断1.cpp
UTF-8
511
2.515625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main(){ string A; int n; // write code here stack<char> st; for(int i=0;i<A.length();i++){ if(A[i]!='(' && A[i]!=')') return false; else{ if(A[i]=='(')st.push(A[i]); if(A[i]==')'...
true
4de31e4ceb4b72cf9ca1a9c7cf1cafa8f9c4c585
C++
Sudhir-yadav1999/Array_cpp
/pair_sum.cpp
UTF-8
2,071
4.125
4
[]
no_license
-------------------------------------------------------------------------- Given a sorted and rotated array, find if there is a pair with a given sum --------------------------------------------------------------------------- Given an array that is sorted and then rotated around an unknown point. Find if the array has...
true
b5e2ea08cb96a4771b881570defa44c4459c01f2
C++
rahul799/leetcode_problems
/Trees/Tricky Important/Maximum Path Sum between 2 Leaf Nodes .cpp
UTF-8
3,129
3.84375
4
[]
no_license
Maximum Path Sum between 2 Leaf Nodes Hard Accuracy: 49.92% Submissions: 57229 Points: 8 Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another. Example 1: Input : 3 / \ ...
true
b65591193a1248202d34e1d7f3060bd3ba8fb29a
C++
hdt80/Augmentum
/lib/include/game/Map.h
UTF-8
4,040
3
3
[ "MIT" ]
permissive
#pragma once #include "game/Object.h" #include <Box2D/Box2D.h> #include <vector> #include <string> class Ship; class ContactListener; class Object; class Map { public: // Ctor and dtor /////////////////////////////////////////////////////////// // ctor Map(); // dtor ~Map(); // Met...
true
1dd7fbb475c6722c32a728e68132a733c62da1e7
C++
dodorun/Babel
/src/common/network/DataPacket.cpp
UTF-8
1,937
2.609375
3
[]
no_license
/* ** EPITECH PROJECT, 2018 ** CPP_babel_2018 ** File description: ** DataPacket class */ #include "DataPacket.hpp" babel::common::DataPacket::DataPacket(CommandName commandId, const std::vector<std::string> &args) : _commandId(commandId), _args(args) { } babel::common::CommandName babel::common::DataPacket::getC...
true
805c6d2f110eefe7b7db0246f25da6e22cfcda63
C++
imanuglypanda/Programming-Class-s-Project
/main.cpp
UTF-8
1,053
3.421875
3
[]
no_license
#include<iostream> #include<string> #include<iomanip> using namespace std; void func_input(string name[5], float product[5][3], float); void func_output(string name[5], float product[5][3]); int main() { string name[5]; float product[5][3], rate = 0.07f; func_input(name, product, rate); func_output(...
true
06006880857fa1f3e820e61096a2ae4e7d165c67
C++
ImperishableMe/codeforces-submissions
/codeforces/992/D.cpp
UTF-8
2,591
2.5625
3
[]
no_license
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef pair<int,int> PII; typedef long long int ll; typedef pair< ll,ll> PLL; PLL operator+(PLL a,PLL b){ return {a.first + b.first, a.second + b.second}; ...
true
049b763c8d91f9a5d0502b486721dd66e8bc83dd
C++
bhavanarj9/cpp-algorithms
/binary search(iterative).cpp
UTF-8
708
3.75
4
[]
no_license
#include<iostream> using namespace std; int binarysearch(int a[], int n, int x){ int l = 0; int h = n-1; while(l<=h){ int mid = (l+h)/2; if(a[mid] == x){ return mid; } else if(a[mid] < x){ l = mid + 1; } else{ h = mid -...
true
a3a8472c6e01ca5388c846e3fc7d6fb38bb4f120
C++
mateushcp/Fila-Encadeada-FIFO
/tp/src/Fila.cc
UTF-8
1,368
3.28125
3
[]
no_license
#include "Fila.h" #include <string> using namespace std; Fila::Fila() { cabeca = new No(); cauda = cabeca; tamanho = 0; } Fila::~Fila() { if (!vazia()) { desenfileirarElemento(); } } No* Fila::getCabeca() { return this->cabeca; } void Fila::setCabeca(No* aux) { this->cabeca = a...
true
e22c1c8014d5d53f8dc66af0e01471d8fdda917c
C++
KFlaga/FlagRTS
/Core/WavSound.cpp
UTF-8
3,495
2.546875
3
[]
no_license
#include "WavSound.h" #include "Array.h" #include "Exception.h" #define BUFFER_SIZE 4096*8 namespace FlagRTS { using namespace Media; WavSound::WavSound() : Sound() { _extension = Wav; } WavSound::WavSound(const char* name, const char* pack, const char* file) : Sound(name, pack, file) { _extension = W...
true
bb26fdddf15cb55dc419299b88ca284e6c23bd44
C++
jiry17/MaxFlash
/src/solver/solver.h
UTF-8
2,838
2.8125
3
[]
no_license
#ifndef L2S_SOLVER_H #define L2S_SOLVER_H #include <config.h> #include "context_maintainer.h" #include "specification.h" #include "minimal_context_graph.h" typedef std::vector<DataList> StateValue; // The main solver. It does not use any domain knowledge, and thus this part remains unchanged for different domains. c...
true
64ac647045dfb1096a0571639b76bd8a5f670668
C++
eskerda/arduines
/sketches/gamepad_test/gamepad_test.ino
UTF-8
1,130
3.015625
3
[]
no_license
/* Based on Arduino USB Joystick HID demo * Author: Darran Hunt * * https://github.com/harlequin-tech/arduino-usb */ int PADS[][2] = { {0,0}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1}, {-1,-1}, {-1,0}, {-1,1}, {0,1}, {0,0} }; int AXIS_VAL = 1; int N_PADS = sizeof(PADS) / (si...
true
630a432a93decd3f13d6cc536d5df8e175b46b30
C++
MilanFIN/TrainGame
/TrainGame/TrainGame/obstaclelogic.h
UTF-8
3,906
2.875
3
[]
no_license
#ifndef OBSTACLELOGIC_H #define OBSTACLELOGIC_H #include <QGraphicsScene> #include <QObject> #include <memory> #include <vector> #include "obstacleinterface.h" #include "boulder.h" #include "traininterface.h" #include "playertrain.h" /** * @brief The ObstacleLogic is responsible for handling obstacles */ class Obs...
true
459acd10ab48fa73dd7ec2901c0862dc1cbb7c7f
C++
2bjake/ds
/trie.cpp
UTF-8
2,667
3.28125
3
[]
no_license
#include "trie.h" #include <algorithm> void Trie::insertStringInternal(std::shared_ptr<Node> node, std::string s, std::size_t strIdx){ if(strIdx < s.length()) { std::shared_ptr<Node> &child = node->children[s[strIdx]]; if(!child) { child.reset(new Node()); } insertString...
true
dfa027e9a5bc7f35bd069d98f758ded4cf6bdd44
C++
ddl-hust/ExerciseInBooks
/Cpp_Primer/CH13/13_27.h
UTF-8
624
3.28125
3
[]
no_license
//引用计数版本 指针行为的hasptr #include<vector> #include<string> using std::string; class HasPtr{ public: HasPtr():p(new string()),id(0),count(new size_t(1)){} HasPtr(const HasPtr& rval) { p = rval.p; id=rval.id; ++*count; } HasPtr& operator= (const HasPtr& rval ){ **rval.count; ...
true
bb890d22f1d57184e2b6c078ef2b516961a8a46c
C++
aliemir99/Shinobi-Ketto
/ShinobiKetto/Application.cpp
UTF-8
4,079
2.5625
3
[]
no_license
#include "Application.h" #include "State.h" #include "StateIdentifiers.h" #include "GameState.h" #include "TitleState.h" #include "PauseState.h" #include "MenuState.h" #include "GameOverState.h" #include "CharacterSelectionState.h" #include "MapSelectionState.h" #include "OptionsState.h" #include "HowToPlayState.h" ...
true
cd6d9294575ba79413c677039c5173a14621bd8e
C++
hilleri123/OOP_cpp_shapkin
/2lab/3lab.cpp
UTF-8
1,743
3.5
4
[]
no_license
#include <iostream> class Collection { public: explicit Collection(std::size_t i = 1) : _buf(new int[i]), _size(i) {} virtual void put(int ) = 0; virtual int take() = 0; virtual ~Collection() { delete[] _buf; } int get(std::size_t i) const { if (i >= _size) return _buf[_size-1]; return _buf[i]; ...
true
139e98d5b8447b272a21cb949fe1be3053248c83
C++
Rayzapper/Evolution
/Evolution/Evolution/Button.h
UTF-8
645
2.75
3
[]
no_license
#ifndef RAYZAPPER_BUTTON_H #define RAYZAPPER_BUTTON_H #include "Entity.h" class Button : public Entity { public: Button(sf::String buttonString, sf::Font *buttonFont, short ID); ~Button(); virtual void Update(float dt, sf::Vector2i mousePosition); virtual void Render(sf::RenderWindow *window); virtual void SetP...
true
ebee34bb2e2433601fb0d1044549fdffb089c946
C++
PartisanQQ/CPSC-120
/nguyen_hw01.cpp
UTF-8
273
3.375
3
[]
no_license
// Anthony Nguyen // CPSC 120-19 // HW 01 // Bonus: Yes // Desc: Outputs my name and age. #include <stdio.h> int main() { //Variables int myAge = 25; //Statement that outputs variables. printf("Hi, I'm Anthony. I am %d years old.\n", myAge); return 0; }
true
417d48accb6df63aae33bdd2571554e3eed020da
C++
mvngr/joddy
/way.cpp
UTF-8
468
2.5625
3
[]
no_license
#include "way.h" Way::Way(){ poly_ = * new QList<QLineF>; } Way::Way(QList<QPointF> points):Object(points, Object::Materials::stone){ poly_ = * new QList<QLineF>; } QList<QLineF> *Way::getPathLine(){ return &poly_; } void Way::setPathLine(QList<QPointF> polygon){ for(int i = 0; i < polygon.length() - ...
true
cf3bd5884c75c5953cb6a48359c9093101a16a98
C++
zanzaney/CPP-Data-Structures
/CPP_Apna college/Untitled1.cpp
WINDOWS-1250
343
2.890625
3
[]
no_license
#include<iostream> using namespace std; class test { int code; static int count; public: void setcode(void) { code=++count; } void showcode(void) { cout<<object number:<<code<<\n; } }; int test::count; int main() { test t1,t2; t1.setcode(); t2.setcode(); test::showcount(); t1.showcode(); t2.showcode(); t3.showcode(); r...
true
66dbc14dcb5cbf28054704a12fb29152d4e09f38
C++
hyracinth/CPPBrushUp
/RomanNumeralToInt.cpp
UTF-8
2,600
3.84375
4
[]
no_license
/* Jonah Lou 06-28-2014 Small program to convert roman numerals. Error checking checks to make sure nothing above three repetitions. Largest Roman Numeral accepted is C */ #include <stdio.h> #include <string> #include <iostream> using namespace std; void printError(string myError); int main() { string userInput...
true
ba7c6a81447c61c4d0fb7078e3d12db019de9fbc
C++
VanshikaSingh10/DataStructures-Algorithms
/DSA Crack Sheet/solutions/Merge Without Extra Space.cpp
UTF-8
1,969
4.3125
4
[ "MIT" ]
permissive
/* Merge Without Extra Space ========================= Given two sorted arrays arr1[] of size N and arr2[] of size M. Each array is sorted in non-decreasing order. Merge the two arrays into one sorted array in non-decreasing order without using any extra space. Example 1: Input: N = 4, M = 5 arr1[] = {1, 3, 5, 7} arr...
true
1817915ec763b5eb197eab085120ee3175e1f482
C++
deping/OSGStretch
/Line.cpp
UTF-8
2,949
2.609375
3
[]
no_license
#include "stdafx.h" #undef max #undef min #include <limits> #include "Line.h" #include "Utility.h" Line::Line() : _color(0.8f, 0.8f, 0.8f, 1.f) , _colors(new osg::Vec4Array(osg::Array::BIND_OVERALL)) , _primitiveSet(new osg::DrawArrays) { _colors->push_back(_color); _colors->dirty(); setColorA...
true
5490245d7422fbc1ecfce488f081ddbfaae27ad6
C++
NguyenTheAn/Algorithm
/Sinh_nhi_phan.cpp
UTF-8
773
2.96875
3
[]
no_license
/* thuat toan sinh nhi phan chay tu cuoi ve dau tim phan tu bang 0 dau tien. doi 0 thanh 1 nhung phan tu phia sau vi tri do doi thanh 0 neu khong thay so 0 nao thi ket thuc thuat toan */ #include <iostream> using namespace std; bool check(int a[], int n){ for (int i=0; i<n; i++){ if (a[i]==0) return fal...
true
229723214838f41a06b0f45ed8f7cb61dee97963
C++
wovo/hwlib
/attic/demo/arduino-due/due-#0110-matrix-switches/main.cpp
UTF-8
1,833
2.765625
3
[ "BSL-1.0" ]
permissive
#include "hwlib.hpp" void test_dump1( hwlib::matrix_of_switches & kbd ){ for(;;){ for( int_fast8_t x = 0; x < kbd.size.x; ++x ){ for( int_fast8_t y = 0; y < kbd.size.y; ++y ){ if( kbd.switch_is_closed_at( hwlib::xy( x, y ) ) ){ hwlib::cout << x << "," ...
true
efa9e0ab8c3164e44cfd933572519c67ebe99dc2
C++
metrumresearchgroup/Torsten
/cmdstan/stan/lib/stan_math/stan/math/torsten/PKModel/pmx_check.hpp
UTF-8
5,616
2.609375
3
[ "BSD-3-Clause", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "GPL-3.0-only" ]
permissive
#ifndef STAN_MATH_TORSTEN_PKMODEL_PMETRICSCHECK_HPP #define STAN_MATH_TORSTEN_PKMODEL_PMETRICSCHECK_HPP #include <stan/math/prim/err/check_greater.hpp> #include <stan/math/prim/err/check_greater_or_equal.hpp> #include <stan/math/prim/err/check_finite.hpp> #include <stan/math/prim/err/check_not_nan.hpp> #include <stan/...
true
a56f5fe9ed825af1b2318febcc98bd63f844a908
C++
GrinPlusPlus/GrinPlusPlus
/src/Wallet/WalletDB/Sqlite/SqliteTransaction.h
UTF-8
1,031
2.734375
3
[ "MIT" ]
permissive
#pragma once #include "SqliteDB.h" #include <Common/Util/StringUtil.h> #include <Wallet/WalletDB/WalletStoreException.h> #include <Common/Logger.h> class SqliteTransaction { public: SqliteTransaction(const SqliteDB::Ptr& pDatabase) : m_pDatabase(pDatabase), m_open(false) { } ~SqliteTransaction() { if (m_open...
true
08078e3a192e83794673ed3e07efe35e07792c42
C++
Jveras0924/NYU-Bridge-HWs
/jv1558_hw10_q3.cpp
UTF-8
2,548
3.6875
4
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; vector<int> vector_Create_Array(); void search_Num2(vector<int> num_Vec, int num); int main2(); int* no_Vector_Create_Array(int& arrSize); void search_Num(int arr[], int num, int arrSize); int main1(); int main(){ cout << "Main 1: " << e...
true
db5b917546ee0b9755cbad5c3c3585da39621095
C++
paritosh-in/mdp
/MarketDataPublisher.cpp
UTF-8
1,945
3.0625
3
[]
no_license
#include "MarketDataPublisher.h" #include <algorithm> #include <iostream> #include <list> MarketDataPublisher::MarketDataPublisher(Broadcaster& broadcaster, int maxIntervalSeconds, int maxPriceMove, int maxSymbolsAtTime) { this->broadcaster = broadcaster; this->maxIntervalSeconds = ...
true
1693600361a7de6acdadb66460bca2a68c5f4540
C++
Karstack-overflow/Pacman
/Pacman/Pacman.cpp
ISO-8859-1
2,838
2.71875
3
[]
no_license
#include "Pacman.h" extern Game* game; Pacman::Pacman(QGraphicsRectItem* parent) : QGraphicsRectItem(parent) { QBrush brush; brush.setStyle(Qt::SolidPattern); brush.setColor(Qt::darkCyan); setBrush(brush); timer = new QTimer(this); timer->setInterval(20); QObject::connect(timer, SIGNAL(t...
true
31631254290c6c64c898d3833d126311dc23dcf6
C++
ldematte/beppe
/src/Logger.h
UTF-8
1,481
2.765625
3
[ "BSD-3-Clause" ]
permissive
/*******************************************************************\ * Bezier Patch Editor --- Logger * * * * Il Log Manager serve principalmente per effettuare debug. * * Registra i messaggi inviati con le fu...
true
a2c044904103eca581fa4ed58df23a1dd2e1c4c3
C++
imdew1990/algotester
/0417.cpp
UTF-8
1,043
2.625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { long n, i, l; cin >> n; vector<long>a; vector<long> minus; vector<long> zero; vector<long> plus; for (long i = 0; i < n; i++) { int k; cin >> k; a.push_back(k); } sort(a.begin(), a.end()); vector<long>b = a; i = 0; while (a.size() > 0) { l ...
true
49c95f4402aa6344f7723ef099a82466ae2cb88b
C++
GaspardQin/positionning-circle-from-stereocam
/include/circle_model.h
UTF-8
1,811
3.125
3
[]
no_license
#ifndef __CIRCLE_MODEL_H__ #define __CIRCLE_MODEL_H__ #include <Eigen/Dense> class Circle3D{ public: Eigen::Vector4d center; //circle's center Eigen::Vector4d plane; // circle's plane (plane * x = 0) double radius; //radius of the circle double score; // the quality of the detected circle Circle...
true
14fd50130ca68989fd399964c105c1a03009a108
C++
SmritiVashisth/spoj
/willitst.cpp
UTF-8
340
2.734375
3
[]
no_license
#include<iostream> using namespace std; int main(){ unsigned long long number; cin>>number; while(number>1){ if(number%2!=0){ break; } else{ number=number/2; } } if(number==1){ cout<<"TAK"<<endl; } else{ cout<<"NIE"<<end...
true
10bfb135521e560a56b95a0f2e31a71cc550e3a4
C++
igorternyuk/TeQtSnake
/digitaltable.h
UTF-8
570
2.5625
3
[]
no_license
#ifndef DIGITALTABLE_H #define DIGITALTABLE_H #include <QLCDNumber> class digitalTable : public QLCDNumber { Q_OBJECT public: static const int DEFAULT_DISPLAY_WIDTH = 120; static const int DEFAULT_DISPLAY_HEIGHT = 120; static const int NUM_DIGITS = 120; digitalTable(int width = DEFAULT_DISPLAY_WID...
true
40df0a54979ce3311aea5fafa2c9e48f48584be5
C++
Sondro/Acid
/Sources/Helpers/Delegate.hpp
UTF-8
5,248
2.671875
3
[ "MIT" ]
permissive
#pragma once #include <algorithm> #include <functional> #include <memory> #include <mutex> #include "ConstExpr.hpp" #include "NonCopyable.hpp" namespace acid { template<typename> class Delegate; class ACID_EXPORT Observer { public: Observer() : m_valid(std::make_shared<bool>(true)) { } virtual ~Observer() = d...
true
a58625b34d5d030ee0b1fb7b7f1416b4a9cf030c
C++
gzhu-team-509/GZHU-OJ
/10/1077.cpp
UTF-8
498
2.734375
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; int n, t; long num[3001]; bool cmp(int, int); int main() { while (cin >> n) { for (int i = 0; i < n; i++) { cin >> num[i]; } sort(&num[0], &num[n], cmp); for (int i = 0; i <...
true
a308c17c490ab600f5a45cbabc8d04ce3e94b1bf
C++
ghostincircuit/leetcode
/combinations.cpp
UTF-8
500
2.734375
3
[ "BSD-2-Clause" ]
permissive
class Solution { public: vector<int> tmp; vector<vector<int> > ret; void helper(int start, int end, int k) { if (k == 0) { ret.push_back(tmp); return; } for (auto i = start; i <= end-k; i++) { tmp.push_back(i+1); helper(i+1, ...
true
8f06fe072a917f1e716cf10705184e2ac8711817
C++
levanlinh1995/competitive_programming
/04. stack and queue/01. compiler and parser.cpp
UTF-8
1,477
3.453125
3
[]
no_license
// Problem: Compilers and parsers // Link: https://www.codechef.com/MAY14/problems/COMPILER #include <iostream> #include <string> #include <vector> #include <stack> #include <limits> using namespace std; int getLongPrefix(string expression) { stack<char> S; // to save '<' character int len = expression.size(...
true
d678ec0866c3fbe30b40e7cad8514703aa45b6bb
C++
engineksoftware/CS-Project
/CS-Project/CS-Project.ino
UTF-8
4,141
3.65625
4
[]
no_license
#include <SoftwareSerial.h> /* * Converts a base-10 number into binary form, and lights the correct LEDs starting from the right. * Used with an Arudino UNO, and 8 LEDs. */ /* * Can change these to different pins. * * NOTE: The pins in the array is equal to the LED configuration from left to right. * ...
true
7170860ee5290189471c75983f3164f54bfcac7a
C++
JayGitH/839C-language-and-data-structure
/839数据结构/c语言/839代码(来自一位2018届考研学长)/HDS/bsearch源代码.cpp
UTF-8
430
2.796875
3
[]
no_license
int compare(const void *a,const void *b}{ return strcmp((char*)a,(char *b)); } void *bsearch(void *key,void *base,size_t num,size_t width, int (*compare)(const void *elem1,const void *elem2)){ int result; size_t low=0,high=num,mid; while(low<high){ mid=low+(high-low)/2; result=compare(key,base+mid*width); i...
true
9eb463c2ee97a72c812e0b2e868f5715cc5d82e2
C++
thiagofigcosta/LS-
/ls_soma/main.cpp
UTF-8
2,036
2.65625
3
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <stdlib.h> #include <string.h> #include <stdio.h> #define mainID 1 #define def_n_words 10 #define def_string 100 using namespace std; char words[def_string][def_n_words]; float args[def_n_words],result; int id; int idx_words=0; char str_process[def_string]...
true