text stringlengths 7 961k |
|---|
/**
* @file AKAZE_.cpp
* @brief mex interface for cv::AKAZE
* @ingroup features2d
* @author Amro
* @date 2015
*/
#include "mexopencv.hpp"
#include "mexopencv_features2d.hpp"
#include <typeinfo>
using namespace std;
using namespace cv;
// Persistent objects
namespace {
/// Last object id to allocate
int last_id =... |
#include "hzpch.h"
#include "OpenGLRendererAPI.h"
#include <glad/glad.h>
namespace Hazel
{
void OpenGLMessageCallback(
unsigned source,
unsigned type,
unsigned id,
unsigned severity,
int length,
const char *message,
const void *userParam)
{
switch (severity)
{
case GL_DEBUG_SEVERITY_HIGH:
HZ... |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
#include "stdafx.h"
#include "Snap.h"
#include "rolx.h"
void PrintFeatures(const TIntFtrH& Features) {
for (TIntFtrH::TIter HI = Features.BegI(); HI < Features.EndI(); HI++) {
printf("%d: [", HI.GetKey()());
const TFtr& Feature = HI.GetDat();
for (int i = 0; i < Feature.Len(); ++i) {
if (i > 0) {
... |
/**
* Copyright (c) 2006-2016 LOVE Development Team
*
* 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 granted to anyone to use this software for any purpose,
* ... |
//
// ip/basic_resolver_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2019 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... |
// Generated from /POI/java/org/apache/poi/hssf/record/OldLabelRecord.java
#include <org/apache/poi/hssf/record/OldLabelRecord.hpp>
#include <java/lang/Class.hpp>
#include <java/lang/NullPointerException.hpp>
#include <java/lang/Object.hpp>
#include <java/lang/String.hpp>
#include <java/lang/StringBuilder.hpp>
#includ... |
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2009
*
* Last modified:
* $Date: 2015-08-18 17:57:34 +1000 (Tue, 18 Aug 2015) $ by $Author: schulte $
* $Revision: 14653 $
*
* ... |
//------------------------------------------------------------------------------
// Copyright (c) 2016 John D. Haughton
//
// 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 restricti... |
#ifndef CXXNET_LAYER_DROPOUT_LAYER_INL_HPP_
#define CXXNET_LAYER_DROPOUT_LAYER_INL_HPP_
#include <mshadow/tensor.h>
#include "./layer.h"
#include "./op.h"
namespace cxxnet {
namespace layer {
template<typename xpu>
class DropoutLayer : public ILayer<xpu> {
public:
DropoutLayer(mshadow::Random<xpu> *p_rnd) : prnd_... |
/*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2020 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the ... |
// File: Context.cpp
// Author: Bob Rubbens - Knights of the Compiler
// Creation date: 20150719
// Contact: http://plusminos.nl - @broervanlisa - gmail (bobrubbens)
// Public
#include <string>
#include "nnb/utils/Context.hpp"
// Private
#include "nnb/log/log.hpp"
#include "nnb/utils/Directory.hpp"
#include "nnb/util... |
#include "joint.hh"
Joint::Joint(unsigned int TypeIn, arma::vec piIn, arma::vec pjIn, arma::vec qiIn,
arma::vec qjIn, Body *i_In, Body *j_In) : VECTOR_INIT(pi, 3),
VECTOR_INIT(pj, 3),
VECTOR_INIT(... |
#include<iostream>
using namespace std;
int main(){
cout<<"Hello, World!!";
return 0;
} |
// Copyright (c) 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
//
// Datum - caster list
//
//
// Copyright (c) 2016 Peter Niekamp
//
#include "casterlist.h"
#include <leap/lml/matrix.h>
#include <leap/lml/matrixconstants.h>
#include "debug.h"
using namespace std;
using namespace lml;
using namespace Vulkan;
enum ShaderLocation
{
sceneset = 0,
materialset = 1,
modelset =... |
#include<iostream>
using namespace std;
int rotate(int arr[],int d,int n);
int main()
{ //Rotation of array that rotates arr[] of size n by d elements
int n,d;
cin>>n;
int arr[n];
int i;
for(i=0;i<n;i++)
cin>>arr[i];
cin>>d;
rotate(arr,d,n);
cout<<"\nAfter Rotation : \n";
for(i=0;i<n;i++)
cout<<arr[i]... |
#include "../../include/entities/visuals/FragmentAnchor.h"
#include "../../include/input/input.h"
#include "../../include/math/transform.h"
FragmentAnchor::FragmentAnchor()
{
}
FragmentAnchor::FragmentAnchor(const FragmentAnchor& copy)
{
this->ID = copy.ID;
this->pos = copy.pos;
this->dir = copy.dir;
this->dirInt... |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "apps/app_window.h"
#include "apps/app_window_registry.h"
#include "apps/launcher.h"
#include "base/bind.h"
#include "base/command_line.h"
#inclu... |
/****************************************************************************
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2011 Zynga Inc.
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any... |
/* Copyright 2019-2021 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
/* 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... |
#include "sonardatasourcefilereader.h"
#include "QtCore"
#include "Module_ScanningSonar/sonarswitchcommand.h"
class sotoSleep : public QThread
{
public:
static void sleep(unsigned long secs)
{
QThread::sleep(secs);
}
static... |
//=============================================================================
//
// MODULE: ASN1Unit.cxx
//
// Description:
//
// Implementation of ASN.1 "unit" parsing logic
//
// Modification History
//
// Mark Pustilnik Date: 06/08/02 - created
//
//===============================================... |
/*
* Copyright (c) 2003-2017, John Wiegley. 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 c... |
#ifndef GEM_TENSOR_HPP_INCLUDED
#define GEM_TENSOR_HPP_INCLUDED
#include <gem/tensor_base.hpp>
namespace gem {
template <typename dtype, long long n_con, long long n_cov, class... dims>
class Tensor :
public TensorBase<dtype, n_con, n_cov, dims...>
// public MemoryManager<dtype, n_con, n_cov, dims...>
{
pub... |
/**
*
* Shell File Operations
*
* @author Takuto Yanagida
* @version 2020-03-23
*
*/
#pragma once
#include <string>
#include <shlobj.h>
#include "path.hpp"
#include "file_system.hpp"
#include "shell.hpp"
class Operation {
class ShellItem {
IShellItem* si_ = nullptr;
public:
ShellItem(const std::ws... |
#include<cstdio>
int main(){
int a;
scanf("%d",&a);
int n=a*a;
int tmp;
for(int clm=a;clm>=1;clm--){
for(int cout=(clm-1)*a+1;cout<=clm*a;cout++){
printf("%d",cout);
if(cout!=clm*a) printf(" ");
}
printf("\n");
}
} |
// 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: MenuRpcManager
#include "GlobalName... |
/*
* Copyright (c) 2008-2018 SLIBIO <https://github.com/SLIBIO>
*
* 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
* ... |
/*
* Copyright (c) 2004-2005 The Regents of The University of Michigan
* 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
* not... |
// Copyright 2020 The Hds Team
//
// 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 ... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The WIRE developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#incl... |
/****************************************************************************/
/* */
/* HIEMALIA SOURCE CODE (C) 2021 SAMPO HIPPELAINEN (HISAHI). */
/* SEE THE LICENSE FILE IN THE SOURCE ROOT DIRECTORY FOR LICENSE INFO. */
/* ... |
#include "hlt/hlt.hpp"
int main() {
hlt::PlayerId my_tag;
auto setup = hlt::initialize("Settler of C++");
my_tag = setup.first;
auto moves = std::vector<hlt::Move>();
while (true) {
auto game_map = hlt::get_map();
moves.clear();
for (const auto& ship_pair : game_map.ships... |
// Warning! This file is autogenerated.
#include <boost/text/collation_table.hpp>
#include <boost/text/collate.hpp>
#include <boost/text/data/all.hpp>
#ifndef LIMIT_TESTING_FOR_CI
#include <boost/text/save_load_table.hpp>
#include <boost/filesystem.hpp>
#endif
#include <gtest/gtest.h>
using namespace boost::text;
... |
/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/os_interface/linux/drm_neo.h"
#include "test.h"
#include <array>
using namespace NEO;
TEST(GlkDeviceIdTest, supportedDeviceId) {
std::array<DeviceDescriptor, 1> expectedDescriptors = {{
{IGLK_GT2_... |
/****************************************************************************************************************************************************
* Copyright 2020 NXP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the fo... |
//===--- amdgpu/src/rtl.cpp --------------------------------------- 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
//
//===---------------------------... |
// ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_Rhino_AIController_BP_parameters.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Functions
//------------------------------------------------------------... |
// Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2019 The masternodescheguevara Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defin... |
// Warning! This file is autogenerated.
#include <boost/text/normalize_string.hpp>
#include <boost/text/utility.hpp>
#include <boost/text/string_utility.hpp>
#include <gtest/gtest.h>
#include <algorithm>
TEST(normalization, nfc_059_000)
{
// D0A8;D0A8;110F 1175 11AB;D0A8;110F 1175 11AB;
// (킨; 킨; 킨; 킨; ... |
//
// Utility class to print PrimaryParticle
//
#ifndef Print_inc_PrimaryParticlePrinter_hh
#define Print_inc_PrimaryParticlePrinter_hh
#include <cstring>
#include <iostream>
#include "Offline/Print/inc/ProductPrinter.hh"
#include "Offline/MCDataProducts/inc/PrimaryParticle.hh"
#include "Offline/Print/inc/GenPartic... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
///
/// 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... |
/*
* test_imgui.cpp
*
* Created on: Mar 04, 2021 15:02
* Description:
*
* Copyright (c) 2021 Ruixiang Du (rdu)
*/
#include <iostream>
#include "imview/viewer_base.hpp"
#include "imview/cairo_widget.hpp"
#include "imview/cairo_draw.hpp"
using namespace robosw::viewer;
const std::string img_file = "../image/fi... |
/// @brief kalman filter class definition
/// @file : kalman_filter.cpp
/// @author : s.aparajith@live.com
/// @date : 20/4/2021
/// @details : contains the class definition for extended kalman filter and kalman filter.
/// @copyright : none reserved. No liabilities. this source code is free to be distributed and copi... |
#include <glua/glua_api_types.h>
#include <glua/hsrcore_lua_api.h>
GluaModuleByteStream::GluaModuleByteStream()
{
is_bytes = false;
contract_level = CONTRACT_LEVEL_TEMP;
contract_state = CONTRACT_STATE_VALID;
}
GluaModuleByteStream::~GluaModuleByteStream()
{
contract_apis.clear();
offline_apis.clear();
contract... |
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <string>
#include <vector>
#include <memory>
#include <map>
#include <unordered_set>
#include <ie_metric_helpers.hpp>
#include <threading/ie_executor_manager.hpp>
#include <ie_algorithm.hpp>
#include <ngraph/opsets/opset1.... |
// ====================================================================
// This file is part of FlexibleSUSY.
//
// FlexibleSUSY 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 3 of the Licens... |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// devguid requires Windows.h be imported first.
#include "chrome/browser/extensions/api/image_writer_private/removable_storage_provider.h"
#include <win... |
#include <sstream>
#include <sys/time.h>
#include "marshal.hpp"
using namespace std;
namespace rrr {
#ifdef RPC_STATISTICS
// -1, 0~15, 16~31, 32~63, 64~127, 128~255, 256~511, 512~1023, 1024~2047, 2048~4095, 4096~8191, 8192~
static Counter g_marshal_in_stat[12];
static Counter g_marshal_in_stat_cumulative[12];
st... |
/*
* Copyright 2016 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
/*
* 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... |
//===-- RISCVRegisterInfo.cpp - RISCV Register Information ------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
//===-- ProcessTrace.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-licens... |
#ifndef ENCMATRIX_HPP
#define ENCMATRIX_HPP
//#include "fhe/EncryptedArray.h"
//#include "fhe/Ctxt.h"
//#include "fhe/FHE.h"
#include <vector>
#include "EncVector.hpp"
#include "Matrix.hpp"
namespace MDL {
class EncMatrix : public std::vector<EncVector> {
public:
EncMatrix(const FHEPubKey& pk)
: std::vector... |
/*
Dwarf Therapist
Copyright (c) 2009 Trey Stout (chmod)
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, p... |
/** @file replicatetcpclient.cc
* @brief TCP/IP replication client class.
*/
/* Copyright (C) 2008,2010,2011,2015 Olly Betts
*
* 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 versi... |
/* Fishing Detector
*
* From: https://github.com/PokemonAutomation/Arduino-Source
*
*/
#include "Common/Compiler.h"
#include "CommonFramework/Tools/VideoOverlaySet.h"
#include "CommonFramework/ImageTools/SolidColorTest.h"
#include "CommonFramework/Inference/ImageTools.h"
#include "CommonFramework/Inference/Infer... |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
#include <cmath>
#include "nr.h"
using namespace std;
namespace {
inline DP alen(const DP a, const DP b, const DP c, const DP d)
{
return sqrt((b-a)*(b-a)+(d-c)*(d-c));
}
}
DP NR::revcst(Vec_I_DP &x, Vec_I_DP &y, Vec_I_INT &iorder, Vec_IO_INT &n)
{
int j,ii;
DP de;
Vec_DP xx(4),yy(4);
int ncity=x.size();
n... |
// Copyright (c) 2011-2014 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 "openuridialog.h"
#include "ui_openuridialog.h"
#include "guiutil.h"
#include "walletmodel.h"
#include <QUrl>
Ope... |
#include "move.h"
Move::Move() { }
Move::Move(Point _oldMousePos, Point _newMousePos) {
oldMousePos = _oldMousePos;
newMousePos = _newMousePos;
delta = _newMousePos - _oldMousePos;
} |
/*******************************************************************************
* Copyright 2019 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.o... |
/*
* Copyright (c) 2020, Stephan Unverwerth <s.unverwerth@gmx.de>
* 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) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017-2020 The PIVX developers
// Copyright (c) 2021 The Human_Charity_Coin_Protocol Core Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.... |
// Copyright 2010-2021 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
#include "Camera.hpp"
Camera::Camera(const sf::Window &window) : direction(0.0), right(0.0) {
position = glm::vec3(2, 0, 3);//starting position
viewMatrix = glm::lookAt(position, position + direction, glm::cross(right, direction));
aspect = (float)window.getSize().x / (float)window.getSize().y;
perspe... |
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/arc/compat_mode/touch_mode_mouse_rewriter.h"
#include "base/bind.h"
#include "base/macros.h"
#include "base/threading/sequenced_task... |
#pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
namespace RED4ext
{
namespace AI::behavior {
struct Instance
{
static constexpr const char* NAME = "AIbehaviorInstance";
static constexpr const char* ALIAS = NAME;
uint8_t unk00[0xE8 ... |
/* mpi-gcd.c - MPI functions
* Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
*
* This file is part of Libgcrypt.
*
* Libgcrypt 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 Foundati... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kendra/model/DescribeExperienceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aw... |
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Rafael Rivera, Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//----------------------------------... |
/**
* @file paramgen.cpp
*
* @brief Parameter generation utility for Zerocoin.
*
* @author Ian Miers, Christina Garman and Matthew Green
* @date June 2013
*
* @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green
* @license This project is released under the MIT licen... |
/*
* fam_descriptor.cpp
* Copyright (c) 2019 Hewlett Packard Enterprise Development, LP. 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 ... |
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fno-recovery-ast -verify %s
namespace std {
template <typename>
class initializer_list{};
int a;
auto c = a, &d = {a}; // expected-error {{'auto' deduced as 'int'}} \
expected-error {{non-const lvalue reference to type}}
} // namespace std |
/**
* message.cpp - Source file of decentralized
* network TGN.
*
* @mrrva - 2019
*/
#include "include/message.hpp"
/**
* Needed namespaces.
*/
using namespace std;
/**
* tgnmsg::tgnmsg - Constructor of tgnmsg class.
*
* @bytes - Byte array.
*/
tgnmsg::tgnmsg(unsigned char *bytes)
{
this->bytes[0] = 0x00;
if (bytes ... |
/*
Meddly: Multi-terminal and Edge-valued Decision Diagram LibrarY.
Copyright (C) 2009, Iowa State University Research Foundation, Inc.
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... |
// Copyright (c) 2012-2014 The Bitcoin developers
// Copyright (c) 2015-2020 The PIVX developers
// Copyright (c) 2020 The AZUS developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "coins.h"
#include "consensus/c... |
/*
Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
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
... |
#include <stdio.h>
#include <stdlib.h>
int fib(int x) {
if (x == 0)
return 0;
else if (x == 1)
return 1;
return fib(x - 1) + fib(x - 2);
}
int main(int argc, char* argv[]) {
for (size_t i = 0; i < 45; ++i) {
printf("%d\n", fib(i));
}
return 0;
} |
#pragma once
#include <cstring>
#include <string>
#include <sstream>
#include <iostream>
#include <vector>
/**
opticks/sysrap/S_get_option.hh
================================
Really minimal command line option parsing in this simple header::
#include "S_get_option.hh"
int main(int argc, char **argv)
{
... |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... |
/*
Copyright (c) 2018-2019 Xavier Leclercq
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, me... |
// Copyright (c) 2018-2019 The BitPal Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <util/string.h>
#include <util/threadnames.h>
#include <test/util/setup_common.h>
#include <thread>
#include <vector... |
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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.or... |
/***************************************************************************
* Copyright (C) by GFZ Potsdam *
* *
* You can redistribute and/or modify this program under the *
* terms o... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: ... |
/**
Procedure:
1. Call init()
2. Call calc(n) to find NOD of n
**/
ll mulMod(ll a, ll b, ll m){
int largestBit = 0;
while((b >> largestBit) != 0){
largestBit++;
}
ll result = 0;
for(int currentBit = largestBit - 1; currentBit >= 0; currentBit--){
result = (result + result); // result *= 2;
if(result... |
/*
* SPDX-License-Identifier: Apache-2.0
*/
//===------------ Reshape.cpp - Shape Inference for Reshape Op ------------===//
//
// This file implements shape inference for the ONNX Reshape Operator.
//
//===----------------------------------------------------------------------===//
#include "src/Dialect/ONNX/ShapeI... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
///////////////////////////////////////////////////////////////////////////////
//
// pstrans.hpp
//
// Direct3D P... |
//-----------------------------------------------------------------------------
// 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 restrictio... |
#include<stdio.h>
#include<stdlib.h>
int main(){
int a[10][10],b[10][10],mul[10][10],r,c,i,j,k;
system("cls");
printf("enter the number of row=");
scanf("%d",&r);
printf("enter the number of column=");
scanf("%d",&c);
printf("enter the first matrix element=\n");
for(i=0;i<r;i++)
{ ... |
// ==============================================================
// RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2018.3
// Copyright (C) 1986-2018 Xilinx, Inc. All Rights Reserved.
//
// ===========================================================
#include "AXIvideo2Mat.h... |
//===================================================================================================================
//
// ProcessUnlockAndSchedule.cc -- Exit a postponed schedule block and take care of any pending schedule changes
//
// Copyright (c) 2017-2020 -- Adam Clark
// Licensed under "THE BEER-... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcredit developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "eccryptoverify.h"
namespace
{
int CompareBigEndian(const unsigned char* c... |
/* libs/graphics/sgl/SkProcSpriteBlitter.cpp
**
** Copyright 2006, 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/licen... |
#include "test.h"
#include "../intgemm/aligned.h"
#include "../intgemm/callbacks.h"
#include "../intgemm/interleave.h"
#include "../intgemm/intgemm.h"
#include "../intgemm/multiply.h"
#include "../intgemm/stats.h"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <c... |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
vector<int> a(n);
for (int i=0; i<n; ++i){
cin >> a[i];
}
sort(a.begin(), a.end());
vector<int> b(n);
for (int i=0; i<n/2; ++i){
b[2*i] = a[n-1-i];
b[2*i+1] = a[i];
}
if (n%2!=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.