text stringlengths 7 961k |
|---|
#include <unordered_map>
#include "statement.h"
#include "expression.h"
#include "runtime_context.h"
namespace kram {
flow::flow(flow_type type, int break_level):
_type(type),
_break_level(break_level)
{
}
flow_type flow::type() const {
return _type;
}
int flow::break_level() const {
return _break_lev... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include <cassert>
#include <limits>
#include <sstream>
#include <string>
#include <unordered_map>
#include <cstdint>
#include "QirTypes.hpp"
#include "QirRuntime.hpp"
// Exposed to tests only:
std::unordered_map<std::string, QirString*>& All... |
// Source : https://leetcode.com/problems/binary-tree-level-order-traversal/
// Author : Javier Liu
// Date : 2015-03-11
/**********************************************************************************
*
* Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level... |
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h>
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <fstream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Po... |
// Geometric Tools, LLC
// Copyright (c) 1998-2014
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 5.0.0 (2010/01/01)
//--------------------------------------------------------------... |
// Copyright (C) 2017 Jonathan Müller <jonathanmueller.dev@gmail.com>
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#include <type_safe/reference.hpp>
#include <catch.hpp>
#include <functional>
#include "debugger_type.hpp"
using namespace ... |
#ifndef STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_LCCDF_HPP
#define STAN_MATH_PRIM_SCAL_PROB_INV_CHI_SQUARE_LCCDF_HPP
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/scal/err/check_consistent_sizes.hpp>
#include <stan/math/prim/scal/err/check_nonnegative.hpp>
#include <stan/math/prim/scal/err/check_not_nan.h... |
/**
* @file eglplus/texture_target.hpp
* @brief EGL texture target enumeration
*
* @author Matus Chochlik
*
* Copyright 2010-2015 Matus Chochlik. 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)
*/
#pra... |
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR... |
// 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/browsing_data/browsing_data_remover.h"
#include <map>
#include <set>
#include "base/bind.h"
#include "base/bind_helpers.h"
... |
// Generated by Haxe 4.1.5
#include <hxcpp.h>
#ifndef INCLUDED_Reflect
#include <Reflect.h>
#endif
#ifndef INCLUDED_StringTools
#include <StringTools.h>
#endif
#ifndef INCLUDED_haxe_Serializer
#include <haxe/Serializer.h>
#endif
#ifndef INCLUDED_haxe_Unserializer
#include <haxe/Unserializer.h>
#endif
#ifndef INCLUDED_... |
// Copyright (c) 2017-2019 The Raven Core developers
// copyright (c) 2021 The Bagi Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "assetfilterproxy.h"
#include "assettablemodel.h"
AssetFilterProxy::As... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point3C
{
char16_t e00;
char16_t e01;
char16_t e02;
};
static Point3C ... |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
#include <mbgl/tile/geometry_tile_data.hpp>
#include <mbgl/tile/tile_id.hpp>
#include <mapbox/geometry/wagyu/wagyu.hpp>
namespace mbgl {
static double signedArea(const GeometryCoordinates& ring) {
double sum = 0;
for (std::size_t i = 0, len = ring.size(), j = len - 1; i < len; j = i++) {
const Geome... |
/**************************************************************************
* Copyright (c) 2017-2019 by the mfmg authors *
* All rights reserved. *
* *
* This file is ... |
#include "sendresultwidget.h"
#include "ui_sendresultwidget.h"
SendResultWidget::SendResultWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::SendResultWidget)
{
ui->setupUi(this);
}
SendResultWidget::~SendResultWidget()
{
delete ui;
}
void SendResultWidget::on_pushButton_pressed()
{
Q_EMIT ba... |
#include "ApplicationManager.h"
CopyAction::CopyAction(ApplicationManager * pApp):Action(pApp)
{}
void CopyAction::ReadActionParameters()
{
}
void CopyAction:: Execute()
{ Output* pOut = pManager->GetOutput();
if(pManager->AFigIsSelected())
{
pOut->PrintMessage("Copy figure") ;
pManager->Copy();
}
else
p... |
// Copyright (c) Andreas Fertig.
// SPDX-License-Identifier: MIT
struct Point
{
int x;
int y;
constexpr bool operator==(const Point& rhs) const noexcept
{
return (x == rhs.x) && (y == rhs.y);
}
constexpr bool operator<(const Point& rhs) const noexcept
{
return (x < rhs.x) ... |
#include "ParameterSectionData.h"
#include "XclBinClass.h"
#include "globals.h"
#include <gtest/gtest.h>
#include <boost/filesystem.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
// Simple Add Test
TEST(AddSection, AddClearingBitstream) {
XclBin xclBin;
std::stri... |
////////////////////////////////////////////////////////////////////////////////
/// 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... |
//===--- GenFunc.cpp - Swift IR Generation for Function Types -------------===//
//
// 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... |
// *********************************************************************
// **
// ** Rutinas auxiliares:
// ** - Gestión de errores en general
// ** - Comprobación de errores de OpenGL (implementacion)
// ** - Inicialización de glew,
// ** - Comprobacion de la versión de OpenGL
// **
// ** Copyright (C) 2014 Carlos Ure... |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... |
//an illustration of C++ VTab.
//see the generated assembly files.
#include "includes.h"
employee *table = NULL;
void createTable(void)
{
table = new employee[5];
return;
}
void reportSal(void)
{
for (int i = 0; i < 5; i++)
(table + i)->sal();
return;
} |
#include <iostream>
#include <tuple>
#include <vector>
using namespace std;
template<typename T>
ostream& operator<<(ostream& out, const vector<T>& v)
{
out << '[';
bool first = true;
for (const auto& x : v) {
if (!first)
out << ',';
out << x;
first = false;
}
out << ']';
return out;
}
class Solution ... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2016 Facebook, Inc. (http://www.facebook.com) |
+---------... |
#include "support/Utilities.h"
#include "Log.h"
using namespace helpers::math;
std::random_device RandomIntGenerator::_random_device = std::random_device();
std::minstd_rand0 RandomIntGenerator::_random_generator = std::minstd_rand0(RandomIntGenerator::_random_device());
ForceVector helpers::math::normalize(const Fo... |
/*
* PortProcedures.cpp - <port> procedures.
*
* Copyright (c) 2008 Higepon(Taro Minowa) <higepon@users.sourceforge.jp>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of so... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: UnityEngine.MonoBehaviour
#include ... |
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
string s, s1;
int end;
while(getline(cin,s1)){
s = s1.substr(16);
end = s.size() - 1;
for(int i=end; i>0; i--){
if(s[i]=='}'){ s[i] = ' '; break; }... |
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of t... |
#include <iostream>
int gcd(int a, int b) {
//write your code here
int current_gcd = 1;
for (int d = 2; d <= a && d <= b; d++) {
if (a % d == 0 && b % d == 0) {
if (d > current_gcd) {
current_gcd = d;
}
}
}
return current_gcd;
}
int main() {
int a, b;
std::cin >> a >> b;
st... |
/*
* Copyright (c) 2015 - 2022, Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "config.h"
#include "ScalingModelRegion.hpp"
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <stdlib.h>
#include "geopm_prof.h"
#include "geopm_hint.h"
#i... |
#include <hxcpp.h>
#ifndef INCLUDED_Main
#include <Main.h>
#endif
#ifndef INCLUDED_openfl_Assets
#include <openfl/Assets.h>
#endif
#ifndef INCLUDED_openfl_display_Bitmap
#include <openfl/display/Bitmap.h>
#endif
#ifndef INCLUDED_openfl_display_BitmapData
#include <openfl/display/BitmapData.h>
#endif
#ifndef INCLUDED_o... |
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2015 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... |
/*
TITLE RGB chart Chapter13Exercise7.cpp
"Bjarne Stroustrup "Programming Principles and Practices Using C++""
COMMENT
Objective: Create a RGB color chart.
Output:
Author: 19.09.2015
Date: Chris B. Kirov
*/
#include "GUI.h"
#include "Simple_window.h"
#include <iostream>
#include <iomanip>... |
// Copyright 2016 Google Inc. 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) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef WIN32
// for posix_fallocate
#ifdef __linux__
#define _POSIX_C_SOURCE 2001... |
//
// detail/timer_scheduler.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 BOOST_A... |
#include "pch_bcl.h"
#include "PenModeler.h"
#include "EigenExtension.h"
#include <Geometrics\TriangleMesh.h>
#include <PrimitiveVisualizer.h>
#include <Models.h>
#include "Scene.h"
#include <iostream>
#include <ShaderEffect.h>
#include "AssetDictionary.h"
#include "Settings.h"
using namespace Causality;
using namespa... |
/*
* Copyright 2020 CNRS-UM LIRMM, CNRS-AIST JRL
*/
#include "mc_admittance_sample_controller.h"
CONTROLLER_CONSTRUCTOR("AdmittanceSample", AdmittanceSampleController) |
/**
* Copyright (C) 2013 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful... |
//
// AbstractLayer.cpp
//
// Copyright (c) 2006-2013 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//
#include "vtlib/vtlib.h"
#include "vtlib/vtosg/MultiTexture.h"
#include "TParams.h"
#include "GeomFactory.h"
#include "AbstractLayer.h"
#include "vtdata/DataPath.h"
#include "vtdata/Fea... |
/*
*
* Copyright 2015, Google Inc.
* 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 condi... |
// Copyright (C) 2015 SRG Technology, LLC
//
// 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, pu... |
// Copyright (C) 2005, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef CoinModelUseful_H
#define CoinModelUseful_H
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <cfloat>
#include <c... |
/*!
@file
Defines `boost::hana::detail::unpack_flatten`.
@copyright Louis Dionne 2013-2016
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_UNPACK_FLATTEN_HPP
#define BOOST_HANA_DETAIL_UNPACK_FLATTEN... |
/*
* @author PELLETIER Benoit
*
* @file Dungeon.cpp
*
* @date 15/10/2018
*
* @brief Define and generate dungeons
*
*/
#include "DG/Dungeon.h"
#include <chrono>
#include <cassert>
#define min(x, y) (x < y) ? x : y
Dungeon::Dungeon(uint64_t width, uint64_t height)
: m_params(DungeonParams::basic), m_array(nullptr)
{
... |
// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved
// (DO NOT EDIT: machine generated header) 'ElTreeComboBox.pas' rev: 6.00
#ifndef ElTreeComboBoxHPP
#define ElTreeComboBoxHPP
#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <... |
#include "mex.h"
#include <time.h>
#include <math.h>
#include <string.h>
/*Round function.*/
double round(double x) { return (x-floor(x))>0.5 ? ceil(x) : floor(x); }
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
/* Input/output variables. */
double *data;
double *xk;
... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "alert.h"
#include "checkpoints.h"
#include "db.h"
#include "txdb.h"
#inc... |
/*
* 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... |
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentatio... |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid c... |
/*
* File: ximabmp.cpp
* Purpose: Platform Independent BMP Image Class Loader and Writer
* 07/Aug/2001 Davide Pizzolato - www.xdp.it
* CxImage version 5.99c 17/Oct/2004
*/
#include "ximabmp.h"
#if CXIMAGE_SUPPORT_BMP
#include "ximaiter.h"
///////////////////////////////////////////////////////////////////////... |
//=================================================================================================
/*!
// \file src/mathtest/operations/dmatdmatschur/SDaMDb.cpp
// \brief Source file for the SDaMDb dense matrix/dense matrix Schur product math test
//
// Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
... |
/***************************************************************************
* Copyright (c) 2017, Sylvain Corlay and Johan Mabille *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* ... |
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
#include "Luau/Compiler.h"
#include "Luau/BytecodeBuilder.h"
#include "Luau/StringUtils.h"
#include "ScopedFlags.h"
#include "doctest.h"
#include <sstream>
#include <string_view>
namespace Luau
{
std... |
/*
*
* This plugin was inspired from WoG's implementation
* of additional LOD tables. The source code is
* available at:
*
* https://github.com/GrayFace/wog/blob/master/T1/lod.cpp
* https://github.com/GrayFace/wog/blob/master/T1/lod.h
*
* Many thanks to WoG team!
*
*/
#include "Hooks.h"
BOOL APIENTRY DllMa... |
/*
* Copyright (C) 2012-2016 Open Source Robotics 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... |
#pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/REDhash.hpp>
#include <RED4ext/Handle.hpp>
#include <RED4ext/Types/generated/quest/DisableableNodeDefinition.hpp>
namespace RED4ext
{
namespace quest { struct ICrowdManager_NodeTy... |
// 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/safe_browsing/chrome_cleaner/reporter_runner_win.h"
#include <initializer_list>
#include <set>
#include <tuple>
#include <utilit... |
#include <internal/facts/external/windows/powershell_resolver.hpp>
#include <internal/util/yaml.hpp>
#include <facter/facts/collection.hpp>
#include <facter/facts/scalar_value.hpp>
#include <facter/facts/fact.hpp>
#include <leatherman/execution/execution.hpp>
#include <leatherman/logging/logging.hpp>
#include <leatherm... |
///
/// VertexBuffer.cpp
/// galaxy
///
/// Refer to LICENSE.txt for more details.
///
#include "VertexBuffer.hpp"
namespace galaxy
{
namespace graphics
{
VertexBuffer::VertexBuffer() noexcept
: m_vbo {0}
, m_size {0}
{
glGenBuffers(1, &m_vbo);
}
VertexBuffer::VertexBuffer(VertexBuffer&& vb) noexc... |
/**
* Sort List
*
* cpselvis(cpselvis@gmail.com)
* Oct 16th, 2016
*/
#include<iostream>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode* sortList(ListNode* head) {
if (head == NULL || head -> next == NULL)
... |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
#include "inGame.hpp"
#include "pauseMenu.hpp" |
#include <iostream>
void f1();
void f2();
void f3();
void f4();
int main() {
int ival = 1024;
int &refVal = ival; // refVal 指向 ival (是 ival 的另一个名字)
// int &refVal2; // 报错: 引用必须被初始化
std::cout << "ival: " << ival << std::endl;
std::cout << "&ival: " << &ival << std::endl;
std::cout << "refVal: " << refVal... |
#include "parser.hpp"
#include "writer.hpp"
#include <unistd.h>
int main(int argc, char *argv[]) {
bool debug_flag = false;
int ch;
while ((ch = getopt(argc, argv, "d")) != -1) {
if (ch == 'd') {
debug_flag = true;
}
}
if (argc - optind != 1) {
cerr << "the num... |
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.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 arising from the use of this software.
Permission is grant... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkParallelRenderManager.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
Copyrigh... |
/*
* Copyright (C) 2008 The Android 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
//===----------------------------------------------------------------------===//
//
// 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
//
//===---------------------------... |
#include "OSDWidget.hh"
#include "SDLOutputSurface.hh"
#include "Display.hh"
#include "VideoSystem.hh"
#include "CommandException.hh"
#include "TclObject.hh"
#include "GLUtil.hh"
#include "checked_cast.hh"
#include "ranges.hh"
#include "stl.hh"
#include <SDL.h>
#include <array>
#include <limits>
#include <optional>
us... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long unsigned llu;
typedef double dl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef map<int,int> mii;
typedef map<ll,ll> ... |
#ifndef SPACEY_NEURON_HPP
#define SPACEY_NEURON_HPP
#include <fruit/fruit.h>
#include <gsl/gsl>
#include <boost/functional/hash.hpp>
#include <neat/src/Response.hpp>
#include <neat/src/WeightedActivation.hpp>
#include <neat/src/NeuronInput.hpp>
namespace spacey::neat {
class Neuron;
using ObservedNeuronList = std::ve... |
// Exercicio: Banco - Neps Academy - https://neps.academy/br/exercise/273
#include <bits/stdc++.h>
#define ll long long int
#define nl endl
using namespace std;
int c, n, r;
priority_queue <pair <int, int> , vector<pair<int,int>>, greater< pair<int,int> > > fila;
int main(void){
cin >> c >> n;
for(int i... |
//
// Copyright (C) 2014 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... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
class maiFunctor {
public:
double operator ()(int x)
{
return sqrt(x);
}
};
int main (int argc, char *argv[])
{
if (argc < 2) {
fprintf(stdout, "Usage: %s number\n", argv[0]);
return 1;
}
double inputValue = atof(argv[1]);
maiFuncto... |
//===--- ClangImporter.cpp - Import Clang Modules -------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2018, Alliance for Sustainable Energy, LLC. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitt... |
//https://codeforces.com/group/Rv2Qzg0DgK/contest/287283/problem/J
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
typedef long long ll;
typedef long double ld;
ll mod = 1e9 + 7;
int main ()
{
ios_base::sync_with_stdio (0); cin.tie (0); cout.tie (0);
int n, m, x, o, w, r = 0, h, f ... |
#include "UtilTestFixture.h"
class SemaphoreFunctionalityTest : public UtilTestBase {
public:
SemaphoreFunctionalityTest() :
handle(INVALID_SEMAPHORE_HANDLE_VALUE) {
ATOMIC_STORE_BOOL(&acquired, FALSE);
ATOMIC_STORE(&threadCount, 0);
ATOMIC_STORE(&drainThreadCount, 0);
}
... |
#pragma once
#include <string>
#include <vector>
#include "base/not_null.hpp"
#include "geometry/barycentre_calculator.hpp"
#include "geometry/grassmann.hpp"
#include "geometry/named_quantities.hpp"
#include "geometry/pair.hpp"
#include "geometry/point.hpp"
#include "quantities/named_quantities.hpp"
namespace prin... |
#include "block_io.h"
#include "machine.h"
#include "libk.h"
#include "debug.h"
int64_t BlockIO::read(uint32_t offset, uint32_t desired_n, char* buffer) {
auto sz = size_in_bytes();
if (offset > sz) return -1;
if (offset == sz) return 0;
auto n = K::min(desired_n,sz - offset);
//auto end_offset = ... |
// Copyright 2020 Jan Feitsma (Falcons)
// SPDX-License-Identifier: Apache-2.0
/*
* main.cpp
*
* Created on: 2018-12-08
* Author: Jan Feitsma
*/
#include "comm.hpp"
int main(int argc, char **argv)
{
Comm c;
// configuration is managed via RtDB2Configuration XML parsing
// provide options to ... |
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "HttpNetworkReplayStreaming.h"
#include "HAL/IConsoleManager.h"
#include "Misc/CommandLine.h"
#include "Misc/ConfigCacheIni.h"
#include "Interfaces/IHttpResponse.h"
#include "HttpModule.h"
#include "GenericPlatform/GenericPlatformHttp.h"
#include "P... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "guiutil.h"
#include "... |
/**
* @file register.hpp
*
* メモリマップトレジスタを読み書きする機能を提供する.
*/
#pragma once
#include <cstddef>
#include <cstdint>
template <typename T> struct ArrayLength {};
template <typename T, size_t N> struct ArrayLength<T[N]> { static const size_t value = N; };
/**
* MemMapRegister is a wrapper for a memory mapped register... |
// A model.
struct Model {
GLuint vaoID;
int vertexCount;
Model() {
return;
}
Model(GLuint vaoID, int vertexCount) {
this->vaoID = vaoID;
this->vertexCount = vertexCount;
}
}; |
// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/web_contents_preferences.h"
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
#include "base/command_line.h"
#include "base/memory/p... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__new_wchar_t_rand_82_goodG2B.cpp
Label Definition File: CWE789_Uncontrolled_Mem_Alloc__new.label.xml
Template File: sources-sinks-82_goodG2B.tmpl.cpp
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: rand Set data t... |
/** Copyright (c) 2013, Sean Kasun */
#include "./chunkloader.h"
#include "./chunkcache.h"
#include "./chunk.h"
ChunkLoader::ChunkLoader(QString path, int cx, int cz)
: path(path)
, cx(cx), cz(cz)
, cache(ChunkCache::Instance())
{}
ChunkLoader::~ChunkLoader()
{}
void ChunkLoader::run() {
// get coordinates... |
/*
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/AbstractOperations.h>
#include <LibJS/Runtime/DataView.h>
#include <LibJS/Runtime/DataViewConstructor.h>
#include <LibJS/Runtime/Error.h>
#include <LibJS/Runtime/GlobalObject.h... |
/* FileName: myfs.hpp
* Author: Hover
* E-Mail: hover@hust.edu.cn
* GitHub: HoverWings
* Description: myfs
*/
#ifndef _MYFS_H_
#define _MYFS_H_
//#include<boost/serialization/vector.hpp>
#include <fstream>
#include <list>
#include <map>
#include <string>
#include <vector>
#include "macro.h"
#in... |
#include "PID.h"
#include <iostream>
#include <limits>
#include <cmath>
using namespace std;
PID::PID() {}
PID::~PID() {}
void PID::Init(double Kp_, double Ki_, double Kd_){
Kp = Kp_;
Ki = Ki_;
Kd = Kd_;
p_error = 0.0;
i_error = 0.0;
d_error = 0.0;
iteration = 0;
// for anti windup
max_int_cte = 100000.... |
// 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.Addressab... |
/*=============================================================================
Boost.Wave: A Standard compliant C++ preprocessor library
Definition of the abstract lexer interface
http://www.boost.org/
Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
Software License, Vers... |
/*
* Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
* 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
* ri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.