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
2428972f73d42fd2acf52e40e4f95f5ab8762a9a
C++
lacrymose/3bem
/unit_tests/test_nearfield_operator.cpp
UTF-8
5,000
2.671875
3
[]
no_license
#include "catch.hpp" #include "nearfield_operator.h" #include "continuity_builder.h" #include "gauss_quad.h" #include "laplace_kernels.h" #include "elastic_kernels.h" #include "mesh_gen.h" #include "integral_operator.h" #include "gte_wrapper.h" #include "util.h" //TODO: remove #include <iomanip> using namespace tbem;...
true
8cf479b64ea603b3f284b3e522b2f8614eb2e5e8
C++
moevm/oop
/8304/Mukhin_Aleksandr/lab4/units/government/Government.h
UTF-8
263
2.578125
3
[]
no_license
#ifndef LAB2_GOVERNMENT_H #define LAB2_GOVERNMENT_H #include "Unit.h" class Government : public Unit { public: Government() = default; Government(int def, int att, int intell) : Unit(def, att, intell) {} void greeting() const override; }; #endif
true
41d7434acaa2153d8eb52c563cbf018235305ef0
C++
LeandroES/EV1-E2
/EV1-E2.cpp
UTF-8
4,054
3.578125
4
[]
no_license
// EV1-E2.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <stdio.h> #include<time.h> #include<stdlib.h> int main() { int x, y, x2, y2; while (true) { srand(time(0)); std::cout << "<<Suma de los elementos de las Colum...
true
31131fdeb5c38aac02bac9bda3643f0266048081
C++
arvind-murty/CS135
/assignment4/Murty_Arvind_DA04__s4.cpp
UTF-8
7,046
3.5
4
[]
no_license
// Header Files #include "formatted_cmdline_io_v11.h" #include <cmath> using namespace std; // Global Constant Definitions const int LOWER_COOR = 0.00; const int HIGHER_COOR = 99.99; // Global Function Prototypes // Prints the title // Inputs: none // Outputs: none void printTitle(); // Gets a coordinate ...
true
cb59fc03b142816845ba5a1714799189fa36330c
C++
Rohith-Rao/DSA-codes
/linkedlist/ckeck l2 in l1 linkedlist.cpp
UTF-8
927
3.328125
3
[]
no_license
#include <iostream> using namespace std; struct node { int data; node *next; }; typedef struct node *lptr; void print(lptr p) { if (p==NULL) { cout<<endl; return; } cout<<p->data<<" "; print(p->next); } void addend(lptr &p,int n) { lptr T; T=new(node); T->data=n; T->next=NULL; if(p==NULL) { p...
true
8fb7e006629a7dbcab3d3f5f8134b6f548398316
C++
nealwu/UVa
/volume113/11343 - Isolated Segments.cpp
UTF-8
1,798
2.921875
3
[]
no_license
#include <stdio.h> #define min(x, y) ((x) < (y) ? (x) : (y)) #define max(x, y) ((x) > (y) ? (x) : (y)) struct Point { double x, y; }; struct Segment { Point s, t; }; double in(double a, double b, double c) { return c >= a && c <= b; } int onLine(Segment a, Point c) { static double minx, maxx, miny, maxy...
true
1dfdac9b2214c0001906319c47870790d1217988
C++
GeekBand/GeekBand-CPP-1501-Homework
/G2015010236/CPP_Homework_Second/shapes.h
ISO-8859-1
2,324
3.765625
4
[]
no_license
#ifndef SHAPES_H #define SHAPES_H #include <iostream> class Shape; class Shape { public: Shape(int no = 0) : no_(no) {} virtual ~Shape() {} virtual int getArea() const = 0; // pure virtual function virtual void outputInfo() const = 0; // pure virtual function int no() const { return no_;} private: ...
true
04f464174689f40968049e5991dde6e4b8ff04b3
C++
fahmiab11/STD-Final-Task
/listMataKuliah.cpp
UTF-8
2,726
3.21875
3
[ "MIT" ]
permissive
#include "listMataKuliah.h" void createListMataKuliah(listMataKuliah & L) { first(L) = NULL; last(L) = NULL; } addressMataKuliah alokasiMataKuliah(infotypeMataKuliah x) { addressMataKuliah P = new elmListMataKuliah; info(P) = x; next(P) = NULL; prev(P) = NULL; return P; } void insertLast(listMataKuliah...
true
b156bbc6af1df8022747575b75e3563fb2fd5be3
C++
pminardo/mojavegl-palm
/project/palm_tapwave/Src/blitter/BL_pixelutil.h
UTF-8
12,850
2.71875
3
[]
no_license
/************************************************************** * Copyright (c) 2006 PDA Performance, Inc. * All rights reserved. **************************************************************/ #ifndef __BL_PIXELUTIL_H_ #define __BL_PIXELUTIL_H_ /************************************************************** *...
true
f6243d59c30e4832fe85db5ac0e4a037b56239c8
C++
marcinstelmaszyk/CLionProjects
/Udemy/02_Learn_Advanced_Cpp_Programming/08_C++11/For_Loop/main.cpp
UTF-8
183
3.0625
3
[]
no_license
#include <iostream> using namespace std; int main() { auto texts = {"one", "two", "three"}; for (auto text: texts) std::cout << text << std::endl; return 0; }
true
49cdd03c68960296669a39b1164fa2b8c9988dd6
C++
mouchtaris/fictional_disco
/test/Tpf/test_def.cpp
UTF-8
2,757
2.515625
3
[]
no_license
#include "test_def.h" #include "fixture/tpfs.h" #include "Tpf/Id.h" #include "Tpf/return_.h" #include <iostream> #include <type_traits> #include <tuple> #define FAIL "Test failure." using namespace test::Tpf; namespace { constexpr auto nl = "\n"; namespace t_def_1_tuplize { struct a; usi...
true
bc7d2a4ce28a23c388b8b33c14795c902a84ea3f
C++
CompilerLuke/NextEngine
/NextCore/include/core/memory/allocator.h
UTF-8
2,278
3
3
[ "MIT" ]
permissive
#pragma once #include <cstddef> #include "core/core.h" #include <string.h> #include <assert.h> struct CORE_API Allocator { virtual void* allocate(std::size_t) { return NULL; }; virtual void deallocate(void* ptr) {}; }; struct CORE_API BlockAllocator : Allocator { static constexpr int block_size = 16000; static ...
true
e85dc4ce549586716298fb29aca111fa05164754
C++
Zhangh2018/yangyang_2d_avm
/7.pinjie/2.ipm/LDWS/LDWS.h
UTF-8
1,422
2.828125
3
[]
no_license
#ifndef __LDWS_H__ #define __LDWS_H__ #include <opencv2/opencv.hpp> #include"ROI.h" #include"ImageTransformation.h" #include"LaneAnalysis.h" using namespace cv; using namespace std; /* * Project: Lane Departure Warning System (LDWS) * * File: LDWS.cpp * * Contents: The LDWS class stores the attributes need...
true
b7a2aa043972d64e86ea580ea479b56d38e94b94
C++
Spencer-Stice/UCLA-CS32
/Projects/Project4/winskel/Wurd/Wurd/StudentTextEditor.h
UTF-8
1,055
2.96875
3
[]
no_license
#ifndef STUDENTTEXTEDITOR_H_ #define STUDENTTEXTEDITOR_H_ #include "TextEditor.h" #include "Undo.h" #include <list> #include <map> using namespace std; class StudentTextEditor : public TextEditor { public: StudentTextEditor(Undo* undo); ~StudentTextEditor(); bool load(std::string file); bool save(std::string f...
true
8a6e8503f19879144cdb78cabefb4ed58383b41d
C++
LMurphy186232/Core_Model
/Behaviors/Windstorm.h
UTF-8
10,129
2.921875
3
[]
no_license
//--------------------------------------------------------------------------- // Windstorm //--------------------------------------------------------------------------- #if !defined(Windstorm_H) #define Windstorm_H #include "BehaviorBase.h" class clGrid; /** * Windstorm version 2.0. * * Windstorm creates storm eve...
true
3cf6086ac1c3d99c45ff59e35df86d098a6a4f9a
C++
J-Jun/OOP244-CPP
/WS10/lab/cstring.cpp
UTF-8
682
2.734375
3
[]
no_license
//============================================== // Name: Jason Jun // Student Number: 126 683 200 // Email: jjun10@myseneca.ca // Section: OOP244 NCC // Workshop: Workshop 7 - LAB //============================================== #include "cstring.h" namespace sdds { void s...
true
14a42270d27f9cf413127b172057df34780b646a
C++
GitLeeRepo/Cpp_ProgrammingNotes
/basics/datatype_ex1.cpp
UTF-8
3,369
3.53125
4
[]
no_license
// datatypes_ex1 // // Illustrates the various data types and their limits in C++ #include <iostream> #include <iomanip> #include <climits> #include <cfloat> #include <locale> int main() { using namespace std; bool isTrue = true; signed char myCharMin = CHAR_MIN; signed char myCharMax = CHAR_MAX; ...
true
be3c019f7ac5787a3cbc13730da1df93cf697fbe
C++
axrdiv/USACO
/Chapter_5/Section_5.4/Character_Recognition/Character_Recognition.cpp
UTF-8
4,434
2.875
3
[]
no_license
/* ID: axrdiv1 PROG: charrec LANG: C++ */ #include<fstream> #include<iostream> #include<vector> #include<string> #include<stack> using namespace std; ofstream fout("charrec.out"); ifstream fin("charrec.in"); ifstream fontin("font.in"); int read(istream& is, vector<string>& v) { int N; is >> N; string s; ...
true
8ac395312d4e1d6fb3ff50367836c4d3f29cbbd4
C++
jeffphi/advent-of-code-2018
/jeff/day-05/part-2.cpp
UTF-8
1,615
3.1875
3
[ "MIT" ]
permissive
#include <iostream> #include <vector> #include <stack> #include <string> #include "jefflib.h" #include <algorithm> using namespace std; //using namespace boost; // Ugh, forward declaring a thing... int getPolymerLength(string input); int main() { vector<string> vect; if(GetStringInput(vect)){ cout <...
true
58908c018f40fec0504a2c533260786f3888143f
C++
zhu-he/ACM-Source
/CDOJ/Contest/54/C.cpp
UTF-8
742
2.796875
3
[]
no_license
#include <cstdio> long long C(long long x, long long y) { long long ans = 1; for (int i = 1; i <= x; ++i) { ans *= y - i + 1; ans /= i; } return ans; } int F(long long x,long long y) { int tot=0; while(x%y==0) { tot++; x=x/y; } return tot; } int main() { long long t, m; /...
true
c43a52d4c25adc855c75f2c774c185fd3f4020f5
C++
appsmonkey/air.nodemcu.full
/lib/Control/RGB_LED/RGB_LED.cpp
UTF-8
2,136
3.203125
3
[ "Apache-2.0" ]
permissive
#include <RGB_LED.h> RGB_LED::RGB_LED(int red, int green, int blue) { pin.red = red; pin.green = green; pin.blue = blue; // listen = "air aqi range"; listen = "AIR_AQI_RANGE"; // Turn it on pinMode(pin.red, OUTPUT); pinMode(pin.green, OUTPUT); pinMode(pin.blue, OUTPUT); co...
true
d9278909e37d81f140b40095965b57c59c6e56bb
C++
shang-lin/pacman
/final/ServerGameboard.h
UTF-8
1,810
2.71875
3
[]
no_license
#ifndef _SERVERGAMEBOARD_H_ #define _SERVERGAMEBOARD_H_ /* This class contains the server's representation of the level and everything in it. GameServer gets information from this class, makes the necessary decisions, and updates this class accordingly. */ class ServerGameboard; class Level; // The includes for the ...
true
078ec3021effae2c73241571848eb5c6664155f9
C++
dltech-xyz/WangDao-DataStructure
/经典算法练习题/L13调整数组顺序使得奇数在偶数前面.cpp
UTF-8
937
3.859375
4
[ "Apache-2.0" ]
permissive
// // Created by 安炳旭 on 2020-01-13. // #include <iostream> #include <vector> using namespace std; void reOrderArray(vector<int> &array) { //算法本质:插入排序 --> 将奇数插入到偶数前面 for (int i = 1; i < array.size(); ++i) { //从第二个元素开始比较 若是奇数则向前移动 int temp = array[i];//保存第i个位置应该插入到数 int j = i;//使用临时遍历j用...
true
4322370af8d87b47bafa74ab9cd1d2a0df7b82cb
C++
wolwolton/mps
/src/export.cpp
UTF-8
3,086
2.5625
3
[]
no_license
#include <iostream> #include <fstream> #include <memory> #include <vector> #include "environment.h" #include "particle.h" #include "export.h" int Export::exportPara(const std::string name, const std::vector<std::unique_ptr<Particle>>& pcls){ std::ofstream ofs(name); if (!ofs) { ofs.close(); ...
true
826e2a9f981e074e9545a24b19dbc4c8a3f451aa
C++
bishwajit1998/interview-practice
/array.cpp
UTF-8
499
2.984375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define MAX 10 int findValue(int arr[], int n) { int ans = 0; for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) ans = max(ans, abs(arr[i] - arr[j]) + abs(i - j)); return ans; } int main() { int t; cin...
true
db4152488330458189b2a1fcafbff61e1abf57eb
C++
LappenX/neo
/packages/neo/src/util/Exception.h
UTF-8
679
3.25
3
[]
no_license
#ifndef NEO_EXCEPTION_H #define NEO_EXCEPTION_H #include <string> #define RETHROW(CATCH, THROW, ...) \ try \ { \ __VA_ARGS__; \ } \ catch (const CATCH& e) \ { \ throw THROW(e); \ } class Exception : public std::exception { public: Exception(std::string message) : m_message(message) { } ...
true
6a62ce146fd598aaab568b105ffce29ed70d1b3f
C++
Abiduddin/Competitive-Programming-Codes
/C++/tuto/15.2.cpp
UTF-8
333
3.296875
3
[]
no_license
#include <iostream> using namespace std; class sum { int a,b; public: void get(int i,int j) { a=i; b=j; } void show(void) { cout<<"sum is "<<a+b<<endl; } }; int main() { sum ob1,ob2; ob1.get(11,23); ob1.show(); ob2=ob1; ob2.show(); ...
true
a4031bfe859d5c23601d7158dc6623251d724553
C++
simran279/100-days-of-DSA
/binary trees/verticalTraversal2.cpp
UTF-8
861
3.15625
3
[]
no_license
#include "binaryTree.h" #include<bits/stdc++.h> #include<map> #include<vector> //O(n) void getVerticalOrder(BinaryTreeNode<int>* root, int hd, map<int, vector<int> > &m){ if(root == NULL) return; m[hd].push_back(root->data); getVerticalOrder(root->left, hd-1, m); getVerticalOrder(root->right, hd...
true
69c31e8ffffffa074506e0ed8b692cf8a217312f
C++
sandeshghimire/CPPAPIDESIGN
/C++/c01_code/vectortest/vectortest3.cpp
UTF-8
282
3.140625
3
[]
no_license
#include <string> #include <vector> #include <iostream> #include <iterator> using namespace std; template<typename T> T value(T a) { std::cout << a * a << std::endl; return a; } int main() { std::cout << (value(10)) << std::endl; return 0; }
true
4db2422c52bfb1a0c1308895256638cfc0a583ad
C++
Mauzey/UF3366-FdSc-Software-Development
/SDFD212/Robotic-Drawing-Arm/main.ino
UTF-8
2,286
3.375
3
[]
no_license
#include <Servo.h> // Arm lengths #define length1 105 #define length2 121 #define pi 3.141592 #define moveDelay 50 void inverseK(int xPos, yPos); // Position of origin X/Y (Starting at 0, 0 results in the arm not working properly) float x = 40, y = 120; int ang; // Used calculating how to draw circles // Sq...
true
cb32b055b2fbdc6011f7418cac18c5c230a08783
C++
bhardwaj75/Campus-Placement-Preparation
/priority_queue_with_comp.cpp
UTF-8
605
3.140625
3
[ "Unlicense" ]
permissive
#include <bits/stdc++.h> using namespace std; // for set,map and heap we use function call operator loading //6,4,3,2 //Last element in container will be the top element of heap class custom{ public: bool operator()(const int &a, const int &b){ if(a>b)return true; // Min heap comparision beca...
true
8132685ff05a6da9385548e2880cd27063fc46f9
C++
richardscollin/kraken
/deprecated_compiler/include/Table.h
UTF-8
1,012
2.515625
3
[ "MIT" ]
permissive
#include <fstream> #include <string> #include <utility> #include "util.h" #include "ParseRule.h" #include "ParseAction.h" #include "Symbol.h" #include "State.h" #ifndef TABLE_H #define TABLE_H class Table { public: Table(); ~Table(); void exportTable(std::ofstream &file); void importTable(char* tableData);...
true
a635bb81715240af17a1d2ee750f51a3c6200d7d
C++
sonyeo/GSP
/Homework4/EduServer_IOCP/SyncExecutable.h
UHC
1,603
2.875
3
[ "MIT" ]
permissive
#pragma once #include "TypeTraits.h" #include "FastSpinlock.h" #include "Timer.h" class SyncExecutable : public std::enable_shared_from_this<SyncExecutable> { public: SyncExecutable() : mLock(LO_BUSINESS_CLASS) {} virtual ~SyncExecutable() {} template <class R, class T, class... Args> R DoSync(R...
true
408ba296104c3c7d61b95f66896c70dc016fe89f
C++
BaeJuneHyuck/BaekJune
/Baekjoon/BJ2839.cpp
UHC
643
3.34375
3
[]
no_license
/* // 2839 // 3,5ųα׷ -> // ϸ ->-1 */ #include <iostream> using namespace std; int getSugar(int suga) { int minCup = -1; if (suga % 5 == 0) { return minCup = suga / 5; }else if ((suga % 3) == 0) { minCup = suga / 3; } int sugar5 = 0; while (suga > 0) { if (suga % 3 == 0) { minCup = sugar5 + suga/3...
true
83c262db97ec6cb87672b6395d89edac9102ee0a
C++
JayOfferdahl/eecs560-DataStructures
/Labs/lab1/Node.h
UTF-8
708
3.171875
3
[]
no_license
//*********************************************** // // Author: Jay Offerdahl // Class: EECS 560 (Data Structures) // Lab: Tues. 11a - 12:50p // Lab #: 1 // //*********************************************** #ifndef NODE_H #define NODE_H class Node { public: // Create a Node with value value Node(int); // Return ...
true
89822ddbfdaa14885c3bc5419cc0d9bb6f86ba95
C++
lfresco/Programming_Principles
/CH03/11.cc
UTF-8
1,685
3.921875
4
[]
no_license
#include <iostream> void information_output(int five_cents, int ten_cents, int twenty_cents, int fifty_cents); double from_coins_to_euros(int five_cents, int ten_cents, int twenty_cents, int fifty_cents); int main(int argv, char * argc[]){ std::cout << "How many 5 cents coins do you have?" << std::endl; int five_ce...
true
4e38cbac2cccb8ddb27f08c47a782b6e6aeed7c7
C++
stefankurz1/pepper_emotion
/emotional_system/theatre_bot/src/WorldModelDescription/TheatrePlaces.h
UTF-8
1,118
2.828125
3
[]
no_license
/* * TheatrePlaces.h * * Created on: Mar 23, 2015 * Author: julian */ #ifndef THEATREPLACES_H_ #define THEATREPLACES_H_ class TheatrePlaces { public: TheatrePlaces(); virtual ~TheatrePlaces(); void setStageInformation(float maximum_lenght_x, float maximum_lenght_y, float number_rectangles_x, float numbe...
true
f54e888a08d1ef577f274b5af247c6150e0c14cf
C++
anilaksu/Cpp-Codes-and-Practices
/StaticVariableTrials/StaticVariables/StaticVariables/maincpp.cpp
UTF-8
1,713
3.40625
3
[]
no_license
#include<iostream> #include"MathClass.h" using namespace std; class Game { public: Game(int a) { this->a = a; } void showInfo() const { cout << "Game Info: " << endl; cout << this->a << endl; } private: int a; friend void getGameInfo(const Game& game); }; class Gamer { public: static int gamers; // E...
true
dbd36602f01ce28fcb43a63da1612ac1d9d7aa7b
C++
PIKACHUIM/Pika-Cpp-App-Structs
/作业提交/第三章/3-2-链表实现队列/main.cpp
UTF-8
482
3.421875
3
[]
no_license
#include "fifo.h" #include <iostream> using namespace std; int main(void) { fifo<int>test; cout<<endl<<"当前队列长度:"<<test.getl()<<endl; cout<<"入队元素:"; for(int loop=1;loop<=10;loop++){ test.push(loop);cout<<loop<<" ";} cout<<endl<<"当前队列长度:"<<test.getl()<<endl; cout<<"出队元素:"; for(int loo...
true
6ce6240eb00ddcc1b97148a52347b77c81a2b387
C++
fredsonjr/exercicios-prog
/exercicios-download/Prog/Lista matriz 16I05/ex5..cpp
UTF-8
926
2.5625
3
[ "MIT" ]
permissive
#include <iostream> #include <stdlib.h> using namespace std; int main() { int mat[20][10], soma=0, somat=0, resul=0, vet[20],matr[20][10]; for(int i=0; i<20; i++) { for(int j=0; j<10; j++) { mat[i][j]=rand()%10; } } for(int i=0; i<20; i++) { cout << ...
true
35112ce52eb78cdf4a3e63702dc12bd7e5a473bc
C++
jooo000hn/cetech
/engine/include/cetech/celib/mat44f.inl
UTF-8
10,709
2.578125
3
[ "CC0-1.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#ifndef CETECH_MAT44F_H #define CETECH_MAT44F_H //============================================================================== // Includes //============================================================================== #include <string.h> #include "cetech/kernel/macros.h" #include "fmath.inl" #include "vec4f.inl...
true
fa684a2b40a04f4b2c68f6665d9dae2becb88f24
C++
Caturra000/vsJSON
/src/Json.h
UTF-8
6,198
3.078125
3
[]
no_license
#ifndef __JSON_H__ #define __JSON_H__ #include <bits/stdc++.h> #include "internal/Variant.h" #include "internal/TypeCompat.h" #include "JsonValue.h" namespace vsjson { class Json { public: // static template <typename ...Args> static JsonValue array(Args &&...elems); public: Json(): _value(ObjectImpl()) {...
true
1c039a353371953681170378fe1096713cca327c
C++
Population-image/Population
/other/tutorial/iterator_matrix.cpp
UTF-8
2,620
2.953125
3
[ "MIT" ]
permissive
#include"Population.h"//Single header using namespace pop;//Population namespace template<typename PixelType> void fill1(MatN<2,PixelType> & m, PixelType value){ for(unsigned int i =0;i<m.sizeI();i++) for(unsigned int j =0;j<m.sizeJ();j++) m(i,j)=value; } template<typename PixelType> void fill2...
true
73637ed17e5aa7c18c17dbb4e3dc151de88bb1d2
C++
Chansla/Training
/wps/ATeacherFiles/8.03/Samrt_home课件和代码/QJson/QJson/widget.cpp
UTF-8
3,174
2.828125
3
[]
no_license
#include "widget.h" #include "ui_widget.h" Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); json_package(); qDebug() << "write data is successful!"; json_analysis(); } Widget::~Widget() { delete ui; } void Widget::json_package() { //1.封装JSON数据...
true
8b00e6f36b299411e5de3e28ecd43c7edd965ef9
C++
sridharbgr/PowerControl
/PowerControl.ino
UTF-8
4,329
2.578125
3
[]
no_license
/*Header file include */ #include "Func_Init.h" #include "Voltage_Read_Func.h" #include "Current_Read_Func.h" #include <LiquidCrystal.h> /*********************************************************************/ /* Enum declarariom */ enum powerstatus { Highhigh, Lowlow, Normal }; enum p...
true
bab914ab6f4f50aeebbefb6c930d1f257af109ce
C++
koendv/vacuum-pump-controller
/arduino/vacuum_pump/console.cpp
UTF-8
8,911
2.65625
3
[]
no_license
#include "console.h" #include "autotune.h" #include "bytesfree.h" #include "display.h" #include "loopstats.h" #include "motor.h" #include "pidctrl.h" #include "sensor.h" #include "settings.h" #include "uptime.h" #include "watchdog.h" #include <Arduino.h> #define MAXCMDLEN 64 /* console command line interpreter. * A ...
true
c702c2ad731a2f6fc4ed552b382fe19fe16cd700
C++
felax/INF1010_TD2
/Client.cpp
UTF-8
4,915
2.984375
3
[]
no_license
/******************************************** * Titre: Travail pratique #2 - Client.cpp * Date: 25 janvier 2018 * Auteur: Mohammed Esseddik BENYAHIA & Timothée CHAUVIN * Modifié par: Nezha Zahri(1786454) et Félix Montminy(1903263) * FICHIER: TP2 * DATE: 11/02/2018 * DESCRIPTION: Implémentation de la c...
true
39c6b480717682dfe2cb38bbda010099dd7ee4e4
C++
salmanshaikh733/Debian-File-Manager
/mydiff.cpp
UTF-8
1,003
2.875
3
[]
no_license
// // Created by salman on 2019-10-03. // // // Created by salman on 2019-10-03. // #include<iostream> #include<grp.h> #include<vector> #include<pwd.h> #include<unistd.h> #include<time.h> #include <fstream> #include "FileManager.h" int main(int argc, char *argv[]) { if(argc==3){ //get the input s...
true
61c8cce4a0a13feac5757a080bc1fb258411e42c
C++
yoonho0922/Algorithm
/boj/C++/baek2588.cpp
UTF-8
195
2.578125
3
[]
no_license
#include<iostream> #include<vector> using namespace std; int main(){ int A,B; cin>>A>>B; cout<<A*(B%10)<<'\n'; cout<<A*(B/10%10)<<'\n'; cout<<A*(B/100)<<'\n'; cout<<A*B; return 0; }
true
5a53126495624ce777ee1b6e63ea30f3ed677ae3
C++
Mayureshdindorkar/Engg-SY-DSA-Assignments
/4_stringoprations.cpp
UTF-8
4,829
3.5
4
[]
no_license
#include<iostream> using namespace std; class str { private:char s1[50],s2[50],s3[50]; public:int i,j,k,h,q; void strlen(char *s1) { for(i=0;s1[i]!='\0';i++); cout<<" Length of string is :"<<i; } void strconcat(char *s1,char *s2) { for(i=0;s1[i]!='\0';...
true
b28aeb23eeab8ef341ec2a7d1f7a2e102114c69d
C++
leinok/Eigen_related
/test_eigen.cpp
UTF-8
1,716
2.59375
3
[]
no_license
#include <iostream> #include <typeinfo> #include <string> #include "softmax_layer.hpp" #include "fully_connected_layer.hpp" #include "activation_layer.hpp" int main() { int batch_size{4}, input_size{3}, output_size{2}; Eigen::MatrixXf inputs(batch_size, input_size); inputs << 1, -2, 3, 4, -5, ...
true
5682f2619ebe355715f74e2f0e957c8acb994c51
C++
MijaelTola/icpc
/vjudge/cuadp/B.cpp
UTF-8
840
2.6875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while(t--) { int n; cin >> n; vector<int> a,b; for (int i = 0; i < n; ++i) { int x; cin >> x; if(x & 1) a.push_back...
true
29854e3b4a11e920b69ec4ce4bf666a802edbf32
C++
dream365/Algorithm-Study
/DP/AS_NUMB3RS/main.cpp
UTF-8
2,079
2.78125
3
[]
no_license
#include <stdio.h> #include <vector> using namespace std; int main() { int c; scanf("%d", &c); for(int i = 0; i < c; i++) { int n, d, p, t; scanf("%d %d %d", &n, &d, &p); vector<vector<int>> A(n); vector<vector<double>> probs(d + 1); vector<vector<bool>> validVils...
true
a8bc7738363d058d8dbe5e14e63cf677235c7ed9
C++
Xiao-Jian/ACM-Training
/TJU数学-1/G - 找新朋友.cpp
UTF-8
494
2.90625
3
[]
no_license
#include <cstdio> #include <iostream> #define Max 1000001 int euler[Max]; void Init(){ euler[1] = 1; for( int i = 2; i < Max; i ++ ) euler[i] = i; for( int i = 2; i < Max; i ++ ) if( euler[i] == i ) for( int j = i; j < Max; j += i ) euler[j] = euler[j] / i * ( i -...
true
741f3dbd089df5baebbe34f139989dc89d37d1c9
C++
bestK1ngArthur/IU5
/Term 1/Basics of programming/Exam/Task13/Source13.cpp
UTF-8
865
3.484375
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; int main() { int K; cout << "Task 13" << endl; cout << "Enter K: "; cin >> K; cout << "Enter array D: "; int *arrayD = new int[K]; int *arrayA = new int[K]; int *arrayB = new int[K]; int average = 0; for (int i = 0; i < K; i++) { cin >> arrayD[i]; average...
true
3ef527b7a88c97292e56c9ab7cb98d25873c205a
C++
Siriayanur/DSA
/mediumAndHard/inorderIterative.cpp
UTF-8
513
3.109375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node *left; Node *right; }; vector<int> inOrder(Node *root) { //code here vector<int> result; stack<Node *> st; Node *temp = root; while (temp || !st.empty()) { while (temp != NULL) { ...
true
5f590ea229339f6c1de278bfbf5b69c921a917cd
C++
e-noyau/wordclock
/libraries/ClockHardware/src/LDRReader.cpp
UTF-8
658
2.828125
3
[ "MIT" ]
permissive
#include "Arduino.h" #include "LDRReader.h" #include "logging.h" LDRReader::LDRReader(int pinNumber, float reactionSpeed) : _pin(pinNumber), _reactionSpeed(reactionSpeed) { DCHECK(reactionSpeed <= 1.0, "Too much"); DCHECK(reactionSpeed > 0, "Not enough"); } void LDRReader::setup() { pinMode(_pin, INPUT); _...
true
0f2078d7f30ba826a52deba9df27ced2a3c391bb
C++
jabraham17/StackMachine
/src/memory.h
UTF-8
2,341
2.578125
3
[]
no_license
#ifndef __MEMORY_H__ #define __MEMORY_H__ #include <stdlib.h> #include <stdint.h> #include <map> #include "stringhelper.h" #include <exception> #include <vector> #include <sstream> #include <iomanip> #include <iostream> #if defined(__i386__) || defined(__x86_64__) #include <immintrin.h> #if defined(__AVX512F__) #...
true
4df8b589fd640e120d301558ede46b8b43f78023
C++
ningenMe/compro-library
/non-verified/Maximum_Segment_Sum.cpp
UTF-8
316
2.546875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; //Maximum Segment Sum O(N) template<class T> T Maximum_Segment_Sum(const vector<T> & ar, T inf) { T res = -inf, sum = 0; for (int i = 0; i < ar.size(); ++i) { sum = max(sum + ar[i], ar[i]); res = max(res, sum); } return res; } //verify
true
f00ccab6ca0bbcd7b2fc6c47ab802e3dd0d53e76
C++
KausBoss/Competitive-Codes
/LongestCommonSubSequence.cpp
UTF-8
857
2.703125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define ll long long string memo[200][200]; bool comp(string a, string b){ return a.length() < b.length(); } string LCS(int i, int j, string s1, string s2){ //base case if(i==s1.length() || j==s2.length()){ return ""; } //recusrive case if(!me...
true
116c0afd46e052cf3ddc4b01355c2b13cc149abf
C++
EthanITA/GOP
/Utils/Colors.h
UTF-8
882
2.6875
3
[]
no_license
// // Created by Marco on 30/05/2018. // #ifndef GOP_COLORS_H #define GOP_COLORS_H #include <string> /* foreground background black 30 40 red 31 41 green 32 42 yellow 33 43 blue 34 44 magenta 35 45 cyan 36 ...
true
9f1623959b0761b73cf8251c574372dcd462768a
C++
nichoal/apollo
/modules/e2e/online_system/px2_camera_image/src/Checks.hpp
UTF-8
2,341
2.546875
3
[ "Apache-2.0" ]
permissive
#ifndef SAMPLES_COMMON_CHECKS_HPP__ #define SAMPLES_COMMON_CHECKS_HPP__ #include <dw/gl/GL.h> #include <cuda_runtime.h> #include <iostream> #include <string> #include <stdexcept> //------------------------------------------------------------------------------ // Functions //-----------------------------------------...
true
8334102dcc59a77a6f9978816855f8f9e22fee92
C++
Dlucky2212/Ejercicio-1
/main.cpp
UTF-8
221
3.09375
3
[]
no_license
#include <iostream> using namespace std; //1 Transformar de millas a kilometros float trans(int milla){ float kilo; kilo = milla * 1.60934; return kilo; } int main() { int a; cin >> a; cout << trans(a); }
true
1d3282f376a94a94862dabe12f1f31e151bada64
C++
ahmedamsoliman-1/NanoDegreeProgrammLessons
/2-ObjectOrientedProgramming-OOP/Lesson2-IntroTpOOP/Structs/AccessModifier.cpp
UTF-8
1,304
3.890625
4
[]
no_license
#include <cassert> #include <iostream> struct Date { public: //Date(){} Date(int a , int b , int c) { day = a; month = b; year = c; } private: int day{00}; int month{00}; int year{00}; public: //Accdssor - getter - get function - return a value int Day(...
true
dd30bf8bf677fde0dc400883963419b2487193d3
C++
cpa750/TermTwo
/C++/Lab 7/b1.cpp
UTF-8
966
3.640625
4
[]
no_license
#include <iostream> #include <random> #include <ctime> int getUserGuess(); int main() { std::srand(std::time(NULL)); bool correct {false}; int guesses {0}; const int num {rand() % 10}; // Getting a random number from 0 to 10 // TODO: seed random number while ( (guesses < 3) && !correct )...
true
1787656eef4f497bf01b840e3394b93e589bf1b2
C++
Sunil2120/Coding_questions
/DP/zero_square.cpp
UTF-8
1,082
3.015625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int solve(int** input,int row,int col) { int** output = new int*[row]; for(int i=0;i<row;i++) { output[i]=new int[col](); } // first col intialized for(int i=0;i<row;i++) { if(input[i][0] == 1) { output[i][0] = 0; } else if(input[i][0] == 0) { outpu...
true
95042c28d819fd16553b245fc851121b537ccb8e
C++
PolCorTs/NULL_Engine
/NULL Engine/Source/PathNode.cpp
UTF-8
530
2.578125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// ---------------------------------------------------- // Struct abstraction to deal with files and folders. // Employed by M_FileSystem. // ---------------------------------------------------- #include "VariableTypedefs.h" #include "PathNode.h" PathNode::PathNode() : path("") { } bool PathNode::IsLastFolder() co...
true
c2277fa62ad17a3216411df33c3bb30eeb82b508
C++
MechyX/EscapeEnemy
/button.cpp
UTF-8
1,099
3.09375
3
[]
no_license
#include "button.h" Button :: Button(std::string text, sf::Vector2f pos , sf::Vector2f size , sf::Font font){ textFont = font; graphicText.setFont(textFont); graphicText.setString(text); graphicText.setCharacterSize(50); graphicText.setStyle(sf::Text::Bold); graphicButton.setPositi...
true
1a11015739113f924da791dd7f321e9378930ef0
C++
alfredchavez/IPOO
/practica2/p5/5.cpp
UTF-8
333
2.84375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; vector<string>vec; void leer(){ ifstream archivo("doc1.txt"); string s; while(!archivo.eof()){ getline(archivo,s); vec.push_back(s); } archivo.close(); } int main(){ leer(); for(int i=0;i<vec.size();i++){ cout<<vec[i]<<endl; } ...
true
0563430714e2144d5f61f21817600ba81b0bae67
C++
martinmoene/martin-moene.blogspot.com
/How to fix VC6 template with overload/template-and-override-free.cpp
UTF-8
605
2.765625
3
[]
no_license
#include <iostream> //namespace vc6_detail { template <typename T> T foo( T t ) { return t; } //} // namespace a // //using namespace vc6_detail; struct S {}; struct Q {}; Q foo( S s ) { return Q(); } std::ostream & operator<<( std::ostream & os, Q const & ) { return os << "struct Q"; } ...
true
0686bddc80f92625ab8662d73e7526739c19e67e
C++
amith1893/parallel-iterative-solver
/poisson.cc
UTF-8
5,528
2.5625
3
[]
no_license
#include "poisson.h" #include <iostream> #include <cmath> #include <cassert> #include <sys/time.h> void get_rank_and_size(const MPI_Comm &comm, int &n, int &r) { MPI_Comm_size(comm, &n); MPI_Comm_rank(comm, &r); } void get_my_coord_bounds(const MPI_Comm &grid_comm, int r, int n, int coord_starts[], int coord_...
true
a8090ff8a24844618d6553dcb9dd9dc2ff3c5a66
C++
intel/MLSL
/src/pointer_checker.cpp
UTF-8
3,291
2.703125
3
[ "Intel", "Apache-2.0" ]
permissive
/* Copyright 2016-2018 Intel Corporation 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 agreed to in w...
true
9f68d923b43a4b72e5a151545dc0679d82ff8f5a
C++
Pr0gramWizard/Escape-TheGame-
/Escape/bloom/preBloomFBO.cpp
UTF-8
2,133
2.796875
3
[]
no_license
#include "preBloomFBO.hpp" PreBloomFBO::PreBloomFBO(GLuint pWidth, GLuint pHeight) { this->init(pWidth, pHeight); } PreBloomFBO::~PreBloomFBO() { } void PreBloomFBO::unbind() { glBindFramebuffer(GL_FRAMEBUFFER, 0); } void PreBloomFBO::bind() { glBindFramebuffer(GL_FRAMEBUFFER, mFBO); } GLuint PreBloomFBO::getC...
true
f847474cb7f35a7154bd42c799d1926d91cf307d
C++
hpsdy/c-plus
/6/625.cpp
UTF-8
318
2.859375
3
[]
no_license
#include<iostream> #include<typeinfo> using namespace std; int main(int argc,char * argv[]){ string str=""; while(true){ if(*argv!=0){ auto tmp = *argv++; cout<<"type:"<<typeid(tmp).name()<<endl; str += tmp; cout<<tmp<<endl; }else{ break; } } cout<<str<<endl; cout<<argc<<endl; return 0; }
true
f96108acd21a65dab097b3bb581841232e03b1f3
C++
abraxaslee/ACM-ICPC
/Fib.cpp
UTF-8
905
2.953125
3
[ "MIT" ]
permissive
#include <stdio.h> int Fib[5001][120] = {}; int top[5001] = {}; void BigAdd(int n){ int i; for(i=0 ;Fib[n-1][i] + Fib[n-2][i] > 0 ;++i){ Fib[n][i] += Fib[n-1][i] + Fib[n-2][i]; if(Fib[n][i] > 1000000000){ Fib[n][i+1] += Fib[n][i]/1000000000; Fib[n][i] %= 1000000000; } } while(Fib[n][i] >...
true
a0c00b18218f91af161121ffa8f8421d548c2aaf
C++
jamieyello/Input-Scripts
/ScriptExecutionExample/input_script.cpp
UTF-8
14,320
2.546875
3
[]
no_license
#pragma once #include "stdafx.h" #include "input_script.h" namespace InputScripts { InputScript::InputScript() { for (int i = 0; i < scope_limit; i++) { return_address[i] = 0; scope_instruction_type[i] = null_value; initial_function_reference[i] = 0; recursive_function_reference[i] = 0; } // Link input wit...
true
be7cc223ee1f00bab6d51d0f00255842f074c01c
C++
CJFulford/Modeling-Project
/Project/Lighting.cpp
UTF-8
1,183
2.890625
3
[]
no_license
#include "Header.h" #include <typeinfo> #include <string> using namespace glm; // assuming that the incoming normal is normalized vec3 Blinn_Phong(Ray *ray, float scalar, glm::vec3 normal, Object *object) { #define SELECTED_BRIGHTEN_AMOUNT 1.5f vec3 intersect = ray->applyScalar(scalar), viewRay = norm...
true
3a19de26c6cfb3d317b832229fb2c3af624a3499
C++
MatthewAChang/DnDMysteryDungeon
/World/Characters/Enemy.h
UTF-8
844
3.046875
3
[]
no_license
#ifndef ENEMY_H #define ENEMY_H #include "Character.h" class Armour; class Weapon; class Enemy: public Character { public: Enemy(int id, std::string name, std::vector<int> abilityScores, int health, std::shared_ptr<Armour> armour, std::shared_ptr<Weapon> weapon, ...
true
8a33a839971439ab41eb50750cd37453661c271f
C++
Osurac/EDA-FAL
/FAL/Ejercicio 3/main.cpp
UTF-8
2,117
3.203125
3
[]
no_license
// Nombre y apellidos del alumno //Álvaro Miguel Rodríguez Mateos // Usuario del juez de clase //A64 #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <algorithm> #include <string> #include <utility> // Explicación del algoritmo utilizado // Coste del algoritmo utilizado struct s...
true
fc3b669580f9039cbc04d60518660d030b7db3cc
C++
Gary-0111/RoughJudger
/main.cpp
UTF-8
14,664
2.609375
3
[]
no_license
/* * Author: Felix * * usage: * ./Judge [OPTIONS] * * options: * -l The solution's language [C|C++|Java] * -p Problem ID. * -t Time limit. Millisecond by default. * -m Memory limit. Kilo-Bytes by default. [K|M] */ #include <iostream> #include <unistd.h> #include ...
true
d87aafd90641462a1cb98cc2f8bbc583694cdaa5
C++
BenjaminDecoene/2DAE01_Decoene_Benjamin_GameEngine
/Game/Map.cpp
UTF-8
4,050
2.53125
3
[]
no_license
#include "pch.h" #include "Map.h" #include "Tile.h" #include "Scene.h" #include "Player.h" #include "Renderer.h" #include "Utils.h" #include "GameStats.h" #include "PhysxComponent.h" #include "SceneManager.h" Map::Map(Player* player) :m_Player(player) { LoadTiles(); AddTiles(); InitBorder(); AddObserver(&GameStat...
true
2a467019f30b5cb2a2509f59423f695b09ec797d
C++
euseibus/MACE
/src/Utility/Color.cpp
UTF-8
3,755
3.171875
3
[ "MIT" ]
permissive
/* The MIT License (MIT) Copyright (c) 2016 Liav Turkia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
true
91509b14984369b1117d17e560e073129d22a13e
C++
dr0pdb/competitive
/uva/Chapter 4/p11953 accepted.cpp
UTF-8
943
2.5625
3
[]
no_license
#include<bits/stdc++.h> #define ABS(a) ((a < 0) ? ((-1)*(a)) : (a)) using namespace std; int t,n,counter; char matrix[105][105]; int rowDir[]={0,1,0,-1}; int colDir[]={1,0,-1,0}; void dfs(int j,int k){ if(j<0 || j>=n || k<0 || k>=n || matrix[j][k]=='.'){ return; } matrix[j][k]='.'; for...
true
e756f35fdf4321866a924ad48edfa7f12c5a0c21
C++
Tygydyk/Boost
/main.cpp
UTF-8
980
2.859375
3
[]
no_license
#include "stdafx.h" #include <iostream> #include <boost/filesystem.hpp> using std::cout; using namespace boost::filesystem; int main(int argc, char* argv[]) { if (argc < 2) { cout << "Usage: tut3 path\n"; return 1; } path p (argv[1]); try { if (exists(p)) { if (is_regular_file(p)) cout << p << "...
true
0fe14b3914fe321c2301023786ae08c47159c9a5
C++
Extron/NLH
/Source/NLH/Public/GCClip.h
UTF-8
1,911
2.84375
3
[]
no_license
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "NLHGunComponent.h" #include "NLHGun.h" #include "GCClip.generated.h" /** * Clips are gun components that dictate the type of projectiles that are fired from a weapon and how many the weapon holds. */ UCLASS(Abstra...
true
a8f6feb446529fa26f7b56c7b2d1fd21a7b12c9d
C++
Harrix/Harrix-MathLibrary
/src/Генетические алгоритмы/HML_SelectItemOnProbability.cpp
UTF-8
1,317
3.015625
3
[ "MIT", "Apache-2.0" ]
permissive
int HML_SelectItemOnProbability(double *P, int VHML_N) { /* Функция выбирает случайно номер элемента из вектора, где вероятность выбора каждого элемента определяется значением в векторе P. Входные параметры: P - вектор вероятностей выбора каждого элемента, то есть его компоненты должны быть из отрезка [0;1], а сумма и...
true
0fca5629c10feaf948bbb3d47ede8538bef1346f
C++
drleq/CppDicom
/Dicom/dicom/io/part10/detail/OutputContext.h
UTF-8
4,828
2.703125
3
[ "MIT" ]
permissive
#pragma once #include "dicom/data/buffer.h" #include "dicom/data/encoded_string.h" #include "dicom/data/StringEncodingType.h" #include "dicom/data/VRType.h" #include "dicom/detail/intrinsic.h" #include "dicom/io/part10/detail/apply_endian.h" #include "dicom/io/part10/OutputStream.h" #include "dicom/io/TransferSyntax.h...
true
38d28e7aef8424f348f4ae3a9fa77b2ab5339af6
C++
ManhKhoa1507/CryptoFinalProject
/Code/test/tethys_store.cpp
UTF-8
5,773
2.640625
3
[]
no_license
#include "tethys_test_utils.hpp" #include <sse/schemes/tethys/encoders/encode_encrypt.hpp> #include <sse/schemes/tethys/encoders/encode_separate.hpp> #include <sse/schemes/tethys/tethys_store.hpp> #include <sse/schemes/tethys/tethys_store_builder.hpp> #include <gtest/gtest.h> namespace sse { namespace tethys { name...
true
ba77e75d4e0de9307c4f8bcd01e1f54a5af71612
C++
sehee0531/C-homework
/큰 실수 출력.cpp
UHC
286
3.09375
3
[]
no_license
#include<iostream> using namespace std; void main() { double big[5]; double max = big[0]; cout << "5 Ǽ Է϶>>"; for (int i = 0; i < 4; i++) { cin >> big[i]; if (big[i] > max) { max = big[i]; } } cout << " ū =" << max; }
true
ca6a5d30660fac3b3ce0442afbc5e9b581ba803a
C++
bithead942/Comm_Pad
/CommPad.ino
UTF-8
2,746
2.578125
3
[ "Apache-2.0" ]
permissive
/* X-Wing Pilot Comm Pad Lights by Bithead942 Arduino Pro Mini (5V, ATMega328, 16MHz) Adafruit LED Sequens turn on-off in sequence */ int i = 0; // the setup function runs once when you press reset or power the board void setup() { pinMode(2, OUTPUT); pinMode(4, OUTPUT); pinMode(6, OUTPUT); } // the...
true
2f34be69601255fa8e1e0c35b3d4202a110b292c
C++
lisongs1995/leetcode
/54_Spiral_matrix.cpp
UTF-8
1,092
2.765625
3
[]
no_license
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> ans; if (matrix.size() == 0 || matrix[0].size() == 0) return ans; int n = matrix.size(), m = matrix[0].size(); bool vis[n][m]; memset(vis, 0, sizeof(vis)); int cnt ...
true
8d9b46757fcf5ee6a54521f3a3a368dc44977497
C++
pchintalapudi/virtual-machine
/platform/memory.cpp
UTF-8
1,278
2.5625
3
[]
no_license
#include "memory.h" using namespace oops::platform; #include "platform_selector.h" #ifdef OOPS_COMPILE_FOR_WINDOWS #include <memoryapi.h> #include <sysinfoapi.h> std::optional<void*> oops::platform::reserve_virtual_memory(std::size_t amount) { auto result = VirtualAlloc(NULL, amount, MEM_RESERVE, PAGE_READWRIT...
true
61afe16d3900ac6104da0c920c2964412a96b980
C++
Caslship/cs354-assn4
/lightnode.cpp
UTF-8
1,845
3.03125
3
[]
no_license
/* * Assignment #4 * Name: Jason Palacios * UT EID: jap4839 * UTCS: jason777 */ #include "lightnode.h" #include <GL/glut.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <string> // Upon deconstructing the light node, disable the light LightNode::~LightNode(v...
true
cd24d6e9db62955c7d23e5ef93da03b5b867e451
C++
wakira/naivetweet
/tweetop.h
UTF-8
1,512
2.921875
3
[]
no_license
#ifndef TWEETOP_H #define TWEETOP_H #include <string> #include <vector> #include "naivedb.h" class TweetLine { public: int64_t publisher; int64_t author; std::string content; int32_t time; TweetLine(const std::string &content,int64_t publisher, int64_t author,int32_t time) { this->content = content; this->p...
true
8cf01463541cf03d47ff68813990bd6c744d2c12
C++
stonetree/AdmissionPlacement
/cBaseVM.cpp
UTF-8
674
2.546875
3
[]
no_license
#include "StdAfx.h" #include "cBaseVM.h" cBaseVM::cBaseVM(void) { } cBaseVM::~cBaseVM(void) { } cBaseVM::cBaseVM(VMtype _type,double _cpu_required,double _mem_required,double _disk_required) { type = _type; cpu_required = _cpu_required; mem_required = _mem_required; disk_required = _disk_required; } cBaseVM::...
true
30205b0564041859cff2a85c0125692702c561c7
C++
pKrumov/SoftUni-C-PB
/8.9.exc Left and Right Sum.cpp
UTF-8
642
3.46875
3
[]
no_license
#include <iostream> #include <cmath> #include <string> using namespace std; int main(){ int numToRead; cin >> numToRead; int leftSum = 0; int rightSum = 0; int num = 0; for(int i = 0; i < numToRead ; i++){ cin >> num; leftSum += num; } for(int i ...
true
ac5c32c6033ec2c434c878116c6a5c5eb009d247
C++
Perinze/oi
/hdu/37573/g.cpp
UTF-8
770
2.71875
3
[]
no_license
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 100010; int n; int bit[maxn]; int query(int i) { int s = 0; for (; i > 0; i -= i & -i) s += bit[i]; return s; } void add(int i, int x) { for (; i <= n; i += i & -i) bit[i] += x; } void add...
true
b44843e67111975b94c917f055f695e4dbe0598e
C++
zlsun/leetcode
/406. Queue Reconstruction by Height/solution.cpp
UTF-8
735
3.40625
3
[ "MIT" ]
permissive
/** 406. Queue Reconstruction by Height Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or equal to h. Write an algorithm to recon...
true
c5e79ec8d3a375ca70332186a642d59e85a1a886
C++
Rabidza/COS1511
/Assignment1/Question26.cpp
UTF-8
417
3.03125
3
[]
no_license
#include <iostream> using namespace std; int main() { int x = 5; if( x < 3) { cout << "small\n"; } else { if( x < 4) { cout << "medium\n"; } else { if( x < 6) { cout << "large\n"; } ...
true
7705c6fbd6fcba8e820cb365cb6b8eca7992c7da
C++
liretta/Students
/Functions.hpp
WINDOWS-1251
8,617
3.375
3
[]
no_license
#include <iostream> #include <time.h> #include <iomanip> #include <stdio.h> #include <conio.h> #define NAME_SIZE 15 //size student's name and surname #define MARK_COUNT 5 //count of mark using namespace std; struct Student { char Name[NAME_SIZE]; char Surname[NAME_SIZE]; unsigned int Age; unsigned int Mark[MAR...
true