text stringlengths 7 961k |
|---|
/*
* Copyright 2008 by IDIAP Research Institute
* http://www.idiap.ch
*
* See the file COPYING for the licence associated with this software.
*/
#include "ViterbiVADGate.h"
Tracter::ViterbiVADGate::ViterbiVADGate(
Component<float>* iInput,
ViterbiVAD* iVADInput,
const char* iObjectN... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_function.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "chrome/browser/exten... |
// Copyright (c) Peter Hillerström (skipifzero.com, peter@hstroem.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 software for ... |
#include <iostream>
#include <string>
#include <vector>
#include "FamilyTree.hpp"
using namespace std;
//*** family tree ***
family::Tree::Tree(string name){
this->root = new Person(name);
}
family::Tree::~Tree(){
delete(root);
}
family::Tree& family::Tree::addFather(string name, string father){
Person... |
/*************************************************************************
* Copyright (c) 2019-2020 Advanced Micro Devices, Inc. All rights reserved.
*
* See LICENSE.txt for license information
************************************************************************/
#ifndef TEST_GATHER_HPP
#define TEST_GATHER_HPP... |
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
* Copyright (C) 2002-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
**********... |
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as p... |
/**
* Location API
* Geolocation, Geocoding and Maps
*
* OpenAPI spec version: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "OAITimezone_response_schema.h"
#include "OAIH... |
#ifndef IDOCP_COM_COST_HPP_
#define IDOCP_COM_COST_HPP_
#include "Eigen/Core"
#include "idocp/robot/robot.hpp"
#include "idocp/cost/cost_function_component_base.hpp"
#include "idocp/cost/cost_function_data.hpp"
#include "idocp/ocp/split_solution.hpp"
#include "idocp/ocp/split_kkt_residual.hpp"
#include "idocp/ocp/spl... |
//
// Copyright (c) 2008-2022 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... |
// ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018-2021 www.open3d.org
//
// Perm... |
using namespace std;
#include "Plans/Behaviour/ConstraintUsingBehaviour.h"
/*PROTECTED REGION ID(inccpp1414068597716) ENABLED START*/ // Add additional includes here
#include "ConstraintTestPlanDummySolver.h"
#include <iostream>
/*PROTECTED REGION END*/
namespace alica
{
/*PROTECTED REGION ID(staticVars1414068597716)... |
/*
* Copyright (c) 2009 The Regents of The University of Michigan
* 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, ... |
// greedy approach to solve the problem
#include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;
vector<string> split(const string& s, char delimiter) {
vector<string> tokens;
string token;
istringstream tokenStream(s);
... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 Litecoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "irc.h"
#include "db.h"
#i... |
#include "hull.hpp"
#include "platform/platform.hpp"
#include "skyland/tile.hpp"
namespace skyland {
Hull::Hull(Island* parent, const Vec2<u8>& position)
: Room(parent, name(), size(), position, Health(240))
{
}
void Hull::update(Platform& pfrm, App& app, Microseconds delta)
{
Room::update(pfrm, app, d... |
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017 The SEOCOIN developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "uritests.h"
#include "guiutil.h"
#include "walletmodel.h"
#include <QUrl>... |
/*
* Copyright © 2010 Intel Corporation
*
* 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, pub... |
#include "../../../shared/generated/cpp/smartcradleBase.h"
#include "SmartCradle.h"
#include <algorithm>
#include <sstream>
namespace rho {
using namespace apiGenerator;
using namespace common;
CCradle* m_pSmartCradle;
class CSmartCradleImpl: public CSmartCradleBase
{
public:
CSmartCradleImpl(const rho::String&... |
//===--- Driver.cpp - Swift compiler driver -------------------------------===//
//
// 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 2019 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/cronet/native/test/test_request_finished_info_listener.h"
#include "base/logging.h"
namespace cronet {
namespace test {
Cronet_Req... |
// Copyright (c) 2017-2019, The MKEcoin Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
... |
// 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 "src/ui/scenic/lib/input/injector.h"
#include <lib/fostr/fidl/fuchsia/ui/pointerinjector/formatting.h>
#include <lib/syslog/cpp/macros.h>
#inclu... |
/**********
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. (See <http://www.gnu.org/copyleft/lesser.html>.)
This libr... |
/*
Copyright (c) 2005-2022, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
/****************************************************************************
* Copyright (c) 2018-2020 by the ExaMPM authors *
* All rights reserved. *
* *
* This ... |
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
vector<int> arr[100005];
bool vis[100005];
vector<int> v;
int dfs(int node){
vis[node]=true;
int num_node=0;
for(int child:arr[node]){
if(!vis[child])
num_node+=dfs(child);
}
return num_node+1;
}
int main(){
int t,n,m,cl,c... |
//TODO: usefull comment
#include <cstdlib>
using namespace std;
void ssleep();
void sssleep();
static int counter = 0;
struct A{
A(int _v=0):v(_v){
ssleep();
v = -1;
}
int v;
};
int getV(){
static A a;
return a.v;
}
#ifdef _WIN32
#include <Windows.h>
static CRITICAL_SECTION cs;
void init(){
//on window... |
// mongoshim_options_init.cpp
/*
* Copyright (C) 2010 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in t... |
//
// kern_patcher.hpp
// Lilu
//
// Copyright © 2016-2017 vit9696. All rights reserved.
//
#ifndef kern_patcher_hpp
#define kern_patcher_hpp
#include <Headers/kern_config.hpp>
#include <Headers/kern_compat.hpp>
#include <Headers/kern_util.hpp>
#include <Headers/kern_mach.hpp>
#include <Headers/kern_disasm.hpp>
#... |
#include <cstdio>
#include <queue>
#define N 200000
int S[N];
void reset_s(int n)
{
while(n--) S[n] = n;
}
int find_s(const int & x)
{
if(S[x] == x) return x;
return S[x] = find_s(S[x]);
}
bool union_s(int x, int y)
{
x = find_s(x);
y = find_s(y);
if(x == y) return 0;
S[y] = x;
return 1;
}
struct edge_t... |
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04... |
// Copyright (c) 2018 The bitphantom Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <interfaces/handler.h>
#include <util/memory.h>
#include <boost/signals2/connection.hpp>
#include <utility>
namespa... |
#include "netbase.h"
#include "masternodeconfig.h"
#include "util.h"
#include "chainparams.h"
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
CMasternodeConfig masternodeConfig;
void CMasternodeConfig::add(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string... |
#include "core/Engine.h"
#include "core/InputHandler.h"
#include "core/scene/Scene.h"
#include "core/scene/SceneComponents.h"
#include "core/scene/Camera.h"
#include "core/scene/FirstPersonController.h"
#include "core/scene/BoundingVolumeHierarchy.h"
#include "core/renderer/geometry/Mesh.h"
#include "core/renderer/geom... |
#include <cppunit/extensions/HelperMacros.h>
#include "DataFormats/Candidate/interface/Particle.h"
#include "TBufferFile.h"
#include "TClass.h"
#include <iostream>
class testParticle : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(testParticle);
CPPUNIT_TEST(checkXYZ);
CPPUNIT_TEST(checkPolar);
CPPUNIT_TEST... |
#include "Configuration.h"
#include "Display.h"
#include "Temperature.h"
#include <Arduino.h>
#ifdef USE_MAX31855
#include <Adafruit_MAX31855.h>
Adafruit_MAX31855 thermocouple(MAXCLK, MAXCS, MAXDO);
#endif
#ifdef USE_MAX6675
#include <max6675.h>
MAX6675 thermocouple(MAXCLK, MAXCS, MAXDO);
#endif
vo... |
// Test for multidimensional subscript operator support.
// Proposed for C++23: P2128R6.
struct table
{
int width = 100;
int operator[](int x, int y) const { return x + width * y; }
};
int main()
{
return table{}[0, 0];
} |
/*
* This file belongs to the Galois project, a C++ library for exploiting parallelism.
* The code is being released under the terms of the 3-Clause BSD License (a
* copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
#include "examples/calc/calc_lexer.hpp"
#include "examples/calc/calc.hpp"
#include <iostream>
#include <string>
int main(){
while (true){
std::unique_ptr<Lexer> l = std::make_unique<CalcLexer>();
std::string input = "";
std::cout << "> ";
std::getline(std::cin, input);
if (... |
// -*- C++ -*-
//
// michael a.g. aïvázis <michael.aivazis@para-sim.com>
// parasim
// (c) 2013-2018 all rights reserved
//
// my declarations
#include "version.h"
// my definitions
const char *
altar::models::cdm::
version() {
return "2.0";
}
// end of file |
// 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/history/in_memory_history_backend.h"
#include <set>
#include <vector>
#include "base/command_line.h"
#include "base/time.h"... |
/*
* 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... |
#pragma once
#include <vector>
#include "include_TFx_pls_no_warnings.hpp"
#include "../../libs/amd_tressfx/include/AMD_TressFX.h" // AMD forgot to import
// #include "../../libs/amd_tressfx/include/TressFXSDFCollision.h"
#include "../../libs/amd_tressfx/include/TressFXSimulation.h"
// lib forwards
// -
struct Global... |
#include "msg.hpp"
#include "utils.hpp"
#include "sysutils.hpp"
#include "farutils.hpp"
#include "common.hpp"
#include "ui.hpp"
#include "archive.hpp"
#include "options.hpp"
const wchar_t* c_method_copy = L"Copy";
const wchar_t* c_method_lzma = L"LZMA";
const wchar_t* c_method_lzma2 = L"LZMA2";
const wchar_t* c... |
/*===================================================================
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... |
// -----------------------------------------------------------------------------------------------------
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
// This file may be used, modified and/or redistributed under the terms of th... |
//////////////////////////////////////////////////////////////////////////////
/// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand
/// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI
///
/// Distributed under the Boost Software License, Version 1.0
/// ... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int N;
cin >> N;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
string weird = "Weird";
string notWeird = "Not Weird";
string ans = "";
if (N % 2 == 1)
{
ans = weird;
}
else if (N >= 2)
... |
#include <gtest/gtest.h>
#include "utility.hpp"
TEST(lang_parser, algebra_solver_good) {
test_parsable("algebra_solver_good");
}
TEST(lang_parser, algebra_solver_bad) {
test_throws("algebra_solver/bad_fun_type",
"Wrong signature ");
test_throws("algebra_solver/bad_y_type",
"Second ar... |
// Copyright 2016 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/installable/installable_manager.h"
#include "base/command_line.h"
#include "base/run_loop.h"
#include "base/threading/thread_tas... |
#ifndef __ENDLINER_HPP__
#define __ENDLINER_HPP__
// A class to be an indicator to the OutputStreamer that triggers a print of an end line
class EndLine{
};
#endif // __ENDLINER_HPP__ |
// Copyright 2019 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 "test/FuzzerImpl.h"
#include "invariant/OrderBookIsNotCrossed.h"
#include "ledger/Ledg... |
// Copyright (c) 2017 The Schezuancoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "consensus/validation.h"
#include "wallet/coincontrol.h"
#include "wallet/feebumper.h"
#include "wallet/fees.h"
#inc... |
#include <drivers/uart.h>
#include <drivers/bcm_aux.h>
#include <drivers/gpio.h>
#include <stdstring.h>
CUART sUART0(sAUX);
CUART::CUART(CAUX& aux)
: mAUX(aux), mOpened(false)
{
}
bool CUART::Open()
{
// TODO: zamek, aby se neco neseslo
if (mOpened)
return false;
// rezervujeme si TX a RX... |
// Copyright (C) 2016-2020 Jonathan Müller <jonathanmueller.dev@gmail.com>
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#include <type_safe/narrow_cast.hpp>
#include <catch.hpp>
using namespace type_safe;
TEST_CASE("narrow_cast<integer>")... |
//=================================================================================================
/*!
// \file src/mathtest/smatdmatmult/MIbSDb.cpp
// \brief Source file for the MIbSDb sparse matrix/dense matrix multiplication math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// Thi... |
#include <WorldManager.h>
#include <RenderManager.h>
#include <Game.h>
#include <list>
#include <TransformComponent.h>
#include <RTSLogicComponent.h>
#include <RTSVillagerLogicComponent.h>
using namespace irr;
using namespace core;
using namespace video;
using namespace gui;
WorldManager::WorldManager ( float gridSiz... |
// Copyright 2017 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "fxjs/cfx_v8.h"
#include "core/fxcrt/fx_memory.h"
#include "third_pa... |
/*
* Copyright (c) 2018, NVIDIA 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:
* * Redistributions of source code must retain the above copyright
* notice, this list of co... |
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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.or... |
// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/json/
#include <iostream>
#include <tao/json.hpp>
int main( int argc, char** argv )
{
if( argc != 2 ) {
std::cerr << "usage: " << argv[ 0 ] << " file.cbor" << std::endl;
std... |
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2010-2015 openpyxl
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the right... |
#include "common/grpc/context_impl.h"
#include <cstdint>
#include <string>
namespace Envoy {
namespace Grpc {
ContextImpl::ContextImpl(Stats::SymbolTable& symbol_table)
: symbol_table_(symbol_table), stat_name_pool_(symbol_table),
grpc_(stat_name_pool_.add("grpc")), grpc_web_(stat_name_pool_.add("grpc-web"... |
/* ============================================================================
* Copyright (c) 2009-2016 BlueQuartz Software, LLC
*
* 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 ... |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "askpassphrasedialog.h"
#include "ui_askpassphrasedialog.h"
#include "guiconstants.h"
#include "walletmodel.h"
#inc... |
// Copyright (c) 2000-2022, Heiko Bauke
// 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 ... |
// Copyright Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
========================================================================... |
// 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 "third_party/blink/renderer/platform/graphics/paint/paint_chunker.h"
#include "cc/base/features.h"
#include "third_party/blink/renderer/platform... |
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n; cin >> n;
string s; cin >> s;
int sum = 0, mi = 0;
for (char c:s) {
sum += c=='('?1:-1;
mi = min(mi, sum);
}
if (mi < 0) sum -= mi;
mi *= -1;
string res;
for (int i = 0; i < mi; i++) {
res.... |
/*
*
* Copyright 2017 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
#ifndef MARNAV__NMEA__ALM__HPP
#define MARNAV__NMEA__ALM__HPP
#include <marnav/nmea/sentence.hpp>
#include <marnav/utils/optional.hpp>
namespace marnav
{
namespace nmea
{
/// @brief ALM - GPS Almanac Data
///
/// This sentence expresses orbital data for a specified GPS satellite.
///
/// @code
/// 1 2 3 4... |
// SPDX-License-Identifier: MIT
#include "vk_descriptor_set_model_instance.hpp"
#include <array>
namespace BKVK::DS // Descriptor set.
{
ModelInstance::ModelInstance(
const std::shared_ptr<DSL::Base> &layout,
const std::shared_ptr<bk_sTexture> &texture,
const std::vector<std::shared_ptr<UniformBuffer>> &u... |
// Copyright (C) 2020 Jérôme Leclercq
// This file is part of the "Burgwar" project
// For conditions of distribution and use, see copyright notice in LICENSE
#include <CoreLib/Scripting/ServerEntityStore.hpp>
#include <NDK/Components.hpp>
#include <Nazara/Utility/Image.hpp>
#include <CoreLib/TerrainLayer.hpp>
#includ... |
#ifdef STAN_OPENCL
#include <stan/math/opencl/rev.hpp>
#include <stan/math.hpp>
#include <gtest/gtest.h>
#include <test/unit/util.hpp>
TEST(OpenCLAdjointResults, errors) {
stan::math::matrix_cl<double> a(3, 2);
stan::math::matrix_cl<double> b(6, 1);
stan::math::var_value<stan::math::matrix_cl<double>> c(
s... |
/* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| |
| Cop... |
/*
* 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... |
/*=========================================================================
Program: ParaView
Module: $RCSfile$
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView lice... |
/*
Recover the Original Array
https://leetcode.com/problems/recover-the-original-array/
Alice had a 0-indexed array arr consisting of n positive integers. She chose an arbitrary positive integer k and created two new 0-indexed integer arrays lower and higher in the following manner:
lower[i] = arr[i] - k, for every i... |
// 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 <_base_fld.hpp>
START_ATF_NAMESPACE
struct _weapon_bullet_link_fld : _base_fld
{
int m_nUsingWeaponNum;
char m_strUsingWeaponCode[50][... |
//
// Created by 菊池和気 on 2016/05/12.
//
#include <iostream>
#include <vector>
#include <string>
#include <memory>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <cmath>
// Include GLEW
#ifdef __APPLE__ //For OSX
#include <gl/glew.h>
#define _CRT_SECURE_NO_WARNINGS
#define GL_GLEXT_PROTOTYPES
#en... |
//#include "rosic_ScopeScreenScanner.h"
//using namespace rosic;
//-------------------------------------------------------------------------------------------------
// construction/destruction:
ScopeScreenScanner::ScopeScreenScanner()
{
sampleRate = 44100;
scanFreq = 5;
numCyclesShown = 2;
//sync = false;
... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for(ll i=0;i<(ll)(n);i++)
#define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++)
#define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--)
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = ... |
/**
* \file WdbeQRlsList.cpp
* Dbs and XML wrapper for table TblWdbeQRlsList (implementation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author Alexander Wirthmueller (auto-generation)
* \date created: 5 Dec 2020
*/
// IP header --- ABOVE
#include "WdbeQRlsList.h"
using namespace std;
using namespace... |
/*
* 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... |
// Time Complexity: O(n * logk)
// Space Complexity: O(k)
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode *mergeKLists(vector<ListNode *> &lists) {
re... |
#include "TravelingSalespersonProblem.h"
/*
**********************************************************************************************************************************
**********************************************************************************************************************************
Solving the T... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/personalize/model/SolutionVersionSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace ... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "utlhashtable.h"
#ifndef GC
#include "igamesystem.h"
#endif
#include "gamestringpool.h"
// mem... |
//===- LiveRangeShrink.cpp - Move instructions to shrink live range -------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
///===------------------------------------------------------... |
//-----------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Tool: AllJoynCodeGenerator.exe
//
// This tool is located... |
/* Copyright 2021 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 (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/Array.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibWeb/Bindings/NavigatorObject.h>
#include <LibWeb/Loader/ResourceLoader.h>
namespace Web {
namespace Bindings {
Navigator... |
/*=========================================================================
Program: Visualization Toolkit
Module: TestPolygonalRepresentationHandleWidget.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for detai... |
#include "utils/SettingsUtils.h"
DiveInoSettings SettingsUtils::getDiveInoSettings()
{
struct DiveInoSettings diveInoSettings;
Preferences prefs;
prefs.begin("DiveIno", true); // read-only
diveInoSettings.seaLevelPressureSetting = prefs.getInt("pressure", 1013);
diveInoSettings.oxygenRateSetting =... |
#pragma once
#include <boost/range.hpp>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
template<class T, size_t S>
::std::wostream &operator<<(
::std::wostream &stream, ::std::array<T, S> const &array)
{
for each (auto const &var in array)
{
stream.width(sizeof(T) * 2);
st... |
// 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 "content/renderer/pepper/ppb_broker_impl.h"
#include "base/logging.h"
#include "content/common/view_messages.h"
#include "content/renderer/p... |
#include "VM/Compiler/Tokenizer/Tokenizer.h"
#include "VM/Compiler/Tokens/TokenFactory.h"
namespace Compiler {
Tokenizer::Tokenizer() {
m_singleCharSymbols['('] = TokenType::LPAREN;
m_singleCharSymbols[')'] = TokenType::RPAREN;
m_singleCharSymbols['+'] = TokenType::PLUS;
m_singleCharSymbols['-'] = T... |
/*BEGIN_LEGAL
Intel Open Source License
Copyright (c) 2002-2015 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:
Redistributions of source code must retain the above copyright noti... |
/** @file not/Notificacao.cpp implementacao das funcoes basicas de notificacao. */
#include "log/log.h"
#include "ntf/notificacao.h"
#include "ntf/notificacao.pb.h"
namespace ntf {
std::unique_ptr<Notificacao> NovaNotificacao(Tipo tipo) {
auto n = std::unique_ptr<Notificacao>(new Notificacao);
n->set_tipo(tipo);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.