text stringlengths 7 961k |
|---|
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <cstdlib>
#include <map>
#include <set>
#include <string>
#include <unordered_map>
#include <folly/gen/Base.h>
#include <folly... |
#pragma once
/*
* @brief functions for asio endpoint
*/
#include <xul/net/inet_socket_address.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ip/udp.hpp>
namespace xul {
class endpoints
{
public:
static inet_socket_address to_inet_socket_address(const boost::asio::ip::tcp::endpoint& ep)
{
... |
// CIL.cpp: implementation of the CCIL class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _WIN32
#pragma warning(disable : 4996)
#endif
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include "SDef.h"
#include "CIL.h"
#include <algorithm>
//////////////////////////////... |
#pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/Scripting/Natives/Generated/anim/AnimFeature.hpp>
namespace RED4ext
{
namespace anim {
struct AnimFeature_AIAction : anim::AnimFeature
{
static constexpr const char* NAME = "... |
// InterviewQuestion1 : Exercice about a question that could be asked in a job interview.
// Author : Anthony Guay
// Date : 4/22/2021
// Credit : CodeBeaty tutorial video @ 2:21 https://www.youtube.com/watch?v=GQp1zzTwrIg
#include <iostream>
using namespace std;
int main()
{
... |
//
// 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 ... |
#include "AnimationLoader.hpp"
#include "Animations/MeshAnimated.hpp"
namespace acid
{
AnimationLoader::AnimationLoader(Metadata *libraryAnimations, Metadata *libraryVisualScenes) :
m_libraryAnimations(libraryAnimations),
m_libraryVisualScenes(libraryVisualScenes),
m_lengthSeconds(Time::ZERO),
m_keyframeData... |
/*!
* \file ErrorTermTransformation.hpp
*
* \author diemf
*
* A Pose ErrorTerm
*/
#ifndef ASLAM_BACKEND_ERROR_TRANSFORMATION_HPP
#define ASLAM_BACKEND_ERROR_TRANSFORMATION_HPP
#include <aslam/backend/ErrorTerm.hpp>
#include <sm/kinematics/Transformation.hpp>
#include <sm/kinematics/RotationVector.hpp>
#include <... |
// 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.
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
#endif
#include "c... |
// Copyright (c) 2015-2016 The Khronos Group 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 ... |
#include "SampleAnalyzer/User/Analyzer/user.h"
using namespace MA5;
bool user::Initialize(const MA5::Configuration& cfg,
const std::map<std::string,std::string>& parameters)
{
// Initializing PhysicsService for MC
PHYSICS->mcConfig().Reset();
// definition of the multiparticle "hadronic"
... |
// Copyright 2022 Kamenev Ilya
#include <gtest/gtest.h>
#include "./strassen_matrix_multiply_tbb.h"
TEST(Kamenev_Strassen_Par, MatrixSize8Test) {
int size = 8;
std::vector<double> a(size * size);
std::vector<double> b(size * size);
std::vector<double> strassen_par_res(size * size);
std::vector<double> naive_... |
/*******************************************************************************
* Modifications Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
* Notified per clause 4(b) of the license.
*******************************************************************************/
/***************************... |
/*
* Copyright (c) 2021 Huawei Device 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 ... |
/*
* 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... |
//! \file acoustic.cpp
#include <cmath>
#include "acoustic.hpp"
#include "../../misc/universal_error.hpp"
AcousticInitCond::AcousticInitCond(double d0, double p0,
EquationOfState const& eos,
double dd, double wavelength):
c0_(eos.dp2c(d0,p0)),
density_(dd,wavelength,0,d0),
pressure_(dd*pow(c0_,2),... |
//========================================================================
//
// FoFiType1.cc
//
// Copyright 1999-2003 Glyph & Cog, LLC
//
//========================================================================
//========================================================================
//
// Modified under the Popp... |
// Copyright (c) 2015, Joseph Mirabel
// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
//
// This file is part of gepetto-viewer.
// gepetto-viewer is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, e... |
/*
* Copyright 2019-present Infosys Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/******************************************************************************
*
* This is an auto generated file.
* Please do not edit this file.
* All edits to be made through template source file
* <TOP-DIR/scripts/Gtp... |
/*
Copyright (c) 2020-2021, 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 list of co... |
/****************************************************************************
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
wo... |
// Copyright (c) 2021 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 terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special ... |
#include "utils/log.hh"
#include "utils/value-ops.hh"
#include "ldp-tlv/ldp-tlv-types.hh"
#include "ldp-tlv/ldp-address-tlv-value.hh"
#include <arpa/inet.h>
namespace ldpd {
LdpAddressTlvValue::LdpAddressTlvValue() : _addresses() {
}
LdpAddressTlvValue::~LdpAddressTlvValue() {
}
uint16_t LdpAddressTlvValue::getT... |
// The MIT License(MIT)
//
// Copyright(c) 2016 Cedric Guillemet
//
// 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, c... |
/****************************************************************************
* Copyright (c) 2012-2020 by the ArborX authors *
* All rights reserved. *
* *
* This ... |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... |
/*******************************************************************************
* Copyright 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://www.apache.o... |
/* ---------------------------------------------------------------------
* The Fearless Engineer
* Copyright (C) 2020, Dr. Andreas Haja.
*
* You should have received a copy of the MIT License along with this program.
* If not, see https://opensource.org/licenses/MIT.
*
* http://www.thefearlessengineer.com
*... |
/*************************************************************************/
/* */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* ... |
// Scintilla source code edit control
/** @file LexerSimple.cxx
** A simple lexer with no state.
**/
// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <cstdlib>
#include <cassert>
#include <string>
#i... |
#include "ir_printer.hpp"
const char *getPrefixForArgumentType(const Ir::ArgumentType tp)
{
switch (tp) {
case Ir::ArgumentType::FunctionNumber: return "FUNC_";
case Ir::ArgumentType::AnyHardRegister: return "%h";
case Ir::ArgumentType::PinnedHardRegister: return "%H";
case Ir::ArgumentType::Pinned... |
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 ... |
#include "Etterna/Globals/global.h"
#include "Etterna/Models/NoteData/NoteData.h"
#include "Etterna/Models/NoteData/NoteDataUtil.h"
#include "Etterna/Models/Misc/NoteTypes.h"
#include "NotesWriterDWI.h"
#include "RageUtil/File/RageFile.h"
#include "Core/Services/Locator.hpp"
#include "RageUtil/Utils/RageUtil.h"
#includ... |
// -----------------------------------------------------------------------------
//
// Copyright (C) 2021 CERN & Newcastle University for the benefit of the
// BioDynaMo collaboration. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compl... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
#include "beatsaber-hook/shared/utils/typedefs-array.h... |
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at w... |
/*****************************************************************************/
/* Page00Transaction.cpp Copyright (c) Ladislav Zezula 2006 */
/*---------------------------------------------------------------------------*/
/* Description: */
... |
//-----------------------------------------------
//
// This file is part of the Siv3D HamFramework.
//
// Copyright (C) 2014-2019 HAMSTRO
// Copyright (c) 2016-2019 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include <Siv3D.hpp>
namesp... |
#ifndef INCLUDE_SLMM_FIT_EXTREMUM_HPP
#define INCLUDE_SLMM_FIT_EXTREMUM_HPP
#include <memory>
#include "slmm_defs.hpp"
namespace slmm {
struct FitExtremum {
FitExtremum(const Int np);
void calc(const Real* const y_gll, Real& min, Real& max, bool& use,
Real* coef = nullptr);
private:
class Impl;
... |
#include "data.hpp"
#include "internal_sys_mock.hpp"
#include "net.hpp"
#include "progress_mock.hpp"
#include <ipmiblob/test/blob_interface_mock.hpp>
#include <cstring>
#include <gtest/gtest.h>
namespace host_tool
{
namespace
{
using namespace std::literals;
using ::testing::_;
using ::testing::AllOf;
using ::tes... |
// 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... |
/*
* Gamedev Framework (gf)
* Copyright (C) 2016-2019 Julien Bernard
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software fo... |
/*
* Copyright 2020, OmniSci, 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 ... |
// 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 "ABI35_0_0JSExecutor.h"
#include "ABI35_0_0RAMBundleRegistry.h"
#include <folly/Conv.h>
namespace ABI35_0_0facebook {
namespace ... |
/**
* 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... |
/*
* duel.cpp
*
* Created on: 2010-5-2
* Author: Argon
*/
#include "duel.h"
#include "interpreter.h"
#include "field.h"
#include "card.h"
#include "effect.h"
#include "group.h"
#include "ocgapi.h"
duel::duel() {
lua = new interpreter(this);
game_field = new field(this);
game_field->temp_card = new_card(... |
/*
// http://www.geeksforgeeks.org/level-order-traversal-in-spiral-form/
Write a function to print spiral order traversal of a tree. For below tree, function should print 1, 2, 3, 4, 5, 6, 7.
spiral_order
Method 1 (Recursive)
This problem can bee seen as an extension of the level order traversal post.
To print the no... |
/**
* Copyright (C) 2016 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITH... |
/*
** Copyright(C) 2018, StepToSky
**
** 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 conditions and the following di... |
// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/regexp/regexp-macro-assembler.h"
#include "src/codegen/assembler.h"
#include "src/execution/isolate-inl.h"
#include "src/execution/simula... |
#include "glog.h"
#include "gstring.h"
namespace gsystem { // gsystem
namespace log { // gsystem.log
GLog::GLog(const GString &filename)
: m_tLogFile(filename)
{
}
gvoid GLog::Debug(const GString &msg)
{
}
gvoid GLog::Info(const GString &msg)
{
}
gvoid GLog::Warn(const GString &msg)
{
}
gvoid GLog::Error(con... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* FragTrap.hpp :+: :+: :+: ... |
/* Copyright 2012-2013 Peter Goodman, all rights reserved. */
/*
* test_interrupt_delay.cc
*
* Created on: 2013-04-16
* Author: pag
*/
#include "granary/test.h"
#if 0 && CONFIG_DEBUG_RUN_TEST_CASES && CONFIG_ENV_KERNEL && CONFIG_FEATURE_CLIENT_HANDLE_INTERRUPT && CONFIG_DEBUG_PERF_COUNTS
namespace test {
... |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without m... |
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
/*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... |
// Copyright 2018 Delft University of Technology
//
// 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 l... |
/*
* 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 "cylinder.h"
Cylinder::Cylinder(const Vector3 &pos, float radius, float height) :
p(pos), r(radius), h(height) {
}
Cylinder::~Cylinder() {
}
Vector3 Cylinder::collide(const Cylinder &other) const {
Vector3 bestMtv;
if (other.p.y < top() && other.top() > p.y) {
float radialSum = r + othe... |
#include <sstream>
#include "util.hpp"
std::ifstream open_file(const std::string& filename) {
std::ifstream file;
// Set exceptions to be thrown on failure
file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try {
file.open(filename);
} catch (std::system_error& e) {
... |
// Copyright 2018 The Beam 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
/*
Copyright (c) 2020-present Maximus5
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 conditions and the follo... |
/***************************************************************
*
* Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. Y... |
#include <selfie_perception/lane_detector.h>
int main(int argc, char **argv)
{
ros::init(argc, argv, "detect_markings");
ros::NodeHandle nh;
ros::NodeHandle pnh("~");
LaneDetector laneDetector(nh, pnh);
ros::ServiceServer service = nh.advertiseService("resetVision", &LaneDetector::resetVisionCallb... |
/*************************************************************************/
/* visual_server_scene.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#include <catch2/reporters/catch_reporter_junit.hpp>
#include <catch2/repor... |
/*
* Copyright (C) 2011, 2012 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of co... |
/***************************************************************
*
* Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. Y... |
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/typing-asm.h"
#include <limits>
#include "src/v8.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/codegen.h"
#incl... |
/*
* Copyright (c) 2007-2014 SlimDX Group
*
* 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... |
/*
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit.
You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times).
However, you may not engage in multiple transactions at the same t... |
/**
* Copyright 2019-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 applicabl... |
// Copyright 2021 - Trifolium Digital Limited
#include "BlueprintsAccessToGConfig.h"
#define LOCTEXT_NAMESPACE "FBlueprintsAccessToGConfigModule"
void FBlueprintsAccessToGConfigModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin ... |
/** ExaTN::Numerics: Numerical server
REVISION: 2020/11/16
Copyright (C) 2018-2020 Dmitry I. Lyakh (Liakh)
Copyright (C) 2018-2020 Oak Ridge National Laboratory (UT-Battelle) **/
/** Rationale:
(a) Numerical server provides basic tensor network processing functionality:
+ Opening/closing TAProL scopes (top scop... |
#include <cppunit/Exception.h>
#include <cppunit/SourceLine.h>
#include <cppunit/TestFailure.h>
#include <cppunit/TextOutputter.h>
#include <cppunit/TestResultCollector.h>
CPPUNIT_NS_BEGIN
TextOutputter::TextOutputter( TestResultCollector *result,
OStream &stream )
: m_result( resu... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
class Triangle
{
public:
void triangle()
{
cout<<"I am a triangle\n";
}
};
class Isosceles : public Triangle
{
public:
void isosceles()
{
cout<<"I am an isosceles tri... |
/***********************************************************************************************************************
* *
* libscopeprotocols ... |
// Copyright (c) 2016, Monero Research Labs
//
// Author: Shen Noether <shen.noether@gmx.com>
//
// 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... |
//
// This file is auto-generated, please do not modify directly!
//
#include <pybind11/pybind11.h>
// Type Declarations.
void BindVec2f( pybind11::module& );
void BindVec3f( pybind11::module& );
void BindVec4f( pybind11::module& );
void BindVec2i( pybind11::module& );
void BindVec3i( pybind11::module& );
void BindVe... |
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#include "pal_common.h"
#include "pal_time.h"
#include <stdlib.h>
#include <string.h>
#if HAVE_SCHED_GETCPU
#include <sched.h>
#endif
#if HAVE__NSGETENVIRON
#include <crt_externs.h>... |
// Copyright 2018 The Chromium OS 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 <stdlib.h>
#include <memory>
#include <utility>
#include <base/environment.h>
#include <base/files/file_path.h>
#include <base/files/file_ut... |
/*
Copyright 2018 Intel Corporation
This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you (License). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or t... |
/**************************************************************
*
* 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 y... |
/*
@copyright Louis Dionne 2014
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#include <boost/hana/detail/assert.hpp>
#include <boost/hana/ext/boost/mpl/vector.hpp>
#include <boost/hana/ext/std/integral_constant.hpp>
#inclu... |
/**
* ubirch-hallo (the code that drives the puppet)
*
* ...
*
* @author Matthias L. Jugel
*
* == LICENSE ==
* Copyright 2015 ubirch GmbH
*
* 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 Li... |
#ifndef _RMQ_1_n_hpp_
#define _RMQ_1_n_hpp_
#include "RMQ.hpp"
#include <stdlib.h>
#include <iostream>
using namespace std;
/* Implements the most naive <O(1),O(n)>-method to compute RMQ.
*/
class RMQ_1_n : public RMQ {
public:
// returns RMQ(i,j)
virtual DTidx query(DTidx, DTidx);
RMQ_1_n(DT* a, DTidx n);
~R... |
/*=========================================================================
Program: ParaView
Module: pqColorScaleEditor.cxx
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ... |
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-promise.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/counters.h"
#i... |
class Solution {
public:
bool isValid(string s) {
if(s.empty()) return true;
stack<char>paren;
for(char c : s)
{
if(c=='[' || c == '{' || c == '(')
paren.push(c);// when c is open bracket
else
{ //when c= ] || } || )
... |
#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int,int>;
int main() {
cout << fixed << setprecision(15);
int n;
cin >> n;
vector<long> x(n);
rep(i,n) cin >> x[i];
long ... |
#ifndef SPROUT_TUPLE_SSCRISK_CEL_ARRAY_HPP
#define SPROUT_TUPLE_SSCRISK_CEL_ARRAY_HPP
#include <cstddef>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/move.hpp>
#include <sscrisk/cel/array.hpp>
namespace sprout {
namespace tuples {
//
// get
//
template<std::size_t I, typename ... |
#include <cstdio>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <stack>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <string>
#include <cstring>
#include <cstdlib>
#define scd(x) scanf("%d", &x)
#define scc(x) scanf("%c", &x)
#define scd2(x,y) scanf("%d %d", &x, &y)
... |
/* Copyright 2020 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... |
#include "RendererSDL.h"
#include <SDL2/SDL.h>
//#include "../../EngineCamera.h"
#include "../../GameEngine.h"
#include <memory>
RendererSDL::RendererSDL()
{
}
RendererSDL::~RendererSDL()
{
}
bool RendererSDL::OnInit(SDL_Window * win, const UInt32 &flags, EngineRenderer * info)
{
p_SDLwin = win;
p_renderer = SDL_C... |
#ifndef INC_EsterelTokenTypes_hpp_
#define INC_EsterelTokenTypes_hpp_
/* $ANTLR 2.7.7 (2006-11-01): "esterel.g" -> "EsterelTokenTypes.hpp"$ */
#ifndef CUSTOM_API
# define CUSTOM_API
#endif
#ifdef __cplusplus
struct CUSTOM_API EsterelTokenTypes {
#endif
enum {
EOF_ = 1,
SIGS = 4,
VARS = 5,
TYPES = 6,
DECLS... |
// Problem # : 677A
// Created on : 2018-10-14 15:43:46
#include <bits/stdc++.h>
#define FR(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, h;
... |
#include "GameOverState.h"
#include "GameState.h"
namespace Flappy {
GameOverState::GameOverState(std::shared_ptr<GameData> data, int score) :
m_data(data)
{
m_scoreText.setString(std::to_string(score));
}
void GameOverState::init()
{
int score = std::stoi(m_scoreText.getString().toWideString(), nullptr, ... |
#include "ExampleProfiler.hpp"
#include <EnergyManager.hpp>
#include <chrono>
const auto energySavingInterval = std::chrono::milliseconds(10);
const auto halfingPeriod = 5 * energySavingInterval;
const auto doublingPeriod = 5 * energySavingInterval;
int main(int argumentCount, char* argumentValues[]) {
// We nee... |
#include "stdafx.h"
//------------------------------------------------------------------------------
//Copyright Robert Pelloni.
//All Rights Reserved.
//------------------------------------------------------------------------------
//#pragma once
Logger CreateNewAccount::log = Logger("CreateNewAccount");
Crea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.