text stringlengths 3.08k 22k |
|---|
// Copyright (C) 2018 ETH Zurich
// Copyright (C) 2018 UT-Battelle, LLC
// All rights reserved.
//
// See LICENSE for terms of usage.
// See CITATION.md for citation guidelines, if DCA++ is used for scientific publications.
//
// Author: <NAME> (<EMAIL>)
// <NAME> (<EMAIL>)
//
// This file tests the statistical... |
/**
* A thread synchronization barrier implemented using erl_nif synch facilities
*/
class Barrier {
private:
uint N_THREADS;
uint waiting_threads_counts[2];
uint current_counter;
ErlNifMutex* mtx;
ErlNifCond* cond;
public:
explicit Barrier(uint n_Threads) {
N_THREADS = n_Threads;
waiting_threads_counts... |
/**
* \class FLEWFST
* \file FLEWFST.cpp
*
* \brief Provide a class for a Weighted Finite State Transducer (WFST)
*
* This class provides the data structures and methods for a WFST
* that contains a representation of a grammar (CFG, PCFG, or similar) with
* weights over transitions in the CFG-right-hand-side sy... |
/**
* @file src/tools/graphviz/GvExportWorkFlow.cpp
* @date Jul. 2016
* @author PhRG - opticalp.fr
*/
/*
Copyright (c) 2016 <NAME> / Opticalp
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 Softwa... |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sw=4 et tw=98:
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#inc... |
/********************************************************************************
* Copyright 2009 The Robotics Group, The <NAME>-<NAME> Institute,
* Faculty of Engineering, University of Southern Denmark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in comp... |
#include <cstring>
#include <cstdlib>
#include <pthread.h>
#include <ttcl.h>
#include <string>
#include <sstream>
#include <unistd.h>
#include <sys/time.h>
#include "scemi.h"
class InterpPassData {
public:
unsigned int m_port;
unsigned long long m_long_out;
unsigned long long m_long_in;
unsigned long l... |
#include "pch.h"
#include "physics.h"
#include "globals.h"
#include "dbg.h"
#include "pencil.h"
int RigidBody::baseID = 0;
RigidBody::RigidBody()
{
id = baseID++;
mass = (Real)1;
inertiaMoment = (Real)10;
bounds.topLeft = { (Real)0.5,(Real)0.5 };
bounds.bottomRight = { (Real)-0.5,(Real)-0.5 };
}
RigidBody::RigidB... |
/* Custom Libraries */
#include "../include/jointMap.h"
using namespace std;
using namespace Eigen;
/* Global Variables */
string pose_filepath = "../../rgbd/src/pose.txt";
string rgbd_folder_path = "../../rgbd/src/images/";
// RGB-D Camera Intrinsics params
double fx = 518.0, fy = 519.0; // Focal Lengths
double cx... |
#include <stdio.h>
#include <stdlib.h>
#include<iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
#define CHUNKSIZE 2
class item
{
private:
int item_id;
float price;
public:
void setid (int id) {item_id = id; }
int getid() {return item_id; }
v... |
#include <sstream>
#include "TechLab/information/BaseLocation.h"
#include "TechLab/util/Util.h"
const int NearBaseLocationTileDistance = 5;
BaseLocation::BaseLocation(sc2::Agent & bot, const std::vector<const sc2::Unit*> & resources)
: bot_(bot)
, is_start_location_ (false)
, left_ (... |
#include <stdio.h>
#include <getopt.h>
#include <list>
#include <math.h>
#include "common/jexception.h"
#include "stream/stream.h"
#include "feature/feature.h"
#include "modulated/modulated.h"
#include "postfilter/postfilter.h"
#include "beamformer/beamformer.h"
using namespace sndfile;
using namespace std;
#define SO... |
/*
ISC License
Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder
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.
... |
// PyITypeObjects.cpp
//
// Misc support for IType* helper objects.
//
// @doc
#include "stdafx.h"
#include "PythonCOM.h"
/////////////////////////////////////////////
//
// A little "memory manager", allowing me to
// build a block of memory in increments, but
// have it freed in one call. Create a root, then
// p... |
#include "Interpolate.hpp"
#include <iostream>
#include <typeinfo>
#include <locale>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <ctime>
#include <cstring>
// Needed by {set,get}rlimit().
#include <sys/resource.h>
#include <sys/time.h>
#include <unistd.h>
constexpr unsigned MEM... |
#include "include/graph.hpp"
#include <new>
#include <string>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "include/debug/ClassManager.hpp"
#include <iostream>
#include <iomanip>
/*
*
* Graph
*
*/
// Scalar (base) constructor
Graph::Graph
(
Shader& _shader... |
/*
WebServe
Copyright 2018-2022 <NAME>.
Originally taken from:
Imagine
Copyright 2018-2022 <NAME>.
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.... |
#include"ParticleSystem.h"
std::mt19937 Random::s_RandomEngine;
std::uniform_int_distribution<std::mt19937::result_type> Random::s_Distribution;
float common_lerp(float x, float y, float t) {
return x * (1.f - t) + y * t;
}
ParticleSystem::ParticleSystem(Sprite* sprite){
m_ParticlePool.resize(1000);
m_ParticleS... |
#include "process.h"
#include "mouse_drive.h"
#include "exceptions.h"
void data_processor::opponent_finder() {
try {
contours.clear();
threshold(data, temp, 241, 255, THRESH_BINARY);
erode(temp, temp, kernel1);
dilate(temp, temp, kernel2);
medianBlur(temp, temp, 5);
findContours(temp, contours,... |
/**
* @file ecc_code.cpp
*
* @brief Supporting routines for the ecc_code class
*
* @author <NAME>
* Contact: <EMAIL>
*/
#include <iostream>
#include <string>
#include <algorithm>
#include <random>
#include <fstream>
/* libraries */
#include "libtp.h"
#include "Eigen/Eigen"
#include "rapidjson/document.h"
#inclu... |
#include <iostream>
#include <string>
#include "game.h"
#include "command.h"
#include "textdisplay.h"
#include "cell.h"
#include "controller.h"
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/gtc/matrix_transform.hpp>
#include "stb_image.h"
using namespace std;
const char* vertexShaderSource = "#version 330 ... |
#include "osrm_action.hpp"
Array OSRMAction::parse_waypoints(osrm::json::Array waypoints) {
Array waypoints_result;
for(auto const& waypointValue : waypoints.values) {
auto waypoint = waypointValue.get<osrm::json::Object>();
Hash waypoint_result;
for(std::pair<std::string, osrm::util::... |
#include <assert.h>
#include <streamer/core/VideoEncoder.h>
#include <streamer/core/Debug.h>
// @todo remove the USE_GRAPH and Graph include
#if defined(USE_GRAPH)
# include <streamer/utils/Graph.h>
#endif
VideoEncoder::VideoEncoder()
:encoder(NULL)
,vflip(true)
,frame_num(0)
{
}
VideoEncoder::~VideoEncoder()... |
// 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... |
/* -------------------------------------------------------------------------
*
* contrib/sepgsql/dml.c
*
* Routines to handle DML permission checks
*
* Copyright (c) 2010-2012, PostgreSQL Global Development Group
*
* -------------------------------------------------------------------------
*/
#include "postgre... |
// Created by <NAME> on 24.12.2020
// Copyright 2020 ETH Zurich
#include <cassert>
#include <iostream>
#include <memory>
#include <sstream>
#include <string>
#include <distr/distrbasic.h>
#include <dump/dump.h>
#include <dump/raw.h>
#include <geom/mesh.h>
#include <parse/argparse.h>
#include <parse/parser.h>
#include... |
#include "CompareData.h"
static void Mis_Heapsort( const long N, real Array[], long IdxTable[] );
static void Heapsort_SiftDown( const long L, const long R, real Array[], long IdxTable[] );
//-------------------------------------------------------------------------------------------------------
// Function : S... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/image_loading_tracker.h"
#include <string>
#include <vector>
#include "base/bind.h"
#include "base/file_util.h"
... |
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#include "base/command_line.h"
#include "base/files/file_util.h"
#... |
/* Copyright 2019 The TensorFlow 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 applicable law or a... |
//
// main.cpp
// Hw11
// Simplified Vieshow Cinemas Ticket System
//
// Created by <NAME> on 2017/12/5.
// Copyright © 2017年 <NAME>. All rights reserved.
//
#include <iostream>
#include <fstream>
using namespace std;
struct showTime {
int movieCode;
char dates[12];
int numSessions;
char sessionT... |
/**
* Copyright (C) 2018-2021, Axis Communications AB, Lund, Sweden
*
* 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 requ... |
# pragma once
#include "lib/render/light.hpp"
#include "lib/render/body.hpp"
using namespace std;
class Scene;
namespace scene { vector<Scene*> scenes; }
class Scene {
public:
vector<Body> bodies;
vector<Light> lights;
Body world;
string name;
Scene(co... |
///
/// MIT License
/// Copyright (c) 2018-2019 <NAME>
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT ... |
/*
* Copyright (c) 2011 SURFnet bv
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condition... |
#ifdef __APPLE__
#include <util.h>
#else
#include <pty.h>
#endif
#include <fcntl.h>
#include <gmock/gmock.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sysexits.h>
#include <unistd.h>
#include <regex>
#include <string>
#include "gtest/gtest.h"
#include "iassert.hpp"
#include "tmt_test.hp... |
/*
* peg_transfer.cpp
*
* Author(s): <NAME>
* Created on: 2018-01-11
*
*/
#include <irob_subtask_logic/peg_transfer.hpp>
namespace saf {
PegTransfer::PegTransfer(ros::NodeHandle nh, ros::NodeHandle priv_nh,
std::vector<std::string> arm_names):
AutosurgAgent(nh, priv_nh, arm_names)... |
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 ... |
/*
* TLSH is provided for use under two licenses: Apache OR BSD.
* Users may opt to use either license depending on the license
* restictions of the systems with which they plan to integrate
* the TLSH code.
*/
/* ==============
* Apache License
* ==============
* Copyright 2013 Trend Micro Incorporated
*
*... |
// Copyright (c) by respective owners including Yahoo!, Microsoft, and
// individual contributors. All rights reserved. Released under a BSD (revised)
// license as described in the file LICENSE.
#include <cmath>
#include <cerrno>
#include <cfloat>
#include <memory>
#include "reductions.h"
#include "rand48.h"
#include... |
/**
* This file is part of Intrinsic3D.
*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2019, Technical University of Munich. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions ... |
/*=========================================================================
Program: ALBA (Agile Library for Biomedical Applications)
Module: albaColor
Authors: <NAME>
Copyright (c) BIC
All rights reserved. See Copyright.txt or
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warr... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
//#include <pthread.h>
#include "mtx_critsect.cpp"
//#include "mtx_critsect.h"
#inclu... |
/*
** Yab2Cpp
**
** Transpiler by <NAME>
**
** Based on Yab
**
*/
#include "yab2cpp.h"
/* static initializers */
unordered_map<string, unique_ptr<fn> > fn::functions;
unsigned int fn::nextID;
/* function definitions */
void fn::dumpFunctionIDs()
{
varNames << "Function IDs\n";
auto i=functions.begin();
if (i==func... |
// *******************************************************************************************************************************
// *******************************************************************************************************************************
//
// Name: processor.c
// Purpose: Processor Emulation... |
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2020 RDK Management
*
* 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 cop... |
/*
* Copyright 2006-2007 <NAME> <<EMAIL>>
*/
/* This file is part of Ragel.
*
* Ragel 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 2 of the License, or
* (at your option) any la... |
#include "event-loop.h"
static std::atomic<bool> running;
static std::atomic<bool> mainThreadStillWaitingGuiEvents;
static uv_mutex_t mainThreadWaitingGuiEvents;
static uv_mutex_t mainThreadAwakenFromBackground;
static uv_prepare_t mainThreadAwakenPhase;
static uv_async_t keepAliveTimer;
static uv_thread_t *thread;... |
#include <string>
#include <CLI/CLI.hpp>
#include <ghc/fs_std.hpp> // filesystem
#include <igl/Timer.h>
#include <nlohmann/json.hpp>
#include <tbb/parallel_for.h>
#include <tbb/parallel_sort.h>
#include <io/read_obj.hpp>
#include <io/read_rb_scene.hpp>
#include <io/serialize_json.hpp>
#include <logger.hpp>
#include <... |
#include "header.hh"
using namespace std;
double targets[8][20];
int main(int argc, char*argv[]) {
//here we load the data
ifstream in0("data/data100.csv");
ifstream in1("data/data400.csv");
ifstream in2("data/data700.csv");
ifstream in3("data/V_0.csv");
ifstream in4("data/V_20.csv")... |
#include <iostream>
#include <fstream>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include "dist.h"
#include "tree_gen.h"
using namespace std;
char conff[300];
char dataf[300];
char parf[300];
ofstream outconf, outdata;
long ranseed = -3333;
int max_depth,fan_out,... |
#include "sdsl/nn_dict_dynamic.hpp"
#include "sdsl/nearest_neighbour_dictionary.hpp"
#include "sdsl/util.hpp"
#include "gtest/gtest.h"
#include <string>
#include <random>
namespace
{
std::string temp_dir;
// The fixture for testing class nn_dict_dynamic.
class nn_dict_dynamic_test : public ::testing::Test
{
prot... |
//===-- ValueObjectMemory.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
/*
Copyright (c) 2014, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of condit... |
/*
* This file is part of hipSYCL, a SYCL implementation based on CUDA/HIP
*
* Copyright (c) 2019-2020 <NAME> and contributors
* 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. Redis... |
// 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/fpdfapi/fpdf_page.h"
#include "core/include/fpdfapi/fpd... |
#include <libudev.h>
#include <poll.h>
#include "detection.h"
#include "deviceList.h"
using namespace std;
/**********************************
* Local defines
**********************************/
#define DEVICE_ACTION_ADDED "add"
#define DEVICE_ACTION_REMOVED "remove"
#define DEVICE_TYPE_DEVICE "usb_device"
#de... |
// This file is part of Notepad2.
// See License.txt for details about distribution and modification.
//! Lexer for GraphViz Dot, blockdiag.
#include <cassert>
#include <cstring>
#include <string>
#include <string_view>
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
#include "WordList.h"
#include ... |
#include <queue>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxN = 3003, maxM = 33001, INF = 0x3f3f3f3f;
int N, M, S, T, lnk[maxN], cur[maxN], lev[maxN];
struct Edge {
int nxt, v, w;
} e[maxM << 1 | 1];
void addEdge(int u, int v, int w) {
e[M] = (Edge){lnk[u], v, w};
lnk... |
// addrspace.cc
// Routines to manage address spaces (executing user programs).
//
// In order to run a user program, you must:
//
// 1. link with the -N -T 0 option
// 2. run coff2noff to convert the object file to Nachos format
// (Nachos object code format is essentially just a simpler
// version of th... |
// Line algorithm test.
#include "croquis/line_algorithm.h"
#include <assert.h>
#include <stdio.h>
#include <memory> // make_unique
#include <random>
namespace croquis {
class LineAlgorithmTester {
private:
int xmin_, ymin_, xmax_, ymax_;
public:
LineAlgorithmTester(int xmin, int ymin, int xmax, int ... |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
/**
* Author: <NAME>
* Origin: Stellenbosch University
* For: IARPA SuperTools Project
* license: MIT
* Description: Function definitions for.geo file drawing
*/
#include "drawing.hpp"
using namespace std;
int draw_geofile(section_data section_info, ldf ldf_info, const string &outpath,
... |
/*
Copyright ©1994-1996, <NAME>
All rights reserved.
File: CSoundHub.c
Created: Sunday, December 25, 1994, 11:06
Modified: Monday, August 19, 1996, 21:54
*/
#include "CSoundHub.h"
#include "CBasicSound.h"
#include "CHuffProcessor.h"
#include "CRateSound.h"
#include "CSoundMixer.h"
#include "Memor... |
/*************************************************************************/
/* slider.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
/*
Copyright (c) 2019 <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 retain the above copyright
notice, this list of conditions and the follo... |
// graph_disp_draw.cpp
// Graphics display drawing code
// Copyright 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 rig... |
/****************************************************************************/
/* */
/* MALPINX SOURCE CODE (C) 2020 <NAME> (HISAHI). */
/* SEE THE LICENSE FILE IN THE SOURCE ROOT DIRECTORY FOR LICENSE INFO. */
/* ... |
/***
*
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object ... |
#include "GraphicConsole.h"
#include <cstdlib>
#include <iostream>
// Portable helpers
static int Stricmp(const char* str1, const char* str2) { int d; while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; } return d; }
static int Strnicmp(const char* str1, const char* str2, int n) { int d =... |
#include <iostream>
#include "sre/SDLRenderer.hpp"
#include "sre/SpriteAtlas.hpp"
#include "sre/Texture.hpp"
#include "sre/Profiler.hpp"
#include "glm/gtc/random.hpp"
#include "glm/ext.hpp"
#include "Box2D/Box2D.h"
using namespace sre;
using namespace std;
// Captures debug information from Box2D as lines (polygon fi... |
/*
* LedControl.cpp - A library for controling Leds with a MAX7219/MAX7221
* Copyright (c) 2007 <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
* re... |
#include <iostream>
#include <cstdlib>
#include "SortArray.h"
// README
// Time Complexity: Worst-case, Best-case, Average
// Space Complexity: Total, Auxiliary
void swap(int *array, int i, int j) {
int temp = array[i];
array[i] = array[j];
array[j] = temp;
}
// Insertion Sort
// Time Complexity: O... |
#include <zephyr.h>
#include <init.h>
#include <logging/log.h>
#include <usb/class/usb_hid.h>
#include <usb/usb_device.h>
#include "input/touchpad.h"
#include "output/output.h"
#include "output/usb/hid.h"
#include "output/usb/nx/hid.h"
#include "output/usb/ps4/hid.h"
#include "output/usb/usb.h"
#define LOG_LEVEL LO... |
/******************************************************************************\
* Copyright (c) 2004-2011
*
* Author(s):
* <NAME>
*
******************************************************************************
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of t... |
//===-- VPlanTransforms.cpp - Utility VPlan to VPlan transforms -----------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
#include <algorithm>
#include <chrono>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
#include <X11/Xlib.h>
#include <math.h>
#include <signal.h>
#include <stdint.h>
#include <sys/ioctl.h>
#include <termios.h>
extern "C"
{
#include "../src/pluto.h"
}
uint8_t shades[5][3] = {
{49, 8... |
/**
* Copyright (C) ARM Limited 2010-2014. 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 as
* published by the Free Software Foundation.
*/
#include "SessionData.h"
#include <fcntl.h>
#include <strin... |
//
// Copyright <NAME> (<EMAIL>), <NAME> (<EMAIL>) 2014-2020
//
// 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)
//
#include <td/telegram/Client.h>
#include <td/telegram/td_api.h>
#include <td/telegram/td_api.hpp>
#... |
#include <QToolButton>
#include <QPushButton>
#include <QMenu>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QLabel>
#include <QFile>
#include <QDir>
#include "CacheStatus.h"
#include "GlobalVariables.h"
#include "MessageListView.h"
#include "FileDownloader.h"
CacheStatus::CacheStatus(QWidget* parent)
: mPa... |
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <iostream>
#include <math.h>
using namespace std;
#ifdef __clang__
#include <unordered_map>
#define hashmap unordered_map
#else
#include <ext/hash_map>
#define... |
/*
*
* Example, taken from
*
* http://en.wikibooks.org/wiki/OpenGL_Programming
*
* Example 1: triangle
*
* re-written as to use glfw
*
* See also: http://antongerdelan.net/opengl/hellotriangle.html
*/
#include <iostream>
#include <iomanip>
#include <limits>
#include <vector>
#include <stdlib.h>
#include <G... |
/******************************************************************************
* Copyright 2018 The Apollo 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
... |
/***************************************************************************
* Copyright (C) 2012 <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, includi... |
#define BIORBD_API_EXPORTS
#include "../include/s2mAttitude.h"
s2mAttitude::s2mAttitude(const Eigen::Matrix4d& m) :
Eigen::Matrix4d(m)
{
}
s2mAttitude::s2mAttitude(const Eigen::Matrix3d& rot, const Eigen::Vector3d& trans) :
Eigen::Matrix4d(combineRotAndTrans(rot,trans))
{
}
s2mAttitude::s2mAttitude(const Eig... |
// license:BSD-3-Clause
// copyright-holders:<NAME>
#include "emu.h"
#include "s3c24xx.h"
#include "coreutil.h"
#include <cstdio>
#include <cstring>
//#define VERBOSE 1
#define LOG_OUTPUT_FUNC std::printf
#include "logmacro.h"
void s3c24xx_peripheral_types::usbhost_t::reset()
{
std::memset(®s, 0, sizeof(regs))... |
#include <iostream>
#include <limits.h>
#include <cmath>
#include "ParticleFilter.h"
#include "Map.h"
#include "Room.h"
#include "Sensors.h"
using namespace std;
ParticleFilter::ParticleFilter(int num, ifstream *ifs,string mapfile)
{
Particle p{0.0, 0.0, 0.0, 1.0/num};
m_particles.insert(m_particles.begin(),num,p);
... |
//
// Copyright (C) 2014 Novartis Institutes for BioMedical Research
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <RDBoost/pyt... |
/** Example 004 Movement
This tutorial shows how to move and animate SceneNodes. The
basic concept of SceneNodeAnimators is shown as well as manual
movement of nodes using the keyboard. We'll demonstrate framerate
independent movement, which means moving by an amount dependent
on the duration of the last run of... |
//
// "$Id: Fl_Tabs.cxx 5791 2007-05-01 20:20:21Z matt $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by <NAME> and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as publish... |
#include "stdafx.h"
#include "ResourceManager.h"
#include "MainWindow.h"
#include "YaMangDxDll.h"
#include "MouseManager.h"
#include "ResourceDef.h"
#include "MapManager.h"
ResourceManager::ResourceManager()
{
m_MeshArray.fill( nullptr );
m_HeightMapArray.fill( nullptr );
}
ResourceManager::~ResourceManager()
{
}... |
//===--- GenClangDecl.cpp - Swift IRGen for imported Clang declarations ---===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... |
#ifdef ARDUINO
#include "bob3/iodefs.h"
#include "bob3/analog.h"
#include "bob3/leds.h"
#include "BOB3.h"
#include "bob3/utils.h"
#include "bob3/ircom.h"
#else
#include "iodefs.h"
#include "analog.h"
#include "leds.h"
#include "bob3.h"
#include "utils.h"
#include "ircom.h"
#endif
#include <stdlib.h>
#include <avr/io.h... |
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2011 Couchbase, 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
*
* h... |
/*
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: <NAME>
*/
#include <random>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <math.h>
#include <iostream>
#include <sstream>
#include <string>
#include <iterator>
#include "particle_filter.h"
using namespace std;
void Par... |
#include "PID.h"
#include <string>
#include <vector>
#include <iostream>
#include <iomanip>
#include <functional>
#include <numeric>
#include <math.h>
using std::string;
using std::vector;
using std::cout;
using std::endl;
using std::setw;
/**
* TODO: Complete the PID class. You may add any additional desired funct... |
/*******************************************************************************
*
* Filename : SampleRooFitMgr_FillSet.cc
* Description : Main control flow for filling in the datasets
* Author : Yi-Mu "Enoch" Chen [ <EMAIL> ]
*
*******************************************************************************/... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "printing/pdf_metafile_cg_mac.h"
#include <algorithm>
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/logg... |
/* ------------------------------------------------------------------
* Copyright (C) 1998-2009 PacketVideo
*
* 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.