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
8df55cc20b643112268bf058034f650e25875508
C++
citiral/olliOS
/kernel/memory/LinearAlloc.cpp
UTF-8
1,197
3.015625
3
[]
no_license
// // Created by citiral on 9/23/16. // #include "LinearAlloc.h" #include "linker.h" #include "cdefs.h" #include <stdio.h> #include <string.h> LinearAlloc::LinearAlloc() { } void LinearAlloc::init(void* start, size_t length) { this->start = static_cast<char*>(start); remaining = length; } void* LinearAlloc...
true
0a4668d49aed9075ff922469862c0ab98d44d203
C++
VVZzzz/MyWebServer
/MyWebServer/Log/LogFile.cpp
UTF-8
748
2.734375
3
[]
no_license
#include "LogFile.h" #include <stdio.h> #include "FileUtil.h" using namespace std; LogFile::LogFile(const std::string &str, int n) : basename_(str), everyNAppendFlush_(n), count_(0), mutex_(new MutexLock) { file_.reset(new AppendFile(basename_)); } LogFile::~LogFile(){}; void LogFile::append(const char *logl...
true
5d9bd21e99c07c1750303df55df70a904bbad02f
C++
kmrshivamit/check_redis
/check_redis_master_connected_slaves.cpp
UTF-8
12,903
2.625
3
[]
no_license
#include "check_redis_config.h" #include "redis_info.hpp" #include "redis_slave_info.hpp" #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <hiredis.h> #include <iostream> #include <string> #include <vector> #include <climits> const char *short_options = "SH:hp:t:c:w:"; static struct option long_opt...
true
187ddb933725735dd7d20b02bf907cad40721f07
C++
oneapi-src/oneAPI-samples
/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/merge_sort/src/sorting_networks.hpp
UTF-8
4,753
3.234375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#ifndef __SORTINGNETWORKS_HPP__ #define __SORTINGNETWORKS_HPP__ #include <algorithm> #include <sycl/sycl.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> // Included from DirectProgramming/C++SYCL_FPGA/include/ #include "constexpr_math.hpp" using namespace sycl; // // Creates a merge sort network. ...
true
e41471c8e59c85d6597bed5b3de81eafff0284ff
C++
YuSangBeom/algorithm
/BOJ/18. 이분 검색/1654 랜선 자르기.cpp
UTF-8
742
2.90625
3
[]
no_license
#include<iostream> #include<algorithm> typedef unsigned long long ull; using namespace std; ull Arr[10001]; ull binarySearch(const int & K, const int & N) { ull first = 1; ull last = 0; ull ret = 0; for (int i = 0; i < K; i++) { last += Arr[i]; } last /= N; ull mid = 1; while (first <= last) { mid = (...
true
2423c48a936050bff51c2c7eb61195ab6f415d24
C++
Yvaine/obstacle-avoidance
/src/core/types/Image16bit.h
UTF-8
1,787
3.3125
3
[]
no_license
// // Created by paul on 12/05/15. // #ifndef OBSTACLE_AVOIDANCE_IMAGE16BIT_H #define OBSTACLE_AVOIDANCE_IMAGE16BIT_H #include <opencv2/core/core.hpp> #include "exceptions/IncorrectImageTypeException.h" /** * A convenience class to distinguish 16-bit images from 8-bit images. */ class Image16bit : public cv::Mat ...
true
66a793d6e0cdb1565553d971180342bd6f5c5a0e
C++
icrelae/cpp_primer
/8-io_library/8.3a-manage_output_buffer.cpp
UTF-8
756
3.15625
3
[]
no_license
/* 2016.11.07 22:01 * P_283 * !!! * endl; flush; ends; unitbuf; nounitbuf; tie !!! * exceptions will cause buffer stuck !!! * cout is relavant with cin, so cin will make cout refresh !!! * stream can tie with only one ostream pointer !!! */ #include <iostream> #include <string> #include <vector> using namespace...
true
5663df24d13c8b8d04a8d2afe287eabca0d4591a
C++
sankalp163/CPP-codes
/Linked-Lists/Check Palindrome Linked LIst(Important).cpp
UTF-8
1,412
3.375
3
[]
no_license
void ReverseList(Node**head){ Node* prev=NULL; Node*curr=*head; Node*fwd=NULL; while(curr){ fwd=curr->next; curr->next=prev; prev=curr; curr=fwd; } *head=prev; } bool compareLists(struct Node* head1, struct Node* head2) { struct...
true
244520418b7bb0c62b60666871c90885b4fba496
C++
Neinun/100codes
/leetcode#34.cpp
UTF-8
1,213
3.0625
3
[]
no_license
class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int start = 0; int n = nums.size(); int end = n-1; int mid,first = -1,last = -1; if(n == 1 && nums[0] == target) { first = 0; last = 0; ...
true
91e5f0cc10d20ebb8e63f7f78424ad0a8ea2a5db
C++
titasurbonas/-EmbeddedRealTimeSystems-
/project/lab_based_hardware/audio/audio.sdk/Driver_alt/src/UserControlThread.h
UTF-8
1,042
2.71875
3
[]
no_license
/* * UserThread.h * * Created on: 18. aug. 2017 * Author: Kim Bjerge */ #ifndef SRC_USERCONTROLTHREAD_H_ #define SRC_USERCONTROLTHREAD_H_ #include "hal/Switch.h" #include "hal/Leds.h" #include "os/Thread.h" #include "UserParameters.h" class UserControlThread : public Thread { public: ...
true
dcb4649ebac6788f9f67b677dc04c680346c73d3
C++
PowerFighter/AlgorithmsDataStructures
/FramworkDev/linkedList.h
UTF-8
1,043
3.421875
3
[]
no_license
#pragma once /* The List class is a one way linked list with functions that can be implemented for higher level data-structures*/ /* Uses the lNode structure which has the one-way link to the next node*/ #include <iostream> #include "lNode.h" using namespace std; template <class datType> class List { public: //Ini...
true
d9841edca57aef5e2f33940333313ed3cbb9fb33
C++
GregWagner/EyeOfTheBeholder2
/EyeOfTheyBeholder2/language.cpp
UTF-8
666
2.9375
3
[]
no_license
#pragma warning(disable : 4996) #include "language.h" #include <cstdio> #include <string> void Language::init(short language = 0) { // 0 = English, 1 = German FILE* file; std::string fileName; if (language == 0) fileName = "data/english.lang"; if (language == 1) fileName = "data/ge...
true
e0af8a97d39ee1c55ebfa9a8c171056507705fa1
C++
daniel0ferraz/Introducao-a-Programacao
/Tema 7 - Estrutura de repetição WHILE/Ex1.cpp
ISO-8859-1
351
2.84375
3
[]
no_license
#include<stdio.h> int main(){ int cont,par=0,impar=0; cont=1; while(cont<=20){ // condico para que a repetio seja realizada printf("%d\n",cont); cont++;// incremento da variavel para atualiza-la if(cont%2==0) par++; else impar++; } printf("Par: %d\n",par); printf...
true
27546c0fa46143965765f13c19f554f625156bab
C++
gongzhxu/GxNetBase
/base/Buffer.h
UTF-8
713
2.875
3
[]
no_license
#ifndef buf_FER_H_ #define buf_FER_H_ #include <vector> #include <memory> class Buffer; typedef std::shared_ptr<Buffer> BufferPtr; #define MakeBufferPtr std::make_shared<Buffer> /* Buffer: extensible buffer block */ class Buffer { public: Buffer() {} virtual ~Buffer() {} public: char * data() { retur...
true
4398fa5ab51b23b7496423c49e2c711bd13c685f
C++
stanley-yangguang/Random-Seating
/start.cpp
UTF-8
7,286
2.90625
3
[ "Unlicense" ]
permissive
#include<iostream> #include<fstream> #include<vector> #include<map> #include<chrono> #include<random> using namespace std; #define MAXN 100 mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); bool mp[MAXN][MAXN]; int opt,len,dep,len2,dep2,num,stunum,numCancel,numStudent,numNotTgt,filled,randm; strin...
true
30ea6a06d21ada9ea587f27c4d791f0d899d0d8c
C++
soseyeritsyan/bigint-full-
/bigint.hpp
UTF-8
2,497
2.765625
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <stdio.h> using namespace std; class bigint { private: vector<unsigned char> dig; friend void del_zero ( vector<unsigned char> & v ); friend void sys256 ( string & a , vector<unsigned char> & res ); friend void to_bigint ( stri...
true
608676974cf9d9cd6cb0fe59c5ec081b845c6331
C++
R0bLucci/platformGame
/src/graphic.cpp
UTF-8
2,591
2.984375
3
[]
no_license
#include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #include "../header/graphic.hpp" #include "../header/globals.hpp" #include <iostream> Graphic::Graphic() : window(nullptr), renderer(nullptr) { if(!this->window){ this->window = SDL_CreateWindow("Game", 100, 100, globals::WIDTH, globals::HEIGHT, SDL_WINDOW_SHOWN); ...
true
157658f1445ed5c4b23ee64281dcddc1a7972668
C++
jer22/OI
/hdu/1518/1518.cpp
UTF-8
1,148
2.765625
3
[]
no_license
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> using namespace std; int T, n; int arr[25]; bool vis[25]; int totlen; bool dfs(int pos, int len, int cnt) { // cout << pos << ' ' << len << ' ' << cnt << endl; if (cnt == 4) return true; for (int i = pos; i >= 1; i--) { if (vis[i]) co...
true
532f6729e1e9522f0ee58af8cb9ca1ea428d4e12
C++
jeremygf/HCVMicro
/HCVMicro/hcvstatus.h
UTF-8
1,428
2.546875
3
[]
no_license
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //// //// Title: Person.h //// //// Description: A class that represents aspects of a person and //// his/her health etc. //// //// ////////////////////////////////...
true
54cc4111f5f63bf0d5a8860b898dab2339b217f6
C++
ConcordUniversityMath240/FinalProject
/roguelike/inventory.h
UTF-8
7,871
3.484375
3
[]
no_license
/************************************************ inventory.h - Inventory related classes header file. - Item - Inventory Author: MATH 240 Team Purpose: These classes create items and control the player's inventory. *************************************************/ #ifndef INVENTORY_H #defin...
true
eb048ddeb79af9dc630b88f8547ddb0957932cd6
C++
rishabhdhenkawat/DS_LAB_ASSINGMENT
/1 bubble sort.cpp
UTF-8
825
3.5
4
[]
no_license
#include <iostream> using namespace std; void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } void bubble_sort(int a[],int n) { int flag=0; for(int i=0;i<n-1;i++) { for(int j=0;j<n-i-1;j++) { if(a[j]>a[j+1]) { ...
true
37143402bc6234a4fb54e4da67c6a0b6f77fb386
C++
jph83405/Arduino
/Winning_Hackathon_Design/EEPROM_READ.ino
UTF-8
492
2.78125
3
[]
no_license
//EEPROM READER #include <EEPROM.h> int addr=0; byte value; void setup() { Serial.begin(9600); } void loop() { value=EEPROM.read(addr); if((addr+3)%3==0){ Serial.print("temp level = "); Serial.println(value,DEC); } else if((addr+3)%3==1){ Serial.print("sound level = "); Serial.println(v...
true
073fdd6e6379fc3451b4e68da064c3251abdd3e5
C++
galgreg/SchoolStatistics
/school/test/confirmdialogmock.cpp
UTF-8
981
2.609375
3
[]
no_license
#include "confirmdialogmock.h" ConfirmDialogMock::ConfirmDialogMock( const QString &defaultAction, const QString &defaultStudentName) noexcept : mActionString(defaultAction), mStudentName(defaultStudentName) { } void ConfirmDialogMock::showDialog() noexcept { } void ConfirmD...
true
bce7b919002ec4f8ec9c21a3aa624ef2f59bce18
C++
i2s-sys/CSDN
/图论/graph.cpp
UTF-8
8,587
3.0625
3
[]
no_license
#include<iostream> #include<vector> #include<queue> using namespace std; vector<int> sortTopo(vector<vector<int>> ad, vector<int> inDec);//拓扑排序 ad为邻接表 inDec为节点的入度 void sortTopoResult(void);//显示拓扑排序的例子 vector<int> minPathGraphWithoutWeight(vector<vector<int>>ad, int n,int start, int end=-1);//无权无向图的最小路径算法 void minPathGr...
true
c1702517c465408672edb79a96dac8b83f917304
C++
DitaRahmaAmalia/praktikum-algo
/GIT 4/Tugas4_124200032.cpp
UTF-8
985
3.28125
3
[]
no_license
#include <iostream> #include <iomanip> using namespace std; main () { int pilih, M, N, jumlah; cout << "Perkalian dan Perpangkatan" << endl; cout << "[1] Perkalian" << endl; cout << "[2] Perpangkatan" << endl; cout << "Pilih = "; cin >> pilih ; cout << " " <<endl; switch (pilih) { case 1 : cout << "Ma...
true
8efdd1e641603154c0ae3e7302ceafbb6d267700
C++
JaredMacDonald/NDSEngine
/Engine/include/Input/InputManager.h
UTF-8
918
2.515625
3
[]
no_license
#pragma once #include <nds.h> namespace JM { enum EButton { BUTTON_A = KEY_A, BUTTON_B = KEY_B, BUTTON_SELECT = KEY_SELECT, BUTTON_START = KEY_START, BUTTON_DPAD_RIGHT = KEY_RIGHT, BUTTON_DPAD_LEFT = KEY_LEFT, BUTTON_DPAD_UP = KEY_UP, BUTTON_DPAD_DOWN = KEY_DOWN, BUTTON_RIGHT_SHOULDE...
true
ad066304800a7087a43957e9ef581bf3d5b6c0d5
C++
tyhenry/LoVid-ReactionBubble-RAW
/Arduino/IR_Receiver_BeamBreak_CodeDetector_SERIAL_UNO/IR_Receiver_BeamBreak_CodeDetector_SERIAL_UNO.ino
UTF-8
7,799
2.59375
3
[]
no_license
/* * BeamBreak and IR Code detector for LoVid Reaction Bubble Project * by Tyler Henry * * jump from pin 3 to +v sets to IR code detector mode * otherwise, will only report beam breaks over radio * * Designed to work with Atmega328 (Adafruit Trinket Pro or Uno) * * Input Capture function * uses timer hardware to meas...
true
15239223f4f18610d3b9f6b63b4ac154a04a6118
C++
AidanTemple/Network_Game_Sample
/AG1107A/UDPSocket.cpp
UTF-8
2,414
2.65625
3
[]
no_license
#pragma region Includes #include "UDPSocket.h" #include <stdio.h> #pragma endregion #pragma comment(lib, "ws2_32.lib") UDPSocket::UDPSocket() { m_SocketAddrSize = sizeof(sockaddr_in); Socket = 0; } UDPSocket::~UDPSocket() { Shutdown(); ...
true
2f5fdf964dbe9c986b51987b309de07c7c9f0b16
C++
vxl/vxl
/contrib/brl/bbas/bocl/bocl_buffer_mgr.cxx
UTF-8
4,215
2.65625
3
[]
no_license
#include <iostream> #include "bocl_buffer_mgr.h" #ifdef _MSC_VER # include "vcl_msvc_warnings.h" #endif bocl_buffer_mgr* bocl_buffer_mgr::instance_=NULL; bocl_buffer_mgr* bocl_buffer_mgr::instance() { if (instance_ == NULL) instance_= new bocl_buffer_mgr(); return instance_; } bool bocl_buffer_mgr::create_r...
true
8b74b8f745407c1e1b281b104f46f7ba343e422c
C++
AkiraRafhaelJP/IoT
/test_relay_dht.ino
UTF-8
2,238
2.609375
3
[]
no_license
#include <WiFi.h> #include <MQTT.h> #include "DHT.h" #define RELAYPIN 23 #define DHTPIN 19 #define DHTTYPE DHT11 const char ssid[] = "ANDEKO 07"; const char pass[] = "LANTAI 1 MAS"; // //const char ssid[] = "ANDEKO 06"; //const char pass[] = "LANTAI 2 MAS"; const char espname[] = "ESP32"; const char u...
true
ccd6b3ae623d238c763a093794d15df336f2e06c
C++
morkvinaValeria/OOP
/Lab8/c++/Lab 8.cpp
UTF-8
1,064
3.390625
3
[]
no_license
#include <stdexcept> #include <iostream> #include <string> using namespace std; int LenRow(string** a) { int i = 0; while (a[0][i] != "\0") i++; return i; } int LenCol(string** a) { int j = 0; while (a[j][0] != "\0") j++; return j; } string* Get_MainDiagona...
true
08b46bb04b9f511411709d50cd77f86a2d832cd0
C++
hunkar/c-c-
/deleteSpaces.cpp
UTF-8
569
3.21875
3
[]
no_license
/*Hünkar PURTUL*/ /*hunkarpurtul.blogspot.com*/ /*02.07.2016*/ /*Delete spaces in the char array*/ #include <stdio.h> #include <conio.h> int main() { char dizgi[100]; //Char array with 100 limit. int i, j; printf("Enter the array: \n"); gets(dizgi); for(i=0; dizgi[i]!='\0'; i++) //first l...
true
23c7a064b099cfd35d240504a7645a20645b56c9
C++
rahsinha2/Algorithms
/ArraysNStrings/UniqueCharacters/unique_characters.cpp
UTF-8
1,226
3.609375
4
[]
no_license
#include<iostream> #include<stdio.h> #include<string.h> #include<stdlib.h> using namespace std; #define ASCII_CHARACTERS 128 void bool_check_unique_characters(char * string); int main(int argc, char ** argv) { char * string = (char*)malloc(strlen(argv[1]+1)); memset(string,0, strlen(argv[1])+1); strncpy(string, arg...
true
abd427a15b343daae99f05246cf4b94167de5caf
C++
LCMcu/QT_TCP_client
/serialport/mainwindow.cpp
UTF-8
3,742
2.625
3
[]
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { int ret=0; timer=new QTimer(); ui->setupUi(this); ret=SerialPortInit(); timer->setInterval(100); connect(serialport,SIGNAL(readyRead()),this,SLOT...
true
25f9710b11de0851674f85772f0eb2d1fd9fb440
C++
The-DeadPixel/Parralell-Programming-Term-Project
/OMPSearch/StemExcep.h
UTF-8
1,251
2.59375
3
[]
no_license
/* Updated for implimenting Parralell OMP * Name: Luke Burford * Data: 12/6/18 * Email: lburford@rams.colostate.edu */ /* Name: Luke Burford * Date: 10/17/17 * Email: lburford@rams.colostate.edu */ #ifndef STEMEXCEP_H_INCLUDE #define STEMEXCEP_H_INCLUDE #include <Stem.h> #include <iostream> #include <fstream...
true
4fb644321fab80930c3fc26e2d1fac054d8e1e37
C++
andrewmo2014/Ray-Casting
/Sphere.cpp
UTF-8
1,101
2.859375
3
[]
no_license
#include "Sphere.h" using namespace std; bool Sphere::intersect( const Ray& r , Hit& h , float tmin){ //Ray-Sphere Intersection //t = (-b +- sqrt(b^2 - 4ac)) / 2a //a = (R_d . R_d) //b = 2(R_d . R_o) //c = (R_o . R_o) - r^2 Vector3f R_o = r.getOrigin() - this->center; Vector3f R_d ...
true
464eba082e8d494a6d7becde0ef2f69165e9c804
C++
cjamanambu/OO_EventDriven_Sim
/IntItem.cpp
UTF-8
325
2.625
3
[]
no_license
// // Created by CJ on 2017-03-08. // #include "IntItem.h" // descriptors for the header file declarations in IntItem.h IntItem::IntItem() {} IntItem::~IntItem() {} IntItem::IntItem(int value) { this->value = value; } int IntItem::getValue() { return value; } void IntItem::print() { cout << value << en...
true
c46a0131498194ccfcee3a8316164327df793ec7
C++
johntalton/PortSpy
/IPHistory.cpp
UTF-8
1,464
2.6875
3
[]
no_license
/******************************************************* * PortSpy© * * @author YNOP(ynop@acm.org) * @vertion beta * @date October 19 1999 *******************************************************/ #include "IPHistory.h" IPHistory iphistory; /******************************************************* * ***...
true
2f5993bea07ff1b7cf59e474963c7533f5be1206
C++
tnsgh9603/BOJ_Old
/최단경로.cpp
UHC
2,711
3.6875
4
[]
no_license
#include <iostream> #include <vector> #include <queue> // priority_queue ʿ #define max 200000000 // infinity ǥϱ using namespace std; vector< pair<int, int>> arr[20001]; // 2 迭 20001 vector<int> dijkstra(int start, int V, int E) { vector<int> dist(V, max); // dist ͸ Vũ ŭ max ʱȭ dist[start] = 0; // Ÿ 0̹Ƿ ...
true
d0780d580a23582b07c566dffbb4d99decf8c3bd
C++
zeos/signalflow
/examples/cpp/sine-field-example.cpp
UTF-8
1,553
2.84375
3
[ "MIT" ]
permissive
/*------------------------------------------------------------------------ * SineOscillator field example * * An array of delayed sine pings. *-----------------------------------------------------------------------*/ #include <signalflow/signalflow.h> using namespace signalflow; int main() { /*--------------...
true
9a657f7aa15bd04a6eb1348cf35cc03a0285a527
C++
atharva1910/DailyChallenges
/cipher.cpp
UTF-8
339
3
3
[]
no_license
#include <string> #include <iostream> /* Ceaser cipher */ int main(int argc, char **argv) { int n,i=0; std::string text; std::cout<<"Enter the shift\n"; std::cin>>n; std::cout<<"Enter the text\n"; std::cin>>text; while(text[i]){ text[i]=text[i]+n; i++; } std::cout<<...
true
ddba7ee1e1a574ff1a644b107a6b5fe79beb5d87
C++
firmread/cinderBasic
/basic2_3D/src/basic2_3DApp.cpp
UTF-8
3,482
2.515625
3
[]
no_license
#include "cinder/app/App.h" #include "cinder/app/RendererGl.h" #include "cinder/gl/gl.h" using namespace ci; using namespace ci::app; using namespace std; class basic2_3DApp : public App { public: void setup() override; void mouseDown( MouseEvent event ) override; void update() override; void draw() override; }...
true
1970fce1ef65c30e347790a8d647ac029c8638ee
C++
claytonkristiansen/CSCE221
/DebuggingActivity/baseTypes.h
UTF-8
3,998
3.328125
3
[]
no_license
//Contains the un-obfuscated base types for the functions to call/throw #pragma once #include "common.h" #include <exception> #include <iostream> #include <string.h> // for c-string functions class Exception0 : std::exception {}; class Exception1 : std::exception {}; class Exception2 : std::exception {}; class Exce...
true
5136f31c0c562973346abdf8996ce05ebbaec8a9
C++
vaplilya/graph-depth-
/обход в глубину/обход в глубину.cpp
WINDOWS-1251
1,150
2.921875
3
[]
no_license
// ConsoleApplication3.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<conio.h> #include<locale.h> #include<iostream> #include <stack> int main() { int n, t; std::stack<int> vertex; setlocale(0, "Russian"); std::cout << " :" << std::endl; std::cin >> n; int** matrix =...
true
08049a9ac6304a0794996f5c8a7450ff59de235a
C++
simon0987/HMM-implementation
/test_hmm.cpp
UTF-8
1,698
2.71875
3
[]
no_license
#include "hmm.h" #include <math.h> #include <string> double viterbi(const HMM &hmm, const char *seq){ double delta[MAX_SEQ][MAX_STATE]; //initialize delta for(int i = 0; i < hmm.state_num;i++) delta[0][i] = hmm.initial[i]*hmm.observation[seq[0]-'A'][i]; //recursion delta only cal...
true
722c4f847a105b787f00a80fec4b08430d5e4786
C++
XRJHandsome/nowcoder
/huawei/0046.cpp
UTF-8
358
3.4375
3
[]
no_license
// 0046.按字节截取字符串 // 根据题意,在判题系统中,汉字以2个字节存储。 #include <iostream> #include <cstring> using namespace std; int main() { string s; int n; while(cin >> s >> n) { if(s[n-1] < 0) s = s.substr(0, n-1); else s = s.substr(0, n); cout << s << endl; } return 0; }
true
c7f15c72a481fbbd1ba6855a2503d44ab0a766ec
C++
willflowers95/src
/simulation/utilities/gauss_markov.h
UTF-8
3,580
2.625
3
[]
no_license
/* ISC License Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. ...
true
629f6599106b29a9fd24ec1aa1253f924320d0f1
C++
VinInn/FPOptimization
/OldExercises/limits.cpp
UTF-8
793
3.09375
3
[]
no_license
#include <iostream> // std::cout #include <limits> // std::numeric_limits int main () { std::cout << std::boolalpha; std::cout << "Minimum value: " << std::numeric_limits<float>::min() << '\n'; std::cout << "Maximum value: " << std::numeric_limits<float>::max() << '\n'; std::cout << "Minimum subnorma...
true
d3aa9202d859e992deda47bd8d21d64e3f45f1da
C++
beru/imageio
/common/gl/circleDrawer.h
UTF-8
4,307
2.625
3
[]
no_license
#pragma once /* 円描画処理 */ #include "buffer2d.h" double elapsed; namespace gl { template <typename NumericT, typename ColorT, typename ColorBlenderT> class CircleDrawer { public: void DrawCircle(ColorT color, NumericT x, NumericT y, NumericT radius) { NumericT sqrRad = radius * radius; N...
true
75ee9ef40c53c56b962f257f2ad1b22622d75a6c
C++
michaeleisel/zld
/ld/src/ld/code-sign-blobs/superblob.h
UTF-8
7,777
2.65625
3
[ "MIT", "APSL-2.0" ]
permissive
// // SuperBlob - a typed bag of Blobs // #ifndef _H_SUPERBLOB #define _H_SUPERBLOB #include "blob.h" #include <assert.h> #include <utility> #include <map> #define REPRO #include "MapDefines.h" using namespace std; namespace Security { // // A SuperBlob is a Blob that contains multiple sub-Blobs of varying type. /...
true
2a4b3f09c17a2f9be5ab2bf7cfbdf60e2b109836
C++
YEJIN-LILY/HandGestureDetection
/countFinger.cpp
UTF-8
5,018
2.609375
3
[]
no_license
#include <opencv2/core.hpp> #include <opencv2/videoio.hpp> #include <opencv2/highgui.hpp> #include <opencv2/opencv.hpp> #include <opencv2/xfeatures2d.hpp> #include <opencv2/imgproc.hpp> #include <iostream> #include <string> #include <math.h> #include <stdio.h> using namespace cv; using namespace std; #define PI 3.14...
true
604e4bee0f26a981a7ab8a34f10a63b43224bc59
C++
LeatherWang/leetcode_cpp
/2_dfs/486_Predict the Winner/main.cpp
UTF-8
1,144
2.890625
3
[]
no_license
#include <iostream> // std::cout #include <vector> // std::vector #include <algorithm> // std::sort #include <math.h> #include <list> #include <map> #include <unordered_map> #include <unordered_set> #include <memory.h> #include <climits> #include <sstream> #include <set> #include <queue> using namespace std; stru...
true
2c529a02bb635be983bf60cd88818e3274093310
C++
sterling757/Intro-to-Algorithms
/Lab 1/SortingAlgorithm.cpp
UTF-8
4,035
3.1875
3
[]
no_license
// // Created by Sterling on 8/26/2018. // #include "SortingAlgorithm.h" #include "BubbleSort.h" #include "InsertionSort.h" #include "MergeSort.h" #include <chrono> SortingAlgorithm::SortingAlgorithm() { } void SortingAlgorithm::Load(string filePath) { string line; ifstream myFile(filePa...
true
4a7616819bf39210f5b0bc907186c1308a25c206
C++
Majesty5/ET-575-C-
/Day 9/05_Branching_Examples/EX_1a_evaluating_true_1.cpp
UTF-8
727
3.890625
4
[]
no_license
// (c) 2018 S. Trowbridge // Ex 1a - evaluating_true_1 #include <iostream> #include <string> using namespace std; int main() { cout << "Boolean Evaluation" << endl; cout << "------------------" << endl; int w = 4, x = 3, y = 2, z = 1; cout << "w = 4\nx = 3\ny = 2\nz = 1\n\n"; cout...
true
0d6945b2799c52725d90e44f7698ef4cbceef884
C++
Ciubix8513/Vulkan-engine
/Math/EngineMath.cpp
UTF-8
5,318
2.8125
3
[]
no_license
#include "EngineMath.h" Matrix4x4 EngineMath::Multiply(Matrix4x4 a, Matrix4x4 b) { return a * b; } Vector4 EngineMath::TransformVector(Vector4 v, Matrix4x4 m) { return m * v; } Matrix4x4 EngineMath::PerspectiveProjectionMatrix(float FOV, float screenAspect, float screenNear, float screenDepth) { float ...
true
b7927882c5d92532c2f97b42d2aca35690bbaaf2
C++
etmo6394/Craft
/Sources/Source/Maths/NoiseGenerator.h
UTF-8
730
2.609375
3
[]
no_license
#ifndef NOISEGENERATOR_H_INCLUDED #define NOISEGENERATOR_H_INCLUDED #include "../Util/Random.h" struct NoiseParameters { int octaves; int amplitude; int smoothness; int heightOffset; double roughness; }; class NoiseGenerator { public: NoiseGenerator(int seed); double getHeight(int x, int z...
true
0f84d156643efd07ecb029bfe810afbe448b8ae5
C++
WyattMayfield/SudokuSolver
/NineByNine.h
UTF-8
2,177
3.265625
3
[]
no_license
#pragma once #include <iostream> #include <fstream> using namespace std; const int maxRow = 9; const int maxColumn = 9; class NineByNine { public: void readIn(); int getNineByNine(int r, int c); bool solved(); void insert(int r, int c, int n); void test(); //void insert(int number, int row, ...
true
95997cafbc675f6b4864136923f47a8acb3fd146
C++
Fernandofgs/lista_exercicios_estruturas_e_dados
/exercicios_21_03_2018/exercicios_5.cpp
UTF-8
542
3.09375
3
[]
no_license
//Escreva um programa que declare uma matriz 100x100 de inteiros. Voc? deve inicializar a matriz com //zeros usando ponteiros. Preencha depois a matriz com os numeros de 1 a 10.000 usando ponteiros. #include <stdio.h> #define N 100 main () { int matriz[N][N]; int *p; int i, j, sma = 0; p = &matriz[0]...
true
a6c9967574c3246c0dbaf99a9f57094601337c87
C++
Gh-Story/CodingInterviews
/Offer33.cpp
UTF-8
771
3.234375
3
[]
no_license
#include<iostream> #include<vector> using namespace std; class Solution { public: bool verifyPostorder(vector<int>& postorder) { return dfs(0,postorder.size()-1,postorder); } bool dfs(int i,int j,vector<int> &arr){ if(i>=j)return true; int index = i; while(arr[index]<arr[j])i...
true
0b4a5f0fea01b5d122501af0c42305e2d1a08cc3
C++
ScanNet/ScanNet
/CameraParameterEstimation/apps/basics/gfx/param_shapes.h
UTF-8
11,853
2.515625
3
[ "MIT" ]
permissive
#pragma once namespace bsc { /* gpu_asset create_plane( const u32 div_u = 1, const u32 div_v = 1 ); gpu_asset create_cube(); gpu_asset create_sphere( const u32 div_u = 32, const u32 div_v = 32 ); */ void create_extrusion( gpu_geometry * geo, const vec3 * line_points, const i32 n_line_...
true
bb299ad5ee8a9ecf69add9634299866cdc3a548c
C++
GoodByeYesterday/code_practice
/longest_increasing_path_in_matrix.cpp
UTF-8
1,526
2.9375
3
[]
no_license
#include<iostream> #include<fstream> #include<algorithm> #include<functional> #include<vector> #include<sstream> #include<queue> #include<stack> #include<map> #include<set> #include<unordered_set> #include<bitset> #include<unordered_map> using namespace std; #define _debug #ifdef _debug ifstream ifs("test.txt"); #els...
true
a66c469cf30b1aa01bd9b2944aa84f12d7b4cb70
C++
ech1/Random-Scripts
/C++/23.cpp
UTF-8
279
3.578125
4
[]
no_license
#include <iostream> using namespace std; int add(int,int); int main(){ int num1,num2,sum; cout << "Enter 2 numbers to add: "; cin >> num1 >> num2; sum = add(num1,num2); cout << "Sum = " << sum; return 0; } int add(int a, int b){ int add; add = a + b; return add; }
true
289e68a14d8347d2d0e9eb22e1f37b2163c41fa2
C++
paulkokos/CppReference
/AlgorithmsLibrary/ Non-modifying sequence operations/all_of_any_of_none_of/main.cpp
UTF-8
911
3.46875
3
[ "MIT" ]
permissive
#include <vector> #include <numeric> #include <algorithm> #include <iterator> #include <iostream> #include <functional> int main () { std::vector<int> v(10,2); std::partial_sum(v.cbegin(),v.cend(),v.begin()); std::cout << "Among numbers: "; std::copy(v.cbegin(),v.cend(),std::ostream_iterator<int>(std::...
true
ce098b78ebfd94c56bf801bd8c7eb95a6dce726d
C++
ullasreddy-chennuri/Interview-Prep-Programs
/Strings/chewbacca_and_number.cpp
UTF-8
335
2.8125
3
[]
no_license
// 999 -> 900 //4545 -> 4444 #include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<s.length();i++){ int l =(int)(s[i]-'0'); if(l>=5){ l=9-l; } s[i]=(char)(l+'0'); } if(s.front() == '0'){ s.front() = '9'; } co...
true
0dfd9b4f7f25aac3339c15318b12b8adb869aac3
C++
JamesMCannon/AVID-DAQ-Software
/PostProcessors/Narrowband_C_dev/FIR.cpp
UTF-8
4,984
3.03125
3
[]
no_license
#include "FIR.h" #include <assert.h> FIR::FIR() { m_filterTable = NULL; m_pastSum = NULL; m_filterLength = 0; m_filterOffset = 0; m_decimateLength = 1; m_filterCopy = true; } FIR::FIR(double* filter, int filterLength, int decimateLength, bool copyFilter) { m_filterTable = NULL; m_pastSum = NULL; m...
true
eeb7648a25ddb45bd6c426c7df54a21efb1ce9c1
C++
JoergWarthemann/ringbuffer
/RingBuffer.Test/src/getValues.cpp
UTF-8
4,258
3.609375
4
[ "BSL-1.0" ]
permissive
#include "catch.hpp" #include <array> #include "RingBuffer.h" #include <string> TEST_CASE("Get values from the ring buffer", "[get values]") { static const std::size_t sourceSize = 20; static const std::size_t destinationSize = 19; using ValueType = typename std::string; using SourceArrayType = typenam...
true
bc6eb3b2c4809fc73ea02ce0a1a5b0c7a0faa942
C++
Alybaev/MathTasks
/Algorithms/Project2/10305.cpp
UTF-8
821
2.765625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void dfs(vector<vector<int>>& g, std::vector<int>& visited,int u,vector<int>& res) { visited[u] = 1; for(int i = 0; i < g[u].size();i++) { if(not visited[g[u][i]]) { dfs(g,visited,g[u][i],res); } } res.push_back(u); } int main() { int n,m; while(cin >> ...
true
d6de828181cf3f0f0bb101c2d1f492f110b75f4f
C++
bogdan-kovalchuk/August-leetcoding-challenge
/day_27.cpp
UTF-8
892
3.171875
3
[]
no_license
#include <iostream> #include <vector> #include <map> using namespace std; class Solution { public: vector<int> findRightInterval(vector<vector<int>> &intervals) { map<int, int> m; vector<int> res; int n = intervals.size(); for (int i = 0; i < n; ++i) m[intervals[i][0]] ...
true
6de6a51be310280b9852cc48a81a244a46f32d01
C++
darkmatter18/Personal-Smartphone-Locating-Becon-Module
/serialToMorse/serialToMorse.ino
UTF-8
7,715
2.65625
3
[]
no_license
//Include Header file #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //Declearing lcd pins int pinLED = 9; //Declearing LED pin for Android input int PIN_OUT = 13; //Define the LED Pin for MorseCode #def...
true
217bc4fcb0b56fc1388c250f1993dbb4c01d9dd0
C++
Kansukey/piscine_2019
/main_ex01.cpp
UTF-8
1,763
2.75
3
[]
no_license
// // main.cpp for in /home/barrie_j/Piscine/piscine_cpp_d14m/ex00 // // Made by Jean BARRIERE // Login <barrie_j@epitech.net> // // Started on Tue Jan 19 09:57:16 2016 Jean BARRIERE // Last update Tue Jan 19 11:37:53 2016 Jean BARRIERE // #include <iostream> #include "assert.h" #include "Banana.h" #include "Lem...
true
ae0af1e8096130c70b73883aa295ac432e6251ea
C++
shanewa/coding
/primer/10.27.cpp
UTF-8
510
3.15625
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <list> using namespace std; void uniqxx_copy(const vector<int> &v1, list<int> &v2) { unique_copy(v1.begin(), v1.end(), v2.begin()); } int main() { list<int> v2(4); vector<int> v1 = {1, 2, 2, 3, 4, 1}; uniqxx_copy(v1, v2...
true
c7a508f00aa72bc87523d4b49aae9e022fc6d3cd
C++
Rinkeeee96/FoxTrot_SA_Engine
/engineFoxtrot/Engine/SceneManager/Objects/Button.cpp
UTF-8
2,464
3.0625
3
[]
no_license
#include "stdafx.h" #include "Button.h" /// @brief Sets the default values /// @param id /// @param _text /// @param _onClick /// @param _spriteObject /// @param _dispatcher Button::Button(int id, ColoredText _text, const function<void(void)> _onClick, shared_ptr<SpriteObject> _spriteObject, EventDispatcher& _dis...
true
d30f30ed6c15d778ad095507f8d429366a9fca3e
C++
liangyourong/BAIDU-IFE
/华为机试整理85道 含源码/38.cpp
UTF-8
1,146
3.375
3
[]
no_license
#include <stdio.h> #include<string.h> #include<stdlib.h> void arithmetic(const char *input, long len, char *output) { char s1[10]; char s2[10]; char s3[10]; int cnt = 0; int len_input=strlen(input); for(int i=0;i<len_input;++i) { if(input[i]==' ') cnt++; } if(cnt!=2) { *output++ = '0'; *output = '\0...
true
8e8609f65148a70a995ba731b7066cae6c8079d4
C++
C-OnlineLessonCode/FactoryMethod
/Practice.cpp
UTF-8
871
3.40625
3
[]
no_license
#include <iostream> #include <fstream> #include <windows.h> class ICar { public: virtual ~ICar() {} virtual int GetEngineVolume() const = 0; }; class BmwX3 : public ICar { public: int GetEngineVolume() const { return 3; } }; class BmwX5 : public ICar { public: int GetEngineVolume() const { ...
true
90815b48c3d6573fab647654a28d2d4d00bb8087
C++
cramaechi/char-counter
/main.cpp
UTF-8
545
3.84375
4
[]
no_license
//Program uses a class called CounterType to count characters read in. #include <iostream> #include <cstdlib> #include "countertype.h" using namespace std; int main() { CounterType counter; counter.setCount(0); cout<<"Please write a random statement: "; char c; do { ci...
true
bcac649cefc634199f43ef66eeafecd804937524
C++
sumeshthakr/Raytracer-CG
/ray.h
UTF-8
440
3.296875
3
[]
no_license
#pragma once #include "vec3.h" /* Class Definition for Ray object */ class Ray { public: Vec3 origin; Vec3 direction; Ray() {} Ray(const Vec3& o, const Vec3& d) { origin = o; direction = d; } Vec3 getOrigin() const { return origin; } Vec3 getDirection()...
true
49e2e7b465d6a0a0f9396417a448704d6b05291b
C++
thomazthz/programming-challenges
/SpojBR/2838_brincadeira-das-tentativas.cpp
UTF-8
614
2.75
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(int argc, char const *argv[]) { const int MAX_FIG = 8; int n, i, figurinha; while(cin >> n && n != 0){ vector<int> figurinhas; for(i=0; i<n; i++){ cin >> figurinha; figurinhas.push_back(figurinha); } sort(figu...
true
45b3223eb4776e7cc14c306dfb41d2e5da861295
C++
Pherndogg13/CIS2013_Week10_Lab
/person.cpp
UTF-8
570
3.453125
3
[]
no_license
#include <string> using namespace std; class person { private: string name; string gender; int age; string race; bool is_alive; public: string getName(){return name; } string getGender() {return gender; } int getAge() {return age; } string getRace() {return race; } bool getAlive() {return...
true
a6db22aab1fa95d6cd509b6279e4c5d07e902b8d
C++
KyloRilo/C-Projects
/Lab3/Lab3/Lab3.cpp
UTF-8
1,405
3.796875
4
[]
no_license
/* Kyle Riley SE114.21 October 26th */ #include <iostream> #include <iomanip> using namespace std; void main() { int bigMac=563,bigNum,mFries=378,mNum,sShake=580,sNum; double timeRun, timeJog,burnRun=557,burnJog=398; double cost, money, change; int x; cout << " Which part are you testing? (1/2)" << endl; cin...
true
7ae127ca49f7de9d08e33e59f7e2f664fc80dc56
C++
Lev1ty/mattes-image-registration-1
/CHECK/CHECK.h
UTF-8
1,023
3.0625
3
[ "MIT" ]
permissive
#pragma once #include <exception> #include <iostream> #include <string> namespace reg { /// \struct CHECK /// \brief error checking class /// \details avoid exceptions because they cause undefined behavior; rather, use /// detailed reporting /// \note every class should directly or indirectly be derived fr...
true
cfdfb2c4b68883a565005a7db33d2bf0b58a9485
C++
caisan/work_code
/verify_bucket_policy.cc
UTF-8
9,594
2.609375
3
[]
no_license
#include <iostream> #include <cstring> #include <stdio.h> #include <stdlib.h> #include <list> #include <algorithm> #include <string> using namespace std; #define MAX_REFERER_DOMAIN_LENGTH 1024 int FindingString(const char* lpszSour, const char* lpszFind, int nStart /* = 0 */) { // ASSERT(lpszSour && lpszFind && nStart...
true
cddf3839e7b30a03c17642c6aaa3acc29cb2ff88
C++
thegamer1907/Code_Analysis
/DP/1774.cpp
UTF-8
1,649
3.109375
3
[]
no_license
#include <iostream> using std::cin; using std::cout; const int limit = 100000; char s[limit]; bool findAB(char a, char b) { return (a == 'A' && b == 'B'); } bool findBA(char a, char b) { return (a == 'B' && b == 'A'); } int main() { cin >> s; i...
true
f46f7aa806d6df72a6d7a96842a58b7930b6b758
C++
ocirne23/GLEngine
/Engine/Graphics/Private/Frustum.ixx
UTF-8
3,635
2.78125
3
[]
no_license
#pragma once #include "Core.h" export module Graphics.Frustum; class PerspectiveCamera; enum FrustumPlane { FRUSTUM_PLANE_NEAR = 0, FRUSTUM_PLANE_FAR = 1, FRUSTUM_PLANE_LEFT = 2, FRUSTUM_PLANE_RIGHT = 3, FRUSTUM_PLANE_TOP = 4, FRUSTUM_PLANE_BOTTOM = 5 }; export class Frustum { public: Frustum() {} ~Frustu...
true
52360fda1cf1ce3ef01984a25562855eb229be13
C++
Fija/Leetcode
/SingleNumber/Single.cpp
UTF-8
472
3.03125
3
[ "Apache-2.0" ]
permissive
#include <iostream> using namespace std; int main (int argc, char * const argv[]) { // insert code here... class Solution{ public: int singleNumber(int A[], int n) { int val,i; for (val=0,i=0;i<n;i++) { val = val ^ A[i]; } ...
true
7a6747be9740df70cd9bfb164a94e55de5c886ec
C++
landsrover/MyCodilityExamples
/Counting Elements/MissingInteger2.cpp
UTF-8
551
2.984375
3
[]
no_license
// you can use includes, for example: // #include <algorithm> // you can write to stdout for debugging purposes, e.g. // cout << "this is a debug message" << endl; int solution(vector<int> &A) { // write your code in C++14 (g++ 6.2.0) int res = 0; vector<int> PosV((int)A.size()+2,0); for (auto i: A){ ...
true
306eed952ae00c02cefefa085af1d8c4f728d03e
C++
jonasspinner/weighted-f-free-edge-editing
/src/search_strategy/Exponential.h
UTF-8
3,817
2.96875
3
[ "MIT" ]
permissive
// // Created by jonas on 27.02.20. // #ifndef WEIGHTED_F_FREE_EDGE_EDITING_EXPONENTIAL_H #define WEIGHTED_F_FREE_EDGE_EDITING_EXPONENTIAL_H #include <deque> #include <cmath> #include <cassert> #include <algorithm> #include "SearchStrategyI.h" /** * From initial implementation as method: * * This search strateg...
true
8acdbb2ddc71c1cf6c50d72f81e52f3903122e09
C++
pjsdev/DX11Cloth
/Engine/src/Solver.cpp
UTF-8
2,797
2.578125
3
[]
no_license
#include "Solver.h" using namespace pjs; Solver::Solver() {} Solver::~Solver() {} Solver::Solver(const Solver&) {} void Solver::verlet(std::vector<Particle> &_particles, float _timeStep) { float radius = 2.0f; Vec3 spherePos = Vec3(0.0f,-4.0f, 4.0f); for(unsigned int i = 0; i < _particles.siz...
true
1f914428313fb628e4609963b2c29c182dbed79b
C++
jimmyandrade/evolution
/cromossomo.cpp
UTF-8
803
2.84375
3
[]
no_license
#include <ctime> #include <iostream> #include "cromossomo.h" Cromossomo::Cromossomo( Indice quantidade_genes ) : quantidade_genes_( quantidade_genes ), ultimo_item_( quantidade_genes - 1 ) { // Gera valores aleatorios para os genes do individuo for ( unsigned int i = 0; i < quantidade_genes_; ++i ) { ...
true
2da7d7ca218d4f1d959247661fc8956ad4c90545
C++
realwakka/xml_compiler
/xml_parser.h
UTF-8
10,861
3
3
[]
no_license
#ifndef XML_PARSER_H_ #define XML_PARSER_H_ #include <functional> #include <tuple> #include <utility> #include <string> #include "conststr.h" namespace xml_compiler { enum class EventType { kStartElement, kEndElement, kText }; class XMLAttribute { public: constexpr XMLAttribute() {} constexpr XMLAttribu...
true
a7492527e21d0d3c59a83fbdd557c56f11c8d0cb
C++
AlexanderSilvaB/btree
/src/lib/btree/ParallelPool.cpp
UTF-8
1,065
2.796875
3
[ "MIT" ]
permissive
#include "ParallelPool.hpp" using namespace btree; using namespace std; // Task Task::Task(NodePtr node, Blackboard *blackboard) { this->node = node; this->blackboard = blackboard; task = thread(&Task::run, this); } void Task::wait() { task.join(); } void Task::run() { node->evaluate(*blackboard...
true
0254af86f78af8a5e8d3466001e1f3b8fc23a4f5
C++
voltsemu/volts
/volts/loader/sfo.cpp
UTF-8
4,062
3.046875
3
[]
no_license
#include "sfo.h" #include <svl/convert.h> #include <spdlog/spdlog.h> namespace volts::loader::sfo { using namespace std; using namespace svl; namespace cvt = convert; /** * @brief an entry in the sfo file * */ struct index_table_entry { /// the offset of the key relat...
true
0d73a92905dc40206075bb76f8b47d28e049e69d
C++
yyehl/Intro_algorithms
/chapter-16/16.1-1.cpp
UTF-8
1,178
3.203125
3
[]
no_license
/* * Filename: 16.1-1.cpp * * 活动选择问题的动态规划解法 // 有BUG,暂时不知道怎么改 * */ #include <vector> #include <iostream> #include <stdlib.h> using namespace std; int dp_activity_selector_aux(const vector<int>& vs, const vector<int>& vf, vector<vector<int> >& c, int i, int j) { if (c[i][j] != -1) return c[i][j]; int q = ...
true
67ba3101ccfd7d217519b821d8fb5dd48e9bbbd3
C++
OhiyoX/Process_Simulation
/优先级算法/Progress_Status.h
GB18030
1,433
2.984375
3
[]
no_license
#pragma once typedef int QElemType;//ṹ typedef struct ProgNode { QElemType data; ProgNode *next; }ProgNode, *ProgQueuePtr; typedef struct { ProgQueuePtr front;//ͷָ ProgQueuePtr rear;//βָ int qlen; }LinkQueue; class Status_Queue { public: //----------------------- int running;//̬,ʾ̬ĽidΪ-1ʾ̬ LinkQueue ready;//...
true
9a82b6aca0bce315a0ebeb58c628da36d75ce0f9
C++
Elianagam/taller_de_programacion_1
/tp2/Compress_Block.cpp
UTF-8
1,913
2.984375
3
[]
no_license
#include <iostream> #include <bits/stdc++.h> #include <algorithm> #include <vector> #include <cmath> #include <arpa/inet.h> #include <queue> #include <string> #include <stdio.h> #include <fstream> #include "Compress_Block.h" Compress_Block::Compress_Block() {} void Compress_Block::set_min_bits(uint8_t num) { min_bi...
true
a31646e60d05303e63b781a0c48393be8e98728f
C++
federicochiarello/OOP_Liberty
/model/container.h
UTF-8
515
3.03125
3
[]
no_license
#ifndef CONTAINER_H #define CONTAINER_H #include <iostream> template <class T> class container { private: unsigned int m_size; unsigned int m_capacity; T* m_vector; public: container(); container(const container&); ~container(); void pushFront(const T&); v...
true
5bba759a0294209b2e7143c89aade6e8b187b46e
C++
IL-two/Cpp
/Lessons/Task 3/3.3.AreaTrangle.cpp
UTF-8
2,063
3.640625
4
[]
no_license
//Практическое занятие 3. Контрольное задание №3 //Расчет площади треугольника //От Духно Ильи гр.124/20 #include <iostream> #include <cmath> using namespace std; double triangle(double side); double triangle(double a, double b, double c); int main() { system("chcp 1251"); int choice; ...
true
9af57ac1511e79bff51672fcc42244aa791d6e32
C++
holicAZ/AlgorithmStudy
/2075.cpp
UHC
844
3.421875
3
[]
no_license
#include <iostream> #include <queue> using namespace std; priority_queue<int, vector<int>, greater<int> > pq; // 켱 -> ū int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 0; i < n * n; i++) { // n*n Է int c; cin >> c; // pq ִũ⸦ n (޸ ) if(p...
true
d78946b66a25667fcf74983301721e94f701e855
C++
asepnur/sorting
/display_array.h
UTF-8
691
3.203125
3
[]
no_license
#ifndef DISPLAY_ARRAY_H_INCLUDED #define DISPLAY_ARRAY_H_INCLUDED using namespace std; void display(int *number_array,size_t length){ int col = 1; cout.width(5); for(size_t i = 0; i++ < length;col++){ cout << number_array[i-1]; if(i < length) std::cout.width(5); if(col ...
true
bd3da93884bd092a5dbab5b1163933028a16857a
C++
pritishpatil/HW3
/hw3.cpp.cpp
UTF-8
3,888
3.828125
4
[]
no_license
/* PIC 10B 2B, Homework 3 Author: Pritish Patil Date: 05/09/2020 */ #include <iostream> #include <fstream> #include <string> #include "textfile.h" using namespace std; void processFile(string fileName, textfile* filePtr) { fstream file; string line; int lineCount = 0; ...
true
806dde284b3a55f7ddad2c044c5be161aa01281d
C++
kilfu0701/Competitive-Programming
/Google Code Jam/2020/Round 1C/Overrandomized.cpp
UTF-8
1,595
3.046875
3
[ "MIT" ]
permissive
// Problem 2: Overrandomized // Idea: count the frequency of each letter appears as the leading digit (Benford's law) // The letter with the highest frequency will be 1, and the one with the lowest will be 9 // 0 will have a 0 frequency because it cannot exist as a leading digit #include <bits/stdc++.h> using namespa...
true