text stringlengths 3.08k 22k |
|---|
// addrspace.cc
// Routines to manage address spaces (executing user programs).
//
// In order to run a user program, you must:
//
// 1. link with the -N -T 0 option
// 2. run coff2noff to convert the object file to Nachos format
// (Nachos object code format is essentially just a simpler
// version of the UNIX execu... |
/*
* scanCONTROL Linux SDK - example code
*
* MIT License
*
* Copyright © 2017-2018 Micro-Epsilon Messtechnik GmbH & Co. KG
*
* 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 ... |
/*! @file Adafruit_ICM20948.cpp
*/
#include "Arduino.h"
#include <Wire.h>
#include "Adafruit_ICM20948.h"
#include "Adafruit_ICM20X.h"
/*!
* @brief Instantiates a new ICM20948 class!
*/
Adafruit_ICM20948::Adafruit_ICM20948(void) {}
/*!
* @brief Sets up the hardware and initializes I2C
* @param i2c_... |
#include "CEncoder.h"
#include <chrono>
#include <exception>
#include <memory>
#include <sstream>
#include <stdexcept>
#include <stdlib.h>
#include <string>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <iostream>
#include "ALVR-common/packet_types.h"
#include "alvr_se... |
#include <vector>
#include <algorithm>
#include <memory>
#include <array>
#include <iostream>
#include <cassert>
#include <math.h>
#include <random>
#include <string>
#include <fstream>
typedef double F;
const int Ndim = 3;
/* A simple node struct that contains a key and a fixed number of children,
typically Nc... |
/*! \file */
/* ************************************************************************
* Copyright (c) 2019-2021 Advanced Micro Devices, Inc.
*
* 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 S... |
/*
* Copyright (c) 2007-2009 <NAME> http://www.gphysics.com
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose... |
#include "SceneCreateSample.h"
#include "SamplesGame.h"
#if defined(ADD_SAMPLE)
ADD_SAMPLE("Graphics", "Scene Creation", SceneCreateSample, 15);
#endif
static Mesh* createCubeMesh(float size = 1.0f)
{
float a = size * 0.5f;
float vertices[] =
{
-a, -a, a, 0.0, 0.0, 1.0, 0.0, 0.0,
... |
#include "headers/parser.h"
#include "headers/model.h"
#include "headers/group.h"
#include "headers/tinyxml2.h"
#include "headers/scale.h"
#include "headers/rotation.h"
#include "headers/translation.h"
#include "headers/catmull.h"
#include "headers/texture.h"
#include "headers/light.h"
#include "headers/directionalLigh... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef _PTHREAD_ENC_
#include "thread.h"
#endif
#include <openenclave/edger8r/enclave.h>
#include <openenclave/enclave.h>
#include <openenclave/internal/tests.h>
#include <openenclave/internal/thread.h>
#include <stdio.h>
... |
#include "trt_modulated_deform_conv.hpp"
#include <assert.h>
#include <chrono>
#include "trt_serialize.hpp"
void ModulatedDeformConvForwardCUDAKernelLauncher_float(
const float *input, const float *weight, const float *bias,
const float *offset, const float *mask, float *output, void *workspace,
int bat... |
/****************************************************************************/
/****************************** demFFT.cpp ****************************/
/****************************************************************************/
/****************************************************************************/
// ... |
#include "nsProtoSimAgent.h"
#include "ip.h" // for ns-2 hdr_ip def
#include "flags.h" // for ns-2 hdr_flags def
// (TBD) should "NsProtoSimAgent" specify a different packet type?
NsProtoSimAgent::NsProtoSimAgent()
: Agent(PT_UDP), scheduler(NULL)
{
scheduler = &Scheduler::instance();
}
NsProtoSimAgent::~NsPr... |
/**
* @brief Log manager.
*
* This file is part of HostLogger project.
*
* Copyright (c) 2018 YADRO
*
* 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/li... |
//===- FunctionImplementation.cpp - Utilities for function-like ops -------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
/*
Copyright (c) 2013, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the follo... |
#include <gtest/gtest.h>
#include <rai/core_test/test_util.hpp>
#include <rai/common/util.hpp>
TEST(CommonUtil, CheckUtf8)
{
bool ctrl;
ASSERT_EQ(false, rai::CheckUtf8("Raicoin", ctrl));
ASSERT_EQ(false, ctrl);
ASSERT_EQ(false, rai::CheckUtf8("κόσμε", ctrl));
ASSERT_EQ(false, ctrl);
std::vecto... |
#include "BitNucVector.h"
#include "stdlib.h"
#include <vector>
#include <string>
#include <set>
#include <iostream>
#include <fstream>
#include <map>
#include <sstream>
#include <numeric>
#include <pthread.h>
#include <semaphore.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
//0, ... |
/*!
* @file stream.cpp
* OVERLORD streaming driver.
* Supports loading a file directly to the EE, or loading chunks of a chunked file.
*/
#include <cstring>
#include "stream.h"
#include "game/sce/iop.h"
#include "game/common/str_rpc_types.h"
#include "game/common/play_rpc_types.h"
#include "game/overlord/isocommon... |
#include "mmitssPriorityRequestServerApp.hpp"
#include <getopt.h>
#include <Poco/Dynamic/Struct.h>
#include <Poco/Dynamic/Var.h>
#include <Poco/JSON/Object.h>
#include <Poco/JSON/Parser.h>
#include <chrono>
#include <cstdio>
#include <exception>
#include <iostream>
#include <sstream>
#include <vector>
#include "facil... |
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<cstdlib>
#include<cstring>
#include<iomanip>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std ;
class Graph{
typedef struct sP{ // student pair
char sid1[10] ; // 1st sid: sender
char sid... |
#include "graph.h"
#include <algorithm>
#include <fstream>
#include <iostream>
#include <list>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include "edge.h"
/**
* This function creates an instance of the graph object with uninitialized
* parameters
**/
Graph::Graph() {... |
#include "MyGLCanvas.h"
#include "cuda_wrapper_implementation.h"
#include "xml_generator.h"
#define NUM_OPENGL_LIGHTS 8
using namespace std;
MyGLCanvas::MyGLCanvas(int x, int y, int w, int h, const char *l) : Fl_Gl_Window(x, y, w, h, l)
{
mode(FL_RGB | FL_ALPHA | FL_DEPTH | FL_DOUBLE);
width = screenWidth... |
#include "Matrix.h"
#include "pchheader.h"
#include "Quaternion.h"
#include "Vector.h"
Matrix Matrix::Identity() {
const Matrix identity = Matrix({
1.0f,
0.0f,
0.0f,
0.0f,
0.0f,
1.0f,
0.0f,
0.0f,
0.0f,
0.0f,
1.0f,
0.0f... |
#include "PushRtmp.h"
#include "pushCommon.h"
#include <errno.h>
PushRtmp::PushRtmp()
:m_hasRtmpThread(false)
, m_curFrame(nullptr)
, m_hasFrame(false)
, m_headerSuccess(false)
, m_rtmpFailedTimes(0)
, m_hasInitPushRtmpParam(false)
, m_startPushRtmp(false)
{
//注册所有的编解码器
avcodec_reg... |
#include <stdlib.h>
#include <GL/gl.h>
#include <Geo/mesh.h>
#include <Gui/opengl.h>
#include <Kin/kin.h>
#include <Kin/taskMaps.h>
#include <Kin/frame.h>
#include <Geo/pairCollision.h>
#include <Kin/kin_swift.h>
#include <Kin/TM_QuaternionNorms.h>
extern bool orsDrawWires;
//========================================... |
// disk.cc
// Routines to simulate a physical disk device; reading and writing
// to the disk is simulated as reading and writing to a UNIX file.
// See disk.h for details about the behavior of disks (and
// therefore about the behavior of this simulation).用于模拟物理磁盘设备的例程;对磁盘的读写模拟为对UNIX文件的读写。有关磁盘行为的详细信息(以及有关此模拟行为的详细信息),请... |
// palette.cpp
#include "stdafx.h"
#include "dle-xp-res.h"
#include <string.h>
#include "define.h"
#include "types.h"
#include "dle-xp.h"
#include "mine.h"
#include "global.h"
#include "cfile.h"
#include "palette.h"
HGLOBAL hPalette;
CPaletteManager paletteManager;
//----------------------------------------------... |
/*
* fam_SG_ATL.cpp
* Copyright (c) 2021 Hewlett Packard Enterprise Development, LP. All rights
* reserved. Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copy... |
#include <unistd.h>
#include <iostream>
#include <mutex>
#include <bitset>
#include <thread>
#include <vector>
#include <chrono>
#include <zeromq/zmq.hpp>
#include <pcapplusplus/SystemUtils.h>
#include <pcapplusplus/DpdkDeviceList.h>
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
#include <bo... |
#include "polish.h"
#include "lin_alg.h"
#include "util.h"
#include "auxil.h"
#include "lin_sys.h"
#include "proj.h"
#include "error.h"
/**
* Form reduced matrix A that contains only rows that are active at the
* solution.
* Ared = vstack[Alow, Aupp]
* Active constraints are guessed from the primal and dual soluti... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "printing/pdf_metafile_skia.h"
#include <stddef.h>
#include <stdint.h>
#include "base/containers/hash_tables.h"
#include "base/files/file_u... |
#include "application_solar.hpp"
#include "launcher.hpp"
#include "utils.hpp"
#include "shader_loader.hpp"
#include "model_loader.hpp"
#include <glbinding/gl/gl.h>
// use gl definitions from glbinding
using namespace gl;
//dont load gl bindings from glfw
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <... |
// Copyright (C) 2010 - 2013 by <NAME>, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and The University
// of Manchester.
// All rights reserved.
// Copyright (C) 2008 - 2009 by <NAME>, Virginia Tech Intellectual
// Properties, Inc., EML Research, gGmbH, University of Heidelberg,
// and Th... |
// Copyright (c) 2012-2021 CIYAM Developers
//
// Distributed under the MIT/X11 software license, please refer to the file license.txt
// in the root project directory or http://www.opensource.org/licenses/mit-license.php.
#ifdef PRECOMPILE_H
# include "precompile.h"
#endif
#pragma hdrstop
#ifndef HAS_PRECOMPILED_ST... |
#include "png.h"
#include <cstdio>
#include <cstdlib>
#include <string>
#include "timer.h"
#include <VecCore/VecCore>
using namespace vecCore;
/*
calculates Newton fractal for f(z) = z^4 - 1
https://en.wikipedia.org/wiki/Newton_fractal
*/
Color COLORS[] = {
{0, 0, 0, 0}, // black
{0, 255, 255, ... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
// nav_generate.cpp
// Auto-generate a Navigation Mesh by sampling the current map
// Author: <NAME> (<EMAIL>), 2003
#in... |
//
// CorrClient.cpp
// corr_server
//
// Created by tihmstar on 19.03.20.
// Copyright © 2020 tihmstar. All rights reserved.
//
#include "CorrClient.hpp"
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
#include "CorrServer.hpp"
#include <netinet/in.h>
#include <map>
#include <iostream>
#include "CPUMod... |
#include <stdio.h>
#include <string.h>
#include <chrono>
#include <sl/Camera.hpp>
#include <sl_iot/IoTCloud.hpp>
#include <csignal>
using namespace std;
using namespace sl;
using namespace sl_iot;
using json = sl_iot::json;
float grab_fps = 0;
std::shared_ptr<sl::Camera> p_zed;
sl::InitParameters initParameters;
st... |
/*
* Lock-free concurrent vector (dynamically resizable array) implementation in C++.
* @author: ArvindRS
* @date: 11/21/2017
*/
#include <iostream>
#include <atomic>
#include <pthread.h>
#include <cmath>
#include <chrono>
// Object to specify the write operation details for the helping thread
class WriteDesc {
... |
#include "planner.hpp"
#include "utils.hpp"
#include "path_validator.hpp"
#include "cost_functions.hpp"
#include "spline.hpp"
#include "spline_fit.hpp"
Planner::Planner(const int lane,
const double speed,
const double dt,
const double path_length)
{
m_lane = lane... |
#include "CountryMappings.h"
#include "CountryMapping.h"
#include "CultureGroups/CultureGroups.h"
#include "CultureGroups/CultureGroup.h"
#include "EU4World/Country/EU4Country.h"
#include "Log.h"
#include "ParserHelpers.h"
#include "ProvinceMappings/ProvinceMapper.h"
#include "V3World/Localisation/Localisation.h"
#incl... |
/* file: neural_net_dense_asynch_distributed_mpi.cpp */
/*******************************************************************************
* Copyright 2017 Intel Corporation
* All Rights Reserved.
*
* If this software was obtained under the Intel Simplified Software License,
* the following terms apply:
*
* The sourc... |
// -*- C++ -*-
//
//
// dummy producer for a TkEm
//
// system include files
#include <memory>
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerM... |
/*
Copyright 2021 <NAME>
SPDX-License-Identifier: Apache-2.0
*/
#include <SPI.h>
#include <TaskManagerIO.h>
#include <U8g2lib.h>
#include <HeatController.h>
#include "config.h"
#include "display.h"
#include "main.h"
U8G2_PCD8544_84X48_F_4W_HW_SPI_CUSTOM u8g2(U8G2_R0, /* cs=*/PIN_LCD_CE, /* dc=*/PIN_LCD_DATACMD, ... |
/*
* Copyright © 2018 Intel Corporation
*
* 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, modify, merge, pub... |
/* Copyright (c) 2012-2015 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*/
/*
* this file appeared originally in facetrackn... |
#include "th_assert.h"
#include "Message_tags.h"
#include "Prepare.h"
#include "Pre_prepare.h"
#include "Replica.h"
#include "Request.h"
#include "Req_queue.h"
#include "Principal.h"
#include "MD5.h"
Pre_prepare::Pre_prepare(View v, Seqno s, Req_queue &reqs) :
Message(Pre_prepare_tag, Max_message_size) {
rep().vi... |
#include "GeoShielding.hh"
#include "GeometryManager.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4VSolid.hh"
#include "G4SubtractionSolid.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PVPlacement.hh"
GeoShielding::GeoShielding( ){
// L_in = 5 * cm;
// L_out = 10 * c... |
/**
******************************************************************************
* @FileName oled.cpp
* @Description Implementation of oled.h
* @author <NAME>
* @note
******************************************************************************
*
* Copyright (... |
// Copyright 2019 The Fuchsia 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 "aml-canvas.h"
#include <assert.h>
#include <lib/device-protocol/platform-device.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#i... |
#include "stdafx.h"
#include "PHCommander.h"
#include "phsimplecalls.h"
#ifdef DEBUG
//#include "phworld.h"
// extern CPHWorld *ph_world;
#include "../xrphysics/IPHWorld.h"
#endif
CPHCall::CPHCall(CPHCondition* condition, CPHAction* action) {
m_action = action;
m_condition = condition;
}
CPHCall::~CPHCall() ... |
#include "CommonTools/TriggerUtils/interface/GenericTriggerEventFlag.h"
#include "DQM/SiPixelCommon/interface/SiPixelFolderOrganizer.h"
#include "DQM/SiStripCommon/interface/SiStripFolderOrganizer.h"
#include "DQM/SiStripCommon/interface/SiStripHistoId.h"
#include "DQM/TrackerMonitorTrack/interface/MonitorTrackResidual... |
#include <bits/stdc++.h>
#ifdef LOCAL
#include "code/formatting.hpp"
#else
#define debug(...) (void)0
#endif
using namespace std;
template <uint32_t mod>
struct modnum {
// change these if you need another size of integers
static constexpr inline uint32_t MOD = mod;
using u32 = uint32_t;
using u64 = u... |
/** \file test_burstFit.cxx
\brief Test application for burstFit.
\authors <NAME>, HEASARC
<NAME>, HEASARC/GSSC
*/
#include <algorithm>
#include <iostream>
#include <memory>
#include <stdexcept>
#include <string>
#include <vector>
#include "burstFit/BurstModel.h"
#include "burstFit/NegativeStat.h"... |
/*
* Copyright 2016-2021 Arm Limited. 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 a... |
//
// main.cpp
// Entropic LBM
//
// Created by Sanketh on 18/11/19.
// Copyright © 2019 Sanketh. All rights reserved.
//
#include <iostream>
#include <fstream> // for writing files
#include <sstream> // for string handling
#include <cstdlib> // standard library
#include <cmath> // math library
#include <iomani... |
//
// Copyright 2015 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
... |
#include <string>
#include <list>
#include <utility>
#include "st7789.h"
#include "ol_ui.h"
#include "ol_system_status.h"
#include "ol_text.h"
#include "_ol_layout.h"
const uint16_t MenuNotSelectedFontColor = 0x4208;
OlMenuEntry::OlMenuEntry(std::string *title) {
this->title = title;
}
OlMenuEntry::OlMenuEntry(std... |
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
/*
* Copyright (c) 2002-2005 The Regents of The University of Michigan
* 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
* not... |
#include <stdio.h>
#include <cmath>
#include <string.h>
#include <iostream>
#include <stdlib.h>
#include "multinest.h"
#include "CC_ini_likelihood.hpp"
#include "interfaces.hpp"
#include "ClassMC.hpp"
#define NEG_MAX -1E90
#define MPI_exit {MPI::Finalize(); exit(0);}
using namespace std;
using namespace imcmc;
using... |
// Copyright 1996-2020 Cyberbotics Ltd.
//
// 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 agr... |
//
// Created by lllll on 8/27/2021.
//
#include "Internode.hpp"
#include "InternodeLayer.hpp"
#include "LSystemBehaviour.hpp"
#include "AssetManager.hpp"
#include "InternodeFoliage.hpp"
using namespace PlantArchitect;
void BranchPhysicsParameters::Serialize(YAML::Emitter &out) {
out << YAML::Key << "m_density" <... |
//===--- Serializability.cpp - Swift serializability of Clang AST refs ----===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
// Copyright 2017 <NAME>
#include <algorithm>
#include "IRrecv.h"
#include "IRsend.h"
#include "IRtimer.h"
#include "IRutils.h"
// RRRRRR CCCCC MM MM MM MM
// RR RR CC C MMM MMM MMM MMM
// RRRRRR CC _____ MM MM MM MM MM MM
// ... |
#include <Python.h>
#include <vector>
#include <numeric>
#include <math.h>
#include <iterator>
#include <iostream>
#include <cfloat>
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/ndarrayobject.h>
#include <numpy/ndarraytypes.h>
#include <numpy/npy_math.h>
// wrapper for Numpy Arrays
#include "nump... |
#include "include/pds-dhcpstarve.h"
#include "include/pds-dhcpCore.h"
std::mutex socketMutex, threadNumberMutex, errorCounter;// ipAddressMutex;
int volatile threadCounter = 0;
int volatile currentThreadCountMax = MAX_THREADS_COUNT;
int volatile errorCount = 0;
bool volatile sigIntCatched = false;
int currentErrorCo... |
///////////////////////////////////////////////////////////////////////////////
//FILE: 'environment.cpp'
//Contains 'environment' module of class 'Flat6'
//
//030626 Adopted from AIMC and wind added, PZi
///////////////////////////////////////////////////////////////////////////////
#include "class_hierarchy.hpp"
//... |
#include "testApp.h"
/*
// OPENFRAMEWORKS + LEAP MOTION SDK 2.0 HAND SKELETON DEMO
// By <NAME> (@golan), http://github.com/golanlevin
// Uses ofxLeapMotion addon by <NAME>, with assistance from <NAME>
// Supported in part by the Frank-Ratchye STUDIO for Creative Inquiry at CMU
*/
/* Note on OS X, you must have th... |
#include "highway.h"
#include <fstream>
#include <iostream>
#include "Eigen-3.3/Eigen/Dense"
using std::string;
using Eigen::MatrixXd;
using Eigen::VectorXd;
Highway::Highway() {}
// Load the highway waypoints from the specified map file
void Highway::LoadWaypoints(string map_file) {
// The max s value before wra... |
///////////////////////////////////////////////////////////////////////////////
// File: CastorShowerLibrary.cc
// Description: Shower library for CASTOR calorimeter
// Adapted from HFShowerLibrary
//
// <NAME>
//
///////////////////////////////////////////////////////////////////////////////
#include "S... |
#include <stdio.h>
#include <math.h>
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
#include <nav_msgs/Odometry.h>
#include "phidgets/encoder_params.h"
// used to prevent callbacks from accessing variables
// before they are initialised
bool initialised = false;
// index numbers of left and right encoder... |
#include <opencv2/opencv.hpp>
#include <iostream>
#include "game.hpp"
void sharpen(cv::Mat src, cv::Mat dst)
{
cv::GaussianBlur(src, dst, cv::Size(0, 0), 3);
cv::addWeighted(src, 1.5, dst, -0.5, 0, dst);
}
void tile(const std::vector<cv::Mat> &src, cv::Mat &dst, int grid_x, int grid_y)
{
// patch size
... |
#include "FNN_Model.hpp"
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <chrono>
#include <random>
using namespace Eigen;
FNN_Model::FNN_Model(
std::vector<unsigned int> layers):
train_thread(&FNN_Model::core_train, this),
thread_state(false),
graph("... |
/*******************************************************************\
Module: Generates string constraints for functions adding content
add the end of strings
Author: <NAME>, <EMAIL>
\*******************************************************************/
/// \file
/// Generates string constraints for function... |
/*
* GStreamer
* Copyright (C) 2010 <NAME> <<EMAIL>>
*
* 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, modi... |
// pocket.cpp : Defines the entry point for the console application.
//
// written by <NAME>, September 3rd 2009, license: GPL version 3 http://www.gnu.org/licenses/gpl-3.0.txt
#include "stdafx.h"
#include "PocketParams.h"
#include "../Area.h"
#include "dxf.h"
#include "TextPath.h"
_TCHAR dxf_file[1024] = _T("input.d... |
#define STRICT
#define WIN32_LEAN_AND_MEAN
#pragma warning(disable:4996) // for vista strncpy_s
//#include <config.h>
#include <glib_defines.h>
#include <utils.h>
#include <err.h>
#include <fatalerror.h>
#include <inputdlg.h>
extern char gstring[2048];
/******************************************... |
#include <string.h>
#include "driver/gpio.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event_loop.h"
#include "esp_log.h"
#include "lwip/err.h"
#include "lwip/sys.h"
#include "nvs_flash.h"
#include "hap.h"
#... |
#include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int x;
TreeNode *left;
TreeNode *right;
TreeNode *parent;
};
class LinkedList{
// Struct inside the class LinkedList
// This is one node which is not needed by the caller. It is just
// for internal ... |
//%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
/*
Atanua Real-Time Logic Simulator
Copyright (c) 2008-2014 <NAME>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
includi... |
/******************************************************************
gamain.cpp: specialized main file for Geoarchaeology simulations
<NAME>, Sept. 1999
*****************************************************************/
/*#include "tList/tList.h"
#include "tGridList/tGridList.h"
#include "tArray/tArr... |
/*Problem Statement: Given the head of a LinkedList and two positions ‘k’ and ‘l’, reverse the
LinkedList from position ‘k’ to ‘l’.
https://leetcode.com/problems/reverse-linked-list-ii/
*/
// Method 1
/*UNDERLYING CONCEPT: ---->
# The problem follows the In-place Reversal ... |
// Commander X16 Emulator
// Copyright (c) 2022 <NAME>
// All rights reserved. License: 2-clause BSD
// Commodore Bus emulation, L1: Serial Bus
// This code is hacky, buggy and incomplete, but
// it helped bringing up the serial bus on real
// hardware.
#include "serial.h"
#include "glue.h"
#include "ieee.h"
#include... |
#include "valve/hl2bspasset.h"
#include "valve/hl2bspinstance.h"
// Implementation is already don in hl1bsp
//#define STB_RECT_PACK_IMPLEMENTATION
#include "stb/stb_rect_pack.h"
#include <iostream>
#include <glm/gtc/type_ptr.hpp>
using namespace valve::hl2;
BspAsset::BspAsset(DataFileLocator& locator, DataFileLoade... |
/* -------------------------------------------------------------------------- *
* OpenSim: WrapSphereObst.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
... |
#include "compstate.h"
#include "workerconn.h"
#include "server.h"
#include "pb/comm.pb.h"
#include "libloom/log.h"
#include "libloom/fsutils.h"
constexpr static double TRANSFER_COST_COEF = 1.0 / (1024 * 1024); // 1MB = 1cost
using namespace loom::base;
ComputationState::ComputationState(Server &server) : server(s... |
#include "event.hh"
#include <iostream>
#include <math.h>
#include "TText.h"
#include "TLatex.h"
event::event(){}
event::event(Int_t iev, Int_t ich, Double_t ts, vector<Double_t>* tr, Bool_t isTestPulse, driver* dr){
// initialize the event
//drv = dr;
// event number
ievent = iev;
// channel nu... |
#include <stdio.h>
#include <list>
using namespace std;
#include "ddutil.h"
#include "dxutil.h"
#include "dsutil.h"
#include "sprite.h"
#include "globaldata.h"
#include "font.h"
#include "sounds.h"
#include "timerunit.h"
extern CDisplay TheDisplay;
extern SoundQueue GameSounds;
#define TUPDATE_VAL 15
in... |
/** ModularEEG acqusition tool to stream data to a FieldTrip buffer,
and write data to one or multiple GDF files (if you ever reach the size limit...).
(C) 2010 <NAME>
*/
#include <serial.h>
#include <OnlineDataManager.h>
#include <ConsoleInput.h>
#include <StringServer.h>
#define NUM_HW_CHAN 6
#define F... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup() {
ofBackground(0, 0, 0, 255);
ofShowCursor();
options.load("options.xml");
keys.load("keys.xml");
connected = false;
playing = false;
char key[6];
for (uint8_t i = 0; i < 10; i += ... |
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
/*======
This file is part of PerconaFT.
Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
PerconaFT is free software: you can redistribute it and/or modif... |
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "core/fxcodec/png/png_decoder.h"
#include <setjmp.h>
#include <strin... |
/******************************************************************************
* Copyright (c) 2020, Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.
*
*****************************************************************************/
#include "systemc.h"
#include <sc... |
#include "ton_off_button.h"
TOnOffButton::TOnOffButton(uint8_t rotation, uint16_t x, uint16_t y,
uint16_t width, uint16_t height,
uint16_t colorButton, uint16_t colorText,
String textOn, String textOff,
TButtonS... |
// license:BSD-3-Clause
// copyright-holders:FIND
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// class AppSetting
// INIファイルの読み出し、書き込みを担当
//
////////////////////////////////////////////////////////////////////////////////////////////////////
#include "stdafx.... |
#include <math.h>
#include <algorithm> // std::min, std::max
#include <uWS/uWS.h>
#include <chrono>
#include <iostream>
#include <thread>
#include <vector>
#include "Eigen-3.3/Eigen/Core"
#include "Eigen-3.3/Eigen/QR"
#include "MPC.h"
#include "json.hpp"
// For latency measurment/compensation.
#include <boost/circula... |
#include "ImageLoader.hpp"
#include <stb_image.h>
#include <dcmtk/dcmimgle/dcmimage.h>
#include <dcmtk/dcmAsset/dctk.h>
using namespace dcmvs;
unordered_multimap<string, ImageStackType> gExtensionMap {
{ ".dcm", eDicom },
{ ".raw", eRaw },
{ ".png", eStandard },
{ ".jpg", eStandard }
};
ImageStackType ImageLo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.