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
b5610448e31b0538314b01ef0000af474e69b6fc
C++
alexandraback/datacollection
/solutions_5631989306621952_0/C++/chocimir/a.cpp
UTF-8
940
2.609375
3
[]
no_license
#include<algorithm> #include<cassert> #include<cctype> #include<cmath> #include<cstdio> #include<cstdlib> #include<cstring> #include<deque> #include<iostream> #include<list> #include<map> #include<queue> #include<set> #include<string> #include<vector> #include<sstream> using namespace std; typedef long long LL; typede...
true
7dadf4ddb58cc4437c87e8910fb621c6cbdafc92
C++
davidstudy/2018_git
/0827面试准备v3/0827面试准备v3/DWZ基础知识/笔试面试编程题/360numgame/main.cpp
UTF-8
560
2.859375
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main(int argc, const char * argv[]) { int a, b, res; bool flag = false; while (cin >> a >> b) { flag = a % 2;// int tmp = (1 + a) / 2; if (flag)// { if (b >= tmp) res = b - 1; else res...
true
6e08a11d162beed0e65492660e42f63ff9080c8e
C++
waelaboulezz/curve-fitting
/main.cpp
UTF-8
5,346
2.515625
3
[]
no_license
#include "Coursework1/Coursework1lib.h" using namespace std; int main() { vector<vector<double>> v = {{2, 1, -1}, {1, 4, 3}, {-1, 2, 7}}; Matrix A = Matrix(v); vector<double> b = {0, 14, 30}; SolveGaussElimination x = SolveGaussElimination(A, b, true); SolveSeidle y = SolveSeidle(A, b, 30, true);...
true
6119b6f5641083e66cffd08e65d97f802a8bb191
C++
hrachyahakobyan/Pandemic
/core/include/core/GovGrantAction.h
UTF-8
485
2.515625
3
[]
no_license
#pragma once #include "ActionBase.h" namespace pan{ /** * @brief Encapsulates the parameters of GovGrant event action * @author Hrachya Hakobyan */ class GovGrantAction : public ActionImpl<GovGrantAction, ActionBase> { public: GovGrantAction(); GovGrantAction(pan::PlayerIndex player, pan::CityIndex index); ...
true
dae1fc4a02d8facc472721519af58312f8a6a12f
C++
lm-chinhtran/atcoder
/src/pass2_h.cpp
UTF-8
2,619
2.78125
3
[]
no_license
// // pass2_h.cpp // learningCplusplus // // Created by Tran Duc Chinh on 2020/04/04. // Copyright © 2020 Tran Duc Chinh. All rights reserved. // #include <iostream> #include <queue> #include <map> #include <algorithm> #include <math.h> using namespace std; typedef long long ll; ll mod = 998244353; ll INF = 100000...
true
1bcad8f72448b48ace5bc8d06b7eabdc08cbc3a6
C++
joseroman1/CSC_17A_48983
/Homework/Assignment 4/Gaddis_8thEd_Chapter11_Problem12/main.cpp
UTF-8
3,060
3.5625
4
[]
no_license
/* * File: main.cpp * Author: Jose Roman * Created on October 8, 2015 */ //System Libraries #include <iostream> #include <iomanip> #include <string> using namespace std; //User Libraries struct stdnt{ //Student string sName;//Name of the student string sID;//ID of the student int *sScore;//pointer...
true
cedf621cc128cfd392e81f62eac0a501bcdcf081
C++
liweiliv/history
/util/logger.h
GB18030
5,232
2.59375
3
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2012, Taobao.com * All rights reserved. * * ļƣlogger.h * ժҪlog4cpp־ * ߣBenkong <benkong@taobao.com> * ڣ2012.7.2 */ #ifndef _LOGGER_H_ #define _LOGGER_H_ #include <stdio.h> #include <stdarg.h> /** * ͵־ * @param logger Loggerʵ * @param fmt ־ĸʽοprintf * @return 0: ...
true
7423b68744e5af0f8e5b8c951063de1745268dac
C++
xiweihuang/Primer
/july_algorithm/ch02/string_03.cpp
UTF-8
696
3.578125
4
[]
no_license
/********** 【字符串查找问题 -- 暴力求解】 **********/ #include <iostream> #include <string> using namespace std; int BruteForceSearch(const string& str, const string& pat) { int i = 0; // 当前匹配到的原始串首位 int j = 0; // 模式串的匹配位置 int size1 = str.size(); int size2 = pat.size(); int last = size1 - size2; while ((i <= last) &...
true
ab58bd30fdf06db23532b9036b799718d33f8a70
C++
kimyunil/algospot
/JumpGame.cpp
UTF-8
1,023
2.6875
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <memory.h> #define MAX 100 int map[MAX][MAX]; bool cache[MAX][MAX]; int T, N; bool find(int x, int y) { if (x >= N || y>= N ) return false; if (map[y][x] == 0) return true; if (cache[y][x] == false) return false; if (find(x+map[y][x], y) || fin...
true
14e3d0485099951c59851183f6f49f43273b1252
C++
github188/MyCode-1
/codechef/12MarchLong/LUCKY2/LUCKY2.cpp
UTF-8
1,900
2.578125
3
[]
no_license
#include<stdio.h> #include<string.h> int mod=1000000007; int c[1001][1001],eight[1001],two[1001],f[1001][1001],a[1001]; char s1[1001],s2[1001]; bool isL(char s[]) { int ln=0,len=strlen(s); for (int i=0;i<len;i++) if ((s[i]=='4')||(s[i]=='7')) ln++; for (int i=1;i<=a[0];i++) if (a[i]==ln) return true; ...
true
4434960ce53e6d0d7b09b74deff9eccfe1c069fc
C++
herrkong/UserInputAssistant
/src3/MyDict.cc
UTF-8
1,801
2.8125
3
[]
no_license
#include "MyDict.h" #include <fstream> #include <sstream> namespace hk { //初始化中英文词典和索引表 void MyDict::en_init(const char * EnDictFilePath,const char * EnIndexFilePath) { ifstream ifsEnDict(EnDictFilePath);//文件流 string word; int wordFreq; while(ifsEnDict>>word>>wordFreq) { _dict.push_back...
true
7cd06d30666465a7ccbf4ea8a4f9c92688603e28
C++
jtahstu/iCode
/workspace/Smartoj/src/P1003.cpp
GB18030
519
2.578125
3
[]
no_license
/** * Project Name: Smartoj * File Name: P1003.cpp * Created on: 2015419 11:24:33 * Author: jtahstu * Copyright (c) 2015, jtahstu , All Rights Reserved. */ // //123 500 // //623 //-377 //61500 //0 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<string> using na...
true
2c52ed5110822cc9be9fb2b4777cdac80f548022
C++
angelamyu/2DAnimator
/QTOpenGL/sceneNode.cpp
UTF-8
4,625
2.671875
3
[]
no_license
#include "sceneNode.h" //#include <qDebug> #include "gMatrix3.h" #include "gVector3.h" #include "math.h" #define PI atan(1.0f)*4.0f using namespace std; sceneNode::sceneNode(){ geometry = new rPolygon(); translateX = 0; translateY = 0; scaleX = 1; scaleY = 1; rotation = 0; transfM = gMatrix3().identity();...
true
5b5fcad07e2d548757392b07f625123400aa1c32
C++
jl3937/leetcode
/SubstringWithConcatenationOfAllWords.cpp
UTF-8
1,165
2.609375
3
[]
no_license
class Solution { public: vector<int> findSubstring(string S, vector<string>& L) { // Start typing your C/C++ solution below // DO NOT write int main() function vector<int> r; map<string, int> l; int step = L[0].length(); int m = S.length(); int n = L.size() * step; for (int i = 0; i ...
true
63f99257f133fc5d9429e1f713a37b575a365bcd
C++
Danter54/OP-20-21
/Lab_7/Main/Main.cpp
UTF-8
567
2.703125
3
[]
no_license
#include <iostream> #include <stdio.h> #include <math.h> int main() { setlocale(LC_ALL, "ru"); short n = 0; double x = 0, y = 0, h=0; printf("| X | Y |\n"); printf("|------------|------------|\n"); for (n; n < 5;n++) { x = 0; for (x; x < 4;x+=0.25) { if (x<1) { y = sqrt(1-(x-...
true
77cbe42debb17ee5883424737ab9b8b5826ac677
C++
paukert/fit-ctu-bi-pa2
/src/EGameStatus.h
UTF-8
816
3.234375
3
[]
no_license
/** * @author Lukas Paukert * @date 03.05.2020 */ #pragma once #include <iostream> /** * Enum class that represents state of the current game */ enum class EGameStatus { CREATING_CHARACTER = 0, RUNNING, END }; /** * @brief Prints EGameStatus to ostream * @param[out] out ostream to which shou...
true
b821de8fe9bb8c9e7595c572be338eac2d2ecedc
C++
anantgehi/Post-Graduate-Diploma-in-Advanced-Computing-CDAC
/OOPs with C++ Programming/CPP/9_RTTI_AdvancedTypeCasting/SlideExamples/const_cast.cpp
UTF-8
222
2.703125
3
[]
no_license
#include<iostream> using namespace std; int main() { const int a=10; volatile int v = 20; int *sp = const_cast<int*>(&a); int *vp = const_cast<int*>(&v); cout<<"\n"<<*sp; cout<<"\n"<<vp; return 0; }
true
ad5dce47f455b1fe6317e0c24920f5e5afb825ee
C++
palomacalado/estrutura_de_dados
/team.cpp
UTF-8
2,462
3.234375
3
[]
no_license
#include <iostream> using namespace std; class Queue{ private: int rear; int arr[1000001]; public: int front; int numTeams=1000001; Queue(){ front = -1; rear = -1; for(int i=0;i<numTeams;i++){ arr[i]=0; } } bool isEmpty(){ if(front ==-1 && rear ==-1) return t...
true
54f6f5d8fd1fb8b3977495e972e6f0c964264b61
C++
mcreaded/csci1113
/volpy001/FightSimulator/Warhammer.cpp
UTF-8
6,997
3.390625
3
[]
no_license
#include <iostream> #include <iomanip> #include <cmath> #include <initializer_list> #include <ctime> #include "FightSimulator.hpp" using namespace std; /* Current Version: Steps: 1.) Roll off to see who goes first. 2.) The x1 that goes first moves, shoots, and charges. 3.) If x1 charges, x2 gets to Overwatch 4.) I...
true
0e999b157aea706a34f7398e9605ae0a31118f58
C++
1kzpro/international
/Vladimir/COMP 2710/project3_Eganov_vze0008.cpp
UTF-8
4,271
3.3125
3
[]
no_license
//============================================================================ // Name : project3_Eganov_vze0008.cpp // Author : Eganov Vladimir // Version : Summer 2020 // Copyright : Auburn University // Description : COMP2710 Software Construction Project 3 // Compile : g++ project2_Eganov_vze0...
true
e4ec79055ec4b144637f11b1f3ba92a4658ee136
C++
yrrSelena/Computer-BasicKnowledge
/华为机试/字符串最后一个单词的长度.cpp
UTF-8
588
3.734375
4
[]
no_license
/* 题目: 计算字符串最后一个单词的长度,单词以空格隔开。 输入描述: 一行字符串,非空,长度小于5000。 输出描述: 整数N,最后一个单词的长度。 示例1 输入 hello world 输出 5 思路:(题目非常简单) 利用cin以空格为间隔读取字符串的特点,循环读取字符串,直至最后一个字符串,输出单词长度。 */ #include<iostream> #include<string> using namespace std; int main(){ string s; int len; while(cin>>s){ len = s.size(); } cout<...
true
c06c610e4c48b98c0cf96659c03f0078f8ec39f7
C++
AadityaJ/Algorithms-Practice
/DS/hashing/printPair.cpp
UTF-8
468
3.046875
3
[]
no_license
#include <stdio.h> #include <map> using namespace std; bool isPair(int *arr,int n,int sum){ map<int,bool> m; bool flag=0; for(int i=0;i<n;i++){ if(m[sum-arr[i]]!=0){ printf("%d %d\n",arr[i],sum-arr[i]); flag=1; } else{m[arr[i]]=1;} } return flag; } in...
true
e74605fbdc3d063918bd7f0517e5eaf24ba8f3f4
C++
LawyerMorty97/aicore
/src/steerpipe.cpp
UTF-8
7,030
2.546875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* * Defines the pipeline steering system. * * Part of the Artificial Intelligence for Games system. * * Copyright (c) Ian Millington 2003-2006. All Rights Reserved. * * This software is distributed under licence. Use of this software * implies agreement with all terms and conditions of the accompanying...
true
04ad4a6bc308fdee0438a7088a2dd4bc3cb8b157
C++
thirdeye18/CS161
/Module 5/Box/testingBox.cpp
UTF-8
643
2.796875
3
[]
no_license
/********************************************************************* ** Author: Justin Hammel ** Date: 2/5/2017 ** Description: Main function for testing other files *********************************************************************/ #include <iostream> #include "Box.hpp" int main () { Box box1(5.0, 5.0, 5.0...
true
db88b1c85eef0dbc62ce6020a73718b5c3316060
C++
thirtythreeforty/mipssion-impossible
/tests/test_mem.cpp
UTF-8
1,307
2.734375
3
[]
no_license
#include <gtest/gtest.h> #include "datapath/MEM.h" #include "instructions.h" #include "controller.h" #include "datapath/register_file.h" #include "program_memory.h" //Load word from memory into register TEST(MEM, lw) { //MemRead always 1 Memory mem; EXMEM exmem; MEMWB memwb; MEM memoryblock; MEMControls memcon...
true
b78ce8481b5631c97c70fcc8731ebac6800910b2
C++
mandeep168/dsa_prep
/linked_list/deletion.cpp
UTF-8
951
3.515625
4
[]
no_license
// #include<iostream> // using namespace std; // // template<typename T> // class Node{ // T data; // Node<T> *next; // public: // Node(T data){ // this->data = data; // next = nullptr; // } // } // struct Node{ // int data; // Node* next; // Node(int d){ // data = d; // next = ...
true
fb818e0e83261bd73c79ec758ccea35ef0373aa6
C++
Limitless-Rasul-Power/Dictionary
/Class Task 8/Pair.cpp
UTF-8
1,119
3.5625
4
[ "MIT" ]
permissive
#include <iostream> #include <assert.h> #include "Pair.h" Pair::Pair():key(""), value("") {} Pair::Pair(const Pair& other) { Set_key(other.key); Set_value(other.value); } Pair& Pair::operator = (const Pair& other) { Set_key(other.key); Set_value(other.value); return *this; } Pair& Pair::ope...
true
ec343da360a7027e12fbabd7d045bbec101b516b
C++
Sorrow321/prac_4_sem
/cpp/mz01/5.cpp
UTF-8
2,097
3.453125
3
[]
no_license
#include <iostream> #include <stdio.h> #include <iomanip> #include <string> class Rational { private: int a, b; public: Rational(int p, int q = 1) : a{p}, b{q} { normalize(); } Rational() : a{0}, b{1} { } Rational& operator =(const Rational& p) { this->a = p.a; ...
true
4e54f46d7e19afc657ec4bb6d8f52519775e1b05
C++
techmatt/layer-extraction
/LocallyLinearEmbedding/BaseCodeDLL/BaseCodeDLL.cpp
UTF-8
5,121
2.6875
3
[]
no_license
#include "Main.h" BASECODEDLL_API void* __stdcall BCInit() { App *app = new App; AllocConsole(); #ifdef _DEBUG Console::WriteLine("DLL compiled in debug mode"); #else Console::WriteLine("DLL compiled in release mode"); #endif app->Init(); return app; } BASECODEDLL_API UINT32 __...
true
9c3f0b2e30e14e615befe6f3bd4065917dfc7140
C++
JINKOO/BJ_Algorithm_Code
/Greedy/Greedy/problem_2875.cpp
UHC
1,785
3.734375
4
[]
no_license
/* #. [ ȸ or ] #. شб ȸ 2 л 1 л Ἲؼ Ģ̴. ( Բ ޾ ڴ.) شб پ ؿ N л M л ã ִ. ȸ Ϸ л K ݵ Ͻ α׷ ؾ Ѵ. Ͻ ϴ л ȸ Ѵ. شб پ , ̴ּ. л N, л M, Ͻ ؾϴ ο K ־ ִ ִ ϸ ȴ. #. Է ù° ٿ N, M, K ־. (0 M 100, 0 N 100, 0 K M+N), #. ִ ִ ϸ ȴ. #. ...
true
4826d0f97e6e207080f52a15f7ce8e812a92cbad
C++
oplugin/ITMO.CPP
/Lab1.ControlTask.1/Lab1.ControlTask.1.cpp
UTF-8
1,393
3.453125
3
[]
no_license
// Lab1.ControlTask.1.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <iomanip> #include <cmath> using namespace std; int sqrGauss(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int x5, int y5); int main() { system("chcp 1...
true
bbc4d0015f0b6df86137b036ff9bd0f28fc7aa8f
C++
rathoresrikant/competitive-programming-solutions
/Others/quick_sort.cpp
UTF-8
612
3.34375
3
[]
no_license
#include<iostream> using namespace std; void swap(int &a, int &b){ int c = a; a = b; b = c; } int partition(int l, int r, int a[]){ int pivot = a[(l+r)/2],i=l,j=r; while(i<j){ while(i!=r&&a[i]<=pivot){ i++; } while(j!=l&&(j==(l+r)/2||a[j]>pivot)){ j--; } if(i<j){ swap(a[i],a[j]); } } swap(a[...
true
8eced919e3554dd5eb1e7aa21e289bb036dfced9
C++
Michaelwolf95/XEngine
/GameEngine_Prototype/Includes/XEngine/LineDrawer.h
UTF-8
618
2.65625
3
[ "MIT" ]
permissive
#pragma once #include "Drawer.h" #include <glm/glm.hpp> #include <glad/glad.h> // This is designed to be an optimal solution for drawing lines. // However... its not as necessary as I thought when implementing it. // Keeping this here class LineDrawer : public Drawer { public: GLfloat verts[6]; glm::vec4 color = gl...
true
6a5fb3e56e4662f744d11dedeb9715175f70758b
C++
dbecaj/ZombieGame
/game/entities/bullet.h
UTF-8
689
2.90625
3
[]
no_license
#ifndef BULLET_H #define BULLET_H #include <QGraphicsPixmapItem> #include <QPointF> #define BULLET_SIZE 10.0f enum Direction { UP = 0, UP_LEFT = 1, UP_RIGHT = 2, DOWN = 3, DOWN_LEFT = 4, DOWN_RIGHT = 5, LEFT = 6, RIGHT = 7 }; class Bullet : public QGraphicsPixmapItem { Direction ...
true
6a9c48a8cb17142c49b7a4549371d6d3c1f4a0b6
C++
Dwarfius/GP1
/Coursework/cGrid.cpp
UTF-8
2,271
3.234375
3
[]
no_license
#include "cGrid.h" #pragma warning (disable : 4244) cGrid::cGrid(int pWidth, int pHeight) //creates a fixed size grid with fixed amount of nodes { width = pWidth; height = pHeight; gridW = width / NODE_SIZE; gridH = height / NODE_SIZE; count = gridW * gridH; grid = (vector<cGameObject*>**)malloc(sizeof(vector<c...
true
d545293c14268b949211b67c64a011149372f507
C++
lilyht/OJ_code
/HDU/1421(dp好,再看).cpp
GB18030
723
2.515625
3
[]
no_license
#include <iostream> #include <string.h> #include <algorithm> using namespace std; const int MAXN = 2005; const int MAXK = 1005; //2020-09-06 13:11:32 Accepted 1421 265MS 8248K 622 B G++ bool cmp(int x, int y) { return x > y; } int a[MAXN]; int dp[MAXK][MAXN]; int main() { int n, k; while(cin>>n>>k) { for(int i=1;...
true
982b8e73ae1723c042fde1da62fa953d1ddf177c
C++
HadrienMarcellin/ProDroneTasks
/PCL_Tuto/src/Filtering/voxel_grid.cpp
UTF-8
1,075
2.5625
3
[]
no_license
#include <iostream> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #include <pcl/filters/voxel_grid.h> int main(int argc, char **argv) { pcl::PCLPointCloud2::Ptr cloud(new pcl::PCLPointCloud2 ()); pcl::PCLPointCloud2::Ptr cloud_filtered (new pcl::PCLPointCloud2 ()); //Fill in the cloud data pcl::PCDRea...
true
7fba1d497a5d8ce357ce6251d168aa17c6ddf56b
C++
vladislavadd/NETB375_Mensche_aergere_dich_nicht
/QT_Project_Mensche_Aergere_dich_nicht/template_stack_class.h
UTF-8
639
3.546875
4
[]
no_license
#ifndef TEMPLATE_STACK_CLASS_H #define TEMPLATE_STACK_CLASS_H #include <iostream> #include <string> #include <cstdlib> template <typename T> class Stack { T arr[4]; int top; public: Stack<T>() { top = -1; for(int i = 0; i < 4; i++) { arr[i] = NULL; } } ...
true
5c11d4c0106a65268e2bdc81a79c4d714b4a39c7
C++
NordicArts/NordicEngine
/NordicEngine/Files/Format/BitMap/BitMap.cpp
UTF-8
3,525
2.59375
3
[]
no_license
#include <NordicEngine/Files/Format/BitMap/BitMap.hpp> #include <NordicEngine/OS/OpenGL.hpp> namespace NordicArts { namespace NordicEngine { namespace Files { BitMap::BitMap() : Handler(true) { } BitMap::BitMap(std::string cFileName) : Handler(cFileName, true) { ...
true
d3cf708073faa49584aba7982b347f9b2df4a638
C++
vladimir2809/gensAlgorithm1
/map.h
WINDOWS-1251
3,120
2.953125
3
[]
no_license
#include <SFML/Graphics.hpp> using namespace sf; using namespace std; const int countWall = 50;// const int map_width = 40;// const int map_height = 20;// const int map_size = 20;// const int quantityFood = 10; const int quantityPoison = 10; int countFood = 0; int countPoison =0; class Map ...
true
1f85125adfd63da0fb848d68f0f14f1db1d4da2c
C++
cnxtech/mpc-walkgen
/test/test-humanoid-cop-constraint.cpp
UTF-8
2,658
2.65625
3
[]
no_license
//////////////////////////////////////////////////////////////////////////////// /// ///\file test-humanoid-cop-constraint.cpp ///\brief Test of the CoP constraint function ///\author de Gourcuff Martin /// //////////////////////////////////////////////////////////////////////////////// #include <gtest/gtest.h> #inclu...
true
429e6ffd4d0e11ab448f73f9983f7468d2decfb3
C++
tim-yuan/Molecular-simulations
/MD/CPP/initposvel.cpp
UTF-8
2,714
2.515625
3
[]
no_license
#include <iostream> #include <cmath> #include <random> #include <fstream> #include <iomanip> #include <stdio.h> using namespace std; int initpos(int n, double pos_vel[][6], double rho) { double lattice = cbrt(rho); int a = round(cbrt(n)); int num=0; for (int i =0; i<a; i++) { for (int j ...
true
6debe8b1e8b4a863868887ceb5bf882ef84537a2
C++
PillVic/ACM
/HDU/2109/2109/源.cpp
UTF-8
874
3.578125
4
[]
no_license
#include<iostream> #include<algorithm> using namespace std; int *buildTeam(int Number); void Fight(int Hdu[], int Japan[], int Number); int main() { int Number; while (cin >> Number) { if (Number == 0) { break; } int *Hdu = buildTeam(Number); int *Japan = buildTeam(Number); Fight(Hdu, Japan, Number); ...
true
d5e0c9889dc8ed00b78dba0af0c0988759aa0a91
C++
holondo/Arquivos-Grafos
/BTREE/Node.h
UTF-8
332
2.6875
3
[]
no_license
#ifndef NODE_CLASS #define NODE_CLASS #define DEFAULT -1; using namespace std; class Node { private: int key; long recordRRN; public: Node(); Node(int key, long recordRRN); void setKey(int key); void setRRN(long RRN); int getKey(); long getRRN()...
true
9a2f7229c1475b692d536b2f19baeca014922208
C++
emankov/hcc-clang-upgrade
/test/CodeGenHCC/register-control.cpp
UTF-8
3,529
2.546875
3
[ "NCSA" ]
permissive
// RUN: %clang_cc1 -famp-is-device -fhsa-ext -std=c++amp -x hc-kernel -triple amdgcn -target-cpu fiji -emit-llvm -disable-llvm-passes -o - %s| FileCheck %s // // This test emulates parallel-for-each and grid launch without relying on HCC header files. // By using pseudo definitions of some HCC types this test can gener...
true
f7de81cf0ae405fed9b005da94b312094600c141
C++
mahmud085/ACM_Code
/12577.cpp
UTF-8
269
2.71875
3
[]
no_license
#include<stdio.h> #include<string.h> char arr[7]; int main() { int i=1,j,k; while(gets(arr)) { if(!strcmp(arr,"*")) break; if(strcmp(arr,"Hajj")==0) printf("Case %d: Hajj-e-Akbar\n",i); else printf("Case %d: Hajj-e-Asghar\n",i); i++; } return 0; }
true
affe2f65ae6fb493620084027baa9e9050bd8a8e
C++
BioMyth/CHIP-8
/Chip 8 Emulator/WindowHandler.h
UTF-8
1,183
2.71875
3
[]
no_license
#ifndef _WINDOW_HANDLER_H_ #define _WINDOW_HANDLER_H_ #include <Windows.h> class Window{ public: void Register(); private: HWND window; RECT rect; HANDLE hOut; CONSOLE_SCREEN_BUFFER_INFO SBInfo; COORD NewSBSize; }; void Window::Register(){ // Register the window class. const wchar_t CLASS_NAME[] ...
true
d83c4dd575a35986a0efc5b1070a9639497d7374
C++
NovaEric/ENova_Cplusplus
/Multi_Map.cpp
UTF-8
3,020
3.640625
4
[]
no_license
#include<map> // part of STL or standard template library #include<iostream> #include <string> using namespace std; // using typdef to create an alias....like const clause typedef multimap <int, string> MMAP_INT_STRING; //created alias of MMAP_INT_STRING int main() { MMAP_INT_STRING mmapIntToString; //Us...
true
e18b23a721798d8f4631d0b1d6db05b8e5215c61
C++
adamvm/testing
/bowling/testFiles.cpp
UTF-8
986
2.65625
3
[]
no_license
#include "Files.hpp" #include <gtest/gtest.h> class FilesTest : public ::testing::Test { public: Files files{"../results"}; std::map<std::string, std::string> expectedContent{ {"lane1.txt", "Name1:X|4-|3\n" "Name2:34|X|0-\n" ":X|22|33"}, {"lane2.txt", ""}, ...
true
203a58cd8dbb246c90f2cccce0af45b0e68008ad
C++
benishor/morse-writer
/src/libmorse/implementation/MorseDictionary.cpp
UTF-8
2,512
3.09375
3
[]
no_license
#include <MorseDictionary.h> #include <iostream> #include <algorithm> MorseDictionary::MorseDictionary() { // std::cout << "Creating morse dictionary instance" << std::endl; } MorseDictionary MorseDictionary::defaultDictionary() { MorseDictionary result; result .add('a', ".-").add('b', "-...").add('c...
true
2205c8103f7dc4d02d1b5382318f5ccd9d8b39d0
C++
HuntingSHEEP/GameEngine
/main.cpp
UTF-8
19,728
3.109375
3
[]
no_license
/* * sudo apt install libgtk-3-dev */ #include <gtk/gtk.h> #include <iostream> #include <thread> #include <unistd.h> #include <math.h> using namespace std; double modulo(double a){ if(0 <= a){ return a; }else{ return -a; } } int signum(double a){ if(0 < a){return 1;} else if(a...
true
6f16c0974e3e383275602634e072426a773b4a12
C++
Azure/azure-sdk-for-cpp
/sdk/core/azure-core/src/http/retry_policy.cpp
UTF-8
8,379
2.640625
3
[ "MIT", "LicenseRef-scancode-generic-cla", "curl", "LGPL-2.1-or-later", "BSD-3-Clause", "ISC" ]
permissive
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "azure/core/http/policies/policy.hpp" #include "azure/core/internal/diagnostics/log.hpp" #include <algorithm> #include <cstdlib> #include <limits> #include <sstream> #include <thread> using Azure::Core::Context; using namespace Azure...
true
11f171035c04bffe4850462b6b14845c1220c0ea
C++
bitcpf/JH2018
/arista/sizeprint.cpp
UTF-8
320
3.15625
3
[]
no_license
#include <stdio.h> #include <string.h> /* Find the size */ int main() { const char *s1 = "hello"; char *s3 = "hello"; char s2[] = "world"; printf( "sizeof s1 : %ld sizeof s2 : %ld\n", sizeof(s1), sizeof(s2) ); printf( "sizeof s3 : %ld\n", sizeof(s3) ); printf( "lenof s2 : %ld\n", strlen(s2) ); }
true
ed7729c252cbbc0ac8433ad85cf4379afea36a6b
C++
HoogDooo/MoravaEngine
/MoravaEngine/src/Hazel/Renderer/HazelImage.h
UTF-8
1,711
2.609375
3
[ "Apache-2.0" ]
permissive
#pragma once #include "Hazel/Core/Base.h" #include "Hazel/Core/Buffer.h" #include "Hazel/Core/Ref.h" namespace Hazel { enum class HazelImageFormat { None = 0, RGB, RGBA, RGBA16F, RGBA32F, RG32F, SRGB, DEPTH32F, DEPTH24STENCIL8, // Defaults Depth = DEPTH24STENCIL8 }; class HazelImage : ...
true
c6309fe02dbb033e8208fe044dbfc901353cacff
C++
NicolasVelasquez99/Practica3
/Punto 1/Mes.h
UTF-8
405
3.046875
3
[]
no_license
/* * Cabecera objeto Mes */ #ifndef MES_H #define MES_H #include <string> using std::string; class Mes{ private: string nombreMes; int numeroMes; public: Mes(string nombreM, int numeroM); ~Mes(); string getNombreMes(); int getNumeroMes(); void setNo...
true
8e3d70ffb766b04fe1b404a17e36063e5bfb2be0
C++
vinx13/naivedb
/src/file.cpp
UTF-8
1,556
2.828125
3
[ "BSD-3-Clause" ]
permissive
#include "file.h" namespace naivedb { FileMgr::FileMgr(const std::string &prefix) : prefix_(prefix) { } FileMgr::~FileMgr() { closeAllFiles(); } void FileMgr::openAllFiles(int num_files) { for (int i = 1; i <= num_files; i++) { files_.push_back(new MemoryMappedFile(getFileName(i))); // TODO...
true
8145a33cd0c4d94c5cab59fcb5774e4b874b7035
C++
QuestionC/advent2017
/advent17.cpp
UTF-8
532
2.71875
3
[]
no_license
#include "advent.hpp" #define MAGIC 376 int main (void) { int len = 1; int firstVals[MAGIC + 1]; firstVals[0] = 0; int pos = 0; for (int i = 1; i <= 50'000'000; ++i) { int next = (pos + MAGIC) % len + 1; if (next < MAGIC) { std::move(firstVals + next, firstVals + MAG...
true
f92bb31bb9a52302524e09b45631e2595383c9b9
C++
ToyotaResearchInstitute/common_robotics_utilities
/include/common_robotics_utilities/cru_namespace.hpp
UTF-8
744
2.6875
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#pragma once /** Downstream projects can adjust these macros to tweak the project namespace. When set, they should refer to a C++ inline namespace: https://en.cppreference.com/w/cpp/language/namespace#Inline_namespaces The inline namespace provides symbol versioning to allow multiple copies of common_robotics_utili...
true
f534d12b4627198acf7e665d7765be8256b46fee
C++
Sikurity/StudyAlgorithm
/Normal/2156_DrinkWine.cpp
UTF-8
847
2.890625
3
[]
no_license
/** * @link https://www.acmicpc.net/problem/2156 * @date 2016. 05. 09 23:04 * @author Sikurity * @method Dynamic Programming */ #include <stdio.h> #include <string.h> int N, R; int W[10000]; int DP[10001][3]; int algorithm(int, int); int main() { int i; scanf("%d", &N); R = 0; memset(DP, 0, sizeof(DP)); for...
true
c68a1a5f4708f888ec1d69a1019e812414c362da
C++
Pappskiva/Lean
/Lean/SentenceClass.cpp
ISO-8859-1
8,300
2.53125
3
[]
no_license
#include "SentenceClass.h" #define WBOX(x) MessageBox(NULL, x, L"Application Error!!", MB_OK | MB_ICONASTERISK); SentenceClass::SentenceClass() { mFont = 0; mFontShader = 0; mSentence = 0; } SentenceClass::~SentenceClass() { } bool SentenceClass::Initialize(D3D* d3d, const char* alignment, float letterScale,...
true
1d84e806a9f002da82756ceab39684cf8ad0b285
C++
11l-lang/_11l_to_cpp
/tests/python_to_cpp/Shed Skin Examples/9.yopyra.cpp
UTF-8
16,318
2.640625
3
[ "MIT" ]
permissive
#include "C:\!!BITBUCKET\11l-lang\_11l_to_cpp\11l.hpp" auto MAX_DIST = 1999999999.0; auto PI_SOBRE_180 = 0.017453292; auto PEQUENO = 0.000000001; class Vector { public: double x; double y; double z; template <typename T1 = decltype(0.0), typename T2 = decltype(0.0), typename T3 = decltype(0.0)> Vect...
true
9ce19c9fe08be43867a838c16c73d9526c2d68db
C++
agrawalabhishek/NAOS
/include/NAOS/rk54.hpp
UTF-8
12,283
2.5625
3
[ "MIT" ]
permissive
/* * Copyright (c) 2016 Abhishek Agrawal (abhishek.agrawal@protonmail.com) * Distributed under the MIT License. * See accompanying file LICENSE.md or copy at http://opensource.org/licenses/MIT */ #ifndef RK54_HPP #define RK54_HPP #include <vector> #include <limits> #include <stdexcept> #include "NAOS/constants.h...
true
a2f51238d7547bb180539258b54036f048de66b7
C++
luluci/lulib
/libs/type_traits/is_instance_of_1.cpp
UTF-8
781
2.921875
3
[]
no_license
#include <lulib/type_traits/is_instance_of.hpp> template<typename T, typename U> struct test1 {}; template<typename T, std::size_t S, typename U> struct test2 {}; namespace hoge { LULIB_GENERATE_IS_INSTANCE_OF( (typename X, typename Y), test1, (X,Y) ) } namespace huga { LULIB_GENERATE_IS_INSTANCE_OF( (ty...
true
3b7829614498d1239451cf54222b10cac9cf7180
C++
jimmybeckett/BigInteger
/src/operators/modulus.cpp
UTF-8
610
2.65625
3
[]
no_license
#include "../../include/BigInteger.h" #include <math.h> namespace euler { BigInteger BigInteger::operator%(const BigInteger& other) const { if (*this == other || *this == BigInteger (0)) return BigInteger (0); if (other == BigInteger (0)) return BigInteger (0); //Throw exce...
true
e9bd2d71471e52b3ae042b9bb1aa74bf20d9af3b
C++
ArpitSingla/LeetCode
/Dynamic Programming/338. Counting Bits.cpp
UTF-8
573
2.875
3
[]
no_license
class Solution { public: vector<int> countBits(int num) { vector<int> ans(num+1,0); ans[0]=0; if(num==0){ return ans; } int count=0; int count1=count-1; for(int i=1;i<=num;i++){ int temp=pow(2,count); if(i==temp)...
true
2d85af1ccc428b61d98b831b0d13eaf37aba8f21
C++
KeiHasegawa/ISO_IEC_14882
/10_Derived_classes/0_Derived_classes/test013.cpp
UTF-8
384
3.53125
4
[]
no_license
#include <stdio.h> struct A { int a; int f(){ return a; } }; struct B { int b; int f(){ return b; } }; struct C : public A, public B { int f(){ return A::f() + B::f(); } }; int main() { C x; x.a = 1; x.b = 2; printf("x.f() return value : %d\n", x.f()); x.a = 3; x.b = 4; ...
true
65b1ea769921f0d1e263ff913780d26f2e2f2a94
C++
RussianKreker/Laba_2_4sem
/Laba_2_4sem/RBTree.h
UTF-8
2,689
2.984375
3
[]
no_license
#ifndef RBTree_H #define RBTree_H #include"NodeBRTree.h" #include"stack.h" #include"List.h" #include"List_Huffman.h" #include"queue.h" class RBTree { public: RBTree() { Root = NULL; } ~RBTree() { clear(); Root = nullptr; } Node* Root; void clear() { preorder(Root); Root = nullptr; } void preor...
true
4119b89887cda24f23d2564d007d4b81341c8553
C++
gsemac/hvn3-engine
/hvn3/include/hvn3/math/GeometryUtils.h
UTF-8
17,409
2.84375
3
[]
no_license
#pragma once #include "hvn3/math/Rectangle.h" #include "hvn3/math/Circle.h" #include "hvn3/math/Line.h" #include "hvn3/math/Vector2d.h" #include "hvn3/math/MathUtils.h" #include <hvn3/utility/BitFlags.h> #include <array> #include <functional> #include <utility> namespace hvn3 { namespace Math { namespace Geometry ...
true
e0ee6dc70d055a3eb022879277995289a26438b8
C++
optimisticlucifer/My_Cpp_Journey
/TowerofHanoi.cpp
UTF-8
334
3.046875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int i; void toh(int n,char src,char dest,char helper){ if(n==0){ return; } toh(n-1,src,helper,dest); cout<<"move from "<<src<<"to"<<dest<<endl; toh(n-1,helper,dest,src); i++; } int main(){ toh(6,'A','C','B'); cout<<("steps are " + to...
true
891956d2bbc42e7275a8d4e959edbacfc9a078ce
C++
exp111/Cocaine
/Counter-Strike Source v34/VmtSwap.cpp
UTF-8
1,207
2.546875
3
[]
no_license
#include "VmtSwap.hpp" #include "Debug.hpp" #include "Crypt.hpp" namespace Memory { VmtSwap::VmtSwap() : m_ppInstance( nullptr ), m_pBackupVmt( nullptr ), m_pCustomVmt( nullptr ), m_nSize( 0 ) { } bool VmtSwap::Apply( const void* pInstance ) { if( !pInstance ) { DPRINT( XorStr( "[VmtSwap::App...
true
c1c4be2138567b3f7475e1e94531d643c73df08d
C++
59412/Monopoly-----Cplusplus
/dctim.cc
UTF-8
3,247
3.046875
3
[]
no_license
#include "dctim.h" #include "player.h" #include <string> #include <iostream> using namespace std; const int turnInDc = 3; const int lastIndex = 39; DcTim::DcTim(){ name = "DC Tims Line"; prev = nullptr; next = nullptr; coordX = 0; coordY = 10; number = 10; } //DcTim::~DcTim(){} void DcTim::lea...
true
2f5966013009114ca2755b39a42b07cabd87ac43
C++
anshuljindal876/Shortest-Path-Linear-
/shortestPath.h
UTF-8
850
2.796875
3
[]
no_license
/* shortestPath.h - Header file for shortest path algorithm valid for linear open path with unit node distances. Created by Anshul Jindal, July 04, 2018. Only for VSSUT Robotics Club Members. */ #ifndef shortestPath_h #define shortestPath_h #include "Arduino.h" class shortestPath { private: int ...
true
db2b37f1608ffd8cc9c7f3bb4f1e467caefcc0fa
C++
laurannaa/ED1A2-2017
/A0301/Exb.cpp
UTF-8
1,592
3.75
4
[]
no_license
/* * File: main.cpp * Author: ana * 2-Com base no programa anterior crie um novo de forma que sejam solicitados 10 nomes e 10 endereços. Ao terminar a digitação o sistema entrará em um laço, solicitando um número referente à ordem de digitação realizada. Uma vez informado,o sistema deverá exibir o nome e o end...
true
f541d81f1b3c5cd49aa45c999a9f5228e550e5b0
C++
Oh-kyung-tak/Algorithm
/Baekjoon/baekjoon_10176.cpp
UTF-8
711
2.65625
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <map> #include <string> #include <string.h> #include <math.h> #include <set> using namespace std; string word; int N; int alpa[26]; int main() { cin >> N; while (N--) { bool ck = true; cin >> word; memset(alpa, 0, sizeof(alpa)); for (...
true
58c8fcb85447612e7af333d5fb6a149910d25dc7
C++
wangchenwc/leetcode_cpp
/700_799/703_kth_largest.h
UTF-8
657
2.96875
3
[]
no_license
// // 703_kth_largest.h // cpp_code // // Created by zhongyingli on 2018/8/23. // Copyright © 2018 zhongyingli. All rights reserved. // #ifndef _03_kth_largest_h #define _03_kth_largest_h class KthLargest { public: KthLargest(int k, vector<int> nums) : k_(k) { for (const auto& num : nums) { ...
true
c64a4a98864104871b8be27fa76c76ba4d98f7ee
C++
prriyanayak/GFG_Solved
/basic/MaxValueAfterMOperations.cpp
UTF-8
683
2.546875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; // vector<int> array; int main() { //code int t; cin >> t; while(t--) { int n, m; cin >> n >> m; int arr[n]; int as[m], bs[m], values[m]; memset(arr, 0, n*sizeof(int)); for(int i = 0; i < m; i++) { ...
true
9fc3469b1fdff9ec14c15b28532c7f1c9a7741b6
C++
omri-peer/Linear-Algebra
/Matrix.h
UTF-8
48,268
3.375
3
[]
no_license
// Templated matrix implementation (for the linear algebra library). #pragma once #include "Vector.h" #include <algorithm> #include <cmath> #include <iostream> #include <vector> template <class T> class Matrix { using vector_t = std::vector<T>; private: unsigned int rows; // num of rows unsigned int col...
true
e029ace0720beb370961d08bb178c1849275fb92
C++
HeyAdesh/CPP-Codes-Basic-
/timepass.cpp
UTF-8
192
3.03125
3
[]
no_license
#include<iostream> using namespace std; int main() { int l,b,a; cout<<"Enter the length and breadth\n"; cin>>l>>b; a=l*b; cout<<"The area of rectangle is\t"<<a; return 0; }
true
a1abe156120c9973c85d5dec70d20ca657b1466a
C++
gracek333/FinancialApplication
/CommonUsedMethods.h
UTF-8
650
2.59375
3
[]
no_license
#ifndef COMMONUSEDMETHODS_H #define COMMONUSEDMETHODS_H #include <sstream> #include <iostream> #include <vector> #include <windows.h> using namespace std; class CommonUsedMethods { public: static string getPhrase(); static char getChar(); static string convertIntToString(int number); static int conv...
true
98d343ebff03535ab13329e7b018b5a4dfeb476d
C++
ai5/gpsfish
/osl/full/osl/state/historyState.cc
UTF-8
1,363
2.78125
3
[]
no_license
/* historyState.cc */ #include "osl/state/historyState.h" osl::state::HistoryState::HistoryState() : dirty(false) { assert(current.isConsistent()); assert(initial_state.isConsistent()); } osl::state::HistoryState::HistoryState(const SimpleState& initial) : initial_state(initial), current(initial), dirty(fals...
true
9619e0937f6a51b38fba0124a528694cf695d281
C++
sxw106106/cpp-learning
/timer/TimerFunc/TimerFunc.cpp
UTF-8
2,030
2.953125
3
[]
no_license
#include "TimerFunc.h" My_Timer TimerFunc::my_timer[MAX_TIMER_COUNT]={0}; int TimerFunc::m_TimersCount=0; int TimerFunc::ticker=0; void TimerFunc::SetTimer(int ttime,int ifunction) //新建一个计时器 { struct My_Timer a; a.total_time = ttime; a.left_time = ttime; a.func = ifunction; printf("\n index : ...
true
ebb6eeb8c88361ffa1ac2785c56d57e90a3867a1
C++
michaelkatona/Shigako
/Shigako/EngineLayout.cpp
UTF-8
5,027
2.9375
3
[]
no_license
#include "EngineLayout.h" EngineLayout::EngineLayout(QWidget *parent, int margin /* = 0 */, int spacing /* = -1 */){ setMargin(margin); setSpacing(spacing); } EngineLayout::~EngineLayout(){ for (auto& itr : m_items){ delete itr->item; delete itr; } m_items.clear(); } void EngineLa...
true
0d32afbfabb2017dc50a62ae7de7fd4b1d061de6
C++
Carlosnuji/Plantas
/tests/app.cpp
UTF-8
1,923
2.71875
3
[ "MIT" ]
permissive
#include "app.h" #include "doctest.h" #include "db.h" #include "../usuario.h" #include "../planta.h" #include "../token.h" #include "../queja.h" #include "../favorito.h" #include "../json.hpp" #include <QDebug> using JSON = nlohmann::json; App::App() { } TEST_CASE("01 Test base datos") { /// Iniciar base datos...
true
d28a44ce89f76af8866dcb87fbb0b42c450aaca0
C++
lordeup/TAaFL
/LexerLib/TokenType.h
UTF-8
2,771
2.8125
3
[]
no_license
#pragma once #include <string> namespace TokenType { const std::string ERROR = "ERROR"; const std::string ID = "ID"; const std::string INTEGER = "INTEGER"; const std::string FLOAT = "FLOAT"; const std::string DOUBLE = "DOUBLE"; const std::string CHAR = "CHAR"; const std::string STRING = "STRING"; const std::st...
true
2a9c733d0e02c6938fc1b14d1328c3b612d0c78e
C++
IngwiePhoenix/stlplus3
/tags/stlplus-03-06/containers/simple_ptr.tpp
UTF-8
9,117
3.109375
3
[]
no_license
//////////////////////////////////////////////////////////////////////////////// // Author: Daniel Milton // Copyright: (c) Daniel Milton 2002 onwards //////////////////////////////////////////////////////////////////////////////// namespace stlplus { /////////////////////////////////////////////...
true
4cebd106d4905845614c8bb058a329a5a34c76d6
C++
yuhenghuang/Leetcode
/1446_ConsecutiveCharacters.cpp
UTF-8
389
2.6875
3
[]
no_license
#include "utils.hpp" class Solution { public: int maxPower(string s) { int n = s.size(); if (n<2) return n; int res = 1, curr = 1; for (int i=1; i<n; ++i) { if (s[i-1]==s[i]) ++curr; else curr = 1; res = max(res, curr); } return re...
true
864a38d4f07e9967e722d12516848eeec68cf390
C++
mluiselys/TP1-Puelles-Medina
/cVehiculo.h
UTF-8
1,321
2.671875
3
[]
no_license
#pragma once #include <iostream> #include <string> #include "cEnum.h" using namespace std; class cVehiculo { private: //Atributos int Cant_Pasajeros; //en el constructor se inicializa de una vez float Precio_Base; float Precio_Dia; bool Estado; bool Verificado; string Patente; Color colo...
true
bb73a559cd9b5e72198393050a61541807f67d90
C++
SeisSol/Meshing
/check_mesh/src/mesh.h
UTF-8
1,372
2.6875
3
[]
no_license
#ifndef MESH_H_ #define MESH_H_ #include <array> #include <map> #include <sstream> #include <string> #include <vector> #include "PUML/PUML.h" class Mesh { public: explicit Mesh(std::string const& fileName); ~Mesh() = default; [[nodiscard]] std::size_t numVertices() const { return puml.vertices().size(); } ...
true
05cc0b1a564392f7aa29191da818dddbf667d92e
C++
FonzTech/SphereBall
/src/GameObject.cpp
UTF-8
2,854
2.671875
3
[]
no_license
#include "GameObject.h" #include "Camera.h" const s32 GameObject::getCommonBasicMaterial(E_MATERIAL_TYPE basicMaterial) { // Create basic shader BasicShaderCallback* bsc = new BasicShaderCallback(this); IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices(); s32 material = gpu->addHighLevelShaderMater...
true
6021efaa2a65a30661122ad698eae25feb5fbb48
C++
tarunluthra123/Competitive-Programming
/Hackerearth/Bitwise Manipulation/Bit flipping game.cpp
UTF-8
2,419
3.78125
4
[]
no_license
/* https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/practice-problems/algorithm/bit-flippings-dd1f7ef1/ Bit Flipping Game Two players A and B are playing a game.They are given binary numbers as input. Each binary number is represented as a string of characters '0' or ...
true
c3c9574788b347ded71e0c39cf5c206c0d0c4ff7
C++
mkostanbaeva/urlcounter
/main.cpp
UTF-8
9,533
3.046875
3
[]
no_license
#include <iostream> #include <map> #include <string> #include <algorithm> #include <fstream> #include <boost/asio.hpp> #include <boost/asio/connect.hpp> #include <boost/algorithm/string.hpp> /*! \mainpage This programm counts the repeted words. * To compile the program and the follow use you need to install the boos...
true
c81a2bf4514179d11a2b6e91509ab0d2caed8823
C++
yxpandjay/kkshell
/common/config/config_manager.cpp
UTF-8
7,692
2.5625
3
[]
no_license
// // Created by min on 2020/8/6. // #include "config_manager.h" #include <libgen.h> #include <zconf.h> #include <QFile> ConfigManager *ConfigManager::instance = new ConfigManager(); static const char *configPath = "~/.config/kkshell/ini/settings.ini"; static bool isFleExist(const char *path) { return (access(pa...
true
b89ff5c7f19c128867fce884eed2379d06d8d1e2
C++
Gabsop/LP1
/Aula 17/include/Agencia.hpp
UTF-8
368
2.6875
3
[]
no_license
#include <string> using namespace std; class Agencia { private: string nome; int numero; string cnpj; public: Agencia(); Agencia(string nome, int numero, string cnpj); ~Agencia(); string getNome(); void setNome(string nome); int getNumero(); void setNumero(int numero); str...
true
ef178760832ce02d356a7c57c121ca3972f50449
C++
samarth-robo/deepnav_cvpr17
/utils/src/search.cpp
UTF-8
4,740
3.15625
3
[]
no_license
#include <search.h> #include <climits> #include <iostream> #include <utility> #include <boost/functional/hash.hpp> using namespace std; size_t NodeHash::operator()(Node::Ptr const &n) const { size_t seed = 7; boost::hash_combine(seed, n->id); boost::hash_combine(seed, static_cast<size_t>(n->d)); return seed...
true
a1bde86f0f937950905324dda53a0bcd3a142a97
C++
zdl1016-test/a
/test/signal_test/test.cpp
UTF-8
1,063
3
3
[]
no_license
#include <stdio.h> #include <signal.h> #include <unistd.h> static void sig_usr(int); void RunWork(); int main(void) { RunWork(); #if 0 for(; ;) pause(); #endif } void RunWork() { pid_t pid = fork(); if( pid == 0 ) { printf( "enter child pr...
true
69e593b215f2168f727688486d392b257e0ba2a0
C++
HeRaNO/OI-ICPC-Codes
/Vijos/1419.cpp
UTF-8
942
2.765625
3
[ "MIT" ]
permissive
#include <cstring> #include <iostream> #define MAXN 110 using namespace std; int n, T = 1, w, pos; string pass[MAXN * MAXN], word[MAXN]; string S; char ch; inline char uppercase(char a) { if (a >= 'a' && a <= 'z') a -= 32; return a; } int check(string x, string y) { int t = 0; for (int i = 0; i < x.length(); i++...
true
4e4ce8bae39fd444ada2dcdef9290f12cdef2239
C++
matrix-io/matrix-lite-nfc-py
/hal_nfc_wrapper/reader/read_values/pages.cpp
UTF-8
1,386
2.75
3
[]
no_license
#include <pybind11/pybind11.h> #include "./pages.h" #include "../../nfc.h" namespace py = pybind11; // Python object for NFC Pages void nfc_pages_values(py::module &m) { py::class_<pages_data>(m, "pages_data") .def_readonly("read_complete", &pages_data::read_complete) .def_readonly("content", &pag...
true
3a50730f43cbba917a72932f9c8d2dc5a7a6ef7f
C++
Omkarkale0002/Developer
/c++/01_arth.cpp
UTF-8
414
3.40625
3
[]
no_license
/*Pre-increment postincrement of a value*/ #include<iostream> using namespace std; int main() //main { int a=10; //int a cout<<"The original value is:"<<a; //value a++; cout<<"\nThe 1st increment is:"<<a; a++; //first increment cout<<"\n The 2nd increment is:"<<a; ...
true
66d8cbb6034a92ba77f1711d494b9a4a0ee52382
C++
Aumoa/SC.Game
/SC.Game/Cursor.cpp
UTF-8
1,274
2.59375
3
[]
no_license
using namespace SC; using namespace SC::Game; using namespace System; using namespace System::Drawing; CursorLockMode Cursor::LockState::get() { return mLockMode; } void Cursor::LockState::set( CursorLockMode value ) { mLockMode = value; switch ( mLockMode ) { case CursorLockMode::Locked: { RECT rect; Get...
true
9076e737bd92ab7f0f18eb5e7aa934e3124a5de3
C++
lyh4967/MyAlgorithm
/MyAlgorithm/MyAlgorithm/BOJ/incomplete/[15949]Piet.cpp
WINDOWS-1252
7,914
2.828125
3
[]
no_license
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; //ó dp: R, CC:L struct Node { int a; int b; char bl; Node() {} Node(int _a, int _b, char _bl) :a(_a), b(_b), bl(_bl) {} }; int N, M; char map[100][100]; bool visited[100][100]; //DP: R: 0, D:1 ~~ //CC: L:0, R:1 vector<N...
true