text stringlengths 54 60.6k |
|---|
<commit_before>#include "Version.h"
#include "SourceControl.h"
#include "System/Config.h"
#include "System/Events/EventLoop.h"
#include "System/IO/IOProcessor.h"
#include "System/Service.h"
#include "System/FileSystem.h"
#include "System/CrashReporter.h"
#include "Framework/Storage/BloomFilter.h"
#include "Application/... |
<commit_before>// ======================================================================== //
// Copyright 2009-2015 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); ... |
<commit_before>/*
* exiv2-xmpdatum.cpp
*
* Author(s):
* Stephane Delcroix (stephane@delcroix.org)
*
* Copyright (c) 2008 Novell
*
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Softwar... |
<commit_before>/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 1999-2003 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. Red... |
<commit_before>//
// Created by monty on 06/12/16.
//
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#ifdef __APPLE__
#if TARGET_IOS
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#else
#import <OpenGL/OpenGL.h>
#import <OpenGL/gl3.h>
#endif
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2e... |
<commit_before>#include "Grid.h"
#include "Server.h"
#include "Object.h"
#include "Player.h"
#include "Tools.h"
#include "ServerConfig.h"
#include "Log.h"
#include "debugging.h"
Poco::UInt8 Grid::losRange;
/**
* Initializes a Grid object
*
*/
Grid::Grid(Poco::UInt16 x, Poco::UInt16 y):
_x(x), _y(y)
{
_las... |
<commit_before>/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial... |
<commit_before>#include "terminalpp/attribute.hpp"
#include <iostream>
namespace terminalpp {
// ==========================================================================
// STREAM OPERATOR
// ==========================================================================
std::ostream &operator<<(std::ostream &ou... |
<commit_before>/*******************************************************************************
Copyright The University of Auckland
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.... |
<commit_before>#ifndef STAN_MATH_OPENCL_KERNEL_GENERATOR_SELECT_HPP
#define STAN_MATH_OPENCL_KERNEL_GENERATOR_SELECT_HPP
#ifdef STAN_OPENCL
#include <stan/math/prim/meta.hpp>
#include <stan/math/opencl/matrix_cl_view.hpp>
#include <stan/math/opencl/kernel_generator/type_str.hpp>
#include <stan/math/opencl/kernel_gener... |
<commit_before>/// JSON encoding and decoding
// Encoding Lua tables to JSON strings, and decoding JSON strings to Lua tables.
// @module json
#include "JSON.h"
#include <Poco/JSON/Parser.h>
#include <Poco/JSON/Handler.h>
#include <Poco/JSON/JSONException.h>
#include <Poco/SharedPtr.h>
#include "Userdata.h"
#include "... |
<commit_before>//=======================================================================
// Copyright (c) 2014-2017 Baptiste Wicht
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//===================================================... |
<commit_before>#include <RcppArmadillo.h>
using namespace Rcpp;
using namespace arma;
//' @title Compute Tau-Overlap Allan Variance
//' @description Computation of Tau-Overlap Allan Variance
//' @usage avarto_arma(x)
//' @param x A \code{vector} with dimensions N x 1.
//' @return av A \code{list} that contains:
//' \... |
<commit_before>/******************************************************************************\
This file is part of the C! library. A.K.A the cbang library.
Copyright (c) 2003-2017, Cauldron Development LLC
Copyright (c) 2003-2017, Stanford University
... |
<commit_before>/*
* Copyright (c) 2016, <copyright holder> <email>
* 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
* ... |
<commit_before>#include "KingJelly.h"
#include "lib/effect_runner.h"
#include "NetworkController.h"
#include "KeyboardController.h"
#include "EffectManager.h"
#include "JellyEffect.h"
// Detect releasing button 0
// TODO: Refactor to cleaner input->event system?
bool ReleaseButton0(const IController& controller)
{
s... |
<commit_before>#include "KingJelly.h"
#include "lib/effect_runner.h"
#include "NetworkController.h"
#include "KeyboardController.h"
#include "AdcController.h"
#include "AutoController.h"
#include "EffectManager.h"
#include "JellyEffect.h"
// Detect releasing button 0
// TODO: Refactor to cleaner input->event system?
... |
<commit_before>// @(#)root/graf:$Name: $:$Id: TPaveStats.cxx,v 1.8 2002/03/13 17:00:33 rdm Exp $
// Author: Rene Brun 15/03/99
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. ... |
<commit_before>#include <sensor_msgs/image_encodings.h>
#include <tf/transform_datatypes.h>
#include "chessboard_localization/chessboard_localization.h""
namespace chessboard_localization
{
ChessboardLocalization::ChessboardLocalization()
{
// configure the message subscriber and publishers
img_sub_ = nh_.subscri... |
<commit_before>#include "cmake.h"
#include "singletons.h"
#include "filesystem.h"
#include <boost/regex.hpp>
#include "dialogs.h"
#include <iostream> //TODO: remove
using namespace std; //TODO: remove
CMake::CMake(const boost::filesystem::path &path) {
const auto find_cmake_project=[this](const boost::filesystem::p... |
<commit_before>/** @file
A brief file description
@section license License
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 fi... |
<commit_before>/*
* Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file.
*
* 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 n... |
<commit_before>// This file is part of Eigen, a lightweight C++ template library
// for linear algebra. Eigen itself is part of the KDE project.
//
// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser Ge... |
<commit_before>#include "MPPreview.h"
MPPreview::MPPreview(int ideaID)
: BWindow(BRect(100, 100, 900, 700), "tmp", B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS, B_CURRENT_WORKSPACE)
{
// initialize controls
BRect r = Bounds();
r.bottom = r.bottom - 50;
previewTextView = new BTextView(r, NU... |
<commit_before>//===- LowerGuardIntrinsic.cpp - Lower the guard intrinsic ---------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: ManifestExport.cxx,v $
*
* $Revision: 1.15 $
*
* last change: $Author: obo $ $Date: 2006-10-13 11:47:36 $
*
* The Contents of this file a... |
<commit_before>#ifndef STAN_LANG_GENERATOR_GENERATE_INDEXED_EXPR_HPP
#define STAN_LANG_GENERATOR_GENERATE_INDEXED_EXPR_HPP
#include <stan/lang/ast.hpp>
#include <stan/lang/generator/generate_indexed_expr_user.hpp>
#include <stan/lang/generator/generate_quoted_string.hpp>
#include <ostream>
#include <string>
#include <... |
<commit_before>#ifndef STAN_LANG_GRAMMARS_EXPRESSION_GRAMMAR_DEF_HPP
#define STAN_LANG_GRAMMARS_EXPRESSION_GRAMMAR_DEF_HPP
#include <stan/lang/grammars/expression_grammar.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <sstream>
#include <string>
#include <vector>
... |
<commit_before>/*
* Copyright (c) 2003-2005 The Regents of The University of Michigan
* Copyright (c) 2010 The Hewlett-Packard Development Company
* 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>/*************************************************************************
*
* $RCSfile: SwXMLBlockListContext.cxx,v $
*
* $Revision: 1.3 $
*
* last change: $Author: mtg $ $Date: 2001-07-11 11:31:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the f... |
<commit_before>#include <thectci/hash.hpp>
#include <thectci/compile_time_value.hpp>
#include <igloo/igloo_alt.h>
using namespace igloo;
Describe( a_hash )
{
It( is_a_compile_time_hash )
{
typedef the::ctci::compile_time< uint32_t, the::ctci::hash( "dogfood" ) > hash_type;
}
It( is_the_djb2_hash_algorith... |
<commit_before>/*************************************************************************
*
* $RCSfile: sdmod.cxx,v $
*
* $Revision: 1.20 $
*
* last change: $Author: rt $ $Date: 2003-09-19 08:16:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following license... |
<commit_before>/*
* Copyright (C) 2010 - 2014 Leonid Kostrykin
*
* Chair of Medical Engineering (mediTEC)
* RWTH Aachen University
* Pauwelsstr. 20
* 52074 Aachen
* Germany
*
*/
#include <Carna/base/Text.h>
#include <fstream>
namespace Carna
{
namespace base
{
namespace text
{
// -----------------... |
<commit_before>/***
* @file arma_extend.hpp
* @author Ryan Curtin
*
* Include Armadillo extensions which currently are not part of the main
* Armadillo codebase.
*
* This will allow the use of the ccov() function (which performs the same
* function as cov(trans(X)) but without the cost of computing trans(X)). ... |
<commit_before>/*
* This file is part of the µOS++ distribution.
* (https://github.com/micro-os-plus)
* Copyright (c) 2016 Liviu Ionescu.
*
* 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 Sof... |
<commit_before>#include <algorithm>
#include <map>
#include <string>
#include <limits>
#include "Profiling.h"
#include "IRMutator.h"
#include "IROperator.h"
namespace Halide {
namespace Internal {
namespace {
const char kBufName[] = "ProfilerBuffer";
const char kToplevel[] = "$total$";
const char kOverhe... |
<commit_before>/*
* Copyright (c) 2014, 2019 ARM Limited
* All rights reserved
*
* Copyright (c) 2001-2006 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions ... |
<commit_before>/*
* match.hpp
*
* Created on: 22.02.2017
* Author: Andreas Molzer
*/
#include "hdr/std.hpp"
#include "hdr/types/maybe.hpp"
/** Intended usage:
* match var [(with template selector function)]...
* Essentially works as a monad M where
* (match var) constructs (M V) and
* (with templa... |
<commit_before>#include <stdio.h>
#ifdef WIN32
#include <windows.h>
#endif
#include <GL/glut.h>
#include "RayTracer.hpp"
//temporary variables
Vec3Df testRayOrigin;
Vec3Df testRayDestination;
string input;
//use this function for any preprocessing of the mesh.
void init(int argc, char **argv){
//load the mesh fil... |
<commit_before>/*
* Copyright (c) 2012 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 2016, Jernej Kovacic
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 wri... |
<commit_before>/*
* RelayNode.cpp
* Homie Node for a Relay with optional status indicator LED
*
* Version: 1.0
* Author: Lübbe Onken (http://github.com/luebbe)
*/
#include "RelayNode.hpp"
#include <Homie.hpp>
#define RELAYPIN 0
HomieSetting<long>
relayPinSetting("relayPin", "The pin to which the relay is ... |
<commit_before>//===-- ipcd.cpp ----------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------... |
<commit_before>#include "curl.hpp"
#include <curl/curl.h>
#include <string>
#include <iostream>
#include <vector>
#define HANDLE_CURL_CODE(what) \
code = (what); \
if (code != ::CURLE_OK) { \
errorMessage = std::string("CURL error: ") + ::curl_easy_strerror(code); \
return false; \
}
names... |
<commit_before>/******************************************************************************
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor ... |
<commit_before>#include "itkCommandLineArgumentParser.h"
#include "CommandLineArgumentHelper.h"
#include "NaryImageOperatorMainHelper.h"
#include "NaryImageOperatorHelper.h"
//-------------------------------------------------------------------------------------
int main( int argc, char **argv )
{
/** Check argumen... |
<commit_before>#include "libtorrent/upnp.hpp"
#include "libtorrent/socket.hpp"
#include "libtorrent/connection_queue.hpp"
#include <boost/bind.hpp>
#include <boost/ref.hpp>
#include <boost/intrusive_ptr.hpp>
using namespace libtorrent;
void callback(int tcp, int udp, std::string const& err)
{
std::cerr << "tcp: " <<... |
<commit_before>
/*
* AUTOGENERATED CODE, DO NOT EDIT
*
* Author(s):
* - Chris Kilner <ckilner@aldebaran-robotics.com>
* - Cedric Gestes <gestes@aldebaran-robotics.com>
*
* Copyright (C) 2010, 2012 Aldebaran Robotics
*/
#pragma once
#ifndef _QI_MESSAGING_OBJECT_HXX_
#define _QI_MESSAGING_OBJECT_HXX_
#include <qim... |
<commit_before>#include "debug.hh"
#include "assert.hh"
#include "buffer.hh"
#include "buffer_manager.hh"
#include "string.hh"
namespace Kakoune
{
void write_debug(StringView str)
{
if (not BufferManager::has_instance())
{
fprintf(stderr, "%s\n", (const char*)str.zstr());
return;
}
c... |
<commit_before>#include "Util.h"
#include "Introspection.h"
#include "Debug.h"
#include "Error.h"
#include <sstream>
#include <map>
#include <atomic>
#include <mutex>
#include <string>
#ifdef _MSC_VER
#include <io.h>
#else
#include <unistd.h>
#include <stdlib.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#if... |
<commit_before>/*
* This file is a part of Xpiks - cross platform application for
* keywording and uploading images for microstocks
* Copyright (C) 2014-2017 Taras Kushnir <kushnirTV@gmail.com>
*
* 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 ... |
<commit_before>#include "stdafx.h"
#include "Python.h"
#include "SQFReader.h"
#include <string>
#include <sstream>
#include "../src/ExceptionFetcher.h"
#include <cstdio>
#include <string>
#include <vector>
#include <utility>
#include <iterator>
#include <array>
#include <algorithm>
#include <chrono>
using namespace... |
<commit_before>/* mbed Microcontroller Library
* Copyright (c) 2013-2017 ARM 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.apache.org/licenses/LICENSE-2.0
... |
<commit_before>////////////////////////////////////////////////////////////////////////////////
//
// File: ShapeType.h
//
// For more information, please see: http://www.nektar.info/
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronauti... |
<commit_before>/*
* Copyright 2007-2021 CM4all GmbH
* All rights reserved.
*
* author: Max Kellermann <mk@cm4all.com>
*
* 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... |
<commit_before><commit_msg>Add log return fail<commit_after><|endoftext|> |
<commit_before>#include "draw.hpp"
#include <algorithm>
#include <iostream>
#include <sstream>
#include "args.hpp"
#include "config.hpp"
#include "task.hpp"
#include "todolist.hpp"
#include "typer.hpp"
#include "win.hpp"
using std::string;
using std::stringstream;
// ===================|
// internal functions |
// ... |
<commit_before>/** @file
@brief Implementation
@date 2015
@author
Sensics, Inc.
<http://sensics.com/osvr>
*/
// Copyright 2015 Sensics, 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 ... |
<commit_before>//
// peglint.cc
//
// Copyright (c) 2015 Yuji Hirose. All rights reserved.
// MIT License
//
#include <peglib.h>
#include <fstream>
using namespace std;
bool read_file(const char* path, vector<char>& buff)
{
ifstream ifs(path, ios::in | ios::binary);
if (ifs.fail()) {
return false;... |
<commit_before>/*
This file is part of the Multivariate Splines library.
Copyright (C) 2012 Bjarne Grimstad (bjarne.grimstad@gmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version ... |
<commit_before>#include <stdio.h>
#include <stdlib.h>
#include "simpletest.h"
// foundation/core
#include "foundation/test_iobj.h"
#include "foundation/test_iobjcache.h"
#include "foundation/test_iref.h"
#include "foundation/test_iwref.h"
#include "foundation/test_imeta.h"
// foundation/memory
#include "foundation/t... |
<commit_before>/** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */
#include "SkirtBrim.h"
#include "support.h"
namespace cura
{
void SkirtBrim::generate(SliceDataStorage& storage, int start_distance, unsigned int primary_line_count, bool outside_only)
{
bool is_skirt = start_distan... |
<commit_before>#include "algorithm-utils-cpp/algorithm-utils.h"
#include <boost/foreach.hpp>
#define foreach BOOST_FOREACH
#include <iostream>
bool is_even(const int& number)
{
return number % 2 == 0;
}
bool is_greater_than(int base, const int& number)
{
return number > base;
}
bool c_is_greater_than_a_plu... |
<commit_before>/** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */
#include "SkirtBrim.h"
#include "support.h"
namespace cura
{
void generateSkirtBrim(SliceDataStorage& storage, int start_distance, unsigned int count, int minLength, bool outside_only)
{
if (count == 0) return;
... |
<commit_before>#include <vector>
#include <string>
#include <utility>
#include <SFML/Graphics.hpp>
#include "JsonBox.h"
#include "area.hpp"
#include "door.hpp"
#include "entity.hpp"
#include "inventory.hpp"
#include "creature.hpp"
#include "dialogue.hpp"
#include "tile_set.hpp"
#include "entity_manager.hpp"
#include "... |
<commit_before>#include "Math/Cartesian3D.h"
#include "Math/Math_vectypes.hxx"
#include "benchmark/benchmark.h"
#include <random>
static bool is_aligned(const void *__restrict__ ptr, size_t align)
{
return (uintptr_t)ptr % align == 0;
}
static void BM_Cartesian3D_CreateEmpty(benchmark::State &state)
{
while ... |
<commit_before>///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted prov... |
<commit_before>// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2018-2019 Intel Corporation
#ifndef OPENCV_GAPI_UTIL_HPP
#define OPENCV_GAPI_UTIL_HPP
#i... |
<commit_before>// PropertyTable.cpp
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
* Copyright (c) 2011-12, Stanford University. All rights reserved.
* Use of the OpenSim software in source form is permitted provided that the following
* conditions are met:
* 1. The software... |
<commit_before><commit_msg>Go back to working dir if par compilation fails, this helps debugging (AndreaR)<commit_after>void LoadLibraries(Bool_t useParFiles=kFALSE) {
gSystem->Load("libTree.so");
gSystem->Load("libGeom.so");
gSystem->Load("libPhysics.so");
gSystem->Load("libVMC.so");
gSystem->Load("libSTEER... |
<commit_before>#include <iostream>
#include <vector>
#include <stdlib.h>
#include <time.h>
using namespace std;
//global variables
int HEALTH = 100;
int WEALTH = 0;
string SHIP = "Sloop";
int SHIP_HEALTH = 100;
string NAME;
vector <string> CREW;
//prototypes
void game_play();
//clear screen
void clear()
{
// CSI[2... |
<commit_before>#include "game.hpp"
#include "main_state.hpp"
#include "entity_creator.hpp"
Game::~Game() {
SDL_DestroyRenderer(m_render);
SDL_DestroyWindow(m_window);
Mix_Quit();
IMG_Quit();
SDL_Quit();
}
int Game::init() {
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
std::cout << "SDL_Init E... |
<commit_before>#include "TokenList.h"
TokenListIterator::TokenListIterator(list<Token*>::iterator begin,
list<Token*>::iterator end) {
it = begin;
this->begin = begin;
this->end = --end;
it--;
}
void TokenListIterator::toEnd () {
it = end;
}
Token* TokenListIterator::previous () {
return ... |
<commit_before>#include <cpr/cpr.h>
#include <fstream>
#include <regex>
#include <tw/reader.h>
#include <utils.h>
#include "permissions.h"
#include "TwitchBot.h"
#include "version.h"
static const char *TWITCH_SERV = "irc.twitch.tv";
static const char *TWITCH_PORT = "80";
static std::string urltitle(const std::string ... |
<commit_before>
#include <cmath>
#include "beam.h"
Beam::Beam(int channel, int base_note, int color) :
channel(channel), base_note(base_note), color(color)
{
}
void Beam::draw_bg()
{
ofPushStyle();
ofFill();
ofSetHexColor(color);
ofDrawRectangle(0, 0, 1, 1);
ofPopStyle();
}
void Beam::draw(... |
<commit_before>#include "PLC_LSH.h"
#include "SymmIsotropicElasticityTensor.h"
template<>
InputParameters validParams<PLC_LSH>()
{
InputParameters params = validParams<SolidModel>();
// Power-law creep material parameters
params.addRequiredParam<Real>("coefficient", "Leading coefficent in power-law equation"... |
<commit_before>#include <string>
#include "nbind/api.h"
#include "control.h"
#include "ui.h"
class UiCheckbox : public UiControl {
DEFINE_EVENT(onToggled)
public:
UiCheckbox(std::string text);
UiCheckbox();
DEFINE_CONTROL_METHODS()
void setText(std::string text);
std::string getText();
void setChecked(bool c... |
<commit_before>// I2C interface
// (c) Koheron
// See also https://www.kernel.org/doc/Documentation/spi/spidev
#ifndef __DRIVERS_LIB_I2C_DEV_HPP__
#define __DRIVERS_LIB_I2C_DEV_HPP__
#include <cstdio>
#include <cstdint>
#include <cassert>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/... |
<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 "base/base_paths.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: filtopt.cxx,v $
*
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2005-09-08 18:43:24 $
*
* The Contents of this file are made a... |
<commit_before>#include <iostream>
#include "eval.hpp"
#include "bitboards.hpp"
#include "other.hpp"
#define INF (1000000)
#define TURN_BONUS (10)
#define PIECE_VALUE (100)
#define MOBILITY_VALUE (10)
const int PST[49] =
{
30, 20, 10, 10, 10, 20, 30,
20, 10, 10, 5, 10, 10, 20,
10, 10, 5, 0, ... |
<commit_before>/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: rechead.cxx,v $
* $Revision: 1.6... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formel.hxx,v $
*
* $Revision: 1.8 $
*
* last change: $Author: obo $ $Date: 2006-07-10 13:52:20 $
*
* The Contents of this file are made a... |
<commit_before>/*
* Copyright 2007-2013 The OpenMx 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 requi... |
<commit_before>#include "../test.h"
#include <rxcpp/operators/rx-take.hpp>
#include <rxcpp/operators/rx-observe_on.hpp>
const int static_onnextcalls = 100000;
SCENARIO("range observed on new_thread", "[hide][range][observe_on_debug][observe_on][long][perf]"){
const int& onnextcalls = static_onnextcalls;
GIVEN... |
<commit_before>/******************************************************************************
* Copyright 2017 The Apollo 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 ... |
<commit_before>#include "from_json.h"
#include <unordered_map>
#include <stack>
#include <asdf_multiplat/utilities/utilities.h>
using namespace asdf;
using namespace asdf::util;
namespace tired_of_build_issues
{
std::string read_text_file(std::string const& filepath) {
//if(!is_file(filepath))
/... |
<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 b... |
<commit_before>/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#include "config.h"
#include <assert.h>
#include <memcached/engine.h>
#include "ep_engine.h"
/**
* Helper function to avoid typing in the long cast all over the place
* @param handle pointer to the engine
* @return the ... |
<commit_before>/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holdi... |
<commit_before>#include <cfloat>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <sstream>
#include "equation.h"
float equation::eval(float x, float y, float z){
this->lit_i=this->literals.size()-1;
this->var_i=this->variables.size()-1;
this->ins_i=this->instructions.size()-1;
this->evr_i=this->every... |
<commit_before>#include <sge/actionmgr.hpp>
using namespace std;
namespace sge
{
void ActionManager::register_keyboard_action(string const &name, SDL_Keycode key)
{
a_keyboard[name].push_back(key);
}
void ActionManager::register_mouse_action(string const &name, Uint8 button)
{
a_m... |
<commit_before>/******************************************************************************
* Copyright 2017 The Apollo 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 ... |
<commit_before>/*
* File: rigResection_test.cpp
* Author: sgaspari
*
* Created on January 2, 2016, 11:38 PM
*/
#include "rigResection.hpp"
#include <openMVG/cameras/Camera_Pinhole_Radial.hpp>
#include <openMVG/geometry/pose3.hpp>
#include "testing/testing.h"
#include <vector>
#include <math.h>
#include <chro... |
<commit_before>/*
Copyright (c) 2009, 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>/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial... |
<commit_before>/*=========================================================================
*
* 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
*
* ... |
<commit_before>#include "response.h"
#include "request.h"
#include <boost/filesystem.hpp>
#include <iomanip>
#include "compress.h"
namespace httpserver
{
using field = boost::beast::http::field;
httpserver::response getCompressResponse(const string& str)
{
using namespace httpserver;
const auto& req = httpser... |
<commit_before>#include <iostream>
#include <sys/time.h>
#include <unistd.h>
using namespace std;
void g(int times)
{
cout << times << ": I'm fucking g.." << endl;
}
static const int TIMES = 5;
static int times = TIMES;
static int64_t start = 0;
bool visit_card = true;
static int64_t last_visit = 0;
void f()
{
s... |
<commit_before>/**
* The Seeks proxy and plugin framework are part of the SEEKS project.
* Copyright (C) 2011 Emmanuel Benazera <ebenazer@seeks-project.info>
*
* This program 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.