text
stringlengths
232
16.3k
domain
stringclasses
1 value
difficulty
stringclasses
3 values
meta
dict
<|fim_prefix|>// repo: jiaquan11/2020VSPro path: /XiaCaoJun_Teacher/src/TestOpenCVPY/main.cpp #include <opencv2/core.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <iostream> using namespace cv; using namespace std; #pragma comment(lib, "opencv_world420d.l...
code_fim
medium
{ "lang": "cpp", "repo": "jiaquan11/2020VSPro", "path": "/XiaCaoJun_Teacher/src/TestOpenCVPY/main.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> Mat src = imread("lena.jpg"); Mat gsrc; Mat lsrc; pyrDown(src, gsrc);//��˹������ �ɱ����²��� pyrUp(src, lsrc);//������˹������ ���ϲ��� namedWindow("src"); moveWindow("src", 0, 0); namedWindow("gsrc"); moveWindow("gsrc", 512, 0); namedWindow("lsrc"); moveWindow("lsrc", 0, 512); imshow("src", ...
code_fim
hard
{ "lang": "cpp", "repo": "jiaquan11/2020VSPro", "path": "/XiaCaoJun_Teacher/src/TestOpenCVPY/main.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> while (std::getline(monflux, ligne)) { // recuperation d'une ligne dans mon fichier std::vector<Object*> tmp; for (int j = 0; j < ligne.size(); j++) { switch (ligne[j]) { case '0': tmp.push_back(new Grass()); break; case '1': tmp.push_back(new TallGrass());...
code_fim
medium
{ "lang": "cpp", "repo": "EtiennePaita/Pokemon", "path": "/Pokemon/Map.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: EtiennePaita/Pokemon path: /Pokemon/Map.cpp /* Fonction de cr�ation de Map. Il faut placer un fichier en parametre du constructeur pour creer une map */ #include "Map.h" #include "Grass.h" #include "TallGrass.h" #include "Wall.h" #include "Dresseur.h" #include "Player.h" <|fim_su...
code_fim
medium
{ "lang": "cpp", "repo": "EtiennePaita/Pokemon", "path": "/Pokemon/Map.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> if (monflux) { std::string ligne; int i = 0; while (std::getline(monflux, ligne)) { // recuperation d'une ligne dans mon fichier std::vector<Object*> tmp; for (int j = 0; j < ligne.size(); j++) { switch (ligne[j]) { case '0': tmp.push_back(new Grass()); break;...
code_fim
medium
{ "lang": "cpp", "repo": "EtiennePaita/Pokemon", "path": "/Pokemon/Map.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>Elev::Elev() : age(18) { }; int Elev::GetAge() { return age; } void Elev::SetAge(int val) { age = val; } Elev& Elev::operator ++() { age++; return *this; } Elev Elev::operator ++(int) { Elev temp; temp.SetAge(age); ++(*this); return temp; } int main(int argc, char *arg...
code_fim
medium
{ "lang": "cpp", "repo": "adrianpoplesanu/personal-work", "path": "/cpp/problems/syntax/syntax102.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: adrianpoplesanu/personal-work path: /cpp/problems/syntax/syntax102.cpp // overriding ++ prefix and postfix operators #include <iostream> using namespace std; class Elev { private: int age; public: Elev(); int GetAge(); void SetAge(int); Elev& operator ++(); Elev operator...
code_fim
medium
{ "lang": "cpp", "repo": "adrianpoplesanu/personal-work", "path": "/cpp/problems/syntax/syntax102.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> return age; } void Elev::SetAge(int val) { age = val; } Elev& Elev::operator ++() { age++; return *this; } Elev Elev::operator ++(int) { Elev temp; temp.SetAge(age); ++(*this); return temp; } int main(int argc, char *argv[]) { Elev elev; cout << elev.GetAge() <<...
code_fim
medium
{ "lang": "cpp", "repo": "adrianpoplesanu/personal-work", "path": "/cpp/problems/syntax/syntax102.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: rorra/phcp-cgi path: /servicioPaginaError.cpp #include <string> #include <mysql++.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fstream> #include "dominio.h" #include "util.h" #include "servicio.h" #include "servicioPaginaError.h" #include "configuracion.h" #inclu...
code_fim
hard
{ "lang": "cpp", "repo": "rorra/phcp-cgi", "path": "/servicioPaginaError.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> //Cerrar el archivo out.close(); return(0); } int cServicioPaginaError::quitarPaginaError(const std::string &codigo, cDominio &dominio) { std::string comando, archivo; //Obtener permisos de root if (setuid(0) < 0) { dominio.loguear("Error al obtener permisos de root"); return(-1); ...
code_fim
hard
{ "lang": "cpp", "repo": "rorra/phcp-cgi", "path": "/servicioPaginaError.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> return(0); } int cServicioPaginaError::quitarPaginaError(const std::string &codigo, cDominio &dominio) { std::string comando, archivo; //Obtener permisos de root if (setuid(0) < 0) { dominio.loguear("Error al obtener permisos de root"); return(-1); } //Eliminar el archivo que contie...
code_fim
hard
{ "lang": "cpp", "repo": "rorra/phcp-cgi", "path": "/servicioPaginaError.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>REGISTER_DEF_TYPE(GrayscaleNode); #endif // WM_VISION_INCLUDE_VISION_KERNEL_VISION_NODE_GRAYSCALE_NODE_H_<|fim_prefix|>// repo: walkingmachinegraveyard/WM-Vision path: /wm_vision_kernel/include/vision_kernel/vision_nodes/grayscale_node.h /* * Copyright 2012-2013 Walking Machine * * Project: Walking ...
code_fim
hard
{ "lang": "cpp", "repo": "walkingmachinegraveyard/WM-Vision", "path": "/wm_vision_kernel/include/vision_kernel/vision_nodes/grayscale_node.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: walkingmachinegraveyard/WM-Vision path: /wm_vision_kernel/include/vision_kernel/vision_nodes/grayscale_node.h /* * Copyright 2012-2013 Walking Machine * * Project: Walking Machine Sara robot 2012-2013 * Package: wm_vision * Node: vision_kernel * * Creation date: 12/07/2012 * * Programme...
code_fim
medium
{ "lang": "cpp", "repo": "walkingmachinegraveyard/WM-Vision", "path": "/wm_vision_kernel/include/vision_kernel/vision_nodes/grayscale_node.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>}; REGISTER_DEF_TYPE(GrayscaleNode); #endif // WM_VISION_INCLUDE_VISION_KERNEL_VISION_NODE_GRAYSCALE_NODE_H_<|fim_prefix|>// repo: walkingmachinegraveyard/WM-Vision path: /wm_vision_kernel/include/vision_kernel/vision_nodes/grayscale_node.h /* * Copyright 2012-2013 Walking Machine * * Project: Walk...
code_fim
hard
{ "lang": "cpp", "repo": "walkingmachinegraveyard/WM-Vision", "path": "/wm_vision_kernel/include/vision_kernel/vision_nodes/grayscale_node.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Surbhi-Kohli/DSandAlgo path: /Dynamic Programming/EditDistance/EditDistanceBottomUp.cpp /* Time Complexity: O(m x n) Auxiliary Space: O(m x n) */ #include <iostream> #include <cstring> using namespace std; int editDistance(string s1,string s2,int m,int n) <|fim_suffix|> return dp[m][n]; ...
code_fim
hard
{ "lang": "cpp", "repo": "Surbhi-Kohli/DSandAlgo", "path": "/Dynamic Programming/EditDistance/EditDistanceBottomUp.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>} int main() { // your code goes here string s1,s2; cin>>s1>>s2; int m,n; m=s1.length(); n=s2.length(); cout<<editDistance(s1,s2,m,n); return 0; }<|fim_prefix|>// repo: Surbhi-Kohli/DSandAlgo path: /Dynamic Programming/EditDistance/EditDistanceBottomUp.cpp /* Time Complexity: O(m x n) Auxiliary Space:...
code_fim
hard
{ "lang": "cpp", "repo": "Surbhi-Kohli/DSandAlgo", "path": "/Dynamic Programming/EditDistance/EditDistanceBottomUp.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> return dp[m][n]; } int main() { // your code goes here string s1,s2; cin>>s1>>s2; int m,n; m=s1.length(); n=s2.length(); cout<<editDistance(s1,s2,m,n); return 0; }<|fim_prefix|>// repo: Surbhi-Kohli/DSandAlgo path: /Dynamic Programming/EditDistance/EditDistanceBottomUp.cpp /* Time Comp...
code_fim
hard
{ "lang": "cpp", "repo": "Surbhi-Kohli/DSandAlgo", "path": "/Dynamic Programming/EditDistance/EditDistanceBottomUp.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Waterticket/Cordelia-DB path: /framework/FileHandler.h // // Created by Administrator on 2021-03-15. // #ifndef CORDELIA_DB_FILEHANDLER_H #define CORDELIA_DB_FILEHANDLER_H #include <fstream> #include <string> class FileHandler{ public: std::string read(std::string fname); bool write(s...
code_fim
hard
{ "lang": "cpp", "repo": "Waterticket/Cordelia-DB", "path": "/framework/FileHandler.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>// 파일 이어서 쓰기 bool FileHandler::write_relay(std::string fname, std::string value) { std::ofstream out(fname, std::ios::app); if (out.is_open()) { out << value; } else { throw std::invalid_argument("INVAILD_FILENAME"); } return true; } #endif //CORDELIA_DB_FILEHANDLER_...
code_fim
hard
{ "lang": "cpp", "repo": "Waterticket/Cordelia-DB", "path": "/framework/FileHandler.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Keithpohl82/FPS_Code path: /Source/SoFRemastered/SoFRemastered.cpp // Copyright Epic Games, Inc. All Rights Reserved. <|fim_suffix|>IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, SoFRemastered, "SoFRemastered" );<|fim_middle|>#include "SoFRemastered.h" #include "Modules/ModuleManager...
code_fim
medium
{ "lang": "cpp", "repo": "Keithpohl82/FPS_Code", "path": "/Source/SoFRemastered/SoFRemastered.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, SoFRemastered, "SoFRemastered" );<|fim_prefix|>// repo: Keithpohl82/FPS_Code path: /Source/SoFRemastered/SoFRemastered.cpp // Copyright Epic Games, Inc. All Rights Reserved. <|fim_middle|>#include "SoFRemastered.h" #include "Modules/ModuleManager...
code_fim
medium
{ "lang": "cpp", "repo": "Keithpohl82/FPS_Code", "path": "/Source/SoFRemastered/SoFRemastered.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: svn2github/ngene path: /trunk/nGENE Proj/FileArchive.h /* --------------------------------------------------------------------------- This source file is part of nGENE Tech. Copyright (c) 2006- Wojciech Toman This program is free software. File: FileArchive.h Version: 0.01 --------...
code_fim
hard
{ "lang": "cpp", "repo": "svn2github/ngene", "path": "/trunk/nGENE Proj/FileArchive.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> { public: FileArchive(); /** Constructs the File and opens it. @param _fileName wide char file name. @param _openMode combination of flags of OPEN_MODE type. You can combine any of them. */ FileArchive(const wstring& _fileName, dword _openMode); /// Copy constructo...
code_fim
hard
{ "lang": "cpp", "repo": "svn2github/ngene", "path": "/trunk/nGENE Proj/FileArchive.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> void setPreviousDocument(long long int); void setInsertingTaxNumber(bool); void setForbiddingInsertingWithoutTaxInvoice(bool); }; enum #ifdef QT_VERSION5X class #endif TableNames { Scanned, // Here are stored barcodes which was not uploaded Uploaded, // Here are stored barcodes marked as sent ...
code_fim
hard
{ "lang": "cpp", "repo": "ston1x/UNARetail", "path": "/uaMobi/dataproviders/ModesDescriptions.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: ston1x/UNARetail path: /uaMobi/dataproviders/ModesDescriptions.h #pragma once #include <QString> #include <QList> enum #ifdef QT_VERSION5X class #endif Modes { // This enum represents modes. Warning! All these values must be linked with entities and // ready for QString convertation. Warn...
code_fim
hard
{ "lang": "cpp", "repo": "ston1x/UNARetail", "path": "/uaMobi/dataproviders/ModesDescriptions.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> while(a[k]!=' '&&a[k]!='\0') k++; for(int j=k-1;j>=i;j--) cout<<a[j]; i=k; if(a[i]==' ') cout<<' '; } cout<<endl; } }<|fim_prefix|>// repo: samael65535/my_hdoj_code path: /1062a.cpp #include <iostream> #include<cstdio> #include<cstrin...
code_fim
medium
{ "lang": "cpp", "repo": "samael65535/my_hdoj_code", "path": "/1062a.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: samael65535/my_hdoj_code path: /1062a.cpp #include <iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int t; <|fim_suffix|> while(a[k]!=' '&&a[k]!='\0') k++; for(int j=k-1;j>=i;j--) cout<<a[j]; i=k; if(a[i]==' ') ...
code_fim
medium
{ "lang": "cpp", "repo": "samael65535/my_hdoj_code", "path": "/1062a.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: LoganJoe/training-data path: /2018.10/2018.10.31/force2.cpp #include<bits/stdc++.h> #define N 1000005 #define mod 998244353 int Case,n,head[N],ecnt,k,A[N],mark[N],f[N],ans,fac[N]; int fa[N][20],val[N][20],deep[N]; struct edge{int v,w,next;}e[N<<1]; void add(int u,int v,int w){e[++ecnt]={v,w,head...
code_fim
hard
{ "lang": "cpp", "repo": "LoganJoe/training-data", "path": "/2018.10/2018.10.31/force2.cpp", "mode": "psm", "license": "ICU", "source": "the-stack-v2" }
<|fim_suffix|> for(int i=1;i<k;i++) res=mul(res+askdist(A[f[i]],A[f[i+1]])); //for(int i=1;i<k;i++) printf("%d ",askdist(A[f[i]],A[f[i+1]])); //for(int i=1;i<=k;i++) printf("%d ",A[f[i]]); //printf("%d\n",res); ans=mul(ans+res); }while(std::next_permutation(f+1,f+1+k)); printf("%d\n",1ll*ans*Pow(fac[k],mod-2...
code_fim
hard
{ "lang": "cpp", "repo": "LoganJoe/training-data", "path": "/2018.10/2018.10.31/force2.cpp", "mode": "spm", "license": "ICU", "source": "the-stack-v2" }
<|fim_suffix|> // Local restore pref to keep track the pref |kRestoreAppsAndPagesPrefName| // changes. std::unique_ptr<IntegerPrefMember> local_restore_pref_; base::ScopedObservation<sync_preferences::PrefServiceSyncable, sync_preferences::PrefServiceSyncableObserver> syncable_pr...
code_fim
hard
{ "lang": "cpp", "repo": "JadeLuo/chromium", "path": "/chrome/browser/chromeos/full_restore/new_user_restore_pref_handler.h", "mode": "spm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_prefix|>// repo: D4mo/Elixir path: /Source/Foundation/Controller/Elixir-UI.hpp // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // Copyright (C) 2016-2020 by Agustin Alvarez. All rights reserved. // // This work is licensed under the terms o...
code_fim
hard
{ "lang": "cpp", "repo": "D4mo/Elixir", "path": "/Source/Foundation/Controller/Elixir-UI.hpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // (Missing Documentation) void On_Module_Save(HANDLE File); // (Missing Documentation) bool On_Module_Tick(uint32_t Time); }<|fim_prefix|>// repo: D4mo/Elixir path: /Source/Foundation/Controller/Elixir-UI.hpp // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-...
code_fim
hard
{ "lang": "cpp", "repo": "D4mo/Elixir", "path": "/Source/Foundation/Controller/Elixir-UI.hpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: FinixLei/leetcode_finix path: /src/87_hard_ScrambleString.cpp /* We can scramble a string s to get a string t using the following algorithm: If the length of the string is 1, stop. If the length of the string is > 1, do the following: Split the string into two non-empty substrin...
code_fim
hard
{ "lang": "cpp", "repo": "FinixLei/leetcode_finix", "path": "/src/87_hard_ScrambleString.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>unordered_map<string, bool> memo; string genSortedString(string& s) { int size = s.size(); if (size == 0 || size == 1) return s; vector<char> array; for (int i=0; i<size; i++) array.push_back(s[i]); sort(array.begin(), array.end()); string result(array.begin(), array.e...
code_fim
hard
{ "lang": "cpp", "repo": "FinixLei/leetcode_finix", "path": "/src/87_hard_ScrambleString.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: imjch/miniServer path: /include/HTTPServer.h #ifndef HTTPSERVER_INCLUDE #define HTTPSERVER_INCLUDE #include "HTTPMessageHandler.h" #include <string> #include "RoleServer.h" #include "ServerDefine.h" class HTTPServer:public IRoleServer { public: HTTPServer(); void Start() override; <|fim...
code_fim
medium
{ "lang": "cpp", "repo": "imjch/miniServer", "path": "/include/HTTPServer.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> void HandleHTTP(HTTPMessage& httpMessage); }; #endif<|fim_prefix|>// repo: imjch/miniServer path: /include/HTTPServer.h #ifndef HTTPSERVER_INCLUDE #define HTTPSERVER_INCLUDE #include "HTTPMessageHandler.h" #include <string> #include "RoleServer.h" #include "ServerDefine.h" class HTTPServer:public ...
code_fim
medium
{ "lang": "cpp", "repo": "imjch/miniServer", "path": "/include/HTTPServer.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: meduag/Projetos-Arduino-Proteus-Simulation path: /inos/accel_analisys.ino #define X_ACCEL A0 #define Y_ACCEL A1 #define Z_ACCEL A2 #define ledPin 13 #define RMS_window 1000 class FilterBuHp2 { public: FilterBuHp2() { v[0]=0.0; v[1]=0.0; } private: float v[3]; public: float s...
code_fim
hard
{ "lang": "cpp", "repo": "meduag/Projetos-Arduino-Proteus-Simulation", "path": "/inos/accel_analisys.ino", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>float RMS(float values[]) { float result; result = 0; for(int i = 0; i < RMS_window; i++) { result += pow(values[i], 2); } result = sqrt(result/10); return result; } float getSimpleValue(int pin_x, int pin_y, int pin_z) { float instant_value_x = analogRead(pin_x); float instant...
code_fim
hard
{ "lang": "cpp", "repo": "meduag/Projetos-Arduino-Proteus-Simulation", "path": "/inos/accel_analisys.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> for(int i = 0; i < RMS_window; i++) { result += pow(values[i], 2); } result = sqrt(result/10); return result; } float getSimpleValue(int pin_x, int pin_y, int pin_z) { float instant_value_x = analogRead(pin_x); float instant_value_y = analogRead(pin_y); float instant_value_z = analo...
code_fim
hard
{ "lang": "cpp", "repo": "meduag/Projetos-Arduino-Proteus-Simulation", "path": "/inos/accel_analisys.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: odiubankov/home_control path: /home_control_lib/include/repeat_invoker.h // // Copyright(c) 2018 Oleksii Diubankov // Distributed under the MIT License (http://opensource.org/licenses/MIT) // #pragma once #include <atomic> #include <chrono> #include <functional> #include <thread> namespace hct...
code_fim
hard
{ "lang": "cpp", "repo": "odiubankov/home_control", "path": "/home_control_lib/include/repeat_invoker.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>{ public: RepeatInvoker(std::function<void()> handler, std::chrono::milliseconds timeout); ~RepeatInvoker(); RepeatInvoker(const RepeatInvoker&) = delete; RepeatInvoker& operator=(const RepeatInvoker&) = delete; RepeatInvoker(RepeatInvoker&&) = delete; RepeatInvoker& operator=(Repe...
code_fim
medium
{ "lang": "cpp", "repo": "odiubankov/home_control", "path": "/home_control_lib/include/repeat_invoker.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> //function for close button void on_pushButton_close_clicked(); public: QSqlDatabase mydb; void closeConnection() //function to close connection to database { mydb.close(); mydb.removeDatabase(QSqlDatabase::defaultConnection); //close datab...
code_fim
hard
{ "lang": "cpp", "repo": "justkennyclub/score-system", "path": "/ScoreSystem/login.h", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> public: QSqlDatabase mydb; void closeConnection() //function to close connection to database { mydb.close(); mydb.removeDatabase(QSqlDatabase::defaultConnection); //close database and remove connection } bool openConnection() ...
code_fim
hard
{ "lang": "cpp", "repo": "justkennyclub/score-system", "path": "/ScoreSystem/login.h", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|>// repo: sashman/terrain_generator path: /src/terrain_generator.cpp //============================================================================ // Name : terrain_generator.cpp // Author : sash //============================================================================ #include "te...
code_fim
hard
{ "lang": "cpp", "repo": "sashman/terrain_generator", "path": "/src/terrain_generator.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>// start = clock(); if (verbose) std::cout << "Generating rivers" << std::endl; rivers(); // finish = clock() - start; if (verbose) std::cout << "Done " << (finish / 1000000) << std::endl; double rivers_time = (finish / 1000000); print_rivers(0); // start = clock(); if ...
code_fim
hard
{ "lang": "cpp", "repo": "sashman/terrain_generator", "path": "/src/terrain_generator.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: DanielaDominguez/ESFM- path: /c++/H2/16 H2.cpp #include<iostream> using namespace std; <|fim_suffix|> float acum; float dato; int i; int n; float prom; cout << "Ingrese la cantidad de alumnos:" << endl; cin >> n; acum = 0; for (i=1;i<=n;i++) { cout << "Ingrese la edad " << i << ":"...
code_fim
easy
{ "lang": "cpp", "repo": "DanielaDominguez/ESFM-", "path": "/c++/H2/16 H2.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> int n; float prom; cout << "Ingrese la cantidad de alumnos:" << endl; cin >> n; acum = 0; for (i=1;i<=n;i++) { cout << "Ingrese la edad " << i << ":" << endl; cin >> dato; acum = acum+dato; } prom = acum/n; cout << "El promedio de las edades del grupo de " << n << " alumnos es: " << prom <<...
code_fim
easy
{ "lang": "cpp", "repo": "DanielaDominguez/ESFM-", "path": "/c++/H2/16 H2.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: DanielaDominguez/ESFM- path: /c++/H2/16 H2.cpp #include<iostream> using namespace std; <|fim_suffix|> float prom; cout << "Ingrese la cantidad de alumnos:" << endl; cin >> n; acum = 0; for (i=1;i<=n;i++) { cout << "Ingrese la edad " << i << ":" << endl; cin >> dato; acum = acum+dato...
code_fim
easy
{ "lang": "cpp", "repo": "DanielaDominguez/ESFM-", "path": "/c++/H2/16 H2.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> i_configFileName = fullPath; return true; } void config::extractConfigString(cstring section, cstring varname, stringID* outStringID) { char buffer[32]; GetPrivateProfileString(section, varname, ...
code_fim
hard
{ "lang": "cpp", "repo": "AlexKoukoulas2074245K/Defence_of_the_Moderns", "path": "/Dotm/Dotm/config/configparser.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: AlexKoukoulas2074245K/Defence_of_the_Moderns path: /Dotm/Dotm/config/configparser.cpp /* ----------------------------------------------- Author: Alex Koukoulas Date: 16/12/2015 File name: configparser.cpp File description: An implementation of the ...
code_fim
hard
{ "lang": "cpp", "repo": "AlexKoukoulas2074245K/Defence_of_the_Moderns", "path": "/Dotm/Dotm/config/configparser.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> *outUint = getBufferInt(buffer); } void config::extractConfigFloat(cstring section, cstring varname, float* outFloat) { char buffer[16]; GetPrivateProfileString(section, varname, "", ...
code_fim
hard
{ "lang": "cpp", "repo": "AlexKoukoulas2074245K/Defence_of_the_Moderns", "path": "/Dotm/Dotm/config/configparser.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>#include"zaxlib_templates.hpp" #include "zaxlib_enum.hpp" struct SpikeField { int curtime; int elements; vec_uptr<bool> spikes; vec_uptr<std::string> names; }; struct InputSwitch { InputSwitch() { output = OutputType::None; } vec<InputType> types; OutputType outpu...
code_fim
medium
{ "lang": "cpp", "repo": "zaxhutchinson/project_thing", "path": "/src/zaxlib_struct.hpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: zaxhutchinson/project_thing path: /src/zaxlib_struct.hpp /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: zaxlib_struct.hpp * Author: zax * *...
code_fim
hard
{ "lang": "cpp", "repo": "zaxhutchinson/project_thing", "path": "/src/zaxlib_struct.hpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: sunshinenny/C-Study path: /结构体/Struct.3.cpp /*3������һ����3��ѧ��������ѧ�š��������ɼ�����ɵľ�̬������ Ȼ������������и��������ݡ�*/ #include<stdio.h> struct Student { int num; <|fim_suffix|>{ Student s[3]={{1001,"Sunny",90},{1002,"Tom",80},{1003,"Kitty",85}}; Student *p,*head; head=s; s[...
code_fim
medium
{ "lang": "cpp", "repo": "sunshinenny/C-Study", "path": "/结构体/Struct.3.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>{ Student s[3]={{1001,"Sunny",90},{1002,"Tom",80},{1003,"Kitty",85}}; Student *p,*head; head=s; s[0].next=&s[1]; s[1].next=&s[2]; s[2].next=NULL; p=head; while(p!=NULL) { printf("%6d %6s %6.2f",p->num,p->name,p->score); p=p->next; printf("\n"); } return 0; }<|fim_prefix|>...
code_fim
medium
{ "lang": "cpp", "repo": "sunshinenny/C-Study", "path": "/结构体/Struct.3.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> argc -= 4; argv += 4; // Set up queue of bridge files deque<MergeHelper> helpers; using PQueue = priority_queue<MergeHelper*, vector<MergeHelper *>, MergeHelperCompare>; PQueue queue{MergeHelperCompare()}; unsigned int n_samples_skipped{0}; vector<string> samples; vector<double> n...
code_fim
hard
{ "lang": "cpp", "repo": "HealthVivo/mumdex", "path": "/unstable/unequal_bridges.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: HealthVivo/mumdex path: /unstable/unequal_bridges.cpp // // unequal_bridges // // find bridges with different counts in different samples // // Copyright 2016 Peter Andrews @ CSHL // #include <algorithm> #include <deque> #include <exception> #include <iostream> #include <queue> #include <sstrea...
code_fim
hard
{ "lang": "cpp", "repo": "HealthVivo/mumdex", "path": "/unstable/unequal_bridges.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // Integration time dt double get_h(); // Public access attributes --- Ok, It is not a good idea, but let's do it for now =) particle_ *particles; double *d_theta; protected: // ---------- RK4 methods from Numerical Recipes ------------ void nrerror(char error_text[]); void derivs(double y[],...
code_fim
hard
{ "lang": "cpp", "repo": "vanderfreitas/pcod", "path": "/PCOD.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> double *x, *a, *b, *c,*df,*y; //---------------------------------------------------------- // ---------- PCOD model methods ------------ void projectionMatrix(); complex<double> scalar_product(double *v1, complex<double> *v2); double *matrix_line(double *matrix, int l); void rotation_center(do...
code_fim
hard
{ "lang": "cpp", "repo": "vanderfreitas/pcod", "path": "/PCOD.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: vanderfreitas/pcod path: /PCOD.h #include<math.h> #include<stdio.h> #include<stdlib.h> #include <iostream> #include <fstream> #include <random> #include <vector> #include <math.h> #include <string.h> #include <numeric> #include <complex> #include <cmath> #include <iomanip> // -- Random num...
code_fim
hard
{ "lang": "cpp", "repo": "vanderfreitas/pcod", "path": "/PCOD.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: jainamandelhi/Geeks-For-Geeks-Solutions path: /Recursion/Subset Sums.cpp #include<bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define fast ios_base::sync_with_stdio(false) #define ll long long ll mod=1000000007; ll gcd(ll a,ll b) { return (b==0)?a:gcd(b,a%b)...
code_fim
medium
{ "lang": "cpp", "repo": "jainamandelhi/Geeks-For-Geeks-Solutions", "path": "/Recursion/Subset Sums.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>{ cin>>n; ll arr[n]; for(ll i=0;i<n;i++) cin>>arr[i]; dfs(0,0,arr); // cout<<41243431; map<ll,ll>::iterator itr; for(itr=st.begin();itr!=st.end();itr++) { while(itr->second!=0) { cout<<itr->first<<" "; itr->second--; } ...
code_fim
medium
{ "lang": "cpp", "repo": "jainamandelhi/Geeks-For-Geeks-Solutions", "path": "/Recursion/Subset Sums.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>private: AudioDestinationNode* destination_ptr; std::vector<AudioNode*> _nodes; };<|fim_prefix|>// repo: VSIONHAIRIES/CHEAP-FAT-OPEN path: /AudioContext.h #pragma once // http://www.w3.org/TR/webaudio/#AudioContext-section #include <AudioNode.h> #include <AudioDestinationNode.h> #include <vector> ...
code_fim
easy
{ "lang": "cpp", "repo": "VSIONHAIRIES/CHEAP-FAT-OPEN", "path": "/AudioContext.h", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|>// repo: aryandosaj/CompetetiveProgramming path: /1370_e.cpp #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; using namespace std; #define ll long long #define ull unsigned long long #define MOD 1000000007 #define ...
code_fim
hard
{ "lang": "cpp", "repo": "aryandosaj/CompetetiveProgramming", "path": "/1370_e.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> while (!(s0.empty() && s1.empty())) { if (f == 2) { ans++; i0 = *s0.begin(); i1 = *s1.begin(); f=0; } if(i0<i1) { s0.erase(i0); s1.erase(i1); auto p =s0.upper_bound(i1); ...
code_fim
hard
{ "lang": "cpp", "repo": "aryandosaj/CompetetiveProgramming", "path": "/1370_e.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> std::string Wrapper::toString(v8::Local<v8::Value> value) { v8::String::Utf8Value utf8(value); return std::string(*utf8); } } } } // namespace Poco::JS::Core<|fim_prefix|>// repo: leisen2009/macchina.io path: /platform/JS/Core/src/Wrapper.cpp // // Wrapper.cpp // // $Id: //poco/1.4/JS/Core/src/Wrapp...
code_fim
medium
{ "lang": "cpp", "repo": "leisen2009/macchina.io", "path": "/platform/JS/Core/src/Wrapper.cpp", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> virtual SLOT_RESULT Action(); virtual SLOT_RESULT End(); public: explicit CDemonHunterGrenadesSlot(); virtual ~CDemonHunterGrenadesSlot(); };<|fim_prefix|>// repo: iso5930/Direct-3D-Team-Portfolio path: /FinalCode/DemonHunterGrenadesSlot.h #pragma once #include "Slot.h" <|fim_middle|>class CDemonH...
code_fim
medium
{ "lang": "cpp", "repo": "iso5930/Direct-3D-Team-Portfolio", "path": "/FinalCode/DemonHunterGrenadesSlot.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> virtual SLOT_RESULT End(); public: explicit CDemonHunterGrenadesSlot(); virtual ~CDemonHunterGrenadesSlot(); };<|fim_prefix|>// repo: iso5930/Direct-3D-Team-Portfolio path: /FinalCode/DemonHunterGrenadesSlot.h #pragma once #include "Slot.h" class CDemonHunterGrenadesSlot : public CSlot { public: vi...
code_fim
easy
{ "lang": "cpp", "repo": "iso5930/Direct-3D-Team-Portfolio", "path": "/FinalCode/DemonHunterGrenadesSlot.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: iso5930/Direct-3D-Team-Portfolio path: /FinalCode/DemonHunterGrenadesSlot.h #pragma once #include "Slot.h" <|fim_suffix|> virtual SLOT_RESULT Action(); virtual SLOT_RESULT End(); public: explicit CDemonHunterGrenadesSlot(); virtual ~CDemonHunterGrenadesSlot(); };<|fim_middle|>class CDemonH...
code_fim
medium
{ "lang": "cpp", "repo": "iso5930/Direct-3D-Team-Portfolio", "path": "/FinalCode/DemonHunterGrenadesSlot.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast); virtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool...
code_fim
hard
{ "lang": "cpp", "repo": "imgreenbird/QUANTAXIS", "path": "/QUANTAXIS_Trade/PYCTP/PyCTP_wrap.h", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|>// repo: imgreenbird/QUANTAXIS path: /QUANTAXIS_Trade/PYCTP/PyCTP_wrap.h har *swig_protected_method_name) const { std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name); return (iv != swig_inner.end() ? iv->second : false); } void swig_set_inner(c...
code_fim
hard
{ "lang": "cpp", "repo": "imgreenbird/QUANTAXIS", "path": "/QUANTAXIS_Trade/PYCTP/PyCTP_wrap.h", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>tFtdcOptionSelfCloseField *pOptionSelfClose); virtual void OnErrRtnOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo); virtual void OnErrRtnOptionSelfCloseAction(CThostFtdcOptionSelfCloseActionField *pOptionSelfCloseAction, CThostFtd...
code_fim
hard
{ "lang": "cpp", "repo": "imgreenbird/QUANTAXIS", "path": "/QUANTAXIS_Trade/PYCTP/PyCTP_wrap.h", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>void beeper (int mode) { switch (mode) { case 0: // useful before entering T.update loop digitalWrite(buzzer, LOW); // active low delay(200); digitalWrite(buzzer, HIGH); break; case 1: T.pulse(buzzer, 4000, HIGH); // active low ...
code_fim
hard
{ "lang": "cpp", "repo": "Raja-Raman/IoT4", "path": "/Occupancy4.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>/***************** void init_radio() { myRadio.begin(); // Start up the physical nRF24L01 Radio myRadio.setChannel(108); // Above most Wifi Channels // Set the PA Level low to prevent power supply related issues myRadio.setPALevel(RF24_PA_MIN); //myRadio.setPALevel(RF24_PA_HIGH); ...
code_fim
hard
{ "lang": "cpp", "repo": "Raja-Raman/IoT4", "path": "/Occupancy4.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Raja-Raman/IoT4 path: /Occupancy4.ino // Smart building: occupancy, temperature and humidity // TODO: periodically try to connect to the RF mesh; but if not, keep running the lights /*---------------------------------------------------------------------------- NRF24 connections http://ard...
code_fim
hard
{ "lang": "cpp", "repo": "Raja-Raman/IoT4", "path": "/Occupancy4.ino", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> //Calcula la calificacion promedio de las series y despliega su titulo y calificacion promedio void calculaCalPromedioSerie(); //Retorna el objeto serie que esta en posicion iS y recibe como parametros de entrada, no existe retorno una serie default y despliega un mensaje indicando que esa s...
code_fim
hard
{ "lang": "cpp", "repo": "davidn3457/Situacionproblematc1033", "path": "/Series.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: davidn3457/Situacionproblematc1033 path: /Series.h #ifndef Series_h #define Series_h #include <stdio.h> #include "Serie.h" class Series{ private: Serie arrSeries[100]; int iCant; public: Series(); //Leer todas series y episodios desde un archivo void leerArchivo(); ...
code_fim
hard
{ "lang": "cpp", "repo": "davidn3457/Situacionproblematc1033", "path": "/Series.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> int layer; Picture picture; ScreenItem(); ScreenItem(int x, int y, int w, int h, Picture p, int l); ~ScreenItem(); };<|fim_prefix|>// repo: zhangpengfei1017/Test path: /Test/ScreenItem.h #pragma once #include "Picture.h" <|fim_middle|>using namespace std; class ScreenItem { public: int PosX; int...
code_fim
medium
{ "lang": "cpp", "repo": "zhangpengfei1017/Test", "path": "/Test/ScreenItem.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: zhangpengfei1017/Test path: /Test/ScreenItem.h #pragma once #include "Picture.h" using namespace std; class ScreenItem <|fim_suffix|> int Weith; int Height; int layer; Picture picture; ScreenItem(); ScreenItem(int x, int y, int w, int h, Picture p, int l); ~ScreenItem(); };<|fim_middle|>...
code_fim
easy
{ "lang": "cpp", "repo": "zhangpengfei1017/Test", "path": "/Test/ScreenItem.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> int PosY; int Weith; int Height; int layer; Picture picture; ScreenItem(); ScreenItem(int x, int y, int w, int h, Picture p, int l); ~ScreenItem(); };<|fim_prefix|>// repo: zhangpengfei1017/Test path: /Test/ScreenItem.h #pragma once #include "Picture.h" using namespace std; class ScreenItem <|f...
code_fim
easy
{ "lang": "cpp", "repo": "zhangpengfei1017/Test", "path": "/Test/ScreenItem.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> GCS_SEND_TEXT = 0x2001, SITL_GET_ACCEL_X = 0x3001, SITL_GET_ACCEL_Y = 0x3002, SITL_GET_ACCEL_Z = 0x3003, SITL_GET_GYRO_X = 0x3011, SITL_GET_GYRO_Y = 0x3012, SITL_GET_GYRO_Z = 0x3013, SITL_GET_STATE_YA...
code_fim
hard
{ "lang": "cpp", "repo": "icedraco/simucopter-bridge", "path": "/simucopter/SimuCopterMessage.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: icedraco/simucopter-bridge path: /simucopter/SimuCopterMessage.h #pragma once namespace SIMUCOPTER { /** * SimuCopter message IDs */ enum SimuCopterMessage { PING = 0x0000, ERROR = 0xffff, SHUTDOWN = 0xfffe,...
code_fim
medium
{ "lang": "cpp", "repo": "icedraco/simucopter-bridge", "path": "/simucopter/SimuCopterMessage.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // Check if any reads failed and exit early (to try again). if (isnan(hum) || isnan(temp)) { // if (isnan(hum) || isnan(temp)) { return; } ////////THIS MAKES THE SKETCH STOP FOR A MOMENT - WHY??? //////// END TEMP SENSOR static uint32_t lastT...
code_fim
hard
{ "lang": "cpp", "repo": "BATMan-Phln/Matrix_Dual_Clock", "path": "/My_Dot_Matrix_058_STILL_TOO_BIG.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>void loop(void) { //////////STILL TRYING TO GET ZULU WITH A DIFFERENT LIBRARY time_t utc = now(); time_t local = myTZ.toLocal(utc, &tcr); Serial.println(); printDateTime(utc, "UTC"); printDateTime(local, tcr -> abbrev); delay(10000); //THIS WORKS - Now integra...
code_fim
hard
{ "lang": "cpp", "repo": "BATMan-Phln/Matrix_Dual_Clock", "path": "/My_Dot_Matrix_058_STILL_TOO_BIG.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: BATMan-Phln/Matrix_Dual_Clock path: /My_Dot_Matrix_058_STILL_TOO_BIG.ino // Use the DHT22 temp and humidity sensor //#define USE_DHT22 1 // Use the DS1307 clock module #define USE_DS1307 1 // Header file includes #include <MD_Parola.h> #include <MD_MAX72xx.h> #include <SPI.h> #incl...
code_fim
hard
{ "lang": "cpp", "repo": "BATMan-Phln/Matrix_Dual_Clock", "path": "/My_Dot_Matrix_058_STILL_TOO_BIG.ino", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: zhangyouquan/dense_map path: /dense_map_mono/include/dense_mono.h #pragma once //防止头文件重复添加,不过不通用,只有微软支持。如果要跨平台,最好还是用 #ifndef #define #endif #include <iostream> #include <string> #include <vector> #include <fstream> #include <ostream> using namespace std; #include <sophus/se3.hpp> using Sophus::S...
code_fim
hard
{ "lang": "cpp", "repo": "zhangyouquan/dense_map", "path": "/dense_map_mono/include/dense_mono.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> /** * 计算 NCC 评分 * @param ref 参考图像 * @param curr 当前图像 * @param pt_ref 参考点 * @param pt_curr 当前点 * @return NCC评分 */ double NCC(const Mat &ref, const Mat &curr, const Vector2d &pt_ref, const Vector2d &pt_curr); // 双线性灰度插值 inline double getBilinearInterpolatedValue(const Mat &...
code_fim
hard
{ "lang": "cpp", "repo": "zhangyouquan/dense_map", "path": "/dense_map_mono/include/dense_mono.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>// takeTurn function ActionType Strategic::takeTurn(const Surroundings &s) const { return (*__strategy)(s); } }// end namespace Gaming<|fim_prefix|>// repo: dreamlabo/ucd-csci2312-pa4 path: /Strategic.cpp // Todd Labo // PA-4 #include <iomanip> #include "Agent.h" #include "Strategic.h" ...
code_fim
hard
{ "lang": "cpp", "repo": "dreamlabo/ucd-csci2312-pa4", "path": "/Strategic.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: dreamlabo/ucd-csci2312-pa4 path: /Strategic.cpp // Todd Labo // PA-4 #include <iomanip> #include "Agent.h" #include "Strategic.h" namespace Gaming { const char Strategic::STRATEGIC_ID = 'T' ; Gaming::Strategic::Strategic(const Gaming::Game &g, const Gaming::Position &p, double energy...
code_fim
hard
{ "lang": "cpp", "repo": "dreamlabo/ucd-csci2312-pa4", "path": "/Strategic.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: amberGreat/tinyQ path: /leetcode/cpp/oddEvenLinkedList.cpp #include <iostream> #include "list_node.h" using std::cout; using std::endl; /*********************************************************************** * https://leetcode.com/problems/odd-even-linked-list/description/ * * Given a sing...
code_fim
hard
{ "lang": "cpp", "repo": "amberGreat/tinyQ", "path": "/leetcode/cpp/oddEvenLinkedList.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>}; // 10:12, 1041д�꣬�������˰��Сʱ,�������ȷ�� int main(int argc, char* argv[]) { // g++ -I./include -o a.out oddEvenLinkedList.cpp include/list_node.cpp -g // createLink ���Dz�delete�����ԣ���ʵ���main���ڴ�й¶ Solution *solu = new Solution(); cout << "begin run:" << endl; ListNode *head ...
code_fim
hard
{ "lang": "cpp", "repo": "amberGreat/tinyQ", "path": "/leetcode/cpp/oddEvenLinkedList.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // g++ -I./include -o a.out oddEvenLinkedList.cpp include/list_node.cpp -g // createLink ���Dz�delete�����ԣ���ʵ���main���ڴ�й¶ Solution *solu = new Solution(); cout << "begin run:" << endl; ListNode *head = createLink(5); echoList(head); head = solu->oddEvenList(head); ech...
code_fim
hard
{ "lang": "cpp", "repo": "amberGreat/tinyQ", "path": "/leetcode/cpp/oddEvenLinkedList.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: alimoqimi97/HospitalProject path: /section.h #ifndef SECTION_H #define SECTION_H #include <iostream> #include <doctor.h> #include<list> using namespace std; class section { public: section(); section(QString sn); // commenting temporarily // // doctor& ...
code_fim
medium
{ "lang": "cpp", "repo": "alimoqimi97/HospitalProject", "path": "/section.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // .................. // void TransferToMainDoctor(doctor & d, string pnam, string dname); void Add_Doc(doctor &d1); list<doctor> dlist; private: QString section_name; }; #endif // SECTION_H<|fim_prefix|>// repo: alimoqimi97/HospitalProject path: /secti...
code_fim
medium
{ "lang": "cpp", "repo": "alimoqimi97/HospitalProject", "path": "/section.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> void TransferToMainDoctor(doctor & d, string pnam, string dname); void Add_Doc(doctor &d1); list<doctor> dlist; private: QString section_name; }; #endif // SECTION_H<|fim_prefix|>// repo: alimoqimi97/HospitalProject path: /section.h #ifndef SECTION_H #define SECTION_H #in...
code_fim
hard
{ "lang": "cpp", "repo": "alimoqimi97/HospitalProject", "path": "/section.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>private: unsigned long startContact=0; byte prevValue; void HandleContactor(unsigned long timePeriod, bool isDirect, bool v); void HandleFinish(int newStatus); }; #endif<|fim_prefix|>// repo: igorgsh/SmartHouse path: /SmartHomeBoard/Contactor.h // Contactor.h #ifndef _CONTACTOR_h #define _CONT...
code_fim
hard
{ "lang": "cpp", "repo": "igorgsh/SmartHouse", "path": "/SmartHomeBoard/Contactor.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> void ProcessUnit(ActionType event); bool Compare(const Unit* u); byte UnitStoredSize() { return 7; } void ReadFromEEPROM(uint16_t addr); void WriteToEEPROM(uint16_t addr); void ConfigField(const JsonObject& jsonList); void const print(const char* header, DebugLevel level); private: unsigned long ...
code_fim
hard
{ "lang": "cpp", "repo": "igorgsh/SmartHouse", "path": "/SmartHomeBoard/Contactor.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: igorgsh/SmartHouse path: /SmartHomeBoard/Contactor.h // Contactor.h #ifndef _CONTACTOR_h #define _CONTACTOR_h #if defined(ARDUINO) && ARDUINO >= 100 #include "arduino.h" #else #include "WProgram.h" #endif #include "Unit.h" #define CONTACTOR_SWITCHED_TIME 100 class Contactor:public Unit { ...
code_fim
hard
{ "lang": "cpp", "repo": "igorgsh/SmartHouse", "path": "/SmartHomeBoard/Contactor.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>namespace hse { // Generated through simulation void elaborate(graph &g, const ucs::variable_set &variables, bool report_progress = false); graph to_state_graph(const graph &g, const ucs::variable_set &variables, bool report_progress = false); graph to_petri_net(const graph &g, const ucs::variable_set...
code_fim
medium
{ "lang": "cpp", "repo": "nbingham1/hse", "path": "/hse/elaborator.h", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> int success = getaddrinfo(argv[1], 0, &hints, &res); if (success != 0) return success; for (struct addrinfo* p = res; p != NULL; p = p->ai_next) { char host[NI_MAXHOST]; getnameinfo(p->ai_addr, p->ai_addrlen, host, NI_MAXHOST, 0, 0, NI_NUMERICHOST); std::cout<< host << " " << p->ai_family << ...
code_fim
hard
{ "lang": "cpp", "repo": "borjacano97/Redes", "path": "/Practica 2.2/Ejercicio1.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }