blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
117
path
stringlengths
3
268
src_encoding
stringclasses
34 values
length_bytes
int64
6
4.23M
score
float64
2.52
5.19
int_score
int64
3
5
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
text
stringlengths
13
4.23M
download_success
bool
1 class
f154a073c180e868190f520031173547190d63b5
C++
noagol/interpreter
/expressions/Var.cpp
UTF-8
275
2.796875
3
[]
no_license
#include "Var.h" /** * Base class to var * @param n - number * @param st - symbol table */ Var::Var(const string &n, SymbolTable *st) : name(n), symbolTable(st) {} /** * * @return the the value of var */ double Var::calculate() { return symbolTable->get(name); }
true
2574a659ab0a2fabd7b1a81c31a67c9f8429d76a
C++
AndreFWeber/ProtocoloDeAplicacao
/simu_velha.cc
UTF-8
2,350
2.921875
3
[]
no_license
#include "proto_aplicacao.h" #include <limits> int main() { proto_aplicacao protocolo(8000); protocolo.initialize(false, "191.36.10.178", "PeDeCabra", false); /* USA SE FOR SERVIDOR cout << "Jogo da Velha\n"; cout << "Vez do jogador 1 (X): "; // cin >> escolhe; int escolhe=0; while (!(cin >> escolhe...
true
14bd0ea740b5528636efc1226b1bf7fb9725ce5c
C++
VitorHKato/2DGameC-
/Terreno.cpp
UTF-8
216
2.53125
3
[]
no_license
#include "Terreno.h" Terreno::Terreno(int x, int y, bool wall) : Entidade(x, y) { } Terreno::~Terreno() { } void Terreno::setWall(bool wall) { this->wall = wall; } bool Terreno::getWall() { return wall; }
true
d041dce48711bf6cf3bfb4157855e6bb269fb6e6
C++
JiangKevin/FishEngine
/Engine/Source/FishEditor/UI/UIColor.hpp
UTF-8
483
2.578125
3
[ "MIT" ]
permissive
#ifndef UICOLOR_HPP #define UICOLOR_HPP #include <QWidget> namespace Ui { class UIColor; } class UIColor : public QWidget { Q_OBJECT public: explicit UIColor(std::string const & label, QColor const & value, QWidget *parent = 0); ~UIColor(); bool CheckUpdate(std::string const & label, QColor & value); private ...
true
8ffcafb8480c449eb4a813756d4149309082e761
C++
zimingwei/leetcode
/3sum.cpp
UTF-8
1,260
3.140625
3
[]
no_license
class Solution { public: // Time: O(n^2) // Space: O(1) vector<vector<int> > threeSum(vector<int> &num) { vector<vector<int> > result; sort(num.begin(), num.end()); int target = 0; int size = num.size(); for (int i = 0; i < size-2 ; i++) { if (i !...
true
7fd0707a48916025fbd5fb2d94e52dcd854ba87a
C++
KoheiHisatsune/cpp_ezoe
/chapter3/iostream/iotest.cpp
UTF-8
195
2.71875
3
[]
no_license
#include "all.h" int main() { std::cout << "Integer : "s << 3 + 5 << " "s << 3 - 5 << " "s << 3 * 5 << " "s << 3 / 5 << " "s << 3 % 5 << "\n"s << "Floating Point : "s << 3.14 << "\n"s; }
true
091e5781e707e05639592661c323ca41bd1b5806
C++
bell0136/TIL
/C23/StructOperation.cpp
UHC
336
3.34375
3
[]
no_license
#include <stdio.h> struct point { int xpos; int ypos; }; int main() { struct point pos1 = {1,2}; struct point pos2; pos2 = pos1; printf("%d\n", sizeof(pos1)); //sizeof(pos1) ڷ* 8=4*2 printf("[%d %d]\n", pos1.xpos, pos1.ypos); printf("%d\n", sizeof(pos2)); printf("[%d %d]\n", pos2.xpos, pos2.ypos); }
true
6f446ccb77939e05d2843719b7f1f45bd1c35712
C++
danhrubec/Academic-Projects
/CS 251/Labs/Lab 6/test.cpp
UTF-8
4,027
3.21875
3
[]
no_license
/*test.cpp*/ // // An AVL unit test based on Catch framework // #include <iostream> #include <vector> #include <string> #include "avl.h" #define CATCH_CONFIG_MAIN #include "catch.hpp" using namespace std; TEST_CASE("(1) AVL tree with 4 nodes") { avltree<int, int> avl; // // build a simple BST tree with 4...
true
7d4f4f34731f253753f728d3011846c597f0a916
C++
vyalich/Course_Nosov
/CourseNosov/Game.cpp
WINDOWS-1251
6,813
2.53125
3
[]
no_license
#include "Game.h" bool Compare(Entity* A, Entity* B) { return A->y < B->y; } //------------------------- int Game::Init() { // if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, u8"", u8" SDL2. .", NULL); SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, u8" SDL 2, : %s...
true
9e81d02195b8feabb1edd60b6d03f0a85f7edf3a
C++
aisenn/CPP_Piscine
/d01/ex05/Human.hpp
UTF-8
263
2.625
3
[]
no_license
#ifndef HUMAN_HPP # define HUMAN_HPP #include "Brain.hpp" #include <string> class Human { private: const Brain _brain; public: Human( void ); ~Human( void ); std::string identify( void ) const; const Brain &getBrain() const; }; #endif //HUMAN_HPP
true
92126b9935c2a76ae1cdc670cb093090211440ae
C++
Nuytemans-Dieter/CarGame
/cpp/Factories/SDL/SDLTextOverlay.cpp
UTF-8
1,750
2.859375
3
[]
no_license
#include "../../../Headers/Factories/SDL/SDLTextOverlay.h" SDLTextOverlay::SDLTextOverlay(SDLRenderer* rend) { start(rend, 30); } SDLTextOverlay::SDLTextOverlay(SDLRenderer * rend, int height) { start(rend, height); } void SDLTextOverlay::start(SDLRenderer* rend, int height) { renderer = rend; fo...
true
4003fc3dc5001175c3f93b7b56b8645e36327b02
C++
AnnalisaRapthap/Lab-2
/answer7.cpp
UTF-8
220
2.953125
3
[]
no_license
#include <iostream> #include <math.h> using namespace std; int main() { float a,b,c; cout << "Enter two angles of a triangle="<< endl; cin >> a; cin >> b; c=180-(a+b); cout << "The third angle=" << c; return 0; }
true
f6de41f7d9d1bc716382c90e9f1a0943103f3a81
C++
EmileRomon/SFMetroid
/src/Zoomer.cpp
UTF-8
1,676
2.59375
3
[]
no_license
#include "Zoomer.hpp" Zoomer::Zoomer(const sf::Texture &texture, const sf::Vector2f &position, const float limitRange) : bodySprite(sf::seconds(0.5f)), collisionBounds(0.f, 0.f, 16.f, 16.f), ...
true
f2eb294681c08187b66649aa00a8617a9b1c8486
C++
Kkoding/Practice_Algorithm
/code/practice_algorithm/practice_algorithm/10Gray code.cpp
WINDOWS-1252
940
3.390625
3
[]
no_license
/* Write a program that displays the normal binary representations, Gray code representations, and decoded Gray code values for all 5-bit numbers. */ #include <iostream> #include <vector> using namespace std; int main() { int n = 15; //0000 0101 vector<int> v; vector<int> gray_answer; vector<int> originla_ans...
true
490eaa1fdd06735e50460f7a06da89c6143a8376
C++
turshp/Programming_Language
/The_C_PL/OJ_回文串的判断/OJ_回文串的判断/源.cpp
UTF-8
1,206
2.828125
3
[]
no_license
//#include<stdio.h> //#include<string.h> //int main() { // int i, j; // char s1[22], s2[22], s3[22]; // int a, b, c; // while (scanf("%s", s1) != EOF) { // a = strlen(s1); // /*if (a == 1) { // printf("YES\n"); // break; // } // else if (a % 2 == 0 && a != 1) { // b = a / 2; // for (i = 0; i < b; i++) { // ...
true
d1d16f059e2318d315555bff7b01c5231c425287
C++
Yurazast/StringList
/string_list.cpp
UTF-8
4,810
3.515625
4
[]
no_license
#include "string_list.h" void SwapStrings(char** a, char** b); void SelectionSort(char** list); void StringListInit(char*** list) { if (list == NULL) { puts("Passed NULL instead of address of the list to be initialized"); return; } if (*list != NULL) { puts("String list is already initialized"); return;...
true
5db88c214a63b4c6816aa928d4318dadf879b693
C++
emaldonadogamedev/MeshRenderer_Lite
/MeshRenderer_Lite_Framework/MeshRenderer_Lite_Framework/Src/Systems/Graphics/Components/SimpleCloth/SimpleClothComponent.cpp
UTF-8
8,581
2.625
3
[]
no_license
#include <Utilities/precompiled.h> #include <Systems/Graphics/Components/SimpleCloth/SimpleClothComponent.h> #include <Systems/Input/InputSystem.h> #include <Systems/Input/Keyboard.h>h #include <Systems/Graphics/DX11Renderer/DX11Renderer.h> #include <Systems/Graphics/GraphicsUtilities/VertexTypes.h> using namespace ...
true
4f7bd9cb1ac1be1fa8984ef4cbcc6030a822841e
C++
VoidClient/WindowsNT-Handle-Scanner
/OpenProcess/OpenProcess.cpp
UTF-8
1,010
3.140625
3
[]
no_license
// OpenProcess.cpp : Defines the entry point for the console application. // #include <Windows.h> #include <TlHelp32.h> #include <string> DWORD FindProcessId(const std::wstring processName) { PROCESSENTRY32 processInfo; processInfo.dwSize = sizeof(processInfo); HANDLE processSnapshot = CreateToolhelp32Snapshot(TH...
true
a58637afba82a3efce711cc3784c3edac70e973c
C++
pierfale/Cliff
/include/cliff/shared/HashString.h
UTF-8
3,392
3.109375
3
[]
no_license
#ifndef _CLIFF_HASH_STRING_H #define _CLIFF_HASH_STRING_H #include <cstring> namespace cliff { typedef unsigned int Hash; class HashGenerator { public: static constexpr Hash base_offset = 2166136261; static constexpr Hash prime_number = 16777619; static constexpr Hash execute(const char* str) { retur...
true
b633be201e2a3f915f8af0c65add3a6bbf416862
C++
hamote505/ESP8266-FastLED
/mqtt-sine/mqtt-sine.ino
UTF-8
12,909
2.640625
3
[]
no_license
/* mqtt-sine * * By: Andrew Tuline * * Date: January, 2017 * * Update: July, 2019 (MQTT Update) * * What can you do with a sine wave? LOTS!! * * Forget using delay() statements or counting pixels up and down the strand of LED's. That's for chumps. * This example demonstrates just a bit of what can be done...
true
a5fa8b6a072efe7ba7279167074d7518e76de267
C++
ShiliXu1997/ACM_Code
/ACM-ICPC_2017_Asia_Urumqi/G.cpp
UTF-8
2,400
3
3
[]
no_license
//****************************************************************************** // File Name: G.cpp // Author: Shili_Xu // E-Mail: shili_xu@qq.com // Created Time: 2018年07月29日 星期日 13时00分34秒 //****************************************************************************** #include <cstdio> #include <cstring> #include <...
true
6d286ecb1fb5bb42505d52cb0d8eef7392963480
C++
LexaHoods/Ultimate-Community-Finder
/Ultimate-Community-Finder/Graph.cpp
UTF-8
2,409
3.171875
3
[]
no_license
#include "Graph.h" #include <iostream> #include<time.h> using namespace std; //Basic functions int Graph::degree(int v) { return vertices[v].size(); } vector<int> Graph::neighbours(int v) { return vertices[v]; } //Random generation functions void Graph::random(int nVertices, float p) { v = nVertices; /...
true
b6fd38e6a2c2937bcbc0845f368be09179daef80
C++
ryujt/ryulib-arduino
/libraries/RyuLib/Examples/Chapter 07. Game/_05._RyuGame Library/_01._RyuGame_Tutorial/Basic_09/Basic_09.ino
UTF-8
967
2.625
3
[]
no_license
#include <RyuGame.h> #include <cheetah.h> int pin_fire = 12; class Cheetah : public GameControlBase { private: int _TickCount = 0; int _Index = 0; public: void start() { x = (84 - CHEETAH_WIDTH ) / 2; y = (48 - CHEETAH_HEIGHT) / 2; } void update(unsigned long tick) { _LCD->drawBitmap(x, y...
true
14a9d5435bc0480e1e527ae3d9be49929bcf9db6
C++
Gowtham-369/InterviewBitMasterSolutions
/BackTracking/Generate_all_parenthesis.cpp
UTF-8
743
3.171875
3
[]
no_license
void solve(int open, int closed, int n, string temp, vector<string> &ans) { if (open == n && closed == n) { ans.push_back(temp); return; } if (open < n) { temp.push_back('('); solve(open + 1, closed, n, temp, ans); temp.pop_back(); if (closed < open) ...
true
36c5f5061012d280375811601184b3b8df24f1fa
C++
MDE4CPP/MDE4CPP
/src/examples/benchmarks/UMLBenchmark/src/UMLBenchmark/main.cpp
UTF-8
2,594
2.578125
3
[ "EPL-1.0", "MIT" ]
permissive
#include <chrono> #include <iostream> #include <string> #include <sstream> #include <stdio.h> #include <stdlib.h> #include "abstractDataTypes/SubsetUnion.hpp" #include "uml/umlFactory.hpp" #include "uml/umlPackage.hpp" #include "uml/Package.hpp" #include "uml/Class.hpp" #include "uml/Property.hpp" #include "umlReflect...
true
ce38e73bbcf7226fce2d8b84b30b5388ca8576d3
C++
SigridHo/CodingEx
/paint/paint/paint.cpp
UTF-8
1,695
2.578125
3
[]
no_license
#include <iostream> #include <cstring> #include <string> #include <cstdio> using namespace std; char init[18][18] = {0}; int mid[18][18] = {0}; int answer[18][18] = {0}; int a[18] = {0}; int MIN = 10000; int binary[18] = {0}; void change(int n); void firststate(int n) { for(int i = 0; i < binary[n]; ++ i) { int t...
true
cd0ed06ac950d6ced2de19d8b8deb176f8e988eb
C++
yusuke-matsunaga/minimaleda
/libraries/libym_cec/FraigSig.h
UTF-8
8,485
2.734375
3
[]
no_license
#ifndef LIBYM_AIG_FRAIGSIG_H #define LIBYM_AIG_FRAIGSIG_H /// @file libym_aig/FraigSig.h /// @brief FraigSig のヘッダファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// $Id: FraigSig.h 2203 2009-04-16 05:04:40Z matsunaga $ /// /// Copyright (C) 2005-2010 Yusuke Matsunaga /// All rights reserved. #include "ym_aig/aig_nsde...
true
69784ba191b59737c8ea0a772c6734ab67d57df9
C++
jeffreypersons/CS153-Compilers
/Materials/C++ Code/CH16/wci/backend/compiler/generators/CompoundGenerator.h
UTF-8
1,111
2.609375
3
[]
no_license
/** * <h1>CompoundGenerator</h1> * * <p>Generate code for a compound statement.</p> * * <p>Copyright (c) 2017 by Ronald Mak</p> * <p>For instructional purposes only. No warranties.</p> */ #ifndef COMPOUNDGENERATOR_H_ #define COMPOUNDGENERATOR_H_ #include <string> #include "StatementGenerator.h" #include "../Co...
true
83673f3bc9d8e018b56d8e9207863529a6ef8493
C++
qooldeel/adonis
/sparse/gprime.cc
UTF-8
7,113
2.53125
3
[]
no_license
#include <iostream> #include <vector> #include <set> #include <cassert> #include <string> /** * \brief Compute G' = aI - bhS' * This is only for square matrices. Actually, the sizes of the sparsity * patterns for both the Jacobian S' and G' are equal; the only difference lies in the fact * that G' posseses non-vanish...
true
7d9d7c194ecd80ec0c4a7dd7b246e2cc7e3ea1b1
C++
developer0hye/Algo-0hye
/problems/11048_이동하기/boj_11048.cpp
UTF-8
952
2.890625
3
[]
no_license
#include <iostream> #include <queue> #include <vector> using namespace std; int main() { int N, M; cin >> N >> M; vector<vector<int>> candy_maze(N + 1, vector<int>(M+1)); vector<vector<int>> dp_table(N + 1, vector<int>(M+1)); for(int n = 1; n <= N; n++) for(int m = 1; m <= M; m++) ...
true
b8eb12da8136738e39934a62bab96a94db2820b2
C++
Himura2la/Arduino
/TSL2561/TSL2561.ino
UTF-8
1,538
2.59375
3
[]
no_license
/* SFE_TSL2561 !!! 3V3 !!! SDA -> A4 SCL -> A5 For more information see the hookup guide at: */ #include <SFE_TSL2561.h> #include <Wire.h> SFE_TSL2561 light; boolean gain = 0; //0 = X1, 1 = X16; // If time = 0, integration will be 13.7ms // If time = 1, integration will be 101ms // If time = 2, integration will ...
true
6852e533cbafd55f9524408cba69fca9bfcc663b
C++
sunset1995/ACM_ICPC_prac
/ACM-ICPC/Tehran2014/B.cpp
UTF-8
1,175
2.953125
3
[]
no_license
#include <cstdio> using namespace std; long long dis2(long long r1, long long g1, long long b1, long long r2, long long g2, long long b2) { long long r = r1 - r2; long long g = g1 - g2; long long b = b1 - b2; return r*r + g*g + b*b; } int main() { const char colorName[16][20] = { "White", "Silver", "Gr...
true
5e5c34e2ba845f02825cdb0706eda06a870ba766
C++
IslamAhmed1092/PaintForKids
/Actions/SelectAction.cpp
UTF-8
1,379
2.609375
3
[]
no_license
#include "SelectAction.h" #include "..\ApplicationManager.h" #include "..\GUI\input.h" #include "..\GUI\Output.h" SelectAction::SelectAction(ApplicationManager *pApp):Action(pApp) { } void SelectAction::ReadActionParameters() { Output* pOut = pManager->GetOutput(); Input* pIn = pManager->GetInput(); pOut->Prin...
true
e5bcfe73bfc106c45810d8553081e223f1f5d6fe
C++
xiaoguozhi/The-Cpp-Workshop
/Chapter10/Chapter10_Examples_Test.cpp
UTF-8
2,045
3.328125
3
[ "MIT" ]
permissive
//Chapter 10 : Example 1 #include "pch.h" #include <iostream> #include <memory> #include "gtest/gtest.h" using namespace std; std::ostringstream out; class MyBaseClass { public: virtual void PrintMessage() { out << "Hello "; } }; class MyDerivedClass : public MyBaseClass { public: void PrintMessage() overrid...
true
5206b4e25bd155a39a0988b6c2537eb97cbf6046
C++
SemyonTelegin/LABAS
/Laba7.cpp
UTF-8
2,162
3.515625
4
[]
no_license
#include <stdio.h> #include <malloc.h> int** allocate_matrix(int height, int width); void print_matrix(int** matrix, int height, int width); void input_matrix(int** matrix, int height, int width); void free_RAM(int** M, int height, int width); void exchange_valules(int* x, int* y); void sort(int** M, int heigh...
true
2803425fdb5fa947d0372d2afe614b24cd35fda5
C++
mitDarkMomo/bancor
/src/bancor.cpp
UTF-8
15,501
2.71875
3
[]
no_license
#include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> #include <eosiolib/asset.hpp> #include <eosiolib/action.hpp> #include <eosiolib/symbol.hpp> #include <math.h> #include <eosio.token/eosio.token.hpp> using namespace eosio; using namespace std; class [[eosio::contract]] bancor : public eosio::contract { ...
true
8f47e1baa9541b6dccd9c5499024cc5109b0ee40
C++
trunghai95/MyCPCodes
/Kattis/digitsum.cpp
UTF-8
608
3.046875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll sumofdigits(ll n) { if (n < 10) return n; return sumofdigits(n/10) + (n%10); } ll digitsum(ll n) { if (n < 10) return (n * (n + 1) / 2); ll res = (n/10) * 45 + digitsum(n % 10); res += ((n % 10) + 1) * sumofdigits(n/...
true
cd7a7ae6f2524082aae4b1c0cae2924c8630b278
C++
azureitstepkharkov/33pr11gitserver
/Exam/Работы_для_проверки/Evgeniy Vanyan/Adress/Adress/AdressInfo.h
UTF-8
567
3.125
3
[]
no_license
#pragma once #include <string> using namespace std; class AdressInfo { private: AdressInfo(const AdressInfo& obj) {}; protected: string city; string street; string home_number; int office_number; public: AdressInfo() {}; AdressInfo(string city, string street, string home_number, int office_number); friend ...
true
eaeeba9e9ed8fcc85e65693654d936f2a1a5f062
C++
mohitjaisal/Competitive-Programing-Submissions
/atcoder/abc167/B.cpp
UTF-8
560
2.953125
3
[ "Apache-2.0" ]
permissive
#include <bits/stdc++.h> using namespace std; int main() { // input 1 ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); // definign variables int a, b, c, k; // input in variables cin >> a >> b >> c >> k; // logical execution int sum = 0; for (int i = 0; ...
true
59507bde40b8d95963e99a7e8e659799073a4698
C++
Aniganesh/100daysofcode
/Sum_Primes.cpp
UTF-8
878
2.78125
3
[]
no_license
// https://www.hackerearth.com/practice/math/number-theory/basic-number-theory-2/practice-problems/algorithm/sum-of-primes-7/ // 20-05-2020 Medium #include<bits/stdc++.h> #define MOD % 1000000007 typedef long long ll; using namespace std; int main(){ vector<bool> isPrime(9999999, true); vector<ll> sumPrimes(9...
true
20b19c75535f888ae230162736434aaa3e08193d
C++
dreamJarvis/Problem_Solving
/string/test.cpp
UTF-8
2,449
3.1875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; // longest common subsequences // recursive solution int lcs(string str1, string str2){ if(str1.length()==0 || str2.length()==0) return 0; char ch1 = str1[0]; char ch2 = str2[0]; int count = 0; if(ch1 == ch2) count = lcs(str1.substr(1), str2.s...
true
ce4f728a0925b196c28d271994695d74cedb3be2
C++
sakshamsomani2345/c-plus-plus-practice
/c++/cinget.cpp
UTF-8
436
2.859375
3
[]
no_license
#include<iostream> using namespace std; int main(){ char c; int a=0; int b=0; c=cin.get(); int node=0; while(c!='$'){ if(c>='a' && c<='z'){ a++; } if(c>='0' && c<='9'){ b++; } else if (c== ' ' || c =='\n' || c == '\t') ...
true
79cc198ecd812e72e67d16fb534aee8a9848e968
C++
caseycelestin/cpsc427_hw_1
/geocoord.cpp
UTF-8
1,020
3.421875
3
[]
no_license
#include "geocoord.hpp" #include <cmath> #include <string> #include <sstream> using std::string; using std::istringstream; using std::acos; using std::cos; using std::sin; namespace geocoord { Coordinate::Coordinate() { lat = 0.0; lon = 0.0; } Coordinate::Coordinate(string x, string y) { lat = coordinat...
true
801491f412a115196ed959e470c8eb3148e987a6
C++
nfarnesi4/BertSummerCamp2015
/BertCampRobot/examples/summerCamp2015MainCode/summerCamp2015MainCode.ino
UTF-8
1,670
3.0625
3
[]
no_license
/* This is the code for the 2015 Bishop Eustace Robotics Summer camp. */ //libs: #include <RedBot.h> #include <NewPing.h> //IR Sensors vars: //create the variables for which pins the left and right ir sensors //are wired too. const unsigned int kLeftIRPin = 9; const unsigned int kRightIRPin = 10; //Driving vars: ...
true
35de0ff895d49e76f896af11f3c99656172f27e0
C++
cms-externals/coral
/MySQLAccess/tests/NIPP/nipp.cpp
UTF-8
1,242
2.75
3
[]
no_license
#include "../../src/NamedInputParametersParser.h" #include <string> #include <iostream> int main( int, char** ) { try { std::string input1( "UPDATE COOL_SVEN.\"COOLTEST_NODES_SEQ\" SET \"CURRENT_VALUE\"=:\"newvalue\", \"LASTMOD_DATE\"=DATE_FORMAT(now(),'%Y-%m-% d_%H:%i:%s.000000000 GMT')" ); std::string i...
true
5452c1b3705c72f0136c7ae572730c39e2dfa24e
C++
oubine/algorithme_trie
/NF16/NF16TP4P18-master/tp4.cpp
UTF-8
4,112
3.453125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include "tp4.h" T_Arbre initABR(){ T_Arbre abr = malloc(sizeof (T_Noeud)); abr=NULL; return abr; } T_Noeud* creerNoeud(int cle){ T_Noeud* noeud = malloc(sizeof (T_Noeud)); noeud->cle=cle; noeud->nb_occurrence=1; noeud->droite=NULL; noeud->gauche...
true
94400682b1fa6c85a9ab0bb2b96a7e3d5d05bd48
C++
berryzplus/githubpr
/src/generic.cpp
UTF-8
3,986
2.765625
3
[ "MIT" ]
permissive
#include "StdAfx.h" #include "generic.h" // get environment variable. std::wstring getEnvStr(_In_z_ LPCWSTR pszVarName) { size_t requiredSize = 0; ::_wgetenv_s(&requiredSize, NULL, 0, pszVarName); if (0 < requiredSize) { std::wstring varStr(requiredSize - 1, '\0'); ::_wgetenv_s(&requiredSize, &*varStr.begin()...
true
7b8ea143f29995d8ddfe0f9fa9cc1ed028c483b8
C++
ddltger/DDLTG
/Common/DDLTGFont/src/DDLTGFaceCollection.cpp
UTF-8
1,364
2.671875
3
[ "MIT" ]
permissive
#include "DDLTGFaceCollection.h" namespace Ddltg { FaceCollection LoadFaces(FT_Library ft, const vector<string> &face_names) { FaceCollection faces; for (auto &face_name : face_names) { FT_Face face; if (FT_New_Face(ft, face_name.c_str(), 0, &face)) { fprintf(stderr, "Could not load font\n"); ...
true
6150e9fe237e6f6165baa8cef09200a85595fee6
C++
sdustlug/OpenJudge
/QuestionAns/wfb/1359.cc
UTF-8
1,139
2.859375
3
[]
no_license
#include <iostream> #include <deque> using namespace std; int main() { ios::sync_with_stdio(false); deque<string> D; int n; int op; string ch; cin>>n; while(n--) { cin>>op; if(op == 1) { cin>>ch; D.push_front(ch); }else if(op ...
true
7b1a590f8a4f0bae02b9efa41d3a38af709b84a2
C++
mkassjanski/c-
/4.cpp
UTF-8
255
3.046875
3
[]
no_license
#include <iostream> using namespace std; int main(){ string haslo; cout << "Podaj hasło" << endl; cin >> haslo; if(haslo == "Jakub"){ cout << "Haslo poprawne" << endl; } else{ cout << "Hasło niepoprawne!" << endl; } return 0; }
true
54efee3faa5c05aecf695779e8ad518ac828ca37
C++
Saunak626/HUAWEI-CODE
/华为上机/字符串替代aaa.cpp
GB18030
1,645
3.15625
3
[]
no_license
#include <iostream> #include <string> using namespace std; //ܳ3 void convert(char *input,char *output) { char *p=output; int len = strlen(input); int i=0; int count=1; for(int j=i+1;j<=len;) { while(input[i]==input[j]) { count++; j++; } if(co...
true
47cbbbd6ccd1acdb61f1dc3b14c52921d0af2d63
C++
beatabb/My_University
/Semester_3/ProjectOK/jobshopd/jobshop.cpp
UTF-8
9,464
3.046875
3
[ "MIT" ]
permissive
#include <iostream> #include <fstream> #include <vector> #include <string> #include <limits> #include <chrono> #include <ctime> #include <algorithm> #include <cstdlib> using namespace std; #define NR 10 string fileName; int max (int a, int b) { return a > b ? a : b; } struct Instance { int jobs, machines, ...
true
02fff51cf4a9a478e5dbcedba6a7bc8c540efe3c
C++
ElijahWandimi/SchoolWork
/C++/Evans/main.cpp
UTF-8
336
2.734375
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main(){ int numberOfStudent; string courseName; string units[8]; cout<<("Enter course name: ")<<endl; cin>>courseName; cout<<("Enter number of students: ")<<endl; cin>>numberOfStudent; for(int i=0; i<=8;i++) { cout<<"Enter units"<<endl; cin>>units[i]; } r...
true
139f647567d4264c1090afd25385a408e2b47fec
C++
megakoko/m-system
/src/therapeutist/examcontainer.h
UTF-8
2,311
2.65625
3
[]
no_license
#pragma once #include "examwidget.h" class QLabel; class QGridLayout; class ExaminationEditWidget; /* Контейнер для других ExamWidget'ов. */ class ExamContainer : public ExamWidget { Q_OBJECT public: ExamContainer(const int examId, const QString& textid, const bool topLevel = false); void setExaminationEditWi...
true
641627b1cdc4d60771a11ae7beb400249a29df14
C++
HSchmale16/KneeThingy
/implementation.cpp
UTF-8
4,661
2.921875
3
[]
no_license
/** Implementation.cpp * @author Henry J Schmale * @date January 25, 2015 * Contains the implementation of functions defined in default.h */ #include <cstdlib> #include <unistd.h> #include <sqlite3.h> #include <ctime> #include <cstdio> #include "default.h" // Externs declared in header are here BMA180Acceleromete...
true
e1d225db310e1cdc091ca941c16a2cd3df837c15
C++
psettle/sudoku
/src/sdk/rules/ExclusiveTupleRule.cpp
UTF-8
2,434
3.140625
3
[ "MIT" ]
permissive
/** * ExclusiveTupleRule.hpp - Exclusive Tuple Rule * * If N cells consist of N possible digits, those digits cannot exist * in any other cells */ #include "sdk/rules/ExclusiveTupleRule.hpp" using namespace sdk::rules; using ::sdk::data::Cell; using ::sdk::data::Collection; using ::sdk::data::Digit; /** * Colle...
true
d79bc263dd4c0ebb2ee1750b5246d5ef47f4dc19
C++
Game-Tek/Game-Tek-Standard-Library
/GTSL/Thread.hpp
UTF-8
4,066
2.625
3
[ "MIT" ]
permissive
#pragma once #include "Core.h" #include "Delegate.hpp" #include "Tuple.hpp" #include "Algorithm.hpp" #if (_WIN64) #include <Windows.h> #undef ERROR #elif __linux__ #include <pthread.h> #endif namespace GTSL { class Thread { public: Thread() = default; template<class ALLOCATOR, typename T, typename... ARGS...
true
12f415d29d1f4f5a7390b03cd6ed75d5f40a0d3d
C++
Javi96/EDA
/Práctica 1/Racional.h
UTF-8
1,686
3.53125
4
[]
no_license
#ifndef _RACIONAL_H #define _RACIONAL_H #include <iostream> #include <string> using namespace std; class Racional { public: //Excepcion que se lanza cuando se trata de crear //una fraccion con denominador 0 class EDenominadorCero {}; //Excepcion que se lanza cuando se produce una division //por...
true
ecfcb4fd190efcd04ec1724e5b2f584ca374c779
C++
msrLi/portingSources
/ACE/ACE_wrappers/protocols/ace/TMCast/Protocol.hpp
UTF-8
1,897
2.53125
3
[ "Apache-2.0" ]
permissive
// author : Boris Kolpackov <boris@dre.vanderbilt.edu> #ifndef TMCAST_PROTOCOL_HPP #define TMCAST_PROTOCOL_HPP namespace ACE_TMCast { namespace Protocol { unsigned long const MEMBER_ID_LENGTH = 38; struct MemberId { char id[MEMBER_ID_LENGTH]; /* unsigned long ip; unsig...
true
b08a17dda4f0fb717e48eeb863633eed9c877519
C++
jalesnunes/cs235
/Insertion Sort/Insertion Sort/src/node.h
UTF-8
4,430
3.671875
4
[]
no_license
/*********************************************************************** * Program: * Assignment 06, Linked List * Brother Kirby, CS 235 * Author: * Jales Nunes, Davi Neves * Summary: * This program defines the Class Node. ************************************************************************/ #ifndef NO...
true
14eb861301cd4528325cc7d053b7a76023d28768
C++
brandonl/Flow
/src/Core/ShaderSource.h
UTF-8
432
2.703125
3
[]
no_license
#ifndef __SHADER_SOURCE_H__ #define __SHADER_SOURCE_H__ #include "Resource.h" #include <memory> namespace flow { class ShaderSource : public Resource { public: ShaderSource( const std::string& fn ); ShaderSource& operator=( ShaderSource&& m ); const std::string& getSource() const; private: std:...
true
89f8f25a807780ba5886da1a455b6c33783a5e0a
C++
Draf09/TP3OrgArq
/OperadorBits.cpp
UTF-8
1,084
3.5
4
[]
no_license
#include <string> using namespace std; class OperadorBits { public: //move os N primeiros bits de entrada para o parâmetro de saída (remove esses bits do binário de entrada) static void ExtrairBinario(string &binario_entrada, string &binario_saida, int numero_bits) { string buffer; for(char i : binario_entra...
true
68c737960b2dcc7f625f46f7f16a651de64ad743
C++
saumitrabajpai98/DSA-Cpp-
/lnkdlstinsbeg.cpp
UTF-8
592
3.453125
3
[]
no_license
#include<iostream> using namespace std; class node{ public: int data; node *next; }; node *head; void innsatbeg(int x) { node *temp=new node(); temp->data=x; temp->next=head; head=temp; } void print() { node *temp2=head; //cout<<"\nList "; while(temp2!=NULL) { cout<<temp2->data<<" "; temp2=temp2->next...
true
70a3c258429fc0d5d2b6b0c0adc2e912cee3a790
C++
felsamps/overlap-spm-sim
/src/ExternalMemory.cpp
UTF-8
432
2.75
3
[]
no_license
#include "../inc/ExternalMemory.h" ExternalMemory::ExternalMemory() { this->numOfReadBU = 0; this->numOfPageAct = 0; } void ExternalMemory::read(Int burstLengthInBU) { this->numOfReadBU += burstLengthInBU; } void ExternalMemory::report() { cout << "EXTERNAL MEMORY REPORT" << endl; cout << "READ_BU:\t" << this->...
true
f37f701ddfafd3d6e793d22d91ebca635d6c47bb
C++
zpoint/Reading-Exercises-Notes
/The_C++_Standard_Library/Algorithm/permutation.cpp
UTF-8
1,053
3.625
4
[]
no_license
#include "algostuff.hpp" int main() { /* * https://stackoverflow.com/questions/11483060/stdnext-permutation-implementation-explanation */ std::vector<int> coll; INSERT_ELEMENTS(coll, 1, 3); PRINT_ELEMENTS(coll, "on entry: " ); // permute elements until they are sorted // - run through all permutati...
true
79cd70ee8cf4f69bd4be65c377b764afc24c7729
C++
haruka-mt/paiza
/Rank_C/C039.cpp
UTF-8
611
3.0625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main(void) { string str; cin >> str; vector<int> num(1); int index = 0; for (int i = 0; i < str.size(); ++i) { if (str[i] == '+') { num.resize(num.size() + 1); index++; } else...
true
dd743ea1b3bbe3f48263b70961da1a0757535ef2
C++
yclizhe/acm
/POJ/1950/1950.cpp
UTF-8
1,030
2.921875
3
[]
no_license
#include <iostream> #include <cstring> using namespace std; const char op[3] = {'+','-','.'}; char ans[20]; int numofans; int N; void print() { cout << 1; for(int i=2; i<=N; i++) cout << " " << ans[i-2] << " " << i; cout << endl; } void dfs(int depth, int sum, int lastnum, char lastop) { if(depth==N-1) { if(la...
true
3d6282ae160b9e1fad8d79bd237247a8fc086476
C++
brian-jordan/ThreadLibrary
/test20.cc
UTF-8
13,709
2.765625
3
[]
no_license
#include <stdlib.h> #include <iostream> #include "thread.h" #include <assert.h> #include <string.h> #include <stdio.h> using namespace std; int maxOrdersOnBoard; int numOrdersOnBoard; int prevMadeSandwich; int numCashiers; unsigned int deliLock; //main lock unsigned int makerCV; //maker condition variable bool* arr; ...
true
228d40348a88347ee55286ba912ac3e49a39c668
C++
pillowpilot/problem_solving
/CodeForces/534A - Exam/code.cpp
UTF-8
557
3.390625
3
[]
no_license
#include <cstdio> using namespace std; int f(int n){ switch(n){ case 1: case 2: return 1; case 3: return 2; default: return n; } } void example(int n){ switch(n){ case 1: case 2: printf("1"); break; case 3: printf("1 3"); break; case 4: printf("2 4 1 3"); bre...
true
00ae33fd2a7ec3d0cd239fcb5ff1d6a8d46f88c4
C++
Therealchainman/LeetCode
/problems/make_the_string_great/solution.cpp
UTF-8
548
3.015625
3
[]
no_license
class Solution { public: string makeGood(string s) { vector <char> stk; for (int i=0;i<s.length();i++) { stk.push_back(s[i]); while (stk.size() >= 2 && stk.at(stk.size()-1) != stk.at(stk.size()-2) && tolower(stk.at(stk.size()-1)) == tolower(stk.at(stk.size...
true
14f7f764af22e9000cacad34cbe898fec6d72cc5
C++
SinghVikram97/Interview-Prep
/String/1. (IMP) Reverse string.cpp
UTF-8
408
3.453125
3
[]
no_license
string reverseString(string s){ int start=0; int end=s.length()-1; /// No harm in putting = as character swapped with same character while(start<=end){ swap(s[start],s[end]); start++; end--; } return s; } string reverseString(string s){ reverse(s.begin(),s.end()); ...
true
c6c1222e2a0c92d43e91a87590cee3a1bf3e0b3a
C++
eduardor626/CS3A
/Test1_Eduardo_Vu/fraction.cpp
UTF-8
6,481
3.5
4
[]
no_license
#include "fraction.h" //CONSTRUCTORS: fraction::fraction() { whole = 0; numer = 0; denom = 1; } fraction::fraction( int a) { whole = 0; numer = a; denom = 1; } fraction::fraction ( int a, int b) { if (b == 0) throw DENOMINATOR_EQUALS_TO_ZERO; whole = 0; numer = a; de...
true
717751cc775a206a42c199fc3cebbc994b5e15c3
C++
Lisoph/MyTracer
/PlaneEntity.cpp
UTF-8
1,929
2.78125
3
[]
no_license
#include "PlaneEntity.hpp" #include <SDL.h> static Eigen::Matrix4f Mat3to4(Eigen::Matrix3f const &mat3) { Eigen::Matrix4f mat4 = Eigen::Matrix4f::Identity(); mat4.block(0, 0, 3, 3) = mat3.block(0, 0, 3, 3); return mat4; } static Eigen::Matrix4f QuatRotMatrix4(Eigen::Quaternionf const &quat) { return Mat3to4(...
true
309e6bd4df2e4ab8962ccc3b1c8160f63becc5cd
C++
LeoSalemann/UW_HCDE539
/Class02/temperature-sensor/Temperature/Temperature.ino
UTF-8
2,321
3.515625
4
[ "Unlicense" ]
permissive
/* Thermometer ahdavidson www.goldensection.cc 8/1/11 This program implements a simple thermometer by reading data from a temperature sensor. It then displays the values in the serial monitor window. */ // this constant shows where we'll find the temp sensor const int sensorPin = A1; // must be an analog...
true
3b704cf6dd03ee834afb158786b7db824946b890
C++
kimlavoie/OS_TP2
/simvirtmem/src/interpreter.cpp
UTF-8
3,630
2.921875
3
[]
no_license
// Auteur: Yves Chiricota 11/11/2000 #include "stdafx.h" #include "interpreter.h" #include "MMU.h" // -------------------------------------------------------------------------------- // Fonction: operator>> // // Par: Yves Chiricota // Date: 12/11/00 // MAJ: // -----------------------------------...
true
e089ac8365847af973e3733aaee419788bd419c9
C++
mfiore/pomdp
/PriorityQueue.h
UTF-8
726
2.828125
3
[]
no_license
/* * File: PriorityQueue.h * Author: mfiore * * Created on January 28, 2015, 10:17 AM */ #ifndef PRIORITYQUEUE_H #define PRIORITYQUEUE_H #include <map> #include <vector> #include <algorithm> #include <iostream> using namespace std; class PriorityQueue { public: PriorityQueue(); PriorityQueue(const...
true
4c671da09db526137aa3685e84fb9ccfe7f505e7
C++
dmitriano/Awl
/Tests/Helpers/RwTest.h
UTF-8
1,106
2.5625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Product: AWL (A Working Library) // Author: Dmitriano ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma on...
true
158feb8c0249242b498536f9b390b4a422722123
C++
davidlinn/BestASVCode
/libraries_old_old/main/PControl.cpp
UTF-8
2,167
2.984375
3
[]
no_license
#include "PControl.h" #include "Printer.h" extern Printer printer; inline float angleDiff(float a) { while (a<-PI) a += 2*PI; while (a> PI) a -= 2*PI; return a; } PControl::PControl(void) { } void PControl::init(const int totalWayPoints_in, const int stateDims_in, double * wayPoints_in) { total...
true
a12698e8a2b18088486cabf421b8b329b66a0a97
C++
YLiuzz/Arduino
/light_senser2.ino
UTF-8
334
2.640625
3
[]
no_license
//define int value = 0; int pin = A2; int threshold = 500 ; int led = 13; //setup void setup() { Serial.begin(9600); pinMode(pin, INPUT); } //loop void loop() { value analogRead(pin); if(value>threshold){ digitalWrite(led, LOW); }else{ digitalWrite(led, HIGH); } Serial.println(value); del...
true
dadfe3ac2ad2909c9343587e41b51441035dc9b8
C++
EsunnyAPI/zcel2api_demo
/zcel2api_demo.cpp
GB18030
3,049
2.671875
3
[]
no_license
#include "zcel2api/ZceLevel2ApiInterface.h" #include <iostream> #include <windows.h> using namespace std; //==================================================== // // Ŀ // //Level2 IPַ const char* ZCEL2_SERVICE_IP = ""; //Level2 ˿ const int ZCEL2_SERVICE_PORT = 0; //Level2 û const char...
true
03b31bacf9510c81544839bf845dbe18f98b7ed7
C++
oydang/CS4701-pokemon-AI
/Tracer-VisualboyAdvance1.7.1/Tracer-VisualboyAdvance1.7.1/source/src/Pathlib.h
SHIFT_JIS
1,508
2.609375
3
[ "MIT" ]
permissive
// // pXCuNX // #ifndef __CPATHLIB_INCLUDED__ #define __CPATHLIB_INCLUDED__ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <shlobj.h> #include <shlwapi.h> #include <string> using namespace std; class CPathlib { public: // pX{t@Cl[̃pX擾 static string SplitPath( LPCST...
true
f615292bc864899a3c1a4e4a5323e5ac1b3c8b3b
C++
zhubo240/870-oo-design
/p3/TwoWayMultiSprite.h
UTF-8
706
2.546875
3
[]
no_license
/* * TwoWaySprite.h * * Created on: Oct 13, 2015 * Author: zhubo */ #ifndef TWOWAYMULTISPRITE_H_ #define TWOWAYMULTISPRITE_H_ #include "multisprite.h" class TwoWayMultiSprite: public MultiSprite { public: TwoWayMultiSprite(const string & name); virtual ~TwoWayMultiSprite(); // TODO : even I know it is...
true
3e9214029cedc097b133bc7f9b3f7d459d5c03f8
C++
mjenrungrot/competitive_programming
/UVa Online Judge/v117/11797.cc
UTF-8
1,767
2.75
3
[ "MIT" ]
permissive
/*============================================================================= # Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/ # FileName: 11797.cc # Description: UVa Online Judge - 11797 =============================================================================*/ #include <bi...
true
7db05814108999620d4ee65469429b53dc55fd1c
C++
Celissa/Legacy-Base
/src/fire.cpp
UTF-8
12,853
2.546875
3
[]
no_license
#include "system.h" bool fireball_effect ( char_data*, char_data*, int ); /* * SMOKE COMMAND */ void do_smoke( char_data* ch, char* argument ) { obj_data* pipe; obj_data* tobacco; if( *argument == '\0' ) { send( ch, "What do you want to smoke?\r\n" ); return; } if( ( pipe = one_o...
true
4a7fd0764fd1c876680887d9a54d43e40926abb5
C++
iwasz/bajka
/library/trunk/src/tween/AtomicTween.cc
UTF-8
4,345
2.546875
3
[]
no_license
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
true
15580c0175f45f57c54eb4ebd1f9855f7b1f377b
C++
NishantRaj/program_files
/stanly1.cpp
UTF-8
1,310
2.859375
3
[]
no_license
/* =================================================== Name :- Nishant Raj Email :- raj.nishant360@gmail.com College :- Indian School of Mines Branch :- Computer Science and Engineering Time :- 25 September 2015 (Friday) 21:48 ===================================================*/ #include <bits/stdc++.h> using namespac...
true
e2f757b5f45d406bf816fc939846ec98c8e531b0
C++
alexandraback/datacollection
/solutions_1674486_0/C++/jefferson/A.cpp
UTF-8
1,387
2.53125
3
[]
no_license
#include <iostream> #include <iomanip> #include <string> #include <vector> #include <list> #include <map> #include <set> #include <cmath> #include <algorithm> using namespace std; typedef long long int ll; typedef unsigned long long int ull; typedef vector < int > vi; typedef vector < vi > vvi; typedef vector...
true
eed8ebae564b956d96c768388a2559227d4dbe37
C++
md143rbh7f/competitions
/topcoder/srm/492/TimeTravellingGardener.cpp
UTF-8
611
2.78125
3
[]
no_license
#include <vector> using namespace std; int x[50]; struct TimeTravellingGardener { int determineUsage( vector<int> d, vector <int> h ) { int n = h.size(), best = n-1; for( int i = 1; i < n; i++ ) x[i] = x[i-1] + d[i-1]; for( int i = 0; i < n; i++ ) for( int j = i+1; j < n; j++ ) { int bad = 0; for( in...
true
756cf4f2a205075c6297bf5d3bf080f30ec13cd8
C++
tue-mdse/pgconvert
/include/pg.h
UTF-8
2,734
3.1875
3
[]
no_license
#ifndef __PG_H #define __PG_H #include "vertex.h" #include "parsers/dot.h" #include <iostream> namespace graph { namespace pg { /** * @brief Enumerated constants to indicate parity game players. */ enum Player { even = 0,///< even odd = 1 ///< odd }; typedef size_t Priority; ///< Type of vertex priorities. ...
true
201c5a425c8674cab5b1d224da63ad04455dda69
C++
cmf41013/Aspose.PDF-for-C
/Examples/PdfCPP/Document/AddImage.cpp
UTF-8
970
2.53125
3
[ "MIT" ]
permissive
#include "..\Aspose.Pdf.h" using namespace System; using namespace System::Drawing; using namespace Aspose::Pdf; using namespace Aspose::Pdf::Text; void AddImage() { // ExStart:AddImage auto doc = MakeObject<Document>(); auto pages = doc->get_Pages(); pages->Add(); auto page = pages->idx_get(1); auto stream =...
true
8b82ac5d208e3d711033cb57bcb94c5413e98875
C++
nian0601/GfxEngine
/Solution/Engine/AssetContainer.cpp
UTF-8
2,436
2.515625
3
[]
no_license
#include "stdafx.h" #include "AssetContainer.h" #include "Effect.h" #include "Instance.h" #include "FBXFactory.h" #include "Texture.h" namespace Easy3D { AssetContainer* AssetContainer::myInstance = nullptr; AssetContainer* AssetContainer::GetInstance() { if (myInstance == nullptr) { myInstance...
true
c26affd7e6d034a5a3d0dadb74f5c0e96d33e36f
C++
atsnyder/PhiProj
/src/test_mult_tbb_lambda.cpp
UTF-8
1,659
2.921875
3
[]
no_license
#pragma offload_attribute (push,target(mic)) #include "tbb/parallel_for.h" #include "tbb/blocked_range.h" #include <iostream> #pragma offload_attribute (pop) #include <fstream> #include "cilktime.h" #include <vector> using namespace std; using namespace tbb; #ifdef __MIC__ __attribute__((target(mic))) struct testStru...
true
bec9dabcb4e22a010a85a3c263d02d607b8f5992
C++
mslawicz/PiBot
/PiBot/src/logger.cpp
UTF-8
2,050
3.15625
3
[]
no_license
/* * logger.cpp * * Created on: 7 sty 2019 * Author: Marcin */ #include "logger.h" /* * get instance of the logger singleton object */ Logger& Logger::getInstance(void) { // instantiated on the first use and guaranteed to be destroyed static Logger instance; return instance; } Logg...
true
f41fe6c90f01a44f6bb81009a1d87e8c4856e3e2
C++
GreekPanda/leetcode
/Integer/KthLargestElement/KthLargestElement.cc
UTF-8
712
3.8125
4
[]
no_license
class KthLargestElement { public: int kthLargestElement(vector<int> nums, int k) { if(nums == null || num.size() == 0) return -1; int result = qSort(nums, 0, nums.size() - 1, k); return result; } private: int qSort(vector<int> nums, int start, int end, int k) { if(start > end) ...
true
382115ad16d66e72a53176665b839e957affe68c
C++
raiselove/The-data-structure
/HashTable/HashTable_OP.h
UTF-8
7,918
3.28125
3
[]
no_license
#include <vector> //template<class K> //size_t DefaultFunc(const K *str) //{ // register size_t hash = 0; // while (size_t ch = (size_t)*str++) // { // hash = hash * 131 + ch; // } // return hash; //} template<class K,class V> struct HashTableNode { K _key; V _va...
true
44b810b943876bb37e7a9c5e0473216e409ef73e
C++
OmarLetona14/EDD_1S2020_PY1_201700377
/src/MenuPrincipal.cpp
UTF-8
5,023
2.8125
3
[]
no_license
#include "MenuPrincipal.h" #include <iostream> #include "ReadArchive.h" #include "DoubleCircularListDiccionario.h" #include "MenuJuego.h" using namespace std; MenuPrincipal::MenuPrincipal() { this->diccionario_palabras = new DoubleCircularListDiccionario(); } void MenuPrincipal::desplegarMenu(){ MenuJuego* nue...
true
27936a9298e10a83a77c33c6596a0ab40d087a0e
C++
AlexMcClay/Uni
/2020/s2/oop/practical-02/function-2-3.cpp
UTF-8
1,372
4.03125
4
[]
no_license
// function that print out a multiple of a matrix #include <iostream> #include <stdlib.h> #include <cmath> using namespace std; int sum_elements(int integers[], int length) { int sum = 0; if (length < 1) { return -1; } else { for (int i = 0; i < length; ++i) { sum = sum +integers[i]; ...
true
b3e7ab32303f3eff23e827aa5250bfd767652c59
C++
chingandy/cpp
/cpp_BST.cpp
UTF-8
7,122
3.8125
4
[]
no_license
#include<iostream> #include<cstdio> #include<cstdlib> using namespace std; class node { private: int data; node *left; node *right; friend class binary_tree; }; //typedef struct binary_tree node; class binary_tree{ public: binary_tree(); void insert(int value); void inorder(); void preorder(); void p...
true
dcfa1f283115978071fe6b851bc4622f01b38395
C++
Shivam0001/Competitive-Programming
/Question Bank with Solution/Sheet_8 Linked List/5median.cpp
UTF-8
767
3.34375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; }; void display(Node *head) { while(head!=NULL) { cout<<head->data<<" "; head=head->next; } cout<<endl; } void median(Node *head1) { Node *ptr1=head1,*ptr2=head1; while(ptr2!=NULL && ptr...
true
07ebf29274cfca44cd2b97aaaf87197c67806904
C++
daltonmoore/classic-chess
/ChesterChess/Source/ChesterChess/PieceBishop.cpp
UTF-8
2,784
2.53125
3
[]
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "PieceBishop.h" APieceBishop::APieceBishop(const FObjectInitializer& ObjectInitializer) { Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh")); static ConstructorHelpers::FObjectFinder<UStaticMesh>BishopM(TEXT("Sta...
true