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
128471fb0febdb46f0e130d7fbbd25a4f0f2ccae
C++
pastorsa/dec
/dec_world_state/include/dec_world_state/world_state_impl.h
UTF-8
1,986
2.59375
3
[]
no_license
/* * world_state_impl.h * * Created on: Jan 14, 2013 * Author: kalakris */ #ifndef WORLD_STATE_IMPL_H_ #define WORLD_STATE_IMPL_H_ #include <ros/ros.h> #include <boost/function.hpp> #include <dec_world_state/ObjectState.h> #include <dec_msgs/Objects.h> #include <tf/transform_datatypes.h> #include <map> na...
true
617845e77a588ccf23350d81c0593d6e3f9133eb
C++
RobJenks/rj-engine
/RJ/DynamicTerrainDefinition.h
UTF-8
3,298
2.890625
3
[]
no_license
#pragma once #include <string> #include <unordered_map> #include "CompilerSettings.h" #include "ErrorCodes.h" #include "DynamicTerrainState.h" #include "DynamicTerrainInteractionType.h" class DynamicTerrain; class DynamicTerrainDefinition { public: // Default constructor DynamicTerrainDefinition(void); // Unique...
true
37488f5236dacd0dc2658b8f063ed449fdc913fa
C++
mooncollin/C_plus_plus-Helpful-Libraries
/tests/geometry/triangle.ixx
UTF-8
2,899
3.09375
3
[]
no_license
export module cmoon.tests.geometry.triangle; import cmoon.test; import cmoon.geometry; namespace cmoon::test::geometry { export class triangle_construction_test : public cmoon::test::test_case { public: triangle_construction_test() : cmoon::test::test_case{"triangle_construction_test"} {} void operato...
true
8ef1afad2784b76cf0f903eaad31f2e478bc2048
C++
AaronCFreytag/SessionZero
/SessionZero/SessionZero/Window.cpp
UTF-8
1,479
2.734375
3
[]
no_license
#include "Window.h" #include "ErrorFormatter.h" #include <stdexcept> namespace SessionZero { bool Window::windowClassSet = false; Window::Window(HINSTANCE instance, const std::wstring title, int width, int height, int windowDisplayState) noexcept { if (!windowClassSet) { setupWindowClass(instance); } hand...
true
ed7b5e46c6d764775d2334fa8abcb9c98e0ffed2
C++
SergioPerea99/Computer-Graphics-and-Visualization
/IGV2021-GR3-PereadelaCasa-Sergio-PR5/PINBALL_codigo_fuente/igvColor.cpp
UTF-8
1,123
3.09375
3
[]
no_license
#include "igvColor.h" // Constructures igvColor::igvColor () { } igvColor::~igvColor () { } igvColor::igvColor (const double r, const double g, const double b) { color[R] = r; color[G] = g; color[B] = b; } igvColor::igvColor (const double r, const double g, const double b, const double a) { co...
true
b7583d37759c75e79d908271f8c0441e229588a5
C++
nganhkhoa/LIBRPO
/src/SignUp/SignUp.cpp
UTF-8
4,672
2.984375
3
[]
no_license
/* * @CreateTime: Jun 18, 2017 10:04 PM * @Author: luibo * @Contact: ng.akhoa@yahoo.com.vn * @Last Modified By: luibo * @Last Modified Time: Jun 18, 2017 10:04 PM * @Description: Đăng ký người dùng mới */ #include <SignUp/SignUp.h> #include <Data/ReadDataJSON.h> using namespace std; using json = nlohmann::jso...
true
fc6ac9b34009cba75f3720dc203f999fbd533254
C++
BrunoCamargo-100/estrutura-dados
/01_revisao/aula01/ex21.cpp
UTF-8
259
3.109375
3
[]
no_license
#include <iostream> using namespace std; int main() { int contador = 0; while(contador < 10) { contador++; cout << "\nContador = " << contador; } cout << "\n\nValor final: Contador = " << contador; return 0; }
true
69cefeed46a3971a3e7b88780321489f7080415f
C++
chavanrc/axion
/problem/include/balancing_scale.hpp
UTF-8
988
2.9375
3
[]
no_license
#pragma once #include <variant> #include <string> #include <fstream> namespace balancing_scale { struct Node { std::variant<size_t, std::string> value_; size_t node_weight_{0}; size_t left_delta_{0}; size_t right_delta_{0}; Node *left_{nullptr}; Node *right_{nullptr...
true
e076a0a13689b1e3ce779b54369656b97487cafb
C++
PhillipVoyle/WhiteBlackCat
/src/wbcparse/production.cpp
UTF-8
3,497
2.953125
3
[ "MIT" ]
permissive
#include "production.h" class CToken:public IToken { std::string m_identifier; unsigned m_id; public: CToken(const std::string& identifier): m_identifier(identifier), m_id(0) { } const std::string& GetName() { return m_identifier; } void SetID(unsigned id) { m_id = id; } u...
true
73489a79a3debe193662d8fdf23050e455f217d8
C++
e-sushi/P3DPGE
/P3DPGE/src/components/Light.h
UTF-8
503
2.625
3
[ "MIT", "LicenseRef-scancode-public-domain", "Unlicense" ]
permissive
#pragma once #include "Component.h" #include "../math/Vector3.h" struct Light : public Component { Vector3 position; Vector3 direction; //TODO change this to Quat float strength; //Geometry* shape; //OpenGL's tutorial used int but we may want to experiment //with using float later on std::vector<int> depthTex...
true
073cc7afdc99fa26dd4e382175cc7e038a92e83b
C++
buzzon/FirstOpenGL
/ray_traicing/sphere.cpp
WINDOWS-1251
889
2.984375
3
[]
no_license
#include "sphere.h" // length ( origin direction) ? bool sphere::intersect(const vec3f& origin, const vec3f norm_direction, float& length) const { //// origin direction //vec3f ray = norm_direction - origin; vec3f L = position - origin; float tca = L * norm_direction; float d2 = L * L - t...
true
cf88b636b9c407981e0888c6937993924e3ec40e
C++
theazgra/CudaCourse
/project/src/image.cpp
UTF-8
870
3.015625
3
[ "MIT" ]
permissive
#include <image.h> Image::Image(const char *filename, ImageType type) { this->type = type; FreeImage_Initialise(); FREE_IMAGE_FORMAT fileFormat = FreeImage_GetFileType(filename); _data = FreeImage_Load(fileFormat, filename); _channels = channels_per_image_type(type); _width = FreeImage_GetWid...
true
b6c9ae4afe7ff5dbbadb05f4325d019cba68399a
C++
haoyuanz13/Codings
/arrayIssue/longestIncrease.cpp
UTF-8
1,804
3.375
3
[]
no_license
#include <vector> #include <algorithm> #include <iostream> using namespace std; typedef vector<vector<int>> matrix; // increase subsequence in array, no need to be continuous (DP) int longestLength(vector<int> nums) { if (nums.empty() || nums.size() < 1) return 0; if (nums.size() == 1) return 1; int ...
true
ea384ea96ccb87d52b3af9dee8b5ab51cc51a1c7
C++
rafaeldoria/Exercicios_Algoritmo1
/roteiro_5/Exercicio4_lista4.cpp
ISO-8859-1
602
3.25
3
[]
no_license
/* Programador : Rafael Dria Data: 23/05/2013 Descrio: Lista 4 Exerccio 4 */ #include<iostream> #include<math.h> using namespace std; int main() { int vet[10],number,aux; for (int i=0;i<10;i++) { cout<<"Digite um valor: "; cin>>number; vet[i]=number; } for (int i=0;i<10;i++) ...
true
b22167295b480c03300e3156a842077045c742f4
C++
kanekyo1234/AtCoder_solve
/ABC/49/A.cpp
UTF-8
252
2.765625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { char b; cin >>b; //cout <<a << c; if (b=='a' || b=='e' || b=='i' || b== 'o' || b== 'u'){ cout << "vowel"; }else{ cout << "consonant"; } return 0; }
true
3af5594c2d6c94eadf20d97586405aa13cb5540f
C++
vespa-engine/vespa
/vespalib/src/vespa/vespalib/hwaccelrated/generic.cpp
UTF-8
5,045
2.609375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "generic.h" #include "private_helpers.hpp" #include <cblas.h> namespace vespalib::hwaccelrated { namespace { template <typename ACCUM, typename T, size_t UNROLL> ACCUM multiplyAdd(const T * a, const T *...
true
1e89b220a529008c4bec3237e931229e1533c37f
C++
PeterZs/AnIntroductionToRayTracing
/header/superhyperboloid.h
UTF-8
1,260
2.828125
3
[]
no_license
#ifndef SUPERHYPERBOLOID_H #define SUPERHYPERBOLOID_H #include "hitable.h" #include "material.h" #include "log.h" class superhyperboloid : public hitable { public: superhyperboloid() {} superhyperboloid(vec3 cen, float a1, float a2, float a3, float e1, float e2, float s1, float s2, floa...
true
214496ad8d4d26cabc9317ab7f63c89065639667
C++
angelhunt/acm
/nowcoder/求解方程.cpp
UTF-8
7,469
2.984375
3
[]
no_license
#include <cstdio> #include <iostream> #include <string> #include <cstring> using namespace std; int x=0,n=0,xr=0,nr=0; int flag =0; void Adds(string a,char op) { if(flag==0) // 等式左边 { if(a[a.size()-1]=='x') // 处理的该项为x的系数 { if(a=="x") x += (op=='+'?1:-1); ...
true
57ad2d6e701001764ce66891e3aa58860dfb0168
C++
Sumon-Ict/UVA-Problem-Solution
/UVA and URI Problem solution/uva12577.cpp
UTF-8
556
2.90625
3
[]
no_license
#include<iostream> #include<stdio.h> #include<cstring> using namespace std; int main() { char str[10]; char str1[]="*"; char str2[]="Hajj"; char str3[]="Umrah"; int i=1; while(1) { cin>>str; if(strcmp(str,str1)==0) break; if(strcmp(str,str2)==0) ...
true
71f5a37f67c3a9b821402ca1bb3740f239268678
C++
Thuy2612/C-_OOP
/Thi/Mtime/Mtime.cpp
UTF-8
578
3.609375
4
[]
no_license
#include "Mtime.h" Mtime::Mtime() { hours=0; minutes=0; seconds=0; } Mtime::Mtime(int hours, int minutes, int seconds ) { this->hours=hours; this->minutes=minutes; this->seconds=seconds; } void Mtime::show() { if(seconds>=60) { minutes+=minutes/60; seconds=seconds%60; } if(minutes>=60) { hours+=hours...
true
8fa990cf7b8f24d8544e8268746b25f4fceb02b6
C++
jyao6429/11872A-team-code
/pros-2020-2021/include/indexer.h
UTF-8
531
2.546875
3
[]
no_license
#ifndef INDEXER_H #define INDEXER_H namespace indexer { /** * Moves indexer with target voltage while insuring safety with a mutex * * @param indexerVolt - desired voltage for the indexer motor */ void moveVoltageSafe(int indexerVolt); /** * Moves indexer with target voltage ...
true
c7086614defbc967858eda5b8b62548809282d6b
C++
Nikhil12321/codes
/stringendingwith$.cpp
UTF-8
883
2.890625
3
[]
no_license
#include<iostream> #include<string.h> #include<unordered_map> using namespace std; int main(){ string s; getline(std::cin, s); unordered_map<string, int> m; char *str; const char *brk = " $"; int i; str = new char[s.size()]; for(i = 0;i<s.size();i++) str[i] = s[i]; ...
true
7588b413ebc1d073f97b560d2691afde4a2593d7
C++
sunnyisgalaxy/moabs
/src/mcomp/lib/stan/math/prim/scal/fun/log1m_exp.hpp
UTF-8
1,462
3.3125
3
[]
no_license
#ifndef STAN__MATH__PRIM__SCAL__FUN__LOG1M_EXP_HPP #define STAN__MATH__PRIM__SCAL__FUN__LOG1M_EXP_HPP #include <boost/math/tools/promotion.hpp> #include <stdexcept> #include <boost/throw_exception.hpp> #include <boost/math/special_functions/expm1.hpp> #include <stan/math/prim/scal/fun/log1m.hpp> namespace stan { na...
true
c10d49d1aa5be5c17b889d8a7e9ad5a82c964674
C++
paulobruno/UFC-DigitalImageProcessing
/mains/colorMain.cpp
UTF-8
1,595
2.640625
3
[]
no_license
#include <string> #include <opencv2/opencv.hpp> #include <vector> #include "../libs/coloring.h" int main(int argc, const char** argv) { if (2 > argc) { std::cout << "Error: incorrect number of args.\n" << "Usage: " << argv[0] << " <image>\n"; return -1; } std::string filen...
true
cb77d72a8458ab0ca0b9391ba2332db7f7aa2082
C++
miguelangelo78/QEPU_HardwareSimulator
/misc/utils/utils.cpp
UTF-8
1,821
3.03125
3
[]
no_license
#include "../../stdafx.h" #include "utils.h" char * Utils::long2binstr(int num, int strlength){ char*str = new char[strlength + 1]; if (!str) return NULL; str[strlength] = 0; // type punning because signed shift is implementation-defined unsigned u = *(unsigned *) &num; for (; strlength--; u >>= 1) str[strlengt...
true
6d9ee090f1a86f0f7d8457a1c32a1484acb3a9f8
C++
skolakoda/ucimo-cpp
/45-pokazivaci/pokazivaci2.cpp
UTF-8
307
3.15625
3
[]
no_license
#include <iostream> int main(){ int broj = 3; int *pokazivac; std::cout << "Prazan pokazivac pokazuje na memorijsku adresu " << pokazivac << ".\n"; pokazivac = &broj; std::cout << "Pokazivac sada pokazuje na " << pokazivac << ", memorijsku adresu varijable broj.\n"; return 0; }
true
3b55bbc817670143a0cf2084517607c7226f084c
C++
ConnectNitish/CompetitiveProgramming
/CodeFiles/Array_Others/interviewbit-count-pairs-in-array-whose-sum-is-divisible-by-the-given-number-hash/main.cpp
UTF-8
2,758
2.890625
3
[]
no_license
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debu...
true
22cce9542deb4e08a0ca5c90d088852547ebe148
C++
Romchirik/OS
/5lab/main.cpp
UTF-8
2,155
2.8125
3
[]
no_license
#include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #define _FILE_OFFSET_BITS 64 #define LINE_BUF_SIZE 32 int main(int argc, char** argv) { if (argc < 2) { perror("No text file given, please restart with one\n"); return 0; ...
true
b20bf84e840a224e89bd2cbc73392ecad0fa88cf
C++
excalibur44/homework
/C++/week11/A.cpp
UTF-8
1,864
3.234375
3
[]
no_license
#include <iostream> #include <string> using namespace std; class base { public: base(string one, char two, int three) { myname = one; leixing = two; dengji = three; if(two == 'N') { blood = dengji*5; shanghai = dengji*5; fangyu = dengji*5; } else if(two == 'A') { blood = dengji*5; shangha...
true
646ff5ffe1dd4f30d74cb80d8f540d4bdc7dcc7c
C++
dreamerconglin/2017-Spring-CPE-593
/HW1b Compute binomials using memoization/HW1b/main.cpp
UTF-8
1,178
3.140625
3
[]
no_license
#include <iostream> #include <vector> #include <time.h> using namespace std; int ch(int n ,int r, vector <vector <int> > &value){ if(value[n][r] != -1){ return value[n][r]; // Use memoization } else{ value[n][r] = ch(n - 1 ,r , value) + ch(n - 1 ,r - 1, value); // Re...
true
676a79119018500dafcf5e8f92b3bbf15026e20b
C++
ajitesh22/Coding-Problems
/cousins-in-binary-tree.cpp
UTF-8
1,202
3.5625
4
[]
no_license
//https://leetcode.com/problems/cousins-in-binary-tree/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * Tre...
true
0271329ebe88d3e57894d920b4a9d4d2cdd6a1ea
C++
adameat/arduflow
/Serial.h
UTF-8
4,211
2.71875
3
[]
no_license
#pragma once #include <HardwareSerial.h> #include <SoftwareSerial.h> namespace AW { template <HardwareSerial& Port, long Baud> class THardwareSerial { public: void Begin() { Port.begin(Baud); } int AvailableForRead() const { return Port.available(); } int AvailableForWrite() con...
true
0cad933b30b36c06717c7c28f6c58299099c8bff
C++
andrewzhernov/concurrency
/BlockingQueue/solutions/solution.h
UTF-8
1,458
3.4375
3
[]
no_license
#include <iostream> #include <condition_variable> #include <queue> #include <mutex> #include <stdexcept> template <class T, class Container = std::deque<T>> class BlockingQueue { public: explicit BlockingQueue(const size_t capacity) : blocked_{false} , capacity_{capacity} { } void Put(T&& item) { ...
true
10a0fb171402cf1fc0888edb4b5efb356cd567d7
C++
searleser97/DistribuitedSystems
/Proyectos/alan/worms/point.cpp
UTF-8
713
3.71875
4
[]
no_license
#include "point.h" #include <cmath> Point::Point(): x(0), y(0) {} Point::Point(double x, double y): x(x), y(y) {} double Point::getX() { return x; } double Point::getY() { return y; } Point Point::operator+(const Point & p) const { return Point(x + p.x, y + p.y); } Point Point::operator-(const Point & p) const...
true
a7881162978d8609b0a1664da6fec64bb808b5c1
C++
Vidyadhar-Mudkavi/gitApplications
/Calendar/zzBak/CalendarTemplates/calRataDie.h
UTF-8
3,299
2.59375
3
[ "MIT" ]
permissive
#ifndef _CALRATADIE_ #define _CALRATADIE_ /** *File: calRataDie.h *Description: this file declares class calRataDie *Version: 1.2 "@(#) calRataDie. header. ver. 1.2. Premalatha, Vidyadhar Mudkavi, CTFD, NAL." *Dependencies: *Authors: Premalatha, Vidyadhar Mudkavi, CTFD, NAL. *Date:...
true
68b8df636cbe61eaca270c7ad645534c4b98d197
C++
Shawan-Das/C-_Code
/DoubleLinkList.cpp
UTF-8
2,467
3.53125
4
[]
no_license
#include<bits/stdc++.h> using namespace std; ///Double Link List ///Create Node struct Node { int data; Node* next; Node* previous; }; Node* head=NULL; Node* indicator=NULL; ///Node Insertion void insertFirst(int value){ Node* singleNode = new Node; singleNode->data = value; s...
true
3b6c670c18da05698fed3099170ccd3e73ecd49a
C++
arvind-murty/CS135
/assignment4/Murty_Arvind_DA04__s3.cpp
UTF-8
4,541
3.21875
3
[]
no_license
// Header Files #include "formatted_cmdline_io_v11.h" #include <cmath> using namespace std; // Global Constant Definitions // Global Function Prototypes // Prints the title // Inputs: none // Outputs: none void printTitle(); // Gets a coordinate // Inputs: lowerCoor, higherCoor // Outputs: coordinate...
true
a0f92670a705a817d4210228f6c806d33c432877
C++
jjpulidos/Competitive-Programming
/UVa/Competitive Programming 3/Introduction/Getting Started The Easy Problems/Medium/10424 - Love Calculator/main.cpp
UTF-8
1,030
3.03125
3
[]
no_license
/** * 10424 - Love Calculator * Created by Juan Pulido on 6/07/2018 */ #include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = (int)1e9; int sumita(string str) { int sum = 0, i = 0; for(i = 0; i < str.size(); i++) { char ch = str[i]; if((ch>64 &&ch<91)||(ch>96&&c...
true
cfe3d6ddf4b1134567b8dca1c73b3217c9d8edf7
C++
Noobaseem/Competitive-Programing
/spoj_problems/21_absys.cpp
UTF-8
1,482
2.6875
3
[]
no_license
/* * @author: Aseem Rastogi * alumini: National Institute of Technology, Hamirpur * Batch of 2014 * mail_id: aseem.rastogi1992@gmail.com */ #include <iostream> #include <vector> #include <queue> #include <cctype> #include <cstring> #include <iomanip> #include <cstdio> #include <algorithm> using namespace std; ...
true
0bd10e485f17a0a66fda2150a3b4ad66e5db12b2
C++
El-Duder1no/geometry
/src/structFill.cpp
UTF-8
740
3.046875
3
[]
no_license
#include "structFill.h" bool structFill(Circle& a, std::string text) { std::string x, y, r, figure; float xF, yF, rF; const char* temp; enter(text, figure, x, y, r); if (figure != "circle") { return false; } temp = x.c_str(); if (isdigit(temp[0]) || temp[0] == '-') { ...
true
0828a88aa19e3f92908aa8df1666a2f3d65c45ad
C++
lukeomalley/cpp-algorithms
/src/TwoSumSorted.cpp
UTF-8
1,203
3.921875
4
[]
no_license
#include <iostream> #include <vector> using namespace std; /** * Given a 1-indexed array of integers numbers that is already sorted in * non-decreasing order, find two numbers such that they add up to a specific * target number. Let these two numbers be numbers[index1] and numbers[index2] * where 1 <= index1 < in...
true
58f14db34077ef002c863236a479888b946fcbc4
C++
lcls-daq/pdsapp
/config/Table.hh
UTF-8
2,131
2.765625
3
[]
no_license
#ifndef Pds_ConfigDb_Table_hh #define Pds_ConfigDb_Table_hh #include <list> using std::list; #include <string> using std::string; #include <iostream> using std::istream; namespace Pds_ConfigDb { class FileEntry { public: FileEntry(); FileEntry(istream&); // load from a file FileEntry(const string& n...
true
021b74e932b1ebafaa5e5f3e05a27d109ec05deb
C++
cfriedt/leetcode
/zigzag-conversion-test.cpp
UTF-8
1,238
2.859375
3
[ "MIT" ]
permissive
/* * Copyright (c) 2018 Christopher Friedt * * SPDX-License-Identifier: MIT */ #include <array> using namespace std; #include <gtest/gtest.h> #include "zigzag-conversion.cpp" TEST(ZigZagConversion, Test__PAYPALISHIRING__3) { // string convert(string s, int numRows) int numRows = 3; string s("PAYPALISHIRI...
true
ba93413394e4df407c2187b45d4506739dd0634e
C++
mei-rune/jingxian-project
/jingxian-network/src/jingxian/exception.h
GB18030
9,946
2.59375
3
[]
no_license
#ifndef _MY_Exception_H_ #define _MY_Exception_H_ #include "jingxian/config.h" #if !defined (JINGXIAN_LACKS_PRAGMA_ONCE) # pragma once #endif /* JINGXIAN_LACKS_PRAGMA_ONCE */ // Include files #include <stdexcept> #include "jingxian/string/os_string.h" #include "jingxian/lastError.h" #include "jingxian...
true
4d75bce23ff9cd71e29a95737909f0b229b0447c
C++
kevinqi34/HackerRank
/Algorithms/Strings/Palindrome_Index.cpp
UTF-8
1,329
3.640625
4
[]
no_license
#include <bits/stdc++.h> using namespace std; // Checks if a string is a palindrome bool palindrome(string s) { bool checker = true; int length = s.size() / 2; for (int i = 0; i < length; i++) { if (s[i] != s[s.size() - 1 - i]) { checker = false; break; } } ...
true
549716e06dc35df6392cd90a364df14c7ddd723f
C++
MilovanTomasevic/cpp-tutorial
/src/04_exercises__task_15/Zadatak15Cas4/Vreme.hpp
UTF-8
1,643
3.03125
3
[ "MIT" ]
permissive
// // Vreme.hpp // Zadatak15Cas4 // // Created by Milovan Tomasevic on 18/03/2017. // Copyright © 2017 Milovan Tomasevic. All rights reserved. // #ifndef ZAGLAVLJE_HPP_INCLUDED #define ZAGLAVLJE_HPP_INCLUDED #include <iostream> #include <cmath> using namespace std; class Vreme{ private: int sekunde; pu...
true
c92e1493ee445add0b8eacd0581b5e5bf5431e34
C++
YangKai-NEU/algorithms
/TheLastRemainingNumberInTheCircle.cpp
UTF-8
534
3.15625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; class Solution { public: int LastRemaining_Solution(int n, int m) { vector<int> s; if(n==0){ return -1; } for(int i=0;i<n;i++){ s.push_back(i); } int pos=0; while(s.size()!=1){ pos+=(m-...
true
2ce9f535c30eb8b6fc28bf97df9fad46ffb379c8
C++
hollyhudson/furbies
/brain/brain.ino
UTF-8
4,486
2.78125
3
[]
no_license
/* Furby Brain */ #define SOUND_IN 21 #define TILT 20 #define UPSIDE_DN 19 #define MOTOR_FOR 18 // 4 // PWM #define MOTOR_REV 17 // 5 // PWM #define XCAM_HOME 0 #define GEAR_ROT 1 #define XBACK 2 #define TUMMY 3 int desired_position = 0; int position; long last_millis; // EARS int ears[] = { 0, 50, 22, 12, ...
true
4b723f3b6c457c1f742eb229c544d51922b6f3ee
C++
franco-ruggeri/polito-system-programming-api
/lab3/ReducerInput.h
UTF-8
3,244
2.953125
3
[]
no_license
// // Created by fruggeri on 7/2/20. // #pragma once #include <vector> #include <memory> #include "Serializable.h" template<typename K, typename V, typename A> class ReducerInput: public Serializable<ReducerInput<K,V,A>> { K key; V value; A acc; public: ReducerInput() {} ReducerInput(K key, V va...
true
14f98436e91523f3e9ce4a3dd6035398560dc5c4
C++
mateoreynoso/HW03
/HW03-EX01/readInt.cpp
UTF-8
862
3.453125
3
[]
no_license
#include "readInt.h" #include <iostream> #include <stdexcept> #include <limits> using namespace std; int read_int(const string &prompt, int low, int high) { // First checks the arguments if (low >= high) { throw invalid_argument("The smallest acceptable number cannot be higher that the largest acceptable intege...
true
1e2e584cbe5290e0bef63c314c5ecbcee5113bbe
C++
shining-yang/BOP
/misc/lambda01.cpp
UTF-8
489
3.234375
3
[]
no_license
// #include <iostream> void print(int a) { std::cout << "Value: " << a << std::endl; } void foo() { int val = 1; //auto const_val_lambda = [=]() { val = 2; }; //const_val_lambda(); print(val); auto mutable_val_lambda = [=]() mutable { val = 3; }; mutable_val_lambda(); print(val); auto const_ref_lambda = ...
true
b6c8fee7371f43f780097135deedccdab2102e55
C++
dheerajkhatri/bajinga
/leetcode/stackbyQueue.cpp
UTF-8
1,393
3.796875
4
[]
no_license
#include <bits/stdc++.h> using namespace std; class Stack { public: // Push element x onto stack. queue<int>q1,q2; void push(int x) { q1.push(x); } // Removes the element on top of the stack. void pop() { int temp; while(q1.size()!=1){ temp = q1.front(); ...
true
3bf114126e32269231207776826df13ecd1aa192
C++
iworeushankaonce/ContestProgramming
/UvA Online Judge/uva12279-Emoogle_Balance.cpp
UTF-8
685
2.671875
3
[]
no_license
#include <iostream> #include <string> #include <sstream> #include <iomanip> #include <vector> #include <algorithm> #include <cctype> using namespace std; int main() { int cases = 0; int n; for(int cas = 0; ; ++cas) { cin >> n; if (n == 0) break; int c1 = 0; int c2 = 0; for(int i = 0;...
true
a942c88885ee6aa1e7e5798fa82aac7bf82961ef
C++
hungvv2808/khmt1_k12_learn_ktlt
/bth1/1.1.cpp
UTF-8
448
3.171875
3
[]
no_license
#include <iostream> #include "math.h" using namespace std; int main(){ int a, b; cout << "a = "; cin >> a; cout << "b = "; cin >> b; cout << "Tong hai so la: " << a+b << endl; cout << "Hieu hai so la: " << a-b << endl; cout << "Tich hai so la: " << a*b << endl; ...
true
a8eb868068daa6cf91bc44b3bd2254b9915d6e2f
C++
cfigueroa36/CS111_Lab
/L10Q1_dice.cpp
UTF-8
350
3.453125
3
[ "MIT" ]
permissive
#include <iostream> #include <cstdlib> using namespace std; int main(){ int dice, sum=0; cout<<"How many dice would you like to roll"<<endl; cin>>dice; for(int i=0; i<dice; i++){ int x=rand()%10; while(!(x>=1 && x<=6)) x=rand()%10; cout<<x<<" "; sum+=x; } cout<<"\nThe sum of these numbers i...
true
4c73b5bc4e12ee240868b72cce7468ad491bffd9
C++
nvdnkpr/bob-1
/include/bob/trainer/SVMTrainer.h
UTF-8
4,634
2.5625
3
[ "BSD-2-Clause" ]
permissive
/** * @file bob/trainer/SVMTrainer.h * @date Sat Dec 17 14:41:56 2011 +0100 * @author Andre Anjos <andre.anjos@idiap.ch> * * @brief C++ bindings to libsvm (training bits) * * Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland */ #ifndef BOB_TRAINER_SVMTRAINER_H #define BOB_TRAINER_SVMTRAI...
true
cba460bdb3d20281b3d610ad9d342b23c7f83264
C++
IngwiePhoenix/stlplus3
/tags/stlplus-03-01/tests/inf_test/inf_test.cpp
UTF-8
5,799
2.578125
3
[]
no_license
#include "inf.hpp" #include "timer.hpp" #include "build.hpp" #include "file_system.hpp" #include "persistent_inf.hpp" #include "persistent_shortcuts.hpp" #include "strings.hpp" #define DATA "inf_test.tmp" #define MASTER "inf_test.dump" #ifdef WIN32 typedef __int64 bigint; #else typedef long long bigint; #endif #defi...
true
6212f1dbd167d3bcb023655cd1f97dbbe705da16
C++
jamesbertel/CS-311
/CS311Progs/HWPrograms/forEC2/shortestmain.cpp
UTF-8
822
3.015625
3
[]
no_license
// CS311 Yoshii - Shortest Path Extra Credit - Use as is - DO NOT CHANGE //--------------------------------------------------------------------- #include <iostream> using namespace std; #include "dgraph2.h" int main() { dgraph T; T.filltable(); T.makeTree(0); // 0th entry is now in Tree T.displayTable()...
true
9294eebcfe297affbc4786824ee7f2957caf3f44
C++
frankfanslc/XamlCpp
/ui_controls/src/gtk3/entry.cpp
UTF-8
1,822
2.59375
3
[ "MIT" ]
permissive
#include <shared/atomic_guard.hpp> #include <shared/entry.hpp> using namespace std; xaml_result xaml_entry_internal::draw(xaml_rectangle const& region) noexcept { if (!m_handle) { m_handle = gtk_entry_new(); g_signal_connect(G_OBJECT(m_handle), "changed", G_CALLBACK(xaml_entry_internal::on_cha...
true
4c1266053deddba37246163f5a6b19036517ad15
C++
leilanihc112/CSCE-121_TAMU
/Labs-121/Lab11/lab11.cpp
UTF-8
1,244
3.4375
3
[]
no_license
#include "std_lib_facilities_4.h" void fill_vector(istream& ist, vector<int>& v, char terminator) // read integers from ist into v until we reach eof() or terminator { for (int i; ist>>i; ) v.push_back(i); if (ist.eof()) return; // fine: we found the end of file if (ist.bad()) error("ist is bad"); // stre...
true
6077f580cf862d80922c48c6a6694b2dcd6ab72b
C++
sang8052/cpro
/图书馆/源代码/lib/图书馆管理系统/登录窗口.cpp
GB18030
10,119
2.515625
3
[ "MIT", "BSD-3-Clause" ]
permissive
// ¼.cpp : ʵļ // #include "stdafx.h" #include "ͼݹϵͳ.h" #include "¼.h" // ¼ Ի ¼::¼(CWnd* pParent /*=NULL*/) : CDialog(¼::IDD, pParent) , Username(_T("")) , Password(_T("")) , strVERSION(_T("")) { m_hIcon = AfxGetApp()->LoadIcon(IDI_ICON1); } void ¼::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExcha...
true
42b6e22eef241699933c45f1a98d93d6492b1ad8
C++
colistro123/Deer_Hunter04_GameSpy_Patches
/SH2Proxy/GLHook.cpp
UTF-8
1,359
2.765625
3
[]
no_license
#include "stdafx.h"" #include "GLHook.h" #include <stdio.h> // Header File For Standard Input/Output //this will hook a process and all of it`s modules (loaded DLLs) //by writting to kernel`s area /* This Code will create a process-wide hook by writing to the kernel's * * Parameters Are: * * Dll ...
true
74b5395f3a2ce54585c4ae9b62dd7750186ae782
C++
ShankarBirTamang/Learning_Cplusplus
/ch3_OperatorOverloading/QuestionsNSolution/Q4.cpp
UTF-8
1,686
4.34375
4
[]
no_license
//Example of overloading < , > and = operator #include<iostream> #include<math.h> using namespace std; class complex{ private: int real; int img; public: void getComplex(){ cout<<"Enter real part: "; cin>>real; cout<<"Enter Imaginary part: "; ...
true
c21c6155d889f368d4904ccc465c1fb992373455
C++
jsrdzhk/algo_snippet
/jz_offer/bt_path_sum.cxx
UTF-8
952
3.015625
3
[ "MIT" ]
permissive
/* * @title: todo * @author: Rodney Cheung * @date: 2021-06-20 12:22:10 * @last_author: Rodney Cheung * @last_edit_time: 2021-06-20 12:44:16 */ #include "precompiled_headers.h" class Solution { private: std::vector<std::vector<int>> res; int t; std::vector<int> cur; public: std::vector<std::vecto...
true
340bf55d3b9376ee77c97ab6b1453d35283e8eed
C++
Vothongminh/CODE-055
/CODE-055.ino
UTF-8
1,424
2.734375
3
[]
no_license
//VTM https://www.youtube.com/c/VTMVlogVoThongMinh #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 20, 4); #include "MQ135.h" //gọi thư viện MQ135 #include "DHT.h" //gọi thư viện DHT11 #define PIN_MQ135 A2 MQ135 mq135_sensor = MQ135(PIN_MQ135); const int DHTPIN = 2; //...
true
6f4c7546b8deaa202e9cbbac03613e3d21689435
C++
asomeJay/algorithm
/Acm_icpc/C,C++/boj1007.cpp
WINDOWS-1252
1,387
2.796875
3
[]
no_license
/* Ī */ #include <iostream> #include <vector> #include <stack> #include <tgmath.h> #include <algorithm> #include <cstring> #define N_DOT 21 #define ll long double using namespace std; pair<int, int>dot[N_DOT]; ll Ans = 9876543210, n_of_vector; void init(); void combination(); int main(void) { ios_base::sync_wit...
true
c6f0ee4000e615e871330916c2ea2d902b585189
C++
Thrash92/Ultrasonic
/Ultrasonic.cpp
UTF-8
585
2.703125
3
[]
no_license
#include "Ultrasonic.h" Ultrasonic::Ultrasonic(uint8_t trig, uint8_t echo) : m_trig(trig), m_echo(echo) { pinMode(trig, OUTPUT); pinMode(echo, INPUT); } ulong Ultrasonic::distance(Unit u, ulong timeout) { digitalWrite(m_trig, LOW); delayMicroseconds(2); digitalWrite(m_trig, HIGH); delayMicroseco...
true
b608910079eca916b0a80e0e3ba8f5847ab6769d
C++
AndreSci/Cpp
/lesson_125/prefix_02.cpp
UTF-8
2,078
3.265625
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> #include <map> using namespace std; bool cmp_up(const string& prefix, const string& word) { int p = static_cast<int>(prefix.size()); string w1; //if (p <= static_cast<int>(word.size())) for (int i(0); i < p; i++) { w...
true
dc7bcee4d28d0359fd605c6cde1c2c2e5844080b
C++
FarshidNooshi/Data-Structures-and-Algorithms-CE-course
/Final Project-Routing with Graph Algorithms/Implementations/Reader.cpp
UTF-8
876
2.765625
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> #include "Headers/Reader.h" using namespace std; void Reader::ReadMap() { cin >> numberOfPoints >> numberOfEdges; for (int i = 0, id; i < numberOfPoints; i++) { double x, y; cin >> id >> x >> y; points.push_back({ id, x, y }); } for (int i = 0, idSource, idTarget; i < numberOfEdge...
true
18e05e438e353459187f048e7986430f45545d2d
C++
Sawy7/alg2projekt2_nem0215
/alg2projekt2_nem0215/BTree.h
UTF-8
1,130
2.5625
3
[]
no_license
#pragma once #include "TreePage.h" #include <iostream> #include <iomanip> #include <string> using namespace std; class BTree { public: BTree(int o); void Insert(int value); void PrintTree(); int CountKeys(); void FindKey(int value); void Remove(int value, bool onlyRebalance); void PTIMP(); int GetTreeHeight();...
true
481d9bb35b2565c588a0b3493c023d3a4e306e8c
C++
darqwski/DrvalEngine
/Model/Leadings.cpp
UTF-8
1,434
2.78125
3
[]
no_license
// // Created by General Automatic on 2019-07-16. // #include "Leadings.h" #include "../Utilities/SuperUtilities.h" #include "Plan.h" const Instructors &Leadings::getInstructor() const { return instructor; } void Leadings::setInstructor(const Instructors &instructor) { Leadings::instructor = instructor; } S...
true
b4f5c01b0758921d7e4896fa77fb3252e4593065
C++
lijiaxin-dut/leetcode
/leetcode_train/Solution_676.cpp
GB18030
1,290
3.421875
3
[]
no_license
#include<unordered_map> #include<unordered_set> #include<vector> using namespace std; //ֵеĵʵĹھ //ĵʣھӣ˵һ //ֻһھӣҪǰǷб class MagicDictionary { public: unordered_set<string>words; unordered_map<string, int>count; /** Initialize your data structure here. */ MagicDictionary() { } vector<string>generakuzed_neighbors...
true
4a8a60e3987b8fcb01a76087ab330062f1c0f200
C++
NothinRandom/PCA9685
/PCA9685.cpp
UTF-8
1,457
2.625
3
[]
no_license
#include <PCA9685.h> #include <Wire.h> PCA9685::PCA9685(uint8_t address) { _address = BASE_ADDRESS | address; } void PCA9685::begin() { Wire.begin(); } void PCA9685::init() { reset(); } void PCA9685::reset() { write8(MODE1, 0x00); } void PCA9685::setFREQ(float freq) { float prescaleval = 25000000; presca...
true
e9d0a029f787fb7b4cc7df77de6888984145ab1f
C++
smurakami/AmarikkoSound
/src/ofApp.cpp
UTF-8
4,787
2.546875
3
[]
no_license
#include "ofApp.h" #include "ofxCv.h" template <typename T> static cv::Mat toCv(ofPixels_<T>& pix) { int depth; switch(pix.getBytesPerChannel()) { case 4: depth = CV_32F; break; case 2: depth = CV_16U; break; case 1: default: depth = CV_8U; break; } return cv::Mat(pix.getHe...
true
c0df1d08ef0a2e7cee713acb7c9bcafa3725db62
C++
bobodaye/myWorkSpace
/DesignPatterns/singleton/singleton.cpp
UTF-8
1,567
2.78125
3
[]
no_license
/************************************************************************* > File Name: singleton.cpp > Author: BoLiu > Mail: > Created Time: Fri 29 Sep 2017 05:50:36 PM CST ************************************************************************/ #include <iostream> #include <stdio.h> #include <pthread.h> #incl...
true
29e1d3897a0868ed37840b93a8051cf3efbe4e3a
C++
magicnat/bridge-distribute
/test/dist-server-test.cc
UTF-8
2,537
2.890625
3
[ "Unlicense" ]
permissive
#include "dist-server-test.h" #include <sys/socket.h> #include <chrono> int cs1[2]; int cs2[2]; int cs3[2]; void DistributionServerTest::DoStart() { socketpair (AF_UNIX, SOCK_DGRAM, 0, cs1); socketpair (AF_UNIX, SOCK_DGRAM, 0, cs2); socketpair (AF_UNIX, SOCK_DGRAM, 0, cs3); HandleConnect(cs1[1]); ...
true
05df8a08ad55d1b3f9ea66498690bcd364e75e7b
C++
GuillaumeNed33/RunnerPOO
/Runner_Nedelec_Marcilloux/AnimatedGraphicElement.cpp
UTF-8
2,198
2.953125
3
[]
no_license
#include "AnimatedGraphicElement.h" //=========================================================================================================================== // Description : Constructeur de AnimatedGraphicElement // Auteur : Guillaume Nedelec // Date : 8/04/16 // Interêt : permet de creer des AnimatedGraphicEL...
true
9cd378ca9f480551e918f03f1090ca4053ad0d17
C++
hieple19/bee-project
/Engine/BusyBeeEngine/runhistory.h
UTF-8
648
2.640625
3
[]
no_license
#ifndef RUNHISTORY_H #define RUNHISTORY_H #include <iostream> #include <string> #include "../../DBee/dbtool.h" #include "../../DBee/dbtable.h" #include "../../DBee/dbtablerun.h" #include "run.h" class DBTableRun; class RunHistory { public: RunHistory(); void add_prev_run(Run* run); void ad...
true
66892fd8e1639b8dc1636490aa7cdc21a0673768
C++
bmartin5263/Cursen
/Cursen/Cursor/ArrowMap.h
UTF-8
1,209
2.859375
3
[]
no_license
// // Created by Brandon Martin on 3/12/19. // #ifndef CURSEN_ARROWMAP_H #define CURSEN_ARROWMAP_H class VisualComponent; namespace cursen { struct ArrowMap { ArrowMap() { this->left = nullptr; this->up = nullptr; this->down = nullptr; this->right = nullp...
true
ed88766f1b10695a18864b2ffbc7bc600a908963
C++
bingeun/BG_DX
/BG_KGCA/Max02_BG/bgTemplateMap.h
UTF-8
3,511
2.796875
3
[]
no_license
#pragma once #include "bgStdMax.h" using namespace std; template<class Child> class bgTemplateMap { public: typedef map<int, Child*> TemplateMap; typedef typename TemplateMap::iterator TemplateMapIter; public: TemplateMap m_TMap; TemplateMapIter m_TMapIter; int m_iCurIndex; public: bgTemplateMap(); ...
true
ff8bfca1c32e730218fdacdee9ad6f1f248f8c82
C++
rastamarco/ComputacaoGrafica
/projetoDois/projFinal/Bird/Head.cpp
UTF-8
360
2.59375
3
[]
no_license
#include <GL/glut.h> #include <GL/glu.h> #include <GL/gl.h> #include "Pecker.cpp" class Head { public: Head(float size); void Draw(); protected: Pecker b; float size; }; Head::Head(float size) : size(size), b(size/2) {} void Head::Draw() { glRotatef(-90,0.0,0.0,1.0); glPushMatrix(); //Cabeca glutSolidSph...
true
3a284162ed4db6ce189d65e899ab96ed4e8d11c0
C++
mfkiwl/ZH
/Matrix.h
GB18030
743
2.5625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; class AFX_EXT_CLASS CMatrix // { public: CMatrix(void); CMatrix(const CMatrix &); //ƹ캯 CMatrix(int i,int j); //ʼС //CMatrix(const vector<vector<double>> &); //캯 ~CMatrix(void); // public: vector<vector<double>> Data; int acr; int ver...
true
b16fa6729afa3bb37659eb47c85209e3e50dcfa2
C++
ttyang/sandbox
/sandbox/synchro/boost/synchro/condition_backdoor.hpp
UTF-8
2,119
2.640625
3
[]
no_license
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/l...
true
28d8c738bc2f813001f6e84d818f4a20ee023162
C++
osukarusan/particlephysics
/particlesystem/include/SpringForce.h
UTF-8
978
2.96875
3
[]
no_license
#ifndef _SPRING_FORCE_ #define _SPRING_FORCE_ #include "Force.h" class SpringForce : public Force { public: SpringForce(void); virtual ~SpringForce(void); virtual void apply(); void setEquilibriumPoint(const Vec3d& eqPoint); void setSpringCoefficient(double ks); void setDampingCoefficient(double kd); Vec3...
true
a0e4eec1673416f4285a6f62513562cc3220c130
C++
LuigiAndMario/AlgoLab
/week6/london/london 1.cpp
UTF-8
3,203
3.015625
3
[]
no_license
#include <iostream> #include <vector> #include <string> // BGL include #include <boost/graph/adjacency_list.hpp> #include <boost/graph/push_relabel_max_flow.hpp> // Graph Type with nested interior edge properties for flow algorithms typedef boost::adjacency_list_traits<boost::vecS, boost::vecS, boost::directedS> trai...
true
257a087712ea810385c34f13d90c2f46ed474d2b
C++
yaohaiyan/Base-Algorithms
/dataStructure/MinPriorityQueue.cpp
UTF-8
1,145
3.328125
3
[]
no_license
#include "stdafx.h" #include "MinPriorityQueue.h" #include <iostream> MinPriorityQueue::MinPriorityQueue() { this->type = MIN_HEAP; } MinPriorityQueue::~MinPriorityQueue() { } Element MinPriorityQueue::minimum() { return this->queue.at(0); // 可能会越界 } Element MinPriorityQueue::extractMin() { return extractM()...
true
83068e8d0978ae26f3b4ad0b4244dc5e4b4c8639
C++
jvanns/oodles
/utility/TreeBase.hpp
UTF-8
501
2.65625
3
[]
no_license
#ifndef OODLES_TREEBASE_HPP #define OODLES_TREEBASE_HPP // oodles #include "NodeBase.hpp" namespace oodles { /* * Bare-bones base class for any Tree type. * It must remain non-templated and defines * only necessary, common place methods and * attributes. */ class TreeBase { public: TreeBase(); ...
true
401169d1ed85c20c15bccef4fcb399f00cd85bc0
C++
VysotskiVadim/algorithms_learning
/binary_heap/src/BinaryHeap.hpp
UTF-8
6,316
3.546875
4
[ "MIT" ]
permissive
#pragma once #include <memory> #include "GenericComparer.hpp" #include <cstring> #include <sstream> namespace al { template <typename T> class BinaryHeap { public: BinaryHeap( std::unique_ptr< Comparer<T> > comparer, T *initialHeap, int size, int ca...
true
73a84dd958cfb0fd6714b8bca9114354731fa3ed
C++
verioussmith/Arduino-Introductory-Lessons
/LESSON_3-Ardino-For-Loops-And-LED-Circuit/LESSON_3-Ardino-For-Loops-And-LED-Circuit.ino
UTF-8
1,012
3.203125
3
[]
no_license
int redLEDPin=9; // Declaring red Led Pin as an int and set to 9 int yellowLEDPin=10; // Declaring yellow Led Pin as an int and set it to 10 int redOnTime=100; // This is the red on time int redOffTime=900; // This is the red off time int yellowOnTime=10; // This is the yellow on time int yellowOffTime=500; /...
true
5aed94c48257c7613c0c0768d19fff300e512111
C++
youridv1/huiswerk
/week2/2_5.cpp
UTF-8
293
3
3
[]
no_license
#include <iostream> #include "functions.hpp" #include <vector> using namespace std; int teller(const vector<int> & numbers, const int & x){ int teller = 0; for(unsigned int i=0; i<numbers.size(); i++){ if(numbers[i] == x){ teller++; } }return teller; }
true
3555b20eedf3ab1ef9f332b1c1c7e99b9cd50e15
C++
gmeisinger/hackrpg
/src/global.cpp
UTF-8
936
2.796875
3
[]
no_license
#include "include/global.h" int screen_w = SCREEN_WIDTH; int screen_h = SCREEN_HEIGHT; int tile_s = TILE_SIZE; Player *player; //loads image at specified path as a texture //fname = relative path to image SDL_Texture* utils::loadTexture(SDL_Renderer* renderer, std::string fname) { //the final texture SDL_T...
true
9aa8a2826941b67c9207b43582e55d8e64ccb6aa
C++
mayankamencherla/cracking-the-coding-interview-solutions
/sorting-and-searching/common-sorting-algorithms.cpp
UTF-8
2,730
3.9375
4
[ "MIT" ]
permissive
/** * Some common sorting algorithms */ #include <vector> #include <iostream> using namespace std; vector<int> selectionSort(vector<int> v, int index) { if (index >= v.size()) return v; int minIndex = index; int minValue = v[minIndex]; for (int i=index; i<v.size(); i++) { if (v[i] < ...
true
7e6ae3b2ef8a91842654d46aa31607189b7cd78e
C++
raulMrello/RoboticPlant
/src/Shifter/Shifter.h
ISO-8859-1
3,280
2.578125
3
[]
no_license
/* Copyright (c) 2017 @raulMrello Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, pub...
true
fa054557e0c0f3dd13e71b831598239faad433e1
C++
elancha98/PracticaPro2
/program.cc
UTF-8
2,565
3.1875
3
[]
no_license
// // Created by ernesto on 23/04/17. // /** * @mainpage Reads commands from the console and executes them. * It reads a Specie, a initial population and then performs operations over * that population. Operations like adding a new Organism, reproduce two members * or print the genotype of an Organism....
true
df0273b6417d2fc10f23749982e6f5d5c300577f
C++
julioCoutinho/URI
/2510.cpp
UTF-8
279
2.78125
3
[]
no_license
#include <iostream> using namespace std; int main() { int t; cin >>t; while(t-->0) { string nome; cin >> nome; if(nome == "batmain") cout << 'N' << endl; else cout << 'Y' << endl; } return 0; }
true
a5b62ebee8ecc3712ed68978c83f1511ec3e62dc
C++
Chainsawkitten/UltimateGolf19XX
/src/Editor/GUI/HorizontalLayout.cpp
UTF-8
1,026
2.78125
3
[ "MIT" ]
permissive
#include "HorizontalLayout.hpp" #include <Core/Resources.hpp> namespace GUI { HorizontalLayout::HorizontalLayout(Widget* parent) : Container(parent) { rectangle = Resources().CreateRectangle(); nextPosition = glm::vec2(0.f, 0.f); } HorizontalLayout::~HorizontalLayout() { ...
true
10b298faae91567adb00c993c623a9a80c5f702a
C++
singhsiddharth10/LuvBabbar450
/dsanalgo/NegativeAndPositive.cpp
UTF-8
386
3
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void negativeAndPositive(int arr[], int n){ int j=0; for(int i = 0; i < n; i++){ if(arr[i] < 0){ if(i != j){ swap(arr[i], arr[j]); } j++; } } } int main(){ int n; cin>>n; int arr[n]; for(int i = 0; i < n; ++i)cin>>arr[i]; negativeAndPositive(a...
true
0d76e915278e241c6453b3c60d137e86e22156aa
C++
mdub555/OS-Project-3
/src/simulation.cpp
UTF-8
11,471
3.125
3
[]
no_license
#include "simulation.h" #include "types/event.h" #include <cassert> #include <fstream> #include <iostream> using namespace std; void Simulation::run(const string& filename) { read_file(filename); // While their are still events to process, invoke the corresponding methods // to handle them. while (!events.e...
true
874cc406ce4f947b7bd4ad4b6017375a8287c02f
C++
rushingfox/AlgorithmHomework
/homework3/question3/question3.cpp
GB18030
1,121
3
3
[]
no_license
#include<iostream> #include<vector> using namespace std; const string arr1 = "apple"; const string arr2 = "peach"; const int m = 5; const int n = 5; vector<char> result; void solvedp(int(&dp)[m + 1][n + 1]); int main() { int dp[m+1][n+1]; solvedp(dp); int i = m ; int j = n ; while (i!=0||j!=0) { if (i>=1&&dp...
true
5d52e71fa2843a4e1ce8aebb22af98234ee0d736
C++
EnsekiTT/wasa-ailot
/Arduino/IMU_Fusion_Board/IMU_Fusion_Board.ino
UTF-8
4,740
2.8125
3
[]
no_license
/* IMU Fusion Board - ADXL345 & IMU3000 Example Arduino Sketch to read the Gyro and Accelerometer Data Written by www.hobbytronics.co.uk See the latest version at www.hobbytronics.co.uk/arduino-adxl345-imu3000 08-Apr-2011 */ #define GYRO 0x68 // gyro I2C address #define GYRO_XOUT_H 0x1D // IM...
true