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
3857c5ee8a476143f17f4d23d6b7bfe726ea97a2
C++
d3v1c3nv11/eduArdu
/SOFTWARE/8_eduArdu_Temperature/LED_Matrix.h
UTF-8
1,588
2.953125
3
[ "Apache-2.0" ]
permissive
/* LED_Matrix is a Library to drive the Olimex 8x8 (non-rgb) matrix Based on the original library LED_Matrix created by Lutz Reiter, Dec 2014. */ #ifndef _LED_MATRIX_H #define _LED_MATRIX_H #define ROWS 8 #define STRING_MAX_CHAR 64 #include <Arduino.h> #include "font.h" typedef unsigned char uchar; class LED_Matr...
true
ad8480c5201277c67dc305a778031a8354a3fb9d
C++
enkiprobo/CPtraining
/hackerrank/warmup/i_birthdayCakeCandles.cpp
UTF-8
401
3.234375
3
[]
no_license
/** * Created By: Enki Probo S. * Description: * Counting the biggest number * from the input **/ #include <iostream> using namespace std; int main() { int n, max=0, counter=0, input; cin >> n; for ( int i = 0; i < n; i++ ) { cin >> input; if (input > max ) { max = input; counter = 1; ...
true
a9d7ce5aa745474bf61804ef596474b8b8a09c60
C++
andimoto/stm32f4xx-cmake-cpp
/src/hal_uc/rng.cpp
UTF-8
694
2.609375
3
[ "MIT" ]
permissive
/** * Name: rng.cpp * Initial Author: andimoto */ #include "rng.hpp" #include "stm32f4xx.h" #include "stm32f4xx_rng.h" hal_uc::rng::rng(void) { /* * Enable RNG Module * */ RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG, ENABLE); } bool hal_uc::rng::getNumber(std::uint32_t& randNo) { if(!isStopped && (RNG_GetFla...
true
b99afad5bb9ec5d642dd126bf70cfbe91f6c2c09
C++
Pessu/Adventure
/Utilities.cpp
UTF-8
1,751
2.90625
3
[]
no_license
/* * Utilities.cpp * * Created on: 21.12.2012 * Author: Pessu */ #include "Utilities.h" #include <iostream> #include <iostream> #include <fstream> #include <string.h> #include <cstdlib> #include "Exceptions.h" #include "Game.h" #include "Player.h" using namespace std; //class Player; Utilities::Utilities()...
true
3162acf5feb1b9c27506d51de8e6459e4b525b0d
C++
VishalDutt1998/Data-Structure
/PepC/DP1_1/CoinChange.cpp
UTF-8
1,056
3.234375
3
[]
no_license
#include<iostream> #include<vector> #include<string> using namespace std; void printCoinPer() { } int coinPermutations(vector<int>& coins, int amt) { vector<int> strg(amt + 1, 0); strg[0] = 1; for(int s = 1; s < strg.size(); s++) { for(int c = 0; c < coins.size(); c++) { ...
true
1c7d3e9b4b3d9786d01c023c8c8f22cd1693c93e
C++
levonala/cpp
/Classes/Classes/Student.cpp
UTF-8
218
3.015625
3
[]
no_license
#include "Student.hpp" Student::Student(unsigned int id, std::string name) { id_ = id; name_ = name; } unsigned int Student::getId() { return id_; } std::string Student::getName() { return name_; }
true
355e7249e15cc0b4d20b72bf8c2599b43451911e
C++
RTCSD2016/notes
/grp_cpp/_Old_Common_Files/OPER_INT.HPP
UTF-8
13,908
2.765625
3
[]
no_license
//************************************************************************************* // OPER_INT.HPP // This file contains definitions of structures (or classes) and functions used // for the generic character-mode operator interface for DOS or Easy Windows. // // The current version has been mod...
true
5cd7665089f1541650d2536a85737a75e1d994ff
C++
AlejandroMB1/OrangoTango
/OrangoTango/factura.cpp
UTF-8
1,771
2.734375
3
[]
no_license
#include "factura.h" Factura::Factura(){ empresa = ""; nitEmpresa = ""; telEmpresa = ""; cliente = ""; numeroFactura = ""; fechaFactura = ""; precioItems = ""; cantidadItems = ""; totalPagar = ""; } QString Factura::getEmpresa(){ return ...
true
c528b6930715f8e0453e012b36ad9d2057fb1091
C++
RiceReallyGood/nowcoder
/jzOffer/28_MoreThanHalfNum.h
UTF-8
551
3.125
3
[]
no_license
#include <vector> using namespace std; class Solution { public: int MoreThanHalfNum_Solution(vector<int> numbers) { int candidate = 0, count = 0; for(int num : numbers){ if(count == 0){ candidate = num; count = 1; } else if(num == ...
true
9af4845e80b82d77552f8ebccc745d99c04ed7b7
C++
ashkon-zariv/MaximumFlowProblem
/FHflowgraph.h
UTF-8
12,771
2.828125
3
[]
no_license
// File FHflowGraph.h EXPERIMENT // Template definitions for FHflowGraph. #ifndef FHflowGraph_H #define FHflowGraph_H #include <limits.h> #include <utility> #include <vector> #include <queue> #include <set> #include <map> #include <stack> #include <iostream> #include <functional> using namespace std; template <class...
true
bb00f1ba78897372d675fa6bdafc66d4ce186ba9
C++
hichoe95/BOJ
/2261.cpp
UTF-8
1,372
3.109375
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; int dist(int a, int b, int x, int y){ return (a-x)*(a-x) + (b-y)*(b-y); } bool cmp(const pair<int,int> &a, const pair<int,int> &b){ return a.second<b.second; } int find_dist(vector<pair<int,int> > &v,int start, int end){ int m = -1; ...
true
ce821ce89d05262e8af7b05b294318e6f76dabe4
C++
disha03/my_notes
/april_may/search min in sorted array.cpp
UTF-8
1,021
2.703125
3
[]
no_license
int Solution::findMin(const vector<int> &A) { // Do not write main() function. // Do not read input, instead use the arguments to the function. // Do not print the output, instead return values as specified // Still have a doubt. Checkout www.interviewbit.com/pages/sample_codes/ for more details ...
true
a44c73e582c910312526e0f07c25c49bcb923479
C++
LeulShiferaw/ProjectEuler
/PE11/PE11/main.cpp
UTF-8
1,239
3.28125
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; int main() { ifstream file("numbers.txt"); if (!file.is_open()) { cerr << "File error!" << endl; return 0; } int grid[20][20]; for (int i = 0; i < 20; ++i) { for (int j = 0; j < 20; ++j) { file >> grid[i][j]; } } file.close(); long ...
true
ee976b8c0a29e8925c580cc74a309cc4866115db
C++
artemreyt/ConfigHolder
/Logger/include/BaseLogger.hpp
UTF-8
2,078
3.21875
3
[]
no_license
#ifndef BASELOGGER_HPP #define BASELOGGER_HPP #include <string> #include <memory> #include <iostream> #include <stdexcept> #include <fstream> namespace Logger { enum class t_level : unsigned int { ERROR, WARNING, INFO, DEBUG }; class BaseLogger { public: ...
true
3fec833770575cdb96158d39de38ba54afb97b0f
C++
Oxid2178/PraxisWissenC-NewStd
/PraxisWissenC++NewStd/PraxisWissenC++NewStd/BarChartView.h
UTF-8
407
2.578125
3
[]
no_license
#pragma once #include "IObserver.h" #include "SpreadsheetModel.h" class BarChartView : public IObserver { private: SpreadsheetModel& model; public: BarChartView(SpreadsheetModel& theModel) : model{ theModel } {} virtual int getId() override { return 2; } virtual void upd...
true
7598908b03fcabb2d092a920f9d10559ff687ab9
C++
1816013/ActionProject
/Action/ActionProject/Game/Player/SwordEquip.h
SHIFT_JIS
1,090
2.59375
3
[]
no_license
#pragma once #include "Equipment.h" class FanCollider; class ShadowClone; class SwordEquip : public Equipment { private: int frame_; std::shared_ptr<Player>& player_; FanCollider* fanCollider_ = nullptr; using func_t = void(SwordEquip::*)(); ShadowClone* shadow_; Vector2f offset_ = Vector2f::ZERO; func_t updat...
true
66dc16ec4598ec2d98a899f2c6c67f3c1339e7df
C++
Dpham181/CPSC-323-PROJECT-2-
/PROJECT 2 SUBMIT (DANH PHAM)/PROJECT 2 SUBMIT (DANH PHAM)/SOURCE CODE/prase.h
UTF-8
43,862
2.8125
3
[]
no_license
/* Name: Danh Pham Course: CPSC 323 SECTION 1 PRoject Name: PROJECT_2 SYNTAX ANNALYSIS FILES CONTAIN: phrase.h, prase.h, main.cpp PURPOSE: This program use to parse the tokens from the text file by using top-down parse desent. It gets all the tokens and push back vector then find the gammar rule that fit to the Rat17f ...
true
74d6c53b7c9528da77a52eca7edd9a7e6c3a65f3
C++
fbocharov/mydb
/src/main.cpp
UTF-8
2,573
2.859375
3
[ "WTFPL" ]
permissive
#include <iostream> #include <sql/SQLParser.h> #include <sql/SQLParserException.h> #include <io/InputReader.h> #include <io/CSVPrinter.h> #include <backend/IOException.h> #include <core/MyDB.h> #include <utils/Log.h> void PrintUsage(std::string const & appName) { std::cout << "Usage: " << appName << " <db_file>" << ...
true
1c00593cc937495a089e6ddd0e5348c952ddea87
C++
xiaohejun/ACM
/1554: junlao的字符.cpp
UTF-8
639
2.765625
3
[]
no_license
#include <cstdio> #include <iostream> #include <string> #include <cstring> using namespace std; /* 1554: junlao的字符 */ int main() { //freopen("in.txt", "r", stdin); int t; cin >> t; string str; string strs[55]; char ch; int n; for (int i = 0; i < t; ++i) { cin >> strs[i]; } for (int i = 0; i < t; i++)...
true
aa7021979c78ac1683a7244c32d6a280131ec320
C++
WOODNOTWOODY/LearnOpenGL
/blade/gles3_render/GLES3RenderEngine.cpp
UTF-8
4,721
2.5625
3
[]
no_license
#include "GLES3RenderStd.h" #include "GLES3RenderEngine.h" BLADE_NAMESPACE_BEGIN RenderEngine::RenderEngine() : m_curRenderWindow(NULL) , m_curGLProgram(0) , m_curGLVAO(0) , m_curGLFBO(0) , m_glActiveTexUnit(0) { for (uint32 i = 0; i < MAX_TEXTURE_UNIT_NUM; ++i) { for (uint32 j = 0; j < TT_COUNT; ++j) { ...
true
fbc76196eedd190a8a935f988029c5cbbe335708
C++
aajjbb/contest-files
/Codeforces/Pipeline.cpp
UTF-8
1,081
2.625
3
[ "Apache-2.0" ]
permissive
#include <iostream> #include <string> #include <cstring> using namespace std; typedef long long Int; Int N, K; Int sumF(Int p) { return p * (K + (K - p + 1)) / 2LL; } int main(void) { cin >> N >> K; if (N == 1) { cout << "0\n"; return 0; } Int l = 1, h = K, m; Int ...
true
751c061ee34c4e15b2a0c3162504f00a73a4d925
C++
StefanButacu/Data-Structures-and-Algorithms
/ADT Ordered singly linked list(2)/Lab4/LO.h
UTF-8
1,692
2.78125
3
[]
no_license
#pragma once class Iterator; typedef int TComparabil; typedef TComparabil TElement; typedef bool (*Relatie)(TElement, TElement); #define NULL_TELEMENT -1 class LO { private: friend class Iterator; private: /* aici reprezentarea */ int cp; int head, primLiber; int sizeL; TElement* elems; ...
true
4e6c2706dbdd26d4a49e8b93d9fb891422d5502d
C++
sntchaitu/CppND-System-Monitor-Project-Updated
/src/processor.cpp
UTF-8
525
2.5625
3
[ "MIT" ]
permissive
#include "processor.h" #include "linux_parser.h" #include <vector> #include <string> using std::vector; using std::string; float Processor::Utilization() { float utilization; long active = LinuxParser::ActiveJiffies(); long idle = LinuxParser::IdleJiffies(); long cpu_total = active+idle; long total_diff = ...
true
027ef1de395725fb22214bd57da9a1a5cb1b9632
C++
sandeep1parmar/BEL_VMS
/Bel1/Model/Live/carouselmodel.cpp
UTF-8
1,096
2.546875
3
[]
no_license
#include "carouselmodel.h" CarouselModel::CarouselModel(QObject *parent) : QAbstractListModel(parent) { m_pCarouselList = new QList<CarouselItem*>; } CarouselModel::~CarouselModel() { } void CarouselModel::setCarouselList(QList<CarouselItem*> *aList) { beginResetModel(); m_pCarouselList = aList; end...
true
32b67fd0cc8fcadc3461ab6f990d71d6297f1d32
C++
enterstudio/sport-programming
/SPOJ/Archive/PERIOD.cpp
UTF-8
914
2.59375
3
[]
no_license
// In the name of Allah, Most Gracious, Most Merciful // SPOJ/PERIOD // Period // strings // // // AC (2012-07-15 16:52:16) #include <cstdio> #include <cstring> #include <algorithm> #define SET(c, v) memset(c, v, sizeof(c)) using namespace std; char S[1000005]; int P[1000005], Z[1000005]; void solve() { strca...
true
6ea6f8a4962d4f42fb418393abce50369a47a406
C++
xujingli/Programming
/pat/算法笔记&pat题解/2算法初步/two pointers/合并两个升序数组.cpp
GB18030
424
3.25
3
[]
no_license
//ڣ2018/ ʱ䣺 #include <stdio.h> #include <stdlib.h> //A,BҪǺϲΪһC int merge(int A[],int B[],int C[],int n,int m){ int i=0,j=0,index=0; while(i<n && j<m){ if(A[i] < =B[j]){ C[index++]=A[i++]; }else{ C[index++]=B[j++]; } } while(i < n) C[index++]=A[i++]; while(j < m) C[index++]=B[j++]; return index; } ...
true
a3aea197cc80105f8c7cf82fddc3a3b4979a8cd0
C++
schod005/ClassWork
/CSCI5511/SnakeAI/Snake.h
UTF-8
8,771
3.21875
3
[]
no_license
#ifndef SNAKE_HPP #define SNAKE_HPP //Project Headers #include "Constants.h" #include "Misc.h" class Snake { public: Snake(); Snake(Grid*, int x, int y, int number); void update(int); int randMove(); void aStarMove(); void depthFirstMove(); bool checkApple(int); void drawText() {WINDOW_HANDLE->draw(text);} ...
true
005007b19a60cb031f7142929a475a7f15c19960
C++
jashuaw2396/TicTacToe-ShortGame
/Jash's TicTacToe/Jash's TicTacToe/GameBoard.h
UTF-8
795
3.46875
3
[]
no_license
#pragma once #include <iostream> using namespace std; #include <vector> #include "Console.h" class GameBoard { private: // Gameboard being used vector<char> m_gameboard; // Player turn counter int m_playerTurn; // Counter for max plays (in case of a tie) int m_playsLeft; public: GameBoard(); ~GameBoard(); /...
true
e4c3eca441e1fbb9a7cf1e1495ab4fb59cd66a66
C++
sfy1020/AlgorithmTutorial
/Algorithm/Sources/NumberTheory/Solutions/Programmers/124 나라의 숫자.cpp
UTF-8
2,712
3.625
4
[]
no_license
// 124 나라의 숫자 // https://programmers.co.kr/learn/courses/30/lessons/12899 // 시행착오 // 1. 0011 의 경우 Convert를 이용하면 11로 표현된다. 현재 이 문제에서는 0 또한 중요한 정보이므로 제거하면 안된다. // 2. setfill을 이용할 때 endl을 주의 // 3. 라이브러리 ToNumber 코드 long long으로 변경 #include <string> #include <vector> #include <iostream> #include <algorithm> #include <sst...
true
39f34f21082e531f8709ca1aa8b14fdc4df51727
C++
amuchow/Moonrockers
/telecommunicationsPCDuino/multithreaded/TCP/server.cpp
UTF-8
2,303
3.25
3
[]
no_license
// socket server example, handles multiple clients using threads #include<stdio.h> #include<string.h> //strlen #include<stdlib.h> //strlen #include<sys/socket.h> #include<arpa/inet.h> //inet_addr #include<unistd.h> //write #include<pthread.h> //for threading , link with lpthread //the thread function void *c...
true
5b869adc5b56899615602d65e23f9aba8ccba628
C++
Sarat-Chandra/Heuristics-For-Parallel-Djikstra
/overlay1.cpp
UTF-8
3,568
3.1875
3
[]
no_license
#include<iostream> #include<stdio.h> #include <cstdlib> #define INFINITY 999 using namespace std; FILE *fp = fopen("input.txt","w"); FILE *fp1 = fopen("overlay1.txt","w"); //FILE *fp2 = fopen("overlay2.txt","w"); int ov,ov1; class Graph { private: int adjMatrix[15][15]; int predecessor[15],distance[15]; ...
true
c2b1d36ffb56d7d89202e85e49791be3331c1855
C++
RandyViG/Sistemas-Distribuidos
/EleccionesPresidenciales/6_Sincronizacion/time.cpp
UTF-8
405
2.671875
3
[]
no_license
#include <time.h> #include <sys/time.h> #include <stdlib.h> #include <stdio.h> int main( void ) { struct timeval start; time_t rawtime; struct tm * timeinfo; char buffer [14]; while(1){ gettimeofday(&start, NULL); time (&rawtime); timeinfo = localtime (&rawtime); strftime (buffer,22,"Hora: %...
true
655195b81d75524cb60509e29c4760174cb32477
C++
Dragon-qing/vs
/visual studio的代码/练习/Project1/源.cpp
WINDOWS-1252
772
3.328125
3
[]
no_license
#include <iostream> #include <string> using namespace std; class CBug { int legNum, color; public: CBug(int ln, int c1) : legNum(ln), color(c1) { cout << "CBug Constructor" << endl; }; ~CBug() { cout << "CBug Destructor" << endl; } void Printlnfo() { cout << l...
true
8e3f38846ac8a5494aa1f7855551d5a703812152
C++
kenji-hosokawa/rba
/unittest/internal_test/HA729_hierarchy.cpp
UTF-8
6,568
2.5625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Copyright (c) 2019 DENSO CORPORATION. All rights reserved. /** * HA729_hierarchy.cpp */ #include <fstream> #include <vector> #include <string> #include "RBAJsonParser.hpp" #include "HA729_hierarchy.hpp" #include "TestCommon.hpp" namespace { #ifdef RBA_USE_LOG /* * BaseLogCollector */ BaseLogCollector::BaseLog...
true
e5d14c11273e337c93c9cc5ac19e4b917f30418f
C++
maldewar/calaveras
/jni/src/Engine/Animation.cpp
UTF-8
3,344
2.84375
3
[]
no_license
#include "Animation.h" #include "../Util/Log.h" Animation::Animation() { m_type = ANIM_TYPE_LINEAR; m_play = true; m_texture = NULL; m_sprite = NULL; m_currentFrame = 0; m_frameInc = 1; m_backwards = false; m_framerate = 500; m_maxFrames = 1; m_oldTime = SDL_GetTicks(); } void ...
true
9eca7d3b2e38b9bb6628171f329346e6b83a6624
C++
gusenov/examples-cpp
/dtor/F.h
UTF-8
299
2.671875
3
[ "MIT" ]
permissive
#ifndef F_H #define F_H #include <iostream> #include "E.h" class F : E { public: ~F() { std::cout << "~F()" << std::endl; // Здесь дальше пойдёт вызов ~E(). // Т.к. доступ к ~E() protected, то это возможно. } }; #endif
true
707788ead58d1512ec0ca16a9e999034ababf56c
C++
lixu1/windowsAPI
/7.5Timer/timer.cpp
UTF-8
1,296
2.609375
3
[]
no_license
#define _WIN32_WINNT 0x0500 #include <Windows.h> #include <stdio.h> #define ONE_SECOND 10000000 typedef struct _APC_PROC_ARG{ TCHAR *szText; DWORD dwValue; }APC_PROC_ARG; VOID CALLBACK TimerAPCProc(LPVOID lpArg, DWORD dwTimerLowValue, DWORD dwTimerHighValue) { APC_PROC_ARG *pApcData = (APC_PROC_ARG *)lpArg; printf(...
true
27de6f80f3663c408226da713119fa784fb9add6
C++
zuhalpolat/hackerrank-algorithms-solutions
/Implementation/ACM ICPC Team.cpp
UTF-8
942
3.015625
3
[]
no_license
#include <iostream> #include <vector> #include <string> #include <bitset> using namespace std; // Complete the acmTeam function below. vector<int> acmTeam(vector<string> topic) { vector<int> result(2, 0); for (int i = 0; i < topic.size() - 1; i++) { for (int j = i + 1; j < topic.size(); j++) { ...
true
b39f7dc6edeb1072fb5db88b8ae0ce2333fc7259
C++
amacias10/CSC-17A
/Hmwk/Assignmnet 6 VS/16.1 Date Exceptions/16.1 Date Exceptions.cpp
UTF-8
1,555
4
4
[]
no_license
#include <iostream> using namespace std; class Date { private: int month, day, year; string monthWord(int m) { switch (m) { case 1: return "January"; case 2: return "February"; case 3: return "March"; case 4: return "April"; case 5: return "May"; case 6: return "June"; case 7: ...
true
a6e7f1e3df132247660a941d80cef609f13c8b91
C++
sdamico23/Car-Project
/hw8Damico/simpletest_raspicam.cpp
UTF-8
1,402
3.203125
3
[]
no_license
/* * simpletest_raspicam.cpp * * Created on: Feb 18, 2017 * Author: steveb */ #include <ctime> #include <fstream> #include <iostream> #include <raspicam/raspicam.h> int main( int argc, char **argv ) { raspicam::RaspiCam Camera; // Camera object int return_value; // the return...
true
70aa133a80ce9c1e8cccff60c2dfdbe18277d721
C++
mapillary/OpenSfM
/opensfm/src/dense/src/depthmap.cc
UTF-8
22,014
2.640625
3
[ "BSD-3-Clause", "LGPL-3.0-only", "HPND", "BSD-2-Clause" ]
permissive
#include "../depthmap.h" #include <cstdint> #include <opencv2/opencv.hpp> #include <random> namespace dense { static const double z_epsilon = 1e-8; bool IsInsideImage(const cv::Mat &image, int i, int j) { return i >= 0 && i < image.rows && j >= 0 && j < image.cols; } template <typename T> float LinearInterpolati...
true
b4323653296b83b09009e29089e65232e21ac462
C++
sudiptog81/ducscode
/YearI/SemesterII/DiscreteStructures/Practicals/representIODegree/main.cpp
UTF-8
2,109
4.21875
4
[ "MIT" ]
permissive
/** * WAP to accept a directed graph and calculate the in-degree * and out-degree of each vertex * * Written by Sudipto Ghosh for the University of Delhi */ #include <cmath> #include <iostream> using namespace std; int main() { // Accept the number of vertices in the graph int v; cout <...
true
9f0a48152d2747a18145a217cfe04fb3aad7f7ec
C++
CatanaRaulAndrei/MINI_PROIECTE
/Euler_totient.cpp
UTF-8
727
3.421875
3
[]
no_license
#include <iostream> using namespace std; class Functia_PHI{ private: int n; public: int PHI(int n); void Afisare_PHI(int numar_functii); }; int Functia_PHI::PHI(int n){ int rezultat = n; for(int p = 2 ; p*p < n; p++){ if(n % p == 0){ while(n % p){ n = n/p; ...
true
e71b2898b641c84e64ef134666f6802da43b1edd
C++
x-insane/os_experiments
/exp3/socket_test.cpp
UTF-8
2,476
2.828125
3
[]
no_license
#include <iostream> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <string.h> int port = 16352; void error(const char* err) { std::cerr << err << std::endl; } void server() { int server_sockfd; int client_sockfd; sockadd...
true
c39dffb841a721ca0686022dfc1a3ac9328e5faf
C++
LukaC256/simple-spectrum
/src/playback.cpp
UTF-8
833
2.640625
3
[]
no_license
#include <SDL.h> #include <iostream> #include "utils.hpp" using namespace std; EResult fPlayback(short* wave, WAVEFORMAT format, long bytecount, float speed) { SDL_AudioSpec audiospec; audiospec.freq = format.dwSamplesPerSec * speed; audiospec.format = AUDIO_S16LSB; audiospec.channels = format.wChannels; au...
true
a7c18b2699b5f828f2d81825aeb255a71f1cd6aa
C++
0daryo/cpp-atcoder
/lib/modpow/modpow.cpp
UTF-8
246
3.1875
3
[]
no_license
#include <iostream> using namespace std; int modPow(long long a, long long n, long long p) { if (n == 1) return a % p; if (n % 2 == 1) return (a * modPow(a, n - 1, p)) % p; long long t = modPow(a, n / 2, p); return (t * t) % p; }
true
5e0dec006c41756849d0079658d3210aab7c565e
C++
SeanTheBuilder1/tictactoe
/src/game.cpp
UTF-8
3,472
3.0625
3
[]
no_license
#include <iostream> #include <string> #include <thread> #include <chrono> #define AY class Game{ private: std::string state; public: std::string getState(){ return state; } void gameStart(){ for(int i = 0; i < 9; ++i){ state [i] = (i + 1 + '0'); } } Game():state(...
true
afafdd87e6e426ce47785cd16de7f1b98c629449
C++
Mingchenchen/raptorx-zy
/contrib/BALL/include/BALL/CONCEPT/composite.h
UTF-8
51,483
2.734375
3
[]
no_license
// -*- Mode: C++; tab-width: 2; -*- // vi: set ts=2: // // $Id: composite.h,v 1.62.14.1 2007-03-25 21:23:37 oliver Exp $ // // Author: // Nicolas Boghossian // Oliver Kohlbacher // #ifndef BALL_CONCEPT_COMPOSITE_H #define BALL_CONCEPT_COMPOSITE_H #ifndef BALL_COMMON_H # include <BALL/common.h> #endif #ifndef BAL...
true
f92fd322ce1b79c73606fc28d43debf1e5800a73
C++
lukastk/ant_system
/gridants/antsim.cpp
UTF-8
8,434
2.6875
3
[]
no_license
#include "antsim.h" #include "maps.cpp" using namespace std; Point moves[] = { Point(0, 0), Point(0, -1), Point(1, 0), Point(0, 1), Point(-1, 0) }; Simulation::Simulation( double _backwardBias, double _traceIncrease, double _traceBaseLine, double _traceDecay, Point _nest, Point _food, int _world_w, int _world_...
true
b1bfc9d0581517a89c10ca3ab4a27e75047cd843
C++
jerry950208/Programmers
/Programmers_C++/Level 1/연습문제/이상한_문자_만들기.cpp
UTF-8
490
3.453125
3
[]
no_license
#include <string> #include <vector> using namespace std; string solution(string s) { string answer = ""; int idx = 0; for(int i=0; i<s.size(); i++){ if(s[i] == ' '){ idx = 0; continue; } if(idx % 2 == 1) s[i] = tolower(s[i]); //tolower...
true
b07651da75034e8e29ed129bae8bbe81a6b63377
C++
jatvarthur/cybersnake
/engine/include/GameObject.h
UTF-8
1,852
2.78125
3
[]
no_license
#pragma once #ifndef GAME_OBJECT_H__ #define GAME_OBJECT_H__ #include "system.h" struct Vector2i { int x; int y; }; enum TypeKind { TK_UNDEF, TK_INT, TK_STRING, TK_VEC2I }; struct PropertyInfo { std::string name; enum TypeKind type; bool isArray; // std::vector unsigned offset; }; struct TypeInfo { st...
true
5c7c3a380c6c6df9e5f6629bfc8e61897b01a8c7
C++
jkennedyvz/ashirt
/src/dtos/github_release.h
UTF-8
5,227
2.78125
3
[ "LicenseRef-scancode-free-unknown", "MIT" ]
permissive
#ifndef GITHUB_RELEASE_H #define GITHUB_RELEASE_H #include <QVariant> #include <QRegularExpression> #include <iostream> #include "helpers/jsonhelpers.h" namespace dto { // SemVer is a (mostly) parsed out semantic version (V2). The major, minor, and patch versions are // converted to ints, while the remainder is left...
true
c4b0a22f292445398e7da49d4d41689ec05e03e9
C++
NhatPhuong02/HCMUS-Lectures
/1_NMLT/ThucHanh-T8/main.cpp
UTF-8
3,565
2.609375
3
[ "MIT" ]
permissive
// MSSV: 1612180 // Ho ten: Nguyen Tran Hau // Bai tap tuan 08 #include "xuly.h" int main(void) { int arr[MAX][MAX], arr2[MAX][MAX], kqua[MAX][MAX]; int hang, cot, x, y, hang2, cot2, kqua_hang, kqua_cot; float r_arr[MAX][MAX], r_kqua[MAX][MAX]; nhap_mang(arr, hang, cot); xuat_mang(arr, hang, cot); ...
true
9c176dd35eeb3fd7008dc6a4842f90acf6d3a235
C++
Lucasian-z/PAT
/PTA_Advanced/PTA_Advanced1097 Deduplication on a Linked List.cpp
UTF-8
1,555
2.671875
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <set> using namespace std; struct node { int val; int next; }; vector<node> list(100000); int main() { int baseAddress = 0, cnt = 0; int addr, val, next; scanf("%d%d", &baseAddress, &cnt); if (cnt == 0) return 0; set<int> ...
true
f3d74b13a69ad2a52d0ef9cf7de45b0c69110f70
C++
MastaLomaster/MHook
/source/HookHandler.h
UTF-8
1,599
2.515625
3
[]
no_license
// Обработчик хука, виртуальный класс #ifndef __MH_HOOKHANDLER #define __MH_HOOKHANDLER #include "MHKeypad.h" class MHookHandler { public: MHookHandler():rbutton_pressed(false),initialized(false),position_mem(-1),mouse_path_squared(0){}; virtual int OnMouseMove(LONG _x, LONG _y)=0; virtual void OnMouseScroll(LONG...
true
18f0b93f8cbde8941dc4c63d66a1178f5498ec29
C++
skuzi/Paradigms-HW
/hw9/src/ThreadPool.cpp
UTF-8
2,267
3.3125
3
[ "Unlicense" ]
permissive
#include "ThreadPool.h" #include <iostream> void Task::wait() { pthread_mutex_lock(&m_mutex); while(!m_stop) { pthread_cond_wait(&m_cond, &m_mutex); } pthread_mutex_unlock(&m_mutex); } void* thread_action(void* pool) { ThreadPool* th_pool = (ThreadPool*) pool; while (1) { pth...
true
661959b9c186a3735d73b52b4bbf7cc92c9e1621
C++
amd/libflame
/test/lapacke/LIN/RSEE/lapacke_gtest_gerfs.cc
UTF-8
41,153
2.578125
3
[ "BSD-3-Clause", "LicenseRef-scancode-other-permissive" ]
permissive
#include "gtest/gtest.h" #include "../../lapacke_gtest_main.h" #include "../../lapacke_gtest_helper.h" #define gerfs_free() \ if (a != NULL) free (a ); \ if (aref != NULL) free (aref); \ if (b != NULL) free (b ); \ if (bref != NULL) free (bref); \ if (x != NULL) free (x ); \ if (xref != NULL) ...
true
906297e61217ec26968ca6ca557884b1efa5ae82
C++
kmehrunes/BoundedMap
/bounded_map.h
UTF-8
2,432
3.515625
4
[]
no_license
#ifndef BOUNDED_MAP_H #define BOUNDED_MAP_H #include <deque> template<typename map_t, typename key_t, typename value_t, unsigned cap> class static_bounded_map { public: /** * @throws exception! */ void insert(std::pair<key_t, value_t> entry) { m_map.insert(entry); m_keys.push_bac...
true
c252e0d56a2275c9bc614c4ee4864d8353d8477a
C++
zhjwpku/leetcode
/solutions/129_sum_root_to_leaf_numbers.cpp
UTF-8
384
3.21875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int sumNumbers(TreeNode *root, int sum) { if (root == NULL) return 0; if (root->left == NULL && root->right == NULL) return sum * 10 + root->val; return sumNumbers(root->left, sum * 10 + root->val) + sumNumbers(root->right, sum * 10 + root->val); } ...
true
660f3b337343ad7d1a9061eabd21facd07f320c4
C++
JanWalsh91/Piscine_CPP
/j02/ex02/Fixed.hpp
UTF-8
1,192
2.765625
3
[]
no_license
#ifndef FIXED_H # define FIXED_H #include <iostream> class Fixed { private: int _i; static const int _bit = 8; public: Fixed( void ); Fixed( Fixed const & fixed ); Fixed( int const i ); Fixed( float const i ); ~Fixed( void ); Fixed & operator=( Fixed const & rhs ); Fixed operator+( ...
true
84313dd09c721f3e24e5444bf3901491666682f3
C++
v8App/v8App
/libs/core/testLib/TestLogSink.cc
UTF-8
5,259
2.65625
3
[ "MIT" ]
permissive
// Copyright 2020 The v8App Authors. All rights reserved. // Use of this source code is governed by a MIT license that can be // found in the LICENSE file. #include <queue> #include <iostream> #include <algorithm> #include "Logging/Log.h" #include "TestLogSink.h" namespace v8App { namespace TestUtils { ...
true
d5c2e6e4c0365750ac4757d8b452399d2869770a
C++
alexvking/Clondike
/Clondike/Card.cpp
UTF-8
278
2.5625
3
[]
no_license
// // Card.cpp // Clondike // // Created by Alex King on 6/30/17. // Copyright © 2017 Alex King. All rights reserved. // #include "Card.hpp" Card::Card() { this->rank = RANK_2; this->suit = HEART; } Card::Card(Rank r, Suit s) { this->rank = r; this->suit = s; }
true
49a1efe0a7fd59167cfef3dfc2513fae767a9175
C++
Team3835Vulcan/robot-2018
/robot2018/src/Commands/Collector/SwitchClaw.cpp
UTF-8
930
2.5625
3
[]
no_license
#include "SwitchClaw.h" #include <Subsystems/Collector/Collector.h> SwitchClaw::SwitchClaw() { // Use Requires() here to declare subsystem dependencies // eg. Requires(Robot::chassis.get()); } // Called just before this Command runs the first time void SwitchClaw::Initialize() { if(Collector::GetInstance().GetClaw...
true
ad9019dfd777b9738e3e0b864322630a3325db79
C++
wangyongliang/nova
/poj/1923/POJ_1923_2800560_AC_0MS_1236K.cpp
UTF-8
1,128
2.625
3
[]
no_license
#include <iostream.h> #include <memory.h> #include <stdio.h> const int maxn = 101; const int maxm = 10001; int flag,N,M,dp[maxn][maxm]; void Dynamic(int T) { int i,j,k,e,t; for (i=flag; i<=N; i++) { t = i * (i-1) / 2; for (j=1; j<=t; j++) { if (dp[i][j]) continue; for (k=0; k<=i; k...
true
22d05990e7a01f181ebf2d82082ff8a0e6193f90
C++
LeandroRodriguez/fpietomrearoleanoagus
/NodoInterno.cpp
UTF-8
14,446
2.953125
3
[]
no_license
#include "NodoInterno.h" bool compare (SubClaveRef* s1, SubClaveRef* s2){ bool resultado = s1->esMenorEstrictoQue(s2); return resultado; }; bool NodoInterno::SeRepiteSubclave(SubClaveRef* item){ list< SubClaveRef* >::iterator it; it = this->ListaSubClaveRef->begin(); bool SeRepite=fa...
true
ee616e7a7b497c1b667baa4aa0ee98695e404445
C++
marioblendea/CPPPlayground
/problems/largestNumberFrom2Arrays/largestNumberFrom2Arrays.test.cpp
UTF-8
384
3.078125
3
[]
no_license
#include "gtest/gtest.h" #include "largestNumberFrom2Arrays.h" TEST(LargestNumberFrom2Arrays, test123) { LargestNumberFrom2Arrays s; std::vector<int> v1 = {3, 4, 6, 5}; std::vector<int> v2 = {9, 1, 2, 5, 8, 3}; auto res = s.maxNumber(v1, v2, 3); EXPECT_EQ(res[0], 9); EXPECT_EQ(res[1], 8); EXPECT_EQ(res[...
true
c3abf22793f27611e299a5d380fe5f98d2ff39d2
C++
erniep/Potatoes
/Ernie/Communication/V1 Working Comm with Checksum in header/masterpi/fromPi/naviSyst2.h
UTF-8
39,526
2.640625
3
[]
no_license
#include "virtualMap.h" #include <time.h> #include <queue> #include <stack> #include <deque> #include <list> #include <iostream> #include <fstream> #include <wiringPi.h> #include <wiringSerial.h> #include "loopingUltra.cpp" #define LOG // Enables log file mode #ifdef LOG ofstream file("testLog.txt"); #endif #define SE...
true
46d935f945d610f63bc74305a971732783625552
C++
OverHold1997/hello-world
/第三题/Complex.cpp
UTF-8
336
3.03125
3
[]
no_license
#include "Complex.h" Complex Complex::operator +(Complex &c) { return Complex(real+c.real,imag+c.imag); } Complex Complex::operator+(int &i) { return Complex(real+i,imag); } void Complex::display() { cout<<"("<<real<<","<<imag<<"i)"<<endl; } Complex operator+(int&i,Complex &c) { return Complex(i+c.re...
true
0329d71664ae2c5bdd3a6b2204e17f36af6e59cf
C++
LucaValenti/Programmazione2
/EsercizioPoligoni1/ellisse.hpp
UTF-8
1,262
3.203125
3
[]
no_license
#include<iostream> #include<cmath> #include<sstream> #include"forma.hpp" using namespace std; class Ellisse: public Forma{ protected: double x,y; double r1,r2; public: Ellisse(double _x, double _y, double _r1, double _r2): x(_x), y(_y), r1(_r1), r2(_r2){} ...
true
7b4e14d6c968f34f370cdeca100b9aaa5dd37b81
C++
JunJun0411/Algorithm
/algorithm/2493번 탑.cpp
UTF-8
444
2.59375
3
[]
no_license
#include <iostream> #include <vector> #include <utility> using namespace std; #define INF 100000001 int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); vector<pair <int, int> >vec2; vec2.push_back(make_pair(INF, 0)); int N, M; cin >> N; for (int i = 1; i <= N; i++) { cin >> M; while (v...
true
2c202b31b34b6780beb2ffae56df953353292bdc
C++
Kleinsche/cocos2d-x-Teach
/教程/NoOneDie/Classes/GameController.cpp
UTF-8
1,861
2.5625
3
[]
no_license
// // GameController.cpp // NoOneDie // // Created by Kleinsche on 2017/7/7. // // #include "GameController.hpp" bool GameController::init(Layer* layer,float poitionY){ _layer = layer; _positionY = poitionY; visibleSize = Director::getInstance()->getVisibleSize(); //添加边框 edge = Edge...
true
e569e902150df0376f8deb6c9aff5b4219f8701a
C++
mixify/algorithm
/cpp/stair_step.cpp
UTF-8
1,142
2.859375
3
[]
no_license
#include <stdio.h> #include <cstring> #include <iostream> #include <algorithm> #include <climits> #include <vector> #include <utility> #include <set> #include <map> using namespace std; int cache[302][2]; int climb(vector<int> stair, int n, int adjacent_count); int main(int argc, char *argv[]) { int stair_num; ...
true
38e78d525c5da8c1065bc2d133d52ef62be91b89
C++
DelusionsOfGrandeur/labs
/ввп5(2).cpp
WINDOWS-1251
759
3
3
[]
no_license
#include <stdio.h> #include <math.h> #include <locale.h> int main() { setlocale(LC_ALL, "Russian"); int a, b, c, ac, bc, s; printf(" a \n"); scanf("%d", &a); printf(" b \n"); scanf("%d", &b); printf(" c \n"); scanf("%d", &c); ac = abs(a - c); bc = abs(b - c); s = ac + bc; pr...
true
27694099529502a149f55448fc46fcd1c4e2e718
C++
WickedDevice/ESP8266_AT_Client
/examples/set_mac/set_mac.ino
UTF-8
1,664
2.671875
3
[]
no_license
#include <ESP8266_AT_Client.h> int esp8266_enable_pin = 23; // Arduino digital the pin that is used to reset/enable the ESP8266 module Stream * at_command_interface = &Serial1; // Serial1 is the 'stream' the AT command interface is on ESP8266_AT_Client esp(esp8266_enable_pin, at_command_interface); // instantiate the...
true
491ebc48f50e0945a5baeeda17d7d363b81977bf
C++
lynch829/Gate
/source/geometry/include/GateWedgeComponent.hh
UTF-8
2,754
2.65625
3
[]
no_license
/*---------------------- Copyright (C): OpenGATE Collaboration This software is distributed under the terms of the GNU Lesser General Public Licence (LGPL) See GATE/LICENSE.txt for further details ----------------------*/ #ifndef GateWedgeComponent_h #define GateWedgeComponent_h 1 #include "GateSystemCom...
true
7981ac45c52ea78988dba6d3f599dee50531e4b7
C++
ip75/simplex
/main.cpp
UTF-8
2,170
2.796875
3
[ "MIT" ]
permissive
#include <iostream> #include <ctime> #include <boost/bind.hpp> #include <boost/shared_ptr.hpp> #include <boost/asio.hpp> #include <boost/format.hpp> #include <boost/filesystem.hpp> #include <boost/program_options/cmdline.hpp> #include <boost/program_options.hpp> using namespace std; using namespace boost; using namesp...
true
d558e8c2277a18aebffa3e3ffdcc230e5335f2f3
C++
ammarhakim/gkeyll1
/slvrs/LcMomentsAtEdgesUpdater.cpp
UTF-8
17,000
2.5625
3
[]
no_license
/** * @file LcMomentsAtEdgesUpdater.cpp * * @brief Computes several parallel velocity moments of the distribution function at both edges. * Used for 1D/1V SOL Problem (Adiabatic Electrons) */ // config stuff #ifdef HAVE_CONFIG_H # include <config.h> #endif // lucee includes #include <LcMomentsAtEdgesUpdater.h> #...
true
c60e6dfd2fc3030a240df77bef9a0be463249734
C++
SamuelEsd/Algorithmic_Toolbox
/week5_dynamic_programming1/3_edit_distance/edit_distance.cpp
UTF-8
1,212
3.171875
3
[]
no_license
#include <bits/stdc++.h> #include <iostream> #include <string> using std::string; using std::vector; using std::cout; using std::min; int edit_distance(const string &str1, const string &str2) { vector<vector<int>> matrix(str1.size()+1, vector<int>(str2.size()+1)); int i = 0; for(int row = 0; row < str1.size()+1...
true
6edd668d5d424ba0d7837cff25dd15b30823a99e
C++
iamolivinius/frankfurt_university_material
/objektorientierte_programmierung_grundlagen/aufgabenblatt_2/aufgabe_5/TemperaturMeasurement.h
UTF-8
581
2.65625
3
[]
no_license
#ifndef TEMPERATURMEASUREMENT_H_ #define TEMPERATURMEASUREMENT_H_ class TemperaturMeasurement { private: double value; public: static const double k_cons; static const double f_cons_mult; static const double f_cons_add; TemperaturMeasurement(); TemperaturMeasurement(double val); ~Tempera...
true
4f885173dc2757e5f4c780ee096519434d56c70d
C++
gauravk268/Competitive_Coding
/LeetCode/1631. Path With Minimum Effort.cpp
UTF-8
1,295
2.765625
3
[]
no_license
class Solution { public: int dx[4] = {0, 0, -1, 1}; int dy[4] = {-1, 1, 0, 0}; bool isValid(int x, int y, int n, int m) { return (x >= 0 && y >= 0 && x < n && y < m); } bool fun(vector<vector<int>> &h, int k) { int n = h.size(), m = h[0].size(); bool vis[n][m]; memset(vis, false, sizeof...
true
1cda4ae0e165bb2624a8a128ad6a14dc321b4db8
C++
pabletecor/UHU
/Grado Ingeniería Informática (Computación)/1º/2 Cuatri/EDII/Ejercicios/Ejercicio1-21.cpp
UTF-8
1,131
2.921875
3
[]
no_license
//SOLUCION AL EJERCICIO 1 HACIENDO USO DE PUNTEROS AUXILIARES #include <iostream> #include <conio.h> using namespace std; int main() { char respuesta; float suma=0; int fila,col; float **Datos=new float*[100]; if (Datos!=NULL) { float *Tabla; for (int i=0;i<100;i++) { Datos[i]=new float[10...
true
7b1bf2ae9f76d094452bb098b72180cf17a27a87
C++
ereichen/neural_nets
/net_signals.h
UTF-8
2,648
2.6875
3
[ "MIT" ]
permissive
#ifndef NET_SIGNALS_H #define NET_SIGNALS_H #include <vector> #include "neural_nets\detail\random_utils.h" #include "neural_nets\detail\matrix_utils.h" #include "neural_nets\detail\linear_feedback_shift_register.h" namespace neural_nets { namespace net_signals { template <typename T> boost::numeric::ublas::vect...
true
1849a6d801efecf6ce8142373296a65d0c122cf8
C++
WishAllVA/cpp-programs
/Codeforces/Codeforces 729 - A.cpp
UTF-8
608
3.125
3
[]
no_license
// You are given a multiset (i. e. a set that can contain multiple equal integers) containing 2n integers. // Determine if you can split it into exactly n pairs (i. e. each element should be in exactly one pair) // so that the sum of the two elements in each pair is odd (i. e. when divided by 2, the remainder is 1) #i...
true
3b8dd1585ed4bf819380d808448936ee8e249b32
C++
AnByeongWoong/RTU_ObjectOrientedProgramming
/Demo solution - bicycle and guitar abstractions-20200501/ItemSpec.h
UTF-8
300
2.5625
3
[]
no_license
#pragma once #ifndef ITEM_SPEC #include <ostream> class ItemSpec { public: virtual void send_to(std::ostream& os) const = 0; virtual bool matches(const ItemSpec& itemSpec) const = 0; }; std::ostream& operator<<(std::ostream& os, const ItemSpec& spec); #endif // !ITEM_SPEC
true
f95761567763190dcc8bc2aa06adcc798b8b7783
C++
greenfox-zerda-sparta/kingamagyar
/Week_04/Day_02/07Car.cpp
UTF-8
236
2.640625
3
[]
no_license
/* * Car.cpp * * Created on: Nov 8, 2016 * Author: Kinga */ #include "Car.h" #include <iostream> Car::Car(string type, double km) { this->type = type; this->km = km; } void Car::run(double num) { cout << km + num; }
true
bb47d78de639f4724511fbcd03c4d6746d009298
C++
nipun0307/AlgorithmBasics
/Tree_Transversal.cpp
UTF-8
2,627
4
4
[]
no_license
//Binary Tree and Transversals #include <stdio.h> #include <stdlib.h> struct node{ int data; struct node *right_child; struct node *left_child; }; struct node *new_node (int x){ struct node *ptr; ptr=(struct node*)malloc(sizeof(struct node)); ptr->data=x; ptr->left_child=NULL; ptr->ri...
true
49f6bb1b9a9ea3ccf9926a7c68314e63bad46254
C++
warsztatywww/metaprogramming
/fib.cpp
UTF-8
347
3.140625
3
[]
no_license
#include <iostream> using namespace std; template <int n> struct fib { const static unsigned int value = fib<n-1>::value + fib<n-2>::value; }; template <> struct fib<0> { const static unsigned int value = 1; }; template <> struct fib<1> { const static unsigned int value = 1; }; int main() { cout << ...
true
a69363dda5406b32c108a660cdba22196af3d51e
C++
vatva691/baitapc
/Untitled6.cpp
UTF-8
250
2.78125
3
[]
no_license
#include <stdio.h> #include <math.h> int main () { float r, c, s; printf("\nNhap vao ban kinh cua hinh tron : "); scanf("%f",&r); c=2*3,14*r; s=pow(r,2)*3,14; printf("\nChu vi hinh tron la: %f",c); printf("\nDien tich hinh tron la: %f",s); }
true
4d8ea09443e8eb10b2b29517451754bc80b52714
C++
zhouxiaoisme/caffe-easy
/src/caffe/layers/reverse_layer.cpp
GB18030
3,230
2.609375
3
[ "BSD-2-Clause", "LicenseRef-scancode-generic-cla" ]
permissive
#include "caffe/layers/lstm_common_layers.hpp" namespace caffe { /* zx commment: bottom[0] data shape = [30, 1, 384, 10] = [N, C, H, W] reverseLayer ǽ[N, C, H, W] blob ָijά, data reorder, ԭ(1, 2, 3, ..., shapeOfThisDim) 洢˳ reversely reoderΪ(shapeOfThisDim, ...., 3, 2, 1) : ٶNάȽreverse, ôǽNάȿԭblob(:blobά忴һ1d vector....
true
b4c6be6e12a5d4d965a53caf7429efb22261452f
C++
Bk8/impulse-response-raytracer
/flattener/Source/SpeakerListBoxModel.cpp
UTF-8
1,595
2.765625
3
[]
no_license
// // SpeakerListBoxModel.cpp // flattener // // Created by Reuben Thomas on 25/01/2014. // // #include "SpeakerListBoxModel.h" SpeakerListBoxModel::SpeakerListBoxModel (std::vector<Speaker> & speaker) : speaker (speaker) { } int SpeakerListBoxModel::getNumRows() { return speaker.size(); } void Speake...
true
d01be2391ea07a32c56a4de9f8f70838f37b170c
C++
RhobanProject/Common
/communication/Buffer.cpp
UTF-8
4,092
2.796875
3
[]
no_license
/************************************************* * Publicly released by Rhoban System, August 2012 * www.rhoban-system.fr * * Freely usable for non-commercial purposes * * Licence Creative Commons *CC BY-NC-SA * http://creativecommons.org/licenses/by-nc-sa/3.0 *************************************...
true
15e679723e3d4642bd33e42e5dd99b53eabda595
C++
zzlc/FileProcess
/FileProcess/Global/GlobalConfig.cpp
GB18030
3,858
2.78125
3
[]
no_license
#include "GlobalConfig.h" #include <io.h> CSpdLog* CSpdLog::_spd_logger_ptr = nullptr; CGlobalConfig* CGlobalConfig::_global_config_ptr = nullptr; CGlobalConfig::CGlobalConfig() { LOGGER->info("{}", __FUNCTION__); } CGlobalConfig::~CGlobalConfig() { LOGGER->info("{}", __FUNCTION__); LOGGER->flush(); } C...
true
a4a61a23f6404022c4d851b1f24d355c78592454
C++
ilya-prudnikov/lr7
/LabRab7.cpp
UTF-8
1,142
3.125
3
[]
no_license
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "rus"); int j, dlina, start, end; char st[100], chislo[100]; cout << "Введите пожалуйста строку до 100 символов, содержащую 1 число с фиксированной точкой: " << endl; cin >> st; dlina = strlen(st);//Функция strlen видит начало Си-строки и ...
true
67679abf10785faba4f9af8a9c9dca13dbef8a7b
C++
Debu922/ESO207
/PA_1/triangle_migration_recursive.cpp
UTF-8
796
2.921875
3
[]
no_license
/* ######################################### # Solution by Debaditya Bhattacharya # # Roll No: 190254 # # Email-id: debbh@iitk.ac.in # # Hackkerrank-id: @debbh922 # ######################################### */ #include <iostream> using namespace s...
true
49d1fd5fb0b8f38e70ed1f2d25dfc67bdec83e8a
C++
lgsonic/mysqlIncSync
/src/log/log.h
UTF-8
1,314
2.71875
3
[]
no_license
#ifndef _D_LOG_H_ #define _D_LOG_H_ #include <string.h> #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <unistd.h> #include <time.h> #include <fcntl.h> #include <string> #include <iostream> #include <sstream> #define LOG(x) CLog(CLog::x).Log inline std::string GetDateString(const ...
true
127319b1cfe92ea830b69d08ee9cb4ca0d7c61a0
C++
TLabahn/Game_Collection
/SDL_functions.h
ISO-8859-1
3,091
2.65625
3
[]
no_license
#include <SDL2/SDL.h> #include <SDL_image.h> #include <SDL_ttf.h> #include <stdio.h> #include <stdlib.h> #include <string> #include <stdbool.h> #include <cmath> /*Generelle Funktionen, Makros, Globale Variablen etc. die im Zusammenhang zu SDL2 stehen */ //Bildschirmauflsung const int SCREEN_WIDTH = 1...
true
c36b58a697e95c5c19bdc4ccae992a9233a6f49d
C++
pellarolojuani/pruebas
/src/Parser/Parser.h
UTF-8
929
2.59375
3
[]
no_license
/* * Parser.h * * Created on: Apr 2, 2013 * Author: lucia */ #ifndef DELIMITADORES #define DELIMITADORES ",.;: ¡!¿?\"<>(){}-_”[]'\n\t\b" #endif /*DELIMITADORES*/ #ifndef MAX_POSICIONES_LINEA #define MAX_POSICIONES_LINEA 200 #endif /* MAX_POSICIONES */ #ifndef PARSER_H_ #define PARSER_H_ #include <iostrea...
true
e300dd535ee8181e96ffd7104ec1bb3854925653
C++
TiwariSimona/Hacktoberfest-2021
/Aniket_Raj/kthsetbit.cpp
UTF-8
429
3.28125
3
[ "MIT" ]
permissive
#include<iostream> using namespace std; int main() { int n,k; cout<<"Enter the value of n and k: "; cin>>n>>k; int temp=n; //using right shift operation n=n>>(k-1); if(n&1) cout<<"Yes kth bit is a set bit\n"; else cout<<"No kth bit is not a set bit\n"; n=temp; //using left ...
true
2f594c60b98197d6b902561007a6ecfdc9ff8346
C++
mhhuang95/LeetCode
/leetcodec++/leetcode211.cpp
UTF-8
1,919
3.578125
4
[]
no_license
// // Created by 黄敏辉 on 2019-09-02. // class TrieNode{ public: TrieNode(bool end=false){ memset(branches, 0, sizeof(branches)); isEnd = end; } TrieNode* branches[26]; bool isEnd; }; class WordDictionary { public: /** Initialize your data structure here. */ WordDictionary() { ...
true
67838ab0e778ac9d4279d80c89d4cc5a529e9753
C++
lemon123456/ksc-archive
/cs320/SecuritySimulator/environment.h
UTF-8
708
2.515625
3
[]
no_license
#ifndef ENVIRONMENT_H #define ENVIRONMENT_H #include <QObject> #include "database.h" #include "authenticator.h" class User; class Environment : public QObject { Q_OBJECT public: explicit Environment(QObject *parent = 0); virtual ~Environment(); bool login(const QString &username, const QString &passw...
true