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
f4dd865bf565af64427a197611b75b02e11d6c03
C++
xjhahah/file_transfer
/ftpServer/Mysql.cpp
UTF-8
2,742
2.75
3
[]
no_license
#include "Mysql.h" #include <string.h> #include <sys/types.h> #include <sys/stat.h> bool Mysql::InitSql(string& host, const string& user, const string& pwd, const string& sqlName){ //连接数据库 //连接成功返回MYSQL*连接句柄,即sql服务器 if(!mysql_real_connect(_mysql, host.c_str(), user.c_str(), pwd.c_str(), sqlName.c_str(), 0, null...
true
2060f016885658625b901b3b8197ae4fc54f223d
C++
Noplace/NesEmu
/Code/graphics/gdi.h
UTF-8
1,893
2.765625
3
[]
no_license
#ifndef UISYSTEM_GRAPHICS_GDI_H #define UISYSTEM_GRAPHICS_GDI_H #include <windows.h> #include <algorithm> #define _USE_MATH_DEFINES #include <math.h> #include "graphics.h" namespace graphics { class GDI : public Graphics { public: GDI(); ~GDI(); void Initialize(HWND window_handle, int width, int height); ...
true
db9c9eed8c93802be942456497cbd593e5a6dec7
C++
xiaobaiyey/DexRewrite
/external/libbase/cxx_helper.h
UTF-8
1,188
2.8125
3
[ "Apache-2.0" ]
permissive
#ifndef waa_BASE_CXX_HELPER_H_ #define waa_BASE_CXX_HELPER_H_ #include <cstdlib> #include "primitive_types.h" template<typename U, typename T> U ForceCast(T *x) { return (U) (uintptr_t) x; } template<typename U, typename T> U ForceCast(T &x) { return *(U *) &x; } template<typename T> struct Identity { u...
true
fa34e3ef1b0a0355c93feb3710950007a1f6d5af
C++
shawnmolga/CPP-rock-paper-scissors
/EX2/AICell.cpp
UTF-8
808
2.859375
3
[]
no_license
#include "AICell.h" AICell::AICell(char playerPiece, bool isPieceJoker) { Cell(playerPiece, isPieceJoker); initAIFields(); } AICell::AICell() { Cell(); initAIFields(); } void AICell::initAIFields() { this->flagProbability = FLAGS_NUM / TOTAL_PIECES_NUM; this->isJokerKnown = false; this->isMovingP...
true
b6ed5df0c3f9b5bc8e82257c31c935d962d10f70
C++
Boraz/CSCI-2270
/CS_HW_3/graph.cpp
UTF-8
4,258
3.171875
3
[]
no_license
#include "graph.h" using namespace std; // default constructor at work here; pretty cute! graph::graph() { } // destructor is easy, we just clear our vertex vector and our edge map graph::~graph() { vertices.clear(); // vertex edges.clear(); // maps } // add a vertex to the graph by adding it to the vector void gr...
true
bcccc72283bded549bc07efb742ceb3aee4ad158
C++
Scinopode/MaterialProperties
/src/Functions/cViscosityCO2Fenghour.cpp
UTF-8
1,521
2.5625
3
[]
no_license
/************************************************** * * cViscosityCO2Fenghour.cpp * Created on: 15.08.2017 * _ _ _____ * Author: | \ | || __ \ * Norbert | \| || | \/ * Grunwald | . ` || | __ * | |\ || |_\ \_ * \_| \_(_)____(_) * ****************************...
true
e3a1071828d7aeb26ab94458bfbbe7331d93f7ba
C++
ehaengel/compsk2
/src/main.cpp
UTF-8
1,768
2.53125
3
[]
no_license
#include <stdlib.h> #include <stdio.h> // COMPSK library #include "communication_server.h" int main(int argc, char** argv) { LogFileManager* logfile_manager = new LogFileManager; logfile_manager->VerboseModeOn(); CommunicationServer* communication_server = new CommunicationServer; communication_server->SetLogFil...
true
0ca2c8fe3c030aa553005be9c437b72b4fabf42e
C++
jegor377/Flow
/src/tests/cases/point2.hpp
UTF-8
3,657
3.453125
3
[ "MIT" ]
permissive
// Non-assign operators // Point2 and Point2 operators CASE("Point2 + Point2 operator works correctly"){ flow::Point2 a(2, 5); flow::Point2 b = a + a; EXPECT(b.x == 4 && b.y == 10); }, CASE("Point2 - Point2 operator works correctly"){ flow::Point2 a(7, 4); flow::Point2 b(4, 3); flow::Point2 c = a - b; EXPECT(c.x...
true
46d497791fb7e409fe6301afe618a1cae5c2f72a
C++
SJD095/Programming-Learning
/C++/eden/InstanceOf [lab]/instance.h
UTF-8
773
3.203125
3
[]
no_license
#ifndef INSTANCE_H #define INSTANCE_H #include <iostream> using namespace std; class Object { public: virtual string name() = 0; }; class Animal: public Object { public: virtual string name() { return "Animal"; } }; class Dog: public Animal { virtual string name() { return "Dog"; } }; class Cat...
true
46d8dd1a2ae95d4386921dd620ef09656e66b0a4
C++
ABHISHEK-G0YAL/Competitive-Programming
/practice/codechef/COOK111B/CKWLK.cpp
UTF-8
568
3.046875
3
[]
no_license
// https://www.codechef.com/problems/CKWLK #include <bits/stdc++.h> using namespace std; typedef long long ll; bool divisibleBy10rN(ll n) { while(n % 10 == 0) n /= 10; return n == 1; } bool isNDollarsAchievable(ll n) { if(divisibleBy10rN(n)) return true; while(n % 20 == 0) { n...
true
ed8b8ff2927f4036a493ed2317f8b2fc1df71d1f
C++
shtanriverdi/CS487-Introduction-to-Competitive-Programming-Progress
/Contests/Weekly Contest 112/Most Stones Removed with Same Row or Column.cpp
UTF-8
922
3.140625
3
[ "MIT" ]
permissive
// Question Link ---> https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/ class Solution { public: int removeStones(vector<vector<int>>& stones) { queue<pair<int, int>> nodes; int largestPossibleNumOfMoves = 0, curMaxMoves; for (int i = 0; i < stones.size(); i++) { if (stones[i]...
true
b8a6ea15afd21dc880fe1d79970a8846523c7665
C++
aaroncvega123/LibrarySystem
/g++Versions/withDocumentation/Fiction.h
UTF-8
2,729
3.078125
3
[]
no_license
//--------------------------------------------------------------------------- // Fiction.cpp // Class representing book of fiction // Author: Aaron Vega //--------------------------------------------------------------------------- // Fiction class: Represents books of fiction // -- Allows for storing book informatio...
true
af320fa0a0b6177ba480aaa1e50f039af1e25dfd
C++
alantany/cpprep
/ar.cpp
UTF-8
216
2.84375
3
[]
no_license
#include<iostream> void ar(int(&ar)[10]) { for (auto r : ar) if (r) std::cout << r << std::endl; } void arc(const int a[10]) { for (size_t i = 0; i != 10; i++) if (a[i]) std::cout << a[i] << std::endl; }
true
6f474013c91e47a983d1b2366e78337e5f548bff
C++
bhanupriyanka2/MRND_Summer_2019
/DAY2/fibonacci.cpp
UTF-8
2,879
3.515625
4
[]
no_license
#include <stdio.h> #include<stdlib.h> #include <unordered_map> using namespace std; long fibonacci(long n){ if (n == 0){ return 0; } if (n == 1){ return 1; } return fibonacci(n - 1) + fibonacci(n - 2); } long fibonacci_memorized(int n, std::unordered_map <int, int>& fib){ if (n < 0) ...
true
e29af33cd1f6f21a0fb1f0ad473a363069c5b571
C++
pavluchenko/CppTetris
/CppTetris/game.cpp
UTF-8
1,961
2.984375
3
[]
no_license
// // Created by Helga on 2019-08-08. // #include "game.h" Game::Game(Board *pBoard, Pieces *pPieces, int pScreenHeight, IO* pIO) { mScreenHeight = pScreenHeight; mBoard = pBoard; mPieces = pPieces; mIO = pIO; initGame(); } void Game::initGame() { // Init random numbers srand ((unsigned ...
true
24e512938558bee8f37925b78d29cb9a38300c39
C++
therbsty/Operating_System_Simulator
/Operating_System_Simulator/BlockTable.cpp
UTF-8
1,377
3.015625
3
[ "MIT" ]
permissive
#include <iterator> #include <map> #include <vector> #include "Block.hpp" #include "BlockTable.hpp" using namespace std; BlockTable::BlockTable(vector<int> blocksizes) { int currentPos = 0; int newID = 0; for (auto currentSize = blocksizes.begin(); currentSize != blocksizes.end(); ++currentSize) { Block newBl...
true
fc16759b9d0fa2ecfd7ac8d98733a3e23ee0384c
C++
smalltong02/keras-liber-monitor
/StaticPEManager/InfoBuilder/BaseInfoBuilder.h
UTF-8
4,035
2.5625
3
[ "MIT" ]
permissive
#pragma once #include "InfoBuilder.h" #include "utils.h" namespace fs = std::filesystem; namespace cchips { class CBaseInfoBuilder : public CInfoBuilder { public: CBaseInfoBuilder() { UpdateInfoType(CJsonOptions::_info_type::info_type_base); } ~CBaseInfoBuilder() = default; bool I...
true
6d0b9e860b93f9822572b47b2f66d41473f3ec14
C++
Hitonoriol/Methan0l
/src/lang/core/File.cpp
UTF-8
1,175
3
3
[]
no_license
#include "File.h" #include <interpreter/Interpreter.h> #include <util/util.h> namespace mtl::core { /* * Expands `path aliases`: * `$:` - expands into interpreter home directory * `#:` - expands into script run directory * And prepends the result to the rest of the `pathstr` * Example: `$:/modules/ncurses` ...
true
62e1f58d10bcc8778c68da42ceae8636f99c8dc8
C++
zcfelix/LeetCode
/BinaryTreeMaximumPathSum.h
UTF-8
675
3.375
3
[]
no_license
/* Author: Felix Zhou, zcfelix.zhou@gmail.com Date: Jul 11th, 2015 Problem: Binary Tree Maximum Path Sum Difficulty: Hard Source: https://leetcode.com/problems/binary-tree-maximum-path-sum/ Notes: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree...
true
faf693f4ab604b857179f8939cbf479dff4926fb
C++
amashrabov/fivt-993-elements-of-programming
/test/persistent_trie_test.cpp
UTF-8
2,058
3.125
3
[]
no_license
#include <gtest/gtest.h> #include <iostream> #include <vector> #include <algorithm> #include <cstdlib> #include <iterator> #include <string> #include "persistent_trie.h" namespace pds { std::vector<char> string2vector(const std::string& s) { std::vector<char> res; std::copy(s.begin(), s.end(), st...
true
224cb386e318ef37d3c7662a98af2f71a5c74b7b
C++
adriane0523/Bridge2Africa
/Arduino_software/bridge2Africa_1/bridge2Africa/bridge2Africa.ino
UTF-8
1,341
3.046875
3
[]
no_license
int latchPin = 5; int clockPin = 6; int dataPin = 4; int latchPin2 = 8; int dataPin2 = 7; byte leds = 0; byte leds2 = 0; char one = 'a'; char two = 'd'; char count = one; int first = 1; void setup() { Serial.begin(9600); // set the baud rate Serial.println("Ready"); // print "Ready" pinMode(latchPin, OUTPUT...
true
13260e52bcbc2afb06a93c099b83e656f4cd373d
C++
mlpack/mlpack
/src/mlpack/methods/random_forest/random_forest_main.cpp
UTF-8
12,856
2.703125
3
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
/** * @file methods/random_forest/random_forest_main.cpp * @author Ryan Curtin * * A program to build and evaluate random forests. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license a...
true
934c9e3f5f97add36379b8ea9a6bf89c1acf76f5
C++
Pater1/NeumontArchive
/CPP/CPP 1/Projects/Battle Arena/Battle Arena/Character.cpp
UTF-8
3,060
2.796875
3
[]
no_license
#include<string> #include<iostream> #include"Character.h" #include"RandUtils.h" #include"Attack.h" #include "DeleteProtectionWrapper.h" void Character::ConvenienceBaseClone(Character * from, Character * to){ to->characterName = from->characterName; } Character* Character::DeleteProtect(Character* from){ return ne...
true
e48d99638d1deb88b76b0bfcc8e55f98c6bd8fd1
C++
Solcito25/CCOMP
/4 Examen/exam/main.cpp
UTF-8
857
3.25
3
[]
no_license
#include <iostream> using namespace std; /*int a,b,c=1,d=1,f,e; cin>>a,f; cin>>b,e; if (b*2==a) cout<<b<<endl; else if (a*2==b) cout<<a<<endl; else{ while((c<=b)&&(c<=a)){ if ((f%c==0)&&(e%c==0)){ d=d*c; f=a/c; e=b/c; ...
true
e9d26b67727ab88fb3e049d9d20d8a5e1bff9d41
C++
CaseyYang/LeetCode
/LeetCode/Minimum_Path_Sum/Main.cpp
UTF-8
597
2.890625
3
[]
no_license
#include<iostream> #include<vector> #include<algorithm> using namespace std; class Solution { public: int minPathSum(vector<vector<int> > &grid) { if (grid.size() == 0) return 0; int height = grid.size(); int width = grid[0].size(); for (int i = 0; i < grid.size(); ++i){ for (int j = 0; j < grid[i].size(); ...
true
6d9698d97d235088a874b927efd1de68e8a71dcc
C++
zamansabbir/DataStructure
/LeetCode/LongestWord.cpp
UTF-8
613
3.328125
3
[ "MIT" ]
permissive
#include<iostream> #include<vector> #include <string> #include<algorithm> #include<unordered_set> using namespace std; string longestWord(vector<string> &words){ string result=""; sort(words.begin(),words.end()); unordered_set <string> check; for(string &s:words){ if(s.length()==1||check.find(s....
true
94e46ad133f7e7a9beac5aaa480b3415cb14c4cf
C++
qq260327056/lua-studio
/LuaStudio/src/Lua.h
UTF-8
3,116
2.625
3
[ "MIT" ]
permissive
#pragma once #include <boost/noncopyable.hpp> #include <boost/scoped_ptr.hpp> #include <boost/function.hpp> //#include <boost/function/function1.hpp> #include <exception> #include <vector> typedef std::vector<unsigned char> ProgBuf; struct lua_exception : public std::exception { lua_exception(const char* msg) : ex...
true
ab191c88593e62bcc8a6fbff73155404658f6138
C++
KIIIKIII/hello-world
/EdgeSort.cpp
UTF-8
842
2.9375
3
[]
no_license
#include<stdio.h> #include<iostream> #include<algorithm> using namespace std; struct Road { int u; int v; int l; int t; int w; int c; int f; }; Road road[10000]; bool cmp(const Road &r1, const Road &r2) { if (r1.l != r2.l) return r1.l<r2.l; else if (r1.t != r2.t) return r1.t<r2.t; else if (r1.w != r2.w)...
true
451ef31d8ec07225078edde1b2a6c5ad4e86fca6
C++
Garfield-Chen/jet-game-engine
/Include/Jet/Core/CoreMeshObject.hpp
UTF-8
3,952
2.53125
3
[]
no_license
/* * Copyright (c) 2010 Matt Fichman * * 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...
true
4c6740d7b6dae74b5081206ce1a24299decd7ed8
C++
nkersting/Code
/findPythagoreanTriples.cpp
UTF-8
1,739
3.4375
3
[]
no_license
//If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. //{20,48,52}, {24,45,51}, {30,40,50} //For which value of p ≤ 1000, is the number of solutions maximised? // This code shows the answer is p=840, with 8 solutions #include <string> #inc...
true
313c2706e91fc4b4d87b5e745e8c21460b1b18f6
C++
kentoo-zbcast/people_detect_pi
/acf/ACFFeaturePyramid.h
UTF-8
2,967
2.921875
3
[]
no_license
/* * ACFFeaturePyramid.h */ #pragma once #include "ChannelFeatures.h" class ACFFeaturePyramid { public: ACFFeaturePyramid(const cv::Mat &source_image, int _scales_per_oct, cv::Size minSize, float shrink, const std::array<double, 3>& lambdas, int pad_width, int pad_height); ...
true
3bcd3c5c5e47d4cd122a81d177bcfa7d1a4f5e25
C++
maximaximal/SFML-Sidescroller-Revived
/include/CMenu/CContainer.h
UTF-8
1,047
2.609375
3
[]
no_license
#ifndef CCONTAINER_H #define CCONTAINER_H #include <SFML/Graphics.hpp> namespace CMenuNew { class CContainerManager; enum type { button, slider, label, image }; class CContainer : public sf::Drawable, public sf::NonCopyable { public: CContainer(...
true
e618e6a61b2c535821ccc0aaf78d154a5491bd21
C++
mccurtyn/obelisk
/src/monster.h
UTF-8
553
2.96875
3
[]
no_license
#include <string> #include "entity.h" #pragma once using namespace std; struct monster{ private: entity e; int damage; public: void setMonsterHealth(int h){ e.setEntHealth(h); } int getMonsterHealth(){ return e.getEntHealth(); } void setMonsterAlive(bool a){ e.setEntAlive(a); } bool getMonsterAlive(){ ...
true
27e09f630e4e43aecf804c03766bef59e60cc29d
C++
mghnm/PracticalApplications1
/Step1Task9.cpp
UTF-8
2,120
3.859375
4
[]
no_license
//----------------------------------------------------------------------- // File: Step1Task9.cpp // Summary: Reads the change of growth of investment over 4 years. // Returns the final result of investment in SEK // Version: 1.0 // Owner: Mohamad Ghanem //---------------------------------------------------------...
true
29428bf350f030fa9bfc6783c2b5ae3f6c28e190
C++
jkevin1/lang
/lex.cpp
UTF-8
1,752
3.234375
3
[]
no_license
#include "lex.hpp" #include <ctype.h> #include <string> Lexer::Lexer(const char* filename) : owned(true), lastChar(' ') { file = fopen(filename, "r"); } Lexer::Lexer(FILE* source) : owned(false), lastChar('0') { file = source; } Lexer::~Lexer() { if (owned) fclose(file); } Token Lexer::getNextToken() { whil...
true
00bda0ed3c3d5cf2af3f7ae3992e480ecf54c9c7
C++
viragkiss/CS
/Data Structures/Assignment 1/CStudent.hpp
UTF-8
1,155
3
3
[]
no_license
#ifndef CStudent_hpp #define CStudent_hpp #include <iostream> #include <cstdlib> using namespace std ; #include <string> #include <stdio.h> #include "CCourse.hpp" class CCourse; class CStudent { private: // --- add attributes here char* name; int id; int maxCourses; int maxExams; int nbCourses; CC...
true
3d630f7f2d5a4de81b522d472c26919cecdca3ce
C++
redmonjp/ac_procedure
/headers/mce_setup.hpp
UTF-8
10,904
3.328125
3
[]
no_license
#ifndef mce_setup_h #define mce_setup_h #include "bk.hpp" #include <cstdlib> #include <iostream> #include <vector> #include <fstream> #include <sstream> #include <set> using namespace std; /************************************************************** Function: read_file Description: This function is used to read...
true
307a83ea5359ab6d95ed05a4083b531712b17da7
C++
happiie/CPlusPlus
/tuto2/tuto2 Q2/main.cpp
UTF-8
14,697
3.125
3
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> #include <windows.h> #include "Mouse.h" #include "Snake.h" using namespace std; int xSize=20,ySize=20; void printMap(char gameMap[20][20]) { for(int x=0;x<xSize;x++) { cout<<"+---"; // Top line } cout<<"+"<<endl; // Final plus for(int...
true
644e96df517ec664247756d0597f9ab34b383982
C++
potatolylc/SmartHomeArduinoTemplates
/Sensors/TiltSensor/TiltSensor.ino
UTF-8
737
3.28125
3
[]
no_license
/* This code is for detecting whether a tilt signal is catched. If the signal is catched, then led is on. */ int ledPin = 13; // Connect LED to pin 13 int switcher = 3; // Connect Tilt sensor to Pin3 void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); // Set di...
true
3b4897b41a99c830e3b52cc7024d78e4a04de8e9
C++
cowlicks/library-mathematics
/include/Library/Mathematics/Geometry/3D/Objects/Plane.hpp
UTF-8
14,636
2.796875
3
[ "MPL-2.0", "BSL-1.0", "Apache-2.0" ]
permissive
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics /// @file Library/Mathematics/Geometry/3D/Objects/Plane.hpp /// @author Lucas Brémond <lucas@loftorb...
true
293bd841348d3c648906c322af8edb63165982e9
C++
Asoelter/wui
/wui/containers/signal.h
UTF-8
953
2.875
3
[]
no_license
#ifndef SIGNAL_H #define SIGNAL_H #include <functional> #include <utility> #include <vector> #include "typelist.h" #include "slot.h" template<typename ...Args> class Signal { public: Signal() = default; void connect(const std::function<void(Args...)>& func); void connect(const Slot<Args...>& slot); ...
true
e273123146662b51ec6742cbc2460b0c7d910da7
C++
frankhart2017/CPP-NEW-CONCEPTS
/udl/udl_1.cpp
UTF-8
554
3.40625
3
[]
no_license
// udl_1.cpp // Source: https://www.geeksforgeeks.org/user-defined-literals-cpp/ // 14th November 2019 #include <iostream> #include <iomanip> using namespace std; long double operator"" _kg(long double x) { return x * 1000; } long double operator"" _g(long double x) { return x; } long double operator"" _mg(lon...
true
aa50b2e0334cae8d2dee008a3b37f39f9d1d60d9
C++
KrystianSarowski/AI-Games-Project1
/AI-Games-Project1/Board.h
UTF-8
5,855
3.28125
3
[]
no_license
#pragma once #include "Tile.h" #include "Piece.h" #include "MyMath.h" #include <array> #include <queue> class Board { public: /// @brief Constructor of the Board. /// /// Calls various function to create all instances of Tile and connect them with each other /// and then create the pieces for each side of the bo...
true
d77c259e6f29cf5d794d1362827b51c800b48648
C++
torunxxx001/BookCollectionSystem
/Hardware/src/hard/rpi_gpio.hpp
UTF-8
1,522
2.609375
3
[ "MIT" ]
permissive
/* 参考PDF[BCM2835-ARM-Peripherals.pdf] */ /* RaspberryPI用GPIO操作プログラム */ /* 対応表 PIN NAME 0 GPIO 2(SDA) 1 GPIO 3(SCL) 2 GPIO 4(GPCLK0) 3 GPIO 7(CE1) 4 GPIO 8(CE0) 5 GPIO 9(MISO) 6 GPIO 10(MOSI) 7 GPIO 11(SCLK) 8 GPIO 14(TXD) 9 GPIO 15(RXD) 10 GPIO 17 11 GPIO 18(PCM_CLK) 12 GPIO 22 13 GPIO 23 14 GPIO 24 15 GPIO 25 16 GP...
true
1370f360f5fa8b2fd1089509541a13bc4fc20f82
C++
wCmJ/KB
/lc/672.cc
UTF-8
2,261
3.078125
3
[]
no_license
#include <iostream> #include <unordered_set> #include <unordered_map> using namespace std; class Solution { public: static int cnt; int flipLights(int n, int m) { //first: open //int op[4]; //将m分配到4组操作中, int op[4] = {0}; string base(n + 1, '1'); std::cout<<"base ...
true
dbd31775d0e24810e7e5c92c3deba904ecba9b40
C++
vishalsalgond/Data-Structures-Algorithms
/Bit Manipulation/subsets.cpp
UTF-8
652
3.140625
3
[]
no_license
//https://leetcode.com/problems/subsets/ class Solution { public: vector <vector<int>> ans; void filterNums(int n, vector <int> nums) { vector <int> temp; int j = 0; while(n > 0) { int last_bit = n & 1; if(last_bit) { temp.push_back(nums[j])...
true
042a6c6dc417bca46ba386485a02325cc2a5090f
C++
acc-cosc-1337-fall-2019/acc-cosc-1337-fall-2019-Fortress117
/src/examples/03_module/04_for_ranged/for_ranged.cpp
UTF-8
877
3.8125
4
[ "MIT" ]
permissive
#include "for_ranged.h" #include<iostream> #include<vector> using std::vector; /* Write code for loop_string_w_index that accepts a string parameter. The function uses an indexed for loop to iterate and display the characters in the string as follows: for string test displays t e s t */ /* Write code for loop_stri...
true
2cc6b20e0a63098d1f4bc844f5d0925b41ea800b
C++
dsudheerdantuluri/leetcode
/algorithms/cpp/19.cc
UTF-8
1,136
2.984375
3
[]
no_license
// lt19.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ struct ListNod...
true
d7dca07b393535e15df7ce34fc5d2b5f44d9a559
C++
bg1bgst333/Sample
/designpattern/pm/pm/src/pm/model.h
UTF-8
1,037
2.59375
3
[ "MIT" ]
permissive
// 二重インクルード防止 #ifndef __MODEL_H_ #define __MODEL_H_ // 独自のヘッダ #include "subject.h" // interface_subject #include "presentation_model.h" // class_presentation_model // 前方宣言 class class_presentation_model; // クラスclass_model class class_model : public interface_subject{ // 非公開メンバ private: // 非公開メンバ変数 inte...
true
3185d1428d3527ca2de3b65266fb65c4ef6836d7
C++
apache/impala
/be/src/util/cache/cache-test.h
UTF-8
3,915
2.734375
3
[ "Apache-2.0", "OpenSSL", "bzip2-1.0.6", "LicenseRef-scancode-openssl", "LicenseRef-scancode-ssleay-windows", "LicenseRef-scancode-google-patent-license-webrtc", "PSF-2.0", "BSD-3-Clause", "dtoa", "MIT", "LicenseRef-scancode-mit-modification-obligations", "Minpack", "BSL-1.0", "LicenseRef-s...
permissive
// Some portions Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "util/cache/cache.h" #include <memory> #include <string> #include <vector> #include <gtest/gtest.h> #include "kudu/util/codin...
true
322538ca410df466d927da2d8f11e84ef1a6b3fb
C++
DevTaeho/ps
/swea/[모의 SW 역량테스트] 보물상자 비밀번호_5658.cpp
UTF-8
1,571
2.546875
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <queue> #define ll long long using namespace std; int N, K, rot; char d[4][10]; vector<string> v; deque<char> in; ll conv(string s) { ll res = 0; ll g = 1; for (int i = s.size() - 1; i >= 0; i--) { char t = s[i]; int x; i...
true
2d8fa09d9019e944f89ee50956e9199e8911f8d6
C++
pllefevre/seakgChrysocyonParser
/cccQt/cccVar.h
UTF-8
972
3.0625
3
[]
no_license
#ifndef __CCCVAR_H__ #define __CCCVAR_H__ #include "cccContent.h" class cccVar { public: cccVar() {}; cccVar(cccVar &var) { m_Value = var.getValue(); }; cccVar(cccContent &content) { m_Value = content; }; cccVar(const cccVar &var) { m_Value = var.getValue(); }; //cccVar(const cccContent &content) { m_Value...
true
39e3dc5752b4f7b8a29dc3ff3f89f449fcb24042
C++
furkanyildiz/Data_Glass_Project_Bil396
/Old Versions/tick_v1/Pong/mythread.cpp
UTF-8
2,068
2.6875
3
[]
no_license
// mythread.cpp #include <QtWidgets> #include <QtCore> #include <iostream> #include<QtBluetooth> #include "mythread.h" QByteArray data1; QByteArray data2; int MyThread::gyro1 = 100; int MyThread::gyro2 = 100; MyThread::MyThread(QBluetoothSocket *socket,int id,QBluetoothSocket* secondSocket) { this->thread_id ...
true
b2a097157fef9c736c50a6feb00a0228ffc55e30
C++
GabeOchieng/ggnn.tensorflow
/program_data/PKU_raw/40/2787.c
UTF-8
489
2.625
3
[]
no_license
double mianji(double a,double b,double c,double d,double jiao) { double result,hu,s,panduan; hu=jiao/180*PI/2; s=(a+b+c+d)/2; panduan=(s-a)*(s-b)*(s-c)*(s-d)-a*b*c*d*cos(hu)*cos(hu); if(panduan<0) result=-1; else result=sqrt(panduan); return result; } int main() { double a,b,c,d,jiao,shuchu; ...
true
06ae77f72e59d623cf7959bf91a4cfec20db2524
C++
walchko/ParticleFilter
/src/logReader.cpp
UTF-8
1,556
2.75
3
[]
no_license
#include <particleFilter.h> #include <fstream> #include <sstream> #include <vector> #include <string> using namespace std; vector<string>& split(const string &s, char delim, vector<string> &elems) { stringstream ss(s); string item; while (getline(ss, item, delim)) { elems.push_back(item); } ...
true
d1399fd5977bb83c7ef6bbd85ee535f55f07ef84
C++
Sanchita99/Computer_Networks_Programs
/stop_wait_ARQ.cpp
UTF-8
735
2.984375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> int recieve(int f, long long int n) { int rack,rf=0,j=0,rd[n]; rack=rand()%2; //printf("%d \n",rack); if(rack!=f) { rf=f; rd[j]=f; j++; printf("\trecieve \t%d\n",f); return rack; } else { printf("drop as rack is %d\n",rack); return ...
true
a3f06eeefc6f70ac4c04e5895f6e347a27e3c119
C++
RedCaplan/Cplusplus
/Games/MegaSuperUltraEpicIncredibleUnbelievable__Game/MegaSuperUltraEpicIncredibleUnbelievable__Game/Player.h
UTF-8
633
2.796875
3
[]
no_license
#pragma once #include <iostream> #include <windows.h> using namespace std; class Player { int PosX; int PosY; char sign = '@'; short color1=3; short color2=15; public: Player ( ); Player (int x , int y) :PosX (x) , PosY (y){} void DrawPlayer (); COORD GetCord ( ) { COORD x = { PosX , PosY }; r...
true
ebc7ad268a8cbbc82e36e67a0d50be2e5b706744
C++
biprodas/OJ-Solutions
/UVa/10035 - Primary Arithmetic.cpp
UTF-8
524
2.828125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int call(int a, int b, int c){ if(a==0 && b==0) return 0; //base case (a%10 + b%10 + c)>9 ? c=1 : c=0; return c+call(a/10, b/10,c); } int main(){ //freopen("in.txt","r",stdin); int a, b; while(scanf("%d%d",&a,&b)==2){ if(a==0 && b==0) break;...
true
48a524c2a9b904e0be3ebad9df3a8a218fb81405
C++
diegoMontesinos/sutcliffeFractal
/src/ofApp.cpp
UTF-8
5,885
2.640625
3
[]
no_license
/* * Implementation of the SutcliffeFractal app with oF. * * Diego Montesinos (diegoa.montesinos at gmail.com) * January, 2015 * * Modificación para pintarlo con ofVboMesh por xumo */ #include "ofApp.h" #include <math.h> void ofApp::setup () { // Set the sides and the radius nSides = 5; radius = 300.0; /...
true
4bcf3c9b9c89afdf8f59085352d34f3be8ec5d5d
C++
Barney666/Coding_Interview
/src/Leetcode/Exercise815.cpp
UTF-8
1,858
3.34375
3
[]
no_license
#include <vector> #include <unordered_map> #include <queue> #include <algorithm> #include <iostream> using namespace std; class Solution { public: int numBusesToDestination(vector<vector<int>>& routes, int source, int target) { if(source == target) return 0; int bus_num = routes.size()...
true
d08a415c9f949858669252a069d383d9d422f7e0
C++
mtao/core
/include/mtao/geometry/mesh/triangle/mesh.h
UTF-8
2,921
2.578125
3
[ "MIT" ]
permissive
#pragma once #include <mtao/types.hpp> #include <numeric> #include <optional> namespace mtao::geometry::mesh::triangle { #ifdef SINGLE using REAL = float; #else /* not SINGLE */ using REAL = double; #endif /* not SINGLE */ struct Mesh { Mesh() = default; Mesh(Mesh&&) = default; Mesh...
true
3a482cc21f4987faafa3a52d5965d0c717b19605
C++
mbeckem/prequel
/include/prequel/container/array.hpp
UTF-8
13,015
3.03125
3
[ "MIT" ]
permissive
#ifndef PREQUEL_CONTAINER_ARRAY_HPP #define PREQUEL_CONTAINER_ARRAY_HPP #include <prequel/anchor_handle.hpp> #include <prequel/binary_format.hpp> #include <prequel/block_index.hpp> #include <prequel/container/allocator.hpp> #include <prequel/container/extent.hpp> #include <prequel/defs.hpp> #include <prequel/handle.hp...
true
d96355eab3a2d444e581285f1bf2c73e602b5432
C++
Rahul2013396/pointers
/q10.cpp
UTF-8
510
3.84375
4
[]
no_license
// function revString(char*) which reverses the parameter cstring. The function returns nothing. You may use C++ string handling functions in <cstring> in the function if you wish. #include<iostream> #include<cstring> using namespace std; void reverseString(char *a) { // WRITE YOUR CODE HERE cout << "The rever...
true
4b1db18563255697c1a3306e716189c4079ec7d3
C++
mew18/DS-ALGO-plus-plus
/Strings/Excercise/diffrence_ascii_code.cpp
UTF-8
466
2.984375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void ascii_diff(string s) { for (int i = 0; i < s.length();++i) { if(i==s.length()-1) { cout << s[i]; break; } cout << s[i] << (int)s[i + 1] - s[i]; } } int main() { string s; ...
true
3da4445166d2de8ab981b8611a9f4810476c79be
C++
allanmc/Spring-brAIn
/lib/dlib/stl_checked/std_vector_c.h
UTF-8
13,032
2.9375
3
[ "BSL-1.0" ]
permissive
// Copyright (C) 2008 Davis E. King (davisking@users.sourceforge.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STD_VECTOr_C_H_ #define DLIB_STD_VECTOr_C_H_ #include <vector> #include <algorithm> #include "../assert.h" #include "std_vector_c_abstract.h" #include "../seria...
true
ca782d3e80655fe8d78d3dd182d42c3e5a454386
C++
Hattomo/micat-os
/kernel/console.hpp
UTF-8
493
2.765625
3
[]
no_license
#pragma once #include "graphics.hpp" class Console { public: static const int kRows = 35, kColums = 90; Console(const PixelColor &writer, const PixelColor &fg_color); void PutString(const char *s); void SetWriter(PixelWriter *writer); private: void Newline(); void Refresh(); PixelWr...
true
1d4df9e503480aa362f0ba369b771342450e6037
C++
amixofpersons/c-plus-basics-and-exercises
/loops/for-loops.cpp
UTF-8
864
4.0625
4
[]
no_license
#include <iostream> using namespace std; int main(){ /* for loops are structured to continue looping until a condition is met. for example, we can loop through until we reach a given point*/ int n; /* Above we declare our int, n, and create a for loop centering around the variable. this is relatively common to...
true
85ffe3b050b54bfb5c3d477b06b4825070fa1467
C++
modakshantanu/raytracer
/vector.h
UTF-8
2,787
3.03125
3
[]
no_license
#ifndef VEC #define VEC #include <cmath> #include <iostream> #include <cstdlib> using namespace std; #define FPMUL(a,b) ((a * b) >> 8) #define FPDIV(a,b) ((a << 8) / b) #define FPSQRT(a) ((int) (sqrt(a << 8))) inline int unitrandom() { return (rand() & 0x7f) - 127; } class Vec { ...
true
b20300da51f13510c51be589e1324d10442aeafd
C++
JunchenZ/ImageCompressor
/ch-decompress/ReadChFile.cpp
UTF-8
1,744
2.65625
3
[]
no_license
// // ReadChFile.cpp // ReadFile // // Created by Westley Kirkham on 1/30/18. // Copyright © 2018 Westley Kirkham. All rights reserved. // #include "pbmcompress-v1.h" #include <tuple> #include <vector> #include <string> #include <fstream> #include <cassert> #include <iostream> #include <iomanip> #include <sstream>...
true
1d6c107af91071597cad1b7d77be3383618c8b14
C++
integrid/light-alarm
/lib/arduino/lightalarm/lightalarm.ino
UTF-8
2,136
2.828125
3
[]
no_license
#include <Adafruit_NeoPixel.h> #define PIN 6 #define MODE_IDLE 0 #define MODE_WAKE 1 Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800); uint32_t startTime; uint32_t duration; uint32_t color; uint8_t mode; String inputString; boolean inputStringComplete = false; void setup() { Serial.beg...
true
f7e6710c40f5a83f84b294144161c44fef41b2b5
C++
conankzhang/ecs-game-engine
/Tools/AssetBuildLibrary/Functions.h
UTF-8
2,123
2.59375
3
[]
no_license
/* This file contains functions used by asset build tools */ #ifndef EAE6320_ASSETBUILD_FUNCTIONS_H #define EAE6320_ASSETBUILD_FUNCTIONS_H // Includes //========= #include <Engine/Results/Results.h> #include <string> // Interface //========== namespace eae6320 { namespace Assets { eae6320::cResult BuildAssets...
true
c2c946f6447cc2a339da7250d842353081f8778b
C++
intelligent-soft-robots/o80
/include/o80/state.hpp
UTF-8
2,908
2.9375
3
[ "BSD-3-Clause" ]
permissive
#pragma once #include <string> #include "o80/interpolation.hpp" namespace o80 { /*! A State represents the state of an actuator, * as well as methods specifying how a state * interpolates toward another. The interpolation * (and finished) method will be used by the BackEnd * to compute at each iteration the c...
true
2f85a221bba78759871c3c46a30716bfdb07b34a
C++
vazgriz/OscilloscopeMusic
/src/Line.h
UTF-8
2,698
2.5625
3
[ "MIT" ]
permissive
#pragma once #include <VulkanWrapper/VulkanWrapper.h> #include "Renderer.h" #include <glm/glm.hpp> struct UniformBuffer { glm::mat4 projection; glm::vec4 colorWidth; glm::vec2 screenSize; }; struct Vertex { glm::vec4 positionAlpha; glm::vec4 normalWidth; }; class Line : public IRenderer { public:...
true
44b23ab1b2def146041642efc46039e9b6136d0d
C++
kodamayuto/KODAMA_YUTO
/吉田学園情報ビジネス専門学校 児玉優斗/00_2DSTG[Shooting Game]/ShootingGame/game.cpp
SHIFT_JIS
5,084
2.546875
3
[]
no_license
//***************************************************************************** // // Q[̏[game.cpp] // Author : kodama Yuto // //***************************************************************************** //CN[ht@C #include "game.h" #include "fade.h" #include "pause.h" #include"ranking.h" //==========================...
true
1558663779d65a57610a8014b8ab8c95131774b6
C++
Ha11ow/CSS343
/Assignment 4/Driver.cpp
UTF-8
1,416
3.203125
3
[]
no_license
#include <iostream> #include <fstream> #include "HashTable.h" #include <string> using namespace std; void removeChar(char s[], char g); int main() { ofstream output; output.open("output1.txt"); ifstream infile("phonebook.txt"); if (!infile) { cout << "File could not be opened."...
true
6fcc17d200e32435bfc334b48640928020b2a2b1
C++
anmolp14/practice
/codeforces/r388/qA.cpp
UTF-8
293
2.8125
3
[]
no_license
#include<iostream> using namespace std; int main() { int n,coun=0 ; cin >> n; while ( n!=0 && n!=3 ) { coun++; n=n-2; } if( n == 3 ) coun++; cout << coun << endl; if( n==3 ) coun--; for ( int i=0;i< coun ;i++ ) cout << "2 "; if(n==3) cout << 3; return 0; }
true
1aa7abeacda2bbc343b5fd3aa69d6699f6b3f59b
C++
changsongzhu/leetcode
/C++/per_day/07-19-2017/354_h.cpp
UTF-8
1,014
3.296875
3
[]
no_license
/** 354[H]. Russian Doll Envelopes You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the width and height of one envelope is greater than the width and height of the other envelope. What is the maximum number of envelopes can...
true
941b663af7227b7879dc8cf3991c41c6eec4e468
C++
ValentinCamus/GIR-Engine
/Sources/Engine/Shader/Shader.cpp
UTF-8
3,763
2.859375
3
[ "MIT" ]
permissive
#include "Shader.hpp" namespace gir { Shader::Shader(const std::unordered_map<GLenum, std::string> &sources) : OpenGLComponent("Shader") { std::vector<GLuint> stages; m_id = glCreateProgram(); stages.reserve(sources.size()); for (const auto &src : sources) { ...
true
da4a8070d1d4741ef46e8d8f0a4f907042a9e36c
C++
iliayar/ITMO
/Term2/algo/labs/lab2/taskE.cpp
UTF-8
4,792
2.984375
3
[]
no_license
// Generated at 2020-04-08 23:33:54.920838 // By iliayar #include <iostream> #include <vector> #include <chrono> #include <algorithm> #include <cstdio> #include <map> #include <ctime> #include <cstdlib> using namespace std; #define ON 1 #define OFF 0 #define int long long #define vint vector<int> #ifdef LOCAL #de...
true
8e4c0fa318ee4fe7459f565a28245ce50ab55012
C++
evandrix/UVa
/10331.cpp
UTF-8
1,425
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define maxn 102 #define INF 99999999 #define min(a, b) (a > b ? b : a) int t[maxn][maxn], N; struct ss { int u, v, c; int used; }; ss V[100000]; int tv; void ini() { int i, j; for (i = 1; i <= N; i++) { for (j = i + 1; j <= N; j++) { t[i][j] = t[j][i] = INF...
true
e8bb30b97de29e0b3b7573d30a134b719b6f9c5b
C++
JanaSabuj/Coursera-Algorithmic-ToolBox
/week2_algorithmic_warmup/6_last_digit_of_the_sum_of_fibonacci_numbers/fibonacci_sum_last_digit.cpp
UTF-8
1,022
3.125
3
[]
no_license
#include <iostream> using ll = long long; int fibonacci_sum_naive(long long n) { if (n <= 1) return n; long long previous = 0; long long current = 1; long long sum = 1; for (long long i = 0; i < n - 1; ++i) { long long tmp_previous = previous; previous = current;...
true
8c66b56819309be4dc05707178b82013094a033a
C++
Neconspictor/Euclid
/projects/engine/nex/util/Iterator.hpp
UTF-8
634
3.109375
3
[]
no_license
#pragma once namespace nex { template<class Container> struct Range { typename Container::iterator begin; typename Container::iterator end; }; template<class Container> class ConstRange { public: //using iterator = typename Container::const_iterator; using const_iterator = typename Container::const_iter...
true
1c3fa0dae72ef25c0a31e898d8d1c159cf78cd10
C++
didrlgus/algorithm-practice
/codility/lesson5/passingCars.cpp
UTF-8
418
2.578125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; vector<int> east,west; int ret; int solution(vector<int> &v) { for(int i=0;i<(int)v.size();i++) { if(v[i]==0) east.push_back(i); else west.push_back(i); } for(int i=0;i<(int)east.size();i++) { int val=east[i]; ret+=west.end()-upper...
true
9d5a39561ea6066507a2ebb980ce5510cd688e0d
C++
sarvaiyac/geeksalgorithms
/Advanced C++/Assignment4/Isosceles.cpp
UTF-8
1,422
3.25
3
[]
no_license
// // Isosceles.cpp // Assignment4 // // Created by Chintan Sarvaiya on 2014-07-27. // Copyright (c) 2014 ___CHINTANSARVAIYA___. All rights reserved. // #include "Isosceles.h" // Accessor int Isosceles::getHeight() const { return height;} // Mutator void Isosceles::setHeight(int i_height){ height = i_height; } v...
true
02fd4d848a95a8f08814cd17122943456e377587
C++
sausthapit/uasl_image_acquisition
/test/test_tau2_framerate.cpp
UTF-8
1,826
2.53125
3
[]
no_license
#include "acquisition.hpp" #include "util_signal.hpp" #include "camera_tau2.hpp" #include <opencv2/core/version.hpp> #if CV_MAJOR_VERSION == 2 #include <opencv2/highgui/highgui.hpp> #elif CV_MAJOR_VERSION >= 3 #include <opencv2/highgui.hpp> #endif #include <chrono> #include <vector> #include <string> int main() { ...
true
8fa66c570d8708e31ccdc593c7741eaef597c744
C++
jigsaw5071/algorithms
/string/string_permutation_generator.cpp
UTF-8
1,731
3.671875
4
[]
no_license
/** @ Shubham Sharma Date:01/01/2017 */ /* ----------------------------String Permutation generator-------------------------------------------------- 1. This algorithm is used to handle the string with duplicates also. 2. The Time complexity is O(n!) 3. The space complexity is O(n) */ #include<bits/stdc++.h> usin...
true
0dcb3d9c3bd95605d4d8959893f23becd3ce9b00
C++
ai5/gpsfish
/osl/core/osl/book/openingBook.h
UTF-8
6,841
3.09375
3
[]
no_license
#ifndef _OPENING_BOOK_H #define _OPENING_BOOK_H #include "osl/book/compactBoard.h" #include "osl/basic_type.h" #include "osl/numEffectState.h" #include <fstream> #include <functional> namespace osl { namespace book { class OMove { public: OMove(int i) { value = i; } OMove(Move m) { const ...
true
832debb4d00f83f440a99106846894f708660bd0
C++
davelasquez12/SimpleShellCpp
/Simple_Shell/Main.cpp
UTF-8
1,505
2.96875
3
[]
no_license
/*David Velasquez Operating Systems - Proj1 - Simple Shell Due: February 14th, 2017*/ #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> #include <io.h> #include <process.h> #include "functions.h" int main() { int i = 0, j, k, numArgs = 0; char ** argArray, ** argArrayFree = ...
true
684412692b47c300ba71fea38092e8296bc1cc59
C++
skyliulu/OJ
/dji/ex1.cpp
UTF-8
1,045
2.625
3
[]
no_license
#include <iostream> #include <numeric> #include <sstream> #include <vector> #include <unordered_map> #include <algorithm> #include <iomanip> using namespace std; int n,p; const int start = 0; int end_p = 0; int sumPath = 1<<30,tmpPath = 0; vector<int> visited; vector<vector<int>> matrix; void func(int k) { if(k=...
true
71670d9f1400acd546c5386ec613bdc952b13223
C++
denis-gubar/Leetcode
/String/0609. Find Duplicate File in System.cpp
UTF-8
953
2.828125
3
[]
no_license
class Solution { public: vector<string> split(const string& s, char delimeter = ' ') { vector<string> result; istringstream ss(s); for (string token; !ss.eof(); ) { getline(ss, token, delimeter); result.push_back(token); } return result; } vector<vector<string>> findDuplicate(vector<string>& paths...
true
49b388da262c5c32571772b64108be899288e997
C++
MikeXuQ/Algorithm
/algorithm_total/101/main.cpp
UTF-8
899
3.6875
4
[]
no_license
#include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: bool isSymmetric(TreeNode* root) { if (root == NULL) return true; return isSubTreeSymmetric(ro...
true
c63ade35796f577f56609cdbdb8c20121f0a15ac
C++
arvind-murty/CppProgramming
/chap6/prob5/calendar.h
UTF-8
573
3
3
[]
no_license
#ifndef CALENDAR_H_ #define CALENDAR_H_ #include <string> enum Month { JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC }; bool isLeapYear(int year); int daysInMonth(Month month, int year); std::string monthToString(Month month); class Date { public: Date(Month month = JAN, int day = 1, int year...
true
d2549ae6971d106a889cce709d2c5b6ca04701b0
C++
jsfreischuetz/NonEuclidean
/TestProject/PhysicalTest.cpp
UTF-8
3,569
2.609375
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "CppUnitTest.h" #include "..\NonEuclidean\Tunnel.h" #include "..\NonEuclidean\Portal.h" #include "..\NonEuclidean\Physical.h" #include "..\NonEuclidean\Player.h" #include "..\NonEuclidean\Resources.h" #include "..\NonEuclidean\Ground.h" #include "..\NonEuclidean\Engine.h" #include <windows...
true
362113341e315bbceb12d0e6d3bc0beceaa53653
C++
wickneber/hexapodFABRIK
/KinematicsEngine.h
UTF-8
2,150
2.71875
3
[]
no_license
// // Created by root on 5/29/20. // #ifndef KINEMATICSENGINE_KINEMATICSENGINE_H #define KINEMATICSENGINE_KINEMATICSENGINE_H #include <vector> #include "DOF3Leg.h" #include "usefulTypedefs.h" namespace KinematicsEngine { /// Implements a hybrid algorithm that consists of FABRIK inverse kinematics and the ...
true
e96dd006b9cdfa456297e4725e8674dc1037a25a
C++
Richard-coder-Nai/OJ
/practice/0776_1.cpp
UTF-8
203
2.828125
3
[ "Apache-2.0" ]
permissive
#include <iostream> using namespace std; int main(void) { string a, b; cin>>a>>b; if(a.size()<b.size()) swap(a, b); a = a+a; if(a.find(b)!=a.npos) cout<<"true"<<endl; else cout<<"false"<<endl; }
true
b5ef85bdde19fea9c00b8af3d2e92d734a7aa5e5
C++
Baticsute/Tower-Shot-Game
/tower.h
UTF-8
979
2.734375
3
[]
no_license
#ifndef TOWER_H #define TOWER_H #include <QGraphicsPixmapItem> #include <QGraphicsPolygonItem> #include <QGraphicsItem> #include <QPointF> #include <QObject> class Tower:public QObject, public QGraphicsPixmapItem{ // Là lớp kiểu QGraphicsPixmapItem , QObject để chạy timer Q_OBJECT public: Tower(...
true
d6a9fae0db9ea9acaf41271b1c314f91de4d78f2
C++
yashPat98/OpenGL-Using-GLUT
/Line Sizes/LineSizes.cc
UTF-8
1,311
2.640625
3
[]
no_license
#include <GL/gl.h> #include <GL/glut.h> void SetupRC(void){ glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glColor3f(1.0f, 1.0f, 1.0f); } void ChangeSize(GLsizei w, GLsizei h){ GLfloat aspectRatio = (GLfloat)w / (GLfloat)h; if(h == 0) h = 1; glViewport(0, 0, w, h); //Reset coordinate system glMatrixMode(GL_P...
true
c1469bf2ff75b6e15e03c246cc154cffe2422d42
C++
shubhapatil154/CP
/InterViewPrep/Bits/bits.cpp
UTF-8
1,075
3.203125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void showbits(int n){ int k, andmask; for (int i = 15; i >= 0;i--){ andmask = 1 << i; k = n & andmask; if (k == 0) cout << "0"; else { cout << "1"; } } cout << en...
true
4b3b6cf508de9e84c7080b2d62b8a078380696a3
C++
longfangsong/glpkxx
/test.cpp
UTF-8
672
2.5625
3
[]
no_license
#include "glpkxx.h" #include <iostream> using namespace std; int main() { LinearProblem problem; Variable x1("x1"), x2("x2"), x3("x3"); Variable a("x1"); x1 >= 0; x2 >= 0; x3 >= 0; problem.addConstraint(x1 + x2 + x3 <= 100); problem.addConstraint(10 * x1 + 4 * x2 + 5 * x3 <= 600); ...
true
2313163cf063cc25dd9df91b2785c0112027d8ff
C++
asifbux/Cplusplus_Project
/ENSF_607_Project/CornerCut.cpp
UTF-8
1,479
2.953125
3
[]
no_license
// // CornerCut.cpp // ENSF_607_Project // // Created by Computer on 2020-04-06. // Copyright © 2020 Asif. All rights reserved. // #include "CornerCut.hpp" #include <iostream> #include "cmath" using namespace std; CornerCut::CornerCut(double x, double y, double width, double length, double radius, const char* nam...
true