text stringlengths 7 961k |
|---|
// Copyright (c) 2019-2020 The PIVX developers
// Copyright (c) 2021 The ENZO developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qt/enzo/mnmodel.h"
#include "activemasternode.h"
#include "masternode-sync.h"
#i... |
#pragma once
#include <appbase/plugin.hpp>
#include <appbase/channel.hpp>
#include <appbase/method.hpp>
#include <appbase/execution_priority_queue.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/core/demangle.hpp>
#include <typeindex>
namespace appbase {
namespace bpo = boost::program_options;
namespac... |
// Copyright (c) 2018 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/net/resolve_proxy_helper.h"
#include <utility>
#include "base/bind.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/stor... |
#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Driver/Opti... |
//Count No of Set Bits
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k;
cout<<"Enter number \n";
cin>>n;
int res=0;
while(n>0)
{
res = res + (n & 1);
n=n>>1;
}
cout<<res;
}
/*
Time Complexity: O(logn)
Space Complexity: O(1)
*/
/*
Sample Input:
Example 1:-
Enter numb... |
/*
* Copyright (C) 2017 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... |
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
#include "mull/Mutators/CXX/RelationalMutators.h"
#include "mull/MutationPoint.h"
#include <irm/irm.h>
#include <llvm/IR/InstIterator.h>
using namespace mull;
using namespace mull::cxx;
static std::vector<std::unique_ptr<irm::IRMutation>> getLessThanToLessOrEqual() {
std::vector<std::unique_ptr<irm::IRMutation>> mu... |
/* ----------------------------------------------------------------------
SPPARKS - Stochastic Parallel PARticle Kinetic Simulator
http://www.cs.sandia.gov/~sjplimp/spparks.html
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
Copyright (2008) Sandia Corporation. Under the terms of Contrac... |
// Copyright (c) 2011-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 "util.h"
#include "clientversion.h"
#include "primitives/transaction.h"
#include "random.h"
#include "sync.h"
#incl... |
#include "GAMER.h"
#ifdef TIMING
void Timing__EvolveLevel( const char FileName[], const double Time_LB_Main[][3] );
#ifdef TIMING_SOLVER
void Timing__Solver( const char FileName[] );
#endif
// global timing variables
// ----------------------------------------------------------
extern Timer_t *Timer_Main[7];
extern... |
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
#include "../BlockLocalPositionEstimator.hpp"
#include <systemlib/mavlink_log.h>
#include <matrix/math.hpp>
extern orb_advert_t mavlink_log_pub;
// required number of samples for sensor
// to initialize
static const uint32_t REQ_BARO_INIT_COUNT = 100;
static const uint32_t BARO_TIMEOUT = 100000; // 0.1 s
void... |
/* file: low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp */
/*******************************************************************************
* Copyright 2014-2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with th... |
//+------------------------------------------------------------------------
//
// Microsoft Forms
// Copyright (C) Microsoft Corporation, 1992 - 1995.
//
// File: dwncache.cxx
//
// Contents:
//
//-------------------------------------------------------------------------
#include "headers.hxx"
#ifndef X_D... |
/*
* This file is open source software, licensed to you under the terms
* of the Apache License, Version 2.0 (the "License"). See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. You may not use this file except in compliance with the License.
*
* You may ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "precomp.h"
#include "mpidi_ch3_impl.h"
#include "pmi.h"
static int getNumProcessors( void );
static int getNodeRo... |
//
// Created by Alex Chi on 2019-07-10.
//
#include <cassert>
#include "ALUUnit.h"
#include "../Common/Instruction.hpp"
#include "../Pipeline/OoOExecute.h"
void ALUUnit::update() {
for (auto &&r_id : rs) {
RS* r = e->get_rs(r_id);
if (r->Busy) {
if (r->Qj == NONE && r->Qk == NONE) {
... |
//*****************************************************************************
// Copyright 2017-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://w... |
/* $Id: RTStrCatPEx.cpp $ */
/** @file
* IPRT - RTStrCatPEx
*/
/*
* Copyright (C) 2011-2017 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 under the terms of t... |
/*
* EIoEvent.cpp
*
* Created on: 2016-9-22
* Author: cxxjava@163.com
*/
#include "EIoEvent.hh"
#include "EIoFilterChain.hh"
namespace efc {
namespace eio {
EIoEvent::~EIoEvent() {
}
EIoEvent::EIoEvent(EIoEventType type, sp<EIoSession>& session,
sp<EObject>& parameter) {
if (session == null) {
thro... |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: MessageBlockMeta.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "MessageBlockMeta.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded... |
// Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cryptohome/pkcs11_keystore.h"
#include <map>
#include <string>
#include <vector>
#include <base/strings/string_number_conversions.h>
#i... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
#include <vector>
#include <unordered_map>
class Solution
{
public:
int tupleSameProduct(std::vector<int> &nums)
{
return tupleSameProductHashMap(nums);
}
int tupleSameProductHashMap(std::vector<int> &nums)
{
std::unordered_map<int, int> freq;
for (int i = 0; i < nums.size(... |
///////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/win_gtk.cpp
// Purpose: native GTK+ widget for wxWindow
// Author: Paul Cornett
// Copyright: (c) 2007 Paul Cornett
// Licence: wxWindows licence
///////////////////////////////////////////////////////... |
/*******************************************************************************
Copyright(c) 2015-2020 Parker Hannifin Corp. All rights reserved.
MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License.
*******************************************************************************/
#include "st... |
/*
* Copyright (C) 2016-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
namespace NEO {
template <>
void ImageHw<Family>::setMediaSurfaceRotation(void *memory) {
using MEDIA_SURFACE_STATE = typename Family::MEDIA_SURFACE_STATE;
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FOR... |
#include <cstdio>
// New header files.
#include <ccomplex>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
// Support for variadic macros.
#define eprintf(...) std::fprintf(stderr, __VA_ARGS__)
int main() {
// Type 'long long int'.
long long int i = 1;
// Macro __func__ th... |
#pragma once
#include "tilebase.hpp"
class Tile {
private:
rs::HLVb _vertex[2];
public:
Tile(const Displacement::HeightL& h, int ox, int oy, spn::PowInt size, int stride);
void draw(rs::IEffect& e, const Displacement::IndexBuffV& idxv, int center, int left, int top, int right, int bottom) const;
};
class Tile... |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef IROHA_SHARED_MODEL_INTERFACE_ENGINE_LOG_HPP
#define IROHA_SHARED_MODEL_INTERFACE_ENGINE_LOG_HPP
#include <boost/optional.hpp>
#include <vector>
#include "interfaces/base/model_primitive.hpp"
#include "interfac... |
#pragma once
// ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_Buff_ChainBola_classes.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Parameters
//-------------------------------------------------------... |
#include <bits/stdc++.h>
using namespace std;
// O(n) sieve up to n
vector<int> sieve(int n) {
vector<int> lp(n, 0);
vector<int> primes;
for (int i = 2; i <= n; ++i) {
if (lp[i] == 0) {
lp[i] = i;
primes.push_back(i);
}
for (int j = 0; j < (int)primes.size() ... |
/**
* @file
* @copyright defined in eos/LICENSE
*/
#include <eosiolib/eosio.hpp>
#include <eosiolib/transaction.hpp>
#include <eosiolib/dispatcher.hpp>
using namespace eosio;
class deferred_test : public eosio::contract {
public:
using contract::contract;
struct deferfunc_args {
uint64_... |
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "s3d/video/capture/file_video_capture_device_raw_uyvy.h"
#include "s3d/video/file_parser/video_file_parser.h"
using s3d::FileVideoCaptureDeviceRawUYVY;
using s3d::Size;
using s3d::TimedLoop;
using s3d::VideoCaptureDevice;
using s3d::VideoCaptureFormat;
using ... |
/**
* Copyright (c) 2009 Carnegie Mellon University.
* 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... |
// string.hpp
/*
* Copyright (c) 2007 Leigh Johnston.
*
* 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
* ... |
#include "player.h"
Player::Player(QObject *parent, QString *name, QImage *image) :
QObject(parent)
{
} |
/* ============================================================
* VerticalTabs plugin for QupZilla
* Copyright (C) 2018 David Rosca <nowrep@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 Found... |
/*
written by Pankaj Kumar.
country:-INDIA
Institute: National Institute of Technology, Uttarakhand
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll ;
typedef unsigned long long ull... |
/*
Copyright (C) 2006, International Business Machines Corporation and others.
All Rights Reserved.
This code is licensed under the terms of the Eclipse Public License (EPL).
$Id$
*/
#ifndef CbcEventHandler_H
#define CbcEventHandler_H
/*! \file CbcEventHandler.hpp
\brief Event handling for cbc
This f... |
/*************************************************************************/
/* filesystem_dock.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
#include <mbed.h>
#include <ucos_ii.h>
#include <display.h>
/*
*********************************************************************************************************
* APPLICATION TASK AND MUTEX PRIORITIES
******************************************************************... |
#include <gloperate/base/ExtendedProperties.h>
namespace gloperate
{
const std::string & VectorPrefix<int>::getPrefix()
{
static const auto prefix = std::string("i");
return prefix;
}
} // namespace gloperate |
// Copyright 2015 Stellar Development Foundation and contributors. Licensed
// under the Apache License, Version 2.0. See the COPYING file at the root
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
#include "bucket/BucketManagerImpl.h"
#include "overlay/StellarXDR.h"
#include "main/Applicatio... |
#include "little-big-int.hpp"
#include "gtest/gtest.h"
#include <map>
namespace
{
const BigUint zero;
const BigUint one(1);
const BigUint maxTrivial((BigUint(1) << BigUint::bitsPerBlock) - 1);
const BigUint minNontrivial((BigUint(1) << BigUint::bitsPerBlock));
// 0b10 repeated 16 times (total 32... |
/*
* @COPYRIGHT@
*
* 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, distribute, subli... |
#ifndef SEMPR_GUI_TRIPLELIVEVIEWWIDGET_HPP_
#define SEMPR_GUI_TRIPLELIVEVIEWWIDGET_HPP_
#include <QtWidgets>
#include <QStandardItemModel>
#include "AbstractInterface.hpp"
#include "AnyColumnFilterProxyModel.hpp"
#include "StackedColumnsProxyModel.hpp"
#include "UniqueFilterProxyModel.hpp"
#include <QCompleter>
#inc... |
// ----------------------
// Jakob Bauer
// (c) 2016
// www.bauer-sw.de
// ----------------------
// cpp@bauer-sw.de
// ----------------------
#include "stdafx.h"
#include <fstream>
#include "chaiscript/chaiscript.hpp"
#include "chaiscript/chaiscript_stdlib.hpp"
//#include <WinBase.h>
#include "... |
/*********************
* example.cpp *
*********************/
/****************************************************************************
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* *
* This program is ... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin developers
// Copyright (c) 2009-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-li... |
// Copyright 2018 The MACE 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 2021 Marzocchi Alessandro
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "midieventlistwidget.h"
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QMimeData>
#include <QDebug>
MidiEventListWidget::MidiEventListWidget(QWidget *parent): QListWidget(parent)
{... |
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI Limited
//
// 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
//
// ... |
/*-------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
*
* Copyright (c) 2016 Google 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 ob... |
/****************************************************************************
*
* Copyright (C) 2020 PX4 Development Team. 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. Redistri... |
// Copyright (c) 2020 LiliumAtratum
//
// SPDX-License-Identifier: BSL-1.0
// 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)
// see #4786: transform_inclusive_scan tries to implicitly convert between
// ... |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... |
// Copyright 2021 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/components/phonehub/camera_roll_thumbnail_decoder_impl.h"
#include "ash/components/phonehub/camera_roll_item.h"
#include "ash/components/ph... |
#include "MyOctant.h"
using namespace Simplex;
uint MyOctant::m_uMyOctantCount;
uint MyOctant::m_uMaxLevel;
uint MyOctant::m_uIdealEntityCount;
uint MyOctant::m_uCurrentOctantID;
Simplex::MyOctant::MyOctant(uint a_nMaxLevel, uint a_nIdealEntityCount)
{
m_pEntityMngr = EntityManager::GetInstance();
m_pMeshMngr = Mes... |
// DDCBlockAccessDlg.cpp : implementation file
//
#include "stdafx.h"
#include "..\..\include\adl_sdk.h"
#include "DDCBlockAccess.h"
#include "DDCBlockAccessDlg.h"
#include "mccs.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
//********************************
// Prototypes
//********************************
void vG... |
/*********************************************************\
* File: SNFire.cpp *
*
* Copyright (C) 2002-2013 The PixelLight Team (http://www.pixellight.org/)
*
* This file is part of PixelLight.
*
* Permission is hereby granted, free of charge, to any person obtaining a co... |
#pragma once
#include "pch.h"
#include "process_io.h"
#include "boost/process.hpp"
#include "project.h"
#include "debug.h"
#include "config.h"
namespace bp = boost::process;
ProcessExecResult execute_command_io(std::string command, std::string input) {
bp::ipstream is;
bp::ipstream es;
bp::opstream os;
PVOID Old... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
+---------... |
#include "clustering/spectral_cluster.h"
#include "sfm/types.h"
#include "util/random.h"
#include "util/map_util.h"
#include <iostream>
#include <unordered_set>
#include <gtest/gtest.h>
using namespace GraphSfM;
using namespace colmap;
class ImageClusteringTest : public ::testing::Test
{
protected:
std::vector<i... |
/*
Copyright (C) 1996-1997 Id Software, Inc.
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) any later version.
This program is distributed in th... |
/*
ArrayHelpers.cpp
By Jim Davies
Jacobus Systems, Brighton & Hove, UK
http://www.jacobus.co.uk
Provided under the MIT license: https://github.com/jacobussystems/ArdJack/blob/master/LICENSE
Copyright (c) 2019 James Davies, Jacobus Systems, Brighton & Hove, UK
Permission is hereby granted, free of charge, to a... |
/*=========================================================================
*
* 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... |
// 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/bookmarks/managed/managed_bookmark_service.h"
#include <stdint.h>
#include <stdlib.h>
#include <memory>
#include <string>
#include ... |
#ifndef TEST_FRMWK_HPP___
#define TEST_FRMWK_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* $Date: 2010-06-09 10:36:07 -0... |
// Copyright 2020 ETH Zurich. All Rights Reserved.
#include "simulation.h"
#include <mirheo/core/bouncers/interface.h>
#include <mirheo/core/celllist.h>
#include <mirheo/core/exchangers/api.h>
#include <mirheo/core/initial_conditions/interface.h>
#include <mirheo/core/integrators/interface.h>
#include <mirheo/core/int... |
#include "pch.h"
#include "msmqUtils.h"
std::string GetName(MQObject obj)
{
char name[MaxNameBuffer];
obj->GetName(name, sizeof(name));
SanitizeNodeName(name);
return ms::ToUTF8(name);
}
std::string GetName(MQMaterial obj)
{
char name[MaxNameBuffer];
obj->GetName(name, sizeof(name));
Sanit... |
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/ui/bin/root_presenter/displays/display_configuration.h"
#include <gtest/gtest.h>
#include "src/ui/bin/root_presenter/displays/display_model... |
//
// Copyright 2014 The ANGLE 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.
//
// ImageIndex.cpp: Implementation for ImageIndex methods.
#include "libANGLE/ImageIndex.h"
#include "libANGLE/Constants.h"
#include "common/ut... |
#include "sendcoinsdialog.h"
#include "ui_sendcoinsdialog.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "addressbookpage.h"
#include "optionsmodel.h"
#include "sendcoinsentry.h"
#include "guiutil.h"
#include "askpassphrasedialog.h"
#include <QMessageBox>
#include <QLocale>
#include <QTextDocument>
#in... |
#include <cstring>
extern "C" {
#include <compositor.h>
#define KEY_ESC 1
#define KEY_LEFTSHIFT 42
#define KEY_RIGHTSHIFT 54
#define KEY_CAPSLOCK 58
#define KEY_KPLEFTPAREN 179
#define KEY_KPRIGHTPAREN 180
// time funcs from Weston
#define NSEC_PER_SEC 1000000000
static inline void timespec_sub(struct timespec *r,... |
/* 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... |
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
#include <iostream>
#include <optional>
#include <queue>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
template<typename T>
ostream& operator<<(ostream& out, const optional<T>& o)
{
if (o.has_value())
out << o.value();
else
out << "null";
return out;
}
template<ty... |
//===- ModuleDepCollector.cpp - Callbacks to collect deps -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include "misc.hpp"
#include "client/pointers.hpp"
#include "common_helpers.hpp"
#include <memory>
namespace intercept {
namespace sqf {
//simulation
void enable_dynamic_simulation(const object &object_, bool enable_) {
host::functions.invoke_raw_binary(__sqf::binary__enabledynamicsimu... |
#include<bits/stdc++.h>
#define ll long long int
#define loop(k) for(i=0;i<k;++i)
#define loop2(k,l) for(j=k;j<l;++j)
#define mod 1000000007
using namespace std;
int main()
{
std::ios_base::sync_with_stdio(false);cin.tie(NULL);
ll t=1,i=0,j=0,k=0;
//cin>>t;
while(t--){
int n;
cin>>n;
... |
/** @file
*****************************************************************************
Declaration of complex domain data type.
*****************************************************************************
* @author This file is part of libff, developed by SCIPR Lab
* and contributors (see AUTHO... |
/*
* Copyright (c) 2013 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... |
// ball_thresholdaggregate.cpp -*-C++-*-
#include <ball_thresholdaggregate.h>
#include <bsls_ident.h>
BSLS_IDENT_RCSID(ball_thresholdaggregate_cpp,"$Id$ $CSID$")
#include <bdlb_hashutil.h>
#include <bdlb_print.h>
#include <bsls_assert.h>
#include <bsls_platform.h>
#include <bs... |
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include "windows.h"
using namespace std;
class Resource
{
public:
int value;
Resource()
{
value = 0;
}
void reset()
{
value = 0;
}
int getValue()
{
return value;
}
void setValue(int number)
{
valu... |
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... |
// 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 "chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h"
#include "base/strings/utf_string_conversions.h"
#include "base/ve... |
#include "button.hpp"
Button::Button(int _pin, bool _normally_high_flag)
: pin(_pin), normally_high_flag(_normally_high_flag)
{
}
void Button::setup()
{
pinMode(pin, INPUT);
}
bool Button::read()
{
bool sample = digitalRead(pin);
if (normally_high_flag)
sample = !sample;
if (sample && !button_state) ... |
#include "idlestate.h"
#include <QJsonArray>
#include <game/game.h>
#include <game/turn/jailstate.h>
#include <game/turn/movestate.h>
#include <game/turn/possiblerequest.h>
IdleState::IdleState(TurnState* state)
: TurnState(*state)
{
broadcastPossibleRequests();
}
void IdleState::requestPossibleRequests(con... |
#ifndef AZUIK_TEST_TOOLBOX_HPP
#define AZUIK_TEST_TOOLBOX_HPP
namespace azuik
{
namespace test
{
struct default_constructed {
int value;
default_constructed(const default_constructed&);
default_constructed& operator=(const default_constructed&);
public:
... |
#include "ignition/web_video_server/libav_streamer.hh"
#include "ignition/async_web_server_cpp/http_reply.hh"
#include <cstdint>
#include <mutex>
#include <vector>
#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
namespace ignition {
namespace web_video_ser... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... |
#include "DQM/HcalCommon/interface/DetectorQuantity.h"
namespace hcaldqm {
namespace quantity {
int getValue_iphi(HcalDetId const &did) { return did.iphi(); }
int getValue_ieta(HcalDetId const &did) {
int x = did.ieta();
if (x < 0)
x = did.subdet() == HcalForward ? x + 41 : x + 42;
... |
/**
##########################################################################
# If not stated otherwise in this file or this component's LICENSE
# file the following copyright and licenses apply:
#
# Copyright 2019 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... |
//-----------------------------------------------------------------------------
// Created on: 02 March 2017
//-----------------------------------------------------------------------------
// Copyright (c) 2017, Sergey Slyadnev
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or wit... |
/*
* 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 ... |
// Copyright (c) 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 "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... |
#include <iostream>
#include <cstring>
using namespace std;
# define cono 2.70
# define cestina 2.50
# define coppetta 2
struct gusto
{
char nome[10];
};
typedef gusto *p_gusto;
class Gelato
{
protected:
p_gusto gusti[3];
int cursor;
double tipo;
public:
void aggiungiGel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.