text string | size int64 | token_count int64 |
|---|---|---|
#include "testsetup.hpp"
#include <py4dgeo/compute.hpp>
#include <py4dgeo/epoch.hpp>
#include <benchmark/benchmark.h>
using namespace py4dgeo;
static void
distances_benchmark(benchmark::State& state)
{
auto [cloud, corepoints] = ahk_benchcloud();
Epoch epoch(*cloud);
epoch.kdtree.build_tree(10);
std::vector... | 1,282 | 407 |
#pragma once
#include "storage/downloader_queue_universal.hpp"
#include "storage/downloading_policy.hpp"
#include "storage/queued_country.hpp"
#include "platform/downloader_defines.hpp"
#include "platform/http_request.hpp"
#include "platform/safe_callback.hpp"
#include <cstdint>
#include <functional>
#include <memor... | 3,820 | 1,082 |
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
// ============================================================
//
// BindingLog.inl
//
//
// Implements inlined methods of BindingLog
//
// ====================... | 917 | 310 |
#ifndef PDMATH_UTIL_HPP
#define PDMATH_UTIL_HPP
#include <cstdint>
#include <utility>
namespace pdm {
static constexpr uint8_t float_precision = 7;
static constexpr float float_epsilon = 1.0e-6f;
static float clamp(const float val, const float min, const float max) {
if(val > max) {
return max;
}
... | 1,014 | 371 |
#include <iostream>
#include "./../include/loadParams.hpp"
int main(int argc, char* argv[])
{
LoadParams *load;
load = new LoadParams();
float test_num = 0;
double test_double = 0;
//char test_error = 0;
std::string test_str;
bool test_bool = true;
load->get_param<float>("test3", test_num);
load->g... | 734 | 282 |
#include "gtest/gtest.h"
#include "library.h"
// #include "fff.h"
// DEFINE_FFF_GLOBALS;
// FAKE_VALUE_FUNC(int, library_func, int);
// FAKE_VOID_FUNC(another_func, int);
TEST(example, behaviour)
{
EXPECT_EQ(library_func(0),0);
EXPECT_EQ(library_func(1),1);
EXPECT_EQ(library_func(0),1);
EXPECT_EQ(library_func(5),... | 326 | 158 |
#include "SceneMenu.hpp"
#include "SceneOptions.hpp"
#include "SceneGame.hpp"
#include "../Game.hpp"
SceneMenu::SceneMenu(Scene*& currentScene) : currentScene(currentScene) {
}
SceneMenu::~SceneMenu() {
}
void SceneMenu::onUpdate(std::chrono::milliseconds deltaTime) {
}
void SceneMenu::onRender(Renderer* rendere... | 1,058 | 448 |
/*
* TtbarHypothesis.cpp
*
* Created on: Dec 4, 2010
* Author: lkreczko
*/
#include "../interface/TtbarHypothesis.h"
#include "../interface/ReconstructionModules/ReconstructionException.h"
//#include "../interface/ReconstructionModules/BasicNeutrinoReconstruction.h"
// #include <iostream>
// using namespace... | 5,258 | 2,387 |
#include <iostream>
void bitwise(int a, int b)
{
std::cout << "a and b: " << (a & b) << '\n'; // Note: parentheses are needed because & has lower precedence than <<
std::cout << "a or b: " << (a | b) << '\n';
std::cout << "a xor b: " << (a ^ b) << '\n';
std::cout << "not a: " << ~a << '\n';
std::... | 674 | 248 |
/*
Copyright 2014 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/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... | 6,145 | 2,034 |
#include "depthai/pipeline/node/EdgeDetector.hpp"
#include "spdlog/fmt/fmt.h"
namespace dai {
namespace node {
EdgeDetector::EdgeDetector(const std::shared_ptr<PipelineImpl>& par, int64_t nodeId)
: Node(par, nodeId), rawConfig(std::make_shared<RawEdgeDetectorConfig>()), initialConfig(rawConfig) {
inputs = {&... | 1,152 | 381 |
//-------------------------------------------------------------
// Based on Variant.cc in the Physics eXtension Library (PXL) -
// http://vispa.physik.rwth-aachen.de/ -
// Licensed under a LGPL-2 or later license -
//-------------------------------------------------------------
... | 16,867 | 7,959 |
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include "FibHeap_sp.h"
using namespace fib_heap;
using namespace std;
#define NotAVertex -1
#define MaxVertexNum 10 /* maximum number of vertices */
#define INFI 10000
typedef int Vertex; /* vertices are numbered from 0 to MaxVertexNum-1 */
typedef... | 2,449 | 1,102 |
/*!
******************************************************************************
*
* \file
*
* \brief Header file containing SIMT distrubuted register abstractions for
* CUDA
*
******************************************************************************
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | 26,711 | 8,973 |
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/**
* @file
* Array container with std::array compatible interface.
*/
#ifndef LIBPMEMOBJ_CPP_ARRAY_HPP
#define LIBPMEMOBJ_CPP_ARRAY_HPP
#include <algorithm>
#include <functional>
#include <libpmemobj++/container/detail/contigu... | 19,250 | 7,236 |
// Two Sum II Input array is sorted
#include <leetcode.h>
class Solution {
public:
vector<int> twoSum(vector<int>& numbers, int target) {
vector<int> ans;
for (int i = 0; i < numbers.size(); i++)
{
if (i != 0 && numbers[i] == numbers[i-1]) {
continue;
}
if (numbers[i] > target)... | 664 | 301 |
#include "dialog.h"
#include "ui_dialog.h"
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);
connect(ui->pushButton, SIGNAL(clicked(bool)), this, SLOT(clicked(bool)));
}
void Dialog::displayMessage(const QString& message)
{
ui->textEdit->append(message);
}
... | 664 | 238 |
#include <sltbench/impl/DoNotOptimize.h>
namespace sltbench {
namespace priv {
void empty_function(volatile const char*)
{
}
} // namespace priv
} // namespace sltbench
| 174 | 64 |
#include <gmock/gmock.h>
#include <azul/async/StaticThreadPool.hpp>
#include <thread>
class StaticThreadPoolTestFixture : public testing::Test
{
};
TEST_F(StaticThreadPoolTestFixture, Execute_EmptyTask_FutureReady)
{
azul::async::StaticThreadPool threadPool(1);
auto result = threadPool.Execute([](){});
... | 4,172 | 1,478 |
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <stdlib.h>
#include <unistd.h>
#include "server.h"
char mqtt_cmd[] = "mosquitto_pub -d -h 192.168.0.11 -t /sensor/data -m '{\"serialNumber\":\"SN-0002\",\"intrusion_cou... | 3,949 | 1,544 |
//==============================================================
// Copyright (C) 2004 Danny Chapman
// danny@rowlhouse.freeserve.co.uk
//--------------------------------------------------------------
//
/// @file characterobject.hpp
//
//=============================... | 3,065 | 1,025 |
/*
* (C) Copyright 2021 Met Office UK
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/
#include "oops/util/FloatCompare.h"
#include "oops/util/missingValues.h"
#include "ufo/profile/ObsProfileAverageData.h"
#... | 6,593 | 2,072 |
#include <CppUTest/TestHarness.h>
extern "C" {
#include "sharp.h"
//#include "mem_map.h"
}
TEST_GROUP(Proj1Test)
{
void setup()
{
}
void teardown()
{
}
};
TEST(Proj1Test, sharp_read){
sharp_init(0, 1); // Configuring ADC to use 1 sample
// With RE8 = 0, distance must be 0.
PORTEb... | 922 | 418 |
/*
Copyright (c) 2005-2019, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... | 3,717 | 1,254 |
#include "orderbook.h"
#include "hawkes.h"
#include "user.h"
#include <cassert>
#include <iostream>
#define name_of_side \
std::string side = (_direction == OrderDirection::ask) ? "ask" : "bid"
using namespace std::chrono_literals;
OrderDirection opposite(Ord... | 17,437 | 5,841 |
/*----------------------------------------------------------------------------*
| This file is part of WinDEU, the port of DEU to Windows. |
| WinDEU was created by the DEU team: |
| Renaud Paquay, Raphael Quinet, Brendon Wyber and others... |
... | 10,121 | 3,801 |
//
// icloud.hpp
// blockerd
//
// Created by Jozef on 05/06/2020.
//
#ifndef icloud_hpp
#define icloud_hpp
#include "base.hpp"
struct ICloud : public CloudProvider
{
ICloud(const BlockLevel Bl, const std::vector<std::string> &Paths) {
id = CloudProviderId::ICLOUD;
bl = Bl;
paths = Pat... | 531 | 198 |
#include <catch2/catch.hpp>
#include "../../log/Logger.h"
#include "../System.h"
using namespace rdm;
// TODO linux
//TEST_CASE("System", "getProcessorCount") {
// uint64_t min = 1;
// uint64_t max = 1024;
// ASSERT_LE(min, System::getProcessorCount());
// ASSERT_GE(max, System::getProcessorCount());
//
... | 3,298 | 1,245 |
/*
* Copyright 2020 The Chromium OS 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 "cros-camera/common.h"
#include <base/notreached.h>
#include <utility>
#include "common/libcamera_connector/camera_module_callbacks.h... | 1,588 | 518 |
#include <google/protobuf/text_format.h>
#include <cstring>
#include "flutter/cpp/backends/external.h"
#include "flutter/cpp/proto/backend_setting.pb.h"
#include "main.h"
extern "C" struct dart_ffi_backend_match_result *dart_ffi_backend_match(
const char *lib_path, const char *manufacturer, const char *model) {
... | 1,780 | 605 |
#include "Math.hpp"
Vector2 operator*(float s, const Vector2& v) { return { v.x * s, v.y * s }; }
Vector3 operator*(float s, const Vector3& v) { return { v.x * s, v.y * s, v.z * s }; } | 185 | 75 |
#include "PhysicsConstraint.h"
namespace gameplay
{
inline float PhysicsConstraint::getBreakingImpulse() const
{
GP_ASSERT(_constraint);
return _constraint->getBreakingImpulseThreshold();
}
inline void PhysicsConstraint::setBreakingImpulse(float impulse)
{
GP_ASSERT(_constraint);
_const... | 632 | 186 |
/***************************************************************************
* Copyright (C) by GFZ Potsdam *
* *
* You can redistribute and/or modify this program under the *
* terms o... | 2,146 | 712 |
#include "marker/marker.h"
#include "data/tileData.h"
#include "gl/texture.h"
#include "scene/dataLayer.h"
#include "scene/drawRule.h"
#include "scene/scene.h"
#include "style/style.h"
#include "view/view.h"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtx/transform.hpp"
namespace Tangram {
Marker::Marker(... | 4,550 | 1,655 |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDateTime> //biblioteca para trabalhar com da e hora
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
tempo = new QTimer(this); //instanciando o objeto 'temp... | 849 | 283 |
#include <omega-common/common.h>
#include <iostream>
using namespace OmegaCommon;
static Map<String,String> srcs;
inline void extractSources(StrRef lineBuffer){
std::string name,src;
auto line_it = lineBuffer.begin();
while(line_it != lineBuffer.end()){
auto & c =*line_it;
if(c == '=') {... | 2,551 | 878 |
/*************************************************************************
* Copyright (C) [2019] by Cambricon, Inc. 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 a... | 7,832 | 3,115 |
#ifndef STAN_LANG_AST_CHOLESKY_FACTOR_COV_BLOCK_TYPE_HPP
#define STAN_LANG_AST_CHOLESKY_FACTOR_COV_BLOCK_TYPE_HPP
#include <stan/lang/ast/node/expression.hpp>
namespace stan {
namespace lang {
/**
* Cholesky factor for covariance matrix block var type.
*
* Note: no 1-arg constructor for square matrix;
* both ro... | 982 | 350 |
#pragma once
#include <sal.h>
#include <codeanalysis/sourceannotations.h> // TEMPORARY INCLUDE
#include <Windows.h>
namespace WPFUtils {
LONG ReadRegistryString(__in HKEY rootKey, __in LPCWSTR keyName, __in LPCWSTR valueName,
__out LPWSTR value, size_t cchMax);
HRESULT G... | 400 | 140 |
#include <cmath>
#include <eepp/math/transform.hpp>
namespace EE { namespace Math {
const Transform Transform::Identity;
Transform::Transform() {
// Identity matrix
mMatrix[0] = 1.f;
mMatrix[4] = 0.f;
mMatrix[8] = 0.f;
mMatrix[12] = 0.f;
mMatrix[1] = 0.f;
mMatrix[5] = 1.f;
mMatrix[9] = 0.f;
mMatrix[13] = 0.... | 6,283 | 2,780 |
// ____ ______ __
// / __ \ / ____// /
// / /_/ // / / /
// / ____// /___ / /___ PixInsight Class Library
// /_/ \____//_____/ PCL 02.01.01.0784
// ----------------------------------------------------------------------------
// Standard ImageIntegration Process Module Version 01.09.04.0322
// ---... | 10,721 | 3,418 |
// Copyright 2019- <dim-lang>
// Apache License Version 2.0
#include "infra/Files.h"
#include "infra/Log.h"
#include <cerrno>
#include <cstdio>
#define BUF_SIZE 4096
namespace detail {
FileInfo::FileInfo(const Cowstr &fileName)
: fileName_(fileName), fp_(nullptr) {}
FileInfo::~FileInfo() {
if (fp_) {
std... | 3,468 | 1,320 |
/*
* sdcard.c
*
* Created on: Sep 8, 2021
* Author: Danylo Ulianych
*/
#include <dirent.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <sys/stat.h>
#include "esp_log.h"
#include "esp_err.h"
#include "esp32-hal-log.h"
#include "bsp_log.h"
#include "sdcard.h"
#incl... | 6,303 | 2,773 |
/*!
force-random-dither.cpp -- Generate a dither matrix using the force-random-dither method from:
W. Purgathofer, R. F. Tobler and M. Geiler.
"Forced random dithering: improved threshold matrices for ordered dithering"
Image Processing, 1994. Proceedings. ICIP-94., IEEE International Conference,
Austin, TX, 1... | 3,146 | 1,351 |
/*
*
* Copyright (C) 1994-2010, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
*
* OFFIS e.V.
* R&D Division Health
* Escherweg 2
* D-26121 Oldenburg, Germany
*
*
* Module: dcmdata
*
* Author: Marco Ei... | 1,656 | 614 |
// slang-emit-precedence.cpp
#include "slang-emit-precedence.h"
namespace Slang {
#define SLANG_OP_INFO_EXPAND(op, name, precedence) {name, kEPrecedence_##precedence##_Left, kEPrecedence_##precedence##_Right, },
/* static */const EmitOpInfo EmitOpInfo::s_infos[int(EmitOp::CountOf)] =
{
SLANG_OP_INFO(SLANG_OP_INF... | 355 | 149 |
#include "I2CBuffer.h"
| 27 | 16 |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "runtime/binaryen/module/wasm_module_instance_impl.hpp"
#include <binaryen/wasm.h>
namespace kagome::runtime::binaryen {
WasmModuleInstanceImpl::WasmModuleInstanceImpl(
std::shared_ptr<wasm::Module>... | 988 | 326 |
#pragma once
#include "Record.hpp"
namespace oless {
namespace excel {
namespace records {
class ContinueRecord : public Record {
public:
ContinueRecord(IRecordParser* p, unsigned short type, std::vector<uint8_t> data) : Record(type, data) {
Record* r = p->GetPrevRecordNotOfType(type);
r->Dat... | 575 | 241 |
#include "math.h"
#include "mex.h"
#define MAX(a, b) (a > b ? a:b)
#define MIN(a, b) (a > b ? b:a)
void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
{
// Check for proper number of input and output arguments
//nargineqchk(nrhs, 2);
//nargouteqchk(nlhs, 2);
// Check for i... | 1,955 | 901 |
#ifdef PEGASUS_OS_AIX
#ifndef __UNIX_VLANENDPOINTSETTINGDATA_PRIVATE_H
#define __UNIX_VLANENDPOINTSETTINGDATA_PRIVATE_H
#endif
#endif
| 140 | 76 |
/// @file
#include "hwlib.hpp"
#include "DS3231.hpp"
/// \brief
/// Test
/// \details
/// This program tests most of the functionality of the DS3231 Real Time clock.
int main( void ){
namespace target = hwlib::target;
auto scl = target::pin_oc( target::pins::d8 );
auto sda = target::pin_oc( target::pins::d9 );... | 11,814 | 5,275 |
//*********************************************************
// IPF_Setup.cpp - initialize the IPF classes
//*********************************************************
#include "PopSyn.hpp"
//---------------------------------------------------------
// IPF_Setup
//-------------------------------------------------------... | 1,047 | 338 |
/**
* Copyright (c) 2022 Suilteam, Carter Mbotho
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the MIT license. See LICENSE for details.
*
* @author Carter
* @date 2022-03-12
*/
#include "suil/utils/console.hpp"
namespace suil::Console {
void cprint(uin... | 2,799 | 1,015 |
/**
* $File: JCSUEGameModeBase.cpp $
* $Date: 2017-03-01 $
* $Revision: $
* $Creator: Jen-Chieh Shen $
* $Notice: See LICENSE.txt for modification and distribution information
* Copyright (c) 2017 by Shen, Jen-Chieh $
*/
#include "JCSUEGameModeBase.h"
#include "JCSUE.h"
| 297 | 123 |
#include <sstream>
#include "CSE.h"
#include "CodeGen_Internal.h"
#include "CodeGen_Posix.h"
#include "ConciseCasts.h"
#include "Debug.h"
#include "IREquality.h"
#include "IRMatch.h"
#include "IROperator.h"
#include "IRPrinter.h"
#include "LLVM_Headers.h"
#include "Simplify.h"
#include "Substitute.h"
#include "Util.h"... | 71,325 | 28,897 |
/*
* Copyright (C) 2009-2021 Intel Corporation.
* SPDX-License-Identifier: MIT
*/
/*! @file
* This application verifies that pin tool can correctly emulate exceptions on behalf of the application
*/
#include <string>
#include <iostream>
#include <fpieee.h>
#include <excpt.h>
#include <float.h>
#if defined(TARGE... | 6,051 | 1,876 |
#include "Cylinder.h"
#include "core/world.h"
#include "core/application.h"
#include "core/components/model.h"
#include "platform/resource.h"
#include "platform/renderer.h"
#include "core/components/fps_controller.h"
#include "core/components/directional_light.h"
#include <glm/gtc/quaternion.hpp>
namespace pronto
{
... | 734 | 243 |
/*
* Copyright (c) 2018, NVIDIA CORPORATION. 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 co... | 7,086 | 2,084 |
/**
* Copyright (c) 2018, University Osnabrück
* 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 li... | 3,680 | 1,238 |
// /* Slightly modified versions of the "polint" routine from
// * Press, William H., Brian P. Flannery, Saul A. Teukolsky and
// * William T. Vetterling, 1986, "Numerical Recipes: The Art of
// * Scientific Computing" (Fortran), Cambrigde University Press,
// * pp. 80-82.
// */
//
// #include <stdio.h>
// ... | 2,558 | 978 |
#pragma once
#include "schemas/ev42_events_generated.h"
// WARNING:
// the schema has to match to the serialise template type
// this must change
namespace SINQAmorSim {
/// \author Michele Brambilla <mib.mic@gmail.com>
/// \date Thu Jul 28 14:32:29 2016
class FlatBufferSerialiser {
public:
FlatBufferSerialiser... | 3,991 | 1,281 |
// MacroCommandTestVO.hpp
// PureMVC_C++ Test suite
//
// PureMVC Port to C++ by Tang Khai Phuong <phuong.tang@puremvc.org>
// PureMVC - Copyright(c) 2006-2011 Futurescale, Inc., Some rights reserved.
// Your reuse is governed by the Creative Commons Attribution 3.0 License
//
#if !defined(MACRO_COMMAND_T... | 910 | 321 |
#include <bits/stdc++.h>
using namespace std;
template <typename T>
using V = vector<T>;
typedef long double ld;
typedef long long ll;
#define FO(i, N) for (int (i) = 0; (i) < (N); ++(i))
#define FOll(i, N) for (ll (i) = 0; (i) < (N); ++(i))
#define READALL(c) for (auto &e : c) { cin >> e; }
#define PRINTALL(c) for... | 3,289 | 1,807 |
/*
* Copyright 2013-2021 Will Mason
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | 1,413 | 469 |
#ifndef GODOT_CPP_TEXTURELAYERED_HPP
#define GODOT_CPP_TEXTURELAYERED_HPP
#include <gdnative_api_struct.gen.h>
#include <stdint.h>
#include <core/CoreTypes.hpp>
#include <core/Ref.hpp>
#include "Image.hpp"
#include "Resource.hpp"
namespace godot {
class Image;
class TextureLayered : public Resource {
struct ___m... | 1,995 | 812 |
#include "ProgramState.h"
using namespace std;
ProgramState::ProgramState(int numLines){
m_numLines = numLines;
m_nextLine = 1;
m_line = 0;
m_over = 0;
}
void ProgramState::updateVal(std::string var, int val){
if (m_varMap.count(var) > 0){
m_varMap[var] = val;
} else {
m_varMap.insert(std::pair<string, int>... | 1,273 | 507 |
/**
** Copyright (C) Manas Kamal Choudhury 2021
**
** sysmem.cpp -- System Memory Callbacks
**
** /PORJECT - Aurora {Xeneva}
** /AUTHOR - Manas Kamal Choudhury
**
**/
#ifdef ARCH_X64
#include <arch\x86_64\mmngr\vmmngr.h>
#include <arch\x86_64\thread.h>
#include <_null.h>
#include <stdio.h>
#endif
void m... | 1,336 | 676 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005 INRIA
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed... | 2,335 | 933 |
#include <iostream>
using namespace std;
int myStrLen(const char *str)
{
int tam;
for (tam = 0; str[tam] != '\0'; tam++);
return tam;
}
char* myStrCat(const char *dest, const char *orig)
{
char *resultado = new char[myStrLen(dest) + myStrLen(orig) + 1];
int i = 0;
for (int j = 0; dest[j] != '\0'; j++, i++)... | 662 | 304 |
#include <boost/test/unit_test.hpp>
#include <boost/test/data/test_case.hpp>
#include <boost/mpl/list.hpp>
#include <binary/converters/little_endian_converter.hpp>
namespace mikodev::binary::tests::converters::little_endian_converter_tests
{
namespace mk = mikodev::binary;
namespace mkc = mikodev::binary::con... | 1,424 | 540 |
#include <KrisLibrary/Logger.h>
#include "Line3D.h"
#include "Segment3D.h"
#include "clip.h"
#include "misc.h"
#include "errors.h"
#include <iostream>
using namespace Math3D;
using namespace std;
bool Line3D::Read(File& f)
{
if(!source.Read(f)) return false;
if(!direction.Read(f)) return false;
return true;
}
bool... | 9,613 | 4,512 |
#ifndef INCLUDED_STDDEFX
#include "stddefx.h"
#define INCLUDED_STDDEFX
#endif
#ifndef INCLUDED_CALC_MEMORYEXCHANGEITEMSTRING
#include "calc_MemoryExchangeItemString.h"
#define INCLUDED_CALC_MEMORYEXCHANGEITEMSTRING
#endif
// External headers.
#ifndef INCLUDED_CSTRING
#include <cstring>
#define INCLUDED_CSTRING
#endif
... | 1,996 | 560 |
#include <iostream>
#include <vector>
#include <cmath>
#include <opencv2/opencv.hpp>
#include <opencv2/viz.hpp>
#include <opencv2/viz/widgets.hpp>
#include "RadarControl.h"
#include <thread>
#include <future>
#include <unistd.h>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/con... | 8,556 | 2,735 |
/*
*
* Second Algorithm to test image
* against known dataset
*
*/
#include "alg_two.hpp"
Algorithm_Two::Algorithm_Two(vector<Mat> users, vector<int> labels)
{
model = createFisherFaceRecognizer();
model->train(users, labels);
}
int Algorithm_Two::compare(Mat face)
{
int predictedLabel = -1;... | 731 | 234 |
#include "osrm/match_parameters.hpp"
#include "osrm/nearest_parameters.hpp"
#include "osrm/route_parameters.hpp"
#include "osrm/table_parameters.hpp"
#include "osrm/trip_parameters.hpp"
#include "osrm/coordinate.hpp"
#include "osrm/engine_config.hpp"
#include "osrm/json_container.hpp"
#include "osrm/osrm.hpp"
#include... | 3,528 | 1,181 |
#if COMPILATION_INSTRUCTIONS
mpicxx -O3 -std=c++14 -Wall -Wfatal-errors $0 -o $0x.x && time mpirun -np 4s $0x.x $@ && rm -f $0x.x; exit
#endif
#define BOOST_MPI3_DISALLOW_AUTOMATIC_POD_COMMUNICATION
#include "alf/boost/mpi3/main.hpp"
#include "alf/boost/mpi3/communicator.hpp"
namespace mpi3 = boost::mpi3;
using std:... | 723 | 359 |
//---------------------------------------------------------------------------//
//!
//! \file MonteCarlo_DecoupledPhotonProductionReactionACEFactory.hpp
//! \author Eli Moll
//! \brief Decoupled photon production reaction factory class declaration
//!
//---------------------------------------------------------------... | 6,801 | 2,045 |
#include <GraphicsLib/Graphics/GPUResource/ShaderResource/TextureSampler/Components/TextureSamplerDescriptor.hpp>
namespace cg
{
TextureSamplerDescriptor::TextureSamplerDescriptor() noexcept
{
filter = TextureFilter::point;
addressU = TextureAddressMode::clamp;
addressV = TextureAddressMode::clamp;
addre... | 440 | 166 |
/*
* Copyright (c) 2019, Intel Corporation
* 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 con... | 2,907 | 1,078 |
/*
* Copyright (C) 2020 Southern Storm Software, Pty Ltd.
*
* 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 rights to use, copy, ... | 23,958 | 12,186 |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
using nam... | 966 | 284 |
//
// @Author: Zhiquan Wang
// @Date: 2/29/20.
// Copyright (c) 2020 Zhiquan Wang. All rights reserved.
//
#include <Surface.h>
#include "Surface.h"
#include <iostream>
GLuint Surface::counter = 0;
Surface::Surface():id(counter++) {
}
Surface::Surface(glm::vec4 ids):id(counter++),indices(ids){
}
bool Surface::is... | 1,131 | 475 |
#include <sigpack.h>
using namespace arma;
using namespace sp;
int main()
{
int r=480, c=640;
mat x(r,c);
cx_mat X(r,c);
clock_t tic;
FFTW X_2d(r,c, FFTW_MEASURE);
x.randn();
#if 1
// X_2d.export_wisdom_fft("wisd_fft.txt");
// X_2d.import_wisdom_file("wisd_fft.txt");
std::string... | 2,948 | 1,913 |
#include "dpf.h"
#include "hashdatastore.h"
#include <chrono>
#include <iostream>
void benchEvalFull(size_t N, size_t iter) {
std::chrono::duration<double> buildT, evalT, answerT;
buildT = evalT = answerT = std::chrono::duration<double>::zero();
std::cout << "EvalFull, " << iter << " iterations" << std::e... | 3,883 | 1,464 |
#include <ros/ros.h>
#include <std_msgs/Bool.h>
#include <std_msgs/Byte.h>
#include <std_msgs/Char.h>
#include <std_msgs/Duration.h>
#include <std_msgs/Time.h>
#include <std_msgs/Int16.h>
#include <std_msgs/Int32.h>
#include <std_msgs/Int64.h>
#include <std_msgs/Int8.h>
#include <std_msgs/Header.h>
#include <std_msgs/U... | 3,400 | 1,553 |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/passwords/manage_passwords_state.h"
#include <iterator>
#include <memory>
#include <utility>
#include <vector>
#include "bas... | 28,271 | 9,011 |
// Copyright (C) 2020 Jérôme Leclercq
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_TRIANGLEITERATOR_HPP
#define NAZARA_TRIANGLEITERATOR_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Ut... | 924 | 378 |
/*----------------------------------------------------------------------------------
Tines - Time Integrator, Newton and Eigen Solver - version 1.0
Copyright (2021) NTESS
https://github.com/sandialabs/Tines
Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
Under the terms of Contract... | 3,728 | 1,286 |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <deque>
using namespace std;
int main() {
int n_cases;
cin >> n_cases;
for (int i_case = 0; i_case < n_cases; i_case++) {
string s;
cin >> s;
deque<char> d;
d.push_front(s[0]);
for (int i = 1; i < s.size(); i+... | 979 | 400 |
# include <bits/stdc++.h>
# define ll long long
# define all(x) x.begin(), x.end()
# define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
# define ten6 (1e6+1.5)
using namespace std;
ll dp [(int)ten6]{0};
vector <int> c;
ll solve (int x){
if (x==0) return 0;
if (dp[x]) return dp[x];
ll... | 709 | 321 |
/**
* @file softmax_regression_impl.hpp
* @author Siddharth Agrawal
*
* Implementation of softmax regression.
*/
#ifndef __MLPACK_METHODS_SOFTMAX_REGRESSION_SOFTMAX_REGRESSION_IMPL_HPP
#define __MLPACK_METHODS_SOFTMAX_REGRESSION_SOFTMAX_REGRESSION_IMPL_HPP
// In case it hasn't been included yet.
#include "softmax... | 5,225 | 1,557 |
#include "InstanceView.h"
namespace instreclib {
namespace reconstruction {} // namespace reconstruction
} // namespace instreclib
| 136 | 38 |
// Copyright 2014 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 "components/sync/base/invalidation_helper.h"
#include <string>
namespace syncer {
TopicSet ModelTypeSetToTopicSet(ModelTypeSet model_types) {
... | 602 | 197 |
#include "Visualization.h"
#include <SFML/Graphics/CircleShape.hpp>
#include <SFML/Window/Event.hpp>
#include <memory>
#include <thread>
#define GREEN sf::Color(0,200,0,255);
Visualization::Visualization(const sf::Vector2f & preferedWindowSize, const sf::Vector2f & minCoord,
const sf::Vector2f & maxCoord, const std... | 7,546 | 2,729 |
#include <experimental/filesystem>
#include "SCAlgorithm.hpp"
#include "simulation.hpp"
#include "timing.hpp"
#include "commonFunctions.hpp"
using fmt::format;
using fmt::print;
namespace fs = std::experimental::filesystem;
fs::path getOutputPath() { return fs::path("..") / "output" / Model::getModelName(); }
/**
... | 2,813 | 1,015 |
#include "example.hpp"
#include <tinyrefl/api.hpp>
#include "example.hpp.tinyrefl"
namespace my_namespace
{
std::ostream& operator<<(std::ostream& os, const MyClass::Enum value)
{
switch(value)
{
case MyClass::Enum::A:
return os << "A";
case MyClass::Enum::B:
return os << "B";
case... | 589 | 201 |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkAngleRepresentation.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This so... | 7,001 | 2,268 |
#include <iostream>
#include <list>
#include <fstream>
using namespace std;
class Stavka
{
private:
char naziv[30];
int kolicina;
public:
void ispis();
Stavka unos();
void promjeni(string, list<Stavka> &);
};
void Stavka::ispis()
{
cout << "\nNaziv proizvoda: " << naziv << "\nKolicina proizvo... | 3,152 | 1,156 |
//misaka and rin will carry me to cm
#include <iostream>
#include <cstdio>
#include <cstring>
#include <utility>
#include <cassert>
#include <algorithm>
#include <vector>
#include <array>
#include <tuple>
#define ll long long
#define lb long double
#define sz(vec) ((int)(vec.size()))
#define all(x) x.begin(), x.end()... | 2,841 | 1,551 |