text stringlengths 54 60.6k |
|---|
<commit_before>#include <map>
#include "assert.hpp"
#include "TimingGraph.hpp"
NodeId TimingGraph::add_node(const TimingNode& new_node) {
//Type
TN_Type new_node_type = new_node.type();
node_types_.push_back(new_node.type());
//Domain
node_clock_domains_.push_back(new_node.clock_domain());
... |
<commit_before><commit_msg><= for extra safely I suppose<commit_after><|endoftext|> |
<commit_before>#include <iostream>
#include <armadillo>
using namespace std;
using namespace arma;
// EstructruraCapaRed especifica la cantidad de neuronas en cada capa.
// Por ejemplo, si la red tiene 2 neuronas en la primera capa,
// 3 en la capa oculta y 1 en la capa de salida,
// EstructuraCapasRed para esa red s... |
<commit_before>/*
* fMBT, free Model Based Testing tool
* Copyright (c) 2011,2012 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
... |
<commit_before>/*=========================================================================
Program: Visualization Toolkit
Module: TestSpiderPlotActor.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
... |
<commit_before>//===--- Errors.cpp - Error reporting utilities ---------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http... |
<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>//===-- 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 <stdio.h>
#include <magrathea.h>
#include <terrain.h>
#include <game.h>
#include <dynotree.h>
#include <heightmap.h>
#include <images.h>
#include <smallFern.h>
#include <heightmap.h>
#include <cmath>
#include <texture.h>
#include <stdlib.h>
GLuint texture = 0;
/// Constructs a new region at th... |
<commit_before>/**
* @file Cognition.cpp
*
* @author <a href="mailto:[email protected]">Heinrich Mellmann</a>
* Implementation of the class Cognition
*/
#include "Cognition.h"
#include <PlatformInterface/Platform.h>
// tools
#include "Tools/Debug/Trace.h"
/////////////////////////////////////
//... |
<commit_before>// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/log/log.h>
LOG_SETUP("dense_dot_product_function_test");
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/eval/eval/tensor_function.h>
#include <vespa/eval/... |
<commit_before>// Base header file. Must be first.
#include <Include/PlatformDefinitions.hpp>
#if defined(XALAN_OLD_STREAM_HEADERS)
#include <fstream.h>
#include <iostream.h>
#else
#include <fstream>
#include <iostream>
#endif
#include <util/PlatformUtils.hpp>
#include <PlatformSupport/DOMStringHelper.hpp>
#i... |
<commit_before>/**
* @file platform.cpp
* @brief Purpose: Contains the methods for Platform class.
*
* MIT License
* Copyright (c) 2017 MindScape
*
* https://github.com/TecProg2017-2/mindscape/blob/master/LICENSE.md
*/
#include "../include/platform.hpp"
#include "../engine/include/game.hpp"
using namespace mi... |
<commit_before>#include "mainwindow.h"
#include <QActionGroup>
#include <QFileDialog>
#include <QKeyEvent>
#include <QString>
#include "ui_mainwindow.h"
#include "screenwidget.h"
#include "emuthread.h"
#include "gameboy/core.h"
#include "gameboy/keyboard.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(pa... |
<commit_before>#include "NFComm/NFPluginModule/NFPlatform.h"
#if NF_PLATFORM == NF_PLATFORM_WIN
#endif
#pragma comment( lib, "Dbghelp.lib" )
#ifdef NF_DEBUG_MODE
#if NF_PLATFORM == NF_PLATFORM_WIN
#ifdef NF_DYNAMIC_PLUGIN
#pragma comment( lib, "NFCore_d.lib" )
#pragma comment( lib, "Theron_d.lib" ... |
<commit_before>#pragma once
#include "includes.hpp"
#define TAGLIB_STATIC
#include <taglib/fileref.h>
#include <taglib/tag.h>
#include <taglib/tpropertymap.h>
class playlist : public Component, public FileDragAndDropTarget {
struct playlistModel : public ListBoxModel {
StringArray entries;
int getNumRow... |
<commit_before>#include "util/assert.h"
#ifdef DEBUG
#include <stdio.h>
void __AssertFail(const char* file, unsigned line)
#ifndef _MSC_VER
throw (__Assert)
#endif
{
static bool yes_all = false;
if (yes_all)
return;
const char* msg =
"\n\
**************************************\n\
Assertio... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: cuisrchdlg.cxx,v $
*
* $Revision: 1.9 $
*
* last change: $Author: kz $ $Date: 2007-05-10 14:36:33 $
*
* The Contents of this file are mad... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: msashape.hxx,v $
*
* $Revision: 1.12 $
*
* last change: $Author: hr $ $Date: 2007-06-27 18:34:13 $
*
* The Contents of this file are made... |
<commit_before><commit_msg>fdo#70100 Detect single stream excel files with BOF ID 5<commit_after><|endoftext|> |
<commit_before>#include <iostream>
#include <strstream>
#include <stdarg.h>
#include "KAI/KAI.h"
#include "KAI/Translator/Lexer.h"
using namespace std;
KAI_BEGIN
Lexer::Lexer(const char *in)
: input(in)
{
CreateLines();
AddKeywords();
Run();
}
void Lexer::AddKeywords()
{
keyWords["if"] = Token::If;
keyWords[... |
<commit_before>#include "pakfile.h"
#include <stdexcept>
#include <iterator>
#include <algorithm>
#include <cstring>
namespace scpak
{
void PakFile::load(std::istream &stream)
{
// read header
PakHeader header;
stream.read(reinterpret_cast<char*>(&header), sizeof(header)... |
<commit_before>
/*
* From:
* http://stackoverflow.com/questions/6142576/sample-from-multivariate-normal-gaussian-distribution-in-c
*/
#include <iostream>
#include "bpmf.h"
using namespace std;
using namespace Eigen;
/*
We need a functor that can pretend it's const,
but to be a good random number generator ... |
<commit_before>/*
* Copyright (c) 2012, Dennis Hedback
* 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>/*
** Author(s):
** - Pierre Roullon <[email protected]>
**
** Copyright (C) 2010, 2011, 2012 Aldebararan Robotics
*/
#include <list>
#include <vector>
#include <qic/future.h>
#include <qic/object.h>
#include <qic/value.h>
#include <qi/future.hpp>
#include "future_p.h"
#include "value_p.... |
<commit_before>#include <cstring>
#include "object.h"
#include "objectValue.h"
#include "array.h"
#include "allocator.h"
#include <time.h>
#include "operations.h"
#include "key.h"
#include "path.h"
namespace json {
template<typename Fn>
static RefCntPtr<ObjectValue> applyDiffImpl(const Value &baseObject, const Valu... |
<commit_before>
#ifndef STRINGBUILDER_H
#define STRINGBUILDER_H
#include <cstdlib>
#include <cstring>
namespace wiz {
class StringBuilder //
{
private:
char* buffer_first;
char* buffer;
int len;
int capacity;
private:
char* end() const
{
return buffer_first + capacity;
}
publ... |
<commit_before>// Probabilistic Question-Answering system
// @2017 Sarge Rogatch
// This software is distributed under GNU AGPLv3 license. See file LICENSE in repository root for details.
#include "stdafx.h"
using namespace ProbQA;
using namespace SRPlat;
const uint64_t gPerfCntFreq = []() {
LARGE_INTEGER li;
if... |
<commit_before>// This file is a part of the IncludeOS unikernel - www.includeos.org
//
// Copyright 2015 Oslo and Akershus University College of Applied Sciences
// and Alfred Bratterud
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Lice... |
<commit_before>//
// calcPWP.cpp
//
//
// Created by Evan McCartney-Melstad on 1/10/15.
//
//
#include "calcPWP.h"
#include <iostream>
#include <vector>
#include <fstream>
#include <thread>
#include <string>
int calcPWPfromBinaryFile (std::string binaryFile, unsigned long long int numLoci, const int numIndividua... |
<commit_before>#pragma once
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <cerrno>
#include <stdexcept>
// ----------------------------------------------------------------------
inline std::string read_file(std::string aFilename)
{
std::string buffer;
int f = open(aFilename.c_str(), O... |
<commit_before>/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Alisa Dolinsky
*
* 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 ri... |
<commit_before>/*
* Copyright (C) 2005 by Thorsten Staerk <[email protected]>
* 2007 the ktimetracker developers
*
* 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; e... |
<commit_before>#include <img_processing.h>
#include <stdio.h>
#include <iostream>
#include <string>
#include <settings_class.h>
#include <stdlib.h>
#include <ancillary_functions.h>
#include <boost/filesystem.hpp>
#define DEFAULT_RESCALE_Y 100
#define DEFAULT_RESCALE_X 100
// change image to same dimensi... |
<commit_before>// Copyright (C) 2010 Nikhil Marathe <[email protected]>
#include <string>
#include <vector>
#include <iostream>
#include <v8.h>
#include <node.h>
#include <libface/LibFace.h>
#include <libface/Face.h>
using namespace v8;
using namespace node;
namespace face {
Handle<Value> Faces( const Argument... |
<commit_before>#include <QPdfWriter>
#include <QPrintDialog>
#include <QPainter>
#include <QPrintPreviewWidget>
#include <QPrintPreviewDialog>
#include <QTextBrowser>
#include <QFile>
#include <QTextStream>
#include "engine.hpp"
namespace qtreports {
Engine::Engine( QObject * parent ) :
QObject( par... |
<commit_before>/*
* Copyright (C) 2009-2010, Gostai S.A.S.
*
* This software is provided "as is" without warranty of any kind,
* either expressed or implied, including but not limited to the
* implied warranties of fitness for a particular purpose.
*
* See the LICENSE file for more information.
*/
/// \file li... |
<commit_before>/*
Copyright (c) 2015, Wator Vapor
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 conditions and t... |
<commit_before>/*
Copyright (c) 2013, 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 2015 Georgia Institute of Technology
*
* 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><commit_msg>Use more proper types and range-for loops<commit_after><|endoftext|> |
<commit_before>#include "Halide.h"
using namespace Halide;
int multi_type_test() {
Func f1("f1"), f2("f2"), f3("f3"), f4("f4"), f5("f5"), f6("f6");
Var x, y, z;
f1(x, y, z) = cast<uint8_t>(1);
f2(x, y, z) = cast<uint32_t>(f1(x+1, y, z) + f1(x, y+1, z));
f3(x, y, z) = cast<uint16_t>(f2(x+1, y, z) ... |
<commit_before>/*************************************************************************
*
* $RCSfile: flypos.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: vg $ $Date: 2003-04-17 14:12:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following license... |
<commit_before>/*************************************************************************
*
* $RCSfile: swacorr.cxx,v $
*
* $Revision: 1.8 $
*
* last change: $Author: rt $ $Date: 2005-01-11 12:21:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licens... |
<commit_before><commit_msg>sw: replace pointless unused position update in SwTxtNode::Update()<commit_after><|endoftext|> |
<commit_before>#include "twister.h"
const unsigned CYCLE = 0x100;
//Suggest we wrap these arrays inside an fsm or test base class
const unsigned C_TRANS_ = 0xff;
int block_units[][0x10] = {
0x74, 0x63, 0x69, 0x67, 0x72, 0x68, 0x6e, 0x6c, 0x61, 0x67, 0x74, 0x6c, 0x69, 0x73, 0x61, 0x61, 0x6f, 0x6d, 0x6f, 0x72, 0x6e, ... |
<commit_before>#include <stdio.h>
#include <queue>
#include <vector>
#include <utility>
#include <iostream>
#include <string>
#include <stack>
#include <queue>
using namespace std;
queue<string> lv1;
queue<string> lv2;
queue<string> lv3;
string temp;
int templv;
int temptime=0;
int usernum;
int users=0;
int read(int... |
<commit_before>#include "tictactoe.h"
#include <iostream>
#include <utility>
using namespace std;
const string TicTacToe::SPACE = " ";
const int TicTacToe::X = 1;
const int TicTacToe::O = 2;
const string TicTacToe::LINE = "-----------";
TicTacToe::TicTacToe() {
for(int row = 0; row < 3; row++) {
for(in... |
<commit_before>#include <stdio.h>
#include <vector>
#define OK 1
#define ERROR 0
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
#define ElemType int
using namespace std;
int main()
{
std::vector<ElemType> v;
int a, i;
ElemType e, x;
if(v.empty()) // 判断顺序表是否创建成功
{
printf("A Sequence List Has Created.\n"... |
<commit_before>// Copyright (c) 2014-2018 The Crown developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "updater.h"
#include "clientversion.h"
#include "util.h"
#include "chainparams.h"
#include "rpcprotocol.h... |
<commit_before>#include <HsFFI.h>
#include <QtCore/QString>
#include <QtCore/QMutexLocker>
#include <QtQml/QQmlEngine>
#include "Object.h"
#include "Class.h"
#include "Manager.h"
static const char* cRefSrcNames[] = {"Hndl", "Weak", "Obj", "Event", "Var"};
HsQMLObjectFinaliser::HsQMLObjectFinaliser(HsQMLObjFinaliserC... |
<commit_before>/*
* UsbDk filter/redirector driver
*
* Copyright (c) 2013 Red Hat, Inc.
*
* Authors:
* Dmitry Fleytman <[email protected]>
*
*/
#include "driver.h"
#include "Filter.h"
#include "device.tmh"
// {C0F2DADE-8235-4065-89A8-58DB74DDC9AC}
DEFINE_GUID(GUID_USBDK_CLONE_PDO,
0xc0f2dade, 0x8235, 0x4065,... |
<commit_before>/***************************************************************************
* @file The code is for the exercises in C++ Primmer 5th Edition
* @author Yue Wang
* @date 22 DEC 2013
* Jun 2015
* @remark
********************************************************... |
<commit_before>#include "LedStripController.h"
#include "Layer.h"
#include <cstdio>
#include <QTimer>
#include <QString>
#include <ws2811.h>
#include <wiringPi.h>
Q_LOGGING_CATEGORY(CONTROLLER, "ledify.controller", QtWarningMsg)
#define NUM_LEDS 300
#define GPIO_PIN 18
#define DMA 10
#defin... |
<commit_before>#include "get-drvs.hh"
#include "util.hh"
#include "eval-inline.hh"
#include <cstring>
namespace nix {
string DrvInfo::queryDrvPath()
{
if (drvPath == "" && attrs) {
Bindings::iterator i = attrs->find(state->sDrvPath);
PathSet context;
drvPath = i != attrs->end() ? state-... |
<commit_before>// Copyright (c) 2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <string>
#include "version.h"
// Name of client reported in the 'version' message. Report the same name
//... |
<commit_before>/*
* ThreadSafeStackTrace.cpp
*
* Copyright (C) 2006 - 2008 by Universitaet Stuttgart (VIS).
* Alle Rechte vorbehalten.
*/
#include "vislib/ThreadSafeStackTrace.h"
#include "vislib/assert.h"
/*
* vislib::sys::ThreadSafeStackTrace::GetStackString
*/
void vislib::sys::ThreadSafeSta... |
<commit_before>#include "globals.hh"
#include "util.hh"
#include "archive.hh"
#include "args.hh"
#include "abstract-setting-to-json.hh"
#include "compute-levels.hh"
#include <algorithm>
#include <map>
#include <thread>
#include <dlfcn.h>
#include <sys/utsname.h>
#include <nlohmann/json.hpp>
namespace nix {
/* The... |
<commit_before>#include <cctype>
#include <fstream>
#include <stdio.h>
#include <sstream> // ostringstream
#include "utils/logoutput.h"
#include "settings.h"
#include "settingRegistry.h"
namespace cura
{
//c++11 no longer defines M_PI, so add our own constant.
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
... |
<commit_before>/*
* Copyright 2009-2017 The VOTCA Development Team
* (http://www.votca.org)
*
* 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 <map>
#include <cmath>
#include <algorithm>
#include <fstream>
#include <sstream>
#include <ctime>
#include <memory>
#include "ChatBot.h"
struct userinfo
{
unsigned smiles;
int lastReply;
long long context;
userinfo(): smiles(0), lastReply(0), context(0) {}
explicit useri... |
<commit_before>//===- NameMap.cpp - PDB Name Map -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------... |
<commit_before>/*
* Copyright (c) 2012, 2015, 2017 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 ... |
<commit_before>// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend %S/swift-functions-errors.swift -typecheck -module-name Functions -clang-header-expose-decls=has-expose-attr -emit-clang-header-path %t/functions.h
// RUN: %target-interop-build-clangxx -std=c++17 -x objective-c++ -c %s -I %t -o %t/swift-funct... |
<commit_before><commit_msg>Add the initial template of the solution to question 3.8<commit_after><|endoftext|> |
<commit_before>/*!
* @file libpsalm.cpp
* @brief Exports a function for filling holes in meshes. Used by GigaMesh.
* @author Bastian Rieck <[email protected]>
*/
#include <sstream>
#include <string>
#include <vector>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uu... |
<commit_before>//
// src/macho/container.cc
// tbd
//
// Created by inoahdev on 4/24/17.
// Copyright © 2017 inoahdev. All rights reserved.
//
#include <mach-o/swap.h>
#include <cstdlib>
#include "container.h"
namespace macho {
container::container(FILE *file, const long &macho_base)
: file_(file), macho... |
<commit_before>/*
* fMBT, free Model Based Testing tool
* Copyright (c) 2011, Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
*
*... |
<commit_before>/**
* @author: Jeff Thompson
* See COPYING for copyright and distribution information.
*/
#include <stdexcept>
#include "../NDN.hpp"
#include "../c/encoding/BinaryXMLElementReader.h"
#include "TcpTransport.hpp"
using namespace std;
namespace ndn {
void TcpTransport::connect(NDN &ndn)
{
ndn_Error... |
<commit_before>// Copyright (c) 2006-2008 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/base/listen_socket_unittest.h"
#include <fcntl.h>
#include "base/eintr_wrapper.h"
#include "net/base/net_util.h"
#... |
<commit_before>// ------------------------------------------------------------------
// pion-net: a C++ framework for building lightweight HTTP interfaces
// ------------------------------------------------------------------
// Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com)
//
// Distributed und... |
<commit_before>//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
// author: Vassil Vassilev <[email protected]>
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU L... |
<commit_before>/*
* Author(s):
* - Chris Kilner <[email protected]>
* - Cedric Gestes <[email protected]>
*
* Copyright (C) 2010 Aldebaran Robotics
*/
#include "src/messaging/server_impl.hpp"
#include <string>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include <qimessaging/ser... |
<commit_before>/*
**
** Author(s):
** - Herve Cuche <[email protected]>
**
** Copyright (C) 2011 Aldebaran Robotics
*/
#include <string>
#include <sstream>
#include <iostream>
#include <map>
#include <vector>
#include <fstream>
#include <tinyxml/tinyxml.h>
#include <qimessaging/value.hpp>
#include <qim... |
<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>#include <cmath>
#include <ctime>
#include <iostream>
#include <random>
#include <set>
#include <vector>
#include <unordered_map>
namespace {
inline size_t GenerateMaskWithRightOnes(size_t onesCount) {
return (1ull << onesCount) - 1ull;
}
class TCacheSet {
public:
TCacheSet(size_t waysCount)
... |
<commit_before>/*************************************************************************
*
* $RCSfile: cmdmailmsg.cxx,v $
*
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2004-06-17 11:34:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following lic... |
<commit_before>/*
* Copyright (c) 2012 Vasily i. Redkin <[email protected]>
* License: MIT (See LICENSE.txt or http://www.opensource.org/licenses/MIT)
*/
#ifndef CHILDPROCESS_HPP_INCLUDED
#define CHILDPROCESS_HPP_INCLUDED
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h> // for strerror
#include... |
<commit_before>/*
Copyright (c) 2012-2014 The SSDB 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 <pthread.h>
#include <time.h>
#include "../include.h"
#include "../util/log.h"
#include "ttl.h"
#define EXPIRATION_LIST_KEY "\xf... |
<commit_before>/* author: @gwzz
*
*/
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <map>
#include "graph.h"
#include "support.h"
#include "sctfile.h"
using namespace std;
// Pre-define hierarchy array
// CUI: array of top nodes concept id of each hierarchy
/... |
<commit_before>// -*- Mode:C++ -*-
/**************************************************************************************************/
/* */
/* Copyright (C) 2016 University of Hull ... |
<commit_before>/**
* elf-loader.cpp: loader of elf files to guest memory
* @author Pavel Kryukov
* Copyright 2018 uArchSim iLab project
*/
#include "elf_loader.h"
#include <elfio/elfio.hpp>
#include <memory/memory.h>
#include <string>
struct InvalidElfSection : Exception
{
explicit InvalidElfSection(const s... |
<commit_before>// \file standard.cpp
// Implementation of some standard lisp operations
//
#include "yacas/yacasprivate.h"
#include "yacas/standard.h"
#include "yacas/lispatom.h"
#include "yacas/lisperror.h"
#include "yacas/lispenvironment.h"
#include "yacas/lispio.h"
#include "yacas/platfileio.h"
#include "yacas/lisp... |
<commit_before>#include <v8.h>
#include "macros.h"
#include "gc.h"
#ifdef windows
# include <my_global.h>
#endif
#include <mysql.h>
#include <stdlib.h>
#include <string>
#define MYSQL_ERROR mysql_error(conn)
#define ASSERT_CONNECTED if (!conn) { return JS_EXCEPTION("No connection established yet."); }
#define MYSQL_... |
<commit_before>#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "naivebayes.h"
std::tuple<std::vector<NB::Event>, std::vector<NB::label_t>>
load_data(const std::string &filename, const std::size_t num_features) {
std::vector<NB::Event> events;
std::vector<NB::label_t> labels;
... |
<commit_before>// Copyright (c) 2013 GitHub, Inc. All rights reserved.
// Use of this source code is governed by MIT license that can be found in the
// LICENSE file.
#include <string.h>
#include <stdlib.h>
#include "rescle.h"
bool print_error(const char* message) {
fprintf(stderr, "Fatal error: %s\n", message);
... |
<commit_before>// RUN: %clang_cc1 -fsyntax-only -verify -Wno-array-bounds %s -fpascal-strings
void consume(const char* c) {}
void consume(const unsigned char* c) {}
void consume(const wchar_t* c) {}
void consumeChar(char c) {}
enum MyEnum {
kMySmallEnum = 1,
kMyEnum = 5
};
enum OperatorOverloadEnum {
kMyOperat... |
<commit_before>#include "gtest/gtest.h"
#include "DiceRoll/Operations/RollResult.h"
#include "DiceRoll/Operations/RepeatOperation.h"
#include "DiceRoll/Operations/RandomOperation.hpp"
class MockOperation : public IOperation
{
std::unique_ptr<RollResult> execute()
{ return std::make_unique<RollResult>(); }
publi... |
<commit_before>/*
* Copyright 2016 Nu-book Inc.
* Copyright 2017 Axel Waggershauser
*
* 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
*
* Unl... |
<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>/*
* Copyright 2006-2008 The FLWOR Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... |
<commit_before>#include <catch.hpp>
#include <rapidcheck-catch.h>
#include "util/Generators.h"
#include "util/TemplateProps.h"
using namespace rc;
using namespace rc::detail;
TEST_CASE("TestCase") {
SECTION("operator==/operator!=") {
propConformsToEquals<TestCase>();
PROP_REPLACE_MEMBER_INEQUAL(T... |
<commit_before>#include <iostream>
#include <utility>
#include <cassert>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include "glt/tex_util.h"
//Swap rows of n bytes pointed to by a with those pointed to by b
//for use in doing the y-flip for images so OpenGL has them right-side up
void swap_row(unsigned c... |
<commit_before>#include <archive.h>
#include <archive_entry.h>
#include "serialise.hh"
#include "tarfile.hh"
namespace nix {
static int callback_open(struct archive *, void * self)
{
return ARCHIVE_OK;
}
static ssize_t callback_read(struct archive * archive, void * _self, const void * * buffer)
{
auto self ... |
<commit_before>//===----------------------------------------------------------------------===//
//
// Peloton
//
// functions_test.cpp
//
// Identification: test/function/functions_test.cpp
//
// Copyright (c) 2015-2017, Carnegie Mellon University Database Group
//
//===-------------------------... |
<commit_before>#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"
#include "GraphDirected.h"
#include <map>
#include <utility>
using namespace std;
TEST_CASE( "GraphDirected", "[GraphDirected]" ) {
GraphDirected<int> _Optimizer;
map< pair< int... |
<commit_before>#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <thread>
#include <iomanip>
#include <chrono>
#include <vision/nxtcam.h>
#include "stereo_config.h"
#include "delta_robot_args.h"
using namespace ev3dev;
using namespace std;
static cl::arg<vector3i> pid(
vector3i... |
<commit_before>/* MergeSort.c
Este programa realiza el algoritmo paralelizado del MergeSort para ordenar una lista desordenada, el cual consiste en:
Dividir la lista recursivamente en sublistas de aproximadamente la mitad del tamano hasta que su tamano sea 1
Ordenar cada sublista recursivamente usando este algor... |
<commit_before>// Copyright 2014 BVLC and contributors.
#ifndef CAFFE_LAYER_H_
#define CAFFE_LAYER_H_
#include <vector>
#include "caffe/blob.hpp"
#include "caffe/common.hpp"
#include "caffe/proto/caffe.pb.h"
using std::vector;
namespace caffe {
template <typename Dtype>
class Layer {
public:
// You should not i... |
<commit_before>/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#include "config.h"
#include <cassert>
#include "stored-value.hh"
#ifndef DEFAULT_HT_SIZE
#define DEFAULT_HT_SIZE 12582917
#endif
size_t HashTable::defaultNumBuckets = DEFAULT_HT_SIZE;
size_t HashTable::defaultNumLocks = 19... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.