text stringlengths 5 1.04M |
|---|
// Copyright (c) 2018-2020 The Zortcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <interfaces/node.h>
#include <addrdb.h>
#include <banman.h>
#include <chain.h>
#include <chainparams.h>
#include <... |
/*
**
** Copyright 2009, 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... |
//*****************************************************************************
// Copyright 2017-2020 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://w... |
// ***********************************************************************
// Author : the_hunter
// Created : 04-01-2020
//
// Last Modified By : the_hunter
// Last Modified On : 04-01-2020
// ***********************************************************************
#include <toml/pch.h>
/// <summar... |
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* obje... |
#include <Databases/DatabaseDictionary.h>
#include <Interpreters/Context.h>
#include <Interpreters/ExternalDictionariesLoader.h>
#include <Dictionaries/DictionaryStructure.h>
#include <Storages/StorageDictionary.h>
#include <common/logger_useful.h>
#include <IO/WriteBufferFromString.h>
#include <IO/Operators.h>
#includ... |
#include "MemoryInputStream.h"
#include <algorithm>
#include <cassert>
#include <cstring> // memcpy
namespace Common {
MemoryInputStream::MemoryInputStream(const void* buffer, size_t bufferSize) :
buffer(static_cast<const char*>(buffer)), bufferSize(bufferSize), position(0) {}
//-------------------------------------... |
//
// EntityItemProperties.cpp
// libraries/entities/src
//
// Created by Brad Hefta-Gaub on 12/4/13.
// Copyright 2013 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICE... |
#include "botpch.h"
#include "../../playerbot.h"
#include "TradeStatusAction.h"
#include "../ItemVisitors.h"
#include "../../PlayerbotAIConfig.h"
#include "../../../ahbot/AhBot.h"
#include "../../RandomPlayerbotMgr.h"
#include "../../GuildTaskMgr.h"
#include "../values/ItemUsageValue.h"
using namespace ai;
bool Tr... |
/*
* Copyright (c) 2017, The Linux Foundation. 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... |
//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-keyword:[C++]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Simple Notification Service]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[tapasweni-pathak]
/*
Copyright 2010-2018... |
/*
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
// Copyright (c) 2014-2019, The Monero Project
//
// 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 notice, this list o... |
/**
* @file iteratePairwiseLJFunctorGlobals.cpp
*
* Contains a explicit template instantiation for the iteratePairwise() method with the LJFunctor w. globals of the main
* AutoPas class and the particle type used by md-flexible. This is linked into the md-flexible executable to enable the
* other compilation units... |
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
... |
/*
* Copyright (c) 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
* notice, ... |
#pragma once
#include <QMainWindow>
#include <QMediaPlayer>
#include <QStandardItem>
#include <QFileDialog>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QStandardItem>
#include <QListWidget>
#include <QTableView>
#include <QVariant>
#include <QTime>
#include <QSvgWidget>
#include <QMediaMetaData>
#inclu... |
#include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *pivx_strings[] = {
QT_TRANSLATE_NOOP("pivx-core", ""
"Cannot find the Sapling parameters in the following directory:\n"
"%s\n"
"Please run ... |
#include "Game.h"
#include <gemcutter/Application/Application.h>
#include <gemcutter/Entity/Hierarchy.h>
#include <gemcutter/Input/Input.h>
#include <gemcutter/Math/Math.h>
#include <gemcutter/Rendering/Camera.h>
#include <gemcutter/Rendering/Mesh.h>
#include <gemcutter/Rendering/Rendering.h>
#include <gemcutter/Resou... |
//===-- Constants.cpp - Implement Constant nodes --------------------------===//
//
// 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
//
//===---------------------------... |
/*ckwg +5
* Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#include "vpFseTrackIO.h"
#include "vpFrameMap.h"
#include <vtkVgScalars.h>
#include <vtkVg... |
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkVolumeProperty.cxx,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
... |
#include "register_types.h"
#include "core/class_db.h"
#include "spine_runtime.h"
#include "SpineAtlasResource.h"
#include "ResourceFormatLoaderSpineAtlas.h"
#include "ResourceFormatSaverSpineAtlas.h"
#include "SpineSkeletonDataResource.h"
#include "ResourceFormatLoaderSpineSkeletonJsonData.h"
#include "ResourceForm... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/chime/model/AppInstanceUserMembershipSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namesp... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright 2016-2017 Davide Faconti
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
... |
Array Sum
Given an array of length N, you need to find and print the sum of all elements of the array.
Input Format :
Line 1 : An Integer N i.e. size of array
Line 2 : N integers which are elements of the array, separated by spaces
Output Format :
Sum
Constraints :
1 <= N <= 10^6
Sample Input :
3
9 8 9
Samp... |
//////////////////////////////////////////////////////////////////////////////
/// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand
/// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI
///
/// Distributed under the Boost Software License, Version 1.0
/// ... |
#include "tpcds_table_generator.hpp"
extern "C" {
#include <tpcds-kit/tools/dbgen_version.h>
#include <tpcds-kit/tools/decimal.h>
#include <tpcds-kit/tools/genrand.h>
#include <tpcds-kit/tools/nulls.h>
#include <tpcds-kit/tools/parallel.h>
#include <tpcds-kit/tools/r_params.h>
#include <tpcds-kit/tools/tables.h>
#incl... |
#include <iostream>
#include <list>
using namespace std;
int main() {
list<int> l,u;
for(int i=0;i<5;i++) l.push_back(i*i);
for(int i=0;i<5;i++) l.push_front(i); //podemos inserir no inicio de uma lista
cout << l.size() << endl; //listas da STL, em geral, usam tempo O(n) para size()!
//elas nao "ar... |
//
//---------------------------------------------------------------------------
//
// Copyright(C) 2000-2016 Christoph Oelckers
// All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free ... |
//
// Copyright (C) 2015 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... |
/**
* @brief The class that can be used store the list of students
*
* @author Jeyavishnu S/O Subramaniam
* Group 02
* Student id: S10192836C
*
* The highlight would be the sort() function
*
*/
#include "List.h" // header file
List::List()
{
size = 0; //Set the size to 0
front = new Node; //Cre... |
#include <iostream>
using namespace std;
int main() {
int h, z, l;
string nome;
cin >> h >> z >> l;
if(h > z) {
if(h < l)
nome ="huguinho";
else if(l > z)
nome = "luisinho";
else
nome = "zezinho";
}else if(z < l){
nome ="z... |
// Copyright © 2016-2021 Thomas Nagler and Thibault Vatter
//
// This file is part of the vinecopulib library and licensed under the terms of
// the MIT license. For a copy, see the LICENSE file in the root directory of
// vinecopulib or https://vinecopulib.github.io/vinecopulib/.
#pragma once
#include <vinecopulib/b... |
#ifndef SM_LOGGING_HPP
#define SM_LOGGING_HPP
#include <sm/logging/console.hpp>
namespace sm {
namespace logging {
class Logger;
sm::logging::levels::Level getLevel();
void setLevel(sm::logging::levels::Level level);
void setLogger(boost::shared_ptr<Logger> logger);
boost::shared_ptr<Logger> getLogger();
bool isNam... |
//===- NeonEmitter.cpp - Generate arm_neon.h for use with clang -*- 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
//
//===---------------------------... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <cstddef>
#include <memory>
#include "Options/Options.hpp"
/// \cond
template <size_t Dim>
class DomainCreator;
/// \endcond
namespace domain {
namespace OptionTags {
/// \ingroup OptionTagsGroup
/// \ingroup ComputationalD... |
///////////////////////////////////////
// AUTO GENERATED FILE - DO NOT EDIT //
///////////////////////////////////////
/* SPDX-License-Identifier: BSD-2-Clause-Patent
*
* Copyright (c) 2016-2019 Intel Corporation
*
* This code is subject to the terms of the BSD+Patent license.
* See LICENSE file for more details... |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> x(n), y(n);
rep(i, n) cin >> x[i] >> y[i];
ll ans = 0;
rep(i, n) for (int j = i + 1; j < n; j++) {
int dx = x[i] - x[j]... |
/*
* GridTools
*
* Copyright (c) 2014-2019, ETH Zurich
* All rights reserved.
*
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include <type_traits>
#include "../common/array.hpp"
#include "../common/defs.hpp"
#include "../common/dimension.h... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/MPL/2.0/. */
#include "nsPrintProgress.h"
#inc... |
/* Copyright 2012 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* ... |
// Copyright (c) 2020-2020 shadowxiali <276404541@qq.com>
//
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "testeureka/eureka_connect.h"
#include "s11n_types.h"
#i... |
#include "loginwindow.h"
#include "ui_loginwindow.h"
#include "NoweGlobal.h"
#include "registwindow.h"
#include <QRegExpValidator>
#include <QMessageBox>
#include <QXmppVCardManager.h>
#include <QCloseEvent>
LoginWindow::LoginWindow(QWidget *parent) :
NoweBaseWindow(parent),
ui(new Ui::LoginWindow),
client... |
#include <ap_int.h>
#include <cstdio>
#include <iostream>
using namespace std;
int main(int, char **) {
const ap_int<8> A = 79; // 0x4F = 79
const ap_int<4> msb_A_4bits = A(7, 4); // 0x4 = 4
const ap_int<4> lsb_A_4bits = A(3, 0); // 0xF = -1
const ap_int<8> msb_A_8bits = A(7, 4); //... |
#include "Stream.h"
#include "Converter.h"
#include "EpicsClient/EpicsClientMonitor.h"
#include "EpicsPVUpdate.h"
#include "KafkaOutput.h"
#include "helper.h"
#include "logger.h"
namespace Forwarder {
ConversionPath::ConversionPath(ConversionPath &&x)
: converter(std::move(x.converter)),
kafka_output(std::m... |
#include "ros/ros.h"
#include "geometry_msgs/Twist.h"
#include "geometry_msgs/Pose.h"
#include "nav_msgs/Odometry.h"
#include "nav_msgs/Path.h"
#include "geometry_msgs/Quaternion.h"
#include "geometry_msgs/Point32.h"
#include "tf/transform_datatypes.h"
#include "geometry_msgs/PoseStamped.h"
#include "sensor_msgs/Range.... |
/* Copyright 2015 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... |
// bslmf_ismemberfunctionpointer.t.cpp -*-C++-*-
#include <bslmf_ismemberfunctionpointer.h>
#include <bsls_bsltestutil.h>
#include <bsls_platform.h>
#include <bsls_nullptr.h>
#include <stdio.h> // 'printf'
#include <stdlib.h> // 'atoi'
using namespace BloombergLP;
//===============... |
/*
* Copyright (c) 2019-2021, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, p... |
//=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2018 The hello developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or ht... |
/****************************************************************************
* MeshLab o o *
* A versatile mesh processing toolbox o o *
* _ O _ *
* Copyri... |
#include "mixer.h"
#include <Tempest/Application>
#include <Tempest/SoundEffect>
#include <Tempest/Sound>
#include <Tempest/Log>
#include <cmath>
#include <set>
#include "soundfont.h"
#include "wave.h"
using namespace Dx8;
using namespace Tempest;
static int64_t toSamples(uint64_t time) {
return int64_t(time*Soun... |
/*
* Copyright (c) 2020 Samsung Electronics Co., Ltd. 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
*
* Unle... |
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* 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.... |
// Copyright (C) 2004-2005 Anders Logg
//
// This file is part of DOLFIN.
//
// DOLFIN 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... |
// Copyright (c) YugaByte, 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 in writ... |
#ifndef BOOST_SERIALIZATION_HASH_MAP_HPP
#define BOOST_SERIALIZATION_HASH_MAP_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// serialization/hash_map.hpp:
// serialization for s... |
/******************************************************************************
Copyright (c) 2015, Stefan Wolfsheimer
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 ... |
// Copyright (c) 2015-2017 The Bitcoin Core developers
// Copyright (c) 2017 The Raven Core developers
// Copyright (c) 2018 The Rito Core developers
// Copyright (c) 2020 The Ukcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses... |
#ifndef DATE_TIME_TZ_DB_BASE_HPP__
#define DATE_TIME_TZ_DB_BASE_HPP__
/* Copyright (c) 2003-2005 CrystalClear Software, Inc.
* Subject to the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#inc... |
//--------------------------------------------------------------------------
// Copyright (C) 2018-2018 Cisco and/or its affiliates. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License Version 2 as published
// by the Fr... |
// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved
// (DO NOT EDIT: machine generated header) 'BrkrConst.pas' rev: 6.00
#ifndef BrkrConstHPP
#define BrkrConstHPP
#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Sys... |
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <frc/TimedRobot.h>
#include <frc/Timer.h>
#include <frc/XboxController.h>
#include <frc/controller/RamseteContr... |
#include "qpagestatistics.h"
#include <QPainter>
#define SC_GRAPH_VIEW_WIDTH 785
#define SC_GRAPH_VIEW_HEIGHT 300
#define SC_GRAPH_DRAW_WIDTH 600
#define SC_GRAPH_DRAW_HEIGHT 200
#define SC_GRAPH_PADDING_LEFT 100
#define SC_GRAPH_PADDING_TOP... |
//#define USE_STD_ATOMIC
#include "atomic_segregated_memory_pool.cpp"
|
/**************************************************************************************/
/* */
/* Visualization Library */
/* http://www.visualizationlibrary.org ... |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... |
/*
* Overlapper.cpp
*
* Created on: 30.10.2012
* Author: Christian Staudt (christian.staudt@kit.edu)
*/
#include "../../include/networkit/overlap/Overlapper.hpp"
namespace NetworKit {
} /* namespace NetworKit */
|
// 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... |
//
// LICENSE:
//
// Copyright (c) 2016 -- 2020 Fabio Pellacini
//
// 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 notice,
// this list of conditio... |
#include "TerrainMassDummyBrush.h"
#include "Landscape.h"
#include "LandscapeDataAccess.h"
#include "Curves/CurveFloat.h"
#include "Engine/Texture2D.h"
#include "TerrainMassLibrary.h"
#include "TerrainMassDummyShader.h"
ATerrainMassDummyBrush::ATerrainMassDummyBrush()
{
// At least one of these attributes has to... |
// files_test.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
#pragma warning(disable:4996)
void main_x(char *fie);
void main_o();
void print_file_byte_by_byte(char* filename)
{
FILE* pf;
pf = fopen(filename, "rb");
int i = fgetc(pf);
while (i != EOF)
{
printf("%c", i);
i = fgetc(pf);
}
fclose... |
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define gc getchar()
#define pc(x) putchar(x)
template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;}
template<typename T> void print... |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Copyright (c) 2016-20, Lawrence Livermore National Security, LLC
// and RAJA project contributors. See the RAJA/COPYRIGHT file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
#include <iostream>
#include <Eigen/Dense>
#include <vector>
using Eigen::MatrixXd;
using Eigen::Vector3d;
int main()
{
MatrixXd m(2,2);
m(0,0) = 3;
m(1,0) = 2.5;
m(0,1) = -1;
m(1,1) = m(1,0) + m(0,1);
std::cout << m << std::endl;
Vector3d v(0,0,0);
std::vector<Vector3d> vv;
for(int i=0;i<10;i++){
... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE415_Double_Free__new_delete_array_class_54a.cpp
Label Definition File: CWE415_Double_Free__new_delete_array.label.xml
Template File: sources-sinks-54a.tmpl.cpp
*/
/*
* @description
* CWE: 415 Double Free
* BadSource: Allocate data using new and Deallocae data... |
//=========================================================================
// Copyright (C) 2012 The Elastos 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
//
// ... |
#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::ifstream... |
#include "source/common/buffer/buffer_impl.h"
#include "source/common/http/message_impl.h"
#include "source/extensions/common/aws/signer_impl.h"
#include "source/extensions/common/aws/utility.h"
#include "test/extensions/common/aws/mocks.h"
#include "test/test_common/simulated_time_system.h"
#include "test/test_common... |
#include "StdAfx.h"
#include "InstallerLogUnitTests.h"
CPPUNIT_TEST_SUITE_REGISTRATION(DVLib::UnitTests::InstallerLogUnitTests);
using namespace DVLib::UnitTests;
|
#include <iostream>
#include <vector>
#include <string.h>
using namespace std;
class Solution
{
public:
bool line[9][9];
bool column[9][9];
bool block[3][3][9];
bool valid;
vector<pair<int,int>> spaces;
public:
void dfs(vector<vector<char>>& board, int pos){
if(pos == spaces.size(... |
/**
* \copyright
* Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include <gtest/gtest.h>
#include "BaseLib/Logging... |
#include <chrono>
#include <fstream>
#include <iostream>
#include <math.h>
#include <thread>
#include <uWS/uWS.h>
#include <vector>
#include "json.hpp"
#include "sdc_constants.h"
#include "sdc_utils.h"
#include "behavior_planner.h"
#include "trajectory_generator.h"
using namespace std;
// for convenience
using json... |
#ifndef _CPP_OPENJPEG_OPENJP2_OPENJPEG_CONSTANT_H_
#define _CPP_OPENJPEG_OPENJP2_OPENJPEG_CONSTANT_H_
#include "../export.hpp"
#include "../shared.hpp"
#pragma region non-openjp2 functions
DLLEXPORT const uint32_t openjpeg_openjp2_opj_get_JPWL_MAX_NO_TILESPECS()
{
return JPWL_MAX_NO_TILESPECS;
}
DL... |
//
// detail/win_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST... |
#include "stdafx.h"
#include "dTriColliderCommon.h"
#include "dTriBox.h"
#include "dcTriListCollider.h"
int dcTriListCollider::dSortedTriBox(const dReal* triSideAx0, const dReal* triSideAx1, const dReal* triAx, CDB::TRI* T,
dReal dist, dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip)
{
VERIFY(skip... |
#ifndef CPPUTILS_PIPEABLE_HPP
#define CPPUTILS_PIPEABLE_HPP
#include "../internal/adaptors.hpp"
#include <ranges>
#include <utility>
// NOLINTNEXTLINE
#define FWD(x) std::forward<decltype(x)>(x)
namespace cpputils {
constexpr auto pipeable(auto adaptor) {
return detail::adaptors::range_adaptor_closure{[adaptor_ ... |
/*
-----------------------------------------------------------------------------
This source file is part of OGRE-Next
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2017 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any pe... |
/*************************************************************************
Copyright (c) 2019 Cognitics, Inc.
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... |
// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips-unknown-linux-gnu < %s | FileCheck --check-prefix=O32 %s
// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips64-unknown-linux-gnu -target-abi n32 < %s | FileCheck --check-prefix=N32 %s
// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips64-unknown-linux-gnu -target-abi n64 < ... |
// 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 "base/command_line.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
class UpdateRecommen... |
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007-2017 musikcube team
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redist... |
// Copyright 2015-2017 Directive Games Limited - All Rights Reserved
#include "DriftEditorPrivatePCH.h"
#include "DriftEditor.h"
#include "DriftTargetSettingsCustomization.h"
#include "ModuleInterface.h"
#include "ISettingsModule.h"
#include "ModuleManager.h"
#include "DriftProjectSettings.h"
#define LOCTEXT_NAM... |
/*!
* Copyright (c) 2015 by Contributors
* \file flatten.cc
* \brief
* \author Bing Xu
*/
#include "./reshape-inl.h"
namespace mxnet {
namespace op {
template<>
Operator *CreateOp<cpu>(ReshapeParam param, int dtype) {
Operator *op = NULL;
MSHADOW_REAL_TYPE_SWITCH(dtype, DType, {
op = new ReshapeOp<cpu, D... |
/*
*Copyright (c) 2013-2016, yinqiwen <yinqiwen@gmail.com>
*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,
* t... |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000;
int sa[maxn];
int lcp[maxn];
int Rank[maxn];
unsigned char *s;
int n;
void calc_lcp() {
for (int i = 0; i < n; i++)
Rank[sa[i]] = i;
for (int i = 0, h = 0; i < n; i++) {
if (Rank[i] < n - 1) {
for (int j = sa[R... |
// stdafx.cpp : source file that includes just the standard includes
// StringPermutation.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
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.