text stringlengths 54 60.6k |
|---|
<commit_before>//! @author @TungWah @Alan
//! @date 4 Oct,2014.
//!
//! Exercise 9.45:
//! Write a funtion that takes a string representing a name and two other
//! strings representing a prefix, such as “Mr.” or “Ms.” and a suffix,
//! such as “Jr.” or “III”. Using iterators and the insert and append functions,
//! ... |
<commit_before>#include <gtest/gtest.h>
#include <mips/interpreter/encoder/format_V_encoder.hpp>
using namespace MIPS;
TEST(FormatVEncoder, encodeJumpPositiveOffset) {
std::vector<char*> params;
params.push_back((char*) "j");
params.push_back((char*) "1067");
FormatVEncoder encoder;
encoder.parse(params);
instr... |
<commit_before>#include "GateInterpreter.h"
unsigned char* executionInputLayer = NULL;
unsigned char* executionMiddleLayerIn = NULL;
unsigned char* executionMiddleLayerOut = NULL;
unsigned char* executionOutputLayer = NULL;
int GateInterpreter::executeCircuit(GA1DArrayGenome<GENOME_ITEM_TYPE>* pGenome, unsigned char*... |
<commit_before>#include "testing/testing.hpp"
#include "editor/user_stats.hpp"
#include "platform/platform_tests_support/writable_dir_changer.hpp"
namespace editor
{
namespace
{
auto constexpr kEditorTestDir = "editor-tests";
// This user has made only 9 changes and then renamed himself, so there will be no further ... |
<commit_before>#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE TimSortTest
#include <boost/test/unit_test.hpp>
#include "timsort.hpp"
using namespace gfx;
BOOST_AUTO_TEST_CASE( simple0 ) {
std::vector<int> a;
timsort(a.begi... |
<commit_before>#include <SDL.h>
#include GLCXX_GL_INCLUDE
#include <iostream>
using namespace std;
#define WIDTH 800
#define HEIGHT 600
void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
}
void display(SDL_Window * window)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
SDL_GL_SwapWindow(wind... |
<commit_before>#ifdef _WIN32
#define _UNICODE _UNICODE
#define UNICODE UNICODE
#define TCHAR wchar_t
#else
#define TCHAR char
#endif
#include "../src/sliprock.h"
#include <gtest/gtest.h>
#include <thread>
TEST(CanCreateConnection, ItWorks) {
int fds[2];
ASSERT_EQ(pipe(fds), 0);
SliprockConnection *con =
sl... |
<commit_before>#include <err_common.hpp>
#include <type_util.hpp>
#include <string>
#include <iostream>
#include <sstream>
using std::string;
using std::stringstream;
using std::cerr;
AfError::AfError(const char * const funcName,
const int line,
const char * const message, af_err err... |
<commit_before>/****************************************************************************
* Copyright (C) 2017 by Savoir-faire Linux *
* Author : Nicolas Jäger <nicolas.jager@savoirfairelinux.com> *
* ... |
<commit_before>
#include "world.hpp"
void collect_collisions_if_object_personal_space_is_at(world& w, unordered_set<object_or_tile_identifier> &results, object_identifier id, shape const& new_shape) {
unordered_set<object_or_tile_identifier> potential_collisions;
w.collect_things_exposed_to_collision_intersecting(... |
<commit_before>#ifndef MJOLNIR_POTENTIAL_UNIFORM_POTENTIAL_HPP
#define MJOLNIR_POTENTIAL_UNIFORM_POTENTIAL_HPP
#include <limits>
namespace mjolnir
{
template<typename T> class System;
// Uniform potential is for test potentila.
// V(r) = 1
// dV/dr = 0
template<typename realT>
class UniformPotential
{
public:
u... |
<commit_before>#include "Circle.hpp"
#include <glm/gtx/constants.hpp>
Circle::Circle(GLSLProgram* glslProgram, int segments) :
Mesh::Mesh(glslProgram),
segments(segments)
{
GLfloat anglePerSegmentRads = 3.141 * 2.0f / (float)segments;
//top
vertexData.push_back(Vertex( glm::v... |
<commit_before>/*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2015 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (... |
<commit_before>
// This file is part of node-lmdb, the Node.js binding for lmdb
// Copyright (c) 2013 Timur Kristóf
// Licensed to you under the terms of the MIT license
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Softwa... |
<commit_before>#include "drawer.hh"
#include <cmath>
#include <cstring>
#include <deque>
#include <fstream>
#include <stdexcept>
#include "bezier.hh"
namespace
{
const std::string svg_preambule(
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http:... |
<commit_before>/*-------------------------------------------------------------------------
*
* FILE
* cursor.cxx
*
* DESCRIPTION
* implementation of libpqxx STL-style cursor classes.
* These classes wrap SQL cursors in STL-like interfaces
*
* Copyright (c) 2004-2006, Jeroen T. Vermeulen <jtv@xs4all.... |
<commit_before>#include "i_ui.h"
#include <boost/algorithm/string.hpp>
#include <string.h>
Widget::WidgetIterator& Widget::WidgetIterator::operator++()
{
if( mThis->mFirstChild )
{
mThis = mThis->mFirstChild;
++mLevel;
}
else if( mThis->mNext )
{
mThis = mThis->mNext;
}
... |
<commit_before>#ifndef CONFIG_HPP
#define CONFIG_HPP
// Preprocessor helpers to check for definedness giving compile errors if used
// against features with missing #defines.
#define YES -1
#define NO -2
#define ENABLED(feature) (1 == 2 feature)
// Set up build features
#define USE_SHA1_HASH NO
#define U... |
<commit_before>// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <policy/fees.h>
#include <string>
std::string StringFor... |
<commit_before>
/*
* client.cpp
*
* Handles the client env.
*
* Created by Ryan Faulkner on 2014-06-08
* Copyright (c) 2014. All rights reserved.
*/
#include <chrono>
#include <iostream>
#include <string>
#include <redis3m/connection.h>
#include "parse.h"
#include "redis.h"
// Daemon Macros
#define DBY_CM... |
<commit_before>#include <BALL/STRUCTURE/connectedComponentsProcessor.h>
#include <BALL/KERNEL/bond.h>
#include <BALL/KERNEL/atomContainer.h>
#include <BALL/KERNEL/molecule.h>
#include <BALL/KERNEL/forEach.h>
#include <map>
#include <vector>
namespace BALL
{
ConnectedComponentsProcessor::ConnectedComponentsProcessor()... |
<commit_before>/*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* CompressZFP.cpp
*
* Created on: Jul 25, 2017
* Author: William F Godoy godoywf@ornl.gov
*/
#include "CompressZFP.h"
#include "adios2/helper/adiosFunctions.h"
#include... |
<commit_before>#include "gtest/gtest.h"
#include "tcframe_test_commons.cpp"
class MyGenerator : public BaseGenerator<DefaultProblem> {
void Config() {
setTestCasesDir("testdata");
setSolutionCommand("java Solution");
}
};
TEST(GeneratorTest, DefaultOptions) {
BaseGenerator<DefaultProblem>... |
<commit_before>/*
* Copyright (c) 2015, 2016, Intel Corporation
*
* 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 lis... |
<commit_before>#include "tests-base.hpp"
extern "C" {
#include "../internal/codepoint.h"
};
TEST(CodepointEncodedLength, SingleByte)
{
EXPECT_EQ(1, codepoint_encoded_length(0x0061));
}
TEST(CodepointEncodedLength, SingleByteMinimum)
{
EXPECT_EQ(1, codepoint_encoded_length(0x0000));
}
TEST(Codepoi... |
<commit_before>#include <iostream>
#include <boost/bind.hpp>
#include <boost/fusion/include/at_c.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
#include <boost/fusion/include/for_each.hpp>
#include <boost/fusion/include/zip_view.hpp>
#include <boost/fusion/include/vector.hpp>
#include <Eigen/Core>
namespace ... |
<commit_before>// Copyright 2017 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... |
<commit_before>/*****************************************************************************
* Media Library
*****************************************************************************
* Copyright (C) 2015 Hugo Beauzée-Luyssen, Videolabs
*
* Authors: Hugo Beauzée-Luyssen<hugo@beauzee.fr>
*
* This program is f... |
<commit_before>#ifdef HAVE_CMAKE_CONFIG
#include "cmake_config.h"
#elif defined (HAVE_CONFIG_H)
#include "config.h"
#endif
#define HAVE_DUNE_DETAILED_DISCRETIZATIONS 1
#include <iostream>
#include <sstream>
#include <vector>
#include <boost/filesystem.hpp>
#include <dune/common/exceptions.hh>
#include <dune/co... |
<commit_before>#pragma once
#include <functional>
#include "debug.hpp"
#include "types.hpp"
namespace utki{
#if __cplusplus >= 201703L
template <typename C> class linq_collection_aggregator{
typename std::conditional<std::is_rvalue_reference<C>::value,
typename std::remove_reference<C>::type,
C
>::type co... |
<commit_before>/*
Copyright (c) 2003, 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>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: asynclink.cxx,v $
*
* $Revision: 1.4 $
*
* last change: $Author: hr $ $Date: 2006-06-19 20:53:48 $
*
* The Contents of this file are made... |
<commit_before>/*
* validator.cpp
* cpds
*
* Copyright (c) 2016 Hannes Friederich.
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include "cpds/validator.hpp"
#include "cpds/node.hpp"
#include "cpds/exception.hpp"
#include <iostre... |
<commit_before>/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the imp... |
<commit_before>#include "Variant.h"
#include "convert.h"
#include "join.h"
#include "split.h"
#include <set>
#include <getopt.h>
#include "Fasta.h"
#include <iostream>
#include <fstream>
using namespace std;
using namespace vcflib;
#define ALLELE_NULL -1
class SampleFastaFile {
public:
ofstream fastafile;
... |
<commit_before>/*********************************************************************
*
* Copyright (C) 2008, Simon Kagstrom
*
* Filename: string-instruction.cc
* Author: Simon Kagstrom <simon.kagstrom@gmail.com>
* Description: Instruction encoding to string
*
* $Id:$
*
************************... |
<commit_before> /*************************************************************************
*
* $RCSfile: accpreview.cxx,v $
*
* $Revision: 1.6 $
*
* last change: $Author: vg $ $Date: 2003-04-17 13:38:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following li... |
<commit_before>/*
* Copyright (c) 2008-2016 the MRtrix3 contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/
*
* MRtrix is distributed in the hope that... |
<commit_before>#include "NotifyGVContactsTable.h"
#include "ContactsParserObject.h"
GVContactsTable::GVContactsTable (QObject *parent)
: QObject (parent)
, nwMgr (this)
, mutex(QMutex::Recursive)
, bLoggedIn(false)
, bRefreshRequested (false)
{
}//GVContactsTable::GVContactsTable
GVContactsTable::~GVContactsTable ()
... |
<commit_before>#include "SysConfig.h"
#if(HAS_PCA9539)
#include <CI2C.h>
#include "CPCA9539.h"
#include "CTimer.h"
#include "NDataManager.h"
namespace
{
CTimer pcaSampleTimer;
uint32_t start;
bool toggle;
}
CPCA9539::CPCA9539( CI2C *i2cInterfaceIn )
: m_pca( i2cInterfaceIn )
{
}
void CPCA9539::Ini... |
<commit_before>/* libs/graphics/effects/SkCullPoints.cpp
**
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apac... |
<commit_before>// ======================================================================== //
// Copyright 2009-2015 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); ... |
<commit_before>/*
* Copyright (C) 2003-2007 Funambol
*
* 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
* (at your option) any later version.
*
* This ... |
<commit_before>/* libs/graphics/effects/SkCullPoints.cpp
**
** Copyright 2006, Google Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICE... |
<commit_before>#include <iostream>
#include "timer.hpp"
using namespace std;
int main()
{
cout << "Test timer class" << endl;
Timer timer;
cout << "Timer can at most run for " << timer.MaxTime() << " nanoseconds.\n";
cout << "Sleep for 1 sec.\n";
timer.StartTimer();
Sleep(1000); // ONLY WORKS... |
<commit_before>//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010-2012, Image Engine Design Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// ... |
<commit_before>
#include "include/config.h"
#include "include/error.h"
#include "common/Timer.h"
#include "common/Mutex.h"
#include "MPIMessenger.h"
#include "CheesySerializer.h"
#include "Message.h"
#include <iostream>
#include <cassert>
using namespace std;
#include <ext/hash_map>
using namespace __gnu_cxx;
#incl... |
<commit_before>#include <GL/glew.h>
#include <iostream>
#include "GL/glew.h"
#include "pbge/gfx/VBO.h"
#include "pbge/gfx/Model.h"
#include "pbge/gfx/ShaderUniform.h"
#include "pbge/gfx/UniformSet.h"
#include "OpenGLAPI/gfx/GLGraphic.h"
#include "OpenGLAPI/gfx/GLDrawController.h"
using namespace pbge;
GLDrawControl... |
<commit_before>/**
* @name Diogo Dantas
* date 14-10-2016
*/
#ifndef MOCHILA_BINARIA_HPP
#define MOCHILA_BINARIA_HPP
#include <vector>
namespace dinamica {
/**
* @brief { Função que calcula o valor máximo que é possivel colocar na mochila
* de capacidade weight}
*
* @param... |
<commit_before>#include<stdlib.h>
#include<opencv2/opencv.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<time.h>
#pragma comment(lib,"opencv_world320.lib")
static const int N = 256;//文字列の長さ
int main(void) {
char full_command[N];
char front_command[] = "sudo raspistill -o ";//command
char full_path[N];
char di... |
<commit_before>#include "GraphToolsGTest.h"
#include "../Graph.h"
#include "../GraphTools.h"
namespace NetworKit {
TEST_F(GraphToolsGTest, testGetContinuousOnContinuous) {
Graph G(10);
auto nodeIds = GraphTools::getContinuousNodeIds(G);
std::unordered_map<node,node> reference = {{0,0},{1,1},{2,2},{3,3},{4,4},{5,5}... |
<commit_before>#include "ExeBox.h"
#include <Entry.h>
#include <FindDirectory.h>
#include <Directory.h>
#include <storage/Node.h>
#include <OS.h>
#include <File.h>
#include <storage/Path.h>
#include <Locker.h>
#include "ObjectList.h"
#include <Volume.h>
#include <VolumeRoster.h>
#include <Query.h>
static BObjectList<... |
<commit_before><commit_msg>impress210: #i106378# use datetime to get current date<commit_after><|endoftext|> |
<commit_before>#include "fence.hpp"
#include <stdexcept>
// Max timeout before killing program
const int criticalWaitTime = 5000000000;
Fence::Fence(Fence&& fence) : sync{fence.sync}
{
fence.sync = 0;
}
Fence &Fence::operator=(Fence && fence)
{
if (sync && fence.sync != sync) glDeleteSync(sync);
sync = fence.syn... |
<commit_before>/* -------------------------------------------------------------------------- *
* OpenSim: PathPoint.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and ... |
<commit_before>///
/// @file FactorTable.hpp
/// @brief The FactorTable class is used to save memory. It combines
/// the lpf[n] (least prime factor) and mu[n] (Möbius function)
/// lookup tables into a single factor_table[n] which
/// furthermore only contains entries for numbers which are
/// ... |
<commit_before>#ifndef WATCHDOGD_H
#define WATCHDOGD_H
#define _XOPEN_SOURCE 700
#define _FILE_OFFSET_BITS 64
#define PREFER_PORTABLE_SNPRINTF
#define HAVE_SNPRINTF
#include <atomic>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cinttypes>
#include <climits>
#include <clocale>
#include <config.h>
#i... |
<commit_before>/* Calf DSP Library
* Example audio modules - wavetable synthesizer
*
* Copyright (C) 2009 Krzysztof Foltman
*
* This program 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... |
<commit_before>#include "priv/websocket.h"
#include "httpserverrequest.h"
#include "headers.h"
#include <QtCore/QCryptographicHash>
#include <QtCore/QtEndian>
#include <QtCore/QDataStream>
#include <QtNetwork/QHostAddress>
// Writes a string without the '\0' char using function \p func
#define WRITE_STRING(func, chun... |
<commit_before>#include <pcap_cpp/device.hpp>
#include <pcap_cpp/pcap.hpp>
#include <thread>
namespace libpcap {
device::device(const std::string device_name)
: device_name_{ device_name }, device_{ create(device_name) } {
libpcap::set_promiscuous_mode(device_, false);
libpcap::set_timeout(device_, std::... |
<commit_before>#include <possumwood_sdk/node_implementation.h>
#include "possumwood_sdk/datatypes/enum.h"
#include "datatypes/meshes.h"
#include <CGAL/Polygon_mesh_processing/stitch_borders.h>
namespace {
using possumwood::Meshes;
using possumwood::CGALPolyhedron;
typedef possumwood::CGALPolyhedron Mesh;
depende... |
<commit_before>#include <array>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
#include <ros/ros.h>
#include <controller_manager/controller_manager.h>
#include <geometry_msgs/Twist.h>
#include <hardware_interface/joint_command_interface.h>
#include <hardware_interface/joint_state_interface... |
<commit_before>#ifndef basic_types_hpp
#define basic_types_hpp
// I think this has to come before STL?
#include <boost/config.hpp>
// ===========================================
// All the STL support we need
// ===========================================
#include <string>
#include <vector>
#include <a... |
<commit_before>/**
* @file omxcv_jpeg.cpp
* @brief OpenMAX JPEG encoder for OpenCV.
*/
#include "omxcv.h"
#include "omxcv-impl.h"
#include <vector>
using namespace omxcv;
OmxCvJpegImpl::OmxCvJpegImpl(int width, int height, int quality)
: m_width(width)
, m_height(height)
, m_stride(((width + 31) & ~31) * 3)
, m_q... |
<commit_before>#include <iostream>
#include <vpp/vpp.hh>
using namespace vpp;
int main()
{
vuchar3 p;
//vint3 x = cast<vint3>(p);
vint1 xxx; xxx[0] = (20);
float y = cast<float>(xxx);
assert(y == 20);
vint1 vi = cast<vint1>(float(3.f));
assert(vi[0] == 3);
}
<commit_msg>Fix cast.<commit_after>#include... |
<commit_before>/*
HCSR04 - Library for arduino, for HC-SR04 ultrasonic distance sensor.
Created by Martin Sosic, June 11, 2016.
*/
#include "Arduino.h"
#include "HCSR04.h"
UltraSonicDistanceSensor::UltraSonicDistanceSensor(
int triggerPin, int echoPin) {
this->triggerPin = triggerPin;
this->echoPi... |
<commit_before>////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2006 - 2014, Paul Beckingham, Federico Hernandez.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to... |
<commit_before>#include "InGame.h"
#include <sstream>
InGame::InGame(Configuration& newConfig, std::unique_ptr<StartInfo> startInfo) :
config(newConfig)
{
loadGame(startInfo);
}
InGame::~InGame()
{
delete interfacePtr;
delete networkPtr;
delete systemPtr;
}
void InGame::run()
{
sf::RenderWindow& window = confi... |
<commit_before>#include <docset.hpp>
#include <utility>
namespace docset
{
// Error
error::error(const char *text) throw()
: std::runtime_error(text)
{}
// Docset
doc_set::doc_set(const char *dirname)
: basedir_(dirname)
{
init(dirname);
}
doc_set::doc_set(std::string dirname)
: basedir_(std::move... |
<commit_before>#ifndef TMVA_SOFIE_ROPERATOR_BatchNormalization
#define TMVA_SOFIE_ROPERATOR_BatchNormalization
#include "SOFIE_common.hxx"
#include "ROperator.hxx"
#include "RModel.hxx"
#include <cmath>
#include <sstream>
namespace TMVA{
namespace Experimental{
namespace SOFIE{
template <typename T>
class ROperato... |
<commit_before>/*******************************************************************
This file is part of KNotes.
Copyright (c) 2004, Bo Thorsen <bo@klaralvdalens-datakonsult.se>
2004, Michael Brade <brade@kde.org>
This program is free software; you can redistribute it and/or modify
it under the ter... |
<commit_before>#include "bart_builder.h"
#include <unordered_map>
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/fe_raviart_thomas.h>
template <int dim>
BARTBuilder<dim>::BARTBuilder (dealii::ParameterHandler &prm) {
SetParams (prm);
}
template <int dim>
BARTBuilder<dim>::~BARTBu... |
<commit_before>/*************************************************************************
*
* $RCSfile: unocontrolcontainer.hxx,v $
*
* $Revision: 1.7 $
*
* last change: $Author: hr $ $Date: 2003-03-27 17:02:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the foll... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: fileidentifierconverter.cxx,v $
*
* $Revision: 1.7 $
*
* last change: $Author: obo $ $Date: 2006-09-16 17:19:53 $
*
* The Contents of thi... |
<commit_before>/* bzflag
* Copyright (c) 1993 - 2005 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>/*
* 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 version.
*
* Written (W) 2011 Heiko Strathmann
* Copyrig... |
<commit_before>#ifndef NANOCV_CONVOLUTION_H
#define NANOCV_CONVOLUTION_H
#include <eigen3/Eigen/Core>
namespace ncv
{
namespace math
{
///
/// 2D convolution: odata += idata @ kdata (using Eigen 2D blocks)
///
template
<
... |
<commit_before>/**
* Created by Jian Chen
* @since 2016.12.14
* @author Jian Chen <admin@chensoft.com>
* @link http://chensoft.com
*/
#if !defined(__linux__) && !defined(_WIN32)
#include <socket/core/reactor.hpp>
#include <chen/sys/sys.hpp>
#include <unordered_map>
#include <vector>
#include <memory>
// -----... |
<commit_before>// Rubiks2x2x3.cpp
#include "Application.h"
#include "Rubiks2x2x3.h"
#include <Surface.h>
#include <Plane.h>
wxIMPLEMENT_DYNAMIC_CLASS( Rubiks2x2x3, TwistyPuzzle );
Rubiks2x2x3::Rubiks2x2x3( void )
{
}
/*virtual*/ Rubiks2x2x3::~Rubiks2x2x3( void )
{
}
/*virtual*/ void Rubiks2x2x3::Reset( void )
{
C... |
<commit_before>#include <iostream>
#include <fstream>
#include "loader.h"
#include "hdd.h"
#include "cpu.h"
using namespace std;
int main(int argc, char const *argv[])
{
HDD *hdd = new HDD();
Loader *l = new Loader("/Users/jonathan/Development/os/spec/Program-File.txt", hdd);
CPU *cpu = new CPU();
F... |
<commit_before>
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "gl/GLTestContext.h"
#define GL_GLEXT_PROTOTYPES
#include <GLES2/gl2.h>
#define EGL_EGLEXT_PROTOTYPES
#include <EGL/egl.h>
#include <EGL/eglext.h>
#... |
<commit_before>#pragma once
/**
@file
@brief unit test class
Copyright (C) 2008 Cybozu Labs, Inc., all rights reserved.
*/
#include <stdio.h>
#include <string.h>
#include <string>
#include <list>
#include <iostream>
#include <utility>
#include <cybozu/exception.hpp>
namespace cybozu { namespace test {
class Auto... |
<commit_before>// This file is distributed under the MIT license.
// See the LICENSE file for details.
#include <common/config.h>
#include <cstring> // memcpy
#include <stdexcept>
#include <unordered_map>
#if VSNRAY_COMMON_HAVE_PBRTPARSER
#include <pbrtParser/Scene.h>
#endif
#include <visionaray/detail/spd/blackbod... |
<commit_before>//===--- Statistic.cpp - Swift unified stats reporting --------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http... |
<commit_before>/**
@file Logger.cpp
@author Lime Microsystems
@brief API for reporting error codes and error messages.
*/
#include "Logger.h"
#include <cstdio>
#include <cstring> //strerror
#ifdef _MSC_VER
#define thread_local __declspec( thread )
#include <Windows.h>
#endif
#ifdef __APPLE__
#define thr... |
<commit_before>#pragma once
#include <samplog/samplog.hpp>
#include "Singleton.hpp"
#include "Error.hpp"
#include <fmt/format.h>
using samplog::PluginLogger_t;
using samplog::LogLevel;
using samplog::AmxFuncCallInfo;
class DebugInfoManager : public Singleton<DebugInfoManager>
{
friend class Singleton<DebugInfoMan... |
<commit_before>
#include "neighborhoods.h"
// apply valid and feasable move to the current solution (this)
void Neighborhoods::applyMove(const Move& m) {
switch (m.getmtype()) {
case Move::Ins:
{
// Get a copy of the node we are going to remove
// remove if fro... |
<commit_before>/*
* Copyright(c) 2022 Intel Corporation.
*
* 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 applica... |
<commit_before>/*!
* \file File componentAnimation.cpp
* \brief Implementation of CompAnim class
*
* This file has the implementation of CompAnim class
*
* \sa componentAnimation.hpp
*/
#include <componentAnimation.hpp>
#include <gameObject.hpp>
#include <camera.hpp>
#include <complib.hpp>
#include <game.hp... |
<commit_before>#include <openlane/component_provider.h>
#include <openlane/module.h>
#include <iostream>
typedef uint32_t (*LoadComponentType)(void *ctx);
LoadComponentType LCT;
namespace openlane {
ComponentProvider::ComponentProvider() :
xml_parser()
{
}
ComponentProvider::~ComponentProvider() {
}
ErrorCode ... |
<commit_before>#include "support.hpp"
#include <Tchar.h>
// Глобальные переменные:
HINSTANCE hInst; // Указатель приложения
LPCTSTR szWindowClass = _T("Kostyuk");
LPCTSTR szTitle = _T("lab3: input");
const SIZE wndDefaultSize{ 600, 400 };
HGDIOBJ defaultFont = GetStockObject( SYSTEM_FIXED_FONT );
// Основная прогр... |
<commit_before>/*
* Copyright (c) 2014, Vsevolod Stakhov
*
* 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 "entity.hpp"
void entity_t::move(position_t offset){
position.x += offset.x;
position.y += offset.y;
position.z += offset.z;
}
void entity_t::accelerate(velocity_t ammount){
velocity.x += ammount.x;
velocity.y += ammount.y;
velocity.z += ammount.z;
}
void entity_t::update(){
}
<commit_... |
<commit_before>#include "expand.hpp"
#include "ast.hpp"
#include "bind.hpp"
#include "eval.hpp"
#include "contextualize.hpp"
#include "to_string.hpp"
#include <iostream>
#include <typeinfo>
#ifndef SASS_CONTEXT
#include "context.hpp"
#endif
namespace Sass {
Expand::Expand(Context& ctx, Eval* eval, Contextualize* ... |
<commit_before>// $Id: fourth_error_estimators.C,v 1.12 2006-09-19 17:50:52 roystgnr Exp $
// The libMesh Finite Element Library.
// Copyright (C) 2002-2004 Benjamin S. Kirk, John W. Peterson
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Pub... |
<commit_before>#ifndef STAN_MATH_PRIM_SCAL_META_OPERANDS_AND_PARTIALS_HPP
#define STAN_MATH_PRIM_SCAL_META_OPERANDS_AND_PARTIALS_HPP
#include <stan/math/prim/scal/meta/broadcast_array.hpp>
#include <stan/math/prim/scal/meta/return_type.hpp>
namespace stan {
namespace math {
template <typename Op1 = double, typename O... |
<commit_before>/*
* opencog/atoms/execution/Eager.cc
*
* Copyright (C) 2009, 2013, 2015, 2016 Linas Vepstas
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License v3 as
* published by the Free Software Foundati... |
<commit_before>//===--- OptTable.cpp - Option Table Implementation -----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------... |
<commit_before>/*
* HypothesisColl.cpp
*
* Created on: 26 Feb 2016
* Author: hieu
*/
#include <iostream>
#include <sstream>
#include <algorithm>
#include <boost/foreach.hpp>
#include "HypothesisColl.h"
#include "ManagerBase.h"
#include "System.h"
#include "MemPoolAllocator.h"
using namespace std;
namespace... |
<commit_before>/* Copyright (c) 2016 PaddlePaddle 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 ap... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.