text stringlengths 54 60.6k |
|---|
<commit_before>//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012-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
// ... |
<commit_before>#include <Python.h>
#include <string>
#include <boost/test/unit_test.hpp>
#include <ackward/core/ByteArray.hpp>
#include <ackward/core/Exceptions.hpp>
using namespace ackward::core;
namespace bp=boost::python;
BOOST_AUTO_TEST_SUITE( bytearray_test )
BOOST_AUTO_TEST_CASE( existing_ctor )
{
stati... |
<commit_before>#ifndef PCL_TRACKING_IMPL_PARTICLE_FILTER_H_
#define PCL_TRACKING_IMPL_PARTICLE_FILTER_H_
#include <boost/random.hpp>
#include <pcl/common/common.h>
#include <pcl/common/eigen.h>
#include <pcl/common/transforms.h>
template <typename PointInT, typename StateT> bool
pcl::tracking::ParticleFilterTracker<... |
<commit_before>/***********************************************************************
filename: CEGUIScrollablePaneProperties.cpp
created: 3/3/2005
author: Paul D Turner
*************************************************************************/
/*******************************************************************... |
<commit_before>//
// Copyright 2013-2014, Bradley A. Grantham
//
// 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 require... |
<commit_before>/**
* File name: CEigen.cpp
*
* Programmer: Yongqun He
* Contact email: yohe@vt.edu
* Purpose: This is the .cpp file for the class CEigen.
* It is to calculate eigenvalues and eigenvectors of a matrix.
*
*/
#include "CEigen.h"
/**
* Defaulut constructor
*/
CEigen::CEigen()
{ ... |
<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/gtk/clear_browsing_data_dialog_gtk.h"
#include <string>
#include "app/l10n_util.h"
#include "app/resource_bu... |
<commit_before><commit_msg>Add unit test for the "aborted by shutdown" case. This unit test would crash the code that is on the current dev branch, however with the addition of the DataTypeManager this is no longer a problem on trunk. In the dev version, the PSS would try to try to stop a data type in mid startp causi... |
<commit_before>// 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 "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
#include "ash/launcher/launcher_types.h"
#include "ash/system/tray/syst... |
<commit_before>// 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 "chrome/browser/ui/webui/set_as_default_browser_ui.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/me... |
<commit_before>/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WIT... |
<commit_before>/*
* DistributionContainer.C
*
* Created on: Jul 6, 2012
* Author: alfoa
*/
#include "DistributionContainer.h"
//#include "Factory.h"
//#include "distribution_1D.h"
#include "distribution_min.h"
#include <iostream>
#include <math.h>
#include <cmath>
#include <cstdlib>
#include <stdlib.h>
#incl... |
<commit_before>#define BUILDING_NODE_EXTENSION
#include <node.h>
#include <v8.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <telldus-core.h>
using namespace v8;
using namespace node;
#ifdef _WINDOWS
#define strcasecmp _stricmp
#define DEGREE " "
#else
#define DEGREE "°"
#... |
<commit_before>/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2000-2010 Marc Alexander Lehmann <schmorp@schmorp.de>
* Copyright (c) 2010-2011, Willow Garage, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms... |
<commit_before>#include <QTimer>
#include <QHash>
#include "api/server-repo.h"
#include "utils/utils.h"
#include "seafile-applet.h"
#include "rpc/rpc-client.h"
#include "repo-item.h"
#include "repo-tree-view.h"
#include "repo-tree-model.h"
namespace {
const int kRefreshLocalReposInterval = 1000;
} // namespace
Re... |
<commit_before>/*
* This file is part of the CN24 semantic segmentation software,
* copyright (C) 2015 Clemens-Alexander Brust (ikosa dot de at gmail dot com).
*
* For licensing information, see the LICENSE file included with this project.
*/
#include <iomanip>
#include "Log.h"
#include "GradientTester.h"
#in... |
<commit_before>#include "uistatecoordinator.h"
#include <QVariantMap>
#include <QDebug>
namespace Sonetta {
UIStateCoordinator::UIStateCoordinator(QObject *parent) :
QObject(parent)
{
m_fonts = new QQmlPropertyMap(this);
m_colors = new QQmlPropertyMap(this);
m_misc = new QQmlPropertyMap(this);
}
QVa... |
<commit_before>/*
* Copyright (c) 2005, Peter Sommerlad and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the fi... |
<commit_before>////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm 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://ww... |
<commit_before>#include <boost/lexical_cast.hpp>
#include <sstream>
#include <climits>
#include "util/numconversions.h"
#include <iostream>
namespace xqp {
bool NumConversions::strToInteger(const xqpString& aStr, xqp_integer& aInteger){
try {
aInteger = boost::lexical_cast<xqp_integer>(aStr.c_str());
... |
<commit_before>//**************************************************************************************************
//
// OSSIM Open Source Geospatial Data Processing Library
// See top level LICENSE.txt file for license information
//
//**************************************************************************... |
<commit_before>/*************************************************************************
*
* $RCSfile: MasterPropertySetInfo.cxx,v $
*
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2004-09-08 15:49:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the fo... |
<commit_before>/*
* Copyright (c) 2005, Peter Sommerlad and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the fi... |
<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>/*
* 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 "Lice... |
<commit_before>
//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2014-2018 Esteban Tovagliari, The appleseedhq Organization
//
// Permission is hereby granted, free of charg... |
<commit_before>#include "Ising.h"
#include "Utilities.h"
#include <math.h>
#include <assert.h>
#include <stack>
#define SQUARED(x) x*x
namespace ising {
int s(char x,char y,char z) {
return (x<<2) + (y<<1) + (z & 1);
}
int boundsCheck(int x, const int max) {
if (x < 0) {
... |
<commit_before>#include "Ising.h"
#include <math.h>
#include <assert.h>
#include <stack>
#define SQUARED(x) x*x
namespace ising {
inline int s(char x,char y,char z) {
return (x<<2) + (y<<1) + (z);
}
inline int boundsCheck(int x, const int max) {
if (x < 0) {
return max + x... |
<commit_before>#include <assert.h>
#include "global.h"
#include "Level.h"
#include "blocks.h"
#include "2d/cube.h"
void begin_compound(void *context, nbt::String name) {
if (name.compare("Level") == 0) {
((Level*)context)->islevel = true;
}
}
void register_int(void *context, nbt::String name, nbt::Int i) {
... |
<commit_before>#include "Level.h"
std::vector<Tileset>* Level::getTilesets() {
return &m_vTilesets;
}
std::vector<Layer*>* Level::getLayers() {
return &m_vLayers;
}
<commit_msg>every layers of a level updated and rendered<commit_after>#include "Level.h"
std::vector<Tileset>* Level::getTilesets() {
return &m_vTile... |
<commit_before>#pragma ident "$Id$"
//============================================================================
//
// This file is part of GPSTk, the GPS Toolkit.
//
// The GPSTk is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
//... |
<commit_before>#include "OrbitalCamera.h"
#include "Keyboard.h"
#include "Mouse.h"
#include <glm/gtx/rotate_vector.hpp>//GLM_GTX_rotate_vector
OrbitalCamera::OrbitalCamera(float w, float h):
Camera(w,h),
phi(0),
theta(0),
radius(3),
Cam_Rot_Speed(2*M_PI),
Cam_Zoom_Speed(3.0)
{
}
void OrbitalCam... |
<commit_before>/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LG... |
<commit_before>#include <cctype>
#include <iostream>
#include <list>
#include <sstream>
using namespace std;
inline void use_io_optimizations()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
constexpr int alphabet_size {26};
enum class NumerationSystem
{
First, Second
};
NumerationSystem numer... |
<commit_before>/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... |
<commit_before><commit_msg>OConnection: WaE unused variable<commit_after><|endoftext|> |
<commit_before>#include "util.cpp"
/*
//util classes
struct Server {
//input
int capacity, size;
//output
int row = -1, slot = -1, pool = -1;
};
struct Input {
int r, s, u, p, m;
vector<vector<int>> blocked_slots;//first index: row, second index: slot
vector<Server> servers;
};
*/
struct Row {
int num, area,... |
<commit_before>/*
* this file is part of the oxygen gtk engine
* Copyright (c) 2010 Hugo Pereira Da Costa <hugo@oxygen-icons.org>
*
* based on the Null Theme Engine for Gtk+.
* Copyright (c) 2008 Robert Staudinger <robert.staudinger@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modif... |
<commit_before>/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENS... |
<commit_before>//
// PROJECT: Aspia Remote Desktop
// FILE: codec/cursor_encoder.cc
// LICENSE: See top-level directory
// PROGRAMMERS: Dmitry Chapyshev (dmitry@aspia.ru)
//
#include "codec/cursor_encoder.h"
#include "base/logging.h"
namespace aspia {
// Cache size can be... |
<commit_before>#include "mocca/base/Thread.h"
using mocca::Thread;
std::mutex Thread::allThreadsMx_;
std::vector<Thread*> Thread::allThreads_;
Thread::Thread()
: interrupted_(true)
, thread_() {}
Thread::Thread(Thread&& other)
: interrupted_(other.interrupted_.load())
, thread_(std::move(other.threa... |
<commit_before>#include "VertexRenderer.hpp"
#include "FAST/SceneGraph.hpp"
namespace fast {
void VertexRenderer::draw(Matrix4f perspectiveMatrix, Matrix4f viewingMatrix, float zNear, float zFar, bool mode2D) {
std::lock_guard<std::mutex> lock(mMutex);
glEnable(GL_POINT_SPRITE); // Circles created in fragmen... |
<commit_before>//
// Created by valdemar on 14.10.17.
//
#include "UIController.h"
#include <imgui_impl/imgui_widgets.h>
#include <imgui_impl/imgui_impl_glfw_gl3.h>
#include <imgui_impl/style.h>
#include <fontawesome.h>
#include <glm/gtc/type_ptr.hpp>
struct UIController::wnd_t {
bool show_style_editor = false;... |
<commit_before>/*
* NotebookPlots.cpp
*
* Copyright (C) 2009-19 by RStudio, PBC
*
* Unless you have received this program directly from RStudio pursuant
* to the terms of a commercial license agreement with RStudio, then
* this program is licensed to you under the terms of version 3 of the
* GNU Affero General ... |
<commit_before>#include "RdYarpNetworkManager.hpp"
//-- Initialize static members
rd::RdYarpNetworkManager * rd::RdYarpNetworkManager::uniqueInstance = NULL;
const std::string rd::RdYarpNetworkManager::id = "YARP";
bool rd::RdYarpNetworkManager::RegisterManager()
{
if (uniqueInstance == NULL)
{
uniqu... |
<commit_before>/*
* Copyright (C) 2018-present ScyllaDB
*/
/*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include <seastar/util/defer.hh>
#include <boost/range/adaptor/map.hpp>
#include "view_update_generator.hh"
#include "service/priority_manager.hh"
#include "utils/error_injection.hh"
#include "db/view/vie... |
<commit_before>/*
* View3D_2.cpp
*
* Copyright (C) 2018 by VISUS (Universitaet Stuttgart).
* Alle Rechte vorbehalten.
*/
#include "stdafx.h"
#include "mmcore/view/View3D_2.h"
#include "vislib/graphics/gl/IncludeAllGL.h"
#ifdef _WIN32
# include <windows.h>
#endif /* _WIN32 */
#include "mmcore/CoreInstance.h"
#i... |
<commit_before>/* Copyright (c) 2013-2017 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "VideoDumper.h"
#include <QImage>
using namesp... |
<commit_before>#include <sensors.h>
#include <iostream>
using namespace std;
sensors::sensors()
{
cout << "Initiating sensors" << endl;
}
sensors::~sensors()
{
cout << "Termination sensors" << endl;
}<commit_msg>sensor_ox() function was implemented<commit_after>#include <sensors.h>
#include <iostream>
using names... |
<commit_before>/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. ... |
<commit_before>// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// File: StackBuilderSink.cpp
//
//
// Purpose: Native implementation for System.Runtime.Remotin... |
<commit_before>#include "fileinputstream.h"
#include "stringterminatedsubstream.h"
#include "xmlindexwriter.h"
#include <iostream>
using namespace Strigi;
using namespace std;
string
readHeader(InputStream* f) {
StringTerminatedSubStream header(f, "\r\n\r\n");
string h;
const char* d;
int32_t nread = h... |
<commit_before>#include <iostream>
#include <string>
#include <vector>
#include <random>
struct student
{
unsigned id;
std::wstring name;
operator std::wstring()
{
auto strRep = std::wstring{L"id = "} + std::to_wstring(id) + L", name=" + name;
return strRep;
}
};
void printclass(std::vector<student>& c)
{
... |
<commit_before>/* COPYRIGHT (c) 2014 Umut Acar, Arthur Chargueraud, and Michael
* Rainey
* All rights reserved.
*
* \file cmdline.cpp
* \brief Command-line parsing routines
*
*/
#include <string.h>
#include <utility>
#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdli... |
<commit_before>
#include "window_engine.h"
using namespace junior;
using namespace junior::_win32;
int window_engine::_window_count = 0;
window_engine::window_engine(window* owner, const wchar_t* title, const UINT32 background_color)
: _owner(owner), _d2d_factory(nullptr), _dwrite_factory(nullptr), _sc... |
<commit_before>#include "SkEndian.h"
#include "SkFontHost.h"
#include "SkStream.h"
struct SkSFNTHeader {
uint32_t fVersion;
uint16_t fNumTables;
uint16_t fSearchRange;
uint16_t fEntrySelector;
uint16_t fRangeShift;
};
struct SkTTCFHeader {
uint32_t fTag;
uint32_t fVers... |
<commit_before>// ========================================================================== //
// This file is part of DO++, a basic set of libraries in C++ for computer
// vision.
//
// Copyright (C) 2013 David Ok <david.ok8@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public
// Lic... |
<commit_before>// Copyright (c) 2019-2020 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qt/pivx/addresseswidget.h"
#include "qt/pivx/forms/ui_addresseswidget.h"
#include "qt/pivx/addresslabelrow.h... |
<commit_before>#ifndef RDB_PROTOCOL_CHANGEFEED_HPP_
#define RDB_PROTOCOL_CHANGEFEED_HPP_
#include <deque>
#include <exception>
#include <map>
#include "errors.hpp"
#include <boost/variant.hpp>
#include "concurrency/rwlock.hpp"
#include "containers/counted.hpp"
#include "containers/scoped.hpp"
#include "protocol_api... |
<commit_before>//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010, 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>//Copyright (c) 2021 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#include "ExtruderTrain.h"
#include "FffGcodeWriter.h"
#include "InsetOrderOptimizer.h"
#include "LayerPlan.h"
#include "utils/logoutput.h"
#include "WallToolPaths.h"
namespace cura
{
InsetOrderOptimi... |
<commit_before>
// ScopeTimer not supported on windows simulator or non-Debug
#if DEBUG
#include "../platform.h"
#include "scope_timer.h"
#include "calctype/calctype.h"
#include "calctype/fonts/arial_small/arial_small.h"
#if TARGET_WINSIM
unsigned int ScopeTimer_FrameCycles = 0;
LONGLONG ScopeTimer_Start = 0;
#else... |
<commit_before>
#ifndef WNT
#include <Standard_NullObject.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_Failure.hxx>
#include <Standard_Mutex.hxx>
#include <OSD_Environment.ixx>
#include <OSD_WhoAmI.hxx>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
static const O... |
<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/in_process_webkit/dom_storage_context.h"
#include <algorithm>
#include "base/file_path.h"
#include "base/fil... |
<commit_before>// 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/ui/toolbar/wrench_menu_model.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browse... |
<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_frame/ready_mode/internal/ready_prompt_window.h"
#include <atlctrls.h>
#include <Shellapi.h> // Must appear before a... |
<commit_before>/*
* Copyright (c) 2013 Pavlo Lavrenenko
*
* 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, mo... |
<commit_before>/** \brief Utility for augmenting MARC records with links to a local full-text database.
* \author Dr. Johannes Ruscheinski (johannes.ruscheinski@uni-tuebingen.de)
*
* \copyright 2015 Universitätsbiblothek Tübingen. All rights reserved.
*
* This program is free software: you can redistribute it ... |
<commit_before>/** \file EmailSender.cc
* \brief Utility functions etc. related to the sending of email messages.
* \author Dr. Johannes Ruscheinski (johannes.ruscheinski@uni-tuebingen.de)
* \author Artur Kedzierski
* \author Dr. Gordon W. Paynter
*
* \copyright 2015,2017,2018 Universitätsbibliothek Tübin... |
<commit_before>/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distr... |
<commit_before>/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distr... |
<commit_before>#include "TranslationTask.h"
#include "moses/StaticData.h"
#include "moses/Sentence.h"
#include "moses/IOWrapper.h"
#include "moses/TranslationAnalysis.h"
#include "moses/TypeDef.h"
#include "moses/Util.h"
#include "moses/InputType.h"
#include "moses/OutputCollector.h"
#include "moses/Incremental.h"
#inc... |
<commit_before>/*
#include <vector>
#include <ostream>
namespace Graph
{
template <class Key, Value> class Node
{//A single edge of a graph.
private:
Key key;
Value value;
Node left, right;
int N;
public:
int size() const;//Return the size.
Value get( Key getKey );
void put( Key newKey, Val... |
<commit_before>#include <sstream>
#include <iostream>
#include <clang/AST/AST.h>
#include <clang/AST/ASTConsumer.h>
#include <clang/AST/RecursiveASTVisitor.h>
#include <clang/Frontend/ASTConsumers.h>
#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/FrontendActions.h>
#include <clang/Rewrite/Core/R... |
<commit_before>#include "external_scorer.h"
#include <cstdio> // popen
#include <cstdlib>
#include <cstring>
#include <unistd.h>
#include <sstream>
#include <iostream>
#include <cassert>
#include "stringlib.h"
#include "filelib.h"
#include "tdict.h"
using namespace std;
extern const char* meteor_jar_path;
extern vo... |
<commit_before>/*
* Copyright 2016-2020 Luca Zanconato
*
* 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 appli... |
<commit_before>/*
* Copyright 2018 Google, Inc.
*
* 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 conditions and the following ... |
<commit_before>#ifndef __CONCURRENCY_QUEUE_CROSS_THREAD_LIMITED_FIFO_HPP__
#define __CONCURRENCY_QUEUE_CROSS_THREAD_LIMITED_FIFO_HPP__
#include <list>
#include "concurrency/queue/passive_producer.hpp"
#include "concurrency/semaphore.hpp"
#include "concurrency/drain_semaphore.hpp"
#include "do_on_thread.hpp"
/* `cros... |
<commit_before>#include "DissentTest.hpp"
#include "TestNode.hpp"
using namespace Dissent::Utils;
namespace Dissent {
namespace Tests {
int Dissent::Tests::TestNode::calledback;
void ConstructOverlay(int count, QVector<TestNode *> &nodes, QVector<Id> &group_vector)
{
for(int idx = 0; idx < count; idx++) {
... |
<commit_before>//
// Created by manu343726 on 4/08/15.
//
#include "type_id.hpp"
#include <unordered_map>
#include <iostream>
int main()
{
std::unordered_map<ctti::type_id_t, int> map;
std::string name = ctti::type_id("hello").name().c_str();
map[ctti::type_id(1)] = 1;
map[ctti::type_id(1u)] = 2;
... |
<commit_before>// This file is part of the "x0" project, http://github.com/christianparpart/x0>
// (c) 2009-2017 Christian Parpart <christian@parpart.family>
//
// Licensed under the MIT License (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of
// the Licens... |
<commit_before>#include "itkImage.h"
#include "itkRandomImageSource.h"
#include "itkGradientRecursiveGaussianImageFilter.h"
#include "itkGradientMagnitudeImageFilter.h"
#include "itkImageFileReader.h"
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderer.h>
#include <vtkActor.h>
#in... |
<commit_before>#include "instruments/population/GenerationFitnessCSV.hpp"
#include <cmath>
#include <string>
GenerationFitnessCSV::GenerationFitnessCSV(
PopulationNode* target,
std::string outFile,
float bottomFitness,
float topFitness,
float resolution
) : CSVInstrument(target, outFile) {
std::vector<float> buc... |
<commit_before>inline
cov_mat_kth::cov_mat_kth( const std::string in_path,
const std::string in_actionNames,
const int in_scale_factor,
const int in_shift,
const int in_scene, //only for kth
const int in_segment_length
)
:path(in_path), actionNames(in_actionNames), scale_factor(in_scale_fact... |
<commit_before>// Copyright 2011 Software Freedom Conservatory
// 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 requir... |
<commit_before>//
// Aspia Project
// Copyright (C) 2020 Dmitry Chapyshev <dmitry@aspia.ru>
//
// 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 ... |
<commit_before>#include "init.hpp"
#include "CatchingRule"
#include "PredicateRule"
using namespace sprout;
struct FakeException {};
BOOST_AUTO_TEST_CASE(testCatching)
{
auto rule = makeCatching<FakeException>(
makeAddingPredicate<char, std::string>([](const char& input) {
if (input == 'a') ... |
<commit_before>#include <ros/ros.h>
//ROS libraries
#include <tf/transform_datatypes.h>
//ROS messages
#include <std_msgs/Float32.h>
#include <std_msgs/String.h>
#include <geometry_msgs/Quaternion.h>
#include <geometry_msgs/QuaternionStamped.h>
#include <geometry_msgs/Twist.h>
#include <nav_msgs/Odometry.h>
#include ... |
<commit_before>/* algorithm.cpp - CS 472 Project #2: Genetic Programming
* Copyright 2014 Andrew Schwartzmeyer
*
* Source file for algorithm namespace
*/
#include <algorithm>
#include <cassert>
#include <ctime>
#include <iostream>
#include <fstream>
#include <future>
#include <thread>
#include "algorithm.hpp"
#in... |
<commit_before>#include <stack>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/compatibility.hpp>
#include <zombye/core/game.hpp>
#include <zombye/rendering/animation_component.hpp>
#include <zombye/rendering/animation_system.hpp>
#include <zombye/rendering/rendering_system.hpp>
#include <zombye/rendering/... |
<commit_before>/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software 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:
*
* 1. Redistributi... |
<commit_before>#include "arch/linux/disk/pool.hpp"
#define BLOCKER_POOL_QUEUE_DEPTH (MAX_CONCURRENT_IO_REQUESTS * 2)
pool_diskmgr_t::pool_diskmgr_t(
linux_event_queue_t *queue, passive_producer_t<action_t *> *source) :
source(source),
blocker_pool(MAX_CONCURRENT_IO_REQUESTS, queue),
n_pending(0)
{... |
<commit_before>// Copyright 2017 Adam Smith
//
// 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... |
<commit_before>/*
* Copyright (C) 2021-present ScyllaDB
*/
/*
* This file is part of Scylla.
*
* Scylla 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 Foundation, either version 3 of the License, or
* (at... |
<commit_before>#include "core/drunken_bishop.h"
#include "core/assert.h"
namespace euphoria::core
{
template<typename T, int total_bytes>
std::vector<u8>
ToBytesGeneric(T hash)
{
auto bytes = std::vector<u8>{};
for(int byte_index=0; byte_index<total_bytes; byte_index +=1)
{
... |
<commit_before>#include "core/generator_maze.h"
#include "core/random.h"
#include "core/draw.h"
#include "core/colors.h"
namespace generator
{
void RecursiveBacktracker::Setup()
{
maze->Clear(Cell::None);
const auto random_position = point2i {
random->NextRange(maze->Width()),
random->NextRan... |
<commit_before>/*
* Copyright (c) 2015 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 require... |
<commit_before>#include "gtest/gtest.h"
#include "cpp/ylikuutio/common/any_value.hpp"
#include "cpp/ylikuutio/callback/callback_engine.hpp"
#include "cpp/ylikuutio/callback/callback_object.hpp"
#include "cpp/ylikuutio/callback/callback_parameter.hpp"
#include "cpp/ylikuutio/hierarchy/hierarchy_templates.hpp"
// Includ... |
<commit_before>// -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
/*
* Copyright 2010 ZXing 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 Lice... |
<commit_before>/*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2009 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 docume... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.