text stringlengths 54 60.6k |
|---|
<commit_before>#include <queue>
#include <cstring>
#include <iostream>
#include <vector>
#include <string.h>
#include <unistd.h>
#include <boost/tokenizer.hpp>
#include <boost/algorithm/string.hpp>
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/wait.h>
using namespace std;
using namespace boost;
// Cas... |
<commit_before>#include<iostream>
#include<string.h>
#include<vector>
#include<sys/types.h>
#include<sys/wait.h>
#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<cstring>
#include<boost/tokenizer.hpp>
#include<algorithm>
#include<iterator>
#include<sstream>
using namespace std;
using namespace boost;
... |
<commit_before>#include "desktop.h"
#define TAB 9
using namespace std;
void open_menu(vector <string>& app_list) {
Init_MENSTR(menu_panel);
menu_panel.posX = 1;
menu_panel.posY = 1;
unsigned int selected_menu = menu_winV2(&menu_panel, "", app_list, main_system_color);
if (selected_menu) {
app_start(select... |
<commit_before>//===- AsmWriterEmitter.cpp - Generate an assembly writer -----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//... |
<commit_before>#include <iostream>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string>
using namespace std;
int main(int argc, char** argv){
char *user = getlogin(); //syscall for getting username
//perror check for getlogin()
if(user == NULL){
... |
<commit_before>// Copyright (C) 2015, 2016 Pierre-Luc Perrier <pluc-dev@the-pluc.net>
//
// 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>// This is a regression test on debug info to make sure that we can access
// qualified global names.
// RUN: %llvmgcc -S -O0 -g %s -o - | \
// RUN: llc -disable-cfi --disable-fp-elim -o %t.s -O0
// RUN: %compile_c %t.s -o %t.o
// RUN: %link %t.o -o %t.exe
// RUN: %llvmdsymutil %t.exe
// RUN: echo {b... |
<commit_before>// -*- c-basic-offset: 8; indent-tabs: nil -*-
//
// See LICENSE for details.
//
#include <smoke.h>
#include <Qt/qstring.h>
#include <Qt/qstringlist.h>
#include <Qt/qpointer.h>
#include <Qt/qmetaobject.h>
#include <QtCore/qobject.h>
#include <QtGui/qapplication.h>
#include "commonqt.h"
// work around bu... |
<commit_before>#pragma once
#include "bdd_model.hpp"
#include "graph_algorithm.hpp"
#include "graph_model.hpp"
#include <vector>
namespace verilog
{
//using namespace bdd;
//using namespace graph;
struct BDD_Builder {
graph::G & g;
bdd::BDD & bdds;
std::vector<bdd::Node*> bdd_nodes;
BDD_Builder(graph::G &... |
<commit_before>//===- IntrinsicEmitter.cpp - Generate intrinsic information --------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by Chris Lattner and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===-----... |
<commit_before>#include <string>
#include <vector>
#include <boost/tokenizer.hpp>
#include <iostream>
#include <stdlib.h>
#include <cstdio>
#include <sys/wait.h>
using namespace boost;
using namespace std;
class rshell{
protected:
//Data Members
string commands;
string nextConnector;
vector<string> commandli... |
<commit_before>// Copyright 2014 BVLC and contributors.
#ifndef CAFFE_DATA_LAYERS_HPP_
#define CAFFE_DATA_LAYERS_HPP_
#include <string>
#include <utility>
#include <vector>
#include "leveldb/db.h"
#include "lmdb.h"
#include "pthread.h"
#include "hdf5.h"
#include "boost/scoped_ptr.hpp"
#include "caffe/blob.hpp"
#inc... |
<commit_before>/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
/* See genQuery.h for a description of this API call.*/
#include "reFuncDefs.hpp"
#include "genQuery.hpp"
#include "icatHighLevelRoutines.hpp"
#... |
<commit_before>#warning Use of defs.hpp is deprecated, please use either autodetect.hpp or generic.hpp
#include "internal/defs.hpp"
#ifndef STEP_INHERITANCE
#include "internal/drivers/GenericDriver.hpp"
#endif
<commit_msg>Fixing non valid preprocessor warning on msvc<commit_after>#ifdef __GNUC__
#warning "Use o... |
<commit_before>#ifndef GENERIC_CONTAINS_HPP
# define GENERIC_CONTAINS_HPP
# pragma once
namespace generic
{
// contains
//////////////////////////////////////////////////////////////////////////////
template <class Container, class Key>
inline bool contains(Container const& c, Key const& key) noexcept
{
return c.en... |
<commit_before>#include <algorithm>
#include <vector>
#include <iostream>
#include <stdio.h>
void countsort(std::vector<int> &, int);
void radixsort(std::vector<int> &);
void printVector(std::vector<int> &);
int main()
{
int mVecSize;
while (true)
{
// Load arrays from stdin
... |
<commit_before>/*
Copyright (c) 2007, 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 "cmbNucMainWindow.h"
#include "ui_qNucMainWindow.h"
#include <vtkActor.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkCompositePolyDataMapper2.h>
#include <QFileDialog>
#include <QStringList>
#include <QDebug>
#include <QDockWidget>
... |
<commit_before>// This file is part of the dune-stuff project:
// https://github.com/wwu-numerik/dune-stuff
// Copyright holders: Rene Milk, Felix Schindler
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
//
// Contributors: Kirsten Weber
#ifndef DUNE_STUFF_FUNCTIONS_EXPRESSION_HH
#def... |
<commit_before>/*
Copyright (c) 2007, 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 condit... |
<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 "ppapi/shared_impl/audio_impl.h"
#include "base/atomicops.h"
#include "base/logging.h"
using base::subtle::Atomic32;
namesp... |
<commit_before>/* -------------------------------------------------------------------------- *
* OpenSim: forward.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and ... |
<commit_before>//
// Copyright (C) 2011-15 DyND Developers
// BSD 2-Clause License, see LICENSE.txt
//
#pragma once
#include <Python.h>
#include <dynd/type_registry.hpp>
#include "pyobject_type.hpp"
using namespace dynd;
// Unpack and convert a single element to a PyObject.
template <typename T>
inline std::enab... |
<commit_before>/*
Copyright (c) 2005, 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>/*
Copyright (c) 2005, 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>//Copyright (c) 2014 Naohiro Hayshi and ROS JAPAN Users Group ALL Rights Reserved
//Author Naohiro Hayashi 2014/11/07
#include "ros/ros.h"
#include <iostream>
#include <nextage_ros_seqplay_util/goPose.h>
#include <hrpsys_ros_bridge/OpenHRP_SequencePlayerService_waitInterpolation.h>
#include <hrpsys_ros_... |
<commit_before>#include <m7/AllocatorDeleterDef.H>
namespace m7 {
template <typename Alloc>
AllocatorDeleter<Alloc>::AllocatorDeleter(Alloc* alloc)
: _alloc(alloc)
{
}
template <typename Alloc>
template <typename T>
inline void AllocatorDeleter<Alloc>::operator()(T* p) const {
_alloc->free(p);
}
} //namespace m... |
<commit_before><commit_msg>Signed-off-by: xsmart <xsmart@veyesys.com><commit_after><|endoftext|> |
<commit_before><commit_msg>Remove captive portal check from oauth2 token fetcher.<commit_after><|endoftext|> |
<commit_before>#ifndef DUNE_DETAILED_DISCRETIZATIONS_EVALUATION_INTERFACE_HH
#define DUNE_DETAILED_DISCRETIZATIONS_EVALUATION_INTERFACE_HH
#include <memory>
#include <dune/common/dynmatrix.hh>
#include <dune/common/fvector.hh>
#include <dune/stuff/localfunction/interface.hh>
#include <dune/detailed/discretizations/... |
<commit_before>/*
* Copyright (c) 2010 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementati... |
<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 <string>
#include <vector>
#include "base/bind.h"
#include "base/message_loop.h"
#include "chrome/browser/chrome_plugin_servi... |
<commit_before>#ifndef V_SMC_CORE_MONITOR_HPP
#define V_SMC_CORE_MONITOR_HPP
#include <vSMC/internal/common.hpp>
namespace vSMC {
/// \brief Monitor for Monte Carlo integration
///
/// \tparam T State state type. Requiment:
/// \li Consturctor: T (IntType N)
/// \li Method: copy (IntType from, IntType to)
template <... |
<commit_before>#ifndef BULL_CORE_PREREQUISITES_HPP
#define BULL_CORE_PREREQUISITES_HPP
#include <cstdint>
#define BULL_COMPILER_MSC 1
#define BULL_COMPILER_GCC 2
#define BULL_COMPILER_INTEL 3
#define BULL_COMPILER_CLANG 4
#define BULL_COMPILER_MINGW_32 5
#define BULL_COMPILER_MINGW_64 6
#if defined _... |
<commit_before>/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Module: FGColumnVector3.cpp
Author: Originally by Tony Peden [formatted here by JSB]
Date started: 1998
Purpose: FGColumnVector3 class
Called by: Various
------------- Copyright (C) 1998 Tony Peden and Jon S. Berndt (jon@... |
<commit_before>#ifndef V_SMC_CORE_SAMPLER_HPP
#define V_SMC_CORE_SAMPLER_HPP
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vSMC/internal/common.hpp>
namespace vSMC {
/// \brief SMC Sampler
template <typename T>
class Sampler
{
public :
/// The type of initialization functor
... |
<commit_before>/*
*
* MIT License
*
* Copyright (c) 2016-2018 The Cats Project
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the ... |
<commit_before>#include "common.h"
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <ctime>
#include <cstddef>
#include <cstdio>
#include <mutex>
#include <memory>
#ifdef PROJECT_NAMESPACE
namespace PROJECT_NAMESPACE {
#endif // PROJECT_NAMESPACE
namespace common {
namespace {
const bool u... |
<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/extensions/theme_installed_infobar_delegate.h"
#include <string>
#include "app/l10n_util.h"
#include "app/re... |
<commit_before>#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cstdio>
#include "consts.h"
#include "circuits/circuit.h"
#include "matrix/newtonraphson.h"
using namespace std;
static const int MAX_ATTEMPTS = 500;
static const int MAX_LOOPS = 1000;
static const double TOLERANCE = 1e-4;
void random... |
<commit_before>/*
* Copyright (C) 2017 Tmplt <tmplt@dragons.rocks>
*
* 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 later versio... |
<commit_before>#pragma once
#include <string>
#ifndef _MSC_VER
#include <cxxabi.h>
#endif
namespace wiertlo
{
namespace detail
{
void replaceAll(std::string& source, const std::string& from, const std::string& to)
{
std::string newString;
newString.reserve(source.length()); // avoids a few memory allocat... |
<commit_before>#pragma once
#include <tuple>
#include <type_traits>
#include <cmath>
#include <limits>
namespace spn {
//! 累積カウンタの比較用
template <class T>
bool CompareAndSet(T& num, const T& target) {
if(num != target) {
num = target;
return true;
}
return false;
}
//! コンパイル時数値計算 & 比較
template <int M, ... |
<commit_before>/**@file Logical Channel. */
/*
* Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
* Copyright 2010 Kestrel Signal Processing, Inc.
* Copyright 2011 Range Networks, Inc.
*
* This software is distributed under the terms of the GNU Affero Public License.
* See the COPYING file in the main ... |
<commit_before>#include "RPIBeerPongController.h"
#include <signal.h>
#include <unistd.h>
#include "OCPlatform.h"
#include "OCApi.h"
using namespace OIC;
using namespace Service;
RPIBeerPongController::Ptr controller;
#define FREQUENCY_MILLISECONDS 500000 // 500 MS
/*
* This is a signal handling function for SIGI... |
<commit_before>#include "../include/semver/semver.hpp"
#include <sstream>
#include <exception>
#include <boost/regex.hpp>
using std::stringstream;
namespace semver {
static unsigned
string_to_int(const string value) {
stringstream ss(value);
unsigned result;
ss >> result;
return result;
}
/*
* Methods names ... |
<commit_before>/* _______ __ __ __ ______ __ __ _______ __ __
* / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
* / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
* / / /__ / / // / // / // / / / __... |
<commit_before>#ifndef COFFEE_MILL_BEST_FIT
#define COFFEE_MILL_BEST_FIT
#include <vector>
namespace mill
{
template<typename sclT, template<typename sclT, std::size_t D> class vectorT,
template<typename sclT, std::size_t R, std::size_t C> class matrixT>
class BestFit
{
public:
using scalar_type = s... |
<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 "base/process_util.h"
#include "base/test/test_timeouts.h"
#include "chrome/browser/service/service_process_control.h"
#includ... |
<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/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/utf_string_conversions.h"
#includ... |
<commit_before>/**\file
* \ingroup example-programmes
* \brief "Hello World" HTTP Server
*
* An example HTTP server that serves a simple "Hello World!" on /, and a 404 on
* all other resources.
*
* Call it like this:
* \code
* $ ./hello http:localhost:8080
* \endcode
*
* With localhost and 8080 being a host... |
<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/sync/notifier/registration_manager.h"
#include <cstddef>
#include <deque>
#include <vector>
#include "base/b... |
<commit_before>//=======================================================================
// Copyright (c) 2013-2018 Baptiste Wicht.
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//==================================================... |
<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/crypto_module_password_dialog_view.h"
#include "base/basictypes.h"
#include "base/bind.h"
#include "... |
<commit_before>#include <Game/ECS/GameWorld.h>
#include <Game/ECS/Components/ActionQueueComponent.h>
#include <Game/ECS/Components/SceneComponent.h>
#include <AI/Navigation/NavAgentComponent.h>
#include <AI/Movement/SteerAction.h>
#include <Game/Objects/SmartObjectComponent.h>
#include <Game/Objects/SmartObject.h>
#inc... |
<commit_before>/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2012 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
... |
<commit_before>#include "DataLikelihood.h"
#include "multichoose.h"
#include "multipermute.h"
// log probability of a given matching of true and observed alleles
// true alleles are the 'real' alleles
// observed alleles are whet we observe
// a mismatch between these two sets implies an error, which is scored accord... |
<commit_before>#include "codeConverterBase.h"
#include <qrkernel/settingsManager.h>
using namespace generatorBase::converters;
using namespace qReal;
CodeConverterBase::CodeConverterBase(QString const &pathToTemplates
, interpreterBase::robotModel::RobotModelInterface const &robotModel
, QMap<interpreterBase::ro... |
<commit_before>/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2013 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
... |
<commit_before>/*
* PerfectSensorProcessor.hpp
*
* Created on: Sep 28, 2014
* Author: Péter Fankhauser
* Institute: ETH Zurich, ANYbotics
*/
#pragma once
#include <elevation_mapping/sensor_processors/SensorProcessorBase.hpp>
namespace elevation_mapping {
/*!
* Sensor processor for laser range sensors... |
<commit_before>#ifndef PICOLIB_SOCKET_IMPL_H_
#define PICOLIB_SOCKET_IMPL_H_
#include <sys/un.h>
namespace Pico {
namespace Network {
FUNCTION
uint16_t _htons(uint16_t port)
{
return cpu_to_be16(port);
}
template <enum AddressType>
struct Sockaddr;
... |
<commit_before>#ifndef VSMC_UTILITY_CL_MANAGER_HPP
#define VSMC_UTILITY_CL_MANAGER_HPP
#include <vsmc/internal/config.hpp>
#include <vsmc/internal/assert.hpp>
#include <vsmc/internal/defines.hpp>
#include <vsmc/internal/forward.hpp>
#include <vsmc/internal/traits.hpp>
#include <vsmc/utility/cl_wrapper.hpp>
#include <... |
<commit_before>/*!
\copyright (c) RDO-Team, 2012
\file function.h
\author (rdo@rk9.bmstu.ru)
\date 14.12.2012
\brief -
\indent 4T
*/
// ---------------------------------------------------------------------------- PCH
#include "simulator/compiler/parser/pch.h"
// --------... |
<commit_before>#include "midiconnectionsmodel.h"
#include "iomidi.h"
#include <QtDebug>
bool operator==(const snd_seq_addr_t& lhs, const snd_seq_addr_t& rhs) {
return lhs.client == rhs.client && lhs.port == rhs.port;
}
MidiConnectionsModel::MidiConnectionsModel(IOMidi* io) :
QAbstractListModel(io),
m_io... |
<commit_before>#include "shader.h"
#include "glslUtility.h"
using namespace glslUtility;
ShaderProgram::ShaderProgram()
{
program = 0;
vs = 0;
fs = 0;
gs = 0;
}
ShaderProgram::~ShaderProgram()
{
glDeleteProgram( program );
glDeleteShader( vs );
glDeleteShader( fs );
glDeleteShader( gs... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: vendorbase.cxx,v $
*
* $Revision: 1.5 $
*
* last change: $Author: hr $ $Date: 2006-06-20 00:10:20 $
*
* The Contents of this file are mad... |
<commit_before>/**
* @file signal.cpp
* @author Albert Uchytil (xuchyt03)
* @brief SignalHandler
*/
#include "signal.hpp"
/**
* Model to print stats.
*/
Simulation* SignalHandler::simulation = NULL;
/**
* Handles received signals.
*/
void SignalHandler::handler(int signum)
{
debug("SignalHandler", "signal ... |
<commit_before>#include <iostream>
#include <memory>
#include <unordered_map>
using std::swap;
//
// The classes
struct Shape
{
virtual ~Shape()
{
}
virtual double area() const = 0;
virtual double perimeter() const = 0;
};
static const double pi = 3.14159265359;
class Circle : public Shape
{
const doub... |
<commit_before>#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector <string> Census;
void Census2017(){
// Census.push_back("Name @ GitHub link");
Census.push_back("Allen Comp Sci @ https://github.com/AllenCompSci");
Census.push_back("Mr. Hudson @ https://github.com/theshrewedshre... |
<commit_before>#include "openmc/source.h"
#include <algorithm> // for move
#include <sstream> // for stringstream
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
#include <dlfcn.h> // for dlopen
#endif
#include <fmt/core.h>
#include "xtensor/xadapt.hpp"
#include "openmc/bank.h"
#include "openm... |
<commit_before>//=============================================================================================================
/**
* @file main.cpp
* @author Christoph Dinh <chdinh@nmr.mgh.harvard.edu>;
* Matti Hamalainen <msh@nmr.mgh.harvard.edu>
* @version 1.0
* @date July, 2012
*
* @section LIC... |
<commit_before>//===-- EmitFunctions.cpp - interface to insert instrumentation --*- C++ -*--=//
//
// This inserts a global constant table with function pointers all along
//
//===----------------------------------------------------------------------===//
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#inc... |
<commit_before>/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribut... |
<commit_before>// StringUtil.cc for fluxbox
// Copyright (c) 2001 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
//
// 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... |
<commit_before>#include <stdlib.h>
#include <v8.h>
#include <node.h>
#include <node_buffer.h>
namespace bdispose {
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
using v8::Handle;
using v8::HandleScope;
using v8::Isolate;
using v8::Local;
using v8::Object;
using v8::String;
using v8::Value;
void Buffer... |
<commit_before>#include "string.h"
namespace std {
int strlen(const char* str) {
int i;
while(str[i] != '\0')
i++;
return i;
}
const char* begin(const char* str) {
return str;
}
const char* end(const char* str) {
// Find the end of the string (where the nul is found)
while(*str != '\... |
<commit_before><commit_msg>WebMediaPlayerGStreamer: do not call delegate_->DidPlay twice in a row<commit_after><|endoftext|> |
<commit_before>//===-- sanitizer_common_libcdep.cc ---------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------... |
<commit_before>/*************************************************************************
*
* $RCSfile: MQueryHelper.hxx,v $
*
* $Revision: 1.4 $
*
* last change: $Author: hjs $ $Date: 2004-06-25 18:34:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following ... |
<commit_before>#include <GLUL/G2D/Point.h>
#include <GLUL/G2D/Quad.h>
namespace GLUL {
namespace G2D {
Point::Point(unsigned int size) : _color(glm::vec4 { 1.0f }), size(size) { }
Point::Point(const glm::vec2& position, unsigned int size) : Point(size) {
setPosition(position);
... |
<commit_before>/*
The OpenTRV project licenses this file to you
under the Apache Licence, Version 2.0 (the "Licence");
you may not use this file except in compliance
with the Licence. You may obtain a copy of the Licence at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... |
<commit_before>//---------------------------------------------------------
// Copyright 2018 Ontario Institute for Cancer Research
// Written by Jared Simpson (jared.simpson@oicr.on.ca)
//---------------------------------------------------------
//
// nanopolish_vcf2fasta - write a new genome sequence
// by introducing... |
<commit_before>#include "../stdafx.h"
#include "wcashjson.h"
#include "wpkistore.h"
void WCashJson::Init(v8::Handle<v8::Object> exports){
METHOD_BEGIN();
v8::Local<v8::String> className = Nan::New("CashJson").ToLocalChecked();
// Basic instance setup
v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTe... |
<commit_before>/*
This file is part of the ORK library.
Full copyright and license terms can be found in the LICENSE.txt file.
*/
#include<atomic>
#include<mutex>
#include<sstream>
#include<string>
#include"ork/file_utils.hpp"
#include"ork/orientation.hpp"
#include"ork/tagger.hpp"
namespace ork {
class tagger_stat... |
<commit_before>#include <pthread.h>
#include <cstddef>
#include <cstdio>
#include "thread.h"
/*
* Initialize a thread object
*/
Thread::Thread() :
state(INIT)
{
// Initialize synchronization primitives
pthread_attr_init(&attr);
pthread_mutex_init(&mutex, NULL);
pthread_cond_init(&start_signal, NULL);
pthread_... |
<commit_before>#include "saiga/opengl/shader/shader.h"
#include "saiga/opengl/texture/raw_texture.h"
#include "saiga/util/error.h"
#include <fstream>
#include <algorithm>
#include "saiga/util/assert.h"
GLuint Shader::boundShader = 0;
Shader::Shader(){
}
Shader::~Shader(){
destroyProgram();
}
// ===================... |
<commit_before>/**
@file LimeUtil.cpp
@author Lime Microsystems
@brief Command line test app
*/
#include <VersionInfo.h>
#include <ConnectionRegistry.h>
#include <IConnection.h>
#include <LMS7002M.h>
#include <iostream>
#include <chrono>
using namespace lime;
int deviceTestTiming(const std::string &argSt... |
<commit_before>/*
* Connection pooling for the translation server.
*
* author: Max Kellermann <mk@cm4all.com>
*/
#include "tstock.hxx"
#include "TranslateHandler.hxx"
#include "translate_client.hxx"
#include "stock/GetHandler.hxx"
#include "tcp_stock.hxx"
#include "lease.hxx"
#include "pool.hxx"
#include "net/Allo... |
<commit_before>// The MIT License (MIT)
//
// Copyright (c) 2016 Northeastern University
//
// 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 limitatio... |
<commit_before>/// \file UsernameEntry.cpp
//-----------------------------------------------------------------------------
#include "stdafx.h"
#include "PasswordSafe.h"
#include "UsernameEntry.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//----------------------... |
<commit_before>#include "NetworkManager.hpp"
NetworkManager::NetworkManager()
{
esp.begin(9600);
connected = false;
protocol = "TCP";
hostname = "api.thingspeak.com";
port = "80";
apiKey = "P1U3BM0XT5L8M4UI";
}
bool NetworkManager::wifiConnect(const String &ssid, const String &password)
{
esp.println("AT+CWM... |
<commit_before>// Copyright (c) 2016 Kasper Kronborg Isager and Radosław Niemczyk.
#include "vector.hpp"
namespace lsh {
/**
* Create a new vector from existing component chunks.
*
* @param components The existing component chunks.
* @param size The number of components.
*/
vector::vector(const std:... |
<commit_before>#pragma once
#include "allocator.hpp"
namespace Mirb
{
template<class T, class A = StdLibAllocator> class Vector
{
protected:
T *table;
typename A::Storage alloc_ref;
size_t _size;
size_t _capacity;
public:
Vector(size_t initial) : alloc_ref(A::Storage::def_ref())
{
_size ... |
<commit_before>#include "fingerprint.h"
using namespace v8;
using v8::FunctionTemplate;
typedef struct __VERIFY_STOP__ {
uv_async_t async;
Nan::Persistent<Function> callback;
} VERIFY_STOP;
typedef struct __VERIFY_START__ {
uv_async_t async;
Nan::Persistent<Function> callback;
int result;
str... |
<commit_before>// Copyright 2012 the V8 project authors. 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... |
<commit_before>#include "vg_set.hpp"
#include <vg/io/stream.hpp>
#include "source_sink_overlay.hpp"
#include <vg/io/stream.hpp>
#include <vg/io/vpkg.hpp>
#include "io/save_handle_graph.hpp"
#include "algorithms/topological_sort.hpp"
namespace vg {
// sets of MutablePathMutableHandleGraphs on disk
void VGset::transfor... |
<commit_before>#include "client.h"
CLIENT::CLIENT (char *IP)
{
struct sockaddr_in dest_addr;
name_verified = false;
sockfd = socket (AF_INET, SOCK_STREAM, 0);
if(sockfd == -1){
perror ("socket");
exit (EXIT_FAILURE); // v. pthread_exit
}
dest_addr.sin_family = AF_INET;
dest_addr.sin_port ... |
<commit_before>// -*- c++ -*-
/********************************************************************
* AUTHORS: Vijay Ganesh
*
* BEGIN DATE: November, 2005
*
* LICENSE: Please view LICENSE file in the home dir of this Program
********************************************************************/
#include "STP.h"
... |
<commit_before>#include "common.h"
#include "watcher.h"
#include <stdlib.h>
#include <stdio.h>
#include <Psapi.h>
#pragma comment (lib, "psapi.lib")
namespace NodeJudger {
#define EXCEPTION_WX86_BREAKPOINT 0x4000001F
#define MAX_TIME_LIMIT_DELAY 200
const bool __WATCHER_PRINT_DEBUG = (GetEnvironmentVar("JU... |
<commit_before>/*
* Copyright (c) 2011, Ben Noordhuis <info@bnoordhuis.nl>
*
* 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.