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
92867096c6c83417789e18f6d9b4ae45f601dad3
C++
CocoMelon/HalfEdge
/Brep/HE.h
UTF-8
1,405
3.21875
3
[]
no_license
#pragma once #include<vector> class Face; class Loop; class HalfEdge; class Edge; class Vertex; class Solid { public: Solid *prevs, *nexts; Face *sfaces; Edge *sedges; Solid() :prevs(nullptr), nexts(nullptr), sfaces(nullptr), sedges(nullptr) { } void AddFace(Face *f); bool RemoveFace(Face *f); void AddEdge(Edge ...
true
0b2fc6e62c15ec924bb1b18719a13f3f9b5b8543
C++
RamiroRD/sensor-tpiid
/src/common/Log.cpp
UTF-8
7,505
3.296875
3
[]
no_license
#include "common/Log.h" #include <iostream> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <sys/file.h> #include <cstring> #include <cassert> #include "common/paths.h" static constexpr size_t HEADER_SIZE = sizeof(Count)+sizeof(Index); static constexpr size_t RECORD_SIZE = sizeof(Temperature) ...
true
f836f46c8f2e2d953d8904135af6483c1b4a0c17
C++
L33TT12/gra
/Mapa.h
UTF-8
844
2.578125
3
[]
no_license
#ifndef MAPA_H_INCLUDED #define MAPA_H_INCLUDED #include <iostream> using std::cout; using std::endl; using std::cin; using std::ostream; class Mapa { private: int CurrentPlace; char** Map; bool** IsEmpty; bool WIN; bool* XX; bool* OO; int NextPrzedzial(int,int); int P...
true
d1994138c38432311fde9e41cb27b0774f1e5148
C++
shadowplay7/KalkulatorQt
/KalkulatorQt/KalkulatorQt/Kalkulator.cpp
UTF-8
584
3.140625
3
[]
no_license
#include "Kalkulator.h" double Kalkulator::getA() { return a; } double Kalkulator::getB() { return b; } void Kalkulator::setA(double &x) { a = x; } void Kalkulator::setB(double &y) { b = y; } double Kalkulator::sumElements() { return getA() + getB(); } double Kalkulator::subElements() { return getA() - getB...
true
4b8c81383297506597871152b97962a6b738c579
C++
sumimim33/URIOJ
/1022 TDA Rational/main.cpp
UTF-8
1,190
2.890625
3
[]
no_license
#include <bits/stdc++.h> typedef long long int ll; using namespace std; void make_small(ll a, ll b) { ll s, t; bool flag = false; ll c; ll mini = abs(min(a,b)); for(ll i=mini; i>=2; i--) { if(a%i==0&&b%i==0) { c = i; flag = true; break; ...
true
917204f658cfbf0bc512c81ded4ce0884c1c05d2
C++
danielwboyce/cpp-learning
/08 -- Real Estate/Property.h
UTF-8
826
3.0625
3
[]
no_license
#pragma once #include <iostream> #include <string> #include <sstream> using namespace std; class Property { protected: string address; bool is_rental; double value; static int property_id; int id; public: //Constructor and destructor Property(string address_in, bool is_rental_in, double val...
true
0b6a599d2e610a79ff8f40fdd737fd1e96c87f1d
C++
ComanValentin/OOP-Laboratory-Projects
/Delivery_Project_2/Delivery_Project_2/CEO.h
UTF-8
796
2.96875
3
[]
no_license
#ifndef MANAGER_H_ #define MANAGER_H_ #include "DeliveryCompany.h" class CEO { public: CEO(){ } CEO(string name, DeliveryCompany deliveryCompany) :name(name), deliveryCompany(deliveryCompany) { } CEO(const CEO& val) :name(val.name), deliveryCompany(val.deliveryCompany) { } ~CEO() { } C...
true
d1fd04419a301f7c9ce0d30bafc609385794906e
C++
Tim-Paik/cpp
/oj/1.4/15.cpp
UTF-8
158
2.921875
3
[]
no_license
//15:最大数输出 #include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << (a>b?(a>c?a:c):(b>c?b:c)); return 0; }
true
eb5dca46060dad0ba6be87dd05abd6c698361c99
C++
hans2004516/taiko
/taiko/note.h
UTF-8
837
3.015625
3
[]
no_license
#pragma once #include <SFML/Graphics.hpp> #include <iostream> #include "texture_manager.h" enum class Note_Type { INNER, OUTER }; /* * Note class used by note_generator.cpp * Creates a CircleShape and associated Note_Type, velocity, and texture * and provides draw and move functions */ struct Note : public sf::...
true
ce18722a2c9e2197f1cd49a3cb9cbe6acf9e6ab2
C++
atul337/Line_Following
/fine_rotation/LSA_fine_rotation.ino
UTF-8
2,684
2.8125
3
[]
no_license
const byte analogPinF = 1; // Connect AN output of LSA1 to analog pin 0 const byte junctionPulseF = 28; // Connect JPULSE of LSA1 to pin 28 const byte analogPinR = 2; // Connect AN output of LSA2 to analog pin 1 const byte junctionPulseR = 29; // Connect JPULSE of LSA2 to pin 29 const byte analogPinL = 0; // ...
true
1745aafddf3a1ba0afecc001fb334373a7c915a7
C++
bfogerty/RayTracer
/src/time/StopWatch.h
UTF-8
642
2.78125
3
[]
no_license
#include <windows.h> class StopWatch { public: StopWatch() { QueryPerformanceFrequency(&countsPerSecond); invCountsPerSecond = 1.0f / countsPerSecond.QuadPart; } inline void Start() { QueryPerformanceCounter(&beginCounts); } inline float Stop() { QueryPerformanceCounter(&endCounts); float delta = f...
true
a4bd93ed032371abcc1c038850d7584f4dfb753e
C++
akincam/Object-Oriented-Programming--Cpp
/HW5/151044007/cell.cpp
UTF-8
345
2.671875
3
[]
no_license
#include <iostream> #include <string> #include "cell.h" using namespace std; namespace ConnectFour { Cell::Cell() : return_row(0), return_column(0), cell(0) { /*Body intentionally empty*/ } Cell::Cell(char cell) { setCell(cell); } Cell::Cell(int cell_row ,int cell_column) { setRow(cell_row); setC...
true
53b3a2f68d873a0220f992f2b6d4941b37686b33
C++
AsderYork/ShortGame1
/GameSimulation/GameSimulation.h
UTF-8
2,878
2.65625
3
[]
no_license
#pragma once #include "EntitiesBase.h" #include "GS_PlayerController.h" #include "GS_EntityController.h" #include "Mixin_Controller.h" #include "EntityGenerator.h" #include "GameTime.h" #include "GamePhysics.h" #include "GameObject.h" //Mixins #include "Mixin_Movable.h" #include "Mixin_Health.h" #include "Mixin_Objec...
true
f1b32f3f9d71c00ff50870e9a79e72dd218f499c
C++
orbenda1905/SmartCompany
/Project.h
UTF-8
2,483
2.53125
3
[]
no_license
/* * Project.h * * Created on: May 23, 2015 * Author: Benda */ #ifndef PROJECT_H_ #define PROJECT_H_ #include "Headers.h" #include "Manager.h" #include "Employee.h" #include "Client.h" #include "SmartPtr.h" #include "WriteToFile.h" class Project : public WriteToFile { private: string projId; int tot...
true
4824f96397fd2ed07457059ee094e58f454bf644
C++
bobodaye/myWorkSpace
/Algorithm/剑指offer/面试题7:用两个队列实现栈(拓展)/面试题7:用两个队列实现栈(拓展)/TestStack.cpp
UTF-8
253
2.640625
3
[]
no_license
#include <iostream> #include "QueueImpStack.h" int main() { CStack<int> s; s.push(1); s.push(2); std::cout << s.pop() << std::endl; s.push(3); std::cout << s.pop() << std::endl; std::cout << s.pop() << std::endl; return 0; }
true
cc00d02973d8f55e57d57053a7a9103187667cd3
C++
dangerrangerous/2-3-4-Tree
/2-3-4_B_Tree.h
UTF-8
2,040
3.25
3
[]
no_license
// 2-3-4_B_Tree.h // Brian Keppinger #pragma once class DataItem { public: // should the data be private? long data; // Default constructor DataItem(void); // Default destructor ~DataItem(void); void DisplayItem(); // void DestroyDI(); private: // void DestroyDataItem(DataItem* &dataItemPointer); }; cla...
true
f8eed153fe57c8eba148f61f5cc427343d5c17ac
C++
i05nagai/programming_contest_challenge_book
/src/algorithm/dynamic_programming/traveling_by_stagecoach_test.cc
UTF-8
1,012
3.21875
3
[]
no_license
#include <gtest/gtest.h> #include "algorithm/dynamic_programming/traveling_by_stagecoach.h" namespace algorithm { namespace dynamic_programming { TEST(traveling_by_stagecoach, simple1) { const int num_ticket = 2; const int num_city = 4; const int start_v = 2; const int end_v = 1; int tickets[] = { 3, 1,...
true
be53cbd72a54dbcc703e200c4c8c0390a4df9654
C++
rouman321/code-practice
/0938-rangeSumofBST.cpp
UTF-8
1,580
3.453125
3
[]
no_license
/* Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive). The binary search tree is guaranteed to have unique values. */ #include <iostream> #include "../LCInput/treeVector.h" class Solution { public: int rangeSumBST(Node* root, int L, int R) { ...
true
1b33c50cf67e4293e0f3d5f8b77f0f09efffdb01
C++
hoangsadn/castlevania
/CaslteVania/CaslteVania/Animations.cpp
UTF-8
1,701
3.015625
3
[]
no_license
#include "Animations.h" #include <cmath> void CAnimation::Add(int spriteId, DWORD time) { int t = time; if (time == 0) t = this->defaultTime; LPSPRITE sprite = CSprites::GetInstance()->Get(spriteId); LPANIMATION_FRAME frame = new CAnimationFrame(sprite, t); frames.push_back(frame); } void CAnimation::Render(floa...
true
f479a51dc15c0b600c584fd483de8a233a3e08d6
C++
cyyself/OILife
/ECNU/3269 - 爱吃糖果的 Pokémon.cpp
UTF-8
990
2.671875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; const int inf = 0x0fffffff; struct candy{ int type; int time; friend bool operator < (const candy &a,const candy &b) { if (a.time > b.time) return true; if (a.time == b.time && a.type > b.type) return true; return false; } candy(int _type,int _time) { type = _t...
true
2fcf67f1083798c0d314f650078f618b986b99ba
C++
jasonblog/note
/ds_algo/src/leetcode_v2/algorithms/MinimumPathSum/solve.cpp
UTF-8
1,795
3.140625
3
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> #include <vector> #include <algorithm> #include <iostream> using namespace std; class Solution { public: int minPathSum(vector<vector<int>>& grid) { return minPathSum1(grid); } private: int minPathSum1(vector<vector<int>>& grid) { if (grid.size(...
true
e367a6caa14e5613f3d7b709066d183fbe2c708d
C++
matt-han/ba_gui1
/IniFileHandler.h
UTF-8
2,804
2.5625
3
[]
no_license
/* * Opens, reads and closes cfg/ini files for automated testing */ #ifndef _INIFILEHANDLER_H #define _INIFILEHANDLER_H #include "Constants.h" #include "Tools.h" #include <string> #include <vector> #include <Windows.h> #include <stdlib.h> #include <fstream> using namespace std; class IniFileHandler { public: ...
true
395e42300e8fa2b41d3de56dfb7f3b8ffcc4ecc8
C++
polygontwist/ESP8266_WebServer_i2c
/i2c_sht21.cpp
UTF-8
2,085
2.671875
3
[ "MIT" ]
permissive
/* SHT2x - Digitaler Feuchte- & Temperatursensor (RH/T) http://www.sensirion.com/de/produkte/feuchte-und-temperatur/feuchte-temperatursensor-sht2x/ SHT21 - Standard Ausführung, +/-2% RH Genauigkeit Grösse: 3 x 3 x 1.1 mm Schnittstelle: I²C digital, PWM, SDM Betriebsspannung: 2.1 bis 3.6 V E...
true
f58e98ea73d8ee57deeecddfd269fe1627459cfd
C++
NoClay/C-Code
/自定义异常处理.cpp
UTF-8
243
2.75
3
[]
no_license
#include<iostream> using namespace std; void myterm() { cout << "This is my terminater ." << endl; exit(1); } int main(){ try{ set_terminate(myterm); throw "Exception ...";// }catch(int i){ cout << "test" << endl; } return 0; }
true
2e8ae4e66926e0414ae0065bdaa3d4d6857fc225
C++
imkiva/KiVM
/include/sparsepp/spp_smartptr.h
UTF-8
2,131
2.875
3
[ "LicenseRef-scancode-free-unknown", "MIT" ]
permissive
#if !defined(spp_smartptr_h_guard) #define spp_smartptr_h_guard /* ----------------------------------------------------------------------------------------------- * quick version of intrusive_ptr * ----------------------------------------------------------------------------------------------- */ #include <cassert...
true
de5a538865052798d4f382055fc47af752cbf404
C++
lucky-rydar/OpenLL
/OpenLL/main.cpp
UTF-8
404
2.609375
3
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <vector> #include <Windows.h> #include "DLLImport.h" #pragma warning(disable: 4996) using namespace std; DLLImport<int, int, int> sum("dll_learning.dll", "any_name"); //DLLImport<int, int, int> mult("dll_learning.dll", "mult"); int main(int argc, char** argv...
true
efa643d50f7484deb9edf21cf18ffc66ef2698bc
C++
momons/hateru_cocos2dx
/Classes/Util/Base64Util.h
UTF-8
818
2.71875
3
[]
no_license
// // Base64Util.h // hateru // // Created by HaraKazunari on 2016/08/21. // // #ifndef Base64Util_h #define Base64Util_h #include <string> #include <vector> using namespace std; /// Base64ユーティリティ class Base64Util final { public: /** * 変換 * * @param src 入力バッファ * @param length 入力バッファ長 * * @r...
true
6f381328da3a08c02358ed7c0ad0da86a36e5749
C++
ishaandhamija/LP-Fasttrack-Summer18
/07-char-arr/use-tool.cc
UTF-8
479
3.0625
3
[]
no_license
// Deepak Aggarwal, Coding Blocks // deepak@codingblocks.com #include <iostream> using namespace std; int cntChar(char arr[]){ int cnt = 0; int cur = 0; while(arr[cur] != '\0'){ switch(arr[cur]){ case ' ': case '\n': case '\t': break; ...
true
98914bf36b6c3995b3afa140e2a8626152dd2c0d
C++
yardstick17/UVA_Solutions
/uva11286.cpp
UTF-8
600
2.578125
3
[]
no_license
#include<iostream> #include<map>4 using namespace std; int main() { int t,count,i,j,k,x; int f1,f2; map<int, map<int,int> >m; while(1) { m.clear(); cin>>t; count=t; if(t==0) break; for(i=0;i<t;i++) { for(j=0;j<5;j++) { cin>>x; m[i][x]++; } //...
true
59250dca2c94c613d6a357df4d8e271204762d2c
C++
ObjectFICT/Christmas-Tree
/ChristmasTree.cpp
UTF-8
2,263
3.265625
3
[]
no_license
#include "christmasTree.h" christmasTree::christmasTree(int heightTree) { this->heightTree = heightTree; this->widthTree = heightTree * 2; } void christmasTree::buildBlockTree(double sizeFactor, int color) { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); int left{heightTree}, right{heig...
true
ca1801063151e548d2fff933518ad7edc5ffab97
C++
sanjeet724/CMPT_880
/Term Project/test_cases/working_case_set.cpp
UTF-8
1,566
3.25
3
[]
no_license
#include <iostream> #include <cstdint> #include <set> #include <random> #include <algorithm> using namespace std; std::string random_string() { auto randchar = []() -> char { const char charset[] = "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"; ...
true
ba19b1a6bb412b4178f6d9ac079412291438c021
C++
cgrimes91/CS2-Assembler
/assembler/test_push_pop.cpp
UTF-8
3,839
3.671875
4
[]
no_license
// Chris Grimes // cs23001 // test.cpp push() pop() for stack #include"stack.hpp" int main(){ { //Setup stack<int> test; //Test test.push(8); test.push(6); test.push(7); test.push(5); test.push(3); test.push(0); test.push(9); //Verify std::cout<<test.top()<<"==9"<<...
true
329ff4fb36d741f1877ae1f7e355c8a25e19df08
C++
yinzm/LeetCodeSolution
/Array/easy/840_Magic Squares In Grid.cpp
UTF-8
1,406
2.75
3
[]
no_license
#include <bits/stdc++.h> using namespace std; class Solution { public: bool check(vector<vector<int>>& grid, int x, int y) { int row = grid.size(), col = grid[0].size(); if (x+2 >= row || y+2 >= col) return false; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { ...
true
7f153677fe9456ae6e17d26f9582314bc665c297
C++
SourDumplings/CodeSolutions
/Book practices/《C++primer》 5th 练习代码/chapter3/Exercise3.32.cpp
UTF-8
421
2.734375
3
[]
no_license
/* @Date : 2017-12-15 20:14:14 @Author : 酸饺子 (changzheng300@foxmail.com) @Link : https://github.com/SourDumplings @Version : $Id$ */ /* p107 */ #include <iostream> #include <cstdio> #include <string> #include <vector> using namespace std; int main() { vector<int> v; for (int i = 0; i < 10; i++) ...
true
68ca383824b68d47d7b3eee438f6a0c394813b87
C++
rkurdyumov/cs225b
/project2/global_planner/src/global_planner.cpp
UTF-8
13,608
2.53125
3
[]
no_license
#include <ros/ros.h> #include <stdio.h> #include <tf/transform_listener.h> #include <tf/transform_broadcaster.h> #include <iostream> #include <geometry_msgs/PoseWithCovarianceStamped.h> #include <nav_msgs/OccupancyGrid.h> #include <nav_msgs/GridCells.h> #include "../../../include/search.h" #include "global_planner/Glob...
true
9b628845cca8c0c1363a712e08997244e33d15bd
C++
gitpackage/MohammedShafiuddin_Cplusplus
/mshafi2Proj7/Creature.h
UTF-8
596
2.5625
3
[]
no_license
#ifndef CREATURE_H #define CREATURE_H #include "Enums.h" #include <stdio.h> #include <stdlib.h> class Island; class Creature { protected: int row; int col; Island* isl; int daysElapsed; private: bool isAnt; int index; public: Creature(bool isant, Island* island, int index); boo...
true
bdd2cc3256033ef23815cad1530ddb3e345d2a12
C++
TigNerkararyan/Data_Structures_Cpp
/BineryTree/bineryTree.hpp
UTF-8
516
2.640625
3
[]
no_license
#ifndef BINERYTREE_H #define BINERYTREE_H struct BineryNode { int data; BineryNode *left; BineryNode *right; }; class SearchTree { public: SearchTree(); ~SearchTree(); void InsertBineryNode(int data); void destroy_tree(); BineryNode* SearchInBineryTree(int dat...
true
ca2cc2cdf0a6a81f2e826107ea873450129cb45a
C++
charles-pku-2013/CodeRes_Cpp
/read_file_seperated_by_space.cpp
UTF-8
542
2.96875
3
[]
no_license
#include <string> #include <iostream> #include <fstream> using namespace std; int main(int argc, char **argv) { std::ifstream ifs(argv[1], std::ios::in); std::string val; ifs >> val; if (ifs) { cout << val << endl; cout << val.length() << endl; } else { cout << "read val fa...
true
308a29c3511bfebf5774a73266e087b737760e2f
C++
Mindhunter26/LabAndPr
/Lab3/Labb3.cpp
UTF-8
1,097
2.796875
3
[]
no_license
#include "pch.h" #include "libbmp.h" #include <iostream> int main() { BmpImg img; img.read("pic9.bmp"); const int width = img.get_width() - 1; const int height = img.get_height() - 1; char pix[4000]; char y = 0; int pos = 0; int k = 0; int bit; bool isEnd = false; for (int i = height; i >= ...
true
6391d2f45a6ab0e5aade70e31b1faa6b4cacc568
C++
Svalburg/TypeSystemImplementation
/include/ValueString.h
UTF-8
270
2.671875
3
[]
no_license
#ifndef VALUESTRING_H #define VALUESTRING_H #include "Value.h" #include <string> class ValueString : public Value { public: ValueString(std::string value); std::string getValue(); virtual ~ValueString(); private: std::string value; }; #endif //VALUESTRING_H
true
929a7f9b6aef2de1652a0fa061c2ac6baca253c8
C++
abilkht/ds
/HashMap/map.cpp
UTF-8
4,091
3.171875
3
[]
no_license
#include "map.h" // From previous task: bool equal(const std::string& s1, const std::string& s2) { if (s1.size() == s2.size()) { for (size_t i = 0; i < s1.size(); ++i) { if (tolower(s1[i]) != tolower(s2[i])) return false; } return true; } return false; } // H...
true
0e33aa2ed32a3630ee7f3e1c5f6ce39a03909bcf
C++
Ball-Man/GOP
/src/card_best_forward.cpp
UTF-8
724
2.78125
3
[]
no_license
#include "card_best_forward.h" #include "gameboard.h" #include "screen.h" CardBestForward::CardBestForward(const String& text, int steps) : Card(text) { steps_ = steps; } void CardBestForward::Do(Gameboard& gameboard) const { int max = gameboard.Players()[0].Coins(); for(int i = 1; i < gameboard.Players().Leng...
true
049e0b9d266fd41f10b2f98bbd11d0b6249083a2
C++
watermantle/CPP_Financial_Engineering
/Homework/6 HW submission/4.2b/4.2b.1/Excercise4.2b.1.cpp
UTF-8
1,021
3.59375
4
[]
no_license
// Implement templated version of Array class // To test static variable for array default size #include <iostream> #include "Array.hpp" #include "Exception.hpp" // Declaration for a complete namespace using namespace YuBai::Containers; using namespace std; int main() { // Decalre three objects with default size of ...
true
9f9cef4cb492b4cf7d366b85568163a0244d6e39
C++
heyshb/Competitive-Programming
/CodeForces/PastContest/787/C.cpp
UTF-8
1,026
2.578125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long LL; int N; int K[2]; int S[2][7010]; int v[2][7010];//1 win -1 lose 0 ?? bool vis[2][7010]; int pre(int X,int step) { X-=step; if (X<=0) X+=N; } void print(int V) { if (V==0) printf("Loop "); else if (V==1) printf("Win "); else printf("Lose "); }...
true
9bbdc0745c2c5518e6fcf5e835d6f819e6210f19
C++
HunterKonoha/MathExpression
/src/MathExpression/ExpValue/Derive/Function/ExtendFunction.cpp
UTF-8
12,082
2.59375
3
[]
no_license
#include "ExtendFunction.h" #include "../../\ArrayEval.h" #include "../../Functions.h" #include <boost\multiprecision\cpp_dec_float.hpp> #include <boost\limits.hpp> template<typename T, int ArgumentSize> paf::MathExpression::ExpValueClass::ExtendFunction::Sum<T, ArgumentSize>::Sum(TreeType Node, NodeType Func) try :Ar...
true
cb8355af83bc9623a5edb248eb8da5dd6235d996
C++
Wlain/graphic_demo
/cross_platform_demo/src/utils/basic_timer.h
UTF-8
3,066
2.953125
3
[ "Apache-2.0" ]
permissive
// // Created by william on 2020/9/21. // #ifndef CPP_DEMO_BASIC_TIMER_H #define CPP_DEMO_BASIC_TIMER_H #pragma once #if defined(_WIN32_) || defined(WIN32) || defined(_WIN64_) || defined(WIN64) #include <windows.h> #elif !defined(__ANDROID__) && defined(__linux__) || defined(__APPLE__) #include <sys/time.h> #...
true
e34f686a201e447adff78a3cf4d11c2e502b985d
C++
zungry/leetcodeCode
/Letter Combinations of a Phone Number.cpp
UTF-8
918
3.015625
3
[]
no_license
class Solution { private: string num[10]; public: vector<string> letterCombinations(string digits) { vector<string> ret; ret.clear(); creatDict(); //string ans; //ans.clear(); dfs(digits,0,digits.size(),"",ret); return ret; } void...
true
72f91494b5eec33fb097cba7a902ef1d2d243234
C++
shenhuashan/SysResourceMonitor
/VSSysResourceMonitor/SysResourceMonitor/Source/main.cpp
GB18030
1,711
2.578125
3
[]
no_license
#include <windows.h> #include <QtWidgets/QApplication> #include <QMessageBox> #include <QDir> #include "SRMError.h" #include "SRMScopeOnExit.h" #include "SysResourceMonitor.h" // жϳ֮Ļ, ֻܴһ bool checkUnique() { std::wstring sTitle = L"ʾ"; std::wstring sMessage = L"SysResourceMonitor Ѿ"; std::wstring sMutex = L"VS_Sy...
true
dc03600c88e703b5837d346d078fa931478b9e4e
C++
cahnz1/CMSC-435
/proj2/trace.h
UTF-8
3,030
2.515625
3
[]
no_license
#ifndef TRACE_H #define TRACE_H //#include "slVector.H" #include <vector> #include <Eigen/Dense> class Ray { public: Eigen::Vector3d e; Eigen::Vector3d d; int depth; Ray(const Eigen::Vector3d &_e, const Eigen::Vector3d &_d, int _depth = 0) : e(_e), d(_d), depth(_depth) {}; }; class Fill { public: Eigen::V...
true
c3a05bbf682fec8565dc4df902f4c9cc7468883a
C++
adarsxh/Data-structure-in-C
/tree/BT to DLL.cpp
UTF-8
913
3.171875
3
[]
no_license
#include<iostream> #include<bits/stdc++.h> #include<stack> #include<queue> using namespace std; struct node{ int key; node *right; node *left; node(int x){ key = x; right = NULL; left = NULL; } }; node *prevv=NULL; node *btd(node *root){ if(root==NULL) return root; node *head=bt...
true
4965b8b28cb0635d10d66a92078c362fb16ae39c
C++
shu7bh/SnakeGameGraphical
/Engine/Entity.cpp
UTF-8
580
3.25
3
[]
no_license
#include "Entity.h" Entity::Entity(int x, int y, int r, int g, int b, int width, int height) : x(x), y(y), r(r), g(g), b(b), width(width), height(height) {} void Entity::draw(Graphics& gfx) const { for(int i = x; i < x + width; ++i) for(int j = y; j < y + height; ++j) gfx.PutPixel(i, j, r, g, b); } bool Entit...
true
908587321daf471d7ea3ce5b7e756dcb5466c885
C++
xzben/openGLStudy
/source/editor/source/view/EditorWindow_Menu.cpp
UTF-8
2,072
2.53125
3
[]
no_license
#include "EditorWindow.h" #include "EditorMenu.h" #include "EditorMenuBar.h" #include "DefineId.h" #include "EditorFrame.h" #include "event/EditorEventMgr.h" BEGIN_EDITOR_NAMESPACE struct MenuDefineItem { IDMainMenu id; const char* name; const char* shortcuts; std::vector<MenuDefineItem> items; }; static MenuDef...
true
bd3816078e8f875f1817f86ef88053bf7f6109a9
C++
anlaneg/test
/tool/easyweb/src/lib/libxml/interface/tinyxml_sxpath_adapter.cpp
UTF-8
5,377
2.6875
3
[]
no_license
/* * tinyxml_sxpath_adapter.cpp * * Created on: Oct 12, 2013 * Author: along */ #include <assert.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include "libxml.h" #include "libsxpath.h" #include "tinyxml_private.h" /** * 子节点获取 * @param[in] parent 父节点 * @param[in] child_node_name 子节点名 注意...
true
4b6543ac2fe80318fab5bfb7f6d9fda08ed7ce88
C++
Tang1001/Airsim_Drones_TT
/Demo417/src/PathPlaningController/BEM/BEMMathUtil.hpp
UTF-8
1,050
2.578125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#pragma once #include "BEMCommon.hpp" namespace sxc { namespace bem { class BEMMathUtil{ public: template <class F> static double unitIntegrate(F f){ //return gauss<double, 4>::integrate(f, -1, 1); return 0; } static double cross(const Eigen::Vector2d& a, const Vector2d& b) { return a.x()*b.y() - b.x()*...
true
c0aa11ac21635d9cda38761788f192db5ca11a7a
C++
neoking123/Study
/C++/OperatorOverloading/main.cpp
UHC
2,519
3.421875
3
[]
no_license
#include <iostream> using namespace std; class Point { int x; int y; public: explicit Point(int _x = 0, int _y = 0) :x(_x), y(_y) { } int GetX() const { return x; } int GetY() const { return y; } void SetX(int _x) { x = _x; } void SetY(int _y) { y = _y; } void Print() const { cout << x...
true
4748cc4a33490c3190b629cab340ebab15cf8968
C++
hicotton02/BeverageController
/src/network_wrapper.cpp
UTF-8
2,324
2.734375
3
[ "MIT" ]
permissive
#include "network_wrapper.h" #include <HardwareSerial.h> #include <WiFi.h> #include <ArduinoOTA.h> #include "time.h" NetworkWrapper::NetworkWrapper() {} void NetworkWrapper::begin(CONFIG_T config) { Serial2.println("Setting up WiFi"); char localIp[16]; if (config.ssid && config.pass) { WiFi.mo...
true
e8bc6a24b671f155199144dff33c71e0db13f7f9
C++
kerwinzxc/AOFramework
/AOFramework/Utility/MsTime.hpp
SHIFT_JIS
2,954
3.0625
3
[]
no_license
/************************************************************* * @file MsTime.hpp * @brief MsTimeNXwb_[ * @author Tatsunori Aoyama * @date 2015/01/01 *************************************************************/ #ifndef _Include_MsTime_hpp_ // CN[hK[h #define _Include_MsTime_hpp_ //---------------------------...
true
8f624b26a2c3877b7f2e09b10c5648e767ee7851
C++
Haxrox/ClawRetrievalSystem
/ClawRetrievalSystem.ino
UTF-8
7,546
2.5625
3
[]
no_license
// Libraries #include <NewPing.h> // include the NewPing library for this program #include <Servo.h> // Constants // // States #define CALIBRATE 0 #define GROUNDED 1 #define SENSE 2 #define GRABBED 3 #define RELEASE 4 // Symbolic constants // #define TRUE 1 #define FALSE 0 // Modes #define SON...
true
59ac74ece197d180049574a84c465dee17c161db
C++
tombom66/Computer-science
/labex04-tombom66/prob02/test/unittest.cpp
UTF-8
3,038
3.140625
3
[ "MIT" ]
permissive
#include <gtest/gtest.h> #include <gmock/gmock.h> #include "gtest_ext.h" TEST(TuffyPrinter, OutputFormat) { std::string unittest_output = "Welcome to Tuffy Printing services.\n" "How many pages do you need printed? " "Select a printing quality from the list:\n" ...
true
799cde887973495b460c32e7afaaae0eb1597905
C++
prem-pratap/C-Programs-DSA
/circular_queue.cpp
UTF-8
1,333
3.796875
4
[]
no_license
//CIRCULAR QUEUE #include<stdio.h> #include<stdlib.h> typedef struct node{ int data; struct node *next; }node; node *last; void enqueue(); void dequeue(); void display(); int main(){ int ch; while(1){ printf("\nEnter your choice\n1.Enqueue\n2.Dequeue\n3.Display"); scanf("%d",&ch); switch(ch)...
true
2dfa2114b0b7468902c0ab1d62d3662a8b2c0538
C++
bog2k3/bugs
/bugs/entities/WorldConst.h
UTF-8
1,326
2.546875
3
[]
no_license
/* * WorldConst.h * * Created on: Jan 20, 2015 * Author: bog */ #ifndef OBJECTS_WORLDCONST_H_ #define OBJECTS_WORLDCONST_H_ #include "../math/constants.h" #include <glm/vec2.hpp> class WorldConst { public: static constexpr float FoodChunkDensity = 7.f; // [kg/m^2] static constexpr float FoodChun...
true
4c8d282cfe51098970c050aa4e8033a48ac65ec0
C++
Tahsib/Codeforces-Solves
/1005-A.cpp
UTF-8
432
2.5625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; #define MAX 1000 int main() { vector<int>v; int n,a[MAX]; cin>>n; for(int i=0;i<n;i++) { scanf("%d",&a[i]); } for(int i=0;i<n-1;i++) { if(a[i+1]==1) { v.push_back(a[i]); } } v.push_back(a[n-1]...
true
1081db087f860d43e9a8f163ffe24e764e617494
C++
dwmkFD/AtCoderSubmit
/ProconLibrary/UnionFind.cpp
UTF-8
566
2.671875
3
[]
no_license
template<typename T = ll> struct UnionFind { vector<T> par; UnionFind( T n ) : par( n, -1 ) {} void init( T n ) { par.assign( n, -1 ); } T find( T x ) { if ( par[x] < 0 ) return ( x ); else return ( par[x] = find( par[x] ) ); } bool isSame( T x, T y ) { return ( find( x ) == find( y ) ); } ...
true
5225126d9d442507efb127d97038138dca2910eb
C++
SaumilShah66/ENPM808X-PID
/test/test.cpp
UTF-8
2,180
3.09375
3
[]
no_license
// Copyright 2019 Saumil Shah and Shantam Bajpai /** * * @file test.cpp * @brief Test source file for PID controller. * Contains the required headers and methods. * @author Saumil Shah (Driver) and Shantam Bajpai (Navigator) * @date 26th September 2019 * @version 1.0 * */ #include <gtest/gtest.h> #in...
true
06100deb785baa507c66c4fc89bd112ec78e5f7f
C++
xuchong/LeetCode
/ValidPalindrome/main.cpp
UTF-8
1,260
3.25
3
[]
no_license
#include<iostream> #include<cstring> #include<string> using namespace std; class Solution { private: bool isNumberOrChr(char a) { if((a>='0'&&a<='9')||(a>='a'&&a<='z')||(a>='A'&&a<='Z')) { return true; } return false; } int isNumber(char a) { if((a>='0'&&a<='9')...
true
291a647cce8854b522361f136c7f8d5d31bee179
C++
qgzang/DNest4
/code/Examples/RJObject_SineWaves/MyConditionalPrior.cpp
UTF-8
1,337
2.734375
3
[ "MIT" ]
permissive
#include "MyConditionalPrior.h" #include "DNest4/code/DNest4.h" #include <cmath> using namespace DNest4; MyConditionalPrior::MyConditionalPrior(double x_min, double x_max, double mu_min, double mu_max) :x_min(x_min) ,x_max(x_max) ,mu_min(mu_min) ,mu_max(mu_max) { } void MyConditionalPrior::from_prior(RNG& rng)...
true
b3070a9e4fa4a1b4afc3eb6f8cdd99c2a4ea5d9b
C++
The-Team-7/The-KU-Journey
/Game/StateMachine.h
UTF-8
566
2.65625
3
[]
no_license
#pragma once #include<memory> #include<stack> #include "State.h" namespace sg { typedef std::unique_ptr<State> StateRef; ////// STATE MACHINE CLASS STORES AND MANAGES THE STATES USED IN THE GAME ///// ////// IT HELPS IN TRANSITION BEWTEEN DIFFERENT STATES ///// class StateMachine { public: void AddState(Sta...
true
8b1c42a3da4a6979bca0dc1fb53350716d956ad0
C++
237K/ProblemSolving
/SAMSUNG_SWEA#6959_ver2.cpp
UHC
3,790
3.5
4
[]
no_license
// // OS Windows // 2019.02.18 // // [Algorithm Problem Solving] // // SAMSUNG SW Expert Academy [#6959] <̻ > (D4) // // ( Ǯ ) // 1. 1ڸ ̸ B ¸ // 2. ־ ¦ ڸ ڵ 10̸̸ A ¸, 10̸̻ B ¸, 19̸̻ A ¸, 28̸̻ ٽ B ¸...... // 3. ־ Ȧ ڸ ڵ 10̸̸ B ¸, 10̸̻ A ¸, 19̸̻ B ¸, 28̸̻ ٽ A ¸...... // Answer) 5678 , // 1) ־ Ʈ( 10 =...
true
5be2ef7b674499ad4090fce2cce092f784d33c16
C++
chenzhengchen200821109/simple-log
/slog/logging.h
UTF-8
4,958
2.859375
3
[]
no_license
#ifndef LOGGING_H #define LOGGING_H #include <string> enum LogLevel { LOGLEVEL_INFO = 0, // Informational. This is never actually used by libprotobuf. LOGLEVEL_WARNING, // Warns about issues that, although not technically a // problem now, could cause problems in the future. Fo...
true
8bd456d84f478be12abd831405e5d4c2da69663a
C++
hoklavat/beginner-algorithms
/MORE/Greedy(HuffmanCoding).cpp
UTF-8
3,940
3.703125
4
[]
no_license
//Greedy(HuffmanCoding) //Task: generate huffman codes for given array of unique characters where each character has specific frequency of occurence. //each binary code is unique for single character and may be of variable length. //bitstream code should only be expressed in one single combination of characters. //Ref...
true
93fdd633b7e05663fde119154133bda7807e6f96
C++
laru1288/LostLight
/Lampara.cpp
UTF-8
685
2.59375
3
[]
no_license
#include "Lampara.h" Lampara::Lampara(){ _textura.loadFromFile("imagenes/Lamparita/Lamparita_triste.png"); _lampara.setTexture(_textura); set_position(1 + rand() % 6); } sf::Sprite& Lampara::get_draw_Lampara() { return _lampara; } void Lampara::update() { } void Lampara::set_position(i...
true
e07dd4d076181121db66cb8dada87e4bb790bb92
C++
dwikiriswanda/eS-Teh-Dek
/TP/TP 5/circulardll-first/circulardll-first.h
UTF-8
926
2.6875
3
[]
no_license
#ifndef CIRCULARDLL-FIRST_H_INCLUDED #define CIRCULARDLL-FIRST_H_INCLUDED #include <iostream> #define first(L) L.first #define prev(P) P->prev #define info(P) P->info #define next(P) P->next /* Name : Muhamad Dwiki Riswanda NIM : 1302194015 */ using namespace std; typedef char infotype; typedef struct elmList...
true
518f45e04e17ecc3576e80278241d1e05ff07737
C++
juhyun-nam/expression-inserter
/include/expression_inserter/value_type.h
UTF-8
606
3.171875
3
[ "MIT" ]
permissive
/// \file value_type.h /// \brief value expression을 담는 구조체 정의 /// \author juhyun-nam /// #ifndef EXPRESSION_INSERTER_VALUE_TYPE_H_ #define EXPRESSION_INSERTER_VALUE_TYPE_H_ #include <functional> namespace detail { /// LEVEL과 int의 arithmetic operation 동작을 담는 구조체 class Value { public: Value() { expr_ = [](int ...
true
0e91b258d7af1e8b023ca7143f6ed7777a315295
C++
taketakeyyy/atcoder
/abc/065/a.cpp
UTF-8
290
3.015625
3
[]
no_license
#include <iostream> using namespace std; int main(void){ int X, A, B; cin >> X >> A >> B; // implements if(B <= A){ printf("delicious\n"); } else if(B > (A+X)){ printf("dangerous\n"); } else{ printf("safe\n"); } return 0; }
true
694e578028e2aa728d656ee283fb5dd172fc13b3
C++
Ricardo-py/learn_opencv-for-C
/直方图.cpp
UTF-8
4,715
2.671875
3
[]
no_license
#include<opencv2/imgproc/imgproc.hpp> #include<opencv2/highgui/highgui.hpp> #include<iostream> #define INPUT_TITLE "input image" #define OUTPUT_TITLE "直方图计算" using namespace cv; using namespace std; int main() { Mat srcImage = imread("C:/Users/Richard/Desktop/timg.jpg"); if (srcImage.empty()) { cout << "图像加载失败"...
true
ff02f8cc571506bfc04adb3a820cc9f7db53a41a
C++
Danvil/Darwin
/Candy/src/Candy/Cubes/Generator/CornellBox.h
UTF-8
2,181
3.0625
3
[]
no_license
/* * CornellBox.h * * Created on: May 2, 2011 * Author: david */ #ifndef CORNELLBOX_H_ #define CORNELLBOX_H_ namespace Generators { /** * Preferred size: x1=-4, x2=+4, y1=-4, y2=+4, z1=-4, z2=+4; */ struct CornellBox { private: int cBoxSize; int cLightSize; double cSphereRadius; int cSphere...
true
af7b9269cdd13b66a73947c2c47db715076a96a9
C++
doctorbigtime/cxx17
/variant.cpp
UTF-8
1,394
3.609375
4
[]
no_license
#include <variant> #include <iostream> #include <iostream> auto main(int argc, char** argv) -> int { using variant = std::variant<int, double, std::string>; auto print_visitor = [](auto const& v) { std::cout << v << std::endl; }; variant v = 123; // contains int int i = std::get<int>(v...
true
60d9cc9d612d63041f05b7cfc2b7870a3ca08b55
C++
ik15151/etf-2010-rpr-internet-accounting
/DZ3/DZ3/trunk/InternetAccounting/KontrolaTimer.h
UTF-8
2,761
2.59375
3
[]
no_license
#pragma once using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; namespace InternetAccounting { /// <summary> /// Summary for KontrolaTimer /// </s...
true
05b407360fbaa1bf943f8aa3642b87063112cc24
C++
jonathondgebhardt/AOC-2020
/solutions/day04/part2/main.cpp
UTF-8
1,921
2.78125
3
[]
no_license
#include <day04/Utilities.ipp> #include <cassert> #include <iostream> // File auto-generated by StartNewDay struct Credential_Part2 : public util::day04::Credential { explicit Credential_Part2(const std::vector<std::string>& x) : util::day04::Credential(x) {} bool isValid() override { if(util::day04::Cred...
true
08ae7275aff87de3677592f71c96479ed30e6ac4
C++
zhouxindong/rola
/drop/lambdas.h
UTF-8
815
2.90625
3
[]
no_license
// inheriting from a lambda (C++11) template <typename TCall, typename UCall> class SimpleOverloaded : public TCall, UCall { public: SimpleOverloaded(TCall tf, UCall uf) : TCall(tf), UCall(uf) {} using TCall::operator(); using UCall::operator(); }; template <typename TCall, typename UCall> SimpleOverloaded<TCa...
true
a4e5fcdd68ed2338b1fb6338228f83afe985ab4c
C++
rehno-lindeque/osi-qparser
/src/tokenregistry.inl
UTF-8
7,370
2.84375
3
[]
no_license
#ifdef __QPARSER_TOKENREGISTRY_H__ #ifndef __QPARSER_TOKENREGISTRY_INL__ #define __QPARSER_TOKENREGISTRY_INL__ ////////////////////////////////////////////////////////////////////////////// // // TOKENREGISTRY.INL // // Copyright © 2009, Rehno Lindeque. All rights reserved. // ///////////////////////////////////...
true
9ac51e659171cb77235d516660c3cf44bdfdf5b5
C++
brandmaier/bnnlib
/src/ensembles/LSTMForgetEnsemble.cpp
UTF-8
8,239
2.515625
3
[ "LicenseRef-scancode-public-domain" ]
permissive
#include "LSTMForgetEnsemble.h" int LSTMForgetEnsemble::LSTM_COUNTER = 0; Node* LSTMForgetEnsemble::get_inputgate() {return nodes[1];} Node* LSTMForgetEnsemble::get_outputgate(){return nodes[3];} Node* LSTMForgetEnsemble::get_forgetgate() { return nodes[2];} Node* LSTMForgetEnsemble::get_cec(){return nodes[7];} ...
true
006c81766fe262b1a37fd2d2db433d733430fd0b
C++
hallsamuel90/BarbarianInHell
/Character.cpp
UTF-8
1,711
3.28125
3
[]
no_license
/** * @author Samuel Hall * @date 02/19/2018 * @file Character.cpp * @brief This file contains the Character class methods */ #include <cstdlib> #include <iostream> #include "Character.hpp" //#define _CRTDBG_MAP_ALLOC //#include<iostream> //#include <crtdbg.h> //#ifdef _DEBUG //#define DEBUG_NEW new(_NORMAL_BLOCK, __...
true
a7164fe96a086050db73e944b6a35db8a5b91e57
C++
ITI/OpenSCADA
/src/pc_emulator/include/functions_registry.h
UTF-8
1,109
2.6875
3
[]
no_license
#ifndef __PC_EMULATOR_INCLUDE_PC_FUNCTIONS_REGISTRY_H__ #define __PC_EMULATOR_INCLUDE_PC_FUNCTIONS_REGISTRY_H__ #include <iostream> #include <unordered_map> #include "pc_configuration.h" #include "pc_resource.h" #include "pc_variable.h" #include "pc_datatype.h" using namespace std; namespace pc_emulator{ //! C...
true
08f1349909851391eb666102823a1c0704c93a8d
C++
Rumiao/DataStructure
/Sort/insertSort.cpp
UTF-8
489
3.625
4
[]
no_license
/* Insert sort implementation */ template <typename T> bool prior(T arg1, T arg2) { if (arg1 < arg2) { return true; } return false; } template <typename T> inline void Swap(T A[], int i, int j) { T temp = A[i]; A[i] = A[j]; A[j] = temp; } template <typename T> void insertSort(T A[], i...
true
40ab8fa6f13cdc696c01a8f61c8d97fe589a4467
C++
kks227/BOJ
/1000/1045.cpp
UTF-8
1,233
2.703125
3
[]
no_license
#include <cstdio> #include <vector> #include <utility> #include <algorithm> using namespace std; const int MAX = 50; const int MAX_M = 1000; typedef pair<int, int> P; struct UnionFind{ int p[MAX]; UnionFind(){ fill(p, p+MAX, -1); } int f(int a){ if(p[a] < 0) return a; return p[a] = f(p[a]); } bool u(int a, in...
true
f6546a80da774b6a20966531e6dd16aaf0a4aab5
C++
Stephen1993/ACM-code
/hdu4710.cpp
GB18030
1,959
2.921875
3
[]
no_license
/*i%a - i%b,ÿμϴiʼֵ(i%a - i%b)ȵһ, iͲÿ+1,ÿμһ,na,bС ֻҪa,bСȵܺͣȻsum*=n/per + p;//pʾǰi,p=n%per; ⷴ˼:տʼԼ룬뵽a,bСܴܺ,nҲܴ պn<pernܴ;//perʾa,bСn>perperܴ ʹһζεҲܳʱһֱ֣һֱѰ򵥵ۡһֱûҵ ´ӦԣҲĸ򵥵ķԼ뵽ķ ʱ临ӶȺ:O((a/b * min(per,n)/a));//a>=b */ #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<string> #...
true
101f66596421fe53721a403108dddd6932606544
C++
ben-natan/raytracing_cpu
/src/tools.hpp
UTF-8
4,382
2.90625
3
[]
no_license
#ifndef TOOLS_H #define TOOLS_H #include <math.h> #include <algorithm> #include <random> // #include "light.hpp" // #include "sphere.hpp" // #include "plane.hpp" class Tools { public: static bool solveQuadratic(float a, float b, float c, float &x0, float &x1) { float discr = b*b - 4*a*c; ...
true
78f1a8ad524ec1b662a90fa6ed0dbb080251ffb7
C++
WEEEMAKE/Weeemake_Libraries_for_Arduino
/Weeemake/src/TempOneWire.cpp
UTF-8
7,800
2.75
3
[]
no_license
#include "TempOneWire.h" TempOneWire::TempOneWire(void) { } TempOneWire::TempOneWire(uint8_t pin) { bitmask = WePIN_TO_BITMASK(pin); baseReg = WePIN_TO_BASEREG(pin); } void TempOneWire::reset(uint8_t pin) { bitmask = WePIN_TO_BITMASK(pin); baseReg = WePIN_TO_BASEREG(pin); } bool TempOneWire::readIO(void) {...
true
f5667a768e09af53e7bcd15f05f678fd58863f76
C++
paulot/interview
/Google/anagram.cpp
UTF-8
532
3.359375
3
[]
no_license
#include <iostream> #include <string> using namespace std; bool isAnagram(string &a, string &b) { int c[26] = { 0 }; for (int i = 0; i < a.size(); i++) { if (a[i] == ' ') continue; c[a[i]-'a']++; } for (int i = 0; i < b.size(); i++) { if (b[i] == ' ') continue; c[b[i]-'...
true
450b79109482d2d1c4f430ec026eb9425797d703
C++
ggyool/study-alone
/ps/boj_cpp/제곱ㄴㄴ수 (1016).cpp
UTF-8
962
2.578125
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #define N 1000000 using namespace std; typedef long long int lld; lld A, B; vector<lld> sv; lld svlen; bool notPrime[(int)1e6 + 1]; //false 이면 제곱ㄴㄴ수 bool notSqn[(int)1e6 + 1]; bool inRange(lld num) { if (num<A || num>B) return false; retur...
true
ec344081364cc151bb961fb684409a3687007060
C++
piyush-jaiswal/College-Work
/C++/lab experiment 2/LAB_Experiment 2 1).cpp
UTF-8
1,469
4.1875
4
[]
no_license
/* LAB_Experiment 2 Do all these questions by applying concept of static data member, static member function, const member function, inline function( Explicit , Implicit), nesting member function and Default Arguments: 1. Create a class employee that includes firstname( type String), lastname(type String) and a mo...
true
8e458c479ddf166f285b5f219ef4f5182bab7013
C++
Dante3085/OldCppTutorials
/C++Tutorial 109 list/C++Tutorial 109 list/Quelle.cpp
ISO-8859-1
1,500
3.625
4
[]
no_license
#include <iostream> #include <list> /*"list"(Allgemein: "linked list" oder "double linked list"): Verhlt sich auf den ersten Blick hnlich wie der Vektor. Neue Elemente knnen mit "push_back()" hinzugefgt werden. Es knnen auch neue Elemente auf der anderen Seite mit "push_front()" hinzugefgt werden. quivalent knnen ...
true
58f7b076447af209c263084348908e4788b0c9bf
C++
rayfill/cpplib
/Socket/Win32SocketImpl.hpp
UTF-8
2,718
2.65625
3
[]
no_license
#ifndef WIN32SOCKETIMPL_HPP_ #define WIN32SOCKETIMPL_HPP_ #include <winsock2.h> #include <ws2tcpip.h> #include <string> #include <Socket/NativeSocket.hpp> struct Win32SocketImpl { typedef enum { read = SD_RECEIVE, write = SD_SEND, both = SD_BOTH } ShutdownTarget; static int shutdown(SocketHandle handle, S...
true
35350276c6ada221f2f04968a420a99eb1ed07f0
C++
lhwnova/ecs40spring2016
/p3/p3_handin_files/flight.h
UTF-8
472
2.765625
3
[]
no_license
#ifndef FLIGHT_H #define FLIGHT_H #include <iostream> #include "plane.h" #define MAX_CITY_LENGTH 20 using namespace std; class Flight { private: int flightNum; char origin[MAX_CITY_LENGTH]; char destination[MAX_CITY_LENGTH]; Plane *plane; public: ~Flight(); void construcFlight(ifstream &inf); void pr...
true
bd78902039049cf37569c33fa18d5ceb71aabe71
C++
subacc23/third_time
/electrical/electrical/Source/Stage/Stage.cpp
SHIFT_JIS
3,356
2.796875
3
[]
no_license
#include "DxLib.h" #include "Stage.h" #include "../Resource/Graphic.h" #include "../Resource/CSV.h" int Stage::mapData[MAP_COUNT_Y][MAP_COUNT_X] = { 0 }; Stage::Stage() { graphIndex = 0; } // bool Stage::Initialize() { // ǂݍރt@Ci[ char fileName[512]; sprintf_s(fileName, sizeof(fileName), "Resource/Data/Sta...
true
957110f0c7b2f85ce23435b63d6bb2b77b9d4e8e
C++
IluyaSmith/DefendTwitchCastle
/ChatGame/Command.h
UTF-8
782
3
3
[]
no_license
#pragma once #include <string> #include <vector> #include <memory> class Command { public: Command() : m_playername("NA"), m_commandname("NA"), m_args({}) {}; Command(std::string _plname, std::string _cname, std::vector<std::string> _args) : m_playername(_plname), m_commandname(_cname), m_args(_args) {}; static st...
true
9601940dca39c11c9033bc33fa8b11818fa077fd
C++
AymanM92/Algorithms_ToolBox_Coursera_Cpp
/Week6/1_maximum_amount_of_gold/Dummy.cpp
UTF-8
578
2.8125
3
[]
no_license
/* * Dummy.cpp * * Created on: Apr 21, 2018 * Author: Ayman.mohamed */ int knapSack(int W, int wt[], int val[], int n) { int i, j; int K[n + 1][W + 1]; // Build table K[][] in bottom up manner for (i = 0; i <= n; i++) { for (j = 0; j <= W; j++) { if (i == 0...
true
11a0cb2349652a256dfed7152f750d25568d36ca
C++
wagner-group/geoadex
/archived/cpp/test_Cgal.cpp
UTF-8
2,668
2.546875
3
[ "MIT" ]
permissive
// #include <iostream> // #include <CGAL/Simple_cartesian.h> // typedef CGAL::Simple_cartesian<double> Kernel; // typedef Kernel::Point_2 Point_2; // typedef Kernel::Segment_2 Segment_2; // int main() // { // Point_2 p(1,1), q(10,10); // std::cout << "p = " << p << std::endl; // std::cout << "q = " << q.x() << " ...
true
0f41d79a2772b520e63eed9058a36cd3ec8601e9
C++
ekaterin17/Coursera-cpp
/2 Yellow/Final 2/Final 2/node.cpp
UTF-8
701
2.953125
3
[]
no_license
#include "node.h" bool DateComparisonNode::Evaluate(const Date &date, const string &event) const { return compare(comparison_, date, date_); } bool EventComparisonNode::Evaluate(const Date &date, const string &event) const { return compare(comparison_, event, event_); } bool LogicalOperationNode::Evaluate(co...
true