text stringlengths 54 60.6k |
|---|
<commit_before>#include <chrono>
#include <fstream>
#include <iostream>
#include "site.h"
using namespace AhoViewer::Booru;
#include "settings.h"
#include "tempdir.h"
#ifdef HAVE_LIBSECRET
#include <libsecret/secret.h>
#endif // HAVE_LIBSECRET
// 1: page, 2: limit, 3: tags
const std::map<Site::Type, std::string> Si... |
<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: unoinfo.cxx,v $
* $Revision: 1.3... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: hatchwindowfactory.cxx,v $
*
* $Revision: 1.6 $
*
* last change: $Author: obo $ $Date: 2006-09-17 14:57:39 $
*
* The Contents of this fil... |
<commit_before>namespace factor
{
void abort();
}
#ifndef NDEBUG
#define FACTOR_ASSERT(condition) ((condition) \
? (void)0 \
: ( \
::fprintf(stderr, "assertion \"%s\" failed: file \"%s\", line %d\n", \
#condition, __FILE__, __LINE__), \
::factor::abort() \
))
#else
#define F... |
<commit_before>#ifndef __FACTOR_MASTER_H__
#define __FACTOR_MASTER_H__
#ifndef WINCE
#include <errno.h>
#endif
#ifdef FACTOR_DEBUG
#include <assert.h>
#endif
/* C headers */
#include <fcntl.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#inclu... |
<commit_before>/*$Id$
*
* This source file is a part of the Berlin Project.
* Copyright (C) 2002 Tobias Hunger <tobias@fresco.org>
* http://www.berlin-consortium.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as publi... |
<commit_before>/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... |
<commit_before>/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... |
<commit_before>// Copyright (c) 2009 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/browser.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/download/download_ma... |
<commit_before>/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2014 Max-Planck-Institute for Intelligent Systems,
* University of Southern California
* Jan Issac (jan.issac@gmail.com)
* Manuel Wuthrich (manuel.wuthrich@gmail.com)
*
*
*
* Redistribution and use in so... |
<commit_before>#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n;
//cin >> n;
string s;
//cin >> s;
int k;
//cin >> k;
for (char & c : s) {
//cout << c << " ";
}
// cout << n << s << k;
int i = 5;
char c= ... |
<commit_before>#include "def_lang/impl/Vector_Value.h"
#include "def_lang/Value_Selector.h"
#include "def_lang/Serialization.h"
namespace ts
{
Vector_Value::Vector_Value(std::shared_ptr<IVector_Type const> type)
: m_type(type)
{
}
Result<bool> Vector_Value::is_equal(IValue const& other) const
{
IVector_Value... |
<commit_before>#include "SemposScorer.h"
#include <algorithm>
#include <vector>
#include <stdexcept>
#include <fstream>
#include "Util.h"
#include "SemposOverlapping.h"
using namespace std;
SemposScorer::SemposScorer(const string& config)
: StatisticsBasedScorer("SEMPOS", config),
m_ovr(SemposOverlappingFacto... |
<commit_before>#ifndef SERVER_MIDDLEWARE_HPP
#define SERVER_MIDDLEWARE_HPP
#include "request.hpp"
#include "response.hpp"
namespace server {
class Middleware;
using Middleware_ptr = std::shared_ptr<Middleware>;
using next_t = delegate<void()>;
using Next = std::shared_ptr<next_t>;
using Callback = delegate<void(Re... |
<commit_before>#define WIN32_LEAN_AND_MEAN
#pragma comment (lib, "Shlwapi.lib")
#pragma warning (disable:4996)
#include <Windows.h>
#include <Shlwapi.h>
#include <unordered_map>
#include <mutex>
using namespace std;
#define BUF_SIZE MAX_PATH * 3
long long CurrentTime()
{
long long t;
GetSystemTimeAsFileTim... |
<commit_before>/*-----------------------------------------------------------------------------
Copyright 2017 Hopsan Group
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... |
<commit_before>
/*
* Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
* 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>#pragma once
#include <algorithm>
#include <cassert>
#include <cstring>
namespace {
template <typename T>
void swapEndian (T* p) {
uint8_t* q = reinterpret_cast<uint8_t*>(p);
std::reverse(q, q + sizeof(T));
}
}
struct Slice {
uint8_t* begin;
uint8_t* end;
Slice() : begin(nullptr), end(null... |
<commit_before>#ifndef stack_cpp
#define stack_cpp
#pragma once
#include <iostream>
#include <memory>
class bitset
{
public:
explicit
bitset(size_t size) /*strong*/;
bitset(bitset const & other) = delete;
auto operator =(bitset const & other)->bitset & = delete;
bitset(bitset && other) = delete;... |
<commit_before>#ifndef stack_cpp
#define stack_cpp
#pragma once
#include <iostream>
#include <memory>
#include <thread>
#include <mutex>
class bitset
{
public:
explicit
bitset(size_t size) /*strong*/;
bitset(bitset const & other) = delete;
auto operator =(bitset const & other)->bitset & = delete;
... |
<commit_before>#pragma warning(push)
#pragma warning(disable:4996)
#pragma warning(disable:4244)
#pragma warning(disable:4291)
#pragma warning(disable:4146)
#include "clang/AST/AST.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/Frontend/ASTCon... |
<commit_before>/**
* @file lars.cpp
* @author Nishant Mehta (niche)
*
* Implementation of LARS and LASSO.
*/
#include "lars.hpp"
using namespace mlpack;
using namespace mlpack::regression;
LARS::LARS(const bool useCholesky,
const double lambda1,
const double lambda2,
const double... |
<commit_before>#include "common.th"
#include "serial.th"
#define CHANNEL "#tenyr"
#define NICK "rynet"
#define do(X) c <- rel(X) ; call(puts) ; c <- rel(rn) ; call(puts)
_start:
prologue
#if 0
c <- 2
call(sleep)
#endif
do(nick)
do(user)
do(join)
loop_line:
call(getline)
c <- b
... |
<commit_before>/*
*
* Title: CurlDump
* Authors: Eyaz Rehman [http://github.com/Imposter]
* Date: 2/18/2016
*
* Copyright (C) 2016 Eyaz Rehman. All Rights Reserved.
*
*/
#include "Configuration/All.h"
#include "Utilities/Indigo/utility/hook.hpp"
#include "Utilities/Indigo/utility/acp_dump.hpp"
#include "Utilit... |
<commit_before>// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/third_party/quiche/src/quic/core/quic_buffered_packet_store.h"
#include <string>
#include "net/third_party/quiche/src/q... |
<commit_before>#include "jsonfile.hpp"
#include "xmlfile.hpp"
#include "world.hpp"
using namespace Headway;
World::World(QObject* parent) : QObject(parent)
{
createWorld();
}
World::World(const World& other) : QObject(other.parent()), generations_(other.generations()), count_(other.count()), matrix(new Matrix<bo... |
<commit_before>// source changed by mrn@paus.ch/ max rheiner
// original source: henryj@paradise.net.nz
#include <iostream.h>
#include <stdlib.h> // exit()
#ifdef __APPLE_CC__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "FTGLOutlineFont.h"
#include "FTGLPolygonFont.h"
#include "FTGLBitmapFo... |
<commit_before>#include <iostream>
#include <math.h>
// an interview question:
// "design a function such that f(f(n)) == -n, where n is a 32 bit signed int,
// and which does not use complex numbers"
int minusItself(int n)
{ // are globals or external state considered "complex numbers"?
// a very philosophical que... |
<commit_before>/**
* @copyright Copyright 2016 The J-PET Framework 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 find a copy of the License in the LICENCE file.
*
* Unless required by... |
<commit_before>/****************************************************************************
*
* Copyright (c) 2016 PX4 Development Team. 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) 2004-2019 musikcube team
//
// 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>// This file is part of the dune-stuff project:
// https://users.dune-project.org/projects/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_CONSTANT_... |
<commit_before>/**
* Copyright (c) 2015 - The CM Authors <legal@clickmatcher.com>
* All Rights Reserved.
*
* This file is CONFIDENTIAL -- Distribution or duplication of this material or
* the information contained herein is strictly forbidden unless prior written
* permission is obtained.
*/
#include <stdlib.h... |
<commit_before>/*
Copyright 2017 Larry Gritz and the other authors and contributors.
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 cop... |
<commit_before>/* bzflag
* Copyright (c) 1993 - 2004 Tim Riker
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the license found in the file
* named COPYING that should have accompanied this file.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
... |
<commit_before>#include "animation.h"
#include <math.h>
Animation::Animation(std::string object, int duration) :
_object(object), _duration(duration), _easing(LINEAR)
{
}
Animation::Easing Animation::strToEasing(std::string s)
{
if (s == "LINEAR")
return LINEAR;
if (s == "IN_QUAD")
retu... |
<commit_before>/*
(c) Matthew Slocum 2015
msgComponent.cpp
msgComponent is resbonaible for sending and revieving messages
upon creation it spins off a thread to listen for incoming messages.
the parent process takes input from the user and executes commands or sends messages.
*/
#include <iostream>
#includ... |
<commit_before>/* This file is part of the KDE project.
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 2.1 o... |
<commit_before>#include "SDBPConnection.h"
#include "SDBPServer.h"
#include "SDBPContext.h"
#include "SDBPRequestMessage.h"
#include "SDBPResponseMessage.h"
#include "Application/Common/ClientRequestCache.h"
#include "System/Config.h"
static const unsigned keepAliveTimeout = 60*1000; // msec
SDBPConnection::SDBPConne... |
<commit_before>// Jubatus: Online machine learning framework for distributed environment
// Copyright (C) 2011,2012 Preferred Infrastructure and Nippon Telegraph and Telephone Corporation.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
/... |
<commit_before>/*
This file is part of KAddressbook.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
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 2 of the License, or
(... |
<commit_before>//@author A0097630B
#include "stdafx.h"
#include "exceptions/parse_error_exception.h"
#include "date_time_parser.h"
namespace You {
namespace NLP {
using ptime = boost::posix_time::ptime;
namespace qi = boost::spirit::qi;
namespace phoenix = boost::phoenix;
ptime DateTimeParser::parse(const StringType... |
<commit_before>/*******************************
Copyright (c) 2016-2021 Grégoire Angerand
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 righ... |
<commit_before>/* -*- mode: c++; c-basic-offset:4 -*-
utils/archivedefinition.cpp
This file is part of Kleopatra, the KDE keymanager
Copyright (c) 2009 Klarälvdalens Datakonsult AB
Kleopatra is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Licens... |
<commit_before>/*
This file is part of the kolab resource - the implementation of the
Kolab storage format. See www.kolab.org for documentation on this.
Copyright (c) 2004 Bo Thorsen <bo@sonofthor.dk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GN... |
<commit_before>/* -*-c++-*-
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
* Copyright (C) 2017 Julien Valentin <mp3butcher@hotmail.com>
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at ... |
<commit_before>//===-- SelectionDAGPrinter.cpp - Implement SelectionDAG::viewGraph() -----===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------... |
<commit_before>#include "get_new_points.hxx"
#include "eval_weighted.hxx"
#include "poles_prefactor.hxx"
#include "power_prefactor.hxx"
#include "../sdp_solve.hxx"
#include "../ostream_set.hxx"
std::vector<El::BigFloat>
compute_optimal(const std::vector<Positive_Matrix_With_Prefactor> &matrices,
cons... |
<commit_before>#include "get_new_points.hxx"
#include "eval_weighted.hxx"
#include "poles_prefactor.hxx"
#include "power_prefactor.hxx"
#include "../sdp_solve.hxx"
#include "../ostream_set.hxx"
std::vector<El::BigFloat>
compute_optimal(const std::vector<Positive_Matrix_With_Prefactor> &matrices,
cons... |
<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/logging.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/ui/browser.h"
#include "chr... |
<commit_before>// Copyright (c) 2009 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/net/websocket_experiment/websocket_experiment_runner.h"
#include "base/compiler_specific.h"
#include "base/hi... |
<commit_before>//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//------------------------------------------... |
<commit_before>#include "depthai/pipeline/datatype/NNData.hpp"
#include <cassert>
#include <limits>
#include <unordered_map>
#include <vector>
#include "depthai-shared/datatype/RawNNData.hpp"
#include "depthai/pipeline/datatype/ADatatype.hpp"
#include "fp16/fp16.h"
namespace dai {
NNData::NNData() : Buffer(std::mak... |
<commit_before>//
// Copyright (c) Microsoft. All rights reserved.
// Copyright (c) Geoff Norton. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/*++
Module Name:
seh-unwind.cpp
Abstract:
Implementation of exception API functi... |
<commit_before>#include <exprtk/exprtk.hpp>
#include <memory>
#include <possumwood_sdk/node_implementation.h>
#include <possumwood_sdk/source_editor.h>
#include <QPainter>
#include <QPushButton>
#include <QMenu>
#include <luabind/luabind.hpp>
#include "datatypes/state.h"
#include "datatypes/context.h"
namespace {... |
<commit_before>/**************************************************************************
**
** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved.
**
** Contact: BlackBerry (qt@blackberry.com)
** Contact: KDAB (info@kdab.com)
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Lice... |
<commit_before>#ifdef _WIN32
#include <pd_backend.h>
#include <assert.h>
#include <stdio.h>
#include <Dbgeng.h>
#include <string>
struct DbgEngPlugin : public DebugBaseEventCallbacks
{
PDDebugState state = PDDebugState_noTarget;
bool hasValidTarget = false;
std::string targetName;
IDebugClient* debugClient = nu... |
<commit_before>/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses... |
<commit_before>/** \file SysLog.h
* \brief Declaration of class SysLog.
* \author Dr. Johannes Ruscheinski
*/
/*
* Copyright 2020 University Library of Tübingen
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
*... |
<commit_before>/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* 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 ... |
<commit_before>// ROS
#include <ros/ros.h>
#include <tf/transform_listener.h>
#include <tf_conversions/tf_eigen.h>
#include <XmlRpcValue.h>
// for debugging
#include <iostream>
// stl
#include <vector>
#include <set>
// MoveIt!
#include <moveit/collision_detection/collision_robot.h>
#include <moveit/robot_model_load... |
<commit_before>/** \brief A MARC-21 filter uliity that replace URNs in 856u-fields with URLs
* \author Oliver Obenland (oliver.obenland@uni-tuebingen.de)
* \author Dr. Johannes Ruscheinski
*
* \copyright 2016-2018 Universitätsbibliothek Tübingen. All rights reserved.
*
* This program is free software: you c... |
<commit_before>/** \file rss_aggregator.cc
* \brief Downloads and aggregates RSS feeds.
* \author Dr. Johannes Ruscheinski (johannes.ruscheinski@uni-tuebingen.de)
*
* \copyright 2018 Universitätsbibliothek Tübingen. All rights reserved.
*
* This program is free software: you can redistribute it and/or mod... |
<commit_before>/** \file system_updater.cc
* \brief Runs scripts from /usr/local/ub_tools/data/system_updates
* \author Dr. Johannes Ruscheinski (johannes.ruscheinski@uni-tuebingen.de)
*
* \copyright 2017-2020 Universitätsbibliothek Tübingen. All rights reserved.
*
* This program is free software: you can... |
<commit_before>#include "Exception.h"
using namespace CppUnit;
const std::string
CppUnit::Exception::UNKNOWNFILENAME =
"<unknown>";
const int CppUnit::Exception::UNKNOWNLINENUMBER = -1;
/// Construct the exception
CppUnit::Exception::Exception (const Exception& other)
: exception (other)
{
m_message =... |
<commit_before>/*
* Copyright (C) 2008, 2009 Nokia Corporation.
*
* Contact: Marius Vollmer <marius.vollmer@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.... |
<commit_before>#include "bookmarkmodel.h"
#include <QPainter>
void BookmarkModel::addNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)
{
beginInsertRows(QModelIndex(), m_nodeList.size(), m_nodeList.size());
BookmarkNode *bn = createBookmarkNode(mark,node);
m_nodeList.append(bn);
m_nodeM... |
<commit_before>/*************************************************************************
> File Name: fileloader.cpp
> Author: anryyang
> Mail: anryyang@gmail.com
> Created Time: Tue 06 Dec 2016 05:13:05 PM
************************************************************************/
#include "fileloade... |
<commit_before>#include "core/mesh.h"
#include "core/memory.h"
#include <vector>
NARUKAMI_BEGIN
MeshData::MeshData(const Transform& object2wrold,int triangle_num,const uint32_t *indices,int vertex_num,const Point3f *vertices,const Normal3f *normals,const Point2f *uvs){
assert(vertices!=nullptr);
... |
<commit_before>#include "regex.h"
#include <stdlib.h>
#include "pcre2.h"
using std::u16string;
using MatchResult = Regex::MatchResult;
const char16_t EMPTY_PATTERN[] = u".{0}";
Regex::Regex() : code{nullptr} {}
static u16string preprocess_pattern(const char16_t *pattern, uint32_t length) {
u16string result;
for... |
<commit_before>/*
* Copyright 2016 Marcus Soll
*
* 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>#include "cvm.h"
#include "../cshared/disasm.h"
void DabVM_debug::print_registers()
{
fprintf(stderr, "IP = %p (%d)\n", (void *)vm.ip(), (int)vm.ip());
}
void DabVM_debug::print_ssa_registers()
{
auto err_stream = $VM->options.output;
fprintf(err_stream, "Registers:\n");
size_t index = ... |
<commit_before>/*
* cgreterm.hpp
*
* Created on: 18.08.2014
* Author: andreas
*/
#ifndef CGRETERM_HPP_
#define CGRETERM_HPP_
#include <bitset>
#include <vector>
#include <string>
#include <ostream>
#include <exception>
#include <rofl/common/crofdpt.h>
#include <rofl/common/cdptid.h>
#include <rofl/common/... |
<commit_before>/*
kopetepasswordedaccount.cpp - Kopete Account with a password
Copyright (c) 2004 by Richard Smith <kde@metafoo.co.uk>
Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
*************************************************************************
* ... |
<commit_before>#include "DNSServer.h"
#include <lwip/def.h>
#include <Arduino.h>
DNSServer::DNSServer()
{
_ttl = htonl(60);
_errorReplyCode = DNSReplyCode::NonExistentDomain;
}
bool DNSServer::start(const uint16_t &port, const String &domainName,
const IPAddress &resolvedIP)
{
_port = port... |
<commit_before>#pragma once
namespace supermarx
{
namespace detail
{
template<typename T, size_t LENGTH>
inline size_t numlength(const T x)
{
return std::log10(x)+1;
}
template<>
inline size_t numlength<long, 2>(const long x)
{
if(x > 9)
return 2;
else
return 1;
}
template<typename T, size_t LE... |
<commit_before>// Copyright 2017 The NXT Authors
//
// 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 l... |
<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 AS... |
<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 <iostream>
#include <pqxx/pqxx>
using namespace std;
using namespace pqxx;
// clang++ update.cpp -o update -lpqxx -lpq
int main() {
const char * sql;
try {
connection C("dbname=benchcare user=synod password= \
hostaddr=127.0.0.1 port=5432");
if (C.is_open()) {
... |
<commit_before>#include "dispatcher.h"
#include <vector>
Dispatcher::Dispatcher() {
connection=dispatcher.connect([this] {
std::vector<std::list<std::function<void()>>::iterator> its;
{
std::unique_lock<std::mutex> lock(functions_mutex);
its.reserve(functions.size());
for(auto it=functions.... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: AttributeContainerHandler.cxx,v $
*
* $Revision: 1.5 $
*
* last change: $Author: obo $ $Date: 2006-10-12 14:44:42 $
*
* The Contents of t... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: XMLBackgroundImageContext.cxx,v $
*
* $Revision: 1.12 $
*
* last change: $Author: hr $ $Date: 2006-04-19 13:36:46 $
*
* The Contents of t... |
<commit_before>#include <duke/cmdline/CmdLineParameters.hpp>
#include <duke/engine/DukeApplication.hpp>
#include <duke/imageio/DukeIO.hpp>
#include <duke/benchmark/Benchmark.hpp>
#include "config.h" // autogenerated from config.h.in
int main(int argc, char** argv) {
using namespace duke;
try {
const Cm... |
<commit_before>#include <QCoreApplication>
#include <QString>
#include <QRegularExpression>
#include <QDebug>
void testRegexp()
{
QString s = "v=0/t=1/title = hello world/Message=How are you?/Foo3=bar4";
QRegularExpression re("(?<key>[A-Za-z][A-Za-z0-9_]*)\\s*=\\s*(?<val>[^/]+)");
QRegularExpressionMatchIt... |
<commit_before>/**
* \file sync_solution_stream.cc
*
*
*
* \author eaburns
* \date 2009-04-14
*/
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <pthread.h>
#include "../state.h"
#include "sync_solution_stream.h"
#include "solution_stream.h"
#include "timer.h"
SyncSolutionStream::Sync... |
<commit_before>#include <ctime>
class Device
{
public:
int static GetTimestamp()
{
return std::time(0);
}
void static OpenUrl(const String url)
{
String cmd("open ");
cmd += url;
system(cmd.ToCString<char>());
}
String static GetLanguage()
... |
<commit_before>/*
* Copyright (C) 2010-2011 O01eg <o01eg@yandex.ru>
*
* This file is part of Genetic Function Programming.
*
* Genetic Function Programming 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 Found... |
<commit_before>/*
* Copyright (c) 2011, Peter Thorson. 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, th... |
<commit_before>/*
Copyright (c) 2018 - present Advanced Micro Devices, Inc. All rights reserved.
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 t... |
<commit_before>/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2015 Ben Vanik. All rights reserved. ... |
<commit_before>/*
Copyright (c) 2018 - present Advanced Micro Devices, Inc. All rights reserved.
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 t... |
<commit_before>#ifndef STAN_MATH_REV_FUN_REP_MATRIX_HPP
#define STAN_MATH_REV_FUN_REP_MATRIX_HPP
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/err.hpp>
#include <stan/math/prim/fun/Eigen.hpp>
namespace stan {
namespace math {
template <>
inline auto rep_matrix<
double, var_value<Eigen::Matrix<doubl... |
<commit_before>/* This file is part of Mapnik (c++ mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko
*
* Mapnik 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 2
* of the License, or an... |
<commit_before>#pragma once
#include "includes.hpp"
#include "tabs.hpp"
#include "interpreter.hpp"
#include "layout.hpp"
#include "playback.hpp"
class user_interface : public Component {
std::map<std::string, std::unique_ptr<Component>> components;
Component *mainComponent;
base::lisp ≷
public:
user_interface(... |
<commit_before>/*******************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013, 2014 Daniel Edler, Anton Eriksson, Martin Rosvall
This file is part of the Infomap software package.
See file LICENSE_AGPLv3.txt for full l... |
<commit_before>#include"all_defines.hpp"
#include"aio.hpp"
#include<unistd.h>
#include<errno.h>
#include<signal.h>
#include<fcntl.h>
// used for error reporting before aborting
#include<iostream>
/*
POSIX-based asynchronous I/O and signal handling
Note that we don't program to the letter of the POSIX
specs: AFAIK ... |
<commit_before>// Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
#ifndef __RAPICORN_CORE_OBJECTS_HH__
#define __RAPICORN_CORE_OBJECTS_HH__
#include <rcore/utilities.hh>
#include <rcore/thread.hh>
#include <rcore/aidaprops.hh>
namespace Rapicorn {
// == VirtualTypeid ==
class VirtualTypeid {
pro... |
<commit_before>/*
Copyright (c) 2014
Author: Jeff Weisberg <jaw @ solvemedia.com>
Created: 2014-Mar-27 14:55 (EDT)
Function: todo state transitions
*/
#define CURRENT_SUBSYSTEM 'j'
#include "defs.h"
#include "diag.h"
#include "config.h"
#include "misc.h"
#include "network.h"
#include "runmode.h"
#include "th... |
<commit_before>#include "video.h"
#include "misc.h"
#include <iostream>
using namespace std;
Video::Video(string imgFolder, string imgPrefix, int w, int h) {
imageFolder = imgFolder;
imagePrefix = imgPrefix;
width = to_string(w);
height = to_string(h);
}
void Video::ClearImageFolder() {
system( ("rm " + image... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.