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
b6d101cd2a55b1cb4615f47386b841dbc511d411
C++
W00fdev/smart_math
/smart_rational/smart_rational.cpp
UTF-8
5,481
3.3125
3
[]
no_license
#include "smart_rational.h" /* Реализация методов класса Rational. Дополнительные методы: ... */ /* [XQ - 1] Куликов Дмитрий Дополнительный метод, переворачивающий дробь. */ Rational& Rational::INVERT_Q() { bool final_minus = numerator.getMinus(); *this = Rational( Integral(deno...
true
83af25abb8b0640387c46c31d11d9e3687dbbf87
C++
igrek51/adb-sync
/src/diffs/Diff.cpp
UTF-8
1,396
3.078125
3
[]
no_license
// // Created by igrek on 04/02/17. // #include "Diff.h" Diff::Diff(string localFile, string remoteFile, DiffType type) { this->localFile = localFile; this->remoteFile = remoteFile; this->type = type; this->inverted = false; } string Diff::typeName() { if (!inverted) { // synchronize from local to remote swit...
true
44a2687d18e8c019a9419305dddbdd2c8e45b0ba
C++
yosh1/sfc-graphics-programming
/final/src/particle.cpp
UTF-8
898
2.890625
3
[]
no_license
// // particle.cpp // emptyExample // // Created by Yoshihisa Kaino on 2020/07/11. // #include "particle.h" // constructor particle::particle() { setup(); } // ----------------------- void particle::setup() { pos.set(ofRandom(ofGetWidth()), ofRandom(ofGetHeight())); vel.set(ofRandom(-5, 5), ofRandom(-...
true
587a77975571fe1236b0046e25c277c49bcc12e3
C++
jeffgojeff/messAround
/playingWithFunctions.cpp
UTF-8
448
3.578125
4
[]
no_license
#include <iostream> using namespace std; void getInfo(int&, int&); int sum(int, int); int main() { int var1, var2, tot1; getInfo(var1, var2); tot1 = sum(var1, var2); cout << tot1 << endl; return 0; } void getInfo(int& var1, int& var2) { cout << "Enter in a number: " << endl; cin >> var1; cout << "En...
true
329016c58953cfcce78e38573788fbbfc76fcbe1
C++
himdhiman/Launchpad-May
/Lecture-3/operator.cpp
UTF-8
334
2.625
3
[]
no_license
#include<iostream> using namespace std; int main(){ /* int i = 1; cout<<i++<<endl; cout<<++i<<endl; cout<<--i<<" "<<i--<<endl; */ //cout<<(~(-5))<<endl; //cout<< (5^7)<<endl; /* int x = 7; cout<< (x<<1)<<endl; cout<< (x<<2)<<endl; x = -5; cout<< (x>>1)<<endl; //cout<< (x>>2)<<endl; */ int i=5; i<<=3; cout<<i<<end...
true
90c0c52090459e3faab077d30d2dbec3342a6832
C++
MrPeanutButta/cx
/cx/tknnum.cpp
UTF-8
6,700
2.703125
3
[ "MIT" ]
permissive
/* The MIT License (MIT) Copyright (c) 2015 Aaron Hebert <aaron.hebert@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to u...
true
fb761976fa7b2d1194b4fce66a311cb32c798c07
C++
icoty/LeetCode
/Algorithms/861.Score_After_Flipping_Matrix.cpp
UTF-8
1,131
2.65625
3
[]
no_license
#include "AllInclude.h" class Solution { public: // https://leetcode.com/problems/score-after-flipping-matrix/discuss/144125/c%2B%2B-easy-understand-Greedy-method-with-explanation int matrixScore(vector<vector<int>>& A) { int r = A.size(); int c = A[0].size(); for(int i...
true
1cb475a341ffaba5afb6f7c814a5fd8cffb6cee8
C++
Vokhmintseva/arkanoid2
/00/game.h
UTF-8
31,608
2.515625
3
[]
no_license
#include <cstdlib> #include <ctime> #include <map> #include <vector> #include <algorithm> #include <cmath> #include "calculations.cpp" #include "scores.cpp" #include "levels.cpp" using namespace std; const sf::Vector2f gameFieldPosition = sf::Vector2f(50, 50); const float GAME_FIELD_WIDTH = 300; const float GAME_FIEL...
true
9bea3b64007c78a409412fba2d2b2e60451f3bc0
C++
i-love-falcom/ModelViewer
/Framework/FwCore/include/container/fw_array.h
UTF-8
5,430
3.0625
3
[ "MIT" ]
permissive
/** * @file fw_array.h * @author Kamai Masayoshi */ #ifndef FW_ARRAY_H_ #define FW_ARRAY_H_ #include "debug/fw_assert.h" BEGIN_NAMESPACE_FW template<typename _Ty, size_t _Num> class array { public: typedef array<_Ty, _Num> _My; typedef _Ty value_type; typedef size_t ...
true
3045299d26c6cfe7345af343d69a7d9de41af7c0
C++
scpp/metafactor
/variadic_typelist.h
UTF-8
2,259
2.953125
3
[ "MIT" ]
permissive
/*************************************************************************** * Copyright (C) 2015 by Vladimir Mirnyy, blog.scpp.eu * * * * This program is free software; you can redistribute it and/or modify * * it unde...
true
51a30b420dc0ca516cf0f5f9924e596f7fe6641f
C++
Omegastick/bots
/src/networking/server_communicator.h
UTF-8
465
2.515625
3
[]
no_license
#pragma once #include <memory> #include <string> #include "third_party/zmq.hpp" #include "third_party/zmq_addon.hpp" namespace ai { struct MessageWithId { std::string id; std::string message; }; class ServerCommunicator { private: std::unique_ptr<zmq::socket_t> socket; public: ServerCommunicato...
true
0e19ed7f0c8229b88595e054606284c1fb0739ba
C++
hrisbh10/Array-Class-Cpp
/Array.cpp
UTF-8
520
3.578125
4
[]
no_license
//Program demonstrating Array class #include "Array.h" #include <iostream> using namespace std; int main(){ Array<int> a; //empty array for(int i=0;i<7;++i) a.push_back(i+1); //O(1) for(int i=0;i<7;++i) cout<<a[i]<<" "; //accessing time O(log(i)) cout<<'\n'; a.pop_back(); //O(1) cout<<a.back()<<"\n"; //O(1...
true
a4ca76633367337750ede187af9f8388293f08fe
C++
chamow97/Interview-Prep
/leetcode/1410. HTML Entity Parser.cpp
UTF-8
1,041
2.875
3
[ "MIT" ]
permissive
class Solution { public: string getString(string str) { if(str == "&quot;") { return "\""; } else if(str == "&apos;") { return "'"; } else if(str == "&amp;") { return "&"; } else if(str == "&gt;") { return ">"; } else if(str ==...
true
f151edb6e14f7ef212dcb001c003bf269e4382f3
C++
stefan2904/sweb
/common/include/mm/PageManager.h
UTF-8
2,524
3.28125
3
[]
no_license
/** * @file PageManger.h */ #ifndef PAGEMANAGER_H__ #define PAGEMANAGER_H__ #include "types.h" #include "paging-definitions.h" #include "new.h" #include "kernel/Mutex.h" typedef uint8 puttype; #define PAGE_RESERVED static_cast<puttype>(1<<0) #define PAGE_KERNEL static_cast<puttype>(1<<1) #define PAGE_USERSPACE sta...
true
f0e4f9adfd7776cbf7a36a8deef3cc03547257e6
C++
vivekmaurya1505/CPP
/CPP/Codes/Day7/35. Template for Function swap.cpp
UTF-8
3,247
3.96875
4
[]
no_license
#include<iostream> #include<cstring> // or #include<string.h> using namespace std; namespace NTemplate { template <class Type> void swap(Type &n1, Type &n2) { Type temp; temp=n1; n1=n2; n2=temp; } class Complex { private: int real; int imag; public: //void AcceptInputFromConsole(Complex ...
true
5af59fd6797cc7f6e5474e7becaa655e9f11ce54
C++
munish-b/IA-Hardware-Composer
/tests/hwc-val/tests/hwc/hwcharness/HwchReplayRunner.h
UTF-8
2,150
2.5625
3
[]
no_license
/* // Copyright (c) 2018 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
true
cce86e1ebf3c14ef924763506c0a8070c1e83ee9
C++
rcsunanda/cpp_learn
/segfault.cpp
UTF-8
190
2.75
3
[]
no_license
//g++ -g segfault.cpp -o segfault #include <stdio.h> int main() { char* temp = "Paras"; int i; i=0; temp[3]='F'; for (i =0 ; i < 5 ; i++ ) printf("%c\n", temp[i]); return 0; }
true
98e4ef10495c1144c4ca32efde21ee214f67179f
C++
BruceLuuc/CS-Basic
/LeetCode/15. 3Sum.cpp
GB18030
2,321
3.15625
3
[]
no_license
#include"x.h" //ύĴ //жnums.size()С //vectorȥerase //map[gap]Ҫj class Solution_3_1 { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>>result; if (nums.size() < 3) return result; unordered_map<int, int>_map; sort(nums.begin(), nums.end()); for (int i=0;i!=nums.size();++i) { _...
true
52deaa169f803a4a51beeddf05a05bb3e9bd968f
C++
danwahl/solar-fan
/solar-fan/solar-fan.ino
UTF-8
4,653
2.828125
3
[]
no_license
#include <avr/sleep.h> #include <avr/wdt.h> #include <avr/power.h> // hardware definitions #define VBAT_PIN A0 // also reset pin #define VBAT_SLOPE 3.24889 // x/1e3 = (y - x)/2.2e3 + (5 - x)/45e3 #define VBAT_OFFSET -0.244444 #define VBAT_MIN 10.8f #define VBAT_NOM 11.8f ...
true
379ffdb6d96a08ea95e793d4af2fb66ca8d190ac
C++
zlewisdigipen/physicsengine
/3Dphysics/PhysicsEngine/PhysicsEngine/mesh.h
UTF-8
804
2.9375
3
[]
no_license
#pragma once #ifndef MESH_H #define MESH_H #include <glm/glm.hpp> #include <GL/glew.h> #include <vector> class Vertex { public: Vertex() { pos = glm::vec3(0.0f, 0.0f, 0.0f); } Vertex(const glm::vec3 & pos) { this->pos = pos; } glm::vec3* GetPos() { return &pos; } void SetPos(const glm::vec3 vec) {...
true
07a500227bad697dcfb5e5cb0bf74214eec18d77
C++
Duonghailee/Cpp-Programming-
/week6/4.cpp
UTF-8
374
3.21875
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; int main() { char c; ifstream fromfile("A.txt"); ofstream tofile("B.txt"); if (fromfile.is_open()) { while (fromfile.get(c)) { tofile << c; } tofile.close(); fromfile.close(); } c...
true
1b883d3605b990bf2b4577e5553fd6d3094dd5b5
C++
mhuisi/lean4
/src/library/abstract_type_context.h
UTF-8
1,638
2.734375
3
[ "Apache-2.0" ]
permissive
/* Copyright (c) 2016 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author: Leonardo de Moura */ #pragma once #include "kernel/expr.h" namespace lean { class abstract_type_context { public: virtual ~abstract_type_context() {} virtual environmen...
true
d5ef229dd17de35d8c8cf94b7100fa19af209f57
C++
dasguptar/pytorch
/aten/src/ATen/native/LinearAlgebra.cpp
UTF-8
6,933
2.71875
3
[ "BSD-2-Clause" ]
permissive
#include "ATen/ATen.h" #include "ATen/ExpandUtils.h" #include "ATen/NativeFunctions.h" #include <functional> #include <numeric> #include <vector> namespace at { namespace native { // For backward, we save svd. // http://www.ics.forth.gr/cvrl/publications/conferences/2000_eccv_SVD_jacobian.pdf // But instead of gesvd ...
true
34225198b8e1c9250704d8aced8399f29b5f8914
C++
achallion/cpptopics
/hashing/longestsubarrwithsumk.cpp
UTF-8
659
2.828125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int longestsubsumk(int *arr, int n, int k) { int pre = 0; int maxl = 0; unordered_map<int, int> fi; for (int i = 0; i < n; i++) { pre += arr[i]; if (arr[i] == k) maxl = max(maxl, 1); if (pre == k) maxl =...
true
13cccedcfe382dc9da3e05c0ddb7f7dd85c46a52
C++
FluffyDou/HangDou
/ToyRayTracer/Core/Camera.h
UTF-8
1,916
3.078125
3
[]
no_license
/******************************************************************/ /* Camera.h */ /* ------------- */ /* */ /* The file defines the camera class for the...
true
ad0074c145fca6a97bf977b7ee62f7724b8e6377
C++
Jeffrey-P-McAteer/ros_object_recognition
/src/shape_detector/include/shape_detector/normal_estimation_groupbox.h
UTF-8
1,669
2.875
3
[ "MIT" ]
permissive
/** \file * \brief Definition of the NormalEstimationGroupBox class. */ #ifndef SHAPE_DETECTOR_NORMAL_ESTIMATION_GROUPBOX_H #define SHAPE_DETECTOR_NORMAL_ESTIMATION_GROUPBOX_H // Qt. #include <QGroupBox> class QWidget; class QLabel; class QSpinBox; class QHBoxLayout; namespace shape_detector { class ObservedPar...
true
53bb8565ae40c61eb524305f2279c336205cc8c0
C++
qiqzhang/CPP-Data-Structures-and-Algorithms
/Chapter02/Doubly_Linked_List/include/DoublyLinkedList.h
UTF-8
7,875
3.890625
4
[ "MIT" ]
permissive
// Project: Doubly_Linked_List.cbp // File : DoublyLinkedList.h 双向链表 有双向节点构成的 双向索引链条 在插入/删除节点时需要考虑 设置前继和后继节点的指针 #ifndef DOUBLYLINKEDLIST_H #define DOUBLYLINKEDLIST_H #include <iostream> #include "DoublyNode.h" template <typename T> class DoublyLinkedList { private: // 私有数据 int m_count;// 双向节点 数量记录 ...
true
67939b0de5e03b1124074794a3ab2e06d9d24479
C++
vivekpisal/450-problem-solving
/11th.cpp
UTF-8
499
3.203125
3
[]
no_license
#include<iostream> #include<algorithm> using namespace std; bool bsearch(int a[],int start,int end,int ser) { int mid=(start+end)/2; while(start>end) { if(a[mid]==ser) { return true; } else if(a[mid]>ser) { end=start-1; mid=(start+end)/2; } else if(a[mid]<ser) { start=end+1; mid=(star...
true
063939a69190aa6a82d89ca254918837a0939876
C++
lxq2537664558/Leetcode-1
/122. Best Time to Buy and Sell Stock II.cpp
UTF-8
817
3.578125
4
[]
no_license
//Say you have an array for which the ith element is the price of a given stock on day i. // //Design an algorithm to find the maximum profit.You may complete as many transactions as you like(ie, buy one and sell one share of the stock multiple times).However, you may not engage in multiple transactions at the same ti...
true
3ef523d15330ba3a0815ab20d89af33c8dc19679
C++
a62625536/ACM
/zhedamuke/树的同构.cpp
UTF-8
1,560
2.765625
3
[]
no_license
#include<iostream> #include<map> #include<cstdio> #include<string> using namespace std; struct node { char left,right; friend bool operator==(node &x,node &y) { return x.left==y.left&&x.right==y.right || x.left==y.right&&x.right==y.left; } }; map<char,node> mp1,mp2; char a1[10] = {0},a2[10] = ...
true
8cf434cbd329a8975b9990dca051bcc4ca69dcba
C++
namyoungu/baekjoon
/백준 2675번 문자열 반복.cpp
UTF-8
396
2.765625
3
[]
no_license
#include<stdio.h> int main(void){ int n, c, cnt; char arr[1001]; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &c); scanf("%s", arr); cnt = 0; while (1) { if (arr[cnt] == '\0') { break; } cnt += 1; } for (int j = 0; j < cnt; j++) { for (int k = 0; k < c; ...
true
01cb45f4b0936439f7ae240a1c5e059180c16e87
C++
hoangpq/Evolving-Snakes
/sources/ctrRandomEvolving.cpp
UTF-8
1,383
2.84375
3
[ "MIT" ]
permissive
#include "../headers/ctrRandomEvolving.h" #include "../headers/decision.h" #include "../headers/randomisation.h" #include<stdlib.h> std::string ctrRandomEvolving::getType() { return "randomEvolving"; } std::vector<double> ctrRandomEvolving::getValues() { return {turn_left_probability,turn_right_probability,spl...
true
997ec96b757fae6da6a801dc6cb80ad7f09313e0
C++
Stonerdk/onlinejudge
/p17471.cpp
UTF-8
3,319
2.765625
3
[]
no_license
#include <iostream> #include <string> #include <queue> #include <map> #include <cstring> using namespace std; int N, row, col; const int MAX = 102; char** board; bool visited[MAX][MAX]; int treasure = 0; void bfs(int i, int j); bool isValid(int i, int j); bool key[26]; class Door { private: map<char, vector<pair<...
true
5d65bbf1d3ce3bef12a6212c38ce61b60b0087d8
C++
ThePhysicsGuys/Physics3D
/tests/testsMain.h
UTF-8
7,198
2.703125
3
[ "MIT" ]
permissive
#pragma once #include "compare.h" #include <Physics3D/misc/toString.h> #include <sstream> class TestInterface { size_t assertCount = 0; public: bool debugOnFailure; TestInterface() : debugOnFailure(false) {} TestInterface(bool debugOnFailure) : debugOnFailure(debugOnFailure) {} inline void markAssert() { asser...
true
f237239fbd1e7fc42dbf299ceb2e85e091b3b093
C++
Juantamayo26/Train
/ICPC/ukiepc2020problems/kleptocrat/submissions/accepted/ragnar-no-erase.cpp
UTF-8
1,428
2.5625
3
[]
no_license
#include <cassert> #include <iostream> #include <vector> using namespace std; int main() { int n, m, q; cin >> n >> m >> q; vector<vector<pair<int, long long>>> g(n); while(m--) { int u, v; long long w; cin >> u >> v >> w; --u, --v; g[u].push_back({v, w}); g[v].push_back({u, w}); } // -1 if not visi...
true
db88a5f99a296967f14ecca71dec765f1e47d4f9
C++
Uiroon/Uir
/2019-2020 C++课设/源代码/Keshe/Function4.h
GB18030
3,223
3.609375
4
[]
no_license
#pragma once class Function4 { public: int find(vector<int> vec, int target) { int low = 0, high = vec.size() - 1; while (low < high) { int mid = (high + low) / 2; if (target < vec[mid]) { high = mid - 1; } else if (target > vec[mid]) { low = mid + 1; } else { return mid; } ...
true
b29d388b3243d39ac3bb4efd8d3ad6224393b990
C++
talentlyb/Leetcode
/c++/135.cpp
UTF-8
631
3.140625
3
[]
no_license
/** First time. 4/28/2015 * * Two passes. */ class Solution { public: int candy(vector<int>& ratings) { vector<int> number (ratings.size(), 1); int result = 0; for (int i = 1; i < number.size(); ++i) { if (ratings[i-1] < ratings[i]) { number[i] = number[i-1] ...
true
67a77022c4f973ed3717731e90f884c235ab2a89
C++
VFVrPQ/2017ACM
/codeforces/cf849/B.cpp
UTF-8
1,670
2.921875
3
[]
no_license
/* author : VFVrPQ problem : cf849-B , 判断所有的(i,a[i])能否被两条平行线覆盖,其中每条线至少要覆盖一个点。 solve : 1.第一个点要么是单独的一个点,要么是在一条线上,依此搞一搞;2.考虑前三个点,三者情况分别考虑O(n) time : 2017-09-03-17.31.51 */ #include<bits/stdc++.h> using namespace std; typedef long long LL; const int M = 1e9+7; const int N = 1e4+10; struct Node{ int ...
true
1cfb98fdaa038d7aa780356915c76534a7b149b5
C++
tyagiakash926/level-up-jun
/lectur_01/l003.cpp
UTF-8
12,669
2.875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int permutationINFI(vector<int> &arr,int idx,int tar,string ans) { if(tar==0) { cout<<ans<<endl; return 1; } int count =0; for(int i=idx;i<arr.size();i++) { if(tar-arr[i]>=0) count+=permutationINFI(arr,0,...
true
ad59a17505a3b0478918c766bbf15707a3cee1c6
C++
flomar/CrypTool-VS2015
/trunk/CrypTool/SquareMatrixModN.h
UTF-8
6,151
2.515625
3
[ "Apache-2.0" ]
permissive
/************************************************************************** Copyright [2009] [CrypTool Team] This file is part of CrypTool. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License a...
true
3953605016cca8e0df826c6e4b37370b084855fb
C++
kuonanhong/Exercise
/Hihocoder 1181 欧拉路二.cpp
UTF-8
1,855
3.234375
3
[]
no_license
/* 输入 第1行:2个正整数,N,M。分别表示骨牌上出现的最大数字和骨牌数量。1≤N≤1,000,1≤M≤5,000 第2..M+1行:每行2个整数,u,v。第i+1行表示第i块骨牌两端的数字(u,v),1≤u,v≤N 输出 第1行:m+1个数字,表示骨牌首尾相连后的数字 比如骨牌连接的状态为(1,5)(5,3)(3,2)(2,4)(4,3),则输出"1 5 3 2 4 3" 你可以输出任意一组合法的解。 样例输入 5 5 3 5 3 2 4 2 3 4 5 1 样例输出 1 5 3 4 2 3 */ #include <iostream> #include <vector> #include <stack> #i...
true
5abafe5a0ea05c9c11d3d49d6bd76bd86b003e20
C++
amlopez9173/menu
/menu.cpp
UTF-8
2,393
3.546875
4
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <iostream> #include <conio.h> using namespace std; struct Nodo{ int num; Nodo *Siguiente; }; void init_pila(); void vacia_pila_bool(Nodo *&, int); void ins_pila(Nodo *&, int); void retirar_pila(Nodo *&, int &); Nodo *pila; int main() { int n,opc,menu=1; ...
true
47bb402a2dc4368bbab0a95c1d1ad31a862070bf
C++
AppledoreM/OI
/PastFiles/Codeforces/Contest2019/Codeforces572_Div12/C.cpp
UTF-8
1,290
2.59375
3
[]
no_license
#include <iostream> #include <stdio.h> #include <cstring> #include <math.h> #include <algorithm> #include <vector> using namespace std; #define FAST_IO ios::sync_with_stdio(false) int n; typedef pair<int,int> pii; vector<pii> lev[20]; int main() { FAST_IO; cin.tie(nullptr); cout.tie(nullptr); cin>>n;...
true
b7d74a7b23e08982429ebec692caed3cdec91408
C++
TomasKimer/gles3mark
/jni/jnilink.h
UTF-8
1,351
2.703125
3
[]
no_license
/** * gles3mark v1.0 * * \date 2014-05-28 * \author Tomas Kimer <xkimer00@stud.fit.vutbr.cz> */ #pragma once #include <jni.h> #include <stdexcept> const std::string JNI_STRING_SIGNATURE("(Ljava/lang/String;)V"); /** * \brief Interface to Dalvik via JNI. */ class JNILink { JNIEnv *env; // game t...
true
4cfac7ca1393ac2e9ccfcea536cdeee80a05a729
C++
vfcastro/dropbox-sisop2
/src/client/ClientProcessor.cpp
UTF-8
3,308
2.796875
3
[]
no_license
#include <iostream> #include <fcntl.h> #include <unistd.h> #include "../../include/client/ClientProcessor.h" #include "../../include/common/FileManager.h" // Avalia qual o tipo de mensagem recebida e encaminha pra funcao adequada void ClientProcessor_dispatch(ClientCommunicator *cc, Message *msg) { // std::cout << ...
true
2ef3cb7ac1e473af9aabb4cffe03dfbfbd344382
C++
WhiZTiM/coliru
/Archive2/18/9c75cb32ed7b58/main.cpp
UTF-8
501
3.4375
3
[]
no_license
#include <iostream> #include <string> using std::cout; using std::string; template<class C> C min(C a,C b) { return a<b?a:b; } int main() { string a="first string"; string b="second string"; cout<<"minimum string is: "<<min(a,b)<<'\n'; int c=3,d=5; cout<<"minimum number is: "<<min(...
true
c9e1b2502ce76928dcb0c06cb2278c4fc842e605
C++
seungmin97/Algorithm
/Programmers/2020_카카오_인턴십/jewerly_shopping.cpp
UTF-8
6,748
3.1875
3
[]
no_license
// // Created by 이승민 on 2020-07-27. // #include <iostream> /* #include <string> #include <vector> #include <algorithm> using namespace std; struct jewerly{ string name; vector<int> index; }; bool cmp(const jewerly &j1, const jewerly &j2 ){ if(j1.index.size() < j2.index.size()){ return true; ...
true
74f0f2ee1a376ab750d3de34be58a96484518cbf
C++
kl4kennylee81/Canon
/source/PulseParticleGenerator.cpp
UTF-8
4,956
2.515625
3
[]
no_license
// // PulseParticleGenerator.cpp // // Created by Hong Jeon on 5/4/17. // Copyright © 2017 Game Design Initiative at Cornell. All rights reserved. // #include "PulseParticleGenerator.hpp" #include <map> #include <math.h> // how many frames to wait until the next pulse #define TIMEOUT_FRAMES 100 // how many pulses ...
true
fc641aa0d6f0534d12478a6201d358d01d456a1e
C++
ppmht/gporca
/libgpos/include/gpos/common/CSyncHashtableAccessorBase.h
UTF-8
4,512
2.546875
3
[ "Apache-2.0" ]
permissive
//--------------------------------------------------------------------------- // Greenplum Database // Copyright (C) 2011 EMC Corp. // // @filename: // CSyncHashtableAccessorBase.h // // @doc: // Base hashtable accessor class; provides primitives to operate // on a target bucket in the hashtable. // // Throughout i...
true
fd003995ce096e7a9b5b5b0127f5fe79ce77c704
C++
Anshumankumar/Apollo
/include/shaderHandler.hpp
UTF-8
2,641
3.1875
3
[]
no_license
#ifndef SHADER_HANDLER_HPP #define SHADER_HANDLER_HPP #include <iostream> #include <fstream> #include <cstdlib> #include <vector> #include <string> #include <GL/glew.h> #include <GLFW/glfw3.h> #include <utility> namespace apollo { class ShaderHandler { GLuint shader; GLenum shaderType; char *buffer; pu...
true
12e4b1726170dca8b313df644b2c76219c8c0ffd
C++
nspope/inlassle
/src/Null.cpp
UTF-8
1,116
2.734375
3
[ "MIT" ]
permissive
#include "Null.hpp" namespace Covariance { mat Null::covariance (void) { mat d = arma::eye<mat>(dim, dim) * std::pow(nugget,2); return d; } mat Null::differential (void) { mat d (dim * dim, npars+1, arma::fill::zeros); return d; } cube Null::differential_dist (void) { cube d (dim, dim, npars, arma::fill:...
true
c0bb703823bf44f12abc7b6b064a97792c39bd3a
C++
Nihal-Priyadarshi/Hacktoberfest2021
/scripts/print_name_pattern.cpp
UTF-8
1,796
3.703125
4
[]
no_license
#include <iostream> using namespace std; // Below height and width variable can be used // to create a user-defined sized alphabet's pattern // Number of lines for the alphabet's pattern int height = 5; // Number of character width in each line int width = (2 * height) - 1; // Function to find the absolute value...
true
04233597a44c049a05f7d080b8b7d66e1fc36c0c
C++
yashwanth2804/EosSmartconstracts
/smartContracts/zombieFactory.hpp
UTF-8
1,799
2.6875
3
[]
no_license
// // Created by Ludvig Kratz on 2018-01-14. // //#include <stdio.h> //#include <math.h> #include <eoslib/eos.hpp> #include <eoslib/db.hpp> #include <eoslib/string.hpp> using namespace eosio; namespace zombieFactory { struct zombie { zombie() {}; zombie(account_name owner, eosio::string name, ui...
true
777d74b5dcd217c0e74032b7448a29151be9f012
C++
Kalyan-Sunkara/Data-Structures-And-Algorithms
/AVLTree/Node.cpp
UTF-8
1,108
3.203125
3
[]
no_license
#include "Node.h" Node::Node() { counter = 0; data = ""; height = 0; right = nullptr; left = nullptr; balanceFactor = 0; } Node::Node(int c, string d, int e):counter(c), data(d), height(e) { right = nullptr; left = nullptr; balanceFactor = 0; } int Node::setNodeCounter(int num) { counter = num; return count...
true
c2a8937fbaacb3cb3a598a89055d26ce7dad695e
C++
pranjaltimsina/DSA-Assignments
/Assignment 2/eval_infix.cpp
UTF-8
5,646
3.9375
4
[]
no_license
// Exp 2D: Program to evaluate infix expressions // Author: Pranjal Timsina; 20BDS0392 #include <iostream> #include <ctype.h> #include <cmath> #include <string> // Initializing a stack #define MAX 500 std::string stack[MAX]; int top = -1; // functions to check if stack is empty or full bool is_empty() { ...
true
7ecf27cc4b336bb789b5281bdddf47609bf8b349
C++
droneRL2020/DS_Algorithms
/backtracking_recursion/79. Word Search/79. Word Search/79. Word Search.cpp
UTF-8
1,601
3.390625
3
[]
no_license
//5:30pm start // #include <iostream> #include <vector> using namespace std; class Solution { public: bool exist(vector<vector<char>>& board, string word) { bool res; for (int i = 0; i < board.size(); ++i) { for (int j = 0; j < board[0].size(); ++j) { res = rec(board, wor...
true
0e39f1e01ff0e1c625d54fbaeb6045d9b6d179cf
C++
pathfinder-for-autonomous-navigation/FlightSoftware
/test/test_fsw_fault_handler/test_super_simple_fault_handler.cpp
UTF-8
4,858
2.96875
3
[ "MIT" ]
permissive
#include "test_fault_handlers.hpp" #include <fsw/FCCode/SimpleFaultHandler.hpp> class TestFixtureSuperSimpleFH { protected: StateFieldRegistryMock registry; public: std::shared_ptr<WritableStateField<unsigned char>> mission_state_fp; std::shared_ptr<Fault> fault_fp; std::unique_ptr<SuperSimpleFaul...
true
ac3ca27338bc28b6f608818ccbc5ffd166b62646
C++
Debopriyasaha/lab9
/lab9_q12.cpp
UTF-8
451
3.203125
3
[]
no_license
#include<iostream> using namespace std; int main(){ int a=2, b=3, c=b; //declare variable int *ptr = &a; //point to a c = *ptr; //printing value a, b and *ptr cout << "variable 1= " << a <<endl; cout << "variable 2 = " << c << endl; cout << "pointer " << *ptr <<endl; ptr = &b; //printing value a, b ...
true
9c628ba7649a03a0ddd968b52af48d146b621a38
C++
rituraj2847/spoj
/PRIME1/PRIME1.cpp
UTF-8
993
2.84375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define MAXN 1000000020 int main() { int maxa = sqrt(MAXN), maxb = sqrt(maxa) + 1; vector<bool> prime(maxa, 1); for(int i = 2; i <= maxb; i++) { if (prime[i]) for(int j = i*i; j < maxa; j += i) prime[j] = 0; } int primes[3410], p = 0; for(int j = 2; j < max...
true
cd14885de3e969388f4dda4f7d0c99f71543a83b
C++
victorsenam/treinos-old
/na2th/codeforces/308-div2/A/table.cpp
UTF-8
537
2.515625
3
[]
no_license
#include<cstdio> #define MAX 102 using namespace std; typedef int num; num grid[MAX][MAX]; num n, x1, y1, x2, y2; int main() { scanf("%d", &n); for( int i = 0; i < MAX*MAX; i++ ) grid[i/MAX][i%MAX] = 0; while( n-- > 0 ) { scanf("%d %d %d %d", &x1, &y1, &x2, &y2); for( num x = ...
true
f46b557d9f9b981798656b4531930cfa8b53c93b
C++
yliu-cs/ACM
/PTA/团体程序设计天梯赛-练习集-L1-048.cpp
UTF-8
1,902
2.53125
3
[]
no_license
#include <stdio.h> #include <iostream> #include <string> #include <cstring> #include <algorithm> #include <iomanip> #include <cctype> #include <cmath> #include <stack> #include <queue> #include <vector> #include <cstdlib> #include <sstream> using namespace std; #define mem(a,b) memset(a,b,sizeof(a)) ty...
true
a6b5987e31f0624e1e16d24e31b58896141d08b6
C++
nitish166/Interview-Prepration
/LeetCodeJune/UniquePaths.cpp
UTF-8
528
2.828125
3
[]
no_license
class Solution { public: int uniquePaths(int m, int n) { vector<vector<int>> paths(n, vector<int>(m)); for(int c=0; c<m; c++) { paths[n-1][c]=1; } for(int r=0; r<n; r++) { paths[r][m-1]=1; } f...
true
c28a0dbe41188c5eada771571b85ba3e65332d01
C++
mark-smits/CSD2
/csd2d/Juce Plugin/Source/Phasor.cpp
UTF-8
831
2.5625
3
[]
no_license
/* ============================================================================== Phasor.cpp Created: 30 May 2021 4:59:32pm Author: marks ============================================================================== */ #include "../JuceLibraryCode/JuceHeader.h" #include "Phasor.h" Phasor::Phasor()...
true
5b983bebb55a7726ce4ef1a7a65dd81869036bc6
C++
sergeyborov8/lab11
/hunter/_Base/c712822/e1266bb/83da1ac/Install/include/print.hpp
UTF-8
1,189
3.15625
3
[]
no_license
#include <string> #include <fstream> #include <iostream> /*! \brief Функция копирования \param[in] text Копирование текстовой строки \param[out] out Вывод текстовой строки на экран Данная функция копирует текстовую строку и выводит её на экран для контроля. Код функции выглядит следующим образом: \code void...
true
ad3db45e36de53c478e64836785259ed84854646
C++
torgiren/szkola
/semestr_5/numerki/9/main.cpp
UTF-8
1,423
2.640625
3
[]
no_license
#include <iostream> #include <math.h> #include <nrutil.h> #include <nrutil.c> #include <sinft.c> #include <realft.c> #include <four1.c> #include <time.h> using namespace std; float omega; long n; float y(float i); int main(int argc, char* argv[]) { srand(time(NULL)); if(argc<2) { cerr<<"Usage: "<<argv[0]<<" <k>"<<...
true
2929f2a8a7b84643e6b1841fe09b9c2f35841b5f
C++
michaeldoylecs/RocketAnalytics
/RocketAnalyticsLib/include/Keyframe.hpp
UTF-8
777
2.640625
3
[ "MIT" ]
permissive
/****************************************************************************** * Author: Michael Doyle * Date: 2/19/18 * File: Keyframe.hpp * Description: * Represents a Keyframe. *****************************************************************************/ #ifndef KEYFRAME_HPP #define KEYFRAME_HPP #in...
true
3373fee4a49f2da6f3a5904d6f70cf047bcf3db4
C++
georgerapeanu/c-sources
/C - Train Ticket/main.cpp
UTF-8
565
2.59375
3
[]
no_license
#include <iostream> #include <cstdlib> using namespace std; string rez; int V[5]; char C[10]; void btr(int pas,int sum) { if(pas>4) { if(sum==7) { rez+="=7"; cout<<rez; exit(0); } return ; } rez+="+";rez+=(V[pas]+'0'); btr(pas+1,sum...
true
2c358de8912c9336ab8f7dd05e7f4a1b6c66780a
C++
veksku/R210_Algorithm_Construction_and_Analysis
/3_cas/kodovi/1.cpp
UTF-8
908
3.546875
4
[]
no_license
#include <iostream> #include <vector> #include <cmath> using namespace std; void build_segment_tree(vector<int> &array, vector<int> &segment_tree, int k, int x, int y){ if(x == y){ segment_tree[k] = array[x]; return; } int middle = (x + y) / 2; build_segment_tree(array,...
true
2d6df6d1391a014b4172335e604229dcdf257364
C++
dhnesh12/codechef-solutions
/03-CodeChef-Medium/23--Jumping Fever.cpp
UTF-8
6,185
2.53125
3
[]
no_license
#include "bits/stdc++.h" using namespace std; #ifndef LOCAL #define endl '\n' #endif #define fr(i, a, b) for(int i = a; i <= b; i++) #define rf(i, a, b) for(int i = a; i >= b; i--) #define pf push_front #define pb push_back #define fi first #define se second #define all(x) x.begin(), x.end() #define rall(...
true
f76580ba165dc75baa6e6c38b4780a8227d0db91
C++
thejustinwalsh/libbulletml
/include/bulletmltree.h
UTF-8
2,614
2.828125
3
[ "BSD-3-Clause", "MIT" ]
permissive
/// BulletMLツリー。 /// BulletML Tree. /** * BulletML に特化していて非常にいんちきくさいのが特徴。 * Specialized in BulletML, characterized by being extremely cheap. */ #ifndef BULLETMLTREE_H_ #define BULLETMLTREE_H_ #include <algorithm> #include <memory> #include <string> #include <vector> #include "bulletmlcommon.h" #include "formula....
true
538a889f362548d263a331134283cfe2fd39410d
C++
GMohn/proj5
/src/testcsv.cpp
UTF-8
664
3.1875
3
[]
no_license
#include <gtest/gtest.h> #include "CSVReader.h" #include <sstream> TEST(CSVReader,EmptyTest){ std::stringstream Input; CCSVReader Reader(Input); EXPECT_TRUE(Reader.End()); } TEST(CSVReader,SingleLineTest){ std::stringstream Input(" 1,2 , 3 ,4,5\x0d\x0a"); CCSVReader Reader...
true
822631d0820ad4421343df3bea5314e2bdf271d8
C++
kitakou0313/-
/aoj150king.cpp
UTF-8
771
2.609375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #include <iostream> int main(){ int n; string st = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; cin >>n; while(n!=0){ string s; vector<int>key; string ans = ""; for(int i = 0; i<n;i++){ int x; cin >>x; key.push_back(x)...
true
e3d90cba9e348e6176c317ae90ac2f4a284b14b3
C++
Kipsora/KitJudge
/tools/server/judger/comparator/spjByte.cpp
UTF-8
1,685
2.671875
3
[ "MIT" ]
permissive
#include <cstdio> #include <cstring> #include <algorithm> #include "spjbase.hpp" int main(int argc, char *argv[]) { try{ FILE *indat = fopen(argv[1], "r"); FILE *instd = fopen(argv[2], "r"); FILE *insrc = fopen(argv[3], "r"); if (indat == NULL) { throw SPJException("Cannot open the input data.", SPJ_SRC_IO...
true
7094559ea743b2d16db2276b419045a915e33931
C++
zcaisse9876/caisse
/zmc/define/pair.cpp
UTF-8
884
3.40625
3
[]
no_license
template <typename T1, typename T2> pair<T1, T2>::pair(T1 first, T2 second) : first{first}, second{second} { } template <typename T1, typename T2> pair<T1, T2>::pair() { } template <typename T1, typename T2> bool pair<T1, T2>::operator==(pair<T1, T2> &src) { return this->first == src.first && this->second == src.se...
true
a66113887584c390dca330584f212d5ad8e47cfb
C++
357272055/Sorting-Algprithm
/mySort/mergeSort.h
UTF-8
1,162
3.140625
3
[]
no_license
#ifndef MERGESORT_H #define MERGESORT_H #include "dataList.h" template<class T> void Merge(dataList<T>& L1, dataList<T>& L2, const int left, const int middle, const int right, int& swapTime){ for(int k = left;k <= right;++k) L2[k] = L1[k]; int point1 = left, point2 = middle + 1, t = left; while(point1 <= middle &...
true
e4dfa137a4c8a892dfb54a550dd22cb0a3ac4baf
C++
antonpriyma/BMSTU
/ Languages ​​and methods of programming/C++/Lab12/main.cpp
UTF-8
796
3.0625
3
[]
no_license
#include <iostream> #include <vector> #include <string> #include "OwnIterator.h" #include "Number.h" #include "PrefixIterator.h" using namespace std; typedef PrefixIterator iter; int main() { /* std:string in; cin>>in; String s(in); PrefixIterator iter=s.begin(); *iter='{'; *iter++; *...
true
43b45805dd9e366590151194c5082e6fa87518ce
C++
duwenjie/asio.demo
/echo_server/echo_server.cpp
GB18030
2,625
2.609375
3
[]
no_license
// echo_server.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include <iostream> #include <boost/asio.hpp> #include <boost/bind.hpp> #include <boost/shared_ptr.hpp> #include <boost/enable_shared_from_this.hpp> #include <string> using namespace boost::asio; struct TcpSession; typedef boost::shared_ptr<ip::tcp::socket> sock_ptr; ...
true
f424f26c3bb0279d1cd994292feda92922d6e99a
C++
JSarasua/Guildhall
/ThesisSubmission/Engine/Code/Engine/Math/MathUtils.cpp
UTF-8
25,721
2.984375
3
[]
no_license
#include "Engine/Math/MathUtils.hpp" #include <math.h> #include "Engine/Math/FloatRange.hpp" #include "Engine/Math/Vec2.hpp" #include "Engine/Math/Vec3.hpp" #include "Engine/Math/AABB2.hpp" #include "Engine/Math/IntVec2.hpp" #include "Engine/Math/OBB2.hpp" #include "Engine/Math/Capsule2.hpp" #include "Engine/Math/LineS...
true
5d2c7a7509a7436e41a21d9b091a4965cb7f64f2
C++
FuangCao/cavan
/mfc/include/JwpCore.h
UTF-8
2,800
2.515625
3
[]
no_license
#pragma once #include "jwp-win32.h" class JwpCore : public jwp_desc { private: jwp_bool mInitiated; jwp_bool mRunning; protected: int mLogIndex; CFile mFileLog; JwpCore(void); virtual ~JwpCore(void); private: static jwp_size_t HwReadHandler(struct jwp_desc *jwp, void *buff, jwp_size_t size...
true
326bfc9b5936e14bf3621731b8db72321f8ac71e
C++
mar10930/CSC240-C-Basics
/ReverseNum.cpp
UTF-8
176
2.90625
3
[]
no_license
#include <iostream> using namespace std; int main() { int num = 123; int ans = 0; while(num != 0) { ans = ans*10 + num%10; num /=10; } cout<<ans; }
true
8dc1757164378dffda3d46049a2051e4d56c9dff
C++
leafyoung88/Virtual-Engine
/virtual_engine_origin/LogicComponent/DirectionalLight.h
UTF-8
1,305
2.546875
3
[]
no_license
#pragma once #include "Component.h" class Transform; class RenderTexture; class DirectionalLight final : public Component { public: static const uint CascadeLevel = 4; private: static ObjectPtr<DirectionalLight> current; uint shadowmapResolution[CascadeLevel]; ObjectPtr<RenderTexture> shadowmaps[CascadeLevel]; Dir...
true
aef32ae5bf85072ba5086e36df01699d1839c660
C++
ohaluminum/COSC1430_Exercise2
/Shape2D.cpp
UTF-8
419
2.953125
3
[]
no_license
#include "Shape2D.h" Shape2D::Shape2D(float cx = 0, float cy = 0) : center_x(cx), center_y(cy), area(0.0) { } float Shape2D::getCenter_x() { return center_x; } float Shape2D::getCenter_y() { return center_y; } float Shape2D::getArea() { return area; } void Shape2D::setCenter(float cx = 0, float cy...
true
a80ce85b39e6c24470c12be9af67c8d20d3897ba
C++
DoanTran2001/C-
/OOP/Nap chong toan tu/6.1-Vector.cpp
UTF-8
904
3.703125
4
[]
no_license
#include <iostream> #include <iomanip> using namespace std; class Vector{ private: int x,y; public: void Nhap(); void Xuat(); Vector operator+(Vector a); Vector operator-(Vector a); }; void Vector::Nhap(){ cout <<"Nhap hoanh do: "; cin >>x; cout <<"Nhap tung do: "; cin >>y; } void Vector::Xuat(){ cout ...
true
1fd1b2896edbe62ccf420d3411a3f5eb249c4ce5
C++
tttakano/Competitive-programming
/template/約数列挙.cpp
UTF-8
196
3.046875
3
[]
no_license
vector<int> enumdiv(int n){ vector<int> s; for(int i=1;i*i<=n;i++){ if(n%i==0){ s.push_back(i); if(i*i!=n)s.push_back(n/i); } } sort(s.begin(),s.end()); return s; }
true
1514b27d0c723766ab95da232e154eb8029b9798
C++
tamadate/MD_Collision_Transportation
/interface_flex_rigid.cpp
UTF-8
3,708
2.515625
3
[]
no_license
//------------------------------------------------------------------------ #include "md.hpp" #include <random> #include <algorithm> //------------------------------------------------------------------------ ///////////////////////////////////////////////////////////////////// /* Interface from rigid(CG) MD to all-a...
true
99b60ce15cbe0ffcb5b5022f4514de8e6be56056
C++
AndreiMihalea/a-problem-a-day
/2-products-array/products_array.cpp
UTF-8
1,124
3.859375
4
[]
no_license
#include <fstream> #include <iostream> #include <math.h> using namespace std; #define EPS 1e-9 void product_array(int n, int array[]) { int left[n], right[n]; left[0] = 1; right[n - 1] = 1; for (int i = 1; i < n; i++) { left[i] = array[i - 1] * left[i - 1]; } for (int i = n - 2; i >=...
true
ba801b0d50f2393046611a948ff788db6304ed6d
C++
sontallive/PAT_Basic_Practice
/1013/main.cpp
UTF-8
628
3.15625
3
[]
no_license
#include <iostream> using namespace std; bool isPrime(int n){ if(n == 2) return true; if(n % 2 == 0) return false; for(int i = 3;i * i <= n;i += 2){ if(n % i == 0) return false; } return true; } int main(int argc, char **argv) { int count = 0; int a,b; cin >> a >> b; int i...
true
0076fe499dabbea2a3db177ab4d32dc27057a703
C++
ChanhuiSeok/Basic_problem_solving
/[1]DP/2225-합분해.cpp
UHC
514
2.578125
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cstdio> #include <vector> #include <algorithm> int dp[201][201]; int main() { int N, K; scanf("%d %d", &N, &K); //1 N Ǵ 1̴. for (int i = 0; i <= N; i++) { dp[1][i] = 1; } for (int k = 2; k <= K; k++) { for (int n = 0; ...
true
31e5d886e69ce778e9c6e74cebee782998c41811
C++
EvgeniyMakhmudov/Arduino
/meteo_bmp180/app.ino
UTF-8
924
2.859375
3
[]
no_license
#include <Wire.h> #include <Adafruit_BMP085.h> Adafruit_BMP085 bmp180; void setup() { Serial.begin(115200); if (!bmp180.begin()) { Serial.println("Could not find a valid BMP180 sensor, check wiring!"); while (true) delay(100); } } void loop() { Serial.print("Temperature = "); Ser...
true
45fb223bc8230d9e946e8f391d9ffae83c213561
C++
aheyeant/poker_game
/poker_sem/cards/cardCombinationsEngine/CombinationsEngineFor5cards.h
UTF-8
1,159
2.515625
3
[]
no_license
#ifndef SEM_ALI_COMBINATIONSENGINEFOR5CARDS_H #define SEM_ALI_COMBINATIONSENGINEFOR5CARDS_H #include "CombinationsEngineAbstract.h" class CombinationsEngineFor5Cards : public CombinationsEngineAbstract { public: explicit CombinationsEngineFor5Cards(const Card * cards); double getSumChance() override; d...
true
b931bf7c661d1787114411c9c5982da278834a61
C++
DevCodeOne/lp
/include/bcm_host_wrapper.h
UTF-8
610
2.703125
3
[]
no_license
#pragma once #include <mutex> #include "bcm_host.h" /** \brief This class will initialize the bcm_host library. */ class bcm_host { public: /** \brief Intialize the library. * It will only be initialized when the method is called first. * Further calls will be ignored */ static void initia...
true
1f7656c31b031cb20dfaa4096aa8ec63e5e112d8
C++
LSaber36/IEEE_UCF_Hardware_Competition_MotherShip
/Arduino Files/MotherShip_V2/MotherShip_V2.ino
UTF-8
15,351
2.59375
3
[]
no_license
/* The purpose of this file is to make controlling the GBE as easy as possible Functions for controlling the motor: void pulseMotor(int dir) void moveGEBDist(int dir, float dist, float scale) void moveGEBSteps(int dir, float steps, float scale) void homeGBE(float scale, int *z) void setDir(int di...
true
224bf5e268dbbb3e4abd2d4cc56ae36d6494bef1
C++
watashi/AlgoSolution
/zoj/20/2011.cpp
UTF-8
4,227
2.78125
3
[]
no_license
/* #include <cmath> #include <cstdio> #include <utility> using namespace std; typedef pair<long long, long long> Complex; const int MAXN = 100; const double eps = 1e-8; const Complex ZERO = Complex(0, 0); long long a[MAXN + 1], nx, nb, nbb[MAXN + 1]; Complex x, b, bb[MAXN + 1]; long long norm(const Complex& c) { ...
true
bbfb5449dc5a6d3308afc64350d9a128439e3c16
C++
fspirit/kf
/src/main.cpp
UTF-8
3,887
2.671875
3
[]
no_license
#include <uWS/uWS.h> #include <iostream> #include "json.hpp" #include <math.h> #include "RMSECalculator.hpp" #include "ExtendedKalmanFilter.hpp" #include "UnscentedKalmanFilter.hpp" #include "MeasurementPackageFactory.hpp" #include "WebSocketMessageHandler.hpp" #include "RadarMeasurementModel.hpp" #include "LaserMeasu...
true
d00581de5f1ece5fc2a8e47ca468c6b9a383bf53
C++
Sendhuraan/CPP_solutions
/src/collection/test-solution/index.cpp
UTF-8
184
2.6875
3
[ "MIT-0" ]
permissive
#include "math-functions/functions.h" #include <iostream> int main(void) { start(); int number = 5; printf("The Square of the number %d", square(number)); end(); }
true
d6eef06eb2feec789f0f286b41c51f555d9bdd8f
C++
cybo-neutron/DS-and-Algo
/Graph/Bishu_and_his_girlfriend.cpp
UTF-8
2,102
2.65625
3
[]
no_license
//Hackerearth Bishu and his girlfriend #include<bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define eb emplace_back #define pii pair<int,int> #define pll pair<ll,ll> #define fo(i,n) for(i=0;i<n;i++) #define fok(i,k,n) for(i=k;i<n;i++) #define dbg(x) printf("%d %d\n",#x,...
true
4784f4573d7c1bfbd049ab3ffaa5d26ece634097
C++
pikipupiba/RGB_Empire_Rewrite_July_2019
/Meteor.cpp
UTF-8
1,097
2.65625
3
[]
no_license
#include "Meteor.h" Meteor::Meteor(LED_Fixture* new_fixture, LED_Group* new_group) :Animation(new_fixture, new_group) { START; vars(position, a_value)->eor = _eor_Loop; vars(position, a_speed)->value = float(random8(100,255)) / 200.0; vars(fade, a_value)->value = 2; vars(hue, a_speed)->value = 0; END; } void...
true
1651067ff758b576dbee0231601e4935a6615e57
C++
vishalbelsare/DMGameBasic
/src/Tools.h
UTF-8
1,329
2.59375
3
[ "MIT" ]
permissive
/* * Tools.h * * Created on: Apr 22, 2014 * Author: wilfeli */ #ifndef TOOLS_H_ #define TOOLS_H_ #include <Eigen/Dense> namespace Tools{ extern void mgrid(Eigen::MatrixXd, Eigen::MatrixXd*); extern void mgrid_test(Eigen::MatrixXd, Eigen::MatrixXd*); extern void print_vector(std::vector<double>); extern v...
true
3957ddaa09dbc5f6241f6ee67dace10eb8d9c97f
C++
InflamedBanana/FileChecker
/FileChecker/src/fileChecks.cpp
UTF-8
4,094
2.609375
3
[]
no_license
#include <iostream> #include "fileChecks.h" #include "fileManipulator.h" #include <vector> #include "UString.h" #include <algorithm> typedef Settings::DirectoryConfig::DirectoryFlags DirectoryFlags; using namespace std; bool AnyOf( const vector<string>& _strVector, const string& _str ) { return any_of( _strVector.b...
true
1a609183a7bd3fbd604fcb95e92fa26066000e05
C++
KevinUTAT/Cplusplus
/ECE244/Lab5/Lab5/TreeNode.h
UTF-8
1,323
2.765625
3
[]
no_license
#ifndef TREENODE_H #define TREENODE_H #include <string> #include "DBentry.h" //#include "TreeDB.h" using namespace std; class TreeDB; class TreeNode { private: DBentry* entry; TreeNode* left; TreeNode* right; public: TreeNode(); TreeNode(DBentry* entry_, TreeNode* left_, TreeNode* right_); TreeNode(string nam...
true