text
stringlengths
7
961k
/** * @file maze_generator.cpp * @author Ferenc Nemeth * @date 3 Dec 2018 * @brief Base class: methods and variables used by every maze generator. * * Copyright (c) 2018 Ferenc Nemeth - https://github.com/ferenc-nemeth/ */ #include "maze_generator.h" /** * @brief Constructor. Generates a ...
/********************************************************************** * * FILE: MultiTextureControl.cpp * * DESCRIPTION: Read/Write osg::MultiTextureControl in binary format to disk. * * CREATED BY: Auto generated by iveGenerate * and later modified by Rune Schm...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE789_Uncontrolled_Mem_Alloc__new_wchar_t_fixed_11.cpp Label Definition File: CWE789_Uncontrolled_Mem_Alloc__new.label.xml Template File: sources-sinks-11.tmpl.cpp */ /* * @description * CWE: 789 Uncontrolled Memory Allocation * BadSource: fixed Large, fixed value * Go...
// generated from rosidl_generator_cpp/resource/idl.hpp.em // generated code does not contain a copyright notice #ifndef RMF_BUILDING_MAP_MSGS__MSG__PLACE_HPP_ #define RMF_BUILDING_MAP_MSGS__MSG__PLACE_HPP_ #include "rmf_building_map_msgs/msg/detail/place__struct.hpp" #include "rmf_building_map_msgs/msg/detail/place_...
#pragma once #include "kernel.h" #define PIC1 0x20 // Master PIC #define PIC2 0xA0 // Slave PIC #define PIC1_DATA (PIC1 + 1) #define PIC2_DATA (PIC2 + 1) #define PIC_EOI 0x20 // end of interrupt #define IRQ_BASE 0x20 // Exceptions, cf. http://wiki.osdev.org/Exceptions #define EXCEPTION_DE 0 #define EXCE...
// // CBLiteTool.cc // // Copyright (c) 2017 Couchbase, 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 // // Unl...
/* This file is part of Jellyfish. Jellyfish 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 your option) any later version. Jellyfish is distributed ...
// 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/sync/test/integration/sync_test.h" #include <vector> #include "base/basictypes.h" #include "base/bind.h" #include "base/com...
// FILE NAME: $HeadURL: svn+ssh://svn.cm.aol.com/advertising/adlearn/gen1/trunk/lib/cpp/DataProxy/test/ExecutionProxyTest.hpp $ // // REVISION: $Revision: 280002 $ // // COPYRIGHT: (c) 2006 Advertising.com All Rights Reserved. // // LAST UPDATED: $Date: 2013-06-03 15:11:03 -0400 (Mon, 03 Jun 2013)...
// Fig. 21.6: fig21_06.cpp // Aiming a derived-class pointer at a base-class object. #include "CommissionEmployee.h" #include "BasePlusCommissionEmployee.h" int main() { CommissionEmployee commissionEmployee( "Sue", "Jones", "222-22-2222", 10000, .06 ); BasePlusCommissionEmployee *basePlusCommissionEmploy...
#pragma once #include "../Component.hpp" class PreEvent { protected: class UObject* PE_Caller; // The calling class/unreal object. class UFunction* PE_Function; // Unreal function, used as a reference in Process Event to call the native function. void* PE_Params; // If params are provided in the function, this ...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2020 The Bitcoin Core developers // Copyright (c) 2013-2021 The Riecoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <rpc/client.h> #include <ut...
//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------...
/* * 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. */ #include <stddef.h> void invalidate_local_ok(int** pp) { int t = 0xdeadbeef; *pp = &t; // <-- potential bug here since t goes o...
/* * Author: Yevgeniy Kiveisha <yevgeniy.kiveisha@intel.com> * Copyright (c) 2014 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 * ...
// Master Profile Manipulation #include "stdafx.h" #include "MasterProf.h" #include "copyFile.h" #include "DelMasterDlg.h" #include "filename.h" #include "filesrch.h" #include "Identity.h" #include "IniFile.h" #include "MasterMgmtDlg.h" #include "PreOutpost.h" #include "ProgramFiles.h" #include "SelectMasterDlg.h" #i...
#ifndef EventGenerator_CosmicFromTH2_hh #define EventGenerator_CosmicFromTH2_hh // // Cosmic ray muon generator using a TH2 as probability distribution // // $Id: CosmicDYB.hh,v 1.13 2014/03/22 21:40:43 ehrlich Exp $ // $Author: ehrlich $ // $Date: 2014/03/22 21:40:43 $ // // Original author Ralf Ehrlich // #include <...
#include <sstream> #include "exceptions.h" #include "syntax.h" static inline ValueType keyword_to_value_type(LexemeType lexeme) { switch (lexeme) { case ltInt: return vtInteger; case ltString: return vtString; case ltBoolean: return vtBoolean; case ltReal: return vtR...
/* * Author: Thomas Ingleby <thomas.c.ingleby@intel.com> * Copyright (c) 2014 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 * with...
#include <cstdlib> #include <iostream> #include "aussiegochi.h" void feedAussie(Aussiegochi& aus) { aus.hunger = aus.hunger - 3; aus.happiness = aus.happiness + 2; aus.sanity = aus.sanity + 3; } void waterAussie(Aussiegochi& aus) { aus.thirst = aus.thirst - 3; aus.happiness = aus.happiness + 2; aus.sanity = aus...
#include<bits/stdc++.h> using namespace std; int main() { string a,b; int maru[1000]; int fg = 0; cin >> a >> b; int n1,n2,n; n1 = a.size(); n2 = b.size(); if(n1 > n2) n = n1; else n = n2; if(n1 > n2) { for(int i = 0; i < n;i++) { if(a[i] == b[i]) { maru[fg] = 1; fg++; } else...
// pch.cpp: plik źródłowy odpowiadający wstępnie skompilowanemu nagłówkowi, niezbędny do powodzenia kompilacji #include "pch.h" // Ogólnie rzecz biorąc, zignoruj ten plik, ale miej go pod ręką, jeśli używasz wstępnie skompilowanych nagłówków.
/* * Triplane Classic - a side-scrolling dogfighting game. * Copyright (C) 1996,1997,2009 Dodekaedron Software Creations Oy * * 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 vers...
/** * @file * @copyright defined in evt/LICENSE.txt */ #pragma once #include <appbase/application.hpp> #include <evt/chain_plugin/chain_plugin.hpp> namespace fc { class variant; } namespace evt { using chain::transaction_id_type; using std::shared_ptr; using namespace appbase; using chain::name; using chain::ui...
/* * Copyright (c) 2017 Peter Conrad, and other contributors. * * The MIT License * * 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 th...
#include <stan/math/mix/scal.hpp> #include <gtest/gtest.h> #include <test/unit/math/rev/scal/fun/util.hpp> #include <test/unit/math/mix/scal/fun/nan_util.hpp> TEST(AgradFwdCos, FvarVar_1stDeriv) { using stan::math::fvar; using stan::math::var; using std::cos; using std::sin; fvar<var> x(1.5, 1.3); fvar<va...
#include <Renderer/Mesh.hpp> #include <Renderer/Renderer.hpp> #include <Renderer/Mesh3D.hpp> namespace V3D { SHOWCASE_API Mesh::Mesh(Renderer& renderer, Mesh3D& mesh_data) { handle = mesh_create(renderer.handle, mesh_data.handle); } SHOWCASE_API void Mesh::destroy() const { mesh_destroy(handle); } SHOWCAS...
/* ---------------------------------------------------------------------- * gtiff.cpp() * ---------------------------------------------------------------------- * Read and write a small set of tiff file formats. * * TODO: Merge xtiff and gtiff classes. Interface to libtiff. * Valeriy: gtiff will be removed later....
// Solved 2021-04-11 17:01 // Runtime: 0 ms (100.00%) // Memory Usage: 14.1 MB (92.24%) class Solution { public: int trap(vector<int> &height) { if (height.empty()) return 0; int l = 0, r = height.size() - 1, lmax = height[l], rmax = height[r], res = 0; while (l <...
#pragma once // interfaces #include "io/OutputStream.hpp" // implementations #include "io/DataMatrix.hpp" #include "io/FileOutputStream.hpp" #include "io/FlatOutputStream.hpp" #include "io/MapOutputStream.hpp"
// Copyright (c) 2009-2012 CIYAM Pty. Ltd. ACN 093 704 539 // Copyright (c) 2012-2018 CIYAM Developers // // Distributed under the MIT/X11 software license, please refer to the file license.txt // in the root project directory or http://www.opensource.org/licenses/mit-license.php. #ifdef PRECOMPILE_H # include "preco...
/* The copyright in this software is being made available under the BSD * License, included below. This software may be subject to other third party * and contributor rights, including patent rights, and no such rights are * granted under this license. * * Copyright (c) 2010-2019, ITU/ISO/IEC * All rights reserve...
/// \file ParamGeneration.cpp /// /// \brief Parameter manipulation routines for the Zerocoin cryptographic /// components. /// /// \author Ian Miers, Christina Garman and Matthew Green /// \date June 2013 /// /// \copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green ...
/************************** * Includes * **************************/ #include <windows.h> #include <gl/gl.h> /************************** * Function Declarations * **************************/ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); void EnableOpenGL (HWND hWnd, HDC *hD...
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
// Boost config.hpp configuration header file ------------------------------// // Copyright (c) 2001-2003 John Maddock // Copyright (c) 2001 Darin Adler // Copyright (c) 2001 Peter Dimov // Copyright (c) 2002 Bill Kempf // Copyright (c) 2002 Jens Maurer // Copyright (c) 2002-2003 David Abrahams // Copyright ...
/* * 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 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) 2013 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. Redistri...
/* -- MAGMA (version 2.5.4) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date October 2020 @generated from sparse/control/magma_zparict_tools.cpp, normal z -> s, Thu Oct 8 23:05:51 2020 @author Hartwig Anzt */ #include "magma...
// Copyright (C) 2012-2015,2017 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 <dhcpsrv/a...
#pragma once #include <cstring> #include <string> #include <vector> template <size_t Sigma = 26> struct Trie { struct Node { char c; int nx[Sigma]; std::vector<int> tails; Node(char c) : c(c) { std::memset(nx, -1, sizeof(nx)); } }; std::vector<Node> nodes; Trie(const char basis = 'a') : basis...
#include "parser.hpp" void parser::create_variable(std::tuple<std::string, std::string> var) { variable_list.emplace_back(var); } /* put a lot of this into syntax analysis, because that is half of the parser, then use the parser for opcode generation */ void parser::parse_code(std::vector<std::string> c) { lexer ...
/*========================================================================= Program: Visualization Toolkit Module: TestOSConeCxx.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is...
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
#include <cctbx/boost_python/flex_fwd.h> #include <boost/python/module.hpp> #include <boost/python/class.hpp> #include <boost/python/def.hpp> #include <boost/python/list.hpp> #include <boost/python/dict.hpp> #include <scitbx/array_family/flex_types.h> #include <scitbx/array_family/shared.h> #include <scitbx/array_famil...
#include "test.cpp" int main () { std::cout << "-------------------vector_test-------------------\n"; vector_test(); std::cout << std::endl; std::cout << "-------------------line_test-------------------\n"; line_test(); std::cout << std::endl; std::cout << "-------------------triangle_...
// // Copyright (c) 2002-2011 The ANGLE 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 "angle_gl.h" #include "compiler/translator/BuiltInFunctionEmulator.h" #include "compiler/translator/BuiltInFunctionEmulatorGL...
#include "ObjReader.hpp" #include "VecMatMath.hpp" #include <stdio.h> #include <map> #include <cstring> using std::vector; struct PackedVertex { vec3 position; vec2 uv; vec3 normal; bool operator<(const PackedVertex &that) const { return memcmp((void *)this, (void *)&that, sizeof(PackedVer...
/* # Copyright (c) 2022 José Miguel Guerrero Hernández # # 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...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE590_Free_Memory_Not_on_Heap__delete_wchar_t_alloca_12.cpp Label Definition File: CWE590_Free_Memory_Not_on_Heap__delete.pointer.label.xml Template File: sources-sink-12.tmpl.cpp */ /* * @description * CWE: 590 Free Memory Not on Heap * BadSource: alloca Data buffer is...
//////////////////////////////////////////////////////////////////////////////////////////////////////// // Part of Injectable Generic Camera System // Copyright(c) 2019, Frans Bouma // All rights reserved. // https://github.com/FransBouma/InjectableGenericCameraSystem // // Redistribution and use in source and binary...
#ifndef RELU_HPP #define RELU_HPP #include "xtensor/xmath.hpp" auto relu(auto x) { return xt::maximum(0, x); } #endif
#include <iostream> #include <vector> using namespace std; bool IsVectorEven(vector<int> myVec); bool IsVectorOdd(vector<int> myVec); int GetNumbers(vector<int> &myVec); void PrintVector(const vector<int> &myVec); int main() { vector<int> numArr; int count = GetNumbers(numArr); if (count <= 0) { ...
#include <ossimPlanet/ossimPlanetTerrain.h> #include <osg/NodeVisitor> #include <ossimPlanet/ossimPlanetTerrainTechnique.h> #include <ossim/elevation/ossimElevSourceFactory.h> #include <ossimPlanet/ossimPlanet.h> #include <ossimPlanet/ossimPlanetTerrainGeometryTechnique.h> #include <ossimPlanet/ossimPlanetGeoRefModel.h...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: Valve.VR.IVRRenderModels #include "...
/* //@HEADER // ************************************************************************ // // Kokkos v. 3.0 // Copyright (2020) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Govern...
/* Copyright 2020 Stanford University * Copyright 2020 Los Alamos National Laboratory * * 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....
/* * Copyright (C) 2020 Smirnov Vladimir / mapron1@gmail.com * SPDX-License-Identifier: MIT * See LICENSE file for details. */ #pragma once #include <QString> #include <QSettings> class QWidget; namespace FreeHeroes::Gui { class IAppSettings { public: virtual ~IAppSettings() = default; struct Sound { ...
#include <algorithm> #include <iostream> #include <cstring> #include <cstdint> #include <cstdlib> #include <cstdio> #include <string> #include <vector> #include <queue> #include <unistd.h> #include <sys/select.h> #include <sys/socket.h> #include <sys/epoll.h> #include <sys/time.h> #include <netinet/in.h> #include <arp...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-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 "amount.h" #include "base58.h" #include "chain.h" #include "core_io.h" #inclu...
// dllmain.cpp : Defines the entry point for the DLL application. #pragma once #include "FileTypes/ItemsData.h" #include "FileTypes/ItemMake.h" #include "FileTypes/PopBase.h" #include "pch.h" BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser...
/* ** Copyright 2014-2015 Centreon ** ** 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...
//------------------------------------------------------------------------- /* Copyright (C) 2010-2019 EDuke32 developers and contributors Copyright (C) 2019 sirlemonhead, Nuke.YKT This file is part of PCExhumed. PCExhumed is free software; you can redistribute it and/or modify it under the terms of the GNU General Pub...
#include <muduo/net/Buffer.h> #include <gtest/gtest.h> using muduo::string; using muduo::net::Buffer; TEST(testBufferAppendRetrieve, readWritePrepend) { Buffer buf; EXPECT_EQ(buf.readableBytes(), (unsigned long)(0)); EXPECT_EQ(buf.writableBytes(), Buffer::kInitialSize); EXPECT_EQ(buf.prependableBytes(), Buff...
#include "geqrftest.hh" #include <lapack/geqrf.hh> #include <lapack/ormqr.hh> using namespace Linalg; void GEQRFTest::setUp() { // Allocate some space; tau = Vector<double>(3); static double a_data[9] = { 12, -51, 4, 6, 167, -68, -4, 24, -41 }; ...
// 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...
// Author: Florian Lier [flier AT techfak.uni-bielefeld DOT de] /* * Copyright (c) 2012-2016 Aldebaran Robotics. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the COPYING file. */ #include "naoqiwrapper.hpp" NaoQiWrapper::NaoQiWrapper(std::string _robot_...
#pragma once #include <iostream> #include <cmath> #include <fstream> #include "Vector3D.hh" #include "Vector4D.hh" //#include "Matrix3D.hh" class Object { Vector3D LokCorners[CUBE]; public: Object(); Object(const Object &obj); Object(Vector3D ObjectCorners[CUBE]); Vecto...
/// DccInterpreter.cpp /// /// DCC Interpreter for Arduino #include <DccInterpreter.h> #include <limits.h> namespace Dcc { /// A preamble is valid if this number of "1" is transmitted (at least) #define DCCINTERPRETER_PREAMBLE_MIN_NR_ONES 10u // --------------------------------------------------- /// Retu...
/* * Copyright (c) 2008-2021 * Nakata, Maho * 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, th...
// LLVM module pass to create the single function (fully inlined) // and parallelized kernel for an OpenCL workgroup. // // Copyright (c) 2011 Universidad Rey Juan Carlos // 2012-2019 Pekka Jääskeläinen // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software ...
#include <iostream> #include "tbb/tbb.h" #define RADIUS 3 #define NELEMENTS 1048576 int main(void) { int * h_in, *h_out; size_t bytes = NELEMENTS*sizeof(int); h_in = (int*)malloc(bytes); h_out = (int*)malloc(bytes); //initialization for( int i = 0; i < NELEMENTS; i++ ) { h_in[i] = 1; } /...
#ifndef WSM_IMPL_HPP #define WSM_IMPL_HPP #include "util/scream_utils.hpp" #include "scream_assert.hpp" #include <map> namespace scream { /* * An implementation header for wsm.hpp, this helps keep wsm.hpp clean by avoiding * mixing interface and implementation. Clients should NOT ever include this file. */ temp...
// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // 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 <vsomeip/constants.hpp> #inc...
#include "client.h" #include <iostream> #include <boost/array.hpp> #include <boost/asio.hpp> #include "str_queue.h" #include "player.h" #include "playlist.h" #include "mainwindow.h" #include "controler.h" #include "clientcontroler.h" #include <QtWidgets/QApplication> #include "keeper.h" #include <sys/file.h> #include ...
/******************************************************************************* * Copyright (c) 2011, Jean-David Gadina - www.xs-labs.com * Distributed under the Boost Software License, Version 1.0. * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, t...
/* * Copyright (c) 2019, 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, publis...
//====================================================================================================================== // Project: OpenRGB - C++ SDK //---------------------------------------------------------------------------------------------------------------------- // Author: Jan Broz (Youda008) // Descripti...
// Copyright 2016 The Bazel 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 appl...
# include <cmath> # include <cstdlib> # include <ctime> # include <iostream> # include <fstream> using namespace std; # include "lebedev2.h" using namespace std; //****************************************************************************80 int available_table ( int rule ) //************************************...
/* * Copyright (c) 2012 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall * not be construed as granting a license to any other intellectual * property including but not limited to intellectual property relating * to a hardware implementation of the funct...
#include "ChronicleLogger.h" namespace com { namespace sowrov { namespace util { namespace logsystem { ChronicleLogger ChronicleLogger::logger; ChronicleLogger::ChronicleLogger() { this->device = NULL; this->format = NULL; this->setDevice(new LogSystem::device::Console()); this->setLogFormatter(new LogSys...
#include "common.hpp" #define TESTED_TYPE int void is_empty(TESTED_NAMESPACE::list<TESTED_TYPE> const &lst) { std::cout << "is_empty: " << lst.empty() << std::endl; } int main(void) { TESTED_NAMESPACE::list<TESTED_TYPE> lst(7, 20); TESTED_NAMESPACE::list<TESTED_TYPE> lst2; TESTED_NAMESPACE::list<TESTED_TYPE>::i...
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> using namespace std; #define ll long long #define mem(Arr,x) memset(Arr,x,sizeof(Arr)) const int Mod=1e9+7; class Matrix { public: ll M[3][3]; Matrix() { mem(M,0); } Matrix(int Arr[3][3]) { for (int i=...
#include "InputPCH.h"
// Copyright 2018 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
/*============================================================================= Copyright (c) 2014 Kohei Takahashi 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) =============================================...
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #include <sstream> #include <limits> #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" #include "ifcpp/I...
/* Copyright (c) 2005-2017, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
// _ _____ __________ // | | / / _ | / __/_ __/ Visibility // | |/ / __ |_\ \ / / Across // |___/_/ |_/___/ /_/ Space and Time // // SPDX-FileCopyrightText: (c) 2021 The VAST Contributors // SPDX-License-Identifier: BSD-3-Clause #pragma once #include "vast/expression.hpp" #include "v...
// Copyright (c) 2001-2011 Joel de Guzman // Copyright (c) 2001-2011 Hartmut Kaiser // // 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) #if !defined(BOOST_SPIRIT_KARMA_GRAMMAR_MAR_05_2007_0542PM) #define BOOST...
// // Boost.Pointer Container // // Copyright Thorsten Ottosen 2008. 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/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/pt...
/* * 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...
// Copyright 2020 Advanced Remanufacturing and Technology Centre // Copyright 2020 ROS-Industrial Consortium Asia Pacific Team // // 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 // // ht...
#include "solution.h" /** * Other solution: Newton's Alogrithm * x < 2: just return x; * x >= 2: * let k = x / 2; * while k * k > x * let k = (k + x / k) / 2 * return k * * This solution: * Runtime: 0 ms, faster than 100.00% * Memory Usage: 5.9 MB, less than 90.34% **/ // Runtime: 4 ms, faster than ...
/*******************************<GINKGO LICENSE>****************************** Copyright (c) 2017-2021, the Ginkgo 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: 1. Redistributions of source co...
#include "StrConvert.hpp" TEST(StrConvert, ToUtf8) { { std::string test = StrConvert::ToUtf8(L"foobar"); EXPECT_STREQ(test.c_str(), "foobar"); EXPECT_EQ(test.size(), 6u); } { std::string test = StrConvert::ToUtf8(L""); EXPECT_STREQ(test.c_str(), ""); EXPECT_EQ(test.size(),0u); } { std::wstring test ...
#include <thread> #include <account.h> using namespace std; account::account(int init_balance) { balance_lock.lock(); balance = init_balance; balance_lock.unlock(); } int account::get_balance() { return balance; } void account::deposit(int amount) { unique_lock<mutex> lock(balance_lock); balance += amou...
/** * Copyright 2020 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 License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...