sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
0af9f1af55227efee04889f60443ddbe65bf12efbecabe04bea0f804f12f8468 | C++ | 712 | 25 | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2009
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
e0398c34b1e81878cf2213362afc5cf0b48b0d40db15454497f3e429f7bcaf57 | C++ | 717 | 35 | #include <Rcpp.h>
#include <unordered_set>
using namespace Rcpp;
// [[Rcpp::export]]
LogicalVector duplicated_tuples_source(List dots) {
int n = as<NumericVector>(dots[0]).size();
int m = dots.size();
LogicalVector is_duplicate(n, false);
std::unordered_set<double> seen;
for (int i = 0; i < n; ++i) {
b... |
8947cb178e4a682ad3b5ea7d56fe96a0d64b356c68b64f0d7e2bff2304b8b4a0 | C++ | 724 | 23 | #include "ovpCBoxAlgorithmNull.h"
namespace OpenViBE {
namespace Plugins {
namespace SignalProcessing {
bool CBoxAlgorithmNull::processInput(const size_t /*index*/)
{
getBoxAlgorithmContext()->markAlgorithmAsReadyToProcess();
return true;
}
bool CBoxAlgorithmNull::process()
{
Kernel::IBoxIO* boxContext =... |
55e7b1f5cff3cfca3e93d7066137637a572479e225ea5fccf6b80879595170fa | C++ | 725 | 17 | #include <hex/api/content_registry/pattern_language.hpp>
#include <pl/core/evaluator.hpp>
namespace hex::plugin::builtin {
void drawHexVisualizer(pl::ptrn::Pattern &, bool, std::span<const pl::core::Token::Literal> arguments);
void drawChunkBasedEntropyVisualizer(pl::ptrn::Pattern &, bool, std::span<const pl... |
6d9e10351fa37b5fd5c05bab9d90a843ada024abed55ad62d3d9caf1b6cb69f9 | C++ | 733 | 27 | #include <dlfcn.h>
#include <sstream>
#include "../nrnmpi.h"
namespace coreneuron {
// Those functions are part of a mechanism to dynamically load mpi or not
void mpi_manager_t::resolve_symbols(void* handle) {
for (auto* ptr: m_function_ptrs) {
assert(!(*ptr));
ptr->resolve(handle);
assert(... |
37a6dea20db052b44edecd121c07f48de532477c03c890b331132f6c3c949b84 | C++ | 739 | 22 | #include <hex/helpers/utils.hpp>
#include <hex/test/test_provider.hpp>
#include <hex/test/tests.hpp>
TEST_SEQUENCE("32BitIntegerEndianSwap") {
TEST_ASSERT(hex::changeEndianness<u32>(0xAABBCCDD, std::endian::big) == 0xDDCCBBAA);
TEST_SUCCESS();
};
TEST_SEQUENCE("64BitFloatEndianSwap") {
double floatValue ... |
4581f9d5cc1c3a912217c55c9ce2bdb0656d5d150f54c247cc4b6dcc336f5cab | C++ | 744 | 22 | #include "gtest/gtest.h"
#include "Eikonal.h"
TEST(Small3D, EightTets) {
Eikonal data(false);
data.filename_ = TEST_DATA_DIR + std::string("sphere8");
data.maxBlocks_ = 100;
EXPECT_NO_THROW(data.solveEikonal());
EXPECT_FLOAT_EQ(data.getFinalResult()[0],0.f);
for (size_t i = 1; i < data.getFinalResult().size... |
a08726d9eb11e8e48bb7eb1d5ea15badceac59760612648c018d29c8860cc6f9 | C++ | 746 | 40 | // Written by Oliver Serang 2009
// see license for more information
#include "Numerical.h"
bool Numerical::isPos(double d) {
return d > epsilon;
}
bool Numerical::isNonpos(double d) {
return d <= epsilon;
}
bool Numerical::isNeg(double d) {
return d < -epsilon;
}
bool Numerical::isNonneg(double d) {
retur... |
ba119be16919064349a05f4f4b25ab584c8ad5efb1c92bfad1e77fcacda3cb97 | C++ | 747 | 25 | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2009
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
10053e660b1fc1c6935361ddfc6cbfede99d38233cc3d541002d7321cdabda56 | C++ | 748 | 27 | /**
* SPDX-FileCopyrightText: Inria <florent.leray@inria.fr>
* SPDX-License-Identifier: LGPL-3.0-only
*/
#ifdef _WIN32
#include <windows.h>
#include <delayimp.h>
#include <libloaderapi.h>
// Intercepts delay-load notifications to force LoadLibraryExA with LOAD_LIBRARY_SEARCH_USER_DIRS,
// ensuring DLLs in director... |
d518205e1e824dfe4880b1bbe0137d5f7c55d242c4515b726b27572d8372454b | C++ | 754 | 26 | #include <hex/plugin.hpp>
#include <hex/api/localization_manager.hpp>
#include <hex/helpers/logger.hpp>
#include <romfs/romfs.hpp>
namespace hex::plugin::visualizers {
void registerPatternLanguageVisualizers();
void registerPatternLanguageInlineVisualizers();
}
using namespace hex;
using namespace hex::pl... |
d9a724656d1307a4b66716e67a0d5f1d08cef3facd99e6fd21cd6cde56a2b7b4 | C++ | 756 | 17 | #include "ebml/CIdentifier.h"
namespace EBML {
const CIdentifier& CIdentifier::operator=(const CIdentifier& id)
{
m_id = id.m_id;
return *this;
}
bool operator==(const CIdentifier& id1, const CIdentifier& id2) { return id1.m_id == id2.m_id; }
bool operator!=(const CIdentifier& id1, const CIdentifier& id2) { ... |
536b8838c9d930b0f4aaf9edef2f1b2d2af0c66495640f1007f1221d5c915553 | C++ | 772 | 30 | #include <hex/plugin.hpp>
#include <hex/api/content_registry/views.hpp>
#include <hex/helpers/logger.hpp>
#include <romfs/romfs.hpp>
#include "content/views/view_yara.hpp"
using namespace hex;
using namespace hex::plugin::yara;
namespace hex::plugin::yara {
void registerDataInformationSections();
void reg... |
12aa733487ee03cfe533f2e1238329f23bfab2f927c9e191ae19958797245b82 | C++ | 788 | 26 | #include <hex/plugin.hpp>
#include <hex/api/content_registry/provider.hpp>
#include <hex/helpers/logger.hpp>
#include <pl/api.hpp>
#include <romfs/romfs.hpp>
#include <libssh2.h>
#include <content/helpers/sftp_client.hpp>
#include <content/providers/ssh_provider.hpp>
IMHEX_PLUGIN_SETUP("Remote", "WerWolv", "Readin... |
8a67c23401b5a5d13157de2b678455a39627256490e899209216c956e7bb1a7c | C++ | 808 | 27 | //-----------------------------------------------
// Copyright 2011 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL license
//-----------------------------------------------
//
// QuickBWT - Construct a simple BWT for a short input string
//
#include "QuickBWT.h... |
2f10e1e6c9e0badcac48fb83e187b75ecb0e20e4e8ba22898047e0f695fef53b | C++ | 810 | 46 |
#include "Timer.h"
#include <iostream>
#include <sstream>
Timer::Timer(){
reset();
}
void Timer::reset()
{
cpuStartTime = cpuEndTime = clock();
time(&wallStartTime);
time(&wallEndTime);
}
void Timer::stop()
{
cpuEndTime = clock();
time(&wallEndTime);
}
std::string Timer::getCPUTimeStr()
{
... |
7756ff281a7a4a50944ffa44d210401fb2e9e4d9c97141486538d6dd394c97d3 | C++ | 826 | 26 | #include <implot.h>
#include <imgui.h>
#include <content/helpers/diagrams.hpp>
#include <hex/ui/imgui_imhex_extensions.h>
#include <pl/patterns/pattern.hpp>
namespace hex::plugin::builtin {
void drawChunkBasedEntropyVisualizer(pl::ptrn::Pattern &, bool shouldReset, std::span<const pl::core::Token::Literal> argu... |
939a1f7380cb7a46e5a339a0ad54b227d0b3984bb23a899648aefdf11b398ffd | C++ | 831 | 21 | #include "TmpDir.h"
void TmpDir::createTempFile(std::string& tcf, std::string& tcd) {
//TODO it would be nice to somehow avoid these declararions and therefore avoid the linking to
//boost filesystem when we don't use them
try {
boost::filesystem::path ph = boost::filesystem::unique_path();
... |
5d7f4d0896dcb1686a0280385df1511a3f42c9d6845b44794c2ba2ba1dc3e145 | C++ | 835 | 25 | #include "defines.hpp"
#include "box-algorithms/CBoxAlgorithmNoiseGenerator.hpp"
#include "box-algorithms/CSinusSignalGenerator.hpp"
#include "box-algorithms/CBoxAlgorithmChannelUnitsGenerator.hpp"
namespace OpenViBE {
namespace Plugins {
namespace DataGeneration {
OVP_Declare_Begin()
OVP_Declare_New(CNoiseGener... |
20c38b91657bb7dbee17a46f41f36fb58da6f87ce8063e7bd6f03cfcca6c7e2a | C++ | 836 | 34 | /*
# =============================================================================
# Copyright (c) 2021-22 Blue Brain Project/EPFL
#
# See top-level LICENSE file for details.
# =============================================================================.
*/
#include <sys/time.h>
#include "utils.hpp"
#include "coreneur... |
4ca254b143c89c5aae841a394c884e42c8e3edebfa28e862f8c965b141281773 | C++ | 837 | 33 | #if defined(OS_MACOS)
#include <stdexcept>
#include <hex/helpers/logger.hpp>
#include <hex/helpers/utils_macos.hpp>
#include "messaging.hpp"
namespace hex::messaging {
void sendToOtherInstance(const std::string &eventName, const std::vector<u8> &args) {
log::debug("Sending event {} to another instance ... |
5a34754c8a8e8b01cf6fdad2db09e6879fbab428677cd2f24c27467d02a0e463 | C++ | 846 | 27 | #ifdef TARGET_OS_Windows
#include "ovasCConfigurationDriverMensiaAcquisition.h"
namespace OpenViBE {
namespace AcquisitionServer {
//TODO_JL Add the URL as parameter for configuration so it can be saved and loaded
CConfigurationDriverMensiaAcquisition::CConfigurationDriverMensiaAcquisition(IDriverContext& ctx, cons... |
037443a11c349f09a23488b2c70f37d59244b4d85df0ba80986ab9aebe37b625 | C++ | 847 | 31 | #include <vector>
#include <openvibe/ov_all.h>
#include "ovp_defines.h"
#include "box-algorithms/osc-controller/ovpCBoxAlgorithmOSCController.h"
// @BEGIN gipsa
#include "box-algorithms/ovpCBoxLSLExportGipsa.h"
// @END gipsa
namespace OpenViBE {
namespace Plugins {
namespace NetworkIO {
OVP_Declare_Begin()
OV... |
dd8d3a393eba979ef1e15d5bfea8e479ffebac7cd210490b184e8d1a4b9611a8 | C++ | 859 | 28 | #include "ovpCFeatureVectorDecoder.h"
namespace OpenViBE {
namespace Plugins {
namespace StreamCodecs {
void CFeatureVectorDecoder::openChild(const EBML::CIdentifier& identifier)
{
m_oTop = identifier;
CStreamedMatrixDecoder::openChild(identifier);
}
void CFeatureVectorDecoder::processChildData(const void* ... |
b0a8aeb727d9179e2447954f850fb906f1bd95cc1f2ed097eba097217e88c33e | C++ | 866 | 29 | #include "ovp_defines.h"
#include "box-algorithms/ovpCHelloWorld.h"
#include "box-algorithms/ovpCHelloWorldWithInput.h"
#include "box-algorithms/ovpCLog.h"
#include "box-algorithms/ovpCBoxAlgorithmNothing.h"
#include "box-algorithms/ovpCBoxAlgorithmClock.h"
namespace OpenViBE {
namespace Plugins {
namespace Examples... |
4008a3ff56551dc77a8d582e7148066c022e4c22b9056e95550af5ce067a2048 | C++ | 867 | 29 | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2009
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
8f509b9d58f7b435d7ffe2cb1aeb356f4b1848ae47d848397f631539d9a86229 | C++ | 870 | 41 | /*
* HID driver for OpenViBE
*
* \authors (NeuroServo, NeuroTechX)
* \developer (Innocent Aguié)
* \date Wed Nov 23 00:24:00 2016
*
*/
#if defined TARGET_OS_Windows
#if defined TARGET_HAS_ThirdPartyNeuroServo
#include <windows.h>
#include "HidDeviceNotifier.h"
#include "HidDeviceNotifierRef.h"
#include <thread>
#de... |
61a92bfb6e79e7c129217a5c192fbf9b6884f2dba0b547b597557ee51250b294 | C++ | 871 | 37 | //-----------------------------------------------
// Copyright 2009 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL
//-----------------------------------------------
//
// Interval - A pair of integers denoting a range
//
#include "Interval.h"
#if 0
Interval Int... |
9c3158e11ffcff752d14a4014609cfc52b96b0244b61f962ca2ef65816c61764 | C++ | 873 | 24 | /*
# =============================================================================
# Copyright (c) 2016 - 2021 Blue Brain Project/EPFL
#
# See top-level LICENSE file for details.
# =============================================================================
*/
#include "coreneuron/coreneuron.hpp"
#include "coreneuron... |
064fc0ddec65cac0213afaec06362b952feaaf92e48d3a4b61c422b5d8d16edf | C++ | 876 | 26 | #include "gtest/gtest.h"
#include "Eikonal.h"
TEST(Basic2D, NonMaxUnstructured) {
Eikonal data(true);
data.filename_ = TEST_DATA_DIR + std::string("sphere_74verts.ply");
data.maxBlocks_ = 11;
data.stopDistance_ = 700.f;
EXPECT_NO_THROW(data.solveEikonal());
for (size_t i = 0; i < data.getFinalResult().size(... |
d2b8be4ed176a495fe18a4e9871346e24c67e5fab61cebe2abe66d289014907c | C++ | 877 | 40 | /*
# =============================================================================
# Copyright (c) 2016 - 2021 Blue Brain Project/EPFL
#
# See top-level LICENSE file for details.
# =============================================================================.
*/
#include "coreneuron/utils/ivocvect.hpp"
#include "coren... |
90acab3803ec29b1930a8541a148a33d32a36a8b14f9a867c214074ed575d5b3 | C++ | 878 | 31 | #include "ovpCAlgorithmOVMatrixFileWriter.h"
namespace OpenViBE {
namespace Plugins {
namespace FileIO {
bool CAlgorithmOVMatrixFileWriter::initialize()
{
ip_sFilename.initialize(getInputParameter(OVP_Algorithm_OVMatrixFileWriter_InputParameterId_Filename));
ip_pMatrix.initialize(getInputParameter(OVP_Algorit... |
4901c33bc8291f0c8f963bab64ddad98b77b9d2f22d6e8a5e81ff8ecd9981eb2 | C++ | 881 | 31 | #include "ovpCAlgorithmOVMatrixFileReader.h"
namespace OpenViBE {
namespace Plugins {
namespace FileIO {
bool CAlgorithmOVMatrixFileReader::initialize()
{
ip_sFilename.initialize(getInputParameter(OVP_Algorithm_OVMatrixFileReader_InputParameterId_Filename));
op_pMatrix.initialize(getOutputParameter(OVP_Algori... |
00b74e68f9422d4882e62508df464ef9836df7c9e63743ec9048267e5f116e67 | C++ | 885 | 37 | #include <hex/plugin.hpp>
#include <hex/helpers/logger.hpp>
#include <romfs/romfs.hpp>
#include <font_settings.hpp>
#include <fonts/fonts.hpp>
#include <hex/api/task_manager.hpp>
#include <hex/api/events/events_lifecycle.hpp>
namespace hex::fonts {
void registerUIFonts();
void registerMergeFonts();
nam... |
78e729e0cdb5785f1245ae4d8ff0f4ac8603a978719806faeeb456dee5c79688 | C++ | 890 | 34 | #include <hex/providers/memory_provider.hpp>
#include <cstring>
namespace hex::prv {
Provider::OpenResult MemoryProvider::open() {
if (m_data.empty()) {
m_data.resize(1);
}
return {};
}
void MemoryProvider::readRaw(u64 offset, void *buffer, size_t size) {
aut... |
a4e44ffe32383df7620eb49f80dd6bf7c7e0e49af313b5a6c29fa02a406e9823 | C++ | 899 | 31 | //-----------------------------------------------
// Copyright 2009 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL
//-----------------------------------------------
//
// Quality - functions for manipulating quality values
//
#include "Quality.h"
// Return a u... |
8a7cdb6cf871738d40919bf07aa4dfc75355ccc584554943149894d67e9f0245 | C++ | 904 | 30 | #include <hex/helpers/utils.hpp>
#include <content/visualizer_helpers.hpp>
#include <implot.h>
#include <imgui.h>
#include <hex/ui/imgui_imhex_extensions.h>
namespace hex::plugin::visualizers {
void drawLinePlotVisualizer(pl::ptrn::Pattern &, bool shouldReset, std::span<const pl::core::Token::Literal> argument... |
252046484b9379872c0d3584bebbd720e0c5d7f4df6fe0aee399eaf00bf41f6c | C++ | 914 | 29 | #include "../ovasCTagStream.h"
#include <iostream>
int main()
{
bool ok = false;
OpenViBE::AcquisitionServer::Plugins::CTagStream tagStream1;
std::cout << "1st stream created." << std::endl;
// The construction of the second TagStream must fail because of port already in use.
try { OpenViBE::Acq... |
fa09d704c18422ad8b333d72e9a8dc379469cb9e268791e31a0835d42fc5aead | C++ | 921 | 28 | #include "defines.hpp"
//// #include "box-algorithms/ovpCBoxAlgorithmLatencyEvaluation.h"
#include "box-algorithms/CBoxAlgorithmMouseTracking.hpp"
#include "box-algorithms/CBoxAlgorithmKeypressEmulator.hpp"
#include "openvibe/CIdentifier.hpp"
namespace OpenViBE {
namespace Plugins {
namespace Tools {
OVP_Declare_Be... |
2b648d4d469b5474bc4560f01ce2c370d0e038e93cfb417b56e91ed139412935 | C++ | 935 | 27 | /**
* @file r8bbase.cpp
*
* @brief C++ file that should be compiled and included into your application.
*
* This is a single library file that should be compiled and included into the
* project that uses the "r8brain-free-src" sample rate converter. This file
* defines several global static objects used by the l... |
de58ba443a138994c17e662d48315c7006168c7ce936723c006dede8ad9ddc62 | C++ | 937 | 30 | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2013
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
cae9f1868c5eaf234bd9dfe63ed9608960ee24e70643b37394fe36398681fdab | C++ | 972 | 39 | #include "ovpCSignalEncoder.h"
namespace OpenViBE {
namespace Plugins {
namespace StreamCodecs {
bool CSignalEncoder::initialize()
{
CStreamedMatrixEncoder::initialize();
ip_sampling.initialize(getInputParameter(OVP_Algorithm_SignalEncoder_InputParameterId_Sampling));
return true;
}
bool CSignalEncoder::... |
38ae1f02619fce4efea2662a17f52ff2f10043c3a4feec3d14f432edd51fa4b0 | C++ | 977 | 16 | #include "ovkCObjectVisitorContext.h"
namespace OpenViBE {
namespace Kernel {
CObjectVisitorContext::CObjectVisitorContext(const IKernelContext& ctx) : TKernelObject<IObjectVisitorContext>(ctx) {}
CObjectVisitorContext::~CObjectVisitorContext() {}
IAlgorithmManager& CObjectVisitorContext::getAlgorithmManager() const... |
631fb782257d9a94586bd5847fff39ae374814905f9ce8d5631b613398d53778 | C++ | 977 | 29 | #include "gtest/gtest.h"
#include "Eikonal.h"
TEST(Converge2D, Unstructured) {
Eikonal data(true);
data.filename_ = TEST_DATA_DIR + std::string("sphere_74verts.ply");
data.maxBlocks_ = 1000;
EXPECT_NO_THROW(data.solveEikonal());
for (size_t i = 1; i < data.numIterations(); i ++) {
for (size_t j = 0; j < d... |
55de4b40b708a005d4f14989dce7c8de9c8f26d938256f2784c459d57aa8d95b | C++ | 984 | 41 | /**
* SPDX-FileCopyrightText: Inria <florent.leray@inria.fr>
* SPDX-License-Identifier: LGPL-3.0-only
*/
#include <system/OSAL.h>
#if defined TARGET_OS_Windows
#include <system/WindowsUtilities.h>
#endif
namespace OSAL {
dlib loadLibrary(const std::string& path)
{
#if defined TARGET_OS_Linux || defined TARGET_OS... |
df09cf813274b6e2086a63e79becf84e3c746ceb80fcba41d4cbe8e3fee3d13a | C++ | 994 | 30 | /*******************************************************************************
Copyright 2006-2010 Lukas Käll <lukas.kall@scilifelab.se>
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:... |
e364267f72f7f432606347b65692e6d1611fee79a9147b4f67f7abe18728ee5f | C++ | 1,007 | 40 | //-----------------------------------------------
// Copyright 2010 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL
//-----------------------------------------------
//
// CorrectionThresholds - Cutoff values for determining
// whether a particular base should b... |
a859dd711c7bed121facb1b1acaf3a8a401ca2d4d119093db9254f9b225a22c6 | C++ | 1,020 | 39 | #include "ovpCChannelUnitsEncoder.h"
namespace OpenViBE {
namespace Plugins {
namespace StreamCodecs {
bool CChannelUnitsEncoder::initialize()
{
CStreamedMatrixEncoder::initialize();
ip_bDynamic.initialize(getInputParameter(OVP_Algorithm_ChannelUnitsEncoder_InputParameterId_Dynamic));
return true;
}
bool... |
ad18be8537a631f34dd440edbc08cfeefea7845b82cfef17e36c47a4ce9136fa | C++ | 1,044 | 21 | #include "ebml/CWriterHelper.h"
namespace EBML {
CWriterHelper::CWriterHelper() { m_impl = createWriterHelper(); }
CWriterHelper::~CWriterHelper() { m_impl->release(); }
bool CWriterHelper::connect(IWriter* writer) { return m_impl->connect(writer); }
bool CWriterHelper::disconnect() { return m_impl->disconnect(); }
... |
04b9abfff92a67066fb8102d54f6a1930daf1b1973a4f2f0f25f161c095d8d26 | C++ | 1,046 | 42 | #include "ovIObserver.h"
#include "ovCObservable.h"
#include "ov_defines.h"
#include <iostream>
#include <vector>
namespace OpenViBE {
struct CObservable::SObserverList
{
std::vector<IObserver*> m_Vector;
};
CObservable::CObservable() { m_observers = new SObserverList(); }
CObservable::~CObservable() { delete m... |
012d1ace01c67be95397a1e256f03447c8bfc2abfddde681372f5f0454f43798 | C++ | 1,054 | 29 | #include "SvabaLogger.h"
#include "SvabaOptions.h"
#include "SvabaGitVersion.h" // generated: SVABA_GIT_DESCRIBE / HASH
SvabaLogger::~SvabaLogger() {
if (logFile_.is_open()) logFile_.close();
}
void SvabaLogger::init(const std::string& filename) {
logFile_.open(filename, std::ios::out | std::ios::app);
if (!l... |
e17672dcce7167d4864ff0da0b9aefbe72152fe4af37e24effd8b0ac37a21fa9 | C++ | 1,061 | 36 | #include "ovvizCVisualizationContext.hpp"
namespace OpenViBE {
namespace VisualizationToolkit {
CIdentifier CVisualizationContext::addWindowManager(std::unique_ptr<IWindowManager> windowManager)
{
CIdentifier newID = CIdentifier::random();
while (m_windowManagers.find(newID) != m_windowManagers.end() && newID... |
a3bd00f5a70a8850cfa1deda5bb5c679f508dc7eba7025ea3bb14876b73d478b | C++ | 1,068 | 22 | #include "defines.hpp"
#include "algorithms/CAlgorithmSphericalSplineInterpolation.hpp"
#include "box-algorithms/CBoxAlgorithmTopographicMap2DDisplay.hpp"
#include "box-algorithms/CBoxAlgorithmMatrixDisplay.hpp"
namespace OpenViBE {
namespace Plugins {
OVP_Declare_Begin()
context.getTypeManager().registerEnumera... |
1af81022acd7cd724113b7ece449a7e2bfe9ac714877908b94f1f24e2bffd56c | C++ | 1,069 | 39 | #include "ovpCChannelLocalisationEncoder.h"
namespace OpenViBE {
namespace Plugins {
namespace StreamCodecs {
bool CChannelLocalisationEncoder::initialize()
{
CStreamedMatrixEncoder::initialize();
ip_bDynamic.initialize(getInputParameter(OVP_Algorithm_ChannelLocalisationEncoder_InputParameterId_Dynamic));
... |
8dc7d48f54cc0b7c7ccc0967ee7da8fa371b0581d50d5f54c041a9ad8a400071 | C++ | 1,070 | 42 | /*******************************************************************************
Copyright 2006-2012 Lukas Käll <lukas.kall@scilifelab.se>
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... |
a945ae40c789693faaa8858f10e892b8dfb2c8a34075e588360734bd9356cdd0 | C++ | 1,075 | 34 | #include <hex/api/content_registry/file_type_handler.hpp>
#include <hex/helpers/default_paths.hpp>
#include <fonts/vscode_icons.hpp>
#include <toasts/toast_notification.hpp>
namespace hex::plugin::builtin {
void registerFileHandlers() {
ContentRegistry::FileTypeHandler::add({ ".hexlyt" }, [](const std... |
e1333e877e22b76b8dd666f41f0dae8d6a21b19f477d59470aa5435b572fac40 | C++ | 1,104 | 32 | #include "gtest/gtest.h"
#include "Eikonal.h"
TEST(Converge3D, Unstructured) {
Eikonal data(false);
data.filename_ = TEST_DATA_DIR + std::string("sphere334");
EXPECT_NO_THROW(data.solveEikonal());
for (size_t i = 2; i < data.numIterations(); i ++) {
for (size_t j = 0; j < data.getResultAtIteration(i).size()... |
e70a44a9231552d7fc078a41ac3e01f60b854aa3c680d0f7226af3487e20b4b0 | C++ | 1,105 | 47 | #include <NetWriter.h>
#include <openvibe/acquisition-messaging/ovMsgSerializer.h>
#include <NetService.h>
class NetWriterPrivate
{
public:
Network::CServer *server;
};
NetWriter::NetWriter(const std::string& writerName) : AbstractWriter(writerName), d ( std::make_unique<NetWriterPrivate>() )
{
d->server = ... |
5c4baab7a820dab11a8a679b1c95c031b3fbd30f8b62715bd88c8f00ecb5181e | C++ | 1,111 | 35 | #include "gtest/gtest.h"
// ReSharper disable CppUnusedIncludeDirective
#include "test_Basics.hpp"
#include "test_Covariance.hpp"
#include "test_Mean.hpp"
#include "test_Median.hpp"
#include "test_Misc.hpp"
#include "test_Distance.hpp"
#include "test_Geodesics.hpp"
#include "test_Featurization.hpp"
#include "test_Clas... |
6efb3aab6f6baa2af4b5d780ef1b3c2d917e69a8f04d558dc0a20a116042d21b | C++ | 1,111 | 33 | #include <hex/helpers/utils.hpp>
#include <content/visualizer_helpers.hpp>
#include <implot.h>
#include <imgui.h>
#include <hex/ui/imgui_imhex_extensions.h>
namespace hex::plugin::visualizers {
void drawScatterPlotVisualizer(pl::ptrn::Pattern &, bool shouldReset, std::span<const pl::core::Token::Literal> argum... |
56715ad77bbdceb7552ae1ffe9f1027ccdce6c77c3a40ae6115667b504924423 | C++ | 1,112 | 40 | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2009
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
f884aa38198c97f787d663eddb1e4b2411ceeb9f3d96fe34a9eba7a0315ec38d | C++ | 1,121 | 35 | #include <hex/plugin.hpp>
#include <hex/api/achievement_manager.hpp>
#include <hex/api/content_registry/views.hpp>
#include <hex/helpers/logger.hpp>
#include <romfs/romfs.hpp>
#include <content/views/view_hashes.hpp>
#include <fonts/tabler_icons.hpp>
namespace hex::plugin::hashes {
void registerHashes();
}
... |
94f7e279caff54a31bdc516f9ca6025792ee462805bc61df79d7d2a9dfa206a5 | C++ | 1,129 | 31 | #include "ovtkCFeatureVectorSet.hpp"
namespace OpenViBE {
namespace Toolkit {
CFeatureVectorSet::CFeatureVectorSet(const CMatrix& matrix) : m_matrix(matrix)
{
if (matrix.getDimensionCount() != 2) { throw std::runtime_error("Fetaure vector set matrix must be 2 dimensions"); }
for (size_t i = 0; i < matrix.get... |
b4023009fa5f86f370b0be422752c0488db952b90715949096511e3da256abfd | C++ | 1,133 | 37 | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2013
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
c67f6f7cf8fca4a1ad6d1f5bd695716c6c0c1cfeb43324dc4c81afad25d2a587 | C++ | 1,134 | 32 | #include "ovbt_sg_defines.h"
#include <fstream>
bool CCppCodeGenerator::openFile(const char* filename)
{
m_file.open(filename, std::ios::out | std::ios::trunc);
if (!m_file.is_open()) { return false; }
m_file << "#include \"toolkit/ovtk_all.h\"" << std::endl << std::endl;
m_file << "using namespace O... |
0ea06f8cba39148ede7c99ec815a6cdab92fb5e537bb2e8868cc48497e8ac52a | C++ | 1,136 | 40 | #include <QGuiApplication>
#include <QStyleHints>
#include <QQmlApplicationEngine>
#include <QQuickStyle>
#include <QtQml/qqmlextensionplugin.h>
#include <QLoggingCategory>
#include <QtCore>
#include <QQmlContext>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
app.setApplicationName("Ope... |
a626936119211ac3a7d9035c99064e5c6bab1f83fbf316e0d39292439a562f07 | C++ | 1,136 | 38 | //-----------------------------------------------
// Copyright 2010 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL
//-----------------------------------------------
//
// BWTWriter - Abstract class for writing a BWT file to disk
//
#include "BWTWriter.h"
#incl... |
b69dd61c954c6845349cab4aa3c7f7500b4a90785183ac7a0e04eac08d03f13f | C++ | 1,138 | 35 | #include <hex/api/localization_manager.hpp>
#include <algorithm>
#include <imgui.h>
#include <hex/ui/imgui_imhex_extensions.h>
#include <content/tools_entries.hpp>
#include <fonts/vscode_icons.hpp>
namespace hex::plugin::builtin {
void drawByteSwapper() {
static std::string input, buffer, output;
... |
b0841b550a54d62716a0fac71e02c4d0b3f9d06a31abcc89fbcd35715e40cf4f | C++ | 1,142 | 36 | #include "ovkCScenarioSettingKeywordParserCallback.h"
#include <openvibe/ov_all.h>
#include <iostream>
namespace OpenViBE {
namespace Kernel {
bool CScenarioSettingKeywordParserCallback::expand(const CString& rStringToExpand, CString& rExpandedString) const
{
// In the case there is no value present we return an... |
41cb5422a31fb3108a24f2475e239fe70cf6acac50ca11413bab63f597564273 | C++ | 1,145 | 33 | #include "CBoxAlgorithmModifiableSettings.hpp"
namespace OpenViBE {
namespace Plugins {
namespace Examples {
//---------------------------------------------------------------------------------------------------
bool CBoxAlgorithmModifiableSettings::processClock(Kernel::CMessageClock& /*msg*/)
{
updateSettings();
... |
da5f8e5ab2b6687b12147a77b6ab7c7e530b798abd1667e987b9880fc8896add | C++ | 1,156 | 48 | #if defined(WIN32)
#include "GenericVRPNServer.hpp"
#include <iostream>
#include <math.h>
#include <windows.h>
#define DEFAULT_PORT 50555
int main(int /*argc*/, char** /*argv*/)
{
CGenericVrpnServer* vrpnServer = CGenericVrpnServer::GetInstance(DEFAULT_PORT);
const char* buttonDevice = "button_test";
co... |
941d4a7374595a3ab7808d0e4c86055e5f285258e64f63baa49c6fee242d51e7 | C++ | 1,161 | 32 | /*******************************************************************************
Copyright 2006-2012 Lukas Käll <lukas.kall@scilifelab.se>
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:... |
b299fd39655be920bdccf94dc7ece34b6e7d5c74ea329de64c714c66ca0cfe8f | C++ | 1,162 | 48 | #if !defined(WIN32)
#include "GenericVRPNServer.hpp"
#include <iostream>
#include <cmath>
#include <unistd.h>
#define DEFAULT_PORT 50555
int main(int argc, char** argv)
{
CGenericVrpnServer* vrpnServer = CGenericVrpnServer::GetInstance(DEFAULT_PORT);
const char* buttonDevice = "button_test";
const char*... |
f6dd8b0b18c81e7b13174f7e6c855720fbb93eae1711869593076167304682cd | C++ | 1,166 | 34 | #include "ovpCStreamStructureDecoder.h"
namespace OpenViBE {
namespace Plugins {
namespace StreamCodecs {
CStreamStructureDecoder::CStreamStructureDecoder() {}
// ________________________________________________________________________________________________________________
//
bool CStreamStructureDecoder::initial... |
a305d438c18a224b5f35b1521f743af23ab860b76004ff05da18cdb099bcc808 | C++ | 1,167 | 28 | /*******************************************************************************
Copyright 2006-2012 Lukas Käll <lukas.kall@scilifelab.se>
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:... |
787827268d00a5e52ebb2543527dba29af062b1ba734b2b520dd87739e7b8433 | C++ | 1,174 | 30 | //-----------------------------------------------
// Copyright 2010 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL
//-----------------------------------------------
//
// SearchSeed.h - Data structure holding a partial
// alignment to a FM-index.
//
#include ... |
c3fa82d6b48fc216d3648379d3f2a6e92238211723f1d3ceff6ed736a0051643 | C++ | 1,174 | 26 | #include "CBoxAlgorithmDumper.hpp"
#include <iostream>
#include <fstream>
namespace OpenViBE {
namespace PluginInspector {
// ------------------------------------------------------------------------------------------------------------------------------------
CBoxAlgorithmDumper::CBoxAlgorithmDumper(const Kernel::IKer... |
4e8d873b37194365625b7e2505bc100cccfb0b4fa151669b8816aecab27861a4 | C++ | 1,180 | 38 | #include "ovbt_sg_defines.h"
#include <fstream>
std::string getBrutHexaCode(std::string formatedHexaCode)
{
std::string res = formatedHexaCode;
res.erase(res.begin(), res.begin() + 2);
return res;
}
bool CMatlabGenerator::openFile(const char* filename)
{
m_file.open(filename, std::ios::out | std::ios... |
d939575725e49c9cf4ead3db2b41ef7ba2b70267effe907812743bc32c1f3f0a | C++ | 1,182 | 43 | #include <hex/helpers/utils.hpp>
#include <hex/providers/memory_provider.hpp>
#include <imgui.h>
#include <pl/pattern_language.hpp>
#include <pl/patterns/pattern.hpp>
#include <hex/ui/imgui_imhex_extensions.h>
#include <ui/hex_editor.hpp>
namespace hex::plugin::builtin {
void drawHexVisualizer(pl::ptrn::Patte... |
44a7561de17c81d16a0ab6824d3be0f79da9df5d63469b299812b8460f2a4460 | C++ | 1,185 | 44 | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2009
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
8bec69bb79b2c9481e85a560edd3d305dff6ff75350daf6d3778951528e952df | C++ | 1,187 | 43 | //-----------------------------------------------
// Copyright 2009 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL
//-----------------------------------------------
//
// EdgeDesc - A unique description of an edge
//
#include "EdgeDesc.h"
#include "Vertex.h"
... |
abd5d40f1676d8e6e54a3714486cf247ab68a1a720594dc395fd347ece5ca21e | C++ | 1,187 | 63 | /*****************************************************************************
* log_space.cpp
* (c) 2012 - Ryan M. Layer
* Hall Laboratory
* Quinlan Laboratory
* Department of Computer Science
* Department of Biochemistry and Molecular Genetics
* Department of Public Health Sciences and Center for Public Health... |
4ead24614a5ae73d310cf004d0e23132b25beff1d4fd2d6df4a5f35a752aed4e | C++ | 1,200 | 27 | // Appeasing Intellisense by including the following
#include "ov_common_defines.h"
#include <cstdint>
int main()
{
#if defined(WIN32) || (defined(LINUX) && defined(__GXX_EXPERIMENTAL_CXX0X__))
static_assert(sizeof(uint64_t) >= 8, "uint64_t is not at least 8 bytes");
static_assert(sizeof(uint32_t) >= 4, "uint3... |
1a6a118dbdd20d65ffc2d0f1181c3a2566dcd5ddc0895774e0355ef93cccc11b | C++ | 1,203 | 70 |
#include "phylo.h"
int main(int argc, char* argv[]) {
ifstream is(argv[1]);
ifstream pis(argv[2]);
double epsilon = atof(argv[3]);
ofstream os(argv[4]);
string alphabet;
is >> alphabet;
int Nstate = alphabet.size();
cerr << "nstate : " << Nstate << '\n';
double stat[Nstate];
for (int i=0; i<Nstate; i++) ... |
dddb0da5dc983edc4b18cfc67abdbcec64eea2a1b4796e41ab7d635655b64a1c | C++ | 1,206 | 51 | /**
* SPDX-FileCopyrightText: Inria <thomas.prampart@inria.fr>
* SPDX-License-Identifier: AGPL-3.0-only
*/
#include "TaggingDriver.h"
#include <TcpTaggingService.h>
bool TaggingDriver::init()
{
return true;
}
bool TaggingDriver::unInit()
{
return true;
}
bool TaggingDriver::start()
{
// Discard tags ... |
32610c90610a4319719f5a8811dfbe09a69169b33c2cb5bd49e1a703e547cbe7 | C++ | 1,221 | 43 |
/********************
PhyloBayes MPI. Copyright 2010-2013 Nicolas Lartillot, Nicolas Rodrigue, Daniel Stubbs, Jacques Richer.
PhyloBayes 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 L... |
99e538645cc42c2e1992f86c6fc6d9b563ee2dac6e485c1241277b3b6693f8e5 | C++ | 1,226 | 48 | #include <openvibe/ov_all.h>
#include <toolkit/ovtk_all.h>
#include "TypeMatrix.h"
#include "Decoder.h"
#include "Encoder.h"
namespace OpenViBE {
namespace Tracker {
template <>
bool DecoderAdapter<TypeMatrix, Toolkit::TStreamedMatrixDecoder<BoxAlgorithmProxy>>::getHeaderImpl(TypeMatrix::Header& h)
{
CMatrix* de... |
9c42c2baf0389e813d91dcd2b8eb09028a9a6135d4a784fe418b6e4303d278c9 | C++ | 1,230 | 47 | /*******************************************************************************
Copyright 2006-2012 Lukas Käll <lukas.kall@scilifelab.se>
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:... |
b12a76e525673eb9fb6c9154e3f24a4ab5ca2dca4bf5f0634d093dfc73deb922 | C++ | 1,230 | 55 | //-----------------------------------------------
// Copyright 2010 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL
//-----------------------------------------------
//
// SAWriter.h - Read a suffix array file from disk
//
#include "SAWriter.h"
#include "Suffix... |
61b079b5a8ee814b09087f2177a7e5e0e77d2e0a0116d050e188f71d19dd26f3 | C++ | 1,242 | 66 | /**
* SPDX-FileCopyrightText: Inria <tristan.cabel@inria.fr>
* SPDX-License-Identifier: AGPL-3.0-only
* see : https://doc.qt.io/qt-6.5/qtwidgets-itemviews-simpletreemodel-example.html
*/
#include "BoxTreeItem.h"
namespace OpenViBE {
namespace Designer {
BoxTreeItem::BoxTreeItem(const QList<QVariant> &data, BoxT... |
ffe2731ce84aedcca11d757b3f41a3d9e87c698d536542c0e7d117383ff55f6a | C++ | 1,242 | 30 | #include <openvibe/ov_all.h>
#include "ovp_defines.h"
// Boxes Includes
#include "boxes/CBoxAlgorithmFeaturesSelection.hpp"
#include "boxes/CBoxAlgorithmFeaturesSelector.hpp"
namespace OpenViBE {
namespace Plugins {
namespace FeaturesSelection {
OVP_Declare_Begin()
// Register boxes
OVP_Declare_New(CBoxAlgor... |
6c4b6f206a006d153e64d77fb812476fac1bd03cf0e4e098346c7be9eb79a38d | C++ | 1,243 | 41 | #include "ovpCBitfield.h"
namespace BCI2000 {
uint32_t* CBitfield::getFields(unsigned char* data)
{
const size_t nFields = m_fields.size();
uint32_t* fields = new uint32_t[nFields];
getFields(data, fields);
return fields;
}
void CBitfield::getFields(unsigned char* data, uint32_t* fields)
{
co... |
ff20c38f142b3a170aed3610d88dae5ee6bf3622598c6b97d579f1a4b16c6ff3 | C++ | 1,259 | 34 | /*
* 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. All contribut... |
2af6d932b3f88640c926f73297fe6cd6d43fa5c6250856ea2a730e730d686dbe | C++ | 1,265 | 39 | #include <vector>
#include <openvibe/ov_all.h>
// @BEGIN CICIT-GARCHES
#include "box-algorithms/ovpCBoxAlgorithmEDFFileWriter.h"
// @END CICIT-GARCHES
// @BEGIN GIPSA
#include "box-algorithms/ovpCBoxAlgorithmBrainampFileWriterGipsa.h"
// @END GIPSA
#include "box-algorithms/ovpCBoxAlgorithmEDFFileReader.hpp"
namespa... |
82a9e52829fd10669df99241d754d9e04ce6476b44d98c475ca2d50ca2bb8ad0 | C++ | 1,269 | 53 | /*
# =============================================================================
# Copyright (c) 2016 - 2021 Blue Brain Project/EPFL
#
# See top-level LICENSE file for details.
# =============================================================================
*/
#include <cstdio>
#include <cstring>
#include <cstdlib>
#... |
08fc20eebbdcd1db54cee4f3ebe40793235ed8e09b7728c958450cf9c2f76695 | C++ | 1,271 | 65 |
#include "Random.h"
#include "SequenceAlignment.h"
#include "Parallel.h"
int main(int argc, char* argv[]) {
string datafile = argv[1];
string partfile = argv[2];
string contfile = argv[3];
int N = atoi(argv[4]);
int Nrep = atoi(argv[5]);
string basename = argv[6];
SequenceAlignment* ali = new FileSequenceAl... |
c9cfdad7f941a057df5fab07a2a60ac72b5e1a9bdbbcab6564a688ace87642f5 | C++ | 1,271 | 51 | #include "QtGuiApplication4.h"
#include <QtWidgets>
#include <QtWidgets/QApplication>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include <QtCharts/QVXYModelMapper>
extern BOOL isRunning;
QtGuiApplication4::QtGuiApplication4(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
stopButton ... |
6c32905a2816b20884f2af51caa9d252696bd8b211959a0096c26ed7d839f2e5 | C++ | 1,272 | 31 | // Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// count_spikes
IntegerMatrix count_spikes(IntegerVector group_index, int num_groups, NumericVector spike_time, NumericVector timesteps);
RcppExport ... |
8ebaa9b3a347ed7eb1912f51a169ec7381495166c2ee7bc4262d18f32fde4d6c | C++ | 1,278 | 44 | #include <fstream>
#include <sstream>
#include <string>
#include <iostream>
#include <cmath>
#include <cfloat> // DBL_EPSILON
int main(int argc, char** argv)
{
if (argc != 2) {
std::cout << "Usage: test_evaluation <filename>\n";
return 3;
}
std::ifstream file(argv[1], std::ios::in);
i... |
05aa06aee00340d16ea947336592cfac911a9ad8ea8f50278fb1739855d10a6a | C++ | 1,280 | 70 | //-----------------------------------------------
// Copyright 2009 Wellcome Trust Sanger Institute
// Written by Jared Simpson (js18@sanger.ac.uk)
// Released under the GPL
//-----------------------------------------------
//
// STCommon.cpp - Implementation of basic data structures
//
#include "STCommon.h"
#include <... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.