text stringlengths 7 961k |
|---|
/* test_poisson.cpp
*
* Copyright Steven Watanabe 2010
* 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)
*
* $Id$
*
*/
#include <boost/random/discrete_distribution.hpp>
#include <boost/random/uniform_int.hpp... |
#include "program.h"
#include "utility.h"
#include "debug.h"
#include <algorithm>
#include <sstream>
using namespace gl;
namespace Engine {
const Program* Program::s_current = nullptr;
ProgramHandle::ProgramHandle(GLuint handle) :
m_handle(handle)
{ }
ProgramHandle::~ProgramHandle() {
glDeleteShader(m_han... |
//--------------------------------------------------------------------------------------------------------------------//
// //
// Tuplex: Blazing Fast Python Data Scien... |
# include <cstdlib> // std :: rand ()
# include <vector> // std :: vector <>
# include <list> // std :: list <>
# include <iostream> // std :: cout
# include <iterator> // std :: ostream_iterator <>
# include <algorithm> // std :: reverse , std :: generate
int main () {
std::vector<int> v_0(10);
for (auto& v ... |
/*
Copyright (C) 2013-present The DataCentric Authors.
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 ... |
// File: tag.hpp Author: Vader Created on 2016. április 23., 6:07
#pragma once
namespace libv {
// tag ---------------------------------------------------------------------------------------------
namespace tag {
struct accumulator {};
struct condition {};
struct history_size {};
struct routing_logic {};
struct si... |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/supervised_user/supervised_user_interstitial.h"
#include "base/memory/weak_ptr.h"
#include "base/metrics/histogram.h"
#include "... |
#include <bits/stdc++.h>
using namespace std;
bool in_bounds (const int i, const int j, const int R, const int C) {
return ((i >= 0 && i < R) && (j >= 0 && j < C));
}
int main () {
int R, C;
while (scanf("%d %d",&R,&C) != EOF) {
char grid[R][C];
bool visit[R][C];
for (int i = 0; i < ... |
// Copyright (C) 2006 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#include <sys/time.h>
#include <iostream>
#include <fstream>
#include <dlib/cmd_line_parser.h>
#include <dlib/test/tester.h>
#include <dlib/string.h>
using namespace std;
using namespace d... |
/***********************************************************************
* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
* *
* This file is part of EvtGen. *
* ... |
#include "App/App.h"
namespace Dough
{
App *App::Instance()
{
static App *_instance = new App();
return _instance;
}
App::App() : config(),
ui(onoffButtonInterruptCallback, setupButtonInterruptCallback),
wifi(),
mqtt(&wifi, mqttOnConne... |
#include <cmath>
#include <memory>
#include <algorithm>
#include "lsfit.h"
#include "lapack.h"
using std::size_t;
int lsfit(const std::vector<double> &y, const std::vector<double> &x, std::vector<double> &b, double &dfe, double &sse)
{
int info = 0;
auto n = y.size();
auto q = x.size() / n;
auto ld... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_dest_wchar_t_ncpy_53d.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_dest.string.label.xml
Template File: sources-sink-53d.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Allocate... |
/*===================================================================
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) 2005-2019 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* 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 AFF3CT_SYSTEMC_SIMU
#include <string>
#include "Tools/Exception/exception.hpp"
#include "Simulation/BFER/Standard/SystemC/SC_BFER_std.hpp"
using namespace aff3ct;
using namespace aff3ct::simulation;
template <typename B, typename R, typename Q>
SC_BFER_std<B,R,Q>
::SC_BFER_std(const factory::BFER_std::parame... |
#include <iostream>
void test_mdarrays()
{
int p[2][3];
p[0][2] = 25;
p[0][1] = 50;
p[0][0] = 100;
p[1][0] = 200;
p[1][1] = 300;
p[1][2] = 400;
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 3; j++)
{
std::cout << p[i][j] << " ";
}
std::cout << "\n";
}
}
void test_mdarrays_decay()
{
in... |
#define _CRT_SECURE_NO_WARNINGS
#include <chrono>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <mutex>
#include <numeric>
#include <sstream>
#include <string>
#include <thread>
#include <vector>
int GetRandom(int max) {
srand(time(NULL));
return rand() % max;
}
void ExecuteThr... |
// Copyright (c) 2014-2015 Hartmut Kaiser
//
// 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)
#if !defined(HPX_PARALLEL_TEST_FOREACH_MAY26_15_1414)
#define HPX_PARALLEL_TEST_FOREACH_MAY26_15_1414
#include <hpx/i... |
#include "rester.h"
#include <map>
#include "../src/history_repository.hpp"
#include "../src/edit_request_presenter.hpp"
#include "../src/edit_request_view.hpp"
#include "../src/edit_body_view.hpp"
#include "../src/edit_history_view.hpp"
#include "../src/edit_body_presenter.hpp"
#include "../src/response_body_present... |
// This is an independent project of an individual developer. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com
#include "configs.h"
#include "base64.h"
#include "..\includes.hpp"
#include "..\utils\util.hpp"
#include <shlobj.h>
#include "../lua/menu_i... |
#pragma once
#include "geometry/mercator.hpp"
#include "geometry/point2d.hpp"
#include "geometry/polyline2d.hpp"
#include <limits>
#include <vector>
namespace routing
{
class FollowedPolyline
{
public:
FollowedPolyline() = default;
template <typename Iter>
FollowedPolyline(Iter begin, Iter end) : m_poly(begi... |
#include "garbage-object.hpp"
#include "garbage-collector.hpp"
namespace Alux {
void GarbageObject::ThrowAway() {
collector.Add(*this);
}
GarbageObject::GarbageObject(GarbageCollector & c)
: garbageLink(*this), collector(c) {
}
GarbageObject::~GarbageObject() {
}
} |
/*
* 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 "Natives.h"
#include "DynamicWorld.h"
// Maximum number of raycasts
#define MAX_MULTICAST_SIZE 99
//*********************************************************************************************************//
// native functions *********************************************************************************... |
// Copyright 2020 The IREE Authors
//
// Licensed 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 "iree/compiler/Dialect/HAL/IR/HALOps.h"
#include "iree/compiler/Dialect/HAL/Transforms/P... |
#ifndef STAN_MATH_PRIM_FUN_UB_CONSTRAIN_HPP
#define STAN_MATH_PRIM_FUN_UB_CONSTRAIN_HPP
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/err.hpp>
#include <stan/math/prim/fun/constants.hpp>
#include <stan/math/prim/fun/exp.hpp>
#include <stan/math/prim/fun/identity_constrain.hpp>
#include <stan/math/prim/fu... |
/* Sirikata
* PintoServerQuerier.cpp
*
* Copyright (c) 2010, Ewen Cheslack-Postava
* 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... |
/**
* @file methods/cf/decomposition_policies/regularized_svd_method.hpp
* @author Haritha Nair
*
* Implementation of the regularized svd method for use in the Collaborative
* Filtering.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You sho... |
/**
* @author : Guilherme Wachs Lopes (gwachs@fei.edu.br)
* @file : LDS
* @created : quarta set 09, 2020 21:35:09 -03
*/
//
// _________________________________
// / ALTERAR APENAS AS FUNÇÕES COM \
// \ COMENTÁRIO "IMPLEMENTAR" /
// ---------------------------------
// ... |
/* Support for print STL container and string in hex.
*
* ```.cpp
*
* using namespace tinylog;
*
* int main()
* {
* // Print STL container.
* std::vector<int> v = { 1, 2, 3, 4, 5 };
* std::cout << v << std::endl;
*
* // Print string in hex.
* std::cout << hexdump("Bravo! The job has be... |
// g2o - General Graph Optimization
// Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
// 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 r... |
//------------------------------------------------------------------------------
// Copyright (c) 2001-2005, Haiku
//
// 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, i... |
#include <iostream>
#include <memory> //smart pointers
#include <cmath>
using namespace std;
class triangle
{
private:
double s1,s2,s3;
public:
triangle(double s1, double s2, double s3)
{
auto func = [](double i, double a)
{
if(i >= 0)
a = i;
el... |
/*
* Copyright (c) 2012 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... |
//#include "SharedObject.h"
#include "PluginHandler.h"
#include <assert.h>
#include <pd_common.h>
#include <stdio.h>
#include <stdlib.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QLibrary>
#include <QtCore/QString>
#include "PluginUI/generated/c_api.h"
//#includ... |
/*
Copyright (c) 2005-2016, 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... |
// System.Runtime.Remoting.Channels.IChannelSender
// System.Runtime.Remoting.Channels.IChannelSender.CreateMessageSink()
/* The following program demonstrates the usage of IChannelSender
interface and its 'CreateMessageSink' method in the namespace
'System.Runtime.Remoting.Channels'. This program creates and
register... |
#include <iostream>
#include <lmlib/geometry.h>
int main()
{
lm::Frustum frustum{1.5f, 16.f / 9.f, 0.1f, 1000.f};
std::cout << frustum.perspective_transform().row(0) << std::endl;
} |
//-------------------------------------------------------------------------------------
// DirectXTexImage.cpp
//
// DirectX Texture Library - Image container
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED W... |
#include <bits/stdc++.h>
using namespace std;
#define sd(x) scanf("%d",&x)
#define su(x) scanf("%u",&x)
#define slld(x) scanf("%lld",&x)
#define sc(x) scanf("%c",&x)
#define ss(x) scanf("%s",x)
#define sf(x) scanf("%f",&x)
#define slf(x) scanf("%lf",&x)
#define ll long long int
#define mod(x,n) (x+n)%n
int C[100007]... |
#ifndef BOOST_SERIALIZATION_HASH_MAP_HPP
#define BOOST_SERIALIZATION_HASH_MAP_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
#pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// serialization/hash_map.hpp:
// serialization for stl hash_map ... |
//=================================================================================================
/*!
// \file src/mathtest/dmatdmatmin/MHaMHb.cpp
// \brief Source file for the MHaMHb dense matrix/dense matrix minimum math test
//
// Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
//
// This file is part... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "Grabber.h"
#include "Kismet/KismetMathLibrary.h"
#include "GameFramework/Actor.h"
// Sets default values for this component's properties
UGrabber::UGrabber()
{
// Set this component to be initialized when the game starts, and ... |
#include <Timer.h>
#include "../IBaseApi.h"
namespace API
{
Timer::Timer()
{
game_api->GetCommands()->AddOnTimerCallback("TimerUpdate", std::bind(&Timer::Update, this));
}
Timer::~Timer()
{
game_api->GetCommands()->RemoveOnTimerCallback("TimerUpdate");
}
Timer& Timer::Get()
{
static Timer instance;
... |
#include <iostream>
#include <gtest/gtest.h>
#include "ezc3d_all.h"
enum HEADER_TYPE{
ALL,
POINT_ONLY,
ANALOG_ONLY,
EVENT_ONLY,
POINT_AND_ANALOG,
POINT_AND_EVENT,
ANALOG_AND_EVENT
};
enum PARAMETER_TYPE{
HEADER,
POINT,
ANALOG,
FORCE_PLATFORM
};
struct c3dTestStruct{
... |
/*
* 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 ... |
//-*- Mode: C++ -*-
// $Id$
// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 *
// Author: 2010 Svein Lindal <slindal@fys.uio.no> *
// for The ALICE HLT Project. *
#if __GNUC__>= 3
using namespace std;
#endif
#include "AliEveE... |
// Copyright (C) 2008-2018 Lorenzo Caminiti
// Distributed under the Boost Software License, Version 1.0 (see accompanying
// file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
// See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
// Test public function overloads (with ... |
////////////////////////////////////////////////////////////////////////////////
//
// CopyRight (c) 2013 Kyungkun Ko
//
// Author : KyungKun Ko
//
// Description : Thread Synchronize on windows
//
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////... |
#include <zel_material.h>
void zel_material_set_camera_uniforms(zel_material_t* material_to_set, glm::mat4 view_matrix, glm::mat4 projection_matrix)
{
uint32_t* shader = (uint32_t*)zel_resources_get_from_id(material_to_set->shader_resource);
zel_use_program((*shader));
uint32_t view_location = material_to_set->cust... |
#include <vector>
#include <iostream>
#include <algorithm>
#include <set>
#include <list>
using namespace std;
// wrong answer
void helper(vector<int>& nums, size_t pos, vector<vector<int>>& ans) {
if (pos >= nums.size()) {
ans.push_back(nums);
return;
}
for (size_t i=pos; i<nums.size(); ++... |
#include <string>
#include <functional>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
#include "BKTree.h"
#include "BKTreeMap.h"
#include "BKTreeAM.h"
/////////// For Testing ///////////////////////////////////////////////////////
#include <time.h>
#include <cassert>
#include <string>
#... |
//===- mlir-cpu-runner.cpp - MLIR CPU Execution Driver---------------------===//
//
// Copyright 2019 The MLIR Authors.
//
// 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.... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve() {
ll n, m, k;
cin >> n >> m >> k;
vector<vector<ll>> dp(n+1, vector<ll>(m+1,0));
for (ll i = 0; i < n; i++) dp[i][0] = INT_MAX;
for (ll i = 0; i < m; i++) dp[0][m] = INT_MAX;
dp[1][1] = 0;
for (ll i = 1; i <= n; i++... |
/********************************************************************************
*
* Copyright (c) 2018 ROCm Developer Tools
*
* 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 So... |
/*
===========================================================================
Doom 3 GPL Source Code
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
Doom 3 Source Code is free software: you can redistribute it and/or modify... |
#include <common.h>
#include <game.h>
#include <g3dhax.h>
#include <sfx.h>
extern "C" bool SpawnEffect(const char*, int, Vec*, S16Vec*, Vec*);
extern int GlobalStarsCollected;
class dChallengeStar : public dEn_c {
int onCreate();
int onExecute();
int onDelete();
int onDraw();
mHeapAllocator_c allocator;
m3d... |
#include "ArenaPch.h"
#include "ArenaUIMainPane.h"
namespace Demi
{
MainPaneControl::MainPaneControl() :
wraps::BaseLayout("ArenaMainPane.layout")
{
_this = this;
initUI();
}
MainPaneControl::~MainPaneControl()
{
}
void MainPaneControl::setVisible(bool _value)
{
mMainWidget->setVisible(_v... |
#ifndef HXHIM_DOUBLE_FUNCTIONS_HPP
#define HXHIM_DOUBLE_FUNCTIONS_HPP
#include <cstddef>
#include "hxhim/constants.h"
#include "hxhim/double.h"
#include "hxhim/struct.h"
namespace hxhim {
int PutDouble(hxhim_t *hx,
void *subject, std::size_t subject_len, enum hxhim_data_t subject_type,
v... |
//----------------------------------*-C++-*-----------------------------------//
/*!
* \file special_functions/F_eta_inv.hh
* \author Kent Budge
* \date Mon Sep 20 15:01:53 2004
* \brief For a fermion species, calculate the dimensionless chemical
* potential given the dimensionless number density and... |
// Given a N x N matrix where every cell has some number of coins. Count number of ways to reach bottom right cell of matrix from top left cell with exactly K coins. We can move to (i+1, j) or (i, j+1) from a cell (i, j).
// Input:
// 2
// 16
// 3
// 1 2 3 4 6 5 9 8 7
// 12
// 3
// 1 2 3 4 6 5 3 2 1
// Output:
// 0
... |
// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet/wallet.h"
#include "config.h"
#include "rpc/server.h"
#include "test/test_bitcoin.h"
#include "validation.h... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
std::vector<int> parseNumbersFromLine(const std::string& line, char separator) {
std::stringstream ss(line);
std::string s;
std::vector<int> numbers;
while (getline(ss, s, separator)) {
try {
... |
/*
Copyright (c) 2015-2018 Advanced Micro Devices, Inc. All rights reserved.
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, co... |
// 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 "ash/common/wm/window_positioner.h"
#include "ash/shell.h"
#include "ash/wm/window_util.h"
#include "components/exo/buffer.h"
#include "component... |
#include "Validation/TrackerRecHits/interface/SiStripRecHitsValid.h"
//needed for the geometry:
#include "CalibTracker/Records/interface/SiStripDetCablingRcd.h"
#include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/SiStripDetId/interfa... |
/**
* \file
* \copyright
* Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "CreateComponentTransportProcess... |
#include "test_runner.h"
#include <algorithm>
#include <iostream>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
using namespace std;
template <typename It>
class Range {
public:
Range(It begin, It end) : begin_(begin), end_(end) {}
It begin() const { return begin_; }
It end() c... |
#pragma once
#include <memory>
#include "abstract_table_scan_impl.hpp"
#include "types.hpp"
namespace opossum {
class Table;
/**
* @brief Compares two columns to each other
*
* Supports:
* - comparing columns of different numerical data types
* - comparing dictionary and value segments
* - comparing referen... |
//
// pointer.cpp
// disizhang
//
// Created by mingyue on 15/12/21.
// Copyright © 2015年 G. All rights reserved.
//
#include <iostream>
int main(int argc, const char *argv[]){
using namespace std;
int updates = 6;
int *p_updates;
p_updates = &updates;
cout << "Values: updates = " ... |
#include <fmt/format.h>
#include <fmt/printf.h>
#include <catch2/catch.hpp>
#include <boost/filesystem.hpp>
#include "test_config.hpp"
#include "embedded_python/functions.hpp"
TEST_CASE( "Python function with one parameter and returning a pair can be called from c++"
, "[embedde_python]" ) {
std::str... |
// Copyright (c) 2019-2023 The PIVXL developers
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017-2019 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-licen... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
// Including type: Zenject.FactoryFromBinder`4
#include "Zenject/FactoryFromBinder_4.hpp"
#inclu... |
#include "stdafx.h"
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;
//
// General Information about an assembly is controlled through the following
// set of ... |
#include <iostream>
using namespace std;
int main()
{
const double PACKAGE_A_PRICE = 39.99,
PACKAGE_B_PRICE = 59.99,
PACKAGE_C_PRICE = 69.99,
PACKAGE_A_MINUTES = 450,
PACKAGE_B_MINUTES = 900,
PACKAGE_A_ADDITIONAL_CHARGES = .45,
... |
/*******************************
Copyright (c) 2016-2022 Grégoire Angerand
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... |
//---------------------------------------------------------------------------//
// Copyright (c) 2014 Roshan <thisisroshansmail@gmail.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
//
// See http://boostorg... |
// Copyright 2016, 2018 The Fuchsia Authors
// Copyright (c) 2008-2015 Travis Geiselbrecht
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <assert.h>
#include <debug.h>
#include <lib/backtrace.h>
#include <l... |
// Copyright (c) 2011-2020 The Vadercoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/vadercoin-config.h>
#endif
#include <qt/askpassphrasedialog.h>
#include <qt/fo... |
//===-- ArgumentPromotion.cpp - Promote by-reference arguments ------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/*
* Copyright 1999-2000,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... |
// Copyright (c) 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 "net/quic/core/congestion_control/send_algorithm_interface.h"
#include "net/quic/core/congestion_control/bbr_sender.h"
#include "net/quic/co... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/docdb/model/DescribeDBClustersResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/c... |
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "lanbonl8.h"
#if defined(LANBONL8)
#include <Arduino.h>
#include "dev/esp32/esp32.h"
#include "driver/pcnt.h" // Pulse count driver
#include "hal/pcnt_hal.h"
#include "ha... |
#include <doctest/doctest.h>
#include <vector>
// 238. Product of Array Except Self
class Solution {
public:
std::vector<int> productExceptSelf(const std::vector<int>& nums) {
std::vector<int> result;
auto product = 1;
for (const auto n : nums) {
product *= n;
result.push_back(product);
... |
#include <iostream>
#include <vector>
using namespace std;
class Solution
{
public:
vector<int> buildArray(vector<int>& nums)
{
vector<int> ans;
int n = nums.size();
for (int i = 0; i < n; i++) ans.push_back(nums[nums[i]]);
return ans;
}
};
int main ()
{
Solution sol... |
// Copyright Neil Groves 2009. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_ALGORIT... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 The Litecoin Developers
// Copyright (c) 2013 adam m.
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#inclu... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The PlanBcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "primitives/transaction.h"
#include "hash.h"
#include "tinyformat.h"
#incl... |
//===- llvm/unittest/CodeGen/AArch64SelectionDAGTest.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
//
//===--------------------... |
/*
* Copyright 2019 OmniSci, 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 t... |
#include "System.h"
#include "misc_v10.h"
using namespace std;
void System::load(Rcpp::List args) {
// split argument lists
Rcpp::List args_params = args["args_params"];
Rcpp::List args_functions = args["args_functions"];
Rcpp::List args_progress = args["args_progress"];
Rcpp::List args_progress_burnin =... |
#include <cstdio>
#include <vector>
#include "gtest/gtest.h"
#include "zserio/SqliteException.h"
#include "sql_constraints/TestDb.h"
#include "sql_constraints/ConstraintsTable.h"
#include "sql_constraints/ConstraintsTableRow.h"
#include "sql_constraints/ConstType.h"
namespace sql_constraints
{
class SqlConstraints... |
/* See LICENSE for license details */
/*
Module: appl_list.cpp
Description:
Linked list
*/
#include <list/appl_list.h>
/*
Function: appl_list_init()
Description:
Initialize an element so that it's a list with a single element, itself.
Parameters:
p_list
Pointer to element to initialize
... |
/*
Copyright (c) 2005-2017, 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... |
/*=========================================================================
Program: ParaView
Module: vtkSMTimeKeeper.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANT... |
#include <array>
#ifdef HAS_OPENSSL
#include <openssl/aes.h>
#include <openssl/evp.h>
#endif
#include <string>
#include "green_power.h"
// this code is based on
// https://github.com/Smanar/Zigbee_firmware/blob/master/Encryption.cpp
#define AES_KEYLENGTH 128
#define AES_BLOCK_SIZE 16
const unsigned char defaultTCLin... |
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
*
* Use of this source code is governed by MIT license that can be found in the
* LICENSE file in the root of the source tree. All contributing project authors
... |
#include <map>
#include <string>
#include <boost/test/unit_test.hpp>
#include "json/json_spirit_writer_template.h"
#include "main.h"
#include "wallet.h"
using namespace std;
using namespace json_spirit;
// In script_tests.cpp
extern Array read_json(const std::string& filename);
extern CScript ParseScript(string s);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.