text stringlengths 7 961k |
|---|
/*
Fill dense 3d voxels with indices
Written by Jiageng Mao
*/
#include <torch/serialize/tensor.h>
#include <vector>
#include <THC/THC.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include "fill_dense_gpu.h"
extern THCState *state;
#define CHECK_CUDA(x) do { \
if (!x.type().is_cuda()) { \
fprintf(stderr... |
// 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/sync/protocol/proto_value_conversions.h"
#include <string>
#include "base/strings/string_number_conversions.h"
#include "base/t... |
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commer... |
/*
***********************************************************************************************************************
*
* Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associ... |
// Copyright 2016 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.
#include "src/json-stringifier.h"
#include "src/conversions.h"
#include "src/lookup.h"
#include "src/message-template.h"
#include "src/objects-inl.h"
#... |
// Copyright 2018 Google 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 ... |
/*
This file is part of the Dynarithmic TWAIN Library (DTWAIN).
Copyright (c) 2002-2020 Dynarithmic Software.
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.... |
/**
* Copyright 2018-2019 Dynatrace 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 i... |
// Copyright 2016 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 <string.h>
#include <memory>
#include <string>
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include... |
// 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/base/network_change_notifier_linux.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/threading/thread.h"
#in... |
#ifndef PX_CG_ITEM_HPP
#define PX_CG_ITEM_HPP
#include <string>
#include <vector>
#include <memory>
#include <stdexcept>
#include <iostream>
#include "shader/base_shader.hpp"
namespace px
{
class ItemError;
class Item;
struct ItemInfo;
struct Light;
class Rigid;
typedef std::shared_ptr<Item> (*ItemGenFn)();
}
str... |
#include "utils_stdafx.h"
#include <sstream>
#include <Debug/Assertion.h>
#include "Debug/Log.h"
using namespace Debug;
Assertion::Assertion(const char* p_expression, const char* p_file, const int p_line, const std::string& p_message):
m_expression(p_expression), m_file(p_file), m_line(p_line), m_message(p_message... |
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "combiningfeedview.h"
#include <vespa/searchcore/proton/documentmetastore/i_document_meta_store.h>
#include <vespa/searchcore/proton/feedoperation/operations.h>
#include <vespa/searchcore/proton/bucketdb/b... |
// This autogenerated skeleton file illustrates how to build a server.
// You should copy it to another filename to avoid overwriting it.
#include "HelloWorldService.h"
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/server/TSimpleServer.h>
#include <thrift/transport/TServerSocket.h>
#include <thrift/tra... |
/*
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <cstdlib>
#include <string>
#include "util/debug.h"
#include "util/optional.h"
#include "util/utf8.h"
namespace lean {
bool is_utf8_next(unsigned ... |
//
// Created by wenjuxu on 2018/12/19.
//
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "scope_guard.h"
TEST_CASE("Test scope guard", "[scope_guard]")
{
int x;
try
{
x = -1;
auto scope_guard = orange::ScopeGuard([&] { x = 42; });
throw std::runtime_error("");
}
... |
/* Copyright (c) 2021 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "common/base/Base.h"
#include "kvstore/RocksEngineConfig.h"
#include "tools/db-upgrade/DbUpgrader.h"
void printHelp() {
fprintf(
stderr,
R"( ./db_upgrade --src_db_path=<path ... |
#include "SdfRenderer2D.hpp"
#include "Utility/File.hpp"
SdfRenderer2D::SdfRenderer2D()
{
_shader.compile(MyFile::LoadToString("shaders/rendering/2D.fs.glsl"));
}
void
SdfRenderer2D::render(int gridSize)
{
_shader.get().bind();
_shader.get().setUniformValue("u_AspectRatio",
... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "util.h"
#include "sync.h"
#include "strlcpy.h"
#include "version.h"
#inc... |
/*
* Copyright (C) 2009 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
/*
* Copyright (c) 2017, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at w... |
#include <iostream>
#include <string>
#include <array>
#include "CFourClass.h"
std::string ConnectFour::tileDraw(tile t) {
switch(t) {
case blue : return "🔵";
case red : return "🔴";
case white : return "⚪";
}
}
tile ConnectFour::checkWin() {
for (int r = 0; r < 6; r++) { // check... |
// Copyright 2019 - David Conran (@crankyoldgit)
#ifndef UNIT_TEST
#include <Arduino.h>
#endif // UNIT_TEST
#include "IRremoteESP8266.h"
#include "i18n.h"
// Common
String kUnknownStr = D_STR_UNKNOWN;
String kProtocolStr = D_STR_PROTOCOL;
String kPowerStr = D_STR_POWER;
String kOnStr = D_STR_ON;
String kOffStr = D_... |
// 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 "read.h"
#include <fuchsia/inspect/cpp/fidl.h>
#include <lib/fdio/directory.h>
#include <lib/fit/bridge.h>
#include <lib/fit/promise.h>
#include ... |
// Copyright 2010-2020, Google 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:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of condit... |
/*
settingwnd.cpp
Copyright (C) 2007 Acekard, www.acekard.com
Copyright (C) 2009 somebody
Copyright (C) 2009 yellow wood goblin
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 Foundat... |
/*
* MIT License
*
* Copyright (c) 2020 Robert Grupp
*
* 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, mod... |
/*************************************************************************
Copyright (c) 2019 Cognitics, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without... |
#pragma once
#include "../relacy/relacy_std.hpp"
template<int T>
struct cas_spurious_fail_test : rl::test_suite<cas_spurious_fail_test<T>, 1, rl::test_result_until_condition_hit>
{
std::atomic<int> x;
std::atomic<int> y;
void before()
{
x.store(0, std::memory_order_relaxed);
y.store... |
#include "saber/lite/core/context_lite.h"
#ifdef PLATFORM_ANDROID
#include <sys/syscall.h>
#include <unistd.h>
#define __NCPUBITS__ (8 * sizeof (unsigned long))
#define __CPU_SET(cpu, cpusetp) \
((cpusetp)->mask_bits[(cpu) / __NCPUBITS__] |= (1UL << ((cpu) % __NCPUBITS__)))
#define __CPU_ZERO(cpusetp) \
memset(... |
#include "visible/Sprite.h"
#include "visible/ImageLoader.h"
Sprite::Sprite(const string& fileName): Node()
{
image = ImageLoader::load(fileName);
size = Size( image.size(), image[0].size() );
updateCenter();
verify();
}
Sprite::Sprite(const Image image): Node()
{
setImage( image );
}
Sprite* Sprite::create(con... |
#include "color.hpp"
#include <gtest/gtest.h>
#include <type_traits>
TEST(ColorTest, IsDefaultConstructible)
{
ASSERT_TRUE(std::is_default_constructible<jt::Color>::value);
}
TEST(ColorTest, InitialValues)
{
jt::Color c {};
ASSERT_EQ(c, jt::colors::Black);
}
TEST(ColorTest, SetValues)
{
jt::Color c {... |
// 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 "base/strings/string_util.h"
#include <ctype.h>
#include <errno.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
... |
#ifndef LALR_REGEXSTATELESS_HPP_INCLUDED
#define LALR_REGEXSTATELESS_HPP_INCLUDED
#include <memory>
namespace lalr
{
class RegexState;
/**
// Indirectly compare objects through two `std::unique_ptr<>` objects.
*/
class RegexStateLess
{
public:
bool operator()( const std::unique_ptr<RegexState>& lhs, const std::... |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... |
/*--------------------------------------------------------------------------
Copyright (c) 2014-2017,2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of so... |
#include <iostream>
#include <algorithm>
#include <queue>
#include <climits>
using namespace std;
const int D[][2] = { {0,1},{1,0},{-1,0},{0,-1} };
char map[1000000];
int dis[4][1000000], sdis[4][4];
int get(int x, int y, int m) { return x*m + y; }
bool islegal(int x, int y, int n, int m) { return x >= 0 && x < n && y... |
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2015-2017 The GCX 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 "db.h"
#include "init.h"
#include "main.h... |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lambda/model/UpdateFunctionConfigurationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lambda::Model;
using namespace Aws::Utils::Js... |
//===--- ParseAST.cpp - Provide the clang::ParseAST method ----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
//===----------------------------------------------------------------------===//
//
// 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:
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "tier0/dbg.h"
#include <stdio.h>
#include "drawhelper.h"
// #define COLOR_BACKGROUND RGB( 120, ... |
/*
* Copyright 2010-2017 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 2020 FUJITSU LIMITED
*
* 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... |
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifnd... |
#ifndef RTI_TREATMENT_MACHINE_RBE_1P1_H
#define RTI_TREATMENT_MACHINE_RBE_1P1_H
/// \file
///
/// Treatment machine for Lunder proton center and TOPAS MC code
#include <rti/base/rti_treatment_machine_ion.hpp>
namespace rti{
namespace rbe{
/// \class rbe_1p1
/// represents beam model for Lunder IMPT machine in MGH
... |
#include "../coroutine.h"
#include "tx.h"
#include "_connection_lock.h"
#include "mysql.h"
namespace flame::mysql {
void tx::declare(php::extension_entry &ext) {
php::class_entry<tx> class_tx("flame\\mysql\\tx");
class_tx
.method<&tx::__construct>("__construct", {}, php::PRIVATE)
... |
/**
* Copyright (c) 2009 Carnegie Mellon University.
* 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... |
// iOS mojo runtime.
//
// Copyright 2011 Mark Sibly, all rights reserved.
// No warranty implied; use at your own risk.
//***** gxtkGraphics.h *****
class gxtkSurface;
class gxtkGraphics : public Object{
public:
gxtkGraphics();
//***** GXTK API *****
virtual int Width();
virtual int Height();
virtual bool ... |
// Copyright (c) 2015 - 2020 The AYCHDeveloper
// Distributed under the MIT software license, the AGPL-3.0+, see the accompanying
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
// file LICENSE or https://www.gnu.org/licenses.
#include <zmq/zmqnotificationinterface.h>
#include <zmq/zmqpublishnot... |
#include <iostream>
#include <vector>
using namespace std;
typedef vector<int> bignum;
bignum inttobignum(int n)
{
bignum bn;
for(; n != 0; n /= 10)
{
bn.push_back(n % 10);
}
return bn;
}
void printbn(bignum bn)
{
bignum::reverse_iterator rit = bn.rbegin();
for (; rit != bn.rend()... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2020 The PIVX developers
// Copyright (c) 2020 The Lightcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYI... |
#include "rpcconsole.h"
#include "ui_rpcconsole.h"
#include "clientmodel.h"
#include "bitcoinrpc.h"
#include "guiutil.h"
#include <QTime>
#include <QTimer>
#include <QThread>
#include <QTextEdit>
#include <QKeyEvent>
#include <QUrl>
#include <QScrollBar>
#include <openssl/crypto.h>
// TODO: make it possible to filt... |
#include "../src/ast/source.hpp"
#include <gtest/gtest.h>
TEST(ManagerTest, Sample)
{
/*
auto cast = [](dragon::Handle p)
{
return dynamic_cast<dragon::Identifier*>(p.get());
};
auto a = new dragon::Identifier(L"a");
auto b = new dragon::Identifier(L"b");
auto c = new dragon::Identifier(L"c");
dr... |
/*
* GraphBLAS Template Library (GBTL), Version 3.0
*
* Copyright 2020 Carnegie Mellon University, Battelle Memorial Institute, and
* Authors.
*
* THIS MATERIAL WAS PREPARED AS AN ACCOUNT OF WORK SPONSORED BY AN AGENCY OF
* THE UNITED STATES GOVERNMENT. NEITHER THE UNITED STATES GOVERNMENT NOR THE
* UNITED STA... |
/*
MIT License
Copyright(c) 2018-2020 megai2
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, publish, dist... |
// Copyright 2019-20 Genten Studios
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclai... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
// Copyright 2012 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.
#include "src/crankshaft/x87/lithium-x87.h"
#include <sstream>
#if V8_TARGET_ARCH_X87
#include "src/crankshaft/hydrogen-osr.h"
#include "src/cranksha... |
/*
Copyright (c) 2011-2014 University of Zurich
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, m... |
#ifndef _CISCO_IOS_XR_MPLS_LDP_OPER_2_
#define _CISCO_IOS_XR_MPLS_LDP_OPER_2_
#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_1.hpp"
namespace cisco_ios_xr {
namespace Cisco_IOS_X... |
#include "search/downloader_search_callback.hpp"
#include "search/result.hpp"
#include "editor/editable_data_source.hpp"
#include "indexer/data_source.hpp"
#include "storage/country_info_getter.hpp"
#include "storage/storage.hpp"
#include "base/logging.hpp"
#include "base/string_utils.hpp"
#include <set>
#include... |
// Copyright (C) 2019 Greg Dionne
// Distributed under MIT License
#ifndef FETCHER_HPP
#define FETCHER_HPP
#include <stdio.h>
class Fetcher {
public:
char buf[BUFSIZ];
char token[BUFSIZ];
int argc_;
char **argv_;
int argcnt;
int linenum;
int colnum;
int argfile;
int keyID;
Fetcher(int argc, char *... |
#pragma once
#include <arrayfire.h>
#include <cereal/types/polymorphic.hpp>
#include "../cereal_archives.hpp"
#include "../feed.hpp"
#include "../weightless_stage.hpp"
namespace nn {
class Tanh : public WeightlessStage {
public:
~Tanh() = default;
Tanh() = default;
void forward(Feed &f) override;
void backw... |
// Copyright (c) 2017 - 2020 - The SmartCash Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "smarthive/hivepayments.h"
#include "smarthive/hive.h"
#include "smartnode/spork.h"
#include "consensus/consensus.h... |
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... |
/**
* Copyright (c) 2016-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.
*/
#include <... |
/* MIT License
#
# Copyright (c) 2020 Ferhat Geçdoğan All Rights Reserved.
# Distributed under the terms of the MIT License.
#
# */
#include <iostream>
#include "../../include/FString.hpp"
int main(void) {
FString a('o');
FString b('k');
FString c('!');
std::cout << "A: " << a << "\n" <<
"B: ... |
// https://github.com/TriviaMarketing/Jaro-Winkler
#ifndef JAROWINKLER_HPP
#define JAROWINKLER_HPP
#include <string>
const double JARO_WEIGHT_STRING_A(1.0/3.0);
const double JARO_WEIGHT_STRING_B(1.0/3.0);
const double JARO_WEIGHT_TRANSPOSITIONS(1.0/3.0);
const unsigned long int JARO_WINKLER_PREFIX_SIZE(4);
const do... |
// Copyright (c) 2012-2018 The Olivingcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <random.h>
#include <scheduler.h>
#include <test/test_olivingcoin.h>
#include <boost/thread.hpp>
#include <boo... |
#include "teca_table.h"
#include "teca_binary_stream.h"
#include "teca_dataset_util.h"
#include "teca_string_util.h"
#include "teca_bad_cast.h"
teca_table::impl_t::impl_t() :
columns(teca_array_collection::New()), active_column(0)
{}
// --------------------------------------------------------------------------
... |
// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... |
#include "rawhid/driver.hpp"
// #include "rawhid/hid_LINUX.c"
#include <nan.h>
const int maxValue = 10;
int numberOfCalls = 0;
LB::Driver driver;
NAN_METHOD(Connect) { info.GetReturnValue().Set(driver.connect()); }
NAN_METHOD(IsConnected) { info.GetReturnValue().Set(driver.is_connected()); }
NAN_METHOD(Sync) { i... |
/*
Target CPU: ESP32
UART Emulation with special features for LocoNet (half-duplex network with DCMA) by Hans Tanner.
See Digitrax LocoNet PE documentation for more information
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publishe... |
#include "Sound.h"
#include <al/al.h>
#include <al/alc.h>
#include <al/alu.h>
#include <al/alut.h>
#include <assert.h>
#include "SoundManager.h"
Sound::Sound(SoundManager* manager) :
soundManager_(manager),
bufferID_(INVALID_ID),
sourceID_(INVALID_ID),
loop_(false)
{
//assert(manager);
}
Sound::~Sound()
{
... |
#include "Bullet.h"
Bullet::Bullet() {
SetName("Bullet"); //DO NOT EDIT
NewVariable("timer", 0.0f);
}
Bullet::~Bullet() {
}
void Bullet::OnStart() {
SetMass(5.0f);
}
void Bullet::OnFixedUpdate(float deltaTime) {
SetLinearVelocity(GetForward()* 20.0f);
VariableAdd("timer", deltaTime);
if (VariableGetFloat("... |
// 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 "sendcoinsentry.h"
#include "ui_sendcoinsentry.h"
#include "addressbookpage.h"
#include "addresstablemodel.h"
#incl... |
class Solution {
public:
string stringShift(string s, vector<vector<int>>& shift) {
int final_shift_value=0 , final_direction=1;
int n = shift.size();
int str_len = s.length();
for(int i=0; i < n ; i++){
if(shift[i][0]==0){
final_shift_value -= shift[i][1]... |
/******************************************************************************
* Copyright 2020 ETC 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/l... |
// Copyright 2018 Xiaomi, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... |
// 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 <stddef.h>
#include <memory>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/f... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
/*=========================================================================
Program: Visualization Toolkit
Module: TestExtractSelectionUsingDataAssembly.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details... |
/******************************************
* Filename: wumpus.cpp
* Description: implementation file for wumpus class
* Input: header
* Output: default constructor, getters, setters
******************************************/
#include "wumpus.h"
using namespace std;
Wumpus::Wumpus()
{
message = "You smell terrib... |
// Copyright (c) 2012-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 <clientversion.h>
#include <tinyformat.h>
/**
* Name of client reported in the 'version' message. Report the sam... |
/*
* 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 2020 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... |
/*=========================================================================
*
* 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... |
#pragma once
//------------------------------------------------------------------------------
//
// Copyright 2018-2020 Fetch.AI Limited
//
// 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... |
#include <vector>
#include <algorithm>
#include <sstream>
#include <iterator>
#include <iostream>
#include <stdexcept>
class SubsetGenerator {
public:
SubsetGenerator(int n, int k) : set_size{n}, subset_size{k}, indices {std::vector<int>(k)} {}
void Fill(std::vector<int>& buffer) {
for (int i = 0; i ... |
#include "vr/io/files.h"
#include "vr/io/sql/sql_connection_factory.h"
#include "vr/io/uri.h"
#include "vr/settings.h"
#include "vr/util/di/container.h"
#include "vr/test/utility.h"
//----------------------------------------------------------------------------
namespace vr
{
namespace io
{
//............................ |
// Copyright (c) 2011 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/mach_broker_mac.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/mach_ipc_mac.h"
#include "base/st... |
/*
* Copyright (C) 2013 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
// 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 "content/browser/renderer_host/input/touch_event_queue.h"
#include "base/auto_reset.h"
#include "base/debug/trace_event.h"
#include "base/stl_ut... |
/**************************************************************
*
* 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 2014 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/ui/webui/options/supervised_user_learn_more_handler.h"
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"... |
#pragma once
#include "bit_reader.hpp"
#include "decompress.hpp"
#include "SDL_image.h"
#include "swf_character.hpp"
namespace swf
{
class image_def : public character_def
{
public:
MAKE_FACTORY(image_def);
virtual bool is_a(ASClass id) override { return id == ASClass::IMAGE_DEF ? true : character_def::is_a(i... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The LogisCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.