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
487cb24ee814a57bfbf21e83bfca78889c3636e1
C++
ArthurLCastro/ModulosGSM
/examples/Envio-SMS/Envio-SMS.ino
UTF-8
1,479
2.890625
3
[]
no_license
// Envio de SMS // Arthur L. Castro // Abril de 2019 // INCLUSÃO DE BIBLIOTECAS: #include <ModulosGSM.h> // DEFINIÇÕES: #define RX_GSM1 8 // ligar o Pino 8 do Arduino no TX do Módulo "SIM808 EVB-V3.2" #define TX_GSM1 7 // ligar o Pino 7 do Arduino no RX do Módulo "SIM808 EVB-V3.2" #define intervalo 20...
true
ee7422b4bc0e5904f449ec789f253bb588cce363
C++
k-dx2/OOPs_lab_4thsem
/day3/graphadjlist.cpp
UTF-8
1,527
3.1875
3
[]
no_license
#include <iostream> using namespace std; struct SubListNode{ int des; SubListNode *next = NULL; }; struct MainListNode{ SubListNode *head = NULL; SubListNode *tail; }; int main(void){ int V, E; cout << "Enter the no. of vertices\n"; cin >> V; cout << "Enter the no. of edges\n"; c...
true
0181cc8428f965dc1aadf7f7e4f2fe6c7af598cf
C++
baarmaley/bug-free-chainsaw
/src/lib/include/journal/journal_entry.hpp
UTF-8
843
2.640625
3
[]
no_license
#pragma once #include <journal/journal_entry_id.hpp> #include <common/common_type.hpp> #include <chrono> #include <string> namespace barmaley { namespace lib { enum class JournalEntryType { device_detected, connection_lost, connection_restored, reconnect_detected, bad_protocol, ip_changed, ...
true
a3b9ad9813348ab94346faea289f42e0906fab45
C++
chuxuantinh/C-PLUS
/SuperEggDrop.cpp
UTF-8
390
2.8125
3
[]
no_license
class Solution { public: int superEggDrop(int K, int N) { vector<int> floors(K,1); int counter = 2; while (N > 1) { for (int j = K - 1; j > 0; --j) floors[j] += floors[j-1] + 1; floors[0] = counter; if (floors[K-1] >= N) return counter; ...
true
a5971bc0d91c9b57ea911f8f77e626719cafa6c7
C++
RustamSafiulin/mnemo_designer
/elementsimplelistwidget.cpp
UTF-8
2,007
2.703125
3
[]
no_license
#include "elementsimplelistwidget.h" #include <QMimeData> #include <QDrag> #include <QApplication> ElementSimpleListWidget::ElementSimpleListWidget(QListWidget *parent) : QListWidget(parent) { setSpacing(5); addElements(); } void ElementSimpleListWidget::addElements() { QListWidgetItem *lineItem = ne...
true
b639643bb825d1819fd1c33c83033f2705e829df
C++
biprodas/OJ-Solutions
/UVa/10420 - List of Conquests.cpp
UTF-8
336
2.546875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; map<string, int> country; int main(){ int t; scanf("%d", &t); while(t--){ string name, line; cin>>name; getline(cin, line); country[name]++; } for(auto a : country) printf("%s %d\n", a.first.c_str(), a.second); ...
true
9418973db9f695dec755ecc5a3f881da37fb510c
C++
BruceKen2014/Dex
/DexBase/DexVertex.h
UTF-8
1,373
2.71875
3
[]
no_license
#ifndef _DEX_VERTEX_H #define _DEX_VERTEX_H #include <d3dx9math.h> #include "../DexMath/DexVector3.h" #include "DexColor.h" typedef struct _stVertex0 { D3DXVECTOR3 m_pos; D3DCOLOR m_color; public: _stVertex0(); void SetColor(const DexColor& color); void SetPos(const DexVector3& pos); } stVertex0; typedef struc...
true
9d9c16a79f92ae463b0a05677faa071297e49fdb
C++
R41fK/kuehmayer_project_1
/src/MessageQueue.cpp
UTF-8
468
2.953125
3
[ "BSL-1.0" ]
permissive
#include "Message.h" #include "MessageQueue.h" using namespace std; void MessageQueue::push(Message message) { lock_guard<mutex> lg{this->m}; this->message_queue.push(message); this->empty.notify_one(); } Message MessageQueue::pop() { unique_lock<mutex> ul{this->m}; empty.wait(ul, [this]{return ...
true
76dafb4e370166b920058c18e5a7b5f8af7cf09a
C++
yandayixia/Chamber_Crawler
/Source_Code/Goblin.cc
UTF-8
847
2.90625
3
[]
no_license
#include "Enemy.h" #include "Goblin.h" #include "helper.h" //The BeenStruck(Enemy Attacker)functions are VIRTUAL so that //they can be overrided by the subclasses. It will ALWAYS be calling //an Attack(...) function in the Enemy class and its subclasses. void Goblin::BeenStruck(Enemy* Attacker) { Attacker->Attack(th...
true
8701897a673e5294cfe211131a5404d451b13f19
C++
VladimirSlavic/NeuralEvolution
/genetics/mutation_operators/add_mutation.h
UTF-8
900
2.953125
3
[]
no_license
// // Created by elrond on 1/17/18. // #ifndef NEUROEVOLUTION_ADD_MUTATION_H #define NEUROEVOLUTION_ADD_MUTATION_H #include "abstract_mutation.h" class AddMutator : public AbstractMutator { public: AddMutator(double sigma1, double sigma2):AbstractMutator(sigma1, sigma2), rng{rd()}{ } void mutate(Chr...
true
94172288e6ab11cd6e27ed513111c1346587536c
C++
TrickyFatCat/beginning-cpp-course
/l233-challenge/l233-challenge.cpp
UTF-8
942
3.28125
3
[]
no_license
#include <iostream> #include <fstream> #include <iomanip> int main() { std::ifstream in_file {}; std::ofstream out_file {}; in_file.open("./files/romeoandjuliet.txt"); if(!in_file) { std::cerr << "Error! Couldn't open the file." << std::endl; return 1; } out_file.open...
true
853a8f2886a9d14b70944c466461dcd1b3f65304
C++
zhuhr213/a_c_shell_homework
/c_program_homework .cpp
UTF-8
14,044
2.78125
3
[]
no_license
#include <fstream> #include <string> #include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <stdlib.h> #include <sys/types.h> #include <dirent.h> #include <unistd.h> #include <pwd.h> #include <memory.h> #include <sys/stat.h> #include <sys/wait.h> #include <sys/param.h> #include <signal...
true
a31cdffd06008a3f228fbd623239dabd1560edc4
C++
malvasan/aed-lab1
/ordenacion/functores.cpp
UTF-8
1,003
3.6875
4
[]
no_license
#include <iostream> using namespace std; /* class ascendente { public: bool ordenar(int a, int b) { return a>b; } }; class descendente { public: bool ordenar(int a, int b) { return a<b; } }; void cambiar(int* ptr1,int* ptr2) { int c=*ptr1; *ptr1=*ptr...
true
8e45021acc67c27240349d75b61235af6abac00c
C++
Litao439420999/LeetCodeAlgorithm
/C++/MyQueue.cpp
UTF-8
1,210
3.609375
4
[]
no_license
/** * @File : MyQueue.cpp * @Brief : 用栈实现队列 * @Link : https://leetcode-cn.com/problems/implement-queue-using-stacks/ * @Author : Wei Li * @Date : 2021-07-25 */ #include <iostream> #include <stack> class MyQueue { std::stack<int> in, out; public: /** Initialize your data structure here. */ ...
true
84103e7188c0bc1f02246b3f885342671130265e
C++
DavidPetr/Internship_Tasks
/STL_Algorithms/STL_Algorithms/Source.cpp
UTF-8
2,619
3.3125
3
[ "MIT" ]
permissive
#include <iostream> #include <vector> #include <algorithm> #include <iterator> #include <ctime> bool isPrime(int x) { if (x < 2)return false; if (x == 2)return true; if ((x & 1) == 0)return false; for (int i = 3; i*i <= x; i += 2) { if (x%i == 0)return false; } return true; } int main(int argc, char** argv) ...
true
a548a2f8350db854cfbeb4c8768d5c1de88e4aca
C++
AndrewWayne/OI_Learning
/个位数计算.cpp
UTF-8
2,001
3.21875
3
[ "MIT" ]
permissive
#include <iostream> #include <cstdio> #include <string.h> using namespace std; char in[30],stack[30],out[30]; int stop=0; int outtop=-1; void spush(int &top,char a){ stack[++top]=a; } void pop(int &top){ out[++outtop]=stack[top]; top--; } int pow(int di,int mi){ int outs=1; for(int i=1;i<=mi;i++){ ...
true
2e41e38607863610bbdb466ad00e8a2647cc1728
C++
chirag-gurumurthy/Learning_C_plus_plus
/Exercise_Files/Chap02_Basic_Syntax/conditionals.cpp
UTF-8
285
3.265625
3
[]
no_license
/* conditionals.cpp by Chirag updated 2021-09-16 */ #include <cstdio> int main() { int x = 42; int y=7; printf("value is %d\n", x<y); if(x>y) { printf("condition is true"); } else { puts("condition is false"); } return 0; }
true
9ef9e2255ff27f56f5fddb5c915d858c657e04fb
C++
julien1619/MultiPong
/MultiPong/Balle.h
UTF-8
365
2.703125
3
[]
no_license
#pragma once class Balle { public: Balle(void); Balle(int masse, int rayon); virtual ~Balle(void); void update(int x, int y, int speed, int dirX, int dirY); int getX(); int getY(); int getSpeed(); int getDirX(); int getDirY(); int getMasse(); int getRayon(); private: int posX; int posY; int speed; int ...
true
8b2362bc34d3451311a18e2576755ae09202ce0a
C++
zetarus/Americano
/Server/CGSF/Sample/SevenGameServer/SGTable.h
UTF-8
1,024
2.859375
3
[]
no_license
// SGTable.h: interface for the SGTable class. // ////////////////////////////////////////////////////////////////////// #pragma once class SGTable { public: SGTable(); virtual ~SGTable(); EdgeCard CheckBoundary(int iCardType); void InitializeTable(); void UpdateTableState(int iCardNum, int iCardType); void ...
true
1cd64c4cc7875e34e4db07aae7d3b30834c8213f
C++
Arkadijus/OS
/OS/Process.h
UTF-8
3,844
2.9375
3
[]
no_license
#pragma once #include <cstdint> #include <vector> #include <string> #include <memory> #include "Kernel.h" #include "Resource.h" #include "CPU.h" struct SavedRegisters { std::uint8_t SF = 0; std::uint32_t AX = 0; std::uint32_t BX = 0; std::uint32_t PTR = 0; std::uint16_t IC = 0; }; enum class ProcessState { R...
true
362e1c3bb8e88444867f1d0a9934e032cd68afe7
C++
RishikaGhosh/ProjectEuler
/projecteuler_4.cpp.cpp
UTF-8
445
2.90625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; bool ispal(int n) { long long num,digit,rev=0; num=n; while(num!=0) { digit=num%10; rev=(rev*10)+digit; num/=10; } if(n==rev) { return true; } else return false; } int main() { long long n; long long max=0; for(int i=999;i>=100;i--) { for...
true
200dbfd38004b6f532e333d271e60300906342d0
C++
tiny656/PAT
/PAT (Advanced Level) Practice/1013_Battle Over Cities (25).cpp
UTF-8
1,335
2.515625
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> using namespace std; #define N 1005 int matrix[N][N]; int tmp[N][N]; int vis[N]; int partNum; void dfs(int x,int n) { if(!vis[x]) { //cout << x << endl; vis[x] = 1; for(int i = 1; i <= n; i++) { ...
true
8e0847ec03bd07f123df2671a1fb2eb115778d10
C++
ydakoukn/StrongBox
/EnvironmentMap/EnvironmentMap/CharacterBase.cpp
SHIFT_JIS
4,743
2.953125
3
[]
no_license
#include "CharacterBase.h" namespace Character{ // 摜̑ const int CharacterBase::m_numberOfImage = 4; // ړ̘Azz std::unordered_map< MyApplication::AppController::Input, CharacterBase::Position> CharacterBase::m_inputMove; CharacterBase::CharacterBase(): m_size(20), m_waitMove(0){ // Azz̓o^ // // ړp // ...
true
23eae06314c934f864901943f73e385b86d5e3b3
C++
avnat/gsoc2012-kdiamond
/src_qml/board.cpp
UTF-8
11,074
3.0625
3
[]
no_license
#include "board.h" #include <QGraphicsObject> // Defining the number of rows and columns in the grid int ROWS =8; int COLUMNS=8; int BOARD_ITEMS =ROWS*COLUMNS; int DIAMOND_COUNT = 5; #define MIN_MATCHES 3 #define MAX_MATCHES 5 Board::Board(QObject *parent) : QObject(parent), iDifficultyLevel(Medium) { // ...
true
590f432d02433d71cdc16c70d161dde84a11a0e7
C++
linxin8/OS
/disk/directory.cpp
UTF-8
4,400
3.125
3
[ "MIT" ]
permissive
#include "disk/directory.h" #include "disk/file.h" #include "disk/inode.h" #include "kernel/memory.h" #include "lib/debug.h" #include "lib/stdio.h" #include "lib/string.h" DirectoryEntry::DirectoryEntry() : name(""), inode_no(-1), type(none) {} DirectoryEntry::DirectoryEntry(const char* name, int32_t inode_no, Type t...
true
00e662f9da37e921fa616cdec77f0db09712e7f4
C++
codinglq/Html_Analyse
/FilterTagMore.cpp
GB18030
4,466
2.515625
3
[]
no_license
#include "HtmlAnalyse.h" /*20131130ʮһ㶨 ҿ *coding by lq *һ ҵ 㷨Че㡣еͰ عŻһ°20131201 write by lq **/ char * FilterTagMore(int * i_TagArray,char *c_buf,char *c_Tag){ string s_buf=c_buf; char *c_r_buf=(char *)malloc(sizeof(char)*s_buf.length()); if (!i_TagArray) { cout<<"Ĵǿյİ"<<endl; exit(...
true
1a66f0f7df6b9f19ccb22cae0299ebb5d57447b7
C++
emmabh/Space-Race
/Oxygen_Depot.cpp
UTF-8
1,638
3.234375
3
[]
no_license
#include "Oxygen_Depot.h" #include "Game_Object.h" #include "Cart_Point.h" #include <iostream> using namespace std; Oxygen_Depot:: Oxygen_Depot():Game_Object('O') { state = 'f'; cout << "Oxygen_Depot default constructed." << endl; amount_oxygen = 50; } Oxygen_Depot::Oxygen_Depot(Cart_Point inputLoc, int inputId)...
true
a5e9d29730202a70fe8ee5ae6b50b72b6cb6d050
C++
mihirmpatil/interview-prep
/interviewbit/add-binary-strings.cpp
UTF-8
771
3.015625
3
[]
no_license
#include <string> string Solution::addBinary(string A, string B) { // Do not write main() function. // Do not read input, instead use the arguments to the function. // Do not print the output, instead return values as specified // Still have a doubt. Checkout www.interviewbit.com/pages/sample_codes/ for more detail...
true
ac50dd3bd344fa5e197e79a7b18b59e008db8ab2
C++
manzmvp/Cpp_practice_questions
/Important/ChildrenGrandchildren.cpp
UTF-8
1,656
3.375
3
[]
no_license
// Assume a two dimensional string array. Each array contains child and father details. '0'th // element is the child and '1'st is the parent. Write a program to accept a name and find the // number of children and grand children he has. Don't use any brute force methods. // Assume names are unique. // Example: // Data...
true
757f439dc0073965cdf1455d96bc067d90777626
C++
chromium/chromium
/ppapi/examples/url_loader/streaming.cc
UTF-8
5,717
2.59375
3
[ "BSD-3-Clause", "LicenseRef-scancode-khronos" ]
permissive
// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This example shows how to use the URLLoader in streaming mode (reading to // memory as data comes over the network). This example uses PostMessage between // the plugin and ...
true
860ee5220db037a49fd391ff00ba64056beb4815
C++
clouduol/misc
/detectproblem2018/detect.cpp
UTF-8
2,380
3.0625
3
[]
no_license
#include<iostream> #include<cmath> #include<algorithm> using namespace std; void int2array(int, int*); void sync2stdout(int*); bool islegal(int*); int p2[4]={2,3,0,1}; int p3[4]={2,5,1,3}; int p4[4][2]={{0,4},{1,6},{0,8},{5,9}}; int p5[4]={7,3,8,6}; int p6[4][2]={{1,3},{0,5},{2,9},{4,8}}; int p7[4]={2,1,0,3}; int p8...
true
9d8ecd6b85eb85e4e40b3818e7260f76f2ed6ca1
C++
usherfu/zoj
/zju.finished/2286.cpp
UTF-8
987
2.9375
3
[]
no_license
#include<iostream> #include<cmath> using namespace std; enum { Size = 1000001, }; int save[Size] = {0}; int Lim = 1 + (int)sqrt((double)Size); void init(){ int i,j, t; for(i=2;i<Lim;i++){ j = i * i; // 特殊处理i * i == j的情况,防止i多加一次 t = i + i; save[j] += i; for(j+=i,t ++;j<Size;j+=i,t++...
true
5b0d3ce4d0ece1693398731a0bece415ad3cb377
C++
MartinFlores751/VorteX
/Project X/Project X/Ship.cpp
UTF-8
2,979
3.28125
3
[ "MIT" ]
permissive
#include <stdio.h> #include "core.h" #include "Ship.h" using std::vector; using std::string; Ship::Ship(int special){ // Initialize all variables xCord = yCord = xVel = yVel = 0; numSpecial = special; } bool Ship::init(SDL_Renderer* renderer, string file) { bool isGood = true; if (!mShip.loadFromFile(renderer,...
true
fdee51199863f7e49b7114d5d4839847bf740e05
C++
dhanendraverma/Daily-Coding-Problem
/Day348.cpp
UTF-8
2,330
4
4
[]
no_license
/****************************************************************************************************************************** This problem was asked by Zillow. A ternary search tree is a trie-like data structure where each node may have up to three children. Here is an example which represents the words code, cob, b...
true
cbf3e73fdcbdb8e0915cca5e4ead9cf8ce6d313d
C++
amareshkumar/integration
/source/gc.cpp
UTF-8
417
3.15625
3
[]
no_license
#include "MyGC.hpp" gc :: gc (){ cout << "Constructor of gc is called\n"; } gc ::~ gc (){ cout << "Destructor of gc is called\n"; } void* gc::operator new(size_t size){ void* storage = malloc(size); if (storage == NULL){ cout << "no memory left to be allocated\n\n"; EXIT_FAILURE; } return storage;...
true
8fbdf5ac9178aeea34ad999835f505843aef6f68
C++
Wylie-Modro/Skynet
/Skynet/OCR/Auvsi_Recognize.cpp
UTF-8
21,475
2.84375
3
[]
no_license
#include "Auvsi_Recognize.h" #include "BlobResult.h" #include <vector> #include <algorithm> #include <iostream> #include <string> #include "Auvsi_cvUtil.h" // Whether we want to use just color channels or not #define TWO_CHANNEL 1 cv::Mat Auvsi_Recognize::SegmentLetter(cv::Mat colorImg, cv::Mat binaryShapeImg) { A...
true
1ff2012e4f73b65c25fa488ed5d81e44bab47f5b
C++
pratzl/csv_reader
/csv_reader.cpp
UTF-8
11,893
3.0625
3
[]
no_license
// csv_reader.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "csv_reader.hpp" #include <iostream> #include <charconv> #include <concepts> #include <string_view> #include <type_traits> #include <limits> #include <cassert> #include "util.hpp" using std::is_same_v; usi...
true
9a2a40f6dd0779deb8269a9ab0ab0162620bfddf
C++
lPrimemaster/VectorLite
/src/SVGWriter.h
UTF-8
816
2.890625
3
[]
no_license
#pragma once #include <iostream> #include <filesystem> #include <iostream> #include <unordered_map> class SVGObject; struct SVGStyle { friend class SVGWriter; SVGStyle(std::string name) : name(name) {}; SVGStyle() {}; std::string& operator[](std::string val) { return styles[val]; } std::string name; priv...
true
3a7145d424f2c9f2d3aee410a7298b1f33f53fa2
C++
lukaszkurantdev/Object-Oriented-Programming
/6. 5 kwiecień 2018/zad1.cpp
UTF-8
1,894
3.5
4
[]
no_license
#include <iostream> using namespace std; class Polygon { public: struct Point { float x,y; }; protected: Point *tab; int ilePunktow; int ileKomorek; public: Polygon() { tab = new Point[4]; ilePunktow = 0; ileKo...
true
75e87391b9d6ff9bae214f4eda3d64edaccbf214
C++
Joco223/Simple2D
/inc/Simple2D_Text.h
UTF-8
1,853
2.6875
3
[ "MIT" ]
permissive
#pragma once #include <SDL.h> #include <SDL_ttf.h> #include <iostream> #include <vector> #include <string> #include <sstream> #include <memory> #include <algorithm> #include <unordered_map> #include "Simple2D.h" struct font_colour { unsigned char red; unsigned char green; unsigned char blue; unsigned char alpha;...
true
242c1e3e8b1661775c8d80e27a635542565a3021
C++
Fibird/Rectangle2.0
/rectangle.h
UTF-8
821
2.953125
3
[]
no_license
#ifndef RECTANGLE_H_INCLUDED #define RECTANGLE_H_INCLUDED #include <iostream> #include "point.h" using namespace std; class CRectangle { CPoint p1; CPoint p2; public: CRectangle(double x1 = 0, double y1 = 200, double x2 = 324, double y2 = 0); double Area(void); //computes the area of the...
true
4e1e67729af0858afbe77f62941cc633d8d2014d
C++
iassasin/wschatserver
/regex/regex.hpp
UTF-8
1,268
2.9375
3
[ "MIT" ]
permissive
#ifndef SINLIB_REGEX_HPP #define SINLIB_REGEX_HPP #include <string> #include <regex> #include <vector> #include <sstream> namespace sinlib { using std::regex; using std::string; using std::vector; using std::istringstream; using std::smatch; using std::regex_search; vector<string> regex_split(string input, const re...
true
7acd7c358795a8b91a08753d3caadd35fb9b49c6
C++
frank-pian/Laser_Test
/code/ArduTest1.0/ArduTest1.0.ino
UTF-8
1,424
2.515625
3
[]
no_license
#include <SoftwareSerial.h> #include <SPI.h> #include <SD.h> SoftwareSerial senSerial(8,9); //软串口RX,TX //******laserSensor模块,strDistance(),Proof_Test()****** const uint8_t CONT_MEASURE[4]={0x80,0x06,0x03,0x77}; //定义发送连续测量命令 uint8_t count[11]={0}; //接收传感器11位数据 //****** 用于SD卡设置****** const int chipSelect = 10;//设置片选CS...
true
3e338b76dee3ec421c80148532705581c30c8004
C++
biebipan/coding
/algorithm/leetcode/longest_valid_parentheses/code.cc
UTF-8
3,158
3.65625
4
[]
no_license
// Copyright 2013 Jike Inc. All Rights Reserved. // Author: Liqiang Guo(guoliqiang@jike.com) // I just want to GH to hss~ // Date : 2013-09-24 10:12:00 // File : code.cc // Brief : /* Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. ...
true
5832ba2e9a13fedd9b99af441d694b41bda42a43
C++
poojashree/GraphicsAssignment3
/GraphicsAssignment3/OverlayPlane.cpp
UTF-8
1,735
2.625
3
[]
no_license
/* OverlayPlane CLASS * AUTHOR: STEWART TAYLOR *------------------------------------ * Generates a plane in which to provide overlay effects * Uses fragment shader to enable this * * Last Updated: 30/11/2012 */ #include <glew.h> #include <freeglut.h> #include "OverlayPlane.h" #include "ShaderLoader.h" Overlay...
true
89071236466717d28deb01350cd31ce1ddce1414
C++
leoongit/EC544_Group9
/challenge_1/thermistor.ino
UTF-8
1,271
3.203125
3
[]
no_license
#include <SoftwareSerial.h> #include <math.h> int pin = 0; SoftwareSerial XBee(2, 3); // RX, TX void setup() { // put your setup code here, to run once: XBee.begin(9600); Serial.begin(9600); } void loop() { int temperature = getTemp(); String mytemp = String(temperature); String mymessage = String("D," +...
true
89ba7c4c7afcf485ac1e29a4dec63f81ce5c847a
C++
jitongming/Memory-server
/public/footprint/data_process/StatisticWeiboNumAndSexProp.cpp
GB18030
2,167
3.3125
3
[]
no_license
#include<iostream> #include<fstream> #include<string> #include<map> using namespace std; map<string, int> my_map; struct Area { string name; int user_num,man,woman,vip; long weibo_num,fans_num,atten_num; }; void ReadFile(Area *area,char *path,int count) { ifstream fin(path); int i = 0,area_num; ...
true
7e6e1536b53c095e556c41d4a3d1cbcb566943d1
C++
ivanfeliciano/UVa-Solutions
/820 - Internet Bandwidth.cpp
UTF-8
1,912
2.71875
3
[]
no_license
#include <algorithm> #include <bitset> #include <cstdio> #include <vector> #include <queue> #include <cstring> using namespace std; typedef vector<int> vi; #define MAX_V 120 #define INF 1000000000 int res[MAX_V][MAX_V], mf, f, s, t; // global variables vi p; vector<vi> AdjList; void augment...
true
b4840be09526706d2377ed7bdb99db210e051984
C++
ARNFRIED/DetourExample
/Injected/Detour.hpp
UTF-8
1,253
3.015625
3
[]
no_license
#pragma once #include <vector> class Detour { public: Detour(int target_func, int hook_func) : target{ (byte*)target_func } , hook{ hook_func } { new_bytes.push_back(0x68); // push (the address provided through hook) new_bytes.resize(5); *(int*)(new_bytes.data() + 1) = hook; // dirty hack new_bytes.p...
true
1b3cd16d2c75827ef47bb3cb23c82ba29752afcc
C++
cenariusxz/ACM-Coding
/homework/CandC++/1427405052-E12.cpp
UTF-8
3,407
3.859375
4
[]
no_license
/*修改:LendMoney函数:添加日期参数以及修改返回值类型为double * CalcInterest函数:添加金额参数以便LendMoney函数调用 * 主函数中增加取出金额输出,利息计算与结算时间修改 */ #include<iostream> using namespace std; //日期 struct Date { int year; //年 int month; //月 int day; //日 Date(){} Date(int y, int m, int d) { year = y; month = m; day = d; } }; //账户类 class CAount {...
true
77f319944c28f2678244de62af573cd56cfb7c66
C++
ismael-wael/solution-to-most-exercises-of-C-how-to-program-book
/ch.17/studying trials/17.11 composition - objects as members of classes/Date.cpp
UTF-8
1,036
3.390625
3
[]
no_license
#include <iostream> #include <array> #include <stdexcept> #include "Date.h" using namespace std; Date::Date(int mn, int dy, int yr) { if(mn > 0 && mn <= monthsPerYear) month = mn; else { throw invalid_argument("months must be 1-12"); } year = yr; day = checkDay(dy); cout...
true
8db5a30451cc1190a599c201ad26739ec63b9fdf
C++
BartoszGancza/Game_of_Ships
/main.cpp
UTF-8
10,137
3.40625
3
[]
no_license
#include <iostream> #include <random> #include <chrono> #include <vector> #include <string> #include <sstream> #include <utility> using namespace std; default_random_engine generator; // generator is being seeded with time since epoch at every roll of the dice uniform_int_distribution<int> direction(1,4); uniform_int...
true
71c39592213a77bd28c6c6ef706deb7f924f2a79
C++
kalina559/codility-lessons
/3.Time Complexity/FrogJmp/solution.cpp
UTF-8
113
2.515625
3
[]
no_license
#include <algorithm> #include<cmath> int solution(int X, int Y, int D) { return ceil((Y - X) / double(D)); }
true
389aa46eae09ce40ec3be94e3120feecf84fda9b
C++
SusmoyBarman1/DS-and-Algorithm-Analysis-Design
/DFS_algo.cpp
UTF-8
1,697
3.1875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; struct Node { int data; Node* next; }; void init(); void DFS(int source); void Insert(int j,int x); int Input(); void Print(); bool isvisited(int data); Node *head[100],*temp_head; int Stack[100],top=-1,n=-1,arr[100] = {0}; int main() { int source; cout<<"...
true
b247091de4f4ab63f5c6d3ead7b6b1e67d1398dd
C++
Hansum/Hacktoberfest-2k18
/algorithms/binary_search/c/pramathabhat.c
UTF-8
787
3.28125
3
[ "MIT" ]
permissive
#include <stdio.h> int main() { int c, first, last, middle, n, search, array[100]; printf("Enter number of elements\n"); scanf("%d",&n); printf("Enter %d integers\n", n); for (c = 0; c < n; c++) scanf("%d",&array[c]); printf("Enter value to find\n"); scanf("%d", &search); first...
true
3e65f21dddc237f81fde4c40ba208d918ff57750
C++
p-lots/exercism
/cpp/clock/clock.cpp
UTF-8
1,631
3.453125
3
[]
no_license
#include <iomanip> #include <sstream> #include <string> #include "clock.h" namespace date_independent { clock clock::at(int h, int m) { return clock(h, m); } clock::operator std::string() const { std::stringstream ret; ret << std::setw(2) << std::setfill('0') << hours ...
true
d33692993935c9fa124b3467a3d6008d6d5c48a5
C++
jianminfly/learnopengl
/pcm_visual/Complex.h
UTF-8
1,084
2.546875
3
[]
no_license
// // Complex.h // FFT // // Created by boone on 2018/7/17. // Copyright © 2018年 boone. All rights reserved. // #ifndef Complex_h #define Complex_h #ifndef BOOLEAN_VAL #define BOOLEAN_VAL typedef int BOOL; #define TRUE 1 #define FALSE 0 #endif class Complex { public: Complex(); Complex(double re, double ...
true
679539dd0582fa2fd80d232cbdfc0a169fdab96d
C++
ChhYoung/Coding_Diary
/LeetCode&PAT/PAT/ad_1059.cpp
UTF-8
867
3.25
3
[]
no_license
#include<cstdio> #include<vector> using namespace std; // 用来存储质数的表 // 素数筛选法 vector<int> prime(500000,1); int main(){ for(int i=2; i*i < 500000; ++i){ for(int j=2; j*i < 500000; ++j){ prime[j*i] = 0; } } long int a; scanf("%ld",&a); printf("%ld=",a); if(a == 1) { ...
true
1a8127c71666a899a37a5d1c6783b48fbd334242
C++
meretciel/leet_code
/reverse_bit.cpp
UTF-8
579
2.90625
3
[]
no_license
// // reverse_bit.cpp // leet_code // // Created by Ruikun Hong on 7/21/15. // Copyright (c) 2015 Ruikun Hong. All rights reserved. // #include <stdio.h> #include <cstdint> using namespace std; class Solution { public: uint32_t reverseBits(uint32_t n) { uint32_t m = n; ...
true
d2a7119738e28b51897dc05486a2e5bc3da704ff
C++
codenm007/basiccprog
/home unit calculator_v2.cpp
UTF-8
1,403
3.234375
3
[]
no_license
#include<stdio.h> main() {//codenm float unt,amt,finalamt; float a,b,c,d,base,tax; printf("\nHome Unit Calculator"); printf("\n-------------------------------------------------\n"); printf("\nEnter base rate:"); scanf("%f",&base); printf("\nEnter tax rate in percentage:"); scanf("%f",&tax); printf("\n Enter ra...
true
5f57cb180604caa3c9adeb08984921f1c6557626
C++
rtrochim/zpr-agario
/src/server/c/seasocks/ToString.h
UTF-8
777
2.90625
3
[]
no_license
#pragma once #include <sstream> #include <string> #include <type_traits> namespace seasocks { template <typename T, typename std::enable_if<!std::is_integral<typename std::decay<T>::type>::value, int>::type = 0> std::string toString(const T& obj) { std::stringstream str; str.imbue(std::locale("C")); str ...
true
5e6000037194f36bda29967969ee79ab6f0665a4
C++
Woloda/Lab_4_1
/Lab_4.1/Figure.h
UTF-8
1,111
3.4375
3
[]
no_license
#pragma once #include <sstream> class Figure { //абстрактний клас(базовий клас) "figure"(фігура) private: double a; //поле "a" --- відповідає за одну зі сторін прямокутника, трапеції і радіус кола public: Figure(); //конструктор за умовчанням(без параметрів) Figure(double); //конструктор ініціалізації void...
true
51c5167e1dc97db0641cd4862fa0a42ed0d2fa82
C++
figueiredods/EstruturaDeDados_PSC_2019
/Tema2/BubbleSortCresc/BubbleSortCresc/Origem.cpp
ISO-8859-1
977
3.28125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <time.h> void BubbleSort(int vet[]); #define TAMANHOVETOR 10 int main() { int vet[TAMANHOVETOR] = { 0 }; srand(time(NULL)); //INSERO DE DADOS for (int i = 0; i < TAMANHOVETOR; i++) vet[i] = rand() % 100; printf("VETOR NAO ORDENADO:\n"); for ...
true
fcadc0b97f74e2baed909f3b202a72b581e3829b
C++
UncleRoel/O_C-Hemisphere
/software/o_c_REV/HEM_ClockDivider.ino
UTF-8
5,986
2.859375
3
[]
no_license
#define HEM_CLOCKDIV_MAX 8 class ClockDivider : public HemisphereApplet { public: const char* applet_name() { return "Clock Div"; } void Start() { ForEachChannel(ch) { div[ch] = ch + 1; count[ch] = 0; next_clock[ch] = 0; } last_c...
true
54c288743667f9ba7b67b206f798a7fc33eac5d9
C++
buyulian/Six-chess-AI-cpp
/六子棋2.cpp
GB18030
15,521
2.5625
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <vector> #include <queue> #include <string.h> #include <windows.h> #include <fstream> using namespace std; enum paint_char{black=1,white=2,empty=-1,nempty=-2,side=3,sum=3}; enum vertion{player,computer}; const int chessbored_size=21;...
true
8c253f61213d029947ec7372fd00dbfa8b79d91a
C++
PrajwalaTM/accepted
/Templates/Number Theory/inclusion-exclusion.cpp
UTF-8
1,240
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; long long int intersectionCardinality(vector<long long int>v,long long n) { long long s=v.size(),ans=1,i; for(i=0;i<s;i++) ans*=v[i]; return (n/ans); } long long int GCD(long long int A, long long int B) { if(B==0) return A; else return GCD(B, A % B)...
true
ab25d2d22aee0b9bd1148fa40efb18c8ff08f542
C++
lh123cha/my_leveldb
/test/db_test1.cc
UTF-8
1,087
2.765625
3
[ "BSD-3-Clause" ]
permissive
#include "leveldb/db.h" #include <cstdio> #include <iostream> using namespace std; using namespace leveldb; int main() { DB *db = nullptr; Options op; op.create_if_missing = true; op.use_hash_table= true; Status status = DB::Open(op, "testdb", &db); assert(status.ok()); string s[100]; int i = 0; // ...
true
ffc33c3d7e54c1a7514b5eac7f7421c6b1e3ff15
C++
TimoLoomets/TeamSuccessRobotex2018Taxify
/v_0_2/util_functions/geodesic.cpp
UTF-8
7,101
2.921875
3
[]
no_license
#ifndef GEODESIC_CPP #define GEODESIC_CPP #include <bits/stdc++.h> #include "util_functions.hpp" #include "data_types.h" double hav(double i){ return sin(i/2)*sin(i/2); } //double hav_dist( std::pair<double, double> lineLineIntersection(std::pair<double, double> A, std::pair<double, double> B, std::pair<double,...
true
823f56261a4227bf0b74bda8244672ab74c68c32
C++
Lewons/PersonalProjects
/include/MyVector.h
UTF-8
7,410
3.5
4
[ "MIT" ]
permissive
// // Created by Lewon Simonian on 2019-05-21. // // using C++11 #ifndef GITHUB_PERSONALPROJECTS_MYVECTOR_H #define GITHUB_PERSONALPROJECTS_MYVECTOR_H template <class T> class MyVector { public: using size_type = int32_t; using iterator = T*; MyVector(); //default constructor explicit MyVector(size...
true
3cb69fea0016af139494bdf5d05bff3b17011f69
C++
dradgun/C-
/New folder/calbase.cpp
UTF-8
534
3.375
3
[]
no_license
#include<iostream> using namespace std; int main(){ int x; int width,length,Rectsngle_Area; int base,height,Triangle_Area; cout << "Select 1.(Rectangle) or 2.(Triangle) : ";cin >> x; if(x == 1){ cout << "Enter width, length = ";cin >> width >> length; Rectsngle_Area = width*length; cout << "Rectsngle Area =...
true
95aaa0235e53b8c13b49187b7843d73c954be1dd
C++
jkowalski96093/MinesweeperGameSFML
/main.cpp
UTF-8
1,196
2.671875
3
[]
no_license
#include <iostream> #include "MinesweeperBoard.h" #include "MSBoardTextView.h" #include "MSTextController.h" #include "MSBoardViewSFML.h" #include <SFML/Graphics.hpp> int main() { int board_width = 10; int board_height = 10; GameMode mode = EASY; MinesweeperBoard board(board_width, board_height, mode); board.deb...
true
d5d31ae0ec6d33d8dbc9c6d448cd497f408499eb
C++
tayloryoung6396/BullCooler
/Code/PWM_Test/PWM_Test/PWM_Test.ino
UTF-8
3,173
2.59375
3
[]
no_license
double freq = 100.0; double peltier = 80.0; // Duty cycle for the peltier double fan = 100.0; // Duty cycle for the fan double pump = 50.0; // Duty cycle for the pump int aPin1 = A7; int aPin2 = A6; int aPin3 = A5; int aPin4 = A4; int aPin5 = A3; int aPin6 = A2; int aPin7 = A1; int aPin8 = A0; int aVal1...
true
8e4a7024527f42c190e579f5e62a02211344b9ae
C++
varun-sundar-rabindranath/Programming
/hacker-rank/dp/longest_increasing_sunsequence/bst_dm.cpp
UTF-8
1,520
3.5
4
[]
no_license
#include <iostream> #include <cassert> #include <cstdio> #include <cstdlib> using namespace std; typedef struct bst_node { int element; int lis; bst_node *left; bst_node *right; bst_node() { left = NULL; right = NULL; element = 0; lis = 0; } }bst_node; bst_node *create_bst_node() { bst_...
true
385c6ec5dc039afc2fce6204d40b53266a328758
C++
namvietanh1902/Coffee-Management-System
/Item.h
UTF-8
937
2.5625
3
[]
no_license
#ifndef ITEM_H #define ITEM_H #include<iostream> #include<fstream> #include<string> #include<sstream> #include<stdlib.h> #include<iomanip> #include "Hoadon.h" using namespace std; class Item{ private: string maItem; string tenItem; int price; public: Item(){} friend std:...
true
4f0954aa85748609fec7d7ff11423b2331a387b6
C++
gods-mack/Workspace
/dblylist.cpp
UTF-8
1,723
3.328125
3
[]
no_license
#include<iostream> using namespace std; struct node { int data; node *prv; node *next; }; class list { node *t,*h; public: list() { t=NULL; h=NULL; } void add(int x) { node *n=new node; n->data=x; if(h==NULL) { t=h=n; } else { n->next=NULL; n->prv=t; t->next=n; t=n; } } void add_front(int...
true
7d52087c999518ac826a69d871530ee01a7e6592
C++
rudyekoprasetya/LearningArduino
/belajar1/belajar1.ino
UTF-8
742
2.875
3
[]
no_license
int lampukuning=2; //saya menggunakan pin digital no 2 void setup() { // put your setup code here, to run once: pinMode(lampukuning, OUTPUT); //ini kode untuk setting pin tersebut mengeluarkan listrik //aktifkan serial monitor Serial.begin(9600); } void loop() { // put your main code here, to run repeatedl...
true
11c1fc4cb20ce8996a8152230fe58ab342fcd041
C++
lilmuggle/leetcode
/longestCommonPrefix.cpp
UTF-8
960
3.0625
3
[]
no_license
//Original class Solution { public: string longestCommonPrefix(vector<string>& strs) { string s, tmp; int i = 0, j, k, len = strs.size(), len2; if(len == 0) return s; if(len == 1) return strs[0]; while(strs[0][i]!='\0'&&strs[1][i]!='\0'&&strs[0][i]==s...
true
0392af8f952a4a6f0b33d40fb0cb31d43c3c5ba2
C++
YaMaks666/Bambooster
/app/core/bencodevalue.cpp
UTF-8
11,953
3.09375
3
[]
no_license
#include "bencodevalue.h" #include <QDataStream> #include <QDebug> BencodeValue::BencodeValue(Type type) : m_type(type) , m_dataPosBegin(0) , m_dataPosEnd(0) , m_bencodeData(nullptr) { } BencodeValue::~BencodeValue() { } BencodeValue::Type BencodeValue::type() const { return m_type; } bool BencodeValue::isIn...
true
88b53b3cdc6f1cef7f767e4c8e60dce53f9da6d3
C++
Zigje9/Algorithm_study
/c++/1449.cpp
UTF-8
567
2.578125
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; vector<int> v; int N, L; int main(){ ios::sync_with_stdio(0); cin.tie(0); cin >> N >> L; if(L==1){ cout << N; return 0; } int a; for(int i=0 ; i<N ; i++){ cin >> a; v.push_back(...
true
bd76fa7fb928fdffbb1bbe498553805b8c62429b
C++
moble/SphericalFunctions
/WignerDMatrices.hpp
UTF-8
3,413
3.015625
3
[ "MIT" ]
permissive
// Copyright (c) 2014, Michael Boyle // See LICENSE file for details #ifndef WIGNERDMATRICES_HPP #define WIGNERDMATRICES_HPP #include "Quaternions.hpp" #include "Combinatorics.hpp" namespace SphericalFunctions { /// Object for pre-computing and retrieving coefficients for the Wigner D matrices class WignerCoeff...
true
175ef6716085a1e5da2181af369efe16fa5ec0d2
C++
samiksjsu/CLionProjects
/leetcode/253. Meeting Rooms II/main.cpp
UTF-8
274
2.921875
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<vector<int>> arr {{7,10},{2,4}}; sort(arr.begin(), arr.end(), [] (vector<int> a, vector<int>b) { return a.at(0) < b.at(0); }); cout << "Hello"; }
true
30afeee3ff51d9686e4f3d99b1fb9578c307840c
C++
MrDolph/Competitive_Programming
/Project_Euler/Toolkit/biginteger.cpp
UTF-8
6,303
3.09375
3
[]
no_license
// // Created by Jan Krepl on 08.01.17. // #include <algorithm> #include <iomanip> #include <cmath> #include <cctype> #include <math.h> #include <set> #include <vector> #include "Toolkit_classes.h" using namespace std; biginteger biginteger::operator+(biginteger rhs) { vector<int> smaller, bigger; i...
true
b18e2f756757dc8e5ad26d44b90ab3fd1e72fb4f
C++
rishabhtyagi2306/Competitive-Programming
/Striver SDE SHEET/Day 4 (Hashing)/Longest substring without repeating character.cpp
UTF-8
672
2.78125
3
[]
no_license
class Solution { public: int lengthOfLongestSubstring(string s) { unordered_map<char, int> cnt; int n = s.size(), i, j; i = j = 0; int ans = 0; while(i < n) { cnt[s[i]]++; if(cnt.size() == (i-j+1)) { ans = max(ans, i...
true
a264ef71475e160ff1e4c841270f17aa537e20a3
C++
teptind/Huffman_compression
/Huffman/HuffmanCompression/tree/trees.cpp
UTF-8
5,073
2.625
3
[]
no_license
// // Created by daniil on 20.06.19. // #include <algorithm> #include <queue> #include "trees.h" /*ENCODING_PART*//*ENCODING_PART*//*ENCODING_PART*//*ENCODING_PART*//*ENCODING_PART*/ TreeEncoder::TreeEncoder(EntryCounter const &counter) { auto entries = counter.get_res(); for (size_t i = 0; i < consts::ALPH_SI...
true
e9ecc1f43760f120f17f1dec4d926dfe18de5e86
C++
rushingJustice/C-programming-and-matlab-projects
/Finite Elements - Direct Sitffness Methods/Programs from E-book/Example3_3_2/main.cpp
UTF-8
3,607
3.59375
4
[]
no_license
/* EXAMPLE 3.3.2 Copyright(c) 2001-09, S. D. Rajan Object-Oriented Numerical Analysis OBJECTIVES (1) Illustrate the use of different control statements. (2) Show healthy programming styles. */ #include <iostream> #include <iomanip> #include <ios> #include <cmath> #include <string> int main () { co...
true
3d7bb1be7c887770f1f81ab703bb9a9787ec0f56
C++
sepalani/WiiTools
/source/functions.cpp
UTF-8
14,742
2.546875
3
[]
no_license
#include "functions.hh" vector<u32> GetU32Vector( string code ) { vector<u32> binary; for(u32 ii = 0; ii < code.length(); ii+=8) { string sub = code.substr(ii, 8); #ifdef DEBUG_BINARY cout << sub << endl; #endif const char * codeptr = sub.c_str(); u32 dword = strtoul(codeptr, NULL, 16); #ifdef ...
true
9de2c2cbb5ef2852d25aca24c90d7f2c7a822628
C++
kuku20/qttodolist
/queryoption.cpp
UTF-8
17,545
2.640625
3
[]
no_license
#include "queryoption.h" #include <QMessageBox> #include <QDebug> QSqlDatabase queryOption::dbConnection; QString queryOption::sqlQuery; QString queryOption::currentID,queryOption::inputNumber,queryOption::currentUser; QSqlQuery queryOption::qry; /** * @brief setCon A static funciton to connect to the data...
true
dee1e9e6cee915db61a60fd9698883282c2aae5c
C++
AkashVD/CPP_Datastructures
/ll_del_nth.cpp
UTF-8
1,363
4.25
4
[]
no_license
/*Deleting of Nodes from nth position*/ #include<iostream> using namespace std; class ll{ struct Node{ int data; Node* next; }*head; public: ll(){ head = NULL; } void insert(int); void display(); void delete_Node(int); }; void ll::insert(int d...
true
4452b7bc5f72b497b92ec845ddd11074d77a23a4
C++
lu-225/As-before
/2018212212124 陆家辉 实践大作业/圆排列问题.cpp
GB18030
1,728
3.09375
3
[]
no_license
#include<cstdio> #include<algorithm> #include<iostream> #include<cmath> using namespace std; const int inf = 0x3f3f3f3f; int n=3; double x[110];//ÿԲĺ double r[110];//ÿԲİ뾶 double minnr[110];//Բеİ뾶 double minn=inf;//Բг double calCenter(int k){//Բ double temp=0; for(int i=1;i<k;i++){ double c=x[i]+2.0*sq...
true
b9349ca9b5763189f47ee422c6e5eba011a8e00e
C++
bakerpcc/eoj
/obj/2976 考试1.cpp
GB18030
766
3.0625
3
[]
no_license
#include <stdio.h> int main2976() { int a[5][5]; int i, j, k, g, groups; int op; scanf("%d", &groups); for (g = 0; g < groups; g++) { for (i = 0; i < 5; i++) for (j = 0; j < 5; j++) a[i][j] = 1; for (i = 1; i <= 3; i++) for (j = 1; j <= 3; j++) { scanf("%d", &op); // żηתû...
true
cfdce28309753685e660dc4fbcc09862877af95e
C++
dronDrew/lab_work_week_7
/lab_work_week_7/List_two_direction.h
UTF-8
5,115
3.703125
4
[]
no_license
#pragma once #include "List_two_direction.h" namespace List_two_dicert { template<typename T> class list_two_direcktion { class Element { public: T data; Element* privios; Element* next; Element(T data); }; public: Element* elem; list_two_direcktion(); void Add_to_head(T data);//done void ...
true
cffabb7cacbf95395613a0327f4c31e1b48504a4
C++
boroppi/Cpp-Demonstration
/CPP_PERSON_TEST/Person.cpp
UTF-8
702
2.828125
3
[]
no_license
#include "stdafx.h" #include "Person.h" #include <iostream> using namespace std; Person::Person(string first,string last,int arbitrary) : firstname(first), lastname(last), arbitrarynumber(arbitrary) { // cout << "Constructing " << GetName() << endl; } string Person::GetName() const { return firs...
true
ecc402b0a2114ba412ba439ec7f64fdc5cafb500
C++
hhyuanhh/First
/代码作业/广义表/广义表/GenerList.h
UTF-8
2,827
3.46875
3
[]
no_license
#include<iostream> #include<assert.h> using namespace std; enum Type { HEAD, VALUE, SUB, }; struct GeneralListNode { Type _type; GeneralListNode* next; union { char _value; GeneralListNode* _sublink; }; GeneralListNode(Type type=VALUE, char value = 0) :_type(type), next(NULL) { if (_type == VALUE) { ...
true
7bc152eadc1d12f12ba85b3b16cc71a1b7facec2
C++
himanshuParashar0101/Data-Structure-and-Algorithms
/000_BASICS/015_Pythogorean_Triplet/main.cpp
UTF-8
761
3.90625
4
[ "MIT" ]
permissive
#include <iostream> using namespace std; bool pythogorean(int max, int n1, int n2) { if(max*max = n1*n1 + n2*n2) { return true; } return false; } bool checkPythogoreanTriplet(int n1, int n2, int n3) { bool result; if(n1>n2 && n1>n3) { result = pythogorean(n1, n2, n3); ...
true
73da948df75df1dccea6043e0395bdbf0565229a
C++
Konard/TasksAndSolutions
/cpp/T5_1/T5_1.cpp
UTF-8
2,043
3.5625
4
[ "Unlicense" ]
permissive
#include <iostream> using namespace std; bool getBit(unsigned int n, int i) { return (n & (1 << i)) > 0; } bool isPowerOfTwo(int x) { return (x & (x - 1)) == 0; } int getFirstRightBitPosition(int n) { int position = 1; while (!getBit(n, position)) { position++; } return position; ...
true
15803eb2115d12267e41440b6c26b5ba5b2848f0
C++
jinsoojeong/ServerFrameworkProject2
/Server/ServerLibrary/Database/Database.h
UHC
534
2.625
3
[]
no_license
#pragma once // DB ۾ Ѱϴ Ŭ // #include "stdafx.h" typedef enum { DB_WAIT, DB_READY, DB_RUNNING, }DB_STATE; class Database { public: Database() {} virtual ~Database() {} virtual bool Connect(const WCHAR *serverName, const WCHAR *dbName, const WCHAR *id, const WCHAR *password) = 0; virtual bool...
true
0d88cf253729b1e3c0b1e5de10353481b0702e94
C++
KautzA/TeensyWalker
/HexapodCodeV4/g_servocontrol.ino
UTF-8
1,788
2.671875
3
[]
no_license
//servocontrol //map values to the servos, test for boundries and write to servos void DXLServoMap(){ for (int i = 0; i < NUM_LEGS; i++){//Iterate through the legs for (int j = 0; j < NUM_SERVOS_PER_LEG; j++){//Iterate through the servos on each leg int degree_angle = leg_dynamixels[i][j] * (180.0/PI); ...
true
a3f45a8f088cd30feb4596ff221f4b0e1a7aad42
C++
anirudhtopiwala/Flycycle
/flight_simulator/flight_simulator.ino
UTF-8
1,833
3.09375
3
[ "BSD-3-Clause" ]
permissive
/* Sense the Tilting action of an rotary potentiometer and outputs the data on the Serial port (USB). (c) Anthony Kelly, 2013 */ /* A0 : X-Axis A1 : Y-Axis A2 : Z-Axis */ int pitchpin = A0,rollpin= A1; int controllerpitch = A4; int controllerroll = A5; int pitchavg, rollavg; int pitchtilt, rolltilt; int l1 = 6; int l...
true
4ccad61b1d0f7882e23fc292e00dfb1791d506dd
C++
OOP2019lab/lab11-180915hassanAli
/personImp.cpp
UTF-8
678
3.8125
4
[]
no_license
#include "person.h" #include <iostream> person::person(std::string first_name,std::string last_name,std::string age):first_name(first_name),last_name(last_name),age(age){ std::cout<<"constructor of person called"<<std::endl; } person::~person(){ std::cout<<"destructor of person called"<<std::endl; } std...
true
586d77b841479d532abf33555d524d4300cace58
C++
htraut/css343assingment4
/customer.h
UTF-8
909
2.890625
3
[]
no_license
#ifndef CUSTOMER_H #define CUSTOMER_H #include <string> #include <queue> #include "transaction.h" #include "history.h" #include "borrow.h" #include "return.h" #include <iostream> using namespace std; //--------------------------------------------------------------------------- // Customer class: Customers are used to ...
true