text stringlengths 5 1.04M |
|---|
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.tx... |
/* $Id: taxid_set.hpp 610974 2020-06-26 12:59:33Z grichenk $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" u... |
/*Copyright (c) 2014 The Paradox Game Converters 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, mer... |
#ifndef __kdtree_HPP
#define __kdtree_HPP
//
// KdTree implementation.
//
// Copyright: Christoph Dalitz, 2018
// Jens Wilberg, 2018
// License: BSD style license
// (see the file LICENSE for details)
//
#include <cstdlib>
#include <queue>
#include <vector>
namespace Kdtree {
typedef std::ve... |
#pragma once
#include "generator/feature_builder.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/region_base.hpp"
#include <unordered_map>
namespace generator
{
namespace regions
{
class PlacePoint;
using PlacePointsMap = std::unordered_map<base::GeoObjectId, PlacePoint>;
// ... |
// Font generated by stb_font_inl_generator.c (4/1 bpp)
//
// Following instructions show how to use the only included font, whatever it is, in
// a generic way so you can replace it with any other font by changing the include.
// To use multiple fonts, replace STB_SOMEFONT_* below with STB_FONT_courier_bold_10_lat... |
#include <Interpreters/InterpreterSelectQuery.h>
#include <Interpreters/InterpreterSelectWithUnionQuery.h>
#include <Interpreters/Context.h>
#include <Parsers/ASTCreateQuery.h>
#include <Parsers/ASTSubquery.h>
#include <Parsers/ASTTablesInSelectQuery.h>
#include <Parsers/ASTSelectWithUnionQuery.h>
#include <Storages/... |
// Copyright (c) 2008-2018 LG Electronics, 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... |
// Copyright (c) 2012-2015 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 "bloom.h"
#include "base58.h"
#include "clientversion.h"
#include "key.h"
#include "merkleblock.h"
#include "random... |
#include <common/toolkit/StringTk.h>
#include "Config.h"
#include <sys/stat.h>
#define CONFIG_DEFAULT_CFGFILENAME "/etc/congfs/congfs-mon.conf"
Config::Config(int argc, char** argv): AbstractConfig(argc, argv)
{
initConfig(argc, argv, true);
// check mandatory value
if(getSysMgmtdHost().empty())
thro... |
#include <iostream>
#define Log(x) std::cout << x << std::endl
#define wait std::cin.get()
template <class T>
class stack
{
private:
int top;
int size;
T *array;
public:
stack(int);
void push(T);
void multi_push(int, T *);
T pop();
T *multi_pop(int);
bool is... |
// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#include "examples/example_compiler_gym_service/service/ExampleService.h"
#include "compiler_gym/service/proto/compiler_gym_service.pb.h"... |
#pragma once
#include <LuminoEditor/Plugin.hpp>
#include "UIExtension.hpp"
class NavigatorManager;
class AssetBrowserNavigator;
class Navigator
: public ln::Object
{
public:
Navigator() {}
virtual ln::UIElement* getNavigationMenuItem() = 0;
virtual ln::UIElement* getNavigationPane() = 0;
// View ... |
#include "FaceRecognition/FaceRecognition.h"
using namespace face_recognition;
FaceRecognition::FaceRecognition(std::string weight, std::string config, std::string recog, std::string dataset, std::string webcam){
img_result = cv::Mat::zeros(cv::Size(640, 480), CV_64FC1);
std::string weight_file = "../model/... |
#include "global_include.h"
#include "log.h"
#include "curl_wrapper.h"
#include <sstream>
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <string>
namespace mavsdk {
CurlWrapper::CurlWrapper() {}
CurlWrapper::~CurlWrapper() {}
// converts curl output to string
// taken from
// https://stackoverfl... |
#include "target_classifier.h"
#include <catboost/libs/helpers/vector_helpers.h>
#include <library/grid_creator/binarization.h>
#include <util/generic/algorithm.h>
static TVector<float> GetMultiClassBorders(int cnt) {
TVector<float> borders(cnt);
for (int i = 0; i < cnt; ++i) {
borders[i] = 0.5 + i;... |
#ifndef YOLONODEJS_LIST_H
#define YOLONODEJS_LIST_H
#include <node_api.h>
extern "C" {
#include "darknet.h"
#include "list.h"
}
#include "../utils/common.h"
#include "../helpers/common.h"
using namespace std;
/**
* @description: print matrix
* @param m: <matrix>
*/
static napi_value yolo_make_list(napi_env env, napi_... |
/*
Copyright (c) 2005-2022, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#include "org_semux_evmc_jni_Native.h"
#include <evmc/evmc.h>
#include <evmjit.h>
#include <cstdint>
#include <cstdlib>
#include <cstring>
/**
* Encodes a 32-bit integer in its BE format.
*/
inline void encode_int(int32_t num, jbyte *dest) {
dest[0] = (num >> 24) & 0xff;
dest[1] = (num >> 16) & 0xff;
de... |
/* 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 <math.h>
#include <tradingcore2/ctrlcondition/indicatorsvaread.h>
#include <tradingcore2/ctrlconditionmgr.h>
#include <tradingcore2/indicatormap.h>
#include <functional>
CR2BEGIN
// 因为是单值模式,需要判断当前值和配置值之间的关系
void CCIndicatorSVAreaD::regCtrlConditionHelper() {
CtrlConditionMgr::getSingleton()->regCtrlCondi... |
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* 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 abo... |
#pragma once
#include "types.hpp"
#include <memory>
#include <vector>
#include <map>
#include <set>
#include <queue>
namespace randpa_finality {
using std::vector;
using std::shared_ptr;
using std::weak_ptr;
using std::pair;
using std::make_pair;
using std::set;
using std::map;
template <typename ConfType>
class pr... |
// 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 "net/log/net_log_values.h"
#include "base/base64.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h... |
/*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2020 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the ... |
// Copyright (c) 2018, The TurtleCoin Developers
//
// Please see the included LICENSE file for more information.
/////////////////////////////////////
#include <WalletApi/ParseArguments.h>
/////////////////////////////////////
#include <cxxopts.hpp>
#include <config/CliHeader.h>
#include <config/CryptoNoteConfig.h>... |
//===--- CodeGenModule.cpp - Emit LLVM Code from ASTs for a Module --------===//
//
// 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
//
//===---------------------------... |
\chapter{线性表}
这类题目考察线性表的操作,例如,数组,单链表,双向链表等。
\section{数组} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Remove Duplicates from Sorted Array}
\label{sec:remove-duplicates-from-sorted-array}
\subsubsection{描述}
Given a sorted array, remove the duplicates in place such that each element appear only once and return the ne... |
/***************************************************************
*
* Copyright (C) 1990-2011, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. Yo... |
/*
* Name: IAIStringFormatUtils.cpp
* $Revision: 1 $
* Author:
* Date:
* Purpose: Plug-in side implementation of the
* ai::Locale and ai::NumberFormat object interface.
* This file should NOT be included in the
* core application.
*
* ADOBE SYSTEMS INCORPORATED
* Copy... |
/*
* This file is part of the Cadence LEF/DEF Open Source
* Distribution, Product Version 5.6, and is subject to the Cadence
* LEF/DEF Open Source License Agreement. Your continued use of
* this file constitutes your acceptance of the terms of the LEF/DEF
* Open Source License and an agreem... |
#include <Windows.h>
#include <iostream>
#include <thread>
using namespace std;
bool clicking = false;
void LeftClick()
{
INPUT Input = { 0 };
// left down
Input.type = INPUT_MOUSE;
Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
::SendInput(1, &Input, sizeof(INPUT));
// left up
::ZeroMemory(&I... |
#include <novatel_gps_driver/conv_llh_to_xyz.hpp>
double ConvLLHToXYZ::get_lat(void) const {
return m_lat;
}
double ConvLLHToXYZ::get_lon(void) const {
return m_lon;
}
double ConvLLHToXYZ::get_h(void) const {
return m_h;
}
double ConvLLHToXYZ::get_x(void) const {
return m_x;
}
double ConvLLHToXYZ::get_y(void) ... |
//===-- runtime/edit-input.cpp ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: defines a RCon class used to send rcon commands to remote servers
//
// $NoKeywords: $
//=============================================================================
#include "playerlist.h"
#include "Iresponse.h"
#include "Pl... |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
/*
* Briefing
* Dokumentacja: https://community.bistudio.com/wiki/createDiaryRecord
*/
/*
INFO: Jeśli chcesz użyć stringtable w briefingu, pamiętaj aby zamienić:
& na &
< na <
> na >
" na "
' na '
Wtedy możesz smiało użyć stringtable (przykład w stringtable.xml) i za... |
// --------------------------------------------------
//
// (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002.
// (C) Copyright Gennaro Prota 2003 - 2006.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// htt... |
//
// cross_check.cpp
// MEDYAN
//
// Created by Aravind Chandrasekaran on 9/6/17.
// Copyright © 2017 University of Maryland. All rights reserved.
//
#include <stdio.h>
#include "cross_check.h"
bool cross_checkclass::Aux=false;
|
#include "key.h"
Key::Key(){
}
Key::Key( int x , int y ){ // OUR CONSTRUCTOR. Notice no default constructor
posX = x * 64.f; // as there will be no given situation where
posY = y * 64.f;
gridX = x;
gridY = y;
velX = 0;
velY = 0;
float sxmax = 0;
float symax = 0;
float sxmin ... |
#include "Intel8080Emulator.h"
Compucolor::Impl::Intel8080::Intel8080Emulator::Intel8080Emulator(
std::shared_ptr<Compucolor::Memory::IMemory> memory
):
_context(
std::unique_ptr<Compucolor::Impl::Intel8080::Intel8080EmulatorContext>(
new Compucolor::Impl::Intel8080::Intel8080EmulatorContex... |
///////////////////////////////////////////////////////////////////////
// C Implementation of Wu's Color Quantizer (v. 2)
// (see Graphics Gems vol. II, pp. 126-133)
//
// Author: Xiaolin Wu
// Dept. of Computer Science
// Univ. of Western Ontario
// London, Ontario N6A 5B7
// wu@csd.uwo.ca
//
// Algorithm: G... |
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... |
#include "Client.h"
#include <iostream>
#include <unistd.h>
#include <SFML/Graphics.hpp>
#include <thread>
#include "state.h"
#include "ai.h"
#include "../render/StateLayer.h"
namespace render {
class StateLayer;
};
using namespace state;
using namespace engine;
using namespace render;
using namespace std;
using ... |
/*
* Copyright (c) 2021 Huawei Device 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 ... |
/*
* 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... |
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
/*
**==============================================================================
**
** Copyright (c) Microsoft Corporation. All rights reserved. See file LICENSE
** for license information.
**
**==============================================================================
*/
#include "NitsNewInterfaceTests.h"
Nit... |
#include<bits/stdc++.h>
#include"binarysearchtree.h"
#include"binarysearchtree.cpp"
using namespace std;
int main()
{
TreeType<int>BST;
if(BST.IsEmpty())
cout << "Tree is empty" << endl;
else
cout << "Tree is not empty" << endl;
BST.InsertItem(4);
BST.InsertItem(9);
BST.Insert... |
#pragma once
#include <cstdint>
#include <exception>
#include <util/debug.hpp>
#include <backends/gpu/fill.hpp>
#include "allocator.hpp"
#include "array.hpp"
#include "definitions.hpp"
#include "gpu.hpp"
#include "util.hpp"
namespace arb {
namespace memory {
// forward declare
template <typename T, class Allocator... |
// 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 "wallet.h"
#include "walle... |
#ifdef DEBUG_THREEVECTOR
#include <iostream>
#include <assert.h>
#include <stdlib.h>
using namespace std;
#endif
#include "dem_parser/threevector.h"
#include <math.h>
#define sind(x) (sin(fmod((x),360) * M_PI / 180))
#define cosd(x) (cos(fmod((x),360) * M_PI / 180))
ThreeVector::ThreeVector() {
this->x = 0;
... |
#ifndef _FTK_CONNECT_COMPONENT_TRACKER
#define _FTK_CONNECT_COMPONENT_TRACKER
#include <ftk/filters/filter.hh>
#include <ftk/tracking_graph/tracking_graph.hh>
namespace ftk {
template <typename TimeIndexType=size_t, typename LabelIdType=size_t>
struct connected_component_tracker : public filter
{
connected_compone... |
// ======================================================================== //
// Copyright 2009-2013 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... |
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkFEMSolverHyperbolic.cxx,v $
Language: C++
Date: $Date: 2009-01-30 21:53:03 $
Version: $Revision: 1.7 $
Copyright (c) Insight Software Consortiu... |
/*
You are given an array of integers nums, there is a sliding window of size k which is moving
from the very left of the array to the very right. You can only see the k numbers in the window.
Each time the sliding window moves right by one position.
Return the max sliding window.
Example 1:
Input: nums = [1,3,... |
//===-- SIBufMemMerge.cpp -------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
// Modifications Copyright (c) 2019 Advanced Micro Devices, Inc... |
#include "CBabobba.h"
#include "../../common/ai/CPlayerBase.h"
#include "../../common/ai/CPlayerLevel.h"
#include "../../common/ai/CBullet.h"
#include <base/utils/misc.h>
namespace galaxy
{
/*
$2F48W #Babobba jump 0
$2F66W #Babobba jump
$2F84W #Babobba sit 2
$2FA2W #Babobba sit [shoot] 3
$2FC0W #Babobba jump... |
/*Exercise 1 - Calculations
Convert the C program given below which converts a length given in cm to inches to a C++ program.
Please Note that the input command in C++ is std::cin. This is a representation of the Keyboard.
e.g.
float data1;
int data2;
scanf("%f", &data1); --> std::cin >> data1;
scanf("%d", &data2)... |
// Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2018 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "transactionrecord.h"
#include "base58.h"
#include "consensus/c... |
//
// CGen
// https://cgen.sophisticatedways.net
// Copyright © 2018 Volodymyr Skladanivskyy. All rights reserved.
// Published under terms of MIT license.
//
#ifndef shared_hpp
#define shared_hpp
#include <map>
#include <vector>
#include "variablesarray.hpp"
#define APP_VERSION "1.1"
#define APP_TITLE "CGen"
#d... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2004 Ferdinando Ametrano
Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
... |
// Copyright 2021 The Tint 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 ... |
//
// QuotedPrintableDecoder.cpp
//
// $Id: //poco/1.4/Net/src/QuotedPrintableDecoder.cpp#2 $
//
// Library: Net
// Package: Messages
// Module: QuotedPrintableDecoder
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// Permission is hereby granted, free... |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "halide_image.h"
#include "halide_image_io.h"
#include "pipeline_native.h"
#include "pipeline_hls.h"
#include "coreir.h"
#include "coreir/passes/transform/rungenerators.h"
#include "coreir/simulator/interpreter.h"
#include "coreir/libs/commonlib.h"
... |
#include <iostream>
#include <fstream>
#include <cstring>
#include <cstdlib>
#include <iomanip>
#include <cstdio>
#include <cerrno>
using namespace std;
class AIRLINE
{
/****************************************
Ticket Booking Requirements
******************************************/
char name[20],email[30],address[20... |
// Copyright (c) 2011-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 "addresstablemodel.h"
#include "guiutil.h"
#include "walletmodel.h"
#include "base58.h"
#include "wallet/wallet.h"... |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define pll pair<ll,ll>
#define gcd(a,b) __gcd(a,b)
const int mod = 1e9+7;
int primes[] = {2,3,5,7};
int n;
int arr[100005];
ll arr1[100005];
ll dp[100005][4][1<<5];
//std::map<ll,... |
// MFEM Mesh Optimizer Miniapp - Serial/Parallel Shared Code
#include "mfem.hpp"
#include <fstream>
#include <iostream>
using namespace mfem;
using namespace std;
double discrete_size_2d(const Vector &x)
{
int opt = 2;
const double small = 0.001, big = 0.01;
double val = 0.;
if (opt == 1) // s... |
// Time: O(m * n)
// Space: O(m)
// DP Solution with rolling window
class Solution {
public:
/**
* @param s: A string
* @param p: A string includes "?" and "*"
* @return: A boolean
*/
bool isMatch(const char *s, const char *p) {
const size_t s_len = strlen(s);
const size_t ... |
//
// $Id$
//
//
// Original author: Darren Kessner <darren@proteowizard.org>
//
// Copyright 2008 Spielberg Family Center for Applied Proteomics
// Cedars-Sinai Medical Center, Los Angeles, California 90048
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in... |
/*
Copyright (c) 2005-2019, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
/**
* Copyright 2019 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... |
/*******************************************************************************
* Copyright 2016-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://www.apa... |
// Copyright (c) 2020 The DigiByte Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chainparams.h>
#include <chainparamsbase.h>
#include <key.h>
#include <pubkey.h>
#include <script/sigcache.h>
#include ... |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2019 Evandro de Souza
*
* 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 Free Software Foundation;
*
* This program is ... |
/*
//@HEADER
// ************************************************************************
//
// KokkosKernels 0.9: Linear Algebra and Graph Kernels
// Copyright 2017 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retain... |
extern "C"
{
__declspec(dllexport) float __stdcall InvertSqrt(float x) {
float xhalf = 0.5f * x;
int i = *(int*)&x;
i = 0x5f3759df - (i >> 1);
x = *(float*)&i;
x = x * (1.5f - xhalf * x * x);
return x;
}
}
extern "C"
{
__declspec(dllexport) int __stdcall power2(int num, int power)
{
__asm
{
mov... |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "backend/plain/peer.hpp"
using namespace shared_model;
using namespace shared_model::plain;
Peer::Peer(const interface::types::AddressType &address,
const interface::types::PubkeyType &public_key,... |
#pragma once
#include <array>
#include <cstdint>
#include <string_view>
#include <RED4ext/CName.hpp>
#include <RED4ext/CString.hpp>
#include <RED4ext/Common.hpp>
#include <RED4ext/HashMap.hpp>
#include <RED4ext/InstanceType.hpp>
#include <RED4ext/Unks.hpp>
namespace RED4ext
{
struct CBaseRTTIType;
struct CDateTime
... |
/*
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
*/
//==================================================================================================
#pragma once
#include <eve/detail/overload.hpp>
#include <eve/function/all.hpp>
#include <eve/function/... |
//=================================================================================================
/*!
// \file src/mathtest/operations/dvecdveckron/V3aVUa.cpp
// \brief Source file for the V3aVUa dense vector/dense vector Kronecker product math test
//
// Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserv... |
class Solution {
public:
vector<vector<int>> kClosest(vector<vector<int>> &points, int K) {
vector<vector<int>> ret;
sort(points.begin(), points.end(), [](vector<int> &v1, vector<int> v2) {
return (pow(v1[0], 2) + pow(v1[1], 2)) < (pow(v2[0], 2) + pow(v2[1], 2));
});
for ... |
#pragma once
#ifndef JM_UNITS_CORE_SCALES_HPP
#define JM_UNITS_CORE_SCALES_HPP
#include <cstdint> // INTMAX_MAX
#include <ratio>
#if INTMAX_MAX / 1000000000000000000 >= 1000
#define JM_UNITS_ZT_AVAILABLE
#endif
#if INTMAX_MAX / 1000000000000000000 >= 1000000
#define JM_UNITS_YT_AVAILABLE
#endif
namespace... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE762_Mismatched_Memory_Management_Routines__delete_array_int_realloc_07.cpp
Label Definition File: CWE762_Mismatched_Memory_Management_Routines__delete_array.label.xml
Template File: sources-sinks-07.tmpl.cpp
*/
/*
* @description
* CWE: 762 Mismatched Memory Mana... |
/*
* Copyright(c) Sophist Solutions, Inc. 1990-2021. All rights reserved
*/
#include "../StroikaPreComp.h"
#include <cstdlib> // to force __GLIBCXX__ define reference
#if defined(__GNUC__) && defined(__GLIBCXX__)
#include <cxxabi.h>
#elif qPlatform_Windows
#include <Windows.h>
#include <Dbghelp.h>
#endif
#includ... |
/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation... |
// fts_index_format.cpp
/**
* 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... |
//---------------------------------------------------------------------------//
// Copyright (c) 2016 Jason Rhinelander <jason@imaginary.ca>
//
// 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
//
// See http:/... |
#pragma once
#include "../../sk_math.hpp"
#include <cstdint>
#include <string>
#include <vector>
namespace flexbuffers {
class Map;
}
namespace StardustXRFusion {
class Datamap {
public:
explicit Datamap(const flexbuffers::Map &flexDatamap);
std::vector<std::string> keys() const;
bool exists(std::string key) c... |
//Copyright 2020 Iris Technologies, All Rights Reserved
#pragma once
#include <string>
#include <vector>
using namespace std;
namespace ProjectIris
{
namespace Hashes
{
constexpr size_t InitApp = 4229616916362953318;//initapp
constexpr size_t IsConsole = 4280226163429640506;//isconsole
conste... |
#include <iostream>
#include <list>
#include <algorithm>
#include <map>
#include <string>
using namespace std;
typedef map<int,list<int> >::iterator IteratorM;
typedef list<int>::iterator IteratorL;
int main (int argc, char *argv[])
{
map<int,list<int> > m;
list<int> l1, l2;
l1.push_back(1);
... |
#include "SymbolsLookup.hpp"
namespace Helpers
{
void SymbolsLookup::Put(const SymbolInfo& aSymbolInfo)
{
const auto& code = aSymbolInfo.Code;
if (!code.Length)
{
return;
}
mLengthsIndex[code.Length][code.Value] = aSymbolInfo.Symbol;
}
SymbolsLook... |
/*****************************************************************************
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Founda... |
/*
* Copyright (c) 2019, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publis... |
// MIT License (c) 2019 BYU PCCL see LICENSE file
#include "Holodeck.h"
#include "HandAgentMaxTorqueFloat.h"
void UHandAgentMaxTorqueFloat::Execute(void* const CommandArray, void* const InputCommand, float DeltaSeconds) {
float* InputCommandFloat = static_cast<float*>(InputCommand);
// Call the other controller s... |
// 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/root_window.h"
#include <vector>
#include "base/bind.h"
#include "base/run_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
... |
/**
* @copyright
* Copyright (c) 2012-2017, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/LICENSE.txt
*/
#include "BoundaryElementsAtPoint.h"
#include "GeoLib/Po... |
#include "Graph.h"
GGraph::GGraph() {}
GGraph::~GGraph() {} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.