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
2ba3265a7e0cc378d189b6b264545aa9616a0ff5
C++
arp5/crackingthecodinginterview
/arrays_string/anagrams?.cpp
UTF-8
732
3.375
3
[]
no_license
//Write a method to decide if two strings are anagrams or not. // O(n) + O(nlogn) time complexity and O(1) space. #include <iostream> #include <map> using namespace std; bool areanagrams(string s1, string s2){ if(s1.size()==0 || s2.size()==0){ cout << "Invalid empty string " <<endl; } sort(s1.begin(),s1.end()); ...
true
46fc1b46e565d5061bfbe4367a7007d227410923
C++
dudelka/udp_server
/src/file.cpp
UTF-8
1,615
3.21875
3
[]
no_license
#include "file.h" #include "utils.h" #include <algorithm> #include <exception> #include <utility> File::File(const std::string& filename, const uint16_t package_size) : filename_(filename), file_size_(0){ std::fstream file(filename); if (!file.is_open()) { throw std::runtime_error("Can't open file with filenam...
true
6cb829f8c040de74490a6c7074d688a880a0ece2
C++
alberot11/1-DAM
/ED/exercise7to9/TextWithoutA.cpp
UTF-8
507
3.671875
4
[]
no_license
#include <iostream> using namespace std; /*Program that asks the user to enter a text iteratively until he/she types a text with no 'a' or 'A' symbols in it.*/ int main() { string text; bool isItA; do { cout << "Type any text: "; cin >> text; isItA = false; for ...
true
e0f874866962c99675aba9c523e5460b7c18ab7d
C++
jrubin11/space_race
/Cart_Point.h
UTF-8
695
2.984375
3
[]
no_license
#ifndef CART_POINT_H #define CART_POINT_H #include "Cart_Vector.h" #include <iostream> using namespace std; //cart_point class class initialization class Cart_Point { public: //public member variables double x; double y; //constructors Cart_Point(); Cart_Point(double inputx, double inputy)...
true
ba9244694b9da93be35423a173ad72d33b46f907
C++
CetinFurkan/MENTOL_SmartWatch_Project
/Sources/SmartWatch_Firmware/DRAW_Text.ino
UTF-8
2,021
2.765625
3
[]
no_license
void drawChar(char c, int8_t x, int8_t y) { int8_t ch; word temp; temp = ((c - fontOffset) * ((fontXsize / 8) * fontYsize)) + 4; //4 is for the first property data for (int8_t j = 0; j < fontYsize; j++) { for (int zz = 0; zz < (fontXsize / 8); zz++) { ch = pgm_read_byte(&fontData[temp + zz]); ...
true
d27a082e1b5d61e7e4352e9953b3e4b0e8ad2115
C++
Yogesh-ulgebra/Laptop-in-C-
/All_c++.cpp
UTF-8
10,338
3.140625
3
[]
no_license
#include<iostream> #include<string> #include<list> #include<stack> #include<vector> using namespace std; void c(string s){ cout<<s; } void print_repeat(int count,string c){ for(int j=0;j<count;j++) cout<<c; } bool checkNumeric(char c){ return (c>='0' && c<='9'); } void getInput(string message,s...
true
319c0f912913918e1e61cc5f14a804ca80b88db9
C++
dyachenkoab/Calendar
/src/data.h
UTF-8
688
2.515625
3
[]
no_license
#ifndef DATA_H #define DATA_H #include <QDate> #include <QDebug> #include <QObject> #include <QTime> struct Note { Q_GADGET Q_PROPERTY( QString name MEMBER m_name ) Q_PROPERTY( QTime time MEMBER m_time ) public: QString m_name; QTime m_time; Note() {} Note( const QString &_name, const QTi...
true
ccf0fd51947e0b1f8b2e2bb1f86846f29b7b2b8f
C++
emakryo/cmpro
/src/arc102/d.cpp
UTF-8
673
2.625
3
[]
no_license
#include<iostream> #include<iomanip> //#include<cstdio> #include<vector> #include<map> #include<queue> #include<algorithm> #include<cmath> #include<cassert> using namespace std; typedef long long ll; int L; struct edge { int s,t,w; }; int main(){ cin >> L; int r=0; while((1<<(r+1))<=L) r++; int k=1<<r; vector...
true
b6ac2f007e52d7a742ff0840c4c69e9ff1d64ba1
C++
spcl/perf-taint
/tests/unit/dataflow/nested_function_call.cpp
UTF-8
3,295
2.59375
3
[ "BSD-3-Clause" ]
permissive
// RUN: %clangxx %cxx_flags %s -emit-llvm -o %t1.bc // RUN: %opt %opt_flags < %t1.bc 2> /dev/null > %t1.tainted.bc // RUN: %llc %llc_flags < %t1.tainted.bc > %t1.tainted.o // RUN: %clangxx %link_flags %t1.tainted.o -o %t1.exe // RUN: %execparams %t1.exe 10 10 10 > %t1.json // RUN: diff -w %s.json %t1.json // RUN: %json...
true
27368798dab51f57b45f019e2d54ec639833e6a6
C++
Sumendra2906/DS-ALGO
/1-10/6 Array Challenges/biggest_number.cpp
UTF-8
629
3.28125
3
[]
no_license
#include <iostream> #include <string> #include <algorithm> using namespace std; bool compare(string a, string b) { //we compare ab and ab string ab = a.append(b); string ba = b.append(a); return ab > ba; } int main() { int t; cin >> t; int n; while (t > 0) { t--; c...
true
b2ba120acc8b60a95f5093e77d963c232559cd6b
C++
LuckPsyduck/CPP-Example
/C++ Primer/C++ Primer&05/Example&5.5.cpp
GB18030
700
3.21875
3
[]
no_license
#include<iostream> #include<string> using namespace std; int main()//Ҫţȼ { int grade; cout << " input score : \n"; cin >> grade; if (grade < 0 || grade>100) { cout << "illegal\n"; return -1; } if (grade == 100) { cout << "a++" << endl; return -1; } if (grade < 60) { cout << "f\n"; return -1; } ...
true
47202ee77095b13c449dd4b55c8aa28660dd9843
C++
acc3xa/TowerOptimization
/DEMReader/Map.cpp
UTF-8
2,665
3.515625
4
[]
no_license
#include "Map.h" Map::Map() { //Size the map appropriately theMap.resize(15); for (int i = 0; i < 15; ++i) theMap[i].resize(15); } Map::~Map() { } void Map::firstInsert(string s){ //Buid the grid for first Lat/Long section vector<vector<short>>* gridptr; vector<vector<short>> grid; grid.resize(1201); ...
true
2a1ce1ac5c14f616f0a5ffcd3d1f8c3489e781f4
C++
Strawberry9583/LeetCode
/Challenge/July_LeetCoding_Challenge/Day16_pow/Day16_pow/Day16_pow.cpp
UTF-8
858
3.390625
3
[]
no_license
#include<iostream> #include<algorithm> #include<unordered_map> using namespace std; class Solution { public: double myPow(double x, int n) { long int times = std::abs(n); std::unordered_map<int, double> archive; archive[0] = 1.0; archive[1] = x; auto result = get_pow(archive, x, times); if (n < 0) { r...
true
4537d6ad9f7606e7901fe2cbd9ca978a9e84b13c
C++
specialtactics/leetcode-2020-30day
/week1/maximum-subarray-recursion.cpp
UTF-8
2,514
3.296875
3
[]
no_license
This works I believe, but it got time limit exceeded, so we need to make it smarter class Solution { public: vector<int>::iterator end; int maxSubArray(vector<int>& nums) { vector<int>::iterator it = nums.begin(); this->end = nums.end(); return recurse(*it, *it, ++it); } ...
true
7ce6e7028b80bcabafe5d031c487b9dc5a0e4989
C++
skotlowski/Learning
/C++/Course/Lesson 6/main.cpp
UTF-8
317
2.875
3
[]
no_license
#include <iostream> #include <stdlib> using namespace std; int populacja=1, godziny=0; int main() { while(populacja<=1000000000) { godziny++; populacja=populacja*2; cout<<"minelo godzin: " <<godziny<<endl; cout<<"liczba bakterii: " <<populacja<<endl; } return 0; }
true
2f0467e65a9eac617d6c8c0c451ec17b557a94ee
C++
seungjae-yu/Algorithm-Solving-BOJ
/kimug2145/12787/12787.cpp14.cpp
UTF-8
1,110
2.75
3
[]
no_license
#include <iostream> #include <algorithm> #include <string> #include <cmath> using namespace std; typedef unsigned long long ll; int tc, type; #define CV 256 int main() { scanf("%d", &tc); while (tc--) { scanf("%d", &type); if (type == 1) { //ip -> ll string inp; cin >> inp; strin...
true
59690c2ca172455b1d3b8a676e6d39218d124a51
C++
Gismo359/GLEE
/src/drawing/Line.hpp
UTF-8
4,273
2.625
3
[]
no_license
// // Created by braynstorm on 2/12/18. // #ifndef GLEE_LINE_HPP #define GLEE_LINE_HPP #include "../Utils.hpp" #include <glm/glm.hpp> #include <GL/glew.h> #include <GL/gl.h> #include <vector> #include <string> #include <type_traits> #include <exception> namespace glee { using glm::vec2; using glm::vec4; ...
true
2a507320dfd4dccc860073fd2b17aef2498643b6
C++
kid7st/Leetcode
/210-Course-Schedule-II/solution.cpp
UTF-8
829
2.78125
3
[]
no_license
class Solution { public: vector<int> findOrder(int numCourses, vector<pair<int, int>>& prerequisites) { vector<vector<int>> edges(numCourses, vector<int>{}); vector<int> indegree(numCourses, 0); for(auto edge : prerequisites){ edges[edge.second].push_back(edge.first); ...
true
b15ac8fbb78082365bb11894a3c11a452e03e687
C++
robotroman/code_for_robot
/include/robot.h
UTF-8
7,037
2.953125
3
[]
no_license
#ifndef ROBOT_H #define ROBOT_H #include "leg.h" #include "stdafx.h" #include "servo.h" #include "camera.h" #include "point3d.h" //!\brief The class robot controls every proccess on robot. It opens the port for connection, generates and controls gaits,legs movement. //!\brief It includes commands: \sa move_legs_to_xy...
true
03dcd42823af39309024e7f449a5ae3d9f6317ca
C++
UrsuDanAndrei/CentralNews
/utils.cpp
UTF-8
3,482
2.75
3
[]
no_license
#include "utils.h" int get_parsed_messages(int sockfd, std::vector<std::string>& msgs) { int ret_code; /* variabila utilaza pentru a marca cazul in care caracterul '\0' (finalul unui mesaj) nu a fost citit in buffer-ul anterior si trebuie citit in buffer-ul curent */ static bool trail_0 = false; ...
true
9e888741953d60bd5eee8aabe69c586689c4c09c
C++
15831944/pre2006
/VisualStudioProjects/VC7/password/PasswordManage/PasswordManage/PasswordManager/PasswordManager.cpp
GB18030
5,379
2.53125
3
[]
no_license
#include "StdAfx.h" #include "PasswordManager.h" #include <fstream> CPasswordManager::CPasswordManager(void) { m_szFile = _T("password.pwd"); m_pEncrypterManager = NULL; m_Head.MajorVerson = 1; m_Head.MinorVerson = 0; #ifdef UNICODE m_Head.nUnicode = 1; #else m_Head.nUnicode = 0; #endif // #ifdef ...
true
8a7fdd96af2a44bc750d731e49f08b7b9f25b735
C++
blackbox47/UVA-Problem-Solution-Using-C-or-C-Plus-Plus
/11137 - Ingenuous Cubrency.cpp
UTF-8
967
2.609375
3
[]
no_license
#include<stdio.h> #include<vector> #include<string.h> #define mx 20000 using namespace std; void coin(void); void pregenerate(void); long long arr[mx+10]; vector<long long>v; int main(void) { long long a,i,j,var,tem; coin(); pregenerate(); while(scanf("%lld", &a)==1) { ...
true
f479b5a1c7afc3fd1f3fade92e05497b8d1926f2
C++
SeobinYun/2021_C_practice
/PuzzleBook/PuzzleBook/PuzzleBook/Operator1.cpp
UTF-8
224
2.625
3
[]
no_license
#include <stdio.h> int main(void) { int x; x = -3 + 4 * 5 - 6; printf("%d\n", x); x = 3 + 4 % 5 - 6; printf("%d\n", x); x = -3 * 4 % -6 / 5; printf("%d\n", x); x = (7 + 6) % 5 / 2; printf("%d\n", x); return 0; }
true
940783a71436be6ca96c71417c1a9e0ca0e707ad
C++
AmandineF/PMPOO
/ModelisationProjet/Algo/Algo.h
ISO-8859-1
1,703
2.921875
3
[]
no_license
#ifdef WANTDLLEXP #define DLL _declspec(dllexport) #define EXTERNC extern "C" #else #define DLL #define EXTERNC #endif #include <vector> using std::vector; class DLL Algo{ public: /*! \brief Algorithme de gnration de la carte * \param taille de la carte * \return tableau a deux dimensions d'entiers. Cha...
true
c818982a9a4524a950302b5d93302030844db751
C++
RuwanKarunanayake/final-staged-rhs-with-shared-memory-utilization
/bssn/cuda_gr/src/dataGeneration.cpp
UTF-8
12,065
2.96875
3
[]
no_license
/** * Created on: Sep 21, 2018 * Author: Akila, Eranga, Eminda, Ruwan **/ #include "dataGeneration.h" void data_generation_blockwise_mixed(double mean, double std, unsigned int numberOfLevels, unsigned int lower_bound, unsigned int upper_bound, bool isRandom, Block * blkList, double ** var_in_array, double ** va...
true
d9b27b3ffa0675468afa3faa5372b0a2d6919ba5
C++
rjwall/csci156
/7_11.cpp
UTF-8
655
3.8125
4
[]
no_license
#include <iostream> #include <iomanip> #include <cmath> using namespace std; const double PI = 3.14159; struct Circle { double radius; double diameter; double area; }; Circle getInfo(); int main() { Circle c; c = getInfo(); c.area = PI * pow(c.radius, 2.0); cout << "The radius and area of the ci...
true
64fc0c8104f7fdb4e9feff57417661b5299317cb
C++
resoliwan/cprimary
/l13/usedma.cpp
UTF-8
628
2.890625
3
[]
no_license
#include <iostream> #include "dma.h" using namespace std; int main() { BaseDMA b("Potabelly", 8); cout << "Displaying BaseDMA object:\n"; cout << b << endl; LacksDMA l("red", "Blimpo", 4); cout << "Displaying LacksDMA object:\n"; cout << l << endl; HasDMA h("Mercator", "Buffalo Kyes", 4); cout << "Di...
true
fa82b7b5c655ab430464803a78a65cb0aa7bd48f
C++
xorde/xoTools
/Toolkit/helpers/CursorHelper.cpp
UTF-8
1,278
2.65625
3
[]
no_license
#include "CursorHelper.h" bool CursorHelper::m_isCustomCursorEnabled = false; QMap<QWidget*, Qt::CursorShape> CursorHelper::m_widgets = QMap<QWidget*, Qt::CursorShape>(); QMap<Qt::CursorShape, QCursor> CursorHelper::m_customCursors = QMap<Qt::CursorShape, QCursor>(); void CursorHelper::InstallCursor(Qt::CursorShape...
true
44c438bc9b14399ab79da3c68955fc0c4621a44b
C++
yaoxiaoqi/Leetcode
/141 Linked List Cycle/Linked List Cycle.cpp
UTF-8
1,326
3.3125
3
[]
no_license
// // main.cpp // Leetcode // // Created by 妖小七 on 2018/11/23. // Copyright © 2018 妖小七. All rights reserved. // #include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next...
true
75fcaddee7da4689d958b3fc363748d7f2676d10
C++
mapleriver/SNLComplier
/Project/Parser.h
GB18030
7,347
2.515625
3
[]
no_license
#pragma once #include"Scanner.h" #include<list> #include<string> #include<map> #include<Token.h> struct ParseTreeNode; using Terminal = Tag; enum class Nonterminal; class Parser { private: Scanner& scanner; public: ParseTreeNode * getParseTree(); void printParseTree(ParseTreeNode * parseTree); Parser(Scanner& sc...
true
1f09e2b71aa627df977dfaadd4a786869ee9186b
C++
zsuzuki/structbuilder
/cpp/sample.cpp
UTF-8
2,752
3.140625
3
[ "MIT" ]
permissive
#include "serializer.hpp" #include <cstdint> #include <iostream> #include <string> #include <vector> int main(int argc, char **argv) { try { std::cout << "Start" << std::endl; auto ser = Serializer{}; char buffer[128]; ser.initialize(buffer, sizeof(buffer)); // // number test // sta...
true
d0c3958e9bc469d539f743f84beed06e2e2d6316
C++
VARADSP/My-CPP-PROGRAMS
/celciustofarengeit.cpp
UTF-8
883
3.671875
4
[]
no_license
#include<iostream> using namespace std; #include<conio.h> #include<stdlib.h> void celtofahren(); void fahrentocel(); float celcius,fahren; int main() { int choice; do { cout << "Enter your choice for " << "\n" << "Type 1 to convert Fahrenheit to celcius " << "\n " << "2 to convert Celcius to Fahren...
true
09a45bdeba9b13bccadc8366aa39859716281ef8
C++
jaroles/Battlesnakes-V2
/Node/misc/nodemodules/Point.h
UTF-8
779
2.734375
3
[]
no_license
/* * Point.h * * Created on: Oct 25, 2012 * Author: Jure Jumalon */ #ifndef POINT_H_ #define POINT_H_ #include <stddef.h> #include <math.h> #include <memory> #include <vector> //#include "../../lib/node/src/node.h" class Point { public: Point(); virtual ~Point(); Point(float x, float y) : x_(x), y_...
true
e82ae7551b1b95a0bdb67f00c647f8b8b33a21cd
C++
overflowsc/inf4715
/Sources/GameApp/MainMenu.h
UTF-8
611
2.609375
3
[]
no_license
/// /// Copyright (C) 2012 - All Rights Reserved /// All rights reserved. http://www.equals-forty-two.com /// /// @brief Declares the main menu class. /// #ifndef __MAINMENU_H__ #define __MAINMENU_H__ #include "Menu.h" // This class serves as a GUI panel to group GUI elements class MainMenu : public Menu { public: ...
true
6dddc48c06b1109033b9d20d9084a46131e019fd
C++
MrGoumX/TowerDefense
/TowerDefense/Pirate.h
UTF-8
1,167
2.625
3
[]
no_license
#ifndef PIRATE_H #define PIRATE_H #define SECONDS_PER_TILE 1.0f #include "GeometryNode.h" #include "Renderer.h" #include "Game.h" class Pirate : public GameObject { glm::mat4 m_transformation_matrix; class GeometryNode* m_body; glm::mat4 m_body_transformation_matrix; glm::mat4 m_body_transformation_matrix_norma...
true
32e53c09c9a2fdae6321cae4635d5a3867ea9139
C++
snorlon/cs480Brown
/Assignment08/src/shaderloader.cpp
UTF-8
4,133
3.109375
3
[]
no_license
#include "shaderloader.h" #include "config.h" #include <iostream> using namespace std; bool shaderManager::giveLinks(config* configData) { //abort if any provided links are bogus, we NEED them if(configData == NULL) return false; simConfig = configData; //assumed success accessing links ...
true
189301dd37456c83af3684b1b430ce2572354f9d
C++
icecocoa6/abc
/57/D.cpp
UTF-8
937
2.671875
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> using namespace std; long C[51][51]; int main(int argc, char *argv[]) { int N, A, B; cin >> N >> A >> B; vector<long> v(N); for (int i = 0; i < N; i++) cin >> v[i]; sort(begin(v), end(v), greater<long>()); for (int n = 0; n <= N;...
true
f9dba3b79b8b15ea9bf7dadf75d2b853cb6d20c8
C++
suVrik/KWA
/engine/render/include/render/animation/animation_manager.h
UTF-8
1,736
2.640625
3
[]
no_license
#pragma once #include <core/containers/pair.h> #include <core/containers/shared_ptr.h> #include <core/containers/string.h> #include <core/containers/unordered_map.h> #include <core/containers/vector.h> #include <shared_mutex> namespace kw { class Animation; class Task; class TaskScheduler; struct AnimationManagerD...
true
8f06efb30022d4825f718a6ad99232a9fc516d58
C++
ProyectoLegus/Legus
/Expresion/Expresion.h
UTF-8
1,074
2.5625
3
[]
no_license
#ifndef EXPRESION_H #define EXPRESION_H /*! \public \enum Expresiones \brief Utilizado para describir que tipo de expresion es el objeto. */ enum Expresiones { IGUALDAD, MAYOR, MAYORIGUAL, MENOR, MENORIGUAL, DISTINTO, DIVISION, DIVISIONENTERA, EXPONENCIACION, MODULO, MULTIPLICACION, OPERADORO, ...
true
106af8b3593621d1c6cd183e3c33806880aeab09
C++
oscarcheng105/CS32_Coursework
/Homework3/Homework3/animal.cpp
UTF-8
1,629
3.484375
3
[]
no_license
// // animal.cpp // Homework3 // // Created by Oscar Cheng on 2020/5/4. // Copyright © 2020 Oscar Cheng. All rights reserved. // #include <string> #include <iostream> using namespace std; class Animal{ public: Animal(string str): m_name(str){}; virtual ~Animal(){}; virtual void speak() const = 0; v...
true
1e95f1018b15645d1beb9bdeebd421ddbe979cb0
C++
digitalwizards/SparkCore-LEDMatrix-MAX7219-MAX7221
/firmware/ledmatrix-max7219-max7221.h
UTF-8
3,816
2.953125
3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
#ifndef LEDMATRIX_h #define LEDMATRIX_h #include "Adafruit_GFX.h" class LEDMatrix : public Adafruit_GFX { public: class Bitmap { public: Bitmap(int width, int height); int getWidth(); int getHeight(); void setPixel(int x, int y, bool val); bool getPixel(int x, i...
true
10d6e1a3a4762c3839a963993f20bb74e8362c31
C++
KarolStola/DragonframeMotionController
/src/source/DragonframeMotionController.cpp
UTF-8
11,561
2.65625
3
[ "MIT" ]
permissive
#define DEBUG_LOG 0 #include "DragonframeMotionController.h" #include "DragonframeDevice.h" DragonframeMotionController::DragonframeMotionController(DragonframeDevice & dragonframeDevice) : dragonframeDevice(dragonframeDevice) , movementPositionUpdateTask(DelayedTaskTimeResolution::Milliseconds, this, & Drago...
true
c95b74ad60469e76610d8b09388ba0a479532187
C++
kamyu104/LeetCode-Solutions
/C++/trapping-rain-water.cpp
UTF-8
1,326
3.515625
4
[ "MIT" ]
permissive
// Time: O(n) // Space: O(1) class Solution { public: int trap(vector<int>& height) { int result = 0, left = 0, right = height.size() - 1, level = 0; while (left < right) { int lower = height[height[left] < height[right] ? left++ : right--]; level = max(level, lower); ...
true
1e0924836ce8727534181b40053fa10a1a78c1ce
C++
Aeshnajain/DS-Algo
/2nd sept/test.cpp
UTF-8
315
3.03125
3
[]
no_license
#include<iostream> #include<vector> using namespace std; int XOR(int num) { long long a=1; long long b=1; long long sum=0; for(int i=0;i<num;i++) { sum+=a*a; int temp=a; a=b; b=b+temp; } return sum; } int main(int argc,char**argv) { cout<<XOR(5)<<endl; }
true
2445dc77a4ed8e2a7b0956fb98233c4683cd96f7
C++
skyser2003/Chrono-Warrior
/source/Mode/GameMode/GameMode.cpp
UTF-8
1,833
2.546875
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "GameMode.h" #include "UIManager/UIManager.h" #include "Window/Window.h" #include "KeyboardInput/KeyboardInput.h" #include "MouseInput/MouseInput.h" #include "Logic/Map/Map.h" #include "Logic/FieldObject/FieldUnit/FieldUnit.h" namespace CW { GameMode::GameMode() { } GameMode::~GameM...
true
e677769812d12b59bffd6d61c42ed7f4fce504fd
C++
lopesivan/snippets
/icpc/icpc-2012-2013/uva10305.cpp
UTF-8
1,349
2.75
3
[ "MIT" ]
permissive
#include <cstdio> #include <cstring> #include <list> #define MAX (101+5) using namespace std; list<int> order; inline list<int> ::iterator find (int v, int *_v) { *_v = 0; for (list<int> ::iterator it = order.begin(); it != order.end(); ++it, ++*_v) if (*it == v) return it; return order.end(); //junk } in...
true
ca3011d333be20d4e151b33d116f836cb79471fb
C++
Arangear/The15Puzzle
/The15Puzzle/Coursework1/Solver.cpp
UTF-8
1,054
3.296875
3
[]
no_license
//Author: Daniel Cieslowski //Date created: 20.10.2019 //Last modified: 24.10.2019 #include "Solver.h" #include <algorithm> void Solver::Solve(Puzzle& puzzle) { int consecutiveCount = findConsecutiveSets(puzzle); unsigned long long int result = consecutiveCount * factorial(puzzle.ElementCount() - puzzle.Size...
true
1b119475062327362aeeee311a383c03c0442f22
C++
ChengfengTang/C
/shuntingYard/Node.h
UTF-8
319
2.875
3
[]
no_license
#ifndef NODE_H #define NODE_H #include<iostream> class Node { public: Node(); ~Node(); void setSymbol(char newSymbol); void setLeft(Node* newLeft); void setRight(Node* newRight); Node* getLeft(); Node* getRight(); char getSymbol(); private: char symbol; Node* left; Node* right; }; #endif
true
6b329015f9ca528c2d5d0c3776d2871305c83c57
C++
gregorgebhardt/job_stream
/job_stream/pythonType.h
UTF-8
1,312
2.84375
3
[ "MIT" ]
permissive
/** Header for the SerializedPython type so that it is integrated into decoding objects. */ #pragma once #include <boost/serialization/serialization.hpp> #include <iostream> namespace job_stream { namespace python { /** Python data stored as a pickle string */ struct SerializedPython { std::string data; ...
true
2a334e8edc581dcc3a9a8d06d3e6fa5d8f334385
C++
bearownage/Client-Server
/aliaslinearprobe.cpp
UTF-8
4,863
3.25
3
[]
no_license
#include <stdio.h> #include <string.h> #include <string> #include <unistd.h> #define MAPSIZE 10000 struct map_entry { char alias[128]; char key[128]; int32_t offset_entry; }; struct map_entry *map[MAPSIZE]; void alias_update_entry(ssize_t fd, map_entry *new_entry, map_entry *old_entry); void init_alias_functio...
true
f6ab6b6d7d5036abf18b5b68cfb553100f9a9bc6
C++
a-rodionov/Otus.Cpp.Homework2
/ip.cpp
UTF-8
1,047
3.296875
3
[]
no_license
#include "ip.h" #include <algorithm> IP::IP(const std::vector<std::string>& ip_str) { if(4 != ip_str.size()) throw std::invalid_argument("String represantation of IP contains wrong number of elements."); std::transform(std::cbegin(ip_str), std::cend(ip_str), ip_parts.begin(), ...
true
49d9a44c4a126c731a5c66b8311cdf2e95bc9392
C++
willsaibott/Basic_Library
/Matrix_Operations/PixelMatrix_RGBD.h
UTF-8
7,052
3.171875
3
[]
no_license
#ifndef PIXELMATRIX_RGBD_H #define PIXELMATRIX_RGBD_H #include "PixelMatrix.h" #include "Sphere_Distance_Calculator.h" #include "Sphere_Similarities_Calculator.h" #include "Intersection_Similarities_Calculator.h" #define INTERSECTION_SIMILARITIES_ALGORITHM 2 #define SPHERE_SIMILARITIES_ALGORITHM 3 #define SPHERE_ALG...
true
e8aa8222eab5f6eef721302852351d966e9399fe
C++
bopopescu/CodeLingo
/Dataset/cpp/truth.cpp
UTF-8
594
3.5
4
[ "MIT" ]
permissive
// truth.cpp (c) 1997-2002 Kari Laitinen #include <iostream.h> int main() { bool true_boolean_variable = true ; bool false_boolean_variable = false ; cout << "\n In C++, expressions are evaluated so that\n" << "\n - a true expression has value " << ( 99 == 99 ) ...
true
4cdbc92ba7b1e562f14a2f07a705a2e10089559c
C++
shega1992/Prata-CPP-exercises
/Chapter15/Ex15-3/exc_mean.h
UTF-8
954
3.234375
3
[]
no_license
#ifndef EXC_MEAN_H_ #define EXC_MEAN_H_ #include <iostream> #include <stdexcept> class bad_arguments : public std::logic_error { private: double v1; double v2; protected: double get_arg1() { return v1; } double get_arg2() { return v2; } public: bad_arguments(double a = 0, double b = 0) : std::logic_error("bad ar...
true
dd83e9daa86b11d1d50f8ce24037bad8e3b07cbe
C++
dacunni/FastRender
/src/RandomNumberGenerator.h
UTF-8
1,882
2.703125
3
[]
no_license
#ifndef _RANDOM_NUMBER_GENERATOR_H_ #define _RANDOM_NUMBER_GENERATOR_H_ #include <random> class Vector4; class BarycentricCoordinate; class RandomNumberGenerator { public: RandomNumberGenerator(); ~RandomNumberGenerator() = default; inline float uniform01( void ); inline float uniformRange( float min, float ma...
true
8be8f2620f4fdac0b00b4ff93fe0b34363262ae7
C++
nopanderer/ps
/bf/1476.cc
UTF-8
332
2.890625
3
[]
no_license
/** * 날짜 계산 * 1476 */ #include <iostream> using namespace std; int e,s,m; int E,S,M; int ans; int main(){ cin>>E>>S>>M; e=s=m=ans=1; while(true){ if(s==S && e==E && m==M) break; e++; s++; m++; if(e==16) e=1; if(s==29) s=1; if(m==20) m=1; ans++; } cout<<ans<<'\n'; return 0...
true
1dc2c1758c3f7b65bf9e9a8a4a6eacbddf1bfb36
C++
MaiJiahne/greenhandle
/Project1/wuli.cpp
UTF-8
876
2.734375
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <numeric> using namespace std; int main() { vector<double> time; vector<double> v; vector<double> result; const double length = 0.2; const double pyou = 1261.2; const double pball = 7800.0; const double D = 0.0225; const double d = 0.001015; ...
true
21a753db8a5f0c219586d99a27c1e1ef7a2aaa1c
C++
SunWarriorZLX/Cpp-UndergraduateCourses
/etc/main.cpp
UTF-8
6,983
2.78125
3
[]
no_license
#include<iostream> #include<string> #include<map> #include<vector> #include<stack> #include<set> #include<cstring> using namespace std; map<char,int>getnum; char Getchar[100]; //获得对应字符 vector<string>proce; int table[100][100]; //预测分析表 int num=0;int numvt=0; //numvt是终结符集合,0是‘#’,numvt表空字 string first[100...
true
3726c750359fb3acc89562e30223394b6e01dce6
C++
Wilingpz/sunny
/11.27练习/11.25练习/main.cpp
GB18030
3,024
3.125
3
[]
no_license
//Ŀӣhttps://www.nowcoder.com/questionTerminal/6736cc3ffd1444a4a0057dee89be789b?orderByHotValue=1&page=1&onlyReference=false //Դţ //ţţٰһα̱, μӱ3*nѡ, ÿѡֶһˮƽֵa_i. //ҪЩѡֽ, һn, ÿ3. //ţţֶˮƽֵڸöԱеڶˮƽֵ // : //һԱˮƽֱֵ3, 3, 3.ôˮƽֵ3 //һԱˮƽֱֵ3, 2, 3.ôˮƽֵ3 //һԱˮƽֱֵ1, 5, 2.ôˮƽֵ2 //Ϊñп, ţţ밲Ŷʹжˮƽֵܺ //ʾ : //ţţ6Աֵ //Ϊ : //team1 : {1, 2, 5}...
true
e92448fcd4f1207b01480c209cc0fa7407d90958
C++
SeanCST/Algorithm_Problems
/LeetCode/242_有效的字母异位词.cpp
UTF-8
480
2.9375
3
[]
no_license
class Solution { public: bool isAnagram(string s, string t) { if(s.length() != t.length()) return false; map<char, int> m; for(int i = 0; i < s.length(); i++) { m[s[i]]++; m[t[i]]--; } map<char, int>::iterator iter = m.begin(); ...
true
786f05106a1054f69bbd142a079c9f2463e8c1be
C++
Lynch88024/Daily-coding
/PAT/B1007.cpp
UTF-8
1,013
2.984375
3
[]
no_license
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> using namespace std; const int maxn = 100010; int prime[maxn]; bool flag[maxn]; int prime_num = 0; bool isPrime(int n) { if(n <= 1) { return false; } int sqr = (int)sqrt(1.0*n); for(int i=2; i<=...
true
bcb32576e0501f890263045b145a5d2ab9f32683
C++
kljadsl/cpp
/笔记/设计模式/游戏设计模式/命令模式/Command.h
UTF-8
1,321
3.140625
3
[]
no_license
#include"GameActor.h" #include"Button.h" class Command{ public: virtual ~Command(){} virtual void execute(GameActor& actor) = 0; }; class JumpCommand : public Command{ public: virtual void execute(GameActor& actor) { actor.jump(); } }; class FireCommand : public Command{ public...
true
c907f22b658d396f278b6a613def30be6a67988c
C++
NguyenTheAn/Algorithm
/sap_xep_mang.cpp
UTF-8
371
2.75
3
[]
no_license
#include <iostream> using namespace std; main(){ long n; cin>>n; long array[n]; for(int i=0;i<n;i++){ cin>>array[i]; } int index; for (int i=0;i<n;i++){ for (int j=i+1;j<n;j++){ if (array[i]>array[j]){ index=array[i]; array[i]=array[j]; array[j]=index; } } } for ...
true
3b8036d1dd1c6280cc08bea1d8044c17c4c76235
C++
mke01/BasicC-
/Day 12/08 Static members/Source01.cpp
UTF-8
1,383
3.875
4
[]
no_license
#include <time.h> class RandomGenerator { public: static int random(int lbound, int ubound); }; int RandomGenerator::random(int lbound, int ubound) { static unsigned int seed = (unsigned int) time(nullptr); while(seed == 0) seed = (unsigned int) time(nullptr); seed *= seed; seed = seed % (ubound - lbound) + lb...
true
66a8d2b86f0a2b5e236dfb58f46fbadc8f0fe94a
C++
squeakyspacebar/downsampling_assignment
/include/eye/functions.hpp
UTF-8
913
2.53125
3
[]
no_license
#ifndef EYE_FUNCTIONS_HPP #define EYE_FUNCTIONS_HPP #include <string> #include <vector> #include <eye/common.hpp> #include <eye/image.hpp> namespace eye { typedef std::pair<Image, std::vector<mode_map_t>> image_pair_t; std::vector<Image> process_image(const Image & img); void write_to_file(const Image & ...
true
c6bde3cb32b6ccb68242f0e32fe6c326ee041ba8
C++
JianHangChen/LeetCode
/1792. Maximum Average Pass Ratio.cpp
UTF-8
3,015
3.203125
3
[]
no_license
// !!! sol1.1, my, O(nlogk), O(k), use array<int,3> to reduce time, faster than vector // similar to amazon oa double diff(double x, double y){ return (x + 1) / (y + 1) - x / y; } class Solution { public: double maxAverageRatio(vector<vector<int>>& classes, int extraStudents) { vector<array<double, 3> ...
true
3d2804d155428f4e6787a6b38b606b0b159d5449
C++
TroyNeubauer/Calculus-Cpp
/examples/quickstart/quickstart.cpp
UTF-8
773
2.78125
3
[ "MIT" ]
permissive
#include "Calc.hpp" #include "CompileTime.hpp" #include "parser/Parser.hpp" #include <iostream> #include <string> using namespace calc; using namespace calc::compile_time; int main(int argc, const char** argv) { //Variable x("x"); //Expression e = Sin(x) + 1.5; std::string line; while (std::getlin...
true
4972ecc1cecd33610003a0ed74fd45b6aec04407
C++
SayaUrobuchi/uvachan
/USACO/詳解/cpp/humble.cpp
UTF-8
676
2.59375
3
[]
no_license
/* ID: dd.ener1 PROG: humble LANG: C++ */ #include <cstdio> using namespace std; long N,K,s[100]; unsigned long ham[1000000]; long dex[100]; const unsigned long OO=~0; void input(){ freopen("humble.in","r",stdin); scanf("%d%d",&N,&K); for(long i=0;i<N;++i)scanf("%d",s+i); } inline void solve(){ ham[0]=1; for(lon...
true
0797fedaf5f5782058ebd75fc977ca583e4cdcd3
C++
The-Elite-Zero/8-Piece-Puzzle-Project
/PuzzleProject.cpp
UTF-8
26,768
3.5625
4
[]
no_license
// The following program will solve an 8-Piece Puzzle based on randomly // generated or pre-generated states. It will use 3 different search // algorithms: Breadth-First, Depth-First, and A* w/ Out of Place Tile // Heuristic. // // Name: // //---------------------------------------------------------------------------...
true
53afac3a1b0c21dd065db2c90f3a2f4564c0afcd
C++
liu7920/p153
/p153/src/p153.cpp
UTF-8
236
2.90625
3
[]
no_license
#include <iostream> using namespace std; #include "Oval.h" int main() { int w, h; Oval oval; cout << "변경 witch 입력 : "; cin >> w; cout << "변경 height 입력 : "; cin >> h; oval.set(w,h); oval.show(); return 0; }
true
2046f3190972ab4c711c0504842a8481ac9a5f3c
C++
foursking1/leetcode
/lengthoflastword.cpp
UTF-8
547
3.53125
4
[]
no_license
#include <iostream> using namespace std; enum STATE { Space, Char}; int lengthOfLastWord(const char *s) { int length = 0; STATE state = Space; while( *s != '\0' ) { if( *s == ' ') { if( state == Space) { s ++ ; } else { state = Space; s ++ ; } } else { ...
true
cae141f7afe549fbc0c2979659cea7e4b22f9719
C++
EasonQiu/LeetCode
/289_Game of Life.cpp
UTF-8
1,974
3.453125
3
[]
no_license
#include <iostream> #include <vector> using namespace std; // 可以用2 bits来同时存储current和next的状态 // 例如:10表示从dead到live class Solution { public: int numNeighbors(const vector<vector<int>>& board, int bi, int bj){ int sum = 0; if (bi - 1 >= 0 && bj - 1 >= 0) sum += board[bi-1][bj-1]; if (bi - 1 >=...
true
63376db90a8d2daa89c03e29f727a2ca92395738
C++
jamg1906/Laboratorio_2_Avanzada
/Carrera.cpp
WINDOWS-1250
3,853
2.765625
3
[]
no_license
#include "Carrera.h" #include <string> #include <iostream> #include <stdio.h> #include <thread> // std::this_thread::sleep_for #include <chrono> using namespace System::Windows::Forms; using namespace System::IO; using std::string; using namespace System::Runtime::InteropServices; bool Ganador = false; strin...
true
241a0a2aa1daf1aaeb75d53b30d708b01cc1d771
C++
cjswoduddn/algorithm-master
/programmers/kakao/2020blind/4songsearchv2.cpp
UTF-8
576
2.890625
3
[]
no_license
#include <string> #include <regex> #include <vector> using namespace std; void convertRegex(string& str){ for(int i = 0; i < str.size(); i++) if(str[i] == '?') str[i] = '.'; } vector<int> solution(vector<string> words, vector<string> qu){ vector<int> ans; vector<vector<string>> strs(10001); for(string& str : w...
true
b85902e35e04d97a305aece585bc3cd395c4056b
C++
Topu920/MoonAroundEarthInC-
/main.cpp
UTF-8
4,641
2.71875
3
[]
no_license
#include<windows.h> #include<GL/glu.h> #include <bits/stdc++.h> #include <stdlib.h> #include <GL/glut.h> using namespace std; //Makes the image into a texture, and returns the id of the texture GLuint LoadTextureRAW(const char *filename, int width, int height) { GLuint textureId; unsigned char *data; FILE *file...
true
598da7eb86bc686e3e6eb4466adc9c8c6f496735
C++
batgui/notebook
/394. Decode String.cc
UTF-8
1,423
3.109375
3
[]
no_license
class Solution { int index = 0; public: string decodeString(string s) { int digit = 1; int previousIsDigit = false; string finalstr = ""; string localstr = ""; for (; index < s.size(); index++) { if (s[index] == ']') return finalstr; ...
true
394b2c4d8e5df0d94d8a24bf7abbf51306b4fcb0
C++
Sadman007/DevSkill-Programming-Course---Basic---Public-CodeBank
/DevSkill_CP/Intermediate/Batch 5/Class 9/code.cpp
UTF-8
563
2.703125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define MAX 1000006 #define ll long long int twoPower(int N) { return 1 << N; } bool checkBit(int N,int x) { if (N&(1<<x) == 0) return 0; return 1; } int findSingleNumber(int *arr,int n) { int xor = 0; for(int i=0;i<n;i++) xor^=arr[i]; return xor;...
true
1364193d872155e6f8b7c953354e63c7805febe8
C++
therahulgoel/competitiveProgramming
/competitiveProgramming/competitiveProgramming/Mathematical/mathematical.hpp
UTF-8
642
2.828125
3
[ "MIT" ]
permissive
// // mathematical.hpp // DS // // Created by Rahul Goel on 7/26/17. // Copyright © 2017 Rahul Goel. All rights reserved. // #ifndef mathematical_hpp #define mathematical_hpp #include <stdio.h> //1. GCD void mathematical_gcd(int a, int b); //2. LCM void mathematical_lcm(int a, int b); //3. HCF void mathematica...
true
53fcfde71f67d1e90829583eebaac3ca5d0e1f3f
C++
MonadicLabs/AT11
/include/AT11/iobuffer.h
UTF-8
2,672
3.0625
3
[ "MIT" ]
permissive
#pragma once #include <string> #include <deque> #include <vector> namespace monadic { namespace AT11 { class Interpreter; class IOBuffer { friend class Interpreter; public: IOBuffer( bool echoEnabled = true ) :_echoEnabled(echoEnabled) { } virtual ~IOBuffer() { } void s...
true
c0462afe954aa461e6be666f4ca467958a28421d
C++
jorgelp2/mecanio
/Programas/leer_numero/leer_numero.ino
UTF-8
1,096
2.515625
3
[]
no_license
void setup() { Serial.begin(9600); } void loop() { if (Serial.available() > 0) { String str = Serial.readStringUntil('\n'); String fila = str.substring(0,2); String columna = str.substring(2,4); String pax = str.substring(4,6); String pay = str.substring(6,8); ...
true
49c51df351d9ea69be2cb3c427fb0311afef18b2
C++
serkanbodur/OOP_Cpp_Series
/7.Example-Polymorphic Media Players/MusicPlayer.cpp
UTF-8
1,003
2.890625
3
[ "MIT" ]
permissive
#include<iostream> #include<string> #include"MusicPlayer.h" using namespace std; void MusicPlayer::BackWard() { if (supportedFormatCount == 1) cout << "MusicPlayer : Does not support the backward operation" << endl; } void MusicPlayer::Forward() { if (supportedFormatCount == 1) cout << "MusicPlayer : Do...
true
c91d9bcbeaf4a5b18981cae9e242288504d38ab4
C++
RudenkoDmitriy/MyHomeWorking
/1_semestr/5/ListPoint/ListPoint/main.cpp
UTF-8
1,865
4.15625
4
[]
no_license
#include <stdio.h> #include <iostream> #include "List.h" using namespace std; //Interchange value in input positions. void swap(List *list, Position temp, Position next) { changeValue(list, temp, returnByPos(list, temp) ^ returnByPos(list, next)); changeValue(list, next, returnByPos(list, temp) ^ returnByPos(list...
true
3e828c197627cf79a3917ec13854681f81756f15
C++
rongyuhuang/bpmbase
/kbarutils/tickstorage.h
UTF-8
1,903
2.78125
3
[]
no_license
#ifndef TICKTSTORAGE_H #define TICKTSTORAGE_H #include "easyctp/easyctp.h" #include <vector> // // 在这里不要计算各个周期的bar,只提供最细粒度的如1分钟的就行了 // 计算各周期的bar,应该由信号系统自己去做,每个算法的要求都不一样 // 信号系统是独立并行线程集合,不是事件驱动,这里算了也没用 // struct TickVector { TickData** data; // ticks int len; // ticks // 当日统计数据 double openPrice = 0....
true
1be9ec2622efc3bd40bc741d5c8024312f6d4879
C++
tlow14/1220-Projects
/Project3/vehicle.cpp
UTF-8
1,129
3.390625
3
[]
no_license
/*Author: Tom Lowry Purpose: This file includes the implementation of Vehicle class (defined in Vehicle.h) Date: 26 March 2018 Summary of Modification: None */ #include "vehicle.h" #include <cstring> //Needed for static variable to declared it for all classes ostream* Vehicle::out= &cout; //constructor initi...
true
04d1c483d820f242d9aaf5b82d1fc21b06d7c0a4
C++
NewSNode/zdb
/core/page_buffer.h
UTF-8
1,191
2.640625
3
[ "BSD-3-Clause" ]
permissive
/** * Copyright (c) 2016, Paul Asmuth <paul@asmuth.com> * All rights reserved. * * This file is part of the "libzdb" project. libzdb is free software licensed * under the 3-Clause BSD License (BSD-3-Clause). */ #pragma once #include <stdlib.h> #include <algorithm> #include <vector> namespace tsdb { class PageB...
true
456cd2eda583354eb7e2e5f170276b4bd8d25eaa
C++
ravinderdevesh/SPOJ
/BUSYMAN-13841925-src.cpp
UTF-8
723
2.84375
3
[]
no_license
#include<iostream> #include<stdio.h> #include<algorithm> using namespace std; struct activity { int first,second; }; bool val(struct activity a,struct activity b) { if (a.first == b.first) return a.second>b.second; return a.first<b.first; } activity act[100001]; int main() { int t,i,count,num; cin>>t; wh...
true
54e5044834094fb6caad6dd2d3c73634f5ef1fd0
C++
kverty/homeworks
/semester1/3 homework/2.cpp
UTF-8
1,583
3.96875
4
[]
no_license
#include <iostream> #include "string.h" #include <stdio.h> using namespace std; void swap(char &x, char &y) { char t = x; x = y; y = t; } void qsort(char* arr, int left, int right) { int i = left; int j = right; int m = (i + j) / 2; while (i <= j) { while (arr[i] - '0' < arr[...
true
a004b2c972fe1ce9cb06e0d1677ed5aac264e220
C++
davmrtl/IFT2008-Laboratoires-E2017
/Laboratoire3/PileTD/Pile.h
UTF-8
1,754
3.40625
3
[]
no_license
/** * \file Pile.h * \brief Classe définissant le type abstrait pile * \author Ludovic Trottier * \author Mathieu Dumoulin <mathieu.dumoulin@gmail.com> été 2013 * \author Abder * \version 0.3 * \date mai 2014 * * Représentation dans une liste chaînée */ #ifndef PILE_H #define PILE_H #include <iostream> #inc...
true
0ec4f9963b92f1bd229d0025926b506809ba20dc
C++
maxfish/GameDevNights
/game/game/Player.cpp
UTF-8
1,923
2.90625
3
[ "MIT" ]
permissive
// // Created by max on 05/02/17. // #include "Player.h" #include "Game.h" static const int WALK_SPEED = 2; Player::Player(Graphics &graphics, InputController *inputController, int joystick_index) { Entity(); _framesStore = new FramesStore(graphics); _framesStore->load("resources/sprites/drako", "drako....
true
254854f0f8d28b8092e05ac1b02731283d23fe7f
C++
Orion116/College-Assignments
/MTH-221/lab20/lab 20/lab 20.cpp
UTF-8
2,311
3.671875
4
[]
no_license
// lab 20.cpp : Defines the entry point for the console application. // Joshua Wiley // mth22113 #include "stdafx.h" #include "rational.h" using namespace std; int _tmain(int argc, _TCHAR* argv[]) { // vector declearations rational a, b, c, S, M, SM; // user inputs fractions cout << "Enter the firs...
true
a01344f57a36f47867a9eadc78e317614330b09d
C++
yaesoubilab/AgentBasedSIRlib
/TestSIRlib/SIRSimRunner.cpp
UTF-8
10,822
2.546875
3
[]
no_license
#include "SIRSimRunner.h" SIRSimRunner::SIRSimRunner(string _fileName, int _nTrajectories, double _lambda, double _gamma, \ long _nPeople, unsigned int _ageMin, unsigned int _ageMax, \ unsigned int _ageBreak, unsigned int _tMax, unsigned int _deltaT, \ unsigned int _pL...
true
dde394b0c4a04cea351f69ee2f9167c2b6f9664e
C++
alexandraback/datacollection
/solutions_5731331665297408_0/C++/Theogry/CODEJAM_1B_C.cpp
UTF-8
2,315
2.5625
3
[]
no_license
#include <cstdio> #include <cstdlib> #include <algorithm> #include <queue> #include <cmath> #include <iostream> #include <fstream> #include <string> #include <vector> #include <memory.h> using namespace std; #define FOR(i,s,e) for (int i=(s); i<(e); i++) #define FOE(i,s,e) for (int i=(s); i<=(e); i++) #d...
true
06595486f9991b85b879437797f7e1e00c2062a0
C++
GuMiner/agow
/Managers/ModelRenderStore.cpp
UTF-8
2,062
2.59375
3
[ "MIT" ]
permissive
#include <glm\gtc\matrix_transform.hpp> #include "Generators\PhysicsGenerator.h" #include "logging\Logger.h" #include "Physics.h" #include "ModelRenderStore.h" // TODO these should be calculated and elsewhere. const int MODELS_PER_RENDER = 65536; const int MODEL_TEXTURE_SIZE = 512; ModelRenderStore::ModelRenderStore(...
true
d3759c5d6ecea0ccf53bf1d86cc7d524cc2d4f28
C++
mananssnay/SuperAlcoholDispenser
/UnitTest/servo/servo.ino
UTF-8
421
2.671875
3
[]
no_license
#include <Servo.h> Servo myservo; int sensor = 0; void setup(){ myservo.attach(9); } void loop(){ sensor = digitalRead(sensor); for(sensor=0; sensor<=180; sensor++){ myservo.write(sensor); delay(15); ...
true
3740060a00309dcd41a72aaf32bba526e3ea47c3
C++
j-mathes/PPP
/Chapter 13/Classes/Regular_polygon.cpp
UTF-8
475
3.171875
3
[]
no_license
#include "Regular_polygon.h" void Graph_lib::Regular_polygon::draw_lines() const { Polygon poly; for (int i=0; i<s; ++i) { poly.add(polygon_point(i * 360 / s)); } poly.draw_lines(); } Graph_lib::Point Graph_lib::Regular_polygon::polygon_point(int d) const { double radians = d * 3.14159265 / 180; Point result...
true
e0f9b1a310b4a5ba3d8152d047f88ca1bd3c4cff
C++
Cruyun/C-exercise
/Algorithm-Lesson/BM.cpp
UTF-8
1,868
3.203125
3
[]
no_license
// 字符串匹配 - BM 算法 // 坏字符 void PreBMBc(string &pattern, int m, int bmBc[]) { int i; for (i = 0; i < 256; ++i) { bmBc[i] = m; } for (i = 0; i < m - 1; ++i) { bmBc[pattern[i]] = m - 1 - i; } } // 好后缀 // 求pattern中以i位置字符为后缀和以最后一个字符为后缀的公共后缀串的长度 void suffix(string &pattern, int m, int suff...
true
23045e9946c1c1a832883c35f593ed1f5ceb2f97
C++
kremena1993/Yanev--Kremena--Assignments--48969
/Asisgnment 2/exmpl 9.2.cpp
UTF-8
962
3.640625
4
[]
no_license
/******************************************************************************/ /****************************** Homework 9.2 ********************************** /******************************************************************************/ #include <iostream> using namespace std; int main() { int n; float sum...
true
d7dd6215d1434ca0f3429115d14ed5c69e491429
C++
fwqaq/vscode
/3_7pk小游戏(多态)/3_7pk小游戏(多态)/3_7pk小游戏(多态).cpp
GB18030
1,301
3.28125
3
[]
no_license
#include <iostream> using namespace std; #include "Moster.h" #include "Knife.h" #include "Hero.h" #include "DragonSword.h" #include "weapon.h" int main(){ // Moster* moster = new Moster; //Ӣ Hero* hero = new Hero; // Weapon* knife = new Knife; Weapon* dargon = new DragonSword; cout << "ѡ" << endl; cout << "1.ֿ...
true
b43124d3916de09b29a6285f30fb858851957d24
C++
sycLin/VFX-Project-1
/ImageAlignment.h
UTF-8
8,684
2.96875
3
[]
no_license
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <iostream> #include <cstdio> using namespace std; using namespace cv; namespace ImageAlignment { class Bitmap { public: Bitmap() { _dim1 = 0; _dim2 = 0; _real_dim2 = 0; } Bitmap(int dim1, int dim2) { if(dim1 < 0...
true
b08d7d31723d4b2660031600b2d5f9e74cc2b4bd
C++
mattsousaa/POO_2018.2
/Pratica 7/inc/disciplina.h
UTF-8
377
2.546875
3
[]
no_license
#ifndef DISCIPLINA #define DISCIPLINA #include <iostream> #include <sstream> #include <map> #include <vector> #include <string> using namespace std; class Disciplina{ public: string nome, id; Disciplina(string nome, string id); string toString(Disciplina &disciplina); }; std::ostream& operator<<(std:...
true