text stringlengths 7 961k |
|---|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmPropertyDefinitionMap.h"
#include <utility>
void cmPropertyDefinitionMap::DefineProperty(const std::string& name,
... |
/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#in... |
/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/core/SkPath.h"
#include "include/core/SkString.h"
#include "include/private/SkMutex.h"
#include "src/core/SkOSFile.h"
#include "src/pathops/SkOpCoincidence.h... |
#include "GeometryCollection.h"
#include "components/Exceptions.h"
#include "datasources/VectorDataSource.h"
#include "geometry/MultiGeometry.h"
#include "renderers/drawdatas/GeometryCollectionDrawData.h"
namespace carto {
GeometryCollection::GeometryCollection(const std::shared_ptr<MultiGeometry>& geometry, cons... |
/**
* Copyright 2021 Scott Brauer
*
* 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... |
#pragma once
#include <cstring>
#include <fcntl.h>
#include <iostream>
#include <linux/fs.h>
#include <memory>
#include <string>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <unistd.h>
class FileHandle {
private:
int fd_ = -1;
public:
FileHandle(int fd)
: fd_(fd) {};
... |
#ifndef ABLATELIBRARY_COMPRESSIBLEFLOW_H
#define ABLATELIBRARY_COMPRESSIBLEFLOW_H
#include <petsc.h>
#include <eos/transport/transportModel.hpp>
#include <string>
#include "domain/domain.hpp"
#include "eos/eos.hpp"
#include "finiteVolume/finiteVolume.hpp"
#include "finiteVolume/fluxCalculator/fluxCalculator.hpp"
#incl... |
// Copyright (c) NetXS Group.
// Licensed under the MIT license.
#define MONOTTY_VER "Monotty Desktopio v0.5.9999j"
// Enable demo apps and assign Esc key to log off.
//#define DEMO
// Enable keyboard input and unassign Esc key.
#define PROD
// Tiling limits.
#ifndef PROD
#define INHERITANCE_LIMIT 12
#defin... |
// C++ files are currently not supported (i.e. `flang -cc1`). Make sure that the
// driver reports this as expected.
// REQUIRES: new-flang-driver
//-----------
// RUN LINES
//-----------
// RUN: not %flang %s 2>&1 | FileCheck %s
//-----------------------
// EXPECTED OUTPUT
//-----------------------
// CHECK: error:... |
/* 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... |
//
// GLBackend.cpp
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include <sstream>
#include "AllShader.hpp"
#include "GLSSBOBuffer.hpp"
#include "GLTexture.hpp"
#include <MNN/AutoTime.hpp>
#include "GLBackend.hpp"
#include "core/Macro.h"
#include "core/TensorUti... |
/**
* Copyright (C) 2017 MongoDB 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 the hope that it will be usef... |
/*
* 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 "fractionalBignum.hpp"
#include <iostream>
#include <cmath>
#include <gmp.h>
#include <ctime>
int main(int argc, char const *argv[])
{
// double r = ((double) rand() / (RAND_MAX));
const size_t K = 8;
u_int64_t v[K] = {1,1,1,1};
fractionalBignum<K> f(v);
mpf_set_default_prec(K * 64);
... |
#include <iostream>
#include <cstring>
#include <cstdio>
#include <queue>
const int N = 100000 + 11 ;
using namespace std ;
int n , m , dis[N] ;
bool used[N] ;
struct id
{
int l , r ;
} links[N] ;
void Init( )
{
scanf( "%d%d" , &n , &m ) ; int a , b , c ;
for( int x = 1 ; x <= m ; ++x )
{
scanf... |
/** ExaTN:: Reconstructor of an approximate tensor network expansion from a given tensor network expansion
REVISION: 2020/03/17
Copyright (C) 2018-2020 Dmitry I. Lyakh (Liakh)
Copyright (C) 2018-2020 Oak Ridge National Laboratory (UT-Battelle) **/
/** Rationale:
(A) Given a tensor network expansion of some form, the... |
#include <algorithm>
#include <boost/optional.hpp>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
... |
/* This file is part of PyMesh. Copyright (c) 2015 by Qingnan Zhou */
#include "FEMeshFactory.h"
#include "TriangleMesh.h"
#include "TetrahedronMesh.h"
using namespace PyMesh;
using namespace FEMeshFactory;
FEMeshPtr FEMeshFactory::adapt(MeshPtr mesh) {
const size_t dim = mesh->get_dim();
const size_t num_vox... |
/*
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... |
/*******************************************************************************
* Copyright 2020-2021 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.... |
/*************************************************************************/
/* light_cluster_builder.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
/*
* UncertaintyColor.cpp
*
* Author: Matthias Braun
* Copyright (C) 2016 by Universitaet Stuttgart (VISUS).
* All rights reserved.
*
* This module is based on the source code of "Color" in megamol protein plugin (svn revision 1500).
*
*/
#include "protein/UncertaintyColor.h"
#include <iostream>
#include <omp... |
#include <boost/mpl/aux_/preprocessor/repeat.hpp> |
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// test_list.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// 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.b... |
//=================================================================================================
/*!
// \file src/mathtest/dmatsmatschur/DDaUCb.cpp
// \brief Source file for the DDaUCb dense matrix/sparse matrix Schur product math test
//
// Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
//
// Thi... |
// Copyright 2020 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/net/net_error_diagnostics_dialog.h"
#include "ash/constants/ash_features.h"
#include "ash/webui/connectivity_diagnostics/url_con... |
// -*- C++ -*-
// Copyright (C) 2005-2020 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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 3... |
/*
* Copyright (c) 2011-2018, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, w... |
// Copyright (c) 2011-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.
#if defined(HAVE_CONFIG_H)
#include "config/luk-config.h"
#endif
#include "optionsmodel.h"
#include "lukunits.h"
#include "... |
/*
* Copyright 2020, av1dec authors
* 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 conditio... |
//-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2022 Ryo Suzuki
// Copyright (c) 2016-2022 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# include <Siv3D/Script.hpp>
# include <Siv3D/... |
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2017 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages a... |
#include "InputControls.h"
#include "Utils.h"
DebouncedButton resetBtn(RESET_PIN, DEBOUNCE_RESET_BTN_MS);
DebouncedButton pauseBtn(PAUSE_RESUME_PIN, DEBOUNCE_BTN_MS);
DebouncedButton speedUpBtn(SPEED_UP_PIN, DEBOUNCE_BTN_MS);
DebouncedButton speedDownBtn(SPEED_DOWN_PIN, DEBOUNCE_BTN_MS);
int resetBtnPressCountPrev =... |
#ifndef TL_UTILITY_META_HPP
#define TL_UTILITY_META_HPP
#include <type_traits>
#include <tuple>
#include <utility>
namespace tl {
template <class Tuple>
constexpr inline std::size_t tuple_size = std::tuple_size_v<std::remove_cvref_t<Tuple>>;
template <std::size_t N>
using index_constant = std::integral_c... |
/*
* Copyright 2021 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 ... |
// Copyright 2015 Adam Grandquist
#include "./catch.hpp"
#include "./ReQL.hpp"
using namespace ReQL;
TEST_CASE("cpp Test basic geometry operators", "[cpp][ast]") {
SECTION("test0") {
std::string src0("89011.26253835332", 17);
Query var0(src0);
}
SECTION("test1") {
std::string src0("110968.3044399... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2011. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
/*--------------... |
/*
Copyright (c) 2018 Trashbots, Inc. - SDG
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, distr... |
#include <algorithm>
#include <array>
#include <chrono>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <memory>
#include <random>
#include <string>
#include <vector>
using namespace std;
void sort_vector(vector<int> &v);
void sort_selection(vector<int> &v);
void sort_selectio... |
// 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 "third_party/blink/renderer/core/animation/effect_stack.h"
#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
#include "third_par... |
class Solution
{
public:
int maxProfit(vector<int> &prices)
{
if (prices.size() <= 1)
return 0;
int buy = prices[0];
int sell = prices[0];
int profit = 0;
for (int index = 1; index < prices.size(); index++)
{
if (prices[index - 1] > prices[... |
//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1994 - 1997.
//
// File: strarray.cxx
//
// Contents: Simple self-extending string array class
//
// Classes: CStringArray
//
// History: 07-16-1997 David... |
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include "ListViewEngine.hpp"
#include "ListItemProvider.hpp"
#include "BoxLayout.hpp"
namespace gui
{
class ListViewScroll : public Rect
{
private:
... |
#include <buffer.hpp>
#include <array>
#include <sstream>
#include "t/repeated_packed_fixed32/repeated_packed_fixed32_testcase.pb.h"
TEMPLATE_TEST_CASE("write repeated packed fixed32 field and check with libprotobuf", "",
buffer_test_string, buffer_test_vector, buffer_test_array, buffer_test_external) {
Tes... |
// 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 "chrome/browser/metrics/perf/cpu_identity.h"
#include <algorithm>
#include <string>
#include <vector>
#include "testing/gtest/include/gtest/gte... |
#include "autocc.hpp"
namespace aquarius
{
namespace autocc
{
ostream& operator<<(ostream& out, const Fraction& f)
{
if (f.den == 1)
{
return out << f.num;
}
else
{
return out << f.num << "/" << f.den;
}
}
bool operator<(const Fraction& f, const double d)
{
return f.num < ... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__char_connect_socket_w32_execv_72a.cpp
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-72a.tmpl.cpp
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: connect_socket Read data using ... |
/*
* Copyright 2010-2016 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 "treeexact_smalltable.h"
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
using std::make_pair;
using std::min;
using std::pair;
using std::queue;
using std::vector;
namespace treeapprox {
size_t compute_node_table(const std::vector<double>& x,
size_t d,
... |
/*
Copyright (c) 2018-2019, tevador <tevador@gmail.com>
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 conditio... |
/* $Id: ClpSimplexNonlinear.cpp 1931 2013-04-06 20:44:29Z stefan $ */
// Copyright (C) 2004, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#include "CoinPragma.hpp"
#include <math.h>
#include "CoinHelperFu... |
//
// server.hpp
// ~~~~~~~~~~
//
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef HTTP_SERVER_HPP
#define HTTP_SERVER_HPP... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
#include "extern/beatsaber-hook/shared/utils/byref.hpp"
// Including type: UnityEngine.MonoBehav... |
#include<iostream>
#include<vector>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
int main(){
int ia[3][4] = {
{0,1,2,3},
{4,5,6,7},
{8,9,10,11}
};
// use range for
for(int (&subArr)[4] : ia){
for(int num : subArr)
cout << num << " ";
cout << endl;
}
cout ... |
#include <capstone/capstone.h>
#include "disasm-mips.h"
#include "log.h"
static int
is_cs_nop_ins(cs_insn *ins)
{
switch(ins->id) {
case MIPS_INS_NOP:
return 1;
default:
return 0;
}
}
static int
is_cs_trap_ins(cs_insn *ins)
{
switch(ins->id) {
/* XXX: todo */
default:
return 0;
}
}
st... |
/*
* 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) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The Supro developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-lic... |
/*
* Copyright (c) 2017, 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, ... |
/**********************************************************************
This source file is a part of Demi3D
__ ___ __ __ __
| \|_ |\/|| _)| \
|__/|__| || __)|__/
Copyright (c) 2013-2014 Demi team
https://github.com/wangyanxing/Demi3D
Released under the MIT License
https://github.com/wangyanxing/De... |
#include "RaZ/Utils/FilePath.hpp"
#include "RaZ/Utils/FileUtils.hpp"
#include <fstream>
namespace Raz::FileUtils {
std::string readFile(const FilePath& filePath) {
std::ifstream file(filePath, std::ios::in | std::ios::binary | std::ios::ate);
if (!file)
throw std::runtime_error("Error: Could not open the fi... |
/**
* Copyright (c) 2017, California Institute of Technology.
* 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,
... |
/*
* Copyright (c) 2015 Cryptonomex, Inc., 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... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2021 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... |
/*------------------------------------------------------------------------------
// Copyright (c) 2017 John D. Haughton
//
// 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 restricti... |
//%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
// Copyright (c) 2016 The UUV Simulator 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 ... |
// 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 "base/base_switches.h"
#include "base/command_line.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_ut... |
#include <stdio.h>
#include <sys/syscall.h>
#include "syscallbasic.h"
#include "pin.H"
FILE * trace;
VOID SysBefore(ADDRINT ip, ADDRINT num, ADDRINT arg0, ADDRINT arg1, ADDRINT arg2, ADDRINT arg3, ADDRINT arg4, ADDRINT arg5)
{
switch (syscall_args[(int)num]) {
case 0:
fprintf(trace,"0x%lx: %s()",
... |
///////////////////////////////////////////////////////////////////////////////
// File: HGCalNumberingScheme.cc
// Description: Numbering scheme for High Granularity Calorimeter
///////////////////////////////////////////////////////////////////////////////
#include "SimG4CMS/Calo/interface/HGCalNumberingScheme.h"
#in... |
#include "CondFormats/Calibration/interface/big.h"
#include <iostream>
//fill big
void
big::fill( size_t tVectorSize,size_t thVectorSize,size_t sVectorSize,
const std::string& atitle){
for(size_t i=0;i<tVectorSize;++i){
big::bigEntry b;
b.fill(i,1.0);
tVector_.push_back(b);
}
for(size_t i=0;i<thV... |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011 Bryce Lelbach
//
// 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)
////////////////////////////////////////////... |
#pragma once
#include <cule/config.hpp>
#include <cule/atari/actions.hpp>
#include <cule/atari/controller.hpp>
#include <cule/atari/state.hpp>
namespace cule
{
namespace atari
{
namespace games
{
namespace asterix
{
template<typename State>
CULE_ANNOTATION
void reset(State& s)
{
s.m_reward = 0;
s.m_score ... |
/*
* Copyright (c) 2016, The OpenThread Authors.
* 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 ... |
#include <golos/plugins/account_notes/account_notes_plugin.hpp>
#include <golos/plugins/account_notes/account_notes_evaluators.hpp>
#include <golos/plugins/account_notes/account_notes_objects.hpp>
#include <golos/plugins/json_rpc/api_helper.hpp>
#include <golos/plugins/chain/plugin.hpp>
#include <appbase/application.hp... |
#include<bits/stdc++.h>
using namespace std;
//Priority Queue on Objects
struct Person
{
int age;
float height;
Person(int a, int h)
{
age = a;
height = h;
}
};
struct compare
{
bool operator() (Person const &p1, Person const &p2)
{
p1.ht < p2.ht;
}
};
int main()
{
priority_queue<Person, vector<Perso... |
#ifndef color_cmy_akin_hwb
#define color_cmy_akin_hwb
#include "../../generic/akin/cmy.hpp"
#include "../category.hpp"
#include "../../hwb/category.hpp"
namespace color
{
namespace akin
{
template
<
typename tag_name
>
struct cmy< ::color::category::hwb< tag_name > >
{
... |
#include <iostream>
using std::cout;
using std::endl;
#include <boost/Array.hpp>
#include <algorithm>
#include <boost/foreach.hpp>
int main()
{
boost::array<int, 3> A;
A[0] = 5; // not bounds checked
A[1] = 2;
A.at(2) = 3; // this is bounds checked.
cout << A[0] << endl; // not bounds checked
for ... |
// Copyright 2020 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/browser/web_package/web_bundle_interceptor_for_file.h"
#include "content/browser/loader/single_request_url_loader_factory.h"
#include "... |
/* Copyright (c) 2018 PaddlePaddle 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... |
#include <sstream>
#include "include/defs.hpp"
static constexpr char FILE_NAME [] { "defs.cpp" };
std::string error::genErrorLocationStr(const std::string & file, const std::string & func)
{
std::stringstream ret {};
ret<<"(in function \""<<func<<"\", in file \""<<file<<"\")";
return ret.str();
} |
// Copyright (c) 2012-2014 The Bitcoin developers
// Copyright (c) 2015-2018 PIVX Developers
// Copyright (c) 2018 -2019 MERGE Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "coins.h"
#include "random.h"
#... |
#include "../../src/gameboy_prelude.h"
#include "../cli/cli.h"
#include <SDL.h>
#include <fstream>
#include <iterator>
#include <optional>
static uint pixel_size = 2;
static uint width = GAMEBOY_WIDTH * pixel_size;
static uint height = GAMEBOY_HEIGHT * pixel_size;
static SDL_Window* window;
static SDL_Renderer* re... |
/*__________________________________________________________________________________________
(c) Hash(BEGIN(Satoshi[2010]), END(Sunny[2012])) == Videlicet[2014] ++
(c) Copyright The Nexus Developers 2014 - 2019
Distributed under the MIT software license, see the accompanying
... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/snowball/model/DeviceServiceName.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Ut... |
//-------------------------------------------------------------------
//-------------------------------------------------------------------
//
// Cleaver - A MultiMaterial Conforming Tetrahedral Meshing Library
//
// -- CleaverMesher Unit Tests
//
// Author: Jonathan Bronson (bronson@sci.utah.ed)
//
//-----------------... |
#include <DungeonGame/Dungeon/Dungeon.hpp>
#include <DungeonGame/utill/Input.hpp>
#include <DungeonGame/utill/Output.hpp>
#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
using namespace LinuxGame;
int main(int argc, char* argv[]) {
Dungeon dungeon(Dungeons::BSP,77,40,2); // (Dungeon... |
#ifndef CLICOMM_HH
#define CLICOMM_HH
#include "span.hh"
#include "strCat.hh"
#include <string_view>
namespace openmsx {
class CliComm
{
public:
enum LogLevel {
INFO,
WARNING,
LOGLEVEL_ERROR, // ERROR may give preprocessor name clashes
PROGRESS,
NUM_LEVELS // must be last
};
enum UpdateType {
LED,
S... |
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
// Copyright (C) 2015 Faust Logic, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and a... |
#include "mappers.h"
#include <catboost/libs/helpers/matrix.h>
#include <catboost/private/libs/algo/approx_calcer.h>
#include <catboost/private/libs/algo/approx_delta_calcer_multi.h>
#include <catboost/private/libs/algo/approx_updater_helpers.h>
#include <catboost/private/libs/algo/data.h>
#include <catboost/private/... |
#include <ModelImporterPCH.h>
#include <Foundation/Containers/DynamicArray.h>
#include <Foundation/IO/FileSystem/FileReader.h>
#include <Foundation/Logging/Log.h>
#include <Foundation/Types/ScopeExit.h>
#include <ModelImporter/Importers/FBXSDKImporter.h>
#include <ModelImporter/Material.h>
#include <ModelImporter/Mesh... |
// bsltf_allocbitwisemoveabletesttype.t.cpp -*-C++-*-
#include <bsltf_allocbitwisemoveabletesttype.h>
#include <bslma_default.h>
#include <bslma_defaultallocatorguard.h>
#include <bslma_testallocator.h>
#include <bslma_testallocatormonitor.h>
#include <bslmf_assert.h>
#include <bsls_assert.... |
// bslmt_readerwriterlock.cpp -*-C++-*-
// ----------------------------------------------------------------------------
// NOTICE
//
// This component is not up to date with current BDE coding standards, and
// should not be used as an example f... |
// functor.cpp -- using a functor
#include <iostream>
#include <list>
#include <iterator>
#include <algorithm>
template<class T> // functor class defines operator()()
class TooBig
{
private:
T cutoff;
public:
TooBig(const T & t) : cutoff(t) {}
bool operator()(const T & v) { return v > cutoff; }
};
void o... |
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* 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 agre... |
#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 ... |
#pragma once
#include "BoardInfos.hpp"
#include "ConnectorInfos.hpp"
#include "toml.hpp"
#include <map>
#include <string>
#include <vector>
#include <atomic>
#include <mutex>
class ConfigurationLoader
{
public:
void parse();
void reparseModule();
std::string getFileName();
void ... |
// MIT License
// Copyright (c) 2018 Neutralinojs
// 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, me... |
/**
* @file
* @brief Implements 2D Geant4 parameterization grid of elements
* @copyright Copyright (c) 2017-2020 CERN and the Allpix Squared authors.
* This software is distributed under the terms of the MIT License, copied verbatim in the file "LICENSE.md".
* In applying this license, CERN does not waive the priv... |
/*
* Copyright 2014-2019 Real Logic 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... |
#pragma once
# include "Zombie.hpp"
# include <string>
# include <iostream>
# include <cstdlib>
# include <ctime>
class ZombieEvent {
public:
ZombieEvent();
~ZombieEvent();
void setZombieType(std::string type);
Zombie *newZombie(std::string name);
private:
std::string _type;
}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.