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
2349d44a08f09758380eb5568f43f065567dcda3
C++
Osirisz/IoT101
/ReadDHT11ToThingSpeak/ReadDHT11ToThingSpeak.ino
UTF-8
2,233
2.59375
3
[]
no_license
#include "ThingSpeak.h" #include <ESP8266WiFi.h> #include "DHT.h" //Define WiFi parameters //const char* ssid = "Username"; //const char* password = "Password"; const char* ssid = "username"; const char* password = "password"; //Create WiFi Client and PubSub Client Object WiFiClient wifiClient; //Declare DHT senso...
true
e30736319632ad5049f672643f8a654dabae7fb9
C++
scipianus/Algorithm-contests
/USACO/USACO - December 2011 - Silver/Rblock/Rblock.cpp
UTF-8
2,057
2.5625
3
[]
no_license
/* PROB: rblock LANG: C++ */ #include<fstream> #include<vector> #include<algorithm> #include<queue> using namespace std; int n,m,sol; struct Muchie{short x,y;int cost;}; vector <short> G[105],A; Muchie v[10010]; int d1[105],dn[105],d[105]; void Citire() { int i; ifstream fin("rblock.in"); fin>>n>>m; for(i=1;i<=m;i...
true
6ce12909f4654d58de7d784de480e5fd6168eaad
C++
Creo2/Cits3002-Project
/QuestionServer/Source/QuizFactory/QuizFactory.cpp
UTF-8
3,740
2.78125
3
[]
no_license
//============================================================================= //Project: QuestionServer //File: //Author: Rhys Collier (22222918) //CoAuthor: Alexander Slate (21498906) //Created: 12/05/2018 //Description: // //Modified on: 25/05/2018 //Modified by: Rhys //====================================...
true
f8e83bf047012f0b154ed4909627617c3446f757
C++
drewdzzz/drew
/Onegin1.cpp
WINDOWS-1251
5,737
3.375
3
[]
no_license
#include <stdio.h> #define INPUTFILE_NAME "onegin.txt" #define OUTPUTFILE_NAME "oneginOut.txt" #define SIZE 50 #define STRING_LIMIT 50 //#define DEBUG //{---------------------------------------------------------------------------- //! @brief //! //! @param sortingArray , //! //! @param left //!...
true
59b6453e53527deb4552c220362f7e6593695740
C++
mrboorger/TEST
/4.cpp
UTF-8
476
3.21875
3
[]
no_license
// // Created by mrboorger on 05.09.2020. // #include <iostream> int main() { long long x = 0; long long y = 0; std::cout << "Enter x and y" << std::endl; std::cin >> x >> y; if (y < 0) { y = -y; } bool negative = false; if (x < 0) { x = -x; negative = true; } x <<= 5; long long ...
true
a3c5598706ddac87b2db5afb20e2186f847a6322
C++
abufarhad/Programming
/C++ Practice/prime add.cpp
UTF-8
846
2.5625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long int SieveOfEratosthenes(long long int n) { int cnt=2,count=0,i; bool prime[n+1]; memset(prime, true, sizeof(prime)); for (int p=2; p*p<=n; p++) { if (prime[p] == true) { for (int i=p*2; i<=n; i += p) ...
true
39ec9938bf7a1a0bfdfa12b4c9c5b6370e2f2dac
C++
marion2016/LeetcodeAndHuaweiOJ
/Huawei_oj/003MingmingRandomNum/MingmingRandomNum/MingmingRandomNum.cpp
GB18030
1,086
3.25
3
[]
no_license
#include<iostream> #include<vector> using namespace std; void Qsort(vector<int> &a, int left, int right){ int l = left, r = right; if (l >= r) return; int key = a[l]; while (l<r){ while (a[r] >= key && l<r) r--;//ҵǰұߵһkeyСֵ a[l] = a[r];//keyСֵֵǰa[l]ʹkeyֵ߶keyС while (a[l] <= key && l<r) l++;...
true
0ed52c18b1ba3de35af0592c6d32f37345153c6b
C++
jackwadden/mnrl
/C++/include/MNRLError.hpp
UTF-8
2,793
2.984375
3
[ "BSD-3-Clause" ]
permissive
// Kevin Angstadt // angstadt {at} virginia.edu // // MNRLError.hpp #ifndef MNRLERROR_HPP #define MNRLERROR_HPP #include <stdexcept> namespace MNRL{ namespace MNRLError { class MNRLError : public std::runtime_error { public: MNRLError() : runtime_error("Unspecified MNRL Error!") {} MNRLError(std::string m...
true
050f0d1ce1908a08ae47f40757882384b4d84179
C++
Aandree5/BinaryTree-Graph
/BinaryTree.cpp
UTF-8
11,986
3.1875
3
[]
no_license
#include "pch.h" #include "BinaryTree.h" #include "BinaryTreeNode.h" #include "StackSingly.h" #include "ConsoleHelpers.h" using namespace ConsoleHelpers; BinaryTree::BinaryTree() { root = nullptr; } shared_ptr<BinaryTreeNode> BinaryTree::insert(string value) { shared_ptr<BinaryTreeNode> nodeToReturn; if (!root) ...
true
c3da05269d2c143324d304ceb3c84f622cd5eb89
C++
kusstas/CrazyTanks2
/CrazyTanks/GameObject.cpp
UTF-8
2,970
2.90625
3
[]
no_license
// CrazyTanks game, @kusstas 2018. All Rights Reserved. #include "GameObject.h" #include "World.h" #include "Pixel.h" GameObject::GameObject(World& world) : world(&world) { active_ = true; isStatic_ = false; blockObject_ = true; shouldBeDestroyed_ = false; } GameObject::~GameObject() { } bool GameO...
true
9f8689de30136d5a57b68a95430a790c7e26a846
C++
RayFerr000/Robot-Path
/Rectangle.h
UTF-8
594
2.5625
3
[]
no_license
// // Rectangle.h // Robot_Path // // Created by raymond ferranti on 11/4/14. // Copyright (c) 2014 raymond ferranti. All rights reserved. // #ifndef __Robot_Path__Rectangle__ #define __Robot_Path__Rectangle__ #include <stdio.h> class Rectangle{ public: //Stores the values of the left-upper point of a R...
true
a8deb11af665fe428a72a9c75b11dee68ffdf240
C++
mascotli/Way-to-Algorithm
/src/TextMatch/ACAutomation.hpp
UTF-8
6,623
3
3
[ "MIT" ]
permissive
// MIT License // Copyright 2017 zhaochenyou16@gmail.com #pragma once #ifndef MAX #define MAX 64 #endif #include <cstring> #include <cassert> #include <vector> #include <unordered_map> #include <string> #include <queue> // // interface // struct Node { int count; Node *child[MAX]; Node *father; Node *fail;...
true
70f9adcb71499368126a37727fd336cc9d5ec44e
C++
Levintsky/topcoder
/cc/leetcode/string/415_add_strings.cc
UTF-8
853
3
3
[]
no_license
class Solution { public: string addStrings(string num1, string num2) { string res; reverse(num1.begin(), num1.end()); reverse(num2.begin(), num2.end()); int i = 0, carry = 0; while (i < num1.size() || i < num2.size()) { int tmp = 0; if (i < nu...
true
27e230cc0dcc4c92135f47d056c242f3a5799208
C++
eubr-atmosphere/a-GPUBench
/apps/tf_deepspeech/deepspeech/native_client/alphabet.h
UTF-8
1,821
3.359375
3
[ "Apache-2.0", "MPL-2.0" ]
permissive
#ifndef ALPHABET_H #define ALPHABET_H #include <cassert> #include <fstream> #include <iostream> #include <string> #include <unordered_map> /* * Loads a text file describing a mapping of labels to strings, one string per * line. This is used by the decoder, client and Python scripts to convert the * output of the d...
true
6e7eed441398243b0856be67f98fd35816d4d433
C++
st3v3nmw/competitive-programming
/uva/10608_Friends.cpp
UTF-8
2,386
2.703125
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; #define eol "\n" #define _(x) #x << "=" << to_str(x) << ", " #define debug(x) { ostringstream stream; stream << x; string s = stream.str(); cout << s.substr(0, s.length() - 2) << eol; } string to_string(basic_string<char>& x) { return "\"" + x + "\""; } string to_string(ch...
true
31be078e94b6e68a3711105e43a2f6c97b220b33
C++
bharath154/codingground
/New Project/Heap.h
UTF-8
370
2.90625
3
[]
no_license
#include <iostream> using namespace std; typedef struct Node { int data; Node* left; Node* right; Node* parent; } Node; class Heap { public: Heap(bool isMinHeap); virtual ~Heap(); void Insert(int val); int GetRoot(); int size(); HeapifyUp(); HeapifyDown(); ...
true
6665317f96d4951f6554d02f95ba08897e91e9f4
C++
Thiago-SMerces/Proj_IA_Sudoku
/sudoku.hpp
UTF-8
4,918
3.609375
4
[ "MIT" ]
permissive
/* * Header file for sudoku solver * define key classes and macros (LEN) */ #ifndef __SUDOKU_HPP #define __SUDOKU_HPP #include <fstream> #include <vector> #include <queue> #include <stack> /* * Macro to define default sudoku LEN, as for now, it will always assume * that the sudoku is a 9x9 matrix */ ...
true
d806820dffb59240e90288e56cfebc5e973d30a7
C++
iiicp/cptoyc
/Lex/MacroInfo.cpp
UTF-8
2,327
2.671875
3
[]
no_license
/*********************************** * File: MacroInfo.cpp * * Author: caipeng * * Email: iiicp@outlook.com * * Date: 2020/12/1 ***********************************/ #include "MacroInfo.h" #include "Preprocessor.h" using namespace CPToyC::Compiler; MacroInfo::MacroInfo(SourceLocation DefLoc) : Location(D...
true
61f6de8177fff42c4e611621c5b39512a005ae4c
C++
JesusMiramontes/QT-MatrixTransformations
/mainwindow.cpp
UTF-8
10,098
2.875
3
[]
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include "QPen" #include "QPainter" #include <QtMath> #include <math.h> #include "triangulo.h" #include "QDebug" #include <QMessageBox> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); // Estab...
true
33ec97fa97b9afe232861bcdb554e047a5d2bf7f
C++
harrywaugh/blas_tracing_tests
/src/dgemm_test.cpp
UTF-8
1,247
2.984375
3
[]
no_license
#include <random> #include <mkl.h> #include <sys/time.h> // Get the current time in seconds since the Epoch double wtime(void) { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec + tv.tv_usec*1e-6; } int main ( int argc, char* argv[] ) { double main_tic = wtime(); // Random numbers ...
true
509dddc19d3997ee1a3ebacd633945f379675153
C++
niuxu18/logTracker-old
/second/download/git/gumtree/git_patch_hunk_964.cpp
UTF-8
2,535
2.53125
3
[]
no_license
} static int edit_and_replace(const char *object_ref, int force, int raw) { char *tmpfile = git_pathdup("REPLACE_EDITOBJ"); enum object_type type; - unsigned char old[20], new[20], prev[20]; - char ref[PATH_MAX]; + struct object_id old, new, prev; + struct strbuf ref = STRBUF_INIT; - if (get_sha1(object_ref,...
true
0b5c242d799f22cd9ac171f9b3003899cb5cdf19
C++
emilmoham/SignDetectionSystemCIS4398
/cpp/sd_common/ConfigParser.h
UTF-8
1,250
3.375
3
[]
no_license
#ifndef __CONFIG_PARSER_H_ #define __CONFIG_PARSER_H_ #include <sstream> #include <string> #include <unordered_map> /** * @class ConfigParser * @brief A simple I/O class for configuration file settings */ class ConfigParser { public: /// Default constructor ConfigParser() = default; /// Attempts to lo...
true
fe0c4bfaa27b5faddd5bdad00cb3c1b23bdd923b
C++
JW-CHEN/leetcode
/mergeInterval/main.cc
UTF-8
2,538
3.09375
3
[]
no_license
#include "../common/comm.h" struct Interval { int start; int end; Interval() : start(0), end(0) {} Interval(int s, int e) : start(s), end(e) {} }; class Solution { public: void quickSortSet(int* startSet, int* endSet, int left, int right) { //remeber to add new feature if (l...
true
d1269b0dee7f1281e7f7efb4b21f0a755ba0300f
C++
zhou78yang/homeworks
/ccf/1604-1.cc
UTF-8
387
2.71875
3
[]
no_license
#include <iostream> using namespace std; #define N 1005 int main() { int n, a[N], count = 0; cin >> n; for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 2; i < n; i++) { if( (a[i] > a[i-1] && a[i] > a[i+1]) || (a[i] < a[i-1] && a[i] < a[i+1])) { coun...
true
bca4be2272a4e895b122e7a049507646263ab59a
C++
amg1127/PROGRAMAS-DA-FACULDADE
/Compactador-Huffman/comdeshuff/tcell.h
UTF-8
1,674
2.65625
3
[]
no_license
class TCell { private: int _id; int _weight; char _character; TCell *_parent; TCell *_son0; TCell *_son1; bool _hasSons; std::string _pathToSon (TCell *); template <typename SWPTYPE> inline void swapvar (SWPTYPE &v1, SWPTYPE &v2) { ...
true
9868a69e9cffc6edd998c901ecabccea47d05567
C++
joshcv2112/ProgramingProblems
/nextPrimeNumber.cpp
UTF-8
1,033
4.03125
4
[]
no_license
/* Author: Joshua Vaughan Simple program that computes prime numbers until user indicates termination. */ #include <iostream> using namespace std; bool isPrime(int number) { if (number == 2 || number == 3) return true; if (number % 2 == 0 || number % 3 == 0) return false; int divisor = 6...
true
2ea8e4495d86e9cb8bb1ee8244db98bbeb2494a3
C++
tdaros/vendingMachine
/Node.h
UTF-8
1,521
3.265625
3
[ "MIT" ]
permissive
/* Arquivo: Node.h Autor: Thiago Daros Fernandes Data: 15/11/2019 Descricao: Este arquivo e responsavel por declarar a classe Node que formara a lista duplamente encadeada. O nodo pode ter como valor um tipo de dado T definido pelo template, por isso pode ser utilizado em diferentes contextos. */ #ifndef NODE_H # def...
true
8a09e2d822febc6636c68fdea2a4d6c8c4b6fe9f
C++
vishal-1010/Introduction-to-C-coding-ninjas
/add_two_numbers.cpp
UTF-8
215
2.984375
3
[]
no_license
#include <iostream> using namespace std; int main(){ int a = 10; int b = 15; int c = a + b; cout << c << endl; char d = 'd'; cout << d << endl; float f = 2.34; cout << sizeof(f); }
true
fce2848f1fa58f190d8ccb1bbaf9494c51079667
C++
enaim/Competitive_Programming
/2016/April/ABSULATE.cpp
UTF-8
555
2.640625
3
[]
no_license
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <ctype.h> #include <iostream> #include <algorithm> using namespace std; #define deb(a) cout<<__LINE__<<"# "<<#a<<" -> "<<a<<endl; template<class T> T abs(T x){ if(x<0) return -x; return x; } int...
true
015a50c400fa94320222f38add262a5a431556c8
C++
DcmTruman/my_acm_training
/HDU/2050/10384332_AC_0ms_1980kB.cpp
UTF-8
337
2.5625
3
[]
no_license
#include<iostream> #include<string> #include<stdio.h> #include<cmath> using namespace std; int dp[10020]; void DP() { dp[1] = 2; for(int i =2;i<10010;i++) { dp[i] = dp[i-1] +4*i-3; } } int main() { int Case,n; DP(); cin>>Case; while(Case--) { cin>>n; cout<<dp[...
true
6387b92d7bf29f67f53c54132abaae8be4d6d98c
C++
chenxian0723/LeetCode
/122.Best-Time-to-Buy-and-Sell-Stock-II/Solution.cpp
UTF-8
693
3.265625
3
[]
no_license
class Solution { public: int maxProfit(vector<int> &prices) { if(prices.size()==0) return 0; int profit=0; int low=prices[0]; for(int i=0;i<prices.size();i++){ if(prices[i]>low){ profit=prices[i]-low+profit; //每有一次利润就累加 low=p...
true
1a9d0984594d308da7df1da5569bfbac0ed4ff90
C++
jeremy24/UnitTests
/source/TestAdderClass.cpp
UTF-8
745
3.203125
3
[]
no_license
/*! \file * \brief * \author * \date */ #include <iostream> #include <set> #include <vector> #include <UnitTest++.h> #include "Adder.hpp" using namespace std; typedef Adder<double> AdderDouble; TEST_FIXTURE(AdderDouble, TestingAdding) { double result = Add(1.0, 3.0); CHECK(result == 4.0); } TEST_FIX...
true
437bbb98d8ae6e6bb2d158f248b6264f7974c990
C++
prasadsilva/advent-of-code-2018
/src/main.cpp
UTF-8
3,365
3.5
4
[]
no_license
#include <iostream> #include <array> #include <vector> #include <functional> // Forward declarations namespace day1 { void problem1(); void problem2(); } namespace day2 { void problem1(); void problem2(); } namespace day3 { void problem1(); void problem2(); } namespace day4 { void problem1(); void ...
true
4b03fa5e80dc9be539efbd72f58a384afd206e62
C++
WhiZTiM/coliru
/Archive2/81/f548f490be838f/main.cpp
UTF-8
1,052
3
3
[]
no_license
#include <stdlib.h> #include <stdio.h> struct shared_ptr_s { // struct impl_t* inst; int *use_cnt; }; typedef struct shared_ptr_s shared_ptr_t; // unadorned type #define shared_ptr struct shared_ptr_s __attribute__((cleanup(free_shared))) #define SHARED_PTR_GET_ADD_REF(sp_in, sp_name) ++(*sp_in.use_...
true
e63df57dcd3e50d8a128859527e4b9c98bf6ec77
C++
sakshamtaneja21/CPP
/file-1.cpp
UTF-8
424
3.515625
4
[]
no_license
//Arithmetic Operations (27-8-19) #include <iostream> #include <conio.h> int main(){ using namespace std; cout << "18BCAN024\n\n"; int x, y, sum, diff, prod, quo; cout << "Enter 2 numbers "; cin >> x >> y; sum = x+y; diff = x-y; prod = x*y; quo = x/y; cout << "Sum is " << sum; cout << "\nDiff...
true
50e954d7cb47b047bf7228e6055166e04a2363dc
C++
SensorsINI/slasher
/arduino/firmware/3ch_ros_pub/3ch_ros_pub.ino
UTF-8
7,456
2.59375
3
[]
no_license
#include <ros.h> #include <ArduinoHardware.h> #include <std_msgs/Float64.h> #include <rally_msgs/Pwm.h> #include "Servo.h" ros::NodeHandle nh; rally_msgs::Pwm raw_pwm_msg; ros::Publisher raw_pwm_pub("raw_pwm", &raw_pwm_msg); #define PWM_PUBLISH_RATE 10 //hz // Assign your channel in pins #define CHANNEL1_IN_PIN 2...
true
b7d2c7a48e4454d0afc62aa21c2cb2f618b4a15d
C++
heiyanbin/leetcode
/61 Rotate List_4.cpp
UTF-8
727
3.328125
3
[]
no_license
// 61 // Rotate List // https://leetcode.com//problems/rotate-list/ class Solution { public: ListNode *rotateRight(ListNode *head, int k) { if(!head || !head->next||k<1) return head; ListNode* p=head, *q=head; int n=0; while(q && n<k) { q=q->next; ...
true
995f29905215393a0aa7c968c8579939c15a36c5
C++
ukiras123/Ser321
/Assigns/Assign1/src/cpp/Fraction.cpp
UTF-8
2,052
2.96875
3
[]
no_license
#include "Fraction.hpp" #include <iostream> #include <stdlib.h> #include <cmath> /** * Copyright 2015 Tim Lindquist, * * 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.apa...
true
34ef56859e546a8db9f591c1e23eb1312cd06cff
C++
JYILY/ds
/list.cpp
UTF-8
2,939
3.625
4
[]
no_license
#include <iostream> #include <string> using namespace std; //顺序表的最大容量 #define MAXSIZE 100 //操作状态 #define OK 1 #define ERROR 0 //错误信息 #define ILLEGAL_INDEX "illegal index" #define OUTOFMEMORY "out of memory" //数据类型 typedef int ElemType; //状态信息 typedef struct { int status; string msg; }Status; typedef struc...
true
943f042b0b8209412aeb9c2dd294d53c42c4d353
C++
outInsideOut/SmartSudoku
/SmartSudokuMk2/Sudoku.cpp
UTF-8
16,347
3.671875
4
[]
no_license
#include "Sudoku.h" #include <cmath> Sudoku::Sudoku(char input[9][9]) { try { if (!GridChecker(input)) { throw(ImpossiblePuzzleException("Duplicate value in grid")); } } catch (ImpossiblePuzzleException& e) { //msg = " duplicate in row, col or 3x3 " //print exception message std::cout << e.getMessage()...
true
93c1beba2058c0d88a604b0255a6a0bf2667753f
C++
twpspu/SimpleMVCExample
/resortreservationrecord.h
UTF-8
970
2.734375
3
[]
no_license
// Class ResortReservationRecord // Original author is and all rights reserved for Andrew Mclain @ SPU ECS #ifndef RESORTRESERVATIONRECORD_H #define RESORTRESERVATIONRECORD_H #include <string> #include <sstream> using std::string; class ResortReservationRecord { private: // add your private member v...
true
865b427a05e5cb8e7c2166b7b171bc7d1c1a42de
C++
roytwu/cpp
/oop/static/main.cpp
UTF-8
1,138
3.234375
3
[]
no_license
/* ********************************************************* Author: Roy Wu Description: static class members/member funcitons ********************************************************* */ //#include <iostream> //#include <string> #include <vector> #include <Eigen/Core> //* this needs to added before ...
true
a927b161f0c70fc76052064faaafea95ab97123d
C++
tnakaicode/jburkardt
/r83p/r83p.cpp
UTF-8
49,302
3.125
3
[]
no_license
# include <cmath> # include <cstdlib> # include <ctime> # include <fstream> # include <iomanip> # include <iostream> using namespace std; # include "r83p.hpp" //****************************************************************************80 int i4_log_10 ( int i ) //*************************************************...
true
b5f424146ab50f355f3014b489b8f5e7e85836de
C++
RKalampattel/ES1D-linux
/ES1D/Particle.h
UTF-8
441
2.765625
3
[]
no_license
#pragma once /*! The Particle class has two member variables representing position and velocity of the particle set. The second constructor is used to initialise these values. */ #include "Parameters.h" class Particle { public: vector<double> x; //!< Position vector vector<double> v; //!< Velocity vector Particl...
true
abd8b97156cb2732f175daa4f706acee85facfa6
C++
LinkItONEDevGroup/LASS
/WaterBox/firmware/library/ArduinoJson/test/JsonArray/copyTo.cpp
UTF-8
1,302
3.140625
3
[ "MIT" ]
permissive
// ArduinoJson - arduinojson.org // Copyright Benoit Blanchon 2014-2018 // MIT License #include <ArduinoJson.h> #include <catch.hpp> TEST_CASE("JsonArray::copyTo()") { DynamicJsonBuffer jsonBuffer; SECTION("BiggerOneDimensionIntegerArray") { char json[] = "[1,2,3]"; JsonArray& array = jsonBuffer.parseArr...
true
d79026d71418d156cc4362256bf4672c0c3a378f
C++
Tanavya/Competitive-Programming
/DynamicProgramming/CC_SealingUp.cpp
UTF-8
2,128
2.703125
3
[]
no_license
//Problem Link: https://www.codechef.com/LTIME44/problems/SEALUP //Problem type: Dynamic Programming //learning experience: freaking make sure to keep INF as 1000000000000000000LL, LONG_MAX is too less lmao ugh //also, try not to keep 2D DP arrays and see if it can be reduced to 1D, otherwise TLE chances increase. #inc...
true
a365df146ee0e9f5a71194290a4d6276bcdc4424
C++
sergij525bog/test
/src/Arithmetic.cpp
UTF-8
296
2.96875
3
[]
no_license
#include "Arithmetic.hpp" #include <iostream> #include <string> double addNum (double x, double y) { std::cout << "Sum of numbers..." << std::endl; return x + y; } double differenceNum (double x, double y) { std::cout << "Difference of numbers..." << std::endl; return x - y; }
true
7d3ffb6f989d7dcd57c5c3a222e74837a822db54
C++
felipecaon/RPN-Calculator-QT
/no.cpp
UTF-8
432
3.046875
3
[]
no_license
#include "no.h" No::No(No *prox, No *prev, int numero) { this->prev = prev; this->prox = prox; this->numero = numero; } No *No::getProx() const { return prox; } void No::setProx(No *value) { prox = value; } No *No::getPrev() const { return prev; } void No::setPrev(No *value) { prev = va...
true
37be863fd4b6d4977e38b55215684511a423c683
C++
acisoru/ctfcup-2020-quals
/path/solution/crypto_solver.cpp
UTF-8
3,785
2.859375
3
[]
no_license
#include <iostream> #include <sstream> #include "crypto_solver.h" using namespace std; void crypto::func1(word32* dataBlock) { word32 tempWord[3]; tempWord[0] = tempWord[1] = tempWord[2] = 0; for (int i = 0; i < 32; i++) { tempWord[0] <<= 1; tempWord[1] <<= 1; tempWord[2] <<= 1; tempWord[0] |= dataBlock[2]...
true
cb53928914667942547f6c445e1007d18cf7153b
C++
langsound/Digital-Electronics
/1154.digital/ADC-lab/ADC_Smoothed_DAC/ADC_Smoothed_DAC.ino
UTF-8
856
3.046875
3
[]
no_license
/* analog read to analog write with mapping and smoothing connect a switch or button to analog input pin 2 for most easily observable results */ //set pwm Min/Max here, as needed int pwmMin = 0; int pwmMax = 255; // change pwmSmooth here float pwmSmooth = 0.5; float pwmOut; int pwmPin = 3; int onOffPin = ...
true
6ad79c65901a1c9a8278249dbbab8f82cb478103
C++
AadityaJ/CP
/codechef/aug17/5.cpp
UTF-8
889
2.875
3
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> using namespace std; void f(string str,set<string> &s){ set<string> :: iterator it; it=s.find(str); if(it!=s.end()) return ; s.insert(str); //cout<<str<<" "; for(int i=0;i<str.length()-1;i++){ if(str[i]>'0' && str[i+1]>'...
true
2160c862dcbfe3a7cbff44c9d9b6659737e0919b
C++
lzhaozi/oj
/oj51t.cpp
UTF-8
728
3.375
3
[]
no_license
#include <stdio.h> int primeNumber[10000]; int primeSize; bool isPrime[10001];// true stands for not prime, false stands for prime void init(){ primeSize=0; for(int i=0;i<10001;i++) isPrime[i]=false; for(int i=2;i<10001;i++){ if(isPrime[i]==true) continue; primeNumber[primeSize++]=i; for(int j=i*i;j<1000...
true
417c46573ccbe51be9e34046346116c383d67e14
C++
Intissar-Addali/diskpp
/core/bases/bases_new.hpp
UTF-8
3,100
2.734375
3
[]
no_license
/* * /\ Matteo Cicuttin (C) 2016, 2017 * /__\ matteo.cicuttin@enpc.fr * /_\/_\ École Nationale des Ponts et Chaussées - CERMICS * /\ /\ * /__\ /__\ DISK++, a template library for DIscontinuous SKeletal * /_\/_\/_\/_\ methods. * * This Source Code Form is subject t...
true
b37a9cf20bc3117ef288442b0446b995ef459e45
C++
Skunkynator/SkunkyRayMarchEngine
/Source/shader.cpp
UTF-8
4,534
2.6875
3
[ "MIT" ]
permissive
#include "shader.h" #include <glad/glad.h> #include <fstream> #include <iostream> #include <sstream> #include <string> #include <glm/gtc/type_ptr.hpp> #include <filesystem> #include <unistd.h> bool checkShader(int shader); void checkProgram(int program); std::stringstream PreProcessShader(std::stringstream& shaderCod...
true
117fc240bff24094e494fc4d3345bec031942995
C++
youarefree123/DataStructure-Algorithm
/牛客网/DFS/16695数的划分.cpp
UTF-8
576
2.984375
3
[ "Apache-2.0" ]
permissive
#include <bits/stdc++.h> using namespace std; int key[7]; int n,k; int remaining; //剩余量 int ans = 0; void dfs(int index , int re){ //考虑第index位,剩余量为re if(index > k && re != 0) return; if(index > k && re == 0){ //已经考虑到第n位并且剩余量为0 ans++; return; } for(int i = key[index-1] ; i <= re; i++){ //以字典序排列 re -= i; ...
true
bba288259fd7d5a17ce8df4dc3a07f2067cad6d3
C++
gauravahlawat81/Codeforces
/StringTask.cpp
UTF-8
393
2.53125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { string st,answer=""; cin>>st; transform(st.begin(),st.end(),st.begin(),::tolower); //cout<<st<<"\n"; for(int i=0;i<st.length();) { if(st[i]=='a' or st[i]=='e' or st[i]=='i' or st[i]=='o' or st[i]=='u' or st[i]=='y') { i++; } else { answer+=...
true
01ea3569a0d66d34226013aeb7e92266e50005e6
C++
BekzhanKassenov/olymp
/acmp.ru/201...300/296/296.cpp
UTF-8
259
2.609375
3
[]
no_license
#include <iostream> #include <cstdio> using namespace std; int main() { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); int n; cin>>n; int b=n/5; int a=n%5; while (a%3!=0) { b-=1; a+=5; } cout<<b<<" "<<a/3; return 0; }
true
1c8c35b3b6bafb745e00e091227f97ce2be999fe
C++
c437yuyang/ProgramerCodeInterviewInstruction
/08_01_PrintMatrixSpiralOrder/PrintMatrixSpiralOrder.cpp
GB18030
1,308
3.71875
4
[]
no_license
#include <iostream> using namespace std; //ָ˳ΧһȦmatrix void printEdge(int mat[], int m, int n, int lt_x, int lt_y, int rb_x, int rb_y) { int x, y; x = lt_x; //Ƶİ汾ǵֻһкֻһеʵô while (x < rb_x)//ȴ { cout << mat[lt_y*n + x] << " "; ++x; } y = lt_y; while (y < rb_y)//ϵ { cout << mat[y*n + rb_x] << " "; ++y;...
true
15de4f8561469031a58b0c3ef58878db5025b5c1
C++
flavorfree/p
/排序/20.8.28/选择.cpp
UTF-8
850
3.3125
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> using namespace std; //void ChooseSort(int* a, int n) //{ // // for (int i = 0; i < n; i++) // { // int min = i; // for (int j = i; j < n; j++) // { // if (a[min] > a[j]) // min = j; // } // swap(a[i], a[min]); // } // //} void ChooseSort(int* a, int n...
true
a5d154a35d0a95a38448333e0456cd34482a3d7e
C++
MahboobeSh/AP-HW4
/Q3/cube.h
UTF-8
439
2.953125
3
[]
no_license
#include"ThreeDimensionalShape.h" class Cube : public ThreeDimensionalShape { public: Cube(double, double x = 0, double y = 0, double z = 0); //constructor Cube(const Cube&);//copy constructor virtual double volume() const{ return side * side * side; }; virtual double area() const{ return 6 * side * side; ...
true
11d1ee570edfe842922e71cdf4a7b9118736c534
C++
kakothke/DX11
/src/SpriteRenderer.cpp
SHIFT_JIS
7,742
2.578125
3
[]
no_license
#include "SpriteRenderer.h" //------------------------------------------------------------------------------------------------- #include "TextureLoader.h" #include "Math.h" //------------------------------------------------------------------------------------------------- namespace KDXK { //-------------------------...
true
e381ce2216dccea3115e4ac895379dee6e92049a
C++
xehoth/OnlineJudgeCodes
/BZOJ/BZOJ3711-Druzyny-线段树.cpp
UTF-8
6,442
2.625
3
[ "Apache-2.0" ]
permissive
/** * Copyright (c) 2017-2018, xehoth * All rights reserved. * 「BZOJ 3711」Druzyny 15-01-2018 * 线段树 * @author xehoth */ #include <bits/stdc++.h> namespace { inline char read() { static const int IN_LEN = 1 << 18 | 1; static char buf[IN_LEN], *s, *t; return (s == t) && (t = (s = buf) + fread(buf, 1, I...
true
2d54bd340c9f53f5ebdc7aa73e9b785de13ae045
C++
nikolas8309/Eeprom-256B
/i2cEepromUtilities.ino
UTF-8
1,673
2.6875
3
[]
no_license
void readFromEeprom() { byte readVal = 0; for(unsigned long i=0; i<MEM_SIZE; i++) { // Read from EEPROM at the current address readVal = readAddress(i); // For debugging/info only if((i % KB_VAL == 0) && (i > 1)) { unsigned long total = (unsigned long) (i / KB_VAL); Serial.prin...
true
8e9e2921d8d8e987279c989540c97076d5f56ac5
C++
HururuekChapChap/Winter_Algorithm
/Tree_Diameter-1967/Tree_Diameter-1967/main.cpp
UTF-8
2,884
3.5
4
[]
no_license
// // main.cpp // Tree_Diameter-1967 // // Created by yoon tae soo on 2020/01/23. // Copyright © 2020 yoon tae soo. All rights reserved. // #include <iostream> #include <queue> using namespace std; /* 내 알고리즘은 운 좋게 1.2초가 나와서 통과 하였다. 이 알고리즘은, 모든 정점에 대해서 탐색을 해주는 방식이다. 총 N 번 탐색을 해주는데, 이때, 가장 길이가 긴 것을 반환해준다. 그런데 ...
true
cd320c1d2ad9de7f7f58c342f67ed30bbb8b7049
C++
EricDDK/3DEngineEC
/3DEngine/Component/Component.cpp
UTF-8
834
2.640625
3
[ "MIT" ]
permissive
#include "Component.h" ENGINE_NAMESPACE_START Component::Component() :_order(0) { } Component::Component(GameObject *gameObject, int order) :_gameObject(gameObject) ,_order(order) { _gameObject->addComponent(this); } Component::~Component() { _gameObject->removeComponent(this); } void Component::update(float...
true
4ef0d1fbd8a4181169111d0a69f3a7713976238a
C++
dastyk/Radiant
/Radiant/Radiant/Projectile.h
UTF-8
1,164
2.8125
3
[]
no_license
#ifndef _PROJECTILE_H_ #define _PROJECTILE_H_ #pragma once ////////////// // Includes // ////////////// //////////////////// // Local Includes // //////////////////// //#include "System.h" #include "General.h" #include "EntityBuilder.h" class Projectile { protected: Projectile(EntityBuilder* builder, Entity owner,...
true
8451349d3f65e15da73401f4ddcac20d7c05ec07
C++
adbacker/duinobattletanks
/demo_RF24Net/demo_RF24Net.ino
UTF-8
2,540
2.9375
3
[]
no_license
#define NODE1 //#define NODE2 /*-----( Import needed libraries )-----*/ #include <RF24Network.h> #include <RF24.h> #include <SPI.h> #include "printf.h" //create object struct NET_DATA_STRUCTURE{ //put your variable definitions here for the data you want to send //THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUI...
true
04f022f575a60c8ee610bff92a86065ffd9d5259
C++
AJnad/Software-Programming-in-C--
/Assignment C/AssignmentC3.cpp
UTF-8
4,787
4.03125
4
[]
no_license
/** Ajay Nadhavajhala CIS 22B Winter 2017 Assignment C Problem C3 This program is based off of the Car program from problem C1. However, we make use of copy and default constructors based off of the user input. */ #include <iostream> #include <iomanip> using namespace st...
true
3002c09854eac15d0a780efd957e86719e8f7e58
C++
roshihie/At_Coder
/ABC_C/ABC098_C_Attention.cpp
UTF-8
662
2.765625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void input(string& rsLine) { int nSize; cin >> nSize >> rsLine; } int calcMinChgDir(const string& cnrsLine) { int nMinChgDir = 0; for (int nx = 1; nx < cnrsLine.size(); ++nx) if (cnrsLine[nx] == 'E') ++nMinChgDir; int nChgDir = nMinChgDir; ...
true
e23b61e841a1661cfe87fd4cd5423f1b5d7c310a
C++
ig92/cp-course
/52-subset-sum/subset.cpp
UTF-8
1,030
3.046875
3
[ "MIT" ]
permissive
#include <iostream> #include <vector> using namespace std; int numbers [101]; bool knapsack(int c, int n) { bool M [n+1][c+1]; // init for (int i = 0; i <= c; ++i) M[0][i] = false; for (int i = 0; i <= n; ++i) M[i][0] = true; for (int i = 1; i <= n; ++i) for (int j = 1; ...
true
6af49dfc6417e4beb849812c751c999d3a88fec7
C++
MESH-Model/MESH_Project_Baker_Creek
/Model/Ostrich/GeomParamABC.h
UTF-8
8,088
2.671875
3
[]
no_license
/****************************************************************************** File : GeomParamABC.h Author : L. Shawn Matott Copyright : 2004, L. Shawn Matott Encapsulates a 'geometry' parameter. Geometry parameters are variables in the model which are composed on one or more spatial vertices. The ABC...
true
4e9c2ac61e75cf31495f9941f89fa1b6a60306d9
C++
ailyanlu/zhwj184-zoj
/1003.cpp
UTF-8
326
2.515625
3
[]
no_license
#include <math.h> #include <iostream.h> #include <stdio.h> int main() { double n,p; double k; while( cin >> n >> p ) { /*k=log10(p)/n; //k=ceil(k); k=pow(10,k); if((int)k!=k)k+=1; */ // cout << (int ) k << endl; k=pow(p,1.0/n); printf("%.0lf\n",k); ...
true
2843a92b9183e47fe365529ee1f999a1fbcd81d2
C++
FancyKillerPanda/PandEdit
/PandEdit/include/shader.hpp
UTF-8
562
2.71875
3
[]
no_license
// ===== Date Created: 14 April, 2020 ===== #if !defined(SHADER_HPP) #define SHADER_HPP #include <string> #include <unordered_map> #include <glad/glad.h> class Shader { public: std::string name; GLuint programID; private: inline static std::unordered_map<std::string, Shader*> shadersMap; public: Shader(std:...
true
94f79663681b3087434bd6f3cdbf477c9f55ca9c
C++
SmirkingWolf/QT-Asteroids
/QT Asteroids SOURCE CODE FOR PRESENTATION/ship.h
UTF-8
1,042
2.75
3
[]
no_license
#ifndef SHIP_H #define SHIP_H #include "scene.h" #include <QKeyEvent> #include <QGraphicsObject> //A combination of QGraphicsItem and QObject class Ship : public QGraphicsObject { public: //Default constructor - positions the ship to the middle of the screen. Ship(); //Updates the ship position voi...
true
2a16c34c580f626c49462e749db5612c6412c12d
C++
mahajanayush77/OS_Lab
/Disk Scheduling/fcfs_disk.cpp
UTF-8
615
2.9375
3
[]
no_license
#include <iostream> using namespace std; int main(){ int n,seek=0; cout<<"Enter size of queue request : "; cin>>n; int queue[n+1]; cout<<"Enter the request queue : "; for(int i=1;i<=n;i++) cin>>queue[i]; cout<<"Enter the head : "; cin>>queue[0]; for(int j=0;j<n;j+...
true
f4d62d9cef03468e4bcee3f2a13909b806ed2d4e
C++
vadymtolkachev/track-c
/dz1/SolveSquare.cpp
UTF-8
975
3.203125
3
[]
no_license
#include "SolveSquare.hpp" int solveLinear(double b, double c, double *x) { if((std::isfinite(b) == 0) || (std::isfinite(c) == 0)) return -1; if(x == nullptr) return -1; if(b == 0) { if(c == 0) return 3; return 0; } *x = -c/b; if(std::isfinite(*x) == 0) return -1; return 1; } int so...
true
5a433814724293c37fd607355becb5e637728051
C++
CoderConspiracy/TetrisLearn
/TetrisLearn/TetrisLearn/ITetraminoManager.cpp
UTF-8
566
2.65625
3
[]
no_license
#include "ITetraminoManager.hpp" ITetraminoManager::~ITetraminoManager() { } Tetramino * ITetraminoManager::current() const { return current_custom(); } void ITetraminoManager::activate_next() { activate_next_custom(); } void ITetraminoManager::holdTetramino() { holdTetramino_custom(); } TetraminoTypes ITetrami...
true
8ec5f4b671aad1a608586638d8a54bd8496bcb7b
C++
adamtew/USU
/2014/CS1400/Challenges/Chapter 3/3.12_Currency.cpp
UTF-8
832
3.890625
4
[]
no_license
/*Write a program that will convert U.S. dollar amounts to Japanese yen and to euros, storing the conversion factors in the constant variables YEN_PER_DOLLAR and EUROS_PER_DOLLAR. To get the most up-to-date exchange rates, search the internet using the term "currency exchange rate" or "currency converter". If you cann...
true
83bdf02ea177b526e16d1468fe9df92b62a34b35
C++
DobromirTopalov/My-Cpp-Junk-Pouch
/IntroCourse/Week 9/Exercise 4.cpp
WINDOWS-1251
819
3.734375
4
[]
no_license
/*.4 Where is izdislav , true, izdislav false .*/ #include <iostream> #include <cstring> bool compare(char* arr1, char* arr2) { int len1 = strlen(arr1); int len2 = strlen(arr2); if (len2 > len1) { return false; } int start = len1 - len2 + 1; for (int i = start, p = 0; arr1[i] != '\0'; i++, p...
true
6d26375d5f112eeeb35c61faa1d47573842fc409
C++
LeeHeungrok/BaekjoonAlgorithm
/Level_2/6_Remainder/Remainder.cpp
UTF-8
326
2.984375
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; int main(){ int left, center, right; cin>>left>>center>>right; cout<<(left + center) % right<<endl; cout<<(left % right + center % right) % right<<endl; cout<<(left * center) % right<<endl; cout<<(left % right * center % right) % right<<endl; retur...
true
bd9bf9422a3bbb3bf5b2c039f670aeabc1537244
C++
albinopapa/BoxWars
/BoxWars v0.0.4/Keyboard.h
UTF-8
1,106
2.90625
3
[]
no_license
#pragma once #include "Def.h" #include <bitset> #include <optional> #include <queue> #include <variant> class KeyboardServer; class KeyboardClient { public: struct KeyPress { char code = 0; }; struct KeyRelease { char code = 0; }; using Event = std::variant<KeyPress, KeyRelease>; public: KeyboardClient( Keyboa...
true
7e2716cffa902030b33783aa1e59f004b3182edb
C++
Eternal4869/SqStack
/main.cpp
UTF-8
3,395
3.953125
4
[]
no_license
#include <iostream> using namespace std; #define DEFAULT_SIZE 10 template <class Elem> class SqStack { private: int count; int maxSize; Elem *elems; public: SqStack(int size = DEFAULT_SIZE); //构造函数 virtual ~SqStack(); //析构函数 int Length() con...
true
ca1d449698e172cf34f383ba0da8b2d8f11dc810
C++
wofead/OpenGL
/OpenGLTest/VertexShader.cpp
GB18030
1,578
2.890625
3
[]
no_license
#include "VertexShader.h" #include <glad/glad.h> #include <iostream> //ɫҪĿǰ3DתΪһ3D꣨ͣͬʱɫǶԶԽһЩ //#version 330 core ʾOpenGl3.3汾 //layout(location = 0) in vec3 aPos; //inؼ֣ڶɫе붥(Input Vertex Attribute) // //void main() //{ //vec.xvec.yvec.zvec.w,vec.wռеλõģǴ3D4Dν͸ӳ(Perspective Division) // gl_Position = vec4(aPos.x, aPo...
true
45aa7a0f2ad8fd9e8a5a1d786dc8c830baff6e4c
C++
SarthPatel67/group1_cecapstone
/Senior-Design-Car/remote-ctl/src/base-ctl/src/ArduinoPWM.cpp
UTF-8
8,590
2.84375
3
[]
no_license
#include "ArduinoMessenger.h" #include <errno.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <signal.h> #include <exception> #include <stdexcept> using namespace std; void* send_mesg_loop(void* arduino_pwm_ptr) { ArduinoMessenger* arduino_pwm = (ArduinoMessenger*)arduino_pwm_ptr; ...
true
e2d1eb3ff49602328b8af7b72a8ebb4a36e210cd
C++
nishant-sachdeva/Snippets
/BST.cpp
UTF-8
3,015
3.5
4
[]
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long int #define get(a) ll a; cin >> a; #define show(a) cout << a << endl; #define full(p) p.begin(), p.end() #define sz(a) ll(a.size()) struct node { int key; int sum; int number_of_students_before_this; struct node *left, *right; }; ...
true
865b01b4b82587e205f4ea1827c83bd7a1a0a511
C++
Aviral044/C-Codes-1
/factorial/main.cpp
UTF-8
350
3.140625
3
[]
no_license
#include <iostream> using namespace std; long findTrailingZeros(long n) { long count = 0; for (long i = 5; n / i >= 1; i *= 5) {count += n / i;} return count; } int main() { int t,i; cin>>t; for(i=0;i<t;i++) { long f;long j; cin>>f; j=findTrailingZeros(f); cout<<j...
true
98119bd7688ccfa1e6eeed76783997a1589ecc73
C++
poros666/cocos_2d_moba
/Classes/ArmorLayer.cpp
WINDOWS-1252
7,017
2.578125
3
[]
no_license
#include"ArmorLayer.h" static void problemLoading(const char* filename) { printf("Error while loading: %s\n", filename); printf("Depending on how you compiled you might have to add 'Resources/' in front of filenames in StartSceneScene.cpp\n"); } cocos2d::Layer* ArmorLayer::createLayer(Hero* owner) { auto layer = ne...
true
6b0ac85b42852bbd1f45cdbec3467e2c1b401aeb
C++
mehranagh20/ACM-ICPC
/uva/11088-End-up-with-More-Teams/11088-End-up-with-More-Teams.cpp
UTF-8
1,300
2.703125
3
[]
no_license
//In The Name Of God #include <bits/stdc++.h> using namespace std; bool func(int a, int b) { return a > b;} int main() { ios::sync_with_stdio(0); int n, tc = 1; while(cin >> n && n) { cout << "Case " << tc++ << ": "; vector<int> nums(n); for(int i = 0; i < n; i++) cin >> nums[i]; ...
true
f41e73e55ba241b2947d17d5f0552e5cbc99e7ee
C++
benrmn/AugmentedBinarySearchTree
/AugmentedBinarySearchTree.cpp
UTF-8
13,266
2.96875
3
[]
no_license
/***************************************** ** File: AugmentedBinarySearchTree.cpp ** Project: CSCE 221 Project 2 ** Author: Benjamin Ramon ** Date: 03/05/2020 ** Section: 518 ** E-mail: bramon24@tamu.edu ** ** C++ file: ** Breif Description of the file ** conains all methods that need to be implement...
true
e30f17afdd182ab4d6c0ae93bdd87553157a7d8c
C++
alexandraback/datacollection
/solutions_5731331665297408_0/C++/BrightDays/c.cpp
UTF-8
1,793
2.546875
3
[]
no_license
#include <iostream> #include <cstdio> #include <vector> #include <map> #include <set> #include <math.h> #include <utility> #include <string> #include <cstring> #include <algorithm> using namespace std; bool g[10]; string ans = ""; string code[10]; int u[10]; vector<bool> f[10]; vector<pair<int,i...
true
cf41a2f62c37dcdfc76d3cf07c8730bb3bc60a7d
C++
Sathler/desimpalgo
/8_F.cpp
UTF-8
281
2.8125
3
[]
no_license
#include <iostream> using namespace std; int main(){ long long fp, fh, v, a, f, i=1; while(cin >> fp >> fh){ f = fp + fh; a = (5*fp + 6*fh)/2; v = a + 2 - f; cout << "Molecula #" << i << ".:.\nPossui " << v << " atomos e " << a << " ligacoes\n" << endl; i++; } }
true
ca352c678ac0ffbf1d456519bf96d88b63f27aa4
C++
scanberg/lab5
/Entity3D.h
UTF-8
1,454
2.859375
3
[]
no_license
#pragma once #ifndef ENTITY3D_H #define ENTITY3D_H #include "Types.h" #include "DrawableObject.h" #define TEXTUREID_UNUSED 0 class Entity3D { protected: vec3 position; vec3 orientation; f32 scale; vec3 color; Entity3D *parent; DrawableObject *drawObj; u32 textureID; public: Entity3D...
true
ed9bc0f5b320d2b528a1e9e0c62cf1dbb60854f0
C++
increedBull7/Cpp_city
/Data_Structure/Array/String03countingNumberofWordstring.cpp
UTF-8
617
3.4375
3
[]
no_license
#include<iostream> using namespace std; int main(){ string s = "Hello World, How are YOU?"; int vowel = 0; int word = 1; for(int i = 0; s[i] != '\0'; i++){ if((s[i] >= 65 && s[i] <= 90) || (s[i] >= 97 && s[i] <= 122)){ if(s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o...
true
99a2c0d7c9041f79ae422fd47cc986c63e96a2fd
C++
Barsane/barsane
/lib/include/Node.hxx
UTF-8
2,287
2.875
3
[]
no_license
inline Node::Node(Indexer<Symbol>* tokens): indexer(tokens) { __indexers__.insert(tokens); }; inline Node::~Node() { set<Indexer<Symbol>*>::iterator it; if (__indexers__.count(indexer)) { delete indexer; __indexers__.erase(indexer); } } inline bool Node::validate(bool cond, string msg...
true
7f3ccca7a92ff1c7ad4e05cb5a16146b22ccbe78
C++
Jackpon/Data-Structures
/Stack_栈/LinkStack.h
GB18030
545
3.03125
3
[]
no_license
#include <iostream> using namespace std; typedef char ElemType; struct SNode { //ջ ElemType data; // struct SNode *next; //ָ̽ }; //ʼջ int InitStack(SNode* &top); //ջ int StackEmpty(SNode *top); //ջ int Push(SNode *top, ElemType item); //ջ int Pop(SNode *top, ElemType &item); //ȡջ int GetTop(SNode *top, ElemTyp...
true
a08afc00410a9d9de89fb36f1d081fca6e78ea75
C++
atskae/gameboy-emulator
/src/CPU.h
UTF-8
1,072
2.921875
3
[]
no_license
#ifndef GB_CPU_H #define GB_CPU_H #include "Insn.h" #define NUM_REGS 8 // four 16-bit registers, each can be split in half #define MEMORY_SIZE 0xFFFF // p,8 #define ROM_START_ADDR 0x0100 // p.10 class CPU { private: // instruction set table Insn* insn_table[16][16]; Insn* cb_insn_table[16][16]; // insn with...
true
80983794095cfceaddca7e2f78b2422a50a29bb5
C++
tessus/apachetop
/src/filters.h
UTF-8
623
3.0625
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#ifndef _FILTERS_H_ #define _FILTERS_H_ /* Filter class ** ** Each instance has one filter, which is either plaintext or regular ** expression (if HAVE_PCRE2_H is defined): Quick example: ** ** f = new Filter(); ** f->store("(movies|music)"); ** if (f->isactive() && f->match("some string with movies in it")) ** // yo...
true
40a8a43956a9bfe072da15d477a542093a72040d
C++
varaste/Data-Structure
/Part 1/matadd.cpp
UTF-8
1,224
3.546875
4
[]
no_license
#include <iostream.h> int count =0; void add (float (*a)[7], float (*b)[7], float (*c)[7], int m, int n) { for (int i = 0; i < m; i++) for (int j = 0; j < n; j++) c[i][j] = a[i][j] + b[i][j]; } void cadd (float (*a)[7], float (*b)[7], float (*c)[7], int m, int n) { for (int i = 0 ; i < m; i++) { cou...
true
91873e35bdba4008a07d297640b2bef247de5d45
C++
t16cs054/Perceptron
/simple_perceptron.cpp
UTF-8
10,980
3.125
3
[]
no_license
#include<iostream> #include<fstream>//ファイル読み込み用 #include<sstream>//文字列を数値へ変換する //#include<stdio.h> //#include<string> #include<map>//map用 //#include<stdlib.h> using namespace std; class Iris{ private: static const double p = 0.25;//学習率 static const int articles = 150;//全データ static const int feature = 4;//菖蒲の特徴数 ...
true
996e24ebecb4396708843312cac0974820a4ad33
C++
mlpack/mlpack
/src/mlpack/methods/ann/convolution_rules/naive_convolution.hpp
UTF-8
10,726
2.984375
3
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
/** * @file methods/ann/convolution_rules/naive_convolution.hpp * @author Shangtong Zhang * @author Marcus Edel * * Implementation of the convolution. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3...
true