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
b76173db5c33bbd6149e0de9ce5686ccac44dfdc
C++
ANTAR-NANDI/Competetive-Programming
/Bitwise-Recursion-Structure.cpp
UTF-8
272
2.765625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; struct Person{ int roll; string name; }; int main() { int a,b; struct Person Antar,Rimon; cin>>Antar.name>>Rimon.name; cin>>Antar.roll>>Rimon.roll; cout<<Antar.name<<" "<<Rimon.name; cin>>a>>b; cout<<(a&b); }
true
6636a97ac55faea7059949c0b44ae99956599af5
C++
Pablourquia/IB-Practica4
/CONTARDINERO.cc
UTF-8
1,470
3.515625
4
[]
no_license
#include <iostream> using namespace std; int main(){ int monedas01; int monedas05; int monedas10; int monedas20; int monedas50; int billetes5; int billetes10; int billetes20; int billetes50; int billetes100; int billetes200; int billetes500; cout << "Cuantas monedas ...
true
37be7e3d94d96df0f8223b2d526bbbffd080d87c
C++
PeteTheN00b/programmiersprachen-aufgabe-1
/TDD/source/aufgabe1-8.cpp
UTF-8
1,670
3.265625
3
[ "MIT" ]
permissive
//Sorry that I called this aufgabe1-8 instead of tests.cpp, I had to change some stuff about the cmake file because I didn't notice that but I still got it to work #define CATCH_CONFIG_RUNNER #include "catch2/catch.hpp" #include <cmath> bool divisible(int n, int div) { return n % div == 0; } int gcd(int a, int b) {...
true
377c63dfeabfc728d1c182a58b78c4417452bd61
C++
joilar/cgol
/src/Messages.h
UTF-8
224
2.5625
3
[]
no_license
#include <iostream> #include <typeinfo> #define FUNCTION_NOT_IMPLEMENTED_MESSAGE \ std::cerr << "Function " << __func__ << " not implemented in class " \ << typeid(*this).name() << "." << std::endl;
true
19cb5b85d513983ab5eca78276c7dac64d31cf38
C++
nakamura106/-autumn-production
/Libraly/DataBank/DataBank.h
SHIFT_JIS
4,250
2.53125
3
[]
no_license
#ifndef DATABANK_H_ #define DATABANK_H_ #include "../Object/Definition.h" class DataBank { public: static DataBank* Instance(); //̃Q[ŏȂƂȂl void ResetData(); void SetPlayerHp(int hp) { m_player_hp = hp; } void SetNote(int note1_, int note2_, int note3_) { note1 = note1_; note2 = note2_; note3 = note3_; } ...
true
001120e8d9490e4901dc9c47c6da8840b28368a4
C++
OlaKa/PartikelAccelerator
/src/Particle.cpp
UTF-8
720
2.671875
3
[]
no_license
/* * Particle.cpp * * Created on: 31 jul 2017 * Author: ola */ #include "Particle.h" #include <stdlib.h> #include <math.h> namespace monitor { Particle::Particle() : m_x(0), m_y(0) { init(); //m_speed *= m_speed; } void Particle::init(){ m_direction = (2 * M_PI * rand()) / RAND_MAX; m_speed = (0...
true
6c0905f197ac24c64f14e7e8affa549e4e809f3a
C++
bgoonz/UsefulResourceRepo2.0
/_REPO/MICROSOFT/PowerToys/src/modules/fancyzones/FancyZonesLib/ZoneSet.h
UTF-8
8,025
2.78125
3
[ "MIT", "BSL-1.0", "Unlicense", "LicenseRef-scancode-generic-cla" ]
permissive
#pragma once #include "Zone.h" #include "Settings.h" namespace FancyZonesDataTypes { enum class ZoneSetLayoutType; } /** * Class representing single zone layout. ZoneSet is responsible for actual calculation of rectangle coordinates * (whether is grid or canvas layout) and moving windows through them. */ inter...
true
10422c405e7fa0fae73a3553fbe83e527a5af98b
C++
huhumeng/dvo-cpp
/include/core/point_selection.h
UTF-8
1,993
2.734375
3
[]
no_license
#pragma once #include "core/rgbd_image.h" namespace dvo { namespace core { class PointSelectionPredicate { public: PointSelectionPredicate() : intensity_threshold(0.0f), depth_threshold(0.0f) { } bool isPointOk(const size_t &x, const size_t &y, const float &z, const fl...
true
64feec5382bede63285d2e57ff7afac8cb931cb5
C++
yakushstanislav/frontend-learning
/HTML_JavaScript/TempMonitor/Arduino/TemperatureMonitor/TemperatureMonitor.ino
UTF-8
468
2.59375
3
[]
no_license
#include <OneWire.h> #include <DallasTemperature.h> #define ONE_WIRE_BUS 2 #define SERIAL_BAUD_RATE 9600 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); void setup() { pinMode(13, OUTPUT); Serial.begin(SERIAL_BAUD_RATE); sensors.begin(); } void loop() { digitalWrite(13, LOW); sensor...
true
87d09099033704fecd6b042620c300e9bc69eb44
C++
iznilul/leetcode-
/editor/cn/[剑指 Offer 34]二叉树中和为某一值的路径.cpp
UTF-8
1,603
3.4375
3
[]
no_license
//输入一棵二叉树和一个整数,打印出二叉树中节点值的和为输入整数的所有路径。从树的根节点开始往下一直到叶节点所经过的节点形成一条路径。 // // // // 示例: //给定如下二叉树,以及目标和 sum = 22, // // 5 // / \ // 4 8 // / / \ // 11 13 4 // / \ / \ // 7 2 5 1 // // // 返回: // // [ // [5,4,11,2], // [5,8,4,5] ...
true
117de6f1a4314e61ca0324ca654431e8a2ddd4c4
C++
wzzydezy/C-learning
/n!.cpp
UTF-8
545
2.6875
3
[]
no_license
#include <iostream> #include <vector> #include <string.h> #include <unordered_map> #include <sstream> #include <queue> #include <stack> #include <math.h> #include <stdlib.h> #include <algorithm> #include <limits.h> #include <list> #include <stdlib.h> using namespace std; int trailingZeroes(int n) { int m = n; ...
true
34c55b0615cf01ba9ce9b39107f8bf65eab68bae
C++
WangDrop/WangDropExercise
/Interview/bitSmallTrans.cpp
UTF-8
188
2.515625
3
[]
no_license
#include <stdint.h> int32_t bigSmallTrans(int32_t num){ return (num & 0x000000FF) << 24 | (num & 0x0000FF00) << 8 | (num & 0x00FF0000) >> 8 | (num & 0xFF000000) >> 24; }
true
aac75251e378c075b95973cc0be736eb94e10b75
C++
onur-yildiz/cmd-pacman
/character.cpp
UTF-8
1,830
3.203125
3
[ "MIT" ]
permissive
#include "character.h" #include <ncurses.h> Character::Character(WINDOW * win, int y, int x, char _symbol, bool _hunter) { window = win; yLoc = ySpawnLoc = y; xLoc = xSpawnLoc = x; symbol = _symbol; hunter = _hunter; direction = KEY_DOWN; getmaxyx(window, yMax, xMax); } int Character::getX() { return xLoc; } ...
true
950cd4b93661c5214a3b9b28f9a10e631e4e3d36
C++
Bsm-B/iot_workshop
/HelloWorld/HelloWorld.ino
UTF-8
643
3.0625
3
[]
no_license
/** * * @author Bousselmi Bessem * Sources for this can be found at: * https://github.com/bassouma21001/iot_workshop * */ // the setup function runs once when you press reset or power the board #define LED 16 void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED, OUTPUT); } // t...
true
595588b3d84811d09f4f9d44fda8ead78370706d
C++
XY-F/algorithm-note
/正文/二分查找区间.cpp
GB18030
2,041
3.890625
4
[]
no_license
#include<cstdio> //A[]ΪУxΪѯصһڵxԪصλ //½Ϊұյ[left,right]ijֵΪ[0,n] int lower_bound(int A[],int left,int right,int x){ int mid; //midΪleftrightе while(left<right){ //[left,right]˵left==rightζҵΨһλ //ҪصһڵxԪصλãҪжԪxǷڣ //ڣصҲǡڣӦôڵλáǵ //left==rightʱ[left,right]պܼгΨһλãҪĽ mid=left+(right-left)/2; //ȡе if(A[mid]>=x){ //мڵx ...
true
a9659c9bf30ce57ae705be6d8d3b49bcfc0ca884
C++
Cirthy/DSLR
/sources/trainer.cpp
UTF-8
488
2.734375
3
[]
no_license
#include "trainer.h" void improve_weights(double weights[4][14], Student* students, int m) { for(int h = 0 ; h < 4 ; h++) improve_thetas(weights[h], students, m, (House)h); } void improve_thetas(double thetas[14], Student* students, int m, House house) { double tmp[14]; int i; for...
true
e7f46f1e2a209f189350921cd835a968fe0e0276
C++
sagarramdev173/Recursion
/binary_combo.cpp
UTF-8
831
3.421875
3
[]
no_license
/* Print N-bit binary numbers having more 1’s than 0’s numbers having more 1’s than 0’s for any prefix Input: n=3 Output: 111 110 101 */ #include<iostream> #include<string> #include<vector> #define fo(i,n) for(int i=0;i<=n;i++) using namespace std; void solve(int n,int one,int zero,vector<strin...
true
8b30e3fd8eb03cdfa32c0d242defe34da70d73cc
C++
FeibHwang/OJ-Leetcode
/Code/257_Binary_Tree_Paths.cpp
UTF-8
1,493
3.859375
4
[]
no_license
/* Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: ["1->2->5", "1->3"] */ /* recurrsive algorithm is most straight forward */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * ...
true
7ada3d86bd4461323c69be0276751cd6644244c4
C++
targodan/gameProgramming
/engine/src/ECSCommon/PerformanceMetricsSystem.h
UTF-8
1,985
2.59375
3
[ "MIT" ]
permissive
#ifndef PERFORMACEMETRICSSYSTEM_H #define PERFORMACEMETRICSSYSTEM_H #include "../ECS/System.h" #include "../ECS/EntityManager.h" #include "../ECS/Entity.h" #include "TextComponent.h" namespace engine { namespace ECSCommon { using namespace engine::ECS; class PerformanceMetricsSystem : pu...
true
d2ef1ea298c6270af2e68bbdd620688db29783ae
C++
SmallE0529/Binary_Tree_Force_Cpp
/binary_tree_force.cpp
UTF-8
2,829
3.75
4
[]
no_license
#include "binary_tree_force.h" #include <queue> using namespace std; void binary_tree::pre_order(tree_node *current) { if(current != nullptr) { cout << current->str << " "; pre_order(current->left_child); pre_order(current->right_child); } } void binary_tree::in_order(tree_node *c...
true
31278adb703d4a878282bd2f014c8a33c6bbf2a0
C++
raysayantan/CodeSignal
/firstDuplicate.cpp
UTF-8
1,377
4.09375
4
[]
no_license
/* Given an array a that contains only numbers in the range from 1 to a.length, find the first duplicate number for which the second occurrence has the minimal index. In other words, if there are more than 1 duplicated numbers, return the number for which the second occurrence has a smaller index than the second occurr...
true
42e0e1075ca00856ea70f7e2a4fefd7b403b9daf
C++
apankrat/cpp-serializer
/example.cpp
UTF-8
1,020
2.8125
3
[ "BSD-2-Clause" ]
permissive
/* * CPP Seializer - Fast and simple data serialization for C++. * * https://swapped.ch/cpp-serializer * * The code is distributed under terms of the BSD license. * Copyright (c) 2019 Alex Pankratov. All rights reserved. */ #include "serialize.h" #include "serialize_obj.h" #include <assert.h> /* *...
true
a0004d438843edbd11892335680ca6b9b8171e63
C++
Crazyfighting/PTT
/Viewer.h
BIG5
759
3.046875
3
[]
no_license
#pragma once #include<iostream> class Viewer { public: void printMenu(){ std::cout << "wӨaX,пJb,άOJguestιCȼҦiJ,JnewЫطsb,JrhX:"; } void printchooseBoard() { std::cout << "JsiJwݪO,Jr^:"; } void printviewBoard() { std::cout << "JsiJwK,Jr^:"; } void printPost() { std::cout << "Jr^:"...
true
77abbbfdcea02090e8b8bcbb43f8d19180ccc4b4
C++
AviciiPL/aimp-control-plugin
/src/jsonrpc/jsonrpc_response_serializer.cpp
UTF-8
3,342
2.75
3
[ "MIT" ]
permissive
// Copyright (c) 2014, Alexey Ivanov #include "stdafx.h" #include "jsonrpc/response_serializer.h" #include "jsonrpc/value.h" #include "jsonrpc/writer.h" #include "rpc/value.h" #include "rpc/exception.h" #include <cassert> namespace JsonRpc { const std::string kMIME_TYPE = "application/json"; struct R...
true
15df4976646e7774d21fea875e33a61921c29bf7
C++
baifengbai/c
/c++基础学习/Day13/test05/furniture.h
UTF-8
677
2.984375
3
[ "Apache-2.0" ]
permissive
#ifndef _FURNITURE_H_ #define _FURNITURE_H_ #include<iostream> using namespace::std; //再次抽象sofa和bed class furniture { public: furniture(int weight=0); void set_weight(int weight) { m_weight = weight; cout<<"weight: "<<m_weight<<endl; } private: int m_weight; }; class sofa:virtual public furniture{...
true
6dcbfc2b3ddadaa7396b2984977ff7b1e420af55
C++
BogdanAriton/starter_kit_cpp
/modern-cpp-features/c++11/functor.cpp
UTF-8
374
4.125
4
[]
no_license
#include <iostream> // this is a functor struct add_x { // this is a constexpr because it can be evaluated at compile time constexpr add_x(int val) : x(val) {} // Constructor constexpr int operator()(int y) const { return x + y; } private: int x; }; int main() { constexpr add_x adder(10); std::cout <...
true
87381b67d350e85ca304511bf65a61705c146d56
C++
jackbergus/NotesOnProgramming2020
/include/utils/orders/LexicographicalOrder.h
UTF-8
1,176
3.21875
3
[]
no_license
// // Created by giacomo on 31/01/2020. // #ifndef TUTORIALS_LEXICOGRAPHICALORDER_H #define TUTORIALS_LEXICOGRAPHICALORDER_H #define ForAll2(T,U) template <typename T, typename U> /** * Defining an ordering over vectors following the lexicographical order * @tparam T Type associated to the container * @t...
true
94406c6d005f6ca6df35545afe090b8fcec20d9e
C++
Redyz/space-invaders
/src/game/utility.cpp
UTF-8
2,100
3.015625
3
[ "MIT" ]
permissive
#include "utility.h" #include "config.h" #include <fstream> #include <string> #include <ctime> #include <time.h> #include <stdio.h> #include <cstdlib> #include <iostream> #include <sys/stat.h> #ifdef IS_NT #include <direct.h> #endif Utility::Utility(Window *window){ this->window = window; } Utility::~Utility(){ }...
true
2571eca6bbd783b4040809d794d4d22cb07dd997
C++
chuckinSpace/OOP344
/w6/Product.cpp
UTF-8
689
2.9375
3
[]
no_license
// Name: Carlos Moyano // Seneca Student ID: 123435174 // Seneca email: cmoyano-rugiero@mysenecac.ca // Date of completion: 10-31-18 // // I confirm that the content of this file is created by me, // with the exception of the parts provided to me by my professor. #include <iostream> #include <iomanip> #include "Produc...
true
c3a44d3b62bea8c1fcfe1ad4a1576d08028aead9
C++
AshburnLee/LeetCode
/_67AddBinary.cpp
UTF-8
2,206
3.1875
3
[]
no_license
// // Created by junhui on 18/03/19. // #include <iostream> #include <string> //#include <stdlib.h> using namespace std; class Solution{ public: // string addBinary2(string a, string b){ // prepare a & b int N = maxN(a,b); a.insert(0, N - a.size(), '0'); b.insert(0, N - b.size(...
true
36ebce68f3054cade4eab5d28e0fceeb65413c7b
C++
lfxy/netframe
/Socket.cpp
UTF-8
1,152
2.625
3
[]
no_license
#include "Socket.h" #include "InetAddress.h" #include "SocketOps.h" #include <netinet/in.h> #include <netinet/tcp.h> #include <strings.h> Socket::~Socket() { SocketOps::close(m_sockfd); } void Socket::bindAddress(const InetAddress& localaddr) { SocketOps::bindOrDie(m_sockfd, localaddr.getSockAddrInet()); } v...
true
0154dc647637d6855d27d341ed24b3cb69708fc0
C++
Mrhero-web/leetcode-pp
/code/ch03/3.5.2.longestPalindromeSubseq.cpp
UTF-8
698
2.984375
3
[ "MIT" ]
permissive
#include <cstdlib> #include <string> #include <algorithm> using namespace std; class Solution { public: int longestPalindromeSubseq(string s) { int n = s.length(); int *pre = (int *)malloc(n * sizeof(int)); int *cur = (int *)malloc(n * sizeof(int)); for (int i = 0; i < n; i++) pre[i] = cur[i] =...
true
9ac1c2e11ebfc39d01ab5277889eaf6ff94898fb
C++
Techno1109/DxLib-ClassicRayTracing
/Geometory/Geometry.cpp
UTF-8
3,872
3.28125
3
[]
no_license
#include"Geometry.h" #include<DxLib.h> #include<cmath> void Rect::Draw() { DxLib::DrawBox(Left()*2, Top()*2, Right()*2, Bottom()*2, 0xffffffff, false); } void Rect::Draw(Vector2& offset) { DxLib::DrawBox((Left()+offset.x)*2, (Top()+offset.y)*2, (Right()+offset.x)*2, (Bottom()+offset.y)*2, 0xffffffff,...
true
b3edaa821bbc3912f34e5b6f4e2cfa0a7d3abac4
C++
d093w1z/ASCIIChess
/Peice.hpp
UTF-8
580
2.640625
3
[]
no_license
#include <vector> typedef std::vector <std::pair <int,int>> pos_list; typedef std::pair <int,int> pos_pair; class Peice { char P_col; char P_id; pos_pair P_pos; pos_list avail_moves; public: bool in_game; Peice(); void set(char id,char col,int x,int y,bool ig); void set(char id...
true
03f11668bb0b93b01eac44c3ce42f60662e62f4b
C++
ceKyleLee/cad20-tgls
/Simulation/src/parser/FileReader.h
UTF-8
887
2.75
3
[ "MIT" ]
permissive
#ifndef FILEREADER_H #define FILEREADER_H #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <sys/mman.h> #include <string> using std::string; class FileReader { private: char* filename; char* ptr; struct stat sb; public: FileReader(char* f, void* pPos = NU...
true
1c44851908abc28aaf87004acd6c69f74fcf7541
C++
braindigitalis/sleepy-discord
/include/sleepy_discord/voice.h
UTF-8
1,409
2.546875
3
[ "MIT" ]
permissive
#pragma once #include "discord_object_interface.h" #include "snowflake.h" namespace SleepyDiscord { //forward declearion struct Server; struct Channel; struct User; struct VoiceState : public DiscordObject { Snowflake<Server> serverID; Snowflake<Channel> channelID; Snowflake<User> userID; std::string ses...
true
ec0392659f83a70668723dd738fd58d1d0c86987
C++
ryokamoi/competitiveprog
/poj/poj1182.cpp
UTF-8
1,440
2.8125
3
[]
no_license
#include <iostream> using namespace std; #define REP(i, n) for(int i=0; i<n; i++) int par[3 * 50050]; int rk[3 * 50050]; void init (int n) { REP(i, n) { par[i] = i; rk[i] = 0; } } int find (int x) { if (par[x] == x) { return x; } else { return par[x] = find(par[x]); ...
true
c462da45c8d5163f5ce786f4185074ca61c002ef
C++
birdmanmandbir/leetcode-record
/leetleet/lc1111有效括号的嵌套深度/1111.cpp
UTF-8
727
3.203125
3
[]
no_license
#include <string> #include <stack> #include <iostream> #include <vector> using namespace std; // 1. 嵌套深度即为栈长度 // 2. 按嵌套深度的奇偶性来区分 vector<int> maxDepthAfterSplit(string seq) { vector<int> result(seq.size(), 0); stack<char> sk; vector<int> depth(seq.size()); int i = 0; for (char c : seq) ...
true
aaa487cdae640eb9c41ca92e320af7ed64a039cf
C++
grahammc-bit/CSCE240
/CSCE240/exam2/inc/char_matrix.h
UTF-8
1,166
2.84375
3
[]
no_license
// Copyright 2020 Matthew Graham #ifndef INC_CHAR_MATRIX_H_ // NOLINT #define INC_CHAR_MATRIX_H_ // NOLINT // CharMatrix Points: // Compiles: 1 (make test_char_matrix) // Lints: 1 (cpplint --root=./ */char_matrix.*) // TestFillConstructor: 1 // TestCopyConstructor: 1 // TestAssignOperator: 1 // test_char...
true
106ff6eb48d1ad75a6279cb81b04968254b60a72
C++
MichaelxhJiang/LeetCode
/LongestSubstringNoRepeatingCharacters.cc
UTF-8
271
2.765625
3
[]
no_license
int longestSubstring(string s) { unordered_map<char, int> map; int ans = 0; for (int i = 0, j = 0; i < s.length(); i++) { if (map.find(s[i]) != map::end) { j = map.at(s[i]); } if (i - j > ans) ans = i - j; map.insert({s[i], i}); } return ans; }
true
1be8afd4741467b21d8375b2a6d3b51ffc2bbb8d
C++
ccpang96/SGI_STL
/SGI_STL/Memory_Management_Header/per_class_allocator.h
GB18030
461
2.765625
3
[]
no_license
#pragma once namespace per_class_allocator { void per_class_allocator_function(); class Screen { public: Screen(int x) : i(x) {}; int get() { return i; } void* operator new(size_t); void operator delete(void*, size_t); private: Screen * next; //ֶ4ֽڣͰٷְ٣mallocĴȥcookie,һһnextָ static Screen* freeStore;...
true
6f14860266dcd2ab18954fe198bb1ced2cccdf2d
C++
eujuu/Algorithm
/baekjoon/백준 1654 랜선 자르기.cpp
UTF-8
812
2.765625
3
[]
no_license
#include <iostream> #include <vector> #include <queue> #include <string> #include <algorithm> using namespace std; int main() { vector<int> arr; long long start = 1; long long end = 0; long long max = 0; int n, k, tmp; scanf("%d%d", &n, &k); //cin >> n >> k; // for(int i=0; i < n; i++) { scanf("%d", &tmp);//...
true
f6c24bbc02f643b1546a36b94aa72ad53c5a5e48
C++
TheDizzler/RPGEngine
/Source/Engine/Camera.cpp
UTF-8
2,301
3.046875
3
[]
no_license
#include "Camera.h" Camera::Camera(int vwprtWdth, int vwprtHght) { zoom = 1.0f; viewportWidth = vwprtWdth; viewportHeight = vwprtHght; viewportCenter = Vector3(viewportWidth * .5, viewportHeight * .5, 0); position = Vector2::Zero; } Camera::~Camera() { } void Camera::setMap(MAPFile * mapFile) { map = m...
true
e54ef4110a994386af9489348b6f483e30a4f28c
C++
bk2earth/KV_Store_Engine_TaurusDB_Race
/KV_Store_Engine_TaurusDB_Race_stage2/example/kv_store/rpc_process.cc
UTF-8
4,626
2.609375
3
[ "MIT" ]
permissive
#include "rpc_process.h" #include <unistd.h> #include <thread> #include "utils.h" bool RpcProcess::Insert(char * buf, int len, DoneCbFunc cb) { if (buf == nullptr || len < PACKET_HEADER_SIZE) { KV_LOG(ERROR) << "insert to RpcProcess failed. size: " << len; return false; } auto & rpc = *(Pa...
true
cda05d98e4ecacd70a5f45d7b9b85c81ede6b673
C++
beata-d/planner
/planner/planner_project/plan_services/sources/DailyPlansService.cpp
UTF-8
5,033
3.21875
3
[]
no_license
#include <boost/date_time/gregorian/gregorian.hpp> #include "SqlConnection.h" #include "DailyPlan.h" #include "DailyPlansService.h" #include "View.h" void DailyPlansService::create_plan(View& view) { PlansService::create_plan(view); DailyPlan plan(description, category, date); SqlConnection sql_connection;...
true
2c78194a387473c7d3fc57312da7d74d504d4cf8
C++
chang-yu0928/algorithms
/solutions/LastKNode.cpp
UTF-8
918
3.5625
4
[]
no_license
#include <iostream> using namespace std; struct Node { int val; Node* next; Node(int v): val(v), next(NULL) {} }; Node *lastKNode(Node* head, int k) { Node *fast = head, *slow = head; for(int i = 0;i < k;i ++) { if(fast == NULL) { break; } fast = fast->next; } while(fast != NULL) { fast = fast->ne...
true
11ad4c13adcd4861cbc8c6c7e50c2337b4a2107c
C++
shubhgkr/Codechef
/Beginner/PLAYPIAN.cpp
UTF-8
555
2.9375
3
[]
no_license
/* * @author Shubham Kumar Gupta (shubhgkr) * github: http://www.github.com/shubhgkr * Created on 21/12/19. * Problem link: https://www.codechef.com/problems/PLAYPIAN */ #include <iostream> #include <string> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int t; std::cin >> t; std...
true
cf52dcef70c7777b0188706183f2f6cd8afbb3a8
C++
jbailleux/Encryption
/src/CryptageMessage.hpp
ISO-8859-1
650
2.765625
3
[]
no_license
/* * CryptageMessage.hpp * * Created on: 25 fvr. 2015 * Author: jrmy & ccile */ #ifndef CRYPTAGEMESSAGE_HPP_ #define CRYPTAGEMESSAGE_HPP_ #include <string> using namespace std; class CryptageMessage { public: CryptageMessage(const string,const string); virtual ~CryptageMessage(); void cryptage(); v...
true
5af1890054bcc15bf578a99620d88e428a193fcf
C++
suraj0803/DSA
/16.Dynamic Programming/Fibonacci_BottomUp.cpp
UTF-8
313
2.96875
3
[ "MIT" ]
permissive
#include<iostream> using namespace std; // Bottom down Approch int fib(int n) { int dp[100] = {0}; dp[1] = 1; for(int i=2; i<=n; i++){ dp[i] = dp[i-1] + dp[i-2]; } return dp[n]; } int main() { int n; cin>>n; cout<<fib(n); return 0; }
true
c198fcde7758e887d8d19ab1468005ce87c462e5
C++
shacharosn/War-game
/Armor.cpp
UTF-8
563
2.78125
3
[]
no_license
// // Created by shachar on 12/21/2017. // #include "ShieldArmor.h" #include "BodyArmor.h" #include <sstream> shared_ptr<Armor> Armor::make_armor(string type,stringstream& stream) { char temp; short s; double x,y; stream>>s>>temp>>temp>>x>>y>>temp; if (type == "BodyArmor") return st...
true
8f31bad6ef1d080e2467339f383350f070944879
C++
Butter-89/HeapManager
/MyHeapManager/HeapManager.h
UTF-8
1,887
2.875
3
[]
no_license
#pragma once #include "BlockDescriptor.h" class HeapManager { private: HeapManager* p_managerAddr; BlockDescriptor* p_currentDescriptor; BlockDescriptor* p_outstandingBlockStartAddr; BlockDescriptor* p_freeBlockStartAddr; void* p_firstUsableAddr; void* p_currentMemPtr; //ptr to the actual usable memory space (fo...
true
8385a26b597fb61d1622a5d062eb1a9c5f03ae21
C++
Mohsina-Jannat/Competitive_Programming
/dijkstra.cpp
UTF-8
1,608
2.90625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; template<class T> struct Dijkstra { int n; vector<vector<pair<T,int> > > adj; vector<int> dist; vector<T> parent; //dist printing Dijkstra(int n):n(n),adj(n) {} void add_edge(int a,int b,T w) { adj[a].push_back({b,w}); adj[b].push...
true
9e5361d12f085bc0154cf3800d094570d2254761
C++
usernamegenerator/leetcode
/1.two-sum.cpp
UTF-8
2,033
3.71875
4
[]
no_license
/* * @lc app=leetcode id=1 lang=cpp * * [1] Two Sum */ #include <vector> #include <map> using namespace std; // @lc code=start class Solution { public: /* brute force solution: iterate the array from the first index iterate the array from next index check if they add up to the targe */ /* ...
true
a990e0f0071b48ee7ec42b1321b5a476365e80d2
C++
clamugi/AtCoder-solutions
/ABC/001~100/056/056b.cpp
UTF-8
181
2.578125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main (){ int W, a, b; cin >> W >> a >> b; if (abs(a-b)<=W )cout << 0 << endl; else cout << abs(a-b)-W << endl; }
true
81b98a11c4f58afb887f5c3793837aa28ce328ae
C++
Zorgie/Robotics
/mapping/src/PlaneDetector_stash_for_photoshoot.cpp
UTF-8
8,340
2.84375
3
[]
no_license
/* * PlaneDetector.cpp * * Created on: Nov 18, 2013 * Author: robo */ #include "PlaneDetector.h" PlaneDetector::PlaneDetector() { } PlaneDetector::~PlaneDetector() { // TODO Auto-generated destructor stub } bool PlaneDetector::linesMatch(Vec4i& line1, Vec4i& line2) { if (isHorizontal(line1) != isHorizo...
true
3af86d9c7b2b4cf5f507a37e88de7c667b8a5fc6
C++
jmc359/sdl_dev
/include/game.hpp
UTF-8
1,462
2.59375
3
[]
no_license
#ifndef game_hpp #define game_hpp #include <SDL2/SDL.h> #include <SDL2/SDL_Image.h> #include <SDL2/SDL_TTF.h> #include <stdlib.h> #include <time.h> #include <iostream> #include <deque> #include <ctime> #include "agent.hpp" class Game{ public: Game(); ~Game(); void init(const char *title, int width, int height, boo...
true
c5383bf316b7e690cd7a958991752400bffbb9ed
C++
karygauss03/IEEE-Xtreme14.0-Solutions-SUPCOM_SB
/Rotational Lights/Rotational Lights.cpp
UTF-8
1,251
2.703125
3
[ "MIT" ]
permissive
//KARYGAUSS03 #include <bits/stdc++.h> using namespace std; void updatex(vector<long> &x, long step, long T) { for (auto &t : x) t = (t + step) % T; unsigned long i = x.size() - 1; while (x[i] < x[i - 1]) i--; if (i == x.size() - 1) return; vector<long> tmp(x.begi...
true
3ef7bfbe31004ed262f4fc1706f0c6163c22bc54
C++
TheFloHub/PluginTest
/src/Core/src/SceneObject.cpp
UTF-8
6,992
3.15625
3
[]
no_license
#include "Core/SceneObject.h" #include "Core/Component.h" #include <algorithm> #include <string> #include <typeinfo> #include <unordered_map> #include <vector> /********** Impl start ************/ class SceneObject::Impl final { public: Impl(SceneObject * d); ~Impl(); Impl(Impl const &) = delete; Impl & op...
true
817381f9a3c5c9874814759a19d3c38241ff6cf7
C++
jotaves/exercises
/queue/include/AbsQueue.h
UTF-8
609
3
3
[]
no_license
#ifndef ABSQUEUE_H #define ABSQUEUE_H /**Classe interface fila (não pode ser instanciada!). */ template < class Object > class AbsQueue { public: AbsQueue ( void ) { /* Empty */ } // Default constructor virtual ~AbsQueue( void ) { /* Empty */ } // Default destructor // Basic members virtual void enqueue ( co...
true
f5c4ff41a487ffb574a18b6128adba8bba4a3477
C++
iamslash/learntocode
/leetcode/BestTimetoBuyandSellStockwithCooldown/20181210.a.cpp
UTF-8
839
3.140625
3
[]
no_license
// Copyright (C) 2018 by iamslash #include <cstdio> #include <vector> #include <limits> #include <algorithm> // s0 <-cooldown- s2 // \ ^ // buy sell // \ / // -> s1 / class Solution { public: int maxProfit(const std::vector<int>& P) { if (P.size() <= 1) return 0; ...
true
b1719169e453612708944b9d0123392d5b945440
C++
memoiry/miscellaneous
/c++/EssentialCpp/Chapter 1. Basic C++ Programming/1.7.cpp
UTF-8
801
3.171875
3
[]
no_license
// // Essential C++ // Stanley Lippman // Chen Chen @ November 27th, 2014 // #include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(int argc, char *argv[]) { ifstream readFile("TestFile_1.7.txt"); if (! readFile.is_open()) cerr <<...
true
6acd724dc677ffb9726604c7fc2afa3341455c71
C++
christian-rauch/conversion_test
/src/conversion_test_node.cpp
UTF-8
959
2.5625
3
[]
no_license
#include <cv_bridge/cv_bridge.h> #include <opencv2/opencv.hpp> #include <iostream> int main(int argc, char * argv[]) { // create 16bit integer image const std::string fmt = sensor_msgs::image_encodings::MONO16; cv_bridge::CvImage im0; im0.image = cv::Mat(100, 100, cv_bridge::getCvType(fmt)); im0.im...
true
2cf7add9b87d0a6df57a39cdfd40ad9e6408060c
C++
Ansou1/CPP
/cpp_bomberman/BomberGUI/Background.cpp
UTF-8
2,219
2.546875
3
[]
no_license
// // Background.cpp for lol in /home/lerman_v/Git/C++/cpp_bomberman/BomberGUI // // Made by lerman_v // Login <lerman_v@epitech.net> // // Started on Fri May 30 14:58:12 2014 lerman_v // Last update Fri Jun 13 13:39:29 2014 Boulot // #include "Background.hh" #define PI 3.14159265f Background::Background(std::s...
true
499e9a0585c088756f5497a8a613881dead00aa1
C++
jannekoiv/bullet_test
/src/mesh.cpp
UTF-8
6,433
2.90625
3
[]
no_license
// // Created by jak on 4/11/16. // #include <sstream> #include <iostream> #include "mesh.h" using namespace std; GLuint Mesh::glMatView = 0; GLuint Mesh::glMatProjection = 0; GLuint Mesh::glLightPosition = 0; Mesh::Mesh() { vertexBuffer = 0; normalBuffer = 0; textureCoordinateBuffer = 0; colorBuffe...
true
1b9dc8a291ece146cfc8685798564149e2a4a10d
C++
mattjoncas/opengl-engine
/Renderer/Renderer/Light.h
UTF-8
1,263
2.796875
3
[]
no_license
#pragma once #include <glm/glm.hpp> namespace mor{ class Light { public: Light(); //point light Light(glm::vec3 _position, glm::vec4 _ambient, glm::vec4 _diffuse, glm::vec4 _specular, float _size, float _drop_rate, bool cast_shadows); //directional light Light(glm::vec3 _direction, glm::vec4 _ambient, gl...
true
f11140c2715d2257489ccc22afd4dd86248e99a5
C++
ukaea/UDA
/source/client2/udaGetAPI.cpp
UTF-8
2,118
2.625
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
#include "udaGetAPI.h" #include "client.hpp" #include "thread_client.hpp" #include "exceptions.hpp" #include <unordered_map> int udaGetAPI(const char *data_object, const char *data_source) { auto& client = uda::client::ThreadClient::instance(); try { return client.get(data_object, data_source); }...
true
fe6b7742d6cbf2bc9ebf394d4f01cfe63438b9f7
C++
tabatafeeh/URI
/C++/1013.cpp
UTF-8
293
3.03125
3
[]
no_license
#include <iostream> using namespace std; int main(){ int a = 0, b = 0, c = 0, maiorAB = 0, maior = 0; cin >> a; cin >> b; cin >> c; maiorAB = (a + b + abs(a - b)) / 2; maior = (maiorAB + c + abs(maiorAB - c)) / 2; printf("%d eh o maior\n", maior); return 0; }
true
1b88f522b355bd38f243057e347370a6dcadc479
C++
huannd0101/KTLT_HaUI
/BTH3-B/Bai3.3.cpp
UTF-8
541
3.625
4
[]
no_license
/*Bài 3.3.B. Viết hàm đệ quy tính giá trị của biểu thức: F(x, n) = 2017 + x + x2 + x3 +…+ xn ; với n nguyên dương. Viết chương trình chính minh họa cách sử dụng hàm trên.*/ #include<bits\stdc++.h> using namespace std; double F(double x, int n){ if(n == 1) return 2017 + x; return F(x, n - 1) + pow(x, n);...
true
55dc71b9b5e4c76aeff87c38ca29b087a6351a7f
C++
PhamKhoa96/DataStructure_Algorithm
/OOP/35_DynamicMemory2demensionArray.cpp
UTF-8
416
3.125
3
[]
no_license
/* Mảng hai chiều cấp phát động */ #include <iostream> using namespace std; int main() { int a[10][10]; int** array, array2, array3; float** floatArray; char** friends; array = new int* [10]; for (size_t i = 0; i < 10; i++) { array[i] = new int[10]; } for (size_t i = 0; i < 10; i++) { for (size_t j...
true
625e64e5100ec3f99f91c30bede75a1894d36d43
C++
sshikshu/spoj
/stpar/main.cpp
UTF-8
1,176
2.90625
3
[]
no_license
#include <iostream> #include <array> using namespace std; int main(int argc, char *argv[]) { int n, mobile, arranged, i, firstInSideStreet = -1; const int limit = 1000; array<int, limit> lovemobiles; array<int, limit> sideStreet; while (true) { cin >> n; if (n == 0) { break; } arranged...
true
c52e33cf4b387f14545a7fb2c2a989fd9a0416c4
C++
YFSHEN97/Othello
/agent.h
UTF-8
2,550
3.171875
3
[]
no_license
#ifndef AGENT_H #define AGENT_H #include <cstdint> #include <fdeep/fdeep.hpp> #include "bitboard.h" #include "position.h" // class for an AI Agent that plays the game class Agent { public: // constructor Agent(Color c); // dummy destructor for cleanup purposes virtual ~Agent() {}; // optional fun...
true
c54c2dc089db4c3952fd3071550cf0048fcef21d
C++
Fritz1414213562/cafemol_utility
/include/DCD/old_src/calc_H32DNA_ang.cpp
UTF-8
1,744
2.875
3
[]
no_license
#include"DCDAnalyzer.hpp" #include<string> #include<iostream> #include<fstream> #include<memory> #include<array> #include<vector> #include<numeric> #include<cmath> #include<typeinfo> template<typename T, std::size_t N> inline std::array<T, N> operator*(const std::array<T, N> lhs, const std::array<T, N> rhs) { st...
true
8a5c4a65bf42282e0c5dc7f24f2dace2edb02335
C++
noopwafel/VossII
/src/external/circuit-isomatch/src/circuitTree.cpp
UTF-8
2,846
2.578125
3
[ "Apache-2.0", "LGPL-3.0-only" ]
permissive
//------------------------------------------------------------------- // Copyright 2020 Carl-Johan Seger // SPDX-License-Identifier: Apache-2.0 //------------------------------------------------------------------- #include "circuitTree.h" #include "circuitGroup.h" #include "debug.h" #include <cassert> using namespace...
true
0e1c007d3794101d0c8bcd5b91b4e96bf44a2ff8
C++
Rohitaharwar2003/Networks-Evoting-System
/client/http_response_parser.cpp
UTF-8
1,151
3
3
[]
no_license
#include "http_response_parser.h" using namespace std; HttpResponseParser::HttpResponseParser(string & data){ size_t new_line_index = data.find("\r\n"); //if there is no new line then throw an exception if (new_line_index == string::npos) throw -1; this->statusLine = data.substr(0,new_line_ind...
true
7849c0d5a5a6cf927f37bae4be9ebfb21333e012
C++
Totol-Luzh/Laba
/Laba 4.cpp
UTF-8
781
2.578125
3
[]
no_license
#include <locale.h> #include <stdio.h> #include <stdlib.h> int main() { int n, i, s0, s1, j, k; int *ms; setlocale(LC_ALL, "RUS"); printf("Введите размер сигнала "); scanf_s("%d", &n); ms = (int*)calloc(n*3, sizeof(int)); if (!ms) { printf("Место под массив не выделено"); return 1; } p...
true
d4d08aa4a87ab3bc7c369b233194f5b388ef7155
C++
remymuller/boost.simd
/doc/examples/reduction.cpp
UTF-8
1,981
2.828125
3
[ "BSL-1.0" ]
permissive
//! [reduc] #include <boost/simd/constant/zero.hpp> #include <iostream> #include <numeric> #include <vector> #include <boost/simd/meta/cardinal_of.hpp> #include <boost/simd/pack.hpp> //! [reduc-inc] #include <boost/simd/function/sum.hpp> //! [reduc-inc] int main() { //! [reduc-simd-types] namespace bs = boost::si...
true
c8997be8a23f1e923c543da15bc5e767f08c902c
C++
alonso804/cs3402-lab4
/compilers/Parser.hpp
UTF-8
1,204
3
3
[]
no_license
#pragma once #include <vector> #include "FlexScanner.hpp" #include "Token.hpp" namespace utec { namespace compilers { // Grammar: // S -> AB // A -> aA | a ===> a [A] // B -> bB | b ===> b [B] class Parser { public: Parser(std::istream& arg_yyin, std::ostream& arg_yyout) : scanner(arg_yyin, arg_y...
true
e190756c8c3adba1695f24774d115f7ba3632883
C++
br-lovanshi/Data_Structures_Algorithms_In_Cplusplus
/Factorial-large.cpp
UTF-8
741
2.890625
3
[]
no_license
You are asked to calculate factorials of some small positive integers. Input An integer T, denoting the number of testcases, followed by T lines, each containing a single integer N. Output For each integer N given at input, output a single line the value of N! Input Constraint 1 <= T <= 100 1 <= N <= 100 SAMPLE INP...
true
5c1e6fff61e2bb7e48d11a3ac5bd240cc7d283f0
C++
liuweiyu/C-Programs
/NaiveBayesClassifier/NaiveBayesClassifier/Reader.cpp
UTF-8
3,246
2.875
3
[]
no_license
#include "Reader.h" #include "Tools.h" #include <iostream> #include <fstream> using namespace std; Reader::Reader(void) { LoadConfigFile(attrConfig, ATTRTYPEINFO_FILE, 2); attrAndLableNum = attrConfig.size(); LoadRawDataFile(rawData, RAWDATA_FILE); } Reader::~Reader(void) { } /* @parameters: result: attrConfig...
true
8efe4a5230e36a639928c3ddb9652424899c6943
C++
chgogos/oop
/various/OPENEDG/ch2/q8.cpp
UTF-8
218
2.90625
3
[ "MIT" ]
permissive
#include <iostream> #include <list> #include <algorithm> using namespace std; int main() { list<int> mylist{3,9,2,4,5}; mylist.erase(mylist.begin()); for(auto x: mylist){ cout << x << " "; } }
true
d66ed353ff39c059dc09148f452ef7dc0fdaf7ec
C++
mattlacorte/ECGR3123_SC
/server_man.cpp
UTF-8
2,566
2.75
3
[]
no_license
//server arch | client - server #include <ws2tcpip.h> #include <iostream> #include <string> #pragma comment(lib, "ws2_32.lib") using namespace std; int main() { // setup WSADATA wsData; WORD ver = MAKEWORD(2, 2); // check for startup proper int wsOK = WSAStartup(ver, &wsData); if (wsOK != 0) { // bad s...
true
cea0473105d666463e4fb99f549af73659f5dde2
C++
acutkosky/shuffler
/shuffler.cpp
UTF-8
4,963
2.96875
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdlib> #include <string> #include <cstdio> #include <vector> #include <ctime> #define IN_MEMORY_SIZE 100000 #define BUFFER_LINE 1000 #define BRANCHING 15 using namespace std; string getFileNameFromPath(string path) { std::size_t lastSlash = path.rfind('/'); str...
true
ba2401008399355495d69e5275ea2ee577fffe83
C++
cpwilliams57/CSCE121
/storeBackend/store.cpp
UTF-8
2,980
3.1875
3
[]
no_license
// // store.cpp // storeBackend // // Created by Cody Williams on 10/27/16. // Copyright © 2016 Cody Williams. All rights reserved. // #include <string> #include <stdexcept> #include "store.h" #include "product.h" #include <iostream> #include <fstream> #include <cstdio> #include <cstdlib> #include "customer.h" usi...
true
93dc06961e702004d1e1df38914837570bd4d176
C++
jt2603099/ThavisayJohnny_CSC5_42480
/Hmwk/Assignment_2/Savitch_9thEd_Ch2_ProgProj_1/main.cpp
UTF-8
1,477
3.203125
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. */ /* * File: main.cpp * Author: jt2603099 * Artificial Sweetener Diet Soda * Created on March 11, 2018, 2:40 PM */ #include <io...
true
58ac2a4653f589f43fba387e268af3b5b9c6d693
C++
mrlukasbos/Chess
/chesspieces/Rook.cpp
UTF-8
576
3.21875
3
[]
no_license
// Created by Lukas Bos on 04/12/2017. #include "Rook.h" Rook::Rook(Board *board, Square *location, PieceColor color) : ChessPiece(board, location, color) { type = ROOK; name = "Rook"; letter = 'R'; } std::vector<Square *> Rook::getAvailableSquares(bool considerCheck) { Vector2i horizontalAndVerticalDire...
true
4fbab2d1eedec55d1384d622e4d06be1137a67d8
C++
michalgregor/msi-gt72s-keyboard
/src/Keyboard.h
UTF-8
795
2.75
3
[ "BSD-3-Clause" ]
permissive
#ifndef KEYBOARD_H #define KEYBOARD_H #include <map> #include <hidapi/hidapi.h> #include "Color.h" extern std::map<std::string, char> RegionNames; extern std::map<std::string, char> ModeNames; char parseRegion(const std::string& region); char parseMode(const std::string& mode); class Keyboard { private: hid_device...
true
f261a4ba8359ab492684b6a5053a4f1eb65860ed
C++
ytz12345/Project-Euler-solutions
/348.cpp
UTF-8
1,024
2.859375
3
[]
no_license
#include "eulerlib.h" const ll N = 1e10; ll rev(int x, int num, bool isOdd = false) { static char ch[20]; static ll y; ch[0] = y = 0; while (x > 0) ch[++ ch[0]] = x % 10, x /= 10; for (int i = 1, j = ch[0]; i < j; i ++, j --) swap(ch[i], ch[j]); if (isOdd) ch[++ ch[0]] = num; for (int i =...
true
87974fea77e42ba40bb3d137f2d21d81ddffce60
C++
Gugurumbe/tarotv2
/client/q_requests.cpp
UTF-8
13,030
2.578125
3
[]
no_license
#include "q_requests.hpp" #include <QString> using namespace tarotv; using namespace protocol; using namespace client; using namespace std; request::request(QObject * parent): QObject(parent), sock(0){ } void request::do_request(value_socket * sock, const value & v){ this->sock = sock; QObject::connect(sock...
true
175b25cb78803838d27cce3c4121f8f69366c6a5
C++
gerry2206/DS_ALGO_prep
/Dynamic-Programming/increasing-subsequence.cpp
UTF-8
776
2.953125
3
[]
no_license
#include<iostream> #include<algorithm> #include<vector> using namespace std; #define vi vector<int> #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define fastio ios_base::sync_with_stdio(0), cout.tie(0), cin.tie(0) //EDITORIAL /*dp[i] denotes if LIS of length i can be constructed ; for each ...
true
8cb311a08d7a40ff6cf26c81a08bdf3add780b4b
C++
xcesek/Petri-Net-on-Arduino
/Transition.h
UTF-8
851
2.671875
3
[]
no_license
#ifndef Transition_h #define Transition_h #include "Arduino.h" #include "Helper.h" #include "Place.h" class Transition { private: char *id; int pin; FunctionType functionType; int extended; Place **inPlaces; int inPlacesCount; Place **outPlaces; int outPlacesCount; int analo...
true
27efc1d06b8b8034ade3566c5c917ffa0eacbb22
C++
wangyongliang/nova
/poj/1159/POJ_1159_2430100_AC_1700MS_68K.cpp
UTF-8
511
2.578125
3
[]
no_license
#include<stdio.h> #include<iostream.h> //pku 3181 char str[5010]; short dp[2][5010]={0}; short minimum(short a,short b) { return a<b?a:b; } void main() { int n,i,j,flag; while(scanf("%d",&n)!=EOF) { flag=0; scanf("%s",str+1); for(i=n;i>0;i--,flag=1-flag) for(j=0;j<=n;j++) { if...
true
41beb6234adb5c92cc95a35a8cff995c08b9debf
C++
BPAishwarya/INFM_Course_Projects
/Arduino projects/Breatheeffect/randNumberGuess/randNumberGuess.ino
UTF-8
2,403
3.28125
3
[]
no_license
#include <stdlib.h> int randomNumber; //the random number that the user is trying to guess //const char *chGuess; String guess = ""; String newChar = ""; void setup() { randomSeed(analogRead(7)); //seed the random number generator based on a 'random' reading from an unconnected analog input...
true
c4b0a37557da5ba1483f9601b6b5b58ba8d33615
C++
silky/MicroMacro
/slitscan/src/Slicer.h
UTF-8
979
2.609375
3
[ "MIT" ]
permissive
// // Slicer.h // slitscan // // Created by Chris on 09/03/2015. // // #pragma once #include "ofMain.h" #include "AlphaMask.h" // Slicer chops up an image/texture into vertical strips and draw the output into an FBO // Basic usage: call begin() draw any texture and call end() and then draw() class Slicer { public:...
true
f88a5be98ac542d46b5061986005f73c6a63b9da
C++
limon2009/ACM-UVA-Online-Judge-solution
/10097.cpp
UTF-8
1,386
2.875
3
[]
no_license
#include<iostream> #include<queue> #define maxn 102 using namespace std; struct ss { int u, v; int cost; }; queue<ss>Q; char F[maxn][maxn]; int Link[maxn][maxn], N; int n1, n2, n3, game; int BFS() { ss temp, dum; int u, v; F[n1][n2] = F[n2][n1] = 1; temp.u = n1; temp.v = n2; temp.cost = 0; Q.push(temp); w...
true
b401eb5a46b68d1228afc65be370170977166e24
C++
zuev-stepan/PhysicsEngine
/ShapeFactory.h
UTF-8
3,510
3.15625
3
[]
no_license
#ifndef SHAPEFACTORY #define SHAPEFACTORY #include "World.h" class ShapeFactory { public: World* w; ShapeFactory(World &world) { w = &world; } void createRagdoll(float x, float y) { Particle* head = w->createParticle(x, y, 20); Particle* neck = w->createParticle(x, y + 35, 10); Particle* lh1 = w->createP...
true
f4c32ceb19eeb1a947e4bf6b10689102f468443f
C++
EpicStep/surl-hackathon
/main.cpp
UTF-8
738
2.53125
3
[]
no_license
#include <iostream> #include <cpr/cpr.h> int main(int argc, char* argv[]) { const std::string url = "http://localhost:8000/api/json/v2"; std::string methodStr; if (argc <= 1) { methodStr = "systemInfo"; } else { methodStr = argv[1]; } std::string body = R"({"id":0, "jsonrpc":...
true
c5f45beb0489dc4b6629dec374796d7217c06ca7
C++
sly1061101/440-BreakThrough
/Src/GameBoard.hpp
UTF-8
1,242
2.90625
3
[]
no_license
// // GameBoard.hpp // 448-BreakThrough // // Created by Liuyi Shi on 10/25/17. // Copyright © 2017 Liuyi Shi. All rights reserved. // #ifndef GameBoard_hpp #define GameBoard_hpp #include <stdio.h> #include <vector> namespace board { enum cellstatus {Player0, Player1, Empty}; typedef enum cellstatus Cell...
true
1087e78bee2371b6ee0b92e5e85c9388b1e71648
C++
GroupOfRobots/MiniRysV3Tests
/mpu6050/main.cpp
UTF-8
595
2.953125
3
[]
no_license
#include <iostream> #include <csignal> #include "IMU.hpp" bool exitFlag = false; void sigintHandler(int signum) { if (signum == SIGINT) { exitFlag = true; } } int main(int argc, char * argv[]) { signal(SIGINT, sigintHandler); std::cout << "initializing imu\n"; IMU * imu = new IMU(); imu->initialize(); std...
true
47c05ee84297a7dda172341674d01dbf32d7ce34
C++
michaelmeixner/Arduino-Projects
/EE452L Labs/Lab 3/sketch_feb25a/sketch_feb25a.ino
UTF-8
1,339
2.921875
3
[]
no_license
// Michael Meixner, EE452 Lab 3 const int EWgreen = 8, EWyellow = 9, EWred = 10, NSgreen = 11, NSyellow = 12, NSred = 13; const int buttonPin = 3; int buttonState = 0; void setup() { // put your setup code here, to run once: pinMode(EWgreen, OUTPUT); pinMode(EWyellow, OUTPUT); pinMode(EWred, OUTPUT); ...
true
d414a5480f6ee57029cc35b7442e1f1f04a42689
C++
ReturnJohn/SteamSpace2
/SteamSpace/SteamSpace/Player.cpp
UTF-8
657
2.96875
3
[]
no_license
#include "Player.h" #include "GameObject.h" #include "SOIL.h" Player::Player(float initX, float initY, float initZ) : GameObject(initX,initY,initZ) { x = initX; y = initY; z = initZ; direction = 0; texture = SOIL_load_OGL_texture("Plane.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y); //Load textu...
true