text stringlengths 5 1.04M |
|---|
/*
* Copyright (C) 2005-2020 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 ... |
#include <bits/stdc++.h>
using namespace std;
void solve(){
int n;
cin >> n;
for(int i=1;i<=n;i++){
int x, y, temp, left;
cin >> x >> y;
int total = 0;
for(int j=0;j<x;j++){
cin >> temp;
total += temp;
}
left = total % y;
cout ... |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define dd double
#define ld long double
#define sl(n) scanf("%lld", &n)
#define si(n) scanf("%d", &n)
#define sd(n) scanf("%lf", &n)
#define pll pair <ll, ll>
#define pii pair <int, int>
#define mp make_pair
#define pb p... |
//-------------------------------------------------------------------------
/*
Copyright (C) 2010-2019 EDuke32 developers and contributors
Copyright (C) 2019 sirlemonhead, Nuke.YKT
This file is part of PCExhumed.
PCExhumed is free software; you can redistribute it and/or
modify it under the terms of the GNU General Pub... |
//==================================================================================================
/**
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
**/
//==================================================================================================
#... |
#ifndef CORE_HPP_
#define CORE_HPP_
#include "mem.hpp"
#include <cmath>
#include <cstring>
#include <iostream>
#include <memory>
#include <sstream>
#include <vector>
namespace HiGIS::Core {
/**
* \brief Mix multiple structs by multi-inherit
*
* Mix provides a way to combine data of several structs without the nee... |
//
// header.hpp
// ~~~~~~~~~~
//
// 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)
//
#ifndef HTTP_SERVER3_HEADER_HPP
#define HTTP_SE... |
#include "routing/routing_options.hpp"
#include "platform/settings.hpp"
#include "indexer/classificator.hpp"
#include "base/assert.hpp"
#include "base/checked_cast.hpp"
#include "base/logging.hpp"
#include "base/macros.hpp"
#include "base/string_utils.hpp"
#include <initializer_list>
#include <sstream>
#include <ut... |
#include "Node.h"
// Constructor - Initializes the node
Node::Node(char* dat, Node* nxt) {
val = dat;
next = nxt;
}
// getVal - Returns the integer value stored in the node
char* Node::getVal() {
return val;
}
// getNext - Returns a pointer for the next node in the linked list
Node* Node::getNext() {
return ne... |
/***********************************************************************************************************************
* *
* ANTIKERNEL v0.1 ... |
/*
Copyright (c) 2011, The Cinder Project: http://libcinder.org All rights reserved.
This code is intended for use with the Cinder C++ library: http://libcinder.org
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:
* ... |
#include "components/ScrollableContainer.h"
#include "Renderer.h"
#include "Log.h"
#define AUTO_SCROLL_RESET_DELAY 10000 // ms to reset to top after we reach the bottom
#define AUTO_SCROLL_DELAY 8000 // ms to wait before we start to scroll
#define AUTO_SCROLL_SPEED 50 // ms between scrolls
ScrollableContainer::Scroll... |
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
#include "VideoController.h"
#include "fabutils.h"
#include "monitor.h"
#define BK_WIDTH 64
#define BK_HEIGHT 256
#define BORDER_HEIGHT 2
#define BORDER_WIDTH ((SCREEN_WIDTH - BK_WIDTH) / 2)
// BK Palette colors
#define COLOR_00 0x00
#define COLOR_01 0x30
#define COLOR_10 0x0C
#define COLOR_11 0x03
#define BW_00 0... |
#ifdef __amigaos4__
#include "libMacEmu.h"
#include "missing.h"
#endif
#include "CTextDoc.h"
#include "CScrollPane.h"
#include "CEditText.h"
#include "CDataFile.h"
void CTextDoc::ITextDoc( CApplication *supervisor )
{
const Boolean kPrintable = true;
IDocument( supervisor, kPrintable);
}
void CTextDoc::NewFile(... |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Laszlo Papp <lpapp@kde.org>
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial ... |
// Copyright 2016 The SwiftShader 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... |
// Copyright (c) 2017-2020 The Particl Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/mnemonicdialog.h>
#include <qt/forms/ui_mnemonicdialog.h>
#include <qt/guiutil.h>
#include <qt/walletmodel.h>
... |
#ifndef EbfDataParser_CXX
#define EbfDataParser_CXX 1
/** @class EbfDataParser.cxx
@brief Implementation of the EbfDataParser class
$Header: /nfs/slac/g/glast/ground/cvs/GlastRelease-scons/ldfReader/src/iterators/EbfDataParser.cxx,v 1.10 2009/09/12 04:00:40 heather Exp $
*/
// ldfReader includes
//#include "EbfDataPa... |
#ifndef PYTHONIC_NUMPY_LINALG_NORM_HPP
#define PYTHONIC_NUMPY_LINALG_NORM_HPP
#include "pythonic/include/numpy/linalg/norm.hpp"
#include "pythonic/numpy/abs.hpp"
#include "pythonic/numpy/conj.hpp"
#include "pythonic/numpy/asfarray.hpp"
#include "pythonic/numpy/inf.hpp"
#include "pythonic/numpy/max.hpp"
#include "python... |
///////////////////////////////////////////////////////////////////////
// File: ltrresultiterator.cpp
// Description: Iterator for tesseract results in strict left-to-right
// order that avoids using tesseract internal data structures.
// Author: Ray Smith
//
// (C) Copyright 2010, Google Inc.... |
#include <chrono>
#include <string>
#include <vector>
#include "common/config/utility.h"
#include "common/http/message_impl.h"
#include "common/json/json_loader.h"
#include "common/upstream/cds_api_impl.h"
#include "test/common/upstream/utility.h"
#include "test/mocks/local_info/mocks.h"
#include "test/mocks/upstream... |
// Copyright (c) 2007-2018 Hartmut Kaiser
// Copyright (c) 2011 Bryce Lelbach
//
// SPDX-License-Identifier: BSL-1.0
// 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_APPLIER_APPLY_NOV_27_2... |
/*
* 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
... |
// 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 "core/workers/DedicatedWorkerMessagingProxy.h"
#include "core/workers/DedicatedWorkerThread.h"
#include "core/workers/WorkerClients.h"
namespac... |
/*
* Copyright (c) 2022 Fachgebiet Simulation, Systemoptimierung und Robotik, TU Darmstadt.
*
* This file is part of RoboTrace
* (see https://github.com/tu-darmstadt-ros-pkg/robo_trace)
* and is governed by a BSD-style license
* that can be found in the LICENSE file.
*/
// Base
#include "robo_trace/modes/repl... |
#include "AppHdr.h"
#include "stairs.h"
#include <sstream>
#include "abyss.h"
#include "act-iter.h"
#include "areas.h"
#include "artefact.h"
#include "bloodspatter.h"
#include "branch.h"
#include "chardump.h"
#include "colour.h"
#include "coordit.h"
#include "delay.h"
#include "dgn-overview.h"
#include "directn.h"
#... |
/**********
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
This libr... |
/*******************************************************************************
* dpt/util/macros.hpp
*
* Part of dpt - Distributed Patricia Trie
*
* Copyright (C) 2016 Florian Kurpicz <florian.kurpicz@tu-dortmund.de>
*
* All rights reserved. Published under the BSD-2 license in the LICENSE file.
*************... |
/*
* ShaderConductor
*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*
* 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
... |
/*
* 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... |
//=============================================================================
/**
* @file Message_Block_Large_Copy_Test.cpp
*
* $Id: Message_Block_Large_Copy_Test.cpp 96760 2013-02-05 21:11:03Z stanleyk $
*
* This test program tests large Message Block duplication and cloning.
*
*
* @author Phillip La... |
// 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 "third_party/blink/renderer/core/loader/threadable_loading_context.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_... |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 5 End-User Lic... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Run procedural glint generation inner loop in pixel shader
//
// $Header: $
// $NoKeywords: $
//===========================================================================//
#include "BaseVSShader.h"
#include "shaderlib/cshader.h"
#in... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2019 The WaStaKe Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file CO... |
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.
#include "transforms/MatrixTransform.cpp"
#include "UnitTest.h"
namespace OCIO = OCIO_NAMESPACE;
OCIO_ADD_TEST(MatrixTransform, basic)
{
OCIO::MatrixTransformRcPtr matrix = OCIO::MatrixTransform::Create();
OCIO_CH... |
/*
* Copyright (c) 2017 - 2018, 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, ... |
#include "system.h"
#include <unistd.h>
#include <cstddef>
#include <set>
#include <string>
#include <vector>
#include "linux_parser.h"
#include "process.h"
#include "processor.h"
using std::set;
using std::size_t;
using std::string;
using std::vector;
// TODO: Return the system's CPU
Processor& System::Cpu() {
... |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2012 Bryce Adelstein-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)
//////////////////////////////////... |
/*
* 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" file... |
#include "stdafx.h"
/*
* Copyright (c) 2007-2012 SlimDX Group
*
* 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, ... |
#include "exe/process_wide.h"
#include "common/common/assert.h"
#include "common/event/libevent.h"
#include "common/http/http2/nghttp2.h"
#include "server/proto_descriptors.h"
#include "ares.h"
#ifdef ENVOY_GOOGLE_GRPC
#include "grpc/grpc.h"
#endif
namespace Envoy {
namespace {
// Static variable to count initiali... |
#include "stdafx.h"
#include <ole2.h>
#include <aclapi.h>
#include "iadmw.h"
#include "iiscnfg.h"
#include "log.h"
#include "mdkey.h"
#include "dcomperm.h"
#include "other.h"
#include "mdacl.h"
#include <sddl.h> // ConvertSidToStringSid
extern int g_GlobalDebugCrypto;
#ifndef _CHICAGO_
BOOL Cle... |
// Copyright 2013 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/sync_file_system/local/local_file_sync_context.h"
#include <stdint.h>
#include <utility>
#include <vector>
#include "base/bind.... |
/* $Id$
*
* 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"); y... |
// Autogenerated from CppHeaderCreator on 7/27/2020 3:10:00 PM
// Created by Sc2ad
// =========================================================================
#pragma once
#pragma pack(push, 8)
// Begin includes
#include "utils/typedefs.h"
// Including type: System.MulticastDelegate
#include "System/MulticastDelegate.... |
//
// Copyright (C) 2013 Opensim Ltd.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program i... |
#pragma once
#include "sc_template.hpp"
#include "sc_template_named_struct.hpp"
#include "sc_template_params.hpp"
#include <limits>
#include <string>
class ScTemplateSearchImpl;
/*!
* \brief This class allows to run template based search.
*/
class ScTemplateSearch final
{
public:
class Iterator
{
friend cl... |
/*
* Copyright (C) Huawei Technologies Co., Ltd. 2019-2020. ALL RIGHTS RESERVED.
* See file LICENSE for terms.
*/
extern "C" {
#include <ucg/builtin/plan/builtin_plan.h>
}
#include "ucg_test.h"
#include "ucg_plan_test.h"
TEST_F(ucg_plan_test, ucg_plan_1_test) {
ucg_plan_test example(4, 8, 0);
size_t msg_... |
#include <math.h>
#include <stdio.h>
#include "../../../../include/eddl/hardware/fpga/fpga_enables.h"
extern "C" {
#ifdef K_ENABLED_RAND_UNIFORM
void k_rand_uniform(float *A, float v) {
#pragma HLS INTERFACE m_axi port=A offset=slave bundle=gmem
#pragma HLS INTERFACE s_axilite port=A bundle=control
#pragma HLS... |
/****************************************************************************
*
* Copyright (c) 2020, 2021 PX4 Development Team. 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. Re... |
#pragma once
#include "state.hpp"
template<Player turn>
extern float move_score(const State& state, Move move);
extern void calculate_probability(int, const sheena::Array<Move, MaxLegalMove>&, sheena::Array<float, MaxLegalMove>&, float max_score);
extern void load_proabiblity();
|
//
// main.cpp
// Database2
//
// Created by rick gessner on 3/17/19.
// Copyright © 2019 rick gessner. All rights reserved.
//
#include <iostream>
#include <sstream>
#include <fstream>
#include <filesystem>
#include "AppProcessor.hpp"
#include "Tokenizer.hpp"
#include "Errors.hpp"
#include "Storage.hpp"
#include... |
/*
* processor.cpp
*
* Created on: 2010-8-3
* Author: Argon
*/
#include "field.h"
#include "duel.h"
#include "card.h"
#include "group.h"
#include "effect.h"
#include "interpreter.h"
#include "ocgapi.h"
#include <iterator>
void field::add_process(uint16 type, uint16 step, effect* peffect, group* target, ptr... |
--- components/crash/content/app/crashpad.cc.orig 2019-04-30 22:22:41 UTC
+++ components/crash/content/app/crashpad.cc
@@ -104,6 +104,12 @@ void InitializeCrashpadImpl(bool initial_client,
const base::FilePath& exe_path,
const std::vector<std::string>& initial_a... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2016 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... |
#include<iostream>
using namespace std;
int main()
{
cout << "No. of rows: \n";
int row;
cin >> row;
cout << "No.of cols: \n";
int cols;
cin >> cols;
for(int i=0;i<row;i++)
{
for(int j=0;j<cols;j++)
cout << "* " ;
cout << "\n";
... |
#include <bits/stdc++.h>
using namespace std;
class YeuTo
{
protected:
int GiaTri;
public:
YeuTo();
~YeuTo();
int GetGiaTri();
virtual void DacDiem() = 0;
virtual void ChiSoCao() = 0;
virtual void ChiSoThap() = 0;
};
YeuTo::YeuTo()
{
}
YeuTo::~YeuTo()
{
}
int YeuTo::GetGiaTri()
{
ret... |
// cmcstl2 - A concept-enabled C++ standard library
//
// Copyright Casey Carter 2015
//
// 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)
//
// Project home: https://github.c... |
#pragma once
#include "./IOException.hpp"
class JString;
namespace java::io
{
class CharConversionException : public java::io::IOException
{
public:
// Fields
// QJniObject forward
template<typename ...Ts> explicit CharConversionException(const char *className, const char *sig, Ts...agv) : java::io::IOEx... |
#include "control.h"
#include "util.h"
Dfa::Dfa(Control *control_, Base *base_) : control(control_),
option(control_ -> option),
grammar(control_ -> grammar),
node_pool(control_ -> node_pool... |
/*
* MIT License
*
* Copyright(c) 2018 Jimmie Bergmann
*
* 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... |
/***************************************************************
*
* Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. Y... |
// Copyright (c) 2018 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translato... |
#include <game/entities/entities.h>
#include <game/levels/lvl_1_creator.h>
#include <lib/matlib/vec2.h>
#include <whycpp/drawing.h>
void Lvl1Creator::InitEntities() {
auto platform_pos = Vec2((GetDisplayWidth(ctx) - 16.0) / 2, GetDisplayHeight(ctx) - 20.0);
auto platform_size = Vec2(42, 7);
CreatePlatform(engin... |
/*********************************************************************************
* OKVIS - Open Keyframe-based Visual-Inertial SLAM
* Copyright (c) 2015, Autonomous Systems Lab / ETH Zurich
*
* Copyright (c) 2011-2013, Paul Furgale and others.
* All rights reserved.
*
* Unlike otherwise stated in source f... |
// 4_move3.cpp
//
#include <iostream>
using namespace std;
// 1. 클래스 안에 포인터 변수가 있으면 얕은 복사 현상이 있다.
// 2. 반드시 복사 생성자를 사용자가 만들어야 한다.
class Buffer
{
int* resource;
int size;
public:
Buffer(int sz) : size(sz) { resource = new int[sz]; }
~Buffer() { delete[] resource; }
// lvalue, rvalue를 다 받음
// C++11 이전에는 복... |
//
//
//
// MCStatistics.cpp
//
//
#include <vector>
#include <iterator>
#include <algorithm>
#include <cmath>
#include<MCStatistics.h>
#include <wrapper.h>
using namespace std;
StatisticsMean::StatisticsMean()
:
RunningSum(0.0), PathsDone(0UL)
{
}
void StatisticsMean::DumpOneResul... |
#include <iostream>
#include <cmath>
#include <limits> // для numeric_limits<float>::epsilon(), чтобы сравнивать результат дробных вычислений с 0
#include "command.h"
// -- КОМАНДЫ ПЕРЕСЫЛКИ ДАННЫХ -- //
void exchange::operator()(CPU &cpu) noexcept
{
const uint8_t r1_i = cpu.get_cmd_r1(); // -- получаю номера реги... |
#include "nod/nod.hpp"
#include <cstdio>
#include "nod/DiscBase.hpp"
#include "nod/DiscGCN.hpp"
#include "nod/DiscWii.hpp"
namespace nod {
logvisor::Module LogModule("nod");
std::unique_ptr<IDiscIO> NewDiscIOISO(std::string_view path);
std::unique_ptr<IDiscIO> NewDiscIOWBFS(std::string_view path);
std::unique_ptr<... |
/*
* See header file for a description of this class.
*
* \author G. Mila - INFN Torino
*
* threadsafe version (//-) oct/nov 2014 - WATWanAbdullah -ncpp-um-my
*
*/
#include <DQM/DTMonitorClient/src/DTNoiseAnalysisTest.h>
// Framework
#include "FWCore/ServiceRegistry/interface/Service.h"
#include <FWCore/Fra... |
/** @file main.cpp
* @brief The main entry point.
*
* @author Hamdi Rakkez
*/
// Standard includes.
#include <cstdlib>
#include <limits>
#include <ctype.h>
// Other includes.
#include "dict_utils.hpp"
#include "string_utils.hpp"
// For progress.
#define PBSTR "|||||||||||||||||||||||||||||||||||||||||||||||||||... |
/*
* Copyright 2021 ServiceNow
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, s... |
/* Copyright (c) 2010-2018, Delft University of Technology
* All rigths reserved
*
* This file is part of the Tudat. Redistribution and use in source and
* binary forms, with or without modification, are permitted exclusively
* under the terms of the Modified BSD license. You should have received
*... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2016-2019 The ECODOLLAR 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)
#includ... |
extern "C" {
extern int printf(const char *, ...);
}
double plus10(double arg) {
double base = 10.0;
return base + arg;
}
int main() {
if (plus10(5.0) == 15.0) {
printf("NORMAL\n");
return 0;
} else {
printf("MUTATED\n");
return 1;
}
}
// clang-format off
/**
RUN: %clang_cxx %sysroot -fplu... |
// written by bastiaan konings schuiling 2008 - 2014
// this work is public domain. the code is undocumented, scruffy, untested, and should generally not be used for anything important.
// i do not offer support, so don't ask. to be used for inspiration :)
#include "scrollbar.hpp"
#include "SDL/SDL_gfxBlitFunc.h"
#i... |
// =============================
// SDL Programming
// Name: ODOH KENNETH EMEKA
// Student id: 0902024
// Task 18
// =============================
#include "CImageAlpha.h"
#include <stdexcept>
#include <SDL/SDL_image.h>
#include <iostream>
void DemoEngine::CImageAlpha::SetAlpha(Uint8 i_Alpha)
{
m_Alpha = i_Alph... |
/*********************************************************************************************//**
* @file main.cpp
*
* Copyright (c)
* Smart Robotic Systems
* March 2015
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the follo... |
#pragma once
#include <exception>
#include <string>
namespace backing::domain::exception
{
struct InvalidUriException: public std::exception
{
public:
explicit InvalidUriException(const std::string& uri):
message("The uri '" + uri + "' is not a valid uri") {}
[[nodiscard]] con... |
#ifndef CK_GRIDWISE_CONVOLUTION_IMPLICIT_GEMM_V4R4_FP16_BFP16_WRW_GNCHW_GKCYX_GNKHW_LDS_DOUBLE_BUFFER_HPP
#define CK_GRIDWISE_CONVOLUTION_IMPLICIT_GEMM_V4R4_FP16_BFP16_WRW_GNCHW_GKCYX_GNKHW_LDS_DOUBLE_BUFFER_HPP
#include "common_header.hpp"
#include "tensor_descriptor.hpp"
#include "tensor_descriptor_helper.hpp"
#incl... |
/*------------------------------------------------------------------------
* Index example
*
* Demonstrates using the `Index` node to retrieve indexed items
* from a `std::vector`. Note that the first argument to Index is a
* static property, not a node.
*----------------------------------------------------------... |
#include "led.h"
void ledSet(uint16_t a,uint8_t k);
void ARDUINO_ISR_ATTR timLEDISR();
static hw_timer_t *tim_LED_h = NULL; //ハンドラ
static volatile SemaphoreHandle_t tim_LED_sem; //セマフォ
static portMUX_TYPE tim_LED_mux = portMUX_INITIALIZER_UNLOCKED;//排他制御
static bool state_update_f = false;
static bool bring_cnt_clea... |
/*
Copyright (c) 2017-2020,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC. See
the top-level NOTICE for additional details. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include "../core/ActionMessage.hpp"
#include <json/fo... |
/*******************************************************************************
* thrill/vfs/gzip_filter.cpp
*
* Part of Project Thrill - http://project-thrill.org
*
* Copyright (C) 2016 Timo Bingmann <tb@panthema.net>
*
* All rights reserved. Published under the BSD-2 license in the LICENSE file.
************... |
//
// ruvi base
//
#pragma once
// includes
#include "sdk/memory/memory.hh"
#include "sdk/vector/vector.hh"
#include <functional>
#include "sdk/indices.hh"
struct player_info_t {
int64_t __pad0;
union {
int64_t xuid;
struct {
int xuid_low;
int xuid_high;
};
};
char name[128];
int u... |
/*******************************************************************************
* Copyright 2017-2022 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.apa... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/elasticfilesystem/model/CreateMountTargetResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#i... |
/* Copyright 2019 Istio 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 applicab... |
// Chemfiles, a modern library for chemistry file reading and writing
// Copyright (C) Guillaume Fraux and contributors -- BSD license
#include <cassert>
#include <cmath>
#include <iosfwd>
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
#include "chemfiles/Frame.hpp"
#include "chemfiles/... |
// AcsVio.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
int main(int argc, char* argv[])
{
HINSTANCE hLib;
int * ProcAdd;
printf("Hi, every one. \nThis simple utility will simulate an access violation.\n--Raymond\n");
// Get a handl... |
// Copyright 2013 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/settings/cros_settings_names.h"
namespace chromeos {
const char kCrosSettingsPrefix[] = "cros.";
// All cros.accounts.* settings are... |
//===----------------------------------------------------------------------===//
//
// 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 2016-2020 Advanced Micro Devices, Inc.
* ************************************************************************ */
#include "rocblas_trmm.hpp"
#include "handle.h"
#include "logging.h"
#include "rocblas.h"
#include "utility.h"
n... |
// ======================================================================== //
// Copyright 2019-2020 Ingo Wald //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... |
//===----------------------------------------------------------------------===//
//
// 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
//
//===---------------------------... |
#pragma once
#include <sre/SpriteAtlas.hpp>
#include <sre/SDLRenderer.hpp>
#include "Level.hpp"
#include "Snake.hpp"
using namespace sre;
class SnakeGUI {
public:
SnakeGUI();
private:
void setupLevel(int width, int height);
void update(float deltaTime);
void keyEvent(SDL_Event &mouseEvent);
void... |
/* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| |
| Cop... |
#include <doctest/doctest.h>
#include <array>
#include <chess/position.hpp>
#include <cstdint>
#include <string>
TEST_SUITE_BEGIN("DeepPerft");
[[nodiscard]] static auto perft(chess::Position &pos, const std::size_t depth) noexcept -> std::uint64_t {
if (depth == 0) {
return 1ULL;
}
std::uint64_t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.