text stringlengths 5 1.04M |
|---|
#pragma GCC optimize("O3")
#define TASK ""
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#define __USE_MINGW_ANSI_STDIO 0
#include<bits/stdc++.h>
using namespace std;
#define PI acos(-1)
#define pb push_back
#define fi first
#define se second
#define sz(a) (int)(a).size... |
/**
* @cond ___LICENSE___
*
* Copyright (c) 2016-2018 Zefiros Software.
*
* 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
... |
//===-- X86RegisterInfo.cpp - X86 Register Information --------------------===//
//
// 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 2017 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/fake_authenticator.h"
#include <utility>
namespace cryptauth {
FakeAuthenticator::FakeAuthenticator() {}
FakeAuthentic... |
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrDrawPathBatch.h"
static void pre_translate_transform_values(const float* xforms,
GrPathRendering::PathTransformType typ... |
#include "CondCore/Utilities/interface/PayloadInspectorModule.h"
#include "CondCore/Utilities/interface/PayloadInspector.h"
#include "CondCore/CondDB/interface/Time.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "CondCore/EcalPlugins/plugins/EcalDra... |
/******************************************************************
*
* Copyright 2015 Samsung Electronics 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
*
... |
/* $Id: RemoteUSBBackend.cpp $ */
/** @file
*
* VirtualBox Remote USB backend
*/
/*
* Copyright (C) 2006-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it u... |
#include "qrcodedialog.h"
#include "ui_qrcodedialog.h"
#include "bitcoinunits.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "optionsmodel.h"
#include <QPixmap>
#include <QUrl>
#include <qrencode.h>
QRCodeDialog::QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent) :
... |
//===--- ParseStmt.cpp - Swift Language Parser for Statements -------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
#ifndef BOOST_ASTRONOMY_IO_IMAGE_EXTENSION_HDU_HPP
#define BOOST_ASTRONOMY_IO_IMAGE_EXTENSION_HDU_HPP
#include <string>
#include <vector>
#include <cstddef>
#include <valarray>
#include <boost/astronomy/io/hdu.hpp>
#include <boost/astronomy/io/extension_hdu.hpp>
#include <boost/astronomy/io/image.hpp>
namespace boos... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef msr_airlib_CommonStructs_hpp
#define msr_airlib_CommonStructs_hpp
#include "common/Common.hpp"
#include <ostream>
namespace msr { namespace airlib {
//velocity
struct Twist {
Vector3r linear, ang... |
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
* OPCODE - Optimized Collision Detection
* Copyright (C) 2001 Pierre Terdiman
* Homepage: http://www.codercorner.c... |
#include <windows.h>
#include <tchar.h>
#include "uregex.h"
namespace URegex
{
URegExp::URegExp()
{}
bool URegExp::isMatch(const char *s)
{
return true;
}
}; // namespace URegex
|
// Copyright (c) 2020, 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/closure_functions_cache.h"
#include "vm/compiler/jit/compiler.h"
#include "vm/object.h"
#... |
//----------------------------------------------------------------------------------------------------------------------
//
// toml++ v2.1.0
// https://github.com/marzer/tomlplusplus
// SPDX-License-Identifier: MIT
//
//----------------------------------------------------------------------------------------------------... |
// Copyright (c) 2011-2014 The Bitcoin Core developers
// Copyright (c) 2017-2020 The CREDD developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "util/system.h"
#include "clientversion.h"
#include "primitives... |
// Copyright (c) 2011 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.
// This file input format is based loosely on
// Tools/DumpRenderTree/ImageDiff.m
// The exact format of this tool's output to stdout is important, t... |
#include <iostream>
#include <pthread.h>
#include <queue>
#include <unistd.h>
#include "event_pool.hpp"
#define THREAD_AMOUNT_MAX 5
class Singleton;
//包含就绪队列
class ThreadPool
{
public:
ThreadPool(int num = THREAD_AMOUNT_MAX)
:thread_amount_(num)
,hangup_amount_(0)
{
pthread_mutex_init(... |
// 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/stl_util.h"
#include "base/sys_byteorder.h"
#include "media/base/video_d... |
#include "../idlib/precompiled.h"
#pragma hdrstop
#include "prey_local.h"
CLASS_DECLARATION( idThread, hhThread )
END_CLASS
hhThread::hhThread() : idThread() {}
hhThread::hhThread( idEntity *self, const function_t *func ) : idThread( self, func ) {}
hhThread::hhThread( const function_t *func ) : idThread( func ) {}
... |
#include "global.hpp"
#include "Scanner.hpp"
class TaskD {
public:
void solve(std::istream& inStream, std::ostream& outStream) {
Scanner in(inStream);
Writer out(outStream);
}
};
|
//
// Copyright (c) .NET Foundation and Contributors
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
// See LICENSE file in the project root for full license information.
//
#include "CorLib.h"
char DigitalToHex(unsigned char x)
{
return x < 10 ? x + '0' : x - 10 + 'A';
}
char *ByteArrayToH... |
/*
* 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... |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and ... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
#include "CoolProp.h" // PropsSI
#include "HumidAirProp.h" // HAPropsSI
#include "node.hpp" // prototypes
/**
* TO-DO
* Automatic prune nodes that can be computed
*
* NOT IMPORTANT
* Divide functions per number of inputs : non-type template parameters
* Enum function names and include more functions
* make... |
#pragma once
#include <filesystem>
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <type_traits>
#include <vector>
#include "libs/json.hpp"
namespace chm {
namespace fs = std::filesystem;
namespace nl = nlohmann;
/**
* Vrátí chybový text s cestou konfigu... |
// DialogBarPlayerControl.cpp : implementation file
//
#include "stdafx.h"
#include "Player.h"
#include "DialogBarPlayerControl.h"
#include "MainFrm.h"
#include "PlayerDoc.h"
#include "MakeDelegate.h"
#include <algorithm>
#include <string>
#include <sstream>
#include <iomanip>
using std::setfill;
using std::setw;
... |
/*******************************************************************************
* Copyright 2019-2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... |
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (... |
#include "nprotocolbase.h"
#include "nprotocolbase_p.h"
#include <algorithm>
#include <cassert>
NProtocolBase::NProtocolBase() : d(new NProtocolBase_P()) {}
NProtocolBase::~NProtocolBase() { delete d; }
size_t NProtocolBase::totalBytes() const { return d->totalBytes_; }
void NProtocolBase::appendItem(NP... |
#include <iostream>
void f1(int (*)(int))
{
std::cout << "f1" << std::endl;
}
void f2(char (*)(int))
{
std::cout << "f2" << std::endl;
}
void g(int (*)(int))
{
std::cout << "g(int (*)(int))" << std::endl;
}
void g(char (*)(char))
{
std::cout << "g(char (*)(char))" << std::endl;
}
... |
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURP... |
/*
* QR Code Generator
* Copyright (C) 2014 Stefano BARILETTI <hackaroth@gmail.com>
*
* 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 2
* of the License, or (at your option... |
#include <bits/stdc++.h>
using namespace std;
string ltrim(const string &);
string rtrim(const string &);
vector<string> split(const string &);
/*
* Complete the 'minimumDistances' function below.
*
* The function is expected to return an INTEGER.
* The function accepts INTEGER_ARRAY a as parameter.
... |
//===----------------------------------------------------------------------===//
//
// 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 (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 "Maestro_precompiled.h"
#include <IMovieSystem.h>
#include <Range.h>
#include <AnimKey.h>
... |
//The MIT License (MIT)
//
//Copyright (c) 2016 ZHAOZhengyi-tgx
//
//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... |
#include "LWNetwork/LWProtocolManager.h"
#include "LWNetwork/LWProtocol.h"
#include "LWPlatform/LWPlatform.h"
#include <LWCore/LWByteBuffer.h>
#include <algorithm>
#include <errno.h>
bool LWProtocolManager::InitateNetwork(void) {
return true;
}
void LWProtocolManager::TerminateNetwork(void) {
... |
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include "bgp/routing-instance/static_route.h"
#include "bgp/routing-instance/routing_instance.h"
#include <fstream>
#include <algorithm>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/assign/list_of.hpp>
#inclu... |
#include <stdlib.h>
#include <iostream>
#include <thread>
#include "../inc/helpers/Menu.hh"
#include "../inc/Core.hh"
#include "../inc/helpers/lacze_do_gnuplota.hh"
int main() {
char option = ' ', choiseOne = ' ', choiseTwo = ' ', choiseTre = ' ';
bool tipsMode = true;
int ObjectIndex = 0, objectIndex;... |
/*
Copyright 2019 Igor Kholopov
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 w... |
//----------------------------------*-C++-*----------------------------------//
// Copyright 2020 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//-------------------------------------------------------------------------... |
#include<iostream>
#include<stdlib.h>
#define size 100
using namespace std;
class Stack{
private:
int stack[size];
int element;
int top;
public:
Stack(){
top=-1;
}
void push(int value){
element = value;
if(top... |
#include <bits/stdc++.h>
using namespace std;
// Function to find mean of grouped data.
float mean(float mid[], int freq[], int n)
{
float sum = 0, freqSum = 0;
for (int i = 0; i < n; i++)
{
sum = sum + mid[i] * freq[i];
freqSum = freqSum + freq[i];
}
return sum / freqSum;
}
// dev... |
#include "sgtexturematerial.h"
#include "texture/sggridimagetexture.h"
#define STB_IMAGE_IMPLEMENTATION
#include <stb/stb_image.h>
#include <string>
static std::unordered_map<std::string, unsigned> g_nameMapToKey;
static SGGridImageTexture g_imgTex(2048, 2048, Image::Format_RGBA, 256, 256);
class SGTextureMaterialSh... |
// Copyright (c) 2017-2021, The Khronos Group Inc.
//
// SPDX-License-Identifier: Apache-2.0
#include "pch.h"
#include "common.h"
#include "platformplugin.h"
#ifdef XR_USE_PLATFORM_XLIB
namespace {
struct XlibPlatformPlugin : public IPlatformPlugin {
XlibPlatformPlugin(const std::shared_ptr<Options>& /*unused*/) ... |
//
// c16rtomb.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
#include <uchar.h>
#include <corecrt_internal_mbstring.h>
using namespace __crt_mbstring;
namespace
{
inline void store_first_surrogate(char16_t c16, mbstate_t* ps)
{
// Store the first (high) surrogate masked ... |
//
// Created by rui zhou on 2019-11-22.
//
|
#include "vstgui.cpp"
#include "lib/platform/linux/linuxstring.cpp"
#include "lib/platform/linux/x11frame.cpp"
#include "lib/platform/linux/x11platform.cpp"
#include "lib/platform/linux/x11timer.cpp"
#include "lib/platform/linux/cairobitmap.cpp"
#include "lib/platform/linux/cairocontext.cpp"
#include "lib/platform/... |
/*
* Copyright (c) 2014 Advanced Micro Devices, Inc.
* Copyright (c) 2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property re... |
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
class Solution {
public:
vector<int> partitionLabels(string S) {
vector<int>last(26,-1);
int n = S.length();
for( int i = 0 ; i < n ; i++ )
last[S[i]-'a'] = i;
vector<pair<int,int>> intervals;
for( int l=0 , r=-1 ; l < n ; l++ ) {
int c = S[l] - 'a';
... |
#include "video/Render.h"
#include "video/Screen.h"
using namespace Shiro;
namespace Shiro {
int RenderCopy(const Screen& screen, SDL_Texture *tex, const SDL_Rect *srcrect, SDL_Rect *dstrect)
{
if(screen.window == nullptr || screen.renderer == nullptr || tex == nullptr)
{
return -1... |
/**
* Copyright (C) 2014 Patrick Mours. All rights reserved.
* License: https://github.com/crosire/reshade#license
*/
#pragma once
#include "effect_expression.hpp"
#include "moving_average.hpp"
#include <filesystem>
namespace reshade
{
enum class special_uniform
{
none,
frame_time,
frame_count,
random,
... |
//
// server.cpp
// ~~~~~~~~~~
//
// Copyright (c) 2003-2018 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 at http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/bind.hpp>
#include <boost/share... |
/**
* @file src/bin2llvmir/providers/abi/pic32.cpp
* @brief ABI information for MIPS.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include "retdec/bin2llvmir/providers/abi/pic32.h"
using namespace llvm;
namespace retdec {
namespace bin2llvmir {
AbiPic32::AbiPic32(llvm::Module* m, Con... |
// Question: Write a C++ program to simulate the following contiguous memory allocation techniques
//a) Worst-fit b) Best-fit c) First-fit
//ID - NAME
//219CS01000078 Blege Bright Edem
//219CS01000037 Mensah Bernard
//219EI01000036 ... |
#include <iostream>
using namespace std;
int main(){
int n, v1, v2;
bool sorted;
while(cin >> n && n){
sorted = true;
cin >> v1;
n--;
while(n--){
cin >> v2;
if(sorted){
if(v1 < v2)
v1 = v2;
else
sorted = false;
}
}
if(sorted)
... |
#include "catch.hpp"
#include "index_set.hpp"
#include "util/index_helpers.hpp"
TEST_CASE("[index_set] contains()") {
SECTION("returns false if the index is before the first entry in the set") {
realm::IndexSet set = {1, 2, 5};
REQUIRE_FALSE(set.contains(0));
}
SECTION("returns false if ... |
/*****************************************************************************
Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
more contributor license agreements. See the NOTICE file distributed
with this work for additional information regarding copyright ownership.
Accellera licenses... |
//===--- LICM.cpp - Loop invariant code motion ------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
// Copyright (c) 2020 Graphcore Ltd. All rights reserved.
#ifndef INCLUDE_POPTORCH_TYPE_AND_CONSTANT_CANONICALIZATION_H
#define INCLUDE_POPTORCH_TYPE_AND_CONSTANT_CANONICALIZATION_H
#include <sstream>
#include <string>
#include <vector>
namespace at {
class Tensor;
} // namespace at
namespace c10 {
struct Symbol;
} ... |
/******************************************************************************
*
* Project: OGDI Bridge
* Purpose: Implements OGROGDILayer class.
* Author: Daniel Morissette, danmo@videotron.ca
* (Based on some code contributed by Frank Warmerdam :)
*
**********************************************... |
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <SystemManager/SystemManagerCommon.hpp>
namespace sys
{
class AlarmActivationStatusChangeRequest;
class SystemManager : public SystemManagerCommon
... |
// 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 "media/base/win/mf_initializer.h"
#include <mfapi.h>
#include "base/lazy_instance.h"
#include "base/macros.h"
namespace media {
namespace {
... |
/*++
Copyright (c) 1999 Microsoft Corporation
Abstract:
@doc
@module Provider.hxx | Declarations used by the Software Snapshot Provider interface
@end
Author:
Brian Berkowitz [brianb] 05/01/2001
Revision History:
Name Date Comments
--*/
////////////... |
#include <makeshift/experimental/type_traits.hpp>
#include <gsl-lite/gsl-lite.hpp>
#include <catch2/catch.hpp>
namespace {
namespace mk = ::makeshift;
namespace gsl = ::gsl_lite;
// TODO: add tests
} // anonymous namespace
|
/**
* @file print_help.cpp
* @author Matthew Amidon
* @author Ryan Curtin
*
* Print help for a given function.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3-clause BSD license along with mlpack. ... |
//-------------------------------------------------------------------------------------
// DirectXSHD3D12.cpp -- C++ Spherical Harmonics Math Library
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/p/?LinkId=262885
//--------... |
////////////////////////////////////////////////////////////////////////////////
/// 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... |
#pragma once
#include "task.hpp"
#include <memory>
void initializeTelnetSpawner(Task *(*spawner)(std::shared_ptr<TTY>));
|
// James Stanko
// CS 33101
// Structure of Programming Languages
// 5/3/2017
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <iomanip>
#include "ReadDATFile.h"
int main(){
DATData tmp;
unsigned char hold;
int shold = 0;
std::string READ_RESULT;
std::ifstre... |
//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... |
using namespace std;
#include<iostream>
#include<stdio.h>
int main()
{
int num;
cin>>num;
for(int i = 0;i<num;i++)
{
unsigned long long a, fact = 1;
cin>>a;
for(int i = 1;i<=a;i++)
fact = fact*i;
cout<<fact<<endl;
}
return 0;
}
|
// Copyright 2019 DeepMind Technologies 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 require... |
/**
* 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 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrAtlasTextContext.h"
#include "GrContext.h"
#include "GrDrawContext.h"
#include "GrTextBlobCache.h"
#include "GrTextUtils.h"
#include "SkDraw.h"
#include "SkDrawFi... |
/**
* ============================================================================
*
* Copyright (C) 2019, Huawei Technologies Co., Ltd. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* ... |
#ifndef __SERIALIZATION_H__
#define __SERIALIZATION_H__
#include <map>
#include <unordered_map>
#include <string>
#include <cereal/cereal.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>
#include <cereal/types/unordered_map.hpp>
#include <cereal/archives/binary.hpp>
template<typename Contain... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 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 "coincontroldialog.h"
#... |
//==============================================================================
// Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// Se... |
/*
* 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... |
#include <iostream>
#include <vector>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), lef... |
//============================================================================
// Copyright 2009-2020 ECMWF.
// This software is licensed under the terms of the Apache Licence version 2.0
// which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
// In applying this licence, ECMWF does not waive the privil... |
#include "idle.h"
#include <IOKit/pwr_mgt/IOPMLib.h>
namespace {
IOPMAssertionID displayAssertionID = 0;
IOReturn displayRes = 0;
IOPMAssertionID systemAssertionID = 0;
IOReturn systemRes = 0;
} // namespace
bool Idle::preventDisplaySleep(const QString &reason) {
displayRes = IOPMAssertionCreateWithName(kIOPM... |
//
// Created by HaruGakkaP on 2020-12-11.
//
#include "MemoryManageUnit.h"
#include <utility>
#include <stdexcept>
MemoryManageUnit::MemoryManageUnit( std::shared_ptr<MemoryInterface> ptr_cartridge,
std::shared_ptr<MemoryInterface> ptr_vram,
std::shared_ptr<MemoryInterface> ptr_timer,
... |
#define _CRT_SECURE_NO_WARNINGS
#include "stdio.h"
#include "stdarg.h"
#include "../includes/zs-logger.h"
FILE* outfile;
bool useFile = false;
void ZSpire::close_outputFile(){
if (useFile == true) {
fclose(outfile);
}
}
void ZSpire::open_outputFile(const char* fpath) {
useFile = true;
outfile = fopen(fpath, "w... |
#include <vector>
#include <algorithm>
#include <unordered_set>
class Solution
{
public:
std::vector<int> findDuplicates(std::vector<int> &nums)
{
return findDuplicatesOpt(nums);
}
std::vector<int> findDuplicatesOpt(std::vector<int> &nums) // space: O(1), time: O(n)
{
std::vector<i... |
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdarg.h>
#include <stdlib.h>
#include <cmath>
#if V8_TARGET_ARCH_PPC
#include "src/assembler.h"
#include "src/base/bits.h"
#include "src/co... |
#include <mbgl/geometry/glyph_atlas.hpp>
#include <mbgl/gl/gl.hpp>
#include <mbgl/gl/object_store.hpp>
#include <mbgl/gl/gl_config.hpp>
#include <mbgl/platform/log.hpp>
#include <mbgl/platform/platform.hpp>
#include <cassert>
#include <algorithm>
namespace mbgl {
GlyphAtlas::GlyphAtlas(uint16_t width_, uint16_t he... |
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
// Licensed to the 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 <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <random>
#include <math.h>
/* Simulates two attractor dynamic system
*
* Code inspired by code of A. I. Gafos
* http://www.ling.uni-potsdam.de/~gafos/code/inc_neut.m
*
* Author: Simon Ritter
* Date: September 26 2018
*
* Arguments:
* 1. control... |
#include "sandbox.h"
#include <sys/stat.h> // stat
#include <algorithm> // std::find
#include <fstream>
#include <math.h>
#include <memory>
#include "tools/text.h"
#include "ada/window.h"
#include "ada/tools/text.h"
#include "ada/tools/geom.h"
#include "ada/tools/pixels.h"
#include "ada/tools/holoplay.h"
#inclu... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2016 by EMC Corporation, 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... |
/*
* AbstractResourceStream.hpp
*
* Copyright (C) 2020 by RStudio, PBC
*
* Unless you have received this program directly from RStudio pursuant to the terms of a commercial license agreement
* with RStudio, then this program is licensed to you under the following terms:
*
* Permission is hereby granted, free of... |
/* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
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; version 2 of the License.
This program is distributed in t... |
/**
* @file talker.cpp
* @brief Publisher node that emits a simple string with a counter.
* @author Ryan Cunningham
* @copyright 2019
* Distributed under the BSD License (license terms found in LICENSE or at https://www.freebsd.org/copyright/freebsd-license.html)
*/
#include <sstream>
#include "ros/ros.h"
#incl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.