text stringlengths 3.08k 12.5k |
|---|
#include "RCX.h"
#include "WMath.h"
using namespace RCX;
using namespace Handshake;
/*广播配置*/
#define RCX_BroadcastAddr 18,54,98,66,23
#define RCX_BroadcastFreq 43//2443MHz
#define RCX_BroadcastSpeed 0 //SPEED_250Kbps
static NRF_TRM* nrfTRM = NULL;
static NRF_FHSS* nrfFHSS = NULL;
static uint8_t NRF_TxBuff[32];
s... |
/* $Id: St_sfs_Maker.cxx,v 1.1 2009/11/10 21:14:18 fisyak Exp $
$Log: St_sfs_Maker.cxx,v $
Revision 1.1 2009/11/10 21:14:18 fisyak
pams clean up
*/
#include "Stiostream.h"
#include "St_sfs_Maker.h"
#include "StHit.h"
#include "StEventTypes.h"
#include "tables/St_HitError_Table.h"
#include "StSvtHitColle... |
//
// Created by MLee on 2019/12/26.
//
#include <random>
#include "data_handle.h"
#include "common.h"
#include "utility.h"
#include "ipc_utility.h"
#include "tcp.h"
#include "configure.h"
CLDataHandle::CLDataHandle(int pipe_fd)
: m_b_stop(false),
m_b_pasv_mode(true),
m_port(0),
... |
#include <SglToolkit/SgTShadowBox.h>
using namespace SglToolkit;
SgTShadowBox::SgTShadowBox(SgTCamera* const camera, const SgTvec3 lightDir, const float nearPlane, const float aspect) : Camera(camera) {
this->LightDirection = glm::normalize(lightDir);
this->NEAR_PLANE = nearPlane;
this->calcViewFrustumPlanes(aspec... |
/*
Problem Statement
"Letter", "Legal", and "Tabloid" are examples of paper sizes. Both Letter and Legal are 8 and
half inches wide, but while Legal has length 14 inches, Letter is 11 inches long. This means that
14 letters have the same total length as 11 legals. Unless, of course, by "Letter" we mean
"Government Let... |
/*
Copyright 1999, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
#include <Alert.h>
#include <Bitmap.h>
#include <Mime.h>
#include <TranslatorRoster.h>
#include <string.h>
#include "DragView.h"
#define BM_WID 95
#define BM_HEI 31
static void
make... |
#include "../include/bmp.h"
#include "mpi.h"
#include "math.h"
using namespace std;
/**
* Extraído de: https://stackoverflow.com/questions/9296059/read-pixel-value-in-bmp-file
* */
Image readBMP(const char* filename){
FILE* f = fopen(filename, "rb");
unsigned char info[54];
fread(info, sizeof(... |
#include "AttackTypes.hpp"
#include "CoordUtils.hpp"
#include "Conversion.hpp"
#include "Game.hpp"
#include "MapCursor.hpp"
#include "MapUtils.hpp"
#include "SelectionUtils.hpp"
using namespace std;
// select the nearest hostile target for the initial cursor location - this is done so that the user has to do less
// ... |
/*
CH-231-A
hw4_p1.cpp
<NAME>
<EMAIL>
*/
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <chrono>
#include <fstream>
#include <vector>
// Merge procedure to merge the subarrays, p to q and q to r into one sorted
// subarray from p to r
void merge(std::vector<int> &arr, int p, int q, int r);
//... |
#include "mbed.h"
#include <stdio.h>
#include "Speaker.h"
#include "PinDetect.h"
#include "BuzzyGraphics.h"
#include "uLCD_4DGL.h"
#include "Buzzy.h"
#include "Ghosts.h"
////////////////////////////////////////
// Setup instance of LCD display
uLCD_4DGL guLCD(p28, p27, p29); // serial tx, serial rx, reset p... |
// Tencent is pleased to support the open source community by making UnLua available.
//
// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License. You may obtain a copy of the... |
/*
* ngtcp2
*
* Copyright (c) 2022 ngtcp2 contributors
*
* 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, m... |
#include "CKDTree.h"
#include "Helper.h"
CKDTree::CKDTree(pointVec point_array, size_t min_size_) : LazyCKDTree(point_array, min_size_) {}
/* if some children: go into relevant subtrees */
bp_pair CKDTree::traverse_tree(KDNodePtr branch, point_t low,
point_t high, size_t dim){
int nex... |
// Copyright (c) <NAME> (<EMAIL>)
//
// 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,
// including commercial... |
/**
* @file rclst.cpp
* @brief Main file in this project.
*
* @author Maxim <<EMAIL>>
* @date 2020
*/
/* See the license in the file "LICENSE.txt" in the root directory. */
#include "common/split.hpp"
#include "core/clusterization.hpp"
#include <boost/program_options.hpp>
#include <iostream>
/** @brief Anonymo... |
#include "kafka_broker_stub/metadata.hpp"
#include "kafka_broker_stub/metadata.hpp"
#include "test_common.hpp"
namespace kbs = kafka_broker_stub;
class metadata_test : public kbs::test::suite
{
public:
metadata_test(const std::string& name): suite(name) { }
private:
void request_test()
{
// A metadata request ... |
//! \file Contains plugin implementation for an imgur downloader
// ------------------------------------ //
#include "src/Plugin.h"
#include "Common.h"
#include "Common/StringOperations.h"
#include "GQ/src/Document.hpp"
#include "json.hpp"
#include <regex>
using namespace DV;
using json = nlohmann::json;
// -----... |
// This is the WS2811 version with PWM controll and button controll
// © <NAME> 05.05.2021
#include <Arduino.h>
#include "GyverButton.h"
#include <microLED.h>
#define COLOR_DEBTH 3
#define STRIP_PIN 1
#define NUMLEDS 5
microLED<NUMLEDS, STRIP_PIN, MLED_NO_CLOCK, LED_WS2818, ORDER_GRB, CLI_AVER> strip;
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
FILE *fin,*fout=0;
int ln=0;
char buffer[1000];
char tmp[100];
char outputFile[100];
char reportName[3][100];
char localDir[100];
#define bail() do{printf("error on line %d\n",ln); if(fout) fclose(fout); return 1;}while(false)
char* getLin... |
#include "rectcache.h"
#include "woopsi.h"
#include "damagedrectmanager.h"
using namespace WoopsiUI;
RectCache::RectCache(const Gadget* gadget) {
_gadget = gadget;
_foregroundInvalid = true;
_backgroundInvalid = true;
_foregroundRegions = new WoopsiArray<Rect>(4);
_backgroundRegions = new WoopsiArr... |
#include <Python.h>
#include "jpype.h"
#include "pyjp.h"
#include "jp_reference_queue.h"
#include "jp_gc.h"
#ifdef WIN32
#define USE_PROCESS_INFO
#include <Windows.h>
#include <psapi.h>
#elif __APPLE__
#define USE_TASK_INFO
#include <unistd.h>
#include <sys/resource.h>
#include <mach/mach.h>
#else
// Linux doesn't hav... |
#include "WeatherForecast.h"
WeatherForecast::WeatherForecast()
{
}
void WeatherForecast::config(String userKey, String location, String unit, String lang)
{
_requserKey = userKey;
_reqLocation = location;
_reqUnit = unit;
_reqLang = lang;
}
bool WeatherForecast::get()
{
// https请求
std::unique_ptr<BearSS... |
/*
* Copyright Null LLC
* Please read the License!
* _ _ _
* | | | | | |
* | |__ | |_ _ _ | | ____ ____
* | __)| | | | |/ || |/ ___) _ | graphics.cpp
* | | | | |_| ( (_| | | ( ( | | Controls basic GUI functions.
* |_| |_|\__ |\____|_| \_||_| Will be replace... |
/*
the vast starry sky,
bright for those who chase the light.
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define mk make_pair
const int inf=(int)1e9;
const ll INF=(ll)5e18;
const int MOD=998244353;
int add(int x,int y){x+=y; return x>=MOD ? x-MOD : x;}
int sub(int x... |
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/time.h"
#ifdef OS_MACOSX
#include <mach/mach_time.h>
#endif
#include <sys/time.h>
#include <time.h>
#include "base/basictypes.h"... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "TestHarness.h"
#include ... |
//
// Analysis routine for RHD_shocktube
//
#include <iostream>
#include <regex>
#include <AMReX_DataServices.H>
#include <Radiation_F.H>
#include <Radiation_utils.H>
using namespace amrex;
std::string inputs_name = "";
int main(int argc, char* argv[])
{
amrex::Initialize(argc, argv, false);
// timer for profili... |
//
// bgp.cpp
// ydk
//
// Created by <NAME> on 7/25/16.
// Copyright © 2016 cisco. All rights reserved.
//
#include <iostream>
#include <memory>
#include "../src/path_api.hpp"
void print_paths(ydk::path::SchemaNode & sn)
{
std::cout << sn.get_path() << std::endl;
for(auto const& p : sn.get_childre... |
/**
*
* Author: <NAME>(coderemite)
* Email: <EMAIL>
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define INF 0x3F3F3F3F
#define NULO -1
#define EPS 1e-13
#define MAXV 1004
#define OFF -2
#define WAT -1
#define FREE 0
#define MAXVAL 1800
#define MAXENT 2000
const int ene[5][5] = {
{7,6,5,... |
/**
* MetriSCA - A side-channel analysis library
* Copyright 2021, School of Computer and Communication Sciences, EPFL.
*
* All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE.md file.
*/
#include "metrisca.hpp"
#include "app/application.hpp"
#incl... |
/* atomic_ops_test.cc
<NAME>, 21 December 2009
Copyright (c) 2009 <NAME>. All rights reserved.
Test of the bit operations class.
*/
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include "jml/arch/atomic_ops.h"
#include "jml/arch/demangle.h"
#include "jml/arch/exception.h"
#include "jml/arch/tick_cou... |
#include "TrackballCamera.hpp"
#include "ige.hpp"
#include <chrono>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>
#include <iostream>
#include <optional>
using glm::vec2;
using glm::vec3;
using glm::vec4;
using ige::asset::Material;
using ige::asset::Mesh;
using ige::asset::Texture;
using ige... |
#include <QFileInfo>
#include <oyranos.h>
#include <oyranos_devices.h>
#include <oyranos_profile.h>
#include "sy_info_dialog.h"
#include "ui_sy_info_dialog.h"
SyInfoDialog::SyInfoDialog(QWidget * parent)
: QDialog(parent, 0)
{
ui = new Ui::syInfoDialog();
ui->setupUi(this);
ui->dateTextLabel->setT... |
/*****************************************************************/
/* NAME: <NAME> */
/* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */
/* FILE: ObstacleSim.cpp */
/* DATE: October 19th, 2017 ... |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <sstream>
#include <elf.h>
#include <err.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sysexits.h>
#include <unistd.h>
#include "xflags.h"
namespace {
// Print help and exit.
bool help;
// Print version information and exit.
bool version;... |
/*******************************************************************************
* Copyright (c) 2007, 2008, CerroKai Development
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistribu... |
#include "update.h"
#include "arnutil.h"
#include "console.h"
#include "lumautils.h"
#include "utils.h"
static inline bool pathchange(u8* buf, const size_t bufSize, const std::string& path) {
const static char original[] = "sdmc:/arm9loaderhax.bin";
const static size_t prefixSize = 12; // S \0 D \0 M \0 C \0 : \0 /... |
// test_harness_md5.cpp : Defines the entry point for the console application.
//
// C/C++ / Processor / Processor Definitions: _UNICODE;_CRT_SECURE_NO_WARNINGS;
// Linker / input: ws2_32.lib;
#include "stdafx.h"
//#include <stdlib.h>
//#include <stdio.h>
#include <string.h>
typedef unsigned char BYTE;
#include ... |
/**
* Copyright 2021 <NAME>
*
* 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, publish, distribut... |
//este nodo publicara al topic /cyinder_blocks_poses
//incluyendo todas los bloques actuales, la posicion es en 3 dimensiones
//Comunicacion ROS:
// suscribir al topic /current_cylinder_blocks
// suscribir al topic /gazebo/model_states
// publicar el topic //cylinder_blocks_poses
#include <ros/ros.h>
#includ... |
// © <NAME> <<EMAIL>>, 2020-2021
// SPDX-License-Identifier: Apache-2.0
#include "V2DMX.h"
#include <wiring_private.h>
// Break: 26 bits, 104 usec (minimum 92 usec)
// Mark after Break: 3 bits, 12 usec (minimum 12 usec)
// Start Code: 1 + 8 + 2 bits, 44 usec (value '0' @ 250kHz)
/... |
/*
Copyright 2012-2013 <NAME> <<EMAIL>>
Authors: <NAME> <<EMAIL>>, <NAME>
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 b... |
#include <ros/ros.h>
#include <geometry_msgs/PointStamped.h>
#include <lightsfm/vector2d.hpp>
#include <visualization_msgs/MarkerArray.h>
#include <list>
#include <map>
#include <iostream>
#include <fstream>
namespace plab
{
class EditionNode
{
public:
struct Edge
{
unsigned src;
unsigned dst;
};
Ed... |
#include "SEngine.h"
Colider2D::Colider2D() {
triangles = new Triangle[0];
}
void Colider2D::createTriangles(Image* image, double intensity, SEngine * engine) {
int skipValue = (int)round(1.0 / intensity);
//calculate vertecie count
byte * byteImage = image->getByteImage();
const int width = image->calcWidth();... |
/*
The MIT License (MIT)
Copyright (c) 2017 <NAME>, <NAME>, <NAME>, <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ri... |
/* PipeWire
*
* Copyright © 2021 <NAME> <<EMAIL>>
* © 2021 <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 limitatio... |
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <iostream>
#include <stdexcept>
#include <pire/pire.h>
template<class Scanner>
typename Scanner::State RunScanner(const Scanner& scanner, const char* begin, const char* end)
{
Pire::RunHelper<Scanner> runner(scanner);
runne... |
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENS... |
//!
//! The MIT License (MIT)
//!
//! Copyright (c) 2015 <NAME>
//!
//! 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 u... |
/*
Motors2.cpp - Hardware Motor Library for ArbotiX, using Timer2
Copyright (c) 2009-2012 by <NAME>. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
ver... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
#include <vector>
#include <map>
#include <iostream>
#include <math.h>
#include <string>
#include <fstream>
//#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "Vector3.h"
#include "AABB.h"
#include "Point.h"
#include "GridIndex.h"
#include "SparseGrid.h"
#include "GridCell.h"
using std::ifs... |
#include "Textbox.hpp"
////////////////////////////////////////////////////////////////////////////
// Rendering helper functions
////////////////////////////////////////////////////////////////////////////
// Convert line number to string
std::string Textbox::line_number_to_string(const int line_number, const int... |
/**
* @author <NAME>
* @date 11/11/2020
*/
#include <iostream>
#include <cstring>
using namespace std;
int f(int);
void first();
void second();
struct elem;
void addItemAtTheBeginning(elem *&, int);
void addItemAtTheEnd(elem *&, int);
void stampa(elem *);
void third();
void fourth();
void inserisciOrdina... |
#include "../common/common.hpp"
#include "masker.hpp"
extern int rcvSockfd;
extern int mcastSendSockfd;
extern int sockfdRaw;
extern uint8_t *packet;
//========================================================================
//
int receive_setpoint(int sockfd, char * buffer, sockaddr_in &fromAddress)
{
bzero(buff... |
#include "pch.h"
#include "Common.h"
#include <afxinet.h> //用于支持使用网络相关的类
#include <sstream>
#include "DataManager.h"
std::wstring CCommon::StrToUnicode(const char* str, bool utf8)
{
if (str == nullptr)
return std::wstring();
std::wstring result;
int size;
size = MultiByteToWideChar((utf8 ? ... |
/// Faster one
struct Edge{
int from,to,cap,flow,cost;
Edge(int from,int to,int cap,int flow,int cost):from(from),to(to),cap(cap),flow(flow),cost(cost) {}
};
class MCMF{
const int MAXN=500+5;
const int INF=1<<28;
public:
int n,m,s,t;
vector<Edge> edges;
vector<int> G[MAXN];
bool inq[MAXN];
int d[MAXN],p... |
/* Name: <NAME>
* ID: 20371613
* Email: <EMAIL>
*/
/*
* This is code skeleton for COMP5112-17Spring assignment3
* Compile: g++ -std=c++11 -fopenmp -o openmp_dijkstra openmp_dijkstra_skeleton.cpp
* Run: ./openmp_dijkstra -n <number of threads> -i <input file>,
* you will find the output in 'output.txt... |
#include <algorithm>
#include <cstdlib>
#include <forward_list>
#include <forward_list>
#include <iostream>
#include <unordered_map>
#include <tudocomp/io.hpp>
#include <tudocomp_stat/StatPhase.hpp>
#include <tudocomp/util/STXXLStatExtension.hpp>
#include <tudocomp/compressors/lcpcomp/compress/PLCPStrategy.hpp>
#inc... |
#include <cameras/pinhole_camera.hpp>
#include <core/scene.hpp>
#include <films/component_buffer_film.hpp>
#include <graphics/color.hpp>
#include <renderers/normal_renderer.hpp>
#include <renderers/path_tracer.hpp>
#include <renderers/raycaster.hpp>
#include <GLFW/glfw3.h>
#include <algorithm>
#include <chrono>
#incl... |
#include <Arduino.h>
#include <M5StickC.h>
#include "driver\pcnt.h"
#include "dispatch.h"
//Tasks
#include "screen.h"
#include "fan.h"
#include "leds.h"
#include "pulse.h"
#include "buttons.h"
#include "knob.h"
#include "ota.h"
#include "power.h"
QueueHandle_t cevtQueue;
dispatch_pair_t dispatchScreen;
dispatch_pai... |
// <NAME> 2013.
//
// Run as “curvature > output.data”
//
// The data can then be visualized with e.g. the following
// Python script.
//
// import numpy as np
// import matplotlib.pyplot as plt
//
// A = np.loadtxt('curvature.txt')
//
// plt.hold(True)
// plt.plot(A[0, :], A[1, :], '.-k')
// plt.plot(A[2, :], A[... |
#include "autocollision-capsules-code-generation.hpp"
typedef boost::shared_ptr< fcl::CollisionGeometry > CollisionGeometryPtr;
// Helper function : returns the jMf SE3 placement given a frame f, j being its parent joint
pinocchio::SE3 jointToFrameRelativePlacement(pinocchio::Model model, pinocchio::Data data, int fra... |
extern "C" {
#ifdef WIN32
# include "incline_win32.h"
#else
# include <pthread.h>
#endif
}
#include "incline_dbms.h"
#include "incline_def_async_qtable.h"
#include "incline_driver_async_qtable.h"
#include "incline_fw_async_qtable.h"
#include "incline_mgr.h"
#include "incline_util.h"
#include "start_thread.h"
using n... |
#include <iostream>
#include <cstdlib>
#include <vector>
#include <cmath>
#include <time.h>
#include <SFML/Graphics.hpp>
#include <chai.h>
#include <loadmnist.h>
unsigned int MaxElement(std::vector<float> input);
std::vector<std::vector<float> > LoadMNIST();
unsigned int MaxElement(std::vector<float> input)
{
if (i... |
#include <disruptorplus/ring_buffer.hpp>
#include <disruptorplus/multi_threaded_claim_strategy.hpp>
#include <disruptorplus/spin_wait_strategy.hpp>
#include <disruptorplus/sequence_barrier.hpp>
#include <vector>
#include <algorithm>
#include <iostream>
#include <thread>
#include <cassert>
using namespace disruptorplu... |
// In this, and only this, compilation unit, we need to #include the numpy
// headers without NO_IMPORT_ARRAY #defined. In all other compilation units,
// this macro is defined, to make sure a single shared copy of the API is used.
//
// See http://docs.scipy.org/doc/numpy/reference/c-api.array.html#importing-the-api... |
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ShmemYCbCrImage.h"
#defin... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "MaterialData.hpp"
#include "TextureData.hpp"
// TODO: retrieve & pass in corre... |
#include <algorithm>
#include <cstring>
#include "mapfield.h"
mapField::mapField(int Size, int *array) {
if (Size == 0)
Size = 1;
size = static_cast<unsigned short>(Size);
sizeLog = static_cast<unsigned short>(log2int(size));
sizeMod = size - 1;
unsigned int limit = size*size;
mapArray = new i... |
#include "pin.H"
#include <fstream>
#include <iostream>
#include <string>
std::ofstream trace;
static bool is_counting = false;
static UINT64 instr_count = 0;
static UINT64 mem_count = 0;
typedef struct {
unsigned long ip;
std::string function;
std::string assembly;
} instruction_data_t;
std::string start_fn =... |
//
// OpenGLObjParser.cpp
// SpectralBRDFExplorer
//
// Created by <NAME> on 30/05/16.
//
//
#include "lodepng.h"
#include "OpenGLObjParser.hpp"
#ifdef __ANDROID__
#include "android_fopen.h"
#endif
#ifdef __APPLE__
#include "iOSFileOpen.hpp"
#endif
const std::vector<float>& OpenGLObjParser::getVerticesData() {... |
// XMLGET.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "XMLGet.hpp"
#include "XMLProcSuppl.hpp"
#include "XMLProc.hpp"
#include "XGetopt.h"
#include "Resources.h"
#include "resource.h"
int wmain(int argc, _TCHAR* argv[])
{
int retCode;
CXMLGet *theApp ... |
/*
Copyright (c) 2002-2009 Tampere University.
This file is part of TTA-Based Codesign Environment (TCE).
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, ... |
// Copyright 2015 The Kyua Authors.
// 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 conditio... |
#include <iostream>
#include <memory>
#include <unordered_map>
#include <vector>
#include <assimp/Importer.hpp>
#include <assimp/postprocess.h>
#include <assimp/types.h>
#include <glm/ext/vector_float3.hpp>
#include <glm/fwd.hpp>
#include <glm/geometric.hpp>
#include <tinyobjloader/tiny_obj_loader.h>
#include "Materi... |
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrStencilAndCoverPathRenderer.h"
#include "GrContext.h"
#include "GrDrawTargetCaps.h"
#include "GrGpu.h"
#include "GrPath.h"
#include "GrRenderTarget.h"
#include "... |
// gpuiterator.cpp
#include "gpuiterator.hpp"
#include "gpuruntime.hpp"
using namespace brook;
static float lerp (unsigned int i, unsigned int end,float lower,float upper) {
float frac=end>0?((float)i)/(float)end:(float)upper;
return (1-frac)*lower+frac*upper;
}
GPUIterator* GPUIterator::create( G... |
// This file is part of the dune-gdt project:
// https://github.com/dune-community/dune-gdt
// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved.
// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
// or GPL-2.0+ (http://opensource.org/lice... |
#include "FakeMap.h"
#include "Autonomous.h"
constexpr float PI = M_PI;
FakeMap::FakeMap(Autonomous &autonomous_) : autonomous(autonomous_)
{
robotPos.x = 0;
robotPos.y = 0;
heading = 0;
margin = pow(10, -5);
steps = 0;
target = autonomous.getTarget();
}
void FakeMap::addObstacle(PointXY firs... |
// Copyright (c) 2016 Electronic Theatre Controls, Inc., http://www.etcconnect.com
//
// 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 ... |
/*
Copyright (c) 2003-2007 <NAME> <<EMAIL>>
Modified by <NAME> <<EMAIL>>
Copyright (c) 2015-2018
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 cod... |
/*
Copyright (c) 2007 <NAME>. 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 require... |
/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "LazyDecodeBitmap.h"
#include "SkLua.h"
#include "SkLuaCanvas.h"
#include "SkPicture.h"
#include "SkCommandLineFlags.h"
#include "SkGraphics.h"
#include "SkStream.h"
... |
// -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
// Small example how to use the library.
// For more examples, look at demo-main.cc
//
// This code is public domain
// (but note, that the led-matrix library this depends on is GPL v2)
#include "led-matrix.h"
#include "FastNoise.h"
#include <unistd.h>
#... |
#include <ros/ros.h>
#include <nav_msgs/Path.h>
#include <geometry_msgs/Quaternion.h>
#include "lab4/oint_control_srv.h"
#include <math.h>
#include <tf/LinearMath/Matrix3x3.h>
#include <iostream>
#define LOOP_RATE 10
using namespace std;
double x, y, z, ox, oy, oz, t;
double rx, ry, rz, rox, roy, roz;
double arx, ar... |
#pragma once
#include <vector>
class convar;
using fn_change_callback_t = void(*)(convar* var, const char* pOldValue, float flOldValue);
inline int UtlMemory_CalcNewAllocationCount(int nAllocationCount, int nGrowSize, int nNewSize, int nBytesItem) {
if (nGrowSize)
nAllocationCount = ((1 + ((nNewSize - 1) / nGrowSi... |
#include <gtest/gtest.h>
#include "main.h"
#include "utilmoneystr.h"
#include "chainparams.h"
#include "utilstrencodings.h"
#include "snowgem/Address.hpp"
#include "wallet/wallet.h"
#include "amount.h"
#include <memory>
#include <string>
#include <set>
#include <vector>
#include <boost/filesystem.hpp>
#include <iostre... |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
... |
/* This file is distributed under the following terms:
* Copyright 2005-2014 <NAME>. All rights reserved.
* Copyright 2014 <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:
* 1. Redi... |
/*
* socketrecepcion.cpp
*
* Created on: Jul 10, 2010
* Author: <NAME>
*/
#include <QTcpSocket>
#include <QVector>
#include "socketrecepcion.h"
SocketRecepcion::SocketRecepcion(QObject *parent,int id,NodesStates * pointerOtStates,LLegadaColumnasIndOtherProc *pointerColumnsOtherProc):QTcpSocket(parent)
{
... |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 IITP RAS
*
* 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 distribu... |
/***************************************************************************
* Copyright 1998-2020 by authors (see AUTHORS.txt) *
* *
* This file is part of LuxCoreRender. *
* ... |
//NEWCODE
/* -------------------------------------------------------------------
* LHOTSE: Toolbox for adaptive statistical models
* -------------------------------------------------------------------
* Library source file
* Module: GLOBAL
* Desc.: Definition of class Range
* ------------------------------------... |
#include <copy_return_value.hpp>
using namespace std;
namespace py = boost::python;
template<typename Seq, bool from_back = true>
Seq make_seq(size_t sz)
{
Seq seq;
for (size_t i = 0; i < sz; ++i) {
if constexpr (from_back) {
seq.push_back(i);
} else {
seq.push_front(i);
}
}
return seq... |
#include <rrt_planners/planners/control/Rrt.h>
//#define PRINT_STATISTICS false
RRT::Rrt::Rrt() : Planner() {
//accompany_steer_ = false;
}
RRT::Rrt::~Rrt() {
}
bool RRT::Rrt::steer(Node* fromNode, Node* toNode, Node* newNode)
{
//if(accompany_steer_)
// return steering_->accompany_steer(fromNode, toNode, ... |
/*!
* @author <NAME>, K.K.
* @date 2019
* @copyright BSD-3-Clause
*/
#define __CL_ENABLE_EXCEPTIONS
#include <CL/cl.hpp>
#include <cassert>
#include <fstream>
#include <iostream>
#include <random>
#include <sstream>
#include <stdexcept>
#include <vector>
namespace {
std::mt19937 mt(0);
inline void initVe... |
//----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2021, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following c... |
// Copyright (c) OpenMMLab. All rights reserved.
#include "text_recognizer.h"
#include <numeric>
#include "archive/value_archive.h"
#include "codebase/mmocr/mmocr.h"
#include "core/device.h"
#include "core/mat.h"
#include "core/operator.h"
#include "core/status_code.h"
#include "core/utils/formatter.h"
#include "han... |
#include "quickhull.hpp"
using namespace newbieGE;
using namespace std;
bool QuickHull::Init(Polyhedron &hull, PointSet &point_set) {
if (point_set.size() < 4) {
// too few points in the point set, nothing could be done
return false;
}
PointPtr ExtremePointXMin = make_shared<Point3>(numer... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.