text stringlengths 3.08k 22k |
|---|
/**
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: <NAME>
*/
#include "particle_filter.h"
#include <math.h>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <random>
#include <string>
#include <vector>
#include "helper_functions.h"
using namespace std;
usi... |
/*
* BerylDB - A lightweight database.
* http://www.beryldb.com
*
* Copyright (C) 2021 - <NAME> <<EMAIL>>
*
* This file is part of BerylDB. BerylDB is free software: you can
* redistribute it and/or modify it under the terms of the BSD License
* version 3.
*
* More information about our licensing can be foun... |
/*
* Copyright 2014-present Facebook, 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 a... |
/*
PololuWheelEncoders.cpp - Library for using Pololu Wheel Encoders.
*/
/*
* Copyright (c) 2009-2012 Pololu Corporation. For more information, see
*
* http://www.pololu.com
* http://forum.pololu.com
* http://www.pololu.com/docs/0J18
*
* You may freely modify and share this code, as long as you keep th... |
#include "constants.hpp"
#include "reader.hpp"
#include "game.hpp" // TODO: We should move Common somewhere else
//#include <iostream>
int CSint32desc[][3] =
{
{CNRInitialLength, 0x32D7, 0x32DD},
{CNRAttachLength, 0xA679, 0xA67F},
{0, -1, -1}
};
int CSint24desc[][3] =
{
{CMinBounceUp, 0x3B7D, 0... |
//
// proxyOGL.hpp
// ngin
//
// Created by <NAME> on 09/03/2018.
// Copyright © 2018 <NAME>. All rights reserved.
//
#pragma once
#include <cassert>
#include <string>
#include <iostream>
#include "../config.hpp"
#ifdef __WIN32__
#include <glad/glad.h>
#endif
#if __APPLE__
#ifdef ios_build
#import <Ope... |
#include "canterminal.h"
#include "ui_can_terminal.h"
#include "candev.h"
#include "opendialog.h"
#include <iostream>
#include <QTime>
#include <qregexp.h>
#include <qscrollbar.h>
#include <string.h>
const int CanTerminal::terminalMaxLen = 10000;
CanTerminal::CanTerminal(QWidget *parent) :
QWidget(parent),
ui... |
/*
Check the LICENSE file included for copyright information.
*/
#include "play.h"
#include <string>
#include <iostream>
#include "util.h"
MainMenu::MainMenu( int levelset_, int level_, char* message_ )
{
cameramovecooldown = 0.0f;
sprintf( message, "%s", message_ );
won = false;
gamestate = GAMES... |
// Copyright 2016 Google 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 at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
///
/// Copyright (c) 2020, Intel Corporation
///
/// Redistribution and use in source and binary forms, with or without
/// modification, are permitted provided that the following conditions
/// are met:
///
/// * Redistributions of source code must retain the above copyright
/// notice, this list of conditions ... |
/*=========================================================================
Program: OpenIGTLink -- Example for Tracker Server Program
Language: C++
Copyright (c) Insight Software Consortium. All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MER... |
#include <Arduino.h>
#include "4wcomm.h"
#include "4wcomm_internal.h"
static uint8_t comm_state;
static uint8_t comm_dir;
static uint8_t sendbuf[SENDBUF_SIZE];
static uint8_t sendbuf_readptr;
static uint8_t sendbuf_writeptr;
static uint8_t sending_byte;
static uint8_t sending_bit_number;
static uint8_t recvbuf[RECV... |
/**
* Copyright (C) 2012 <NAME> (<EMAIL>)
* Copyright (C) 2012 <NAME> (<EMAIL>)
* 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 retai... |
// This file is part of snark, a generic and flexible library for robotics research
// Copyright (c) 2011 The University of Sydney
// 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. Redistr... |
#include "ECS.h"
#include "Elevator.h"
#include "Floor.h"
#include "Passenger.h"
ECS::ECS(int numElev, int numFloors, int minFloor, bool randomEvents) {
m = (numElev >= 1) ? ((numElev <= MAX_ELEVATORS) ? numElev : MAX_ELEVATORS) : 1;
n = (numFloors >= 2) ? ((numFloors <= MAX_FLOORS) ? numFloors : MAX_FLOORS... |
/**
* Electronic Heating Controller API
*
* Created on: 22/11/2018
*
* - 3 zones to control through (D1,D2) (D5,D6) (D7,D8)
* - log on MQTT
* - control through REST API
*
* TODO:
* - Add POST on server /api to config NTP, MQTT or WiFi
* - Utiliser SPIFFS pour stocker les infos
*/
#include <E... |
/**
* @brief This is a simple example usage of the Extended Kalman Filter
* It is used to estimate the 2D position(x,y) and heading(h) of a mobile robot, by using linear velocity(v) and angular rate(w) measurements.
*
* X (state vector) = [x y h v]'
* Z (measurement vector) = [x y]
* U (input/control vector) = [... |
//
// FILE: HT16K33.cpp
// AUTHOR: <NAME>
// VERSION: 0.1.3
// DATE: 2019-02-07
// PURPOSE: Class for HT16K33
//
// HISTORY:
// 0.1.0 - 2019-02-07 initial version
// 0.1.1 - 2019-02-07 first stable version
// 0.1.2 - 2019-02-11 optimized performance
// 0.1.3 - 2019-10-07 fixed clear, added suppressLeadingZeroPla... |
#include "audiobuffercontainer.h"
#include "queue.h"
#include <assert.h>
void ChannelPinMapper::SetNPins(int nPins)
{
if (nPins<0) nPins=0;
else if (nPins>CHANNELPINMAPPER_MAXPINS) nPins=CHANNELPINMAPPER_MAXPINS;
int i;
for (i = m_nPins; i < nPins; ++i) {
ClearPin(i);
if (i < m_nCh) {
SetPin(i, i... |
/**
* copyright (C) 2010
* The Icecube Collaboration
*
* $Id: I3CorsikaShowerInfoConverter.cxx 179791 2020-04-16 16:29:12Z kath $
*
* @version $Revision: 179791 $
* @date $LastChangedDate: 2020-04-16 10:29:12 -0600 (Thu, 16 Apr 2020) $
* @author <NAME> <<EMAIL>> $LastChangedBy: kath $
*/
#include "simclasses... |
///////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/win_gtk.cpp
// Purpose: native GTK+ widget for wxWindow
// Author: <NAME>
// Id: $Id$
// Copyright: (c) 2007 <NAME>
// Licence: wxWindows licence
///////////////////////////////////////... |
#include "svgfile.h"
#include "couleur.h"
#include <iostream>
#include <sstream>
const std::string svgHeader =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" ";
const std::string svgEnding = "\n\n</svg>\n";
/// Effets "Boule en relief", v... |
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2017 The MaxCoin developers and <NAME>
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <map>
#include "key.h"
#include "schnorr.h"
using names... |
#include "PersonVector.h"
#include "utility.h"
#include "PersonPool.h"
#include <map>
#include <fstream>
#include "fem_exception.h"
#include <cstring>
#include <cstdlib>
#include "Logger.h"
#include <set>
#include <sstream>
PersonVector::PersonVector(void)
{
}
PersonVector::~PersonVector(void)
{
for(unsigned int i ... |
/*
* (c) 2009-2010 <NAME> <<EMAIL>>
*
* This file is part of flame.
*
* flame is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
... |
#include "gtest/gtest.h"
#include "fianet-core.h"
using namespace Fianet;
TEST (StringTest, compareTo_works)
{
String s("aaa");
EXPECT_EQ (0, s.compareTo(s));
EXPECT_EQ (0, CSTR("").compareTo(""));
EXPECT_EQ (0, CSTR("abc").compareTo("abc"));
EXPECT_GT (0, CSTR("").compareTo("abc"));
EXPECT_GT (0, CSTR("Abc... |
/* Copyright (c) 2016, 2017 <NAME>
*
* 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.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... |
// ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
#define GUIHELPERS
#include "Isis.h"
#include "Camera.h"
#include "TProjection.h"
#include "ProjectionFactory.h"
#include "ProcessRubberSheet.h"
#include "IException.h"
using namespace std;
using namespace Isis;
void PrintMap();
void LoadMapRes();
void LoadCameraRes();
void LoadMapRange();
void LoadCameraRange();
... |
#include "GPUFilterModel.h"
#include <QFile>
#include <QFileInfo>
#include <QDebug>
#include <QVector3D>
#include <QOpenGLShaderProgram>
#include "OpenGLCore/GPUFilterMaterial.h"
#include "OpenGLCore/GPUFilterScene.h"
#include "3DExtras/GPUFilterGeometryCubeBox.h"
#include "GPUFilterBoneMesh.h"
#include "GPUFilterModel... |
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 <NAME> / <NAME> http://continuousphysics.com/Bullet/
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.
Perm... |
//Includes
//#include <chrono>
#include "gru3.c"
//Declarations
const valarray<size_t> oktypes = {1u,2u};
const size_t I = 6u, O = 1u;
size_t dim, N, T;
//Description
string descr;
descr += "Neural soma stage.\n";
descr += "Does GRU (gated recurrent unit) model for driving inputs X, Xr, Xz.\n";
descr += "This is the ... |
// Copyright (C) 2018-2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gtest/gtest.h>
#include <gmock/gmock-spec-builders.h>
#include "mkldnn_plugin/mkldnn_graph.h"
#include "test_graph.hpp"
#include "single_layer_common.hpp"
#include <mkldnn_plugin/mkldnn_extension_utils.h>
#include <exte... |
#include "CollisionManager.h"
#include "Entity.h"
#include "Transform.h"
void CollisionManager::AddCollider(Collider* collider)
{
colliders.push_back(collider);
}
void CollisionManager::RemoveCollider(Collider* collider)
{
colliders.remove(collider);
}
void CollisionManager::CheckCollisions()
{
auto iterator = co... |
#include <algorithm>
#include <array>
#include <fstream>
#include <sstream>
#include <iostream>
#include <numeric>
#include <sstream>
#include "csvtools.h"
#include <rbdl/rbdl.h>
#include <rbdl/rbdl_utils.h>
#include <rbdl/Dynamics.h>
#include <rbdl/addons/luamodel/luamodel.h>
#include <rbdl/addons/luamodel/luatables... |
#include <uWS/uWS.h>
#include <iostream>
#include "json.hpp"
#include "PID.h"
#include <math.h>
// for convenience
using json = nlohmann::json;
int num_iterations = 0;
// For converting back and forth between radians and degrees.
constexpr double pi() { return M_PI; }
double deg2rad(double x) { return x * pi() / 180; ... |
/*
* (C) Copyright 1996-2016 ECMWF.
*
* 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.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an in... |
/*******************************************************************************
* benchmarks/io/benchmark_disks.cpp
*
* This programm will benchmark the disks configured via .stxxl disk
* configuration files. The block manager is used to read and write blocks using
* the different allocation strategies.
*
* Cop... |
#include "ArrayGraph.h"
#include "ListGraph.h"
#include "Set.h"
#include <stdio.h>
using namespace cppalgo;
template ArrayGraph<char>;
template ListGraph<char>;
template EdgeHeap<char>;
template Set<char>;
class ACharGraph : public ArrayGraph<char>
{
public:
ACharGraph(int nSize = 100) : ArrayGraph<c... |
//
// tsh - A tiny shell program with job control
// ****FINAL****
// <NAME> mamo8125
// <NAME> erha5113
using namespace std;
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
#... |
#include "slic.h"
#include <iostream>
#include <math.h>
#include <queue>
void show_segmented_image(std::vector<int> closest_cluster, std::vector<slic::RGBCluster> &clusters, int w, int h) {
cv::Mat img(h, w, CV_8UC3, cv::Scalar(0, 0, 0));
for (int i=0; i<h*w; ++i) {
int x = i%w;
int y = i/w;
... |
// Copyright (c) 1997-2018 The CSE Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
///////////////////////////////////////////////////////////////////////////////
// Foundation.cpp -- interface to Kiva
///////////////////////////////... |
// Copyright (c) 2019-2020, NVIDIA CORPORATION.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... |
/* CS106 D6
* Author: <NAME>
* Instructor: <NAME>
* Week 9 - Final Project (Got an A+ on it)
*/
// Include required libraries
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <string>
#include <ctime>
#include <cctype>
using namespace std;
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... |
#include "CondFormats/Common/interface/hash64.h"
typedef unsigned long long ub8; /* unsigned 8-byte quantities */
typedef unsigned long int ub4; /* unsigned 4-byte quantities */
typedef unsigned char ub1;
inline ub8 hashsize(ub8 n) { return (ub8)1 << (n); }
inline ub8 hashmask(ub8 n) { return hashsize(n) - 1; }
#in... |
// This is a port of the nng demo to nngpp
// See https://github.com/nanomsg/nng/tree/master/demo/rest
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <memory>
#include <mutex>
#include <nngpp/nngpp.h>
#include <nngpp/protocol/req0.h>
#include <nngpp/protocol/rep0.h>
#include <nngpp/http/http.h>
#inclu... |
/*
* Copyright 2015 The SageTV Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... |
/* Starshatter OpenSource Distribution
Copyright (c) 1997-2004, Destroyer Studios LLC.
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 t... |
#include <cmath>
#include <complex>
#include "gtest/gtest.h"
#include "qpp.h"
using namespace qpp;
// Unit testing "classes/gates.hpp"
/******************************************************************************/
/// BEGIN template <typename Derived> dyn_mat<typename Derived::Scalar>
/// qpp::Gates::CTRL(co... |
// Copyright 2014, VIXL 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 conditions ... |
// Copyright (c) 2017-, California Institute of Technology ("Caltech"). U.S.
// Government sponsorship acknowledged.
// All rights reserved.
//
// Author(s):
//
// ----------------------------------------------------------------------------
// Author: <NAME>
//
#include "ChangeDetector.h"
void ChangeDetector::b... |
//
// Copyright (c) 2017 The Khronos Group 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 la... |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
//
// Licensed under the Universal Permissive License v 1.0 as shown
// at http://oss.oracle.com/licenses/upl
//
// xla_demo.cpp: another demonstration of the TTC... |
// 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/include/fpdfdoc/fpdf_doc.h"
static int32_t FPDFDOC_OCG_FindGro... |
// This file is part of Notepad2.
// See License.txt for details about distribution and modification.
//! Lexer for Vim.
#include <cassert>
#include <cstring>
#include <string>
#include <string_view>
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
#include "WordList.h"
#include "LexAccessor.h"
#inc... |
/*
* 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 "StEEmc2x2ClusterMaker.h"
#include "StEEmcPool/StEEmcA2EMaker/StEEmcA2EMaker.h"
#include <algorithm>
#include "StMuDSTMaker/COMMON/StMuTrack.h"
#include "StMcEvent/StMcEvent.hh"
#include "StMcEvent/StMcTrack.hh"
#include "StMcEvent/StMcVertex.hh"
#include "StMessMgr.h"
ClassImp(StEEmc2x2ClusterMaker);
/... |
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include "bmp.h"
unsigned char colors[256][3];
int reduce = 0;
int all_cols = 0;
unsigned short *col_list;
unsigned char index_list[256];
void memswap(unsigned char *p1, unsigned char *p2, int size)
{
int i;
unsigned char t;
for(i=0; i<s... |
/*
* This file is part of pystaq.
*
* Copyright (c) 2019 - 2022 softwareQ Inc. All rights reserved.
*
* MIT License
*
* 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 restrict... |
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
/*
Access Gateway - a mediator for the World Wide Web
(C) 1998-2006 <NAME> http://ssb22.user.srcf.net
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... |
/**************************************************************************
* Copyright (C) 2009 by <NAME>
* <EMAIL>
*
* This file is part of <NAME>' SSH class, aka PTssh.
*
* PTssh is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as publish... |
// -*- coding: utf-8 -*-
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <sys/stat.h>
#include <cassert>
#include <algorithm>
#include <numeric>
#include <ostream>
#include "string_tree.hpp"
#include "common_utils.hpp"
using namespace STree;
struct stat_vec {
double... |
/** @file
@brief Implementation of interface for an Oculus DK2 HID device
@date 2015
@author
Sensics, Inc.
<http://sensics.com/osvr>
*/
// Copyright 2015 Sensics, 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 ... |
#include "rip.h"
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
/*
在头文件 rip.h 中定义了如下的结构体:
#define RIP_MAX_ENTRY 25
typedef struct {
// all fields are big endian
// we don't store 'family', as it is always 2(response) and 0(request)
// we don't store 'tag', as it is always 0
uint32_t a... |
//---------------------------//
// KNN - main func //
//--------------------------//
/*
1. Dataset Building
- need:
- word frequency for each book
- label for class
- book id to identify book in dataset
- find total unique words in the full dataset among all books
- union of all the books un... |
#include "stdafx.h"
#include "sgeom.h"
#include "math.h"
#include "BaseLib/math/Operator.h"
#include "BaseLib/math/Operator_NR.h"
bool sgeom_inside_tetrahedron(const vector3 &x, const vector3 &p1, const vector3 &p2, const vector3 &p3, const vector3 &p4, double *b, int *err_code)
{
double d, d1, d2, d3, d4;
matrixn ... |
#include "aoc21/helpers.h"
#include <map>
#include <array>
#include <queue>
#include <set>
#include <vector>
namespace {
enum class Register {
None = -1,
W,
X,
Y,
Z,
};
enum class Opcode {
Noop,
Inp,
Add,
Mul,
Div,
Mod,
Eql,
};
std::ostream& operator<<(std::o... |
#include "ParticleSource.h"
ParticleSource::ParticleSource() : VertexShape() {
}
ParticleSource::ParticleSource(int count, D3DXVECTOR3& srcV, D3DXVECTOR3& srcPos, D3DXVECTOR3& color, bool inherit) : VertexShape() {
pos = srcPos;
particleCount = count;
this->color = color;
objectType = OBJECT_TYPE_PARTICLES;
velo... |
#define HANDMADE_MATH_IMPLEMENTATION
#include "ui_objects.h"
static v4 DefaultCubeAABBVertex[] = {
v4{ 0.5f, 0.5f, 0.5f, 1.0f },
v4{ -0.5f, 0.5f, 0.5f,1.0f },
v4{ -0.5f, -0.5f, 0.5f,1.0f },
v4{ 0.5f, -0.5f, 0.5f, 1.0f},
v4{ 0.5f, 0.5f, -0.5f, 1.0f },
v4{ -0.5f, 0.5f, -0.5f, 1.0f },
v4{ -0.5f, -0.5f, -0.5f... |
#include "MapFrame.h"
#include <QPainter.h>
#include <QEvent.h>
#include <QTooltip>
#include "Bot/Bot.h"
#include "Game/Npc.h"
#define ZOOM_MIN 10
#define ZOOM_MAX 100
#define MOUSE_WHEEL_SENSITIVITY 50
#define POLYGON_POINT_REMOVE_DIST 20
#define POLYGON_POINT_MOVE_DIST 10
#define TOOLTIP_DIST 10
#define POLYGON_S... |
#include "types.h"
#include "kernel.hh"
#include "spinlock.hh"
#include "condvar.hh"
#include "proc.hh"
#include "fs.h"
#include "file.hh"
#include "net.hh"
#include "major.h"
#include "netdev.hh"
#include "lwip/tcpip.h"
#include "lwip/ip.h"
#include "lwip/netif.h"
#include "lwip/dhcp.h"
#include "lwip/sockets.h"
#inc... |
/*
* PublishManager.cpp
* The BSD License
*
* Copyright (c) 2015, <EMAIL>
* 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. Redistr... |
/**
* particle_filter.cpp
*
* Created on: Jan 28, 2021
* Author: <NAME>
*/
#include "particle_filter.h"
#include <math.h>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <random>
#include <string>
#include <vector>
#include <unordered_set>
#include <cfloat>
#include "hel... |
/***********************************************************************************
* Revised BSD License *
* Copyright (c) 2014, <NAME> <<EMAIL>> *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, wit... |
#include"Physics.h"
#include"commonFile.h"
Ground::Ground(): Planes()
{
point=Vector3D(0.0f,0.0f,0.0f);
normal=Vector3D(0.0f,1.0f,0.0f);
}
Physics::Physics()
{
}
Physics::~Physics()
{
}
void Physics::Update(float dt)
{
// compute speed
speed = linearVelocity.Norm();
// compute the dr... |
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <rtsLog.h>
#include <rtsSystems.h>
#include <rts.h>
#include "daq_l3.h"
inline float fswap(float swapped)
{
unsigned int* uintptr = (unsigned int*) &swapped;
unsigned int uintvar = l2h32(*uintptr);
float* floatvar = (floa... |
/*
* Copyright (c) [2020] Huawei Technologies Co., Ltd. All rights reserved.
*
* OpenArkCompiler is licensed under the Mulan Permissive Software License v2.
* You can use this software according to the terms and conditions of the MulanPSL - 2.0.
* You may obtain a copy of MulanPSL - 2.0 at:
*
* https://opensou... |
#include <iostream>
template <typename T>
class StackheapPtr
/*
Class that is just as unsafe as a normal pointer,
meaning that you must not forget to call delete (if the class was default-initialized [with nullptr]).
But!!!
The pointer can refer to memory on the heap (allocated with new) -- this is if it w... |
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1992 - 2015
// ** University Corporation for Atmospheric Research(UCAR)
// ** National Center for Atmospheric Research(NCAR)
// ** Research Applications Laboratory(RAL)
// ** P.O.Box 3000, Boulder, Colorado, 80307... |
/***************************************************
This is our GFX example for the Adafruit ILI9341 Breakout and Shield
----> http://www.adafruit.com/products/1651
Check out the links above for our tutorials and wiring diagrams
These displays use SPI to communicate, 4 or 5 pins are required to
interface (R... |
// bin/compile-train-graphs-without-lexicon.cc
// Copyright 2009-2012 Microsoft Corporation
// 2012-2015 Johns Hopkins University (Author: <NAME>)
// 2021 Xiaomi Corporation (Author: <NAME>)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache L... |
/*
* Copyright 2018-2019 Autoware Foundation. 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 requi... |
/*
* Copyright (c) 2019 <NAME>
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <cstdlib>
#include <vector>
#include <set>
#include "delfem2/mshmisc.h" // Rotate, NormalMeshTri3D
#include "delfem2/dtri.h"
#include "delfem2/b... |
/**
* Copyright 2020 Huawei Technologies Co., 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 agreed ... |
// license:GPL-2.0+
// copyright-holders:<NAME>
#include "emu.h"
#include "includes/pocketc.h"
#include "includes/pc1350.h"
static const POCKETC_FIGURE /*busy={
"11 1 1 11 1 1",
"1 1 1 1 1 1 1",
"11 1 1 1 1 1",
"1 1 1 1 1 1",
"11 1 11 1e"
},*/ def={
"11 111 111",
"1 1 1 1",
"1... |
#include "Shader.h"
#include "util.h"
#include <cmath>
#include <algorithm>
using namespace vec;
using namespace util;
using namespace std;
const int SS = 3;
const float bound = 128.0;
// lightning ~100k?
/*
const double L = -0.109331824;
const double R = -0.109327731;
const double T = -0.894943939;
const double B =... |
/*********************************************************************
<NAME> 2016
http://trederia.blogspot.com
tmxlite - Zlib license.
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.
Permis... |
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
extern unsigned char *galaxian_attributesr... |
/**
* This node:
* - receives data from STM32 and publishes it
* - receives byte array from hardware_bridge and send it to STM32 via UART
*/
#include "ros/ros.h"
#include "std_msgs/UInt16.h"
#include "std_msgs/UInt8MultiArray.h"
#include "serial/serial.h"
#include <sstream>
#include <string>
#include <vector>
#... |
#include <iostream>
#include <chrono>
#include "opencv2/core.hpp"
#include "opencv2/core/ocl.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/videoio.hpp"
#include "opencv2/highgui.hpp"
using namespace cv;
using namespace std;
const char* keys =
"{ i input | | input ... |
#include "Lexer.h"
#include "Panic.h"
#include "Localization.h"
void Lexer::preprocessDefineExisting () {
//It starts from input pointer.
//Brute Force, Chernov! Brute Force!
for(int i = 0; i < replace.size(); i++) {
auto r = replace[i];
char *p = curfile->input;
char *pos;
... |
/*
===========================================================================
GWEN
Copyright (c) 2010 Facepunch Studios
Copyright (c) 2017-2018 <NAME>
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to dea... |
#include "pressio_rom_galerkin.hpp"
#include "pressio_apps.hpp"
namespace{
class FakeApp
{
public:
using nativeVec = Epetra_Vector;
template<typename T> using rcp = std::shared_ptr<T>;
using scalar_type = double;
using state_type = Epetra_Vector;
using velocity_type = state_type;
public:
FakeApp() = d... |
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM library. For more information and source code
// availability visit ht... |
// Charged axial-vector meson photoproduction proceeding through a pseudoscalar (pion) exchange
//
// Author: <NAME> (2020)
// Affiliation: Joint Physics Analysis Center (JPAC)
// Email: <EMAIL>
// ---------------------------------------------------------------------------
// References:
// [1] arX... |
/*
* ctrunner : CPPUnit console text runner.
* - outputs text progression as log message on clog stream (defaultly stderr)
* - optionnaly output xml file using JUnit ant task XML format.
*
* Tabs = 4 chars
* copyright (C) 2016 <NAME>
*
* This program is free software; you can redistribute it and/or
* modify... |
#include "mySvg.h"
QList<QGraphicsItem *> SVG::readFromSVG(const QString & path)
{
QList<QGraphicsItem *> list;
QDomDocument doc;
QFile file(path);
if(!file.open(QIODevice::ReadOnly))
{
qDebug() << "Fichier inaccessible";
throw 1;
}
if(!doc.setContent(&file))
{
... |
/*
* Copyright (c) 2022 <NAME>.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <iostream>
#include <cmath>
#include <vector>
#include <glm/glm.hpp>
#include "Sphere.h"
#include "SceneObject.h"
#include "Ray.h"
#include <GL/... |
//
// Created by Lai on 2021/1/8.
//
#include <logUtil.h>
#include "ResultShader.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
void ResultShader::Init() {
char vShaderStr[] =
"#version 300 es \n"
"layout(location = 0) in vec4 vPosition; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.