text stringlengths 7 961k |
|---|
/*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2020 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... |
// Copyright 2004-present Facebook. All Rights Reserved.
#include "ABI22_0_0JSCSamplingProfiler.h"
#include <ABI22_0_0jschelpers/ABI22_0_0JSCHelpers.h>
static JSValueRef pokeSamplingProfiler(
JSContextRef ctx,
JSObjectRef function,
JSObjectRef thisObject,
size_t argumentCount,
const JSValueRef ar... |
/*
* Copyright 2020 Xilinx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chain.h>
#include <config.h>
#include <core_io.h>
#include <interfaces/chain.h>
#include <key_io.h>
#include <merkl... |
/*
* This file is part of the phpv8/php-v8 PHP extension.
*
* Copyright (c) 2015-2018 Bogdan Padalko <thepinepain@gmail.com>
*
* Licensed under the MIT license: http://opensource.org/licenses/MIT
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this so... |
/*
Copyright 2019 Alain Dargelas
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... |
// Copyright 2018 The Flutter 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 "flutter/shell/common/persistent_cache.h"
#include <memory>
#include <string>
#include "flutter/fml/base32.h"
#include "flutter/fml/file.h"
#inc... |
// Ivan Carvalho
// Solution to https://www.spoj.com/problems/HIKE/
#include <cstdio>
#include <queue>
#define MAXN 51
using namespace std;
struct position{
int p1,p2,p3;
int distance;
};
char matrix[MAXN][MAXN];
int processado[MAXN][MAXN][MAXN],n,s1,s2,s3,possivel;
int main(){
while(scanf("%d",&n) && n){
possivel... |
/*
* Copyright (c) 2012 The WebM 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 contributin... |
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "vm/compiler/frontend/kernel_to_il.h"
#include "platform/assert.h"
#include "vm/compiler/aot/... |
#ifndef SERVER_API_BASE_PARAMETERS_GRAMMAR_HPP
#define SERVER_API_BASE_PARAMETERS_GRAMMAR_HPP
#include "engine/api/base_parameters.hpp"
#include "engine/bearing.hpp"
#include "engine/hint.hpp"
#include "engine/polyline_compressor.hpp"
#include <boost/optional.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include... |
/*
Copyright 2017 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 law or agreed to in ... |
// Copyright (C) 2019-2020 Zilliz. 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 l... |
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "single_layer_tests/activation.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
using namespace ngraph::helpers;
namespace {
// Common params
const std::vector<I... |
/*
* Copyright (c) 2019 SK Telecom Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... |
/*
* Copyright (c) 2007, Laminar Research.
*
* 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, ... |
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1992 - 2015
// ** University Corporation for Atmospheric Research(UCAR)
// ** National Center for Atmospheric Research(NCAR)
// ** Research Applications Laboratory(RAL)
// ** P.O.Box 3000, Boulder, Colorado, 80307... |
// Windows/MemoryLock.cpp
#include "MemoryLock.h"
namespace NWindows {
namespace NSecurity {
#ifndef UNDER_CE
#ifdef _UNICODE
#define MY_FUNC_SELECT(f) :: f
#else
#define MY_FUNC_SELECT(f) my_ ## f
extern "C" {
typedef BOOL (WINAPI * Func_OpenProcessToken)(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenH... |
/**
* Copyright (C) 2015 Dato, Inc.
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*/
#include <boost/algorithm/string.hpp>
#include <logger/assertions.hpp>
#include <fileio/general_fstream_source.hpp>
namespace gra... |
/**********************************************************************
* Copyright (c) 2008-2016, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by t... |
/** Copyright (c) 2013, Sean Kasun */
#include <QtWidgets/QFileDialog>
#include <QSettings>
#include <QDir>
#include "./settings.h"
Settings::Settings(QWidget *parent) : QDialog(parent) {
m_ui.setupUi(this);
setWindowTitle(tr("%1 Settings").arg(qApp->applicationName()));
connect(m_ui.checkBox_DefaultLocation,... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2020 The SUPERDOGE Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licens... |
//此源码被清华学神尹成大魔王专业翻译分析并修改
//尹成QQ77025077
//尹成微信18510341407
//尹成所在QQ群721929980
//尹成邮箱 yinc13@mails.tsinghua.edu.cn
//尹成毕业于清华大学,微软区块链领域全球最有价值专家
//https://mvp.microsoft.com/zh-cn/PublicProfile/4033620
//版权所有(c)2011 LevelDB作者。版权所有。
//此源代码的使用受可以
//在许可证文件中找到。有关参与者的名称,请参阅作者文件。
#include "leveldb/db.h"
#include "db/memtable.h"... |
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_... |
/*
* Copyright (C) 2018 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... |
// Lzma2Decoder.cpp
#include "../../../C/Alloc.h"
#include "../Common/StreamUtils.h"
#include "Lzma2Decoder.h"
static HRESULT SResToHRESULT(SRes res)
{
switch (res)
{
case SZ_OK: return S_OK;
case SZ_ERROR_MEM: return E_OUTOFMEMORY;
case SZ_ERROR_PARAM: return E_INVALIDARG;
// case SZ_ERROR_PR... |
/*
By downloading, copying, installing or using the software you agree to this
license. If you do not agree to this license, do not download, install,
copy or use the software.
License Agreement
For Open Source Computer Vision Library
(3-clause BSD Licens... |
/*
Copyright (c) 2022 Daniel Valcour
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, publish, distrib... |
#pragma once
#include <nall/algorithm.hpp>
namespace nall {
namespace memory {
inline auto allocate(unsigned size) -> void*;
inline auto allocate(unsigned size, uint8_t data) -> void*;
inline auto resize(void* target, unsigned size) -> void*;
inline auto free(void* target) -> void;
inline auto compare(c... |
// Copyright 2018 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 "media/gpu/test/video_test_helpers.h"
#include <limits>
#include "base/callback_helpers.h"
#include "base/logging.h"
#include "base/memory/ptr_... |
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_archive.cpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "tasktraypopup.h"
#include <QSystemTrayIcon>
#include <QShowEvent>
#include <QDesktopWidget>
#include <QDebug>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
//, ui(new Ui::MainWindow)
, taskTrayPopup(nullptr)
{
hide();
setF... |
// Project: Advanced Locomotion System V4 on C++
// Copyright: Copyright (C) 2021 Doğa Can Yanıkoğlu
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
// Source Code: https://github.com/dyanikoglu/ALSV4_CPP
// Original Author: Doğa Can Yanıkoğlu
#include "Componen... |
#include<bits/stdc++.h>
#define ll long long
#define ld long double
char s[500];
using namespace std;
bool prime(int n){
int m=sqrt(n);
for(int i=2;i<=m;i++){
if(n%i==0) return false;
}
return true;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n,q=0;
cin>>n;
for(int i=0;i<n;i++){
cin>>s;
in... |
/*
* Copyright (c) 2017 Queued team
*
* 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, publ... |
// Copyright (c) 2012-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "clientversion.h"
#include "tinyformat.h"
#include <string>
/**
* Name of client reported in the 'version' message. R... |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Jakob-Niklas See <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "BrowserWindow.h"
#include "BookmarksBarWidget.h"
#include "Browser.h"
#include "ConsoleWidget.h"
#include "CookieJar.h"
#include "InspectorWidge... |
/****************************************************************************
* NxWidgets/libnxwidgets/include/csliderhorizontal.hxx
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modi... |
/**
* This is the C++ adaptation and derivative work of Myia (https://github.com/mila-iqia/myia/).
*
* Copyright 2019-2021 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... |
#pragma once
#include <cassert>
#include <cstdint>
#include <stdexcept>
#include <string>
#include <memory>
#include <unordered_map>
#include <forward_list>
#include <vector>
#include <mutex>
#include <boost/property_tree/ptree.hpp>
#include <boost/signals2/signal.hpp>
// https://github.com/g-truc/glm
#include <glm/... |
/*
* Copyright (c) 2006 The Regents of The University of Michigan
* Copyright (c) 2017 The University of Virginia
* 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... |
#include "OrderController.h"
#include <DSPostgreSQLQuery.h>
#include <DSDateTime.h>
#include <DSCgi.h>
#include "OrderPositionController.h"
#include "OrderPositionEntity.h"
#include "OrderPositionEntities.h"
#include "ClientEntity.h"
#include "ClientController.h"
#include "ConstantsLibrary.h"
#include "NameType.h"
#inc... |
// 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 <tuple>
#include <vector>
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/macros.h"
#include "base/run_loop.h"
#include... |
#include<iostream>
#include<cstdlib>
using namespace std;
struct node{
int data;
node * left;
node * right;
};
node * root = NULL;
void insert(int data)
{
node * temp = (node*)malloc(sizeof(node));
temp -> data = data;
temp -> left = NULL;
temp -> right = NULL;
if (root == NULL)
{
root = temp;
return... |
#include <derecho/openssl/hash.hpp>
#include <derecho/openssl/openssl_exception.hpp>
namespace openssl {
const EVP_MD* get_digest_type_ptr(DigestAlgorithm digest_type) {
switch(digest_type) {
case DigestAlgorithm::MD5:
return EVP_md5();
case DigestAlgorithm::SHA1:
return EV... |
//===- ASTContext.cpp - Context to hold long-lived AST nodes --------------===//
//
// 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
//
//===---------------------------... |
/***************************************************/
/*! \class BlitSaw
\brief STK band-limited sawtooth wave class.
This class generates a band-limited sawtooth waveform using a
closed-form algorithm reported by Stilson and Smith in "Alias-Free
Digital Synthesis of Classic Analog Waveforms", 1996. T... |
#pragma once
#include "timers/single_shot.hpp"
namespace burda
{
namespace timers
{
/// Thread-safe blocking timer that does given action in a regular fashion during fixed time intervals
class periodic : public single_shot
{
public:
/// Starts periodic timer using "single_shot::start" method
/// Blocks curre... |
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited
// Copyright (c) 2014-2017 Francois Beaune, The appleseedhq Organization
//
/... |
// Copyright (c) 2019 The PIVX developers
// Copyright (c) 2019-2020 The Kabberry developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qt/kabberry/coldstakingmodel.h"
#include "uint256.h"
#include "bitcoinunits.h... |
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
#define INF 1000000000
bool has_one_letter_difference(string a, string b)
{
if (a.size()... |
//===-- FileSpec.cpp ------------------------------------------------------===//
//
// 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
//
//===---------------------------... |
#include "../../template.hpp"
using i32 = std::int32_t;
using i64 = std::int64_t;
//const i32 INF = 1000000000 + 7;
const i32 fastio_ = ([](){std::ios_base::sync_with_stdio(0); std::cin.tie(0);return 0;})();
i32 elems[10002];
i32 dp[10002];
i32 rec(i32 n) {
if (n <= 0) return 0;
if (dp[n] != -1) return dp[n]... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <proxygen/lib/utils/ParseURL.h>
#include <algorithm>
#include <folly/portability/Sockets.h>... |
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bip38.h"
#include "init.h"... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkGLTFDocumentLoader.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 sof... |
// Copyright (c) 2019-2020 The PIVX developers
// Copyright (c) 2020 The AllForOneBusiness developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qt/allforonebusiness/settings/settingsinformationwidget.h"
#include ... |
/*
* PortBurn
* Windows XP IMAPI implementation
*
* Authors:
* Leland Lucius
*
* The following MSDN page was used as a guide:
* http://msdn2.microsoft.com/en-us/library/aa366236.aspx
*
* License: LGPL
*/
#include "portburn.h"
#define _WIN32_WINNT 0x0400
#include <windows.h>
#include <imapi.h>
#include... |
/*
* Copyright (c) 2018 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 contribut... |
/*
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2012 Clifford Wolf <clifford@clifford.at>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in ... |
// Copyright (c) 2012-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "random.h"
#include "scheduler.h"
#include "test/test_playervsplayercoin.h"
#include <boost/bind.hpp>
#include <bo... |
#include <iostream>
#include <fstream>
#include <math.h>
#include <sys/time.h>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <string.h>
#include <map>
#include <sstream>
#include <x86intrin.h>
#include <pthread.h>
#include <thread>
#include "zlib.h"
#include <sys/stat.h>
#ifd... |
///////////////////////////////////////////////////////////////////////////////
/// \file debug.hpp
/// Utilities for debugging Proto expression trees
//
// Copyright 2008 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost... |
// Copyright (C) 2018 ETH Zurich
// Copyright (C) 2018 UT-Battelle, LLC
// All rights reserved.
//
// See LICENSE for terms of usage.
// See CITATION.md for citation guidelines, if DCA++ is used for scientific publications.
//
// Author: Peter Staar (taa@zurich.ibm.com)
//
// This class implements various types and ord... |
#include <assert.h>
#include <linux/futex.h>
#include <sys/syscall.h>
#include <limits.h>
#include <unistd.h>
#include <immintrin.h>
#include <errno.h>
#include <thread>
#include <time.h>
#include "futex_mutex.h"
#define atomic_load(addr) __atomic_load_n(addr, __ATOMIC_CONSUME)
#define atomic_store(addr, val) __atomi... |
/**
* \ file VolumeFilter.cpp
*/
#include <cmath>
#include <ATK/Tools/VolumeFilter.h>
#include <ATK/Mock/TriangleCheckerFilter.h>
#include <ATK/Mock/TriangleGeneratorFilter.h>
#include <gtest/gtest.h>
constexpr gsl::index PROCESSSIZE = 1024;
TEST(VolumeFilter, volume_test)
{
ATK::VolumeFilter<double> volumefi... |
#include "gtest/gtest.h"
TEST(SW_World_Weapon, get_is_good_resists)
{
MeleeWeapon weapon;
EXPECT_FALSE(weapon.get_is_good());
Resistances r;
r.set_resistance_value(DamageType::DAMAGE_TYPE_POISON, 0.08);
weapon.set_resistances(r);
EXPECT_FALSE(weapon.get_is_good());
r.set_all_resistances_to(0.02);
w... |
/******************************************************************************
* Copyright 2017 The Apollo 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
... |
// SPDX-License-Identifier: MIT
/// \file
/// \brief Unit tests for dfe::Dispatcher
#include <boost/test/unit_test.hpp>
#include <iostream>
#include "dfe/dfe_dispatcher.hpp"
using dfe::Dispatcher;
using dfe::Variable;
using Type = dfe::Variable::Type;
// test for variable type
BOOST_AUTO_TEST_CASE(dispatcher_vari... |
//
// Software License Agreement (BSD License)
//
// Copyright (c) 2019-2020 CNRS-LAAS INRIA
// Author: Joseph Mirabel
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redist... |
/*
* Copyright 2019 Xilinx Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
/*===================================================================
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... |
/* MCU.cpp - Part of FireStep
*
* Copyright (C) 2015 Paul Jones
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <usb.h>
#include "fireduino.h"
volatile uint32_t us_elapsed;
extern "C"
{
#include "usb... |
#include "spells.h"
#include <AI/ai_common.h>
// V241 for VS2008
namespace AI {
class DefensiveMatrixTargetFinderProc: public scbw::UnitFinderCallbackMatchInterface {
private:
CUnit* caster;
bool isUnderAttack;
public:
DefensiveMatrixTargetFinderProc(CUnit* caster, bool isUnderAttack)
: caster(... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 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 "walletdb.h"
#include "wallet.h"
#include <boost/version.hpp>
#include <b... |
// Copyright 2020 Daniel Parker
// Distributed under Boost license
#include <jsoncons/json.hpp>
#include <jsoncons_ext/cbor/cbor.hpp>
#include <jsoncons_ext/ubjson/ubjson.hpp>
#include <jsoncons_ext/msgpack/msgpack.hpp>
#include <jsoncons_ext/bson/bson.hpp>
#include <jsoncons_ext/csv/csv.hpp>
#include <vector>
#includ... |
#include "LineDrawData.h"
#include "core/MapPos.h"
#include "geometry/LineGeometry.h"
#include "graphics/Bitmap.h"
#include "graphics/utils/GLContext.h"
#include "projections/Projection.h"
#include "styles/LineStyle.h"
#include "vectorelements/Line.h"
#include "vectorelements/Polygon.h"
#include "utils/Const.h"
#includ... |
//
// Copyright (c) 2008-2013 the Urho3D project.
//
// 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, m... |
/**
*
* |_ _ _
* |_)| (/_VV
*
* Copyright 2015-2018 Marcus v. Keil
*
* Created on: 12.09.17
*
*/
#include <brew/video/VertexBuffer.h>
namespace brew {
VertexBuffer::VertexBuffer(SizeT numVertices, const VertexAttributeLayout& layout)
: GPUBuffer(numVertices * layout.getSize()), layout(layout), numVerti... |
/**********************************************************************
* Copyright (c) 2008-2015, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by t... |
//
// main.cpp
// shttp
//
// Created by Mark Vicuna on 6/20/16.
// Copyright © 2016 Mark Vicuna. All rights reserved.
//
#include <iostream>
#include <fstream>
#include <thread>
#include <vector>
#include <deque>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/sock... |
#include "lib.h"
bool _assert_(int expr, const char *expr_text, const char *file, int line) {
if (!expr) {
int idx = 0;
while (file[idx] != '\0')
idx++;
while (idx >= 0 && file[idx] != '\\')
idx--;
fprintf(stderr, "Assertion \"%s\" failed, file: %s, line: %d\n", expr_text, file + idx +... |
#include <iostream>
using namespace std;
int cntElem = 0;
struct Node {
explicit Node(int key) {
this->key = key;
left = nullptr;
right = nullptr;
parent = nullptr;
}
int key;
Node *left;
Node *right;
Node *parent;
};
Node *search(Node *x, int k) {
if (x ... |
// 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 "core/animation/LengthPairStyleInterpolation.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/CSSValue.h"
#include "core/css/CSSVal... |
/*
* Copyright (c) 2011, Nathan Rajlich <nathan@tootallnate.net>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "... |
#pragma once
// ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_IceBreathAttackStateRanged_classes.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Parameters
//-------------------------------------------... |
// https://cses.fi/problemset/task/1692
#include <bits/stdc++.h>
using namespace std;
const int N = 15, K = (1 << N);
int g[K][2], n, k;
vector<vector<int>> cc, ci;
vector<bool> s;
string ans;
void dfs(int c) {
s[c] = 1;
int u = cc[c][0];
for (int i = 1; i < cc[c].size(); i++) {
int v = cc[c][i];
if (!c... |
#include <TableFunctions/TableFunctionFile.h>
#include "registerTableFunctions.h"
#include <Access/AccessFlags.h>
#include <Formats/FormatFactory.h>
#include <Interpreters/Context.h>
#include <Storages/ColumnsDescription.h>
#include <Storages/StorageFile.h>
#include <TableFunctions/TableFunctionFactory.h>
namespace D... |
/* rbSFML - Copyright (c) 2010 Henrik Valter Vogelius Hansson - groogy@groogy.se
* 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 softw... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Completed includes
// Begin forward declares
// For... |
#include "block.hpp"
#include "catch.hpp"
#include "field.hpp"
#include "record.hpp"
#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;
TEST_CASE("Record escrevendo e lendo de buffer")
{
vector<Field> vet;
char buffer[4096];
vet.push_back(Field::asInteger());
vet.push_back(Fie... |
//
// Created by wegamekinglc on 2021/8/7.
//
#pragma once
#include <dal/math/aad/models/base.hpp>
#include <dal/math/aad/operators.hpp>
#include <dal/utilities/algorithms.hpp>
namespace Dal {
const Time_ systemTime = 0.0;
template <class T_>
class BlackScholes_: public Model_<T_> {
T_ spot_;
... |
// this is a header only component |
#include "../include/Reader.hpp"
#include <algorithm>
#include <charconv>
#include <iostream>
#include <memory>
#include <optional>
#include <regex>
#include <string>
#include <utility>
#include "../include/types.hpp"
Reader::Reader(std::vector<std::string> tokens) :
m_tokens(std::move(tokens)),
m_index(m_to... |
/*
* 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 ... |
// 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/ui/webui/omnibox/omnibox_ui.h"
#include <utility>
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/... |
#include <cstdio>
#include <list>
using namespace std;
struct Foo {
int a;
Foo (int _a)
: a(_a)
{
}
};
int main(void)
{
list<Foo> aList;
aList.push_back(Foo(1));
aList.push_back(Foo(5));
aList.push_back(Foo(3));
const list<Foo> &aRef = aList;
Foo &foo = const_cast<Foo &>(*aRef.begin());
aRef.push_back(... |
//
// scnrm2.cpp
// Linear Algebra Template Library
//
// Created by Rodney James on 1/1/13.
// Copyright (c) 2013 University of Colorado Denver. All rights reserved.
//
#include "blas.h"
#include "nrm2.h"
using LATL::NRM2;
float scnrm2_(int &n, complex<float> *x, int& incx)
{
return NRM2<float>(n,x,incx);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.