text stringlengths 7 961k |
|---|
// Copyright (C) 2014-2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// 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 <config.h>
#include <dhcpsrv/cf... |
/*
* Copyright 2014 Open Connectome Project (http://openconnecto.me)
* Written by Da Zheng (zhengda1936@gmail.com)
*
* This file is part of FlashGraph.
*
* 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 o... |
#include <fstream>
#include <math.h>
#include <uWS/uWS.h>
#include <chrono>
#include <iostream>
#include <thread>
#include <vector>
#include "Eigen-3.3/Eigen/Core"
#include "Eigen-3.3/Eigen/QR"
#include "json.hpp"
#include "spline.h"
using namespace std;
// for convenience
using json = nlohmann::json;
// For convert... |
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
/**
* @brief A header file for the OpenVINO Runtime RemoteContext class
* @file openvino/runtime/remote_context.hpp
*/
#pragma once
#include <map>
#include <memory>
#include <string>
#include "openvino/core/shape.hpp"
#include ... |
#include <cstdio>
#include <cstdint>
using i64 = std::int64_t;
static constexpr
int power(int x, int n, int p)
{
int r = 1;
while(n>0){
if (n%2 == 0){
x = (x*1ll*x)%p;
n/=2;
}else{
r = (r*1ll*x)%p;
n --;
}
}
return r;
}
static constexpr
int inverse(int x, int p){ return power(... |
/**
* Unit Tests for TicTacToeBoard
**/
#include <gtest/gtest.h>
#include "TicTacToeBoard.h"
class TicTacToeBoardTest : public ::testing::Test
{
protected:
TicTacToeBoardTest(){} //constructor runs before each test
virtual ~TicTacToeBoardTest(){} //destructor cleans up after tests
virtual void SetUp(){} //se... |
#include <iostream>
#include <deque>
#include <cstdio>
using namespace std;
int main(){
string temp;
deque <char> vog, cons;
cin >> temp;
for(int i=0; i<temp.size(); i++){
if(temp[i] == 'a' or temp[i] == 'e' or temp[i] == 'i' or temp[i] == 'o' or temp[i] == 'u') vog.push_back(temp[i]);
else cons.push_back(tem... |
// Copyright (c) 2018-2019 Tkeycoin Dao
// Copyright (c) 2020 TKEY DMCC LLC & Tkeycoin Dao. All rights reserved.
// Website: www.tkeycoin.com
//
// 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 Licen... |
#ifndef AMGCL_SOLVER_EIGEN_HPP
#define AMGCL_SOLVER_EIGEN_HPP
/*
The MIT License
Copyright (c) 2012-2018 Denis Demidov <dennis.demidov@gmail.com>
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 ... |
// Copyright (c) 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.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
/*************************************************************************
> File Name: main.cpp
> Author: Jintao Yang
> Mail: 18608842770@163.com
> Created Time: 2021年11月18日 星期四 13时21分15秒
************************************************************************/
#include "LTexture.h"
#include "Dot.h"... |
// 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 "ui/aura/test/test_suite.h"
#include "base/file_path.h"
#include "base/path_service.h"
#include "build/build_config.h"
#include "ui/base/res... |
// Copyright (c) 2014 The Bitcoin Core developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "primitives/transaction... |
// Example low level rendering Unity plugin
#include "PlatformBase.h"
#include "RenderAPI.h"
#include "stdafx.h"
static RenderAPI* s_CurrentAPI = NULL;
static HANDLE shadowThread = nullptr;
struct threadwrapper
{
static unsigned int WINAPI thunk(LPVOID lpParameter)
{
s_CurrentAPI->WorkerThread();
return 0;
}
}... |
/**
* @author : archit
* @GitHub : archit-1997
* @Email : architsingh456@gmail.com
* @file : lowestCommonAncestorofABinaryTree.cpp
* @created : Saturday Aug 14, 2021 22:03:45 IST
*/
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
void findPath(TreeNode* root... |
// Copyright (c) 2005-2014 Code Synthesis Tools CC
//
// This program was generated by CodeSynthesis XSD, an XML Schema to
// C++ data binding compiler.
//
// 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 Fre... |
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
/***************************************************************************
# Copyright (c) 2015, NVIDIA CORPORATION. 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 sourc... |
/**
* 2231. 분해합
*
* 작성자: xCrypt0r
* 언어: C++14
* 사용 메모리: 1,984 KB
* 소요 시간: 8 ms
* 해결 날짜: 2020년 9월 4일
*/
#include <iostream>
using namespace std;
int get_sum(int n);
int main()
{
int N;
bool has_creator;
cin >> N;
for (int i = 1; i <= 1000000; ++i)
{
has_creator = false;
... |
// 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 <clientversion.h>
#include <core_io.h>
#include <net.h>
#include <net_p... |
/**
* Portions Copyright (c) Microsoft Corporation. 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
*
* THIS COD... |
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* 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... |
// unfortunately, since we'll link to rawspeed, we need c++ here.
#include "RawSpeed-API.h"
#include "mat3.h"
#include <omp.h>
#include <unistd.h>
#include <mutex>
#include <ctime>
#include <math.h>
#ifdef VKDT_USE_EXIV2
#include "exif.h"
#endif
extern "C" {
#include "modules/api.h"
static rawspeed::CameraMetaData *m... |
#include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <limits>
#include "vm/CachedCCWBase.h"
#include "utils/New.h"
// System.Collections.Generic.IEqualityComparer`1<Microsoft.MixedReality.Toolkit.Utilities.TrackedHandJoint>
struct IEqualityCo... |
// { dg-do compile { target c++11 } }
// Copyright (C) 2011-2017 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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 Found... |
// atcoder/abc189/E/main.cpp
// author: @___Johniel
// github: https://github.com/johniel/
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first << ... |
#include "drake/multibody/math/spatial_algebra.h"
#include <sstream>
#include <string>
#include <gtest/gtest.h>
#include "drake/common/extract_double.h"
#include "drake/common/test_utilities/eigen_matrix_compare.h"
namespace drake {
namespace multibody {
namespace math {
namespace {
using Eigen::AngleAxis;
using s... |
//////////////////////////////////////////////////////////////////////////////
//
// Detour Test Program (target.cpp of target.dll)
//
// Microsoft Research Detours Package
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
#include <stdio.h>
#include <windows.h>
#include "target.h"
extern "C" DWO... |
// Scintilla source code edit control
/** @file XPM.cxx
** Define a class that holds data in the X Pixmap (XPM) format.
**/
// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <cstdlib>
#include <cstring>... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <sstream>
#include "core/common/logging/logging.h"
#include "core/common/logging/sinks/clog_sink.h"
#include "core/framework/tensorprotoutils.h"
#include "core/framework/data_types_internal.h"
#include "core/sessi... |
// Copyright (c) 2019 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 ... |
/* Copyright (c) 2019, NVIDIA CORPORATION. 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 cond... |
#include "Stdafx.h"
#include "ImagerBase.h"
#include <algorithm>
using namespace Vrpn;
const char* ImagerUtils::BitDepthToString(ImageBitDepth depth)
{
switch (depth)
{
case ImageBitDepth::unsigned8bit: return "unsigned8";
case ImageBitDepth::unsigned12in16bit: return "unsigned12in16";
case ImageBitDepth::uns... |
#include "askpassphrasedialog.h"
#include "ui_askpassphrasedialog.h"
#include "guiconstants.h"
#include "walletmodel.h"
#include <QMessageBox>
#include <QPushButton>
#include <QKeyEvent>
AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
QDialog(parent),
ui(new Ui::AskPassphraseDialog),
... |
/*
MIT License
Copyright(c) 2020 MAGMa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this softwareand associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... |
#include "conqueror.h"
using namespace std;
using namespace cv;
using namespace aruco;
extern "C" {
//for java debug test
JNIEXPORT jstring JNICALL Java_com_alo7_conqueror_ConquerorJNI_stringFromJNI(JNIEnv* env, jclass cls) {
__android_log_print(ANDROID_LOG_DEBUG, CQRO_LOG_TAG, "Java_com_alo7_conqueror_ConQu... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzTest/AzTest.h>
#include <Atom/RPI.Reflect/Image/ImageMipChainAsset.h>
#include <Atom/... |
#include "tmpch.h"
#include "Scene.h"
#include "Application/Application.h"
//Constructors/Destructors
Scene::Scene(Application* app)
: app(app)
{
this->config = this->app->GetConfig();
this->resourceManager = this->app->GetResourceManager();
}
Scene::~Scene()
{
}
//Functions
void Scene::LoadScene(Scene* scene)
... |
// Copyright (c) 2007-2020 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// 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 <hpx/config.hpp>
#include <hpx/assert.hpp>
#include <hpx/f... |
#ifndef POSE_EDGE_HPP
#define POSE_EDGE_HPP
#include <Eigen/Geometry>
#include <opencv2/core/core.hpp>
#include <g2o/core/block_solver.h>
#include <g2o/types/slam3d/types_slam3d.h>
#include <g2o/core/optimization_algorithm_levenberg.h>
#include <g2o/solvers/dense/linear_solver_dense.h>
#include <g2o/types/sba/types_si... |
// Copyright (c) 2013-2017 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 <hash.h>
#include <crypto/common.h>
#include <crypto/curve25519.h>
#include <crypto/hmac_sha512.h>
inline uint32_t... |
// Copyright (c) 2022 Mark Friedenbach
//
// 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 <iostream>
#include <deque>
#include <string>
#include <vector>
... |
/*******************************<GINKGO LICENSE>******************************
Copyright 2017-2018
Karlsruhe Institute of Technology
Universitat Jaume I
University of Tennessee
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met... |
/*=========================================================================
medInria
Copyright (c) INRIA 2013 - 2014. 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... |
/**************************************************************
*
* 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 y... |
// Copyright (c) 2014-2018 The Proton Core developers
// Copyright (c) 2018 The Reden Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "activemasternode.h"
#include "coincontrol.h"
#include "consensus... |
// 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 "components/omnibox/browser/in_memory_url_index_types.h"
#include <algorithm>
#include <functional>
#include <iterator>
#include <numeric>
#... |
// Copyright 2018 The Goma Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// fake is a fake program to work like a compiler.
// It just rename *.fake to *.out.
#include <iostream>
#include <string>
#include "absl/strings/str_cat.h... |
#include <thread>
#include <stack>
#include <mutex>
#include <memory>
#include <atomic>
#include <iostream>
struct ThreadGuard{
ThreadGuard(std::thread& th):m_th(th){}
~ThreadGuard(){
if(m_th.joinable()) {
m_th.join();
}
}
ThreadGuard(const ThreadGuard&) = delete;
ThreadGuard& operato... |
/* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| |
| Cop... |
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
#include "MetroReflection.h"
MetroReflectionStream::MetroReflectionStream()
: mMode(MetroReflectionStream::Mode::IN)
, mUserData(kInvalidValue)
, mSTable(nullptr)
, mFlags(MetroReflectionFlags::None) {
}
MetroReflectionStream::~MetroReflectionStream() {
}
void MetroReflectionStream::SerializeBool(b... |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011-2012 Bryce Adelstein-Lelbach
//
// SPDX-License-Identifier: BSL-1.0
// 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... |
/*
g++ --std=c++20 -pthread -o ../_build/cpp/utility_tuple_forward_as_tuple.exe ./cpp/utility_tuple_forward_as_tuple.cpp && (cd ../_build/cpp/;./utility_tuple_forward_as_tuple.exe)
https://en.cppreference.com/w/cpp/utility/tuple/forward_as_tuple
*/
#include <iostream>
#include <map>
#include <tuple>
#include <string>
i... |
// Copyright 2019 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/sharing/sharing_constants.h"
const char kSharingFCMAppID[] = "com.google.chrome.sharing.fcm";
const char kSharingSenderID[] = "... |
/*************************************************************************/
/* spring_arm.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
#include<bits/stdc++.h>
using namespace std;
class Solution
{
public:
vector<vector<int>> combinationSum2(vector<int>& candidates, int target)
{
typedef struct Node
{
Node* prev;
int curIndex;
int total;
} node;
sort(candidates.begin(), cand... |
#include "VertexBuffer.h"
#include "Renderer.h"
VertexBuffer::VertexBuffer(const void* data, unsigned int size)
{
glGenBuffers(1, &m_RendererID);
GLCall(glBindBuffer(GL_ARRAY_BUFFER, m_RendererID));
GLCall(glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW));
}
VertexBuffer::~VertexBuffer()
{
G... |
/*
* cppFile.hpp
*
*
* @date 14-07-2020
* @author Teddy DIDE
* @version 1.00
* cppBase generated by gensources.
*/
#ifndef _CPPFILE_HPP_
#define _CPPFILE_HPP_
#include <boost/shared_ptr.hpp>
#include <boost/container/vector.hpp>
#include "copy_ptr.h"
#include "config.hpp"
#include "convert.hpp"
#include "enc... |
#ifndef STATE_UPDATE_HPP
#define STATE_UPDATE_HPP
#include "point.hpp"
#include "cmath"
__global__ void call_func_delta_cuda(Point* globaldata, int numPoints, double cfl, dim3 thread_dim, int* connec, double* prim, double* prim_old);
__global__ void state_update_cuda(Point* globaldata, int numPoints, Config configDat... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 Litecoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "util.h"
#include "sync.h"... |
// 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 "services/network/public/cpp/simple_url_loader.h"
#include <stdint.h>
#include <list>
#include <string>
#include <utility>
#include <vector>
#... |
#ifndef STAN_MATH_PRIM_MAT_FUN_FABS_HPP
#define STAN_MATH_PRIM_MAT_FUN_FABS_HPP
#include <stan/math/prim/mat/vectorize/apply_scalar_unary.hpp>
#include <cmath>
namespace stan {
namespace math {
/**
* Structure to wrap fabs() so that it can be vectorized.
*
* @param x Variable.
* @tparam T V... |
/*
* Copyright (C) 2016 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 2021-2022 Hewlett Packard Enterprise Development LP
* Other additional copyright holders may be indicated within.
*
* The entirety of this work is licensed under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
*
* You may obtai... |
#include <drogon/Cookie.h>
#include <drogon/drogon_test.h>
#include <drogon/HttpAppFramework.h>
#include <drogon/HttpClient.h>
#include <drogon/HttpRequest.h>
#include <drogon/HttpResponse.h>
#include <drogon/HttpTypes.h>
using namespace drogon;
struct CookieSameSiteSequence
{
CookieSameSiteSequence()
{
... |
/*
-- @module VertexBufferData
-- @group GLES2
-- @brief Provides functions related to vertex buffer data (VBD).
-- @full Provides functions related to vertex buffer data (VBD).
-- This module is a C library is loaded by default.
*/
#include <memory>
#include "lua_common.h"
#include "luaVertexBufferData.h"
using na... |
///
/// \author John Farrier
///
/// \copyright Copyright 2015, 2016, 2017 John Farrier
///
/// 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-... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <Pass/PassBuilder.h>
#include <Atom/RPI.Edit/Common/AssetUtils.h>
#include <AzCore/Asset... |
#include "Engine\Helpers\GameKeys.h"
/// Default Game Keys
Key GameKeys::MenuConfirmKey = Key( KEY_RETURN );
Key GameKeys::MenuAltConfirmKey = Key( KEY_SPACE );
Key GameKeys::MenuUpKey = Key( KEY_UP );
Key GameKeys::MenuDownKey = Key( KEY_DOWN ); |
// Copyright (C) 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <tensorflow_frontend/exceptions.hpp>
#include "node_context.hpp"
namespace ov {
namespace frontend {
namespace tf {
std::string OpValidationFailureTF::get_error_msg_prefix_tf(const tf::NodeContext& node) {
std::stringstrea... |
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#if !defined(LEVELDB_PLATFORM_WINDOWS)
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#inclu... |
// 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 "extensions/renderer/declarative_content_hooks_delegate.h"
#include "base/bind.h"
#include "base/stl_util.h"
#include "extensions/common/api/dec... |
/*
==============================================================================
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... |
//*****************************************************************************
// Copyright 2017-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... |
/*
* FortunaPRNG.cpp
*
* Created on: 16.12.2014
* Author: Darius Malysiak
*/
#include "FortunaPRNG.h"
#include "../../Buffer.h"
namespace Lazarus {
FortunaPRNG::FortunaPRNG()
{
#ifdef USETOMCRYPT
int err = 0;
//register the prng
if((err = register_prng(&fortuna_desc)) == -1)
{
printf("register_prn... |
#include <asio/awaitable.hpp>
#include <asio/co_spawn.hpp>
#include <asio/posix/stream_descriptor.hpp>
#include <asio/use_awaitable.hpp>
#include <iostream>
#include <json/json.hpp>
#include <mutex>
#include <optional>
#include "comms.cpp"
#include "lsp/types.cpp"
#include "server.hpp"
#include "parse_manager.cpp"
#i... |
#include "../tests/tests.h"
using namespace TestCommon;
void Tests::runBoardIOTests() {
cout << "Running board IO tests" << endl;
ostringstream out;
//============================================================================
{
const char* name = "Parse test";
Board board = Board::parseBoard(6,5,R"%... |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2018-2020 Intel Corporation
#ifndef OPENCV_GAPI_GBACKEND_HPP
#define OPENCV_GAPI_GBACKEND_HPP
#include ... |
// 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: System.Enum
#include "System/Enum.h... |
#include "GameApp.h"
#include "d3dUtil.h"
#include "DXTrace.h"
using namespace DirectX;
GameApp::GameApp(HINSTANCE hInstance)
: D3DApp(hInstance),
m_CameraMode(CameraMode::ThirdPerson),
m_ShadowMat(),
m_WoodCrateMat()
{
}
GameApp::~GameApp()
{
}
bool GameApp::Init()
{
if (!D3DApp::Init())
return false;
// 务... |
// 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 "key.h"
#include "keystore.h"
#include "main.h"
#include "script/script.h"
#include "script/script_error.h"
#inc... |
/*
* Copyright (C) 2005 - 2013 MaNGOS <http://www.getmangos.com/>
*
* Copyright (C) 2008 - 2013 Trinity <http://www.trinitycore.org/>
*
* Copyright (C) 2006 - 2013 ScriptDev2 <http://www.scriptdev2.com/>
*
* Copyright (C) 2010 - 2013 ProjectSkyfire <http://www.projectskyfire.org/>
*
* Copyright (C) 2011 - 2013... |
class Solution {
public:
void sortColors(vector<int>& nums) {
map<int,int>m;
for(int i=0;i<nums.size();i++){
m[nums[i]]++;
}
for(int i=0;i<m[0];i++)
nums[i]=0;
for(int i=m[0];i<m[1]+m[0];i++)
nums[i]=1;
for(int i=m... |
#include "../include/HandlerInterface.h" |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin >> N;
vector<pair<int, int>> P;
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
pair<int, int> P_p = make_pair(y, x);
P.push_back(P_p);
}
sort(P.begin(), P.end());
for (int i = 0; i < N; ... |
// Copyright 2021 Fuzhou Rockchip Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <assert.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <unistd.h>
#include <glib.h>
#inc... |
// Copyright (c) 2015-2017, RAPtor Developer Team
// License: Simplified BSD, http://opensource.org/licenses/BSD-2-Clause
#include "gtest/gtest.h"
#include "core/types.hpp"
#include "core/matrix.hpp"
#include "core/vector.hpp"
#include "krylov/cg.hpp"
#include "gallery/diffusion.hpp"
#include "gallery/stencil.hpp"
us... |
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017 Valve Corporation
// Copyright (c) 2017 LunarG 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... |
//MemoryManager.cpp
// Copyright (c) 2008-2010, Petr Kobalicek <kobalicek.petr@gmail.com>
// Copyright (c) Querysoft Limited 2012, 2015
//
// Permission is hereby granted, free of charge, to any person or organization
// obtaining a copy of the software and accompanying documentation covered by
// this license (the "S... |
/*******************************************************************************
* Copyright (c) 2009-2016, MAV'RIC 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. R... |
// (c) Copyright 1995-2021 Xilinx, Inc. All rights reserved.
//
// This file contains confidential and proprietary information
// of Xilinx, Inc. and is protected under U.S. and
// international copyright and other intellectual property
// laws.
//
// DISCLAIMER
// This disclaimer is not a license and does not grant ... |
/*
* Copyright (C) 2007, 2008, 2010, 2011 Apple 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this li... |
#include "osm_mem_tiles.h"
using namespace std;
OsmMemTiles::OsmMemTiles(uint baseZoom):
TileDataSource(),
baseZoom(baseZoom) { }
void OsmMemTiles::MergeTileCoordsAtZoom(uint zoom, TileCoordinatesSet &dstCoords) {
::MergeTileCoordsAtZoom(zoom, baseZoom, tileIndex, dstCoords);
}
void OsmMemTiles::MergeSingleTileDa... |
#ifndef INCLUDED_CAMERA_HPP
#define INCLUDED_CAMERA_HPP
#include <glm/glm.hpp>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/quaternion.hpp>
namespace nekolib {
namespace camera {
// simple camera class using euler angles (but not roll)
class EulerCamera {
public:
enum class MoveDir { FORWARD... |
#include "ChanelPanelWidget.h"
#define CHANELPANELWIDGET_HPANELWIDGET_MARGIN 1
#define CHANELPANELWIDGET_HPANELWIDGET_W 50
#define CHANELPANELWIDGET_HPANELWIDGET_ITEM_MARGIN 8
#define CHANELPANELWIDGET_HPANELWIDGET_ITEM_HT 28
#define CHANELPANELWIDGET_HPANELWIDGET_ITEM_WT 30
#define CHANELWIDGET_HT 90
#define CHROMAT... |
/******************************************************************************
* $Id$
*
* Project: GDAL Core
* Purpose: Test performance of GDALCopyWords().
* Author: Even Rouault, <even dot rouault at mines dash paris dot org>
*
******************************************************************************... |
void printf(char* str) {
// monitor will print anything at 0xb8000 mem loc
static unsigned short* VideoMemory = (unsigned short*)0xb8000;
for (int i = 0; str[i] != '\0'; ++i) {
VideoMemory[i] = (VideoMemory[i] & 0xFF00) | str[i];
}
}
extern "C" void kernalMain(void* multiboot_structure, uint32_t magicnumber) {
... |
/**********
Copyright 2017 Xilinx, 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 writing, softw... |
// Copyright (c) 2006-2009 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/views/find_bar_view.h"
#include <algorithm>
#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.