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
404f0a966aac255c71b9515cc22617a847d067e8
C++
jtpunt/c-and-c-plus-plus
/Algorithms/StoogeSort/main.cpp
UTF-8
3,789
3.71875
4
[]
no_license
/********************************************************************* ** Author: Jonathan Perry ** Date: 1/21/2018 ** Description: This file contains code for reading data for 3 vectors ** from a text file, code writing the content of those 3 vectors to a file ** called "stooge.out", code printing the contents of the ...
true
d6aa4b4aed2470975cc97e991ac91dee7d392fc2
C++
caryleo/EImC
/EImC/ModeRead.cpp
GB18030
2,652
3.03125
3
[]
no_license
#include"stdafx.h" #include "ModeRead.h" #include "ModeErrorReport.h" ModeRead::ModeRead()//ʼ { lineLen = 0; readPos = -1; lineNum = 0; colNum = 0; file = NULL; lastch = '\0'; memset(filePathName, '\0', sizeof(filePathName)); } int ModeRead::getLine() { return lineNum; } int ModeRead::getCol() { retur...
true
45757b351fa9e42052ca61b47e9e15d0cc38a590
C++
pytseng/etch-a-sketch
/sensorCode/sensorCode.ino
UTF-8
1,973
2.71875
3
[]
no_license
//#define SENSORPINA A0 // x axis #define verticalPin A0 #define horizontalPin A1 #include <Adafruit_LSM303_U.h> #include <Adafruit_LSM303.h> int accelRead=0; String vertical = ""; String horizontal = ""; String dataString = ""; unsigned long targetTime=0; const unsigned long interval=2500; //TODO: How fast should we ...
true
e65586eaac32cdc3103083aa70a416be81f7e6d3
C++
LaMinato/LodeRunner1
/main.cpp
WINDOWS-1251
13,530
2.75
3
[]
no_license
#include <SFML/Graphics.hpp> #include "map.h" #include "view.h" #include <iostream> #include <sstream> #include "menu.h" #include <vector> #include <list> using namespace sf; //////////////////////////////////// ////////////////////////// class Entity { public: float dx, dy, x, y, speed,moveTimer;// ...
true
8b88b700e28db706d60038581ceade98b271ca5d
C++
zhming0/Mingorithm
/ACM/BOJ1521.cpp
UTF-8
775
2.6875
3
[]
no_license
#include <iostream> #include<map> #include<stdio.h> using namespace std; int main (int argc, char * const argv[]) { int n,x,y; int p=0; scanf("%d",&n); while (n--) { int i; int ans=0; map<string,bool> m; string s; scanf("%d %d",&x,&y); for (i=0; i<x; i++) { int pos=1; int found; cin>>s; whil...
true
b1433945feacb149ac2b4d5aa2a8a722c6a3353b
C++
Armanis22/ProjectFuego
/ProjectFuego/ResourceManager.h
UTF-8
453
2.890625
3
[]
no_license
#pragma once #include <SFML\Graphics.hpp> #include <map> template <typename Enum, typename Resource> class ResourceManager { public: const Resource& get(Enum name) const { return m_resources.at(name); } protected: void addResource(Enum name, const std::string& fileName) { Resource resource; resource.loa...
true
b639dd9ee19f8fc66ba7e802fa81d008db2ee9a4
C++
cnyali-czy/code
/vjudge/平衡树/A.cpp
UTF-8
2,639
2.671875
3
[]
no_license
#define DREP(i, s, e) for(int i = s; i >= e ;i--) #define REP(i, s, e) for(int i = s; i <= e ;i++) #define DEBUG fprintf(stderr, "Passing [%s] in Line %d\n", __FUNCTION__, __LINE__) #define chkmax(a, b) a = max(a, b) #define chkmin(a, b) a = min(a, b) #include <bits/stdc++.h> using namespace std; const int maxn = 1...
true
5b6590e94b2c896f18c2f7237c1fedfd19e10f78
C++
SWCDSI/QUIC
/AARPorjectAll/jnitest/test_conv_data_optimized.cpp
UTF-8
1,460
3.375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> float abs(float value){ if(value>=0) return value; else return -1*value; } // function used in ultraphone to get only the necessary convolutions float getSumAbsConInRange(float *source, int sourceSize, float *pulse, int pulseSize, int rangeStart, int rangeEnd){ int rangeSize...
true
959b6e728c0473240d2673ba74e236f62519077b
C++
Nelnir/PasswordManager
/uTests/tst_abstractfilemanagertest.h
UTF-8
2,405
3.015625
3
[]
no_license
#include <gtest/gtest.h> #include <gmock/gmock-matchers.h> #include "abstractfilemanager.h" #include <memory> #include <QDir> struct TestData{ QString m_login; QString m_password; friend QDataStream& operator>>(QDataStream& stream, TestData& data){ stream >> data.m_login >> data.m_password; ...
true
f06716d358edbe97b6405a23fa0f6cab9ace69ac
C++
oderayi/cbs
/simpleInterest.cpp
UTF-8
551
3.921875
4
[]
no_license
/* The simple interest on a principal (P) at a rate (R) for time (T) ins computed as Simple Interest = PRT / 100 Write a C++ program to input P, R and T, and compute the simple interest */ // Program to compute simple interest #include <iostream> using namespace std; int main(){ float principal, rate, simpleIn...
true
22c43c389b3049f9ba87cb0309d3181353017f1c
C++
samerbuj/qix
/menu.cpp
ISO-8859-1
794
2.8125
3
[]
no_license
#include "menu.h" #include<iostream> using namespace std; void MenuPrincipal() //Mostra el men principal amb les diferents opcions que podem escollir. { cout << "------Menu Principal------" << endl << endl; cout << "1.- Jugar" << endl; cout << "2.- Configurar" << endl; cout << "3.- Millors Puntuacions" <<...
true
357d23959df5992beb470b61129b46afbc802529
C++
GabeOchieng/ggnn.tensorflow
/program_data/PKU_raw/60/1396.c
UTF-8
370
2.859375
3
[]
no_license
int shu(int a) { int i,n; for (i=2;i<=sqrt(a);i++) { if (a%i==0) return 0; } return 1; } main() { int m,j,sum=0; scanf("%d",&m); for (j=3;j<=m-2;j++) { if (shu(j) && shu(j+2)) { printf("%d %d\n",j,j+2); sum++; ...
true
6e826e1d532f0c7aeb740318fa44fc459e1661a0
C++
PeterZhouSZ/TranslationSync
/src/graph.h
UTF-8
8,598
3.109375
3
[]
no_license
#ifndef GRAPH_H #define GRAPH_H #include <iostream> #include <fstream> #include <string> #include <random> #include <stdlib.h> #include <string> #include <algorithm> using namespace std; class Params{ public: //Graph specific parameters: int n; //#nodes double p; //Probability of each edge double...
true
64a2014258be9eec3904a427c8887cfdaf8ef13f
C++
eamarquise/SER401-FALL-19-Project35
/Archive/P35Brute/PreferredMeetingTimes.h
UTF-8
757
3.046875
3
[]
no_license
/* * PreferredMeetingTimes.h * Description: * A Class to give a student's meeting times * * Created on: Sep. 30, 2019 * Author: mcilibra * * Edited on: Oct. 06, 2019 * Author: eamarquise */ #ifndef PREFERREDMEETINGTIMES_H_ #define PREFERREDMEETINGTIMES_H_ #include <vector> class PreferredMeet...
true
43ca8ee0ba71bfc7d6a1d087524a82d083c7b1ba
C++
MarkRakhmatov/ImageCapture
/Utils/src/CallWrapper.h
UTF-8
906
2.84375
3
[ "MIT" ]
permissive
#pragma once #include <chrono> #include <thread> #include <type_traits> #include <utility> enum class ECheckOperation { IN_PROGRESS, SUCCESS, FAIL, }; template< typename TCheckerFunc, TCheckerFunc& CheckerFunc, typename TFunc, typename ... TArgs> std::pair<typename std::result_of<TFunc(TArgs...)>::typ...
true
aa7cee1c2053220b9e9c5c53ff8f27bbd8c1039b
C++
lipeng28/Gklee
/Gklee/include/cuda/thrust/detail/backend/binary_search.h
UTF-8
8,992
2.578125
3
[ "NCSA" ]
permissive
/* * Copyright 2008-2012 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
true
0a489fd9cf047b635d9eb144f863ea8dac35e5cb
C++
th4m/c-audio-tag
/src/Parser.cpp
UTF-8
1,578
2.734375
3
[]
no_license
#include <string.h> #include <fstream> #include <taglib/id3v2tag.h> #include <audiotag/Parser.hpp> using namespace TagLib::ID3v2; // Helper functions std::string Parser::trim (std::string str) { size_t first = str.find_first_not_of(' '); size_t last = str.find_last_not_of(' '); return str.substr(first, last...
true
9907b16b720c27e296635eec13e4646d89a1a06a
C++
karldoenitz/HiJoke
/Application/register/RegisterHandler.cpp
UTF-8
1,546
2.90625
3
[]
no_license
// // Created by 李志豪 on 10/3/15. // #include "RegisterHandler.h" bool Register::user_register(std::string username, std::string password) { std::shared_ptr<DatabaseOperator>databaseOperator(new DatabaseOperator()); std::shared_ptr<User>user(new User()); user->set_username(username); user = databaseOpe...
true
421e36030012fd6bf6674f4db0c4c69e63001cc3
C++
Ehkiden/Shapes-Calculation
/Cylinder.cpp
UTF-8
972
3.796875
4
[]
no_license
#include "Cylinder.h" #include <cmath> #include <iostream> using namespace std; //default constructor Cylinder::Cylinder():Circle() { radius = 0; height = 0; } //constructor Cylinder::Cylinder(double r, double h):Circle(r) { radius = r; height = h; } //computes the area double Cylinder::Area() ...
true
c71b2ce83411f7c1baf800d6d386dae6c7652631
C++
JoeAltmaier/Odyssey
/Odyssey/SSAPI_Server/ManagedObjects/FloatVectorFilter.h
UTF-8
2,820
2.703125
3
[]
no_license
//************************************************************************ // FILE: FloatVectorFilter.h // // PURPOSE: Defines the FloatVectorFilter object that will be used // to filter result sets for ObjectManager::ListIds() //************************************************************************ #ifn...
true
5b5c6f63dbd9f28f2d5324092043161cdef2dce8
C++
drlongle/leetcode
/algorithms/problem_1200/solution.cpp
UTF-8
2,120
3.46875
3
[]
no_license
/* 1200. Minimum Absolute Difference Easy Given an array of distinct integers arr, find all pairs of elements with the minimum absolute difference of any two elements. Return a list of pairs in ascending order(with respect to pairs), each pair [a, b] follows a, b are from arr a < b b - a equals to the minimum absolu...
true
6aea16a8afa5eea9c4a08d655a946d5f513b36ec
C++
Graff46/OGSR-Engine
/ogsr_engine/xrGame/date_time.cpp
UTF-8
4,568
2.84375
3
[ "Apache-2.0" ]
permissive
//////////////////////////////////////////////////////////////////////////// // Module : date_time.h // Created : 08.05.2004 // Modified : 08.05.2004 // Author : Dmitriy Iassenev // Description : Date and time routines //////////////////////////////////////////////////////////////////////////// #include "stdafx....
true
9d952ca262baed88c48402615b843234f733ed44
C++
DenverN3/Nimbus
/cplusplus/align/lib/libnimbus/src/Utils.cpp
UTF-8
2,143
2.921875
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "Utils.h" namespace Nimbus { namespace utils { char complement_base( char b ) { char rval = 'N' ; switch(b) { case 'A': rval = 'T' ; break ; case 'T': rval = 'A' ; break ; case 'G': rval = 'C' ; break ; case 'C': rval = 'G' ; break ; ...
true
bafd6cc42819e69b604e916c202f36f9d3824d8a
C++
gregjohnson2017/NeuralNet
/network.h
UTF-8
1,182
2.671875
3
[]
no_license
#ifndef NETWORK_H #define NETWORK_H #include <stdio.h> #include <vector> #include "layer.h" using namespace std; typedef double (*errorFunc)(double activation, void* answer); typedef struct sampleSet{ vector<vector<double> > *inputData; vector<double> *answers; int sampleSize; // length of 1d array stretch before ...
true
8e1a34a61e1d75885cdae98fd203361221139e96
C++
Aditi1017/SDE-Problems
/Day 1/CPP/6.cpp
UTF-8
907
2.9375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void mergeIntervals(vector<vector<int>>& intervals) { if(intervals.size()<=1) cout << -1 ; sort(intervals.begin(), intervals.end()); vector<vector<int>> output; output.push_back(intervals[0]); f...
true
4031a0c039320790735df043cbc8be5c63d6a350
C++
proydakov/codeforces
/Codeforces_Round_#142/B/solution.cpp
UTF-8
1,048
2.96875
3
[]
no_license
#include <cmath> #include <vector> #include <cstdint> #include <iostream> std::vector<char> build(int n) { std::vector<char> prime (n + 1, true); prime[0] = prime[1] = false; for (int i = 2; i <= n; ++i) { if (prime[i]) { if (i * 1ll * i <= n) { for (int j = i * i; j <= ...
true
0b694b128c94f1adfa5b6d293cb9daf4ab77e791
C++
wenjietseng/nctu-CPE
/0926/zeros-and-ones.cpp
UTF-8
872
2.6875
3
[]
no_license
// Zeros and Ones uva 10324 #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <string> #include <map> #include <queue> #include <stack> #include <iostream> using namespace std; #define MAXN 1000000 + 5 char line[MAXN]; int main() { int n, i, j, ans, test_case = 1; while (scan...
true
197e9c4164be856d9115a5894ad3c1399351be40
C++
dwks/HexRacer
/src/input/InputAction.h
UTF-8
439
2.59375
3
[]
no_license
#ifndef PROJECT_INPUT__INPUT_ACTION_H #define PROJECT_INPUT__INPUT_ACTION_H namespace Project { namespace Input { class InputAction { public: enum InputType {KEY, BUTTON, AXIS}; double offValue; double onValue; InputAction(double off_value, double on_value) : offValue(off_value), onValue(on_value) {} vir...
true
5e853ac1019127f26ead6877cdbaad13ed5c9d54
C++
samwetha/CatBurglars
/CatBurglars/CatBurglars/Channel.cpp
UTF-8
695
3
3
[]
no_license
#include "Channel.h" #include <iostream> Channel::Channel(int id) : mID(id), mActive(false), mTimer(0){ } bool Channel::isActive() { return mActive; } int Channel::getID() { return mID; } void Channel::setActive(bool toggle, float holdlength) { bool istoggle = toggle; float HOLD = holdlength; if (isto...
true
4eb43a8bf384ac100076e4b2d51f0eb2cedf4a1b
C++
Karthikeyan1920/CodeChef
/Code_Ensemble20/Help_Martha.cpp
UTF-8
3,195
2.796875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef signed long long int ll; ll finddir(string str, char ele){ ll lctr = 0, rctr = 0, uctr = 0, dctr = 0; for(ll i = 0; str[i] != '\0'; i++){ if(str[i] == 'L') lctr++; if(str[i] == 'D') dctr++; if(str[i] == 'U') uctr++; ...
true
f09895155cd1667353a9b293aed823c7e37c26b9
C++
Juzley/typeordie
/Laser.cpp
UTF-8
1,066
2.640625
3
[ "MIT" ]
permissive
#include "Laser.h" #include "Game.h" #include "TextureManager.h" #include "SoundManager.h" #include "Utils.h" namespace typing { const std::string Laser::LASER_SOUND("sounds/laser.wav"); const float Laser::LINE_DRAW_TIME = 0.0f; const float Laser::LINE_FADE_TIME = 0.5f; const float ...
true
15a3da1f51341439aea52093bfeed358fc63f2b5
C++
Fr3ud/42_CPP_pool
/d08/ex00/main.cpp
UTF-8
535
3.078125
3
[]
no_license
#include "easyfind.hpp" int main( void ) { std::list<int> list; list.push_back(4); list.push_back(2); list.push_back(3); list.push_back(5); list.push_back(7); try { easyfind(list, 3); } catch (std::exception& e) { std::cout << "Value not found" << std::endl; } try { easyfind(list, 42); ...
true
37ed0ed6e6b4108ebb6a027d60b752f36fa3efed
C++
DaDaMrX/Sophomore
/DataStructure/21.连连看游戏辅助 (BFS).cpp
UTF-8
2,199
3.140625
3
[]
no_license
/* 21.连连看游戏辅助 (BFS) */ #include <cstdio> #include <cstring> #include <algorithm> #include <queue> using namespace std; typedef long long ll; const int INF = 0x7f7f7f7f; const int N = 110; struct Point { int x, y; Point() {} Point(int x, int y) : x(x), y(y) {} }; typedef Point Vector; Point operator+(Point& p, Vecto...
true
305cf3c1b00471cf9794fa9b2c36315d5d6b8e0b
C++
Ain-Crad/Algorithm-and-DataStructure-Practice
/Uva/Uva221.cpp
UTF-8
1,690
2.8125
3
[]
no_license
/* * * Author : Aincrad * * Date : Wed 14 Nov 07:22:41 CST 2018 * */ #include <bits/stdc++.h> using namespace std; const int maxn = 107; struct Building{ int id; double x, y, w, d, h; }; Building bld[maxn]; int xp[maxn * 2]; int n; bool cmp(const Building& a, const Building& b){ if(a.x == b.x){ return a....
true
4d17c8a082790fe0d1196612161ef68806d334b2
C++
MarquessV/cBirdpp
/include/cbirdpp/Observation.h
UTF-8
1,848
2.78125
3
[]
no_license
#ifndef CBIRDPP_OBSERVATION_H #define CBIRDPP_OBSERVATION_H #include <string> #include <variant> #include <vector> namespace cbirdpp { /* * A simple container class for holding the information returned by the eBird API when making observation requests. * The getter method names directly correlate with the na...
true
6333c72d84c5c3054c2a45c711c75418ec754f2a
C++
TomChoi/coding_interview
/questions/chapter02/q2-4/test_case/test_case.cpp
UTF-8
3,872
2.984375
3
[]
no_license
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #include "catch.hpp" #include "../answer.cpp" bool CheckResult(LinkedList<int>& list, int partition, int len, int left){ Node<int>* current = list.head; int length = list.getLength(); if( length != len ) return...
true
5918054b6d9085c53fd3cb6ca9b5d6c37b10178c
C++
ltempier/arduino_van
/main/Victron.h
UTF-8
1,309
2.515625
3
[]
no_license
#ifndef VICTRON_h #define VICTRON_h #include <Arduino.h> #include <SoftwareSerial.h> /* ERR CODE: 0 No error 2 Battery voltage too high 17 Charger temperature too high 18 Charger over current 19 Charger current reversed 20 Bulk time limit exceeded 21 Current sensor issue (sensor bias/s...
true
f39109b8166c6eb8600d0fd5774318f3d985dba1
C++
freme/raybeam
/ray.h
UTF-8
646
3.3125
3
[]
no_license
// ray.h #ifndef _RAY_H_ #define _RAY_H_ 1 #include "vector3.h" #include <iostream> class Ray { public: Ray() {} Ray(const Vector3& a, const Vector3& b) { data[0] = a; data[1] = b; } Ray(const Ray& r) { *this = r; } Vector3 origin() const { return data[0]; } Vector...
true
5c4908a0a3c1bb144ccecf3e7feb8b58808954de
C++
lklok66/uMOF_STD11
/include/umof/any.h
UTF-8
4,170
2.9375
3
[]
no_license
/********************************************************************* This file is part of the uMOF library. Copyright (C) 2014 Artem Shal artiom.shal@gmail.com The uMOF library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Fre...
true
588ba65432c59101954a9c13d154f423332a177d
C++
Raven45/DataLib
/DataLib/NodeSingle.hpp
UTF-8
1,270
3.078125
3
[]
no_license
#include "Node.hpp" namespace DataLib { template <class DataType> class NodeSingle : public Node<DataType> { public: NodeSingle(); NodeSingle(DataType Data); NodeSingle(NodeSingle<DataType>* Pointer); NodeSingle(DataType Data, NodeSingle<DataType>* Pointer); NodeSingle(NodeSingle<DataType> &Copy); N...
true
eea0bb5074a8e2f7d11d4513eab183fd83ab0cba
C++
smallinsect/WindowsAPI
/WinAPI/DemoWin14/DemoWin14.cpp
UTF-8
5,923
2.703125
3
[]
no_license
// DemoWin14.cpp : 定义应用程序的入口点。 // #include "stdafx.h" #include "DemoWin14.h" #define MAX_LOADSTRING 100 // 全局变量: HINSTANCE hInst; // 当前实例 WCHAR szTitle[MAX_LOADSTRING]; // 标题栏文本 WCHAR szWindowClass[MAX_LOADSTRING]; // 主窗口类名 // 此代码模块中包含的函数的前向声明: ATOM ...
true
f44703194f2de3c1552c489ff1853fdf0201d67a
C++
Abdullah-Al-Zishan/C-Multi-threading
/condition_variable_and_threads.cpp
UTF-8
3,626
3.234375
3
[]
no_license
#include <queue> #include <iostream> #include <chrono> #include <thread> #include <mutex> #include <random> #include <condition_variable> bool done; bool notify; std::mutex print_mutex; std::mutex queue_mutex; std::queue<int> error_log; std::condition_variable cond; void worker_functio...
true
d71f6f79b1558e4c809ca6b9212d893d3d43ae7a
C++
elsenorchris/SubCparser
/LexicalAnalysis.h
UTF-8
563
2.59375
3
[]
no_license
// LexicalAnalysis.h: interface for the LexicalAnalysis class. // ////////////////////////////////////////////////////////////////////// #if !defined(_LA_) #define _LA_ #include <iostream> #include <fstream> #include <string> #include <unordered_map> using namespace std; class LexicalAnalysis { ...
true
0a90c6fab35d45c87845e8ea311681ed22be91d4
C++
insidepower/cpptest
/littleBigEndianTest/Cpp1.cpp
UTF-8
804
3.140625
3
[]
no_license
#include <iostream> #include <iomanip> using namespace std; typedef struct t_my{ unsigned int a; t_my * next; } t_my; typedef struct { unsigned short b; unsigned short c; t_my * d; } t_myy; char alpha[]= "abcdefghijklmnopqrstuvwxyz"; char * p_alpha = alpha; int main(void){ t_my u; u.a =...
true
e38977af12af8dc498c4b799ceb577bb43d2dc68
C++
jeffmeese/qtep
/core/commandlineoption.cpp
UTF-8
2,985
3.21875
3
[]
no_license
#include "commandlineoption.h" #include <algorithm> CommandLineOption::CommandLineOption(const std::string & name) { init({name}, ""); } CommandLineOption::CommandLineOption(const std::vector<std::string> & names) : mNames(names) { init(names, ""); } CommandLineOption::CommandLineOption(const std::string & na...
true
895e375e04d0d7966a75bfde127d6b9701919dff
C++
joonlee701/-
/astar/astar_pathfinding.cpp
UTF-8
5,117
3.140625
3
[]
no_license
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <time.h> #include <vector> using namespace std; #define length 200 #define blocked 1 #define open 0 #define visited 2 #define start 0 #define finish 39999 class searchNode{ private: struct NODE{ int parent; int h,f,g; int s...
true
ed8e1790da5c757bd92c6a3725dd5bd3bf938ebd
C++
TrieBr/GMIDE
/GMIDE/GMAsset_Sprite.h
UTF-8
2,926
2.859375
3
[]
no_license
#ifndef GMASSET_SPRITE_H #define GMASSET_SPRITE_H #include "GMAsset.h" #include <QFile> //Bounding box modes enum BoundingBoxMode { Automatic = 0, FullImage = 1, Manual = 2 }; //Collision kinds enum CollisionKind { Precise = 0, Rectangle = 1, Ellipse = 2, Diamond = 3 }; /* * Sprite Ass...
true
61fa90eea8cf1e44e022c8f14d4b8c36db3734e1
C++
Joshitha18/problem-solving
/platforms/Leetcode/DailyChallenge/March/4_LinkedList_Intersection/ll_intersection_2.cpp
UTF-8
632
3.421875
3
[]
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: void sign(ListNode *head) { ListNode *temp=head; while(temp) { temp->val *= -1; t...
true
047e032c19027971c3c44ba6f986ccca30f0e23e
C++
CloudNartiveProjects/SEAL
/native/src/seal/util/polycore.h
UTF-8
6,238
2.71875
3
[ "MIT", "CC0-1.0" ]
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #pragma once #include "seal/util/common.h" #include "seal/util/pointer.h" #include "seal/util/uintcore.h" #include <algorithm> #include <cstdint> #include <cstring> #include <limits> #include <sstream> #include <stdexcept>...
true
2eb66e59f08d5209aeeefa07debea7ce21e3575a
C++
DreamDreames/OJ
/LeetCode/79_Word_Search.cpp
UTF-8
2,107
3.484375
3
[]
no_license
#include "shared.h" /* Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once. For example, Given board ...
true
3b1fa93fc8d4ed15b6e578ba11cf2898d5107459
C++
BishuPoonia/coding
/CPP/Pattern/pattern.cpp
UTF-8
903
3.171875
3
[]
no_license
#include <iostream> using namespace std; int main() { // Pattern #1 cout << "Pattern no. 1:" << endl; int a, b; for (a = 1; a <= 9; a++){ for (b = 1; b <= a; b++){ cout << a; } cout << "\n"; } // Pattern #2 cout << "\n\nPattern no. 2" << endl...
true
307f36a8ef72e8bd26818bbcf2c4febaecc786ac
C++
getState/Algorithm
/코드플러스중급1/그리디/가장긴증가하는부분수열2.cpp
UTF-8
553
2.578125
3
[]
no_license
#include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; vector<int> arr; vector<int> dp; int N; int main() { cin >> N; int input; for (int i = 0; i < N; i++) { cin >> input; arr.push_back(input); } for (int i = 0; i < N; i++) { ...
true
8c0eef1e6c39fba8d8b2475c3a104a0958a40c04
C++
hgedek/cpp-samples
/literaltype.cpp
UTF-8
866
3.875
4
[]
no_license
// constexpr types are literal types // int float char ... // you can define your literal type [ constexpr ctor ] #include <iostream> struct ConstStr { const char* ptr_; std::size_t size_; template <size_t N> constexpr ConstStr(const char (&a)[N]): ptr_(a), size_(N) {} constexpr const char* dat...
true
10626e3c47a1c405d0a0ad03f5c5b58811007239
C++
sharkofsteppe/Cpp_modules
/cpp_module_03/ex03/DiamondTrap.cpp
UTF-8
1,493
3.046875
3
[]
no_license
#include "DiamondTrap.hpp" DiamondTrap::DiamondTrap( std::string name ) : ClapTrap( name + "_clap_name" ), _Name( name ) { this->setHP(getFragsHP()); this->setAD(getFragsAD()); std::cout << "DiamondTrap constructor have done the work" << std::endl; } DiamondTrap::DiamondTrap( void ) : ClapTrap( "Default_c...
true
a86ccf91cb653e458326d5d85c6b9a716f4ddefc
C++
miquelgalianallorca/Navmesh
/game/pathfinding/pathNavmesh.cpp
UTF-8
5,994
2.921875
3
[]
no_license
#include <stdafx.h> #include <algorithm> #include "pathNavmesh.h" #include "pugixml/pugixml.hpp" PathNavmesh::PathNavmesh() : isStepByStepModeOn(false), startNode(nullptr), endNode(nullptr), navmesh(nullptr) {} PathNavmesh::~PathNavmesh() { navmesh = nullptr; for (Node* node : nodes) delete node;...
true
b1d961409e6325e575c964699db95588b290d9cc
C++
ckobylko/HIPAccBenchmark
/src/MinMaxDetector/MinMaxDetector.cpp
UTF-8
559
2.78125
3
[]
no_license
#include "../../include/MinMaxDetector/MinMaxDetector.h" #include <stdexcept> #include <stdio.h> void MinMaxDetector::Run(unsigned int uiKernelSize) { if (uiKernelSize < 3) { throw std::runtime_error( "The kernel size must be greater than or equal to 3!" ); } else if ((uiKernelSize & 1) == 0) ...
true
61fcc3da8fdf1b2fc1d60d523545fe0d48182df4
C++
hachi-88/atcoder
/abc/111/abc111c.cpp
UTF-8
1,536
2.90625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int f(vector<pair<int, int>> v1, vector<pair<int, int>> v2, int n) { int ans = 0; ans += (n / 2 - v1[0].first); if (v1[0].second != v2[0].second) { ans += (n / 2 - v2[0].first); } else { if (v2.size() > 1) { ans += (n / 2 - v2[1...
true
74fe33021b65f3bce1a7b562995f68148a0b9409
C++
abhigrover101/leetcode
/all palindromes.cpp
UTF-8
1,228
3.28125
3
[]
no_license
#include<iostream> #include<string> #include<vector> using namespace std; bool isPalindrome(string s,int i,int j){ while(i<j && s[i]==s[j]){ i++; j--; continue; } if(i>=j) return true; return false; } void palindromes(string s...
true
aaaec0729b129310bf23caa88a6ccb38af908dcf
C++
sopyer/Shadowgrounds
/storm/storm3dv2/Clipper.cpp
UTF-8
1,665
2.609375
3
[]
no_license
// Copyright 2002-2004 Frozenbyte Ltd. #ifdef _MSC_VER #pragma warning(disable:4103) #endif //------------------------------------------------------------------ // Includes //------------------------------------------------------------------ #include "storm3d.h" #include "VertexFormats.h" #include "../../util/Debug_...
true
4e228dba8d6b5d6ea75ab2df9ab6182985dc32be
C++
JaeseokWoo/Algorithm
/Programmers/네트워크.cpp
UTF-8
860
3.4375
3
[]
no_license
/** * @date: 2021-07-02 * @version: vol1 * @access: dfs를 통해 네트워크 수를 계산하였다. * @weaknesses & learned: */ #include <string> #include <vector> using namespace std; const int MAX_N = 200; int N; vector<vector<int>> connected; bool visited[MAX_N]; void init() { for (int i = 0; i < N; ++i) { visited[i] = false...
true
259716c58251b722201b1b060c52dcd3f4cb1b4e
C++
HanWanxia/hello-world
/DBMS/RKDBMS/FileLogic.h
UTF-8
845
2.53125
3
[]
no_license
#pragma once /************************************************** [ClassName] CFileLogic [Function] Database file logic class **************************************************/ class CFileLogic { public: // Get the path of the database description file CString GetDBFile(CString path); // Get the path of the databas...
true
ea7dd469bf749646948d455d5983bbafb9085217
C++
dgrij/assignment1
/RootAssignment1/RootAssignment1/LineKeeper.cpp
UTF-8
467
2.71875
3
[]
no_license
// Provides definitions for the declarations made in Line.h #include "LineKeeper.h" // Using-declarations using std::cout; using std::endl; using std::strcpy; LineKeeper::LineKeeper(const char* fileName) //: linePtr{ new char[1]{ '\0' } } { //cout<<"inside lk"<<endl; char* temp = new char[1000]; std::ifstrea...
true
81db220d0d58d09036cbed0d5375aa02111237ec
C++
SayaUrobuchi/uvachan
/AtCoder/arc065_a.cpp
UTF-8
593
2.859375
3
[]
no_license
#include <iostream> #include <cstring> using namespace std; const int NUM_STR = 4; const string str[] = {"dream", "dreamer", "erase", "eraser"}; int main() { int i, j, k; bool is_pos; string s; getline(cin, s); for (i=s.size(), is_pos=true; i>0&&is_pos; i=k) { for (j=0; j<NUM_STR; j++) { if (i >= str[j]...
true
54ef61363c26207fe5dd1b4f32b070f204bef27c
C++
jmestanza/TPF_Stratego
/StrategoDEF/stratego/stratego/src/framework/view/utils/getKey.cpp
UTF-8
1,929
2.5625
3
[]
no_license
#include "getKey.h" map<int,int> allegroCodes; void getKeyInit() { allegroCodes[ALLEGRO_KEY_0] = '0'; allegroCodes[ALLEGRO_KEY_1] = '1'; allegroCodes[ALLEGRO_KEY_2] = '2'; allegroCodes[ALLEGRO_KEY_3] = '3'; allegroCodes[ALLEGRO_KEY_4] = '4'; allegroCodes[ALLEGRO_KEY_5] = '5'; allegroCodes[ALLEGRO_KEY_6] = '6';...
true
8159800aea4b60663b7336ec1bd1c0c481e1c107
C++
vouching/tasks-for-inf-c-
/tasks7/task7_3.cpp
UTF-8
1,039
2.984375
3
[]
no_license
#include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <iomanip> #include <fstream> #include <sstream> #include <map> using namespace std; struct student { string name; string surname; int day_birth; int month_birth; int year_birth; }; student pushh()...
true
277c3ab63ff652430a2928728fd5153fcc348b30
C++
take-cheeze/rpgtukuru-iphone
/KutoEngine/kuto/kuto_array.h
UTF-8
1,464
3.4375
3
[]
no_license
/** * @file * @brief 静的配列クラス 普通の配列より便利に安全に * @author project.kuto */ #pragma once #include "kuto_types.h" #include "kuto_error.h" #include <cstring> namespace kuto { /// 静的配列クラス 普通の配列より便利に安全に template<class T, uint CAPACITY> class Array { public: typedef T* iterator; typedef const T* const_iterator; public: ...
true
197e3c9aabc44c9b870620f2eafc5e5549a9ef28
C++
medhavisinha/Cpp-STL-Maps
/Workshop/inserting_data.cpp
UTF-8
501
2.859375
3
[]
no_license
#include<iostream> #include<map> #include<iterator> using namespace std; int main(){ map<int, int> m1; m1.insert(pair<int, int>(1, 5)); m1.insert(pair<int, int>(2, 10)); m1.insert(pair<int, int>(3, 15)); m1.insert(pair<int, int>(4, 20)); m1.insert(pair<int, int>(5, 25)); //m1.clear(); map<int...
true
bcbeef7c2332a6bfc62683413c2dff3ff0dbd570
C++
baruken/invcat2d
/prototypes/megaman-uno/Timer.cpp
UTF-8
348
2.8125
3
[]
no_license
#include "Timer.hpp" Timer::Timer():m_nTicks(0) { #ifdef DEBUG std::cout << "Timer constructor: " << this << std::endl; #endif } Timer::~Timer() { #ifdef DEBUG std::cout << "Timer destructor: " << this << std::endl; #endif } void Timer::Start() { m_nTicks = SDL_GetTicks(); } int Timer::GetTicks() { return S...
true
4e5200f5adc75e00af0531b8be4eb3a5d6dba310
C++
kwosingyu/SimPla
/example/obsolete/modeling/ebmesh.cpp
UTF-8
6,606
2.765625
3
[ "BSD-3-Clause" ]
permissive
/*! \example example_ebmesh.cpp The EBMesh tool can generate Cartesian meshes for solvers that use embedded boundary algorithms. \n It uses a ray-tracing technique based on hierarchical oriented bounding boxes in MOAB. \section EBMesh_cpp_title EBMesher Tool With Options \subsection EBMesh_cpp_in Input Reads in an inp...
true
215ab91ff9f2afd9a15bfeb5f8e6096fc0c076ea
C++
Okrio/ecmedia
/servicecore/source/codingHelper.h
GB18030
3,204
3.34375
3
[]
no_license
#include<string> #include<windows.h> #include<vector> using namespace std; //utf8 ת Unicode static std::wstring Utf82Unicode(const std::string& utf8string) { int widesize = ::MultiByteToWideChar(CP_UTF8, 0, utf8string.c_str(), -1, NULL, 0); if (widesize ==0 && GetLastError() == ERROR_NO_UNICODE_TRANSLATION) { t...
true
bff8a461a2f058269850d549f173fd6df9d247a9
C++
Eli-yp/Data_structure
/Sort/ShellSort.cpp
UTF-8
778
3.265625
3
[]
no_license
//希尔排序 #include<iostream> #include "sort.h" using namespace std; void ShellSort(SqList *L) { int i, j; int increment = L->length; do { increment = increment / 3 + 1; //增量序列 for(i = increment + 1; i <= L->length; ++i) { if(L->r[i] < L->r[i-increment]) { //需将L->r[i]插入有序增量子表 L->r[0] = L->r[i];...
true
a1b19fc81904eccfbdd1f527bc38938e79153165
C++
cristofer2021/EJERCICIO-DE-FIN-Y-INCIO-
/main.cpp
UTF-8
315
2.859375
3
[]
no_license
#include <iostream> using namespace std; int main() { int inicio,fin,s; s=0; cout << " ingrese el punto de inicio \n"; cin>> inicio; cout <<" ingrese el punto de fin\n"; cin>> fin; do { s=s+inicio; inicio=inicio+1; }while (inicio<fin); cout << " la sumatoria es :"<<s; }
true
c4a484afcd1453aef8b57844ac48e146577debba
C++
BenDaMan88/Terminal-Based-Pizza-Ordering-Site-5-1-2018
/Restaurant.h
UTF-8
2,319
3.09375
3
[]
no_license
/****************************************************************************** ** Program Filename: Restaurant.h ** Author: Ben Johnson ** Date: April 30, 2018 ** Description: pizza ordering site, terminal based. ** Inpupt: data read in from premade file and user input. ** Output: results printed to file or terminal d...
true
be9fc71c5fef7995f574b38d2e82036f1faaae32
C++
Jin-SukKim/Algorithm
/Problem_Solving/baekjoon/DFS/14391_sub_paper/subPaper.cpp
UTF-8
2,594
3.453125
3
[]
no_license
#include <iostream> #include <vector> #include <string> // 가로는 direction에 true로 되어있고 세로는 false로 되어있다. int sum(std::vector<std::vector<int>> &paper, std::vector<std::vector<bool>> &direction, int &N, int &M, int row, int column) { int totalSum = 0; for (int i = 0; i < N; i++) { int sum = 0; ...
true
5683abb63387dfc854814478bb4a0744d13ba273
C++
Dhruv-KDB/Arduino-codes
/Methane_sensor.ino
UTF-8
1,461
3.109375
3
[]
no_license
int gas_sensor = A0; //Sensor pin float R0 = 10; //Sensor Resistance in fresh air from previous code float b=1.133; float m=-0.318; void setup() { Serial.begin(9600); //Baud rate pinMode(gas_sensor, INPUT); //Set gas sensor as input } void loop() { float sensor_volt; //Define variable for sensor vo...
true
ca5a9cfe5a71e063e0ebf0d516ee7e0aecddc869
C++
mohamedelsayeed/client-server-model
/ServerModel/Server.cpp
UTF-8
3,815
2.75
3
[]
no_license
#include <iostream> #include <string> #include <WS2tcpip.h> #pragma comment(lib, "ws2_32.lib") using namespace std; #define DEFAULT_PORT "27015" #define DEFAULT_BUFLEN 512 void main() { // Initialize Winsock WSADATA wsData; int wsResult = WSAStartup(MAKEWORD(2, 2), &wsData); if (wsResult != 0) { cerr << "Can't ...
true
34534c7998653a5c944a451960ed05ebd182ee27
C++
tpetrychyn/TextBasedTurnBasedGame
/Attacker.cpp
UTF-8
1,048
3.25
3
[]
no_license
// // Attacker.cpp // cs115_assignment4 // // Created by Taylor Petrychyn on 2014-11-17. // Copyright (c) 2014 Taylor Petrychyn. All rights reserved. // #include "Attacker.h" Attacker::Attacker() : Monster() { damage = 2; health = 10; points = 20; } Attacker::Attacker(const Position& start) : Monster...
true
982c9ee12523c492d7578f3b93104955f6c6ca19
C++
SaberDa/LeetCode
/C++/11-containerWihMostWater.cpp
UTF-8
884
3.34375
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> height; height.push_back(1); height.push_back(8); height.push_back(6); height.push_back(2); height.push_back(5); height.push_back(4); height.push_back(8); height.push_back(3); ...
true
e55a5c860cc151b1d1083301074ba9a8907a1a92
C++
luxiangnk/Maze-Solver
/Algorithms/IterativeDeepeningSearch.h
UTF-8
782
2.53125
3
[ "MIT" ]
permissive
#ifndef AI_PROJECT_ITERATIVEDEEPENINGSEARCH_H #define AI_PROJECT_ITERATIVEDEEPENINGSEARCH_H #include "AbstractSearchAlgorithm.h" class IterativeDeepeningSearch : public AbstractSearchAlgorithm { private: pair<shared_ptr<Node>, bool> DLS(double **array, int dimension, const shared_ptr<Node> &root, const shar...
true
abb6fbe37ca8f781208a6e4e8ff6b29f2ba68cb4
C++
iremashvili2000/Simple-tasks
/oop1.cpp
UTF-8
1,683
2.90625
3
[]
no_license
#include <iostream> #include <string> using namespace std; // programa aris oop tematikis,igi poulobs sami adamianidan udidesi wlovanebis mqones da yvelaze meti fulis mqone adamians // da bechdavs class func { string name, surname, id; double fuli; int age; public: func() { } ~func(){ } void input(); void...
true
0be182f9f484c9ac926343d59a0b93de38ad9df7
C++
pv-k/NNLib4
/ConsoleApplication1/LogisticCostModule.h
UTF-8
3,029
2.859375
3
[]
no_license
#ifndef LOGISTIC_COST_MODULE_H #define LOGISTIC_COST_MODULE_H #include "CostModule.h" template <class T> class LogisticCostModule : public CostModule<T> { const double eps; double log2_; double log2(double x) { return (double)(std::log(x) / log2_); } public: LogisticCostModule() : CostModule(), eps(0.00000...
true
25c6985cc0ab9e111e48d1acab5590f1412e9a09
C++
yak1ex/packrat_qi
/typeindex.hpp
UTF-8
1,930
2.515625
3
[]
no_license
/***********************************************************************/ /* */ /* typeindex.hpp: Backport for std::type_index in C++0x */ /* */ /* Written by Ya...
true
b03018a4605dcf1ef3be72d23be2fa13af401332
C++
aurthconan/fanLens
/test/sample/randomize_terrain/PointGenerator.h
UTF-8
1,247
2.703125
3
[ "MIT" ]
permissive
#ifndef POINTGENERATOR_H #define POINTGENERATOR_H #include <fanVector3.h> #include <vector> class PointGenerator { public: class PointIndex { public: PointIndex( size_t level, size_t x, size_t y ); size_t mConvertedLevel; size_t mConvertedX; size_t mConvert...
true
60f2e64749b2b930201592620afbe9f634c6201d
C++
cnc4less/PCA9555_Experiments
/Arduino/PCA9555_button_v01/PCA9555_button_v01.ino
UTF-8
1,559
2.71875
3
[ "MIT" ]
permissive
/* Author: Alberto Tam Yong Date: 09-07-14 PCA9555 Breakout Board Button testing LED circuit VCC --- |>|---/\/\---PCA9555 LED R=220 Button circuit PCA9555 ---./ .---GND Using a Teensy 2.0 for testing. If using and Arduino UNO, change LED pin to 13. */ #include <Wire.h> //Define the devices you'l...
true
3ecc22e162e47b54db5e33ed9120e0fb3975da73
C++
CyberHacker11/Lessons
/Lesson 23/Lesson 23.cpp
UTF-8
3,847
3.15625
3
[]
no_license
#include<iostream> #include<fstream> #include<string> #include<iomanip> #include<stdio.h> using namespace std; // out -> write // in -> read // app -> append void file_txt_write() { //ofstream fout("hakuna.txt", ios::out); ofstream fout("hakuna.txt", ios_base::app); if (!fout) { throw "File not found"; } i...
true
4f1ba8f117b0c7c41bb871e6ac2ef6815662d6fa
C++
SeokLeeUS/Markov_localization
/get_pseudo_ranges/get_pseudo_ranges/get_pseudo_ranges.cpp
UTF-8
1,300
2.953125
3
[]
no_license
#include <algorithm> #include <iostream> #include <vector> #include "helpers.h" using namespace std; float control_stdev = 1.0f; float movement_per_timestep = 1.0f; int map_size = 25; vector <float> landmark_positions{ 5,10,12,20 }; vector <float> pseudo_range_estimator(vector<float> landmark_positions, ...
true
1fd28566c2644e3e0025197a094c2491ad533f69
C++
stormysun513/project-euler
/p1.cpp
UTF-8
357
3.328125
3
[]
no_license
#include <iostream> using namespace std; int main(int argc, char **argv) { int sum = 0, target = 3; while(target < 1000) { sum += target; target += 3; } target = 5; while(target < 1000) { sum += target; target += 5; } target = 15; while(target < 1000) { sum -= target; target += 15; } cout << "...
true
74ce81c24c4cceefd0be3897702fc80035342da1
C++
malinfeng/Blog_mlf
/刷题/剑指offer/01_二维数组中的查找.cpp
UTF-8
877
3.484375
3
[]
no_license
 #include <iostream> #include <vector> using namespace std; class Solution { public: bool Find(int target, vector<vector<int> > array) { if (array.empty() || array[0].empty()) { return false; } int row = array.size() - 1; int colu = 0; while(row >= 0 && colu ...
true
9606d7f260f48f8d9ebb9d873ea1af2ee6144d2e
C++
Shaked-g/cpp2
/Test.cpp
UTF-8
1,728
2.875
3
[ "MIT" ]
permissive
/** * @file Test.cpp * @author Shaked Gofin * @brief * @version 0.1 * @date 07-03-2021 * * @copyright Copyright (c) 2021 * */ #include "doctest.h" #include "snowman.hpp" #include <stdexcept> using namespace ariel; #include <cassert> #include <string> #include <algorithm> #include <iostream> #include <st...
true
32d06092b2b4ac8b5580e1903d3874792a2e8e57
C++
mashago/study
/http_server/hs4/http_request.h
UTF-8
7,167
2.890625
3
[]
no_license
#ifndef _HTTP_REQUEST_H_ #define _HTTP_REQUEST_H_ extern "C" { #include <stdio.h> } #include <string> #include <map> #include <algorithm> #include "http_util.h" #define MAX_HTTP_REQUEST_URL_SIZE 5120 struct http_request_t { enum HTTP_METHOD { METHOD_NULL = 0 , METHOD_GET = 1 , METHOD_POST = 2 }; int method...
true
092ed33c2f75d344e54504a48b8b84f7bae5bdd3
C++
liuq901/code
/ZOJ/z_1937.cpp
UTF-8
854
2.625
3
[]
no_license
#include <cstdio> #include <cstdlib> #include <cstring> int n,a[501],ans[501]; int main() { void search(int); while (1) { scanf("%d",&n); if (!n) break; if (n==1) { printf("1\n"); continue; } a[1]=1; a[0]=20000000; search(2); for ...
true
382a7d737c03f61b2d5ab3672ce70d74410cf375
C++
geekmomprojects/sound-meter-pendant
/SoundMeterPendant/SoundMeterPendant.ino
UTF-8
4,041
2.578125
3
[ "MIT" ]
permissive
/**************************************** Sound level sketch to read values from a microphone breakout and display on an 8x8 mini Dotstar LED matrix. Currently using an Adafruit matrix (https://www.adafruit.com/product/3444) and a MEMS microphone breakout board: https://www.adafruit.com/product/2716 Algorithm a...
true
8a27dcc25d175c5a424690e5b8707b4497af0feb
C++
nastyakuzenkova/CSC-Algorithms
/II/11G.cpp
UTF-8
851
2.6875
3
[]
no_license
#include <cstdio> #include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int t, n; int a[101]; void read_input() { freopen("varnim.in", "rt", stdin); scanf("%d", &t); for (int i = 0; i < t; ++i) { scanf("%d", &n); int r = 0; for (int j = 0; j < n; ++j) { scan...
true
34066f8066459538988676e6209cb0cc2bfdc339
C++
mwjin/stroustrup-ppp
/chap03/ex08_test_odd_even.cpp
UTF-8
293
3.34375
3
[]
no_license
#include "../std_lib_facilities.h" int main() { int n; cout << "Enter an integer: "; cin >> n; cout << endl; if (n % 2 == 0) cout << "The value " << n << " is an even number." << endl; else cout << "The value " << n << " is an odd number." << endl; }
true
6cc4a4f4695538ab2b14a7a4c957b6659a1828c4
C++
nikizhelqzkov/Music_Collection
/App/Login.cpp
UTF-8
1,772
3.34375
3
[]
no_license
#include "Login.h" /** * @brief Помощна функция, която проверява дали потребителя има профил в системата * * @param username * @param password * @return true * @return false */ bool Login::login(std::string username, std::string password) { std::ifstream input(username + ".txt"); if (!input.is_open(...
true
3a4caeb68f2ee4e3ae5eed07254d92776520cc48
C++
Amith17/Heap-of-Students
/Address.cpp
UTF-8
770
2.953125
3
[]
no_license
//cpp file for address object #include "Address.h" #include <string> #include <iostream> using namespace std; string Address::get_streetAddress(){ return streetAddress; } void Address::set_streetAddress(string streetAddress){ Address::streetAddress = streetAddress; } string Address::get_address2(){ return address2...
true
5ca5954dbd369bfe656436d48be926702266fe5a
C++
Edroor/libmsci
/sparse/full_matrix.h
UTF-8
2,705
2.671875
3
[ "MIT" ]
permissive
#ifndef FULL_MATRIX_H #define FULL_MATRIX_H #include "matrix_base.h" namespace libpetey { namespace libsparse { template <class index_t, class scalar> class full_matrix:public matrix_base<index_t, scalar> { protected: index_t m; index_t n; scalar **data; public: friend class sparse<index_t, scala...
true
1a8ac54d3c3181f04f3d2dfd79571c758ba26b34
C++
giovaneaf/CompetitiveProgramming
/Spoj/BSCXOR.cpp
UTF-8
122
2.5625
3
[]
no_license
#include <iostream> using namespace std; int main() { int p,q; cin >> p >> q; cout << (p^q) << endl; return 0; }
true
2a869b4306266f3d84c6cd1d47f85139c3f5bb8d
C++
mehmetaliaksoy/simple_blackjack
/game.h
UTF-8
984
2.765625
3
[]
no_license
#ifndef GAME_H #define GAME_H #include "dealer.h" #include "simpleplayer.h" class Game { public: enum Result { UNKNOWN, BLACKJACK_PUSH, PLAYER_WINS_BLACKJACK, DEALER_WINS_BLACKJACK, PLAY...
true
55fa088db8398e595acf5ba53beb2dcc165e8a9e
C++
Dark1024/Proyecto_OA
/primaryindex.h
UTF-8
906
2.828125
3
[]
no_license
#ifndef PRIMARYINDEX_H #define PRIMARYINDEX_H //Importacion de encazados necesarios #include <string> #include <sstream> #include "object.h" using namespace std; /*********************************************************************** *Clase que se utiliza para manejar los indices primarios del archivo de *regist...
true