text
stringlengths
7
961k
// Copyright (c) 2014-2019, The Monero Project // 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 // ...
/* * 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...
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "Label.hpp" namespace gui { Label::Label(Item *parent, Position x, Position y, Length w, Length h, const UTF8 &inputText) : TextFixedSize(parent, x, y, w, h) ...
#include "examples/protobuf/rpcbench/echo.pb.h" #include "muduo/base/Logging.h" #include "muduo/net/EventLoop.h" #include "muduo/net/protorpc/RpcServer.h" #include <unistd.h> using namespace muduo; using namespace muduo::net; namespace echo { class EchoServiceImpl : public EchoService { public: virtual void Ech...
// Copyright (c) 2011-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "util.h" #include "clientversion.h" #include "primitives/transaction.h" #include "random.h" #include "sync.h" #incl...
#include "../dep/laynii_lib.h" int N_rand = 1000; double_t lower = -10; double_t upper = 10; double verteilung(double x); typedef double (*Functions)(double); Functions pFunc = verteilung; double_t arb_pdf_num(int N_rand, double (*pFunc)(double), double_t lower, double_t upper); double adjusted_...
#include "NEAT_Defines.h" #include "NEAT_GeneticSpecies.h" #include "NEAT_Globals.h" #include "NEAT_Random.h" #include "NEAT_GeneticIndividual.h" namespace NEAT { GeneticSpecies::GeneticSpecies(shared_ptr<GeneticIndividual> firstIndividual) : age(0), ageOfLastImprovement(0), speciesFitness(0)...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "xwalk/runtime/browser/runtime_url_request_context_getter.h" #include <algorit...
#include <iostream> #include <vector> #include <stdio.h> #include <string.h> #define SIZE 10000 using namespace std; vector < vector <int> > g; int vis[SIZE]; int dur[SIZE]; int low[SIZE]; int art[SIZE]; int counter; int parent[SIZE]; int find_articulation(int x) { int child; int y; counter++; vis[x] = 1; child...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
/* * The MIT License * * Copyright (c) 1997-2021 The University of Utah * * 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 * right...
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. // Copyright (c) 2021 by Apex.AI 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:...
// // Created by caolong on 2020/8/13. // #include <softarch/SingleThreadPool.hpp> using namespace clt; SingleThreadPool::SingleThreadPool(const std::string &name) : ThreadPool(name, 1) { } std::thread::id SingleThreadPool::Id() { return ThreadPool::Id(); }
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
#include "MyMallocator.hpp" #include "test_helpers.hpp" #include "vector.hpp" #include <future> #include <thread> #include <vector> void AddRemoveTest(); template<typename T> using allocator_type = MyMallocator<T>; template<typename T> using vec_type = custom_std::vector < T, allocator_type<T> >; int main() { AddRe...
#include "enginesettings.h" #ifdef Q_OS_WASM constexpr auto DEFAULT_SETTINGS_JSON_FILE_NAME = "assets/defaults/engines.json"; #endif constexpr auto SETTINGS_JSON_FILE_NAME = "engines.json"; constexpr auto AVAILABLE_ENGINES_KEY = "availableEngines"; constexpr auto SELECTED_ENGINE_INDEX_KEY = "selectedEngineIndex"; st...
//SARU : Tag dummy // SARU : CxxLibs -L.. -lfastjson #include "fastjson.h" #include <iostream> void process_json( const char * filename ) { FILE* fp=fopen(filename,"rb"); if( fp==0 ) { std::cerr<<"Unable to open file "<<filename<<std::endl; return; } fseek(fp,0,SEEK_END); //go to end long len...
#include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QString> #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #if QT_VERSION >= 0x050000 #include <QUrlQuery> #else #include <QUr...
/* * @Author: SPeak Shen * @Date: 2021-11-13 23:12:19 * @Last Modified by: SPeak Shen * @Last Modified time: 2021-11-21 00:51:26 */ #ifndef __FORMULA_HPP__ #define __FORMULA_HPP__ #define DOUBLE_MAX (1.79769e+308) namespace TMATH { namespace FORMULA { class LinearEquation { public: LinearEquation() = d...
// ===================================================================================== // // Filename: door.cpp // // Description: http://www.hackerearth.com/webengage-hiring-challenge-1/algorithm/the-door-closing-game-5/ // // Version: 1.0 // Created: Sunday 21 September 2014 11:39:20 IST...
// Copyright 2005 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...
/* * Copyright (c) 2007-2014, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Author: * Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org> * Stephan Aßmus <superstippi@gmx.de> */ #include "PackageWindow.h" #include <Application.h> #include <Catalog.h> #include <LayoutBui...
#include "stdafx.h" #include "compiler.h" IC void ProcessID(u32 ID, NodeMerged& N, u32 OurID, Marks& m_used) { if (ID == InvalidNode) return; u32 group = g_nodes[ID].Group; if (group==OurID) return; if (m_used[group]) return; m_used[group] = true; N.neighbours.push_back (group); } void xrConvertAndLink() {...
/* Copyright (c) 2019 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License. */ #include "webservice/Common.h" #include <gflags/gflags.h> DEFINE_int32(ws_meta_http_port, 11000, "Port to listen on Meta with HTTP protocol"); DEFINE_int32(ws_storage_http_port, 12000, "Port to lis...
#include<iostream> #include<cstring> using namespace std; class String { char*str; int length; public: String() { length=0; str=new char[length+1]; } String(char*x) { length=strlen(x); str= new char[length+1]; strcpy(str, x); } void concat(String &x,String &y) { length=x.length +y.length; dele...
#include <json.hpp> using namespace nlohmann; int main() { // create a JSON value json a = 23; // move contents of a to b json b(std::move(a)); // serialize the JSON arrays std::cout << a << '\n'; std::cout << b << '\n'; }
/* file: classifier_predict.cpp */ /******************************************************************************* * Copyright 2014-2017 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 th...
/**************************************************************************** * * Copyright (c) 2012-2019 PX4 Development Team. 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. Red...
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
// Copyright 2009 the V8 project authors. 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 ...
#pragma once #include "core_qt_common/qt_filter_object.hpp" namespace wgt { class InvertFilterObject : public QtFilterObject { public: Q_OBJECT DECLARE_QT_MEMORY_HANDLER Q_PROPERTY(QObject* subFilter READ getSubFilter WRITE setSubFilter) InvertFilterObject(); ~InvertFilterObject(); bool hasFilter() const ov...
#include "io/render.hpp" namespace io::render { void rectangle(Ptr<SDL_Renderer> renderer, SDL_Rect r, Color c) { SDL_SetRenderDrawColor(renderer.get(), c.r, c.g, c.b, 0); SDL_RenderFillRect(renderer.get(), &r); } } // namespace io::render
/* * PackageLicenseDeclared: Apache-2.0 * Copyright (c) 2017 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
#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", "" "%s, you must set a rpcpassword in the configuration file:\n" "%s\n" "It is recomme...
// Copyright (c) 2011-2013 The Bitcoin developers // Copyright (c) 2016-2018 The PIVX developers // Copyright (c) 2016-2018 The Graphcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "walletframe.h" #...
// Copyright (c) Steinwurf ApS 2016. // All Rights Reserved // // Distributed under the "BSD License". See the accompanying LICENSE.rst file. #include "esds.hpp" #include "../descriptor/elemetary_stream_descriptor.hpp" #include <cstdint> #include <memory> #include <string> namespace petro { namespace box { const st...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/sagemaker/model/PipelineExecution.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { n...
//----------------------------------*-C++-*-----------------------------------// /*! * \file ds++/Constexpr_Functions.hh * \author Alex R. Long * \date Tue July 2 16:56:16 2019 * \brief Constexpr versions of math calls * \note Copyright (C) 2019 Triad National Security, LLC. * All rights reserved. ...
//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ // Helmet Software Framework // // Copyright (C) 2018 Hat Boy Software, Inc. // // @author Matthew Alan Gray - <mgray@hatboysoftware.com> // @author Tony Richards - <trichards@indiezen.com> //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-...
#include <map> #include <vector> #include "asserts.h" #include "LookupTable.h" #include "AsymWaveShaper.h" #include "ExtremeTester.h" #include "Shaper.h" #include "SinOscillator.h" #include "TestComposite.h" #include "TestSignal.h" using Spline = std::vector< std::pair<double, double> >; static void gen() { fo...
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2006 Joseph Wang Copyright (C) 2012 Liquidnet Holdings, Inc. This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is f...
//================================================================================================= /*! // \file src/mathtest/dmatsmatadd/M5x5bMCb.cpp // \brief Source file for the M5x5bMCb dense matrix/sparse matrix addition math test // // Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved // // This f...
#include "Tests.h" #include "../src/net/Address.h" class _local_NetworkAddrExt : public acpl::NetworkAddr { public: static inline acpl::NetworkAddr::Type CIdentify(const char *nBegPtr, const char *nEndPtr) { return acpl::NetworkAddr::Identify(nBegPtr, nEndPtr); } }; class _local_Ipv4AddrExt : public acpl::Ipv4Ad...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2020 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
/* * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this so...
#include <SDL/SDL_timer.h> #include "timer.h" Timer::Timer() { startTicks = 0; pausedTicks = 0; running = false; } void Timer::start() { running = true; startTicks = SDL_GetTicks(); } Uint32 Timer::getTicks() { return running ? SDL_GetTicks() - startTicks : pausedTicks; } void Timer::pause()...
//===-- X86DisassemblerDecoder.cpp - Disassembler decoder -----------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
// Copyright 2010 Alon Zakai ('kripken'). All rights reserved. // This file is part of Syntensity/the Intensity Engine, an open source project. See COPYING.txt for licensing. #include "cube.h" #include "engine.h" #include "game.h" #include "client_system.h" #include "editing_system.h" #include "message_system.h" #in...
//the main idea is that we gonna find a new string after deleting "AB" or "BB" //so we gonna find them and delete them and prit the length of the result string #include<iostream> using namespace std; int main() { ios_base::sync_with_stdio(0);cin.tie(0); cout.tie(0);//make input output operation faster int t; cin >> ...
/* * Copyright 2007, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #include <DiskDeviceJobQueue.h> #include <typeinfo> #include <DiskDeviceJob.h> #undef TRACE //#define TRACE(x...) #define TRACE(x...) printf(x) // constructor DiskDeviceJobQueue::DiskDeviceJobQueue...
/** INTEGRATING RADAR MEASUREMENTS FOR DATA FUSION * * Lidar sensors can help accurately detect the position of objects, * but we do not have a method of calculating the velocity. * * Thats where radar data comes into the play. * * LIDAR -> Preprocessing -> Position (No Speed) * RADAR -> Preprocessing...
// --------------------------------------------------------------------- // // Copyright (c) 2017 - 2020 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...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE762_Mismatched_Memory_Management_Routines__delete_long_long_malloc_51a.cpp Label Definition File: CWE762_Mismatched_Memory_Management_Routines__delete.label.xml Template File: sources-sinks-51a.tmpl.cpp */ /* * @description * CWE: 762 Mismatched Memory Management Routi...
// 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 "components/flags_ui/pref_service_flags_storage.h" #include "base/logging.h" #include "base/values.h" #include "build/build_config.h" #include "...
// Copyright (C) 2009,2010,2011,2012 GlavSoft LLC. // All rights reserved. // //------------------------------------------------------------------------- // This file is part of the TightVNC software. Please visit our Web site: // // http://www.tightvnc.com/ // // This program is free software; y...
/// \file log.hpp /// /// \brief /// /// \authors Maarten P. Scholl /// \date 2020-03-29 /// \copyright Copyright 2017-2020 The Institute for New Economic Thinking, /// Oxford Martin School, University of Oxford /// /// Licensed under the Apache License, Version 2.0 (the "License"); ...
///*****************************************************************************************[Main.cc] //Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson //Copyright (c) 2007-2010, Niklas Sorensson // //Permission is hereby granted, free of charge, to any person obtaining a copy of this software and //associated do...
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) | | Copyrigh...
// Copyright (c) 2017-2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <interfaces/chain.h> #include <policy/fees.h> #include <policy/policy.h> #include <util/moneystr.h> #include <util/r...
/* Copyright © 2017 Apple Inc. All rights reserved. * * Use of this source code is governed by a BSD-3-clause license that can * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause */ #ifndef TURI_S3_UPLOADER_HPP #define TURI_S3_UPLOADER_HPP #include <string> #include <fstream> #incl...
#include "LTC2943.h" #include "i2c.h" namespace { // registers constexpr uint8_t REG_STATUS = 0x00;// 0x00 A Status R See Table 2 constexpr uint8_t REG_CONTROL = 0x01;// 0x01 B Control R / W3Ch //addresses constexpr uint8_t WRITE_ADDRESS = 0b1100'1000U; constexpr uint8_t READ_ADDRESS = 0b1100'1001U; constexpr uint8_...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. // This file was modified by Oracle on 2015, 2018. // Modifications copyright (c) 2015-2018 Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Ora...
#pragma clang diagnostic ignored "-Wdeprecated-declarations" #include "selfdrive/loggerd/omx_encoder.h" #include "cereal/messaging/messaging.h" #include <fcntl.h> #include <sys/stat.h> #include <unistd.h> #include <cassert> #include <cstdlib> #include <cstdio> #include <OMX_Component.h> #include <OMX_IndexExt.h> #i...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "gtest/gtest.h" #include "test/common/tensor_op_test_utils.h" #include "test/common/cuda_op_test_utils.h" #include "test/providers/provider_test_utils.h" namespace onnxruntime { namespace test { static void RunTes...
def Dphi_pDxi(vi, xi, xj): u0,u1,u2 = vi x0,x1,x2 = xi y0,y1,y2 = xj vi_mag_sqr = u0*u0 + u1*u1 + u2*u2 vi_mag = sqrt(vi_mag_sqr) sin_alpha_i = sin( 0.5*vi_mag ) cos_alpha_i = cos( 0.5*vi_mag ) Dphi_pDxi0 = (- 4*cos_alpha_i*sin_alpha_i*u1/vi_mag - 4*sin...
#include <iostream> #include <fstream> #include <sstream> #include <exception> #include <chrono> #include <curses.h> #include <signal.h> #include <UnixFilePort.h> #include <Manager.h> #include "../Command.h" namespace cuauv { namespace serial { namespace cli { static bool shouldEnd = false; static Manager* manager...
/* ============================================================================ * Copyright (c) 2009-2016 BlueQuartz Software, LLC * * 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...
#include <iostream> #include <vector> using namespace std; int main() { int k, a; vector<int> arr; cin >> k; for(int i = 0; i < k; i++){ int a; cin >> a; if(a == 0){ arr.pop_back(); } else{ arr.push_back(a); } } a = 0; ...
#include <string> #include <iostream> #include <AMReX_ParmParse.H> #include <AMReX_MultiFab.H> #include <AMReX_DataServices.H> #include <AMReX_PlotFileUtil.H> using namespace amrex; #define Y_IN_PLOTFILE #undef Y_IN_PLOTFILE static void print_usage (int, char* argv[]) { std::cerr << "usage:\n"; s...
// // ssl/stream.hpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2013 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 BOOST_ASIO_SSL_STREAM_HPP #defi...
// Copyright (c) 2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <vector> #include "prevector.h" #include "random.h" #include "serialize.h" #include "streams.h" #include "test/test_bwr...
class Solution { public: int smallestRepunitDivByK(int k) { if (k%2==0 || k%5==0) return -1; int rem = 0, len = 0; for(; len<=k;){ rem = (rem*10 + 1)%k; len++; if (!(rem)) return len; } return -1; } };
// SPDX-License-Identifier: BSD-2-Clause // This code is part of the sfizz library and is licensed under a BSD 2-clause // license. You should have receive a LICENSE.md file along with the code. // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "sfizz_import.h" #include "ForeignIn...
#include "../include/plugprocessor.h" #include "base/source/fstreamer.h" #include "pluginterfaces/base/ibstream.h" #include "pluginterfaces/vst/ivstparameterchanges.h" using namespace AbNinjam; using namespace Vst3; //----------------------------------------------------------------------------- PlugProcessor::PlugPr...
//***************************************************************************** // Copyright 2017-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://w...
/* * Copyright (c) 2019 SK Telecom Co., Ltd. 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 requir...
// bigint_factorial.cpp - Funciones comunes a los ejemplos del factorial con BigInt. // #include <iostream> #include <BigInt/BigInt.hpp> BigInt get_user_input() { std::cout << "Introduzca un número: "; std::cout.flush(); BigInt number; std::cin >> number; return number; } BigInt calculate_f...
//===--- Compilation.cpp - Compilation Task Data Structure ----------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
/********************************************************************* Registration Wizard ResellerDialog 10/19/94 - Tracy Ferrier 02/12/98 - Suresh Krishnan (c) 1994-95 Microsoft Corporation **********************************************************************/ #include <Windows.h> #include <stdio.h> #include <RegP...
#include <iostream> using namespace std; struct node { int data; node *next; }; class singlelist { private: node *tail,*head; public: singlelist() { head=NULL; tail=NULL; } void addtotail(int n) { node *tmp = new node; tmp->data = n; tmp->next = NULL; if(head ==...
/////////////////////////////////////////////////////////////////////////////// // Name: src/aui/auibook.cpp // Purpose: wxaui: wx advanced user interface - notebook // Author: Benjamin I. Williams // Modified by: // Created: 2006-06-28 // Copyright: (C) Copyright 2006, Kirix Corporation, All Righ...
#if 0 #include <Data/DATA.h> #include <Data/RIGID_STRUCTURE_DATA.h> #include <Driver/SIMULATION.h> #include <Force/ELECTROSTATIC_FORCE.h> using namespace Mechanics; /////////////////////////////////////////////////////////////////////// template<class TV> void ELECTROSTATIC_FORCE<TV>:: Identify_Interactions_And_Compute...
#include <cmath> void ComputeBendingEOL( const double *x0, const double *x1, const double *x2, const double *x3, const double *X0, const double *X1, const double *X2, const double *X3, double beta, double *W, double *f, double *K) { double x0x = x0[0]; double x0y = x0[1]; double x0z = x0[2]; double x1x ...
/* Copyright (c) DataStax, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define mem(Arr,x) memset(Arr,x,sizeof(Arr)) const int maxN=12; const int inf=2147483647; int n,m; int fob[maxN+5][maxN+5]; int now=0,scnt[2],Seq[2][9000],Pos[9000],tim,Tim[9000]; ll ...
/* * This file belongs to the Galois project, a C++ library for exploiting * parallelism. The code is being released under the terms of the 3-Clause BSD * License (a copy is located in LICENSE.txt at the top-level directory). * * Copyright (C) 2019, The University of Texas at Austin. All rights reserved. * UNIVER...
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "test_utils.h" #include <cldnn/primitives/input_layout.hpp> #include <cldnn/primitives/binary_convolution.hpp> #include <cldnn/primitives/reorder.hpp> #include <cldnn/primitives/data.hpp> #include <iostream> using namesp...
/* this file has been autogenerated by vtkNodeJsWrap */ /* editing this might proof futile */ #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include <nan.h> #include "vtkExecutiveWrap.h" #include "vtkDemandDrivenPipelineWrap.h" #include "vtkObjectWrap.h" #include "vtkInformationRequestKeyWrap.h" #include "vtk...
/* Notes : * The idea is to visit a node and on visiting this node, we mark it as visited and then traverse its children * I am using the recursive approach to solve this problem * Time complexity is O(n^2) * space complexntiy has been optimized with the use of adjacency list */ #include<bits/stdc++.h...
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
#include "Arduino.h" #include <string> #include <sstream> Serial_CLS Serial; void Serial_CLS::write( const char* buffer, int buffer_n ) { this->_test_output_string( std::string( buffer, buffer_n ) ); } void Serial_CLS::_test_set_input( const char* what ) { this->_test_input_buffer = std::queue<char>(); ...
/* Copyright (c) 2018 PaddlePaddle 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...
#include <pybind11/functional.h> #include <pybind11/operators.h> #include <pybind11/stl.h> #include <torch/csrc/jit/python/pybind_utils.h> #include <torch/csrc/jit/tensorexpr/codegen.h> #ifdef USE_CUDA #include <torch/csrc/jit/tensorexpr/cuda_codegen.h> #endif #include <torch/csrc/jit/tensorexpr/ir_printer.h> #include ...
/* mockturtle: C++ logic network library * Copyright (C) 2018 EPFL * * 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 u...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "pow.h" #include "auxpow.h" #include "arith_uint256.h" #include "chain....
// 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...
#include "system/linux/SqDeviceImpl.h" #include "system/linux/SqPathImpl.h" #include "system/linux/SqStringImpl.h" namespace sq::system::linux { SqDeviceImpl::SqDeviceImpl(UdevPtr<UdevDevice> dev) : dev_{SQ_FWD(dev)} { Expects(dev_ != nullptr); } Result SqDeviceImpl::get_sys_path() const { Expects(dev_ != nullp...
/* * Copyright 2021 MusicScience37 (Kenta Kabashima) * * 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 applica...