text stringlengths 7 961k |
|---|
/* The copyright in this software is being made available under the BSD
* License, included below. This software may be subject to other third party
* and contributor rights, including patent rights, and no such rights are
* granted under this license.
*
* Copyright (c) 2010-2020, ITU/ISO/IEC
* All rights reserve... |
/*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Function.h>
#include <AK/LexicalPath.h>
#include <LibCore/File.h>
#include <LibCore/StandardPaths.h>
#include <LibGUI/Action.h>
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h>
#incl... |
#include <iostream>
int main()
{
// ポインタを宣言
int *p1;
// メモリ確保(実体化)
p1 = new int;
*p1 = 1000;
std::cout << *p1 << std::endl;
// 一度解放
delete p1;
// 再メモリ確保(再実体化)
p1 = new int;
*p1 = 2000;
std::cout << *p1 << std::endl;
// ポインタ2を用意して,ポインタ1のアドレスを渡し,delete
int *p2;... |
/**
* @file llagentwearables.cpp
* @brief LLAgentWearables class implementation
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the... |
//
// This file is part of thttpd
// Copyright (c) Antonino Calderone (antonino.calderone@gmail.com)
// All rights reserved.
// Licensed under the MIT License.
// See COPYING file in the project root for full license information.
//
/* -------------------------------------------------------------------------- */
... |
//Copyright (C) 2022 Ehsan Kamrani
//This file is licensed and distributed under MIT license
// CustomBitmapButton.cpp : implementation file
//
#include "stdafx.h"
#include "VandaEngine1.h"
#include "CustomBitmapButton.h"
// CCustomBitmapButton
IMPLEMENT_DYNAMIC(CCustomBitmapButton, CButton)
CCustomBitmapButton:... |
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
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)
=========================================... |
// Copyright (C) 2016-2020 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
#include <asiolink/asio_w... |
#include "pin.H"
#include <stdio.h>
#include <string.h>
#include "types.h"
#define INS_DELIMITER '\n'
#define ADDR_CHARS sizeof(ADDRINT)
#define RAW_TRACE_BUF_SIZE 512*Kb
#define TRACE_LIMIT 256*Mb
#define TRACE_NAME_LENGTH_LIMIT 128
#define THREADS_MAX_NO 256
static TLS_KEY tls_key = INVALID_TLS_KEY;
PIN_LOCK pin_l... |
#include "java.h"
#include <string>
#ifdef WIN32
#else
#include <unistd.h>
#endif
#include "javaObject.h"
#include "javaScope.h"
#include "methodCallBaton.h"
#include "node_NodeDynamicProxyClass.h"
#include <node_version.h>
#include <sstream>
#include <nan.h>
#define DYNAMIC_PROXY_JS_ERROR -4
#ifdef WIN32
typedef... |
#include <cstdio>
int n,d;
long long a[50010],sum,low,high,mid,ans;
bool judge(long long t)
{
long long h=0;
for (int i=1,j=1;i<=d;i++)
{
h>>=1;
while (h<t&&j<=n)
h+=a[j++];
if (h<t) return 0;
}
return 1;
}
int main()
{
while (scanf("%d%d",&n,&d)==2)
{
... |
//=========================================================================
// Copyright (C) 2012 The Elastos Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... |
#include "editaddressdialog.h"
#include "ui_editaddressdialog.h"
#include "addresstablemodel.h"
#include "guiutil.h"
#include <QDataWidgetMapper>
#include <QMessageBox>
EditAddressDialog::EditAddressDialog(Mode mode, QWidget *parent) :
QDialog(parent),
ui(new Ui::EditAddressDialog), mapper(0), mode(mode), mo... |
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
#include "stdafx.h"
#include "TrEmailAdd.h"
#include "Registry.h"
#include "SmtpAuthDlg.h"
TrEmailAdd::TrEmailAdd(CWnd* pParent)
:CDialog(TrEmailAdd::IDD, pParent),
mInChangeMode(FALSE)
{
//{{AFX_DATA_INIT(TrEmailAdd)
mFrom = _T("");
mHost = _T("");
mMessage = _T("");
mPort = 25;
mSubject =... |
//
// Copyright (c) 2021-2022 the rbfx 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, mer... |
/*
Copyright 2013 Adobe
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 ADOBE_ALGORITHM_SORTED_HP... |
// Copyright (c) 2011-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.
#include "db/extern... |
// -*- C++ -*-
// Copyright (C) 2005, 2006, 2009, 2011 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; eit... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache 2.0 License.
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "consensus/aft/raft.h"
#include "ds/logger.h"
#include "logging_stub.h"
#define DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES
#include <chrono>
#include <doctest/doctest.h>
... |
/*
* 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 ... |
#include<vector>
#include<iostream>
using std::vector;
using std::cout;
using std::endl;
int main(){
vector<int> vi = {0,1,2,3,4,5,6,7,8,9};
auto iter = vi.begin();
while(iter != vi.end()){
if(*iter % 2){
iter = vi.insert(iter, *iter);
++iter;
}
++iter;
}
for(auto i : vi) cout <<... |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without m... |
// Copyright 2017 the V8 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.
#include "test/unittests/test-utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "src/wasm/function-compiler.h"
#include "src/wasm/jump-t... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
#pragma pack(push, 8)
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
// Completed includes
// Type namespace: System
namespace System {
// Au... |
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
#ifndef BOOST_METAPARSE_ALWAYS_C_HPP
#define BOOST_METAPARSE_ALWAYS_C_HPP
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
// 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)
#include <boost/metap... |
#include "GoRuntime.h"
#include "GoResource.h"
Go::Runtime *Go::Runtime::Instance = nullptr;
Go::Runtime *Go::Runtime::GetInstance() {
if (Instance == nullptr)
Instance = new Runtime();
return Instance;
}
alt::IResource::Impl *Go::Runtime::CreateImpl(alt::IResource *impl) {
auto resource = new G... |
// 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 "xwalk/runtime/browser/android/net/android_protocol_handler.h"
#include <string>
#include "base/android/jni_android.h"
#include "base/andro... |
// Copyright 2017 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/ui/views/location_bar/location_icon_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/... |
/// steam_glue.cpp
#include "steam_glue.h"
CSteamAPIContext SteamAPI;
uint32 steam_app_id = 0;
CSteamID steam_local_id;
CSteamID steam_lobby_current;
// Called by GM on DLL init
dllx double RegisterCallbacks(void* f1, void* f2, void* f3, void* f4) {
gml_event_perform_async = (gml_event_perform_async_t)f1;
gml_ds_ma... |
/*
* Copyright 2010 Stephan Aßmus <superstippi@gmx.de>
* Copyright 2019, Haiku, Inc.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#include "SettingsWindow.h"
#include <Button.h>
#include <CheckBox.h>
#include <ControlLook.h>
#include <FilePanel.h>
#include <GridLayoutBuilder.h>
#includ... |
/**
* @copyright
* Copyright (c) 2017 - SLD Group @ Columbia University. All Rights Reserved.
*
* This file is part of Mnemosyne.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of sourc... |
#include <gtest/gtest.h>
#include "device_server.h"
#include "nidaqmx/nidaqmx_service.h"
using namespace nidaqmx_grpc;
namespace ni {
namespace tests {
namespace system {
class NiDAQmxSessionTests : public ::testing::Test {
protected:
NiDAQmxSessionTests()
: device_server_(DeviceServerInterface::Singleton()... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
#include "h265_bitstream_parser.h"
#include <stdio.h>
#include <cstdint>
#include <memory>
#include <vector>
#include "h265_bitstream_parser_state.h"
#include "h265_common.h"
#include "h265_nal_unit_parser.h"
namespace {
// The size of a full NALU start s... |
/*************************************************************************
* libjson-rpc-cpp
*************************************************************************
* @file xbmcremote.cpp
* @date 03.06.2013
* @author Peter Spiess-Knafl <dev@spiessknafl.at>
* @license See attached LICENSE.txt
***********... |
/*
SPDX-FileCopyrightText: 2010-2016 Sune Vuorela <sune@vuorela.dk>
SPDX-License-Identifier: MIT
*/
#include "prison.h"
#include "barcodeexamplewidget.h"
// Prison
#include <prison/abstractbarcode.h>
#include <prison/prison.h>
// Qt
#include <QDebug>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QPus... |
#include "scene_conchoid.h"
#include "vec2.h"
#include <vector>
// Se manda a llamar una vez
// cuando inicia la aplicacion
void scene_conchoid::init() {
std::vector<cgmath::vec2> upLine;
std::vector<cgmath::vec2> downLine;
float k = 0.75;
cgmath::vec2 o = cgmath::vec2(0, -0.5);
for (float x = -2; x < 2; x ... |
// 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 "chromeos/network/device_state.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/strings/stringprintf.h"
#incl... |
// Generated from /POI/java/org/apache/poi/hssf/record/FormulaRecord.java
#include <org/apache/poi/hssf/record/FormulaRecord_SpecialCachedValue.hpp>
#include <java/lang/Class.hpp>
#include <java/lang/IllegalStateException.hpp>
#include <java/lang/NullPointerException.hpp>
#include <java/lang/String.hpp>
#include <java... |
#include <gtest/gtest.h>
#include <vector>
#include <string>
#include <Error.hpp>
#include <parser/ParserContext.hpp>
#include <parser/Name.hpp>
#include <Helper.hpp>
TEST(unittest_Name, empty){
std::vector<char> data(create_char_vector("\"\""));
ParserContext context(data);
Name result(context);
EXPECT_EQ(co... |
/*
pbrt source code Copyright(c) 1998-2010 Matt Pharr and Greg Humphreys.
This file is part of pbrt.
pbrt is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
... |
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#include "freespace.h"
#include "network/multi.h"
#include "object/objc... |
#include <test.hpp>
#include <protozero/types.hpp>
TEST_CASE("default constructed data_view") {
protozero::data_view view;
REQUIRE(view.data() == nullptr);
REQUIRE(view.size() == 0);
}
TEST_CASE("data_view from C string") {
protozero::data_view view{"foobar"};
REQUIRE(view.data());
REQUIRE(vi... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* FragTrap.cpp :+: :+: :+: ... |
/*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2014-2017 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
#include "fslock.h"
#include <fcntl.h>
#include <semaphore.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include "3rd-party/catch.hpp"
#include "test-helpers/tempdir.h"
#include "test-helpers/tempfile.h"
using namespace newsboat;
// Forks and calls FsLock::try_lock() in ... |
// Copyright 2016 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 b... |
#include <QApplication>
#include "MainWindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow window;
window.setWindowTitle("Facetious");
window.show();
return app.exec();
} |
#include "CMeshModelInstance.h"
#include <Eigen/Dense>
#include <igl/per_vertex_normals.h>
#include <assert.h>
#include <totalmodel.h>
#include <ceres/rotation.h>
#include <chrono>
// Function equivalent and improved from igl::per_vertex_normals
// [270, 452] ms
template <typename T>
inline T getNormTriplet(const T* c... |
#include "core/TypeConstraint.h"
#include "core/Symbols.h"
using namespace std;
namespace sorbet::core {
bool TypeConstraint::isEmpty() const {
return upperBounds.empty() && lowerBounds.empty();
}
void TypeConstraint::defineDomain(Context ctx, const InlinedVector<SymbolRef, 4> &typeParams) {
// ENFORCE(isEmpt... |
<<<<<<< HEAD
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applic... |
//===----------------------------------------------------------------------===//
//
// 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 2020 The TensorFlow Quantum 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 ... |
/* 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... |
// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef VSOMEIP_NETLINK_CONNECTOR_HPP... |
#pragma once
#include <array>
#include <pluginterfaces/base/ipluginbase.h>
NS_HWM_BEGIN
class ClassInfo2Data
{
public:
ClassInfo2Data(Steinberg::PClassInfo2 const &info);
ClassInfo2Data(Steinberg::PClassInfoW const &info);
String const & GetSubCategories() const { return sub_categories_; }
St... |
/* ************************************************************************
* Copyright (c) 2018 Advanced Micro Devices, Inc.
*
* 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 re... |
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public Lic... |
/**
* Adobe Experience Manager (AEM) API
* Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
*
* OpenAPI spec version: 3.2.0-pre.0
* Contact: opensource@shinesolutions.com
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
* https://openapi-generator.tech
*... |
//===--- REPL.cpp - the integrated REPL -----------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
#include "askpassphrasedialog.h"
#include "ui_askpassphrasedialog.h"
#include "guiconstants.h"
#include "walletmodel.h"
#include <QMessageBox>
#include <QPushButton>
#include <QKeyEvent>
extern bool fWalletUnlockStakingOnly;
AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
QDialog(parent),... |
/*
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2021, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the
following condition... |
//==================================================================================================
/*
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
*/
//==================================================================================================
#pr... |
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... |
#include "CUPOT.h"
#if ( MODEL == HYDRO && defined GRAVITY )
// include c_ExtAcc_AuxArray[]
#ifdef __CUDACC__
#include "CUDA_ConstMemory.h"
#endif
//-----------------------------------------------------------------------------------------
// Function : CPU/CUPOT_HydroGravitySolver
// Description : Advanc... |
// 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/content_settings/content_settings_policy_provider.h"
#include <string>
#include <vector>
#include "base/json/json_reader.h"... |
#include <iostream>
int main() {
int total = 0;
int max_number;
bool is_valid = false;
do {
std::cout << "Enter a number greater than 0: " << std::flush;
std::cin >> max_number;
is_valid = (max_number > 0) ? true : false;
} while (!is_valid);
for (int n = 1; n <= max_number; n++) {
total += n;
}
s... |
//
// libtgvoip is free and unencumbered public domain software.
// For more information, see http://unlicense.org or the UNLICENSE file
// you should have received with this source code distribution.
//
#include "json11.hpp"
#include "logging.h"
#include "threading.h"
#include "Buffers.h"
#include "OpusDecoder.h"
#in... |
// 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: System.Net.Http.HttpM... |
#include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "CNYF version"),
QT_TRANSLATE_NOOP("bitcoin-core", "Usage:"),
QT_TRANSLATE_NOOP("bitcoi... |
#include <algorithm>
#include <utility>
#include <arbor/util/optional.hpp>
#include <arbor/cable_cell.hpp>
#include <arbor/morph/morphology.hpp>
#include <arbor/morph/locset.hpp>
#include <arbor/morph/region.hpp>
#include "fvm_layout.hpp"
#include "util/rangeutil.hpp"
#include "common.hpp"
#include "common_morpholog... |
/* Copyright 2020 Canaan 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 in ... |
#include "WALL.h"
#include "Simulation.h"
#include "Utils/Random.h"
Element* WALL::clone_impl() const
{
return new WALL(*this);
}
WALL::WALL(Simulation& sim)
{
identifier = EL_WALL;
name = "WALL";
description = "WALL GOL Rule";
rule_string = "s2345/b45678";
state = ST_SOLID;
colors = { sf::Color(33, 77, 255) }... |
/*
* Copyright (c) 2018 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2025-04-28
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... |
//===----------------------------------------------------------------------===//
//
// 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
//
//===---------------------------... |
/*
* utility.cpp
*
* Created on: Apr 27, 2017
* Author: Paul
*/
#include <os/utility.hpp>
namespace os {
} /* namespace os */ |
//===--- menu_component.hpp - -----------------------------------*- C++ -*-===//
//
// Head First Design Patterns
//
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief
///
//===-----------------------------------------------------------------... |
#ifndef BEYOND_CORE_UTILS_BYTE_SIZE_HPP
#define BEYOND_CORE_UTILS_BYTE_SIZE_HPP
#include "force_inline.hpp"
#include <vector>
namespace beyond {
/**
* @brief Gets the data size in bytes of a container
*/
template <typename T>
[[nodiscard]] BEYOND_FORCE_INLINE constexpr auto
byte_size(const std::vector<T>& v) noexc... |
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
/* ************************************************************************
* Copyright (c) 2018-2020 Advanced Micro Devices, Inc.
*
* 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 witho... |
#include <examplebase.h>
#include <model.h>
#include <material.h>
#include <buffer.h>
#include <random>
#include <ctime>
using namespace es;
class Example final : public ExampleBase
{
public:
std::array<std::shared_ptr<Model>, 16> spheres;
std::unique_ptr<Framebuffer> hdrFBO;
std::shared_ptr<Texture2D> fragColorT... |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/metrics/leak_detector/call_stack_manager.h"
#include <stdint.h>
#include <algorithm>
#include "base/macros.h"
#include "base/memor... |
// Copyright (C) 2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "layer_transformation.hpp"
#include <string>
#include <sstream>
#include <memory>
#include <gtest/gtest.h>
#include <transformations/utils/utils.hpp>
#include <transformations/init_node_info.hpp>
#include <transformations/low... |
// 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/printing/print_job.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/message_loop.h"
#include "base/th... |
#include <control/ui_label.h>
#include <control/ui_button.h>
#include <control/ui_deck.h>
#include <control/ui_radio.h>
#include <control/ui_radiogroup.h>
#include <control/ui_viewport.h>
/// <summary>
/// Initializes the viewport stack.
/// </summary>
/// <param name="viewport">The viewport.</param>
/// <returns></r... |
inline PDFDraw::PDFDraw(double dpi)
{
REX(TRN_PDFDrawCreate(dpi,&mp_draw));
}
inline PDFDraw::~PDFDraw()
{
DREX(mp_draw, TRN_PDFDrawDestroy(mp_draw));
}
inline void PDFDraw::Destroy()
{
REX(TRN_PDFDrawDestroy(mp_draw));
mp_draw=0;
}
inline void PDFDraw::SetRasterizerType (PDFRasterizer::Type type)
{
REX(TRN_PDF... |
#include <cassert>
#include <cstdio>
#include "../kakuro/KakuroField.h"
#include "../kakuro/KakuroProblem.h"
#include "Test.h"
namespace Penciloid
{
void PenciloidTest::KakuroTest1()
{
KakuroProblem prob;
prob.Init(3, 3);
prob.SetNumberCell(1, 1);
prob.SetNumberCell(1, 2);
prob.SetNumberCell(2, 1);
prob.SetNum... |
#include <stan/model/model_functional.hpp>
#include <gtest/gtest.h> |
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "bsdiff/brotli_decompressor.h"
#include <memory>
#include <string>
#include <vector>
#include <gtest/gtest.h>
namespace {
// echo -n "Hell... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE762_Mismatched_Memory_Management_Routines__delete_array_class_malloc_11.cpp
Label Definition File: CWE762_Mismatched_Memory_Management_Routines__delete_array.label.xml
Template File: sources-sinks-11.tmpl.cpp
*/
/*
* @description
* CWE: 762 Mismatched Memory Management... |
#include "../../include/transitions/hsp_employee_transitions.h"
/*****************************************************
* class: HspEmployeeTransitions
*
* Functionality for computing of transitioning
* between different agents states for agent that is
* a hospital employee
*
******************************... |
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
// 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 may... |
#pragma once
#include "msqlite/for_each.hpp"
#include "msqlite/throws/value_or_throw.hpp"
namespace msqlite::throws {
template<typename F>
inline void for_each(stmt& stmt, F&& f)
{ return value_or_throw(::msqlite::for_each(stmt, std::forward<F>(f))); }
} |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2015-2018 The ALG developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "primitives/block.h"
#include "... |
//
// prioritised_handlers.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2021 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)
//
#include <boost/asi... |
// Copyright 2018-2021 The Autoware 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 required by applicable law... |
#include <Switch/Switch>
using namespace System;
namespace Examples {
// The following class represents simple functionality of the trapezoid.
class MathTrapezoidSample : public object {
public:
// The main entry point for the application.
static void Main() {
MathTrapezoidSample trpz(20.0, 10.0, ... |
#include <limits>
#include <type_traits>
#include "zserio/CppRuntimeException.h"
#include "zserio/VarSizeUtil.h"
namespace zserio
{
uint32_t convertSizeToUInt32(size_t value)
{
#ifdef ZSERIO_RUNTIME_64BIT
if (value > static_cast<size_t>(std::numeric_limits<uint32_t>::max()))
{
throw CppRuntimeExcepti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.