text stringlengths 7 961k |
|---|
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
// -------------------------------------------------------------------------------------------------
// Copyright 2017 - NumScale SAS
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at
// ... |
#include "../host/typedefs.h"
const unsigned int bd_4_0[] = {0x51c7e81f,
0x7046b95f,
0x4913da9a,
0x077f6014,
0x61374173,
0xa00f29e3,
0xfbeb7f34,
0x033f26a5,
0x8df5dff8,
0x2653b30e,
0xe8ad2cf7,
0xfeb66277,
0x0fb976bd,
0xbddbdb79,
0xf893111c,
0x6c6af5e6,
0x0ceb57b0,
0x24753aaf,
0x1fb7e9ef,
0xec830324,
0x2710489b,
0xb6e95... |
// 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.
/*++
Module Name:
environ.cpp
Abstract:
Implementation of functions manipulating environment variables... |
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
HTML5Misc.cpp: HTML5 implementations of misc functions
=============================================================================*/
#include "CorePrivatePCH.h"
#include "HTM... |
// Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2016-2020 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "spork.h"
#include "messagesigner.h"
#include "net.h"
#include "netmessa... |
#pragma once
namespace ae3d
{
namespace FileSystem
{
struct FileContentsData;
}
/// Audio clip.
class AudioClip
{
public:
/// \param clipData Clip data from .wav or .ogg file.
void Load( const FileSystem::FileContentsData& clipData );
/// \return Clip's h... |
/*
* regionalign2bed.cpp
*
* Created on: 27.08.2015
* Author: mjaeger
*/
#include <iostream>
#include <fstream>
#include <string>
#include <math.h>
#include <seqan/arg_parse.h>
#include <seqan/sequence.h>
#include <seqan/stream.h>
#include <seqan/seq_io.h>
#include <seqan/align.h>
#include <seqan/score.h>
... |
//==================================================================================================
/**
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
**/
//==================================================================================================
#... |
// Copyright (c) 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 "tools/gn/action_values.h"
#include "tools/gn/settings.h"
#include "tools/gn/substitution_writer.h"
#include "tools/gn/target.h"
ActionValu... |
#include "sat_solver.h"
const token_t* const and_token = new const token_t("AND"); // "And" operator.
const token_t* const or_token = new const token_t("OR"); // "Or" operator.
const token_t* const not_token = new const token_t("NOT"); // "Not" operator.
const token_t* const impl_token = new const token_t("IM... |
#include "hmpt_utils.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include "hmpt_ansi_string.h"
#ifdef _WIN32
#include <Windows.h>
#endif
#ifdef unix
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <zlib.h>
#include <limits.h> /* for PATH_MAX */
#end... |
#include <chrono>
#include <gtkmm.h>
using namespace std::chrono_literals;
using namespace Glib;
using namespace Gtk;
class Form : public Window {
public:
Form() {
signal_idle().connect(sigc::mem_fun(*this, &Form::OnApplicationIdle));
this->resize(300, 300);
this->show_all();
}
private:
bool OnApp... |
#include <iostream>
#include <vector>
#include "a_star.h"
const int X = 1;
const int _ = 0;
vector<vector<int> > map = {
{1, 1, 1, 0, 0, 0,},
{1, 1, 1, 0, 1, 0,},
{0, 0, 0, 0, 0, 0,},
{1, 1, 1, 0, 1, 1,},
{1, 1, 1, 0, 1, 1,}
};
vector<int> start = {4, 3, 0}; //{x, y, theta}
/* theta = 0: up
... |
// EngineAPI.cpp: implementation of the CEngineAPI class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "EngineAPI.h"
#include "xr_ioconsole.h"
#include "xr_ioc_cmd.h"
extern xr_token* vid_quality_token;
////////////////////////////////////////////////////////... |
/*******************************************************************************
* Copyright 2016-2018 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.apa... |
//
// main.cpp
// Toposort
//
// Created by ChengnanHu on 3/3/21.
//
#include <iostream>
#include <list>
#include <queue>
#include <unordered_map>
using namespace std;
class graph
{
private:
list<char> *__adj_list;
int __size;
int __max_node_idx;
public:
graph(int size);
void add_node(cha... |
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2020, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may ... |
/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/gpu/GrProxyProvider.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkImage.h"
#include "include/gpu/GrDirectContext.h"
#include "include/private/G... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2018-2018 The bitcoinphantom Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <rpc/server.h>
... |
/*
* sample_stress_test_coroutine_malloc.cpp
*
* Created on: 2014年5月15日
* Author: owent
*
* Released under the MIT license
*/
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <inttypes.h>
#include <stdint.h>
// include manager header file
#include <libcopp/coroutine/co... |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "api/extrinsic/extrinsic_api_service.hpp"
#include "api/extrinsic/extrinsic_jrpc_processor.hpp"
#include "api/transport/impl/listener_impl.hpp"
namespace kagome::api {
ExtrinsicApiService::ExtrinsicApiServ... |
#include <epoxy/gl.h>
#include <GLFW/glfw3.h>
#include <boost/filesystem.hpp>
#include <boost/program_options.hpp>
#include <iostream>
#include <iomanip>
#include <shadertoy.hpp>
#include <shadertoy/utils/log.hpp>
#include <signal.h>
#include <png.hpp>
#include "gn_perf_config.hpp"
#include "stat_acc.hpp"
#include... |
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#undef min
#undef max
#include "defs.h"
#include "structs.h"
void makeCircle(int nvtxs, char * filename) {
FILE * fp;
int i,n;
n=nvtxs;
fp = fopen(filename, "w");
fprintf(fp, "%% %d vertices circle\n", n);
fprintf(fp,"%d %d\n",n,n);
for (i=1; i<=n... |
/*
* 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 ... |
#include <string>
#include "external/envoy/source/common/network/dns_resolver/dns_factory_util.h"
#include "external/envoy/source/common/network/utility.h"
#include "external/envoy/source/common/stats/isolated_store_impl.h"
#include "external/envoy/test/test_common/utility.h"
#include "source/common/uri_impl.h"
#incl... |
/***************************************************************************
* Copyright (c) Johan Mabille, Sylvain Corlay and Wolf Vollprecht *
* Copyright (c) QuantStack *
* *
* Distribute... |
/**
* 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 "SliderLocalData.h"
#include <react/components/image/conversions.h>
#include <react/debug/debugStringConvertibleUtils.h>... |
/*
* Copyright 2019 pixiv Inc. All Rights Reserved.
*
* Use of this source code is governed by a license that can be
* found in the LICENSE.pixiv file in the root of the source tree.
*/
#include "sdk/c/rtc_base/thread.h"
extern "C" RtcThread* rtcCreateThread() {
return rtc::ToC(rtc::Thread::Create().release... |
#include "CvGameCoreDLL.h"
#include "CvDiploParameters.h"
CvDiploParameters::CvDiploParameters(PlayerTypes ePlayer) :
m_eWhoTalkingTo(ePlayer),
m_eCommentType(NO_DIPLOCOMMENT),
m_bRenegotiate(false),
m_bAIContact(false),
m_bPendingDelete(false),
m_iData(-1),
m_bHumanDiplo(false),
m_bOurOffering(false),
m_bThe... |
#include <iostream>
using namespace std;
void f1(int a)
{
while(a--){
static int n = 0; // 初始化仅一次
int x = 0; // 每次循环都初始化
cout << "n=" << n++ << " , x=" << x << endl;
}
}
void f2(int val, int& ref){
val ++;
ref ++;
}
void error(string s) {
cout << s << endl;
}
typedef void (*PF)();
void cut()... |
//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include "td/telegram/AuthManager.h"
#include "td/telegram/t... |
// Copyright (c) 2011-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.
#include <qt/transactionrecord.h>
#include <consensus/consensus.h>
#include <interfaces/wallet.h>
#include <key_io.h>
#inclu... |
//
// Created by peter on 23.05.2020.
//
#include "Streaming.h"
#include <injection_utils/InjectorHelpers.h>
uint32_t &Streaming::mNumModelsRequested =
*reinterpret_cast<uint32_t *>( 0x975354 );
void Streaming::RequestModel( int32_t model, uint32_t flags )
{
InMemoryFuncCall<void>( 0x40E310, model, flags );... |
// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from turtlesim:srv/Spawn.idl
// generated code does not contain a copyright notice
#ifndef TURTLESIM__SRV__DETAIL__SPAWN__TRAITS_HPP_
#define TURTLESIM__SRV__DETAIL__SPAWN__TRAITS_HPP_
#include "turtlesim/srv/detail/spawn__struct.hpp"
#i... |
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): Pawel Dlotko
*
* Copyright (C) 2016 Inria
*
* Modification(s):
* - YYYY/MM Author: Desc... |
// Copyright (c) 2014 The Bitcoin Core developers
// Copyright (c) 2017-2019 The PIVX developers
// Copyright (c) 2020 The BonorumCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include "ut... |
/*
* Copyright 2004 The WebRTC 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 in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing ... |
// { dg-do run { target c++11 } }
// 2010-09-21 Paolo Carlini <paolo.carlini@oracle.com>
//
// Copyright (C) 2010-2017 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General P... |
#include "src/volume/volume_deleter.h"
#include "src/include/pos_event_id.h"
#include "src/volume/volume.h"
#include "src/volume/volume_base.h"
#include "src/volume/volume_name_policy.h"
#include "src/volume/volume_list.h"
#include <gtest/gtest.h>
namespace pos
{
TEST(VolumeDeleter, VolumeDeleter_)
{
// Given
... |
/*******************************************************************************
* Copyright 2020-2021 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.... |
#ifndef __LIB_UTILS_HPP
#define __LIB_UTILS_HPP
#include <experimental/optional>
namespace lib::utils {
template <class Base>
struct DerivedClass : public Base {
template <typename ...Args> DerivedClass (Args & ...args) : Base(args ...) {}
};
template <typename Base>
using Nullable = std::experimental:... |
// ***********************************************************************
// Author : the_hunter
// Created : 04-01-2020
//
// Last Modified By : the_hunter
// Last Modified On : 04-01-2020
// ***********************************************************************
#include <toml/pch.h>
/// <summar... |
#ifndef P2P_HANDLER_H
#define P2P_HANDLER_H
#include <ctime>
#include <string>
#include <boost/asio.hpp>
#include <iostream>
#include <boost/array.hpp>
using boost::asio::ip::tcp;
using namespace std;
using namespace boost::asio;
using namespace boost::asio::ip;
extern bool break_server_loop;
namespace crowd
{
... |
#include <procedural_factory.h>
#include <tiny_math_types.h>
namespace procedural
{
template<typename MT>
void make_wall(
content::API * engine
, typename MT::vector3_type const& position
, typename MT::quaternion_type const & orientation
, type... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzCore/Asset/AssetTypeInfoBus.h>
#include <AzFramework/StringFunc/StringFunc.h>
#inclu... |
#pragma once
#include "../texture2d.hpp"
#include "../texture2d_array.hpp"
namespace gli
{
template <typename texture>
texture flip(texture const & Texture);
}//namespace gli
#include "flip.inl" |
/*
* 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 ... |
///////////////////////////////////////////////////////////////////////////////
// Name: src/generic/tipwin.cpp
// Purpose: implementation of wxTipWindow
// Author: Vadim Zeitlin
// Modified by:
// Created: 10.09.00
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: ... |
// Copyright 2010-2014 RethinkDB, all rights reserved.
#ifndef ARCH_TIMING_HPP_
#define ARCH_TIMING_HPP_
#include <functional>
#include "arch/timer.hpp"
#include "concurrency/interruptor.hpp"
#include "concurrency/signal.hpp"
/* Coroutine function that delays for some number of milliseconds. */
void nap(int64_t ms)... |
// -*- mode: c++; indent-tabs-mode: nil; -*-
//
//
// Copyright (c) 2010-2015 Illumina, Inc.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: Vector3f.cpp
* Author: rafa
*
* Created on January 5, 2018, 12:14 PM
*/
#include <Zelta/Math/Vector3f.hpp>
names... |
#include <wx/wx.h>
#include "SimpleFrame.h"
#include "SimpleLayout.h"
#include "SimpleImagePanel.h"
void SimpleLayout::Create(wxFrame* frame, int width, int height)
{
wxPanel *panel_top = new wxPanel(frame, wxID_ANY, wxDefaultPosition, wxSize(width, 150));
panel_top->SetBackgroundColour(wxColor(42, 42, 255));
... |
// construction/destruction:
AutomatableParameter::AutomatableParameter(CriticalSection *criticalSectionToUse,
const String& newName, double newMinValue, double newMaxValue, double newInterval,
double newDefaultValue, int newScaling, int newDefaultMidiController)
: Parameter(criticalSectionT... |
// 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/convert_user_script.h"
#include <string>
#include <vector>
#include "base/base64.h"
#include "base/file_path.h"
... |
/*
#include <iostream>
#include <vector>
using namespace std;
* @lc app=leetcode id=26 lang=cpp
*
* [26] Remove Duplicates from Sorted Array
*
* https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/
*
* algorithms
* Easy (41.62%)
* Likes: 1686
* Dislikes: 3626
* Total Accepted: ... |
//
// Created by hauthorn on 3/4/17.
//
#include <iostream>
#include "BasePred.cpp"
#include "RedBlackTree.cpp"
class BinaryTreePred : public BasePred {
RedBlackTree *tree = new RedBlackTree;
public:
unsigned int pred(unsigned int x) {
return tree->pred(x);
}
/**
* Builds a pointer base... |
/* multilook a multispectral image or radar stack, square window, input
assumed ENVI type-4 32-bit IEEE standard floating-point format, BSQ
interleave:
this version doesn't read in the whole image. Band by band */
#include"misc.h"
int main(int argc, char ** argv){
if(argc < 3) err("multilook [input binary file name... |
#include <x509.hpp>
#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>
#include <openssl/conf.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/ts.h>
#include <context.hpp>
namespace jwtverifier {
void X509QuoteExt::init() {
// ... |
#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <console_bridge/console.h>
#include <bullet/HACD/hacdCircularList.h>
#include <bullet/HACD/hacdGraph.h>
#include <bullet/HACD/hacdHACD.h>
#include <bullet/HACD/hacdICHull.h>
#include <bullet/HACD/hacdVector.h>
TESSERACT_COMMON_IGNORE_WA... |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "receiverequestdialog.h"
#include "ui_receiverequestdialog.h"
#include "bitcoinunits.h"
#include "guiconstants.h"
#i... |
#include "../content/Context.hpp"
#include "../view/inputmethod/ExtractedText.hpp"
#include "./ExtractEditText.hpp"
namespace android::inputmethodservice
{
// Fields
// QJniObject forward
ExtractEditText::ExtractEditText(QJniObject obj) : android::widget::EditText(obj) {}
// Constructors
ExtractEditText::Extr... |
// Copyright 2021 D-Wave Systems 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) 2016, Humanoid Lab, Georgia Tech Research Corporation
* Copyright (c) 2016-2017, Graphics Lab, Georgia Tech Research Corporation
* Copyright (c) 2016-2017, Personal Robotics Lab, Carnegie Mellon University
* All rights reserved.
*
* This file is provided under the following "BSD-style" License:... |
#include"../localedef.h"
namespace fast_io_i18n
{
namespace
{
inline constexpr std::size_t numeric_grouping_storage[]{3};
}
}
#include"../main.h" |
/*
* Copyright 2017 Yeolar
*
* 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 wr... |
/**
* @file unit_test_fnd_complex_cos.cpp
*
* @brief cos(complex<T> const&) のテスト
*
* @author myoukaku
*/
#include <bksge/fnd/complex/complex.hpp>
#include <bksge/fnd/cmath/isinf.hpp>
#include <bksge/fnd/cmath/isnan.hpp>
#include <bksge/fnd/cmath/iszero.hpp>
#include <gtest/gtest.h>
#include <limits>
#include "c... |
#include "window_configuration.h"
const wchar_t* kFlutterWindowTitle = L"host_router_example";
const unsigned int kFlutterWindowOriginX = 10;
const unsigned int kFlutterWindowOriginY = 10;
const unsigned int kFlutterWindowWidth = 800;
const unsigned int kFlutterWindowHeight = 600; |
#include "d3d11_blend.h"
#include "d3d11_include.h"
#include "d3d11_device.h"
namespace dxvk {
D3D11BlendState::D3D11BlendState(
D3D11Device* device,
const D3D11_BLEND_DESC1& desc)
: D3D11StateObject<ID3D11BlendState1>(device),
m_desc(desc) {
}
D3D11BlendState::~D3D11BlendState() {... |
/*
-- MAGMA (version 2.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date
@author Hartwig Anzt
@precisions normal z -> s d c
*/
#include "magmasparse_internal.h"
#include <cuda.h> // for CUDA_VERSION
#define PRECISION_z
/... |
#ifndef NVUI_PLATFORM_WINDOWS_DIRECT2DPAINTGRID_HPP
#define NVUI_PLATFORM_WINDOWS_DIRECT2DPAINTGRID_HPP
#include <QString>
#include <QTimer>
#include <d2d1.h>
#include <d2d1_1.h>
#include <d2d1_2.h>
#include <d2d1_3.h>
#include <dwrite.h>
#include <dwrite_1.h>
#include <dwrite_2.h>
#include <dwrite_3.h>
#include "grid... |
// ____ _ __ _
// | _ \(_)/ _| | |
// | |_) |_| |_ _ __ ___ ___| |_
// | _ <| | _| '__/ _ \/ __| __|
// | |_) | | | | | | (_) \__ \ |_
// |____/|_|_| |_| \___/|___/\__| 2018 - 2019
//
//
// This file is distributed under the MIT License (MIT).
// See LICENSE.txt for details.
#... |
#include <min/oobbox.h>
template class min::oobbox<float, min::vec2>;
template class min::oobbox<float, min::vec3>; |
/*
« Un anno è bisestile se il suo numero è divisibile per 4, con l'eccezione degli anni secolari (quelli divisibili
per 100) che non sono divisibili per 400. »
Scrivere un programma C++ che, letto da input un intero positivo che rappresenta un anno, stampi la
stringa “BISESTILE” se l’anno introdotto è bisestile e la s... |
#include "SelectionWindow.h"
#include "GameInstance.h"
#include "AboutWindow.h"
#include "StartWindow.h"
#include <QFontDatabase>
#include <QApplication>
#include <cstdlib>
#include <ctime>
int main(int argc, char *argv[])
{
srand(time(nullptr));
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QAp... |
// Copyright 2018 Stephan Menzel. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "mredis/AsyncClient.hpp"
#include "tools/Log.hpp"
#include "tools/Random.hpp"
#include <boost/config.hpp>
#include <bo... |
/*
* 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) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "convolution_kernel_winograd_2x3_s1.h"
namespace kernel_selector {
constexpr uint32_t winograd_tile_n = 4;
constexpr uint32_t winograd_tile_m = 8;
constexpr uint32_t winograd_input_tile_width = 4;
constexpr uint32_t wino... |
/*=========================================================================
Program: Visualization Toolkit
Module: TestImageIterator.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 softwar... |
/*************************************************************************/
/* settings_config_dialog.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
/*
* The MIT License
*
* Copyright (c) 1997-2020 The University of Utah
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* right... |
// 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.
#include <stdio.h>
#include <ctype.h>
#include <crtdbg.h>
#include <utilcode.h>
#include "mdinfo.h"
// Global varia... |
#ifndef Mu2eUtilities_BinnedSpectrum_hh
#define Mu2eUtilities_BinnedSpectrum_hh
//
// Base class to allow generic access to all the classes that define
// a momentum spectrum.
//
//
// Original author Kyle Knoepfel
//
// C++ includes
#include <assert.h>
#include <stddef.h>
#include <algorithm>
#incl... |
#include "psdaq/hsd/AdcSync.hh"
#include <stdio.h>
#include <unistd.h>
using namespace Pds::HSD;
void AdcSync::set_delay(const unsigned* delay)
{
for(unsigned i=0; i<4; i++)
_delay[2*i] = delay[i];
unsigned v = _cmd;
usleep(1);
_cmd = v | (0xf<<16);
usleep(100);
_cmd = v;
for(unsigned i=0; i<4;... |
#include "engpch.h"
#include "WindowsWindow.h"
#include "Engine/Core/Input.h"
#include "Engine/Events/ApplicationEvent.h"
#include "Engine/Events/KeyEvent.h"
#include "Engine/Events/MouseEvent.h"
#include "Engine/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLContext.h"
namespace Engine
{
static uint8_t s_GLFW... |
#include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"%s, you must set a rpcpa... |
/*
* ====================== leet_16.cpp ==========================
* -- tpr --
* CREATE -- 2020.04.14
* MODIFY --
* ----------------------------------------------------------
* 16. 最接近的三数之和
*/
#include "innL... |
//uva10583
#include <bits/stdc++.h>
using namespace std;
#define MXN 50005
int N, M;
vector<int> G[MXN];
bool vis[MXN];
void dfs(int u)
{
vis[u] = 1;
for( int v : G[u] )
{
if( !vis[v] )
{
dfs(v);
}
}
}
int main()
{
ios::sync_with_stdio(0);
int tc = 0;
... |
#ifndef STAN_MATH_PRIM_META_AS_ARRAY_OR_SCALAR_HPP
#define STAN_MATH_PRIM_META_AS_ARRAY_OR_SCALAR_HPP
#include <stan/math/prim/fun/Eigen.hpp>
#include <stan/math/prim/meta/holder.hpp>
#include <stan/math/prim/meta/is_vector.hpp>
#include <stan/math/prim/meta/is_eigen.hpp>
#include <stan/math/prim/meta/is_stan_scalar.h... |
#include "Wave.h"
#include "SDL.h"
#include "EnemyBase.h"
#include "GamePlayMediator.h"
#include "ArenaHeap.h"
Wave::Wave(void):Manager()
{
}
Wave::~Wave(void)
{
}
void Wave::getFirst(std::vector<EnemyBase*>::iterator & _it)
{
_it = elements.begin();
}
void Wave::getLast(std::vector<EnemyBase*>::iterator & _i... |
#pragma once
#include "GenericArray.hpp"
#include "mxobject.hpp"
#include <algorithm>
#include "mxClassIDhelpers.hpp"
namespace mex {
// Typed NumericArray Wrapper for MxObjects
// Implements the TypedArraI<T> interface
//
// TypedArray<T> objects provide element access as if the
// array was a 2d Matrix (with ... |
#include <iostream>
#include <string>
using namespace std;
class Shape{
public:
virtual void draw() = 0;
};
class Circle : public Shape{
public:
void draw() { cout << "circle\n"; }
};
class Triangle : public Shape
{
public:
void draw() { cout << "triangle\n"; }
};
class Drawing{
public:
Shape *pSh... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... |
/*
Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
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
... |
class Solution {
public:
int titleToNumber(string columnTitle) {
int num = 0;
for (const char& c : columnTitle) {
num *= 26;
num += c - 'A' + 1;
}
return num;
}
}; |
#define x first
#define y second
typedef pair<double, double> pdd;
const int N = 10010;
int n;
pdd q[N]; //所有的点
int stk[N]; //栈
bool used[N]; //标记是否被用过
double get_dist(pdd a, pdd b) {
double dx = a.x - b.x;
double dy = a.y - b.y;
return sqrt(dx * dx + dy * dy);
}
pdd operator-(pdd a, pdd b) {
return {a... |
#include "cmp_enemy_turret.h"
#include "cmp_bullet.h"
#include "../animation.h"
#include "cmp_hurt_player.h"
#include "engine.h"
#include "system_resources.h"
#include <SFML/Graphics/CircleShape.hpp>
#include <SFML/Audio.hpp>
using namespace std;
using namespace sf;
sf::SoundBuffer effect3;
sf::Sound sound3;
void En... |
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2020, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may ... |
//===- ArithmeticOps.cpp - MLIR Arithmetic dialect ops implementation -----===//
//
// 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
//
//===---------------------------... |
#ifndef CPPIO_NETWORK_HTTP_ENCODING_INL_DO
#error Do not include this file directly!
#endif
#include <cppio/network/http/http.hpp>
namespace cppio::network::http
{
namespace details
{
inline char from_hex(char ch)
{
return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10;
}... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.