text
string
size
int64
token_count
int64
#include <service/ClockSys.h> using namespace UTILSTD; def_HttpEntry(API_Clock , req) { Json j; // used for response std::string_view action { req.queryParam("action") }; CONSOLE_LOG(true,"* api/clock called [action:%s]\n",action.data()); /* Start listening server broadcast Notification */ if (action == "c") {...
1,689
718
/** * This is the C++ adaptation and derivative work of Myia (https://github.com/mila-iqia/myia/). * * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the ...
31,374
10,600
#include <string.h> #include <math.h> #include <vector> #include "mex.h" #include "util.h" using namespace std; /* Main hidden CRF herding function. * * Function call: * * [pred_test_T, model] = hidden_crf_herding(train_X, train_T, test_X, test_T, type, no_hidden, average_models, base_eta, rho, max_iter, burni...
22,904
8,858
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
1,106
342
// // FILE NAME: CQCVoice_BTSimpleCmdNodes_.hpp // // AUTHOR: Dean Roddey // // CREATED: 01/08/2017 // // COPYRIGHT: Charmed Quark Systems, Ltd @ 2020 // // This software is copyrighted by 'Charmed Quark Systems, Ltd' and // the author (Dean Roddey.) It is licensed under the MIT Open Source // license: // // http...
5,934
1,446
#include <iostream> #include "QueryCache.h" int main(int argc, char** argv) { QueryCache *qc=new QueryCache(); qc->putToCache("query","yes"); qc->putToCache("query1","yes"); qc->putToCache("query2","yes"); qc->putToCache("query3","yes"); qc->putToCache("query4","yes"); qc->putToCache(...
634
264
/** BFDP Data Tristate Definitions Copyright 2019, Daniel Kristensen, Garmin Ltd, or its subsidiaries. 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 sourc...
2,750
864
/* 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...
5,115
1,832
#include "domains/interval.h" #include "utils/constants.h" #include <limits> #include <iostream> #include <cassert> #include <cmath> Interval::Interval(double inf, double sup) { assert(inf <= sup + Constants::EPS); if (inf > sup) { std::swap(inf, sup); } this->inf = inf; this->sup = sup; } ...
4,671
1,723
#include <unistd.h> #include <cassert> #include <iostream> #include <thread> #include <functional> #include "number_statemachine.h" #include "raft/raft.h" #include "raft/server.h" using namespace sharkstore; using namespace sharkstore::raft; static const size_t kNodeNum = 5; std::condition_variable g_cv; std::mutex...
3,092
1,355
/* * * Copyright (c) 2020 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
18,398
5,619
// // Copyright (c) 2009 Rutger ter Borg // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_NUMERIC_BINDINGS_UBLAS_DETAIL_BASIC_UBLAS_ADAPTOR_HPP #define BOOST_NUMERIC_BINDINGS_UBLAS_DETAIL_BASI...
1,632
606
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/content_settings/core/browser/content_settings_utils.h" #include <stddef.h> #include <string> #include "base/macros.h" #includ...
3,048
983
// // Created by Administrator on 2021/3/3. // #include <jni.h> extern "C" { #include "include/libavcodec/avcodec.h" #include "include/libavfilter/avfilter.h" #include "include/libavformat/avformat.h" #include "include/libavutil/avutil.h" #include "include/libswresample/swresample.h" #include "include/libswscale/swsca...
530
206
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Brain.hpp :+: :+: :+: ...
1,226
380
/* * Copyright © 2010 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, pub...
40,810
16,791
#include <spmdfy/CommandLineOpts.hpp> llvm::cl::OptionCategory spmdfy_options("spmdfy"); llvm::cl::opt<std::string> output_filename("o", llvm::cl::desc("Specify Ouput Filename"), llvm::cl::value_desc("filename"), llvm::cl::cat(spmdfy_options)); llvm::cl::opt<bool> verb...
1,017
361
/*++ Copyright (c) 1995 Microsoft Corporation Module Name: quser.cxx Abstract: Abstruct class CUserQueue members. Author: Erez Haba (erezh) 1-Aug-95 Shai Kariv (shaik) 8-May-2000 Environment: Kernel mode Revision History: --*/ #include "internal.h" #include <mqf...
1,976
713
/*========================================================================= Program: ParaView Module: vtkDataTabulator.cxx Copyright (c) Kitware, Inc. All rights reserved. See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. This software is distributed WITHOUT ANY WARRAN...
9,077
2,824
/* * Copyright (C) 2011-2016 Intel Corporation. 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 copyright * notice, this li...
9,432
3,427
/* * * Copyright 2015 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
20,689
7,518
#include <atomic> #include <memory> template<typename T> class lock_free_stack { private: struct node; struct counted_node_ptr { int external_count; node* ptr; }; struct node { std::shared_ptr<T> data; std::atomic<int> internal_count; counted_node_ptr nex...
2,507
744
// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <config.h> #include <gtest/gtest.h> ...
4,936
1,547
//======================================================================= // Copyright Baptiste Wicht 2013-2018. // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://www.opensource.org/licenses/MIT) //=================================================================...
2,101
632
/* * Copyright (C) 2018 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...
6,356
2,358
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus' Graphical User Interface // Copyright (C) 2012-2022 Bruno Van de Velde (vdv_b@tgui.eu) // // This software is provided 'as-is', without any express or implied warranty. /...
8,335
2,310
#include <cstdint> #include <utility> #include <iterator> #include <type_traits> #include <gtest/gtest.h> #include <entt/entity/sparse_set.hpp> #include <entt/entity/fwd.hpp> struct empty_type {}; struct boxed_int { int value; }; TEST(SparseSet, Functionalities) { entt::sparse_set<entt::entity> set; set.rese...
18,960
8,382
#include <pbcopper/align/AlignConfig.h> namespace PacBio { namespace Align { AlignParams AlignParams::Default() { return {0, -1, -1, -1}; } AlignConfig AlignConfig::Default() { return {AlignParams::Default(), AlignMode::GLOBAL}; } } // namespace Align } // namespace PacBio
280
100
#ifndef RAYLIB_CPP_INCLUDE_SHADER_HPP_ #define RAYLIB_CPP_INCLUDE_SHADER_HPP_ #include <string> #include "./raylib.hpp" #include "./raylib-cpp-utils.hpp" #include "Texture.hpp" namespace raylib { /** * Shader type (generic) */ class Shader : public ::Shader { public: Shader(const ::Shader& shader) { s...
3,748
1,245
#include "Checking.h" #include <iostream> Checking::Checking(const std::string &name, float balance, float minbalance): m_MinimumBalance(minbalance), Account(name, balance){ } Checking::~Checking() { } void Checking::Withdraw(float amount) { if ((m_Balance - amount) > m_MinimumBalance) { Account::Wi...
482
177
#include "pch.h" #include "jnc_io_DeviceMonitor.h" #include "jnc_io_DevMonLib.h" #include "jnc_Error.h" namespace jnc { namespace io { //.............................................................................. JNC_DEFINE_OPAQUE_CLASS_TYPE( DeviceMonitor, "io.DeviceMonitor", g_devMonLibGuid, DevMonLibTypeCa...
9,561
3,999
/* * 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...
3,032
1,010
#include "common.hpp" using snake_t = std::vector<std::pair<int, int> >; using pos_t = std::pair <int, int>; int move_to(int new_dir, int dir){ switch(new_dir){ case 'w': (dir != 's') ? dir = 'w' : dir = 's'; break; case 'a': (dir != 'd') ? dir = 'a' : dir = 'd'; break; case 's': ...
3,069
1,299
#include "Figure.h" Figure::Figure() :cell{ {0,0},{0,0}, {0,0}, {0,0} }, position{ 0,0 } { } Figure::Figure(int i1, int j1, int i2, int j2, int i3, int j3, int i4, int j4) : cell{ {i1,j1},{i2,j2}, {i3,j3}, {i4,j4} }, position{ 0,0 } { } Figure::Figure(const Figure& fg) : Figure{} { position[0] = fg.position[0]; p...
2,195
1,099
// Copyright 2015 Google 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 required by applicable...
23,044
8,376
// Created on: 1998-07-29 // Created by: Administrateur Atelier XSTEP // Copyright (c) 1998-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the te...
2,302
752
#include "RealSenseInspector.h" #define MAX_BUFFER_U16 0xFFFF template<typename T> inline UTexture2D* Get(TUniquePtr<T>& Dtex) { return Dtex.Get() ? Dtex.Get()->GetTextureObject() : nullptr; } inline float GetDepthScale(rs2::device dev) { for (auto& sensor : dev.query_sensors()) { if (auto depth = sensor.as<rs2::...
17,941
7,789
// license: GPL-2.0+ // copyright-holders: Dirk Best /*************************************************************************** Einstein "Tatung Pipe" ***************************************************************************/ #include "emu.h" #include "pipe.h" // supported devices #include "silicon_disc.h" ...
4,050
1,189
// Copyright 2017 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/ledger/bin/app/fidl/serialization_size.h" namespace ledger { namespace fidl_serialization { size_t GetByteVectorSize(size_t vector_length) ...
1,171
405
inline void DocumentPreviewCache::Initialize(UInt64 max_cache_bytes, double max_disk_percentage) { REX(TRN_DocumentPreviewCacheInitialize(max_cache_bytes, max_disk_percentage)); } inline void DocumentPreviewCache::GetBitmapWithPath(const UString& filepath, UInt32 min_x_size, UInt32 min_y_size, PreviewHandler pro...
1,041
363
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "platform/globals.h" #if defined(HOST_OS_MACOS) #include <dlfcn.h> // NOLINT #include "bin/e...
1,000
365
#include "cPackEngine.h" int Item::nextPackSeq = 0; Item::Item() : myBinProgID( -1 ) , mySpinAxis( 0 ) , mySupport( 0 ) { } Item::Item(const Item& orig) { } Item::~Item() { } int Item::RotationConstraints() { return myRotationConstraints; } int Item::PositionConstraints() { return myPositionCo...
1,888
599
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2018 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
44,125
13,007
// Ne smije se definirati fukcije cin kao ovjde ako koristimo includove, proučit detaljnije... #include "funkcije.hpp" void cin(){ cout << "ja sam cin"; } int main(){ cin(); funkcija(); }
201
78
// ================================================================ // NVDLA Open Source Project // // Copyright(c) 2016 - 2017 NVIDIA Corporation. Licensed under the // NVDLA Open Hardware License; Check "LICENSE" which comes with // this distribution for more information. // =======================================...
2,659
965
// // message.cpp // TSDNSServer // // Created by zhaoxy on 14-5-11. // Copyright (c) 2014年 tsinghua. All rights reserved. // #include "message.h" using namespace dns; using namespace std; //encode an address seperated by '.' like 'www.google.com' //to address seperated by substring length like '3www6google3com'...
4,876
1,754
/* This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Tasks for .NET API reference when the project is build. Please check https:// Docs.nuget.org/consume/nuget-faq for more information. If you do not wish to use NuGet, you can manually download Aspose.Tasks for .NET API from https://www.n...
2,064
663
/* * Copyright (C) 2008, 2009, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of ...
34,595
10,149
// Example C++ code for OPT // From the test suite of https://github.com/codespecs/daikon // daikon/tests/kvasir-tests/ // Class hierarchy: // // A // | // C D E // \ | / // \ | / // B #include <stdio.h> class A { public: int publicIntA; void setEverything() { publicIntA = 13;...
1,649
669
/* Copyright (c) 2006, Michael Kazhdan and Matthew Bolitho 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 copyright notice, this list of conditions ...
8,342
3,724
//===----------------------------------------------------------------------===// // // Peloton // // planner_test.cpp // // Identification: test/planner/planner_test.cpp // // Copyright (c) 2015-17, Carnegie Mellon University Database Group // //===-----------------------------------------------...
14,687
4,696
#include "gobaldata.h" DataManager* g_dataManager;
52
22
/********************************************************************************* * * Copyright (c) 2017-2018 Josef Adamsson, Denise Härnström, Anders Rehult, * Andreas Kempe * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2017 Inviwo Foundation * All rights reserved. ...
9,924
3,107
#include <vector> #include <algorithm> class Solution { public: int lengthOfLIS(std::vector<int> &nums) { return lengthOfLISDpOpt(nums); } int lengthOfLISDp(std::vector<int> &nums) { std::vector<int> dp(nums.size(), 1); for (int i = 0; i < nums.size(); i++) for...
1,227
440
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "orttraining/training_ops/cuda/tensor/gather_elements_grad.h" #include "orttraining/training_ops/cuda/tensor/gather_elements_grad_impl.h" #include "core/providers/cpu/tensor/utils.h" #include "core/providers/common...
5,914
2,003
/* * Get feedback from a mobile io module and plot it live * * For more information, go to http://docs.hebi.us/tools.html#cpp-api * * HEBI Robotics * August 2019 */ #include <chrono> #include <iostream> #include <thread> #include "lookup.hpp" #include "group_feedback.hpp" #include "util/plot_functions.h" na...
1,871
664
#include "main.h" #define THREAD_ARRAY_ADDR 0x01E5FE80 #define THREAD_COUNT_ADDR 0x01E5FE84 #define threadArray ((struct sysArray<scrThread>*)THREAD_ARRAY_ADDR); #define threadCount (*(int*)(THREAD_COUNT_ADDR)); scrThread* ThreadArray::GetThreadByName(char* name) { scrThread* ret = 0; int i = 0; while(i < threadA...
1,554
665
#include <engine/actor.hpp> Actor::Actor(std::uint_fast64_t id) : id(id), layer(0) {} void Actor::SetBody(std::unique_ptr<PhysicalBody> &&physical_body) { this->body = std::move(physical_body); } void Actor::SetRenderer(std::unique_ptr<Renderer> &&renderer) { this->renderer = std::move(renderer); } void Actor::SetPo...
1,486
533
#include "middleware/generator/mesh/cube_shape.h" #include <memory> #include <utility> #include <type_traits> #include "core/common/exception.h" static auto MakeGenerator(const dg::float3 sizes, const dg::uint3 segments) { float offset = sizes.z * 0.5f; dg::float2 size = {sizes.x, sizes.y}; dg::uint2 sg...
2,797
1,059
#include "foobar2000.h" void main_thread_callback::callback_enqueue() { main_thread_callback_manager::get()->add_callback(this); } void main_thread_callback_add(main_thread_callback::ptr ptr) { main_thread_callback_manager::get()->add_callback(ptr); } namespace { typedef std::function<void ()> fun...
857
315
/* pawgui.cpp This file is part of: PawByte Ambitious Working GUI(PAWGUI) https://www.pawbyte.com/pawgui Copyright (c) 2014-2020 Nathan Hurde, Chase Lee. Copyright (c) 2014-2020 PawByte LLC. Copyright (c) 2014-2020 PawByte Ambitious Working GUI(PAWGUI) contributors ( Contributors Page ) Permission is hereby...
4,839
1,578
#include <iostream> #include <iomanip> #include <vector> #include <unordered_map> #include <sparsehash/dense_hash_map> #include <sparsehash/sparse_hash_map> #include <DB/Common/Stopwatch.h> //#define DBMS_HASH_MAP_COUNT_COLLISIONS #define DBMS_HASH_MAP_DEBUG_RESIZES #include <DB/Core/Types.h> #include <DB/IO/ReadB...
5,242
2,210
// // Created by Arseny Tolmachev on 2017/02/23. // #include "dictionary_node_creator.h" namespace jumanpp { namespace core { namespace analysis { bool DictionaryNodeCreator::spawnNodes(const AnalysisInput& input, LatticeBuilder* lattice) { auto& points = input.codepoints(); ...
1,249
369
#include <sstream> #include <iostream> #include <ydk/entity_util.hpp> #include "bundle_info.hpp" #include "generated_entity_lookup.hpp" #include "Cisco_IOS_XE_native_216.hpp" using namespace ydk; namespace cisco_ios_xe { namespace Cisco_IOS_XE_native { Native::Router::Eigrp::AddressFamily::AfIpList::TrafficShare::T...
575,048
209,461
/******************************************************************************* * Copyright 2016 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
27,677
9,143
//===----------------------------------------------------------------------===// // GuinsooDB // // guinsoodb/execution/operator/helper/physical_transaction.hpp // // //===----------------------------------------------------------------------===// #pragma once #include "guinsoodb/execution/phy...
979
272
/** * @file getDerivKernels.cpp * @brief mex interface for cv::getDerivKernels * @ingroup imgproc * @author Kota Yamaguchi * @date 2011 */ #include "mexopencv.hpp" #include "opencv2/imgproc.hpp" using namespace std; using namespace cv; namespace { /// KSize map for option processing const ConstMap<string,int> KS...
1,845
688
////////////////////////////////////////////////////////////////////////// // ShaderOperation inline function D3D10_SB_OPCODE_TYPE shader_analyzer::ShaderOperation::getType() const{ return DECODE_D3D10_SB_OPCODE_TYPE(m_pData[0]); } D3D10_SB_CUSTOMDATA_CLASS shader_analyzer::ShaderOperation::getCustomDataClass() const...
4,006
1,852
/////////////////////////////////////////////////////////////////////////////// // $Id$ // // 3DimViewer // Lightweight 3D DICOM viewer. // // Copyright 2008-2016 3Dim Laboratory s.r.o. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Licen...
4,942
1,907
#include <vector> #include <string> #include "spdlog/spdlog.h" #include "mex.h" #include "mex-utils/tiffs.h" #include "mex-utils/hdf5.h" void mexFunction(int nlhs,mxArray *plhs[],int nrhs,const mxArray *prhs[]) { std::shared_ptr<spdlog::logger> logger; try { spdlog::set_async_mode(4096, spdlog::async...
4,247
1,477
/* MIT License Copyright (c) 2020 Feral Language repositories Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modi...
9,893
4,348
#ifndef CHEM_UTILS_HPP #define CHEM_UTILS_HPP #ifdef _OPENMP #include <omp.h> #else #warning 'OpenMP not found! Unexpected results may occur if using more than one thread.' #define omp_get_num_threads() (1) #endif #include "mechanism.hpp" #include "chem_utils.hpp" #ifndef work_size #define work_size (omp_get_nu...
2,637
2,046
#pragma once #include <microtone/microtone_platform.hpp> #include <functional> #include <memory> #include <string> #include <vector> namespace microtone { //enum class MidiStatusMessage { // NoteOn = 0b10010000, // NoteOff = 0b10000000, // ControlChange = 0b10110000 //}; using OnMidiDataFn = std::function...
855
314
#include <iostream> #include <stdio.h> using namespace std; int main() { string complain; while(getline(cin,complain)) { if(complain.compare("0") == 0) cout << "vai ter copa!\n"; else if(complain.compare("") == 0) break; else cout << "vai ter duas!\...
346
121
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
2,981
1,158
// Copyright (C) <2021> Intel Corporation // // SPDX-License-Identifier: Apache-2.0 #include "talk/owt/sdk/base/win/videorendererd3d11.h" #include <array> #include <cstdio> #include "rtc_base/logging.h" #include <system_error> #include "talk/owt/sdk/base/nativehandlebuffer.h" #include "talk/owt/sdk/base/win...
25,925
9,923
#include<stdio.h> #include<conio.h> #include<math.h> #include<stdlib.h> #define AND && #define OR || int main(){ start: int num, i, j=0, k; printf("Enter value of the number\n"); scanf("%d", &num); for(i=2;i<num;i++){ if(num%i==0){ j=1; break; } } if(j==0&&num!=1)// if(!j&&num!=1)...
434
199
#include "P2.h" namespace OrderParametersRegistry { registry_<P2> registerP2("p2"); } P2::P2(const OrderParametersInput& input) :liquid_crystal(input) { registerOutput("p2",[this](void)-> Real {return this->getP2();}); registerOutput("p20", [this](void) -> Real {return this->getP20();}); registerOutpu...
3,961
1,517
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example // Copyright (c) 2011 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/...
1,445
584
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
16,341
6,830
#include<stdio.h> int anotherFunction(int a, int b) { int answer = 42; int x = 0; printf("In anotherFunction(%d,%d)\n",a,b); while (b > a) { printf("a is %d, b is %d\n", a, b); answer = answer + (b - a); b -= x; a += x / 2; x++; } return answer; } int someFunction(int x, int y) { int...
747
348
/** * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include <wdt/Wdt.h> #include <wdt/test/TestCommon.h> #include <thread> using namespace std; namespace ...
3,211
1,241
#include <Windows.h> #include <cmath> #include <string> #include <list> #include <algorithm> #include <array> #include "../Hook/Snap.h" bool InitInstance(HINSTANCE instance); LRESULT CALLBACK WinProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam); void CreateGameWindow(int width, int height, bool fullScreen...
3,170
1,320
/** * @file pntabcontrol.cpp * @brief Tab Control for PN * @author Simon Steele * @note Copyright (c) 2010 Simon Steele - http://untidy.net/ * * Based on the CustomTabControl and modified from the VS tabs implementation there * with the intent of creating a cleaner look. * * Programmer's Notepad 2 : The licens...
27,817
12,293
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcrt/fx_system.h" #ifndef _SKIA_SUPPORT_ #include "core/fxge/...
5,778
2,188
#include <string> #include <functional> #include <vector> #include <algorithm> using namespace std; #include "palindromicPartitioning.h" /////////// For Testing /////////////////////////////////////////////////////// #include <time.h> #include <cassert> #include <string> #include <iostream> #include "../common/iost...
1,653
555
#include <cstdio> #include <cstring> main() { char a[15],b[15]; int i,j,l,t,k; scanf("%d",&t); getchar(); for(i=1;i<=t;i++) { gets(a); l=strlen(a); for(j=l-1,k=0;j>=0;j--,k++) { b[k]=a[j]; } b[k]='\0'; if(strcmp(a,b)==0) ...
468
211
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
51,462
17,264
// Copyright 2019 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 "third_party/blink/renderer/core/css/basic_shape_functions.h" #include "third_party/blink/renderer/core/css/css_axis_value.h" #include "third_par...
324,668
94,250
/* * exti.cpp * * Created on: Mar 13, 2018 * Author: 13774 */ #include <interrupt/svc_call.h> #include <schedule/PidManager.h> void destroy(int i) { svc_call<SvcFunc::killProcess>(PID_CURRENT,i); }
211
102
/// /// BatchSprite.cpp /// galaxy /// /// Refer to LICENSE.txt for more details. /// #include "galaxy/core/ServiceLocator.hpp" #include "galaxy/resource/TextureBook.hpp" #include "BatchSprite.hpp" namespace galaxy { namespace components { BatchSprite::BatchSprite() noexcept : Serializable {this} , m_index...
4,564
2,148
#include <iostream> #include <iomanip> #include <cmath> #include <string> #include <cstring> using namespace std; long GetNonOddCount(long number){ string num; long nCount = 0; num = to_string(number); long i; int tmp; for (i = 0; i <= num.length() - 1; ++i){ tmp = num[i] - '0'; ...
1,167
450
// Copyright (c) 2021 The Danxome Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <wallet/transaction.h> #include <wallet/test/wallet_test_fixture.h> #include <boost/test/unit_test.hpp> namespace wall...
847
312
// -*- coding: us-ascii-unix -*- // Copyright 2012 Lukas Kemmer // // 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 a...
2,314
802
// // Created by LEI XU on 5/16/19. // #ifndef RAYTRACING_BVH_H #define RAYTRACING_BVH_H #include "Bounds3.hpp" #include "Intersection.hpp" #include "Object.hpp" #include "Ray.hpp" #include "Vector.hpp" #include <atomic> #include <ctime> #include <memory> #include <vector> struct BVHBuildNode; // BVHAccel Forward De...
1,587
578
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2016-2018 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
6,305
2,010
/* * Copyright Andrey Semashev 2007 - 2013. * 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) */ #include <stdexcept> #include <string> #include <iostream> #include <boost/shared_ptr.hpp> #i...
4,627
1,573
/* * Copyright (C) 2018 Open Source Robotics Foundation * * 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 appl...
28,108
7,927
// Copyright 2021 The Autoware Foundation // // 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...
12,610
5,279
#include "../../main.h" #define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING #include <experimental/filesystem> std::string getexepath() { char path[MAX_PATH]; ::GetModuleFileName(0, path, MAX_PATH); return path; } std::string getexename() { std::string path = getexepath(); std::string e...
13,562
3,698