text stringlengths 3.08k 22k |
|---|
/*
* MIT License
*
* Copyright (c) 2021 CSCS, ETH Zurich
* 2021 University of Basel
*
* 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 with... |
// STL includes
#include <iostream>
#include <iomanip>
#include <vector>
#include <random>
#include <utility>
// Local includes
#include "SH.hpp"
#include "Tests.hpp"
#include "SphericalHarmonics.hpp"
#include "DirectionsSampling.hpp"
#include "SphericalIntegration.hpp"
// GLM include
#include <glm/glm.hpp>
struct P... |
#include "camera-array.hpp"
#include <sstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <glm/gtc/matrix_transform.hpp>
#include <nanogui/opengl.h>
#include "util.hpp"
#include "../gl-util/check-error.hpp"
// lib for loading image
#define STB_IMAGE_STATIC
#define STB_IMAGE_IMPLEMENTATION
... |
// Copyright (c) 2014, Sailing Lab
// 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 an... |
/*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 <NAME> et al.
*
* 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 2 of the License, or
* (at your option)... |
/**
* Copyright (c) 2016, <NAME>
* Contact: <EMAIL>, davidstutz.de
* 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 n... |
#include <cstdio>
#include <cstring>
#include <string>
#include <ros.h>
#include <geometry_msgs/Twist.h>
#include <leo_msgs/Imu.h>
#include <leo_msgs/WheelOdom.h>
#include <leo_msgs/WheelStates.h>
#include <std_msgs/Float32.h>
#include <std_srvs/Trigger.h>
#include "mainf.h"
#include "wheel_controller.hpp"
#includ... |
/**
BSD-3-Clause
Copyright 2019 Alliance for Sustainable Energy, LLC
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 f... |
// Inelastic2DYS02.cpp
//////////////////////////////////////////////////////////////////////
#include <math.h>
#include "Inelastic2DYS02.h"
#include <CyclicModel.h>
#include <elementAPI.h>
/*#include <QuadraticCyclic.h>
#include <BilinearCyclic.h>
#include <LinearCyclic.h>
*/
void* OPS_Inelastic2DYS02()
{
... |
// ---------------------------------------------------------
// Author: <NAME>, Princeton University, 2016
// ---------------------------------------------------------
#include <vector>
#include <opencv2/opencv.hpp>
// Compute surface points from TSDF voxel grid and save points to point cloud file
void SaveVoxelGrid2... |
// license:BSD-3-Clause
// copyright-holders: 68bit
/*
* mdos_dsk.c - Motorola MDOS compatible disk images
*
* The format is largely IBM 3740 compatible, with 77 tracks, and 26 sectors
* per track, and a sector size of 128 bytes. Single sided disks were initially
* supported and later software supported double s... |
/*
* Copyright (c) 2000-2012 Apple Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* ... |
#include "Str.h"
#include <string.h>
#include <stdio.h> // for vsnprintf
int StrPrintf(char* dst, size_t dstChars, const char* format, ...)
{
va_list args;
va_start(args, format);
int result = StrPrintfV(dst, dstChars, format, args);
va_end(args);
return result;
}
int StrPrintfV(char* dst, size_t ... |
/** @file
@brief Implementation
@date 2016
@author
Sensics, Inc.
<http://sensics.com/osvr>
*/
// Copyright 2016 Sensics, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the L... |
/******************************************************************************
* $Id$
*
* Project: IDF Translator
* Purpose: Implements OGRIDFDriver.
* Author: <NAME>, even.rouault at spatialys.com
*
******************************************************************************
* Copyright (c) 2015, <NAME>... |
#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <cuda_runtime_api.h>
#include <fstream>
#include <iostream>
#include <string>
#include <sys/stat.h>
#include <unordered_map>
#include <cassert>
#include <vector>
#include "NvInfer.h"
#include "NvUffParser.h"
#include <opencv2/core/core.hpp>
#include <op... |
#include "sm_extension.h"
#include <blitz/tinyvec.h>
#include "io.h"
sm_extension::sm_extension() : PHMM(NUM_STATES), dirty(true), stop_at_repeat(false) {
set_default_parameters( blitz::TinyVector<double,4>(0.25,0.25,0.25,0.25) );
}
// Legacy to create a uniform api with mm_alignment.
void sm_extension::disable_rand... |
#include <ros/ros.h>
#include <std_msgs/Int8.h>
#include <std_msgs/Int32.h>
#include <std_msgs/UInt8.h>
#include <std_msgs/Bool.h>
#include <std_msgs/String.h>
#include <medusa_msgs/mUSBLFix.h>
#include <nav_msgs/Odometry.h>
#include <medusa_msgs/mState.h>
#include <signal.h>
/*INCLUDE SOCKET HEADERS*/
#include <sys/t... |
#ifdef CH_LANG_CC
/*
* _______ __
* / ___/ / ___ __ _ / / ___
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
* \___/_//_/\___/_/_/_/_.__/\___/
* Please refer to Copyright.txt, in Chombo's root directory.
*/
#endif
#include <stdio.h>
#include "BoxIterator.H"
#include "ParmParse.H"
#include ... |
/*
* BTrie insert implementation
* Copyright (c) 2010 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS)
*/
#include "btrie_internal.h"
#include "btrie_readstate.h"
inline
static void fix_state_pointers(struct state_descriptor * state, const char * offset_point, int offset) {
int m... |
/*
* 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 ... |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied w... |
//===- Builders.cpp - MLIR Declarative Builder Classes --------------------===//
//
// 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) Microsoft Corporation.
// Licensed under the MIT license.
// - A couple helper functions for serializing/deserializing an AppKeyBindings
// to/from json.
//
// Author(s):
// - <NAME> - May 2019
#include "pch.h"
#include "AppKeyBindings.h"
#include "ActionAndArgs.h"
#include "KeyChordSeria... |
#include <camera_pose.hpp>
// ============================ Shared variables ============================
FPSCounter fpsCounter_op;
std::vector<SharedFrame*> sharedFrames;
SharedFrame sharedFrame_op;
ZMQPublisher* publisher;
std::vector<std::thread> camThreads;
bool stopped = false;
bool mirrored = true;
bool cameraR... |
#include "rowsparse_mttkrp.hpp"
#include <vector>
using namespace std;
#define MAX_NMODES 8
void idxsort_hist(
const SparseTensor * const tt,
const IType mode,
vector<size_t>& idx,
vector<size_t>& buckets) {
if (idx.size() != tt->nnz) {
idx.resize(tt->nnz);
}
#pragma omp parallel for schedule(s... |
/**
* EPDiy parallel demo for RAW RGB 4 bit encoded video read from SPIFFs
* Inspired by this blogpost: https://appelsiini.net/2020/esp32-mjpeg-video-player/
*
* To read about SPIFFs
* https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/spiffs.html
*
* Video must be encoded in RGB... |
#include "App.h"
#include "ProgramOptions.h"
#include <string>
#include <iomanip>
#include "FontInfo.h"
#include "utils/extractFileName.h"
#include "external/lodepng/lodepng.h"
#include "utils/getNumberLen.h"
std::vector<rbp::RectSize> App::getGlyphRectangles(const Glyphs &glyphs, const std::uint32_t additionalWidth, ... |
/*
MIT License
Copyright (c) 2020 <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... |
//
// SubTest.cpp
// hog2 glut
//
//
#include "SubTest.h"
#include "PancakePuzzle.h"
#include "TemplateAStar.h"
#include "NBS.h"
#include "IDAStar.h"
#include "MM.h"
#include "BSStar.h"
#include "PancakeInstances.h"
#include "WeightedVertexGraph.h"
#include "HeuristicError.h"
#include "HeavyPancakePuzzle.h"
#include... |
/*
* Copyright 2017 Yamana Laboratory, Waseda University
* Supported by JST CREST Grant Number JPMJCR1503, Japan.
*
* 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.ap... |
#include <iostream>
#include <iomanip>
#include <cmath>
#include "gcp/program/Program.h"
#include "gcp/util/Chisq.h"
#include "gcp/util/ChisqVariate.h"
#include "gcp/util/Exception.h"
#include "gcp/util/Sampler.h"
#include "gcp/pgutil/PgUtil.h"
#include <vector>
using namespace std;
using namespace gcp::util;
usi... |
/*
* Implementation of a simple cache simulator
*
* Created By <NAME> in 2019-04-27
*/
#include <cstdio>
#include <cstdlib>
#include "Cache.h"
Cache::Cache(MemoryManager *manager, Policy policy, Cache *lowerCache,
bool writeBack, bool writeAllocate) {
this->referenceCounter = 0;
this->memory = m... |
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <Eigen/SVD>
#include <g2o/core/base_vertex.h>
#include <g2o/core/base_unary_edge.h>
#in... |
/**
* @file client_pub.cc
*
* MQTT Publisher (client)
*
* Connect to a listening broker and publish a message on a topic. Topic and message are passed as command line
* arguments to this program.
* See [the MQTT specification](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html)
*/
#include "packet.h... |
#include <iostream>
#include <sstream>
#include <fstream>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <functional>
#include "item.h"
#include "group.h"
#include "config.h"
using namespace std;
unordered_map<size_t, Item> items;
vector<Group> groups;
vector<size_t> item_keys;
vector<size_... |
#include <iostream>
#include <string>
#include "Imagen/ImageDownloader.hpp"
#include "Imagen/CImg.h"
#include "Socket/Socket.hpp"
#include "Monitor/monitor.hpp"
#include "GestorVallas/gestor.hpp"
#include "Administrador/admin.hpp"
#include <thread>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <un... |
/*
* Copyright (C) 2011-2016 Intel Corporation. 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 li... |
#include "SceneGameplay.hpp"
SceneGameplay::SceneGameplay(SceneManager& a_sceneManager,
AudioManager& a_audioManager, const char* a_trackName)
: sceneManager(a_sceneManager)
, audioManager(a_audioManager)
, winScene(nullptr)
, trackName(a_trackName)
, winSceneId(0)
, pauseSceneId(0)
, d... |
#define DR_MP3_IMPLEMENTATION
#include "AudioDecoderMp3.h"
using namespace audio;
/*
Callback for when data is read. Return value is the number of bytes actually read.
pUserData [in] The user data that was passed to drmp3_init(), drmp3_open() and family.
pBufferOut [out] The output buffer.
bytesToRead [in] The... |
// video2oni.cpp
// Multiple stream to ONI converter
// Part of MonoRFS
//
// Copyright (c) 2015, <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 cod... |
//////////////////////////////////////////////////////////////////
// File : cpadsvr.cpp
// Purpose : Client source code for IMEPad executable.
//
//
// Date : Fri Apr 16 15:39:33 1999
// Author : ToshiaK
//
// Copyright(c) 1995-1999, Microsoft Corp. All rights reserved
///////////////////////////... |
#include "texture.h"
#include "resource_system.h"
#include "render_state.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h"
namespace {
//TODO: use ARB_internalformat_query if available
static GLenum get_base_fmt(GLenum sized_fmt){
switch(sized_fmt){
case GL_R8:
case GL_R8_SNORM:
case GL_R16:
ca... |
/* Copyright (C) 2016 <NAME>.
* This file is part of 0 A.D.
*
* 0 A.D. 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 later version.
*
* 0 A.... |
#include "midgard/aabb2.h"
#include "test.h"
#include <vector>
#include "midgard/point2.h"
#include "midgard/vector2.h"
using namespace std;
using namespace valhalla::midgard;
namespace {
void TryIntersectsBb(const AABB2<Point2>& a, const AABB2<Point2>& b) {
if (!a.Intersects(b))
throw runtime_error("Inters... |
/*
* arduino.cpp
*
* Created on: 6 juin 2014
* Author: <NAME>
*
* cmd_arduino.c
* climso-auto
*
* Created by <NAME> on 18/04/2014.
*
* D'après arduino-serial-lib -- simple library for reading/writing serial ports
* 2006-2013, <NAME>, http://todbot.com/blog/
*
* Classe permettant de gérer l'ard... |
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/data/output_writer.h>
#include <vespa/vespalib/data/slime/json_format.h>
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/io/mapped_file_input.h>
#include <vespa/vespal... |
#include "Vector.h"
#include "cal.h"
#define INFD 1e8
#define BUFFER_SIZE 1024
#define TOLERATE 2.0
typedef std::pair<int, int> Edge;
class Model {
std::vector< Vector > vertex;
std::vector<bool> removed;
std::vector< std::set<Edge> > face;
std::set<Edge> edge;
std::priority_queue< std::pair<dou... |
/* mbed VLSI VS1053b library
* Copyright (c) 2010 <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, m... |
#include <CSVGLinearGradient.h>
#include <CSVGRadialGradient.h>
#include <CSVGStop.h>
#include <CSVGBuffer.h>
#include <CSVG.h>
#include <CSVGLog.h>
#include <CLinearGradient.h>
/* Attributes:
<Core>
<Style>
<Color>
<Gradient>
<XLink>
<External>
x1 <Coordinate>
y1 <Coordinate>
x2 <C... |
/* -*- C++ -*-
*
* NsaReader.cpp - Reader from a NSA archive
*
* Copyright (c) 2001-2011 Ogapee. All rights reserved.
*
* <EMAIL>
*
* 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... |
#include "Bluetooth.h"
Bluetooth* Bluetooth::_instance = NULL;
int Bluetooth::sent_pkt = 0;
int Bluetooth::recv_pkt = 0;
int Bluetooth::loss = 0;
static float tv2fl(struct timeval tv)
{
return (float)(tv.tv_sec*1000.0) + (float)(tv.tv_usec/1000.0);
}
static void stat(int sig)
{
int sent_pkt = Bluetooth::getSentPk... |
#include "TIDLayer.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/GeometrySurface/interface/SimpleDiskBounds.h"
#include "TrackingTools/DetLayers/interface/DetLayerException.h"
#include "TrackingTools/GeomPropagators/interface/HelixForwardPlaneCrossing.h"
#include <array>
#includ... |
/***********************************************************************************************************************
* WEX, Copyright (c) 2008-2017, Alliance for Sustainable Energy, LLC. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provide... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2016 by EMC Corporation, 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... |
#include <ros/ros.h>
#include <boost/shared_ptr.hpp>
// MoveIt
#include <moveit/rdf_loader/rdf_loader.h>
#include <urdf/model.h>
#include <srdfdom/model.h>
#include <moveit/kinematics_base/kinematics_base.h>
#include <moveit/robot_model/robot_model.h>
#include <moveit/robot_state/robot_state.h>
#include <pluginlib/cla... |
/******************************************************************************
* Author: <NAME> <<EMAIL>>
* Congestion Control Sender Monitor: Main
******************************************************************************/
#include <list>
#include <vector>
#include <string>
#include <stdarg.h>
#include "monitor.h... |
#include <iostream>
#include <array>
#include <vector>
#include <list>
#include <deque>
#include <cmath>
#include <numeric>
#include <cassert>
#include <LazyExpression/LazyExpression.h>
using std::array;
using std::vector;
using std::deque;
using std::list;
using std::cout;
using std::ref;
// The API to LazyExpressi... |
// Copyright (C) 2020 Georgia Tech Center for Experimental Research in Computer
// Systems
#include <future>
#include <string>
#include <cxxopts.hpp>
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/server/TThreadedServer.h>
#include <thrift/transport/TBufferTransports.h>
#include <thrift/transport/TServ... |
#include <iostream>
#include <fstream>
#include <unordered_set>
#define ROUNDS 6
#define ACTIVE '#'
using namespace std;
class dimensions_t {
private:
typedef struct {
int min;
int max;
} coordinate_t;
public:
coordinate_t x;
coordinate_t y;
coordinate_t z;
coordinate_t w;
public:
void initialize (i... |
/*
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.
... |
// Copyright (C) 2017-2018 <NAME> <<EMAIL>>
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#include <iostream>
#include <cxxopts.hpp>
#include <cppast/code_generator.hpp> // for generate_code()
#include <cppast/cpp_entity_kind.hpp> ... |
#include "EntityManager.h"
#include "Ai.h"
#include "Application.h"
#include "PathFinding.h"
#include "Input.h"
#include "Map.h"
#include "Window.h"
#include "Gui.h"
#include "Audio.h"
#include "Fonts.h"
#include "Collisions.h"
Ai::Ai(AiType type, iPoint Position) : Entity(EntityType::TypeAi, { Position.x,Position.y,0... |
/* avi2swf.cc
Convert avi movie files into swf.
Part of the swftools package.
Copyright (c) 2001,2002,2003 <NAME> <<EMAIL>>
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; eit... |
#include <cassert>
#include <cmath>
#include <cstdio>
#include <random>
#include <omp.h>
#include <functional>
#include <string>
#include "../libminitrig/_misc.hpp"
#include "../libminitrig/include-f32.hpp"
namespace optimizing {
static float const sin_near_coeffs5_1[5] = { 1.0f, -1.0f/6.0f, 1... |
#include "globals.h"
// took this as a template, to quickly get textured geometry
// https://github.com/JoeyDeVries/LearnOpenGL/blob/master/src/1.getting_started/4.1.textures
// starter code
Keyboard* pKeyboard;
Mouse* pMouse;
Gamepad* pGamepadOne;
Gamepad* pGamepadTwo;
Gamepad* pGamepadThree;
Gamepad* pGamepadFour;
... |
/**
* Demonstrate the use of textures.
*/
#include <GL/glut.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
#include "Bmp.h"
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
#define RECT_SIZE 5
GLuint texture_id;
Bmp *texture_bmp;
unsigned char *texture_da... |
#include <gtest/gtest.h>
#include <ParamBin/parambin.hpp>
#include <string>
TEST(PARAMBIN_TESTS,POSITIVE_DOUBLES) {
ParamBin bin;
double dbl_val = 1.3;
bin.set("var1",dbl_val);
EXPECT_EQ(bin.getDbl("var1"),dbl_val);
dbl_val = 0.05;
bin.set("leading zeros double",dbl_val);
EXPECT_EQ(bin.getDbl("leading zero... |
#include "funcs.h"
#include "wrap_config.h"
#include <sstream>
#include <time.h>
#include <stdint.h>
#include "pool.h"
#ifdef _WIN32
#include <windows.h>
#include <process.h>
#else
#include <unistd.h>
#endif
Wrap::Allocator *Wrap::Allocator::sIns = NULL;
Wrap::PoolMgr *Wrap::PoolMgr::sIns = NULL;
static std::strin... |
#include <cassert>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <stdlib.h>
#include "shoc_compat_cas.h"
#define __CL_ENABLE_EXCEPTIONS
#include "cl.hpp"
#include "Stencil.h"
#include "OpenCLStencil.h"
#include "InvalidArgValue.h"
#include "support.h"
extern const char *cl_source_stencil2d;
temp... |
#include "simit-test.h"
#include <vector>
#include "graph.h"
using namespace std;
using namespace simit;
//// Set tests
TEST(SetTests, Utils) {
EXPECT_EQ(typeOf<float>(), ComponentType::Float);
EXPECT_EQ(typeOf<double>(), ComponentType::Double);
EXPECT_EQ(typeOf<int>(), ComponentType::Int);
EXPECT_EQ(typeO... |
#include "BattleAnalyzer.h"
#include "Common/Util/UnitFIlters.h"
using namespace sc2;
using namespace rapidjson;
std::map<int, UnitBattleData> BattleAnalyzer::unitData;
BattleAnalyzer::BattleAnalyzer(string filepath)
{
LoadConfigFromFile(filepath, false);
}
BattleAnalyzer::~BattleAnalyzer()
{
}
// Calculate rel... |
// $Id$
/**************************************************************************
* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
* *
* Authors: <NAME> for the ALICE *
* offline/HLT Pr... |
#include<stdio.h>
#include <string.h>
#include <iostream>
#include <fstream>
using namespace std;
//VARIABEL
//array
char a[50] ,b[50],cicil[50],merk[50],c[30],pilihlaptop, ulang, pilihtv , pilihkulkas , pilihhp, pilihbayar,pilihcicil;
int hargaSatuan,harga,cicil1 = 0, cicil2 = 0, cicil3 = 0, dp , kredit ,p... |
#include <X11/Xlib.h>
#include <X11/Xlocale.h>
#include <X11/Xutil.h>
#include <iostream>
#include <cstdlib>
#include <string>
#include <sstream>
#include <unistd.h>
#include "window.h"
using namespace std;
Xwindow::Xwindow(int width, int height): width(width), height(height) {
// cout << "running window initializer"... |
/*
DriveControl.cpp
Created on: Feb 25, 2020
Author: 5561
Changes:
2021-02-25 -> Updates to help the robot drive straight
*/
#include "Robot.h"
#include "control_pid.hpp"
#include "Encoders.hpp"
#include "DriveControl.hpp"
#include "Lookup.hpp"
#include "Enums.hpp"
#include <math.h>
#include "Gyro.hpp"
#i... |
#include <vector>
#include <string>
#include <curses.h>
#include <cmath> // floor
#include <algorithm> // max, min
#include "Color.h"
#include "settings.h"
#include "signals.h"
#include "MouseEvent.h"
#include "requirements.h"
#include "BuildListItem.h"
#include "BuildOrderBox.h"
/*********************************... |
#include <cmath>
#include <iostream>
#include <random>
#include <unordered_map>
#include "color.h"
#include "game.h"
Game::Game(size_t window_width, size_t window_height)
: window_width_(window_width)
, window_height_(window_height)
, grid_(window_width_, window_height_, window_width / 3, window_height / 3... |
#include "winutils.h"
#include "memory.h"
#include <tchar.h>
#include <cstdlib>
bool FileExists (LPTSTR szFileName)
{
DWORD a = GetFileAttributes(szFileName);
return (DWORD)-1 != a && 0 == (a & FILE_ATTRIBUTE_DIRECTORY);
}
void dbg_printf (TCHAR const * fmt, ...)
{
TCHAR buffer[4096];
va_list arg;
va_st... |
#include "utils/utils.hpp"
// Колбэк для клавиатуры.
void KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mode);
// Выбор способо отображения полигонов.
void ChoosePolygonMode();
// Изменения.
void DoChanges();
int main(int argc, char **argv) {
prefix_unused(argc);
prefix_unused(argv)... |
/*<NAME> --- starShapedSearch*/
int rep = 360; //detektáló nyalábok száma (illetve szöghelyzet alapján hány részre/szeletre bontsa fel a pontfelhőt -> szeletenként 1 nyaláb)
float width = 0.2; //nyalábok szélessége
float rmin = 2.0; //szűrés minimális sugara (csak ennél távolabbi pontok)
float rmax = 60.0; //szűr... |
#include <iostream>
#include <execution>
#include <vector>
#include <memory>
#include <limits>
#include <algorithm>
#include <chrono>
#include <cmath>
#include <functional>
#include <atomic>
#include "tga.hpp"
#include "framebuffer.hpp"
#include "model.hpp"
#include "objLoader.hpp"
#include "camera.hpp"... |
// Copyright 2020 Makani Technologies 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 ... |
#include <sstream>
#include "macros.h"
#include "libutil/exceptions.h"
#include "libinterpreter/execution_context.h"
#include "libinterpreter/symbolic.h"
//#define UPDATESET_DATA_SIZE 65535*64 * 50
//#define UPDATESET_SIZE 65535*64
#define UPDATESET_SIZE 1561 * 19
#define UPDATESET_DATA_SIZE UPDATESET_SIZE * 50
#def... |
/**
* Copyright (c) 2016, <NAME>
* Contact: <EMAIL>, davidstutz.de
* 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 n... |
#include "Matrix.h"
#include <iostream>
#include <stdexcept>
bool fail(bool setFail = false) {
static bool isFailed = false;
isFailed = (setFail || isFailed);
return isFailed;
}
template <typename T, typename V>
void checkEquals(T a, V b, double eps = 1e-5) {
bool equals = ((a < b + eps) && (a > b - eps));
if (!... |
/*
* plugin.cpp
*
* Created on: Jan 25, 2019
* Author: iconmaster
*/
#include "session.hpp"
#include "error.hpp"
#include "util.hpp"
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <boost/filesystem.hpp>
#include <cerrno>
#include <cstdlib>
#include <t... |
/*****************************************************************************
* zsh.cpp: create zsh completion rule for vlc
*****************************************************************************
* Copyright © 2005-2011 the VideoLAN team
*
* Authors: <NAME> <<EMAIL>>
<NAME> <<EMAIL>>
*
* This ... |
// ==================
// @2017-09 by lanhin
// ACSA, USTC
// <EMAIL>
// ==================
#include "device.h"
#include "graph.h"
#include "runtime.h"
#include "utils.h"
#include <iostream>
#include <ctime>
#include <cassert>
#include <cstring>
// TODO: conditional include?
#include <getopt.h>
const char* StatusArray... |
/*
* Rinex3Obs.cpp
* Read and organize Rinex v3 file in epochwise manner
* Created on: Jun 10, 2018
* Author: <NAME>
*/
#include "pch.h"
#include "Rinex3Obs.h"
using namespace std;
// CONSTRUCTOR AND DESTRUCTOR DEFINITIONS
Rinex3Obs::Rinex3Obs() {}
Rinex3Obs::~Rinex3Obs() {}
// A function to organize specific... |
/* Copyright 2001, 2019 IBM Corporation
*
* 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
* following d... |
#include "firebeam.h"
#include "main.h"
Firebeam::Firebeam(float x, float y, color_t color, float rotation) {
this->position = glm::vec3(x, y, 0);
if(rotation==90)
{
this->velocity = glm::vec3(-(3.0/100),(0.1/100), 0);
this->acceleration = glm::vec3(0,-(this->position.y/200.0),0);
}
... |
#include "Vex.hpp"
#include <iostream>
using namespace std;
Vex::Vex(){
for(auto i = 0; i < NREGS-1; i++)
{
this->vregs[i] = this->vector_slice->vreg[i];
}
this->srst = 0;
this->clk = 1;
this->t0_data = 0;
this->t0_valid = 0;
this->t1_data = ... |
#include <Arduino.h>
#include "Spectra.h"
Spectra::Spectra(int SCL, int SDA, int CS, int DC, int RESET, int BUSY, int BS) {
PIN_SCL = SCL;
PIN_SDA = SDA;
PIN_CS = CS;
PIN_DC = DC;
PIN_RESET = RESET;
PIN_BUSY = BUSY;
PIN_BS = BS;
WHITE = 0;
BLACK = 1;
RED = 2;
uint8_t buffer[... |
/*
* Copyright (c) 2011-2017, Intel Corporation
* 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 conditi... |
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <chrono>
#include <thread>
using namespace std;
// set up the game: int health = 10, attack, block
int playerHealth = 10, turns = 0, blockingNumber, attackNumber, turnNumber, playersHealthOne, playersHealthTwo, playersHealthThree, playersHealthFore,
pla... |
#include "lz77.h"
///**** LZ77 ****///
/** Compute and print the number runs for LZ77 **/
/* Takes a file name as parameter */
void lz77(std::string name) {
std::string data;
if(openFile(name, data) == 0) {
auto t_start = std::chrono::high_resolution_clock::now();
// We create 5 differents ha... |
/**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "logdevice/include/Client.h"
#include <chrono>
#include <folly/synchronizati... |
//
// Traveling Salesman Problem (Little et al's Branch-and-Bound)
//
// Description:
// It solves TSP exactly by branch-and-bound algorithm that
// employs a lower bound from the reduced cost matrix,
// which is similar to the Kuhn-Munkres reduction.
//
// In practice, it scales to networks with |V| <= 40.
//... |
//
// begin license header
//
// This file is part of Pixy CMUcam5 or "Pixy" for short
//
// All Pixy source code is provided under the terms of the
// GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html).
// Those wishing to use Pixy source code, software and/or
// technologies under differ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.