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
1d57a4f4e7966f0bcfd8b1e25c6c3fb1cf76a31a
50bdff19899611e9d094f2655501a95a0f182405
aromazyl/tlpi_socket_learn
/feature_encode/server/message_handlers.cc
C++
cc
3,418
no_license
/* * message_handlers.cc * Copyright (C) 2017 dl <dl@mpi36.news.usw2.contents.cmcm.com> * * Distributed under terms of the MIT license. */ #include <atomic> #include <functional> #include <glog/logging.h> #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/s...
481dd3dad6ab37a4bab93a7bddca1ca570de6eef
354249497f11783c2a10e91f9eeb473a181c1263
bootingman/fuchsia2
/peridot/bin/suggestion_engine/filters/suggestion_passive_filter.cc
C++
cc
415
permissive
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "peridot/bin/suggestion_engine/filters/suggestion_passive_filter.h" namespace modular { SuggestionPassiveFilter::SuggestionPassiveFilter() = def...
b78f2a4c30da876cb16f52720febd058be6f7ae4
2ab7e0f4835054136bbce18962d7d69000d1a343
imfht/chromium
/components/exo/keyboard.cc
C++
cc
15,124
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/exo/keyboard.h" #include "ash/public/cpp/app_types.h" #include "base/bind.h" #include "base/threading/thread_task_runner_handle.h" #...
9d3da084f79279b9a20407e0fa0d0f2c750bb718
0b8b69a6111a38e920a8272e8eab86c3e8a98457
ymontmarin/pinocchio
/bindings/python/algorithm/expose-model.cpp
C++
cpp
4,990
permissive
// // Copyright (c) 2019 INRIA // #include "pinocchio/bindings/python/algorithm/algorithms.hpp" #include "pinocchio/bindings/python/utils/list.hpp" #include "pinocchio/algorithm/model.hpp" namespace pinocchio { namespace python { namespace bp = boost::python; template<typename Scalar, int Options, tem...
a9393f40a9e954d8985037f3ed2037b1997c1c07
2e7c6f2279c29d223c52cda94821ce2bbc2e3839
yaksaer/42-CPP-Module
/04/ex04/DeepCoreMiner.cpp
C++
cpp
1,352
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* DeepCoreMiner.cpp :+: :+: :+: ...
164810c39ac67e72363631d43e05ce40cb3267ed
92edf567fb39ffc75ea2e2477cab619855106d72
jadbassil/Scaffold_Fault_Tolerance
/simulatorCore/src/datomsMotionRules.cpp
C++
cpp
15,429
permissive
#include "datomsMotionRules.h" #include "deformationEvents.h" #include "datomsWorld.h" #include "datomsMotionEngine.h" using namespace std; using namespace BaseSimulator::utils; //! \namespace Datoms namespace Datoms { const int tabConnectors4[6][4] = { {0,1,2,10},{1,3,6,11},{4,6,7,8},{0,5,7,9},{8,9,10,11},{2,3,4,5}...
3178fc60c32edfc2432a4a407c9d2797f45f35b5
4fcb45d6d4ef7a04a6f1882fa2055dde0892c35b
PabloFreitas-lib/Prog3-UFSC-2018.2
/Aulas/P1/2/Richtig/RetornandoPonteiroVarEstatica/main.cpp
C++
cpp
304
no_license
#include <iostream> using namespace std; char * setName(); int main (void) { char* str = setName(); cout << str; return 0; } char* setName (void) { static char name[80]; //crio como static cout << "Entre com seu nome: "; cin.getline (name, 80); return name; }
c35e98b1a0364970446af06ceac6bfc38a0b3c9b
07e882a2bbfcfb3214d529b81e746eee688ea07d
zzemchik/cpp
/Inheritance/ex02/ClapTrap.hpp
C++
hpp
533
no_license
#ifndef CLAPTRAP_HPP #define CLAPTRAP_HPP #include <iostream> class ClapTrap { protected: std::string _name; int _health; int _energy; int _attackDamage; public: ClapTrap(); ClapTrap(const std::string &); ClapTrap(const std::string &, int, int, int); ClapTrap(const ClapTrap &); ~ClapTrap(...
d564bf68f299bc7330e1ae33550a6eecd2f47f40
2f9b291574663705fd454a1b771376995a954210
jamesxucq/Server_Workspace
/Visual_Studio_2013/Projects/module_test/osIPC_link/osIPC_link.cpp
C++
cpp
1,827
no_license
// osIPC_link.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "ipc.h" // Static variables TCHAR *server_addr = _T("osIPCx"); long stats_server_rcv_count = 0; long stats_client_rcv_count = 0; #define osipc_client #ifdef osipc_client // Client thread int _tmain(int argc, _TCHAR* argv[]) { // Create the IPC cl...
818bba606e2c4ee996c5697a3f726a651a37478b
52db920404c43535b7b7a8b5ccc79b2b0fb9ce58
sunlightcode/xelonmusk
/xelonmusk/src/qt/xelonmuskstrings.cpp
C++
cpp
19,932
permissive
#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif static const char UNUSED *xelonmusk_strings[] = { QT_TRANSLATE_NOOP("xelonmusk-core", "" "%s, you must set a rpcpassword in the configuration file:\n" "%s\n" "It is ...
ed975e1fde3eb73dbae413fca4d81d5df429d3e6
0c50064411c7dda1d96cf0dcd1860dc775172193
AUXLander/mp2-lab1-set
/test/test_tset.cpp
C++
cpp
5,976
no_license
#include "tset.h" #include <gtest.h> TEST(TSet, can_get_max_power_set) { const int size = 5; TSet set(size); EXPECT_EQ(size, set.GetMaxPower()); } TEST(TSet, can_insert_non_existing_element) { const int size = 5, k = 3; TSet set(size); set.InsElem(k); EXPECT_NE(set.IsMember(k), 0); ...
b42e77ab2cf1dc4d53f4a91a9c4f7a2a4b44bbc6
dbc85c4591768f040c8a1fa71cd8aac667e7aaa7
dojyj/Algorithm_Study
/programmers/점프와 순간이동.cpp
C++
cpp
233
no_license
#include <iostream> using namespace std; int solution(int n) { int ans = 0; while(n != 0){ if (n & 1){ n -= 1; ans++; }else{ n /= 2; } } return ans; }
49aa8eea9b382f1b01436dd1af328bebafbd4d22
3cbf4ea1805c5bb402b4142b70774d886afa45a8
new-TonyWang/renderdoc
/qrenderdoc/Styles/StyleData.cpp
C++
cpp
2,442
permissive
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2019-2021 Baldur Karlsson * * 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...
bbac60773ee9f78b9b4acc5e55e693698ecb8075
0d1a01fb8167cd6c09a34bd0abd4a06b978804ba
sgraham/nope
/content/browser/media/capture/web_contents_video_capture_device.cc
C++
cc
28,452
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Implementation notes: This needs to work on a variety of hardware // configurations where the speed of the CPU and GPU greatly affect overall // ...
a61f5413b41c51a7442db322ea1501fbe1fa132d
b605f8f37f8f69d7bcf95986b1a28539a33babb9
QiaoqiaoZhou/Agglomerative-Info-Clustering
/include/IC/src/AIC.hpp
C++
hpp
10,036
no_license
#ifndef _AIC_h_included_ #define _AIC_h_included_ namespace IC { /* Find the point in the base polytope of the normalized version of a submodular function that minimizes the weighted sum of coordinates. @param f The submodular function @param w The weight vector with length equal to that of the ground se...
985a3dcbc82dc8d1f626d4f18b86f82b4226475d
a146b96f5a22c48194f7ca92c0c86e2fb0a57c46
ZHOURUIH/GameEditor
/Engine/Property/WindowProperty/EditBoxProperty.cpp
C++
cpp
1,405
no_license
#include "EditBoxProperty.h" EditBoxPropertyShowCaret::EditBoxPropertyShowCaret() { mPropertyName = "ShowCaret"; mDescription = "设置编辑窗是否显示光标"; } void EditBoxPropertyShowCaret::setRealValue(const bool& value, EditBox* window) { window->setShowCaret(value); } bool EditBoxPropertyShowCaret::getRealValue(EditBox* wind...
59f9b506f204f91e24d31fbbddf4bf71f32ca783
646ac27cb11802f8e80dc5d518c45d011d8a18dc
ZhangYY12345/fisheye-library
/MyCalibration_/fisheyeCalib_/fisheyeCalib_/methods/LineDetection.cpp
C++
cpp
45,696
no_license
// // CornerDetection.cpp // CornerDetection // // Created by Ryohei Suda on 2014/07/08. // Copyright (c) 2014年 RyoheiSuda. All rights reserved. // #include "LineDetection.h" #include <vector> int LineDetection::unit = 1; /* * Constructor */ LineDetection::LineDetection() { output.NewDeclaration(); tin...
2180f4d9701a40e820348222db52ec7b2b1040f1
d0c0faf980e4d9bd3703e68d29a6a6c3325a1369
miaomao1989/program_test
/c++/mm-temp/9/9-38.cpp
C++
cpp
275
no_license
#include <iostream> #include <string> using namespace std; int main() { string src = "ab2c3d7R4E6"; string num = "0123456789"; string::size_type pos = 0; while ( (pos = src.find_first_of(num, pos)) != string::nops) { cout << src[pos] << endl; ++pos; } }
32f1096ae73f1c5bcf9d04be18a31c2feb70a6f2
e5a9ce961530a68e4165b2964f71018a684aabaf
AcuteAngleCloud/Acute-Angle-Chain
/contracts/libc++/upstream/test/std/containers/unord/unord.multimap/db_iterators_8.pass.cpp
C++
cpp
1,229
permissive
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
7ebcda97b60205e80fc00c4f5a4f65fd1dbfca63
b576766e7134e6e7a8482da42752bfec549e014c
canonical-robots/DomainModelsRepositories
/DomainSymbolicPlanner/smartsoft/src-gen/DomainSymbolicPlanner/CommSymbolicPlannerRequestACE.hh
C++
hh
1,603
permissive
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // Service Robotics Research Center // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information abo...
5a1e1e3f560ae64c9cdc88bfe6179f3c1f94a343
fbe55bd62114059549bcc21b0459a67dfdcc3ffd
kangdazhi/GearVRf
/GVRf/Framework/framework/src/main/jni/engine/picker/picker_jni.cpp
C++
cpp
11,962
permissive
/* Copyright 2015 Samsung Electronics Co., LTD * * 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...
79ad728f7868f102129fbaad0d1be5ef058d6ad9
d2af4bd76f49eef552c31d93fa7a3607fc315abe
forkee/zexcoincore
/src/privatesend-server.cpp
C++
cpp
35,672
permissive
// Copyright (c) 2014-2017 The ZexCoin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "privatesend-server.h" #include "activemasternode.h" #include "consensus/validation.h" #include "core_io.h" #inc...
851862b440e26356bdfce3fac11e0362bf710620
b7d212ae0a1956bb314a09bff087660452a4f549
RISHITA189/RISHITAKATTA
/Assignments for Operators, Operands, Expressions/3.Assignments for Operators, Operands, Expressions.cpp
C++
cpp
748
no_license
#include <iostream> #include <stdio.h> #include <math.h> using namespace std; void divide_num_based_base_value(int num, int* res); int main() { int num; cout << "Please enter the 4 digit number: " << endl; cin >> num; if (0 < num < 10000) cout << "Result is: " << endl; int* res...
f8e8398770f7e21cdcc1363959ae10ef99979a93
c16b3b63e62d0c34ae287255232a59ffc400fe0e
VKiNGpl/Cpp-projects
/Od zera do gier kodera/Ch.3/Rev.3.3/main.cpp
C++
cpp
974
no_license
// While - druga petla warunkowa #include <iostream> #include <conio.h> #include <ctime> #include <cstdlib> using namespace std; int main() { // wylosowanie liczby srand((int) time(NULL)); //albo srand(time(NULL)); int nWylosowana = rand() % 100 +1; cout << "Wylosowano liczb...
a773107ded6df7d07454a419695462f6c9638097
786382cab60372270001c80067df0e84c6cd8297
matheus3301/neps-academy-exercises
/EXERCÍCIOS/bolsas.cpp
C++
cpp
637
no_license
#include <bits/stdc++.h> #define endl "\n" using namespace std; const int mxN = 10010; #define t first #define d second int n, ans, s; pair<int,int> e[mxN]; bool ord(pair<int,int> a, pair<int,int> b){ if(a.d != b.d){ return a.d < b.d; } return a.t > b.t; } int main(){ ios_base::sync_...
76c11dd71d2e96538d2d6325d0b1dccfcb41749d
f8ac3fb019708bd8d191f64e9a63ea9196fb527e
BPI-SINOVOIP/BPI-1296-Android6
/android/frameworks/av/media/libstagefright/rtsp/ARTSPConnection.cpp
C++
cpp
26,312
permissive
/* * Copyright (C) 2010 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...
17475fb6c35a71f2b5e96b92e0438d7b7ef1f51c
4cf692da4db5b1de9c107879ace54eb81d1ea7a0
Morinphen/2019yearGame
/Project1/Project1/NawaBlock.cpp
C++
cpp
1,937
no_license
//使用するヘッダーファイル #include"GameL\DrawTexture.h" #include"GameL\WinInputs.h" #include"GameL\SceneManager.h" #include"GameL\SceneObjManager.h" #include"GameHead.h" #include"NawaBlock.h" #include"GameL\HitBoxManager.h" //使用するネームスペース using namespace GameL; CObjNBlock::CObjNBlock(int x, int y) { m_x = x; m_y = y; } //イニシャ...
1d75b8486db4117611f5a8a5149d26ba8d1ac3dc
7ab14c0c59a4cac5513495e0294b4096fe29d0f6
CaptainChuenthavorn/RedJourney
/RedJourney/Item.cpp
C++
cpp
1,144
no_license
#include "Item.h" Item::Item(sf::Texture* texture, sf::Vector2f position, sf::Vector2f velocity) { body.setSize(sf::Vector2f(40.f, 28.f)); body.setOrigin(body.getSize() / 2.0f); body.setPosition(position); body.setTexture(texture); this->isDestroyBool = false; this->velocity = velocity; this->isSpawnBool = f...
b8907cbbd3edaf274e4d37a2c8793777fb008b47
1cbf2f525ebf543920ace33f106fef33189697a3
duongvantan2000/tan
/missingnumbers.cpp
C++
cpp
1,076
no_license
#include<iostream> #include<vector> using namespace std; void napvector(vector<int>&dayso, int tong) { int so; for ( int i = 0; i < tong; i++ ) { cin >> so; dayso.push_back(so); } return ; } void demphantu(vector<long>&dem, vector<int>dayso) { for ( int i = 0; i < ...
bd93ecab48dc21f65ed948de153f20e56106b8cd
39cdbd6dbd280425a4a2faede135a18f2e38f69f
bolatov/contests
/hackerrank.com/self-balancing-tree.cpp
C++
cpp
2,500
permissive
/* Node is defined as : typedef struct node { int val; struct node* left; struct node* right; int ht; } node; */ int bf(node* r) { if (!r) return 0; return (r->left ? r->left->ht : -1) - (r->right ? r->right->ht : -1); } int hf(node* root) { return 1 + max( (roo...
7bf9756d4fc7d8893cea447dfdaaff196cd4bac7
96be959556e23670ce44eed9d2528613d45b467e
trapexit/mergerfs
/src/errno.hpp
C++
hpp
1,123
permissive
/* Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" ...
675ca0892a7b326adc18cf6afc92f741895e57d8
b811ef52b32bb5c7571f5c0992f4003265b558ff
bsu2018gr09/ZhylkoRD
/Final/Car.cpp
C++
cpp
4,774
no_license
#define _CRT_SECURE_NO_WARNINGS #ifndef Car_CPP #define Car_CPP #include "Car.h" #include <ctime> #include <iomanip> #include <fstream> #include <iostream> #include <string> char file[] = "D:\\aaa.txt"; Car* initArrayFromFile(int &count) { int cnt{ 0 }; char *tmp = giveMemory<char>(200); std::ifstre...
209ae9f5b8c1684f2931f3599cd9d6e7b17d46f8
da7c75178c9c7af0690f70e5bc3dbb4ff8631daf
ltldlzltl/CT_RECON_EXTENSIONS
/cpp_test/bp_fan_2d_gpu_test.cc
C++
cc
4,246
no_license
/* * @Description: * @Author: Tianling Lyu * @Date: 2021-01-09 09:56:01 * @LastEditors: Tianling Lyu * @LastEditTime: 2021-01-09 10:33:52 */ #define USE_CUDA #include "include/bp_fan_2d.h" #include "include/filter.h" #include "include/fan_weighting.h" #define USE_MATH_DEFINES #include <cmath> #include <iostrea...
cb28e656793565a7df37ad01c855a072bce6a39d
2e67b4761f025d55769a420a05954250c235b965
cool2528/miniblink49
/net/cookies/CookieMonster.cpp
C++
cpp
8,598
permissive
#include "net/cookies/CookieMonster.h" #include "net/cookies/CookieUtil.h" #include "net/cookies/CanonicalCookie.h" #include "third_party/WebKit/Source/wtf/text/WTFStringUtil.h" namespace net { CookieMonster::CookieMonster() { persist_session_cookies_ = false; keep_expired_cookies_ = false; } Co...
d89e321ae78d4097d8cef523be99fe183b5ed666
8f02157aa9450ca2e1dea73a3e22cf0f1781ea19
CodyNeeraj/Code_backup
/C++ files/binary converter using while loop.cpp
C++
cpp
402
no_license
#include<iostream> #include<conio.h> #include<stdio.h> using namespace std; int main() { for(;;) { int num,rem; cout<<"\nPlease enter a no=>\t"; cin>>num; while(num !=0) { rem=num%2; num/=2; cout<<rem; } cout<<endl<<"DO you want to run the program again ?"<<endl; char ch; cin>>ch; if(ch==...
45aa4b9f9cc4ce77b67c7e391a2151aa8f9a6168
cbc3697f1c63e5a394bcd31b5e0d35a3d6bc3ed5
royertiago/porrinha-random
/random_player.cpp
C++
cpp
695
no_license
#include "core/util.h" #include "random_player.h" #include "random.h" namespace random_player { std::string RandomPlayer::name() const { return "Random"; } void RandomPlayer::begin_game() { // no-op } int RandomPlayer::hand() { return random(core::chopsticks(core::index(t...
cb9a44a75fccff37613140d372ca8d66bf57686d
df9410624e3c707c5a1f8a7390909056e5e906c0
ksercs/descrete_maths_labs
/2/Лаб 1 вероятности/C/C.cpp
C++
cpp
1,039
no_license
#include <iostream> #include <fstream> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <iomanip> #include <set> #include <map> #include <utility> #include <queue> #include <string.h> #define SZ size() #define VEC vector #define PB push_back #define MP make_pair #defi...
77cc9fae1b34ddecd782b473b168d17d3e755ec9
08432a39e7a332c66e311a8878fb5bdaa0746c0c
opendarkeden/server
/src/server/gameserver/EffectTransportItem.cpp
C++
cpp
5,325
no_license
//---------------------------------------------------------------------- // // Filename : EffectTransportItem.cpp // Written by : Reiot // //---------------------------------------------------------------------- // include files #include "Assert.h" #include "EffectTransportItem.h" #include "GCDeleteObject.h" #incl...
e4016ff38fd8aafff40f0e6ffa379cdd62710ecb
1a34718cedf8f5f6aee00d0a7692c9c6c0cd7085
0zuozheng/DTFSv0.5
/TC++/40.Assembly.cpp
C++
cpp
6,294
no_license
/* * * * * * * * * * * * * * * * * * * * 刚度矩阵安装 * * * * * * * * * * * * * * * * * * */ #include "CONSTRUCT.h" //定义计算变量 float *time_e, **Q0, ***H, ***P, **Q3; float time_totalnow = 0.0; int *NumCols, **ColId; float **ValueRowCol; int conn=120; // !!! 120 !!! int *elements_n, equationnum, *marked, *order; bool *calc...
3a0c8bc8695484a61e2c135ec786da6d403701b5
ba030fbd46ef4a3a859fa9da55f063916a2370f4
sharronliu/gpd
/src/gpd/clustering.cpp
C++
cpp
3,961
permissive
#include "../../include/gpd/clustering.h" std::vector<Grasp> Clustering::findClusters(const std::vector<Grasp>& hand_list, bool remove_inliers) { // const double AXIS_ALIGN_ANGLE_THRESH = 15.0 * M_PI/180.0; const double AXIS_ALIGN_ANGLE_THRESH = 12.0 * M_PI/180.0; const double AXIS_ALIGN_DIST_THRESH = 0.005; ...
146549e7a4662c36fe778d8cd4e55b502f9e623b
ec131564c0fd45ace65aa2e4beca04bd72288533
aiwc/test_world
/extlibs/boost-1.65.1/include/boost/stacktrace/stacktrace_fwd.hpp
C++
hpp
831
permissive
// Copyright Antony Polukhin, 2016-2017. // // 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) #ifndef BOOST_STACKTRACE_STACKTRACE_FWD_HPP #define BOOST_STACKTRACE_STACKTRACE_FWD_HPP #include <cstddef> #include <m...
785c82f46987b6e144c419d192ab835054ebfb40
d7b075ee92b2d8da2dcfc0b8bd75974f86b9607e
parthmakkar01/data-security
/parth.cpp
C++
cpp
958
no_license
#include<iostream> #include<fstream> #include<ctime> using namespace std; int main() { int s=0; fstream fo; fo.open("part.txt"); //everytime initially insert a new empty file fo>>s; fo.close(); if(s==0) { fstream f; f.open("part.txt"); int mn; time_t now = time(0); tm *ltm = l...
11412e4acfee26c9d7d718eeaa53d939a18bc039
1a7e94c82f8b9a027ba3aa51ec377d1031e330a3
rudrajit1729/CPP-Learning-Course
/Part 0 - Introduction/Different-Data-Types/Different_Bases.cpp
C++
cpp
325
permissive
#include<iostream> using namespace std; int main() { int num = 30;//decimal 30 int num2 = 0x30; // hexadecimal -->3*16+0=48 int num3 = 030; // octal --> 3*8=24 cout<<num<<endl;//prints in decimal cout<<hex<<num<<endl;//prints the hexadecimal equivalent cout<<oct<<num<<endl;//prints the octal equivale...
d79a2516d75ab3c2dbacc15377a9a133e03ea678
6182edee47228b522093ef0d0e09318444d9a8f6
bbmjja8123/chromium-1
/chromium-courgette-redacted-29.0.1547.57/chrome/browser/media_galleries/fileapi/itunes_finder_win_browsertest.cc
C++
cc
5,892
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/base64.h" #include "base/base_paths_win.h" #include "base/bind.h" #include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #incl...
78deff8382f0422597fcb57b5556d5ef11502e49
ea1a166c11a368098bf11b9ffb238b949bb0787d
novaquark/aws-sdk-cpp
/aws-cpp-sdk-elasticmapreduce/source/model/CancelStepsResult.cpp
C++
cpp
1,698
permissive
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
95b0c491511f9e293984591725d91175f9f42dd8
a411b84adb87b297dabe852eedd27d0d1f94d2c0
vladhrytsuk/university-laboratory-work-qt-project
/Lab5TestCircle/mainwindow.cpp
C++
cpp
1,880
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { radius = 60; a = 150; point.setX(0); // Задаем начальную координату окружности по оси Х point.setY(8 * (pow(a, 3)) / (pow(point.x(), 2) + 4 * pow(a, 2))); timer = new QTi...
51edad70ca57ae02798c4cb0c118a9449779c3cb
47b1cfb38f21a1f4fc5ccbaa432240e163ef2610
9029195341/blacoin
/src/irc.cpp
C++
cpp
10,524
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "irc.h" #include "net.h" #...
47d906dc6fd728cdfd0697c6d07dd651ea6bfdcb
dac5b0643785b7244434148c0e94dd552f570adf
Nayeem-XTREME/Computer-Graphics
/Lab4/main.cpp
C++
cpp
2,628
no_license
#include <math.h> #include <windows.h> #ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #include <stdlib.h> #include <iostream> #include <stdio.h> using namespace std; float R = 0.5; float G = 0.5; float B = 0.5; // actual vector representing the camera's direction float lx = 0.0f, lz = -1.0...
76b4e0bc885852840baa351ae79c39d4183f0cc2
b2ef532f87778992b84e45eb9c96951dbc2c3074
psychob/project-euler
/pe-014.cpp
C++
cpp
699
permissive
#include <iostream> #include <vector> #include <algorithm> using bint = unsigned long long; int chain_length( bint start ) { int counter = 0; while ( start > 1 ) { counter++; switch ( start & 1 ) { case 0: // parzysta start = start / 2; break; case 1: // nieparzysta start = 3 * start + 1; ...
c9f7bc10be69549383fa2b0f7657f4e4fd9ca504
bcfefa855423bc7cc125630b3660723ec3834f21
droplotus/FAC
/1st semester/AEDA/tp_9/Tests/tests.cpp
C++
cpp
4,752
no_license
#include <gtest/gtest.h> #include <gmock/gmock.h> #include <vector> #include "bet.h" #include "player.h" using testing::Eq; TEST(test_1, a_GenerateBet){ vector<unsigned> vals; vals.push_back(30); vals.push_back(45); vals.push_back(22); vals.push_back(17); vals.push_back(45); vals.push_back(8); vals.pu...
138c1ba07b255d0112a27949b8c1e03c45f907eb
79527692c67ecda61039b64e22c9e3f2b71430f3
yuatpocketgems/aws-sdk-cpp
/generated/tests/importexport-gen-tests/ImportExportEndpointProviderTests.cpp
C++
cpp
9,898
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <gtest/gtest.h> #include <aws/testing/AwsTestHelpers.h> #include <aws/core/auth/AWSCredentials.h> #include <aws/core/http/standard/StandardHttpResponse.h> #include <aws/core/http/HttpClientF...
9a343b481f8054a61e60d3b503d0f52d616239f9
acfa0ec0d9fd3b8773ce8f32be65742584be1692
Olesenka18/LAB_OP
/13/13.5/13.5/13.5.cpp
C++
cpp
371
no_license
#include <stdio.h> #include <locale.h> int main(void) { setlocale(LC_ALL, "Russian"); int N, i; float A, S = 1, K = 1; printf("Введите N \n"); scanf("%i", &N); printf("Введите A \n"); scanf("%f", &A); for (i = 1; i <= N; ++i) { K = K * A * (-1); S = S + K; } pri...
5edf2e6f6e65207b9c931b901ddbd41566e97a98
54a31892c8fee05506e3e51ff846ff381fab6c8c
peng53/failure
/trie_fun/wordbank.cpp
C++
cpp
7,691
no_license
/** wordbank.cpp has the function details for wordbank. * A wordbank (trie) in this case is stored as a tree of * nodes with an array of ptrs to 26 child nodes (the * alphabet). * Looks like I focused on allocation/deallocation. * */ #include <queue> #include <stack> #include <utility> #include <iostream> #inclu...
2c802c668dfe42545c6124eee09c2f56f338fa77
7da135a0d14b92b341c4bda00631178d2429d743
rarog2018/C-Primer_Lippman
/Chapter05/c05e23.cpp
C++
cpp
214
no_license
#include <iostream> using namespace std; int main(void) { int a, b; cout << "Type two integers: "; cin >> a >> b; cout << "\n" << a << " / " << b << " = " << a / b << endl; return 0; }
8a8c8acad9488f0ea5091be5816466b6dc67a217
9a2a52748bfb21923e8379e2358b8d01dcb6eec5
y2549liu/Code-for-OJ
/P4711.cpp
C++
cpp
1,999
no_license
#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> using namespace std; map<int, float> atom; float weight(const char *start, const char* end) { if (start == end) return 0; else if (*start == '~') { float times = 1; ++start; if (*start >= '0' && *start <= '9') { times = 0; while (*start >= ...
68f2d28ff0ed3eedfb8b6a2ddcca66740abd3bd4
a0fd2607e7fa86c5cd864f2f5a9573746939c781
OpenXRay/xray-15
/cs/engine/xrGame/ui/UIPdaWnd.cpp
C++
cpp
6,926
permissive
#include "stdafx.h" #include "UIPdaWnd.h" #include "PDA.h" #include "xrUIXmlParser.h" #include "UIXmlInit.h" #include "UIInventoryUtilities.h" #include "HUDManager.h" #include "Level.h" #include "game_cl_base.h" #include "UIStatic.h" #include "UIFrameWindow.h" #include "UITabControl.h" #include "UIPdaContactsWnd.h" ...
c9a472eecd578643f966d0048aa2f0d7e29de1e8
bfb6e3b02640a9da164fbb37775b6d65da7c7fbf
lorenzomoulin/Programacao-Competitiva
/codeforces/568/A/macro.cpp
C++
cpp
604
no_license
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define trav(a, x) for(auto& a : x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.sync_with_stdio(0); cin.tie(0...
947301cc988d65fbe5dca2889d2b7ea1286caf41
ab32a2596f0c677df12d60c1c641d1eb7eefcd18
BeatWolf/dll
/test/src/unit/dyn_crbm.cpp
C++
cpp
2,428
permissive
//======================================================================= // Copyright (c) 2014-2017 Baptiste Wicht // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //==================================================================...
b3c9ad457795c8c21600ae8d9efaaee1e287f4c3
7908ee71fc617d22a84b13c0bcfef0f840b13b82
15831944/PHStart
/Win32/NXOPEN/NXOpen/CAE_LaminateSpreadsheetReportBuilder.hxx
C++
hxx
38,811
no_license
#ifndef NXOpen_CAE_LAMINATESPREADSHEETREPORTBUILDER_HXX_INCLUDED #define NXOpen_CAE_LAMINATESPREADSHEETREPORTBUILDER_HXX_INCLUDED //-------------------------------------------------------------------------- // Header for C++ interface to JA API //------------------------------------------------------------------------...
bd4298869431401534e455d548ad94ee06e4e9e6
fcebbf9e9f85eadfe33be798291c466ebc9a4b77
ScoreSolutions/TRIUM-VRM
/FaceRecognition/Include/NPluginEventDescriptor.hpp
C++
hpp
804
no_license
#ifndef N_PLUGIN_EVENT_DESCRIPTOR_HPP_INCLUDED #define N_PLUGIN_EVENT_DESCRIPTOR_HPP_INCLUDED #include <NCustomEventDescriptor.hpp> #include <NPlugin.hpp> namespace Neurotec { namespace Plugins { namespace ComponentModel { using ::Neurotec::ComponentModel::HNCustomEventDescriptor_; #include <NPluginEventDescriptor.h> ...
260625ef3ac9a8495a10e3891d6a4a8f42008f04
4ce1dc5f4cd0cf188190f5ccf9fee38a83345f5b
nerzhul250/Marathons
/cppProblems/ThreeBlocksPalindrome.cpp
C++
cpp
1,388
no_license
#include <bits/stdc++.h> #define ff first #define ss second #define fore(i,a,b) for(int i=a,colchin=b;i<colchin;++i) #define pb push_back #define ALL(s) s.begin(),s.end() #define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define SZ(s) int(s.size()) using namespace std; //Ocurrencias,prefxsum typedef pair...
6b500b847741922253ea09789164b9a38af3e4d1
5a089bb68bb03fe7dc8b2f10d968a3f77e2e10d6
lashleigh/sequence-database-cpp
/constants.hpp
C++
hpp
362
no_license
#define MIN_PEPTIDE_MASS 500.0 #define MAX_PEPTIDE_MASS 6000 #define ALLOWED_MISSED_CLEAVAGES 1 #define MAX_LEN_PEPTIDE 100 #define MIN_LEN_PEPTIDE 6 #define MAX_LEN_DEFINITION 50 #define INITIAL_SEQ_LEN 1000 #define MAX_LEN_PROTEIN 5000 #define DENSITY_MULTIPLIER 10 #define SEMI_TRYPTIC ...
95a99f5ed4fd9a3c7021f80c8ed0b5152d17f24b
f73e34110a461209b7a765436ad1f956d50eb71d
tectronics/dementia
/Dementia/Dementia_Serveur/OgreSystem.cpp
C++
cpp
5,017
no_license
#include "OgreSystem.h" #include <OGRE\ogreRoot.h> #include <OGRE\OgreRenderSystem.h> #include <OGRE\ogreRenderWindow.h> #include <OGRE\OgreWindowEventUtilities.h> #include <OGRE\OgreConfigFile.h> namespace OGRE3D { OgreSystem::OgreSystem() :ogreRoot_(0), ogreRenderWindow_(0), isShutdown_(false) { ...
3bfffee98a08e5edbec1d2c84c1e149cd7f881dd
6e9fdd53d7203c0844567de39fc521baaad4f1fa
HossainImtiaz18/Programming-Exercise
/Codechef/problem XOR b/main.cpp
C++
cpp
293
no_license
#include <iostream> using namespace std; int main() { long long tc,mx,n,k,res,a,i; cin>>tc; while(tc--){ mx=-1; cin>>n>>k; for(i=0;i<n;i++){ cin>>a; res=k^a; if(mx<res) mx=res; } cout<<mx<<"\n"; } return 0; }
48e7d23f27224f9ce92e3e8bf9238393f56797b5
a17ff7ed358248ba9d78ab43d5f64ffd0722f8db
erikstrand/AsciiChess
/src/MoveParser.cpp
C++
cpp
4,626
no_license
//============================================================================== // MoveParser.cpp // created November 27, 2012 //============================================================================== #include "MoveParser.h" #include <iostream> #include <sstream> //-------------------------------------------...
82004b9033f11759e5991c5a01146f201ab797c9
a0e5d7c06b4adefa28379e7366aa2461f29add64
ArthurBandaryk/Homework
/04-render/my_shader/src/my_gfx_program.cxx
C++
cxx
3,068
no_license
#include "my_gfx_program.hxx" #include "matrix.hxx" //------------------------------------------- //------------------------------------------- //------------simple load image-------------- simple_gfx_prog::simple_gfx_prog() {} void simple_gfx_prog::set_uniform(Uniform& uni) { this->uni = &uni; } Vertex simple_...
bc56592fc36a56592ab56c0e463955728aa48e0c
7deab49784f5214549f58a25df620dd45a578ebe
SasaLab-MPS/main
/calPowderHeatTransfer/src/lib/mainLoopOfSimulation.cpp
C++
cpp
1,788
no_license
/*===================================================================== mainLoopOfSimulation.cpp Yota INOUE (2021) 関数実装ファイル シミュレーションメインループ Last update: Feb 11, 2021 =======================================================================*/ #include "../../include/functions.hpp" #include "../../include/con...
c0d0a7b0958c0619b00d3cf8ec9cc2e3390637ad
5f507f615e786259103610d440be7c1f71dd12f4
lbguilherme/duvidovc-app
/java/include/java.net.NetPermission.hpp
C++
hpp
2,002
no_license
#pragma once #include "../src/java-core.hpp" #include <jni.h> #include <cstdint> #include <memory> #include <vector> #include "java.lang.Object.hpp" #include "java.security.BasicPermission.hpp" namespace java { namespace lang { class String; } } namespace java { namespace security { class Permission; } } namespace ...
a7b4b74e92ec594a1b430e0270a5481181f3d97a
7856bc1a2b44af6500b8bb3182deb59f5bb064eb
tiwarikajal1306/Day4Cpp
/BubbleSort.cpp
C++
cpp
3,133
no_license
#include <iostream> using namespace std; void displayList(int list[]) { for( int i = 0; i < 10; i++ ) { cout << list[i]<<"\t"; } } void bubbleSort(int a[]) { int i, j,temp; cout<<endl; for( i = 0; i < 10; i++ ) { for(j = i+1; j < 10; j++) { if(a[j] < a[i]) { temp = a[i]; a[i] = a[j]; ...
3970c3b772b5d7a6479e17a43a62c7b84a139619
a05e491c10d677ccca105628a6c08cc47984b516
killf/leetcode_cpp
/src/0724.cpp
C++
cpp
559
permissive
#include <iostream> #include <string> #include <vector> #include <cmath> #include <hash_map> #include <map> #include <sstream> #include <type_traits> #include <algorithm> #include <stack> using namespace std; class Solution { public: int pivotIndex(vector<int> &nums) { if (nums.empty())return -1; long sum...
e158961a83dbdf6ce3fc3a6c89fc5d448fa7a36d
1b28f37e76477044c16b387c819d5095a3f941c5
codingwatching/ouzel
/engine/core/android/NativeWindowAndroid.hpp
C++
hpp
899
permissive
// Ouzel by Elviss Strazdins #ifndef OUZEL_CORE_NATIVEWINDOWANDROID_HPP #define OUZEL_CORE_NATIVEWINDOWANDROID_HPP #include <jni.h> #include <android/native_window.h> #include <android/native_window_jni.h> #include "../NativeWindow.hpp" namespace ouzel::core::android { class NativeWindow final: public core::Nati...
706f4ca508ea1d8a7e1586147a01386cfd99b2cf
a7fb8bca21e51f541c30701db8aad6e20deedab0
junghans/hoomd-blue
/libhoomd/updaters/TwoStepNVTMTK.cc
C++
cc
11,947
no_license
/* Highly Optimized Object-oriented Many-particle Dynamics -- Blue Edition (HOOMD-blue) Open Source Software License Copyright 2009-2014 The Regents of the University of Michigan All rights reserved. HOOMD-blue may contain modifications ("Contributions") provided, and to which copyright is held, by various Contributor...
efe1efd04bddcdd7d2e5dc989c2c7f2090abe108
7119b376b490447f446a7b3550dabfb0b159a13d
gdobler/temple
/cc/readData.cc
C++
cc
1,668
no_license
#include "temple.h" tfData::tfData(tfInput input) { // -------- utilities fitsfile *fptr; char card[FLEN_CARD]; int status=0, npix=0, anynul; float * dummap; string infile; // -------- set the number of bands nband = input.dnames.size(); maps.resize(nband); // -------- get the number of pixels...
afe0785bbfef547769f0f73ceea989d8599a26fc
f55a080b7a539d2e75d1c5afdd3c5535be18d823
BenJ778/AobaAPI
/include/AobaAPI/IO/ExportObj.hpp
C++
hpp
511
permissive
#ifndef AOBA_IO_EXPORT_OBJ_HPP #define AOBA_IO_EXPORT_OBJ_HPP #include "../Core.hpp" #include <string> namespace Aoba { namespace IO { /// <summary> /// Export the given mesh into a text-based obj file stored at the given path. /// </summary> /// <remarks> /// The functinality is currently rather limited. /// </rem...
db94dd12c5cdca09f5bbba8a5cc8a0987c71a3f1
8afab81b212a1b7e7b9e88dc222c35f8a0965733
KevLoughrey/Plunderer
/RWM_P3/Snake.cpp
C++
cpp
4,901
no_license
#include <Snake.h> #include <iostream> b2Vec2 Snake::s_dimensions(30, 30); float Snake::s_speed(3.0f); float Snake::s_attackMultiplier(2.5f); float Snake::s_slowdownMultiplier(6); float Snake::s_minVelXBeforeTurning(0.005f); float Snake::s_pitCheckValue(1); bool Snake::s_initializedFSM(false); static bool GetInit()...
5eee435d2f3080f64c294c2749f617550ea18ac7
306dc1461f2f329f6c7151f2c01d13d41d734669
Ravi-Khatri/code
/CAKE wALK/temp1.cpp
C++
cpp
242
no_license
#include<bits/stdc++.h> #define ll long long using namespace std; void solve() { int n; cin>>n; int cnt=0; for(int i=2;i*i<=n;i++) { while(n%i==0) n/=i,cnt++; } cout<<cnt<<' '; } int main() { int t;cin>>t; while(t--) solve(); }
2bdf1a77e25be51538613ab35d1182afa6a4f823
c884dbefa615841c141eea468a4614549d5fca1e
Abdilaziz/Self-Driving-NanoDegree
/Term 2/5. Unscented Kalman Filters/Prediction Step/3. Getting the Predicted Mean and Covariance Matrix from the predicted Sigma Points/ukf.cpp
C++
cpp
3,019
no_license
#include <iostream> #include "ukf.h" UKF::UKF() { //TODO Auto-generated constructor stub Init(); } UKF::~UKF() { //TODO Auto-generated destructor stub } void UKF::Init() { } /******************************************************************************* * Programming assignment functions: *****************...
d018af479cc7949d1f8e48c347f3b52e7d267ade
2cdff8ab6de641334c27d07c9847e3abbc6444dc
Sifatsb/LightOj-Codeforces-Solve
/CODEFORCES/Product_Numbers.cpp
C++
cpp
1,145
no_license
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int check(int n, int a) { int k,p=-1; for(k=a; k<sqrt(n); k++) { if(n%k==0) { p=k; break; } } return p; } int main() { int t; cin >> t; while(t--) { int...
3ff6beb3e625c99c9427156e0022dc313758af69
009acafe4e2c5e0ff68ba6106812d5a1624a61d1
avarpow/SYSU_PROGRAMMING
/online9/8512.cpp
C++
cpp
2,628
no_license
//模拟 #include <stdio.h> #include <string.h> int a[1005], b[1005]; int main() { int n, m, k; scanf("%d%d%d", &n, &m, &k); for (int i = 0; i < m; i++) { scanf("%d", &a[i]); } b[0] = a[0] - 1; for (int i = 1; i < m; i++) { b[i] = a[i] - a[i - 1] - 1; } b[m] = n - a[m...
bb426ac82359e4daf657f0bf30a4cf0b67cce976
553169b5302f7824e59c480328965c98c55e3041
Kanaricc/MyICPC
/solutions/POJ/1003/15251210_CE_0ms_0kB.cpp
C++
cpp
498
no_license
#include <iostream> #include <algorithm> using namespace std; double H(int n) { double res = 0; for (int i = 2; i <= n; i++) { res += (1.0 / i); } return res; } const double EPS = 1e-8; bool cmp(double a, double b) { return abs(a - b) <= EPS; } int main() { ios::sync_with_stdio(false); double inp; while (cin...
db5b4d6370912e33df5a669c10ad95da01f46105
d5557adb45a9964eaf53638283a52a9842364857
zhao605/AMGAgroundwater
/Distributed system/local side/condor - the folders in condor must be searchable by visual c++/ncp/netsock.cpp
C++
cpp
6,522
no_license
#include "netsock.h" #ifdef _DEBUG #define VERIFY(f) ASSERT(f) #else #define VERIFY(f) (f) #endif int CSocket::GetLastError() { #ifdef _WIN32 return WSAGetLastError(); #else return errno; #endif } void CSocket::SetLastError( int nError ) { #ifdef _WIN32 WSASetLastError( nErro...
a0266ab58040cfb071bf69bea17e126dcc91f131
cabb76a9c3822579eb6b16903758f6afdfd4bff7
gm2-it/test-beam-frascati-feb16
/bed/TBmakeNTP.cxx
C++
cxx
22,324
no_license
#include "TString.h" #include "TFile.h" #include "TTree.h" #include "TH1.h" #include "TH2.h" #include "TMath.h" #include "TCanvas.h" #include "TGraph.h" #include <TLine.h> #include <TStyle.h> #include <iostream> #include "TBtrace.h" #include "TBconfig.h" #include "TBmakeNTP.h" // // Constructor //...
6bc0cdb314ea27d95a0265358aa5893d0c53d6d9
6c0d047d9d105debc2c2c9b9d93839071b328b51
matthb2/ParaView-beforekitwareswtichedtogit
/Qt/Components/pqSelectionInputWidget.cxx
C++
cxx
9,699
permissive
/*========================================================================= Program: ParaView Module: $RCSfile$ Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc. All rights reserved. ParaView is a free software; you can redistribute it and/or modify it under the terms of the ParaView lice...
e1efe53c6aee7f50ab6ee3f06b4741227b539d45
0e111484c2931af541fc413fddd1d5ba6daa8c4e
mukibi/wakayula
/Blending.cpp
C++
cpp
498
no_license
#include<cv.h> #include<highgui.h> using namespace cv; int main(int argc, char *argv[]) { Mat src1, src2, dst; double alpha = 0.5, beta = 0.5; src1 = imread("/home/k0k1/Pictures/ikawa_contacts/20150724_110609.jpg"); src2 = imread("/home/k0k1/Pictures/ikawa_contacts/20150724_110737.jpg"); if (src1.data and src...
1dead175dd252f0ac25dc8d0e787ae9686844caa
9a4e43df87b15206162850150b9b2e1bb545fa01
KavinderSingh/uva
/11498/main.cpp
C++
cpp
592
no_license
#include <iostream> using namespace std; int main() { while(true) { int t; cin >> t; if(t==0)break; int div_x, div_y; cin >> div_x >> div_y; while(t--){ int x,y; cin >> x >> y; if(x > div_x && y > div_y) cout <<"NE"<<endl; else if(x == div...
5c2a45a1e45e63b400af5360a33d5d31689f7d6d
1990ce06f78efb0ae50255ed3f2067792291d65a
skyformat99/mooon
/application/report_self/src/report_self_example.cpp
C++
cpp
1,065
no_license
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
af114a54e956357252eb7f35b0994a8f73033465
1a2ec0b5deee1860ab00da68870d583768d44f44
aloucks/dawn
/src/tests/unittests/validation/ValidationTest.cpp
C++
cpp
8,288
permissive
// Copyright 2017 The Dawn Authors // // 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 t...
5227de85bfa84c095276b8fd111136a1028fdf70
e33b95d53da621b81489682ebfbafe1f5e983260
walkccc/LeetCode
/solutions/0432. All O`one Data Structure/0432.cpp
C++
cpp
1,841
permissive
class AllOne { public: void inc(string key) { const auto it = keyToIterator.find(key); // doesn't find the key if (it == keyToIterator.cend()) { if (l.empty() || l.front().value > 1) l.push_front({1, {key}}); else l.front().keys.insert(key); keyToIterator[key] = l.begin...
738657d52d36ea333fef619dc5ee11e5af32e8db
a57aaebfe59586e610adb0c523f1f4201b6962c8
annequeentina/OpendTect
/src/EarthModel/emfaultstickset.cc
C++
cc
14,464
no_license
/*+ ________________________________________________________________________ (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt Author: J.C. Glas Date: November 2008 ________________________________________________________________________ -*/ #include "emfaultstickset.h" #i...
2264203ccc80c2fa10577a181a978904cbfc6253
d6d095204f48d9f55989cfe1f7edbf82d652c58e
Valhally/uwp-cpp-examples
/MultiInstanceUWP/MultiInstanceUWP/App.xaml.cpp
C++
cpp
4,640
no_license
// // App.xaml.cpp // Implementation of the App class. // #include "pch.h" #include "MainPage.xaml.h" using namespace MultiInstanceUWP; using namespace Platform; using namespace Windows::ApplicationModel; using namespace Windows::ApplicationModel::Activation; using namespace Windows::Foundation; using namespace Win...
cfe21d898b2a570aafc65c408d825b17c56c5005
c5fae7a0b210cc402ac5236d9021eecf8ecefc08
mehulsbhatt/MyOCRTEST
/tesstwo/src/main/jni/com_googlecode_tesseract_android/src/textord/colpartitiongrid.cpp
C++
cpp
87,539
permissive
/////////////////////////////////////////////////////////////////////// // File: colpartitionrid.h // Description: Class collecting code that acts on a BBGrid of ColPartitions. // Author: Ray Smith // Created: Mon Oct 05 08:42:01 PDT 2009 // // (C) Copyright 2009, Google Inc. // Licensed under the Apach...
1ac6476c7291fd3adc69ddae69e6147e4f7274bf
b2d71f96694ee1f6bb1a142500fb078701f4f7b5
lu-cs-sde/IntraJSCAM2021
/evaluation/antlr-2.7.2/lib/cpp/antlr/BitSet.hpp
C++
hpp
2,073
permissive
#ifndef INC_BitSet_hpp__ #define INC_BitSet_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/RIGHTS.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.2/lib/cpp/antlr/BitSet.hpp#1 $ */ #include <antlr/config.hpp> #include <vecto...
36334de11db732df46ca83147ade5a29b27f4d21
db597519f721e2e01bc30b612681073601f1880c
choym0098/Reversi
/main.cc
C++
cc
1,031
no_license
#include <iostream> #include <string> #include "grid.h" #include "state.h" #include "graphicsdisplay.h" using namespace std; int main(int argc, char *argv[]) { cin.exceptions(ios::eofbit|ios::failbit); string cmd; Grid g; int check = 1; // 1 = Black, 2 = White try { while (true) { cin >> cmd; i...
b5ed74cecfe261571424a1d0f8f2f33404c8c133
a41970cd479e6d89326bbc88474c9886eeda518b
GDXN/CoActionOS-Public
/CoActionOS-Applib/include/Rle.hpp
C++
hpp
3,398
permissive
/* * Rle.hpp * * Created on: Nov 15, 2013 * Author: tgil */ #ifndef RLE_HPP_ #define RLE_HPP_ #include <stdint.h> #include "File.hpp" #include "Appfs.hpp" /*! \brief Run Length Encoding Class */ /*! \details This class implements Run length encoding and * decoding algorithms. * */ class Rle { public: ...
ab56bc97be22faac7a510291837c21a2e86aa3b9
6be22778faeabe75bd1aaad5e36481c1790445cf
raviku9273/sugar-rush
/visa/set-1/digit-dp-hello-world/gen-small.cpp
C++
cpp
784
no_license
#include <iostream> #include "testlib.h" using namespace std; /********************* Custom Inputs ***************************/ const int t_low = 1; const int t_high = 1; const long long num_low = 1; const long long num_high = 1000; /********************* Custom Inputs ***************************/ #define endl '\n' ...
4684d861b195ccf6b32ef066a62b7fc3c90c971f
c7d50379d4fa75a555603a752720b684320813df
ramesh130/FCND-Estimation-CPP
/src/QuadControl.cpp
C++
cpp
14,765
no_license
#include "Common.h" #include "QuadControl.h" #include "Utility/SimpleConfig.h" #include "Utility/StringUtils.h" #include "Trajectory.h" #include "BaseController.h" #include "Math/Mat3x3F.h" #ifdef __PX4_NUTTX #include <systemlib/param/param.h> #endif void QuadControl::Init() { BaseController::Init(); // variab...
3e0da640e4b83b2efbee9d1bc9797a7d719b889a
39e0050c5856e404ffce3ee8f64c9b920d981e4c
YaminArafat/Codeforces
/new/C. String Transformation.cpp
C++
cpp
2,251
no_license
/*#include <bits/stdc++.h> using namespace std; int main() { int value=97,h=0,f=0,s=0; string str; cin>>str; if(str.length()<26) { cout<<"-1"<<endl; } else { for(int i=0; i<str.length()-1; i++) { if((int)str[i]==value) { if(...
f5a0d82d4dd6c889ac37fe54661286d261c0bf3d
044780952c4eea475c60007e49832db9620f602e
autoncompute/ScalableLSH
/DiskE2LSH/buildIndex.cpp
C++
cpp
8,124
no_license
#include <iostream> #include <chrono> #include <algorithm> #include <boost/program_options.hpp> #include <boost/archive/binary_oarchive.hpp> #include <boost/archive/binary_iarchive.hpp> #include <glog/logging.h> #include "storage/DiskVectorLMDB.hpp" #include "LSH.hpp" #include "Resorter.hpp" #include "utils.hpp" #inclu...
423e06fe53cffad2f4f22d3ede4ca91a378fb9b2
16dd61e7a9fb09ba33892304916a428997e98e75
ming-inside/3d-cave-runner
/iOS/Classes/Native/Il2CppGenericClassTable.cpp
C++
cpp
163,854
no_license
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include "class-internals.h" #include "codegen/il2cpp-codegen.h" extern Il2CppGenericClass IEnumerat...
f78e9f781fe735cec95fe94d0bf34da51933a263
48a3e0dc2d84da0ecc1889b876a480bc3b41e803
lyrahgames/spray
/spray/ray_tracer/kernel.cc
C++
cc
7,420
no_license
#include "kernel.h" namespace spray { namespace ray_tracer { Kernel::Kernel() : rng_(std::mt19937{std::random_device{}()}), sample_count_{0} {} void Kernel::reset_cache() { sample_count_ = 0; pixel_buffer_.resize(camera().screen_width() * camera().screen_height()); pixel_buffer_.assign(pixel_buffer_.size()...