text
stringlengths
232
16.3k
domain
stringclasses
1 value
difficulty
stringclasses
3 values
meta
dict
<|fim_prefix|>// repo: borjacano97/Redes path: /Practica 2.2/Ejercicio1.cpp #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> #include <iostream> //int socket(int domain, int type, int protocol); int main (int argc, char** argv) <|fim_suffix|> if (success != 0) return success; fo...
code_fim
hard
{ "lang": "cpp", "repo": "borjacano97/Redes", "path": "/Practica 2.2/Ejercicio1.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> public: Read(char* file) { ifstream ifs(file); } graph& getGraph() { graph g; return g; } }; */ #endif<|fim_prefix|>// repo: UTEC-PE/project-lil_graph path: /read.h #ifndef READ_H #define READ_H #include "graph.h" #include <fstream> #include <iostream> /** * Clase de a...
code_fim
easy
{ "lang": "cpp", "repo": "UTEC-PE/project-lil_graph", "path": "/read.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: UTEC-PE/project-lil_graph path: /read.h #ifndef READ_H #define READ_H #include "graph.h" #include <fstream> #include <iostream> /** * Clase de ayuda para leer el grafo desde un archivo, * no es necesario que la utilicen, podrían implementar su lector * desde su grafo o algún otro lado **/ ...
code_fim
medium
{ "lang": "cpp", "repo": "UTEC-PE/project-lil_graph", "path": "/read.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> typedef typename G::N N; typedef typename G::E E; public: Read(char* file) { ifstream ifs(file); } graph& getGraph() { graph g; return g; } }; */ #endif<|fim_prefix|>// repo: UTEC-PE/project-lil_graph path: /read.h #ifndef READ_H #define READ_H #include "graph.h" #i...
code_fim
easy
{ "lang": "cpp", "repo": "UTEC-PE/project-lil_graph", "path": "/read.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: lsmanoel/ros_img path: /src/image_process/mono_vision/MonoVision.h #include "../image_process/ImageProcess.h" class MonoVision: public ImageProcess <|fim_suffix|> // ---------------------------------------------------------------------------------------- // Main Loop void main_loop(); cv::Ma...
code_fim
hard
{ "lang": "cpp", "repo": "lsmanoel/ros_img", "path": "/src/image_process/mono_vision/MonoVision.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> void init_video_capture(); // ---------------------------------------------------------------------------------------- // Main Loop void main_loop(); cv::Mat main_process(cv::Mat frame); };<|fim_prefix|>// repo: lsmanoel/ros_img path: /src/image_process/mono_vision/MonoVision.h #include "../image_...
code_fim
hard
{ "lang": "cpp", "repo": "lsmanoel/ros_img", "path": "/src/image_process/mono_vision/MonoVision.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> int get_video_source(); void init_video_capture(); // ---------------------------------------------------------------------------------------- // Main Loop void main_loop(); cv::Mat main_process(cv::Mat frame); };<|fim_prefix|>// repo: lsmanoel/ros_img path: /src/image_process/mono_vision/MonoVis...
code_fim
medium
{ "lang": "cpp", "repo": "lsmanoel/ros_img", "path": "/src/image_process/mono_vision/MonoVision.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>int V3[2][3]{1,2,3,4,5,6}; //Valores distribuidos automaticamente int V3[][2]{1,2,3,4,5,6}; //Distribuição com um tamanho implícito //Atribuição só pode ser implítica para a primeira dimensão //... for(int i(0); i<2; i++) for(int j(0); j<2; j++) V1[i][j]=V2[i][j]+V3[i][j]; //Inicialização póstera //......
code_fim
medium
{ "lang": "cpp", "repo": "HeckRodSav/Curso_Prog", "path": "/code/array/M.inicialization.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: HeckRodSav/Curso_Prog path: /code/array/M.inicialization.cpp //... <tipo> <nome>[<tam1>][<tam2>]{{<val11>, ..., <val1n>}, ..., {<valm1>, ..., <valmn>}}; //Sintaxe de Inicialização //... int V1[2][3]{}; //Todos os valores como 0 <|fim_suffix|>//Atribuição só pode ser implítica para a prime...
code_fim
medium
{ "lang": "cpp", "repo": "HeckRodSav/Curso_Prog", "path": "/code/array/M.inicialization.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>//Atribuição só pode ser implítica para a primeira dimensão //... for(int i(0); i<2; i++) for(int j(0); j<2; j++) V1[i][j]=V2[i][j]+V3[i][j]; //Inicialização póstera //...<|fim_prefix|>// repo: HeckRodSav/Curso_Prog path: /code/array/M.inicialization.cpp //... <tipo> <nome>[<tam1>][<tam2>]{{<val11>, ...,...
code_fim
medium
{ "lang": "cpp", "repo": "HeckRodSav/Curso_Prog", "path": "/code/array/M.inicialization.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> Graph g(N); while (M--) { cin >> u >> v; g.addEdge(u, v); } int s, e; cin >> s >> e; cout << g.countPaths(s, e) << endl; } return 0; }<|fim_prefix|>// repo: G33k1973/CodingGames path: /WalksSrcToDst.cpp #include<bits/stdc++.h> using namespace std; class Graph { int...
code_fim
hard
{ "lang": "cpp", "repo": "G33k1973/CodingGames", "path": "/WalksSrcToDst.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: G33k1973/CodingGames path: /WalksSrcToDst.cpp #include<bits/stdc++.h> using namespace std; class Graph { int V; list<int> *adj; void countPathsUtil(int, int, bool[], int &); <|fim_suffix|>{ bool *visited = new bool[V + 1]; memset(visited, false, sizeof(visited)); int ...
code_fim
hard
{ "lang": "cpp", "repo": "G33k1973/CodingGames", "path": "/WalksSrcToDst.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>int main() { int i, j, n, fake; for (cin >> n; n; n--) { for (i = 0; i < COIN; i++) ox[i] = coin[i] = 0; for (i = 0; i < TIME; i++) { for (j = 0; j < 3; j++) cin >> s[j]; if (s[2] == "even") setStatus(0, 1); else if (s[2] == "up") setCoin(1); else setCoin...
code_fim
medium
{ "lang": "cpp", "repo": "m80126colin/Judge", "path": "/before2020/UVa_ACM/006 - Volume VI/UVa 608(Simple, Simulation, Fake-coin).cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: m80126colin/Judge path: /before2020/UVa_ACM/006 - Volume VI/UVa 608(Simple, Simulation, Fake-coin).cpp /** * @judge UVa * @id 608 * @tag Simple, Simulation, Fake coin */ #include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> using namespace std; #define COIN 1...
code_fim
medium
{ "lang": "cpp", "repo": "m80126colin/Judge", "path": "/before2020/UVa_ACM/006 - Volume VI/UVa 608(Simple, Simulation, Fake-coin).cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> void setShadowing(bool value); void setDebugging(bool value); void setShader(CSharedShaderRef shader); void setTexture(CSharedTextureRef texture, E_SHADER_SAMPLER _sampler); bool isLoaded(void) const; bool isCommited(void) const; void bind(voi...
code_fim
hard
{ "lang": "cpp", "repo": "codeoneclick/ie3D", "path": "/ie3D-Core/Sources/CMaterial.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: codeoneclick/ie3D path: /ie3D-Core/Sources/CMaterial.h // // CMaterial.h // indie2dEngine // // Created by Sergey Sergeev on 5/17/13. // Copyright (c) 2013 Sergey Sergeev. All rights reserved. // #ifndef CMaterial_h #define CMaterial_h #include "HCommon.h" #include "HEnums.h" #include "HDe...
code_fim
hard
{ "lang": "cpp", "repo": "codeoneclick/ie3D", "path": "/ie3D-Core/Sources/CMaterial.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> void setDebugging(bool value); void setShader(CSharedShaderRef shader); void setTexture(CSharedTextureRef texture, E_SHADER_SAMPLER _sampler); bool isLoaded(void) const; bool isCommited(void) const; void bind(void); void unbind(void); }; #end...
code_fim
hard
{ "lang": "cpp", "repo": "codeoneclick/ie3D", "path": "/ie3D-Core/Sources/CMaterial.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> void removeStart(){ if(len <= 0) return; T* old = data; data = new T[len-1]; for(int i = 1; i < len; i++) data[i - 1] = old[i]; len--; delete[] old; } int getlen(){ return len; } T* getData(){ return data; } int getCapacity(){ return capacity; } friend ostream& operato...
code_fim
hard
{ "lang": "cpp", "repo": "TyrangYang/c-sample-algorithm", "path": "/lesson4_goodGrowArray.cc", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> return capacity; } friend ostream& operator << (ostream &s, const goodGrowArray<T>& list ){ for (int i = 0; i < list.len; ++i) { } } }; int main(int argc, char const *argv[]) { goodGrowArray<double> a(4); a.insertStart(10.1); a.insertStart(20.1); a.insert...
code_fim
hard
{ "lang": "cpp", "repo": "TyrangYang/c-sample-algorithm", "path": "/lesson4_goodGrowArray.cc", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: TyrangYang/c-sample-algorithm path: /lesson4_goodGrowArray.cc #include <iostream> using namespace std; template <typename T> class goodGrowArray { private: T* data; int len; int capacity; void grow(){ T* old = data; data = new T[2*capacity]; capacity = 2*capacity; for(int i = 0; i <...
code_fim
hard
{ "lang": "cpp", "repo": "TyrangYang/c-sample-algorithm", "path": "/lesson4_goodGrowArray.cc", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> while(no_of_test_cases--) solve(); return 0; }<|fim_prefix|>// repo: MathProgrammer/CodeChef path: /Contests/2021 April Long Challenge/Programs/World Record.cpp #include <iostream> #include <cmath> using namespace std; void solve() { double k1, k2, k3, v; cin >> k1 ...
code_fim
easy
{ "lang": "cpp", "repo": "MathProgrammer/CodeChef", "path": "/Contests/2021 April Long Challenge/Programs/World Record.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: MathProgrammer/CodeChef path: /Contests/2021 April Long Challenge/Programs/World Record.cpp #include <iostream> #include <cmath> using namespace std; void solve() { double k1, k2, k3, v; cin >> k1 >> k2 >> k3 >> v; const int DISTANCE = 100,RECORD = 958; double spe...
code_fim
easy
{ "lang": "cpp", "repo": "MathProgrammer/CodeChef", "path": "/Contests/2021 April Long Challenge/Programs/World Record.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: beam-telescopes/Scattering-study path: /Moliere_code/tbsw/source/TBTools/source/include/TBVertexFitter.h #ifndef TBVertexFitter_H #define TBVertexFitter_H 1 // DEPFETTrackTools includes #include "TBTrack.h" #include "TBVertex.h" #include "TBDetector.h" //other includes includes #include <TMath...
code_fim
hard
{ "lang": "cpp", "repo": "beam-telescopes/Scattering-study", "path": "/Moliere_code/tbsw/source/TBTools/source/include/TBVertexFitter.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>class TBVertexFitter { public: /** Default Constructor */ TBVertexFitter(int ipl, TBDetector det); /** Performs vertex fitting. Returns boolean of success of fit */ bool FitVertex(TBVertex& Vertex); // Public Members ----------------- CLHEP::HepMatrix B; //Jacobian B = dh/dq...
code_fim
hard
{ "lang": "cpp", "repo": "beam-telescopes/Scattering-study", "path": "/Moliere_code/tbsw/source/TBTools/source/include/TBVertexFitter.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: chingchen1018/top-70-leetcode-questions path: /src/House Robber/rob.cpp #include <algorithm> #include <vector> class Solution <|fim_suffix|> std::vector<int> rob(n + 1); rob[0] = 0; // important initialization rob[1] = nums[0]; for (int i = 2; i < n + 1; ++i) { int curr...
code_fim
medium
{ "lang": "cpp", "repo": "chingchen1018/top-70-leetcode-questions", "path": "/src/House Robber/rob.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> std::vector<int> rob(n + 1); rob[0] = 0; // important initialization rob[1] = nums[0]; for (int i = 2; i < n + 1; ++i) { int currentHouseValue = nums[i - 1]; rob[i] = std::max(rob[i - 2] + currentHouseValue, rob[i - 1]); } return rob[n]; } };<|fim_prefix|>// repo:...
code_fim
medium
{ "lang": "cpp", "repo": "chingchen1018/top-70-leetcode-questions", "path": "/src/House Robber/rob.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: taketakeyyy/atcoder path: /abc/052/a.cpp #include <iostream> #include <string> #include <math.h> using namespace std; <|fim_suffix|> int a, b, c, d; scanf("%d %d %d %d",&a, &b, &c, &d); if(a*b >= c*d){ printf("%d\n", a*b); } else{ printf("%d\n", c*d); } ...
code_fim
easy
{ "lang": "cpp", "repo": "taketakeyyy/atcoder", "path": "/abc/052/a.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> int a, b, c, d; scanf("%d %d %d %d",&a, &b, &c, &d); if(a*b >= c*d){ printf("%d\n", a*b); } else{ printf("%d\n", c*d); } return 0; }<|fim_prefix|>// repo: taketakeyyy/atcoder path: /abc/052/a.cpp #include <iostream> #include <string> #include <math.h> <|fim_m...
code_fim
medium
{ "lang": "cpp", "repo": "taketakeyyy/atcoder", "path": "/abc/052/a.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: jake314159/SwarmSimulator path: /src/AnalyseSearchSpace.cpp using namespace std; #include <iostream> #include <string> #include <stdlib.h> #include <algorithm> #include <time.h> #include <math.h> #include "Vector2d.h" #include "Simulation.h" #include "Display.h" #include "Environment.h" #include...
code_fim
hard
{ "lang": "cpp", "repo": "jake314159/SwarmSimulator", "path": "/src/AnalyseSearchSpace.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> float progress = 0.0; float progress_step_size = 1.0/(float)( ((1/step)*(1/step))/2); // ^Points in a grid long start_time = time(NULL); cerr << endl; cerr << " \r"; ...
code_fim
hard
{ "lang": "cpp", "repo": "jake314159/SwarmSimulator", "path": "/src/AnalyseSearchSpace.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> cout << " [" << endl; //Grid start for(i=0.0; i<1.0; i+=step) { cout << " [" << endl; //Row start for(j=0.0; j<1.0; j+=step) { long long value_a[SAMPLE_NUMBER] = {0}; if(i+j<=1.0) { //long runCount = 0; ...
code_fim
hard
{ "lang": "cpp", "repo": "jake314159/SwarmSimulator", "path": "/src/AnalyseSearchSpace.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: danheizer/Video-Rental-Store path: /factory.h #ifndef FACTORY_H #define FACTORY_H #include "product.h" #include "customer.h" #include "transaction.h" const int maxMovies = 100; const int maxCustomers = 100; const int maxTransactions = 1000; const int NUM_TYPES_OF_PRODUCTS = 8; class Factory { ...
code_fim
medium
{ "lang": "cpp", "repo": "danheizer/Video-Rental-Store", "path": "/factory.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> Stuff* createIt(char ch) const { int subscript = hash(ch); // would do error checking return objFactory[subscript]->create(); } }; */ }; #endif<|fim_prefix|>// repo: danheizer/Video-Rental-Store path: /factory.h #ifndef FACTORY_H #define FACTORY_H #include "product.h...
code_fim
hard
{ "lang": "cpp", "repo": "danheizer/Video-Rental-Store", "path": "/factory.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: NeelParihar/DS-ALGO path: /1. Arrays/Intermidiate/19.cpp // 19. GCD of given index ranges in an array #include<iostream> using namespace std; int gcd(int a,int b) <|fim_suffix|> for(int i=0;i<n;i++) { cin>>arr[i]; } int q; cin>>q; while(q--) { int l,r; ...
code_fim
medium
{ "lang": "cpp", "repo": "NeelParihar/DS-ALGO", "path": "/1. Arrays/Intermidiate/19.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>{ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; } int q; cin>>q; while(q--) { int l,r; cin>>l>>r; int result=arr[l]; for(int i=l+1;i<=r;i++) { result = gcd(arr[i],result); } cout<<result<<endl; } ...
code_fim
medium
{ "lang": "cpp", "repo": "NeelParihar/DS-ALGO", "path": "/1. Arrays/Intermidiate/19.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>{ public: Observer(); virtual ~Observer(); virtual void onNotify(Entity* entity, Event event) = 0; virtual void onNotify(Event event) = 0; };<|fim_prefix|>// repo: ellePAZ/Frogger-clone path: /Nero_Frogger/Source/Observer.h #pragma once #include "Entity.h" #include "Event.h" #include <iostream> <|f...
code_fim
easy
{ "lang": "cpp", "repo": "ellePAZ/Frogger-clone", "path": "/Nero_Frogger/Source/Observer.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: ellePAZ/Frogger-clone path: /Nero_Frogger/Source/Observer.h #pragma once #include "Entity.h" #include "Event.h" #include <iostream> <|fim_suffix|>{ public: Observer(); virtual ~Observer(); virtual void onNotify(Entity* entity, Event event) = 0; virtual void onNotify(Event event) = 0; };<|f...
code_fim
easy
{ "lang": "cpp", "repo": "ellePAZ/Frogger-clone", "path": "/Nero_Frogger/Source/Observer.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: BenjaminChia/Ben_FYP_RPi_Matrix path: /FYP_matrix/google-api/google/cloud/texttospeech/v1/cloud_tts.grpc.pb.cc // Generated by the gRPC C++ plugin. // If you make any local change, they will be lost. // source: google/cloud/texttospeech/v1/cloud_tts.proto #include "google/cloud/texttospeech/v1/...
code_fim
hard
{ "lang": "cpp", "repo": "BenjaminChia/Ben_FYP_RPi_Matrix", "path": "/FYP_matrix/google-api/google/cloud/texttospeech/v1/cloud_tts.grpc.pb.cc", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>::grpc::Status TextToSpeech::Stub::SynthesizeSpeech(::grpc::ClientContext* context, const ::google::cloud::texttospeech::v1::SynthesizeSpeechRequest& request, ::google::cloud::texttospeech::v1::SynthesizeSpeechResponse* response) { return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Syn...
code_fim
hard
{ "lang": "cpp", "repo": "BenjaminChia/Ben_FYP_RPi_Matrix", "path": "/FYP_matrix/google-api/google/cloud/texttospeech/v1/cloud_tts.grpc.pb.cc", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> A[0] = 2.0; A[1] = -1.0; for (size_t i = 1; i < size - 1; ++i) { A[i * size + i - 1] = -1.0; A[i * size + i ] = 2.0; A[i * size + i + 1] = -1.0; } A[size * size - 2] = -1.0; A[size * size - 1] = 2.0; double ...
code_fim
hard
{ "lang": "cpp", "repo": "nanaHa1003/NLA_SCML_2018", "path": "/ex4/ex4.cpp", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|>// repo: ktj007/Raiderz_Public path: /Develop/Game/XGlueGame_Storage.h #pragma once class XGlueGameStorage { public: // Storage int GetStorageMoney() { return gvar.MyInfo.ChrInfo.GetStorageMoney(); } int GetStorageItemCount() const { return gvar.MyInfo.Storage.GetSize();} int GetStorageItemM...
code_fim
medium
{ "lang": "cpp", "repo": "ktj007/Raiderz_Public", "path": "/Develop/Game/XGlueGame_Storage.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> int GetStorageItemQuantity( int nSlotID ) const; bool DepositMoney(int nMoney) const; bool WithdrawMoney( int nMoney ) const; bool DepositItem( int nSrcSlotID, int nTarSlotID, int nQuantity) const; bool WithdrawItem( int nSrcSlotID, int nTarSlotID, int nQuantity) const; bool MoveStorageItem( int nSr...
code_fim
medium
{ "lang": "cpp", "repo": "ktj007/Raiderz_Public", "path": "/Develop/Game/XGlueGame_Storage.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> int GetStorageItemID( int nSlotID) const; int GetStorageItemQuantity( int nSlotID ) const; bool DepositMoney(int nMoney) const; bool WithdrawMoney( int nMoney ) const; bool DepositItem( int nSrcSlotID, int nTarSlotID, int nQuantity) const; bool WithdrawItem( int nSrcSlotID, int nTarSlotID, int nQuan...
code_fim
medium
{ "lang": "cpp", "repo": "ktj007/Raiderz_Public", "path": "/Develop/Game/XGlueGame_Storage.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> uint32 getAVCNALLengthSize(uint32 index) { if (_oAVC) { return (((*_pAVCSampleEntryVec)[index])->getNALLengthSize()); } return 0; } uint32 getTrackLevelOMA2DRMInfoSize(); uint8* getTrackLevelOMA2DRMInf...
code_fim
hard
{ "lang": "cpp", "repo": "leotfrancisco/patch-hosting-for-android-x86-support", "path": "/android-x86/external/opencore/fileformats/mp4/parser/include/sampledescriptionatom.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: leotfrancisco/patch-hosting-for-android-x86-support path: /android-x86/external/opencore/fileformats/mp4/parser/include/sampledescriptionatom.h /* ------------------------------------------------------------------ * Copyright (C) 2008 PacketVideo * * Licensed under the Apache License, Version...
code_fim
hard
{ "lang": "cpp", "repo": "leotfrancisco/patch-hosting-for-android-x86-support", "path": "/android-x86/external/opencore/fileformats/mp4/parser/include/sampledescriptionatom.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>#ifndef OSCL_FILE_IO_H_INCLUDED #include "oscl_file_io.h" #endif #ifndef FULLATOM_H_INCLUDED #include "fullatom.h" #endif #ifndef SAMPLEENTRY_H_INCLUDED #include "sampleentry.h" #endif #ifndef ESDESCRIPTOR_H_INCLUDED #include "esdescriptor.h" #endif #ifndef DECODERSPECIFICINFO_H_INCLUDED #include "dec...
code_fim
hard
{ "lang": "cpp", "repo": "leotfrancisco/patch-hosting-for-android-x86-support", "path": "/android-x86/external/opencore/fileformats/mp4/parser/include/sampledescriptionatom.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>void low_volt_alert() // Function to send blynk push notifiction if low voltage is detected { if(lowvoltagenotificationflag == true && underVoltageAlertOnOffState == 0 && blynkConnectionStatusForNotification == true){ Serial.println("Sending Under voltage Blynk notifica...
code_fim
hard
{ "lang": "cpp", "repo": "jabastien/Blynk-PZEM-004T-3-Phase-Failure-Automation", "path": "/Blynk-PZEM-004T-Phase-Failure-Automation/Blynk-PZEM-004T-Phase-Failure-Automation.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>bool blynkConnectionStatusForNotification = false; bool lowvoltagenotificationflag = true; bool phasefailurenotificationflag = true; bool phasefailureflag = false; bool lowvoltageflag = false; bool highvoltageflag = false; void setup() { Serial.begin(9600); pzemSerial.begin(9600); /* s...
code_fim
hard
{ "lang": "cpp", "repo": "jabastien/Blynk-PZEM-004T-3-Phase-Failure-Automation", "path": "/Blynk-PZEM-004T-Phase-Failure-Automation/Blynk-PZEM-004T-Phase-Failure-Automation.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: jabastien/Blynk-PZEM-004T-3-Phase-Failure-Automation path: /Blynk-PZEM-004T-Phase-Failure-Automation/Blynk-PZEM-004T-Phase-Failure-Automation.ino = 0; power_factor_2 = 0; Serial.print("VOLTAGE: "); Serial.println(voltage_usage_2); // V Serial.print("CUR...
code_fim
hard
{ "lang": "cpp", "repo": "jabastien/Blynk-PZEM-004T-3-Phase-Failure-Automation", "path": "/Blynk-PZEM-004T-Phase-Failure-Automation/Blynk-PZEM-004T-Phase-Failure-Automation.ino", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // We are also going to declare a Particle.function so that we can turn the LED on and off from the cloud. Particle.function("led",ledToggle); Particle.function("setcolor",setColor); // This is saying that when we ask the cloud for the function "led", it will employ the function ledToggle() f...
code_fim
hard
{ "lang": "cpp", "repo": "j-lml/led", "path": "/src/led.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: j-lml/led path: /src/led.ino /* * Project led * Description: * Author: * Date: */ #include "rgb-controls/rgb-controls.h" using namespace RGBControls; // RGB led on PWN pins //Led led(D1, D2, D3); // red_pin = D0, green_pin = D1, blue_pin = D2 // We will be using D1 to control our LE...
code_fim
hard
{ "lang": "cpp", "repo": "j-lml/led", "path": "/src/led.ino", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>} /// <summary> /// ������ /// </summary> void CPotGimmick::Initialize(void) { m_pTexture = TextureAsset(TextureKey::PotGimmick); } /// <summary> /// �X�V /// </summary> void CPotGimmick::Update(void) { // ��ֈړ������� float radius = 60.0f; Mof::CCircle zone(m_Position, radius); for (...
code_fim
hard
{ "lang": "cpp", "repo": "OiCGame/GameJam01", "path": "/Project/PotGimmick.cpp", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> for (v=t; v!=s; v=parent[v]) { u = parent[v]; path_flow = min(path_flow, rGraph[u][v]); } // update residual capacities of the edges and reverse edges // along the path for (v=t; v != s; v=parent[v]) { ...
code_fim
hard
{ "lang": "cpp", "repo": "shaonaghosh/0tempIsing", "path": "/calculateMaxFlow.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: shaonaghosh/0tempIsing path: /calculateMaxFlow.cpp #include"Misc.h" using namespace std; //The max flow and bfs modules are adapted from //http://www.geeksforgeeks.org/find-edge-disjoint-paths-two-vertices/ int findMaxFlow(adjmattype graph, int s, int t, adjmattype &fGraphvect, vector<i...
code_fim
hard
{ "lang": "cpp", "repo": "shaonaghosh/0tempIsing", "path": "/calculateMaxFlow.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: YanLi26/leetcode path: /36. Valid Sudoku.cpp class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { if(board.empty()) return false; int col[9][9] = {0}, row[9][9] = {0}, cell[9][9] = {0}; <|fim_suffix|> if(col[i][num] || row[j][num] || c...
code_fim
hard
{ "lang": "cpp", "repo": "YanLi26/leetcode", "path": "/36. Valid Sudoku.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> if(col[i][num] || row[j][num] || cell[k][num]) return false; col[i][num] = row[j][num] = cell[k][num] = 1; } } } return true; } };<|fim_prefix|>// repo: YanLi26/leetcode path: /36. Valid Sudoku...
code_fim
hard
{ "lang": "cpp", "repo": "YanLi26/leetcode", "path": "/36. Valid Sudoku.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: bluefishi/sun_codeshop path: /leetcode/isBanlanced.cpp //http://leetcode.com/onlinejudge#question_110 /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class ...
code_fim
medium
{ "lang": "cpp", "repo": "bluefishi/sun_codeshop", "path": "/leetcode/isBanlanced.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> return isBalanced(root, rh); } bool isBalanced(TreeNode* root, int& height) { if(root == NULL) { height = 0; return true; } int lh, rh; if(isBalanced(root->left, lh) == false) return false; if(isBalanced...
code_fim
medium
{ "lang": "cpp", "repo": "bluefishi/sun_codeshop", "path": "/leetcode/isBanlanced.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: wakeup5/Terraria path: /txtDataManager.cpp #include "StdAfx.h" #include "txtDataManager.h" txtDataManager::txtDataManager(void) { } txtDataManager::~txtDataManager(void) { } HRESULT txtDataManager::init(void) { return S_OK; } void txtDataManager::release(void) { } //���̺� void txtDataMana...
code_fim
hard
{ "lang": "cpp", "repo": "wakeup5/Terraria", "path": "/txtDataManager.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> //�ε� vector<string> txtDataManager::txtLoad(const char* loadFileName) { HANDLE file; char str[300]; DWORD read; memset(str, 0, 300); file = CreateFile(loadFileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ReadFile(file, str, 300, &read, NULL); CloseHandle(file); ret...
code_fim
hard
{ "lang": "cpp", "repo": "wakeup5/Terraria", "path": "/txtDataManager.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Meusesoft/Copying-Machine-3 path: /CopyingMachine3/Interface files/CopyToolbar.cpp #include "StdAfx.h" #include "CopyingMachineCore.h" #include "CopyToolbar.h" CCopyToolbar::CCopyToolbar(sGlobalInstances poGlobalInstances) : CToolbar(poGlobalInstances.oTrace) { //Copy the global instances ...
code_fim
hard
{ "lang": "cpp", "repo": "Meusesoft/Copying-Machine-3", "path": "/CopyingMachine3/Interface files/CopyToolbar.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> wsprintf(cItemText, L"%s", oScanningDevices[lIndex].cScanningDevice.c_str()); SendMessage(hScanComboBox, CB_ADDSTRING, 0, (LPARAM)cItemText); } //Select the default scanner wsprintf(cItemText, L"%s", sDefaultScanner.cScanningDevice.c_str()); if (SendMessage(hScanComboBox, CB_SELECTSTRING, -1...
code_fim
hard
{ "lang": "cpp", "repo": "Meusesoft/Copying-Machine-3", "path": "/CopyingMachine3/Interface files/CopyToolbar.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: davidchai21/leetcode-solutions path: /406 Queue Reconstruction by Height/QueueReconstructionByHeight.cpp class Solution { public: vector<pair<int, int>> reconstructQueue(vector<pair<int, int>>& people)<|fim_suffix|>st || (a.first==b.first && a.second<b.second);}); vector<pair<int,int...
code_fim
medium
{ "lang": "cpp", "repo": "davidchai21/leetcode-solutions", "path": "/406 Queue Reconstruction by Height/QueueReconstructionByHeight.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>to a:people) { res.insert(a.second+res.begin(),a); } return res; } };<|fim_prefix|>// repo: davidchai21/leetcode-solutions path: /406 Queue Reconstruction by Height/QueueReconstructionByHeight.cpp class Solution { public: vector<pair<int, int>> reconstructQueue(vector<...
code_fim
medium
{ "lang": "cpp", "repo": "davidchai21/leetcode-solutions", "path": "/406 Queue Reconstruction by Height/QueueReconstructionByHeight.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>const Dir3D& dir) : Tr3D(dir.x, dir.y, dir.z){}<|fim_prefix|>// repo: Nocturne-hub/IG path: /Src/Coord3D/Tr3D.cpp #include "Tr3D.h" Tr3D::Tr3D(float tx, float ty<|fim_middle|>, float tz) : TG3D() { mat[0][3] = tx; mat[1][3] = ty; mat[2][3] = tz; } Tr3D::Tr3D(
code_fim
medium
{ "lang": "cpp", "repo": "Nocturne-hub/IG", "path": "/Src/Coord3D/Tr3D.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Nocturne-hub/IG path: /Src/Coord3D/Tr3D.cpp #include "Tr3D.h" Tr3D::Tr3D(float tx, float ty<|fim_suffix|>const Dir3D& dir) : Tr3D(dir.x, dir.y, dir.z){}<|fim_middle|>, float tz) : TG3D() { mat[0][3] = tx; mat[1][3] = ty; mat[2][3] = tz; } Tr3D::Tr3D(
code_fim
medium
{ "lang": "cpp", "repo": "Nocturne-hub/IG", "path": "/Src/Coord3D/Tr3D.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: wxyz1234/database_project path: /RecordManageSystem/RecordManager.h #ifndef RECORD_MANAGER #define RECORD_MANAGER #include "../filesystem/utils/pagedef.h" #include "../filesystem/filesystem.h" #include "utils/PageLoc.h" #include "utils/Wei.h" #include "DType/DTypeSchema.h" #include "DType/DSchem...
code_fim
hard
{ "lang": "cpp", "repo": "wxyz1234/database_project", "path": "/RecordManageSystem/RecordManager.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> unsigned int tmp; tmp = pagebuf[1]; pagebuf[1] = pagebuf[1] & (pagebuf[1] - 1); tmp -= pagebuf[1]; k = Wei::BitConvInt(tmp); //��Ӧҳ����� memcpy(pagebuf + 2 + k * 64, buf, 256); pagebuf[0] += 1; fm->writePage(fileID, i, pagebuf, 0); //��һҳ���� filebuf[1] += 1; ...
code_fim
hard
{ "lang": "cpp", "repo": "wxyz1234/database_project", "path": "/RecordManageSystem/RecordManager.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> ros::init(argc,argv,"listener"); ros::NodeHandle n; ros::Subscriber sub=n.subscribe("filePub",1000,chatterCallback); ros::spin();//第一次操作 }<|fim_prefix|>// repo: Constantcurrent/hsy_demo path: /hsy_demo/hsy_demo/src/listener.cpp #include "stdio.h" #include "ros/ros.h" #include "std_msgs/St...
code_fim
medium
{ "lang": "cpp", "repo": "Constantcurrent/hsy_demo", "path": "/hsy_demo/hsy_demo/src/listener.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Constantcurrent/hsy_demo path: /hsy_demo/hsy_demo/src/listener.cpp #include "stdio.h" #include "ros/ros.h" #include "std_msgs/String.h" void chatterCallback(const std_msgs::String::ConstPtr& msg){ ROS_INFO("I got:[%s]",msg->data.c_str()); } <|fim_suffix|> ros::init(argc,argv,"listener"...
code_fim
easy
{ "lang": "cpp", "repo": "Constantcurrent/hsy_demo", "path": "/hsy_demo/hsy_demo/src/listener.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> cout << endl; // Get subtotal, tax, and total subTotal = Sale.GetSubtotal(); tax = Sale.GetTax(); total = Sale.GetTotal(); // Display subtotal, tax, and total cout << fixed << showpoint << setprecision(2); cout << "Subtotal: $ " << subTotal << endl; cout << "Tax: $ " << tax << endl;; ...
code_fim
hard
{ "lang": "cpp", "repo": "UULOVETEA/Object-Oriented-Programming-in-C-plus-plus", "path": "/Assignment07/Assignment07/Source.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: UULOVETEA/Object-Oriented-Programming-in-C-plus-plus path: /Assignment07/Assignment07/Source.cpp #include <iostream> #include <iomanip> #include "InventoryItem.h" #include "CashRegister.h" using namespace std; /********************************************************************** * Program Nam...
code_fim
hard
{ "lang": "cpp", "repo": "UULOVETEA/Object-Oriented-Programming-in-C-plus-plus", "path": "/Assignment07/Assignment07/Source.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // Validate the inventory of item is not being a negative value while (inventory[numSelected - 1].getUnits() < qtySelected) { cout << "Sorry. We do not have enough items." << endl; cout << "Please enter again: "; cin >> qtySelected; } // Update InventoryItem inventory[numSelected - 1...
code_fim
hard
{ "lang": "cpp", "repo": "UULOVETEA/Object-Oriented-Programming-in-C-plus-plus", "path": "/Assignment07/Assignment07/Source.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Ishaan29/fuzzy-chainsaw-algo path: /geeks/IES/valid_address.cpp #include <bits/stdc++.h> using namespace std; void c_p_c() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifndef ONLINE_JUDGE freopen("/Users/ishan/Desktop/fuzzy-chainsaw-algo/input.txt", "r", stdin); freopen...
code_fim
medium
{ "lang": "cpp", "repo": "Ishaan29/fuzzy-chainsaw-algo", "path": "/geeks/IES/valid_address.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> int fw_cnt = 0; for(int i = 0; i < s.length(); i++){ if(w_cnt == 3 && !w){ cout<<"."; w = true; } if(s[i] == 'w'){ w_cnt++; }else{ w_cnt = 0; } if(i+3 <= s.length()){ if(s[i] == 'c' && s[i+1...
code_fim
medium
{ "lang": "cpp", "repo": "Ishaan29/fuzzy-chainsaw-algo", "path": "/geeks/IES/valid_address.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> for (unsigned block = index >> BLOCK_SHIFT; 0U != block; --block) { pData = *reinterpret_cast<Ty* const*>(pData + BLOCK_LEN); if (NULL == pData) { break; } } if (NULL != pData) { pData = &...
code_fim
hard
{ "lang": "cpp", "repo": "GPUOpen-Tools/common_src_amdtbasetools", "path": "/Include/gtFragmentedVector.h", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> gtFragmentedVector_iterator operator++(int) { gtFragmentedVector_iterator tmp(*this); ++*this; return tmp; } friend bool operator==(const gtFragmentedVector_iterator& itLeft, const gtFragmentedVector_iterator& itRight) { return itLeft.m_index == itRight...
code_fim
hard
{ "lang": "cpp", "repo": "GPUOpen-Tools/common_src_amdtbasetools", "path": "/Include/gtFragmentedVector.h", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>void UnitAgent::execute() { std::vector<BattlePreview> data; std::vector<Unit>& m_enemies = m_blackboard.getEnemies(); if (m_enemies.size() > 0) { sf::Vector2f targetPos; int u = rand() % m_enemies.size(); targetPos = m_enemies.at(u).getLocation(); data = m_blackboard.getBattles(targetPos); ...
code_fim
medium
{ "lang": "cpp", "repo": "JohnCodd/Year-4-Project-C00208049", "path": "/UnitAgent.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: JohnCodd/Year-4-Project-C00208049 path: /UnitAgent.cpp #include "UnitAgent.h" UnitAgent::UnitAgent(Blackboard& b, sf::Vector2f v): m_blackboard(b), m_position(v) { } <|fim_suffix|> targetPos = m_enemies.at(u).getLocation(); data = m_blackboard.getBattles(targetPos); if (data.size() == 0...
code_fim
hard
{ "lang": "cpp", "repo": "JohnCodd/Year-4-Project-C00208049", "path": "/UnitAgent.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: SUTDNLP/ZPar path: /src/english/tokenizer/tokenizer.cpp /* * based on ldc tokenization rule * * author: jiangming liu * * */ #include <iostream> #include <string.h> #include <stdio.h> #include <fstream> using namespace std; class Node { public: char c; Node* next; Node(){ c = ' ...
code_fim
hard
{ "lang": "cpp", "repo": "SUTDNLP/ZPar", "path": "/src/english/tokenizer/tokenizer.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> Node *p = h; while(p){ Node *pn = p->next; if(pn == NULL || pn->c != '\"'){ p = p->next; continue; } // cout<<"p10"<<endl; Node *node; node = new Node(' '); p = insert(p,node); node = new Node('\''); p = insert(p,node); node = new Node('\''); p = insert(p,node); node = new N...
code_fim
hard
{ "lang": "cpp", "repo": "SUTDNLP/ZPar", "path": "/src/english/tokenizer/tokenizer.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> for(int i=0; i<27; i++) cout<<"*"; cout<<endl; cout<<"*"<<"\tSymbol Key:"<<right<<setw(8)<<"*"<<endl; cout<<"*"<<right<<setw(10)<<"Empty: "<<static_cast<char>(Empty) <<right<<setw(10)<<"Hit: "<<static_cast<char>(Hit)<<setw(4)<<"*"<<"\n" <<left<<"*"<<right<<setw(10)<<"Ship: "<...
code_fim
hard
{ "lang": "cpp", "repo": "ennbelle/CSC17B_Battleship_Group1", "path": "/Project_3_Battleship/View.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: ennbelle/CSC17B_Battleship_Group1 path: /Project_3_Battleship/View.cpp #include "View.h" #include "Constants.h" #include <iostream> #include <iomanip> View::View() { } void View::drawGrids(PlayerData *playerdata){ //Draw current player's Grid cout<<playerdata->getPlayerName()<<"'s Displ...
code_fim
hard
{ "lang": "cpp", "repo": "ennbelle/CSC17B_Battleship_Group1", "path": "/Project_3_Battleship/View.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: BenN2798/3DTerrainDemo path: /Source/Graphics2/SceneNode.h #pragma once #include "core.h" #include "DirectXCore.h" using namespace std; // Abstract base class for all nodes of the scene graph. // This scene graph implements the Composite Design Pattern <|fim_suffix|>typedef shared_...
code_fim
medium
{ "lang": "cpp", "repo": "BenN2798/3DTerrainDemo", "path": "/Source/Graphics2/SceneNode.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // Although only required in the composite class, these are provided // in order to simplify the code base. virtual void Add(SceneNodePointer node) {} virtual void Remove(SceneNodePointer node) {}; virtual wstring GetName() { return _name; } virtual SceneNodePointer Find(wstring name) { return ...
code_fim
hard
{ "lang": "cpp", "repo": "BenN2798/3DTerrainDemo", "path": "/Source/Graphics2/SceneNode.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: kazenojiyu/Cpp-SFML path: /More_or_Less/main.cpp #include <SFML/Window.hpp> #include <SFML/Graphics.hpp> #include <iostream> #include <string> #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ #include <cctype> class Game{ private: static const int width = 80...
code_fim
hard
{ "lang": "cpp", "repo": "kazenojiyu/Cpp-SFML", "path": "/More_or_Less/main.cpp", "mode": "psm", "license": "CC-BY-3.0", "source": "the-stack-v2" }
<|fim_suffix|> instruction2.setFont(font); instruction2.setString("Try to find this number :"); instruction2.setCharacterSize(20); instruction2.setColor(sf::Color::Green); sf::FloatRect instructionRect2 = instruction2.getLocalBounds(); instruction2.setOrigin(instructionRec...
code_fim
hard
{ "lang": "cpp", "repo": "kazenojiyu/Cpp-SFML", "path": "/More_or_Less/main.cpp", "mode": "spm", "license": "CC-BY-3.0", "source": "the-stack-v2" }
<|fim_prefix|>// repo: jmgdelgado/Arduino path: /emisor_Infrarrojos_2/emisor_Infrarrojos_2.ino // EMISOR INFRARROJO // Emisor infrarrojo // // La pata de la senial S hay que conectarla al pin digital D3 // en el cado del Arduino UNO, ver en los comentarios mas adelante // // Hay una funcion para cada marca de mando...
code_fim
hard
{ "lang": "cpp", "repo": "jmgdelgado/Arduino", "path": "/emisor_Infrarrojos_2/emisor_Infrarrojos_2.ino", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>void setup() { } // main program loop void loop() { // The transmitter sends in this example the signal A90 (hex. dezimal form) in the encoding "RC5" // It will be transmitted 3 times after that it will make a 5 second break for (int i = 0; i < 3; i++) { // irsend.sendRC5(0x...
code_fim
hard
{ "lang": "cpp", "repo": "jmgdelgado/Arduino", "path": "/emisor_Infrarrojos_2/emisor_Infrarrojos_2.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> // The transmitter sends in this example the signal A90 (hex. dezimal form) in the encoding "RC5" // It will be transmitted 3 times after that it will make a 5 second break for (int i = 0; i < 3; i++) { // irsend.sendRC5(0xA90, 12); // [0xA90] signal | [12] Bit-length signal (h...
code_fim
hard
{ "lang": "cpp", "repo": "jmgdelgado/Arduino", "path": "/emisor_Infrarrojos_2/emisor_Infrarrojos_2.ino", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> const TTEFSectionName& aSection) { TPtrC transactionName; if (GetStringFromConfig(aSection, KFldTransaction, transactionName)) { CSIPMessageElements* msgElems = NULL; CSIPClientTransaction* transaction = NULL; // Ignore return value 'cause default...
code_fim
hard
{ "lang": "cpp", "repo": "SymbianSource/oss.FCL.sftools.ana.compatanamdw", "path": "/apicompatanamdw/bcdrivers/mw/ipappprotocols/sip/sipclient/src/t_csipinvitedialogassoc.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: SymbianSource/oss.FCL.sftools.ana.compatanamdw path: /apicompatanamdw/bcdrivers/mw/ipappprotocols/sip/sipclient/src/t_csipinvitedialogassoc.cpp else { ERR_PRINTF2(KMissingParameter, &KFldFromHeader); SetBlockResult(EFail); ...
code_fim
hard
{ "lang": "cpp", "repo": "SymbianSource/oss.FCL.sftools.ana.compatanamdw", "path": "/apicompatanamdw/bcdrivers/mw/ipappprotocols/sip/sipclient/src/t_csipinvitedialogassoc.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: PHDaozhang/recharge_h5 path: /projectb/client/game_xxx/protocol/game_forestball_def.pb.h // Generated by the protocol buffer compiler. DO NOT EDIT! // source: game_forestball_def.proto #ifndef PROTOBUF_game_5fforestball_5fdef_2eproto__INCLUDED #define PROTOBUF_game_5fforestball_5fdef_2eproto__...
code_fim
hard
{ "lang": "cpp", "repo": "PHDaozhang/recharge_h5", "path": "/projectb/client/game_xxx/protocol/game_forestball_def.pb.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> enum e_server_msg_type { e_mst_start_c2l = 10000, e_mst_c2l_leave_room = 10002, e_mst_c2l_get_room_scene_info = 10003, e_mst_c2l_check_state = 10004, e_mst_c2l_add_bet = 10005, e_mst_c2l_repeat_bet = 10006, e_mst_c2l_game_control = 10022, e_mst_start_l2c = 15000, e_mst_l2c_leave_room_r...
code_fim
hard
{ "lang": "cpp", "repo": "PHDaozhang/recharge_h5", "path": "/projectb/client/game_xxx/protocol/game_forestball_def.pb.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|> private: Boeken boek; };<|fim_prefix|>// repo: Heamia/INOOP path: /INOOP_Les3Stack_v2/INOOP_Les3Stack_v2/Bibliotheek.h #pragma once #pragma once #include "Boeken.h" class Bibliotheek { public: Bibliotheek(); void toon(); <|fim_middle|> void voegToe(std::string type);
code_fim
easy
{ "lang": "cpp", "repo": "Heamia/INOOP", "path": "/INOOP_Les3Stack_v2/INOOP_Les3Stack_v2/Bibliotheek.h", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: Heamia/INOOP path: /INOOP_Les3Stack_v2/INOOP_Les3Stack_v2/Bibliotheek.h #pragma once #pragma once #include "Boeken.h" class Bibliotheek <|fim_suffix|>private: Boeken boek; };<|fim_middle|>{ public: Bibliotheek(); void toon(); void voegToe(std::string type);
code_fim
medium
{ "lang": "cpp", "repo": "Heamia/INOOP", "path": "/INOOP_Les3Stack_v2/INOOP_Les3Stack_v2/Bibliotheek.h", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>void Led::WakeUp() { GPIO_SetBits(GPIOA, GPIO_Pin_5); } int Led::Poll() { return 0; }<|fim_prefix|>// repo: HTheolin/Dinghy_old path: /D7039E och E7025E/Random stuff/Code/ARM/Dinghy/src/Led.cpp /* * Led.cpp * * Created on: 5 sep. 2016 * Author: Bjorn */ #include "Headers/Led.h" void Led::S...
code_fim
medium
{ "lang": "cpp", "repo": "HTheolin/Dinghy_old", "path": "/D7039E och E7025E/Random stuff/Code/ARM/Dinghy/src/Led.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_suffix|>void Led::Sleep() { GPIO_ResetBits(GPIOA, GPIO_Pin_5); } void Led::WakeUp() { GPIO_SetBits(GPIOA, GPIO_Pin_5); } int Led::Poll() { return 0; }<|fim_prefix|>// repo: HTheolin/Dinghy_old path: /D7039E och E7025E/Random stuff/Code/ARM/Dinghy/src/Led.cpp /* * Led.cpp * * Created on: 5 sep. 2016 * ...
code_fim
medium
{ "lang": "cpp", "repo": "HTheolin/Dinghy_old", "path": "/D7039E och E7025E/Random stuff/Code/ARM/Dinghy/src/Led.cpp", "mode": "spm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: HTheolin/Dinghy_old path: /D7039E och E7025E/Random stuff/Code/ARM/Dinghy/src/Led.cpp /* * Led.cpp * * Created on: 5 sep. 2016 * Author: Bjorn */ #include "Headers/Led.h" void Led::Startup() { RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); GPIO_InitTypeDef GPIO_InitDef; ...
code_fim
medium
{ "lang": "cpp", "repo": "HTheolin/Dinghy_old", "path": "/D7039E och E7025E/Random stuff/Code/ARM/Dinghy/src/Led.cpp", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }
<|fim_prefix|>// repo: moreal/JumpUp-Camp-2018 path: /PracticeCpp_03/05-misson_open_challenge.cc /* Copyright 2018 Moreal */ #include <iostream> #include <string> #include <memory> enum PRODUCT_TYPES { BOOK = 1, MUSICCD = 2, CONVERSATIONBOOK = 3 }; enum COMMANDS { ADD_PRODUCT = 1, VIEW_ALL_PRODUCTS = 2, EXIT = ...
code_fim
hard
{ "lang": "cpp", "repo": "moreal/JumpUp-Camp-2018", "path": "/PracticeCpp_03/05-misson_open_challenge.cc", "mode": "psm", "license": "unknown", "source": "the-stack-v2" }