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
e8b1082d12a5cf2c57dc194de3fc7fabcd2986c2
C++
ghas-results/ALIA
/audio/common/Semantic/jhcTripleLink.cpp
UTF-8
5,486
2.5625
3
[ "Apache-2.0" ]
permissive
// jhcTripleLink.cpp : properties of entities and relations between them // // Written by Jonathan H. Connell, jconnell@alum.mit.edu // /////////////////////////////////////////////////////////////////////////// // // Copyright 2015 IBM Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); /...
true
db326695adb8f375352ae62c50814b952fed289e
C++
WhosJohnGault/2018_Fall_17a_JordanJames
/Assignments/Review Homework 1/Gaddis_8th_Edition_5_11_Population/main.cpp
UTF-8
1,877
3.4375
3
[]
no_license
/* * */ /* * File: main.cpp * Author: James Jordan * * Created on August 15, 2018, 8:35 PM */ #include <iostream> #include <cmath> #include <iomanip> using namespace std; // Name global Constants here Pi //function names go here int main(int argc, char** argv) { //initialize variables float p...
true
7194375063dba10afeba2ea4d7526a1d4f40982f
C++
mwlazlo/slugger
/slugger/log.cpp
UTF-8
5,185
2.765625
3
[ "Apache-2.0" ]
permissive
#include <cstdlib> #include <fcntl.h> #include <unistd.h> #include <assert.h> #include <pthread.h> #include <iostream> #include <string> #include <map> #include <algorithm> #include <stdexcept> #include <slugger/slugger.h> #include "scope_guard.h" using namespace slugger; // a bit better than global variables sta...
true
31a23211e39ce694e47e4e5c2db75fcbcbb92277
C++
dpw901e17/vulkan-application
/Vulkan/Main.cpp
UTF-8
1,443
2.8125
3
[ "MIT" ]
permissive
#include <iostream> #include <sstream> #include <stdexcept> #include <string> #include "../../scene-window-system/TestConfiguration.h" #include "../scene-window-system/Scene.h" #include "VulkanApplication.h" const int WIDTH = 800; const int HEIGHT = 600; // Called from main(). Runs this example. int runVulkanTest(con...
true
9b794c03bb8abe9db04babcd8bd357fad8fdea3f
C++
ladycharliy/C-Assignments
/Math Tutor.cpp
WINDOWS-1252
4,290
3.984375
4
[]
no_license
/// Math Tutor.cpp : This file contains the 'main' function. Program execution begins and ends there. //Charlotte Martin //ITSE 1307 C++ //07FEB2019 //The program will be used as a math tutor for a young student. Will display 2 random numbers #include "pch.h" #include <math.h> #include <iostream> #include <i...
true
4effddb038fc9e86a78abad05eee78ad41507af4
C++
pChochura/Nonogram
/Nonogram/src/Models/Game.h
UTF-8
741
2.75
3
[]
no_license
#pragma once #include "Screens/Screen.h" //////////////////////////////////////////////////////////// // Class descrining game state //////////////////////////////////////////////////////////// class Game { public: Game(Screen* firstScreen, std::string title, int width = 1080, int height = 720); ///////////////////...
true
6fcee980c918f800fe87e2f81d1f76878af9015b
C++
novaua/qt-chess
/ChessCore/Move.h
UTF-8
679
2.8125
3
[]
no_license
#pragma once #include "Board.h" namespace Chess { struct Move { BoardPosition From; BoardPosition To; bool Capturing; Piece PromotedTo; std::string ToString()const; static Move Parse(const std::string& strMove); }; struct PositionPiece { BoardPosition Position; Piece Piece; size_t GetHash...
true
0b0a2711d2b02aac6685c478ad24b9152926532e
C++
Itchibon777/PowerToys
/src/modules/fancyzones/tests/UnitTests/RegistryHelpers.Spec.cpp
UTF-8
1,145
2.59375
3
[ "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
#include "pch.h" #include "lib\RegistryHelpers.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace FancyZonesUnitTests { TEST_CLASS(RegistryHelpersUnitTests) { public: TEST_METHOD(GetDefaultKey) { // Test the path to the key is the same string. ...
true
467fa1f27fc91c6a5b6e8ced6a2e7eeeb0b82d58
C++
hieulag15/21110448-lv7
/lv7-08.cpp
UTF-8
941
3.34375
3
[]
no_license
#include<iostream> #include<math.h> void Nhapmang(int arr[], int &n); void Xuatmang(int arr[], int n); bool Kiemtra(int n); float Avg(int arr[], int n); using namespace std; #define Max_Size 100 int main() { int arr[Max_Size]; int n; Nhapmang(arr,n); cout<<"trung binh cong: "<<Avg(arr,n); return 0; } void Nhap...
true
1649ec25aee8a57eea2834ac7e1e52b543bafe53
C++
NikitaEvs/WildHack
/src/Engine/Handler/MoveHandler.cpp
UTF-8
301
2.75
3
[]
no_license
#include "MoveHandler.h" void MoveHandler::change() { if (xPos == -1 || yPos == -1) { throw std::runtime_error("Position to move to was not chosen"); } else { population->move(xPos, yPos); } } void MoveHandler::setXYPos(int32_t x_pos, int32_t y_pos) { xPos = x_pos; yPos = y_pos; }
true
d2ae3b2e6d022ab96c1b46b22b4378867cd532f9
C++
harrituononen/winged-tanks
/airb/src/network/socket/client_socket_win.cpp
UTF-8
5,423
2.5625
3
[]
no_license
#include "client_socket_win.hpp" #include <cstdio> #include <thread> #include "../player.hpp" #include "../utilities/functions.hpp" namespace network { ClientSocket::ClientSocket(std::string server_address, unsigned short server_port) : m_listener_running(false) , m_keepalive_running(false) , m_id { '\...
true
6727e8d235f56401289cadebff9f4d336f60e811
C++
VinyPinheiro/EA_PIBIC
/src/solo.cpp
UTF-8
1,264
2.703125
3
[]
no_license
/* * Implementação da classe Solo. * * Autor: Edson Alves * Data: 11/06/2015 * Licença: LGPL. Sem copyright. */ #include "solo.h" #include <ijengine/core/text.h> #include <ijengine/core/font.h> #include <ijengine/core/image.h> #include <ijengine/core/environment.h> #include <ijengine/util/button.h> Solo::Solo(...
true
0b793ed4493939f4307fa81b6798842f42be1158
C++
BlackNapalm/Codingame
/Code of Kutulu.cpp
UTF-8
18,442
2.71875
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <tuple> #include <math.h> using namespace std; //enum State {SPAWNING = 0, WANDERING}; const char WALL = '#', SPAWN = 'w', SHELTER = 'U'; const double DEFDANGER = 9999; vector<int> yelledat; class Tile { private:...
true
4b3d7fc5578bbe3cad7a7770552e8cce84f8b11e
C++
parthpankajtiwary/spoj
/eights.cpp
UTF-8
349
2.984375
3
[]
no_license
#include<iostream> #include<vector> using namespace std; int main() { vector <long long int> numbers; int t; cin>>t; for(int i = 0; i < t; i++) { long long int temp; cin>>temp; numbers.push_back(temp); } for(int i = 0; i < numbers.size(); i++) { cout<<((numbers[i...
true
228115911ff09f233dd4bf869057d8640cababbb
C++
Moe2Code/STM32F407xx_Drivers_and_Apps
/supporting_arduino_sketches/sketches/SPI/001SPISlaveRxString/001SPISlaveRxString.ino
UTF-8
2,391
2.8125
3
[]
no_license
/* * Project: SPISlaveRxString * Description: Sketch to demo SPI slave (Arduino Uno) receiving a message from SPI master (ST Discovery board). * The following used: * + Arduino Uno * + SPI SCK Pin 13 (Serial Clock) * + SPI MISO Pin 12 (Master In Slave Out) * + SPI MOSI Pin 11 (Master Out Sl...
true
8bc389f470c5ced1cc6935ef1b58a589eb46a69b
C++
ria28/Data-Structures-And-Algorithms
/DP/Advanced_Dp/MaximalSquare.cpp
UTF-8
1,318
2.75
3
[]
no_license
#include <iostream> #include <string> #include <unordered_set> #include <unordered_map> #include <vector> #include <algorithm> #include <queue> #include <climits> #define ll long long using namespace std; #define f_loop(i, s, e) for (int i = s; i < e; i++) #define f_long(i, s, e) for (long long i = s; i < e; i++) #defi...
true
2bfa557a8e5c1910578cd42c83f660a05782192c
C++
josimarribeiro1/projetounib
/Processamento_Paralelo_LED.ino
UTF-8
1,859
3.125
3
[]
no_license
#include "ctimer.h" #define LED0 13 //DEFININDO A VARIAVEL PARA O LED NO CONECTOR 13 #define LED1 12 //DEFININDO A VARIAVEL PARA O LED NO CONECTOR 12 #define LED2 11 //DEFININDO A VARIAVEL PARA O LED NO CONECTOR 11 cTimer g_Timer0(true); //INICIAR OS CONTADORES cTimer g_Timer1(true); //INICIAR OS CONTAD...
true
1c6d950846f3ec267fac8d44333fb3b85eb6e35f
C++
Keranos/WebProblems
/UVA/p974.cpp
UTF-8
888
3.015625
3
[]
no_license
#include <iostream> #include <vector> #include <iterator> #include <functional> #include <algorithm> using namespace std; int main(){ int storage[19] = {9, 45, 55, 99, 297, 703, 999 , 2223, 2728, 4879, 4950, 5050, 5292, 7272, 7777, 9999, 17344, 22222, 38962}; vector<int> v; copy(storage, storage+...
true
f1f53e4bfc88bd8b695cc9484329b0d9c3b15e29
C++
basimkhajwal/ProgrammingChallenges
/Project Euler/problem348.cpp
UTF-8
579
2.921875
3
[]
no_license
#include <iostream> #include <map> using namespace std; #define MAX 1000000000 inline bool isPalindrome(int n) { int x = 0; for (int i = n; i; i /= 10) x = x*10+(i%10); return x == n; } char cnt[MAX]; int main() { for (int i = 2; i*i < MAX; i++) { for (int j = 2;; j++) { int x = i*i+j*j*j; ...
true
a2d8ce4b36238e6b0f3d198a3b6b0440fc339b5b
C++
eelcohn/FileStore
/src/platforms/kbhit.cpp
UTF-8
854
2.96875
3
[ "MIT" ]
permissive
#include <cstdlib> // NULL, tv, fd_set, read_fd, FD_ZERO, FD_SET, select, FD_ISSET bool kbhit(void) { struct timeval tv; fd_set read_fd; /* Do not wait at all, not even a microsecond */ tv.tv_sec = 0; tv.tv_usec = 0; /* Must be done first to initialize read_fd */ FD_ZERO(&read_fd); /* Makes select() ask i...
true
10a8a14a587f9db2470c729cba98d3b7833509c8
C++
robintux/2daCharlaLimaEducacion
/Ejemplo03.cpp
UTF-8
1,268
3.765625
4
[]
no_license
/* Conteo de la cantidad de letras (las que estan en el alfabeto) getline para almacenar la cadena */ #include<iostream> #include<string> using namespace std; int main(){ string str; // Entrada (input) de la informacion cout<< "Ingresa una cadena " << endl; getline(cin, str); /* Funciones extras : s...
true
45c001166a85a0895b427b200a1a48643a4759b6
C++
marcosrodriigues/ufop
/conteudo/Introdução à Programação (Prática)/Exercicios/P6_1424341_Marcos_Rodrigues/exe4.cpp
UTF-8
714
3.453125
3
[]
no_license
#include <string> #include <iostream> using namespace std; string str_replace (string phrase, char first_character, char second_character); int main() { string phrase; char ch_01, ch_02; getline(cin, phrase); while (!phrase.empty()) { cin >> ch_01 >> ch_02; cin.ignore(); size_t positio...
true
35139ea7cb63f19cd9d5d6df669fd0c6c246e47e
C++
windynips/ESP8266-Ajax-Jquery
/PWM_ESP8266_Ajax_Demo/PWM_ESP8266_Ajax_Demo.ino
UTF-8
3,623
2.5625
3
[ "MIT" ]
permissive
/* * ESP8266 SPIFFS HTML Web Page with JPEG, PNG Image * https://circuits4you.com */ #include <ESP8266WiFi.h> #include <ESP8266WebServer.h> #include <ESP8266mDNS.h> #include <FS.h> //Include File System Headers const char* htmlfile = "/index.html"; //WiFi Connection configuration const char *ssid ...
true
5c3b430b5e92738f8cb958139f60b3fbb16cff0c
C++
jayakrishna-g/Interviewbit
/AmazingSubarrays.cpp
UTF-8
701
3.5
4
[]
no_license
/*Question: Amazing Subarrays You are given a string S, and you have to find all the amazing substrings of S. Amazing Substring is one that starts with a vowel (a, e, i, o, u, A, E, I, O, U). Input Only argument given is string S. Output Return a single integer X mod 10003, here X is number of Amazing Substrings in...
true
a3077e1e3b3ec224f386bfd40696743b9ac8e391
C++
Zeta611/baekjoon-solutions
/7576-토마토.cpp
UTF-8
1,558
2.875
3
[]
no_license
#include <cstring> #include <iostream> #include <queue> #include <utility> constexpr int WIDTH{1'000}; constexpr std::pair<int, int> DIRS[]{{0, 1}, {-1, 0}, {0, -1}, {1, 0}}; int box[WIDTH][WIDTH]; int dist[WIDTH][WIDTH]; std::queue<std::pair<int, int>> q; int bfs(int m, int n) { while (!q.empty()) { con...
true
af9db79de80a6df37452178a58b6f6ef819fa250
C++
knnth3/GameEngine
/SEF Model Converter/SceneElementConverter/SceneElementConverter/include/SEStream.h
UTF-8
10,764
2.859375
3
[]
no_license
#pragma once //Scene Element File #include "Animation.h" #include <fstream> #include <queue> #define FILE_EXTENSION ".sef" #define CURRENT_SEF_VERSION 4 #define MAX_SEF_HEADER_STR 16 namespace SEF { struct SEF_HEADER { uint16_t Version; char Name[MAX_SEF_HEADER_STR]; char Author[MAX_SEF_HEADER_STR]; bool ...
true
59f86a3a1594a3fd6be22ee54770e14b494ad853
C++
jventura1738/COSC220
/AllLabs/Lab11/ex6_15.cpp
UTF-8
1,541
3.25
3
[]
no_license
#include "time24.h" #include <iostream> #include <list> #include <iterator> #include <cstdlib> #include <ctime> int main () { srand(time(NULL)); int num; std::cout << "enter an integer: "; std::cin >> num; std::list<int> intList; std::list<int>::iterator intIter; for (int i = 0; i < 10; i...
true
31663a5e13f3a5f6f740c91c1b5bcc3952605c80
C++
WangYuming1/systemC_fft_miniprojet
/fft_caba/FFT8.cpp
UTF-8
7,144
2.734375
3
[]
no_license
#include "FFT8.h" #include<stdio.h> #include"fft.h" using std::cout; using std::endl; #define L 23 sc_int<27> W[4][2]={ 67108863, 0, 47453133, -47453133, 0, -67108864, -47453133, -47453133}; // #define W {\ // {67108863, 0}, \ // {47453133, -47453133}, \ // {0, -67108864}, \ // {-47453133, -47453133}\ // ...
true
ab520a729c49cdd295acef3e9c72ba94ec0bef11
C++
saifullah3396/team-nust-robocup-v2
/src/TNRSModules/UserCommModule/include/UserCommRequest.h
UTF-8
1,880
2.65625
3
[ "BSD-3-Clause" ]
permissive
/** * @file UserCommModule/include/UserCommRequest.h * * This file defines the class UserCommRequest * * @author <A href="mailto:saifullah3396@gmail.com">Saifullah</A> * @date 04 Feb 2017 */ #pragma once #include <opencv2/core/core.hpp> #include "TeamNUSTSPL/include/TNSPLModuleIds.h" #include "TNRSBase/include...
true
6c35a0c02aff99fcc7ba7a1f49a772d318048415
C++
REPOSC/compiler
/yacc.h
GB18030
22,992
2.703125
3
[]
no_license
#include <iostream> #include <iomanip> #include <string> #include <vector> #include <algorithm> #include <set> #include <map> #include <stack> #include "token.h" #include "grammar.h" //#define Yacc_DEBUG #define Abstract_TREE #ifndef YACC__32 #define YACC__32 typedef std::vector<token> receivers; t...
true
9016228ad5212d63ce243f22f9a5e7495dc89617
C++
alex-lab11/3
/jornal.cpp
UTF-8
748
3.25
3
[]
no_license
#include "jornal.h" #include <iostream> using namespace std; jornal::jornal(string const nameIN, int const yearIN, int const numberIN):Izdanie(nameIN, yearIN){ number = numberIN; } jornal::jornal():Izdanie() { number = 0; } jornal::jornal(const jornal &life):Izdanie(life){ number = life.number; }...
true
9fd420735a38fa9d8032f6d2adcbd00faba6c58d
C++
POSTED26/POSTED
/code/win32_posted.cpp
UTF-8
7,749
2.796875
3
[]
no_license
/* ========================================================= Author: Jacob Tillett Date: 8/5/2018 This is the entry point. So far this file has an entry point, it creates a window that processes a few messages with a callback function. This file also creates a buffer to fill and them paint to...
true
b4495079c3710d0d5946d6394c9af500c763c1da
C++
AnkitaTarole/Bootcamp1
/Bootcamp9.cpp
UTF-8
235
2.890625
3
[]
no_license
#include<iostream> #include<string.h> using namespace std; int main() { string s; cin>>s; int t=1; for(int i=0;i<s.length();i++) { if(isupper(s[i])) { t++; } } cout<<t<<endl; return 0; }
true
80a8fc13205865f6398ced6281c775a8f26fc415
C++
mattshrago/Track-and-Control
/tacs_project/SleepManager.cpp
UTF-8
781
2.78125
3
[]
no_license
#include <set> #include <iostream> #include <windows.h> #include <ctime> using namespace std; const int resolutionX = GetSystemMetrics(SM_CXSCREEN); //Screen Resulution x const int resolutionY = GetSystemMetrics(SM_CYSCREEN); //Screen Resulution y time_t away_time; time_t last_visible_time; //Will determine if the ...
true
bd5d95a599456e8e7e4751e71cce24a9e9a1486c
C++
arielstolerman/tau-cs-spring-2010-advanced-topics-in-programming-ariel-shay
/advanced_programming_ex05/advanced_programming_ex05_b/MobilePhoneOwner.cpp
UTF-8
796
2.546875
3
[]
no_license
/****************************************************************************** * Exercise 05 - Advanced Programming 2010b, TAU. * Authors: Ariel Stolerman (-) and Shay Davidson (-). * MobilePhoneOwner: Source file *****************************************************************************/ #pragma once #include...
true
32555eea2c1340e021f98d2f235dd1c1ca53aeb6
C++
LEECHHE/acmicpc
/solved/6600.cpp
UTF-8
695
3.078125
3
[]
no_license
#include <cstdio> #include <cmath> using namespace std; const double PI = 3.141592653589793; double dist(double x1, double y1, double x2, double y2 ){ return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); } double square(double a, double b, double c){ double s = (a+b+c)/2; return sqrt(s*(s-a)*(s-b)*(s-c)); } int ma...
true
39b846dec0c80e7a5bf2425a2e9deddb0aca4641
C++
kupihleba/TEP
/src/Crypton.cpp
UTF-8
3,089
2.75
3
[]
no_license
#include "Crypton.h" #include <iostream> #include <iomanip> #include <aes.h> #include <filters.h> #include <modes.h> #include <osrng.h> #include <hex.h> #include <files.h> #include "Exception.h" #undef DEBUG /** * @warning Using vectors for sensitive data is considered bad practice */ std::vector<std::byte> Crypt...
true
4e7c3ccb078d8183b3923707485ba468b23f9c38
C++
SurajBichkunde39/DS_Algo_Practice
/006_union_intersection.cpp
UTF-8
2,659
3.40625
3
[]
no_license
// Find the union and intersection of two sorted arrays #include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> interseciton(vector<int> ar1, vector<int> ar2); vector<int> union_(vector<int> ar1, vector<int> ar2); }; vector<int> Solution::interseciton(vector<int> ar1, vec...
true
d7bf8c5b516bc33b256c895bded8e8301b8b3a29
C++
debroejm/SwarmEngine
/engine/api/Render.h
UTF-8
59,001
2.9375
3
[ "Apache-2.0" ]
permissive
#pragma once // *************** // STD Libraries // *************** #include <map> #include <set> #include <unordered_map> #include <vector> // *************** // Common Header // *************** #define SWARM_REQUEST_BOOST_MUTEX #include "common_header.h" #undef SWARM_REQUEST_BOOST_MUTEX // *********** // ...
true
0f9762c0b4aff329f77d182d00540d3786ec13a6
C++
NII-APP/NPO
/Program/source/CGL/cparallelepiped.h
UTF-8
3,788
2.65625
3
[]
no_license
#ifndef CPARALLELEPIPED_H #define CPARALLELEPIPED_H #include <QtGlobal> #include <cmath> #include <QVector3D> #include <QRectF> #include <QDebug> class QRectF; class QVector3D; class CParallelepiped { qreal xP; qreal yP; qreal zP; qreal xL; qreal yL; qreal zL; void testBumpy(qreal& min, qre...
true
22f330e91a0edbc96a3769701593a1df66c48651
C++
dongfeng86/DataStructures-Practice
/如何查看运行时间/main.cpp
GB18030
826
3.28125
3
[]
no_license
#include<iostream> #include <vector> #include <windows.h> int main() { using std::endl; using std::cout; using std::cin; std::vector<int> ar; DWORD start_time = GetTickCount(); for (int i = 0; i < 1000000; i++) { ar.push_back(i); } DWORD end_time = GetTickCount(); cout << "ѹ1000000õʱΪ" << (end_time - star...
true
83560799802af59de521ab2b726b97f65f8d1588
C++
nunottlopes/feup-prog
/Bus.h
UTF-8
644
2.796875
3
[]
no_license
#pragma once #include <iostream> #include <vector> #include "Shift.h" using namespace std; class Bus { public: Bus(unsigned int orderInLine, unsigned int driver, unsigned int line); Bus(unsigned int orderInLine); // get methods unsigned int getBusOrderInLine() const; unsigned int getDriv...
true
e49faa0b2adfe9a47d27b068722fd0fd75dec55d
C++
microsoft/IIS.Compression
/iiszlib/iiszlib.cxx
UTF-8
14,802
2.53125
3
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #include "stdafx.h" class ZLIB_CONTEXT { public: ZLIB_CONTEXT() : _fInitialized(FALSE), _fGzip(FALSE), _windowBits(ZLIB_DEF_WINDOW_BITS), _memLevel(ZLIB_DEF_MEM_LEVEL), ...
true
d3c0655359df45387020303048f8f29d9efd9a81
C++
Lucaslpena/TimeComplexityThroughDataStructures
/doublylinkedlist.h
UTF-8
1,451
3.046875
3
[]
no_license
#ifndef DOUBLYLINKEDLIST_H #define DOUBLYLINKEDLIST_H #include <iostream> #include "plays.h" using namespace std; struct Node { Plays data; Node *Nxt,*Prv; Node(Plays y) { data = y; Nxt = Prv = NULL; } }; class doublylinkedlist { public: void print(int n) { iterator = front; for (int l = 0; l != n; ++...
true
62f2b86327891add6c0e64ec3bff9683495cc6d0
C++
DorianHawkmoon/betaglo
/ProcessCommands.cpp
UTF-8
7,337
3
3
[ "MIT" ]
permissive
#include "Arduino.h" #include "ProcessCommands.h" #include "Enumerations.h" SoftwareSerial mySerial(13,12); // RX, TX States stateHand; unsigned long timerMouse; StatesKeyboard stateKeyboard; unsigned long timerKeys; int finger; int timesFinger; unsigned long previousTimerKeys; int limitTimeFinger=500; char keyboardLe...
true
373c4c84abec4c6322ea6ae2b8cf64f142e71868
C++
devfahad/Codeforces
/144A - Arrival of the General.cpp
UTF-8
651
2.71875
3
[]
no_license
//not completed #include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int h[n+10],min=1111,max=0,c1,c2; for(int i = 0; i < n; i++){ cin >> h[i]; if(min>h[i]) min=h[i]; if(max<h[i]) max=h[i]; } //cout << min << " " << max << endl; for(int i = 0; i < n; i++){ ...
true
82c35551783842518f137611a939295f739016ad
C++
Tzivia-Sofer/Zoo-Polymorphism
/shark.h
UTF-8
1,672
3.0625
3
[]
no_license
#ifndef __SHARK_H__ #define __SHARK_H__ #include "seaCreation.h" class Shark:public SeaCreation{ public: Shark(std::string name): SeaCreation(name) {}; /*virtual*/ short int getSpeed() const ; /*virtual*/ std::vector <Econtinants> getContinents() const ; /*virtual*/ int getFood() const ; /*virtua...
true
9c581d144b93290b00850c4df16db9a7f7f8a56b
C++
CODARcode/MGARD
/tests/src/test_CompressedDataset.cpp
UTF-8
3,829
2.71875
3
[ "Apache-2.0" ]
permissive
#include "catch2/catch_test_macros.hpp" #include <algorithm> #include <random> #include <sstream> #include "CompressedDataset.hpp" #include "compress.hpp" #include "testing_random.hpp" TEST_CASE("data buffers and sizes", "[CompressedDataset]") { { const mgard::TensorMeshHierarchy<2, float> hierarchy({6, 3}); ...
true
e35b9db42b54d83c8a65ef153d23bcd6d625b126
C++
kamrann/workbase
/code/neuroevo/common/OLD_systems/ship_and_thrusters/genetic_mappings/fixednn_sln.h
UTF-8
5,426
2.515625
3
[]
no_license
// fixednn_sln.h #ifndef __SAT_FIXED_NN_SLN_H #define __SAT_FIXED_NN_SLN_H #include "../../fixed_neural_net.h" #include <doublefann.h> #include <fann_cpp.h> #include <vector> namespace sat { template < typename System > struct fixednn_solution_base { typedef System system_t; typedef typename system_t::sol...
true
bc653afbace3ee472dd704403c1599530b6435a8
C++
ottersome/Judge-1
/ZeroJudge/ZJ d432(Simple, Tree-traversal, Recursive).cpp
UTF-8
594
3.046875
3
[]
no_license
#include <stdio.h> #include <iostream> #include <string> using namespace std; string preorder(string in, string post) { if (in.size() <= 1) return in; int pivot, len, left, right; len = in.size(); for (pivot = 0; pivot < len; pivot++) if (in[pivot] == post[len - 1]) break; left = pivot; rig...
true
2f8e753259a5f541fa3b89efe404112e7ba95a42
C++
parisbre56/devel_part_1
/src/FilterSameTable.cpp
UTF-8
1,196
2.703125
3
[]
no_license
/* * FilterSameTable.cpp * * Created on: 9 Δεκ 2018 * Author: parisbre56 */ #include "FilterSameTable.h" using namespace std; FilterSameTable::FilterSameTable(uint32_t table, size_t col, size_t colB) : Filter(table, col), colB(colB) { } FilterSameTable::~FilterSameTable() { //Do nothing } s...
true
1129fd20c5a0e896fa431564003b70cbddb0dae5
C++
AVBelyy/ADS-ITMO-HW
/term4/04/rainbow/checker.cpp
UTF-8
1,854
3.265625
3
[]
no_license
#include <iostream> #include <cstdio> #include <vector> const int NMAX = 100; const int MMAX = 5000; const int COLMAX = 100; struct edge_t { int u, v, col; bool operator<(edge_t other) const { return u == other.u ? v < other.v : u < other.u; } }; struct dsu_t { int rank; int parent; }; ...
true
6840959004dfb31f4af981e5c26c9687c654a551
C++
EYE657318/github-upload
/cs2400/cs2401/Project2/backup/fbfriends.cc
UTF-8
4,738
3.328125
3
[]
no_license
#include<iostream> #include<string> #include<fstream> #include "friend.h" #include "fbfriends.h" using namespace std; /////////////////////////////////////Default Constructor FBFriends::FBFriends(){ //array of five friends data = new unsigned long[5]; used = 0; capacity = 5; current_index = 0; } //////...
true
2432f0895f90778524dac4f66200f7b7dc23bcd2
C++
m-irigoyen/pages
/shared/sfmltemplate/include/sfmltemplate/gui/radiobuttongroup.hpp
UTF-8
1,596
3
3
[]
no_license
//#pragma once // //#include <sfmltemplate/hud/baseradiobutton.hpp> // //namespace sfmltemplate //{ // /* // Manages a group of radio buttons. The group does not have ownership of the buttons : they must // be deleted somewhere else in the program. // */ // class RadioButtonGroup // { // public: // RadioButtonGroup(...
true
27a0d9a3c20ea8ff5f4e0205d1d3645e9f62c1a7
C++
gaoming95/Algo
/DP/coin.cpp
UTF-8
1,304
3.171875
3
[]
no_license
#include<stdio.h> #include<iostream> #include<algorithm> #include<vector> using namespace std; class Solution { public: //编辑距离 int minDistance(string word1,string word2){ int m = word1.length(); int n = word2.length(); vector<vector<int>> dp(m+1,vector<int>(n+1,0)); //初始化数组 ...
true
ed9164458b434f39535ab9e99efad7e1c3c8e07b
C++
FrankiALVarado/Programacion-II-Francisco-Alvarado
/Proyecto Parcial III/cPathFinding.cpp
ISO-8859-1
14,146
3.09375
3
[]
no_license
#include "cPathFinding.h" constexpr float pi = 3.14159265; // pi constexpr float r = 6371; //radio de la tierra en kilometros float zero = 0.0; cPathFinding::cPathFinding() { } cPathFinding::cPathFinding(std::vector<cNode> _open, std::vector<cNode> _closed, cNode _buffer) { m_open = _open; m_closed = _closed; m_b...
true
d847caca3b347d09bedda43e8937f77d7e0609b7
C++
lzhudson/Lista-de-Exercicios-C-
/Lista de Exercicios 2 C++/questao5.cpp
WINDOWS-1252
263
2.828125
3
[]
no_license
#include <stdio.h> int main(){ int n,m,soma,multi,sub,divi; n = 20; m = 40; soma = n + m; multi = n*m; sub = n-m; divi = n/m; printf("A soma %d, a multiplicacao %d, a subtracao %d, a divisao %d",soma,multi,sub,divi); }
true
e2557b9c3a28520592dba386c94cd98bad026591
C++
ChrSacher/MyEngine
/AudioListener.h
UTF-8
3,840
2.703125
3
[ "Apache-2.0" ]
permissive
#pragma once #include "Camera3d.h" #include "Audio.h" #include "ServiceLocator.h" class Camera3d; class AudioListener : Camera3d::Listener { public: public: /** * Gets the single instance of the audio listener. * * @return The single instance of the audio listener. */ static AudioListe...
true
092a277cfce848be25f2ce80121978aeb17cdcfe
C++
DrabbyPage/EGP-410
/GameAI/pathfinding/game/AStar.cpp
UTF-8
6,308
2.75
3
[]
no_license
#include "AStar.h" #include "Path.h" #include "Connection.h" #include "GridGraph.h" #include "Game.h" #include <PerformanceTracker.h> #include <list> #include <vector> #include <algorithm> #include "GridPathfinder.h" #include "Heuristic.h" AStarPath::AStarPath(Graph* pGraph) : GridPathfinder(dynamic_cast<GridGraph*>...
true
98dc8e04086376365460fef016cfccc251ef199a
C++
simonadel/simo012
/inher1/src/Derived.cpp
UTF-8
512
3
3
[]
no_license
#include <iostream> #include "Derived.h" using namespace std; Derived::Derived() { w=0; cout<<"Default Constructor derived"<<endl; } Derived::Derived(int w) { w=w; cout<<"One Parameter derived"<<endl; } Derived:: Derived(int w,int x,int y):Base(x,y){ w=w; } void Derived::setW(int w){ ...
true
0a7e4dfae3266816163c1a3e4a0583a38137ea7f
C++
ethz-asl/ouster_lidar
/ouster_client/include/ouster/os1.h
UTF-8
5,317
2.734375
3
[ "BSD-3-Clause" ]
permissive
/** * @file * @brief OS-1 sample client */ #pragma once #include <cstdint> #include <memory> #include <string> #include <vector> namespace ouster { namespace OS1 { const size_t lidar_packet_bytes = 12608; const size_t imu_packet_bytes = 48; struct client; enum client_state { TIMEOUT = 0, ERROR = 1, ...
true
31b42cd5b36441c73ffbc524bb4b528dc61fae08
C++
nimamg/Business-social-network
/database.cpp
UTF-8
4,559
2.890625
3
[]
no_license
#include "database.hpp" Database::Database () { } void Database::addUser (std::string firstName, std::string lastName, std::string emailAddress, std::string biography) { if (findUser(emailAddress) == NOTFOUND) { User newUser(firstName,lastName,emailAddress,biography); userList.push_back(newUser); } } void Dat...
true
a1bda4ddbce6abd698a91465d67d3534ec9adbf9
C++
vincatzero/AFT2
/main.cpp
UTF-8
1,621
3.125
3
[]
no_license
/* Project: NAME OF PROJECT GOES HERE Name: YOUR NAME GOES HERE Partner: PARTNER'S NAME IF ANY Class: example: CSC 1810 - Section 1 */ #include <iostream> #include "Gene.h" #include "GeneSequencer.h" #include "Chromosome.h" #include "Allele.h" using namespace std; void runMenu() { GeneSequ...
true
443633a79ed2eabcb434079a7d1f7017b7dda38a
C++
plusminus34/Interactive_thin_shells_Bachelor_thesis
/Apps/Plush/CubicHermiteSpline_v2.cpp
UTF-8
3,717
2.5625
3
[]
no_license
#include "CubicHermiteSpline_v2.h" CubicHermiteSpline_v2::CubicHermiteSpline_v2(const dVector &X, const dVector &S) { if (X.size() > S.size()) { error("ArgumentOrderError"); } if ((!IS_EQUAL(X[0], S[0])) || (!IS_EQUAL(X[X.size() - 1], S[S.size() - 1]))) { error("Knot and data ranges don't meet at the ends."); } th...
true
b8f4488ab592a205519f5812122819f6e942a682
C++
zsq001/oi-code
/8.4/test/0804test/source/牛彦哲/b/b.cpp
UTF-8
885
2.578125
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #define min(a,b) a<b?a:b #define max(a,b) a>b?a:b #define minn -0x7fffffff int color[4000010],n,m,p,q; void change(int l,int r,int x,int y,int v,int k) { if(l>y||r<x) { return; } if(l>=x&&r<=y) { color[k]=v; return; } color[k]=-1; int mid=(l+r)/2; c...
true
887ebbe361e8e6d14aeb9d5477a1991fe7ee3f50
C++
MOXCOOT/PlaneShootBall
/ai_pve.cpp
UTF-8
22,439
2.9375
3
[]
no_license
#include"DataStruct.h" #include "math.h" #include "plane.h" #include <ctime> #include <cstdlib> #include <iostream> #include <windows.h> #include <QDebug> #define SIGN(x) ((x < 0 ) ? 1 : 0 ) #define Pai 3.1415926 //角度坐标系转换 inline double angleConver(double angle) { return -90 - angle; } //抽取向量点乘 ...
true
597db77cd160136d1c16cb84f3ee5de39eacebc9
C++
mnmz81/Smart-pointer-And-move-semantics
/Edge.h
UTF-8
1,199
3.0625
3
[]
no_license
#ifndef CLION_EDGE_H #define CLION_EDGE_H #include <iostream> #include "Vertex.h" #include "Shipping.h" #include <memory> #include <vector> class Vertex; //this class is Edge in the Graph using namespace std; class Edge { string from; shared_ptr<Vertex> dest; int weightBoxs; double...
true
53af35a8a944a5db213383b945d61d74c6624b66
C++
NikolaTotev/Object-Oriented-Programing-Course
/Exam_2_Back_Up/Exma_2/Exam_2_Back_Up_Proj/OnlineService.h
UTF-8
1,244
3.125
3
[]
no_license
#pragma once #include <iostream> class OnlineService { int port; int numberOfConnectedDevices; int maxNumberOfDevices; public: OnlineService(); OnlineService(int _maxDevices, int port =0, int numberOfConnDevices = 0); bool operator==(const OnlineService& rhs); ~OnlineService(); void setNewPort(int newPort) ...
true
bdb734371ffbe1758a02eaabc1225a8b4730df7d
C++
xfmeng17/leetcode
/cpp/1019.cpp
UTF-8
1,261
3.390625
3
[]
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: vector<int> nextLargerNodes(ListNode *head) { // return func1(head); return func2(head); } // ** straight forward O(N^2) ...
true
0c784690b757ee9a4abb327a9b6beba62f443f67
C++
shfranc/abstract_vm
/incs/Int8.hpp
UTF-8
860
2.84375
3
[]
no_license
#ifndef INT8_HPP # define INT8_HPP # include "Token.hpp" # include "IOperand.hpp" class Int8 : public IOperand { public: Int8( eOperandType type, std::string value ); virtual ~Int8( void ); virtual int getPrecision( void ) const; virtual eOperandType getType( void ) const; virtual std::string const & toS...
true
92227e772bb20865ed9d8e546a2756c3c8de17c7
C++
kahavi/PokerikasiVaiEi
/deckofcards.cpp
UTF-8
912
3.734375
4
[]
no_license
#include "deckofcards.h" DeckOfCards::DeckOfCards() { //Generate the deck string faces[] = {"Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"}; string suits[] = {"Hearts", "Diamonds", "Clubs", "Spades"}; for(int i = 0; i < NUMBER_OF_CARDS; i++) { deck[i] = Card(s...
true
b24503b97c88331ed5237a1b88ca968f2b0ee7a8
C++
federicoorsili/C-plus-plus
/cpp05/ex03/Intern.cpp
UTF-8
2,025
2.734375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Intern.cpp :+: :+: :+: ...
true
d7193e368a7b6e7356e211ade3aef127e3e82a28
C++
marcusbfs/AletasFT
/code/include/GeratrizesTask.hpp
UTF-8
13,354
2.875
3
[]
no_license
#ifndef GERATRIZES_TASK_HPP #define GERATRIZES_TASK_HPP #include "Aletas.hpp" #include "AletaTask.hpp" #include "FunDer.hpp" // ========== Altere aqui! ========== // F(z) = D/2 class GeratrizA : public AletaTaskInput { // Returns F(z) virtual double F(const double& z) { return .5 * ft_D; } // Returns dF(z)/d...
true
97821edf892384f786d26ae4b9a1ce0b5b77481a
C++
pravincesingh/DSA-C-CPP-CP
/competitive coding/17 rectangle.cpp
UTF-8
424
2.78125
3
[]
no_license
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { int T;cin>>T; while(T--) { vector<int> r1; for(int i=0;i<4;i++) { int n;cin>>n; r1.push_back(n); } sort(r1.begin(),r1.end()); if(r1[0]==r1[1]&&r...
true
357c47d28699a57a932f49d9f08b66dfe0fe2eb8
C++
chenghu17/Algorithm
/Routine/Zero_Number_N_Factorial.cpp
UTF-8
1,264
3.6875
4
[]
no_license
// // Created by Mr.Hu on 2018/4/2. // // Q:给定数字n,计算其n!的结果末尾有多少个0? // 阶乘的结果一般都特别大,所以如果直接算,n稍微大一点就会overflow // 所以观察发现,n!结果中尾数0的个数,来源于2x5 // 所以只需要观察有多少个n!中有多少个2x5即可 // 但是判断2x5也不是一件容易的事情,对于2和5而言,将数字分解为因数包含2,和将数字分解为因数包含5; // 很明显含2的多,所以我们只需要判断,n!中,可以提取出多少个5就可以了,因为一定存在相对数量的2,来与5相乘。 // 所以我就对每个数进行判断,判断其模5后余数为不为0,为0则结果+1,然后判断剩下...
true
b521fc0603644f0c0c2fd7622345ca66e03594e4
C++
SamyPolcher/CMP
/lec14/examples/SimpleBody.cc
UTF-8
1,271
3.21875
3
[]
no_license
#include "SimpleBody.h" #include<iostream> #include<cmath> SimpleBody::SimpleBody(const std::string& name, const double mass, const Vector3D& x0) : Body(name) { mass_ = mass; pos_ = x0; } void SimpleBody::move(const Vector3D& F, double dt) { pos_ += vel_ * dt; Vector3D acc = F/mass_; vel_ += acc * dt;...
true
27ec362fdb629ddb0d6fef730008de7ef1382176
C++
allenc4/quadrotor_autonav
/src/State.h
UTF-8
578
3.234375
3
[]
no_license
#ifndef _STATE_ #define _STATE_ #include <vector> #include <iostream> #include <cstddef> /** * Small class to hold various data about a state. Used during problem search. */ class State{ public: State(){}; State(int x, int y, float value); ~State(); int x; int y; float value; float cost; int priority; bool...
true
342b4ecaef41ac84d1fe763adf262fbf4eabbe47
C++
serberoth/Raytracer
/src/matrix.h
UTF-8
11,316
2.796875
3
[ "MIT" ]
permissive
#ifndef __MATRIX_H_ #define __MATRIX_H_ #pragma once /*---------------------------------------------------------------------------*/ class Matrix : public gc { private: union { struct { double a[16]; }; struct { double m[4][4]; }; struct { double m00, m01, m02, m03; double m10, m11, m12, m13; ...
true
62fa7b2b264b5d3edbd71132098d3566371b6cff
C++
103174/doudizhuAI
/doudizhuAI/CCard/CardSeries_TriSeriesCard.cpp
UTF-8
1,250
3.0625
3
[]
no_license
#include <algorithm> using namespace std; #include "Card.h" #include "CardSeries_TriSeriesCard.h" CCardSeries_TriSeriesCard::CCardSeries_TriSeriesCard() { } CCardSeries_TriSeriesCard::~CCardSeries_TriSeriesCard() { } BYTE CCardSeries_TriSeriesCard::type() { m_CardType = CardSeries_Type_DoubleSeries; return Ca...
true
728e540992cb80b5bf9928a93a605da669b35b90
C++
HGD-CodeMe/c_or_cpp
/My Procedure/c++/6.cpp
WINDOWS-1252
271
2.90625
3
[]
no_license
#include<iostream> using namespace std; #include<iomanip> main() { int a,b,c,t; cout<<""<<endl; cin>>a>>b>>c; if(a>b) t=a,a=b,b=t; if(a>c) t=a,a=c,c=t; if(b>c) t=b,b=c,c=t; cout<<a<<setw(3)<<b<<setw(3)<<c<<setw(3)<<endl; }
true
115170a76e69a00309fdfff6cd2e84b5ed3b6e3f
C++
zdugi/Pistonics
/src/GameObject2D.cpp
UTF-8
3,682
2.8125
3
[]
no_license
#include "GameObject2D.h" Graphics::GameObject2D::GameObject2D(SDL_Texture *gTexture, Geometry::Shape *shape, Collisions::BoundBox *topBox, Collisions::BoundBox *leftBox, Collisions::BoundBox *botBox, Collisions::BoundBox *rightBox) { this->gTexture = gTexture; this->shape = shape; // move relevant to r...
true
5c0138eaf051a4835cd2a2bdc51fff8b1eab71e0
C++
Pkotova/Object-Oriented-IS-2019-2020---Practice
/game-of-thrones/game-of-thrones/LoginView.cpp
UTF-8
449
2.75
3
[]
no_license
#include "LoginView.h" #include<iostream> void LoginView::run() { char* username = new char[32]; std::cout << "Username:"; std::cin.get(); std::cin.getline(username, 32); char* password = new char[32]; std::cout << "Password:"; std::cin.getline(password, 32); system("cls"); AutheticationService::Authenticate(...
true
89253d953f0809e09e89f624a8a88cffd404dff8
C++
ioxgd/GCTRL-Firmware
/GCTRL_Firmware/Stepper.ino
UTF-8
9,600
2.71875
3
[]
no_license
#define STEPX_STEP_PIN 10 #define STEPX_DIR_PIN 11 #define STEPX_EN_PIN 12 #define STEPY_STEP_PIN 8 #define STEPY_DIR_PIN 9 #define STEPY_EN_PIN 12 void stepperEnable(bool en) { digitalWrite(STEPX_EN_PIN, en ? LOW : HIGH); digitalWrite(STEPY_EN_PIN, en ? LOW : HIGH); } int runStepX = 0; int ruSpee...
true
6c466ba0d2b8c3e74092aaf5b3f1df4c60527297
C++
sheriby/DandAInLeetCode
/Daily_Problem/2012/Beginning/201208_Split_Array_Into_Fibonacci_Sequence/method1/solution.cc
UTF-8
1,575
3.375
3
[ "MIT" ]
permissive
#include <string> #include <vector> using std::string; using std::vector; class Solution { public: // 使用回溯解决此问题 vector<int> splitIntoFibonacci(string S) { vector<int> result; backTrack(result, S, 0, 0, 0); return result; } private: bool backTrack(vector<int>& result, str...
true
c345c66c39883a06e3d83e56b5c256ed708e9206
C++
miro-kostadinov/tmos
/tmos/services/tmos_tl_v2/ttl_string.h
UTF-8
46,368
3.015625
3
[]
no_license
/* * ttl_string.h * * Created on: Apr 3, 2013 * Author: miro */ #ifndef TTL_STRING_H_ #define TTL_STRING_H_ #include <tmos.h> #include <tmos_string.h> #include <tmos_stdio.h> #include <tmos_stdlib.h> #include <stdarg.h> #include <ttl_config.h> #include <ttl_atomic.h> #include <ttl_iterator.h> #include <tt...
true
a5fc73a878ae3e9e23a816bda07e4fb2012c02e3
C++
Riankao/-
/百钱百鸡.cpp
GB18030
460
2.71875
3
[]
no_license
#include <stdio.h> void main() { int cocks=0, hens,chicks; while(cocks<=19) { hens=0; while(hens<=33) { chicks=100 - cocks - hens; if(5.0*cocks + 3.0*hens + chicks/3.0 == 100.0) printf("%d %d %d\n",cocks,hens,chicks); hens++; } cocks++; } } /*ʹԸһָ LΪضдȷЧij ԣдõ
true
ade9a869e5eca5b14ec090f4ac10321afeac83de
C++
goTJ/tj
/practice/acm/A/10200.cpp
WINDOWS-1252
733
2.921875
3
[]
no_license
/* @JUDGE_ID: 10319NX 10200 C++ "̯S^^" */ #include<stdio.h> int prime[1400]; int lim; int win[10002]; int is_prime(int n) { int i; for(i=0; i<lim&&prime[i]*prime[i]<=n; i++) if(!(n%prime[i])) return 0; return 1; } void make_tab(void) { int i, n=11000; lim = 1; prime[0] = 2; for(i=3; i<=n; i+=2){ if...
true
96c6ea9efd4692fafc1922e4e3ec58bc2211f080
C++
tlegen-k/cpp-white-belt
/week-2/palindrom/main.cpp
UTF-8
391
3.515625
4
[]
no_license
#include <iostream> #include <string> using namespace std; bool IsPalindrom (string word) { string second; int size = word.size(); for ( int i=size; i>0; --i) { second += word[i-1]; } if (!second.compare(word)) { // cout << "true"; return true; } else { // cout << "false"; return false; } } int ...
true
8d2aa3dedde4bab6eca77c638a97284345c3aa3e
C++
aimene/SimulatedAnnealing
/SA/Statistics.cpp
UTF-8
1,149
3.609375
4
[]
no_license
#include"Statistics.h" #include<cmath> /** * \brief constructeur par defaut de la classe Statistics * \details Initialise un tableau contenant des données à traiter * * \param v \e vector tableau contenant les données */ /** * \brief constructeur par defaut de la classe Statistics * \deta...
true
ed2653a138d7dde19888b36d5d6da61793fd7978
C++
yfuxzpskbr/BeautifulAlgorithm
/05边界为1的最大子方阵优化(上)/边界为1的最大子方阵优化.cpp
GB18030
1,510
3.34375
3
[]
no_license
#include <iostream> using namespace std; void init(int arr[5][5], int help[5][5][2]); bool check(int help[5][5][2], int lefti, int leftj, int n); int max1Arr(int arr[5][5], int help[5][5][2]); int main(int argc, char* argv[]) { int arr[5][5] = { {0,1,1,1,1}, {0,1,0,1,1}, {0,1,1,1,1}, {0,1,1,1,1}, {0,0,0,0,0}...
true
68babf166949f854249371817e43e64e87c89f85
C++
DracoNick0/Dungeons_and_Dragons_TextGame_Tom-s_and_Nick
/Dungeons_and_Dragons_TextGame_Tomás_and_Nick/Player.cpp
UTF-8
10,929
3.03125
3
[]
no_license
#include <iostream> #include <stdlib.h> #include <time.h> #include <stdio.h> #include "Story.h" #include "Player.h" using namespace std; string choice2; void EnemyAttackSystem() { tempplayer Player = PlayerManager::GetPlayerManager().GetPlayer(); tempenemy Enemy = EnemyManager::GetEnemyManager().GetEnemy(); int hi...
true
8c01382a3eb13e9fadd6bac293b0bb0956d178df
C++
ankithans/leetcode-submissions
/trees/236. Lowest Common Ancestor of a Binary Tree.cpp
UTF-8
1,348
3.03125
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; void inputOutput() { #ifndef ONLINE_JUDGE freopen("../input.txt", "r", stdin); freopen("../output.txt", "w", stdout); #endif } class Solution { public: TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* q) { if (root == NULL) return NULL; if (r...
true
752c1e4a236ca884ac726dac7811c3370ab4084e
C++
tudb/Bka_exercises
/Geometry/Polygon.h
WINDOWS-1258
936
2.890625
3
[]
no_license
#pragma once #include "PointBase.h" //----------------------------------------------------------------- // Name: Polygon // Description: Biu din lp a giac, k tha cac phng thc cua // lp PointBase, gm 2 thuc tinh la m_byAmuont: s im // cua a giac, con tro m_pPolygon tro ti mang gm m_byAmount // im la i tng cua...
true
601da09f2464fbba588265de15f6f7d30c70a015
C++
SimonMederer/saiga
/src/saiga/core/util/BinaryFile.h
UTF-8
1,413
3.1875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/** * Copyright (c) 2017 Darius Rückert * Licensed under the MIT License. * See LICENSE file for more information. */ #pragma once #include "saiga/config.h" #include <fstream> #include <vector> namespace Saiga { /** * Usage Reading: * * BinaryFile bf(file, std::ios_base::in); * int id; * bf >> id; * * Usa...
true
082226f427df6b83cc2bdab812720b3f490621f8
C++
kdbohne/pt
/src/sampling.cpp
UTF-8
3,022
2.5625
3
[ "MIT", "BSD-2-Clause" ]
permissive
#include "sampling.h" #include "math.h" float uniform_float() { // TODO: improve? return (float)drand48(); } Vector3f uniform_sample_sphere(const Point2f &u) { float z = 1 - 2 * u[0]; float r = std::sqrt(std::max((float)0, (float)1 - z * z)); float phi = 2 * PI * u[1]; return Vector3f(r * std:...
true
7704bdb5db10fb0516b2e5df8fb54361c872da96
C++
pingsoli/cpp
/basics/final_keyword.cpp
UTF-8
790
3.390625
3
[]
no_license
// Avoid inherited from my class ? // add final specifier behind base class name. // // Avoid derived class override member function ? // add final specifier to member function of base class. // // Note: put `final` specifier behind function name or class name. #include <iostream> // struct ForbidInheriteFrom final ...
true
a62059df13ead08eead707075953cc87d85dec2d
C++
electronicvisions/tutorial-bss2
/code/spike_counter_loop.cc
UTF-8
1,312
2.84375
3
[]
no_license
#include <stddef.h> #include <stdint.h> extern "C" { #include "libnux/counter.h" #include "libnux/dls.h" #include "libnux/spr.h" #include "libnux/time.h" } extern uint8_t ram_end; // This program reads out neuron-local spike counters in a loop. The per-neuron accumulation is // stored to a defined memory address ran...
true
ebb45b41ff7f9d6f8ad8ea7bc4ce53080fb3ea00
C++
ShuyiLU/leetcode
/leetcode-algorithms/560. Subarray Sum Equals/560. Subarray Sum Equals K.cpp
UTF-8
2,074
3.390625
3
[]
no_license
#include<iostream> #include<vector> #include<map> using namespace std; /* class Solution { public: int subarraySum(vector<int>& nums, int k) { int n = nums.size(); if(n == 0) return 0; if(n == 1){ if(nums[0] == k) return 1; else return 0; } int cnt = 0; vector<vect...
true
042e11069da61ced9aeb8f7ff9db12450cbbdb10
C++
yuebaixiao/cpp_template
/lambda01.cpp
UTF-8
1,749
3.84375
4
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ //test1 值捕获 /* int i = 1; auto f = [i]{return i;}; i = 10; int j = f(); cout << j << endl; */ //test2 引用捕获 /* int i = 1; auto f = [&i]{return i;}; i = 10; int j = f(); cout << j << endl;//3 */ ...
true
a184466eb3445fa44216794051f7dc6cd208c49c
C++
makut/MIPT-hw
/Tuple/Tuple.h
UTF-8
9,592
3.140625
3
[]
no_license
# include <utility> # include <cstddef> # include <type_traits> template<typename... TArgs> class Tuple; template<size_t Ind, typename TFirst, typename... TEnd> struct getByInd { typedef typename getByInd<Ind - 1, TEnd...>::type type; }; template<typename TFirst, typename... TEnd> struct getByInd<0, TFirst, TEnd...
true