text stringlengths 54 60.6k |
|---|
<commit_before>#ifndef ITER_CHAIN_HPP_
#define ITER_CHAIN_HPP_
#include "internal/iterbase.hpp"
#include <array>
#include <initializer_list>
#include <iterator>
#include <memory>
#include <tuple>
#include <type_traits>
#include <utility>
namespace iter {
namespace impl {
template <typename TupType, std::size_t... |
<commit_before>// Copyright (c) 2013 GitHub, Inc. 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 "content/public/app/content_main.h"
namespace node {
int Start(int argc, char *argv[]);
}
#if defined(OS_WIN)
#... |
<commit_before>// cells.cpp
// 3-D Rods
// Author: Yuding Ai
// Date: 2015.07.15
#include "cells.h"
extern const string EXC_INVALID_DESC = "Not a valid description of cells!";
Cells::Cells()
{
Boxlist.clear();
Planelist.clear();
N0 = 1;
N1 = 1;
N2 = 1;
size = 1;
//initialize my cell
arr = new Square[1];
arr... |
<commit_before>/* Copyright (c) 2013 Simeon Bird <spb@ias.edu>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS... |
<commit_before>/*************************************************************************
*
* $RCSfile: persist.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2003-03-18 13:48:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licens... |
<commit_before><commit_msg>Revert "Dupe code removal in cui"<commit_after><|endoftext|> |
<commit_before>//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
// version: $Id$
// author: Axel Naumann <axel@cern.ch>
//------------------------------------------------------------------------------
#include "IncrementalParser.h"
#includ... |
<commit_before>#include <glog/logging.h>
#include <gflags/gflags.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
int main(int argc, char **argv)
{
::gflags::ParseCommandLineFlags(&argc, &argv, false);
::testing::GTEST_FLAG(throw_on_failure) = true;
::testing::InitGoogleMock(&argc, argv);
return R... |
<commit_before>#include <iostream>
#include "../src/Trie.h"
using namespace std;
int main() {
Trie* trie = new Trie();
trie->add("asparagus");
trie->add("aspen");
cout << "This should be true: " << trie->search("asparagus") << endl;
cout << "This should be false: " << trie->search("aaragus") << endl;
}
<com... |
<commit_before>/** \brief A MARC-21 filter utility that adds ACO tags with entry $a set to 1 for article collections.
* \author Dr. Johannes Ruscheinski (johannes.ruscheinski@uni-tuebingen.de)
*
* \copyright 2017 Universitätsbibliothek Tübingen. All rights reserved.
*
* This program is free software: you can ... |
<commit_before>//*****************************************************************************
// Copyright 2017-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
... |
<commit_before>#include <iostream>
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
namespace {
class OpenMeshMeshCastTest: public testing::Test {
};
struct TriTraits1: public OpenMesh::DefaultTraits {
typedef OpenMesh::Vec3d Point;
};
struct TriTraits2: public OpenMesh::DefaultTraits {
... |
<commit_before><commit_msg>It was depthMask!<commit_after><|endoftext|> |
<commit_before>// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/frame_subscriber.h"
#include "atom/common/native_mate_converters/gfx_converter.h"
#include "base/bind.h"
#include "content/public/browser/ren... |
<commit_before>
/*
* Copyright (c) 2015-2020 Agalmic Ventures LLC (www.agalmicventures.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 limit... |
<commit_before>////////////////////////////////////////////////////////////////////////////////
// Name: process.cpp
// Purpose: Implementation of class wxExProcess
// Author: Anton van Wezenbeek
// Copyright: (c) 2012 Anton van Wezenbeek
///////////////////////////////////////////////////////////////////////... |
<commit_before>////////////////////////////////////////////////////////////////////////////////
// Name: stcfile.cpp
// Purpose: Implementation of class wxExSTCFile
// Author: Anton van Wezenbeek
// Copyright: (c) 2012 Anton van Wezenbeek
///////////////////////////////////////////////////////////////////////... |
<commit_before>#include "common/common.h"
#include "common/random_utils.h"
#include "common/cmd_options.h"
#include "common/graph/dot_graph.h"
#include "common/graph/dot_parser.h"
#include "clustering.h"
#include "metrics.h"
#include <memory>
void PrepareCMDOptions(int argc, char** argv, CMDOptions& arg... |
<commit_before>/*
* VehicleControlDeviceImplementation.cpp
*
* Created on: 10/04/2010
* Author: victor
*/
#include "VehicleControlDevice.h"
#include "VehicleControlObserver.h"
#include "server/zone/managers/objectcontroller/ObjectController.h"
#include "server/zone/objects/creature/CreatureObject.h"
#includ... |
<commit_before><commit_msg>adds tcl binding for packet header<commit_after>int protoname_pkt::offset_;
static class ProtonameHeaderClass : public PacketHeaderClass {
public:
ProtonameHeaderClass() : PacketHeaderClass("PacketHeader/Adian",
sizeof(hdr_protoname_pkt)) {
bind_offset(&hdr_protoname_pkt::offset_);
}
}... |
<commit_before>
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2012-2013 Esteban Tovagliari, Jupiter Jazz Limited
// Copyright (c) 2014-2016 Esteban Tovagliari, The applese... |
<commit_before>#pragma once
#include <boost/optional.hpp>
#include <glm/vec3.hpp>
#include <glm/gtx/vec1.hpp>
#include "../glew.detail/c.hxx"
#include "../glew.detail/gl_type.hxx"
#include "../glew.detail/error.hxx"
#include "../stblib.hxx"
// assimp::Importer
#include <assimp/Importer.hpp>
// aiPostProcessSteps f... |
<commit_before>//===--- index-test.cpp - Indexing test bed -------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------... |
<commit_before>/*************************************************************************
*
* $RCSfile: ZConnectionWrapper.hxx,v $
*
* $Revision: 1.5 $
*
* last change: $Author: oj $ $Date: 2002-08-23 09:57:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the follo... |
<commit_before>// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: MMFF94ConfigurationDialog.C,v 1.1.6.1 2007/03/25 22:00:39 oliver Exp $
//
#include <BALL/VIEW/DIALOGS/MMFF94ConfigurationDialog.h>
#include <BALL/VIEW/KERNEL/common.h>
#include <BALL/MOLMEC/MMFF94/MMFF94.h>
#include <BALL/MOLMEC/MMFF94/MMFF... |
<commit_before>// 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
// "Lic... |
<commit_before>/***********************************************************************
manip.cpp - Implements MySQL++'s various quoting/escaping stream
manipulators.
Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc.
Others may ... |
<commit_before>// sol2
// The MIT License (MIT)
// Copyright (c) 2013-2018 Rapptz, ThePhD and contributors
// 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... |
<commit_before>/*
* Copyright 2010, Nikhil Marathe <nsm.nikhil@gmail.com> All rights reserved.
* See LICENSE for details.
*/
#include "sasljs.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace v8;
using namespace node;
/*
* Macro from the sqlite3 bindings
* http://gith... |
<commit_before>/*=========================================================================
Program: Visualization Library
Module: Filter.cc
Language: C++
Date: $Date$
Version: $Revision$
This file is part of the Visualization Library. No part of this file or its
contents may be copied, reprodu... |
<commit_before>/* Copyright (C) 2005-2011, Thorvald Natvig <thorvald@natvig.com>
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 co... |
<commit_before>// Scintilla source code edit control
/** @file LexPB.cxx
** Lexer for PowerBasic by Roland Walter, roland@rowalt.de
**/
//
// Necessary changes in Scintilla project:
// - In SciLexer.h and Scintilla.iface:
//
// #define SCLEX_PB 49 //Provisional inofficial ID for PowerBasic lexer,
// (...)
/... |
<commit_before>/***********************************
Copyright 2017 Ravishankar Mathur
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 req... |
<commit_before>/*==LICENSE==
This file is part of Musec.
Copyright (C) 2013 Florian Meißner
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 License, or
(at your option) any l... |
<commit_before>#include "pch.h"
#include "MyPin.h"
#include "AudioRenderer.h"
namespace SaneAudioRenderer
{
MyPin::MyPin(AudioRenderer& renderer, CBaseFilter* pFilter, CAMEvent& bufferFilled, HRESULT& result)
: CBaseInputPin(L"SaneAudioRenderer::MyPin", pFilter, this, &result, L"Input0")
... |
<commit_before>/* TMP36 library
Copyright 2017 Isaac100
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 ... |
<commit_before>/**
* @file Timer.hpp
* @author Denis Kotov
* @date 10 Jun 2017
* @brief Thread safe version of Timer class
* It is based on boost::asio::deadline_timer
* @copyright Denis Kotov, MIT License. Open source: https://github.com/redradist/Inter-Component-Communication.git
*/
#ifndef ICC_TIMER_HPP
#def... |
<commit_before>//
// Alert system
//
#include <boost/foreach.hpp>
#include <map>
#include "alert.h"
#include "key.h"
#include "net.h"
#include "sync.h"
#include "ui_interface.h"
using namespace std;
map<uint256, CAlert> mapAlerts;
CCriticalSection cs_mapAlerts;
// old alert keys
// static const char* pszMainKey = ... |
<commit_before>/*
* Copyright (C) 2008-2010 The QXmpp developers
*
* Author:
* Manjeet Dahiya
*
* Source:
* http://code.google.com/p/qxmpp
*
* This file is a part of QXmpp library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
... |
<commit_before>//C++ source file - Open Producer - Copyright (C) 2002 Don Burns
//Distributed under the terms of the GNU LIBRARY GENERAL PUBLIC LICENSE (LGPL)
//as published by the Free Software Foundation.
// Simple example of use of Producer::RenderSurface
// The myGraphics class is a simple sample of how one would ... |
<commit_before>#include <xpcc/architecture/platform.hpp>
#include "../stm32f4_discovery.hpp"
#include <xpcc/processing/timeout.hpp>
#include <xpcc/processing/protothread.hpp>
#include <xpcc/driver/temperature/tmp102.hpp>
struct DeviceConfiguration
{
// shared memory for both devices as a cheap way
// to `tag` the ... |
<commit_before>/*
* Copyright (c) 2007 Digital Bazaar, Inc. All rights reserved.
*/
#include <iostream>
#include "Base64Coder.h"
#include "Object.h"
#include "Runnable.h"
#include "Thread.h"
#include "System.h"
#include "TcpSocket.h"
#include "InternetAddress.h"
using namespace std;
using namespace d... |
<commit_before>/**********************************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**************************************************... |
<commit_before>#include "download.h"
#include "test-helpers.h"
using namespace podboat;
TEST_CASE("Require-view-update callback gets called when download progress or status changes", "[Download]")
{
GIVEN("A Download object") {
bool got_called = false;
std::function<void()> callback = [&got_called]() {
got_c... |
<commit_before>/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses... |
<commit_before>
#pragma once
#include <utility>
#include <functional>
#include <cassert>
#include <glbinding/Value.h>
#include <glbinding/FunctionCall.h>
#include <glbinding/CallbackMask.h>
#include <glbinding/Boolean8.h>
namespace glbinding
{
template <typename ReturnType, typename... Arguments>
struct BasicCal... |
<commit_before>/*
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2013 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of... |
<commit_before>// Copyright 2014 BVLC and contributors.
#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/tes... |
<commit_before>#include "mbed.h"
#include "test_env.h"
#if !DEVICE_CAN
#error [NOT_SUPPORTED] CAN not supported
#endif
#if defined(TARGET_LPC1549)
#define CAN_RD D9
#define CAN_TD D8
#elif defined(TARGET_LPC1768) || defined(TARGET_LPC4088)
#define CAN_RD p9
#define CAN_TD p10
#elif defined(TARGET_B96B_F446VE)
#define... |
<commit_before>#include "Board.h"
#include "Communication.h"
#include "chprintf.h"
bool Communication::handleSerialRequest(const snd_proto_SerialRequest& _req)
{
bool ret{true};
// Process the action
switch(_req.which_type)
{
case snd_proto_SerialRequest_setMotorsSpeed_tag: setMotorsSpeed(_req); break;
c... |
<commit_before>//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgp... |
<commit_before>/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_compl... |
<commit_before>#define PUT(x) std::cout << #x "=" << (x) << std::endl;
#include <mcl/fp.hpp>
#include <mcl/ecparam.hpp>
#include <cybozu/xorshift.hpp>
#include <cybozu/test.hpp>
#include <cybozu/benchmark.hpp>
struct FpTag;
typedef mcl::FpT<FpTag, 384> Fp;
void put(const char *msg, const void *buf, size_t bufSize)
{
... |
<commit_before>#ifndef LOCKWRAPPER_HPP
#define LOCKWRAPPER_HPP
#include "base.hpp"
namespace org_pqrs_KeyRemap4MacBook {
class IOLockWrapper {
public:
static IOLock* alloc(void) {
IOLock* lock = IOLockAlloc();
if (! lock) {
IOLog("[KeyRemap4MacBook ERROR] IOLockAlloc failed.\n");
}
... |
<commit_before>//
// Created by dar on 11/28/15.
//
#include "EntityPlayer.h"
#include "core/map/Map.h"
#include "EntityToy.h"
EntityPlayer::EntityPlayer(Map *map) : EntityMoving(map, 0.55, 0.55) {
b2CircleShape shape;
shape.m_p.Set(0, 0);
shape.m_radius = 1.5; // A bit more than our size because it is on... |
<commit_before>#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <DNSServer.h>
#include "WiFiManager.h"
#include "webserver.h"
#include "gear.h"
#include "range.h"
#include "Adafruit_NeoPixel.h"
const char* ssid = _SSID_;
const char* password = _WIFI_PASSWORD_;
MDNSResponder mdns;
WebServer &server = WebSe... |
<commit_before>/*
Copyright 2013-present Barefoot Networks, 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... |
<commit_before>/*
* Copyright (c) 2016 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.... |
<commit_before>/*
* Copyright 2012 Open Source Robotics Foundation
*
* 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 requi... |
<commit_before>#include <Python.h>
#define UNICODE
#include <Windows.h>
#include "core.hpp"
#define WGL_CONTEXT_PROFILE_MASK 0x9126
#define WGL_CONTEXT_CORE_PROFILE_BIT 0x0001
#define WGL_CONTEXT_MAJOR_VERSION 0x2091
#define WGL_CONTEXT_MINOR_VERSION 0x2092
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)... |
<commit_before>//
// ftDrawForces.cpp
// ofxFlowToolsExample
//
// Created by Ties East on 18/6/15.
//
//
#include "ftDrawInputForces.h"
namespace flowTools {
ftDrawInputForces::ftDrawInputForces() {
ofAddListener(ofEvents().mouseMoved, this, &ftDrawInputForces::mouseMoved);
ofAddListener(ofEvents().mouseD... |
<commit_before>/**************************************************************************
The MIT License (MIT)
Copyright (c) 2015 Dmitry Sovetov
https://github.com/dmsovetov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "... |
<commit_before>#include "movepicker.h"
#include "eval.h"
#include "defs.h"
// Indexed by [victimValue][attackerValue]
int MovePicker::_mvvLvaTable[5][6];
void MovePicker::init() {
int currScore = 0;
PieceType victimsLoToHi[] = {PAWN, KNIGHT, BISHOP, ROOK, QUEEN};
PieceType attackersHiToLo[] = {KING, QUEEN, ROOK... |
<commit_before>//=======================================================================
// Copyright Baptiste Wicht 2013-2016.
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://www.opensource.org/licenses/MIT)
//==================================================... |
<commit_before>#include "./label_collision_force.h"
#include <vector>
#include <QDebug>
#include "../math/aabb2d.h"
#include "./label_state.h"
namespace Forces
{
LabelCollisionForce::LabelCollisionForce() : Force("Label Collision", 1.0f)
{
}
Eigen::Vector2f LabelCollisionForce::calculate(LabelState &label,
... |
<commit_before>#include <v8.h>
#include <node.h>
#include <node_object_wrap.h>
#include <node_version.h>
#include <nan.h>
#include <queue>
#include <uv.h>
#include "lib/RtMidi/RtMidi.h"
#include "lib/RtMidi/RtMidi.cpp"
class NodeMidiOutput : public Nan::ObjectWrap
{
private:
RtMidiOut* out;
public:
static Nan... |
<commit_before><commit_msg>file_util: don't compile any of the deprecated functions on non-Windows<commit_after><|endoftext|> |
<commit_before>#include "pch.h"
#include "jnc_OperatorMgr.h"
#include "jnc_Module.h"
namespace jnc {
//.............................................................................
void
OperatorMgr::getDataRefObjHdr (
const Value& value,
Value* resultValue
)
{
ASSERT (value.getType ()->getTypeKind () == TypeKind... |
<commit_before>/*
Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
This file is part of the KDE project
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 either
... |
<commit_before>#include "sqlite_add_indices.hpp"
#include <fstream>
#include <iostream>
#include <string>
#include "operators/print.hpp"
#include "hyrise.hpp"
#include "utils/meta_table_manager.hpp"
#include "utils/sqlite_wrapper.hpp"
#include "utils/timer.hpp"
namespace opossum {
void add_indices_to_sqlite(const ... |
<commit_before>//! \file
/*
** Copyright (C) - Triton
**
** This program is under the terms of the BSD License.
*/
#ifndef TRITON_CALLBACKS_H
#define TRITON_CALLBACKS_H
#include <list>
#include "ast.hpp"
#include "tritonTypes.hpp"
#ifdef TRITON_PYTHON_BINDINGS
#include "pythonBindings.hpp"
#endif
//! The Tri... |
<commit_before>/*
* info.cpp
*
* Created on: Nov 22, 2012
* Author: partio
*/
#include "info.h"
#include <limits> // for std::numeric_limits<size_t>::max();
#include <boost/lexical_cast.hpp>
#include "plugin_factory.h"
#include "logger_factory.h"
#ifdef NEWBASE_INTERPOLATION
#include <NFmiLatLonArea.h>
#in... |
<commit_before>// Copyright (c) 2010 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/views/tab_contents/tab_contents_container.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#i... |
<commit_before>/*
Copyright 2017 Barcelona Supercomputing Center (www.bsc.es)
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 requ... |
<commit_before>/**
* Problem description: Given a linked list, sort it using insertion sort.
* Solution time complexity: O(n^2)
* Comments:
*/
/**
* Definition of ListNode
* class ListNode {
* public:
* int val;
* ListNode *next;
* ListNode(int val) {
* this->val = ... |
<commit_before>/* Copyright 2016 Samsung Electronics 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... |
<commit_before>#include "Channel_AWGN_fast_LLR.hpp"
#include <algorithm>
#include <cassert>
template <typename R>
Channel_AWGN_fast_LLR<R>
::Channel_AWGN_fast_LLR(const R& sigma, const int seed, const R scaling_factor)
: sigma(sigma),
scaling_factor(scaling_factor),
rd(),
rd_engine(this->rd()),
dist(std::nume... |
<commit_before>/**
* Copyright (c) 2017 DeepCortex GmbH <legal@eventql.io>
* Authors:
* - Laura Schlimmer <laura@eventql.io>
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License ("the license") as
* published by the Free Software... |
<commit_before>#include "game.hpp"
//////////
// Code //
struct PositionEvent : public clibgame::Event {
std::string name;
float x, y;
float w, h;
PositionEvent(std::string name,
float x, float y,
float w, float h) {
this->name = name;
this->x = ... |
<commit_before>/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) University College London (UCL).
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FO... |
<commit_before>#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE Math
#include "math.hpp"
#include <iostream>
#include <ostream>
#include <sstream>
#include <boost/test/included/unit_test.hpp>
using namespace Math;
const quat<float> R0{0,0,0,0}, R1{1,0,0,0},
i{0,1,0,0}, j{0,0,1,0}, k{0,0,0,1};
const dual<fl... |
<commit_before>//Author: Julian Yi
//Date: 14 July 2017
//board functions
#include <iostream>
#include "board.h"
#include "pieceutils.h"
board::board() : squares()
{ }
void board::promote(coord pos, TeamColor color)
{
auto current = &squares[pos.x][pos.y];
std::string Command = "";
std::cout <<... |
<commit_before>// -*- mode: c++; c-basic-offset:4 -*-
// This file is part of libdap, A C++ implementation of the OPeNDAP Data
// Access Protocol.
// Copyright (c) 2002,2003 OPeNDAP, Inc.
// Author: James Gallagher <jgallagher@opendap.org>
//
// This library is free software; you can redistribute it and/or
// modify ... |
<commit_before>// For conditions of distribution and use, see copyright notice in LICENSE
#include "StableHeaders.h"
#define MATH_BULLET_INTEROP
#include "DebugOperatorNew.h"
#include "PhysicsWorld.h"
#include "EC_PhysicsConstraint.h"
#include "EC_RigidBody.h"
#include "FrameAPI.h"
#include "Scene.h"
#include "Entit... |
<commit_before>/*
* Copyright 2011, 2012 Esrille 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 applic... |
<commit_before>///
/// @file nth_prime.cpp
///
/// Copyright (C) 2014 Kim Walisch, <kim.walisch@gmail.com>
///
/// This file is distributed under the BSD License. See the COPYING
/// file in the top level directory.
///
#include <primecount.hpp>
#include <primesieve.hpp>
#include <stdint.h>
namespace primecount {
/... |
<commit_before>//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2013, Image Engine Design 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:... |
<commit_before>/*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2012 Scientific Computing and Imaging Institute,
University of Utah.
License for the specific language governing rights and limitations under
Permission is hereby granted, free of charge, ... |
<commit_before>/*************************************************************************
*
* $RCSfile: javachild.cxx,v $
*
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2004-11-03 16:05:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following lice... |
<commit_before>#include "boost/filesystem.hpp"
#include <assert.h>
#include "itkCenteredSimilarity2DTransform.h"
// my files
#include "Stack.hpp"
#include "NormalizeImages.hpp"
#include "StackInitializers.hpp"
#include "RegistrationBuilder.hpp"
#include "StackAligner.hpp"
#include "StackIOHelpers.hpp"
#include "IOHel... |
<commit_before>/*
* main.cpp
* Copyright (C) 2015 Chris Waltrip <walt2178@vandals.uidaho.edu>
*
* This file is part of EvoComp-SantaFe
*
* EvoComp-SantaFe is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Fou... |
<commit_before>#include "occaTools.hpp"
#include "occa.hpp" // For kernelInfo
namespace occa {
mutex_t::mutex_t(){
#if (OCL_OS == OCL_LINUX_OS) || (OCL_OS == OCL_OSX_OS)
int error = pthread_mutex_init(&mutexHandle, NULL);
if(error){
std::cout << "Error initializing mutex\n";
throw 1;
}
... |
<commit_before>// Copyright (c) 2018 Bilibili, 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 applicabl... |
<commit_before>// Copyright 2014 BVLC and contributors.
#include <cuda_runtime.h>
#include <cmath>
#include <cstring>
#include "gtest/gtest.h"
#include "caffe/common.hpp"
#include "caffe/syncedmem.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/test/test_caffe_main.hpp"
namespace caffe {
template <typ... |
<commit_before>#include "./chunk.h"
namespace mcmap {
Chunk::Chunk() : data_version(-1) {}
Chunk::Chunk(const nbt::NBT &data, const Colors::Palette &palette) : Chunk() {
// If there is nothing to render
if (data.is_end() || !assert_chunk(data))
return;
// This value is primordial: it states which version ... |
<commit_before><commit_msg>INTEGRATION: CWS dba30c (1.12.10); FILE MERGED 2008/05/08 07:15:27 oj 1.12.10.2: #i87131# collect keys only once, getKeys always refetch keys 2008/05/05 10:57:50 oj 1.12.10.1: #i87131# collect keys only once, getKeys always refetch the keys<commit_after><|endoftext|> |
<commit_before>/**
* @file posix/net.cpp
* @brief POSIX network access layer (using cURL)
*
* (c) 2013-2014 by Mega Limited, Wellsford, New Zealand
*
* This file is part of the MEGA SDK - Client Access Engine.
*
* Applications using the MEGA API must present a valid application key
* and comply with the the ru... |
<commit_before>/*
Copyright (c) 2008, Arvid Norberg
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 condi... |
<commit_before>#include <iostream>
#include <mist/io/wav.h>
#include <mist/io/mp3.h>
int main( int argc, char *argv[] )
{
using namespace std;
unsigned int sampling_rate = 44100;
if( argc == 2 )
{
mist::array< signed int > sound;
mist::read_wav( sound, argv[1], sampling_rate );
mist::write_wav( sound, std:... |
<commit_before>#pragma once
#include "arm.hpp"
namespace bandit{
class BernoulliArm : public Arm{
const double theta;
std::uniform_real_distribution<double> unif;
public:
BernoulliArm(double theta): theta(theta), unif(0.0, 1.0) {
}
virtual double pull(){
double rand = unif(randomEngine);
if(rand <=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.