blob_id
stringlengths
40
40
content_id
stringlengths
40
40
repo_name
stringlengths
5
114
path
stringlengths
5
318
language
stringclasses
5 values
extension
stringclasses
12 values
length_bytes
int64
200
200k
license_type
stringclasses
2 values
content
stringlengths
143
200k
8ecf8a07c85064d98ae570b256e83af55a9c80e4
bb600d9adc6a85f78b1452c19bbe5b9cb7bfcb64
ofZach/RTP_MIT_RECODED
/bin/data/scenes/aaronVeraMolnar/exampleCode.cpp
C++
cpp
458
permissive
for (int j = 0; j < [[howManyXY]]; j++) { for (int i = 0; i < [[howManyXY]]; i++) { // iterate on repetitions for (int rep = 0; rep < [[howManyInside]]; rep++) { // padding percentage float paddingFactor = 1.0 - padding; ofRo...
538a7e4c71d059a67430fb2cef289d461d930f9e
29ef564c6934d16abc462b807acbedfe34a70994
yhshu/NEU-SE-Design-and-Analysis-of-Algorithms
/exp1/1.1中位数.cpp
C++
cpp
3,884
no_license
// // Created by syh on 19-4-3. // // 本题类似于 LeetCode 4. Median of Two Sorted Arrays // 两数组长度相等,题目更简单 #include <bits/stdc++.h> #include "../lib/util.h" using namespace std; /** * 查找两个排序数组中的中位数 * * O(n)解法,合并数组并获取中位数 * @param nums1 已排序数组1 * @param nums2 已排序数组2 * @return 两数组的中位数 */ template<class T> T findMedianS...
d521381794d8d204f1148080288d8c48702d3834
021aae91dd8de8455c2b4c4bc01a7fc6a9e76110
1is0/Kulevich
/С++/Lab3/Bus.cpp
C++
cpp
1,073
no_license
//--------------------------------------------------------------------------- #pragma hdrstop #include "Bus.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #include <vcl.h> int Bus :: GetNumber(){ return number; } void Bus :: SetNumber(i...
9fd21b90a28c2ed3c70d66f5233268e8bf9085f7
8640a5b76878eb6c70c686acd99a2b079576dc52
itsvismay/fast_muscles
/famu/vertex_bc.cpp
C++
cpp
5,622
permissive
#include "vertex_bc.h" #include <iostream> #include <set> using namespace Eigen; void famu::vertex_bc(std::vector<int>& mmov, std::vector<int>& mfix, Eigen::SparseMatrix<double, Eigen::RowMajor>& mFree, Eigen::SparseMatrix<double, Eigen::RowMajor>& mConstrained, Eigen::MatrixXd& mV){ std::vector<int> lfix = mfix;...
916350d8020ab772ac6c9cec3c5f927d0e46cb20
041a00748445b4a14ae219a5fc27bf4aeeb5991a
JoelDreaver/Object-Studio
/Panner/cpanner.cpp
C++
cpp
2,197
no_license
#include "cpanner.h" CPanner::CPanner() { } void CPanner::Init(const int Index, void *MainWindow) { m_Name=devicename; IDevice::Init(Index,MainWindow); AddJack("In",IJack::Wave,IJack::In,jnIn); AddJack("Out",IJack::Stereo,IJack::Out,jnOut); AddJack("Out Left",IJack::Wave,IJack::Out,jnOutLeft); ...
20f570e86b8f09c7e6187055c190e16ec6bccefc
d25523276efc4ae0d820090a2e19648873c59742
huqianshan/OpenMLDB
/hybridse/src/vm/sql_compiler.cc
C++
cc
16,010
permissive
/* * Copyright 2021 4Paradigm * * 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 agreed to in ...
cbef4703c975b8609d00616ae71818f478def29b
88d2b952ec823ce4cb6a507b76fbdd04fe40707b
bytebarian/NullDereference
/Injector/Injector.cpp
C++
cpp
1,210
no_license
// Injector.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> #include <cstring> #include <windows.h> #include <easyhook.h> int main() { DWORD processId; std::wcout << "Enter the target process Id: "; std::cin >> processId; DWORD freqOffset =...
84c9825c882a1b54631178b986e02308808a2efc
5aff186436c1776520e006f35b7bb70621375be6
ryryrymyg/cpp_ryuseiGai
/cpp_practice/APG4b/EX13.cpp
C++
cpp
483
no_license
#include <bits/stdc++.h> using namespace std; int main() { int N, mean, sum = 0;//N:要素数, mean:平均, sum:合計 int i; //カウンタ変数 cin >> N; vector<int> points(N); for(i = 0; i < N; i++){ cin >> points.at(i); sum += points.at(i); } mean = sum / N; for(i = 0; i < N; i++){ if(points.at(i) > mean){ ...
95d163f1d93e32fd719e044e66b897a5987d8e68
8f466e5d37bd2d248969cfaded230f81a3f95227
root526f6f74/BloodNET
/internal_hvh/hooks/runcmd.cpp
C++
cpp
465
no_license
#include "../include_cheat.h" void __fastcall hooks::run_command(void* ecx_, void* edx_, C_BasePlayer* entity, CUserCmd* ucmd, IMoveHelper* move_helper) { if (g_unload) return orig_run_command(ecx_, edx_, entity, ucmd, move_helper); // airstuck jitter / overpred fix. if (ucmd->tick_count >= std::numeric_limits< ...
668e5e8d1da7a9b553438f4553c75dfd0db610bf
9273410df99fd237ebc78a27f7a4ec6094439658
vladhrytsuk/university-laboratory-work-qt-project
/untitled2/main.cpp
C++
cpp
1,114
no_license
#include <QApplication> #include <QWidget> #include <QLabel> #include <QSpinBox> #include <QPlainTextEdit> #include <QFormLayout> #include <QGridLayout> #include <QSlider> int main (int argc, char **argv) { QApplication app(argc, argv); QWidget widget(0); QGridLayout grid_layout; widget.set...
2a145a30b178ce44c973ef5c722c37d0aa929ec8
fd5560d47afb668b844a38f58f1f7d405729705c
zH4x/SpellBreak-FULL-SDK
/SDK/SB_BP_Perk_Stoneshaper_Earths_Mantle_parameters.hpp
C++
hpp
403
no_license
#pragma once // SpellBreak By Respecter (0.15.340) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SB_BP_Perk_Stoneshaper_Earths_Mantle_classes.hpp" namespace SpellSDK { //--------------------------------------------------------------------------- //Parameters //---------------------------------------...
c779eeae39c456a6be7f6be7186228deb2dfb7c8
c8f789008e6a752c392f7bfe020a99f462d3a85b
SUNGWOOKYOO/Algorithm
/src_Cplus/CountInversion2.cpp
C++
cpp
1,716
no_license
# include <iostream> using namespace std; int naive(int* a, int n) { int count = 0; for (int i = 0; i < n - 1; ++i) { for (int j = i + 1; j < n; ++j) { if (a[i] > a[j]) { count += 1; } } } return count; } void merge(int a[], int p, int q, int r) { int n1 = q - p + 1; int n2 = r - q; int *L = new ...
30ba3abbf105882cbd98f1e9bffed62029cfb297
ae9f57ed1c280d5dc73a4224b5a8f5cf5e213708
Chenyuacey/Data-Structure
/Algorithm/链表测试.cpp
C++
cpp
1,387
no_license
#include<stdio.h> #include<stdlib.h> struct student{ int num; int score; struct student *next; }; int n; struct student *create(void){ struct student *head; struct student *p1,*p2; p1=p2=(struct student *)malloc(sizeof(struct student)); head=NULL; n=0; scanf("%d %d",&p1->num,&p1->score); while(...
de160ab4d4649b46d5ad11dd0b687ce3592e476d
37e541e0c4076670d8b8d97f604974e22731df43
astariko/project-phoenix
/world.hh
C++
hh
1,566
no_license
#ifndef WORLD_HH #define WORLD_HH #include <includes.hh> typedef string tMine[1000]; // another instance used at world.cpp class World { private: // TODO: make better tMine mine; // Input a line void inputLine(string input); // Finalize the input. This is called after all the input is read in...
16d6fe3ab6b6b066e3a278399a7e265363d41c9b
441872168a7da7b7c3b40ca89e8d59a8cbc3e42b
isl-org/Open3D
/cpp/open3d/core/kernel/ReductionCPU.cpp
C++
cpp
13,572
permissive
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // Copyright (c) 2018-2023 www.open3d.org // SPDX-License-Identifier: MIT // ---...
6923aca98729097dd871b5e56ed1de30304176b8
40654bcbc9133c11f2bc86d84175df5b6830f570
ruixueqingyang/OpenMP_benchmarks
/Original/rodinia/nw/needle.cpp
C++
cpp
14,064
no_license
#define LIMIT -999 //#define TRACE #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <sys/time.h> #include <omp.h> #define OPENMP //#define NUM_THREAD 4 #define BLOCK_SIZE 16 //////////////////////////////////////////////////////////////////////////////// // declarati...
381bd75edbc0e3ddbb4045c0b2a3f5c85015713e
7d125fe50c90732866c806a31cc57af6884c66e3
napetrov/daal
/cpp/oneapi/dal/table/backend/register_serializable.cpp
C++
cpp
1,238
permissive
/******************************************************************************* * Copyright 2020 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.o...
6255c527bf85b41753ac92a5d09ceec122a1754c
914b7e179af454b23eef0fde5acfe6b9b47e89af
Alipipe/TOP-chain
/src/xtopcom/xmetrics/xmetrics.cpp
C++
cpp
28,852
no_license
// Copyright (c) 2017-2018 Telos Foundation & contributors // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "xmetrics.h" NS_BEG2(top, metrics) #define RETURN_METRICS_NAME(TAG) case TAG: return #TAG char const * matrics...
1d2aa76f0e0486de119adcac15d4120a8cbc945b
eb9b543ae326976031f4c0fe443be6df22bdcee2
alibaba/heterogeneity-aware-lowering-and-optimization
/tests/unittests/lit_cases/test_xnnpack/test_slice_neg_steps_xnnpack.cc
C++
cc
2,540
permissive
//===-test_slice_neg_steps_xnnpack.cc-----------------------------------------------------------===// // // Copyright (C) 2019-2020 Alibaba Group Holding Limited. // // 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...
c4eb6554f3203a7fee340af98dfd3bfaebe92ea9
589b255f25b231a870aa6be88bac7e08d25f5ce5
voku/sm_android_frameworks_base
/core/jni/android/opengl/util.cpp
C++
cpp
32,716
permissive
/** ** Copyright 2007, The Android Open Source Project ** ** 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 ...
911c191ed8a1579ea3e0b9c8b453f22fd59a3c1e
b7c3992291f40cd3a9e7844675feafe7cead571d
Thecatkiller/AN.DE-ALGOR.Y-ESTRAT.-DE-PROG
/Proyecto Final/Codigo fuente/Cajero.cpp
C++
cpp
2,310
no_license
#include "Cajero.h" #include <iostream> #include <string> #include <sstream> #include <vector> using namespace std; Cajero::Cajero(){ this->_estado = true; } Cajero::Cajero(int codigo,bool estado,string ubicacion){ this->_codigo = codigo; this->_estado = estado; this->_ubicacion = ubicacion; } void Cajero::ped...
c9c8816504305c888011fc85b84166d438f0b544
69abf63679ad5ff13d132aee066dd73cdde3e8c8
Beanecessar/openGL
/nclgl/MD5Node.cpp
C++
cpp
11,362
no_license
#include "MD5Node.h" #ifdef USE_MD5MESH #ifdef WEEK_2_CODE MD5Node::MD5Node(const MD5FileData &ofType) : sourceData(ofType) { currentAnim = NULL; frameTime = 0.0f; currentAnimFrame = 0; ofType.CloneSkeleton(currentSkeleton); mesh = ofType.GetRootMesh(); } MD5Node::~MD5Node(void) { } /* This Overridden Upd...
a90625cd693fa7e67058cdfabe69a9494147d26a
8120ece3ab88d063df9eb5f8921a8367ac2c0d31
yanggao24ban/VS
/Engine/Bianbian.cpp
C++
cpp
12,504
no_license
#include "Bianbian.h" bianbian::bianbian() : rand(seed()), fitX(0,Graphics::max.x-face.x), fitY(0,Graphics::max.y-face.y), fitV_x(-5,5), fitV_y(-5,5) { pos.x = fitX(rand); pos.y = fitY(rand); v.x = fitV_x(rand); v.y = fitV_y(rand); bianbianNum ++; } void bianbian::move() { pos += v; } ...
dc4e0fc94244c42f6f788f5c11da28808c7d571c
4e3d02aa5919fa17aa62b9753924f9e79cc07294
sogapalag/contest
/yukicoder/101.cpp
C++
cpp
949
no_license
#include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> #include <algorithm> #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++) using namespace std; typedef lo...
79f4c3acfd93b6eff8a49c485907de0483fbe099
ae9c82017365e2b5f2e0ae047422f8c21aae98ab
afast/compiladores
/ejecucion/RVariable.cpp
C++
cpp
697
no_license
#include <iostream> #include <sstream> #include <string> #include "RBool.h" #include "RVariable.h" #include "memory.h" RVariable::RVariable(const char *arg){ this->str = new std::string(arg); new_pointer(this); type = RVARIABLE; } RVariable::RVariable(char *arg){ this->str = new std::string(arg); new_point...
56092461fc892a77649f3ed6d7162875d8398c94
9bfc9b989fdbe1252d3d1c9dd41ffd04643205a3
stephencullinan/WebBrowser
/fluentbigbutton.cpp
C++
cpp
1,603
permissive
#include "fluentbigbutton.h" FluentBigButton::FluentBigButton(QString buttonIcon, QString buttonCaption, QString onClickEvent, QString id, QString backgroundColour) { this->buttonIcon = buttonIcon; this->buttonCaption = buttonCaption; this->onClickEvent = onClickEvent; t...
9b3f73cf3c2a5f6c04d9ea283dac5b0bf43a34d2
0b04c9da0e14e387f6cc95f5e132d9c795c30f1b
lucasnfarias/42Cursus
/cpp/module03/ex01/ClapTrap.hpp
C++
hpp
1,740
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Fixed.class.hpp :+: :+: :+: */ /...
ae7116ea681240397a970e848771638490c58aa6
03e119e6c9436b7a2b27d09e1b630969e484cae4
wisdompeak/LeetCode
/String/459.Repeated-Substring-Pattern/459.Repeated-Substring-Pattern_v2.cpp
C++
cpp
397
no_license
class Solution { public: bool repeatedSubstringPattern(string s) { int n = s.size(); vector<int>dp(n,0); for (int i=1; i<n; i++) { int j = dp[i-1]; while (j>0 && s[j]!=s[i]) j = dp[j-1]; dp[i] = j+(s[j]==s[i]); } ...
c5d68eee9d17d98a594af62d0a0f86c7625204b3
301caeff7f181ed35f555c93626940d1be4afd0c
sir-rasel/Online_Judge_Problem_Solve
/Codeforces/codeforces_116A.cpp
C++
cpp
478
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int totalStops; int exitpassenger,enterpassenger; int passengercapacity=0; int initialpassenger=0; cin>>totalStops; while(totalStops--){ cin>>exitpassenger>>enterpassenger; initialpassenger=(initialpassenger-exitpassenger...
834423a12ea56ae482b8bc0d5c43a2b4352ad48a
81762ce2fde865d864033811c4a753c81cf09136
qlqnf16/algorithms
/2020/Apr/0429robotSnack.cpp
C++
cpp
2,310
no_license
#include <stdio.h> #include <queue> #define MAXM 110 #define MAXR 12 using namespace std; struct POS { int c, r, d; }; int N, minDist; int map[MAXM+2][MAXM+2]; int visit[MAXM+2][MAXM+2]; POS snacks[MAXR]; POS robots[MAXR]; int dist[MAXR][MAXR]; bool checkSnaks[MAXR]; int dir[][4] = {{0, 0, 1, -1}, {1, -1, 0, 0}}; ...
ad520b364e9f6fb71436ea167b6a2513c4962192
eab3eb2d04c9d8e40ab5c9790ed13670d25296fe
enriquegr84/GameEngineTutorial
/Source/GameEngine/Application/WindowApplication.cpp
C++
cpp
7,920
no_license
// Geometric Tools, LLC // Copyright (c) 1998-2014 // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // // File Version: 5.0.2 (2011/08/13) #include "WindowApplication.h" #include "Core/Core.h" #include...
63bde4e44eddb7490abdd98df992b6bd70c4d597
f4482c3719949499264467ec178d5bfe1ef455d4
takedariri/omim
/routing/index_graph_loader.cpp
C++
cpp
8,889
permissive
#include "routing/index_graph_loader.hpp" #include "routing/city_roads.hpp" #include "routing/index_graph_serialization.hpp" #include "routing/maxspeeds.hpp" #include "routing/restriction_loader.hpp" #include "routing/road_access_serialization.hpp" #include "routing/route.hpp" #include "routing/routing_exceptions.hpp"...
4e259a6364d38973a6f771a27d36e554db507544
ff3c41d3a0d3494c83c0dce92b322c85e77db9f7
gayalhk/5143-OS-Hewakuruppu
/Assignments/P01/shell/commands/head.cpp
C++
cpp
519
no_license
#include <iostream> #include <fstream> #include <cstdlib> int main() { ifstream file; char word[250]; file.open("characters.txt"); if (!file.is_open()) { exit(EXIT_FAILURE); } int counter = 0; while (counter < 10 && file.good() ) { file.getline(word, 250); counter++; cout << word << endl; } ...
f7a4715a6396d43523d18c9a5d2b1f5357afb7ab
c1711e47c9fc0e01a75f1cbefe26f1cd5b6905ef
sevarbiter/R-Shell
/src/connector.hpp
C++
hpp
218
no_license
#ifndef __connector_hpp__ #define __connector_hpp__ #include "base.hpp" class connector: public base { public: connector(); bool compute(bool* flag); private: base* command_left; base* command_right; }; #endif
9661e6133b91cc877791912de1de11c1d5eedc9a
62aeb91a91c4f07f5b1a0074c8bbc9258827bb4b
minhduc2803/School
/HK3/OOP/code/practice/Tuan_09/1712358_VirtualDynamicBinding/1712358_VirtualDynamicBinding/sheep.cpp
C++
cpp
294
no_license
#include "sheep.h" Sheep::Sheep() { InstanceCount++; } Sheep* Sheep::Clone() { return new Sheep; } Sheep::~Sheep() { InstanceCount--; } int Sheep::HaveBaby() { return 1 + rand() % 5; } int Sheep::GiveMilk() { return rand() % 6; } void Sheep::MakeSound() { cout << "Baa..baa.." << endl; }
324d64a76723c95e63cffd8affa9fe3871652169
47a60a0e6e6b09bf5dcfc841880dfb974d9fc337
skqoaudgh/Algorithm_studying
/Baekjoon/2823_HateUturn.cpp
C++
cpp
598
no_license
#include <string> #include <iostream> using namespace std; int dx[] = {-1,1,0,0}; int dy[] = {0,0,-1,1}; int R,C; string arr[10]; int func() { for(int i=0; i<R; i++) { for(int j=0; j<C; j++) { if(arr[i][j] == '.') { int cnt = 0; for(int t=0; t<4; t++) { int nx = i+dx[t]; int ny = j+d...
83d512ef1b93e82b731d3f614b04f430b093d4a6
b06edbc7226319ea6c6f4b1b835169eaa1019e32
specs-feup/clava
/ClavaWeaver/resources/clava/test/weaver/cpp/src/omp_set_attributes.cpp
C++
cpp
428
permissive
double foo() { double a = 0; #pragma omp parallel num_threads(4) reduction(+:a) reduction(max:i) { #pragma omp for shared(i) private(a) for(int i=0; i<10; i++) { a += i; } } #pragma omp parallel for schedule(monotonic:static,1) proc_bind(master) ...
8030959cc2fdb51d853074e261c76f3e7b9be965
bc9747fe50de1ae6014ed7fc6db71e52e9ffc3bb
niuxu18/logTracker-old
/second/download/rsync/gumtree/rsync_repos_function_206_rsync-2.6.2.cpp
C++
cpp
1,232
no_license
int copy_file(char *source, char *dest, mode_t mode) { int ifd; int ofd; char buf[1024 * 8]; int len; /* Number of bytes read into `buf'. */ ifd = do_open(source, O_RDONLY, 0); if (ifd == -1) { rprintf(FERROR,"open %s: %s\n", full_fname(source), strerror(errno)); return -1; } if (robust_unlink(dest) ...
c2ab2eb6a3b44109413e431dd8e1298fc363e92f
4f16aa3f7701eea01d2b9af3c06697a69ca1d9ed
henningkayser/camera_positioner
/src/camera_positioner.cpp
C++
cpp
3,288
no_license
#include <ros/ros.h> #include <tf/transform_listener.h> #include <tf/transform_broadcaster.h> #include <apriltags_ros/AprilTagDetectionArray.h> class CameraPositioner { private: ros::Subscriber sub; // TF communication channels tf::TransformListener listener; tf::TransformBroadcaster br; // constant t...
dc04ff8d266fc075a6efc39767604197b8ae23fd
228b3e5b990b0e0541a045d9a60998f04374fa59
ArchimedDev/ArchimedCoin
/src/test/crypto_tests.cpp
C++
cpp
16,249
permissive
// Copyright (c) 2014-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "crypto/ripemd160.h" #include "crypto/sha1.h" #include "crypto/sha256.h" #include "crypto/sha512.h" #include "crypto...
5e857622ec3e0f2df4346cb271722e0f10bbd0c6
ee160998fed178f037f6adf5f5450c15ca50ae5d
xLAva/JediAcademyLinux
/code/game/AI_AssassinDroid.cpp
C++
cpp
5,617
no_license
// leave this line at the top of all AI_xxxx.cpp files for PCH reasons... #include "g_headers.h" #include "../game/b_local.h" //custom anims: //both_attack1 - running attack //both_attack2 - crouched attack //both_attack3 - standing attack //both_stand1idle1 - idle //both_crouch2stand1 - uncrouch //both_death4 ...
15d558bf36f29f9de1e9c4d721258b2d655d1024
a36d4686da2cb97940b3b98bd26304d24f69f5bb
nwkrix/.cc
/LeetCode/test.cpp
C++
cpp
417
no_license
#include <iostream> #include<vector> #include<algorithm> using namespace std; vector<int> fcn(vector<vector<int>>& in){ return in[0]; } void display(vector<int>& in){ for_each(in.begin(), in.end(),[](int i ){ if(i != 0){ cout << i << ", "; } }); cout << endl; } int main() { vector<vector<int>> in = { ...
5a3c774e044aa66312180aebce4591cf18cb2ef9
b571e7cbfa0d901e70325fab4321b5ea3bf80a05
btcup/sb-admin
/exams/2559/02204111/2/midterm/2_1_837_5920550139.cpp
C++
cpp
288
permissive
//5920550139 Kamonwan Junlasan #include <iostream> #include <cmath> using namespace std; int main() { char x; int a,b,d,j,Year,Sal; cout<<"Enter car model"; cin>>x; cout<<"enter number of years(1-6):"; cin>>Year; cout<<"enter your salary:"; cin>>Sal; system("pause"); return 0; }
41b983174e71102cff3c5bab7c13657a1f086350
d494eb6b696b81513b42f8992418881bee2a3e53
arnov-sinha/cosinesimilarity
/src/cosinehelper.cpp
C++
cpp
46,015
no_license
#include <string.h> #include "cosinehelper.h" using namespace std ; CosineHelper::CosineHelper( const char* file, string ( *cleaner ) ( const string& dirtystring ) ) : filename( file ), totalnnzs( 0 ), ...
77205c796a8b42c76424df5be9d1b1986cbe4909
f33fae3b55b717a38b8b550b5efadc19d8a92454
murproject/MiddleRov2OnBoard
/MiddleROV2OnBoard/RotaryCamera.cpp
C++
cpp
536
no_license
#include "RotaryCamera.h" RotaryCamera::RotaryCamera(int8_t pin) { m_pin = pin; m_defAngle = 90; } void RotaryCamera::init() { m_driver.attach(m_pin); m_timer.start(); m_driver.write(m_defAngle); m_angle = m_defAngle; } RotaryCamera::~RotaryCamera() { m_driver.detach(); } void RotaryCamera::rotate(int8_t ang...
889bf9aa02c92dc9344c8450c409fa8028f0ae23
e4f64731634c54047254046cb8808140a41751ab
zhangyxin/Qter
/QtFramelessWindow/SimpleDemo_v1/frameless/framelesswidget.cpp
C++
cpp
15,648
no_license
#include "framelesswidget.h" #include <QtDebug> #include <QtWidgets> #if defined(Q_OS_WIN) #include <qt_windows.h> #include <windowsx.h> #include <QtWinExtras> #endif class FramelessWidget::FramelessWidgetPrivate { public: QVBoxLayout* layout = nullptr; #if defined(Q_OS_WIN) LONG aeroBorderlessFlag = WS_POPU...
6f11dfb86b977653f5d3c0fca75e81106a48b9d3
fbcd64ba24b3f11c32a6f78e3fac2813d3671fbb
ooryase/GYARUgame
/OtomeNotes/OtomeNotes/Sources/MainController/TimeManager.cpp
C++
cpp
423
no_license
#include"DxLib.h" #include"TimeManager.h" TimeManager::TimeManager() { timeCount = 0; lastTime = nowTime = GetNowCount(); } void TimeManager::TimeUpdate() { lastTime = nowTime; nowTime = GetNowCount(); timeCount += nowTime - lastTime; } void TimeManager::Reset() { timeCount = 0; } int TimeManager::GetDeltaTim...
ca3897b75321df7a5c920afbbfaf1334c54bd2fb
500fa0275565105c8545b273f0168ab5d38ea4a7
hsliao0903/2020Fall_Atlas_IoT_Lab3
/PartTwo/IoT_Application.cpp
C++
cpp
3,896
no_license
/***************************************************** IoT_Application.cpp This is a simple code for sending tweets to the Atlas server on my rawpberry pi. please set the SERVER_IP and SERVER_PORT below for connecting to another Atlas server. Usage: ./IoT_Application TweetType ThingID SpaceID ServiceName Inp...
4b89117bb484d51fcddae9bdc843126375cf1a2b
a186210166a7005792be46edb327b6e0134d4cf7
jettan/robotutor
/robot/src/behavior_engine.cpp
C++
cpp
4,217
no_license
#include <vector> #include <boost/algorithm/string/predicate.hpp> #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int_distribution.hpp> #include <boost/asio/io_service.hpp> #include "behavior_engine.hpp" #include "script_engine.hpp" #include "robotutor_protocol.hpp" namespace robotutor {...
79f6ae57f709f4d75430a0d6fc7e8f8d4ae464eb
24e218fc2c89320034a5241c73b20526696c2b2c
andyyang200/CP
/Competitive Programming/15-295/Spring 2019/2/c.cpp
C++
cpp
1,617
no_license
#include <bits/stdc++.h> using namespace std; #define FOR(index, start, end) for(int index = start; index < end; ++index) #define RFOR(index, start, end) for(int index = start; index > end; --index) #define FOREACH(itr, b) for(auto itr = b.begin(); itr != b.end(); ++itr) #define RFOREACH(itr, b) qfor(auto itr = b...
e3e309613523deadc1bd942a5a798dd69a4b5ef6
c181c6a4510f70336d101f69a6206b079c341d83
Eason-Lai/git-code
/vscode/c++/lex1.cpp
C++
cpp
24,728
no_license
#include <iostream> using namespace std; #include <algorithm> #include<stack> #include<sstream> #include<vector> #include<queue> #include<set> #include <stdio.h> #include <string> #include <string.h> #include <map> //8 class NFA_Node; class Trans//trans¿‡£∫Ω” ’ƒ≥∏ˆ◊÷ƒ∏£®incept£©£¨ø…“‘µΩƒ≥∏ˆ◊¥Ã¨Ω·µ„(des) { public: c...
2c6915c441395f53270cfa8c8413e2028156aa51
e379ee6277262972b110a34dbf450cc125eb8922
jxianglonggg/SourceCodeGameTLBB
/Game/boost/boost/mpl/aux_/lambda_arity_param.hpp
C++
hpp
789
permissive
#ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See...
d74d1973457fab877dcab040409a229fd833d54f
1df7a0e1a145b21b05ea0adb5642ad718d8c8e6e
joshiepillow/perlinNoiseThing
/main.cpp
C++
cpp
6,524
no_license
#include <iostream> #include <SFML/Graphics.hpp> #include <cmath> void PerlinNoise2D(int nWidth, int nHeight, float *fSeed, int nOctaves, float fBias, float *fOutput) { for (int x = 0; x < nWidth; x++) for (int y = 0; y < nHeight; y++) { float fNoise = 0.0f; float fScaleAcc = 0.0f; float fScale = 1.0f;...
e9f93bed248396f43543b2e8c154ecf787658134
5ae36d93a092e958d26fe91a4527acae54a04659
fl-y/electron
/shell/common/gin_converters/content_converter.cc
C++
cc
14,654
permissive
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "shell/common/gin_converters/content_converter.h" #include <string> #include <vector> #include "content/public/browser/context_menu_params.h" #include "content/public/browse...
b2230fb6507036a259eafc969942d34d02caee68
77579e4687695703cc2fb4feaf5e84f54cc26f8d
fawkesrobotics/fawkes
/src/plugins/laser-filter/filters/box_filter.cpp
C++
cpp
6,576
no_license
/*************************************************************************** * map_filter.cpp - Laser map data filter * * Created: Fri Jul 17 20:38:14 2015 * Copyright 2006-2015 Tim Niemueller [www.niemueller.de] * 2015 Tobias Neumann *******************************************************...
9f43e7b3f2dcf36b108c0d39d216b1011ffd64e8
e6d103e03e55bd8fc680e4496822d1a24d4d4411
DanLee2326/LeeD-PA-4
/PA 4/DietPlan.cpp
C++
cpp
1,531
no_license
#include "DietPlan.hpp" // constructor DietPlan::DietPlan(int newGoal, string newName, string newDate) { mGoal = newGoal; mName = newName; mDate = newDate; } // copy constructor DietPlan::DietPlan(const DietPlan& copyPlan) { mGoal = copyPlan.getGoal(); mName = copyPlan.getName(); mDate = copyPlan.getDate(); } ...
f2d5edcd8a2a96822df6b62223f659dbab0d63d0
1472a98abad50fceabe68d35d714912331efa993
Jens-G/LockBox
/source/hpp/Win32/Release/LbRandom.hpp
C++
hpp
2,205
no_license
// CodeGear C++Builder // Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc. // All rights reserved // (DO NOT EDIT: machine generated header) 'LbRandom.pas' rev: 30.00 (Windows) #ifndef LbrandomHPP #define LbrandomHPP #pragma delphiheader begin #pragma option push #pragma option -w- // All ...
32f2b6916d518dc0f63be379164aed00d7282348
48387728666357921b95faf5c7c8501e27ccc590
suriyaa/fprime
/Fw/Comp/QueuedComponentBase.hpp
C++
hpp
1,704
permissive
/* * ActiveComponentBase.hpp * * Created on: Aug 14, 2012 * Author: tcanham */ /* * Description: */ #ifndef FW_QUEUED_COMPONENT_BASE_HPP #define FW_QUEUED_COMPONENT_BASE_HPP #include <Fw/Comp/PassiveComponentBase.hpp> #include <Os/Queue.hpp> #include <Os/Task.hpp> #include <FpConfig.hpp> namespace Fw {...
19f08bab6612db7f059582f634fc606ef19c827f
961b56b17af2a2c8274783cd299e0ff5cbe0c51e
liangsheng/ACM
/template1/poj3216+后缀数组+可重叠的k次最长重复字串.cpp
C++
cpp
1,823
no_license
# include <iostream> # include <cstdio> # define N 20010 # define M 1000002 using namespace std; int k; int r[N]; int sa[N],rank[N],height[N]; int wa[M],wb[M],wc[M],wv[M]; int cmp(int *r,int a,int b,int j) { return r[a]==r[b]&&r[a+j]==r[b+j]; } int da(int *r,int *sa,int n,int m) { int i,j,p...
5f8433c02c387a65617b90c5e483f9539426087b
965f246f290e1fdf2fa182370438c1ba10eea5e8
make1122/tencentcloud-sdk-cpp
/ms/src/v20180408/model/ScanPermissionList.cpp
C++
cpp
2,958
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * 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 ...
80584fd7bc82824c747d70828f9dc193898c7893
55a23f785e624702eb72b9c56ea26c106b1d2743
WhiZTiM/coliru
/Archive2/c2/62db531f686bc2/main.cpp
C++
cpp
4,031
no_license
#include <vector> #include <iterator> #include <algorithm> template < typename ITERATOR, typename ITERATOR2 > bool less_or_equal( ITERATOR begin, ITERATOR end, ITERATOR2 begin2 ) { for ( ; begin != end ; ++begin, ++begin2 ) { if( *begin < *begin2 ) return true ; if( *begin > *begin2 )...
9b9877177905f96dae9927751a24f6133fa864d8
e538a0294d0035f488cc89b9af9d194fa93f64e3
grazzdude/1DAE1
/Broutgame01/Breakout/Balls.cpp
C++
cpp
2,928
no_license
//--------------------------- // Includes //--------------------------- #include "Balls.h" //--------------------------- // Defines //--------------------------- #define GAME_ENGINE (GameEngine::GetSingleton()) //--------------------------- // Constructor & Destructor //--------------------------- Balls::Balls() { /...
bad8daf3bd6aaf54e8a4ea85de2b2758afc1e798
741e33ac31e10f7b974ff5b6c32a7701a4ed8178
Yu-AndroidM/android_system_core
/logd/LogKlog.cpp
C++
cpp
23,149
permissive
/* * Copyright (C) 2014 The Android Open Source Project * * 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 app...
d2e17715f9db153d25e892891f1fd3d1b28abc59
26dba709bf110ff6db261e18116dac7c9d260376
estebaneze/datos022011-tp1-vane
/TP1_v1/src/Estructuras/Bucket.cpp
C++
cpp
2,346
no_license
#include "Bucket.h" #include "key_node.h" Bucket::Bucket() {} Bucket::Bucket(int N, int prof) { this->N = N; this->refs = prof; } Bucket::Bucket(const Bucket &toCopy) { this->N = toCopy.N; this->bucket = toCopy.bucket; this->refs = toCopy.refs; } int Bucket::getNBucket() const { return th...
3438e803d00edaabbb8d83d7f65b9ea9785f7418
86ed773e55339a211bc5bba424122dbc3998a1f2
Osechkin/LoggingTool_Manager4
/LoggingTool_Manager/Dialogs/cdiag_server_dialog.cpp
C++
cpp
371
no_license
#include "cdiag_server_dialog.h" CDiagServerDialog::CDiagServerDialog(int _port, QWidget *parent) : QDialog(parent) { this->setupUi(this); this->setParent(parent); port = _port; sbxPort->setValue(port); connect(sbxPort, SIGNAL(valueChanged(int)), this, SLOT(setPort(int))); } void CDiagServerDialog...
1ebb512cfeafe2d5721fd37f277d79e47e141d15
e859eae8599a451763641f34556214e63319d95a
Crant/Graphics-Engine
/Graphics Engine/Source/Terrain.cpp
C++
cpp
10,539
no_license
#include "Terrain.h" #include "ResourceManager.h" #include "Exceptions.h" Terrain::Terrain(D3DXVECTOR3 position, D3DXVECTOR3 scale, unsigned int size, const std::string& heightmap) { this->zIndexBuffer = NULL; this->zVertexBuffer = NULL; this->zHeightMap = NULL; this->zSize = size; this->zScale = scale; this->z...
3d4a3cbaa602a35bcf2eb741b059c6c44bc5ba6d
bc24839b2221c6af962913e4af96211652b732b6
OptimalCoders/mc_potts
/src/alpha/old/baseline_impl_mkoenz/sim.hpp
C++
hpp
4,197
no_license
// Author: Mario S. Könz <mskoenz@gmx.net> // Date: 21.03.2014 09:55:10 CET // File: sim.hpp #ifndef __SIM_HEADER #define __SIM_HEADER #include <map> #include "grid.hpp" #include "accum_double.hpp" #include "random2_msk.hpp" #include "color.hpp" namespace potts { template<index_type Ht, index_type Lt> ...
9392aba300e87723ba7a1347e734532a2f10b28c
a796660d641f236e7cbb7502abdbdbcf57e0ed23
HalfVoxel/sc2-voxelbot
/bot/combat_predictor_train/main.cpp
C++
cpp
7,240
permissive
#include <libvoxelbot/utilities/mappings.h> #include <libvoxelbot/utilities/predicates.h> #include <libvoxelbot/buildorder/optimizer.h> #include <libvoxelbot/combat/simulator.h> #include <random> #include <sstream> #include <fstream> #include <iomanip> #include <iostream> #include <cereal/cereal.hpp> #include <libvoxel...
5f3cd4356917263eef9ef6a242280755b03729f9
6831d6cf9e978eb597db8d3aadc8081f61cb0dd7
vslavik/poedit
/deps/boost/libs/hana/test/ext/boost/mpl/integral_c/constant.cpp
C++
cpp
999
permissive
// Copyright Louis Dionne 2013-2017 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #include <boost/hana/ext/boost/mpl/integral_c.hpp> #include <boost/hana/tuple.hpp> #include <boost/hana/value.hpp> #include <laws/constan...
f49dbe8204b223ad4aa46f3ff9b300fe402fe129
440163967f1b0ff7ec87972f66641aaf41a14e1a
Fractal-Idea/devilution
/Source/pfile.cpp
C++
cpp
21,981
permissive
//HEADER_GOES_HERE #include "../types.h" int pfile_cpp_init_value; char hero_names[MAX_CHARACTERS][PLR_NAME_LEN]; bool gbValidSaveFile; // idb int save_prev_tc; // weak const int pfile_inf = 0x7F800000; // weak struct pfile_cpp_init { pfile_cpp_init() { pfile_cpp_init_value = pfile_inf; } } _p...
8e1a3a449857ffc45f42f911795dd6c55d24fe24
f594610134201c9c66bc531cfe6eb7995d5a1bd8
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE122_Heap_Based_Buffer_Overflow/s05/CWE122_Heap_Based_Buffer_Overflow__cpp_dest_char_cat_65b.cpp
C++
cpp
1,722
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_dest_char_cat_65b.cpp Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_dest.label.xml Template File: sources-sink-65b.tmpl.cpp */ /* * @description * CWE: 122 Heap Based Buffer Overflow * BadSource: Allocate us...
cf939b28da4a20abbf805ee617287a9c3eb04e3d
dceb656d0e76ca83be2f6799457f7ab152d001c0
jjzhang166/WinNT5_src_20201004
/NT/windows/advcore/gdiplus/engine/common/dynarrayimpl.cpp
C++
cpp
11,854
no_license
/**************************************************************************\ * * Copyright (c) 1998 Microsoft Corporation * * Module Name: * * Dynamic array implementation class * * Abstract: * * This is the class which implements the dynamic array. * It is used by the wrapper template classes DynAr...
3ba3c680d6fa6192bbf0319476b7fb7d9b108818
72d21d888c4d678ac3eb7dca2aa1191ab378c215
SMRT-Cloud/SmartCloud
/src/spork.cpp
C++
cpp
11,033
permissive
// Copyright (c) 2014-2016 The Dash developers // Copyright (c) 2016-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "spork.h" #include "base58.h" #include "key.h" #include "main.h" #include...
9c796eace04288bab34c310f7feff43622931871
32f4fdaeaa56fb02a69905c1066e14a8e811aba1
jiangtiantu/hikyuu
/hikyuu_pywrap/main.cpp
C++
cpp
4,921
permissive
/* * main.cpp * * Created on: 2011-12-4 * Author: fasiondog */ #include <cstdint> #include <boost/python.hpp> #include <hikyuu/hikyuu.h> namespace py = boost::python; using namespace hku; void export_DataType(); void export_Constant(); void export_util(); void export_log(); void export_Datetime(); void ex...
477b22e304a01d15156d557a4583e6ea7717cc0a
0c95a983006eff702e205daf9d1026c054196713
ali-yar/maia-advancedimageanalysis
/Project/source code/GUI/utils.cpp
C++
cpp
21,941
no_license
#include "utils.h" std::string Utils::dataset_path1 = "C:/Users/hp4540/Documents/MAIA Courses/UNICAS/Advanced Image Analysis/AIA-Retinal-Vessel-Segmentation/datasets/DRIVE/"; std::string Utils::dataset_path2 = "C:/Users/hp4540/Documents/MAIA Courses/UNICAS/Advanced Image Analysis/AIA-Retinal-Vessel-Segmentation/datase...
89f9c445766699bcfeced4b2fc1ba92096beb846
a443e06098e608bdd968b35d12178b1841797c60
Watch-Later/ncbi-cxx-toolkit-public
/src/algo/blast/unit_tests/seqdb_reader/seqdb_unit_test.cpp
C++
cpp
128,902
no_license
/* $Id$ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyrig...
55f7d7296b441e38f7fd0df4c26631d3e0a0cc20
3c33110f866ece86050c96905d1c3e3e3e773fae
wiku30/Path_Tracing
/ray/poly.cpp
C++
cpp
442
no_license
#include "poly.h" poly::poly(cmp x0, cmp x1, cmp x2, cmp x3) { a[0] = x0; a[1] = x1; a[2] = x2; a[3] = x3; } poly operator +(const poly& a, const poly& b) { poly res(a); for (int i = 0; i < 4; i++) { res.a[i] += b.a[i]; } return res; } poly operator *(const poly& a, const poly& b) { poly res(0,0,0,0); f...
3d7d1e903abc9ce659bb62a7982daaf2ca193615
29d2b35cb755d38f5c0e5f5cd401e94908bde4be
EyecloudAi/openncc_ipc
/ipc_viewer/source/saverawvideo.cpp
C++
cpp
2,945
no_license
#include "saverawvideo.h" #include <QDateTime> void SaveRawVideo::startRecord(QString url, int delaySec, QString path){ url_ = url; delaySecToPlay_ = delaySec; savePath_ = path; start(); } void SaveRawVideo::stopRecord(){ requestInterruption(); wait(); } S...
cda40cd28afec8482492e878de32fd57b1491cc6
44ef556a64a8c857724ebf3aa06120aa9455b25f
gan74/Vulkan
/examples/shadowmapping/shadowmapping.cpp
C++
cpp
34,395
permissive
/* * Vulkan Example - Shadow mapping for directional light sources * * Copyright (C) 2016 by Sascha Willems - www.saschawillems.de * * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <vecto...
ed7d99a5e63cf2963e1ddd2c0dd0cee896c86be4
72e2bb671f05610dda8a457abf06a815cb2867de
thedigitalcash/DAUn
/src/test/benchmark_zerocoin.cpp
C++
cpp
10,620
permissive
/** * @file Benchmark.cpp * * @brief Benchmarking tests for Zerocoin. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This project is released under the MIT license. **/ ...
da69ba27eb4160426b9e1b5491f01a07be0bd7e5
df3ae29b00683060f9c85d2d0cd13ea73ae991e1
kingofthebongo2008/examples
/qcrm/include/math/math_half.cpp
C++
cpp
3,344
no_license
//#include "precompiled.h" #include <math/math_half.h> namespace math { namespace details2 { math::half base_table[512]; uint8_t shift_table[512]; static void generate_tables_1() { uint32_t i; int32_t e; for(i=0; i<256; ++i) { ...
899d2f1ba828b4a25240e835eec7a60fb8f9e3c5
220acff5f0d06eb589f4310b610a646a2e4c90ca
ptarafdar001/Tree
/printLevelOrder.cpp
C++
cpp
1,043
no_license
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = NULL; right = NULL; } }; //LevelOrder void printLevelOrder(Node *root) { if (root == NULL) { return; } queue<Node *...
36b8139e5ca6e1c61ea834dada4c8ebc9aff80ac
3fd8c42267e04bbf1e4adf5f7152d0954b738395
aaveggupta/CSES-Problem-Set
/Introductory Problems/2. Missing Number.cpp
C++
cpp
546
no_license
/********************* /Author -> AAVEG GUPTA *********************/ #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 typedef long long ll; #define int ll // Total Sum upto N - Sum of (N - 1) Terms signed main() { ios::sync_with_stdio(false); cin.tie(0); int n; c...
a8d37f0ade4536ae6e2b8848ad1658d2bf2f85f2
344a7697c2f6f7bcbe53f06e0f56e6800c1a251c
hfiguiere/exempi
/XMPFiles/source/FormatSupport/PSIR_Support.hpp
C++
hpp
13,452
permissive
#ifndef __PSIR_Support_hpp__ #define __PSIR_Support_hpp__ 1 // ================================================================================================= // Copyright Adobe // Copyright 2006 Adobe // All Rights Reserved // // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with ...
f3ef79729c99f56ba1722dfb0ad53a8f8ebbc80c
acde3d4e7225437cbeb8633a3b6bf9975a51df2f
cpkt9762/SCUM-SDK
/SDK/SCUM_PotassiumIodide_Pils_02_functions.cpp
C++
cpp
359
no_license
// SCUM (0.1.17.8320) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SCUM_PotassiumIodide_Pils_02_classes.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- } #if...
adf2e6a8b2ea0beef6f3d0b64f7e41356d0c689e
277debcd802aab2a1224b6bcea17998c27749f52
dheeru-karanam/GeeksForGeeks
/Decimal to Roman/Decimal_To_Roman.cpp
C++
cpp
799
no_license
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; string convertToRoman(int ) ; int main() { // your code goes here int t; cin>>t; while(t--) { int N; cin>>N; cout << convertToRoman(N); cout<<endl; } return 0; }// } Driver Code Ends /*you are required to complete this funct...
53836d1d186ff0f2ae066396f44b27a9371bb588
13cc4719c8a720cee531fd48602b9959010ff70f
houtuiwang/cpp_primer_5th
/4/ex4_21.cc
C++
cc
252
no_license
#include <iostream> #include <vector> using std::cout; using std::endl; using std::vector; int main() { vector<int> ivec{ 1, 2, 3, 4, 5, 6, 7, 8, 9 }; for (auto i : ivec) { cout << ((i & 0x1) ? i * 2 : i) << " "; } cout << endl; return 0; }
8d1f899f2f8fe2acca562bc4547546ac590e03c7
540cd46a1d2bc2debb0d467c9cde143f012dd1b1
mkscoin/mkscoin
/src/test/pow_tests.cpp
C++
cpp
3,560
permissive
// Copyright (c) 2015-2018 The mkscoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <chain.h> #include <chainparams.h> #include <pow.h> #include <random.h> #include <util/system.h> #include <test/test...
04fdd0a3e82e2da7014c130a7ad89901502fd9e7
5bb36dcc7f603a72739135e8c7a49cb3c19205a6
rock-drivers/drivers-orogen-phidgets
/tasks/AnalogDevices.cpp
C++
cpp
2,605
no_license
#include "AnalogDevices.hpp" #include "InterfaceTask.hpp" #include <phidget21.h> using namespace phidgets; template<typename T> RTT::base::PortInterface* createOutputPort(std::string const& name) { return new RTT::OutputPort<T>(name); } template<typename T> void writeSample(void* usrptr, int Index, T const& samp...
bdb1478c99158606962c6f4616d1baa292f70a29
c21208e18617cc06dcd675863c9acbb9d74aaa32
zhangxin23/leetcode
/detail/pascal’s_triangle_II.cpp
C++
cpp
600
permissive
#include <iostream> #include <vector> using namespace std; /** * Given an index k, return the kth row of the Pascal's triangle. * * For example, given k = 3, * Return [1,3,3,1]. * */ class Solution { public: vector<int> getRow(int rowIndex) { vector<int> result; if(rowIndex == 0) ...
1fc19b3dc093fdb38f1c1dd2e97f061017ac3c6c
3fb5632618e04dfe9f185335bba2074c9b160444
Lucas-CG/GraphOtim
/src-old/Graph.hpp
C++
hpp
1,023
no_license
#ifndef GRAPH_HPP #define GRAPH_HPP #include <map> //std::map #include <unordered_set> //std::unordered_set #include <utility> //std::pair #include <cstdint> //int #include <string> //std::string #include <vector> //std::vector template<typename Out> void split(const std::string &s, char delim, Out result); class P...
827588056760835ac81e2c96df2eacaa32157c10
4f820eea402440f482dc5fce824d8294a5ad2261
ashutoshm1771/Competitive-Programming
/CodeForces/MostUnstableArray.cpp
C++
cpp
332
no_license
#include<bits/stdc++.h> #define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); using namespace std; typedef long long int ll; void solve() { ll n,s; cin>>n>>s; ll t1=s/2,t2=s/2+s%2; } int main() { IOS int t; cin>>t; while(t--) { solve(); } ...
9f31f9e71eb580eaaae3f91071eb2d3754a35d90
06b54e0ce1bfc60e4372fbe188fbcc3b554d8dd1
avandermeer/ofxCvPiCam
/src/ofxCvPiCam.cpp
C++
cpp
12,080
permissive
#include "ofxCvPiCam.h" using namespace cv; using namespace std; int ofxCvPiCam::width = 0; int ofxCvPiCam::height = 0; MMAL_POOL_T * ofxCvPiCam::camera_video_port_pool = NULL; Mat ofxCvPiCam::image = Mat(); bool ofxCvPiCam::newFrame = false; bool ofxCvPiCam::updating = false; static void gray_callback(MMAL_PORT_T *p...
3dfbe2d3dd6dcc3b08347374b3c1fb01949789ea
1f46433a010ec8134f5b0aa4314945e607b5fd25
htfy96/htscheme
/parsers/opplus.cpp
C++
cpp
2,276
permissive
#include "opplus.hpp" #include "ast.hpp" #include "all.hpp" #include "types.hpp" #include <algorithm> #include <cassert> #include <string> #include <stdexcept> #include <memory> bool OpPlusASTParser::judge(const PASTNode astnode, const ParsersHelper& parserHelper) { //std::cout<<" judging "<<astnode.token.info<<" "...
f08f035402c717e24324f60b0b10cb9a78d5a972
1c0e7b161312329902c33b1f460d070f6346e6ca
jhurliman/binaryninja-api
/python/generator.cpp
C++
cpp
10,498
permissive
// Copyright (c) 2015-2016 Vector 35 LLC // // 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 use, copy, modify, merge, pub...
3fab9259ae7cc7da0581594d13d3e8d59de2de2e
a2330af73cd17aaa182e3027de5edc744be87a7f
ivanplex/Lifi_concept
/test/LIFI_TX.cpp
C++
cpp
702
permissive
/*! ** Written by Ivan Chan (mlc1g14@soton.ac.uk) & Dev Dixit (dd9g13@soton.ac.uk) ** ** @file main.c ** @version 0.1 ** @brief Lifi Transmitter Given a set of binary value, attempt to transmit using On-Off keying. **/ #include "mbed.h" //DigitalOut gpo(D0); DigitalOut led(D1); int strIn[16] = {1,0...
1d7bb683a60034008f37af348d1e647b76c937f7
fb2996b5b424958f79dfdbe1446378bcb7f51002
johnathan79717/competitive-programming
/TopCoder/BallsInBoxes.cpp
C++
cpp
4,555
no_license
#include <string> #include <algorithm> #include <queue> #include <iostream> #include <cstring> #include <cstdio> #include <cstdlib> #include <ctime> #include <map> #include <deque> #include <climits> #include <set> #include <vector> #include <functional> #include <stack> #include <unordered_set> #include <unordered_map...
c46ae5017735e7fb96bb63c6d564336b0c6558c6
bb3d881cc81e71e6f75c558cde983d127f3d01b9
baoyoubing/libmove3d-planners
/src/utils/NumsAndStrings.cpp
C++
cpp
1,919
no_license
/* * Copyright (c) 2010-2014 LAAS/CNRS, WPI * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright * notic...
9b01e8084d5a1b2aac65d3107a3e7bb5686c19bf
c8d68ebf6dd8cd8b17983e4080ae155ac7523fb1
jmunoz110/jm2539130
/Hmwk/Assignment 4/09. Hotel Occupancy/main.cpp
C++
cpp
1,518
no_license
// Jonathan Munoz // 01/25/16 // 09. Hotel Occupancy // preprocessor directive #include <iostream> using namespace std; int main() { // variables // floors holds number of floors // count holds counter // rooms holds number of rooms per floor // occup holds number of rooms occupied per floor /...
2ca1f4af7f1ab1e28c7c3992a4d0178706e96365
353e3a8a78dba350ef216e13a19c19b874306e58
sscruz/cmssw
/DQM/SiStripMonitorTrack/src/SiStripMonitorTrack.cc
C++
cc
52,066
no_license
#include <FWCore/MessageLogger/interface/MessageLogger.h> #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "Geometry/TrackerGeometryBuilder/interface/GluedGeomDet.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" #include "CalibTracker/Records/interface/SiStripDetCablingRcd.h" #i...