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
ba98039de4b2ba432ed1fc831f08063333eeff88
C++
marlyhaas/CPE522_FinalExam
/Problem1/readswitch.cpp
UTF-8
1,990
2.984375
3
[]
no_license
#include <iostream> // for the input/output #include <stdlib.h> // for the getenv call #include <sys/sysinfo.h> // for the system uptime call #include <cgicc/Cgicc.h> // the cgicc headers #include <cgicc/CgiDefs.h> #include <cgicc/HTTPHTMLHeader.h> #include <cgicc/HTMLClasses.h> #define SW_GPIO "/...
true
8a4b07b07281f722e9d9b18c4ec676fb14ad3798
C++
NeoMopp/Undergrad_Work
/Level 2/Astar Path Finder/SAW11239411_CMP2067M_Item2/A_Star_Algoirthm/Node.h
UTF-8
734
3.09375
3
[]
no_license
#pragma #ifndef NODE_H #define NODE_H class Node { protected: protected: double FCost; double GCost; double HCost; double Data; int x; int y; int Parent; public: Node(double input_Data); Node() { FCost = 0; GCost = 0; HCost = 0; Data = 0; x = 0; y = 0; Parent = -1;} ~Node(); Node(const Node& existingNode)...
true
4391521753a33e7b36208d490779b0cbbb80733c
C++
harry-dev98/CompetitiveCodingSolutions
/Strings/haiku.cpp
UTF-8
667
2.78125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main(){ string s1, s2, s3; getline(cin, s1); getline(cin, s2); getline(cin, s3); unordered_set<char> S = {'a', 'e', 'i', 'o', 'u'}; int one = 0; for(auto ch:s1){ if(S.find(ch) != S.end()){ one++; } } i...
true
2cdda71a25b18bbffd1ba893fab0a9bd8e2ad800
C++
googol-lab/lang
/c++/tsp.cpp
UTF-8
2,131
2.984375
3
[]
no_license
#include <cmath> #include <cstdlib> #include <iostream> #include <algorithm> #include <limits> using namespace std; struct Coord { int x,y,index; Coord() : x(0),y(0),index(0){} bool operator < (const Coord &x) const{ return ((this->y * this->y + this->x * this->x ) < (x.x * x.x + x.y * x.y)); } }; inline ...
true
93fc93fdb3bbf69f322b64ed8063e0b4b9ca4314
C++
SoPlump/POO2
/src/Collection.h
UTF-8
3,809
3.046875
3
[]
no_license
/************************************************************************* Collection - description ------------------- debut : 14 decembre 2018 copyright : (C) 2018 par CERBA, RAUDRANT e-mail : guilhem.cerba@insa-lyon.fr, sophie.raudrant@insa-lyon.fr **************************...
true
bd9805177d6d428a72b7850eb08007b86d5c0297
C++
graybriggs/00s-engine
/shape_generator.h
UTF-8
1,007
2.546875
3
[]
no_license
#pragma once #ifndef SHAPEGENERATOR_H #define SHAPEGENERATOR_H #include <glew.h> #include <gl/GL.h> #include <gl/GLU.h> #include <GLFW/glfw3.h> #include <vector> #include "vertex.h" struct ShapeData { std::vector<Vertex> vertices; std::vector<GLuint> indices; }; class ShapeGenerator { static ShapeData makePlan...
true
046398a0309f8905bdf17ccd3145d1e5cb2a521d
C++
mpublic/CPP
/PROGRAMMING_WITH_CPP Osman_AY Muhammed_Akif_HORASANLI/CH1 Introduction To Programming/Programms/24 Int code to ascii char.cpp
UTF-8
451
3.546875
4
[]
no_license
/* PROG: ASCIItoChar.cpp DESCRIPTION: Convert ASCII Code to corresponding Character. */ #include<iostream> using namespace std; int main() { int code; // get code from user cout<<"Enter the ASCII code [0 - 127]: "; cin>> code; // use (char) casting to convert and show character cout<<"\nThe corresponding cha...
true
e740b310a16c76cca3684921575a2ec8595d4363
C++
kanpurin/kyoprolibrary
/graph/chromaticnumber.hpp
UTF-8
1,782
2.6875
3
[]
no_license
#ifndef _CHROMATIC_NUMBER_HPP_ #define _CHROMATIC_NUMBER_HPP_ #include <vector> // 単純無向グラフの彩色数 // G:隣接行列 O(N2^N) int chromatic_number(std::vector<std::vector<int>> &G) { auto powMod = [](long long k, long long n, long long mod) { long long x = 1; while (n > 0) { if (n & 1) { ...
true
f24e36a93a4ed84b70592980b16055c7e300fce5
C++
ShravanCool/spoj-classical
/EvaluateThePolynomial.cpp
UTF-8
619
3.03125
3
[]
no_license
#include <iostream> #include <vector> using namespace std; long long horner(vector<long long>& poly, long long x) { long long sum = poly[0]; for(long long i = 1; i < poly.size(); i++) sum = sum*x + poly[i]; return sum; } int main() { long long nCase = 1; while(true) { long long N, Q; cin >> N...
true
02e8d635bcbfed65975dcacaf84acf383c2e18d3
C++
madMAx43v3r/mmx-node
/src/vm/StorageProxy.cpp
UTF-8
1,661
2.671875
3
[ "Apache-2.0" ]
permissive
/* * StorageProxy.cpp * * Created on: Apr 24, 2022 * Author: mad */ #include <mmx/vm/StorageProxy.h> namespace mmx { namespace vm { StorageProxy::StorageProxy(std::shared_ptr<Storage> backend, bool read_only) : backend(backend), read_only(read_only) { } std::unique_ptr<var_t> StorageProxy::read_ex(st...
true
bdf703a70c25ac7e5245a1c0cc7dc91226c8b4d3
C++
stoyanov624/OOP_2020_2021_IS_GR4
/Week13/livecode/Square.h
UTF-8
617
3.515625
4
[]
no_license
#pragma once #include "Shape.h" class Square : public Shape { private: double a; public: Square() { a = 0; } Square(double _a) : a(_a) {} void printPerimeter() const override { std::cout << "square perimeter: " << 4.0 * a << std::endl; } void printArea() const override { ...
true
b15878267723e881b6d8fbdbbb55ee23a1d04f37
C++
YannGarcia/repo
/dev/g++/projects/embedded/comm/include/ipvx_address.hh
UTF-8
2,606
3.171875
3
[ "MIT" ]
permissive
/** * \file ipvx_address.h * \brief Header file for IPv4/IPv6 address abstraction. * \author garciay.yann@gmail.com * \copyright Copyright (c) 2015 ygarcia. All rights reserved * \license This project is released under the MIT License * \version 0.1 */ #pragma once #include <string> #include <ve...
true
4920a305d19bd0e8732100b1695dc8673772e5e0
C++
Zedtho/Iterated-Prisoner-s-Dilemma
/Simulation Reciprocal Altruism/Simulation Reciprocal Altruism.cpp
UTF-8
5,882
3.09375
3
[]
no_license
// Simulation Reciprocal Altruism.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "Simulation Reciprocal Altruism.h" #include<time.h> #include <random> int main() { //Requests starting parameters of simulation. InitializeInputs(); //Round-Organizer for (int Generatio...
true
76033cbc1422fe044dc6d6817f6e1c1c2ec2eb3b
C++
ayanami98/leetcode
/hard/4_Median_of_Two_Sorted_Arrays.cpp
UTF-8
2,125
3.6875
4
[]
no_license
/****** There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Example 1: nums1 = [1, 3] nums2 = [2] The median is 2.0 Example 2: nums1 = [1, 2] nums2 = [3, 4] The median is (2 + 3)/2 = 2.5 ******/ ...
true
87d22e9c06109041347ec6cac9bcc2d05bd2b1b7
C++
gottschalkbrigid89/netwars
/src/game/player.h
UTF-8
2,622
3.34375
3
[]
no_license
#ifndef AW_PLAYER_H #define AW_PLAYER_H #include <boost/shared_ptr.hpp> #include <boost/lexical_cast.hpp> #include "units/units.h" #include "terrain.h" #include <map> #include <stdexcept> namespace aw { class player { public: typedef boost::shared_ptr<player> ptr; enum colors { RED, BLUE, GREEN, YELLOW, BLA...
true
907fca4ca84134aed431d114f00dabe1af7c825d
C++
jtrugman/dynamic-memory-charlesbethin-justintrugman
/WriteSTL/Design.hh
UTF-8
553
3.09375
3
[]
no_license
#pragma once #include "vector" #include "iostream" #include <fstream> using namespace std; class Design { private: vector<const Shape*> shapes; public: void add(const Shape& s) { shapes.push_back(&s); } void write(string file) const { ofstream f; f.open(file); for(...
true
85998ce1ae05d55d356cd25a0d548b02f776adad
C++
banspatel58/Expressions-evaluator
/Unary_Expr_Node.h
UTF-8
1,074
2.703125
3
[]
no_license
//============================================================================== /** * Honor Pledge: * * I pledge that I have neither given nor received any help * on this assignment. */ //============================================================================== #ifndef _UNARY_EXPR_NODE_H_ #define _UNARY_EX...
true
838b4b3be9a9f75d20433b802785c009950a5e51
C++
Moviw/C--_primer-_plus
/11.使用类/Complex类/complex0.cpp
UTF-8
1,467
3.078125
3
[]
no_license
/************************************************ * @Author: Movix * @Date: 2021-09-21 13:10:45 * @LastEditTime: 2021-09-22 02:36:28 * @Github: https://github.com/Moviw * @FilePath: /C--_primer-_plus/11.使用类/Complex类/complex0.cpp * @Description: ************************************************/ #include <iostre...
true
a293ef69b79d66c789c3c21982bb0a553567e153
C++
razor1111/LP2
/8.cpp
UTF-8
532
3.28125
3
[ "Apache-2.0" ]
permissive
#include <stdio.h> #include <conio.h> #include <stdlib.h> int vet[10]; int w [10]; void entrada() { for(int i = 0 ; i < 10; i++) { printf("Insira o %d valor do vetor ", i + 1); scanf("%d", &vet[i]); } } int fatorial(int n) { if ((n == 1) || (n == 0)) { return 1; }else{ return fatorial(n - 1) * n; } } ...
true
2904746b8fe41de25151954ba3f36b491463d05a
C++
cosmin-ionita/File-System-Manager
/File-System-Manager/File.h
UTF-8
641
3.234375
3
[]
no_license
#ifndef FILE_H #define FILE_H #include <string> using namespace std; class File { public: File(string owner_name, string file_name, int file_dimension) { name = file_name; dimension = file_dimension; owner = owner_name; type = "SHARED"; } File(string owner_name, string file_name, int file_d...
true
736d713475e29aab851aca8767fa4c8089e36d27
C++
LauraDiosan-CS/lab8-11-polimorfism-diacata05
/lab8-11/Data.cpp
UTF-8
2,499
3.296875
3
[]
no_license
#include "Data.h" #include <iostream> using namespace std; /* descr: constructor implicit in: - out: entitate Data */ Data::Data() { zi = 1; luna = 1; an = 2000; } /* descr: constructor cu parametrii in: integer z, integer l, interger a out: entitate data cu parametrii setati */ Data::Data(int z, int l, int a...
true
1b907ece1add3f129a8d57f5ed8ef859b38941e5
C++
raulgoce/porfolio
/Begginer/4.Estructuras_repetitivas/35.05.Ejercicio.Suma_cuadrados.cpp
UTF-8
410
3.625
4
[]
no_license
/* 3.Realice un programa que calcule y muestre la suma de todos los cuadrados de los 10 primeros enteros mayores que 0. */ #include <iostream> #include <conio.h> using namespace std; int main(){ int sum=0,cuadrado; for(int i=1;i<=10;i++){ cuadrado=i*i; sum+=cuadrado; } cout<<"El resultado de la suma d...
true
0b7c0697144db6e8f3b8b974edee672eec390fab
C++
yjxiong/convnet
/src/sample.cc
UTF-8
1,456
3.09375
3
[ "BSD-2-Clause" ]
permissive
// condition_variable example #include <iostream> // std::cout #include <thread> // std::thread #include <mutex> // std::mutex, std::unique_lock #include <condition_variable> // std::condition_variable using namespace std; mutex fprop_start_mutex_, fprop_finished_mutex_; condition_va...
true
9482241d89b0dd99b0284d3a2f5f6b0663f229d9
C++
FelixArg/CP-lib
/geom.cpp
UTF-8
4,112
2.875
3
[]
no_license
const long double eps = 1e-9; const long double pi = 3.14159265358979323846; // ñêàëÿðíîå ïðîèçâåäåíèå âåêòîðîâ - x1 * x2 + y1 * y2 bool dequal(long double a, long double b) { if (abs(a - b) < eps) return 1; return 0; } bool dless(long double a, long double b) { if (!dequal(a, b) && a < b) return...
true
78d31978ae9838547fd02067f23b0e809a9c92d3
C++
mjjq/ballEngine
/headers/classLight.h
UTF-8
932
2.75
3
[ "MIT" ]
permissive
#ifndef CLASS_LIGHT_H #define CLASS_LIGHT_H #include "SFML/Graphics.hpp" #include "Observer.h" struct LightProperties { sf::Vector3f position; sf::Vector3f color = sf::Vector3f(1.0, 1.0, 1.0); float constant = 1.0f; float linear = 0.00002f; float quadratic = 0.000005f; float lightMax = 1.0f; ...
true
043c3e8be02046c9e71646dcd21094589c4468df
C++
shaszard/test
/depends/util/src/pathutils.cpp
UTF-8
3,624
2.75
3
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
/* Copyright 2013-2014 MultiMC Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
true
be69586d408120709869cfadd879347710b50026
C++
mrtullis/PF2-assignment-4
/Testercpp final.cpp
UTF-8
3,141
3.4375
3
[]
no_license
/* author Michael Tullis Date 10/27/2020 tester file for homework 4 slightly modified from original */ #include <cstdlib> #include <iostream> #include <string> #include <iostream> #include <fstream> #include "mystring.h" #define string Mystring using namespace std; /* * Check function from the previous lab */ v...
true
3fda91e4a95b6b83c24af71aefa5163a0c208eb5
C++
piby/imp-sandbox
/imp/src/ShaderProgram.cpp
UTF-8
5,608
2.71875
3
[]
no_license
#include "ShaderProgram.hpp" #include <GL/glew.h> #include <assert.h> #include <vector> using namespace imp; ShaderProgram::ShaderProgram(): m_id(0) { } ShaderProgram::~ShaderProgram() { if( m_id ) { // automatically detaches all // attached shaders and deletes program glDeleteProgram( m...
true
2e0ba301e093b4e7ad4ab925e78cffcc811cfb95
C++
Jackychen8/class_c-
/rle/rle.cpp
UTF-8
5,352
3.0625
3
[]
no_license
// rle.cpp : Defines the entry point for the console application. // #include "rletest.h" #include "rle-algo.hpp" #include <iostream> #include "rle-files.h" void Part1Tests() { TestFixtureFactory::theInstance().runTests(); } int main(int argc, char* argv[]) { std::string choice; int numChoice; wh...
true
ccc1ed52c8b767046976b28edeb4d016c353d634
C++
sundeepkaranam/Coding
/LinkedLists/PalindromeLinkedList.cpp
UTF-8
1,397
3.65625
4
[]
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* reverseList(ListNode* head) { if (head == NULL || head->next == NULL) { return head; } ...
true
9dd78675b7253eb94e3633b67c7e2b2c3dded84a
C++
jasonblog/note
/ds_algo/src/leetcode_v2/algorithms/ContainsDuplicateII/solve.cpp
UTF-8
731
3.234375
3
[ "MIT" ]
permissive
#include <vector> #include <unordered_map> #include <string> #include <iostream> using namespace std; class Solution { public: bool containsNearbyDuplicate(vector<int>& nums, int k) { unordered_map<int, int> map; int n = nums.size(); for (int i = 0; i < n; ++i) { if (map.fin...
true
08bd35125459d03f26b35b0463f83ba5ddbe6d6e
C++
brenopoggiali/BCC
/alg1/TP3/sudoku.cpp
UTF-8
4,432
3.140625
3
[ "MIT" ]
permissive
#include "sudoku.h" Sudoku::Sudoku(std::ifstream &entrada) { entrada >> this->N >> this->J >> this->I; int aux; for (int i=0; i < this->N; i++) { this->sudoku.push_back({}); this->checked.push_back({}); for (int j=0; j < this->N; j++) { entrada >> aux; sudoku...
true
77037409cb2d02521bdc1914d547b54628c0f11e
C++
TvGelderen/C-Programming-III
/set1/3/main.cc
UTF-8
282
3.375
3
[]
no_license
#include <iostream> using namespace std; template <typename T> T *rawCapacity(size_t size) { return static_cast<T *>(operator new(size * sizeof(T))); } int main() { string *strPtr = rawCapacity<string>(1); strPtr[0] = "First string"; cout << strPtr[0] << '\n'; }
true
cbb833e9595cfcc4567f9ee2c20337fc22ee1577
C++
conceptarc/ECE498A
/Pathing/Obstacle.h
UTF-8
217
2.578125
3
[]
no_license
#ifndef OBSTACLE_H #define OBSTACLE_H #define nullptr 0 class Obstacle { public: Obstacle(int id, float x, float y, float radius); ~Obstacle(); int Id; float X; float Y; float Radius; }; #endif
true
52229974ba46fae05d8ecc1045ed4ac1cb5f3142
C++
sakutty/zombie-rampage-wip
/Zombie Rampage 0.1v.cpp
UTF-8
3,027
3.09375
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <unistd.h> #include <time.h> using namespace std; int createZombie () { if (rand () % 67 < 10) return 11; else return rand () % 10 + 1; } int main () { srand (time (NULL)); char enter; // game st...
true
c80205b6f8c714759441fca3e90ad8c8dda9db99
C++
sreekanth025/coding-problems
/DynamicProgramming/9b_maxProductSubarray.cpp
UTF-8
1,042
3.5
4
[]
no_license
/* Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. */ // Problem link: https://leetcode.com/problems/maximum-product-subarray/ // Time complexity: O(n) #include<bits/stdc++.h> using namespace std; class Solution { public: ...
true
ad0891767e4bdaad9be8bb39038a85fbaca840b4
C++
eititg/ZPR
/Network/AcceptorTCP.hpp
UTF-8
2,663
3.21875
3
[]
no_license
#ifndef ACCEPTORTCP_HPP #define ACCEPTORTCP_HPP #include <boost/asio.hpp> #include <boost/shared_ptr.hpp> #include <string> namespace net { using boost::shared_ptr; using boost::system::error_code; using namespace boost::asio; class NetService; class SocketTCP; /** Klasa służąca do nasłuchi...
true
2daa24deebbf4ed330eabdbb9ecf47fc0d1e678b
C++
davetcoleman/visibility_graph
/point.h
UTF-8
357
2.65625
3
[ "BSD-3-Clause" ]
permissive
#ifndef POINT_H_INCLUDED #define POINT_H_INCLUDED #include <iostream> #include "geometry.h" class Point: public Geometry { public: int x; int y; void* parentLine; int id; // for removing, comparing, etc double theta; // anglular amount from base line Point(); Point(int _x1, int _y1); virtual void print();...
true
cd05482c08ce8599083d78a1e6ba1dc37e8bdc44
C++
fofoni/openwar
/newgamedialog.cpp
UTF-8
5,207
2.625
3
[ "MIT" ]
permissive
#include <string> #include <sstream> #include "newgamedialog.h" #include "colors.h" NewGameDialog::NewGameDialog(QWidget *parent) : QDialog(parent) { for (int i = 0; i < MAX_PLAYERS; i++) player_names << ""; player_colors << WARColor_RED; player_colors << WARColor_GREEN; player_colors << W...
true
2fb7183f5ace88539a7ee41a1b8fffd046614bcc
C++
NorwegianCreations/15-InteractiveLEDLamp
/stars.h
UTF-8
4,603
3.015625
3
[]
no_license
#ifndef STARS_H #define STARS_H #include "lib/effect.h" #include "lib/effect_runner.h" #include "lib/color.h" #include <stdio.h> #include <stdlib.h> #include <list> #define NEW_STAR_FRAME_MIN 10 #define NEW_STAR_FRAME_MAX 200 #define TOTAL_LEDS 512 #define MAX_ACTIVE_STARS 10 #define FADE_RATE 0.005 class Star { pu...
true
b99139442edba51ebd15a230986aff248e8fa85f
C++
arsee11/mydes
/test_helper.h
UTF-8
414
2.8125
3
[]
no_license
//file: test_helper.h #include <iostream> #ifndef TABLES_H #include "tables.h" #endif using namespace std; template<class BITSET> void PrintBits(BITSET &bits) { cout<<"bits:"; for(int i=0; i<bits.size(); i++) cout<<bits[i]?"1":"0"; cout<<endl; } void PrintBytes(const byte_t *bytes, int len) { cout<<"bytes:"...
true
39b798a38a9678eca615ae25f2784efcdd5e5e40
C++
culhatsker/sfml-gamepadtest
/src/ButtonRect.cpp
UTF-8
640
2.84375
3
[]
no_license
#include "ButtonRect.hpp" ButtonRect::ButtonRect( uint gamepadId, uint buttonCode, sf::Vector2f pos ) : gamepadId(gamepadId), buttonCode(buttonCode) { rect = sf::RectangleShape(); rect.setSize(sf::Vector2f(20, 20)); rect.setOrigin(sf::Vector2f(10, 10)); rect.setPosition(pos); } voi...
true
278ac7c781f4de41f9dc8d160fccf83031be233a
C++
sakibfuad001/ClassWorksAllTime
/2-1/Stack&Queue/queue.h
UTF-8
1,823
3.859375
4
[]
no_license
#ifndef DS_QUEUE_H #define DS_QUEUE_H #include "stack.h" #include "data.h" #include <iostream> #include <new> using namespace std; class Queue { Stack stack1, stack2; public: Queue(){};// constructor void enqueue(Data x); // enqueues x void dequeue(); // removes the front ...
true
09e3f14def30d66e395912a4cae815f4bacbbd64
C++
rsaz/LeagueReverseEngineering
/LeagueReverseEngineering/Champions.h
UTF-8
876
2.78125
3
[]
no_license
#pragma once #include <vector> #include <string> #include "Stats.h" #include "Item.h" using std::string; using std::vector; class Champions { private: string name; int economy; short level; // max level 18 // stats Stats *stats; vector<Item> miniInventory; public: Champions() {} // Initi...
true
40a8c970d2dff1e0e276dfa2bcd043228a705c5b
C++
KausihanBrem/Python_Pybind11
/source/app/app.cpp
UTF-8
837
2.640625
3
[]
no_license
#if defined(_DEBUG) #undef _DEBUG #include <Python.h> #define _DEBUG #else #include <Python.h> #endif #include <pybind11/embed.h> #include <stdio.h> void say_something () { printf ("Say Something\n"); } static int COUNTER = 0; void set_counter (int count) { COUNTER = count; } struct MyData { float x; }...
true
9b1553b862b42d65bb4121029f78de34fa4cf696
C++
pquiring/QSharp
/classlib/src/Map.hpp
UTF-8
551
2.640625
3
[]
no_license
template <class K, class V> Qt::QSharp::FixedArray<K>* std::Map<K,V>::keys() { int size = pairs.size(); Qt::QSharp::FixedArray<K>* ks = new Qt::QSharp::FixedArray<K>(size); for(int a=0;a<size;a++) { Pair *p = pairs.get(a); ks->at(a) = p->k; } return ks; } template <class K, class V> Qt::QSharp::Fixed...
true
7a7926a07f14b658eb80a2c1a92c0a595e604434
C++
tl32rodan/UVA10482
/原始碼.cpp
UTF-8
1,557
2.765625
3
[]
no_license
#include<iostream> #define N 32*20+1 using namespace std; int dp[N][N]; void dp_init(){ for(int i=0;i<N;i++) for(int j=0;j<N;j++) dp[i][j]=0; } int find_diff(int a,int b,int c){ int max_num = a,min_num = a; if(b>max_num)max_num=b; if(b<min_num)min_num=b; if(c>m...
true
489feaf370cb7140fe0cc528423a2796c1b72ca9
C++
pure-xiaojie/acmCode
/大三/PAT练习/数字分类.cpp
UTF-8
914
2.734375
3
[]
no_license
#include<cstdio> #include<algorithm> using namespace std; int main() { int a1=0,a2=0,a3=0,a4=0,a5=0; int n,m,t = 1,k = 0; scanf("%d",&n); while(n--) { scanf("%d",&m); if(m % 5 == 0 && m % 2 == 0) a1 += m; if(m % 5 == 1) { a2 += m*t; ...
true
679248df6e7cf9f8bb91ae2dbb9ec8205c216029
C++
cashgithubs/my-crawler-engine
/src/crawler/complete_process/file_storage.cpp
UTF-8
2,386
2.71875
3
[]
no_license
#include "file_storage.hpp" #include <cassert> #include <fstream> #include "Utility/utility.h" #include "Unicode/string.hpp" #include "Win32/FileSystem/filesystem.hpp" namespace crawler { namespace storage { namespace { const std::wstring directory_name = L"files"; const std::wstring...
true
63c018e4e8f1b14832c6e21d46864841a00d8277
C++
blizmax/gpugi
/bvhmake/processing/tesselate.cpp
UTF-8
5,690
3.09375
3
[ "MIT" ]
permissive
#include "tesselate.hpp" #include "bvhmake.hpp" void TesselateNone(const FileDecl::Triangle& _triangle, BVHBuilder* _manager) { _manager->AddTriangle(_triangle); } static FileDecl::Vertex AvgVertex(const BVHBuilder* _manager, uint32 i0, uint32 i1) { const FileDecl::Vertex& v0 = _manager->GetVertex(i0); const File...
true
953612bd1b64ad3c69d2d99c8047390bb2731c32
C++
suwitsaengkaew/arduino-project
/Arduino_EthernetRelay/Arduino_EthernetRelay.ino
UTF-8
1,870
3
3
[]
no_license
/* Chat Server A simple server that distributes any incoming messages to all connected clients. To use, telnet to your device's IP address and type. You can see the client's input in the serial monitor as well. Using an Arduino Wiznet Ethernet shield. Circuit: * Ethernet shield attached to pins 10, 11, 12, 13 ...
true
0bc5a10b92b61a56a3e204e37f4d08014435b6e9
C++
epixelse/AssaultCubeHack
/src/Console.hpp
UTF-8
473
3.09375
3
[]
no_license
#pragma once #include <string> #include <iostream> namespace NConsole { bool Initiate(); void Terminate(); template<class ... Args> void Print(Args&& ... args); template<class ... Args> void Println(Args&& ... args); } template<class ... Args> void NConsole::Print(Args&& ... args) { (std::cout << ... << std...
true
4204b74dfd5938222cd86003ad91378315c5158d
C++
ArshP01/Sem-2_Object_Oriented_Programming_Lab
/EXP-6.cpp
UTF-8
1,422
4.03125
4
[]
no_license
#include<iostream> using namespace std; class Time { private: int hours; int minutes; int seconds; public: Time(){ this->hours = 0; this->minutes = 0; this->seconds = 0; }; Time(int hours, int minutes, int seconds) { this->hours = hours; this->minutes = m...
true
2db9914e9a14eea8c2b6df9c4e256871656283d5
C++
aidandan/algorithm
/leetcode/cpp/344. 反转字符串.cpp
UTF-8
410
3.140625
3
[]
no_license
#include <securec.h> #include <bits/stdc++.h> using namespace std; void reverseString(vector<char>& s) { int n = s.size(); for (int i = 0; i < (n + 1) / 2; i++) { char t = s[i]; s[i] = s[n - i - 1]; s[n - i - 1] = t; } } int main() { vector<char> a = { 'h', 'e', 'l', 'l', 'o'...
true
ed7f9059133d0bf8701ff91b3219036a4cd9cffa
C++
Property404/ElfStream
/Merchant.cpp
UTF-8
2,520
2.84375
3
[]
no_license
#include "Merchant.h" #include "Socket.h" #include <list> #include <vector> #include <sstream> #include <cassert> #include <iostream> // Temporary implementation while we build full structure // Sucks information out of a local elf file struct Merchant::Impl { Socket client; }; Merchant::Merchant(const std::string&...
true
e7e4299b753b546f2856ea0f825d363dbeb0fbc9
C++
yexuechao/leetcode
/string/DecodeWays91.cpp
UTF-8
1,071
3
3
[]
no_license
#include <vector> using namespace std; class Solution { public: int numDecodings(string s) { if (s.empty() || s[0] == '0') { return 0; } vector<int> results(s.size() + 1, 0); results[0] = 1; results[1] = 1; // s[0] for (int i = 2; i <= s.size(); i++) { ...
true
ca1bdb49681316531a37b3567f79cb79d885b65f
C++
Breush/evilly-evil-villains
/src/nui/tablelayout.cpp
UTF-8
9,929
2.53125
3
[]
no_license
#include "nui/tablelayout.hpp" #include "tools/tools.hpp" #include "tools/debug.hpp" #include "tools/vector.hpp" #include "config/nuiguides.hpp" using namespace nui; TableLayout::TableLayout() : m_hPaddingAuto(true) , m_vPaddingAuto(true) { setDetectable(false); } //-------------------// //----- Routine...
true
f75be2fbeb51aeb3394f4dce89bf48a2eba9b7ea
C++
michaeleisel/PathKitCExt
/Sources/PathKitCExt/PATPathKit.cpp
UTF-8
3,813
2.921875
3
[ "MIT" ]
permissive
#include "PATPathKit.h" #include <string> #include <vector> #include <string> #include <dirent.h> using namespace std; static inline void PATFillPathComponentsVector(vector<string> &strings, const char *path) { size_t curPos = 0; size_t endPos = strlen(path); if (path[curPos] == '/') { strings.pus...
true
b95f2f4a7cd18ff2b444705d8e73fa843aa1f973
C++
zerix/Cavium-SDK-2.0
/linux/embedded_rootfs/source/lockstat/cond.h
UTF-8
3,425
2.78125
3
[]
no_license
/* -*-C++-*- */ #include "stat-time.h" #include "stats.h" #include "mutex.h" #include "errno.h" class Cond_stat : public Stat<pthread_cond_t> { typedef __gnu_cxx::hash_map<pthread_mutex_t*, int> pthread_mutex_map; public: Cond_stat(lock_type* lock) : Stat<pthread_cond_t>(lock), current_mutex_(0) {} std::...
true
774c188ae8040c3d47f962715cf569a182860b86
C++
rbwsok/3dfx-OpenGL-ICD-update
/src/oglcontrol/dynarray.cpp
WINDOWS-1251
1,022
2.984375
3
[ "Unlicense" ]
permissive
#include "stdafx.h" DYNARRAY::DYNARRAY(int basesize, int sizeelement) { currentsize = basesize; DYNARRAY::basesize = basesize; elementsize = sizeelement; baseadress = GlobalAllocPtr(GPTR,basesize*sizeelement); currentfree = 0; } DYNARRAY::~DYNARRAY() { if (baseadress != NULL) GlobalFree(baseadress); } int DYNA...
true
7d7a3600ffd564afde30e83f2cbf7456e9d7c0ef
C++
zoteva/oop-kn-5-2021
/11/Templates Separation/Definitions in the .h file/TemplateObjectTests.cpp
UTF-8
164
2.625
3
[]
no_license
#include "TemplateObject.h" #include <iostream> int main() { TemplateObject<int> intObject(2); std::cout << intObject.data << std::endl; return 0; }
true
853cc97c1013c2ef0b287d382228e336e8efe1fe
C++
yuebinyun/google_test_sample
/sample4.cpp
UTF-8
281
2.59375
3
[]
no_license
#include <stdio.h> #include "sample4.h" int Counter::Increment() { return counter_++; } int Counter::Decrement() { if (counter_ == 0) { return counter_; } else { return counter_--; } } void Counter::Print() const { printf("%d\n", counter_); }
true
9e1fea0030daec57cde33f454348377d559d114b
C++
Submitty/Submitty
/more_autograding_examples/cpp_cats/submissions/cat.h
UTF-8
586
3.0625
3
[ "BSD-3-Clause", "MIT" ]
permissive
#ifndef _cat_h_ #define _cat_h_ #include <string> class Cat { public: Cat(); Cat(std::string n, float av_size, float av_lifeSpan, std::string interesting); //get functions std::string getBreed() const { return name; } float getAverageSize() const { return average_size; } float getAverageLifeSpan() cons...
true
7f66e2d70d655f819df93663c11216bd35fddef5
C++
tanhtm/Competitive-Programming
/OnlineJudge/UVa/146_IDCodes.cpp
UTF-8
327
2.75
3
[]
no_license
#include<iostream> #include<algorithm> #include<vector> #include <string.h> #include <bitset> using namespace std; string s,stop("#"); void run(){ string t = s; if (next_permutation(s.begin(),s.end())) cout<<s; else cout<<"No Successor"; cout<<endl; } int main(){ while(cin>>s && s != stop ){ run(); } retu...
true
8dff82d0c72a59623de9ca6d60cffdffbc6a6e9a
C++
eubr-atmosphere/a-GPUBench
/apps/tf_deepspeech/deepspeech/native_client/kenlm/lm/common/print.hh
UTF-8
1,471
2.671875
3
[ "LGPL-2.0-or-later", "LGPL-2.1-or-later", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-only", "LGPL-3.0-only", "GPL-3.0-only", "Apache-2.0", "MPL-2.0" ]
permissive
#ifndef LM_COMMON_PRINT_H #define LM_COMMON_PRINT_H #include "lm/word_index.hh" #include "util/mmap.hh" #include "util/string_piece.hh" #include <cassert> #include <vector> namespace util { namespace stream { class ChainPositions; }} // Warning: PrintARPA routines read all unigrams before all bigrams before all // ...
true
f7f28640029a537e4a18f9409d7a423962d23561
C++
danieljsharpe/cpp_primer
/brief_examples/copy_2dpointer.cpp
UTF-8
2,545
4.4375
4
[]
no_license
/* Using std::copy to copy a 2d array via pointers */ #include <iostream> using namespace std; int main () { // ONE DIMENSIONAL CASE std::cout << "Example: 1D array\n\n"; const int cols = 3; const int rows = 4; double * foo = new double[cols]; double * bar = new double[cols]; double * ba...
true
b52fa939dd464130d4d51ab1da7ea24938d35ad9
C++
abhay1432/FIU_TCN_5080
/des.cpp
UTF-8
13,121
2.703125
3
[ "MIT" ]
permissive
//============================================================================ // Name : TCN 5080 Secure Telecom Transaction. Project 1 // Author : Abhaykumar Kumbhar 5115320 // Version : // File name: : des.cpp // Description : Class file for simplified DES //=======================================...
true
48998ec9215f9231c77c4c9b632ffceaf57da51a
C++
nqriver/Binary_Search_Tree
/BinarySearchTree.tpp
UTF-8
2,031
3.296875
3
[]
no_license
#include "BinarySearchTree.h" template<typename data_t> BinarySearchTree<data_t>::BinarySearchTree(BinarySearchTree &&otherBST) noexcept : _root{ std::move(otherBST._root) } { } template<typename data_t> BinarySearchTree<data_t> &BinarySearchTree<data_t>::operator=(BinarySearchTree&& otherBST) noexcept { if ...
true
4304eebde9d1ab294d090f74dad94a32c23c3e21
C++
kyvauneb/CISC2200-
/LinkedList/student.h
UTF-8
626
2.953125
3
[]
no_license
/* * Kyvaune Brammer * * Linked List Lab Part 1 - Papadakis * * 10/5/2016 * * Student Class header file * */ #ifndef STUDENT_H #define STUDENT_H #include <iostream> using namespace std; class Student { public: Student(); Student( string fN, char m, string lN, int s, int age); void setFName( string f...
true
e09ddee9ed42aae294ac70ba379c5d2970aa4aa3
C++
constanreedjohn/Algorithms_and_Data_Structures
/Sorting_Algoritms_Time_Compare.cpp
UTF-8
5,615
3.296875
3
[]
no_license
#include<iostream> #include<time.h> #include<algorithm> using namespace std; #define MAX1 10e6 #define MAX2 100000 double A[(int)MAX1]; double B[(int)MAX1]; double C[(int)MAX1]; double D[(int)MAX1]; void Random_Thuc(double a[],int &n) { int Max_Rand=rand()%MAX2; for(int i=0;i<n;i++) { ...
true
486af9ab6db20f80beb2c84e3f30a2a01c4017ee
C++
TycheLaughs/xmlToJSON
/Attribute.h
UTF-8
2,023
3.65625
4
[]
no_license
/** * File: Attribute.h * Author: Uzi sksouza.art@gmail.com * Assignment 04: Building a Tree Struture from an XML File * Created on October 20, 2014 for use in Assignment 04. */ #ifndef ATTRIBUTE_H #define ATTRIBUTE_H #include <cstdlib> #include <iostream> #include <string> using namespace std; class Attribute{ ...
true
1aaeb703426849de06141febc3d381502c9ebdab
C++
JamesMillerDev/EcceSimulacrum
/fonts.cpp
UTF-8
7,889
2.75
3
[]
no_license
//#include <Windows.h> #include "fonts.h" #include "GameParams.h" #include "Computer.h" using namespace std; struct GlyphStruct { FT_Bitmap bitmap; FT_Int bitmap_left; FT_Int bitmap_top; FT_Vector advance; }; FT_Library library; FT_Face face, face1, face2, face3; int font_number = 1; map<string...
true
886c232d3786841602ca84ae2abeab1a62cca53d
C++
BilhaqAD07/AlgoritmaPemrograman
/SEMESTER 2/PRAKTIKUM/Minggu 1/Catur.cpp
UTF-8
465
2.734375
3
[]
no_license
#include <iostream> using namespace std; int main(){ int X; cin>>X; cin.ignore(); string peserta[X]; int total; int count=0; if(X<=0){ cout<<"Error"; exit(0); } for(int i=0;i<X;i++){ cin>>peserta[i]; } for(int i=0;i<X;i++){ for(int j=i;j<X;j++){ if(j>X-2){ goto quit; } for(int k=j+1;k...
true
e440d4b15718b2268d907aad4034614451eddcd6
C++
Arios39/Object-Oriented-Programming
/SpaceProject/Lab6/App.cpp
UTF-8
5,161
2.6875
3
[]
no_license
#include <iostream> #include "App.h" App* singleton; void draw(); void timer(int id){ // This will get called every 16 milliseconds after // you call it once float amount; float back = singleton->background1->getY(); float back2 = singleton-> background2->getY(); float back3 = singleton->backg...
true
45c6badf150b5cbde4ed9411bb9761e893c4f450
C++
shreysingla11/ssl-project
/Backend/Parser/submissions/Assignment 7/28.cpp
UTF-8
2,532
3.4375
3
[]
no_license
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<iterator> using namespace std; class bank { public: map<string,int> m; map<int,set<string> >p; map<int,set<string> >::iterator it1; map<string,int>::iterator it; int error; bank() { error=0; } void open(string s); voi...
true
eb4bed8c19033f45c1a03e512523782b883c0f95
C++
ankan-ekansh/Competitive-Programming
/Codeforces practice/427C.cpp
UTF-8
1,648
2.640625
3
[]
no_license
/* Stay motivated and keep working hard */ #include<bits/stdc++.h> #define ll long long using namespace std; const ll mod = 1e9+7; const ll N = 3e5+7; ll n, m; vector<ll> G[N]; vector<ll> G_rev[N]; vector<ll> cost(N); vector<bool> vis_f(N), vis_b(N); stack<ll> dfsorder; void dfs_f(ll u){ vis_f[u] = true; fo...
true
0d598c4080e85b17ca2c823efbdf8b2f519bcf47
C++
reineydays/reine-performing-robots
/code/agnus-gyroscope/agnus-gyroscope.ino
UTF-8
1,588
2.609375
3
[]
no_license
#include <Wire.h> #include <L3G.h> L3G gyro; #include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> #endif #define PIN 6 #define NUMPIXELS 1 Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int red = 0; int green = 0; int blue = 0; int r; int g; in...
true
314f2809e94b6b1b896ff89d50158fe43800dfd8
C++
EnzoFerrari430/datastructurealgorithm
/algorithm/KMP/KMP/main.cpp
GB18030
432
2.953125
3
[]
no_license
/* TƥPַ T = a,b,a,a,c,a,b,c,a,c p = a,b,a,b,c 㷨ƥ- KMP㷨: 1.ǰ׺ һַ P = a,b,a,b,c ַ5ǰ׺ a a,b a,b,a a,b,a,b a,b,a,b,c 5ǰ׺ַҵǵǰ׺ a,b,a,bǰ׺Ϊ a,b,a,bǰ׺a,b,a ׺b,a,b */
true
6a0629016bfdfeee3d5d99adc09811fddc083978
C++
alwayssmile11a1/Metroid.Game
/Metroid/FrameWork/src/drawable/Sprite.h
UTF-8
2,435
3.15625
3
[ "MIT" ]
permissive
#ifndef SPRITE_H #define SPRITE_H #include "..\math\Vector2.h" #include "Texture.h" #include "TextureRegion.h" #include "GameObject.h" //Texture + Texture Region class Sprite :public GameObject { private: Vector2 _Position; //the position of this sprite Vector2 _ScaleFactor; //scale Vector2 _Size; Vector2 _Rotat...
true
970af0cdebe3f5e8d59e6311e4214c2c34f69a84
C++
3DPIT/finalAlgorithm2021
/Project2/Algorithm2021/Algorithm2021/가비아1.cpp
UHC
765
3.265625
3
[]
no_license
#include <string> #include <vector> #include<iostream> #include <map> using namespace std; bool fine_chk(string fineS) { int alphabetChk[27] = { 0, }; for (int i = 0; i < fineS.size(); i++) { if (alphabetChk[fineS[i]-'a'] == 0) {// ڿ üũ alphabetChk[fineS[i]-'a'] = 1; } else return false;//ߺ ڿ ־ ڿ } retu...
true
86beb06fc2e476d14d44e2e720ef4bd872a1ee8a
C++
hrithik20007/DSA_For_CP
/ApniKaksha/BitManipulations/updateBit.cpp
UTF-8
917
4.125
4
[]
no_license
//This program will update the bit at a given position. To update means simply to unset a bit and then sit the bit, all at the same position. #include<iostream> using namespace std; int main(){ //UnsetBit int n=5; //The number whose bit we are checking. Binary is 0101. int i=2; //The position from righ...
true
dd846c3faddbfc708b66dac1b976371e051a6bb3
C++
rokm/guio_esp8266
/guio_esp8266/program_base.cpp
UTF-8
6,056
2.65625
3
[ "BSD-3-Clause" ]
permissive
/* * GUI-O ESP8266 bridge * Base program class. * * Copyright (C) 2020, Rok Mandeljc * * SPDX-License-Identifier: BSD-3-Clause */ #include "program_base.h" #include <EEPROM.h> #include <FunctionalInterrupt.h> Program::Program (parameters_t &parameters) : parameters(parameters), // store reference to para...
true
f04ad21a097a63364073ef496d3b21ba61c09525
C++
pateldevang/coursera-Fundamentals-of-Parallelism-on-Intel-Architecture
/WEEK3/threads-filter/main.cc
UTF-8
2,285
2.890625
3
[ "MIT" ]
permissive
#include <cstdlib> #include <cstdio> #include <omp.h> #include <mkl.h> #include <vector> #include <algorithm> void filter(const long n, const long m, float *data, const float threshold, std::vector<long> &result_row_ind); //reference function to verify data void filter_ref(const long n, const long m, float *data, con...
true
dfbf69a77316b14614e94fe92c8f8ac915196aae
C++
daniel-dennis/Game-Engine
/hierarchy.hpp
UTF-8
4,303
3.234375
3
[]
no_license
// (c) Daniel Dennis 2018 // Implements and manages an object hierarchy, provides methods // To message individual nodes in hierarchy and its children // Object heirarchy type and packet in which data is sent // needs to be specified, (hierarchy_implementation) does this // Everything in this class is my own work #if...
true
3cbc0e6c2120c2dd815762793214f5f83a50ca89
C++
kyliau/playground
/codility/09-1_CountNonDivisible.cpp
UTF-8
1,185
3.78125
4
[]
no_license
// Lesson 9 - Sieve of Eratosthenes // CountNonDivisible // Calculate the number of elements of an array that are not divisors of each element. #include <unordered_set> #include <unordered_map> #include <algorithm> // this solution is not O(n log n), but it passes the all test cases // it is O(sqrt(n) * n) thus O(n ...
true
70aff041918258c72338ef0b91fff545c0a971c7
C++
xiaotdl/Sandbox
/cpp/test/tutorial/main.cpp
UTF-8
2,951
3.984375
4
[]
no_license
#include <iostream> using namespace std; // &: ampersand // Type: // int, float, MyClass // T // T&: reference to Type // T*: pointer to Type // // Operation: // &O: get pointer/address from object // *P: get object by deref pointer/address // pointer/address size // int64_t == 8 bytes // T** var; declares a poi...
true
cf9b1b2fd3c9363c7b2a29a3cd066f87910ba2e0
C++
kanishkcoe/c-lecture-codes
/currencyCount.cpp
UTF-8
528
3.421875
3
[]
no_license
#include <iostream> using namespace std; int main() { int count = 0; int countPresest = 0; int currency[] = {2000, 500, 200, 100, 50, 20, 10, 5, 2, 1}; int amount; cout << "Enter amount : "; cin >> amount; for(int i = 0; i < 10; i++) { countPresest = amount / currency[i]; count += amount / c...
true
ece2ad11fe4e3343684f6cf1ef7237d8c99061fe
C++
edasinar/Complex-Number
/Complex Number/main.cpp
UTF-8
1,304
3.21875
3
[]
no_license
#include <iostream> #include "KarmasikSayi.h" int main() { KarmasikSayi a(2, 5); std::cout << a; std::cout << "-------------------------------------------------------------------" << std::endl; KarmasikSayi b(2, -5); std::cout << b; std::cout << "------------------------------------------------------------------...
true
a54c5849f39807cd2f807b9e8afe9e8175ccb7ea
C++
GigaFlopsis/Omni_robot_ROS
/arduino_omni_wheel/MyEncoder.cpp
UTF-8
698
2.78125
3
[]
no_license
// // Created by op on 16.11.2020. // #include "MyEncoder.h" MyEncoder::MyEncoder(int _outputA, int _outputB, float _radius, int _rate = 10.) : Enc(_outputA, _outputB) { rate = _rate; period = 1.0 / _rate * 1000.; outputA = _outputA; outputB = _outputB; dt = 1. / _rate; } void MyEncoder::Init() {...
true
1d5ab516c92ecf516b343f41c9025f491a26c9b7
C++
pgoodman/Grail-Plus
/fltl/include/tdop/Rule.hpp
UTF-8
3,849
3.0625
3
[ "MIT" ]
permissive
/* * Rule.hpp * * Created on: May 10, 2012 * Author: petergoodman * Version: $Id$ */ #ifndef Grail_Plus_TDOP_RULE_HPP_ #define Grail_Plus_TDOP_RULE_HPP_ namespace fltl { namespace tdop { /// represents a parser rule. This encompasses both initial and extension /// rules. An initial rule is ha...
true
d24d58ed6b19943f25d3a196d9b2e2b932819d25
C++
kingst/bixer
/src/lib/include/HTTPResponse.h
UTF-8
530
2.640625
3
[ "BSD-3-Clause" ]
permissive
#ifndef HTTP_RESPONSE_H_ #define HTTP_RESPONSE_H_ #include <map> #include <string> class HTTPResponse { public: HTTPResponse(); void withStreaming(); void setHeader(std::string name, std::string value); void setBody(std::string data); void setContentType(std::string contentType); void setStatus(int statu...
true
bbb70c0de2e10094985f8030ce0f0370b52a4265
C++
nafischonchol/Algorithms
/Graph Representation - Adjacency Matrix C++ Implementation.cpp
UTF-8
824
2.875
3
[]
no_license
/* Sample Input: 5 6 0 1 1 1 0 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 1 1 0 */ /*Smaple Output: 0----1 2 3 1----0 4 2----0 4 3----0 4 4----1 2 3 */ #include <bits/stdc++.h> using namespace std; int vertex,edges; void printGraph(int a[][100]) { for(int i=0;i<vertex;...
true
790099e04fd4e8736e74fefbf88e011f78598aa0
C++
minhmax098/EmbeddedSystem_Exercise
/Chuong6inra34/Chuong6inra34.ino
UTF-8
826
2.828125
3
[]
no_license
#include <EEPROMex.h> int address = 0; String input = " 3 4 "; byte output = 3; void setup() { // put your setup code here, to run once: Serial.begin(9600); for(int i=0; i<input.length(); i++) { address++; EEPROM.write(address, input[i]); } Serial.begin(9600); for(int i =0; i<input.length(); i++)...
true
769fe19ae8242b9f27235c6c47c9ac113b16d073
C++
TAPATOP/Data-Structures-and-Algorithms-Homeworks
/SpamFilter New/Trie.cpp
UTF-8
8,762
3.375
3
[]
no_license
/** * * Solution to homework task * Data Structures Course * Faculty of Mathematics and Informatics of Sofia University * Winter semester 2016/2017 * * @author Hristo Hristov * @idnumber 61917 * @task 3 * @compiler VC * */ #include "Trie.h" const short letterError = 69; Trie::Trie() { rootNode = new Node; numberOfW...
true
ccc469bd3008b9838cb0059e6acb217ca91f99d8
C++
pratikbhd/lfs
/src/log/loglayer.cpp
UTF-8
887
2.765625
3
[ "Apache-2.0" ]
permissive
/* ============================================================================ Name : loglayer.cpp Author : Rahul Roy Mattam Version : 1.0 Description : The log layer for LFS Project ============================================================================ ** Usage ************************...
true
ffad6bd8f783d05b4e5e75d47691bfe18bc62159
C++
n-inja/kyoupro
/src/atc/011/atc11b.cpp
UTF-8
1,298
2.875
3
[]
no_license
#include<iostream> #include<fstream> #include<stdio.h> #include<string> #include<vector> #include<map> #include<math.h> #include<algorithm> #include<iomanip> #include<set> #include<utility> #define P 1000000007 using namespace std; class Union { public: vector<int> parent; int n; Union(int _) { n = _; ...
true
5f0b58098594ddfb9a246a315454fdf5a2fda881
C++
Matheuscs787/computacaoGrafica
/atividade2.2CG.cpp
UTF-8
2,266
2.984375
3
[]
no_license
#include<stdio.h> #include<GL/glut.h> #include<vector> #include<math.h> //#include<windows.h> #include<iostream> //#include<conio.h> void mouse(int button, int state, int mouseX, int mouseY); void teclado(unsigned char key, int mouseX, int mouseY); void calcular(int posX, int posY); void desenhar(void); vo...
true
600121bec6bde6a79e9c1bc24364c8842df425b1
C++
Magnarus/LO21
/headers/tache_unitaire.h
UTF-8
2,064
3.15625
3
[]
no_license
#ifndef TACHE_UNITAIRE_H #define TACHE_UNITAIRE_H #include"tache.h" #include<QTime> /** * \class Tache_Unitaire tache_Unitaire.h "headers/tache_unitaire.h" * \author DELAUNAY Grégory et NEVEUX Anaïs * \version 1.0 * \date 04 juin 2015 * \brief Implémente la classe Tache Unitaire * \det...
true
0ca1543aacf9d13e7e276e454be975fb03d362a9
C++
t-fi/SpherePacking
/main.cpp
UTF-8
2,217
2.75
3
[]
no_license
#include "simulator.h" #include "renderer.h" #include <iostream> #include <limits> #include <iomanip> #include <cmath> #define PI 3.14159265359 int main(int argc, char * argv[]) { // argument parsing int numPoints, seed; long int steps; double lambda, sigma; // reading arguments for(int i=0; i<argc; i++){ if...
true
1fc7dd45e6ffe6b6eec13a2094537245a2ff3759
C++
zero91/algorithm
/leetcode/034_Search_for_a_Range/search_for_a_range.cc
UTF-8
897
3.40625
3
[]
no_license
// Problem: // // Given a sorted array of integers, // find the starting and ending position of a given target value. // // Your algorithm's runtime complexity must be in the order of O(log n). // // If the target is not found in the array, return [-1, -1]. // // For example, // Given [5, 7, 7, 8, 8, 10] and target va...
true