text stringlengths 7 961k |
|---|
// 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 "components/autofill/core/browser/autofill_profile.h"
#include <algorithm>
#include <functional>
#include <map>
#include <memory>
#include <ostr... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
// Including type: UnityEngine.MonoBehaviour
#include "UnityEngine/MonoBehaviour.hpp"
#include "... |
// 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.
#if defined(HAVE_CONFIG_H)
#include "config/chronon-config.h"
#endif
#include "optionsdialog.h"
#include "ui_optionsdialog.h"... |
/*##############################################################################
HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
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... |
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is d... |
/*=======================================================================
Copyright (c) 2018-2019 Marcelo Kallmann.
This software is distributed under the Apache License, Version 2.0.
All copies must contain the full copyright notice licence.txt located
at the base folder of the distribution.
===========... |
// Copyright (c) 2016 Antoine Trux
//
// The original version is available at
// http://solving-regular-expression-crosswords.blogspot.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 Softwar... |
#include "comm/checkpointer.h"
#include "comm/communicator_manager.h"
namespace rdc {
namespace comm {
CheckPointer::CheckPointer() {
comm_ = CommunicatorManager::Get()->NewCommunicator("CheckPoint");
}
std::unordered_map<std::string, GlobalState> CheckPointer::states() const {
return global_states_;
}
/**
* ... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE127_Buffer_Underread__new_char_cpy_54a.cpp
Label Definition File: CWE127_Buffer_Underread__new.label.xml
Template File: sources-sink-54a.tmpl.cpp
*/
/*
* @description
* CWE: 127 Buffer Under-read
* BadSource: Set data pointer to before the allocated memory buffer
* ... |
/* Boost numeric test of the adams-bashforth-moulton steppers test file
Copyright 2013 Karsten Ahnert
Copyright 2013 Mario Mulansky
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)
*/
// disable checked iterator wa... |
#include "pulse.h"
void pulse::init(double t,...) {
//The 'parameters' variable contains the parameters transferred from the editor.
va_list parameters;
va_start(parameters,t);
//To get a parameter: %Name% = va_arg(parameters,%Type%)
//where:
// %Name% is the parameter name
// %Type% is the parameter type
vba... |
// RUN: %clang_cc1 -verify -std=c++17 -fcoroutines-ts -fsyntax-only %s
namespace std::experimental {
template <class Promise = void> struct coroutine_handle {
coroutine_handle() = default;
static coroutine_handle from_address(void *) noexcept;
};
template <> struct coroutine_handle<void> {
static coroutine_hand... |
//
// Copyright (c) 2008-2014 the Urho3D project.
//
// 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, m... |
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software ... |
#include "texture.h"
Texture::Texture(std::string path, int w, int h)
: originW(w), originH(h)
{
//std::cout << "1.Texture()\n";
int bytes = 0;
pixelsOrigin = loadTexture(path, originW, originH, bytes); // w and h by refr.
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2... |
/**Kattis - equationsolver
* Quite a tedious problem with a lot of edge cases if we don't design the code properly.
* Just look through the code to see how I dealt with them. But the main part of the
* check if to look for parallel lines / planes / higher dimensional lines? And if we
* find parallel lines then we c... |
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
using namespace cv;
using namespace std;
enum MyShape{MyCIRCLE=0,MyRECTANGLE,MyELLIPSE};
struct ParamColorMap {
int iColormap;
Mat img;
};
String winName="False color";
static const String Colo... |
/*
* Copyright 2009-2017 Alibaba Cloud 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... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
#include "extern/beatsaber-hook/shared/utils/byref.hpp"
// Completed includes
// Begin forward d... |
#pragma once
#include <array>
#include <windows.h>
#include <string>
#include "lazy.hpp"
#include "xors.hpp"
#include "../../game/modules/modules.hpp"
class c_version
{
public:
static bool is_lunar( )
{
static auto res = 2;
if ( res != 2 )
return res;
auto path = std::array<char, MAX_PATH>( );
const a... |
#include "MainComponent.h"
//==============================================================================
MainComponent::MainComponent() : selector(deviceManager, 2, 2, 2, 2, false, false, true, true)
{
// Make sure you set the size of the component after
// you add any child components.
setSize (800, 60... |
/*
The Jinx library is distributed under the MIT License (MIT)
https://opensource.org/licenses/MIT
See LICENSE.TXT or Jinx.h for license details.
Copyright (c) 2017 James Boer
*/
#include "UnitTest.h"
using namespace Jinx;
TEST_CASE("Test Core Library", "[Core]")
{
SECTION("Test write functions")
{
const char ... |
/*
* 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... |
/*********************************************************************
Copyright 2018 VERTO STUDIO 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.... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2014 Klaus Spanderen
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and... |
///
/// Turing Machine Simulator in C++
///
/// Author: Clemens Hagenbuchner
/// Last edited: 23.03.18
///
/// Turing Machine class - implementation file
///
#include <string>
#include <fstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include "turingmachine.h"
using std::string;
using std::ostre... |
//==============================================================
// Copyright Intel Corporation
//
// SPDX-License-Identifier: MIT
// =============================================================
#include <CL/sycl/INTEL/fpga_extensions.hpp>
#include "kernel.hpp"
// This file contains 'almost' exclusively device code... |
int nIndex; // simple integer type prefix
int* pnIndex; // a pointer to an integer
int m_nIndex; // an integer variable that is a member of a class
int* m_pnIndex; // an pointer to an integer variable that is a member of a class |
// Copyright 2020 The TensorFlow Runtime Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
//
// main.cpp
// ~~~~~~~~
//
// Copyright (c) 2003-2016 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)
//
#include <iostream>
#include <asio.hpp>
#include <b... |
#include <algorithm>
#include <iostream>
#include "utils.hpp"
#include "gardner.hpp"
namespace kvak {
static float proportional_weight = 0.0009115413708799999;
static float integral_weight = 1.3459823876799997e-07;
static utils::env_initializer<float> proportional_weight_init("KVAK_GARDNER_P", proportional_weight);... |
/*
체스판 다시 칠하기
https://www.acmicpc.net/problem/1018
*/
#include <iostream>
#include <vector>
using namespace std;
int m, n;
char board[51][51];
vector<int> vec;
int x, y;
int check(int row, int col, char standard) {
int count = 0;
int cur_r = row;
int cur_c = col;
char theother = 0;
if (standard == 'W')
theoth... |
/*
* Copyright 2015-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 law or a... |
// Copyright 2014 BVLC and contributors.
#include <cstring>
#include <vector>
#include "cuda_runtime.h"
#include "gtest/gtest.h"
#include "caffe/blob.hpp"
#include "caffe/common.hpp"
#include "caffe/filler.hpp"
#include "caffe/vision_layers.hpp"
#include "caffe/test/test_gradient_check_util.hpp"
#include "caffe/test... |
// Copyright (c) 2009-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 "ExtPubKey.h"
#include "PubKeyUtil.h"
#include <secp256k1.h>
#include <secp256k1_recovery.h>
/* Global secp256k1_c... |
#ifndef STAN_MATH_PRIM_MAT_FUN_GET_BASE1_HPP
#define STAN_MATH_PRIM_MAT_FUN_GET_BASE1_HPP
#include <stan/math/prim/mat/fun/Eigen.hpp>
#include <stan/math/prim/mat/err/check_range.hpp>
#include <vector>
namespace stan {
namespace math {
/**
* Return a reference to the value of the specified vector at the
* specifie... |
/*
* Copyright (c) 2008-2010 Noah Snavely (snavely (at) cs.cornell.edu)
* and the University of Washington
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of th... |
// license:BSD-3-Clause
// copyright-holders:AJR
/****************************************************************************
Skeleton driver for XBase 09 drum machine by JoMoX GmbH.
****************************************************************************/
#include "emu.h"
#include "cpu/pic17/pic17c4x.h"
#i... |
#ifndef _CISCO_IOS_XR_MPLS_LDP_OPER_5_
#define _CISCO_IOS_XR_MPLS_LDP_OPER_5_
#include <memory>
#include <vector>
#include <string>
#include <ydk/types.hpp>
#include <ydk/errors.hpp>
#include "Cisco_IOS_XR_mpls_ldp_oper_0.hpp"
#include "Cisco_IOS_XR_mpls_ldp_oper_2.hpp"
#include "Cisco_IOS_XR_mpls_ldp_oper_4.hpp"
na... |
// Copyright 2010 Google Inc. All Rights Reserved.
// Use of this source code is governed by an Apache-style license that can be
// found in the COPYING file.
//
// Functions exported by the RLZ DLL.
#include "rlz/win/lib/rlz_lib.h"
#define RLZ_DLL_EXPORT extern "C" __declspec(dllexport)
RLZ_DLL_EXPORT bool RecordPr... |
// 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 "aboutdialog.h"
#include "ui_aboutdialog.h"
#include "clientmodel.h"
#include "clientversion.h"
// Copyright year (... |
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software ... |
//===----------------------------------------------------------------------===//
// DuckDB
//
// duckdb/storage/table/segment_base.hpp
//
//
//===----------------------------------------------------------------------===//
#pragma once
#include "duckdb/common/constants.hpp"
namespace duckdb {
... |
// 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 "device/fido/mock_fido_device.h"
#include <utility>
#include "base/bind.h"
#include "base/location.h"
#include "base/strings/strcat.h"
#include... |
// Convert Sorted List to Binary Search Tree
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeN... |
//===- Metadata.cpp - Implement Metadata classes --------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
/// @copyright
/// Copyright (C) 2020 Assured Information Security, Inc.
///
/// @copyright
/// 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 limita... |
//$Id$
//------------------------------------------------------------------------------
// FunctionRunner
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool
//
// Copyright (c) 2002 - 2015 United States Government as r... |
/**
* @file gen_vtable.hpp
*
* @brief GenVtable の定義
*
* @author myoukaku
*/
#ifndef BKSGE_FND_VARIANT_DETAIL_GEN_VTABLE_HPP
#define BKSGE_FND_VARIANT_DETAIL_GEN_VTABLE_HPP
#include <bksge/fnd/variant/variant_size.hpp>
#include <bksge/fnd/variant/variant_npos.hpp>
#include <bksge/fnd/variant/detail/extra_visit_... |
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/Mulan... |
#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED
#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
//
// boost/current_function.hpp - BOOST_CURRENT_FUNCTION
//
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd... |
// 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/dns/public/util.h"
#include <set>
#include <unordered_map>
#include "base/logging.h"
#include "build/build_config.h"
#include "net/base/ip... |
/**
* Copyright (C) 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,
* ... |
/********************************************************************
* 2017 -
* open source under Apache License Version 2.0
********************************************************************/
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOT... |
#include "software/visualizer/widgets/world_view.h"
void setupSceneView(QGraphicsView* view, QGraphicsScene* scene, QOpenGLWidget* gl_widget)
{
view->setScene(scene);
view->setDragMode(QGraphicsView::ScrollHandDrag);
view->setBackgroundBrush(QBrush(Qt::darkGreen, Qt::SolidPattern));
// Performance opt... |
/*
Copyright (C) 2008 MySQL AB
Use is subject to license terms.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain softwar... |
#include "catch.hpp"
#include <osmium/geom/geos.hpp>
#include <osmium/geom/mercator_projection.hpp>
#include "area_helper.hpp"
#include "wnl_helper.hpp"
TEST_CASE("GEOS geometry factory - create point") {
osmium::geom::GEOSFactory<> factory;
std::unique_ptr<geos::geom::Point> point {factory.create_point(osm... |
// Copyright (c) 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 "net/tools/fetch/http_session.h"
#include "net/tools/fetch/http_server_response_info.h"
HttpSession::HttpSession(const std::string& ip, int ... |
/*
* Copyright (c) 2009 Peter Andrew Jamieson (jamieson.peter@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 without
* restriction, including without limitation the rights... |
/*===========================================================================
_____ _____ _____ _____
___| _|__ __|_ |__ __|__ |__ __| __ |__ ______
| \ / | || \ || | || |/ / ||___ |
| \/ | || \ || \ || \ ||___ |
|__/\__... |
/*
** EPITECH PROJECT, 2021
** babel
** File description:
** Sound
*/
#ifndef SOUND_HPP_
#define SOUND_HPP_
#include "Aportaudio.hpp"
#include "opus/opus.h"
#include <iostream>
#include <string>
#include <vector>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
namespace Sound
{
cl... |
//--------------------------------------------------------------------------------
#include "PCH.h"
#include "BezierCubic.h"
//--------------------------------------------------------------------------------
using namespace Glyph3;
//--------------------------------------------------------------------------------
Bezie... |
/***
mockcpp is a generic C/C++ mock framework.
Copyright (C) <2009> <Darwin Yuan: darwin.yuan@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the ... |
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
// The following only... |
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2018-2019, The DeployCoin Developers
//
// Please see the included LICENSE file for more information.
#include "ConsoleLogger.h"
#include <common/ConsoleTools.h>
#include <iostream>
#include <unordered_map>
namespace Logg... |
/*
-----------------------------------------------------------------------------------------------
Copyright (C) 2013 Henry van Merode. All rights reserved.
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 ... |
//===------- SemaTemplate.cpp - Semantic Analysis for C++ Templates -------===//
//
// 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
//===------------------------------... |
/*****************************************************************
|
| Neptune - Zip Support
|
| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
| All rights reserved.
|
| Redistribution and use in source and binary forms, with or without
| modification, are permitted provided that the following conditions are met:
... |
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... |
/*
* BearLibTerminal
* Copyright (C) 2013 Cfyz
*
* 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, pu... |
/**
* @brief Encoding/decoding functions
* @package encoding
* @file encoding.cpp
* @author dmryutov (dmryutov@gmail.com)
* @date 22.08.2017 -- 29.10.2017
*/
#pragma once
#include <codecvt>
#include <iostream>
#include <sstream>
#if defined(_WIN32) || defined(_WIN64)
#define USING_STATIC_LIBICONV
#endi... |
#ifndef __GRAPHCHI_RMSE_ENGINE4
#define __GRAPHCHI_RMSE_ENGINE4
/**
* @file
* @author Danny Bickson
* @version 1.0
*
* @section LICENSE
*
* Copyright [2012] [Carnegie Mellon University]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with ... |
/*
* Copyright (C) 2011-2013 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 b... |
#include "util.hpp"
#ifdef _WIN32
void Util::gotoxy(int x, int y) {
static HANDLE handle = NULL;
if (!handle) {
handle = GetStdHandle(STD_OUTPUT_HANDLE);
}
COORD coord = { x, y };
SetConsoleCursorPosition(handle, coord);
}
#else
char getch() {
char buf = ... |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance w... |
#include <mbed.h>
#include "pindef.h"
#include "CANStructs.h"
#include "Printing.h"
// #define TESTING // only defined when using test functions
#define MAIN_LOOP_PERIOD 10
CAN* can1;
Ticker canTxTicker;
AnalogIn cell_volt(CELL_VOLTAGE);
AnalogIn cell_temp(TEMPERATURE_DATA);
CellData cellData; // stores cell volt ... |
// bindgen-flags: --allowlist-type Rooted -- -std=c++14
template <typename a> using MaybeWrapped = a;
class Rooted {
MaybeWrapped<int> ptr;
};
/// <div rustbindgen replaces="MaybeWrapped"></div>
template <typename a> using replaces_MaybeWrapped = a; |
/*
==============================================================================
Chorus.cpp
Created: 25 Mar 2019 12:02:57pm
Author: Joonas
==============================================================================
*/
#include "Chorus.h"
//=======================================================... |
#include "System/hash.h"
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
Hash32 hasher32(0);
uint32_t hashcode32(void* input, size_t size)
{
hasher32.init();
hasher32.add(input, size);
return hasher32.hash();
}
Hash64 hasher64(0);
uint64_t hashcode64(void* input, size_t size)
{
hasher64.init();
has... |
#include "edge.h"
#include "graph.h"
#include "math.h"
#include "scoped_ptr.h"
#include <iostream>
#define NUM_SEGMENTS 4
#define DT (1.0/60)
Graph* CreateGraph() {
Graph* graph = new Graph();
int N;
std::cin >> N;
std::cout << "Reading " << N << " edges\n";
for (int i = 0; i < N; ++i) {
double a0, ... |
/*
* Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
/*******************************************************************************
* src/register/huff_dd_ps.cpp
*
* Copyright (C) 2017 Florian Kurpicz <florian.kurpicz@tu-dortmund.de>
* Copyright (C) 2017 Marvin Löbel <loebel.marvin@gmail.com>
*
* All rights reserved. Published under the BSD-2 license in the LICEN... |
#include "MouseInputs.h"
void MouseInputs::update() {
if (leftButton == ButtonState::PRESSED) {
leftButton = ButtonState::HELD;
} else if (leftButton == ButtonState::RELEASED) {
leftButton = ButtonState::NONE;
}
if (rightButton == ButtonState::PRESSED) {
rightButton = ButtonState::HELD;
}
else if (rightBu... |
/**
* @file llvoiceclient.cpp
* @brief Voice client delegation class implementation.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms o... |
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// initialize standard wide error stream (unsigned short version)
#ifdef _NATIVE_WCHAR_T_DEFINED
#include <fstream>
#ifndef wistream
#define wistream ushistream
#define wostream ushostream
#define wfilebuf ushfilebuf
#... |
#include "libevdev.hpp"
#include "convert/callable.hpp"
#include "thread.hpp"
#include "linux/input.hpp"
int _libevdev_new_from_fd(lua_State* const state)
{
libevdev* dev;
lua::push(state, libevdev_new_from_fd(
lua::get<int>(state, 1),
&dev
));
lua::push(state, dev);
return 2;
}
v... |
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
... |
// Copyright 2013 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#if V8_TARGET_ARCH_ARM64
#include "src/regexp/arm64/regexp-macro-assembler-arm64.h"
#include "src/arm64/macro-assembler-arm64-inl.h"
#include "src/cod... |
// Copyright 2018 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 "server.h"
#include <lib/async/default.h>
#include "src/connectivity/bluetooth/core/bt-host/common/log.h"
#include "src/connectivity/bluetooth/c... |
//$Id$
//------------------------------------------------------------------------------
// GregorianDate
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool.
//
// Copyright (c) 2002 - 2018 United States Government as ... |
/*
Copyright 2020 The Silkworm Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed ... |
class Solution {
public:
/**
* @param nums: The integer array
* @return: The length of LIS (longest increasing subsequence)
*/
int longestIncreasingSubsequence(vector<int> nums) {
// write your code here
int n=nums.size();
int i,j,k,l,rt_max=0;
std::vector<int> dp(... |
#include "CustomPrefs.h"
#include "tools/OriSettings.h"
#include <QDebug>
#include <QDir>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QFile>
#include <QWidget>
//--------------------------------------------------------------------------------
// Custo... |
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <list>
#include "pin.H"
#include <sys/time.h>
#include "utils/fn_bound.h"
/* Out file to store analysis results */
ofstream ofile;
KNOB<string> KnobOutputFile(KNOB_MODE_WRITEONCE, "pintool", "o", "/dev/null", "Specify an output file");
/* Time of i... |
/*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* 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... |
#include "pch.hpp"
#include <stdexcept>
//#include <winternl.h>
//#include <ntstatus.h>
#include "include/Async/OverlappedOp.hpp"
#include "include/Error/Win32Error.hpp"
namespace Boring32::Async
{
OverlappedOp::~OverlappedOp() { }
OverlappedOp::OverlappedOp()
: m_ioOverlapped(std::make_shared<OVERLAPPED>()),
m_... |
/*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
/**
* Copyright (c) 2016, Adrien Devresse <adrien.devresse@epfl.ch>
*
* Boost Software License - Version 1.0
*
* 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 "Software") to use, reprodu... |
// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "fiddle/examples.h"
// HASH=03d02180fee5f64ec4a3347e118fb2ec
REG_FIDDLE(Region_Spanerator_next, 256, 256, true, 0) {
void draw(SkCanvas* canvas) {
auto debugster = [](const cha... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2009 Roland Lichters
Copyright (C) 2014 Peter Caspers
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free sof... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.