text stringlengths 5 1.04M |
|---|
// A. Polycarp's Pockets
#include <stdio.h>
#include <algorithm>
#include <set>
int main(){
int n;
scanf("%d\n", &n);
int a[n];
for (int i=0; i<n; ++i){
scanf("%d", &(a[i]));
}
int minPockets = 0;
if (n==1){
minPockets = 1;
}
else {
std::sort(a, a + ... |
/*
* 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 obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
#ifndef STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_LPDF_HPP
#define STAN_MATH_PRIM_SCAL_PROB_SCALED_INV_CHI_SQUARE_LPDF_HPP
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
#include <stan/math/prim/scal/err/check_not_nan.hpp>
#include <stan/math/prim/scal/err/check_p... |
/*
* Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* 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 co... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
///
/// 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... |
#ifdef PEGASUS_OS_TRU64
#ifndef __UNIX_NETWORKINGIDAUTHENTICATION_PRIVATE_H
#define __UNIX_NETWORKINGIDAUTHENTICATION_PRIVATE_H
#endif
#endif
|
// Copyright (c) 2009 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 "base/message_loop.h"
#include <algorithm>
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#i... |
/* Convert.cc
*Hilfsprogramm
*
*Bereitet die gegebenen Daten in eine
*f�r xpress geeignete Form auf
*
*Ben�tigt
*-basis/Load.giv (Min und Maxfrequenzen + Kanten)
*-basis/Pool.giv (Linienpool)
*-Pool-cost.giv (Kosten)
*
*Ausgabe
*"moseldaten" in der Form
*
*nr_lines: ?
*nr_edges: ?
*A:[?
*?
*?]
*cost:[?]
*Min:[?]
*Max... |
#include <ege/flow/parallel-nucleus.hxx>
namespace ege
{
namespace flow
{
ParallelNucleus::ParallelNucleus(std::shared_ptr<SyncExecutionQueue> queue, unsigned numberOfThreads):
EnqueueExecutor(queue),
queue(queue),
numberOfThreads(numberOfThreads),
thread... |
#include "kalman_filter.h"
#include <iostream>
using Eigen::MatrixXd;
using Eigen::VectorXd;
using std::cout;
using std::endl;
KalmanFilter::KalmanFilter() {}
KalmanFilter::~KalmanFilter() {}
void KalmanFilter::Init(VectorXd &x_in, MatrixXd &P_in, MatrixXd &F_in,
MatrixXd &H_in, MatrixXd &R_... |
#include "neopch.h"
#include "Neon/Editor/Panels/InspectorPanel.h"
#include "Neon/Renderer/Mesh.h"
#include "Neon/Renderer/Renderer.h"
#include "Neon/Renderer/SceneRenderer.h"
#include "Neon/Scene/Actor.h"
#include "Neon/Scene/Components/LightComponent.h"
#include "Neon/Scene/Components/OceanComponent.h"
#include "Neo... |
// This file implements the IDebugStackFrame Interface and Gateway for Python.
// Generated by makegw.py
#include "stdafx.h"
#include "PyIDebugStackFrame.h"
// @doc - This file contains autoduck documentation
// ---------------------------------------------------
//
// Interface Implementation
PyIDebugStackFrame::Py... |
/*
//@HEADER
// ************************************************************************
//
// KokkosKernels 0.9: Linear Algebra and Graph Kernels
// Copyright 2017 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retain... |
/*
* This file is a part of the open source stm32plus library.
* Copyright (c) 2011,2012,2013 Andy Brown <www.andybrown.me.uk>
* Please see website for licensing terms.
*/
#include "config/stm32plus.h"
#include "config/button.h"
#include "config/exti.h"
using namespace stm32plus;
/**
* Button demo that uses E... |
#ifndef STAN_MATH_REV_ARR_FUN_TO_VAR_HPP
#define STAN_MATH_REV_ARR_FUN_TO_VAR_HPP
#include <stan/math/rev/core.hpp>
#include <stan/math/rev/scal/fun/to_var.hpp>
#include <vector>
namespace stan {
namespace math {
/**
* Converts argument to an automatic differentiation variable.
*
* Returns a var variable with the... |
//=========================================================================
// Copyright (C) 2012 The Elastos 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
//
// ... |
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
/// @copyright
/// Copyright (C) 2020 Assured Information Security, Inc.
///
/// @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 limita... |
#include "../raycaster/hittable/object.h"
#include "../raycaster/geometry.h"
#include "../raycaster/hittable/object.h"
#include "../raycaster/accelerator/bvh.h"
#include "../scene.h"
#include "../../image/image.h"
#include "../../math/random.h"
#include "../camera.h"
#include "../raycaster/caster.h"
#include "../raycas... |
/*=============================================================================
Copyright (c) 2011-2017 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
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.tx... |
/*
* Copyright (c) 2020 Samsung Electronics 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... |
/*
* Copyright 2021 Assured Information Security, 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 a... |
#include<iostream>
using namespace std;
int main() {
int tc,n,k,t,d,sess_data,glob_time=0,time_diff,charge=0,flag=0;
cin>>tc;
while (tc--) {
glob_time=0;
time_diff=0;
charge=0;
flag=0;
cin>>n>>k;
while (n--) {
cin>>t>>d;
glob_time+=t;
if(flag==1){
charge+=t*d;
... |
/*
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 - 2020 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* 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
*
* If any of the fil... |
/*++
Copyright (c) Microsoft Corporation All Rights Reserved
Module Name:
spdiftopo.cpp
Abstract:
Implementation of topology miniport for the spdif (internal).
--*/
#pragma warning (disable : 4127)
#include <sysvad.h>
#include "simple.h"
#include "mintopo.h"
#include "spdiftopo.h"
#i... |
//------------------------------------------------------------------------------------------------//
/// @file document/scene_editor/nodes_handling/scene_editor_group_nodes.cpp
//------------------------------------------------------------------------------------------------//
//-INCLUDES------------------------------... |
/*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2019 Jean Pierre Cimalando <jp-dev@inbox.ru>
* Copyright (C) 2019 Robin Gareus <robin@gareus.org>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without ... |
#pragma once
#include <window.hpp>
#include <audiostream.hpp>
#include <functional>
class AudioNode :
public Window
{
public:
typedef std::function<void(sample_t * dst, int dstCnt, sample_t const * src, int srcCnt)> dsp_t;
typedef std::function<sample_t(sample_t src)> monodsp_t;
private:
int priority;
protected... |
//
// Copyright (c) 2015-2020 Microsoft Corporation and Contributors.
// SPDX-License-Identifier: Apache-2.0
//
#include "BondSerializer.hpp"
#include "utils/StringUtils.hpp"
#include "utils/Utils.hpp"
#include "bond/All.hpp"
#include "bond/generated/CsProtocol_writers.hpp"
#include "bond/generated/CsProtocol_readers.... |
/*
* Catch v2.13.3
* Generated: 2020-10-31 18:20:31.045274
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2020 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software Lic... |
/*
* Copyright Andrey Semashev 2007 - 2014.
* 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)
*/
/*!
* \file windows_version.hpp
* \author Andrey Semashev
* \date 07.03.2009
... |
//*****************************************************************************
// 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... |
//===-- DumpDataExtractor.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
//
//===---------------------------... |
// Running jack: sudo jackd -P70 -p16 -t2000 -dalsa -p64 -n3 -r44100 -s &
//
// -march=armv8-a doesn't work with std::thread on this GCC version,
// see the Jonathan Wakely's comment (2015-10-05) for bug #42734 on gcc.gnu.org
#if ! defined (PV_VERSION)
#error PV_VERSION should be defined.
#endif
// No I/O, aud... |
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS
#include "intrinfix.h"
#include "windows.fixed.h"
#include <sdkddkver.h>
#define D3D11_NO_HELPERS
#include <d3d11on12.h>
|
/******************************************************************************
*
* Purpose: Implementation of MSGCommand class. Parse the src_dataset
* string that is meant for the MSG driver.
* Author: Bas Retsios, retsios@itc.nl
*
*******************************************************************... |
/*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2016-2019 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
// Copyright 2019 The Goma 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 "blob/file_service_blob_uploader.h"
#include "glog/logging.h"
#include "goma_data_util.h"
namespace devtools_goma {
FileServiceBlobUploader::FileS... |
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <_target_monster_contsf_allinform_zocl.hpp>
START_ATF_NAMESPACE
namespace Info
{
using _target_monster_contsf_allinform_zoclInit2_ptr = void (W... |
#include <iostream>
#include "highgui.h"
int main()
{
cvNamedWindow("test2", CV_WINDOW_AUTOSIZE);
CvCapture* capture = cvCreateFileCapture("julia.avi");
IplImage* frame;
while(1)
{
frame = cvQueryFrame(capture);
if(!frame)
break;
cvShowImage("test2", frame);
// 程序暂停33毫秒,获取下一帧图片
// c被设置成按键的ASCII码,否则... |
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this softw... |
/*!
* @copyright
* Copyright (c) 2015-2017 Intel Corporation
*
* @copyright
* 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
*
* @copyright
* http://www.apache.org/licenses/LICENSE-... |
constexpr int N = 1e8;
vector<bool> isPrime(N + 1, true);
vector<int> primeNumbers;
void sieveOfEratosthenes() {
isPrime[0] = isPrime[1] = false;
for (int i = 2; i <= N; ++i) {
if (isPrime[i]) {
primeNumbers.push_back(i);
for (int j = 2 * i; j <= N; j += i) {
isP... |
//
// FILE NAME: CIDXML_EntityDecl.hpp
//
// AUTHOR: Dean Roddey
//
// CREATED: 08/21/1999
//
// COPYRIGHT: Charmed Quark Systems, Ltd @ 2019
//
// This software is copyrighted by 'Charmed Quark Systems, Ltd' and
// the author (Dean Roddey.) It is licensed under the MIT Open Source
// license:
//
// https://opensou... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2019 The Bitcoin Core developers
// Copyright (c) 2020 The Bitcoin Global developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/fees.h>
#in... |
#include "PapyrusForm.h"
#include "GameForms.h"
#include "GameRTTI.h"
#include "PapyrusVM.h"
#include "PapyrusEvents.h"
#include "GameMenus.h"
namespace papyrusForm
{
UInt32 GetType(TESForm* thisForm)
{
return (thisForm) ? thisForm->GetFormType() : 0;
}
BSFixedString GetName(TESForm* thisForm)
{
if (!thisF... |
#include "physics_helpers.h"
//---------------------------------------------------------
double physics_helpers::current_speed(double dx, double dy)
{
return std::sqrt(dx*dx + dy*dy);
}
|
#include "lua_helper.h"
#include "storm.h"
#include <base/path/service.h>
#include <base/path/helper.h>
#include <base/util/unicode.h>
#include <boost/assign.hpp>
namespace base { namespace warcraft3 { namespace lua_engine {
int storm_load(lua::state* ls)
{
const char* path = ls->tostring(1);
if (!path)
{
... |
/*
* Copyright (C) 2003-2005 Tommi Maekitalo
*
* 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 the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* As... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkQtStringToImage.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 softwa... |
#include "mainwindow.h"
#include "QStringUtils.h"
#include "settingsdialog.h"
#include "memorycardmanagerdialog.h"
#include "S3FileBrowser.h"
#include "ui_shared/BootablesProcesses.h"
#include "ui_shared/StatsManager.h"
#include "openglwindow.h"
#include "GSH_OpenGLQt.h"
#ifdef HAS_GSH_VULKAN
#include "vulkanwindow.h... |
// +----------------------------------------------------------------------
// | Project : ray.
// | All rights reserved.
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2015.
// +----------------------------------------------------------------------
// | * Redistributi... |
/*************************************************************************/
/* godot_linuxbsd.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
/*
* Copyright (c) 2011-2013 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
* libbitcoin is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License with
* additional permissions to the one published by the Free Software
* Fou... |
#include "filltool.h"
#include "toonz/tframehandle.h"
#include "toonz/tcolumnhandle.h"
#include "toonz/tpalettehandle.h"
#include "toonz/preferences.h"
#include "toonz/txsheethandle.h"
#include "toonz/tobjecthandle.h"
#include "toonz/tscenehandle.h"
#include "tools/toolhandle.h"
#include "tools/toolutils.h"
#include ... |
//////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source
// License. See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by:
//
// File created by:
/... |
/* ---------------------------------------------------------------------------
** This software is in the public domain, furnished "as is", without technical
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
**
** PeerConnectionManager.cpp
**
** -----------------------------... |
/*=============================================================================
Copyright (c) 2011-2015 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
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.tx... |
// Copyright 2018 The Crashpad 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 ... |
#include <iostream>
#include <vector>
using namespace std;
pair<int, int> minmax(vector<int> arr)
{
int maxima = INT_MIN;
int minima = INT_MAX;
int n = arr.size();
int i = 0;
int j = n - 1;
while (i < n && j >= 0)
{
maxima = max(maxima, arr[i]);
minima = min(minima, arr[j]... |
/*
** Copyright 2011-2013 Merethis
**
** This file is part of Centreon Engine.
**
** Centreon Engine is free software: you can redistribute it and/or
** modify it under the terms of the GNU General Public License version 2
** as published by the Free Software Foundation.
**
** Centreon Engine is distributed in the hope... |
// Copyright (C) 2005 Arkadiy Vertleyb
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_INTEGRAL_TEMPLATE_PARAM_HPP_INCLUDED
#define BOOST_TYPEOF_INTEGRAL_TEMPLATE_PARAM_HPP_INCLUDED
#define BO... |
// Copyright(c) 2016 Jounayd Id Salah
// Distributed under the MIT License (See accompanying file LICENSE.md file or copy at http://opensource.org/licenses/MIT).
#include "container/pch.h"
#include "container/string/coChar_f.h"
#define _coCC(_category_) _coCharCategory_##_category_
//---------------------------------... |
/******************************************************************************\
Copyright (c) 2005-2020, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source c... |
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//
#include "nf_hardware_ti_native.h"
// declare a shorter type to make code readable
typedef Library_nf_hardware_ti_native_nanoFramework_Hardware_TI_Power__PinWakeupConfig PinWakeupConfig;
HRES... |
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include "utility.h"
#include "VMparser.h"
#include "CodeWriter.h"
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
const char FILE_SEPARATOR = '\\';
#else
const char FILE_SEPARATOR = '/';
#endif
//////////////////... |
_declspec(dllexport) int add(int a, int b)
{
return a + b;
} |
// -*-Mode: C++;-*-
// * BeginRiceCopyright *****************************************************
//
// $HeadURL: https://hpctoolkit.googlecode.com/svn/branches/hpctoolkit-hpcserver/src/tool/hpcserver/SpaceTimeDataController.cpp $
// $Id: SpaceTimeDataController.cpp 4317 2013-07-25 16:32:22Z felipet1326@gmail.com $
//... |
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General... |
#pragma once
#include <memory>
#include <iostream>
namespace util::allocator {
void add_memory (uintmax_t amount);
void free_memory (uintmax_t amount);
uintmax_t peak (void);
uintmax_t total (void);
uintmax_t freed (void);
uintmax_t now (void);
template <typename T>
class allocator {
public:
... |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Configuration.proto
#include "Configuration.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>... |
/* Copyright (c) 2015-2018 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, me... |
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2022, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may ... |
//
// Created by xxzxcuzx_me on 10.03.19.
//
#include "Tree.h"
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <random>
Tree::Tree() noexcept {
size = 0;
//Przygotuj wartownika
guard = std::make_shared<ElementTree>();
guard->isBlack = true;
guard->parent = guard;
guard->leftC... |
// Copyright (c) 2010, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditi... |
#include "Line.h"
#include "OrientationTest.h"
bool Line::IsIntersecting(cv::Point2f a, cv::Point2f b, cv::Point2f c, cv::Point2f d)
{
//we check the condition for non - intersection
bool firstCombo = ((OrientationTest::getSign(a, b, c) == OrientationTest::getSign(a, b, d)) && (OrientationTest::getSign(c, d, a... |
/*
* Copyright (c) 2018 oxarbitrage and contributors.
*
* The MIT License
*
* 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... |
// Copyright 2020 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 "device_adapter.h"
#include <lib/sync/completion.h>
#include <lib/syslog/global.h>
#include <zircon/status.h>
#include <fbl/auto_lock.h>
namesp... |
/**
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator... |
#pragma once
#include "Screen.hh"
#include "stdint.h"
#include "spilcd16bit.hh"
#include "printf/printf.hh"
class CVScreen:public Screen {
public:
CVScreen(SPILCD16bit *lcd);
virtual ~CVScreen();
protected:
void RedrawCompletely() override;
void OnRotaryTurn(uint32_t rotaryKnobFlags, int16_t rotarySteps) override;... |
//
// Copyright (c) 2008-2017 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... |
// Guo Wanqi 2019
#include "TankMovementComponent.h"
#include "TankTrack.h"
void UTankMovementComponent::IntendMoveForward(float verticalThrow) {
//UE_LOG(LogTemp, Warning, TEXT("vertical throw %f"), verticalThrow);
if (!ensure(leftTrack) || !ensure(rightTrack)) return;
leftTrack->SetThrottle(verticalThrow);
righ... |
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <algorithm>
#include <limits>
#include <list>
#include <memory>
#include <vector>
#include <ngraph/ngraph.hpp>
#include <ngraph/pass/graph_rewrite.hpp>
#include "transformation_context.hpp"
#include "quantiz... |
/*
-- MAGMA (version 2.5.4) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date October 2020
@precisions normal z -> c d s
@author Hartwig Anzt
*/
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#in... |
#include "Library.h"
void Library::parse()
{
std::regex pattern("(.*):(.*)[\\n\\r]*");
std::smatch result{};
std::ifstream file(path);
std::string line;
for (int i = 0; std::getline(file, line); ++i)
{
if (!std::regex_match(line, result, pattern))
{
std::ostringstream oss;
oss << "Failed to parse \""... |
/*
Copyright (C) 2018-2020 Theodorus Software
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,... |
/*******************************************************************************
* Copyright 2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... |
//
// _
// ___/_)
// (, / ,_ _
// / (_(_/ (_(_(_
// CX________________
// )
//
// Luna
// A web application and API framework in modern C++
//
// Copyright © 2016–2018 D.E. Goodman-Wilson
//
#include <gtest/gtest.h>
#include <luna/luna.h>
#include <cpr/cpr.h>
TEST(put, default_404)... |
#include "tree.h"
#include <tomlplusplus/toml.h>
#include <sstream>
using namespace tog;
namespace tog {
Tree::Tree(std::unordered_map<std::string, Handle<Blob>> &&blobs,
std::unordered_map<std::string, Handle<Tree>> &&trees)
: _blobs{std::move(blobs)}, _trees{std::move(trees)} {}
const std::vector... |
//===-- TypeHierarchyTests.cpp ---------------------------*- C++ -*-------===//
//
// 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 <iostream>
using namespace std;
class Begin101
{
private:
int i,k;
string s;
public:
Begin101()
{
cin>>s>>k;
for(i=0;i<k;i++)
{cout<<s[s.length()-k+i];}
}
};
int main() {
Begin101 b;
return 0;
}
|
/**********************************************************************
// @@@ START COPYRIGHT @@@
//
// 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. ... |
// Sieve of Eratosthenes
#include <vector>
#include <utility>
using namespace std;
using ll = long long;
/*snippet-begin*/
struct sieve {
const int maxn;
vector<int> f, primes;
sieve(int maxn) : maxn(maxn), f(maxn) {
for (int i=2; i<maxn; i++) {
if (f[i] == 0) {
f[i] ... |
// Copyright (c) 2017 The Zcash developers
// Copyright (c) 2017 The PIVX developers
// Copyright (c) 2018 The nint developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "torcontrol.cpp"
#include <boost/test/unit_... |
#include <bits/stdc++.h>
using namespace std;
vector<string> split_string(string);
// Complete the countSwaps function below.
void countSwaps(vector<int> a) {
int n = a.size(), count=0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n - 1; j++) {
// Swap adjacent elements if they a... |
/***************************************************************************
* Copyright (C) by GFZ Potsdam *
* *
* You can redistribute and/or modify this program under the *
* terms o... |
#include "src/enums/webrtc/degradation_preference.h"
#define ENUM(X) DEGRADATON_PREFERENCE ## X
#include "src/enums/macros/impls.h"
#undef ENUM
|
#include <common/app/log/LogContext.h>
#include <common/net/message/storage/quota/SetExceededQuotaRespMsg.h>
#include "program/Program.h"
#include "SetExceededQuotaMsgEx.h"
bool SetExceededQuotaMsgEx::processIncoming(ResponseContext& ctx)
{
bool retVal = true;
FhgfsOpsErr errorCode = FhgfsOpsErr_SUCCESS;
i... |
#include <stan/math.hpp>
#include <gtest/gtest.h>
TEST(MathFunctions, logInt) {
using stan::math::log;
using std::log;
EXPECT_FLOAT_EQ(std::log(3), log(3));
EXPECT_FLOAT_EQ(std::log(3.0), log(3.0));
}
TEST(MathFunctions, log_works_with_other_functions) {
Eigen::VectorXd a(5);
a << 1.1, 1.2, 1.3, 1.4, 1.5;... |
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device 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:
*
* 1. Redist... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.