text stringlengths 7 961k |
|---|
// { Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
/* This function is used to detect a cycle in undirected graph
* g[]: array of vectors to represent graph
* V: number of vertices
*/
bool isCyclicUtil(vector<int> g[], int curr, vector<bool> &visited, int parent){
visi... |
//---------------------------------------------------------------------------//
// Copyright (c) 2018-2020 Mikhail Komarov <nemo@nil.foundation>
// Copyright (c) 2020 Nikita Kaskov <nbering@nil.foundation>
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this so... |
/*
* Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
* Copyright 2019 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
*
... |
// Copyright 2014 Open Source Robotics Foundation, 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 appli... |
// 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 "cc/debug/rendering_stats_instrumentation.h"
#include <stdint.h>
#include "base/memory/ptr_util.h"
namespace cc {
// static
std::unique_ptr<R... |
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
const double pi = 4 * atan(1);
const double eps = 1e-8;
inline int dcmp (double x) { if (fabs(x) < eps) return 0; else return x < 0 ? -1 : 1; }
inline double getDistance (double x, double y) { return sqrt... |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "sendcoinsdialog.h"
#include "ui_sendcoinsdialog.h"
#include "init.h"
#include "walletmodel.h"
#include "addresstabl... |
// Copyright 2018 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 "net/cookies/cookie_monster_change_dispatcher.h"
#include <utility>
#include "base/bind.h"
#include "base/strings/string_piece.h"
#include "bas... |
#include <vector>
#include "types.hpp"
namespace art
{
namespace spline
{
void spline(const array_t& xs, const array_t& ys, array_t& y2s);
void splint(const array_t& xs, const array_t& ys, const array_t& y2s,
const array_t& x, array_t& y);
}
} |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The ROCKETFUNDCOIN developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "sendcoinsent... |
#include <iostream>
//task 1
unsigned factorial(unsigned n) {
if(n < 2) {
return n;
}
return n*factorial(n-1);
}
//task 2
unsigned triangleBlocks(unsigned rowsCount) {
if(rowsCount < 2) {
return rowsCount;
}
return rowsCount+triangleBlocks(rowsCount - 1);
}
int main() {
unsigned number;
std::cin >> ... |
/**************************************************************************
* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... |
/****************************************************************************
*
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
***************************************... |
#include <cstdio>
#define NMAX 100000
static int n;
static char s[NMAX + 10];
int main() {
scanf("%d%s", &n, s + 1);
s[n + 1] = '$';
int cnt[2] = {0, 1}, t = 1;
for (int i = n; i >= 1; i--) {
if (s[i] != s[i + 1])
t = s[i] < s[i + 1];
cnt[t]++;
}
// cnt[0] for L-ty... |
// Copyright (c) 2016, the SDSL Project Authors (https://github.com/xxsds/sdsl-lite).
// All rights reserved. Please see the AUTHORS below for details.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistri... |
/**
* @file WebSocketsClient.cpp
* @date 20.05.2015
* @author Markus Sattler
*
* Copyright (c) 2015 Markus Sattler. All rights reserved.
* This file is part of the WebSockets for Arduino.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Pub... |
/*******************************<GINKGO LICENSE>******************************
Copyright (c) 2017-2021, the Ginkgo authors
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 co... |
class Solution {
public:
bool XXX(string s) {
if(s.size()%2==1)
{
return false;
}
unordered_map<char,char>pair{
{')','('},
{']','['},
{'}','{'}
};
stack<char>stk;
for(char ch:s)
{
if(pair.count(ch))
{
if(stk.top()!=pair[ch]||stk.empty())
{
return false;
}
... |
#include <functional>
#include <string>
#include "imgui/imgui.h"
#ifdef _WIN32
#include <intrin.h>
#include <Windows.h>
#include <Psapi.h>
#include "imgui/imgui_impl_dx9.h"
#include "imgui/imgui_impl_win32.h"
#include "MinHook/MinHook.h"
#elif __linux__
#include <sys/mman.h>
#include <unistd.h>
#include <SDL2/SDL.... |
#include <instrumentation/collector.h>
namespace instrumentation {
collector::~collector() noexcept = default;
void collector::visit_description(const metric_name& name, std::string_view description) {}
} /* namespace instrumentation */ |
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
... |
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2011 EMC Corp.
//
// @filename:
// CParseHandlerQueryOutput.cpp
//
// @doc:
// Implementation of the SAX parse handler class parsing the list of
// output column references in a DXL query.
//---------... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2014 Chuan Ji <ji@chu4n.com> *
* *
* License... |
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#include <new>
#include <engine/shared/config.h>
#include "player.h"
MACRO_ALLOC_POOL_ID_IMPL(CPlayer, MAX_CLIENTS)
IServer *... |
/**************************************************************************************/
/* */
/* Visualization Library */
/* http://visualizationlibrary.org ... |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/pdf/pdf_extension_util.h"
#include "base/containers/cxx20_erase.h"
#include "base/strings/string_piece.h"
#include "base/strings... |
/*
Copyright (c) 2017-2022,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include "TypedBrokerServer.hpp"
#include <atomic>
#in... |
#include <Kin/kin.h>
#include <Gui/opengl.h>
#include <KOMO/komo.h>
#include <Kin/taskMaps.h>
//===========================================================================
void tutorialBasics(){
rai::KinematicWorld G("model.g");
KOMO komo;
/* there are essentially three things that KOMO needs to be specified:
... |
/******************************************************************************
*
* Project: GDAL Core
* Purpose: A dataset and raster band classes that act as proxy for underlying
* GDALDataset* and GDALRasterBand*
* Author: Even Rouault <even dot rouault at spatialys.com>
*
**********************... |
//=========================================================================
// 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... |
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
**************... |
/*
* 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 ... |
#include <ihex-parser/ProgramPage.hpp>
ProgramPage::ProgramPage(size_t address, size_t pageSize,
const std::vector<uint8_t>& pageData) {
this->address = address;
this->pageSize = pageSize;
data.resize(pageData.size());
size_t startAddress = address % pageSize;
for (size_t i = start... |
/* -------------------------------------------------------------------------- *
* OpenSim Moco: exampleMarkerTracking.cpp *
* -------------------------------------------------------------------------- *
* Copyright (c) 2017 Stanford University and the Authors *
... |
//////////////////////////
// Producer by Anders //
// and Emmanuele //
// july 2012 @ CU //
//////////////////////////
////////////////////
// FRAMEWORK HEADERS
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/MakerMacros.h"
//
#include "FWCore/Framework/interf... |
/*********************************************************************
* simulation_test.cpp
*
* Unit tests for simulation.
*
* Copyright (C) 2016 Eric Klinkhammer
*
* 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 ... |
// C++ program for implementation of selection sort
#include <bits/stdc++.h>
using namespace std;
void swap(int *xp, int *yp)
{
int temp = *xp;
*xp = *yp;
*yp = temp;
}
void selectionSort(int arr[], int n)
{
int i, j, min_idx;
// One by one move boundary of unsorted subarray
for (i = 0; i < n-1; i++)
{
// F... |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* 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/. */
... |
/**
* > Author: UncP
* > Mail: 770778010@qq.com
* > Github: https://www.github.com/UncP/Giraffe
* > Description:
*
* > Created Time: 2016-08-09 10:46:10
**/
#include "constant.hpp" |
/**
* Copyright (c) 2017-present, 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 ... |
#pragma once
#include <ast/ast.hh>
#include <boost/variant/apply_visitor.hpp>
namespace ast
{
namespace visitors
{
class VisitorInterface : public boost::static_visitor<>
{
public:
VisitorInterface() = default;
virtual ~VisitorInterface() noexcept = default;
VisitorInterface(const VisitorInterface&) = delete;
... |
#include <math.h>
double computeDistance(const double* feat1,const double* feat2,const int f1, const int f2, const int size)
{
double descd = 0;
int diff = 0;
for(int v=9;v<size;v++){//distance is computed here !!!!
diff = (int)feat1[f1+v]-(int)feat2[f2+v];
descd+=(diff == 0 ? 0 : 1)... |
// 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 "src/ui/scenic/lib/gfx/engine/session.h"
#include <lib/async/cpp/task.h>
#include <lib/async/default.h>
#include <lib/fostr/fidl/fuchsia/ui/gfx/f... |
// Copyright (c) 2020 - 2021 by Apex.AI Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless require... |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "optionsdialog.h"
#include "ui_optionsdialog.h"
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include ... |
#include "stdafx.h"
#include "MSRCR.h"
/*===========================================================
* 函数: CreateKernel
* 说明:创建一个标准化的一维高斯核;
* 参数:
* double sigma: 高斯核标准偏差
* 返回值:
* double*: 长度为((6*sigma)/2) * 2 + 1的double数组
* 注:
* 调用者需要删除该内核;
* --------------------------------------------------------
* Summary:
... |
// Copyright 2010-2017 Google
// 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 wri... |
//
// Created by DefTruth on 2021/11/29.
//
#include "tnn_ibnnet.h"
#include "lite/utils.h"
using tnncv::TNNIBNNet;
TNNIBNNet::TNNIBNNet(const std::string &_proto_path,
const std::string &_model_path,
unsigned int _num_threads) :
BasicTNNHandler(_proto_path, _model_path,... |
#include <bits/stdc++.h>
using namespace std;
int palindromeIndex(string &s)
{
int c=0,d=0;
for(int i=0;i<s.size()/2;i++)
if(s[i]!=s[s.size()-i-1])
{
c++;
if(c==1)
{
if(s[i]==s[s.size()-i-2] && s[i+1]==s[s.s... |
/** @file
A brief file description
@section license License
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 und... |
/*
WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.
This file was generated from DescribeParameters_Response_.idl using "rtiddsgen".
The rtiddsgen tool is part of the RTI Connext distribution.
For more information, type 'rtiddsgen -help' at a command shell
or consult the RTI Connext manual.
*/
#ifndef NDDS_STANDA... |
#pragma region include, macro
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <map>
#include <set>
#include <list>
#include <unordered_set>
#include <unordered_map>
#include ... |
/*
===============================================================================
FILE: io.cpp
CONTENTS:
LAZ io
PROGRAMMERS:
martin.isenburg@rapidlasso.com - http://rapidlasso.com
uday.karan@gmail.com - Hobu, Inc.
COPYRIGHT:
(c) 2007-2014, martin isenburg, rapidlasso - tools to catch r... |
/*******************************************************************************
* Copyright 2022 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... |
#include "qrcodedialog.h"
#include "ui_qrcodedialog.h"
#include "bitcoinunits.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "optionsmodel.h"
#include <QPixmap>
#if QT_VERSION < 0x050000
#include <QUrl>
#endif
#include <qrencode.h>
QRCodeDialog::QRCodeDialog(const QString &addr, const QString &label, bo... |
// Copyright 2018 Open Source Robotics Foundation, 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 appli... |
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int fileStructure(int level, string dir, int ncase) {
vector<string> v;
for (int i = 1; i <= level; ++ i)
cout << "| ";
if (level != 0)
cout << dir << endl;
int t = 0;
while (true) {
... |
#include "IPv6Tests.h"
IPv6Tests::IPv6Tests()
: Layer("IPv6")
{
}
void IPv6Tests::OnAttach()
{
m_ipv6Thread = TRAP::MakeScope<std::thread>(IPv6);
m_ipv6Thread->detach();
}
void IPv6Tests::OnDetach()
{
m_ipv6Thread.reset();
}
void IPv6Tests::IPv6()
{
//Print out the local IP
std::cout << "[EXPERIMENTAL][Networ... |
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014
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 Software with... |
#ifndef MH_WORKERS_HH
#define MH_WORKERS_HH
#include "MH_learning.hh"
class MH_medic: public basic_thread_worker
{
public:
MH_medic(thread_work_struct &tws_, int thread_id_, double alpha_tol_, char * test_directory_);
~MH_medic();
private:
const size_t buf_end;
char * const mtest_buffer;
... |
#include "gtest/gtest.h"
#include "gtpv1u.hpp"
#include "gtpu.h"
#include "gtpu_l4_stack_test.hpp"
// Pcapplusplus
#include <EthLayer.h>
#include <IPv4Layer.h>
#include <Packet.h>
#include <RawPacket.h>
#include <stdlib.h>
#include <PcapLiveDeviceList.h>
#include <PlatformSpecificUtils.h>
// includes for spgwu compon... |
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double x;
cin >> x;
double sin = 0;
double numerator = x;
long long denominator = 1;
int sign = 1;
for (int i = 1; i <= 66; i += 2)
{
if (i != 1)
{
numerator *= x * x;
denomi... |
/*
* lookup3.c
*
* This is adapted from the lru_slabhash code in unbound 1.2.1. Originally adapted
* by Jake Montgomery for DynDNS 6-2-09. See below for original licence.
*
* This implementation may have been modified to be more optimized for our
* specific purposes..
*
* ======================================... |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/utility/webthread_impl_for_utility_thread.h"
#include "base/thread_task_runner_handle.h"
namespace content {
WebThreadImplForUtilityT... |
/****************************************************************************
*
* Copyright (c) 2016 PX4 Development 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:
*
* 1. Redistri... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2020 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the... |
#include "Aether/base/Scrollable.hpp"
// Default catchup amount
#define DEFAULT_CATCHUP 6
// Default dampening amount
#define DEFAULT_DAMPENING 20
// Maximum scrollVelocity
#define MAX_VELOCITY 70
// Padding for very top and very bottom elements
#define PADDING 40
// Padding either side of items (to allow for scroll ... |
/**
* @file
* @copyright defined in VAC/LICENSE.txt
*/
#include <VACio/wallet_plugin/wallet_manager.hpp>
#include <VACio/wallet_plugin/wallet.hpp>
#include <VACio/wallet_plugin/se_wallet.hpp>
#include <VACio/chain/exceptions.hpp>
#include <boost/algorithm/string.hpp>
namespace VACio {
namespace wallet {
constexpr... |
// Copyright Carl Philipp Reh 2006 - 2019.
// 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 <sge/opengl/cg/program/activate.hpp>
#include <sge/opengl/cg/program/loaded_object.hpp>
#i... |
// 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 "diablo.h"
DEVILUTION_BEGIN_NAMESPACE
SpellData spelldata[MAX_SPELLS] = {
// clang-format off
// sName, sManaCost, sType, sNameText, sSkillText, sBookLvl, sStaffLvl, sTargeted, sTownSpell, sMinInt, sSFX, sMissiles[3], sManaAdj, sMinMana, sStaffMin, sStaffMax, s... |
// Copyright 2018 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/vr/ui_input_manager_for_testing.h"
namespace vr {
UiInputManagerForTesting::UiInputManagerForTesting(UiScene* scene)
: UiIn... |
//File: camera.cc
//Author: Yuxin Wu <ppwwyyxx@gmail.com>
#include "camera.hh"
#include </afs/cs/academic/class/15418-s17/public/sw/eigen/include/eigen3/Eigen/Dense>
#include <algorithm>
#include <string>
#include "lib/timer.hh"
#include "match_info.hh"
#include "homography.hh"
using namespace std;
using namespace p... |
//pointer are nothing but type of a vriable that stores address of a varibale.
#include<iostream>
using namespace std;
int main()
{
int a=10;
int *aptr;//pointer declare
aptr=&a;
cout<<&a<<endl;//address of a
cout<<aptr<<endl;//address of a
//dereferencing of pointer
cout<<*aptr<<e... |
// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "coins.h"
#include "memusage.h"
#include "random.h"
#include <assert.h>
/**
* calculate number of bytes for the ... |
void CountDown(int nValue)
{
using namespace std;
cout << nValue << endl;
// termination condition
if (nValue > 0)
CountDown(nValue-1);
}
int main(void)
{
CountDown(10);
return 0;
} |
/*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
w... |
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2011 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person ... |
#include <bits/stdc++.h>
#define FOR0(i, n) for (int i = 0; i < n; i++)
#define FOR1(i, n) for (int i = 1; i <= n; i++)
#define FORl(i, l, n) for (int i = l; i < n; i++)
using namespace std;
#define pi pair<ll, ll>
#define pb push_back
#define ll long long
#define ld long double
#define ff first
#define ss second
#defi... |
/******************************************/
/*
audioprobe.cpp
by Gary P. Scavone, 2001
Probe audio system and prints device info.
*/
/******************************************/
#include "RtAudio.h"
#include <iostream>
#include <map>
int main()
{
// Create an api map.
std::map<int, std::string> apiMap;
... |
// BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
#define FILENAME(line) FILENAME_FOR_EXCEPTIONS("src/libawkward/builder/TupleBuilder.cpp", line)
#include <stdexcept>
#include "awkward/builder/ArrayBuilderOptions.h"
#include "awkward/builder/OptionBuilder.h"
#include "awkward/b... |
/*
* 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.... |
//===- MCExpr.cpp - Assembly Level Expression Implementation --------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include "StdAfx.h"
#include "ArticulationLink.h"
#include "Articulation.h"
#include "Scene.h"
#include "Physics.h"
ArticulationLink::ArticulationLink(PxArticulationLink* articulationLink, PhysX::Articulation^ owner)
: RigidBody(articulationLink, owner->Scene->Physics)
{
}
ArticulationLink::~ArticulationLink()
{
t... |
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BAS... |
//#include <vld.h>
#include "PSVitaApplication.h"
#include "Program/Log.h"
#include "Graphics/MeshDefaults.h"
#include "Graphics/VertexArray.h"
class MyApplication : public Engine::PSVitaApplication
{
public:
bool Init()
{
if (!PSVitaApplication::Init())
return false;
/*float vertices[] = {
-0.5f, -0.5... |
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* ----... |
/*
* 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
* distributed u... |
#include "common/authors.h"
#include "common/build_info.h"
#include "common/cli_helper.h"
#include "common/config.h"
#include "common/config_parser.h"
#include "common/config_validator.h"
#include "common/definitions.h"
#include "common/file_stream.h"
#include "common/logging.h"
#include "common/options.h"
#include "co... |
#include <boost/test/unit_test.hpp>
#include "tools/string.h" // header to test
using namespace biosim;
BOOST_AUTO_TEST_SUITE(suite_string)
BOOST_AUTO_TEST_CASE(string_unique) {
std::string s1, s2("a a a a");
tools::char_function char_isspace = (int (*)(int)) & std::isspace;
BOOST_CHECK(tools::get_unique_cha... |
//===-- AppleObjCRuntimeV2.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
//
//===---------------------------... |
#include "kernel/meta/array/meta_array.h"
#include "kernel/core/core.h"
namespace coffee
{
namespace meta
{
//-META---------------------------------------------------------------------------------------//
COFFEE_BeginType(meta::Array);
COFFEE_EndType();
//-CONSTRUCTORS--------------------------------... |
#include "rpcconsole.h"
#include "ui_rpcconsole.h"
#include "bantablemodel.h"
#include "clientmodel.h"
#include "guiutil.h"
#include "peertablemodel.h"
#include "main.h"
#include "chainparams.h"
#include "util.h"
#include "rpcserver.h"
#include "rpcclient.h"
#include <QClipboard>
#include <QTime>
#include <QThread>... |
/////////////////////////////////////////////////////////////////////////////
// Name: src/unix/stackwalk.cpp
// Purpose: wxStackWalker implementation for Unix/glibc
// Author: Vadim Zeitlin
// Modified by:
// Created: 2005-01-18
// RCS-ID: $Id$
// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxw... |
//===--- FunctionSignatureOpts.cpp - Optimizes function signatures --------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
/*
Copyright 2020 Victor Santos Reis
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... |
#include <bangtal>
using namespace bangtal;
int main()
{
setGameOption(GameOption::GAME_OPTION_INVENTORY_BUTTON, false);
setGameOption(GameOption::GAME_OPTION_MESSAGE_BOX_BUTTON, false);
auto scene = Scene::create("산타 레이스", "Images/background.png");
auto timer = Timer::create(10.f);
showTimer(timer);
int san... |
/***************************************************************************
* Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* ... |
#include "MultiMC.h"
#include "MainWindow.h"
#include "LaunchController.h"
#include <InstanceList.h>
#include <QDebug>
// #define BREAK_INFINITE_LOOP
// #define BREAK_EXCEPTION
// #define BREAK_RETURN
#ifdef BREAK_INFINITE_LOOP
#include <thread>
#include <chrono>
#endif
int main(int argc, char *argv[])
{
#ifdef BREA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.