text stringlengths 3.08k 22k |
|---|
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cassert>
#include <queue>
#include <vector>
using namespace std;
typedef pair<int,int> PII;
const int N = 15;
const int MAXS = (1 << N) + 5;
const int pos[N][2] ={
... |
/***
* Copyright (C) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
*
* File:SymbolParser.cpp
****/
#include "SymbolParser.h"
#include <assert.h>
enum Actions { ACTION_SHIFT = 1, ACTION_REDUCE = 2, ACTION_GOTO = 3, ACTIO... |
#include <3ds.h>
// Fix std::vector<MemInfo> == operator
/*static bool operator==(const MemInfo left, const MemInfo right)
{
return left.base_addr == right.base_addr && left.size == right.size;
}*/
#include "CTRPluginFramework/System.hpp"
#include "CTRPluginFrameworkImpl/System.hpp"
#include "CTRPluginFramew... |
/*******************************************************************************
* Copyright 2016 ROBOTIS 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.o... |
/* main.cpp */
//----------------------------------------------------------------------------------------
//
// Project: ParserGen 1.00
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
// Copyright (c) 2017 <NAME>. ... |
#include "Player.h"
Player::Player(){
keyUp = keyLeft = keyDown = keyRight = false;
rot = 0.0f;
radius = 500.0f;
rot = -90.0f;
rotOffs = 0.0f;
acc = 0.01f;
theta = 3*PI/2;
phi = PI/3;
deltaRot = 0.0f;
pos.setSpherical(theta, phi, radius);
}
void Player::update(){
if(pos.distance(coin->pos.x, coin->pos.y, c... |
////////////////////////////////////////////////////////////////////
// Standard includes:
#include <iostream>
#include <sstream>
////////////////////////////////////////////////////////////////////
// File includes:
#include "include/markerDetectorBW.hpp"
#include "include/markerBW.hpp"
using namespace std;
#defin... |
// MexJSBSim.cpp : Defines the entry point for the console application.
// by <NAME>. 2007
#include "stdafx.h"
#include <Windows.h>
#include "mex.h"
#include "mclcppclass.h"
#include "matrix.h"
#include <iostream>
#include <string>
#include <vector>
#include <FGFDMExec.h>
#include <models/FGPropagate.h>
#include <mod... |
#include "Random.h"
#include "stdlib.h"
#include "math.h"
double Random::rnd01(){
double ii=((double) rand ()) / ((double)RAND_MAX);
return ii;
} /* end rnd01 */
;
void Random::setSeed (int seed) {
srand (seed);
} /* end rndseed */
double Random::rnduniform (double min, double max) {
... |
#include <sys/stat.h>
#include "pngfile.h"
#include <stdexcept>
#include <cstring>
#include <iostream>
#define PNG_HEADER_SIZE 8
static uint32_t
changeEndianness(uint32_t value)
{
uint32_t result = 0;
result |= (value & 0x000000FF) << 24;
result |= (value & 0x0000FF00) << 8;
result |= (value & 0x00FF0... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
//====================================================================================================================================================
// Copyright 2020 Lake Orion Robotics FIRST Team 302
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associ... |
#include "Dynamics_System.hpp"
Dynamics_Sys::Dynamics_Sys(double dt_In) {
nbody = 0;
njoint = 0;
dt = dt_In;
}
void Dynamics_Sys::Add(BodyPtr bodyPtr_In) {
Body_ptr_array.push_back(bodyPtr_In);
nbody++;
}
void Dynamics_Sys::Add(JointPtr jointPtr_In) {
Joint_ptr_array.push_back(jointPtr_In);
... |
/*
* Copyright (c) 2005, <NAME> and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the file license.txt.
*/
#in... |
#include "Counters.h"
#include "Indention.h"
#include "TimeAndMemoryWatcher.h"
#include "WriteToStream.h"
#include <atomic>
#include <csignal>
#include <iostream>
#include <map>
#include <mutex>
#include <regex>
#include <set>
#include <string>
#include <thread>
#include <utility>
#include <vector>
s... |
/*
* Cell_LGChemNMC.cpp
*
* One of the child classes that implements a real cell.
* The cycling parameters are for a high energy 18650 NMC cell manufactured by LG Chem.
* The degradation parameters are set such that each mechanism clearly affects the battery life (which is not the case in reality).
*
* Copyright... |
#include "world.h"
/*template<class T>
constexpr const T& clamp(const T& v, const T& lo, const T& hi) {
return (v < lo) ? lo : (v > hi) ? hi : v;
}*/
void collide(Cell &cell1, Cell &cell2) {
Vect diff = cell1 - cell2;
//double k = 1 - sqrt(diff.size() / (cell1.getRadius() + cell2.getRadius()));
doub... |
//
//
// MIT License
//
// Copyright (c) 2017 Stellacore Corporation.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to ... |
/*
* Copyright 2019 Xilinx 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 ... |
#include "Image.h"
#include "imgui/imgui.h"
#include <glad/glad.h>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
#include <array>
#include <algorithm>
#include <iostream>
#include "imgui_operators.h"
#include "Renderers/Renderers.h"
#include "BoardView.h"
Image::Image(const filesystem::path &file, bool no... |
/*
* pa_driver_test:
*
* Prints sensor information and prints object 0 position continuously.
*/
#include "pa_driver/packets.hpp"
#include "arduino/packet_reader.hpp"
#include "serial/serial_port.hpp"
#include "util/logging.hpp"
#include "util/command_line.hpp"
#include <cstdio>
#include <chrono>
#include <map>
s... |
/// $Id$
///
/// A program to generate sample data based on the Risk taxonomy used by
/// <NAME> <<EMAIL>>, 2010/12/02. It
/// generates a dataset with six columns named: rowid, k1, k2, k3, jc, and
/// js, where the field jc and js are a concatenations of k1, k2 and k3
/// connected either with coma (jc) or space (js)... |
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include <boost/uuid/string_generator.hpp>
#include <boost/program_options.hpp>
#include <base/logging.h>
#include <base/contrail_ports.h>
#include <base/task.h>
#include <io/event_manager.h>
#include <cmn/agent_cmn.h>
#include <cfg/init_config.... |
#include "extension-pcre.h"
static struct pcre_cache_entry *
get_pcre(const char *string, unsigned char options) {
const char *err;
int eos; /* Error offset */
char buf[256];
pcre_cache_entry *entry = (pcre_cache_entry*)malloc(sizeof(pcre_cache_entry));
entry->error = NULL;
entry->re = NULL;
... |
/*
* Copyright (c) 2010 WiYun Inc.
* Author: luma(<EMAIL>)
*
* For all entities this program is free software; you can redistribute
* it and/or modify it under the terms of the 'WiEngine' license with
* the additional provision that 'WiEngine' must be credited in a manner
* that can be be observed by end ... |
// 1999-06-03 bkoz
// 2003-07-22 <NAME>
// Copyright (C) 1999-2017 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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 Fou... |
// Copyright 2018 The Dawn Authors
//
// 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 t... |
#include "block.h"
#define PI 3.14159265
block::block(const char* img, const char* fallimg)
{
this->texture = core::loadImg(img);
this->fall_texture = core::loadImg(fallimg);
this->speed = 10;
this->tickA = 0;
this->tickB = 0;
this->tickC = 0;
this->tickD = 0;
this->tickE = 0;
this... |
//辅助Actor编程模型的消息机制
// - 支持发布-订阅模式
// - 支持请求-回复模式
// - 支持组合式设计
//生命周期管理启发自 http://nercury.github.io/c++/interesting/2016/02/22/weak_ptr-and-event-cleanup.html
//
//消息中间人broker可同时作为消息发布者publisher和请求发出者client
//作为publisher时,使用方式如下
// 1. 通过publish接口发送消息,注意只接收单个参数,发出时为const&
// 2. 要订阅消息可以使用以下接口
// 2.1 subsc... |
//
// @author <NAME>
//
#include <chrono>
#include <iterator>
#include <fstream>
#include "../inc/MLPModel.hpp"
#include "../inc/log.h"
#include "../inc/code.h"
#include "../inc/Timer.hpp"
MLPModel::MLPModel(int nbOfHiddenLayer, int nbOfNeuron) {
for (int i = 0; i < nbOfHiddenLayer; i++) {
hiddenLayers.p... |
//
// Copyright 2020 Autodesk
//
// 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 ... |
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <TlHelp32.h>
#include <Shlwapi.h>
#include <stdexcept>
#include <vector>
#include <cstdint>
#include <cstdio>
#include <cassert>
/*
* Shellcode to load a DLL, 32 and 64 bit versions
*
* Placeholders:
*
* 0x17...17 is the ret address
* 0x18...18 is the DL... |
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string>
#include "util.h"
#include "ContentProcessor.h"
using std::string;
using std::cin;
using std::cout;
using std::ofstream;
using std::ifstream;
using std::endl;
int checkAccess(string i, string o) {
ifstream tempReader;
ofstream tempWrit... |
#include "history_widget.h"
#include "ui/widgets/misc.h"
#include "ui/imgui_util.h"
#include "core/util.h"
#include "ui/widgets/modal.h"
HistoryWidget::HistoryWidget(UIState_ptr ui_state) : Drawable(ui_state) {
}
std::string getMonth(int month) {
switch (month) {
case 1:
return "Janvier";
case ... |
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstdio>
#include <cmath>
using namespace std;
struct Rank {
int pos;
double score;
Rank(int p, double s): pos(p), score(s) {}
};
bool operator<(const Rank &a, const Rank &b) {
return a.score >... |
// Copyright (C) 2019 <NAME> and Artificial Necessity
// This code distributed under zlib, see LICENSE.txt for terms.
#pragma once
#include <array>
#include <unordered_map>
#include "energy.hpp"
#include "mesh.hpp"
// Helper function to create bending energies
std::vector<std::shared_ptr<Energy>> get_edge_energies... |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtWinExtras module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid c... |
/* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certai... |
//
// AsusHIDDriver.cpp
// AsusHID
//
// Copyright © 2019 <NAME>. All rights reserved.
//
#include "AsusHIDDriver.hpp"
#define super IOHIDEventDriver
OSDefineMetaClassAndStructors(AsusHIDDriver, IOHIDEventDriver);
bool AsusHIDDriver::start(IOService *provider) {
DBGLOG("hid", "start is called");
if (!sup... |
//
// Utility.cpp
// SFML Chess
//
// Created by <NAME> on 4/16/21.
// Copyright © 2021 Andy. All rights reserved.
//
#include "Utility.hpp"
unsigned int flip_index_v(unsigned int i) {
return i ^ 56;
}
char num_to_char(int input) {
char c;
switch (input) {
case 0:
c = 'a';
... |
/**
* Simple checks to make sure netlist data structures are consistent. These include checking for duplicated names, dangling links, etc.
*/
#include <cstdio>
#include <cstring>
using namespace std;
#include "vtr_assert.h"
#include "vtr_log.h"
#include "vpr_types.h"
#include "vpr_error.h"
#include "globals.h"
#inc... |
// Scintilla source code edit control
/** @file LexCSS.cxx
** Lexer for Cascading Style Sheets
** Written by <NAME>
** Improved by <NAME> (CSS2)
**/
// Copyright 1998-2002 by <NAME> <<EMAIL>>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include... |
/*
* Copyright (c) 2021 Samsung Electronics 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... |
/*
* Copyright (c) 2019 <NAME>,
* Copyright (c) 2019 Triad National Security, LLC, as operator of
* Los Alamos National Laboratory.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), t... |
#include "proj/rope.hpp"
#include <UnitTest++/UnitTest++.h>
#include <sstream>
#include <utility>
namespace proj
{
using std::string;
using std::vector;
string str1 = "This_is_a_test.";
string str2 = "Here is a much longer string for testing!";
string paragraph1 = "Lorem ipsum dolor sit amet, consectetur ... |
// Copyright (c) <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT License was not distributed with this file,
// You can obtain one at https://spdx.org/licenses/MIT.html.
#include "im.h"
#include "deps/imgui/imgui_draw.cpp"
#include "deps/imgui/imgui_wid... |
/*
* Copyright 2015 <NAME> <<EMAIL>>
* All rights reserved. Distributed under the terms of the MIT license.
*/
// Part of this code was taken from BitmapMovie class, by Be, Inc.
/*
----------------------
Be Sample Code License
----------------------
Copyright 1991-1999, Be Incorporated.
All rights reserved.
Redi... |
#include <osmium/io/any_input.hpp>
#include <osmium/io/any_output.hpp>
#include <osmium/io/any_compression.hpp>
#include <osmium/io/input_iterator.hpp>
#include <osmium/thread/pool.hpp>
#include <osmium/thread/util.hpp>
#include <osmium/util/memory_mapping.hpp>
#include "splitter.hpp"
#include "tile_grid.hpp"
//#inclu... |
// Copyright 2019 Google LLC
//
// 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 writi... |
#include "core/context.h"
#include "funcs/crf_decoding.h"
#include "test_saber_func.h"
#include "test_saber_base.h"
#include "tensor_op.h"
#include "saber_types.h"
#include "saber/core/tensor_op.h"
#include <vector>
using namespace anakin::saber;
int num_in = 7;
int ch_in = 7;
int h_in = 1;
int w_in = 1;
int GLB_fla... |
#include "lib.h"
bool index_has_been_built(BIN_REL_OBJ *rel, uint32 size) {
if (size == 1)
return true;
uint32 *rev_idxs = get_right_to_left_indexes(rel, size);
// The first two elements having the same value (an impossible situation for
// a valid index) is used to signal that the index has not been bu... |
/********************************************************************** <BR>
This file is part of Crack dot Com's free source code release of
Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
information about compiling & licensing issues visit this URL</a>
<PRE> If that doesn't help, ... |
// Copyright <NAME> 2021.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <containers/algorithms/erase.hpp>
#include <containers/assign.hpp>
#include <containers/at.hpp>
#include <containe... |
/*****************************************************************************
* This file is provided under the Creative Commons Attribution 3.0 license.
*
* You are free to share, copy, distribute, transmit, or adapt this work
* PROVIDED THAT you attribute the work to the authors listed below.
* For more information,... |
///
/// \file hugo_compteur.cpp
/// \brief Classe compteur, permettant la création de compteurs paramétrables avec aiguille et effet de verre.
/// \details Classe héritée de objet_virtuel. Utilisée pour l'affichage du compteur de vitesse, du compteur rpm, de la jauge d'essence ainsi que que de la jauge de température. ... |
#include "Globals.h"
#include "Application.h"
#include "ModuleTextures.h"
#include "ModuleInput.h"
#include "ModuleRender.h"
#include "ModuleFadeToBlack.h"
#include "ModuleAudio.h"
#include "ModulePlayer.h"
#include "ModuleRoad.h"
// Reference at https://www.youtube.com/watch?v=OEhmUuehGOA
ModulePlayer::ModulePlayer... |
//#include <grpc++/grpc++.h>
#include <grpcpp/grpcpp.h>
#include "gnmi.h"
#include "google/rpc/code.pb.h"
//#include "p4/server/v1/config.grpc.pb.h"
#include "p4/v1/p4runtime.grpc.pb.h"
#include <string>
#include <iostream>
#include "uint128.h"
#include <cstdio>
#include "PI/proto/pi_server.h"
#include "device_mgr.h"
... |
/*
* Copyright (c) CERN 2013
*
* Copyright (c) Members of the EMI Collaboration. 2011-2013
* See http://www.eu-emi.eu/partners for details on the copyright
* holders.
*
* Licensed under the Apache License, Version 2.0
* See the LICENSE file for further information
*
*/
/**
* @file UgrLocPlugin_da... |
#include <boost/program_options.hpp>
#include <cmath>
#include <complex>
#include <cstdint>
#include <omp.h>
#include <opencv2/opencv.hpp>
#include <vector>
using complex = std::complex<double>;
constexpr double PI = 3.14159'26535'89793'23846'26433'83279'50288;
std::uint8_t colu(double t0) {
double t = std::fmod(st... |
// Copyright (C) 2010 <NAME>. All Rights Reserved.
// The original author of this code can be contacted at: <EMAIL>
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain th... |
#ifdef __APPLE__
#include <OpenGL/Opengl.h>
#include <GLUT/glut.h>
#else
#include <GL/glew.h>
#include <GL/glut.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include <string.h>
#include <iostream>
#include <iomanip>
#include <sstream>
using namespace std;
... |
// MIT License
//
// Copyright (c) 2022 <NAME>
//
// ░░░░░░░░░░░░░░░░░
// ░░░░░░░█▀▀░▀█▀░░░
// ░░░█░█░█░░░░█░░░░
// ░░░█▀▀░▀▀▀░▀▀▀░░░
// ░░░▀░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░░░░
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "... |
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <unistd.h>
using namespace std;
int randVal(int min,int max){
return (rand() % (max - min + 1) + min);
}
class ShipCreation{
public:
void CarrierPlayer(){
ShipClassSelect=1;
cout<<" Level 1: (1) 12x AA Guns (2) 4x 78M... |
#include "middleearth.h"
#include <algorithm>
#include <array>
#include <cstdlib>
#include <cmath>
// New shuffle method that uses the Mersenne Twister engine
void shuffle (vector<string>::iterator first, vector<string>::iterator last, mt19937& g) {
for (auto i=(last-first)-1; i>0; --i) {
unsigned int n =... |
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <map>
#include <math.h>
void DisplayError();
////////////////////////////////////////////////////////////
/// A class to simplify sha... |
/*
Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of version 2 of the GNU General Public License as
published by the Free Software Foundation.
This program is distributed in the hope that it would... |
#define _USE_MATH_DEFINES
#include <cmath>
#include <algorithm>
#include <unistd.h>
#include <fstream>
#include <iomanip>
#include <map>
#include <Eigen/Dense>
#include <boost/math/constants/constants.hpp>
#include <boost/numeric/ublas/assignment.hpp>
#include "bayesopt/bayesopt.hpp"
#include "specialtypes.hpp"
#includ... |
/******************************************************************************
Copyright (c) 2020, <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 t... |
/**
* Copyright 2017 <NAME>
* All rights reserved.
* See License.txt file
*
*/
#include "learning/linearProgramming.h"
#include <cassert>
#include <iostream>
#include <vector>
#include "constraintList.h"
#include "horizon.h"
#include "mdpConfiguration.h"
#include "policy.h"
#include "rewards.h"
#include "tran... |
#include "stdafx.h"
#include "ResponseListener.h"
#include "SessionStatusListener.h"
#include "TableListener.h"
#include "LoginParams.h"
#include "SampleParams.h"
#include "CommonSources.h"
void printHelp(std::string &);
bool checkObligatoryParams(LoginParams *, SampleParams *);
void printSampleParams(std::string &, L... |
/*
* ** 27-12-2015
* **
* ** The author disclaims copyright to this source code. In place of
* ** a legal notice, here is a blessing:
* **
* ** May you do good and not evil.
* ** May you find forgiveness for yourself and forgive others.
* ** May you share freely, never taking more than you give.
* **... |
// license:BSD-3-Clause
// copyright-holders:<NAME>
// MSM65X2 generic disassembler
#include "emu.h"
#include "msm65x2d.h"
u32 msm65x2_disassembler::opcode_alignment() const
{
return 1;
}
#define P std::ostream &stream, const data_buffer &opcodes, u8 opcode, u16 pc
const msm65x2_disassembler::instruction msm65x2_d... |
// @file real-numbers-serialization-client - code to simulate a client to show
// efficacy in a server-client relationship. The client releases all contexts
// and keys (just to be extra safe), then loads in contexts and keys from the
// server. The client then does operations on the data before re-serialization
// and... |
// Example program
#include <iostream> // for all I/O related operations..
#include <string> // to use string
#include <cstring> // to perform C-string related opreations. Used strcmp()
#include <fstream> // for file-related operations..
#include <ctime> // to get the current system date..
#include <sys/stat.... |
/*
* logcolor is hosted at http://github.com/bariscelik/logcolor
* and distributed under the MIT License (MIT).
*
* logcolor - colorized log viewer utility
* Copyright (c) 2020 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated doc... |
/**
* @author <NAME>
* @date 2.20.2020
* @version 1.0
* @brief Wrapper around a polygonal model.
*/
#include "TreeIOPolygonalModel.h"
namespace treeacc
{
namespace impl
{
/// @brief Internal implementation of the PolygonalModel class.
class PolygonalModelImpl
{
public:
/// @brief Import OBJ file from given... |
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD 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, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without... |
//Hunar @ <EMAIL>
#pragma once
#include <iostream>
#include <vector>
#include <math.h>
//////// helper functions;
double gen_weight() {
return ((double)rand() / (double)RAND_MAX) - 0.5;
}
double activationF(double val) {
return std::tanh(val);
}
//// class declarations
struct Edge;
struct Node;
struct Layer;
str... |
#include "stdafx.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if _WIN32
#include "../libbiokanga/commhdrs.h"
#else
#include <sys/mman.h>
#include <pthread.h>
#include "../libbiokanga/commhdrs.h"
#endif
#include "ChromMap.h"
CChromMap::CChromMap(void)
{
m_pCSV = NULL;
m_pChromMaps = NULL;
... |
// Gui
#include <core/ui_ctrlmeta.h>
#include <util/ui_aniamtion.h>
#include <core/ui_color_list.h>
#include <control/ui_scrollbar.h>
// C++
#include <cassert>
// Private
#include "../private/ui_private_control.h"
// ui namespace
namespace LongUI {
// UIScrollBar类 元信息
LUI_CONTROL_META_INFO(UIScrollBar, "scrol... |
// Author of FLOAM: <NAME>
// Email <EMAIL>
// Homepage https://wanghan.pro
#include "floam/laserProcessingClass.hpp"
void LaserProcessingClass::init(lidar::Lidar lidar_param_in) {
lidar_param = lidar_param_in;
}
void LaserProcessingClass::featureExtraction(const pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_in, pcl::Po... |
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <string>
using namespace std;
/*
* The shuffle funtion returns a random number between a min and a max.
*/
int shuffle(int min = 1, int max = 13){
return rand() % ((max-min) + 1) + min;
}
/*
* The Role of the Wallet is to store the mo... |
/*
* Copyright 2010 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... |
// Author(s): <NAME>
// Copyright: see the accompanying file COPYING or copy at
// https://svn.win.tue.nl/trac/MCRL2/browser/trunk/COPYING
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
/// \file network2l... |
#include "constants.hpp"
#include <string>
#include <math.h>
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <nav_msgs/Odometry.h>
#include <tf/transform_broadcaster.h>
#include <boost/shared_ptr.hpp>
#include <fcntl.h>
#include <termios.h>
#include <stdio.h>
#include <math.h>
#include <iostream>
#includ... |
#include "cpu.hpp"
#define X ((opcode & 0x0F00) >> 8)
#define Y ((opcode & 0x00F0) >> 4)
#define N (opcode & 0x000F)
#define NN (opcode & 0x00FF)
#define NNN (opcode & 0x0FFF)
/* Calls RCA 1802 program at address NNN.
* Not necessary for most ROMs. */
void Cpu::opcode_0x0NNN(const uint16_t opcode = 0x0000) { pc += ... |
/**
* @file testIMUSystem
* @author <NAME>
*/
#include <iostream>
#include <CppUnitLite/TestHarness.h>
#include <gtsam/slam/BetweenFactor.h>
#include <gtsam/slam/PriorFactor.h>
#include <gtsam/slam/RangeFactor.h>
#include <gtsam_unstable/slam/PartialPriorFactor.h>
#include <gtsam/nonlinear/NonlinearEquality.h>
#i... |
/** *************************************************************************
schprel.cpp - schpecial relativistic motion simulator
-------------------
begin : Tue Jun 4 2002
copyright : (C) 2002 by mflider
email : <EMAIL... |
/*
* Copyright (c) 2011 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* This test ensures that the front/middle/backends can deal with the
* math.h functions which have builtins and llvm intrinsics.
*
... |
#include "core.h"
#include "wbcompeldinventory.h"
#include "wbcompelditem.h"
#include "configmanager.h"
#include "idatastream.h"
#include "wbeventmanager.h"
#include "eldritchgame.h"
WBCompEldInventory::WBCompEldInventory() : m_InventoryMap(), m_InitialItems() {}
WBCompEldInventory::~WBCompEldInventory() {}
/*virtua... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "Shader.h"
#include "Camera.h"
#include <iostream>
#include <vector>
#include <fstream>
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
vo... |
#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <thread>
#include <iterator>
#include <fstream>
#include <vector>
#include <future>
namespace tools_
{
class join_threads
{
std::vector<std::thread> &threads;
public:
explicit join_threads(std::vector<std::thr... |
#include "app.h"
#include "search.h"
#include "util.h"
#include "explorer.h"
#include <cstdarg>
#include <cstdio>
#include <cstring>
#include "render.h"
#include "highlighter.h"
#include "indexer.h"
static struct app_t* appInstance = 0;
int pairForColor(int colorIdx, bool selected)
{
if (render_t::instance()) {... |
/*
* Copyright (c) 2011 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merg... |
//
// Created by <NAME> (@Forkercat) on 2021/6/21.
//
#include "render.h"
#include <spdlog/spdlog.h>
static const Float s_ShadowViewSize = 3.0f;
static const Float s_ShadowNearPlane = 0.1f;
static const Float s_ShadowFarPlane = 20.f;
static const Float s_CameraNearPlane = 0.01f;
static const Float s_CameraFarPlane ... |
// Include libraries
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace std;
using namespace cv;
// Video Class
class Video{
private:
public:
Video(){
this->cam_input=-1;
this->location="";
}
... |
/************************************************************************
*
* display.cpp - Definitions of the result display subsystem
*
* $Id$
*
************************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor lice... |
//
// yl_code.cpp
//
// Created by <NAME> on 05/04/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "yl_code.h"
#include <unordered_map>
yl_opinst::yl_opinst()
: _i( 0 )
{
}
yl_opinst::yl_opinst( yl_opcode opcode, unsigned r, unsigned a, unsigned b )
: _i( (uint8_t)opcode
... |
#include <gtsam/geometry/Pose3.h>
#include <gtsam/geometry/Cal3_S2Stereo.h>
#include <gtsam/nonlinear/Values.h>
#include <gtsam/nonlinear/NonlinearEquality.h>
#include <gtsam/nonlinear/NonlinearFactorGraph.h>
#include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h>
#include <gtsam/slam/BetweenFactor.h>
#include <gtsam/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.