text stringlengths 3.08k 12.5k |
|---|
#include "CLX000CanBus.h"
#include <QDataStream>
#include <QDebug>
#include <QtSerialPort/QSerialPortInfo>
#include "CRC16.h"
QList<QCanBusDeviceInfo> CLX000CanBus::interfaces() {
QList<QCanBusDeviceInfo> result;
static QString const description("CLX000");
// Find all available USB-CDC devices.
aut... |
/**
* @brief
* @author <NAME>
* @updated 2019/09/18 10:50:16 @
* @ref https://ppdr.softether.net/ros-pointcloud-zatxy
*/
#include <numeric> // to calculate average
#include <ros/ros.h>
#include <pcl/point_types.h>
#include <pcl_ros/point_cloud.h>
#include <sensor_msgs/LaserScan.h>
#include <sensor_msgs/PointClo... |
#include <iostream>
#include <thread>
#include <csignal>
#include "discord/discord.h"
#include "utils.cpp"
discord::Core* core{};
discord::Activity activity{};
bool IsProcessRunning(const wchar_t* processName)
{
bool exists = false;
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32... |
/*
* Copyright (c) 2004-2005 Massachusetts Institute of Technology.
* All Rights Reserved.
*
* MIT grants permission to use, copy, modify, and distribute this software and
* its documentation for NON-COMMERCIAL purposes and without fee, provided that
* this copyright notice appears in all copies.
*
* MIT provid... |
// Copyright 2009-2019 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2019, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
// See the file CONTRIBUTORS.TXT in the top level directo... |
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007-2016 musikcube team
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redist... |
#include <iostream>
// support
#include <cassert>
// get the grid
#include <pyre/grid.h>
#include "../../mito.h"
namespace mito {
template <int D, typename T = real>
class Vector {
public:
// 1d conventionally packed grid
using pack_t = pyre::grid::canonical_t<1>;
// T on the h... |
#include "tb2maxconstr.hpp"
#include "core/tb2enumvar.hpp"
MaxConstraint::MaxConstraint(WCSP* wcsp, EnumeratedVariable** scope, int arity)
: DPGlobalConstraint(wcsp, scope, arity)
, top(MIN_COST)
, largest(MIN_COST)
{
weightMap.resize(arity);
}
MaxConstraint::~MaxConstraint()
{
}
void MaxConstraint::... |
#include <fastsynth/local_synth_encoding.h>
#include <util/expr_initializer.h>
#include <util/prefix.h>
#include <util/suffix.h>
#include <algorithm>
#include <iterator>
local_synth_encodingt::local_synth_encodingt(
const namespacet &ns,
const solutiont &solution_template,
const synth_encodingt::constraintst &... |
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at http://ec... |
////////////////////////////////////////////////////////////////////////////////
///
/// @file bcm5719_NVM_sim.cpp
///
/// @project bcm5719
///
/// @brief bcm5719_NVM_sim
///
////////////////////////////////////////////////////////////////////////////////
///
//////////////////////////////////////////////... |
#include <cmath>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
#define NMAX 100000
#define LOGN 17
#define MMAX 100000
typedef long long int64;
struct Query {
int u, v;
int t;
int64 answer;
};
struct Modify {
int u, id;
int prev;
};
static in... |
///////////////////////////////////////////////////////////////////////////////
//
// File: rdbuffer.cpp
//
// Description: Interface to the callbacks/deque methods on the driver
//
//
// Copyright (c) 2012 Agilent Technologies. All rights reserved.
// $Log: rdbuffer.cpp $
// Revision 12 2013/05/08 01:28:05 +... |
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define vl vector < ll >
#define vvl vector < vl >
#define pll pair < ll, ll >
struct hash_pair {
template < class T1, class T2 >
size_t operator()(const pair < T1, T2 > & p) const {
auto hash1 = hash < T1 > {}(p... |
/**
* Query
* @author astaroth
* @date 10/9/20
*
* @brief
*/
#include "Query.hpp"
void Query::search_proteins() {
/// Find all ORFs, independently from their RFs
auto orfs {find_orfs()};
/// If we don't find any ORF, it is an island
if (is_island)
return; // exit early
/*
* ... |
// Software License for MTL
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: <NAME> and <NAME>
//
// ... |
//===- CommandLine.cpp ----------------------------------------------------===//
//
// The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------------------... |
/**
* @file date.cpp
* @brief Implementação da classe date.
* @author <NAME>.
*/
#include "date.h"
/**
* @brief Construtor padrão da classe date.
*/
date::date(){ year_ = 0; month_ = 0; day_ = 0;};
/**
* @brief construtor parametrizado da classe date.
* @param d Número que representa o dia de uma data.
* @param m ... |
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#include "db/blob/blob_garbage_meter.h"
#include <string... |
#include <unordered_map> //std::unordered_map
#include <iostream> //std::cout
#include <string> //std::string
#include <sstream> //std::stringstream
#include <vector> //std::vector
#include <chrono> //timing
#include <set> //set
#include "kmers.hpp"
#include "general.hpp"
#include "gzstream.h"
#include "DNA.hpp"
int ... |
/*
MIT License
Copyright (c) 2016 <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, distrib... |
/*
* Copyright 2010 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkGr.h"
/* Fill out buffer with the compressed format Ganesh expects from a colortable
based bitmap. [palette (colortable) + indices].
At the moment Ganesh o... |
#include "parse_termdata.h"
#include <algorithm>
ControlDataStatePtr ControlDataState::add_state(char c, ControlDataStatePtr next_state) {
auto & cur_state = this->next_states[(int)(c & 0xFF)];
if (cur_state)
return cur_state;
cur_state = next_state;
return cur_state;
}
AnyStatePtr ControlD... |
/*
Copyright (c) 2017-2018 by <NAME>
Released under the MIT License.
See the provided LICENSE.TXT file for details.
*/
#include <QtCore/QDir>
#include <QtCore/QDataStream>
#include <widgets/files/WFiles.h>
#include <QDebug>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QMessageBox>
#include <utils/logs/ULog... |
/*
* Copyright (c) 2021 Nuovation System Designs, LLC
* 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/L... |
//
// Created by <NAME> on 16/10/14.
// Copyright (c) 2014 ___FULLUSERNAME___. All rights reserved.
//
#include "Halfedge.h"
#include "Vertex.h"
#include "Face.h"
#include "HMesh.h"
#include <iostream>
using namespace std;
Halfedge::Halfedge(HMesh* hMesh) : hMesh{hMesh} {
#ifdef DEBUG
static int idGlobal = 0;
... |
// -*-Mode: C++;-*-
//*BeginLicense**************************************************************
//
//---------------------------------------------------------------------------
// TAZeR (github.com/pnnl/tazer/)
//---------------------------------------------------------------------------
//
// Copyright ((c)) 2019, ... |
#include <set>
#include <sstream>
#include <string>
#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Frontend/ASTConsumers.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Rewrite/Core/Rew... |
#include <nodes/grasp_detection_server.h>
GraspDetectionServer::GraspDetectionServer(ros::NodeHandle& node)
{
cloud_camera_ = NULL;
// set camera viewpoint to default origin
std::vector<double> camera_position;
node.getParam("camera_position", camera_position);
view_point_ << camera_position[0], camera_pos... |
// Copyright 2011 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
#include "meshing.h"
#include "terrain.h"
#include "mesh.h"
#include "fileUtils.cuh"
#include <unordered_map>
#include <iostream>
namespace
{
struct QuadFace
{
Float3 point;
Axis axis;
};
struct QuadFaceHasher
{
unsigned long long operator() (const QuadFace& v) const
{
return Float3Hasher()(... |
/*
* Copyright 2009-2021 The VOTCA Development Team (http://www.votca.org)
*
* 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
*
* Unle... |
#include "levelBALP.hpp"
#include <cmath>
using namespace std;
levelModel::levelModel(int nvar1, std::vector<std::vector<cutInfo> > const &cuts, double l, std::vector<std::vector<double> > const& center) :
nvar1(nvar1), cuts(cuts), center(center), l(l) {}
vector<double> levelModel::getFirstStageColLB() {
// v >=... |
#include "example.h"
ExampleClass::ExampleClass()
{
std::cout << "class instantiated" << std::endl;
// initialize windows
cv::namedWindow("frame", CV_WINDOW_AUTOSIZE);
cv::moveWindow("frame", 50, 50);
cv::namedWindow("last keypoints", CV_WINDOW_AUTOSIZE);
cv::moveWindow("last keypoints", 50, 500);
cv:... |
// AI.cpp: implementation of the CAI class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "x_ray.h"
#include "xr_creator.h"
#include "fstaticrender.h"
#include "AI.h"
//////////////////////////////////////////////////////////////////////
// Construct... |
#include "visitor_pprint.hpp"
#include "../external/loguru.hpp"
#include "../ast/ast_structures.hpp"
std::string visitor_pprint::get_loc(node* node) {
std::stringstream ss;
ss << "loc: " << node->loc.begin.line << "." << node->loc.begin.column;
return ss.str();
}
void visitor_pprint::visit_node(node* n... |
#include "NBox.h"
#include <cmath>
#include "Utilities/PMPLExceptions.h"
#include "nonstd/container_ops.h"
/*------------------------------ Construction --------------------------------*/
NBox::
NBox(const size_t _n) : m_center(_n, 0),
m_range(_n, Range<double>(std::numeric_limits<double>::lowest(),
... |
/*This file is part of the FEBio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio.txt for details.
Copyright (c) 2019 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any person obtaining ... |
#include "BabystepsTimer.h"
#include <QtEvents>
#include <QtMultimedia/QSound>
#include <QtWidgets/QApplication>
#include <QtWidgets/QTextBrowser>
#include <thread>
static const long SECONDS_IN_CYCLE = 120;
static const std::string BACKGROUND_COLOR_NEUTRAL = "#ffffff";
static const std::string BACKGROUND_COLOR_PASS... |
#include "Common.h"
#include <iostream>
#include <float.h>
extern "C"
void sqaodc_version(int *version, const char **simd) {
*version = SQAODC_VERSION;
#if defined(__SSE2__)
*simd = "sse2";
#elif defined(__AVX2__)
*simd = "avx2";
#else
*simd = "none";
#endif
}
#ifndef SQAODC_CUDA_ENABLED
bool sqaod:... |
#include <Adv.H>
#include <Adv_F.H>
#include <VisMF.H>
#include <TagBox.H>
#include <ParmParse.H>
int Adv::verbose = 0;
Real Adv::cfl = 0.9;
int Adv::do_reflux = 1;
int Adv::NUM_STATE = 1; // One variable in the state
int Adv::NUM_GROW = 3; // number o... |
/**
* this code is based on the copyright 2020 Robosense demo
* https://github.com/RoboSense-LiDAR/rs_driver/blob/release/demo/demo.cpp
**/
#include <rs_driver/api/lidar_driver.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <iostream>
#include <deque>
#include <string>
#include <chrono>
#include <unistd.h>... |
#include "Transport.h"
// ------------- configuration ------------
Status Transport::getStatus(int diffSeconds) {
if (diffSeconds < -60) {
// too late
return off;
} else if (diffSeconds < 90) {
return missed;
} else if (diffSeconds < 3 * 60) {
return run;
} else if (diffSeconds < 3.5 * 60 ) {
return ... |
#include "CpuGrid.h"
#include <vr/stl_utils.h>
bool sphereOverlapsAabb( const vr::vec3f& boxMin, const vr::vec3f& boxMax, const vr::vec3f& center, float radius )
{
float s;
float d = 0.0f;
//find the square of the distance
//from the sphere to the box
for( int i = 0 ; i < 3 ; ++i )
{
if( center[i] < boxMin[i... |
/*-- (c) Copyright 2014 Xilinx, Inc. All rights reserved.
--
-- This file contains confidential and proprietary information
-- of Xilinx, Inc. and is protected under U.S. and
-- international copyright and other intellectual property
-- laws.
--
-- DISCLAIMER
-- This disclaimer is not a ... |
// EXAMPLE: for script compilation navigate to the cheerp_test_app dir and run:
// $ ./build.sh cpp/buttons/buttons.cpp
// EXAMPLE: for manual compilation navigate to the cheerp_test_app dir and run:
// $ mkdir -p app/cheerp/buttons; /opt/cheerp/bin/clang++ -target cheerp-wasm cpp/buttons/buttons.cpp -I cpp/dom -o app/... |
// Copyright (c) 2009-2010, <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 c... |
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include <stdio.h>
#include <net/if.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <linux/rtnetlink.h>
int rtnl_receive(int fd, struct msghdr *msg, int flags)
{
int len;
do {
len = ... |
#include <Arduino.h>
#ifdef ESP32
#include <WiFi.h>
#else
#include <ESP8266WiFi.h>
#endif
#include "AudioFileSourceICYStream.h"
#include "AudioFileSourceBuffer.h"
#include "AudioGeneratorMP3.h"
#include "AudioOutputI2S.h"
#include <PubSubClient.h>
// To run, set your ESP8266 build to 160MHz, update the SSID i... |
#include "injector.h"
#include <zero/log.h>
#include <zero/proc/process.h>
#include <zero/filesystem/path.h>
#include <shellcode/alloc.h>
#include <shellcode/free.h>
#include <shellcode/loader.h>
#include <shellcode/loader/payload.h>
#include <elfio/elfio.hpp>
#include <unistd.h>
constexpr auto ALLOC_SIZE = 0x21000;
... |
/** Copyright (C) 2019 IBM Corporation.
*
* Authors:
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* 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/LIC... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Files: mpi_main.cpp clusters.cpp clusters.h utils.h utils.cpp */
/* dbscan.cpp dbscan.h kdtree2.cpp kdtree2.hpp */
/* geometric_partitioning.h geometric_partitioning.cpp */
/* */
... |
//----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2018, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the follow... |
#include <Python.h>
#include <string>
#include <vector>
#include <map>
#include <exception>
#include <cstring>
#include "picojson.h"
static bool debug_py2pico = false;
/**
* Convert Python compound object to picojson
*/
picojson::value pyobject_to_picojson(PyObject *pyobj) {
if (pyobj == Py_None) {
// is Non... |
#include "DrawView.h"
#include "LoginScene.h"
using namespace cocos2d;
DrawView::DrawView()
{
}
DrawView::~DrawView()
{
points.clear();
lines.clear();
}
cocos2d::CCScene *DrawView::scene()
{
CCScene *scene = CCScene::create();
DrawView *layer = DrawView::create();
scene->addChild(layer);... |
#include "MCTS.h"
#include "board.h"
#include <cmath>
#include <random>
#include <stdlib.h>
#include <vector>
MCTS::MCTS(Predictor* _predictor, Board& bd, int _pov, int _simulate_cnt) :
predictor(_predictor),
simulate_cnt(_simulate_cnt) {
root = new mcts_node(bd, _pov);
C_puct = 0.001;
}
mcts_node* MC... |
#include "ossimKakaduJpipInfo.h"
#include "ossimKakaduJpipHandler.h"
#include <ossim/base/ossimUrl.h>
#include <ossim/base/ossimFilename.h>
#include <ossim/base/ossimXmlDocument.h>
#include <ossim/support_data/ossimTiffInfo.h>
#include <ossim/projection/ossimProjectionFactoryRegistry.h>
//---
// Kakadu code has define... |
#include <bits/stdc++.h>
#include "nim.h"
using namespace std;
Move::Move(int amount = 0, int heap = -1): amount(amount), heap(heap) { }
Nim::Nim() {
heaps[0] = 3;
heaps[1] = 4;
heaps[2] = 5;
}
/**
* Returneaza o lista cu mutarile posibile
* care pot fi efectuate de player
*/
std::vector<Move> Nim::g... |
//
// astar.cpp
// vixen
//
// Created by <NAME> on 18/03/2016.
// Copyright © 2016 <NAME>. All rights reserved.
//
#include "astar.hpp"
Astar::Astar(SDL_Renderer *renderer)
{
this->worldGrid = worldGrid;
this->renderer = renderer;
this->tileSurface= SDL_LoadBMP("/Users/lutzee/Dropbox/Uni/vixen/vixen/... |
///*|-----------------------------------------------------------------------------
// *| This source code is provided under the Apache 2.0 license --
// *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
// *| See the project's LICENSE.md for details. ... |
#include <ros/ros.h>
#include <nav_msgs/OccupancyGrid.h>
#include <sensor_msgs/point_cloud2_iterator.h>
#include <sensor_msgs/Range.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <tf2_ros/transform_listener.h>
#include <tf2_sensor_msgs/tf2_sensor_msgs.h>
#include <pcl_ros/point_cloud.h>
#include <string>... |
#include <cstdlib>
#include <iostream>
#include <unistd.h>
#include "classes.cpp"
int boasVindas();
int escolhaOpcoes();
int fazerLogin(int opcaoEscolhida);
void registrar();
Laboratorio labOficial = Laboratorio();
Usuario usuarioAtual;
// INICIO
int boasVindas(){
int opcaoEscolhida;
std::cout<<"============... |
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include "mmult.h"
void matrix_multiply_ref(out_T offsets[CLASSES], w_T weights[CLASSES][FEAT], in_T in[TILING][FEAT], ap_uint<8> out[TILING])
{
// matrix multiplication of a A*B matrix
out_T out_tmp[TILING];
for (int i = 0; i < TILING; ++i)... |
// functions checked by http://tool.chacuo.net/cryptdes
#include <bitset>
#include <iostream>
#include "des_parameters.h"
using namespace std;
template<int inSize, int outSize>
bitset<outSize> permutation(bitset<inSize> block, int pBox[])
{
bitset<outSize> processed;
for(int i = 1; i <= outSize; ++i)
processed[... |
/*
* Caesar.cpp
*
* Created on: 17.04.2016
* Autor: <NAME>
* Matr.: 000000
* Datum: 17.04.2016
*/
#include <iostream>
/**
* @brief Verschl�sselungsfunktion
* Verschl�sselt ein Zeichen c unter Verwendung der Lookup-Table.
*/
char encrypt_mkl(char c)
{
char lookup_enc[2][26] = { { 'A', 'B', '... |
/*
* File: BoardScanner.cpp
* Author: axel
*
* Created on September 30, 2016, 10:22 PM
*/
#include "BoardScanner.h"
#include <iostream>
BoardScanner::BoardScanner(Board &board) :
_board(board) {
}
BoardScanner::RowColors BoardScanner::countRowColors() {
BoardScanner::RowColors counts;
for (in... |
/**
* Copyright (c) 2021 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... |
/**
* SerialReader.cpp
* A GNU Linux/Unix Project.
* Ref: Sep 22, 2020
* Author: ubdussamad <<EMAIL>>
* Based on the tutorial: https://blog.mbedded.ninja/programming/operating-systems/linux/linux-serial-ports-using-c-cpp/
*/
#include "SerialReader.hpp"
#include <iostream>
serialReader::serialReader ( const... |
/****************************************************************************
*
* Copyright (c) 2020 ThunderFly s.r.o.. 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. Redistribut... |
#include "MargolusNeighborhoodSimulator.h"
#include <omp.h>
inline int randomNumber(int low, int high)
{
return low + rand() / (RAND_MAX / (high - low));
}
MargolusNeighborhoodSimulator::MargolusNeighborhoodSimulator(const char ruleLUT[16], const bool changesAvailableLUT[16], const sf::Color& particleColor, const s... |
/*
* @Autor: taobo
* @Date: 2020-05-29 20:08:38
* @LastEditTime: 2020-12-22 12:40:48
*/
#include "Package.h"
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/ty... |
/*=============================================================================
FrFont.cpp: Font object.
Copyright Jul.2016 <NAME>.
=============================================================================*/
#include "Engine.h"
/*----------------------------------------------------------------------------... |
// These benchmarks explicitely time plane and polygon extraction
// It also measures how CPU scores scale with the problem
#include <iostream>
#include <sstream>
#include <vector>
#include <cstdlib>
#include <Polylidar/Polylidar.hpp>
#include <benchmark/benchmark.h>
#include <Open3D/IO/ClassIO/ImageIO.h>
#include <Op... |
//
// item.cpp
// SimpleNethack
//
// Created by 尤大智 on 2018/5/10.
// Copyright © 2018年 尤大智. All rights reserved.
//
#include "item.hpp"
Item::Item(Position position,int which_floor, ItemType item_type, std::string name, char display, int value, int weight, int attack_bonus, int defense_bonus, int hp_bonus, bool ... |
#include <uWS/uWS.h>
#include <iostream>
#include "json.hpp"
#include "PID.h"
#include <math.h>
#include <limits>
#include <vector>
#include <fstream>
// for convenience
using json = nlohmann::json;
using namespace std;
// For converting back and forth between radians and degrees.
constexpr double pi() { return M_PI; ... |
// Copyright [2017] <<NAME>>
#include "disdensity.h"
cimg_library::CImg<unsigned int> output::get_img( std::vector<std::vector<double>> density,
bool savefig,
const std::string filename) {
std::ofstream fout(fi... |
// Copyright (c) 2012 Cygnus Software
//
// 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, publi... |
/* Copyright (c) 2017-2018 <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,
... |
#include <stdlib.h>
#include <stdio.h>
#include <iostream> // std::cout, std::endl
#include <iomanip> // std::setfill, std::setw
#include <set>
std::set<int> vals;
int comparisons = 0;
int first_r3 = 0;
int last_r3 = 0;
////////////////////////////////////////////////////////////////////////////
/// This i... |
// Copyright (c) 2008-2010 Kent State University
// Copyright (c) 2011-2012 Texas A&M University
//
// This file is distributed under the MIT License. See the accompanying file
// LICENSE.txt or http://www.opensource.org/licenses/mit-license.php for terms
// and conditions.
#include <iostream>
#include <origin/math/m... |
/**************************************************************************/
/*!
@file MCP47X6.cpp
@author <NAME>
@license BSD (see license.txt)
This file is part of an Arduino library to interface with the
Microchip MCP47X6 series of Digital-to-Analog converters which are
connected via t... |
#include <Arduino.h>
#include <I2CSoilMoistureSensor.h>
#include <Wire.h>
#include <ESP8266WiFi.h>
#include <WiFi-Credentials.h>
#include <Adafruit_MQTT.h>
#include <Adafruit_MQTT_Client.h>
#include <SPI.h>
#include <StopWatch.h>
#define DEEP_SLEEP_MODE
#ifdef DEEP_SLEEP_MODE
#define SLEEP_TIME 300e6
#define SLEEP... |
#include "Level.hpp"
#include "Engine/Rng.hpp"
#include "Entity/Player.hpp"
#include "Entity/Equippable.hpp"
Actor* Level::createMap(int width, int height, unsigned int seed, int depth)
{
map = std::make_unique<Map>(width, height);
explored.resize(width * height, false);
this->seed = seed;
this->depth = depth;
R... |
// I2Cdev library collection - SSD1308 I2C device class header file
// Based on Solomon Systech SSD1308 datasheet, rev. 1, 10/2008
// 8/25/2011 by <NAME> <<EMAIL>>
//
// This I2C device library is using (and submitted as a part of) <NAME>'s I2Cdevlib library,
// which should (hopefully) always be available at https://g... |
// Copyright 2020 Open Source Robotics Foundation, 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 appli... |
/*
Test.h - Test library for Wiring - implementation
Copyright (c) 2006 <NAME>. All right reserved.
*/
// include this library's description file
#include <CubicGasSensors.h>
#include <Streaming.h>
#ifdef ESP8266
#include <SoftwareSerialESP.h>
#else
#include <SoftwareSerial.h>
#endif
CubicGasSensors::Cubic... |
#include "gtest/gtest.h"
#include "Trajectory.hpp"
#include "bib/Logger.hpp"
#include "kdtree++/kdtree.hpp"
TEST(Trajectory, LowLevel){
typedef KDTree::KDTree<SA_sample, KDTree::_Bracket_accessor<SA_sample>, L1_distance<SA_sample::value_type, SA_sample::value_type> > tree_type;
SA_sample x1 = {{0.5, -0.1},{1}... |
/**********************************************************************************/
/* This file is part of spla project */
/* https://github.com/JetBrains-Research/spla */
/****************************************************************... |
/**
* @file source.cpp
* Copyright (c) 2021 <NAME>, Rythe Interactive
* SPDX-License-Identifier: MIT
*/
#include <llri/llri.hpp>
#include <iostream>
// See 001_validation.
void callback(llri::message_severity severity, llri::message_source source, const char* message, [[maybe_unused]] void* userData)
{
if (se... |
#include <stdio.h>
#include <stdlib.h>
#include <libusb-1.0/libusb.h>
#include <unistd.h>
#include <pthread.h>
#include <time.h>
#include <stdint.h>
#include <semaphore.h>
#include <fstream>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include <opencv2/core/core.hpp>
#include <opencv2/hi... |
#include <dirent.h>
#include <unistd.h>
#include <cassert>
#include <filesystem>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <string>
#include <vector>
#include "linux_parser.h"
using std::stof;
using std::string;
using std::to_string;
using std::vector;
string LinuxParser::OperatingSystem() {
... |
/* The MIT License (MIT)
PSpice to Oscad Schematic Converter
Copyright (c) 2014, <NAME> and <NAME>, FOSSEE, IIT Bombay
See LICENSE.txt
*/
#include "header.h"
//~ #include "component.h"
//~ #include "misc.h"
//Pin constructor reading values from corresponding component's pspice library
Pin::Pin(istream& in)
{
s... |
//
// MIT License
//
// © ESI Group, 2015
//
// 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, pu... |
#include "ieslight.h"
#include "image.h"
#include "utils.h"
#include "sampling.h"
#include "animatedtransform.h"
// how do to serialize texture
int GetIESLightSerializedSize() {
return 1 + // type
16 + // toWorld
16 + // toLight
3 + // emission
1; // ies int... |
//////////////////////////////////////////////////////
//
// client.cpp
//
//////////////////////////////////////////////////////
/*
LICENSE: BEGIN
===============================================================================
@author <NAME>
@email <EMAIL>
@source https://github.com/shan-anand
@brief HTTP library imp... |
//
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstring>
#include <string>
#include <vector>
#include <memory>
#include <TClass.h>
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "FWCore/Framework/interface/EventSetupRecordIntervalF... |
/*
* Copyright (C) 2015 <NAME>
*
* This program 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.
*
* This program is distribute... |
#include "Model_PLY.h"
Model_PLY::Model_PLY()
{
}
float* Model_PLY::calculateNormal(float *coord1, float *coord2, float *coord3)
{
/* calculate Vector1 and Vector2 */
float va[3], vb[3], vr[3], val;
va[0] = coord1[0] - coord2[0];
va[1] = coord1[1] - coord2[1];
va[2] = coord1[2] - coord2[2];
vb[0] = coord1[0]... |
#include "Board.h"
#include <algorithm>
#include <iostream>
#include <chrono>
#include <thread>
std::list<Pos> Tile::updated{};
bool operator==(const Pos& p1, const Pos& p2){
return (p1.r == p2.r) && (p1.c == p2.c);
}
bool operator<(const Pos& p1, const Pos& p2) {
if (p1.r == p2.r) {
... |
#include "zShaderProgram.hpp"
zShaderProgram * zShaderProgram::_currentShader = NULL;
//Constructor
zShaderProgram::zShaderProgram()
{
//initialize
_programID = 0;
_vertexLocation = -1;
_texcoordLocation = -1;
_colorLocation = -1;
_textureLocation = -1;
_projectionMatrixLocation = -1;
_cameraMatrixLocation = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.