text stringlengths 7 961k |
|---|
#ifndef DUNE_FOAMGRID_INDEXSETS_HH
#define DUNE_FOAMGRID_INDEXSETS_HH
/** \file
* \brief The index and id sets for the FoamGrid class
*/
#include <vector>
namespace Dune {
/** \todo Take the index types from the host grid */
template<class GridImp>
class FoamGridLevelIndexSet :
public IndexSet<G... |
// Copyright (c) 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.
#include "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... |
/*
* VMMLib - CUDA Tensor Classes
*
* @author Susanne Suter
*
* The higher-order orthogonal iteration (HOOI) is also known as Tucker-ALS (Tuck-ALS)
* The t3_cublas_hooi implements a HOOI for a third-order tensor using CUBLAS
* references:
* - Tucker, 1966: Some mathematical notes on three-mode factor analysi... |
/*
LICENSE
-------
Copyright 2005 Nullsoft, 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 conditio... |
/*
Copyright (c) 2005-2017 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... |
// Copyright 2015 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 "src/compiler/escape-analysis-reducer.h"
#include "src/compiler/all-nodes.h"
#include "src/compiler/js-graph.h"
#include "src/counters.h"
nam... |
#include <mcl/she.h>
#define CYBOZU_TEST_DISABLE_AUTO_RUN
#include <cybozu/test.hpp>
#include <cybozu/option.hpp>
#include <fstream>
const size_t hashSize = 1 << 10;
const size_t tryNum = 1024;
CYBOZU_TEST_AUTO(init)
{
#if MCLBN_FP_UNIT_SIZE == 4
int curve = MCL_BN254;
#elif MCLBN_FP_UNIT_SIZE == 6 && MCLBN_FR_UNIT_... |
#pragma once
namespace tf {
// ----------------------------------------------------------------------------
// taskflow
// ----------------------------------------------------------------------------
class AsyncTopology;
class Node;
class Graph;
class FlowBuilder;
class Semaphore;
class Subflow;
class Runtime;
class ... |
#include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <limits>
// System.Char[]
struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34;
// System.Int32[]
struct Int32U5BU5D_t70F1BDC14B1786481B176D6139A5E3B87DC54C32;
// UnityEngine.Windows... |
#include "scared_flock.h"
#include "shepherding.h"
Vector2d ScaredForceRule::getForce(CFlockState& s)
{
float magnitude = 0.0;
Vector2d force (0, 0);
FSLIST shepherds;
findShepherds(s,shepherds);
if (shepherds.empty())
{
force = CBasicForceRule::getForce(s);
}
else
{
Vect... |
#include "App.h"
#include "Star.h"
Star::Star(int x, int y, int id)
{
position.x = x;
position.y = y;
this->id = id;
name.Create("star");
}
Star::~Star()
{
}
bool Star::Awake(pugi::xml_node& config)
{
LOG("Loading Hearts");
return true;
}
bool Star::Start()
{
bool ret = true;
if (app->currentScene ==... |
// This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include "finite_state_machine.h"
#include "swganh_core/spawn/fsm_controller.h"
#include "swganh_core/object/object.h"
#include "swganh/app/swganh_kernel.h"
using namespace boost;
using name... |
#ifndef JOSS_CONTROLLER
#define JOSS_CONTROLLER
#include "header.hpp"
#include "view.hpp"
#include "model.hpp"
class JOSSController {
public:
JOSSView* view;
JOSSModel* model;
JOSSController();
void start();
void update_view();
void handle_enter(std::string cmd);
};
#endif |
// $Id: inner_server.cpp 91825 2010-09-17 09:10:22Z johnnyw $
#include "amh_ami_pch.h"
#include "inner_i.h"
#include "ace/SString.h"
#include "ace/Get_Opt.h"
#include <iostream>
#include <fstream>
int dont_crash = 1;
const ACE_TCHAR *ior_output_file = ACE_TEXT ("inner.ior");
int
parse_args (int argc, ACE_TCHAR *ar... |
// Copyright 2021 The Khronos Group
// SPDX-License-Identifier: Apache-2.0
#include "cornell_box_hdri.h"
namespace anari {
namespace scenes {
static void anari_free(void *ptr, void *)
{
std::free(ptr);
}
static anari::Array2D makeTextureData(anari::Device d, int dim)
{
auto *data = new glm::vec3[dim * dim];
... |
/**********************************************************************
* $Id: avc_e00read.cpp 6ef13199b493973da285decbfcd5e2a763954b97 2018-06-07 05:46:42 -0400 luzpaz $
*
* Name: avc_e00read.c
* Project: Arc/Info vector coverage (AVC) BIN->E00 conversion library
* Language: ANSI C
* Purpose: Functions to... |
/* ************************************************************************
* Copyright 2018-2020 Advanced Micro Devices, Inc.
* ************************************************************************ */
#include "flops.hpp"
#include "norm.hpp"
#include "rocblas.hpp"
#include "rocblas_datatype2string.hpp"
#include ... |
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "pubkey.h"
#include <secp256k1.h>
#include <secp256k1_recovery.h>
namespace
{
/* Global secp256k1_context object u... |
#ifndef CONNECT_SERVICES___NETSERVICE_API_EXPT__HPP
#define CONNECT_SERVICES___NETSERVICE_API_EXPT__HPP
/* $Id $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* Th... |
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include "../utils/utils.h"
REAL x1(const REAL x);
REAL x3x2(const REAL x);
REAL x1_0001(const REAL x);
REAL x2_0025(const REAL x);
int main ()
{
REAL res;
REAL tol = 1E-5;
//Testing central diff
printf("Central diff\n");
res = diff(1, *x1);
assert(is_equ... |
// 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 "ui/ozone/platform/x11/x11_window_ozone.h"
#include "base/run_loop.h"
#include "base/test/scoped_task_environment.h"
#include "testing/gtest/inc... |
/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "modules/skottie/src/SkottiePriv.h"
#include "include/core/SkData.h"
#include "include/core/SkFontMgr.h"
#include "include/core/SkTypes.h"
#include "modules/skottie/... |
/*
* Copyright (C) 2020 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 appl... |
//
// Created by chu genshen on 2021/9/8.
//
#ifndef SPMV_ACC_FLAT_REDUCE_HPP
#define SPMV_ACC_FLAT_REDUCE_HPP
#include "../common/utils.h"
template <typename I, typename T, int NNZ_PER_BLOCK, int THREADS, int VECTOR_SIZE>
__device__ __forceinline__ void
flat_reduce_in_vector(const int n_reduce_rows_num, const int t... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
// Including type: MasterServer.UserMessageHandler/<>c__DisplayClass34_0
#include "MasterServer/... |
// 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/webui/signin/signin_web_dialog_ui.h"
SigninWebDialogUI::SigninWebDialogUI(content::WebUI* web_ui)
: WebDialogUI(web_ui) {... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/s3control/model/SelectionCriteria.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#includ... |
// Created on: 1998-10-06
// Created by: Jean Yves LEBEY
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GN... |
#ifndef CAFFE_UTIL_CUDNN_H_
#define CAFFE_UTIL_CUDNN_H_
#ifdef USE_CUDNN
#include <cudnn.h>
#include "caffe/common.hpp"
#include "caffe/proto/caffe.pb.h"
#define CUDNN_VERSION_MIN(major, minor, patch) \
(CUDNN_VERSION >= (major * 1000 + minor * 100 + patch))
#define CUDNN_CHECK(condition) \
do { \
cudnnSt... |
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
////////////////////////////////////////////////////////////////////////////
// Module : script_action_wrapper.h
// Created : 19.03.2004
// Modified : 26.03.2004
// Author : Dmitriy Iassenev
// Description : Script action wrapper
////////////////////////////////////////////////////////////////////////////
#inclu... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzCore/Casting/numeric_cast.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzTest/A... |
// 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.
#include "init.h"
#include "main.h"
#include "chainparams.h"
#include "txdb.h"
#in... |
#include "stdafx.h"
#include "../BaseLib/math/mathclass.h"
#include "FuzzyCluster.h"
#include <deque>
#include <float.h>
#include "../BaseLib/utility/TArray.h"
#include "../BaseLib/utility/util.h"
#include <vector>
#include <list>
#include "../BaseLib/image/ImageProcessor.h"
#include "PCA.H"
#include "../BaseLib/math/O... |
#include "stream_writer.h"
StreamWriter::StreamWriter(char* buff, int size) :
_buff(buff),
_size(size),
_offset(0)
{
}
StreamWriter::StreamWriter(byte* buff, int size) :
_buff((char*)buff),
_size(size),
_offset(0)
{
}
StreamWriter::~StreamWriter()
{
}
void StreamWriter::write(const char* buff, int32 siz... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
#include "ggpch.h"
#include "SubTexture2D.h"
namespace GitGud
{
SubTexture2D::SubTexture2D(const Ref<Texture2D>& texture, const glm::vec2& min, const glm::vec2& max) : _texture(texture)
{
_texCoords[0] = { min.x, min.y };
_texCoords[1] = { max.x, min.y };
_texCoords[2] = { max.x, max.y };
_texCoords[3] = { m... |
#pragma once
#include <nano/lib/errors.hpp>
#include <nano/lib/rsnano.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/shared_ptr.hpp>
#include <atomic>
#include <chrono>
#include <cstdint>
#define FATAL_LOG_PREFIX "FATAL ERROR: "
namespace boost
{
BOOST_LOG_OPEN_NAMESPACE
namespace sinks
{
class text_... |
#pragma once
#include "../../JObject.hpp"
class JString;
namespace android::provider
{
class LiveFolders : public JObject
{
public:
// Fields
static JString ACTION_CREATE_LIVE_FOLDER();
static JString DESCRIPTION();
static jint DISPLAY_MODE_GRID();
static jint DISPLAY_MODE_LIST();
static JString EXTRA... |
// Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <iostream>
#include <utility>
#include <map>
#include <string>
#include "mock_plugin.hpp"
#include <cpp_interfaces/exception2status.hpp>
#include "description_buffer.hpp"
using namespace std;
using namespace InferenceEngi... |
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
//
// Copyright (c) 2011 The LevelDB Authors. All rights r... |
// 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.
#include "util.h"
#include "sync.h"
#include "strlcpy.h"
#include "version.h"
#inc... |
#include <assert.h>
#include "libyuv.h"
#include "jni.h"
#include "android/log.h"
#define YUV_UTILS_JAVA "com/wuwang/libyuv/YuvUtils"
#ifdef __cplusplus
extern "C" {
#endif
static int (*rgbaToI420Func[])(const uint8 *,int,uint8 *,int,uint8 *,int ,uint8 *,int,int,int)={
libyuv::ABGRToI420,libyuv::RGBAToI420,libyu... |
// -----------------------------------------------------------------------------------------------------
// Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
// Copyright (c) 2016-2019, Knut Reinert & MPI für molekulare Genetik
// This file may be used, modified and/or redistributed under the terms of th... |
/* _________________________________________________________________________
*
* TEVA-SPOT Toolkit: Tools for Designing Contaminant Warning Systems
* Copyright (c) 2008 Sandia Corporation.
* This software is distributed under the LGPL License.
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corpor... |
#include "format.h"
using std::string;
// TODO: Complete this helper function
// INPUT: Long int measuring seconds
// OUTPUT: HH:MM:SS
// REMOVE: [[maybe_unused]] once you define the function
string Format::ElapsedTime(long seconds) {
int hr = seconds/3600;
int min = (seconds - hr*3600)/60;
int secs = second... |
/*
* AUTHOR: SREEDEVI SURENDRAN
*
*/
/*
Perfexpert module for parsing intel vectorization reports (6 and 7) and embedding collated messages as comments to a copy of the original source code
Approach
a. Parse the vectorization reports 6 and 7 and collate messages for every source line mentioned in both the reports. ... |
/**
* Defines a static class that defines how to do logging.
*/
#ifndef LOGGING_H
#define LOGGING_H
#include <glog/logging.h>
class Logging {
public:
static void setUp(char *argv[]);
};
#endif |
#include <optional>
#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include <io2d.h>
#include "route_model.h"
#include "render.h"
#include "route_planner.h"
using namespace std::experimental;
static std::optional<std::vector<std::byte>> ReadFile(const std::string &path)
{
std::ifstr... |
//===-- Path.cpp - Implement OS Path Concept ------------------------------===//
//
// 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
//
//===---------------------------... |
//+--------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1992.
//
// File: funcs.cxx
//
// Contents: Generic DocFile support functions
//
// Functions: ModeToTFlags
// CheckName
// VerifyPerms
//
// ... |
/*
==== Author:
Relja Arandjelovic (relja@robots.ox.ac.uk)
Visual Geometry Group,
Department of Engineering Science
University of Oxford
==== Copyright:
The library belongs to Relja Arandjelovic and the University of Oxford.
No usage or redistribution is allowed without explicit permission.
*/
#include "dataset_v2.... |
/*
* 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 ... |
//===- NVPTXLowerAggrCopies.cpp - ------------------------------*- C++ -*--===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE590_Free_Memory_Not_on_Heap__delete_array_long_alloca_33.cpp
Label Definition File: CWE590_Free_Memory_Not_on_Heap__delete_array.label.xml
Template File: sources-sink-33.tmpl.cpp
*/
/*
* @description
* CWE: 590 Free Memory Not on Heap
* BadSource: alloca Data buffer i... |
#include <iostream>
#include <vector>
#include <tuple>
using namespace std;
class Clustering
{
public:
auto solve (
const int N,
const int K,
const vector<int> x,
const vector<int> y)
{
vector<int> cx(K);
vector<int> cy(K);
for (int i = 0; i < K; i++) {
... |
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
using namespace std;
static string ParseShader(const string filePath)
{
ifstream stream(filePath);
string line;
stringstream ss;
while (getline(stream, line))
{
ss <<... |
#ifndef BULLETAGESYSTEM_HPP
#define BULLETAGESYSTEM_HPP
#include <memory>
#include "ash/tools/ListIteratingSystem.hpp"
#include "asteroids/include/nodes/BulletAgeNode.hpp"
#include "asteroids/include/EntityCreator.hpp"
namespace net {
namespace richardlord {
namespace asteroids {
namespace systems {
using std::sha... |
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
// Qt
#include <QObject>
// AZ
#include <AzCore/Serialization/SerializeContext.h>
// Graph Model
#... |
#ifndef H_SHAREBUY_SHOP
#define H_SHAREBUY_SHOP
#include <string>
using std::string;
#include <memory>
#include <set>
using std::shared_ptr;
#include <boost/property_tree/ptree.hpp>
namespace bpt=boost::property_tree;
#include <boost/regex.hpp>
#include "BasketAddTemplate.hpp"
class Shop
{
public:
explicit Shop(bpt... |
/* Copyright 2018 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... |
//
// Particle.cpp
// particleSystem
//
// Created by peterobbin on 10/30/16.
//
//
#include "Particle.hpp"
// using the constructor to initialize all the variables
Particle::Particle(ofVec2f position)
:mPosition(position)
, mVelocity( ofRandom(-2.f, 2.f), ofRandom(-2.f, 2.f))
, mAcceleration(ofVec2f(0))
, mLifeSpa... |
/** @defgroup MleParts Magic Lantern Parts */
/**
* @file antirot.cxx
* @ingroup MlParts
*
* @author Mark S. Millard
*
* This file implements an Inventor node that undoes any rotation applied
* in the current transformation matrix during scene graph traversal.
*/
// COPYRIGHT_BEGIN
//
// The MIT License (MIT)... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
/**
* A simple tool to handle logs received from trackers from the HTC Vive
*/
#include <vive_provider/udp_message_manager.h>
#include <tclap/CmdLine.h>
using namespace vive_provider;
int main(int argc, char** argv)
{
TCLAP::CmdLine cmd("Handle logs received from trackers from the HTC Vive", ' ', "1.0");
TCLA... |
//
// detail/impl/posix_tss_ptr.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2020 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 B... |
// Copyright (c) 2017-2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <amount.h>
#include <node/context.h>
#include <primitives/transaction.h>
#include <random.h>
#include <test/util/set... |
#include "../.././Core/System/Option.hh" |
// tLuaCOMTypeHandler.cpp: implementation of the tLuaCOMTypeHandler class.
//
//////////////////////////////////////////////////////////////////////
// RCS Info
static char const * const rcsid = "$Id: tLuaCOMTypeHandler.cpp,v 1.10 2008/01/31 17:09:16 ignacio Exp $";
static char const * const rcsname = "$Name: $";
#... |
// Copyright (c) 2017-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
#include <string>
#include <vector>
#include "envoy/api/api.h"
#include "envoy/config/cluster/v3/cluster.pb.h"
#include "envoy/config/core/v3/base.pb.h"
#include "envoy/config/core/v3/base.pb.validate.h"
#include "envoy/network/transport_socket.h"
#include "envoy/stats/scope.h"
#include "common/config/metadata.h"
#in... |
#include "LightDialog.h"
#include "ui_LightDialog.h"
#include <QColorDialog>
LightDialog::LightDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::LightDialog),
startingLowerHemisphere(Ogre::ColourValue( 0.6f, 0.45f, 0.3f ) * 0.065f * 0.75f),
startingUpperHemisphere(Ogre::ColourValue( 0.3f, 0.5f, 0.7... |
/*
* Copyright (C) 2010 Advanced Micro Devices, Inc. All Rights Reserved.
*/
/*
* Copyright 2004, 2005, 2006 PathScale, Inc. All Rights Reserved.
*/
/*
Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it
under the ... |
#ifndef Q_PAINTED_WIDGETS___COMPOSED___GENERIC___TUPLE_ALIGNED___TUPLE_VERTICAL_HPP
#define Q_PAINTED_WIDGETS___COMPOSED___GENERIC___TUPLE_ALIGNED___TUPLE_VERTICAL_HPP
#include "Tuple_Aligned.hpp"
#include "QPaintedWidgets/painting/rect_split.hpp"
namespace QPaintedWidgets {
template <typename BaseT>
struct TupleVe... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
| Copyrigh... |
// PUSubtractionMethods.cc
// Authors: Alex Barbieri
// Kalanand Mishra, Fermilab
// Inga Bucinskaite, UIC
//
// This file should contain the different algorithms used to perform PU, UE subtraction.
//#include "DataFormats/L1TCalorimeter/interface/CaloRegion.h"
#include "L1Trigger/L1TCalorimeter/inte... |
#pragma once
#include <string>
static std::string lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur et lacus massa. Etiam pulvinar "
"iaculis enim nec aliquam. Cras a convallis metus. Suspendisse nunc metus, ultrices sit amet urna in, euismod "
"auctor felis. Nullam et dolor at ligul... |
#include <iostream>
#include <QList>
#include <QString>
#include <cassert>
using namespace std;
int main ()
{
QList<QString> list;
list << "A" << "B" << "C" << "D" << "E" << "F";
assert(list.takeLast() != "F");
assert(list.size() != 5);
return 0;
} |
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode* buildTree(vector<int>& preorder, vector<int>& inorder) {
this->preorder = pre... |
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <array>
#include <cstdint>
#include <chrono>
#include <type_traits>
#include <functional>
#include "gsl"
#include "dtypes.h"
#include "bitmacros.h"
#include "countbitsset.h"
#include "gccversion.h... |
/**
* GeneralException Class
*
* -------------------------------------------------------------------------------
* This file is part of "Shader IDE" -> https://github.com/thedamncoder/shaderide.
* -------------------------------------------------------------------------------
*
* Copyright (c) 2019 - 2021 Floria... |
// -----------------------------------------------------------------------------------------------------
// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik
// This file may be used, modified and/or redistributed under the terms of th... |
// Copyright 2013 The Flutter 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 "flutter/lib/ui/window/pointer_data_packet_converter.h"
#include "gtest/gtest.h"
namespace flutter {
namespace testing {
void CreateSimulatedPoi... |
#include "cddefines.h"
void test(multi_arr<long,3>& arr)
{
ml3ci p = arr.ptr(0,0,3);
ml3i q = p-1;
} |
#include "Test.h"
#include "slang/symbols/ClassSymbols.h"
static constexpr const char* PacketClass = R"(
class Packet;
bit [3:0] command;
bit [40:0] address;
bit [4:0] master_id;
integer time_requested;
integer time_issued;
integer status;
typedef enum { ERR_OVERFLOW = 10, ERR_UNDERFLOW = ... |
/**
* \file
* \author Thomas Fischer
* \date Apr 3, 2012
* \brief Implementation of the PolylineWithSegmentMarker class.
*
* \copyright
* Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICE... |
/*
Copyright (c) 2017 Andre Santos
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, su... |
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "thrift/lib/cpp2/transport/rsocket/gen-cpp2/Config_data.h"
#include <thrift/lib/cpp2/gen/module_data_cpp.h> |
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "thrift/compiler/test/fixtures/doctext/gen-cpp2/C.h"
#include "thrift/compiler/test/fixtures/doctext/gen-cpp2/C.tcc"
namespace cpp2 {
} // cpp2
namespace apache { namespace thrift {
}} //... |
/**
* @file llformat.cpp
* @date January 2007
* @brief string formatting utility
*
* $LicenseInfo:firstyear=2007&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... |
// { Driver Code Starts
// Program to find the maximum profit job sequence from a given array
// of jobs with deadlines and profits
#include<bits/stdc++.h>
using namespace std;
// A structure to represent a job
struct Job
{
int id; // Job Id
int dead; // Deadline of job
int profit; // Profit if jo... |
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int fx[]={+1,-1,+0,-0};
int fy[]={+0,-0,+1,-1};
int grid[30][30];
int row,column,n,x,y,startX,startY;
#define valid(x,y) x>=0 && x<row && y>=0 && y<column
struct node
{
int x;
int y;
node(int a,int b)
{
x=a;y=b;
}
};
void... |
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
using namespace std;
#define ll long long
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
#define find(Arr,x,sz) (lower_bound(&Arr[1],&Arr[sz+1],x)-Arr)
const int maxN=101000;
const int inf=2147483647;
class SegmentData
{
public... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2018 The MasterCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-l... |
//===--- SILGenConstructor.cpp - SILGen for constructors ------------------===//
//
// 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... |
/**
Copyright 2009-2017 National Technology and Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government
retains certain rights in this software.
Sandia National Laboratories is a multimission laboratory managed and operated
by National Technology and Engineering... |
// Copyright (c) 2012-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "addrman.h"
#include "test/test_vivoinnovaonexgobyte.h"
#include <string>
#include <boost/test/unit_test.hpp>
#inclu... |
#include<cstdio>
int main(){
const int LIMIT=5842,FACTOR_NUM=4,FACTORS[FACTOR_NUM]={2,3,5,7};
int factorCoef[FACTOR_NUM]={0,0,0,0},humble[LIMIT]={1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,21,24,25,27};
for(int i=20;i<LIMIT;i++){
for(int j=0;j<FACTOR_NUM;j++){
while(FACTORS[j]*humble[facto... |
#include <iostream>
using namespace std;
struct node
{
// 数据域
int data;
// 左节点
node *lc;
// 右结点
node *rc;
// 构造函数
node() : data(0), lc(NULL), rc(NULL)
{}
node(int val) : data(val), lc(NULL), rc(NULL)
{}
};
node *constructCore(int *pre, int pre_size, int *in, int in_siz... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.