text stringlengths 5 1.04M |
|---|
// tagged pointer, for aba prevention
//
// Copyright (C) 2008 Tim Blechmann
//
// 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_LOCKFREE_TAGGED_PTR_HPP_INCLUDED
#define BOOST_LOCKFREE_TAGGED_P... |
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
#include "geometry/Point.h"
#include "gtest/gtest.h"
TEST(Point, initialize) {
cuhksz::Point<1> a1, b1(5);
EXPECT_DOUBLE_EQ(b1[0], 5);
cuhksz::Point<2> a2, b2(2, 3);
EXPECT_DOUBLE_EQ(b2[0], 2);
EXPECT_DOUBLE_EQ(b2[1], 3);
cuhksz::Point<3> a3, b3(1, 2, 3);
EXPECT_DOUBLE_EQ(b3[0], 1);
EXPECT_DOUBLE_EQ... |
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/arc/ime/arc_ime_service.h"
#include <utility>
#include "ash/constants/ash_features.h"
#include "ash/keyboard/ui/keyboard_ui_control... |
//////////////////////////////////////////////////////////////////////////////
/// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand
/// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI
///
/// Distributed under the Boost Software License, Version 1.0
/// ... |
/*
* Author: Jhonatan Casale (jhc)
*
* Contact : jhonatan@jhonatancasale.com
* : casale.jhon@gmail.com
* : https://github.com/jhonatancasale
* : https://twitter.com/jhonatancasale
* : http://jhonatancasale.github.io/
*
* Create date Fri 28 Apr 16:19:05 -03 2017
*
*/
#include ... |
#include "Time.hpp"
using namespace Util;
#if defined(WIN32) && _MSC_VER <= 1800
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
namespace
{
const long long g_Frequency = []() -> long long
{
LARGE_INTEGER frequency;
QueryPerformanceFrequency(&frequency);
return frequency.QuadPart;
}();
}
ClockImpl::time_p... |
#include "gtest/gtest.h"
#include "dsaa/dsaa.h"
#include "test_utils/test_utils.h"
class TrieFixture : public ::testing::Test
{
public:
void SetUp()
{
muggle_debug_memory_leak_start(&mem_state_);
bool ret;
ret = trie_init(&trie_[0], 0);
ASSERT_TRUE(ret);
ret = trie_init(&trie_[1], 8);
ASSERT_TRUE(ret)... |
#pragma once
#include "../../JObject.hpp"
class JByteArray;
namespace android::graphics
{
class Bitmap;
}
namespace android::graphics
{
class Canvas;
}
namespace android::graphics
{
class Paint;
}
namespace android::graphics
{
class Rect;
}
namespace android::graphics
{
class RectF;
}
namespace android::graphics... |
#include <iostream>
#include <seqan/sequence.h>
#include <seqan/graph_algorithms.h>
using namespace seqan;
int main()
{
// Fill a string and define corresponding weights.
String<char> seq("zeitgeist");
String<unsigned int> weights;
resize(weights, length(seq), 1);
assignProperty(weights, 2, 10);
... |
topic "Ftp";
[2 $$0,0#00000000000000000000000000000000:Default]
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,2#27521748481378242620020725143825:desc]
[0 $$3,0#96390100711032703541132217272105:end]
[H6;0 $$4,0#05600065144404261032431302351956:begin]
[i448;a25;kKO9;2 $$5,0#371385314263... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#define MX 110000
#define MXV 44000
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef unsigned int uint;
typedef vector <ull> ullv1;
typedef vector <vector <ull>> ullv2;
st... |
/**********************************************************************
Audacity: A Digital Audio Editor
ControlToolBar.cpp
Dominic Mazzoni
Shane T. Mueller
James Crook
Leland Lucius
*******************************************************************//**
\class ControlToolBar
\brief A ToolBar that has ... |
// 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 "ash/display/display_error_observer.h"
#include <memory>
#include "ash/display/display_util.h"
#include "ash/strings/grit/ash_strings.h"
#inclu... |
#include "data.h"
#include <exception>
/**
* Does a very dumb parse for bool.
* The point is not accuracy, but rather to get some
* reasonable value.
* @param [in] str The string to parse
* @return The boolean value
*/
static bool parseBool(const std::string &str);
bool parseBool(const std::string &str) {
typede... |
/***************************************************************************
* Copyright (c) 2016, Wolf Vollprecht, Johan Mabille and Sylvain Corlay *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* ... |
// Copyright (c) 2009-2018 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/navcoin-config.h>
#endif
#include <assert.h>
#include <cstddef>
#include <cstdin... |
#include <THC/THCGeneral.h>
#include <ATen/cuda/detail/CUDAHooks.h>
#include <ATen/cuda/CUDAConfig.h>
#if AT_MAGMA_ENABLED()
#include <magma_v2.h>
#endif
namespace {
void _THCMagma_init() {
#if AT_MAGMA_ENABLED()
magma_init();
#endif
}
struct Initializer {
Initializer() {
::at::cuda::detail::THCMagma_init = ... |
/*************************************************************************
* *
* ODER's Utilities Library. Copyright (C) 2008 Oleh Derevenko. *
* All rights reserved. e-mail: odar@eleks.com (change all "a" to "e") *
* ... |
#include <bits/stdc++.h>
#define IOS std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr);
// #define __DEBUG__
#ifdef __DEBUG__
#define DEBUG(...) printf(__VA_ARGS__)
#else
#define DEBUG(...)
#endif
#define filename ""
#define setfile() freopen(filename".in", "r", stdin); freope... |
#include <cstdio>
using namespace std;
const long MOD = 1000003l;
long dp[51][51][51][51]{}, ways[51][51]{};
bool cp[101][101];
bool coprime(int, int);
void solve();
int main()
{
int t, n, m;
for (int i = 2; i <= 100; i++) {
for (int j = 2; j < i; j++) cp[i][j] = cp[j][i] = coprime(i, j);
cp[i][i] = false;
}
... |
/*=============================================================================
Copyright (c) 1999-2003 Jaakko Jarvi
Copyright (c) 2001-2006 Joel de Guzman
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... |
#pragma once
#include <string>
namespace elona
{
void map_initialize();
void map_initcustom(const std::string&);
void map_tileset(int = 0);
void map_converttile();
void map_createroomdoor();
void map_makedoor();
void map_nextdir1(int = 0, int = 0);
void map_nextdir2(int = 0, int = 0);
void map_placearena(int chara_in... |
# /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.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)
# */
#
# /* Revised by Paul Mensonides (2002) */
# /* Revised by Edward Dien... |
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* ----... |
// This file is licensed under the Elastic License 2.0. Copyright 2021 StarRocks Limited.
#include "pipeline_test_base.h"
#include "util/thrift_util.h"
namespace starrocks::pipeline {
struct Counter {
size_t pull_chunk_num;
size_t push_chunk_num;
};
using CounterPtr = std::shared_ptr<Counter>;
void assert_... |
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Copyright (c) 2019, Lawrence Livermore National Security, LLC.
*
* Produced at the Lawrence Livermore National Laboratory
*
* LLNL-CODE-746361
*
* All rights reserved. See COPYRIGHT for details.
*
* This file is part of the GEOS... |
#ifndef BOOST_MATH_INTERPOLATORS_DETAIL_QUINTIC_HERMITE_DETAIL_HPP
#define BOOST_MATH_INTERPOLATORS_DETAIL_QUINTIC_HERMITE_DETAIL_HPP
#include <algorithm>
#include <stdexcept>
#include <sstream>
#include <cmath>
namespace boost::math::interpolators::detail {
template<class RandomAccessContainer>
class quintic_hermite... |
#ifndef GRAVITY_COMPENSATION_CONTROLLER_HPP
#define GRAVITY_COMPENSATION_CONTROLLER_HPP
#include <ctime>
#include "jaco2_controller.h"
#include <kinova/KinovaTypes.h>
class GravityCompensationController : public Jaco2Controller
{
public:
GravityCompensationController(Jaco2State &state, Jaco2API &api, TerminationCal... |
// Copyright 2020 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 2014 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... |
/**
* Copyright (c) Glow Contributors. See CONTRIBUTORS file.
*
* 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 b... |
/*
*
* Copyright (c) 2020-2022 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... |
/*
* Copyright 2009-2017 Alibaba Cloud 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... |
#include "node.h"
bool EmptyNode::Evaluate(const Date& date, const string& event) const {
return true;
}
template <typename T>
bool CompareTo(const T& lhs, const T& rhs, Comparison cmp) {
switch (cmp) {
case Comparison::Less:
return lhs < rhs;
case Comparison::LessOrEqual:
return lhs <= rhs;
case Co... |
#include "src/array/device/array_device_manager.h"
#include <gtest/gtest.h>
#include "src/include/array_config.h"
#include "test/unit-tests/array/device/array_device_list_mock.h"
#include "test/unit-tests/device/base/ublock_device_mock.h"
#include "test/unit-tests/device/device_manager_mock.h"
using ::testing::_;
us... |
// 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/extensions/api/serial/serial_connection.h"
#include <sys/ioctl.h>
#include <termios.h>
namespace extensions {
namespace {
... |
// Splitting policy used - split if required required size is less than the size of block allocated using "First-Fit" or "Best-Fit"
// coalescing policy used - coalesce each time free is called
#include<bits/stdc++.h>
using namespace std;
struct block
{
int size, addr;
bool allocBit;
string strD... |
/*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_METRIC_BINARY_METRIC_HPP_
#define LIGHTGBM_METRIC_BINARY_METRIC_HPP_
#include <LightGBM/metric.h>
#include <LightGBM/utils/common.h... |
//--------------------------------------------------------------------------
// File and Version Information:
// $Id: MatDBInfo.hh 516 2010-01-15 08:22:00Z stroili $
//
// Description:
// Class MatDBInfo. Implementation of MaterialInfo interface
// using the database.
//
// Environment:
// Software developed for... |
// Copyright 2015 Thomas Trapp
//
// 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) 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 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/securityhub/model/AwsAutoScalingAutoScalingGroupDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Uti... |
//
// Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved.
//
#ifndef PC_SNOWFLAKETYPE_HPP
#define PC_SNOWFLAKETYPE_HPP
#include <string>
#include <algorithm>
#include <unordered_map>
namespace sf
{
class SnowflakeType
{
public:
enum class Type : uint8_t
{
ANY = 0,
ARRAY = 1,
BINARY ... |
// Copyright (C) 2019 Rhys Mainwaring
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is dist... |
/*
Copyright 2016 Aldo J. Nunez
Licensed under the Apache License, Version 2.0.
See the LICENSE text file for details.
*/
#include "Common.h"
#include "Graphics.h"
// Y determines the palette, X determines the color in the palette.
// But, it looks like the minimum height of a bitmap is 16.
cons... |
// 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.
//*****************************************************************************
// File: daccess.cpp
//
//
// ClrDa... |
#include "Mouse.hpp"
#include <GLFW/glfw3.h>
#include "Bitmaps/Bitmap.hpp"
#include "Maths/Maths.hpp"
namespace acid {
void CallbackMouseButton(GLFWwindow *window, int32_t button, int32_t action, int32_t mods) {
Mouse::Get()->m_onButton(static_cast<MouseButton>(button), static_cast<InputAction>(action), MakeBitMask<... |
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
#include <map>
#include <string>
#include <boost/test/unit_test.hpp>
#include "json/json_spirit_writer_template.h"
#include "main.h"
#include "wallet.h"
using namespace std;
using namespace json_spirit;
// In script_tests.cpp
extern Array read_json(const std::string& filename);
extern CScript ParseScript(string s);
... |
// Copyright (c) 2018-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,... |
#include <gtest/gtest.h>
#include <gmock/gmock-matchers.h>
#include "meta/metamanager.hpp"
#include "game/skirmish/meta/deploymentzonemetaclass.hpp"
#include "game/deploymentzone.hpp"
using ::testing::NotNull;
TEST(DeploymentZoneMetaClass_Deserialize, Then_all_properties_are_initialized)
{
// Arrange
YAML::Node n... |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
/**************************************************************************\
*
* This file is part of the Coin 3D visualization library.
* Copyright (C) by Kongsberg Oil & Gas Technologies.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public ... |
/******************************************
Copyright (c) 2016, Mate Soos
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,... |
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/blit_commands_helper_test... |
#include <qqmlengine.h>
#include <qqmlcontext.h>
#include <qqml.h>
#include <QGuiApplication>
#include <QtQuick/qquickitem.h>
#include <QtQuick/qquickview.h>
/*
This example illustrates exposing a Database
Connections as a model in QML
*/
int main(int argc, char ** argv)
{
QGuiApplication app(argc, argv);
... |
#include <wx/filedlg.h>
#include <wx/utils.h>
#include <wx/wfstream.h>
#include <wx/datetime.h>
#include <fstream>
#include <iostream>
#include "futils.h"
#include "ConnectionFrame.h"
#include "MyFrame.h"
#include "cApp.h"
bool contentSaved = true;
void MyFrame::OnExit(wxCommandEvent& event)
{
// Closes the ap... |
#include "test/integration/server.h"
#include <memory>
#include <string>
#include "envoy/http/header_map.h"
#include "common/common/thread.h"
#include "common/filesystem/filesystem_impl.h"
#include "common/local_info/local_info_impl.h"
#include "common/network/utility.h"
#include "common/stats/thread_local_store.h"
... |
//===- lib/Support/ErrorHandling.cpp - Callbacks for errors ---------------===//
//
// 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
//
//===---------------------------... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/common/common.h>
#include <aws/core/utils/event/EventHeader.h>
#include <aws/core/utils/event/EventMessage.h>
#include <aws/core/utils/event/EventStreamDecoder.h>
#include <aws/core/utils... |
// Copyright 2014 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/devtools/device/usb/android_usb_socket.h"
#include <stddef.h>
#include "base/callback_helpers.h"
#include "base/logging.h"
#inc... |
//
// ResizeExecution.cpp
// MNN
//
// Created by MNN on 2019/02/28.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include "backend/opencl/execution/ResizeExecution.hpp"
#include "core/Macro.h"
#include "core/TensorUtils.hpp"
namespace MNN {
namespace OpenCL {
ResizeExecution::ResizeExecution(const std:... |
/*
* 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 2012 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... |
// This file is auto-generated, don't edit it. Thanks.
#include <alibabacloud/quickbi_public_20220101.hpp>
#include <alibabacloud/endpoint_util.hpp>
#include <alibabacloud/open_api.hpp>
#include <alibabacloud/open_api_util.hpp>
#include <boost/any.hpp>
#include <boost/throw_exception.hpp>
#include <darabonba/core.hpp>... |
#pragma once
#include <cstddef>
#include <functional>
#include <memory>
namespace elle
{
template<typename T, typename... Args>
std::unique_ptr<T>
make_unique(Args&&... args);
template <typename T>
class generic_unique_ptr:
public std::unique_ptr<T, std::function<void (T*)>>
{
/*------.
| Types |... |
// Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2018
//
// Bibliotheque Lapin
bool gl_bunny_sound_sprite_trap = true;
void bunny_sound_sprite_trap_or_sync(bool trap)
{
gl_bunny_sound_sprite_trap = trap;
}
|
#include <bits/stdc++.h>
#define N 605
#define M 100020
#define ll long long
using namespace std;
inline int read(){
int x=0,f=0;char ch=getchar();
while(ch>'9'||ch<'0'){ch=='-'&&(f=1);ch=getchar();}
while(ch<='9'&&ch>='0'){x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
return f?-x:x;
}
namespace MCMF{
#ifndef inf
#define... |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
#pragma once
#include "es/protoground.hpp"
#include "es/math/protoground-glm.hpp"
#include <fbxsdk.h>
namespace es {
namespace fbx {
/**
* shared_ptrでラップする
*/
template<typename T>
std::shared_ptr<T> wrapFbxSharedPtr(T *ptr) {
return std::shared_ptr<T>(ptr, [](T *ptr) {
if (ptr) {
... |
// Copyright 2016 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa/fxgraphics/cfx_pattern.h"
CFX_Pattern::CFX_Pattern(FX_HatchStyl... |
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
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)
=========================================... |
//
// ssl/impl/context.ipp
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
// Copyright (c) 2005-2021 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 a... |
#include "wasgo_state.h"
#include "core/io/marshalls.h"
#include "wasgo_callable.h"
#include "wasgo_runtime.h"
#include "wasm_export.h"
#include <cstdint>
void WasGoState::_initialize() {
_stop();
reference_object(this);
ERR_FAIL_COND(!wasm_script.is_valid());
ERR_FAIL_COND(!is_inside_tree());
String err_string;... |
/**
* @file
* @brief functions used during combat
*/
#include "AppHdr.h"
#include "fight.h"
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "art-enum.h"
#include "cloud.h"
#include "coord.h"
#include "coordit.h"
#include "delay.h"
#include "english.h"
#inclu... |
// BugReporter.cpp - Generate PathDiagnostics for Bugs ------------*- C++ -*--//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... |
/*! file insert.hpp
*
* @copyright Licensed under MIT license by hyperQ – Ewa Hendzel
*
*/
#ifndef INSERT_HPP_
#define INSERT_HPP_
#include <unordered_map>
namespace helpers {
/**
* @brief A helper function that inserts linear or quadratic
* coefficients int o QUBO model.
*
* @tparam NodeType An integer numb... |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/cryptauth/foreground_eid_generator.h"
#include <memory>
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "b... |
//
// Created by Jiang Lu on 6/3/15.
//
#include <cassert>
#include "dukv8/function.h"
#include "dukv8/isolate.h"
#include "dukv8/string.h"
#include "dukv8/integer.h"
#include "dukv8/function_template.h"
#include "dukv8/duk_stack_scope.h"
#include "dukv8/local.h"
#include "dukv8/arguments.h"
namespace v8 {
RTTI_IMPL... |
//Name: Aria Avazkhani
//Student ID: 134465160
#include <iostream>
#include "tools.h"
using namespace std;
namespace sict {
// displays the user interface menu
int menu() {
cout << "1- Number of Samples" << endl;
cout << "2- Sample Entry" << endl;
cout << "3- Draw Graph" << endl;
cout << "0- Exit" << end... |
//===-------------------- ONNXOps.hpp - ONNX Operations -------------------===//
//
// Copyright 2019 The IBM Research Authors.
//
// =============================================================================
//
// This file defines ONNX operations in the MLIR operation set.
//
//===---------------------------------... |
/*
* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
* rights reserved.
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2012 Samsung Electronics. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of... |
#include <drivers/Joystick.h>
#include <hardware/HwJoystick.h>
Joystick::Joystick() :
_buttonStateOld(0x00),
_buttonPressed(0x00)
{
}
Joystick::~Joystick()
{
}
void Joystick::setup()
{
hwJoystickSetup();
}
/* Must be called at the beginning of every frame */
void Joystick::update()
{
/* Sample button state to ... |
#include <ros/ros.h>
#include <move_base_msgs/MoveBaseAction.h>
#include <actionlib/client/simple_action_client.h>
#include <tf/transform_broadcaster.h>
#include <sstream>
typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;
int main(int argc, char** argv){
ros::init(argc, a... |
// 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... |
#pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//Registers group
namespace I2cI2con{ ///<I2C Control Register
using Addr = Register::Address<0x40020000,0xffffff0b,0x00000000,unsigned>;
///Assert Acknowledge control bit. When AA=1 prior to address or data received, an acknowledge... |
#include <iostream>
#include <SDL2/SDL_image.h>
#include "Window.h"
/*
Window constructor
uint w: window width
uint h: window height
std::string title: window title
bool resize: is the window resizable
*/
Window::Window(uint w, uint h, std::string title, bool resize){
window = NULL;
renderer = NULL;
if(re... |
#ifndef LSMS_DEVICE_STORAGE_HPP
#define LSMS_DEVICE_STORAGE_HPP
#include "Real.hpp"
#include "Complex.hpp"
#include <cublas_v2.h>
#ifdef _OPENMP
#include <omp.h>
#else
#ifndef LSMS_DUMMY_OPENMP
#define LSMS_DUMMY_OPENMP
inline int omp_get_max_threads() {return 1;}
inline int omp_get_num_threads() {return 1;}
inline i... |
/**
* Copyright 2014-2017 Andreas Schäfer
* Copyright 2018 Google
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef FLAT_ARRAY_SHORT_VEC_HPP
#define FLAT_ARRAY_SHORT_VEC_HPP
// disable certain warnings from... |
/*
* Copyright 2017 WebAssembly Community Group participants
*
* 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... |
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// Use, modification and distribution are 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).
//
// See http://www.boost.org/libs/typ... |
/*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include <level_zero/zet_api.h>
#include "sysman/sysman.h"
ZE_APIEXPORT ze_result_t ZE_APICALL
zesDeviceGetProperties(
zes_device_handle_t hDevice,
zes_device_properties_t *pProperties) {
return L0::SysmanDevice::fr... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/medialive/model/AacProfile.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
... |
#include "external_source_ui.h"
#include "printing.h"
#include "config.h"
#include "util.h"
#include <iostream>
Move stringToMove(const std::string& moveStr)
{
Move move;
move.type = M_CLOSE;
if (stringMatch(moveStr, move.toString())) return move;
move.type = M_EXCHANGE;
if (stringMatch(moveStr, ... |
// Copyright 2021 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... |
#pragma once
#include "Game/EntityDefinition.hpp"
#include "Engine/Core/XmlUtils.hpp"
#include <map>
#include <vector>
class Texture;
class RenderContext;
class EnvironmentEntityDefinition;
class CutsceneDefinition;
class MapDefinition
{
public:
static std::map< std::string, MapDefinition* > s_definitionMap;
stati... |
//
// Author: Vladimir Migashko <migashko@gmail.com>, (C) 2013-2015
//
// Copyright: See COPYING file that comes with this distribution
//
#include "logger_singleton.hpp"
#include "logger_config_json.hpp"
#include "logger.hpp"
#include <wfc/module/singleton.hpp>
#include <wfc/module/instance.hpp>
#include <wfc/name.hp... |
#include <iostream>
#include <optional>
#include <vector>
using namespace std;
namespace
{
template<class T>
bool pop_if_exist(vector<T> &vec, T &item)
{
if (vec.size() == 0)
return false;
item = move(vec.back());
vec.pop_back();
return true;
}
template<class T>
std::optional<T> pop_if_exist(vector<T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.