text stringlengths 5 1.04M |
|---|
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... |
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkLabelImageGaussianInterpolateImageFunction.hxx,v $
Language: C++
Date: $Date: $
Version: $Revision: $
Copyright (c) Insight Software Consortium... |
#include <iostream> // Biblioteca padrão entrada/saída
#include <iomanip> // Biblioteca para definir o número de casas decimais
using namespace std;
int main() { // Função MAIN:
int km; ... |
#ifndef assert_hh_INCLUDED
#define assert_hh_INCLUDED
namespace Kakoune
{
class StringView;
// return true if user asked to ignore the error
bool notify_fatal_error(StringView message);
void on_assert_failed(const char* message);
}
#define STRINGIFY(X) #X
#define TOSTRING(X) STRINGIFY(X)
#ifdef KAK_DEBUG
#de... |
#include "openvslam/camera/base.h"
#include "openvslam/data/common.h"
#include "openvslam/data/frame.h"
#include "openvslam/data/keyframe.h"
#include "openvslam/data/landmark.h"
#include "openvslam/data/camera_database.h"
#include "openvslam/data/map_database.h"
#include "openvslam/util/converter.h"
#include <spdlog/s... |
/*!
* \author Saurabh Joshi - sbjoshi@iith.ac.in
*
* @section LICENSE
*
* Open-WBO, Copyright (c) 2013-2017, Ruben Martins, Vasco Manquinho, Ines Lynce
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal... |
#include "ActionEquipItem.h"
#include <AI/Prop/PropActorBrain.h>
#include <Chr/Prop/PropEquipment.h>
namespace AI
{
ImplementRTTI(AI::CActionEquipItem, AI::CAction);
ImplementFactory(AI::CActionEquipItem);
using namespace Properties;
bool CActionEquipItem::Activate(CActor* pActor)
{
//!!!later play a... |
// Copyright 2006-2009 Daniel James.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "../helpers/prefix.hpp"
#include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp>
void foo(boost::unorder... |
//===-- ASTMerge.cpp - AST Merging Frontent Action --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/*
* This source file is part of ARK
* For the latest info, see https://github.com/ArkNX
*
* Copyright (c) 2013-2019 ArkNX authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
... |
#include <ext/callback>
#ifdef _EXT_CALLBACK_
#include <functional>
#include <gtest/gtest.h>
void sum_fn(int *sum, int val) { *sum += val; }
TEST(callback_test, callback_test) {
ext::callback<int> int_callback;
int sum = 0;
int_callback += std::bind(&sum_fn, &sum, std::placeholders::_1);
int_callback += std:... |
// To run this script, `cd` to the `./test/fixtures` directory and then execute in the terminal `runWandbox --file --compiler gcc-head --output output3.json ./runner3.cpp`.
#include <iostream>
#include <vector>
#include <boost/math/special_functions/gamma.hpp>
using namespace std;
vector<double> linspace( double sta... |
#include <onnxoptimizer/optimize.h>
#include <onnx/onnx_pb.h>
#include <fstream>
int main(int argc, char **argv) {
ONNX_NAMESPACE::ModelProto model;
std::ifstream ifs(argv[1]);
bool success = model.ParseFromIstream(&ifs);
if (!success) {
std::cout << "load failed" << std::endl;
return -1;
}
onnx:... |
/// \file ParamGeneration.cpp
///
/// \brief Parameter manipulation routines for the Zerocoin cryptographic
/// components.
///
/// \author Ian Miers, Christina Garman and Matthew Green
/// \date June 2013
///
/// \copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green
... |
#include "opencv2/ccalib/omnidir.hpp"
#include "opencv2/ccalib/multicalib.hpp"
#include "opencv2/ccalib/randpattern.hpp"
using namespace std;
using namespace cv;
const char * usage =
"\n example command line for multi-camera calibration by using random pattern \n"
" multi_cameras_calibration -nc 5 -pw 800 -ph 600 -... |
#ifndef KARGER_ALGO_H
#define KARGER_ALGO_H
#include <memory>
#include <vector>
#include "../graphs/lca_computer.hpp"
#include "../graphs/undirected_weighted_graph.hpp"
#include "../graphs/weighted_tree.hpp"
#include "common.hpp"
class karger_algo {
private:
std::shared_ptr<graphs::weighted_graph> graph;
s... |
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the ... |
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <memory>
#include <string>
#include <tuple>
#include <vector>
#include "shared_test_classes/base/layer_test_utils.hpp"
#include "ngraph_functions/builders.hpp"
#include "ngraph_functions/utils/ngraph_helpers.... |
#ifndef SN_BUILTIN_CRTDBG_H
#define SN_BUILTIN_CRTDBG_H
#include "../sn_Config.hpp"
#if defined(SN_CONFIG_COMPILER_MSVC)
#include <stdlib.h>
#include <crtdbg.h>
#define _CRTDBG_MAP_ALLOC
#ifdef _DEBUG
#define SN_BUILTIN_CRTDBG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new SN_BUILTIN_CRTDBG_NEW
#end... |
/*
* Copyright (c) [2020-2021] Huawei Technologies Co.,Ltd.All rights reserved.
*
* OpenArkCompiler is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
* http://license.coscl.org.cn/MulanPSL2
*
... |
/**
* Autogenerated by Thrift for storage.thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "storage_types.h"
#include "storage_types.tcc"
#include <thrift/lib/cpp2/gen/module_types_cpp.h>
#include "storage_data.h"
namespace apache { namespace thrift {
const... |
//===-- Unittests for x86 long double -------------------------------------===//
//
// 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 <iostream>
using namespace std;
int main() {
//deklaracja zmiennych
int liczba;
unsigned long long silnia = 1; //unsigned long long bo potrzeba przechować wartość większą niż int
//odbieranie wartości o użytkownika
do {
cout << "Podaj liczbe nie wieksza niz 20" << endl;
cin >> liczba;
... |
// Copyright (c) 2010-2018 The AriA Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "crypto/sha1.h"
#include "crypto/common.h"
#include <string.h>
// Internal implementation code.
namespace
{
/// ... |
/* Copyright (C) 2006 - 2013 ScriptDev2 <http://www.scriptdev2.com/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.... |
// Copyright (c) 2013-2018 LG Electronics, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
// 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/safe_browsing/safe_browsing_store_file.h"
#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "ba... |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
typedef long long ll;
const int N = 11, P = 1e9 + 7, PP = 1e9 + 6;
void mul(int n, int a[N][N], int b[N][N], int c[N][N]) {
static int tmp[N][N];
memset(tmp, 0, sizeof tmp);
for (int i = 0; i < n; i++)
for (int k = 0; k < n; k++)
for (... |
/*
All modification made by Intel Corporation: © 2016 Intel Corporation
All contributions by the University of California:
Copyright (c) 2014, 2015, The Regents of the University of California (Regents)
All rights reserved.
All other contributions:
Copyright (c) 2014, 2015, the respective contributors
All rights rese... |
/*************************************************************************/
/* editor_settings.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
///////////////////////////////////////////////////////////////////////////////
//
// ZX-ESPectrum - ZX Spectrum emulator for ESP32
//
// Copyright (c) 2020, 2021 David Crespo [dcrespo3d]
// https://github.com/dcrespo3d/ZX-ESPectrum-Wiimote
//
// Based on previous work by Ramón Martinez, Jorge Fuertes and many others
/... |
// Copyright (c) 2009-2019 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 <rpc/server.h>
#include <banman.h>
#include <chainparams.h>
#include <clientversion.h>
#include <core_io.h>
#includ... |
// Copyright (c) 2013 The Bitcoin Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//
// Unit tests for alert system
//
#include "alert.h"
#include "clientversion.h"
#include "data/alertTests.raw.h"
#include... |
/** @file "/owlcpp/include/owlcpp/rdf/detail/triple_index_fwd.hpp"
part of owlcpp project.
@n @n Distributed under the Boost Software License, Version 1.0; see doc/license.txt.
@n Copyright Mikhail K Levin 2013
*******************************************************************************/
#ifndef TRIPLE_INDEX_FWD_HPP... |
// stdafx.cpp : source file that includes just the standard includes
// ga.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
// This file is a part of the OpenSurgSim project.
// Copyright 2013-2016, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses... |
#include "Image.h"
#include "Base.h"
namespace tools
{
Image::Image() :
_data(NULL), _format(RGBA), _width(0), _height(0), _bpp(0)
{
}
Image::~Image()
{
delete[] _data;
}
Image* Image::create(const char* path)
{
// Open the file.
FILE* fp = fopen(path, "rb");
if (fp == NULL)
{
LOG(1,... |
#include "Xor.h"
#include "V3DITKFilterDualImage.h"
// ITK Header Files
#include "itkXorImageFilter.h"
// Q_EXPORT_PLUGIN2 ( PluginName, ClassName )
// The value of PluginName should correspond to the TARGET specified in the
// plugin's project file.
Q_EXPORT_PLUGIN2(Xor, XorPlugin)
QStringList XorPlugin::menulis... |
/*
* Copyright (C) 2013 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 conditio... |
#include "metronome.h"
#include "constants.h"
#include "metronome_gl.h"
#include "../third_party/gui_math.h"
#include "../third_party/gui_window.h"
#include "../third_party/gui_io.h"
enum image { I_START, I_STOP, I_BPM, I_SEGMENT_HOR, I_SEGMENT_VER, I_SEGMENT_HOR_MINI, I_SEGMENT_VER_MINI };
enum sound_type { S_SECON... |
/*
* Author: illuz <iilluzen[at]gmail.com>
* File: AC_memorial_memorial_dfs_n^4.cpp
* Create Date: 2015-03-08 13:42:18
* Descripton: Use O(n^3) space to memorial.
* dp[i][j][n] means the s1[i~i+n] and s2[j~j+n] is match.
*/
#include <bits/stdc++.h>
using namespace std;
const int N = 0;
... |
#include <torch/csrc/distributed/c10d/reducer.h>
#include <functional>
#include <c10/core/DeviceGuard.h>
#include <c10/core/StreamGuard.h>
#include <c10/util/Exception.h>
#include <torch/csrc/autograd/engine.h>
#include <torch/csrc/autograd/function_hook.h>
#include <torch/csrc/autograd/functions/accumulate_grad.h>
#... |
//
// Created by liqinbin on 12/11/20.
//
#define THRUST_IGNORE_DEPRECATED_CPP_DIALECT
#include "thrust/reduce.h"
#include "thrust/execution_policy.h"
#include "FedTree/util/device_lambda.h"
#include "FedTree/metric/pointwise_metric.h"
float_type RMSE::get_score(const SyncArray<float_type> &y_p) const {
CHECK_EQ... |
/** \copyright
* Copyright (c) 2014, Balazs Racz
* 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 li... |
//===-- checksum.cc ---------------------------------------------*- C++ -*-===//
//
// 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 <string>
#include <chrono>
#include <ostream>
namespace cpb {
/**
High resolution timer (below 1 microsecond accuracy).
*/
class Chrono {
public:
Chrono() { tic(); };
void tic() {
tic_time = std::chrono::high_resolution_clock::now();
}
Chrono& toc() {
elapsed ... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkWin32OpenGLRenderWindow.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is d... |
/*
<samplecode>
<abstract>
Utility class to manage DSP parameters which can change value smoothly (be ramped) while rendering, without introducing clicks or other distortion into the signal.
</abstract>
</samplecode>
*/
#ifndef ParameterRamper_h
#define ParameterRamper_h
// N.B. This is C++.
#import <AudioTool... |
//-----------------------------------------------------------------------------
// Copyright (c) 2013 GarageGames, 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 restr... |
/*++
Copyright (c) 1998 Microsoft Corporation
Module Name:
database.cpp
Abstract:
SIS Groveler Jet-Blue database front-end
Authors:
Cedric Krumbein, 1998
Environment:
User Mode
Revision History:
--*/
#include "all.hxx"
/******************************************... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
dataBase = QSqlDatabase::addDatabase("QSQLITE");
dataBase.setHostName("127.0.0.1");
dataBase.setUserName("root");
dataBase.setDatab... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE762_Mismatched_Memory_Management_Routines__delete_array_struct_malloc_64b.cpp
Label Definition File: CWE762_Mismatched_Memory_Management_Routines__delete_array.label.xml
Template File: sources-sinks-64b.tmpl.cpp
*/
/*
* @description
* CWE: 762 Mismatched Memory ... |
/* Copyright (c) 2012-2013, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "orconfig.h"
#include "crypto.h"
#define ONION_NTOR_PRIVATE
#include "onion_ntor.h"
#include "torlog.h"
#include "util.h"
/** Free storage held in an ntor handshake state. */
void
ntor_handshake_state_free(ntor_... |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied w... |
class Solution {
public:
bool wordPattern(string pattern, string str) {
vector<string> sequence;
bool inWord = false;
string currentWord;
for(int i = 0; i < str.length(); ++i) {
if (!inWord) {
if (str[i] != ' ') {
inWord = true;
currentWord.push_back(str[i]);
... |
/*
Plutonium library
@file render_SDL2.hpp
@brief Wrapper code to simplify SDL2 usage
@author XorTroll
@copyright Plutonium project - an easy-to-use UI framework for Nintendo Switch homebrew
*/
#pragma once
#include <string>
#include <pu/cross.h>
#include <pu/pu_String.hpp>
#i... |
//
// Copyright Jason Rice 2016
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <mpdef/list.hpp>
#include <mpdef/tree_node.hpp>
#include <boost/hana.hpp>
namespace hana = boost::hana;
int main()
{... |
// -----------------------------------------------------------------------------------------------------
// 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... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2018, Mohamad Ayman.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following cond... |
//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
#include "td/telegram/PollId.h"
#include "td/t... |
/*=============================================================================
Copyright (c) 2001-2010 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
====================================... |
// Copyright 2019-2021 Lawrence Livermore National Security, LLC and other YGM
// Project Developers. See the top-level COPYRIGHT file for details.
//
// SPDX-License-Identifier: MIT
#pragma once
#include <vector>
#include <memory>
#include <deque>
#include <thread>
#include <atomic>
#include <mutex>
#include <ygm/d... |
#include <algorithm>
#include <unordered_map>
#include <utility>
#include <vector>
class Solution1
{
public:
bool canReorderDoubled(std::vector<int> &arr)
{
std::unordered_map<int, int> numCount;
for (const int x : arr)
numCount[x]++;
std::vector<int> keys;
for (std:... |
/*
Copyright 2020 Aeva Palecek
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, softwar... |
/* Copyright (C) 2006 - 2013 ScriptDev2 <http://www.scriptdev2.com/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.... |
#ifndef __PPU_H__
#define __PPU_H__
#pragma once
#include "BgFifo.hpp"
#include "BgMapAttributes.hpp"
#include "Color.hpp"
#include "Enums.hpp"
#include "OAMSprite.hpp"
#include "SpriteFifo.hpp"
#include "Tile.hpp"
#include <cstdio>
#define PPU_NUM_SPRITES 40
#define PPU_MAX_SPRITES_ON_LINE 10
#define PPU_OAM_SEARCH_... |
//===- DemoteRegToStack.cpp - Move a virtual register to the stack --------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
//===--- SemaStmt.cpp - Semantic Analysis for Statements ------------------===//
//
// 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 <iostream>
using std::cout;
using std::endl;
class Sample
{
int i;
public:
Sample();
Sample(int val);
void Display();
~Sample();
};
Sample::Sample()
{
cout << "Constructor1" << endl;
i=0;
}
Sample::Sample(int val)
{
cout << "Constructor2" << endl;
i=val;
}
void Sample::Display()
{
cout <... |
#pragma once
#include <cstdlib>
#include <iterator>
#include <tuple>
#include "L1_Peripheral/i2c.hpp"
#include "L3_Application/commandline.hpp"
#include "third_party/etl/vector.h"
#include "utility/log.hpp"
namespace sjsu
{
/// The I2cCommand [will] allows the user to discover, read, and write to
/// devices on the ... |
/**********
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 3 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
This librar... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2016-2018 The KONG Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txmempool.h"
#include "clie... |
/**
* Tencent is pleased to support the open source community by making Tars available.
*
* Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a c... |
#include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
template <typename T1, typename T2>
ostream &operator <<(ostream &os, pair<T1, T2> p){os << p.first << " " << p.second; return os;}
template <typename T>
ostream &op... |
#include <iostream>
#include "parser.h"
using namespace std;
#define MAX_LINE 50000
int parse_tick(string market, string line, struct Tick* p)
{
size_t num = 0;
unsigned pre = 0;
int ret = -1;
struct Tick tick;
sprintf_s(tick.ExchangeID, "%s", market.c_str());
while ((ret = line.find(',', ... |
//
// Created by yidafu on 2017/10/15.
//
#include <iostream>
#include "language.h"
#include "Stack.h"
#include "Queue.h"
#include "Deque.h"
void print (ElemType e){
std::cout << e << "|---|";
}
void stack_test(){
Stack *s = new Stack;
char ch = 'e';
// 入栈测试
s->push(ch);
ch ++;
s->push(ch... |
//////////////////////////////////////////////////////////////////////////////
//
// Detours Test Program (tracebld.cpp of tracebld.exe)
//
// Microsoft Research Detours Package
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <s... |
#include "coreir.h"
#include "coreirsim.h"
using namespace CoreIR;
using namespace std;
void tribuf_test() {
Context* c = newContext();
Namespace* g = c->getGlobal();
uint width = 1;
Type* tp = c->Record({{"io", c->BitInOut()},
{"en", c->BitIn()},
{"from_io", c->Bit()},
{"to_... |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cctype>
using namespace std;
typedef long long lint;
#define cout cerr
#define ni (next_num<int>())
template<class T>inline T next_num(){
T i=0;char c;
while(!isdigit(c=getchar())&&c!='-');
bool neg=c=='-';
neg?c=getchar():0;
whi... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <cstddef>
#include "DataStructures/Tensor/TypeAliases.hpp"
#include "Utilities/Gsl.hpp"
namespace Ccz4 {
/// @{
/*!
* \brief Computes the gradient of the spatial part of the Z4 constraint
*
* \details Computes the gradien... |
// Copyright (c) 2020 by Robert Bosch GmbH. 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 <iostream>
#include <cstdlib>
template <typename ... Ts>
auto echo(Ts ... ts) {
(std::cout << ... << ts);
}
int main(int argc, char* argv[]) {
echo("Hello", ",", " ", "World", "!", "\n");
return EXIT_SUCCESS;
}
|
// Copyright (c) 2012-2013 The Bitcoin Core 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 <string>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp... |
#include <cstdint>
template <class T>
auto BinPow(T base, int64_t exponent) -> T {
if (exponent == 1) return base;
if (exponent & 1) return base * BinPow(base * base, exponent >> 1);
return BinPow(base * base, exponent >> 1);
}
|
/** @file Decoration.cxx
** Visual elements added over text.
**/
// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <cstdarg>
#... |
#include "table_header_item.h"
TableHeaderItem::TableHeaderItem(const string& id, const string& text, const string& classes)
: Component(id, ".table-header-item " + classes)
{
this->text = text;
setup();
}
void TableHeaderItem::setup()
{
style("../styles/std_components/table/style.css");
set... |
// Copyright 2022, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Author: Robin Textor-Falconi (textorr@informatik.uni-freiburg.de)
#include <gtest/gtest.h>
#include "../src/util/HttpServer/ContentEncodingHelper.h"
using namespace ad_utility::content_encoding;
namespace http = boost:... |
// Copyright 2017 The Fuchsia 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 "garnet/bin/mdns/service/prober.h"
#include <zircon/syscalls.h>
#include "src/lib/fxl/logging.h"
#include "src/lib/fxl/time/time_delta.h"
#inclu... |
#include "compat.h"
#include "txdb-leveldb.h"
#include "blockparams.h"
#include "spork.h"
#include "instantx.h"
#include "cblock.h"
#include "mining.h"
#include "ctransactionlock.h"
#include "main_extern.h"
#include "ctxmempool.h"
#include "main.h"
#include "ctxout.h"
#include "ctxin.h"
#include "thread.... |
#ifndef PX_CG_ITEM_BALL_HPP
#define PX_CG_ITEM_BALL_HPP
#include "item.hpp"
namespace px { namespace item
{
class Ball;
} }
class px::item::Ball : public Item
{
private:
static ItemInfo ITEM_INFO;
public:
static Shader *shader;
static void initShader();
static void destroyShader();
public:
stru... |
/*
* Copyright (c) 2012, Klaus Pototzky
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1) Redistributions of source code must retain the above copyright
* notic... |
/****************************************************************************************************************************************************
* Copyright (c) 2016 Freescale Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are ... |
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. 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. Redist... |
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016
Vladimír Vondruš <mosra@centrum.cz>
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 S... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__char_connect_socket_execl_73b.cpp
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-73b.tmpl.cpp
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: connect_socket Read data us... |
/*
* This file is part of bogus, a C++ sparse block matrix library.
*
* Copyright 2013 Gilles Daviet <gdaviet@gmail.com>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/M... |
/*
* Copyright (c) 2015 PLUMgrid, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... |
/*
* Copyright (C) 2018 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... |
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017 The PIVX Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "uritests.h"
#include "guiutil.h"
#include "walletmodel.h"
#include <QUrl>
... |
/*
Copyright (c) 2010-2016, Arvid Norberg
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 conditions and ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.