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
66952ccc74031edf59a71857c73c8b8a1439a951
16f0775f26d87a717f0d27f344af9e210b8da593
coderTong/aws-sdk-cpp
/aws-cpp-sdk-gamelift/source/model/Build.cpp
C++
cpp
3,550
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...
ae44894d7d8ae22fdcf9f4bfe4f0d819281e7591
0e256f8c97f7a63b7ff6e95cc533c2dc242054c0
OpenXRay/xray-15
/cs/sdk/3d_sdk/3dsmax/ver-6.0/samples/retired/vrblout/dllmain.cpp
C++
cpp
2,667
permissive
/********************************************************************** *< FILE: dllmain.cpp DESCRIPTION: DLL implementation of primitives CREATED BY: Charles Thaeler BASED on helpers.cpp HISTORY: created 12 February 1996 *> Copyright (c) 1994, All Rights Reserved. ********************************...
d7c5aff8c1f0212da2109125d1ffddff2c9653c8
484bbbc94892837258f44dcfbd0954dbaf12dcf8
kgerg2/szamgraf
/01_Skybox/01_OGLBase/MyApp.cpp
C++
cpp
5,546
no_license
#include "MyApp.h" #include <math.h> #include <vector> #include <array> #include <list> #include <tuple> #include <imgui/imgui.h> #include "GLUtils.hpp" CMyApp::CMyApp(void) { m_camera.SetView(glm::vec3(5, 5, 5), glm::vec3(0, 0, 0), glm::vec3(0, 1, 0)); } CMyApp::~CMyApp(void) { std::cout << "dtor!\n"; } bool ...
0aebf8acd0a455653e68684535f5c5deefc144ae
04e7af51783cb8b36d6986fa174a760836df2cf3
LiiuKingming/cpp_learn
/EDay08.cpp
C++
cpp
788
no_license
// // Created by 28943 on 2019/11/16. // //1. 考拉求字典序和字符串长度顺序 #include <iostream> #include <vector> using namespace std; #if 1 int main(){ int n = 0; cin >> n; string v; getline(cin, v); cout << v; return 0; } #else //2. A 和 B最小公倍数 int yue(int a,int b){ while(a!=b) { if (a > b) ...
c3f6067b5eb47e077d2a0edd13caf6af9c6eb18c
32b393a45cafeb852a56d14cdaf2f410e28b33cb
smokku/tesseract
/src/engine/texture.cpp
C++
cpp
127,577
permissive
// texture.cpp: texture slot management #include "engine.h" #ifdef __APPLE__ #include "SDL2_image/SDL_image.h" #else #include "SDL_image.h" #endif template<int BPP> static void halvetexture(uchar * RESTRICT src, uint sw, uint sh, uint stride, uchar * RESTRICT dst) { for(uchar *yend = &src[sh*stride]; src < y...
dd7b8b2da8f8d2e5313be4b42e2dc50414d7e38d
542214659f448c7fd3b0a928d99acd5c96a40fc0
ngphubinh/neurons
/c++/research/kmst/blum/Timer.cc
C++
cc
2,190
no_license
/*************************************************************************** Timer.cc - description ------------------- begin : Fri Nov 10 2000 copyright : (C) 2000 by Christian Blum email : cblum@ulb.ac.be **...
fea9ece10f8ac76faab18dde5a4a628902be9058
d86885c8114679c8f10f706f84955145bb17f9d0
pombreda/main
/LIB/excis/src/pipe.cpp
C++
cpp
3,100
no_license
#include <basis/sys/logger.hpp> #include <excis/pipe.hpp> #include <excis/exception.hpp> namespace Ext { AnonPipe::~AnonPipe() { close_write(); close_read(); } AnonPipe::AnonPipe(size_t size) { LogTrace(L"%Iu\n", size); CheckApi(::CreatePipe(&m_rpipe, &m_wpipe, nullptr, size)); } bool AnonPipe::read_n...
f18d7d9098d9877bb073c71a333e5ba387a2b0bf
1af5296e3a4a29fb83ad336b917c5d5b30be7960
MathewsPeter/cppProjects
/friendfunction.cpp
C++
cpp
474
permissive
/* * friendfunction.cpp * * Created on: 10 Apr 2021 * Author: mathewspeter */ #include <iostream> using namespace std; class student { private: int pvt; protected: int pro; public: int pub; friend void friendf(student s); student(int a, int b, int c) { pvt = a; pro = b; pub = c; } }; void frie...
7e4005b1c8782270d02bdc7f5ef931b94f837d5d
aeba2a8bf27f48cd7d39be03377b8398e452d736
fujunwei/chromium-crosswalk
/chrome/browser/bookmarks/bookmark_html_writer.cc
C++
cc
16,374
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 "chrome/browser/bookmarks/bookmark_html_writer.h" #include "base/base64.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "b...
325f5fa32d84e1ecc04d63a4c1a0877713dfad47
7a98f37ee3679f7243ae67dfc6d310a527e93387
kusuri/OpenGLExamples
/OpenGLTriangleJUCE/Source/Main.cpp
C++
cpp
4,068
no_license
/* ============================================================================== This file was auto-generated! It contains the basic startup code for a Juce application. ============================================================================== */ #include "../JuceLibraryCode/JuceHeader.h...
ae2c3c84771bad7249ebae1f7255f16460cfc738
282fb1e692daafd2a6e67063b695de99770063f0
Tomev/The_Forsaken
/Assign_Statement.hpp
C++
hpp
726
no_license
#pragma once #include "SyntaxTree.hpp" #include "Conditional_Statement.hpp" namespace compiler { class Assign_Statement : public Conditional_Statement { public: Assign_Statement(SyntaxTree* Variable, SyntaxTree* Expression) { condition.push_back(Variable); children.push_back(Expression); } virtual...
9e11b56b9c3f0137f5baf4068f41b5674e7d8520
f168d3909e63ba299019ceddddedefdb2e8cadc8
otilrac/okteta
/gui/libcolumnsview/columnsview.hpp
C++
hpp
4,444
no_license
/* This file is part of the Okteta Gui library, made within the KDE community. SPDX-FileCopyrightText: 2003, 2007-2009 Friedrich W. H. Kossebau <kossebau@kde.org> SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #ifndef OKTETA_COLUMNSVIEW_HPP #define OKTETA_COLUM...
658f1ef7ed3bfef020f2e93f422769bf6b4bb243
c7912809cd3647ecf86749f835c48d421d32ce79
Ascend/ModelZoo-PyTorch
/PyTorch/contrib/cv/semantic_segmentation/MMseg-swin/mmcv/mmcv/ops/csrc/pytorch/scatter_points.cpp
C++
cpp
5,721
permissive
# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2017 # All rights reserved. # Copyright 2022 Huawei Technologies Co., Ltd # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source ...
bca59bf902ad977b49893dc86375f94832b4c0d9
788042ad114fb3c4e9dc820725ac9701e856734a
Aharobot/SIGServer
/srcs/simserver/readconf/SSimObjBuilder.cpp
C++
cpp
4,678
no_license
/* * Modified by Okamoto on 2012-03-19 */ #include "SSimObjBuilder.h" #include "SSimObj.h" #include "ODEWorld.h" #include "Joint.h" #include "ODEObj.h" #include "Position.h" #include "Logger.h" //#define ENABLE_DUMP #include "ParserDump.h" SSimObjBuilder::SSimObjBuilder(SSimObj &o, ODEWorld &w) : m_obj(o), m_world...
097bf308d76a1c06cb6150feb869036a780cd1d8
f9ea4757a3593bd747ef8a272829d02cf8cabdd3
uve/tensorflow
/tensorflow/compiler/xla/service/name_uniquer.cc
C++
cc
3,678
permissive
/* Copyright 2017 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 ...
f88a915aef3787c94bf82b07d52d9871cfadbe00
487b5ccd5b7fa67e17d4c731381904b768e07e94
webmproject/webmdshow
/makewebm/makewebmmain.cc
C++
cc
1,272
permissive
// Copyright (c) 2010 The WebM project authors. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing p...
ba7d21d14936df9cb493a6359b6388c826d96094
a3e357057514786716f1fd31aca55b1de01d739b
massbrowser/android
/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.cc
C++
cc
723
permissive
// Copyright 2017 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 "core/layout/ng/ng_block_break_token.h" #include "core/layout/ng/ng_block_node.h" namespace blink { NGBlockBreakToken::NGBlockBreakToken( ...
47c3090fa60779160e3a9c422dc20f38d972c210
7f4b26229c19d57dd7446e866dd5ffe34955a72e
tanuj208/CP-codes
/codechef/icl18/maze.cpp
C++
cpp
1,618
no_license
#include <bits/stdc++.h> using namespace std; //#pragma GCC optimize("Ofast") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#pragma GCC optimize("unroll-loops") #define pb push_back #define mp make_pair #define sz(a) (ll)(a).size() #define all(a) a.begin(), a.end() #define ff first...
1d442822ad4a96cafb761228e0ca41c3d7fdd793
a2108b42f23e538e8b8ab4063acbe4c5cf55edbc
kc9qin/Offline
/TrkPatRec/src/KalSeedFit_module.cc
C++
cc
23,000
permissive
// // Starting with a Helix fit, perform a Least-squares fit (using the BTrk // Kalman fit, appropriately configured) to produce an initial estimate of the parmeters and // covariance for the final Kalman fit. This fit uses wire positions only, // not drift. // // Original author Dave Brown (LBNL) 31 Aug 2016 // // f...
cddecaa3a124d16a2c8cf9f5354da4460f9074ba
7cf17a6001cbbeb9f38983507c6e90ccea0ea0e4
madingo87/netica
/SLRS/RDF/Forest.cpp
C++
cpp
33,016
no_license
/*------------------------------------------------------------------------------- This file is part of Ranger. Ranger 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 3 of the License, or (at y...
13b3c37f893453bf7b186043c6a4f5db0d092153
7e9dba9d67fd11dd9724ff6df30a709d8b615728
jefrsilva/VGNGPenguinArena
/ArenaState.cpp
C++
cpp
16,398
no_license
#include "ArenaState.h" #include <iostream> using namespace std; ArenaState::ArenaState(SDL_Surface *screen, int numPlayers) { this->numPlayers = numPlayers; this->numSeals = 8; this->screen = screen; this->arena = new Arena(screen); this->gameover = false; SDL_Surface *tmp = SDL_LoadBMP("penguin.bm...
b458655ff7af1c255295b7ea9d0df2cea8a4860e
ed5d7b62844fe4181f7244a38caaf43c3682f2b0
cpp-2a/DirectXTex
/Texdiag/texdiag.cpp
C++
cpp
164,830
permissive
//-------------------------------------------------------------------------------------- // File: Texdiag.cpp // // DirectX Texture diagnostic tool // // Copyright (c) Microsoft Corporation. All rights reserved. // // http://go.microsoft.com/fwlink/?LinkId=248926 //------------------------------------------------------...
4bf01523b78177335221e6fb533f20eb64596865
24e520d0bcfae474ead0d9447cc7a244dca8f865
zenoalbisser/chromium
/v8/src/compiler/raw-machine-assembler.cc
C++
cc
12,697
permissive
// Copyright 2014 the V8 project 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 "src/compiler/raw-machine-assembler.h" #include "src/code-factory.h" #include "src/compiler/pipeline.h" #include "src/compiler/scheduler.h" n...
482772569eb84bd266a04fbdbd250c6d99105101
9cbc5973b1fd36416f7df3db513e9b453f99eac3
rohitpan/CPP
/poly.cpp
C++
cpp
689
no_license
#include <iostream> using namespace std ; class polygon { protected : int length ; int height ; public: void set_value( int a, int b) { length = a; height = b; } float area() { return 0 ;} }; class triangle: public polygon { public: triangle() {} float area(){ return 0.5*length*height ; } }; class r...
3ebae3327cf9f1e52d227bee50f2cf6aaf2ea611
ea4e9ae60f8e8226c80b1b388bfc296f935420a2
StanfordLegion/image-compositor
/test/visualization_test_2/visualization_test_2.cc
C++
cc
3,096
no_license
/* Copyright 2017 Stanford University, NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
766e4a53c039e4315e21b1de4026f7626ef4ab24
15f0f583bf964f3ef28b9f8daf867428bedf65d3
ludocosmo/wrtc-client
/third_party/asio/include/asio/detail/memory.hpp
C++
hpp
1,924
permissive
// // detail/memory.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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 ASIO_DETAIL_MEM...
aae2e553ca7d79b3be03b191584078e9646c21f6
acebad4cb339687ad548e46d566e2a4dd70e3e1c
KevLoughrey/Plunderer
/RWM_P3/ServerHelper.cpp
C++
cpp
3,886
no_license
#include "ServerHelper.h" std::string ServerHelper::dataStore; size_t writeCallback(char* buf, size_t size, size_t nmemb, void* up) { //callback must have this declaration //buf is a pointer to the data that curl has for us //size*nmemb is the size of the buffer for (int c = 0; c<size*nmem...
0c1a33b12bb154f462a87d1023b1ebcfa8babdd5
140a311f47a50b20461810f2377f57e0cb7894ad
jpeloquin/FEBio
/FEBioMix/FEPermRefIso.cpp
C++
cpp
4,271
permissive
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining ...
4df4a368f4f40ba39e7fc757e875014ebcc73909
5759261e2263806d2fa1e502034a61366d832942
mtonjes/usercode
/ZDC2015src/Analyzers/ForwardAnalyzer/src/ForwardAnalyzer.cc
C++
cc
14,568
no_license
// -*- C++ -*- // // Package: ForwardAnalyzer // Class: ForwardAnalyzer // /**\class ForwardAnalyzer ForwardAnalyzer.cc Analyzers/ForwardAnalyzer/src/ForwardAnalyzer.cc Description: A simple analyzer which can read in Reco or RAW data and makes trees with Reco information and Digi information as well for all o...
c0fc84c7935e0903094b430ed0af46d12daeae05
636adcd19d85c000c70156fd8a3b86827f011bcb
coolmihir/android_vendor_aim
/charger/healthd_board_cm.cpp
C++
cpp
11,559
permissive
/* * Copyright (C) 2016 The CyanogenMod Project * 2017 The LineageOS 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/LICE...
c440b61ef15b37d090b3ddc3ded7db39a941241e
1c121203ae09a3be15f06ae1faf7de614a7a91f3
t-saiki/aero-ros-pkg-1
/aero_startup/aero_hardware_interface/AeroControllerProto.cc
C++
cc
15,658
no_license
#include "AeroControllerProto.hh" using namespace boost::asio; using namespace aero; using namespace controller; ////////////////////////////////////////////////// SEED485Controller::SEED485Controller( const std::string& _port, uint8_t _id) : ser_(io_), verbose_(false), id_(_id) { if (_port == "") { std::...
07cf92cce8c215ec1534f6a6d8b219d5d7db27ec
fcf87f20879cecceb85f0a206ea9e1548b7a64d9
slvcoin/slvcoin
/src/qt/bitcoinunits.cpp
C++
cpp
4,334
permissive
#include "bitcoinunits.h" #include <QStringList> BitcoinUnits::BitcoinUnits(QObject *parent): QAbstractListModel(parent), unitlist(availableUnits()) { } QList<BitcoinUnits::Unit> BitcoinUnits::availableUnits() { QList<BitcoinUnits::Unit> unitlist; unitlist.append(BTC); unitlist.append(mBT...
645cdbd34e9ccc600d4cdae639ab4c910ffcaf31
03159eb7f4004d7712c03116306b371f32363359
zhangyanwei699/IBAMR
/ibtk/src/lagrangian/LMesh.cpp
C++
cpp
1,566
no_license
// --------------------------------------------------------------------- // // Copyright (c) 2014 - 2019 by the IBAMR developers // All rights reserved. // // This file is part of IBAMR. // // IBAMR is free software and is distributed under the 3-clause BSD // license. The full text of the license can be found in the f...
211aeb6a682b714175158f76dcae44dd33352cd6
46fc6a6e4d8ca6d277f02cb355ca7ca77870d179
ncsolar/hifi
/libraries/render-utils/src/Model.cpp
C++
cpp
106,864
permissive
// // Model.cpp // interface/src/renderer // // Created by Andrzej Kapolka on 10/18/13. // Copyright 2013 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include <gpu/GPUConfig.h> #include <Q...
e840a4604661cad2bc8dcd1d8c53939e978ac834
2275afe3a30c47b1e344a1136021014930bc9607
danroor/msu_cpp_spring_2020
/09/bin.cpp
C++
cpp
4,244
no_license
#include "bin.h" void bin::generate_random_file(const std::string &name, size_t sz) { using namespace bin; std::ofstream f(name, OUTFLAGS); if (!f) throw std::runtime_error(FILE_ERROR); std::random_device gen; uint64_t *buf = new uint64_t[BUFSZ_RD_WRT]; size_t n = sz / BUFSZ_RD_W...
4673afd155d856ca44eb0f5c82d6b8c77efa41c1
f637f587d0e1d1434e110ad91896de3ab675de50
gpldecha/wrapper
/wrap_object/src/wrapobject.cpp
C++
cpp
11,053
no_license
#include "wrapobject.h" #include <iostream> #include <limits> #include <boost/lexical_cast.hpp> #include <algorithm> // std::sort #include <cmath> #include "geometry.h" using namespace geo; namespace wobj{ WrapObject::WrapObject() { wboxes.clear(); bSocket = false; bWBox = false; } void WrapObjec...
b27fd00d690a281193b660f63fca7737f590f1b5
493a6ee8c5a2be3800af7bb2687de4a56b334163
davidliwei/rnaseqmut
/src/bamcallmut.cpp
C++
cpp
13,202
permissive
/* Call mutations from BAM file */ #include "bamalignfunc.h" #include "parseargs.h" #include "mutmap.h" #include "givenrefmut.h" #include "refio.h" #include <fstream> #include <sstream> #include <climits> using namespace std; /* Get the reference annotation */ RefVector RVREF; int getReferenceInfo(BamReader & read...
105743a0f5259ed74b654f0dea86f17998d576f3
cd7b3000a0a614514c482f67174dc31a1026dc22
zhenl010/zhenl010
/online_judges/pku_oj/POJ2155_MatrixChange/POJ2155_MatrixChange/main.cpp
C++
cpp
1,653
no_license
#include <cstdio> #include <cstring> #pragma warning(disable: 4996) const int ROW_NUM = 1002; const int COL_NUM = 1002; int cnts[ROW_NUM][COL_NUM] = {{}}; int row_num = ROW_NUM; int col_num = COL_NUM; int lowbit(int idx) { return idx & (-idx); } void Update(int x, int y, int delta) { int z = y; while (x < r...
25abbe407bd40aaf3c15782129690afdb97362d2
0790afe3459939353197e5f14c33f827b2c2d13a
CMS-HIN-dilepton/cmssw
/IOPool/Output/src/PoolOutputModule.cc
C++
cc
24,843
permissive
#include "IOPool/Output/interface/PoolOutputModule.h" #include "IOPool/Output/src/RootOutputFile.h" #include "FWCore/Framework/interface/ConstProductRegistry.h" #include "FWCore/Framework/interface/EventForOutput.h" #include "FWCore/Framework/interface/LuminosityBlockForOutput.h" #include "FWCore/Framework/interface/...
4d3deecd7cad99a49a7966dee2210e4d742f12ec
a8a772108fffb0710edd03db0301d1394206bad9
scsides/ISIS3
/isis/src/base/apps/cam2map/main.cpp
C++
cpp
5,085
permissive
#define GUIHELPERS #include "Isis.h" #include "cam2map.h" #include "Camera.h" #include "IException.h" #include "IString.h" #include "ProcessRubberSheet.h" #include "ProjectionFactory.h" #include "PushFrameCameraDetectorMap.h" #include "Pvl.h" #include "Target.h" #include "TProjection.h" using namespace std; using na...
a68e95751b197132a9023d952f9df8c28675e5f6
7b045b350bcd06b28ac5a6101b7efe3af00b023c
Zax37/WapMap
/WapMap/states/editing_ww.cpp
C++
cpp
156,568
permissive
#include "editing_ww.h" #include "loadmap.h" #include "../globals.h" #include "../version.h" #include "../../shared/commonFunc.h" #include "../langID.h" #include "../returncodes.h" #include "../cObjectUserData.h" #include "dialog.h" #include <cmath> #include "../cAppMenu.h" #include "../../shared/gcnWidgets/wComboButto...
9e4a5cc711958f5ffd5f4eec273527707bdb7889
f2043639b80b9c760c878f5783e4b47a31be9dab
ucd-plse/mpi-error-prop
/src/wpds/Source/wali/Key.cpp
C++
cpp
2,138
permissive
/*! * @author Nicholas Kidd */ #include <memory> #include "wali/Key.hpp" #include "wali/KeySource.hpp" #include "wali/KeySpace.hpp" namespace wali { static void initEmptyKeySpace(KeySpace * keySpace) { assert(keySpace->size() == 0); // WPDS_EPSILON == 0 == "*" Key epsilon = keySpace->getKey("*"); ...
7e6929234325cf043003cdee01cf09f88b5a05ed
cab8446018149046e493dea58997cb233117e7d3
PlayingWColor/CppTesting
/CppTesting/IFOF.cpp
C++
cpp
7,852
permissive
#include "CppTesting.h" bool Save(std::string file_name, std::array<std::array<int, 8>, 8>& world, std::array<bool, 32>& pagesOwned, std::array<int, 32>& inventory, player& p, bool map, bool recipeBook, bool bookComplete, bool readTitle, bool key, std::array<std::array<bool, 8>, 8>& isMapped) { if (file_name.length()...
98763211e67451cc99d74acf1d7b54211c68b3fb
b4676f77ef11ac01bc35e0f48ca6ed86b076f33d
lifunudt/pq
/build/guilib/src/__/include/rtabmap/gui/moc_DataRecorder.cxx
C++
cxx
3,890
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'DataRecorder.h' ** ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6) ** ** WARNING! All changes made in this file will be lost! ********************************************************...
a072ac2b4a0efed9ea2cb2626ed88e458f158514
963249c5ca934db9f539bf6f3aef02f7728efe94
sawich/samp-streamer-plugin
/src/natives/data-manipulation.cpp
C++
cpp
5,180
permissive
/* * Copyright (C) 2015 Incognito * * 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...
c5f26ded2cb983a9885fbad12b3fe52be66a4f87
93c9bab14470e3daf4eaca4f82690993c5d83823
BPI-SINOVOIP/BPI-H3-New-Android7
/android/external/deqp/modules/gles31/functional/es31fTextureFormatTests.cpp
C++
cpp
21,508
permissive
/*------------------------------------------------------------------------- * drawElements Quality Program OpenGL ES 3.1 Module * ------------------------------------------------- * * Copyright 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not ...
53d05a5f518ebd39e8668d8f8246884f3595cc67
e8d5aaba6cf8db3ba441bfb03a175c5feb339fd4
uvsq-versailles/Licence3_Informatique
/Semestre_5/IN505/TD/C++/td1/tdexo6/exo6.cc
C++
cc
817
permissive
#include <iostream> #include <cstring> #include <cmath> #include "cstring.h" using namespace std; int main() { CString s1( "toto" ); CString s2( 'q'); CString s3; s1.afficheMyString(); s2.afficheMyString(); cout << "nbrChaines: " << CString::getNbrChaines() << endl ; //afficher le nombre de chaines créées s3 ...
360800337f770b14b73f3610adf6a45299c92b85
d31eb442d898629d610972633a74228b8a261e1a
oconnellamethyst/csci1113
/C_C++/examples/default2.cpp
C++
cpp
848
no_license
/* FILE: default2.cpp */ #include <iostream> using namespace std; struct COMPLEX{ double Re; double Im; }; COMPLEX Mult(COMPLEX a, COMPLEX b); void print(COMPLEX c); void init(COMPLEX *c,double r, double im = 0); int main( ) { COMPLEX c1, c2, cresult; init(&c1,2,3); init(&c2,3); cresult ...
eadebf2c39dd0fe16cb7d451a1ce5ca9c071a0e3
f72d5768056d0f1c6f58c1b3838983f069c915d9
henry4k/sparkplug-imageio
/Source/Tests/Catch/include/internal/catch_runner_impl.hpp
C++
hpp
10,787
permissive
/* * Created by Phil on 22/10/2010. * Copyright 2010 Two Blue Cubes Ltd. All rights reserved. * * 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 TWOBLUECUBES_CATCH_RUNNER_IMPL_HPP_INCLUDED #define...
74a2c7881d71102d58bad16796412f68047a9f44
4cd88483a47cd8adb437d95b79e2bbca81f8d9b2
uvbs/FullSource
/Source/Source/KG3DEngine/KG3DEngine/KG3DFileLoader.cpp
C++
cpp
13,170
permissive
//////////////////////////////////////////////////////////////////////////////// // // FileName : KG3DFileLoader.cpp // Version : 1.0 // Creator : Wu Caizhong // Comment : // //////////////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "KG3DFileLoader...
c4dbb46221072d31256ba8338a841cbe839de44a
e70dac28cb49341e49ca4d1416c554d8f65e9260
NathanAlanBeeby/PrisonGame
/PrisonEscapeGame/PrisonEscapeGame/Prisoner.cpp
C++
cpp
11,212
no_license
#include "Prisoner.h" #include <iostream> #include "Player.h" std::string prisonerfilename = "file.txt"; int prisonerNumber; std::stringstream pss; std::string ps; std::string prisonerPath; enum PrisonerDir { Down, Right, Up, Left, Idle }; std::vector<PrisonerDir> lastPrisonerPosition; std::vector<sf::Vector2i>Priso...
f9a1d3dd4929bd72e137b8dca2afed2ceae05442
1df316291d3a7a3eaff5148acd4ec51890fec850
chkob/forked-blaze
/blazetest/src/mathtest/dmatdmatschur/U3x3aU3x3b.cpp
C++
cpp
3,788
permissive
//================================================================================================= /*! // \file src/mathtest/dmatdmatschur/U3x3aU3x3b.cpp // \brief Source file for the U3x3aU3x3b dense matrix/dense matrix Schur product math test // // Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved // ...
cf095c286332fe4176eae07f22948cd6e76689d1
9b882b9f3c08313e4324e5037d93e3b13d60e590
digint/openmptl-reg-arm-cortex
/arm/cortex/Freescale/MKL28T7_CORE1/include/arch/reg/dmamux1.hpp
C++
hpp
1,873
no_license
/* * OpenMPTL - C++ Microprocessor Template Library * * This program is a derivative representation of a CMSIS System View * Description (SVD) file, and is subject to the corresponding license * (see "Freescale CMSIS-SVD License Agreement.pdf" in the parent directory). * * This program is distributed in the hope...
f6b929f4b7ff064cb2f7c2fca3e00be60ebb1a4c
fbb33bb4be88adc4e175928f65d2160a86514282
missingjs/mustard
/dex/7/42.sample.cpp
C++
cpp
1,792
no_license
#include "42.def.h" #include <list> #include <vector> #include <stack> struct _dij { int v, w; _dij(int v=0, int w=0) : v(v), w(w) {} }; typedef typename std::list<_dij>::iterator it_t; it_t _find_min(std::list<_dij> & cost) { it_t min = cost.begin(), i = cost.begin(); for (++i; i != cost...
309466963a2888c276a2551d15e7711b655acce4
8ec7fa91a9d726b670076d7bca24a86098b604aa
hoangtuanhedspi/hermes
/lib/VM/JSLib/Math.cpp
C++
cpp
19,133
permissive
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the LICENSE * file in the root directory of this source tree. */ //===----------------------------------------------------------------------===// /// \file /// ES5.1 15.8 Populate the Math object. ...
a2c79c7ae88dcbd8aa16acee4afe172541ff5e0b
ea67a40fc7af33ccacb429851c1bee9f7da35f58
a-pramanik37/Solved-problems-of-UVA
/10041...bal.cpp
C++
cpp
746
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> using namespace std; long long a[100000]; int main() { long long s, t, i, j, min, p, sum; scanf("%lld", &t); while(t--){ scanf("%lld", &s); for(i = 1; i<=s; i++){ ...
9a85d71f82ea9e88ceb858277ea06f6c86fe68fd
f892fc54f2b544e34c33df5ed3c037dcdd7a5dc0
ThomasRgl/compilation
/lab4/dragon-tiger/src/ast/ast_eval.cc
C++
cc
3,291
no_license
#include "ast_eval.hh" #include "../utils/errors.hh" namespace ast { int32_t ASTEval::visit(const IntegerLiteral &literal) { return literal.value; } int32_t ASTEval::visit(const StringLiteral &literal) { utils::error("StringLiterals are not supported"); return -1; } int32_t ASTEval::visit(const Binar...
354c2dffa5f586267b70c47d1b574045c48d7c48
48c4236b0257f4e91623b0558078e7c58b85280b
Luismeza1/PED0319-LAAM-00311319
/Laboratorio 01/HW-04.cpp
C++
cpp
1,544
no_license
#include <iostream> //Entrada y salida de datos #include <cstdlib> //Librería necesaria para usar rand #include <time.h> //Librería necesaria para usar rand using namespace std; int mostrarArreglo(int a[15], int tam); //Prototipo de la funcion para mostrar arreglo void mostrarMult(int a[15]); //Prototipo de la f...
63ef11d3f6fcd0361ddcbe2d5c30eb4525349869
ad0187661fc493650b5107b6ed7f7af2fe037033
AdrianVader/OpenGL-first-practices
/Práctica 3/freeglut project 3D/freeglut project 3D/main.cpp
C++
cpp
6,666
no_license
#include <Windows.h> #include <gl/GL.h> #include <gl/GLU.h> #include <GL/freeglut.h> #include <iostream> #include "Satelite.h" #include "CirculoEspiral.h" #include "Panel.h" using namespace std; void drawPlanetWithSatellite(); // Freeglut parameters // Flag telling us to keep processing events // bool conti...
33eafaca53c87c954e9d89aa89e53edbbc77aba9
0813aade5ac5f6c7c6219ae6337673bed3f52a75
sburavtsov/BeaverTetris
/BeaverTetris/proj.win32/GameSoundDataSource.cpp
C++
cpp
690
no_license
#include "GameSoundDataSource.h" #include "GameFileExtensionMaker.h" using namespace std; const string sound1Name = string("StartGraphics"); const string sound2Name = string("StartGraphics"); GameSoundDataSource::GameSoundDataSource(void) { string graphicKeys[] = {sound1Name,sound2Name}; _soundsElementsCount = s...
a8f00b0c08e95e3db41fbe54d06d158229f62d2f
681bfdb08a7a4b56a7ec6b07acdc632980ea102a
manoelstilpen/jobshopscheduling
/includes/Constructives/ASPRT.hpp
C++
hpp
308
permissive
#ifndef ASPRT_HPP #define ASPRT_HPP #include "Commons.hpp" #include "Constructive.hpp" using namespace twtjssp; class ASPRT : public Constructive { public: explicit ASPRT(double _alpha = 0); void print_method_informations() override; float define_priority(Schedule op) override; }; #endif
68a61f03dd09d76215e2715a5b80f80deee6d912
5d3b9fe7dc43f687d99504dca34eeafb15686e74
gwli/SkookumScript-UnrealEngine
/Source/AgogCore/Public/AgogCore/AChecksum.hpp
C++
hpp
3,460
no_license
//======================================================================================= // Agog Labs C++ library. // Copyright (c) 2008 Agog Labs Inc., // All rights reserved. // // Checksum declaration header - generates checksums using the CRC (cyclic // redundancy check) algorithm. // Author(s): C...
cdd1cd26dbcf287ecd0ad65df470d72658e7cd2e
f979378b004c33d4402610d507022a1b3fbd0602
PMArkive/TWiLightMenu
/manual/arm9/source/graphics/graphics.cpp
C++
cpp
4,813
permissive
/*----------------------------------------------------------------- Copyright (C) 2015 Matthew Scholefield 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 (a...
91b9f28c6a08ec33f54850dec7e9a73d7d7567cb
9eea0c7fe36eaafae45886b5bc53873e346c6a6d
JoKaWare/chromium
/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc
C++
cc
6,413
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 "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" #include "base/macros.h" #include "base/memory/ptr_util.h" #include "chrome/br...
64ab6cb7d62d6a3360af2489572193dc65690e4d
0e2973542f4e1dbc35a36ef9f71339122fd64b66
drun283/360VidUE4
/VR360VidTemplate/Plugins/FMODStudio/Source/FMODStudio/Private/FMODVCA.cpp
C++
cpp
538
no_license
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2020. #include "FMODVCA.h" #include "FMODStudioModule.h" UFMODVCA::UFMODVCA(const FObjectInitializer &ObjectInitializer) : Super(ObjectInitializer) { } /** Get tags to show in content view */ void UFMODVCA::GetAssetRegistryTags(TArray<FAssetRegis...
0374aa970ceaee95e05b85d817dbcdf0ac230d87
42dfd0b4e823306a19b67ba7814cf2ef98aff089
MrMann96/Vending-Machine-8
/Vending Machine 8/main.cpp
C++
cpp
220
no_license
#include <iostream> #include <stdlib.h> #include <fstream> #include <string> #include "vend.h" using namespace std; void main(){ cout << "Alex Mann 1st hour" << endl << endl; vend a; a.run(); system("pause"); }
35004b49e099770df2ca4d58c3113c134589ce55
b7d2b498410a68ef22a0f94ebf9d11f33935332f
wanghongsheng01/framework_enflame
/oneflow_enflame-main/oneflow/user/kernels/identity_kernel.cpp
C++
cpp
2,619
permissive
/* Copyright 2020 The OneFlow 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 agre...
5420e50304ef2f18fb407899aacb6170b4c961c3
835de8287202a47730b3aa70ec9f95f65206977f
adam-urbanczyk/NonOpt
/NonOpt/src/NonOptQPSolver.hpp
C++
hpp
6,917
permissive
// Copyright (C) 2019 Frank E. Curtis // // This code is published under the MIT License. // // Author(s) : Frank E. Curtis /** * * Primal/dual QP solver for pair of the form * * (PRIMAL) max_d (max_i b_i + g_i'*d) + 0.5*d'*H*d * s.t. ||d||_inf <= r * * and, with G = [g_1 ... g_m] and W = inv(H), * *...
ec5c281c32b2d8472c1dc8a174b2ca61b1feca33
67320ced441c2376cf7ff52047736c27eec07529
saikrishna17394/Code
/forces_code/con277.5/a.cpp
C++
cpp
724
no_license
#include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include <cstring> #include <set> #include <stack> #include <vector> #include <map> #include <list> #include <queue> #define lli long long int #define ii pair<int,int> #define mod 1000000007 #define inf 999999999 #define lim 10000000 using na...
99d3e0e9e0fccc03d157b5e3c6d1655f6f54b256
b749efc86c996561bbc0199f48ab5afbaaff005c
Tanavya/Competitive-Programming
/DynamicProgramming/CF81E_Pairs.cpp
C++
cpp
5,621
no_license
#include <iostream> #include <vector> #include <algorithm> #include <climits> #include <stdio.h> #include <queue> #include <set> #include <list> #include <cmath> #include <assert.h> #include <bitset> #include <cstring> #include <map> #include <iomanip> #include <stack> #include <sstream> #define all(x) x.begin(), x.en...
e6869730e911d6c26d2143b025d8311f5160b237
d03459d29b44c549a3ecc9ad69442cfd496a6062
yukarinoki/programing_contests
/minpro/c.cpp
C++
cpp
1,370
no_license
#include <iostream> #include <sstream> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <cassert> using namespace std; #define all(c) (c).begin(), ...
5856597abad8a52cc108d97a7c182cd88a9d1d95
a8599dc2a94da6bf04ba5330a4e29d13bc043c7f
apple/foundationdb
/bindings/c/test/apitester/TesterWatchAndWaitWorkload.cpp
C++
cpp
3,162
permissive
/* * TesterWatchAndWaitWorkload.cpp * * This source file is part of the FoundationDB open source project * * Copyright 2013-2022 Apple Inc. and the FoundationDB project authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
9309d0295e7392bda4caaeecf8260781826e8134
aaa04ff02ccaf3c9642f66325f074160766df079
jagdeepkaur346/Arrays
/arrays/Computing an alternation.cpp
C++
cpp
390
no_license
/* Write a program that takes an array A of n numbers and rearranges A's elements to get a new array B having the property that B[0]<= B[1] >= B[2] <= B[3] >= B[4]....... */ vector<int> alteration(vector<int> &A) { sort(A.begin(), A.end()); int i; for(i=1; i<A.size()-1; i+=2) { int temp; te...
a5c21c1b4f116d363d85ec13def314d48ef04ac3
9bd9d94b32d911061b87e412595a32cecaf6bb3d
tuannm-1876/algorithm-vi
/cây nhị phân/CayNhiPhanTimKiem_mang.cpp
C++
cpp
4,038
permissive
#include <iostream> #include <queue> #include <stack> #define null 2000000000 #define MAX 100005 using namespace std; class BinaryTree{ public: int root[MAX]; void init(){ for(int i=0;i<MAX;i++){ root[i]=null; } } int height(int p){ if(root[p]==null) return 0; return max(heigh...
156bef9aecf1e3f1df6ed5ed17898c831ebb6e5c
063c5aeef4ef63f09ef584e277eab7cc91fa3b30
recampbell/nt2
/modules/core/linalg/include/nt2/toolbox/linalg/details/lapack/mqr.hpp
C++
hpp
10,822
permissive
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
8ab3ac2e7d45d001b9404de376f53cc0ec13b474
0aecf9c727a7ae532c7200e4c941191392c69d9a
marcelomata/competitive-programming-1
/Codeforces/232A_On_Segments_Own_Points.cpp
C++
cpp
478
no_license
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<cmath> #define MAX 205 #define INF 2000000000 using namespace std; int l1[105], r1[105]; int main(){ int n; cin >> n; int l, r; cin >> l >> r; int ans = r - l; for(int i = 1; i < n; ++i) cin >> l1[i] >> r1[i]; for(int ...
37688b89201f8b8f9602b003da4b3be07a4f5f7a
a23edc299fb6ce786e436869005a9ba286470cfb
jamiepg1/gearbox
/gearbox/t/core/Errors.t.cc
C++
cc
13,679
permissive
// Copyright (c) 2012, Yahoo! Inc. All rights reserved. // Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. #include <tap/trivial.h> #include <gearbox/core/Errors.h> using namespace Gearbox; int main() { TEST_START(156); log_init("./unit.conf"); THROWS( gbTHROW...
20b0ce2762d3fa19264e539aebd9bffc8a9e21f0
9c54c73f254a69ca890c11be81327ce8d5f52b10
NovikovAAA/SciImager
/Native/PropertyProcessors/ImagePropertyProcessor/ImagePropertyProcessor.cpp
C++
cpp
954
no_license
// // ImagePropertyProcessor.cpp // VisualIPCV // // Created by Артём Новиков on 10.06.2020. // #include "ImagePropertyProcessor.hpp" #include "ProcessorManager.hpp" #include <opencv2/core.hpp> #include <opencv2/imgcodecs.hpp> #include <string> using namespace cv; using namespace std; bool imagePropertyProcessorR...
0e465c01747b27bd8c7a7a5595b91e851bd226ab
41fe1d821e360a50e0fb3b170b345cd879d636d8
andresacosta30/LABOS-FP
/Labo 6/ejercico6.cpp
C++
cpp
593
no_license
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int n; cout<<"ingresa la cantidad de numeros: "<<endl; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cout<<"ingresa numeros: "; cin>>arr[i]; } sort(arr,arr+n); int m=arr[n-1]; m++; int ...
3f1b3c43c6637be42cbe82d5bf9d07a391396df7
bab812cea5dfbab68df1d635347fb497bd4d8ed5
SombreLoup/Enseignement
/Divers/LancerRayon/src/Spheres.cpp
C++
cpp
1,663
no_license
//--------------------------------------------------------------------------- #include "Spheres.h" #include "MacroMath.h" //--------------------------------------------------------------------------- Spheres::Spheres() : C(), R(0), M() {} Spheres::Spheres(const Spheres& S) : C(S.C), R(S.R), ...
32097bffdc81af03abefe5879948b541a61ba85a
9e416bbd46794e400b8894d6592404639ac98f94
sicilian-lizard/corvusskk
/imcrvtip/KeyHandler.cpp
C++
cpp
11,943
permissive
 #include "configxml.h" #include "imcrvtip.h" #include "EditSession.h" #include "TextService.h" class CKeyHandlerEditSession : public CEditSessionBase { public: CKeyHandlerEditSession(CTextService *pTextService, ITfContext *pContext, WPARAM wParam, BYTE bSf) : CEditSessionBase(pTextService, pContext) { ...
13d9420559b28777cb9cd767520df875be301d1d
e083c6eeef7ae78b20e98977de03867b81ea636d
Koltharius/UGR_Metodologia_Programacion
/Practica_02/src/ejemplo_sumatoria.cpp
C++
cpp
1,109
no_license
#include <fstream> #include <iostream> using namespace std; void Avanzar(std::istream& is) { while (isspace(is.peek()) || is.peek()=='#') { if (is.peek()=='#') is.ignore(1024,'\n'); // Suponemos una línea tiene menos de 1024 else is.ignore(); } } double Sumatoria(istream& is) { double s=0, dato; ...
6c4a11f0aac4754f38867df35f9153052aaf94b0
81a40e2cdfc08e7de3851026e18bae6d2c627ce6
RolfKH/Common
/TI_aes_128.cpp
C++
cpp
9,275
no_license
/* --COPYRIGHT--,BSD * Copyright (c) 2011, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copy...
d932dabb9b8e0fc5a53e18faa2165198e7f58b13
d904752a31021ca3e76b273e41e31b97b6f2bfca
chichchic/algorithmPrac
/BaekJoon/2022/5.May/220513_16435.cpp
C++
cpp
456
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { // freopen("../../input.txt", "r", stdin); ios_base::sync_with_stdio(0); cin.tie(0); int n, l; cin >> n >> l; vector<int> fruit(n); for (int i = 0; i < n; i++) { cin >> fruit[i]; } sort(fruit.begin(), ...
49873f80ed01426885c666346e49644d5d8f683e
eb92ea12d6d7e7a6e36103e90f92ce1ad706ff3f
stlsoft/Pantheios
/test/scratch/test.scratch.fe.WindowsRegistry/test.scratch.fe.WindowsRegistry.cpp
C++
cpp
2,916
permissive
/* ///////////////////////////////////////////////////////////////////////// * File: test/scratch/test.scratch.fe.WindowsRegistry/test.scratch.fe.WindowsRegistry.cpp * * Purpose: Implementation file for the test.scratch.fe.WindowsRegistry project. * * Created: 28th October 2007 * Updated: 27th ...
c3a70158ba2bc5b188bf17b54f03edb55c0f033e
ad8e4b357b81b169a7c1895577d747557a6253a9
SergiosLen/netdiffuseR
/src/rgraph_er.cpp
C++
cpp
1,866
no_license
/******************************************************************************* rand_graph.cpp: FUNCTIONS FOR RANDOM GRAPH GENERATION created: nov 2, 2015 copyright: MIT + LICENCE file This file contains the following functions: - adopt_mat_cpp: Creates an adoption matrix of size nxT - edgelist_to_adjmat_cpp: ...
cbbd2d213458def03e55f4aaad4abe3a033df436
aa4689a8b19544bdd7887b1ee05eed865707a78c
hkeaylinton/UVa-problems
/UVa 12468.cpp
C++
cpp
281
no_license
#include <iostream> #include <algorithm> using namespace std; int main() { int ch1, ch2; cin >> ch1 >> ch2; while (ch1 != -1) { cout << min(abs(ch1 - ch2), min(abs(ch2 - (ch1 + 100)), abs(ch1 - (ch2 + 100)))) << endl; cin >> ch1 >> ch2; } return 0; }
9dc5b3f945cb2011e9b008ea175ab738411660cf
c6a6052cbb0ba4856f1f986fdff9bc2167d81c28
SymumAust/Files-in-C
/DTOS.cpp
C++
cpp
529
no_license
#include<bits/stdc++.h> using namespace std; int main(int argc, char *argv[]){ argv[1]="My_File.txt"; if(argc!=1){ cout<<"USAGE: OUTPUT<My_File.txt>\n"; return 1; } ifstream in (argv[1]); if(!in){ cout<<"Cannot open output file.\n"; return 1; } ...
5e7cd027d93e3f9566a9c1155af012912f9db169
a3d2906830676edfb312cd82b7f390b42aa917c8
slipperyseal/zero
/core/debug.cpp
C++
cpp
3,620
permissive
// // zero - pre-emptive multitasking kernel for AVR // // Techno Cosmic Research Institute Dirk Mahoney dirk@tcri.com.au // Catchpole Robotics Christian Catchpole christian@catchpole.net // /// @file /// @brief Contains functions for debugging purposes #include <stdlib.h> #include...
7f98f7ecdbf54ab2d1a9c2343387affd914205c0
a4d1b2ee0a98afad3730925bf183b96491c2615b
hieutrtr/CMDBv2
/Processor/DepartmentInfoSynchronizationProcessor.cpp
C++
cpp
2,993
no_license
#include "DepartmentInfoSynchronizationProcessor.h" #include "../Controller/CollectorController.h" #include "../Controller/DepartmentController.h" #include "../Controller/MailboxController.h" #include "../Model/CollectorModel.h" #include "../Synchronization/MISDepartmentSynchronization.h" #include "../Common/ExternalCo...
a261a7a947ace363e3e3e937fc6fcae5098bc417
b462d19088efc1383b506d77ca3a7b4c2d2ea946
HelinaBerhane/Project
/2_scalar_exponential/exponentials.cpp
C++
cpp
2,544
permissive
#include <iostream> // cout #include <stdlib.h> // srand, rand #include <time.h> // time using namespace std; void random_seed(){ srand(time(NULL)); } int ran(int x){ return rand() % x; } int fact(int x){ if(x<=1){ return 1; }else{ return x*fact(x-1); } } long double powers(lon...
57c9bb48160a966402401fc02b833b7a8dd8496a
4693e9cfa0861267115738d05d016360d7d0402f
labeo0/Cpp
/chapter1/1.4.2.1/1.4.2.1/code.cpp
C++
cpp
644
no_license
#include <iostream> #include <iomanip> #include <string> int main() { float v=2; float result = (v + 1) * 2; std::cout << "result: " << result << " expected result : 6" << std::endl; result = (v + 1 )* (v + 2) * 2; std::cout << "result: " << result << " expected result : 24" << std::endl; result = (v - 1 )* 2 +...
7c52c4ca6a57dcd3d80f30c789c70c6a70821704
ffef9a3ca1806d4f33183be45e55224f7a078c6d
guiqinhui/flamingo
/flamingoserver/base/FileUtil.cpp
C++
cpp
3,069
no_license
#include "FileUtil.h" #include <assert.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <sys/stat.h> #include <unistd.h> #include <inttypes.h> FileUtil::AppendFile::AppendFile(const string& filename) : fp_(::fopen(filename.c_str(), "ae")), // 'e' for O_CLOEXEC writtenBytes_(0) { assert(fp_); :...
8d44dae7c2603a27c05dd291c6d90863035455a6
3ed607c36d8ce9e1c8f255250f5a934db61c521c
green-fox-academy/RapcsakAndi
/week-05/day-02/garden/Garden.cpp
C++
cpp
708
no_license
#include "Garden.h" Garden::Garden(){} void Garden::checkThirstyPlants(){ int sum = 0; for (int i = 0; i <_plants.size() ; ++i) { if(_plants[i]->getNeedsWater()) sum += 1; } _needsWater = sum; } void Garden::watering(float waterAmount){ checkThirstyPlants(); float equalAmount =...
b1f817340d449737d01b2c48f4f881f1df1f1c75
f8bf34bac37951034f0059086ebcf4f18d25f37e
nasa03/cando
/src/chem/structureComparer.cc
C++
cc
4,900
no_license
/* File: structureComparer.cc */ /* Open Source License Copyright (c) 2016, Christian E. Schafmeister 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 limi...
e9753a8dd1781b0b3182d86a14a78683a7207704
a5b586771f67e10f8c924d6f65bd8cd9ad9c8a5f
pylgrym/numoria
/src/rnd.cpp
C++
cpp
3,701
no_license
/* source/rnd.c: random number generator Copyright (C) 1989-2008 James E. Wilson, Robert A. Koeneke, David J. Grabiner This file is part of Umoria. Umoria is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published...
4c126bdf7281ab2b1ea4602cffb786064fa8f500
cc296f5a9a5264dff52dd41f0a7963c308123759
trumanz/algorithms
/cpp-algo/src/utility/CppConsoleTable.hpp
C++
hpp
18,558
no_license
/* ========================= Cpp Console Table | Cpp | Console | Table | version 1.3.0 ========================= https://github.com/DenisSamilton/CppConsoleTable Licensed under the MIT License <http://opensource.org/licenses/MIT>. Copyright (c) 2019 DenisSamilton Permission is hereby granted, free of ...
64f6077d338768d118f9f617b237c700144583f8
8456ce9d86d7b4253e0f5c86f960de13483d5133
Zovube/Tasks-solutions
/Project_Euler/009/sol.cpp
C++
cpp
1,265
permissive
// simple Maths #include<bits/stdc++.h> using namespace std; #define PI acos(-1) #define fi first #define se second #define pb push_back #define sz(a) (int)(a).size() #define all(c) (c).begin(), (c).end() #define TIMESTAMP fprintf(stderr, "Execution time: %.3lf s.\n", 1.0*clock()/CLOCKS...
ec41245a3ad665f97831a7de6668ff7cb399201f
8612b5882576e5f3dea4c376be8512f3ce75638c
Admiraldesvl/Desvl-Hackerrank
/Deque-STL.cpp
C++
cpp
1,411
no_license
#include <deque> #include <iostream> #include <algorithm> using namespace std; void printKMax(int arr[], int n, int k) { deque<int> dQ; int i = 0; // Build the first subarray. for (; i<k; i++) { dQ.push_back(arr[i]); } // max_out will be the max element of each subarray. int max_...
e66be307380161b3d50f15a9c20e8a17c1ba0ae6
c3ca16b8424cc9294e27a1cc2effb807a5d102ad
r00tk1ts/chromium
/chromeos/components/tether/ble_connection_manager_unittest.cc
C++
cc
66,212
permissive
// Copyright 2016 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 "chromeos/components/tether/ble_connection_manager.h" #include "base/memory/ptr_util.h" #include "base/test/histogram_tester.h" #include "base/t...