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
b19aa743a7fda3b60acda6e47a96b3c054cebb87
0df4ef8e40b6f68107705395f6203846dd37e22a
SiChiTong/robot-software
/master-firmware/src/can/uavcan_node.cpp
C++
cpp
5,014
no_license
#include <unistd.h> #include <ch.h> #include <hal.h> #include <uavcan_stm32/uavcan_stm32.hpp> #include <uavcan/protocol/NodeStatus.hpp> #include <uavcan/protocol/node_info_retriever.hpp> #include "emergency_stop_handler.hpp" #include "motor_feedback_streams_handler.hpp" #include "beacon_signal_handler.hpp" #include "er...
902e579536681d88f9df610f5d35da9c7d01e3c5
1a3ad24fe834155ce1c1b81cec51b55317b51ecd
OptivaMediaArqueopterix/q4s
/src/Q4S-client-server/Q4SAgent/Q4SAgentConfigFile.cpp
C++
cpp
793
no_license
#include "Q4SAgentConfigFile.h" Q4SAgentConfigFile q4SAgentConfigFile("Q4SAgentConfig.txt"); Q4SAgentConfigFile::Q4SAgentConfigFile(const std::string &fName) { ConfigFile configFile(fName); ganyConnectorIp = configFile.getValueOfKey<std::string>("GANY_CONNECTOR_IP", "127.0.0.1"); ganyConnectorPort = conf...
8aefa9c4509ec5dd1aee995c1e8f79cc9e889bde
09a20752669da2cf10e6ee4e391d7c7b365b567c
PY-Foundation-Group-SA/smartcard-reader-library
/SmartcardReader/src/SmartcardInterface.cpp
C++
cpp
5,756
no_license
/* SmartcardInterface.cpp - Library for Xirka Silicon Tech. Smartcard Reader Created by Rosmianto A. Saputro, June 5, 2017. */ #include "Arduino.h" #include "SmartcardInterface.h" #define BAUD_SC 10753 //2400 // Constructor: CardInterface::CardInterface(int VCC, int RST, int RX, int TX) : card(RX, TX){ _VCC = VC...
49523c7c2c3ec52c5be982d92db629e78c48705f
9c0ffee3af30334421fa120464e050cfcc69a893
JetAr/ZNginx
/Book/DX/DX9.Luna/BookICode/Book Part II Code/Chapter 3/Cube/d3dUtility.cpp
C++
cpp
4,621
no_license
////////////////////////////////////////////////////////////////////////////////////////////////// // // File: d3dUtility.cpp // // Author: Frank Luna (C) All Rights Reserved // // System: AMD Athlon 1800+ XP, 512 DDR, Geforce 3, Windows XP, MSVC++ 7.0 // // Desc: Provides utility functions for simplifying common task...
2f25c3ce286caa4f50f4592252dd559cb6652198
ed52dc76d324cce40a161ae4c629a88dda01cc99
IAmAnubhavSaini/cryptoAlgorithm-nt5src
/Source/XPSP1/NT/multimedia/directx/dsound/dsdmo/alist.cpp
C++
cpp
2,073
no_license
// Copyright (c) 1998-1999 Microsoft Corporation // // alist.cpp // #include <windows.h> #include "alist.h" LONG AListItem::GetCount(void) const { LONG l; const AListItem *li; for(l=0,li=this; li!=NULL ; li=li->m_pNext,++l); return l; } AListItem* AListItem::Cat(AListItem *pItem) { AListItem *li;...
4f36cb9c0625051154fc6d5e8ef0710adf07b00d
94c566067024a833e9d4fdf00505ca06bd1e5a5f
vitorap/Advanced-Algorithms
/AA/e1.cpp
C++
cpp
2,830
no_license
#include "stdio.h" #include <iostream> #include <vector> using namespace std; int main() { int numCasos; cin >> numCasos; for (int c = 0; c < numCasos; c++) { int budget; int tgNum; cin >> budget; cin >> tgNum; vector<vector<int> > garments; ...
055bb64c62e04798cef77211c5778efb2ee975d0
fa6846afd413f8b4be868c23b9b0c21d59250cf8
adde13372/shadowcore
/src/server/scripts/Pandaria/WorldBosses/boss_galion.cpp
C++
cpp
13,557
no_license
/* * Copyright 2021 ShadowCore * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed...
4408bd1d2ff9ce813367feff07f6045e66b66132
9cab96a1b2f86a3b861a242a4163c38727880b58
sunaina297/3DTetris
/helper.cpp
C++
cpp
2,492
no_license
#include "constants.h" #include <time.h> // returns a random color color4 H_change_color(void) { color4 rand_color; int num = rand() % 5; if (num == 0) { rand_color= color4(0.1f, 1.0f, 0.3f,1.0f); } else if (num == 1) { rand_color= color4(1.0f, 0.30f, 0.3f,1.0); } else if (num == 2) { ra...
f1387e18fea67af19350b0ac990723fb39af0661
dbcc145dff91e17cdf13d31225af51306cada1bd
maxpkatz/Microphysics
/networks/CNO_extras/actual_network_data.cpp
C++
cpp
1,689
permissive
#include <actual_network.H> namespace network { AMREX_GPU_MANAGED amrex::Array1D<amrex::Real, 1, NumSpec> bion; AMREX_GPU_MANAGED amrex::Array1D<amrex::Real, 1, NumSpec> mion; } void actual_network_init() { using namespace Species; using namespace network; // binding energies per nucleon in MeV ...
f64cb0be288fef371d876c6bb1bc1ddbb15c7db7
6b088de93a282311c976a4556f914f5de3ecefef
jjzhang166/WinNT5_src_20201004
/NT/base/win32/fusion/sxs/filestream.cpp
C++
cpp
11,978
no_license
/*++ Copyright (c) Microsoft Corporation Module Name: filestream.cpp Abstract: Implementation of IStream over a win32 file. Author: Michael J. Grier (MGrier) 23-Feb-2000 Revision History: --*/ #include "stdinc.h" #include <windows.h> #include "sxsp.h" #include "filestream.h"...
59ce5f8bc1d18571f86e13e635b5b739f8e996aa
13da20c2e94e26dee3635ddbf17ccf07204a7be8
hunterpaulson/fprime
/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp
C++
cpp
2,074
permissive
#include <Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImpl.hpp> #include <Fw/Types/BasicTypes.hpp> #include <Fw/Types/Assert.hpp> #include <Fw/Logger/Logger.hpp> namespace Svc { #if FW_OBJECT_NAMES == 1 ConsoleTextLoggerImpl::ConsoleTextLoggerImpl(const char* compName) : PassiveTextLoggerComponentBase(c...
b6559432baf4de940a0e4ef5598b68882861835b
91fd267d1c5dee7021bfd8054a6c10007a341089
OutpostUniverse/OP2Utility
/test/ResourceManager.test.cpp
C++
cpp
2,012
permissive
#include "../src/ResourceManager.h" #include "../src/Archive/VolFile.h" #include "../src/XFile.h" #include <gtest/gtest.h> #include <stdexcept> using namespace OP2Utility; TEST(ResourceManager, ConstructResourceManager) { // Load Resource Manager where directories exist with .vol and .clm 'extensions' EXPECT_NO_THR...
df9d7c798f3ff2f66cf59ca3117a11e93abd696b
72d852c15ced486238b212485b03478ca49c1c77
rosoareslv/SED99
/c++/ClickHouse/2017/12/FlatDictionary.cpp
C++
cpp
21,201
permissive
#include <Dictionaries/FlatDictionary.h> #include <Dictionaries/DictionaryBlockInputStream.h> namespace DB { namespace ErrorCodes { extern const int TYPE_MISMATCH; extern const int ARGUMENT_OUT_OF_BOUND; extern const int BAD_ARGUMENTS; extern const int DICTIONARY_IS_EMPTY; extern const int LOGICAL...
41f45c55131ad885371eb6373b121c5507cc297d
58e410b9ffa7a33857146a48b7bd1d4d6cd8b6d5
emonansar/Codeforces-Solution
/236A.cpp
C++
cpp
636
no_license
#include <bits/stdc++.h> using namespace std; int main() { int l,c=0; string a; char temp; cin>>a; l=a.length(); for(int i=0;i<l-1;i++) { for(int j=i+1;j<l;j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j...
3161a214d2882519e0e3bd55a3aab88663dab441
ae107827f29236122f8dc6ffd7f3cc24ca800c52
vicobill/bsf
/Source/Foundation/bsfUtility/Serialization/BsBinaryDiff.cpp
C++
cpp
23,435
permissive
//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// #include "Serialization/BsBinaryDiff.h" #include "Serialization/BsSeri...
0d59358878351f7f2d52cb969be22a16244d0c1e
68c2a7f5b28b71b078963dd2fbd4b2a4a7ae6b43
Konvie/C-plus-computer-practice
/RandomRW/RandomRW/rw.cpp
C++
cpp
1,083
no_license
#include "file.h" int main() { ReadFile reFile; reFile.read(); while (true) { //打印一个简单的运行提示界面 cout << "=============================================" << endl; cout << "\t已有文件" << endl; cout << "\t1.txt" << endl; cout << "\t2.txt" << endl; cout << "\t3.txt" << endl; cout << "\t4.txt" << endl; cout <...
75f3cb9b928693575030d3fcd554c06fd6a11d01
feef276cf8b1f71a51dbd57a636a20646ff26b83
stevebraveman/Code
/LUOGU/P2054.cpp
C++
cpp
617
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #define ll long long ll n , m , l , r , g , h; inline ll qpow(ll k , ll p) { ll res = 1; while (p) { if (p & 1) res = (res * k) % (n + 1); p >>= 1; k = (k * k) % (n + 1); } return res; } void exgcd(ll a , ll b , l...
c8ae3f175431b80eb07bef5bd5708a54b7d853e7
2fdb0538da0f7ae0c5082175201e668c9902393c
briancpark/deitel-cpp
/VCB600ENU1/MSDN_VCB/SAMPLES/VC98/SDK/COM/INOLE2/CHAP06/OBJUSER2/OBJUSER2.CPP
C++
cpp
7,484
no_license
/* * OBJUSER2.CPP * Koala Client #2 Chapter 6 * * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved * * Kraig Brockschmidt, Microsoft * Internet : kraigb@microsoft.com * Compuserve: >INTERNET:kraigb@microsoft.com */ #define INITGUIDS #include "objuser2.h" /* * WinMain ...
9a0e56cc1c8eb64a8aefa6688e4900df8decbea2
540a5c68ef9b00f2918f792ed0a53b08d5cd9c7c
Vaa3D/v3d_external
/v3d_main/terafly/src/presentation/QHelpBox.cpp
C++
cpp
1,862
permissive
#include "QHelpBox.h" using namespace terafly; QHelpBox::QHelpBox(QWidget *_parent) : QWidget(_parent) { parent = _parent; backgroundPanel = new QLabel(); backgroundPanel->setStyleSheet("border: 1px solid; border-color: rgb(71,127,249); background-color: rgb(245,245,245); margin-top:0px; " ...
a036aae79b2202554e6ee37dfb11fdb4a596254f
23360afd7b3e7403ffcbaa1b785e552ef1b08b9a
rethinkdb/rethinkdb
/src/clustering/administration/stats/debug_stats_backend.hpp
C++
hpp
2,025
permissive
// Copyright 2010-2014 RethinkDB, all rights reserved. #ifndef CLUSTERING_ADMINISTRATION_STATS_DEBUG_STATS_BACKEND_HPP_ #define CLUSTERING_ADMINISTRATION_STATS_DEBUG_STATS_BACKEND_HPP_ #include <string> #include <vector> #include "clustering/administration/servers/server_common.hpp" #include "clustering/administratio...
7a4ebffb1c79121a4f2f406fd3e2fb5376564567
1dc6c22ca93fdff81ce4cb6cef0af7753eb14052
CORP-RESELLER/rippled
/src/ripple/app/ledger/ConsensusTransSetSF.cpp
C++
cpp
3,522
permissive
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
d24e0d365669ce543ed97b3e2dac69767aabba33
79743eea3c2df632f495f985e42234190a8e663d
NehilDanis/deep_learning_from_scratch_Cpp
/src/wrap.cpp
C++
cpp
1,383
permissive
// // Created by nehil on 14.06.2019. // #include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <pybind11/complex.h> #include <pybind11/functional.h> #include <pybind11/chrono.h> #include <eigen3/Eigen/Core> #include <eigen3/Eigen/SparseCore> #include <pybind11/eigen.h> #include <eigen3/Eigen/Dense> #includ...
11225f22616d7f245cdd7b0cde31cf7caff8f349
907e295537491748e385730a7e1d7438da9445db
starhound/CPP_CLASS_PROJECTS
/CPP-CP10-P6/Source.cpp
C++
cpp
1,083
permissive
//Wesley Reid //March 24th 2020 //Chapter 10 Assignment #6 - Vowels and Consonants #include <iostream>; #include <iomanip>; #include <string> using namespace std; int main() { cout << "Please enter a word: " << endl; string input = ""; getline(cin, input); int size = input.size(); cout << "String size: " << si...
4515603a7b54b4294749c18cd6694154ef0eca16
07f21398e658a95bf3fb791fbf9f457ea7cb2940
dmvincent/HackerRank
/Maps_STL/practice.cpp
C++
cpp
1,041
no_license
#include <iostream> #include <map> #include <typeinfo> int main() { std::multimap<std::string, int> mymm; std::pair<std::string, int> p1; p1 = std::make_pair("Daniel", 3); mymm.insert(p1); p1 = std::make_pair("Jeff", 8); mymm.insert(p1); p1 = std::make_pair("David", 4); mymm.insert(p1); p1 = std::make_pair...
7566a8c64a1a190a226023b74c34db55d9dcdb8e
c9fd74c38bf10858cf916c6a488bce1c13e425b1
ugovaretto/cpp11-scratch
/training/modules/partitions/top_module.cpp
C++
cpp
350
no_license
export module top_module; import<iostream>; export import : top_module.child_1_module; import : top_module.child_2_module; export namespace top_module { void Print() { std::cout << "Top> Hello from top module" << std::endl; std::cout << "Top> calling child_2_module..." << std::endl; child_2_module::Print()...
0f96cb5e70752ca29e71af2661f87b21bfa366d4
cf72b4f35edb086ddf30b93197a6054ec9fdcb88
SHIZ-developer/fonline
/ThirdParty/rapidyaml/extern/c4core/src/c4/compiler.hpp
C++
hpp
3,124
permissive
#ifndef _C4_COMPILER_HPP_ #define _C4_COMPILER_HPP_ /** @file compiler.hpp Provides compiler information macros * @ingroup basic_headers */ #include "c4/platform.hpp" // Compilers: // C4_MSVC // Visual Studio 2017: MSVC++ 15 // Visual Studio 2015: MSVC++ 14 // Visual Studio ...
f19871c8ee0deda88dc8585b790be6b8ac93e729
fb8928fc2e9f18d2b6239d18b6d34789a3c20237
malaifa/source
/src/protocols/match/output/PDBWriter.hh
C++
hh
6,955
no_license
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
e6281dbd72d4df61cc4dd26530304df657b45011
5df8b65c9df5d2e8e94aecc887e0743e94ddd0a8
edisonhello/waynedisonitau123
/Contest/Opencup/XV/CentralEurope/D.cpp
C++
cpp
450
no_license
#include <bits/stdc++.h> using namespace std; int cnt[2000005]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; while (n--) { int t; cin >> t; ++cnt[t]; } long long ans = 0; for (int i = 1; i <= 2000000; ++i) { for (int j = i * 2; j <= 2000000; j += i) {...
cb97f42e1ab23571ff94453e9115547ca47a6fa9
0e6c2340ce9b1078d1dc35590c03cd8cdf7473d1
jd28/land_of_misfit_nwn_toys
/nwnx2_plugins/resman/containers/ResmanDirectory.cpp
C++
cpp
1,883
no_license
#include "../NWNXResMan.h" #include "NwnDefines.h" #include <stdio.h> #include <string.h> #include <sys/stat.h> #include <boost/algorithm/string.hpp> #include "ResmanDirectory.h" extern CNWNXResMan resman; static char path[MAXPATH + 21]; time_t ResmanDirectoryContainer::GetLastModTime(const char *file) { struct ...
35a00f9f646709eef84eb23eef57ae52f44c1f53
d0b2d852b60ee1ddbed383956da82e4f66d8efad
siddhantpushpraj/DATA-STRUCTURE
/negtivenum.cpp
C++
cpp
629
no_license
#include<iostream> using namespace std; class neg { public: int n,a[20],count=0; void get() { cout<<"total element "<<endl; cin>>n; cout<<"array "<<endl; for(int i=0;i<n;i++) { cin>>a[i]; } } void num() { for(int i=0;i<n;i++) { if(a[i]<0) {...
8fa0a606f460ada135959dce176561a6edaa46d6
9f7d2033d34cde17f1bd3ec468113de285504b05
chrizonix/RCBot2
/game/shared/sdk/sdk_player_shared.cpp
C++
cpp
4,599
no_license
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // //=============================================================================// #include "cbase.h" #ifdef CLIENT_DLL #include "c_sdk_player.h" #else #include "sdk_player.h" #endif #...
f7b29a06ef7e5ea38069d6589254dc9d80a32738
58f355f7272e7653036bfbdfbc85d103fb13f109
tejasMadrewar/CPP_notes
/7_inheritance/ex_inheritance.cpp
C++
cpp
2,978
no_license
#include <iostream> using namespace std; // Inheritance // The mechanism of deriving a new class form an old one is called inheritance // The old class is refered as the base class and the new one is called the derived class or subclass // // Type of inheritance // 1. Single inheritance // A -> B // // 2. multip...
d989eb3100981feebca64e9181e7b3361c2c13b1
7eccabae11de84babe5eb186ca993cb873212a70
u4507075/ecg_viewer_cpp
/ECG project/V2/ECG/main.cpp
C++
cpp
889
permissive
#include "ecg.h" #include "list.h" #include "interpret.h" #include <QApplication> //QString IPADDRESS = "http://sddn.med.cmu.ac.th"; //QString IPADDRESS = "http://10.0.2.71"; QString IPADDRESS = "http://110.20.0.171"; int A4WIDTH = 297*4; int A4HEIGHT = 210*4; int VERTICALMARGIN = 2; int HORIZONTALMARGIN = 15; int LI...
1911ddebffaedbfe7513e993a2f5a2740a7077aa
759f02cbaf7b9ccffe97aeb4494ced827d9da11b
namtsui/libtorrent
/src/mmap_storage.cpp
C++
cpp
26,103
permissive
/* Copyright (c) 2003-2009, 2011, 2013-2019, Arvid Norberg Copyright (c) 2003, Daniel Wallin Copyright (c) 2016, Vladimir Golovnev Copyright (c) 2017-2018, Alden Torres Copyright (c) 2017, 2019, Steven Siloti Copyright (c) 2018, d-komarov All rights reserved. Redistribution and use in source and binary forms, with or...
9acf7cb5f9d0002d0d2b34db20aacfa124865a90
ecfe3671b555fb2d988daa7cacd21a15e527d60b
willrebuild/flyffsf
/SRC/OFFI SRC!/boost_1_34_1/boost_1_34_1/libs/date_time/example/local_time/simple_time_zone.cpp
C++
cpp
3,401
permissive
/* A simple example for using a custom_time_zone and a posix_time_zone. */ #include "boost/date_time/local_time/local_time.hpp" #include <iostream> int main() { using namespace boost; using namespace local_time; using namespace gregorian; using posix_time::time_duration; /***** custom_time_...
b775c249b7080cdf3d5a5e41b86209908de3471f
3e9eec3d2f46478288902ec8e1427784694ba45d
samueljrz/Competitive-Programing
/ChallengesProgramming/Contest III/Problem B.cpp
C++
cpp
416
no_license
#include <bits/stdc++.h> using namespace std; int a[10001]; int main() { int n, sum=0, v; cin >> n; for(int i=0; i<n; i++) { cin >> a[i]; } for(int i=0; i<n-1; i++) { if(a[i] <= a[i+1]) { a[i+1] -= a[i]; a[i] = 0; }else { cout << "NO" << endl; return 0; } } for(int i=0; i<n; i++) { if(...
ba924788eafd145c44b87c4501167afa15927316
282519a04ffbf9f5341a66145ca719a674cb3507
xcgj/Linux_system_network
/Chat/Chat.cpp
C++
cpp
12,631
no_license
#include "Chat.h" Chat::Chat(QObject *parent) : QObject(parent) { this->ips = getSysIps(); myaccount = getSysName(); broadcast_ip = "255.255.255.255";//默认广播地址 udp_fd = -1; //子线程发信号,让主线程处理产生文件发送的子线程 connect(this, SIGNAL(sigAckFileTrans(int,int,int)), this,SLOT(onAckFileTrans(int,int,int))); } ...
ee563e671b624172257a89c6878f79bd3fabbfe2
251a2c71394a89afd6af2afdc67ee27578c6e9ce
xzt-1314/zy3
/数学速算软件.cpp
C++
cpp
11,618
no_license
#include <bits/stdc++.h> using namespace std; typedef struct speed { string name; string time; }speed; void menu(); void primary(); void time1(int a,int b,int c); void time2(int a,int b,int c); void time3(int a,int b,int c); void look(); void clean_1(); //清屏 void del(); void intermediate(); void senior(); int main()...
e679d598f3fcd301a3f91db9fc6cfbc57e58d4df
b90cf045688a979f507dcaad9676340c492b387a
KotoDevelopers/koto
/src/qt/bitcoinstrings.cpp
C++
cpp
25,866
permissive
#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif static const char UNUSED *bitcoin_strings[] = { QT_TRANSLATE_NOOP("bitcoin-core", "" "(1 = keep tx meta data e.g. account owner and payment request information, 2 " ...
9322c08c1e8d5df99342ae2e93c3af5f95a51921
37d544714f49473cdffc9e11de85a4a58926d388
vtns/tsduck
/src/libtsduck/dtv/descriptors/tsComponentDescriptor.cpp
C++
cpp
6,054
permissive
//---------------------------------------------------------------------------- // // TSDuck - The MPEG Transport Stream Toolkit // Copyright (c) 2005-2021, Thierry Lelegard // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the f...
a78021f24d440a0a67d7c8fd3eb189fca7bb7c0c
569bca807f32c2c770309a77d746604a6c5e9163
ruby-github/09001color
/src/main/native/patient/ViewDicomDataSelect.cpp
C++
cpp
32,832
no_license
#include <dirent.h> #include "display/gui_func.h" #include "display/gui_global.h" #include "patient/ViewDicomDataSelect.h" #include "keyboard/KeyValueOpr.h" #include "keyboard/KeyDef.h" #include "patient/FileMan.h" #include "periDevice/DCMMan.h" #include "patient/ViewQueryRetrieve.h" #include "display/ViewDialog.h" #in...
d31a29f6568c1e3ffa88a6360815e182d3de1ca5
6fd51744fdd6ff9b1adba5302f3524e47fd2546b
qwertyran3/coding
/codesheet/443a.cpp
C++
cpp
1,654
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long #define ini(arr, val) memset(arr, (val), sizeof(arr)) #define loop(i,n) for(ll i=0; i<n; i++) #define loop1(i,n) for(ll i=1; i<=n; i++) #define all(a) (a).begin(),(a).end() #define dupli(a) unique(all(a)),(a).end() #define exist(s,e) (s.fi...
061cb0be74c84b01e522e911a32b7ad7d408af7f
9cd8d5c3edc5e5a2a5eb20b19df159c9a78e0dfa
artisteacher/opentoonz
/toonz/sources/toonzlib/txsheet.cpp
C++
cpp
56,273
permissive
// TnzCore includes #include "tstream.h" // TnzBase includes #include "toutputproperties.h" #include "tfx.h" #include "tparamcontainer.h" #include "tparamset.h" #include "tfxattributes.h" // TnzLib includes #include "toonz/fxdag.h" #include "toonz/txshchildlevel.h" #include "toonz/txshcell.h" #include "toonz/observ...
21cec23db2cee6a67aeed1dd705c7edf83e3d2b9
206a47e2da564b00d8644b48009e806946894b67
fanyer/cef
/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc
C++
cc
4,834
permissive
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // // --------------------------------------------------------------------------- // // This file was generated by the CEF translato...
1d5e62a65c0be31c87995805fba601f1faeec3e5
f8d92db098004b1178db65f3891025433f9ff783
phoemur/competitive-programming
/SPOJ/TRT - Treats for the Cows.cpp
C++
cpp
3,252
permissive
/*TRT - Treats for the Cows #dynamic-programming FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per day and wants to maximize the money he receives over a given period time. The treats are interesting for many reasons: The treats are...
0ae4629398b2f64605745b5bc87d34bd1193f64a
37a913b63a18d0d96c6d77a4394042b5af3f7772
solarce/libdynd
/src/dynd/types/datashape_formatter.cpp
C++
cpp
5,832
permissive
// // Copyright (C) 2011-15 DyND Developers // BSD 2-Clause License, see LICENSE.txt // #include <dynd/types/datashape_formatter.hpp> #include <dynd/types/struct_type.hpp> #include <dynd/types/fixed_dim_kind_type.hpp> #include <dynd/types/fixed_dim_type.hpp> #include <dynd/types/var_dim_type.hpp> #include <dynd/types/...
03a4196fc375e46b3b8c1b3b039984180abfee85
4d1697145c494cee44123ca8ae3ab1cee8900676
nebula-qiu/aliyun-openapi-cpp-sdk
/iot/src/model/QueryDeviceDesiredPropertyRequest.cc
C++
cc
2,721
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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 * * Unless required...
76f4b476cb03b6e87201521c45f86df3e49b66ce
fee3afd826d81b89040fbab4b9bee20a9f7544cc
NeoniteDev/Osmium
/Osmium/SDK/FN_GE_SmasherMeleeCooldown_classes.hpp
C++
hpp
672
no_license
#pragma once // Fortnite (4.5-CL-4159770) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass GE_SmasherMel...
6646e8bbafd183c79738148f9ea36b2c205937a9
95094981687fa87c74cc1c61b518aa72d1edb4cd
gnafit/gna
/transformations/integrator/IntegratorBase.cc
C++
cc
4,409
permissive
#include "IntegratorBase.hh" #include "fmt/format.h" #include <string> #include <iostream> #include <iterator> using namespace Eigen; using namespace std; IntegratorBase::IntegratorBase(int order) : GNAObjectBind1N<double>("hist", "f", "hist", 1, 0, 0), m_order(static_cast<size_t>(order)) { } IntegratorBase::Integr...
1e90b8d49a027592c16db641c8b0dabe1bf24f7d
ab4cb5bf6a7f1abc5b6e194f67d31a81c04e3d9f
samsank06/my-learnings
/oops-c++/copy_const.cpp
C++
cpp
572
no_license
#include<iostream> using namespace std; class CopyConstr{ private: int a,b; public: CopyConstr(int a, int b) //parametarized { this->a=a; this->b=b; } CopyConstr(CopyConstr &obj) // copy { a=obj.a; b=obj.b...
0e4d180ed57622babddbff206d3c0f5648c693b8
dd0f1d49e6798ff8459a5fdf7d9f39a21baf35f8
Chaste/Chaste
/global/src/fortests/FakePetscSetup.hpp
C++
hpp
3,724
permissive
/* Copyright (c) 2005-2022, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
bcf939442c47de81b8ed480f3d8507a8fa1638ab
0a23518e5e5da77e70e85943fd0a5571e04299ae
dappcenter/bravo
/libraries/sidechain/include/bravo/sidechain/sidechain.hpp
C++
hpp
2,107
permissive
#pragma once namespace bravo { namespace sidechain { using std::string; #define side_ids 10 typedef side_object_types { side_account_type = 1, pending_transaction_object = 2 }; /** This operation can be used for internal transfers and withdraw requests */ struct sidechain_transfer_operation { ...
cfbdcc626316bf36547d2094292262f9f4c098fb
5a27abb20dd39a37f26f8861b0954993dd3e4a63
fermi-lat/GlastRelease-scons-old
/G4HadronSim/src/Packaging/src/G4MiscLHEPBuilder.cc
C++
cc
11,608
no_license
// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this ...
bea41bd42225ebc983d2cacb385180dae7dee091
4f248c0770b30ccf95988c4fc26b4a4f7bd416fc
lpillar/Captioning
/Captioning/KWindow/ShortenedText.cpp
C++
cpp
1,952
no_license
#include <string> #include "SDL.h" #include "InputHandler.h" #include "SDLUtility.h" #include "ShortenedText.h" #include "TextInput.h" #include "UIElements.h" ShortenenedText::ShortenenedText() { maxtextwidth_ = 0; mousefunction_ = new MouseHandler(); mousefunction_->Init(SDL_Rect{ 0, 0, 0, 0 }); fulltext_.Ini...
09cd2f9f65dd062e830082b14ee4c3ae39619947
83bc8f014106ce3225f295905f6679ab703d4bfb
siberianwombat/chromium
/content/browser/frame_host/render_frame_host_manager_unittest.cc
C++
cc
140,773
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 "content/browser/frame_host/render_frame_host_manager.h" #include <stdint.h> #include <string> #include <tuple> #include <unordered_set> #inclu...
7f705b2fb9f01d405c0477593fec1f2724a12669
0529998a8bdf73aace8a6b73af758554d2308d1f
irods/aws-sdk-cpp
/aws-cpp-sdk-iotsitewise/source/model/AssetSummary.cpp
C++
cpp
3,855
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/iotsitewise/model/AssetSummary.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { name...
9f2e81496b7fc2b4cdad9aea9b017a4089e12094
86c111e287c000dd4bacd8d97cb8326e65ac0b5e
thibault-martinez/iota.lib.cpp
/include/iota/crypto/signing.hpp
C++
hpp
3,749
permissive
// // MIT License // // Copyright (c) 2017-2018 Thibault Martinez and Simon Ninon // // 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 r...
071f0b9ea8a3bf2e9433a4bb8e400a66f11c95df
2bdd6845e899f5b06749d403b8da88b5fda1a7ac
wangxiang5/DYM
/BaseLib_src/SpSymMgr/PlotText.cpp
C++
cpp
20,505
no_license
#include "stdafx.h" #include "PlotText.h" #ifndef NARROW_LEN_MAX #define NARROW_LEN_MAX 10 #endif #ifndef NARROW_ANGLE #define NARROW_ANGLE (30.0*PI/180) #endif #ifndef NARROW_CHAR_LEN #define NARROW_CHAR_LEN 40 #endif CPlotText::CPlotText(void) { m_DefaultSize = 2.5; m_DefaultAspectRatio = 1.0; m_xso =...
4e7546701a12f436bfe67683989d0bdc1bc26e9f
29fcaa3c8d39afa7e67947bbac9a9e294021743b
meniossin/src
/chrome/utility/importer/bookmark_html_reader.cc
C++
cc
17,262
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 "chrome/utility/importer/bookmark_html_reader.h" #include <stddef.h> #include <stdint.h> #include "base/callback.h" #include "base/files/file_u...
4d35837e4bc2460a1cf074e650d435596ef590d1
5af32c18d505d9dfe96ec0c08371cef8e0961b98
wzyy2/chromium-browser
/media/filters/vpx_video_decoder.cc
C++
cc
34,349
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. #include "media/filters/vpx_video_decoder.h" #include <stddef.h> #include <stdint.h> #include <algorithm> #include <memory> #include <string> #inclu...
3bd7fa174121c2b97925c48b2d6d629cdf6699b7
57be3190b9b7e51c48c3f418236515a0a9f4312a
Raymond427/school_work
/Introduction to Computer Science I/computerSales/computerSales.cpp
C++
cpp
2,054
no_license
/****************************************************/ /* Program: computerSales */ /* Author: Raymond Ferrell */ /* Lab Section: ITCS 1212- L12 */ /* Date: 03/14/2014 */ /* Purpose: This program calculates the paych...
f4ac7fe21fe30d600a5232a12d4507dc92b1bce8
68c727a382bb140afe0910d63fd31100b91a764b
tyurek/libpolycrypto-docker
/src/libpolycrypto/libpolycrypto/test/TestRootsOfUnity.cpp
C++
cpp
5,704
no_license
#include <polycrypto/Configuration.h> #include <polycrypto/PolyCrypto.h> #include <polycrypto/PolyOps.h> #include <xassert/XAssert.h> #include <xutils/Log.h> #include <xutils/Utils.h> #include <libfqfft/polynomial_arithmetic/basic_operations.hpp> #include <set> #include <iomanip> #include <vector> #include <queue> ...
0f632f1d1bf7216f59985b7ce5010109a5db9c61
5da227f9200b24277124458916df124fef0f6e0b
andyworkingholiday/Algorithms
/BFS/불2.cpp
C++
cpp
1,547
no_license
#include <iostream> #include <queue> #define MAX 1000 using namespace std; struct yxc { int y, x, c; }; const int dy[] = { -1,1,0,0 }, dx[] = { 0,0,-1,1 }; int r, c, ans; char map[MAX][MAX]; bool check[MAX][MAX]; bool fire[MAX][MAX]; queue<yxc> jq; queue<yxc> fq; int bfs() { while (!jq.empty()) { int jsize = ...
390391cc25fee15f37e550a56c6311d2d5fc7bf9
849dc5905b59606ad0f7286675ea3bb6a6d2f475
tanmaysahay94/top-shooter
/vec3f.cpp
C++
cpp
2,144
no_license
#include <math.h> #include "vec3f.h" using namespace std; Vec3f::Vec3f() { } Vec3f::Vec3f(float x, float y, float z) { v[0] = x; v[1] = y; v[2] = z; } float &Vec3f::operator[](int index) { return v[index]; } float Vec3f::operator[](int index) const { return v[index]; } Vec3f Vec3f::operator*(float scale) c...
22e545aed353c2e69af5bc45c1a399edba854c7b
3146916fec404a9ea6cae5a2bcb831d1fcb34d70
Trent0881/mr376lab
/lab6/Part_1/example_parameter_server/src/read_param_from_node.cpp
C++
cpp
915
no_license
#include <ros/ros.h> int main(int argc, char **argv) { ros::init(argc, argv, "param_reader"); // name of this node will be "minimal_publisher" ros::NodeHandle nh; // two lines to create a publisher object that can talk to ROS double P_gain,D_gain,I_gain; if (nh.getParam("/joint1_gains/p", P_gain))...
d7fb684a7e865559b15f980c497490f0784ac9ad
8887d76210768087f6ac5f92e9d3c50d9d44c774
ssripadham/CodingInterview
/printParen.cpp
C++
cpp
524
no_license
#include <iostream> using namespace std; void printParen(string inputStr, int numLeftRemaining, int numRightRemaining){ if (numLeftRemaining == 0 && numRightRemaining == 0){ cout << inputStr <<endl; } if (numLeftRemaining > 0){ printParen(inputStr+"(", numLeftRemaining - 1, numRightRemaining); ...
359aa59b49e364134e7c0261c6001832259cfce8
d26a32233c15b4e576a1549f69916051886b72d9
critterandguitari/InchieBase
/src/Inchie4KeyLED.cpp
C++
cpp
5,426
no_license
/* * Inchie4KeyLED.cpp * * Created on: Jan 25, 2018 * Author: owen */ #include "Inchie4KeyLED.h" extern "C" { #include "BlinkLed.h" } Inchie4KeyLED::Inchie4KeyLED(SLIPEncodedSerial &serial) : slipSerial(serial) { index = 254; keyState_1 = keyStateLast_1 = keyState_2 = keyStateLast_2 = keyState_3...
456ebd8451a2ed96a826eca401455c77937220a6
0c7aa72c4b4b8e961aac64e8c22b574735e93638
mikekazakov/vcpkg
/toolsrc/src/vcpkg/commands.hash.cpp
C++
cpp
9,460
permissive
#include "pch.h" #include <vcpkg/base/checks.h> #include <vcpkg/base/strings.h> #include <vcpkg/base/system.h> #include <vcpkg/base/util.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> namespace vcpkg::Commands::Hash { static void verify_has_only_allowed_chars(const std::string& s) { static con...
ee69c605a7029410698fb9b73e694535814cd1db
087307474a85c67e63f6a72fb408d174dc0414ef
n0vatuS/arp_spoof
/main.cpp
C++
cpp
4,372
no_license
#include <stdio.h> #include <unistd.h> #include <memory.h> #include <pcap.h> #include <time.h> #include <vector> #include "module.h" #define PERIOD 30 // seconds using namespace std; void usage() { printf("syntax: arp_spoof <interface> <sender ip 1> <target ip 1> [<sender ip 2> <target ip 2>...]\n"); printf("samp...
b8a8ccd23ac16671ec60cebe9ab706ab389c123c
235ff5677c4fe4c8772967b636725153a903d2d9
dongAxis/tensorflow
/tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc
C++
cc
8,063
permissive
/* Copyright 2019 The TensorFlow Authors. 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 Unless required by applicable law or a...
6b1c52b4684368a586cf790bc2fa00b07f75b870
9c5f9c8a11d634406bfb370edec6f11e32fae9af
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/Z6.0+dmb.sy+dmb.sy+dmb.sypa.c.cbmc.cpp
C++
cpp
48,056
no_license
// Global variabls: // 4:atom_2_X2_0:1 // 0:vars:3 // 3:atom_1_X0_1:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 5 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define ...
636335b61aa729c744b0b3489a677d2939b691cf
4fd6a1beefa4ca66398c21650a1a4b042bfa2c1d
browser-auto/chromium
/media/filters/ffmpeg_demuxer.cc
C++
cc
73,846
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. #include "media/filters/ffmpeg_demuxer.h" #include <algorithm> #include <memory> #include <set> #include <utility> #include "base/base64.h" #include...
377ae5277da9aebfa5bba9ac8efe00e9269e15c3
e81becb9ce3fbb5cb02d24dee08348581ef6a7f1
nick-keller/OpenGL-renderer
/SDLtest/Loader.cpp
C++
cpp
5,532
no_license
#include "Loader.h" Loader::Loader(Scene* pScene) { m_scene = pScene; } void Loader::load() { loadShaders ("Shaders.txt"); loadMeshes ("MeshLoader.txt"); m_scene->init(); loadMap("Map.txt"); } void Loader::loadTextures(string & pFilePath) { } void Loader::loadMap(string pFilePath) { ifstream file(pFilePa...
d8b23dcd241399c4ec314e91c430ed77929cfee9
936e8194da169fcc5000255f84fce69daf21fbf6
Pentagon03/competitive-programming
/project-euler/volume12/578.cc
C++
cc
1,613
no_license
#include <bits/stdc++.h> using ll = long long; inline ll sqr(ll x) {return x * x;} inline ll cub(ll x) {return x * x * x;} const int SZ = 100000000, MN = 10000; int pi[SZ], pl[SZ], m; void sieve() { m = 0; for (int i = 2; i < SZ; ++ i) pi[i] = 1; for (int i = 2; i < SZ; ++i) { if (pi[i]) pl[m++] = i;...
bf650a21f9aa3a170eb7f4a577d817a75b040c71
f315f5e1972d97d977617efd81af437bb70c3cef
errolt/NETMF4.3_Community
/Community/Libraries/Community.Hardware.UsbHost/Native/usbh_driver.cpp
C++
cpp
2,393
no_license
//#define __IO volatile //typedef unsigned int uint32_t #include "usbh_driver.h" //#include "usb_decl.h" #include "stm32f4xx.h" #include "usb_def.h" // PHY turnaround time // (4 AHB clocks + 1 Phy clock in Phy clocks) #define STM32F4_USB_TRDT ((4 * 48000000 - 1) / SYSTEM_CYCLE_CLOCK_HZ + 2) void USBH_ISR (void* pa...
6c2f2c70da9c7a5d579476959bfe5c3fc53394fc
27148bb94b30754af7bd051e3a1fd944f70fe642
TrellixVulnTeam/Chromium_7C66
/chrome/browser/sync_file_system/drive_backend/sync_task.cc
C++
cc
1,344
permissive
// Copyright 2014 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 "chrome/browser/sync_file_system/drive_backend/sync_task.h" #include <utility> #include "base/bind.h" #include "chrome/browser/sync_fi...
1cfbc01c07fd0669cdc140d8c7be7d6bf7d0d24d
6629822064e57de6c3b15fcde7f1392cc986b704
prabhavnegi/Dsa-class
/Day2/richCustomer.cpp
C++
cpp
569
no_license
#include<bits/stdc++.h> using namespace std; int maximumWealth(vector<vector<int>>& accounts) { int max = 0; for(vector<int> customer : accounts) { int sum = 0; for(int amount : customer ) sum += amount; max = std::max(max,sum); } return max; } int ...
5d38ad3ac7b9f1e026ae01acf44e101ab5f55901
25ca9257439f117c4a70770f8516f81108b1b80c
konghouyin/movie
/电影票务管理/math.cpp
C++
cpp
309
no_license
#include"include.h" char* encryption(char* p) { int i; for (i = 0; p[i] != '\0'; i++) { p[i] = (p[i] - 15); } return p; } //¼ÓÃܺ¯Êý char* u_encryption(char* p) { int i; for (i = 0; p[i] != '\0'; i++) { p[i] = (p[i] + 15); } return p; } //½âÃܺ¯Êý void delete_st(void*) { }
0013714ea7cf2ae75926c56b0c3d85c0a267b4ce
374601411da395e301ea56a5970cd95c0bfa7504
dk-dev/rethinkdb
/src/arch/runtime/system_event/windows_event.hpp
C++
hpp
553
permissive
#ifndef ARCH_RUNTIME_SYSTEM_EVENT_WINDOWS_EVENT_HPP_ #define ARCH_RUNTIME_SYSTEM_EVENT_WINDOWS_EVENT_HPP_ #include "windows.hpp" #include "containers/scoped.hpp" #include "arch/runtime/event_queue_types.hpp" class linux_thread_t; class iocp_event_queue_t; class windows_event_t { public: windows_event_t() : event...
394e0792c3c7439142bae6d600739e745f9ff11d
709317d62ed74a0dc43be9627a3e2a58f95cd488
minhson/mkl-dnn
/tests/benchdnn/ip/ip.hpp
C++
hpp
4,452
permissive
/******************************************************************************* * Copyright 2017-2018 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
0541cb575210f2e6d0b7612acea3747532edbc38
bd4dc0d7de0ef8be8b55d4137f9833fa0fbfd727
peichangliang123/ToolBank
/AVFileParse/FLV_Parse/FLVTagHeader.cpp
C++
cpp
1,391
no_license
#include "FLVTagHeader.h" CFLVTagHeader::CFLVTagHeader() { } CFLVTagHeader::~CFLVTagHeader() { } int CFLVTagHeader::ReadData(byte_ptr &pData) { // 往后错四个字节读取header; pData += 4; int iTagHeaderSize = sizeof(flvtagheader_data); memcpy(&m_data, pData, iTagHeaderSize); pData += iTagHeaderSize; r...
64bda3b49dca98a0c004a4e0b5813b5e73fd8fa4
5c1e639bae612b777d98b9fb4ae2b6977b184d48
rdtsc/codeeval-solutions
/src/moderate/magic-numbers/solutions/c++/solution.cpp
C++
cpp
3,909
permissive
#include <algorithm> #include <cassert> #include <cstddef> #include <cstdint> #include <fstream> #include <iostream> #include <limits> #include <utility> #include <vector> template<typename T> static inline bool hasUniqueDigits(T n) { std::uint_fast64_t history = 0; for(;n; n /= 10) { const unsigned char di...
d1d347c429740a27a83ead07ac0992eb98f92099
d3b8b1ee0cedfdc3c098b29db6f8be115eaa14c3
jonvaldes/top-topology
/geom/Vector3D.cpp
C++
cpp
2,000
no_license
#include <math.h> #include "Vector3D.h" #include "Point3D.h" #include <stdlib.h> using namespace geom; float Vector3D::module() const { return sqrtf(SQR(dx)+SQR(dy)+SQR(dz)); } Vector3D Vector3D::getNormalized() const { return (*this)/module(); } Vector3D Vector3D::getWithModule(float newModule) const { ...
16b7e72ce828ada96da347679fda98c5ede96c49
bac36c826e63d280521dc868dbcd94f7f26c9238
Aganlengzi/protobuf-demo
/src/write_person.cpp
C++
cpp
650
no_license
// Last Update:2016-08-10 10:19:29 /** * @file write_person.cpp * @brief * @author jchsong@mail.ustc.edu.constexpr * @version 0.1.00 * @date 2016-08-10 */ #include <iostream> #include <fstream> #include <string> #include "../proto/person.pb.h" int main() { std::string buffer; Person person; person....
bc8dafa485504db90dccf39898f5a683c23d8eb7
ab1f62194155936f47dee41f07ba91186dded9fd
angrilove/Repositories
/ThinkInCpp/usingstring.cpp
C++
cpp
690
no_license
#include <string> #include <iostream> int main() { std::string test(""); std::cout << test.empty() << std::endl; std::string s, s1; if (! s.empty()) { std::cout << s.empty() << std::endl; } std::cout << s.empty() << std::endl; s = ""; std::cout << s.empty() << std::endl; // 1 std::cin >> s >> s1; std::co...
f48873823ba71b74f86f8b4b625cdbc7a5ba7f4f
1e73cf0b2a1e87a6ea07310f07792d781325085a
huski1017/ShootAndRun
/src/Entity.cpp
C++
cpp
1,426
no_license
// // Entity.cpp for ShootAndRun in /home/wroble_h/rendu/tek2/cpp_va // // Made by Hubert WROBLEWSKI // Login <wroble_h@epitech.eu> // // Started on Fri Jul 1 13:14:29 2016 Hubert WROBLEWSKI // Last update Sun Jul 3 18:30:48 2016 Hubert WROBLEWSKI // #include "Entity.hh" Entity::Entity() { } Entity::~Entity(...
7e163087b1b90cedb1d4b11eb63ea44ca8ce49eb
d4525270f6c4f21b19e6a27c0c9679747c5f3c13
IgrovaRazrabotka/MenuFramework
/Source/UISystem/UISystem/States/MenuState_Credits.cpp
C++
cpp
1,189
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "UISystem/States/MenuState_Credits.h" #include "UISystem/States/MenuStateFactory.h" #include "WidgetSwitcher.h" #include "CustomGameInstance.h" #include "MenuState_MainMenu.h" #include "MenuState_PauseMenu.h" UMenuStateBase* UMe...
a0f56589c658c332fc63cc52ec6dc9e5f267a13f
267e2850616490a4882b80a0b36379e9af805622
Azi-824/LEGENDSTORY
/EQUIPMENT.hpp
C++
hpp
1,573
no_license
//EQUIPMENT.hpp //装備関係の元になるクラス #pragma once //##################### ヘッダファイル読み込み ####################### #include "DxLib.h" #include <vector> #include <string> //##################### マクロ定義 ######################### //##################### クラス定義 ######################### class EQUIPMENT { private: std::vector<int>...
18ffd204acbbe0235fc8e3ed07fb497907d84ddf
34369b0d57f4f6242b45b08d7dd2459ded6108b1
verif/leetcode
/mergeTwoSortedList/t.cpp
C++
cpp
1,605
no_license
/* Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }...
f52f34ab7db640c78c4996cf19018078deab96b8
184b268a98dfb7ce779b4d47eaa0e058146c6955
SindenDev/ScreenShot
/FlameShot/linetool.cpp
C++
cpp
1,454
no_license
#include "linetool.h" #include <QPainter> namespace { #define PADDING_VALUE 2 } LineTool::LineTool(QObject *parent) : AbstractTwoPointTool(parent) { m_supportsOrthogonalAdj = true; m_supportsDiagonalAdj = true; } QIcon LineTool::icon(const QColor &background, bool inEditor) const { Q_UNUSED(inEditor)...
7be5a569f59a41579d4509fb28bcffdde04a3222
5bc68ae4f7cefa03d216344f7078c1301700c808
TheChosenHobbit/DE_RayTracer
/framework/sphere.hpp
C++
hpp
637
permissive
#ifndef SPHERE_HPP #define SPHERE_HPP #include <glm/vec3.hpp> #include <shape.hpp> #include "material.hpp" #include "ray.hpp" class Sphere: public Shape { public: Sphere(); Sphere(std::string const& name, Material const& material, glm::vec3 const& center, float radius); ~Sphere(); glm::vec3 getCenter(...
543e61464f1590fa388394a74a0d81d7b1157189
98fda8e100821143921ffeea5e175d8566546971
MedicaicloudLink/Rosetta
/main/source/src/core/select/jump_selector/InterchainJumpSelector.hh
C++
hh
2,330
no_license
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
f7f597df4d377bb87820c5e6e61d5d7e4b81324d
cdd42f00985c0206b7f5640ac7d1165b1b864b75
forsamori/GARTS
/GARTS/GameObject.cpp
C++
cpp
3,064
no_license
#include "GameObject.h" GameObject::GameObject() { xPos = 0; yPos = 0; angle = 0; width = 0; height = 0; gotoX = NULL; gotoY = NULL; //1 pixel accuracy gotoAccuracy = 1; selected = false; velocity.x = 0; velocity.y = 0; speed = 0; } GameObject::GameObject(std::string tex_path, SDL_Renderer* _renderer, ...
3c584f2fdf3011b63ff4d6bf79a0dbf7ca9d0bbb
8ca7d08472417a3f4757e510269ef70e2563c991
jschmucke/e4Coin
/src/llmq/quorums_blockprocessor.cpp
C++
cpp
15,028
permissive
// Copyright (c) 2018 The e4Coin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "quorums_blockprocessor.h" #include "quorums_commitment.h" #include "quorums_utils.h" #include "evo/specialtx.h" #in...
6d59a5d15d805c23f689b1c662a7d789f0dac156
740e0df37905530ed4b7316d52be8b829206e8d4
ivan-trust/wallet-core
/src/interface/TWPrivateKey.cpp
C++
cpp
3,051
permissive
// Copyright © 2017-2019 Trust Wallet. // // This file is part of Trust. The full Trust copyright notice, including // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. #include <TrustWalletCore/TWPrivateKey.h> #include "../Pri...
f2f42acd71277b611050bb6544621e0127d13d02
b988d3881e32522181fc22250e39fa196fe77046
stubbi/nqs
/Sources/Machine/mps_periodic.hpp
C++
hpp
4,015
permissive
// Copyright 2018 The Simons Foundation, Inc. - 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 // // Unless requi...
69fef776b9bdbad43e0ce3b7cc9034fe9a80100b
03604dcafafd63511d451a2902f1bef457e91326
Havoc-OS/android_system_tools_hidl
/VectorType.cpp
C++
cpp
20,146
permissive
/* * Copyright (C) 2016 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...
a88c4f6997615f230bd2094fb6556443f7ba1c88
a31cf44219f50c3a5e9b53050d746dbd2e3c987f
MohamedSadid/CodeForces
/A - Expression.cpp
C++
cpp
503
no_license
#include<bits/stdc++.h> #include <iostream> #include <string> #include <sstream> //#include <vector> //#include <math.h> #define LOG(x) cout << (x) << endl; #define ARR_LOG(x) for(auto c : x) {cout << c << " ";}; //#define ALL(x) (x).begin(), (x).end() using namespace std; in...
806708c29dd11be78044aa95e6e6ca2af4ce4590
de45c7575207a1ac2b0b384a22395da6df86c13d
PearCoding/PearRay
/src/plugins/main/node/ReflectiveNode.cpp
C++
cpp
16,475
permissive
#include "Environment.h" #include "Logger.h" #include "SceneLoadContext.h" #include "math/Scattering.h" #include "shader/ConstNode.h" #include "shader/INodePlugin.h" #include <array> namespace PR { inline float teval(const ShadingContext&, float a) { return a; } inline SpectralBlob teval(const ShadingContext& ctx, c...
c952532536c12fa3d6f7fa59f184db32a75aeb97
b6ebf61dd61981acef6791d36248a4fdfb70dbda
tnsgh9603/BOJ_Old
/숫자의 신.cpp
C++
cpp
1,400
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> // sort 함수 사용 using namespace std; vector<string> ans; // 문자열 a와 b를 붙였을때 a가 앞에 b가 뒤에 붙었을때가 더 크면 true 리턴 // a가 뒤에 b가 앞에 붙었을때가 더 크면 false 리턴 // 즉 문자열이 더 큰 순으로 리턴 bool cmp(string a, string b) { return a + b > b + a; } int main() { int N, K; ...