text
stringlengths
3.08k
12.5k
#include <cstdint> #include "USBDeecriptors.h" #include "tusb.h" #include "Board.h" //--------------------------------------------------------------------+ // Device Descriptor //--------------------------------------------------------------------+ static constexpr std::uint16_t VID {0xF055}; // obsolete USB IF VID ...
/*************************************************************************/ /* resource_saver_png.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
#include <iostream> #include <tsystem.h> #include <tconvert.h> #include <tiio.h> #include <tmetaimage.h> #include <toonz/txshsimplelevel.h> #include "tiio_tzm.h" //=========================================================================== namespace { class TLevelWriterTzm; class TImageWriterTzm...
#include "stdafx.h" #include <renderlib.h> class MyPlayerControllerScript : public NodeComponent { public: virtual void execute() { //printf("in exec. of PlayerControllerScript\n"); } }; class TriRenderCommand : public RenderCommand { public: TriRenderCommand() { _shader.createProgram("simplevs.glsl", "simp...
#include <iostream> #include "cache/Cache.hpp" #include "cache/BasicCacheSet.hpp" #include "cache/LineData.hpp" #include "cache/RandomReplacement.hpp" using namespace sparta; typedef cache::LineData MyLine; typedef cache::Cache<MyLine> MyCache; const uint32_t cache_sz_kb = 32; const uint32_t line_sz = 64; ...
#include "synchronisation.hpp" #include "print_or_log.hpp" #include <boost/lexical_cast.hpp> using namespace Poco; bool Synchronisation::break_block_creation_loops_ = false; std::string Synchronisation::datetime_ = ""; /** * synchronisation is necessary * * 1st peer creation --> 2nd peer creation --> reward tx ...
#include<iostream> #include<algorithm> #include<map> #include<cstdio> #include<cstdlib> #include<cstring> #include<utility> #ifdef XS #include<De> #endif using namespace std; #define MS(m) memset(m,0,sizeof(m)) typedef unsigned U; typedef pair<int,int > P; typedef long long ll; void inp(); const int M = 1e4+100,N = 5...
/**************************************************************************** * * Copyright (c) 2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistri...
/* * * Copyright (c) 2021 Project CHIP 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...
#include <cstring> #include <fstream> #include <iostream> #include "defs.h" #include "data_cache.h" #include "data_memory.h" using namespace std; data_memory_t::data_memory_t(uint64_t *m_ticks, uint64_t m_memory_size, uint64_t m_latency) : cache(0), ticks(m_ticks), memory(0), accessed(0), memory_s...
#include <iostream> #include <cstdio> #include <cmath> #include "cmwcran.h" using namespace std; CMWCGenerator u; const int Npoint = 1000; // No. of independent samples const int Neq = 100000; // No. of generations to equilibrate const int Ngen_per_block = 5000; // No. of generations per block cons...
#include "AdjustChunkPermissionsMsgEx.h" #include <program/Program.h> #include <common/net/message/storage/attribs/SetLocalAttrMsg.h> #include <common/net/message/storage/attribs/SetLocalAttrRespMsg.h> #include <common/storage/striping/Raid0Pattern.h> #include <components/worker/SetChunkFileAttribsWork.h> bool Adjust...
//---------------------------------------------------------------------------- // // License: MIT // // See LICENSE.txt file in the top level directory for more details. // //---------------------------------------------------------------------------- // $Id: ossimRpfAttributes.cpp 23664 2015-12-14 14:17:27Z dburken ...
// -*- C++ -*- /* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2004 Free Software Foundation, Inc. Written by <NAME> (<EMAIL>) This file is part of groff. groff 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 Foundat...
/* Calculs d'enfer puzzle in Gecode. Problem from <NAME> "The Manual of NCL version 1.2", page 33 http://citeseer.ist.psu.edu/161721.html The solution is the manual is: """ a = -16, b = -14, c = -13, d = -12, e = -10, f = 4, g = 13, h = -1, i = -3, j = -11, k = -9, l = 16, m = -8, n = 11, o = 0, ...
#include <iostream> #include <vector> #include <set> #include <stdlib.h> #include <math.h> #include <time.h> #include <stdio.h> #include <float.h> #include <getopt.h> // Local code #include <utils.h> #include <gograph.h> using namespace std; /* * QUICK INTERFACE TO <gograph.h> FOR READING PARENTS/CHILDREN/NEIGHBO...
/** * @file llworldmipmap_test.cpp * @author <NAME> * @date 2009-02-03 * * $LicenseInfo:firstyear=2006&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Les...
#include "utils_math.h" float MathUtils::interpolate_lin(const float x, const float x0, const float f0, const float x1, const float f1) { float result = 0.f; if ( f0 != 0.0f) { result += f0*((x1 - x)/(x1 - x0)); } else { result = f0; } if ( f1 != 0.0f) { result += f1*((x - x0)/(x1 - x0)); } return ...
// refer to https://eosio.stackexchange.com/questions/3304/how-to-transfer-token-and-do-some-action-inlineor-how-to-parse-string-to-signat?rq=1 #include <eosio/crypto.hpp> #include <eosio/asset.hpp> #include <eosio/eosio.hpp> using namespace eosio; using namespace std; static const int8_t mapBase58[256] = { ...
/// @file /// /// Copyright <NAME>. /// 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 <eagine/main_ctx.hpp> #include <eagine/main_fwd.hpp> #include <eagine/oglplus/gl.hpp> #include <eagine/oglplus/u...
// 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 "media/base/ipc/media_param_traits.h" #include "base/strings/stringprintf.h" #include "ipc/ipc_message_utils.h" #include "media/base/audio_param...
// 22/02/06 = Sun // 21/12/21 = Tue // 18/02/02 = Fri // Exercise 2.42: Write your own version of the Sales_data.h header and use it // to rewrite the exercise from § 2.6.2 (p. 76). // Exercise 2.41: Use your Sales_data class to rewrite the exercises in § 1.5.1 // (p. 22), § 1.5.2 (p. 24), and § 1.6 (p. 25). For now,...
#include "lighting_and_shadows.h" #define TINYOBJLOADER_IMPLEMENTATION #include "tiny_obj_loader.h" #include <algorithm> LightingAndShadows::LightingAndShadows(short width, short height) : MTAlgorithm(width, height) { } LightingAndShadows::~LightingAndShadows() { } int LightingAndShadows::LoadGeometry(std::filesys...
#pragma once #include <iostream> #include <filesystem> #include <fstream> #include <string> #include <string_view> #include <vector> #include <SDL.h> #include <SDL_image.h> #include "geometry.hpp" class tga_image { private: SDL_Surface *image = nullptr; public: tga_image() {} tga_image(const std::filesyst...
#define _CRT_SECURE_NO_WARNINGS #include "OBJLoader.h" #include <fstream> #include <string> #include <cstring> #include <tuple> #include <sstream> #include <iostream> #include <stdio.h> OBJLoader::OBJLoader() {} OBJLoader::~OBJLoader() {} std::tuple<std::vector<glm::vec3>, std::vector<glm::vec2>, std::vector<glm::...
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // <NAME> (<EMAIL>) // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information about the SmartSoft...
#pragma pack(push, 1) struct bitmap_image_header { u32 SizeOfImageHeader; s32 WidthInPixels; s32 HeightInPixels; u16 ColorPlanes = 1; // Must be 1 u16 BPP; // Bits per pixel u32 CompressionType = 3; // 0 == uncompressed u32 SizeInBytes = 0; // 0 for uncompressed images u32 xP...
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* *************************************************************************** * 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 ...
#include <cmath> #include <iostream> #include <limits.h> #include <memory> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <vector> using namespace std; #include "annotations.h" int Annotations::SetFilename(const std::string &f) { filename = f; return 0; } /* static int sqlCallback(void *NotUse...
/* * Copyright 2020, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
#include <fstream> #include <iostream> #include <vector> #include <bitset> #include <string.h> #include <algorithm> #include <iomanip> #include <math.h> #include <time.h> #include <stdlib.h> #include <set> #include <map> #include <string> #include <queue> #include <deque> using namespace std; const char infile[] = "p...
#pragma once #include <cstdlib> #include <fstream> #include <set> #include <string> #include <tuple> #include <vector> #include <seqan3/std/charconv> #include <chopper/build/batch.hpp> #include <chopper/build/build_data.hpp> #include <chopper/build/region.hpp> #include <chopper/build/chopper_split_record.hpp> #inclu...
/* * 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) any later version. * * This program is distributed in the hope that it will be use...
/* Space Invaders arcade machine emulator Copyright (c) 1997-2002,2003 <NAME> http://www.walkofmind.com 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...
const int DIG = 1; //numero de algarismos de cada digito na entrada const int BASE = 10; // BASE**3 < 2**51 const int TAM = 2048; struct bigint { int v[TAM], n; bigint(int x = 0): n(1) { memset(v, 0, sizeof(v)); v[n++] = x; fix(); } bigint(char *s): n(1) { memset(v, 0, sizeof(v)); ...
// ================================================================================================= // This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This // project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max- // width of 100 char...
/** * @file CLGLExecutionContext.h * @author <NAME> <<EMAIL>> * @version 0.6 * * @section LICENSE * * Copyright (c) 2016 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Sof...
#pragma once #include "fly/coders/coder.hpp" #include "fly/coders/huffman/huffman_types.hpp" #include <array> #include <istream> #include <memory> namespace fly { class BitStreamWriter; } // namespace fly namespace fly::coders { class CoderConfig; /** * Implementation of the Encoder interface for Huffman coding....
/**************************************************************************** Copyright (c) 2017-2018 <NAME> Co., Ltd. http://www.cocos2d-x.org 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 Softwar...
/* * Defines the List command. */ /** * Prints the details of a given commit to the console. * * @param repo The repo to search for branches in. * @param nth_parent The commit to print out. * @param hConsole The console to print using on Windows. */ void print_details(const git::Repository &repo, git::Commit n...
//===-- ArgSimplify.cpp - Special case for conditional ptr args ----------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===--------------------------------------------------------...
// BSD 3-Clause License // // Copyright (c) 2018, The Regents of the University of California. // 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 retai...
// RUN: %clang -std=c++17 -fsycl %s -o %t.out -lstdc++ -lOpenCL -lsycl // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out //==------------- info.cpp - SYCL sub_group parameters test ----*- C++ -*---==// // // Part of the L...
#include <allegro_flare/gui_screen.h> #include <allegro_flare/text_input.h> #include <allegro_flare/framework.h> #include <AllegroFlare/UsefulPHP.hpp> using namespace allegro_flare; using namespace AllegroFlare; // come back to this, Mark, this is a cool idea. class IgnoreBackquoteTextInput : public UITextI...
#include "lib14Seg.h" #include <SPI.h> C14Segment::C14Segment(){ bitSet(TIMSK2, TOIE2); SPI.begin(); SPI.setBitOrder(MSBFIRST); SPI.setClockDivider(SPI_CLOCK_DIV64); SPI.setDataMode(SPI_MODE0); m_speed = 0; } void C14Segment::init(int RCK, int kido, int ViewLength){ setRCK(RCK); setBlight(kido);...
#include "gdt.h" #include <mm/pmm.h> #include <mm/mm.h> #include <string.h> #include <stddef.h> // -------------------- TSS -------------------- struct tss { uint32_t unused1; uint64_t rsp[4]; uint64_t unused2; uint64_t ist[7]; uint64_t unused3; uint16_t unused4; uint16_t io_bitmap_offset; uint8_t io_bitmap[...
//============================================================================================================= /** * @file layoutmaker.cpp * @author <NAME> <<EMAIL>>; * <NAME> <<EMAIL>> * @version dev * @date September, 2014 * * @section LICENSE * * Copyright (C) 2014, <NAME>, <NAME>. Al...
#include "ParticleEmitter.h" #include "Globals.h" #include "Engine.h" #include "CameraComponent.h" #include <GL/glew.h> #include "IMGUI/imgui.h" #include "ModuleCameraManager.h" ParticleEmitter::ParticleEmitter(int MaxParticles, float2 EmitArea, float FallHeight, float FallSpeed, float LifeTime) { this->MaxParticle...
/** * @file testTimer.cpp * @author <NAME> * @date May 27, 2016 **/ #include <CppUnitLite/TestHarness.h> #include <gtsam/base/Vector.h> #include <gtsam/inference/Symbol.h> #include <gtsam/nonlinear/NonlinearFactorGraph.h> #include <gtsam/nonlinear/GaussNewtonOptimizer.h> #include <gtsam/nonlinear/Values.h> #includ...
#include "OTExtension.h" #include "OTExtensionWithMatrix.h" #include "OT/Tools.h" #include "Math/gf2n.h" #include "Tools/aes.h" #include "Tools/MMO.h" #include "Tools/intrinsics.h" OTExtension::OTExtension(const BaseOT& baseOT, TwoPartyPlayer* player, bool passive) : player(player) { ot_role = INV_ROLE(b...
/* Copyright 2010-2012 <NAME> Copyright 2011-2013 <NAME> Copyright 2013 <NAME> 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 <iostream> #include <vector> #include <boost/numeric/odeint.hpp> //[...
// ########################################################## // By <NAME> | www.complexity.io | 2018 // Email: <EMAIL> // ---------------------------------------------------------- // A C++ Grid Class for OpenGL // // The grid is used to add visual reference point for Agent worlds // The grid also sets the boun...
// Copyright (C) 2008,2009,2010,2011,2012 GlavSoft LLC. // All rights reserved. // //------------------------------------------------------------------------- // This file is part of the TightVNC software. Please visit our Web site: // // http://www.tightvnc.com/ // // This program is free softwa...
#include "sleep_manager.h" // NOTE: the recommended source of sleep code is from the Artemis OpenLog // https://github.com/sparkfun/OpenLog_Artemis/blob/69682123ea2ae3ceb3983a7d8260eaef6259a0e2/Firmware/OpenLog_Artemis/lowerPower.ino //-------------------------------------------------------------------------------- ...
//===-- RegisterContextWindows_i386.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 // //===---------------------------...
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // make_algo_scalar_es.cpp // (c) <NAME>, <NAME> and GeNeura Team, 2001 /* This library is free software; you can redistribute it and/or modify...
// Copyright 2010 <NAME> <<EMAIL>> #include <cassert> #include <nwc-toolkit/string.h> namespace { void TestConstructors() { nwc_toolkit::String str_0; assert(str_0.is_empty()); nwc_toolkit::String str_1("abc"); assert(str_1 == "abc"); nwc_toolkit::String str_2("abc", 2); assert(str_2 == "ab"); nwc_...
/* * Copyright (C) 2020 ByteDance 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 agr...
/* ------------------------------------------------------------------- * LHOTSE: Toolbox for adaptive statistical models * ------------------------------------------------------------------- * Project source file * Module: eptools * Desc.: Definition of class EPPotQuadLaplaceApprox * ----------------------------...
// includes, system #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <sys/time.h> #include <omp.h> #include "backprop.h" double get_time() { struct timeval t; gettimeofday(&t,NULL); return t.tv_sec+t.tv_usec*1e-6; } unsigned int num_threads = 0; unsigned int ...
/* * LinearMixedModel.cpp * * Created on: Mar 17, 2016 * Author: <NAME> (<EMAIL>) */ #include "LinearMixedModel.hpp" #include <stdexcept> using namespace std; using namespace Eigen; LinearMixedModel::LinearMixedModel() { K = MatrixXf::Zero(1,1); S = MatrixXf::Zero(1,1); initFlag = false; } Li...
//Copyright (c) 2014-2016 OKCoin //Author : Chenzs //2014/04/06 #include "okcoin_log.h" #include "util.h" #include "script.h" #include "base58.h" //使用连接池方式 #include "mysql_connpool.h" #if LOG2DB #define DB_SERVER "rdsebnuizebnuiz.mysql.rds.aliyuncs.com:3306" #define DB_USER "coinuser" #define DB_PASSWORD "<PA...
#include "wiGPUSortLib.h" #include "wiRenderer.h" #include "wiResourceManager.h" #include "ShaderInterop_GPUSortLib.h" using namespace wiGraphicsTypes; GPUBuffer* wiGPUSortLib::indirectBuffer = nullptr; GPUBuffer* wiGPUSortLib::sortCB = nullptr; ComputeShader* wiGPUSortLib::kickoffSortCS = nullptr; ComputeShader* wiG...
/* * Copyright 2019 Solace 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. * A copy of the License is located at * * https://www.apache.org/licenses/LICENSE-2.0 * * or in the "license" file...
/* Simon.c - Library for handling the Simon game. Created by <NAME>, July 26, 2017. Released under the MIT License. */ #include <Adafruit_SSD1306.h> #include "Arduino.h" #include "TinyUI.h" #include "Simon.h" Simon::Simon(void) { _ui = NULL; } void Simon::setUi(TinyUI *ui, Adafruit_SSD1306 *display) { _ui ...
/****************************************************************************** * Copyright (c) 2020, Intel Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. * *****************************************************************************/ #include "systemc.h" #include <io...
// // OCCAM // // Copyright (c) 2011-2018, SRI International // // 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, ...
#include "TimeStepPCISPH.h" #include "SPlisHSPlasH/TimeManager.h" #include "SPlisHSPlasH/SPHKernels.h" #include "SimulationDataPCISPH.h" #include <iostream> #include "SPlisHSPlasH/Utilities/Timing.h" using namespace SPH; using namespace std; TimeStepPCISPH::TimeStepPCISPH(FluidModel *model) : TimeStep(model) { m_si...
/** * Copyright (c) 2019 Horizon Robotics. All rights reserved. * @author yaoyao.sun * @date 2019.04.12 */ #include <stdio.h> #include <string.h> #include <unistd.h> #include <stdint.h> #include <fcntl.h> #include <sys/mman.h> #include <assert.h> #include <stdlib.h> #include <chrono> #include <iostream> #...
#pragma once template<typename T> bool Contains(const T& a, GTSL::Range<const T*> params) { for (const auto& e : params) { if (e == a) { return true; } } return false; } struct PermutationManager : Object { struct ShaderGenerationData { GTSL::StaticVector<GPipeline::ElementHandle, 16> Scopes; GTSL::StaticVecto...
/* * 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 you under the Apache License, Version 2.0 (the * "License"); you ...
/* * Copyright (C) 2005-2019 by Centre National d'Etudes Spatiales (CNES) * * This file is licensed under MIT license: * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restric...
#include "tatp_worker.h" #include <climits> #include <iostream> #include <memory> #include "tatp_util.h" txbench::TATPWorker::TATPWorker(int n_rows, std::unique_ptr<TATPConnector> connector) : n_rows_(n_rows), a_val_(n_rows <= 1000000 ? 65535 :...
#include "gfxlib.h" #include "gfxlib_struct.h" #include "gfx/matrix.h" #include <assert.h> void GFXSphereVertexList::Draw() {} void GFXSphereVertexList::Draw( enum POLYTYPE *poly, const INDEX index, const int numLists, const int *offsets ) {} void GFXSphereVertexList::BeginDrawState( GFXBOOL lock ) {} void GFXSphereV...
#include <iostream> #include <sstream> #include <limits> #include <list> #include "goodform/variant.hpp" #include "goodform/form.hpp" #include "goodform/msgpack.hpp" #include "goodform/json.hpp" #include <cmath> #include <cstdlib> bool run_msgpack_example() { std::stringstream ss; goodform::any var, var2; var ...
#include "file.h" #include "tagger.h" #include <iostream> #include <fstream> typedef unordered_set<const char*, OrthographHash, OrthographHash::EqualString> ORTHO_NAME_SET; typedef unordered_map<int, ORTHO_NAME_SET> REMOVE_NAME_MAP; class CleaningTagger : public Tagger { private: REMOVE_NAME_MAP removed; pub...
// // Copyright 2014 The Android Open Source Project // // Build resource files from raw assets. // #include "ResourceFilter.h" #include "AaptUtil.h" #include "AaptConfig.h" status_t WeakResourceFilter::parse(const String8& str) { Vector<String8> configStrs = AaptUtil::split(str, ','); const size_t N = config...
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2019 www.open3d.org // // Permissio...
/* * Copyright 2015 Intel(r) Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http ://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
/*************************************************************************\ C O P Y R I G H T Copyright 2003 Image Synthesis Group, Trinity College Dublin, Ireland. All Rights Reserved. Permission to use, copy, modify and distribute this software and its doc...
/* Copyright (c) 2017, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * * All rights reserved. * * The Astrobee platform is licensed under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with...
//===-- UPT/UPTMCCodeEmitter.cpp - Convert UPT code to machine code -------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
// Copyright (C) 2019 The Xaya developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <xayagame/defaultmain.hpp> #include <xayagame/sqlitegame.hpp> #include <gflags/gflags.h> #include <glog/logging.h> #include <js...
// Copyright (c) Facebook, Inc. and its affiliates. // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. #include <chrono> #include <memory> #include <thread> #include "yaml-cpp/yaml.h" #include "gtest/gtest.h" #include <grpcpp/client_context.h...
/** * This module supports BMP085, BMP180, and soon BMP280 * Loosely based on Adafruit_BMP085 */ static const char *MODULE = "BMP180"; #include "Arduino.h" #include "Wire.h" #include "stdlib.h" #include "stdint.h" #include "BMP180.h" static bool writeReg(uint8_t i2c_address, uint8_t reg, uint8_t val) { Wire....
/* -------------------------------------------------------------------------- * * OpenSim Moco: MocoJointReactionGoal.h * * -------------------------------------------------------------------------- * * Copyright (c) 2019 Stanford University and the Authors * ...
#include "visualOdometry.h" #include "featureProcessing/nms.h" #include "featureMatching/circularMatching.h" #include "featureMatching/removeOutliers.h" #include "omp.h" cv::Mat euler2rot(cv::Mat& rotationMatrix, const cv::Mat & euler) { double x = euler.at<double>(0); double y = euler.at<double>(1); double z...
#include <unistd.h> #include <iostream> #include <fstream> #include <iomanip> #include <string> #include <vector> #include <sys/time.h> #include <math.h> #include "tengine_c_api.h" const char* model_path = "./models/ResizeNearestNeighbor.tflite"; const std::vector<float> test_data1 = {-1.1, 0.6, 0.4, 0.3,...
/** * @file NRF24.cpp * @author <NAME> (<EMAIL>) * @brief * @version 0.1 * @date 2021-08-05 * Some of the code from: * https://github.com/guser210/NRFDemo * has been used for this demonstration. * Descriptions about this repo can be found at: * https://www.youtube.com/watch?v=V4ziwen24Ps&t=2319s * * Modi...
#include "TilePanel.h" TilePanel* TilePanel::Create(const glm::vec2 _board_size, uint8_t* _values, uint8_t* _reveal) { return new TilePanel(_board_size, _values, _reveal); } void TilePanel::Destroy(TilePanel* _panel) { delete[] _panel->state_data; glDeleteBuffers(3, _panel->m_VBO); glDeleteVertexArrays(1, &_pa...
#include <bits/stdc++.h> using namespace std; #define ass(condition) if (!(condition)) { int x = 1, y = 0; cout << x / y << endl; } const double pi = acos(-1.); const double eps = 1e-8; inline int sgn(double x) { return x < -eps ? -1 : x > eps ? 1 : 0;} inline double sqr(double x) { return x * x;} struct Point { d...
#include <Client/Graphics/FloatColor.hpp> #include <Client/GUI3/Rendering/Primitives/Gradient.hpp> #include <Client/GUI3/Rendering/Primitives/Outline.hpp> #include <Client/GUI3/Rendering/Primitives/TintedBox.hpp> #include <Client/System/WOSRenderer.hpp> #include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/Rect.hp...
/* * loj.104.cpp * Copyright (C) 2021 <NAME> <<EMAIL>> * * 「Two roads diverged in a wood,and I— * I took the one less traveled by, * And that has made all the difference.」 * * Distributed under terms of the GNU AGPLv3+ license. */ #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> ...
/* * Main authors: * <NAME> <<EMAIL>> * * This file is part of Unison, see http://unison-code.github.io * * Copyright (c) 2016, RISE SICS AB * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditio...
#include "AppClass.h" #include "GameObject.h" #include "Flipper.h" #include "Ball.h" void App::InitWindow(String a_sWindowName) { super::InitWindow("xXxTreme-PinballxXx"); // Window Name // Set the clear color based on Microsoft's CornflowerBlue (default in XNA) //if this line is in Init Application it will depend ...
#include <Arduino.h> #include <Sparkfun_TB6612.h> #include <QTRSensors.h> /****************************************************************************** TestRun.ino TB6612FNG H-Bridge Motor Driver Example code Michelle @ SparkFun Electronics 8/20/16 https://github.com/sparkfun/SparkFun_TB6612FNG_Arduino_Library Uses...
#include "metrics.h" float getBRISQUE(const Mat& image) { // pre-loaded vectors from allrange file float min_[36] = {0.336999 ,0.019667 ,0.230000 ,-0.125959 ,0.000167 ,0.000616 ,0.231000 ,-0.125873 ,0.000165 ,0.000600 ,0.241000 ,-0.128814 ,0.000179 ,0.000386 ,0.243000 ,-0.133080 ,0.000182 ,0.000421 ,0.436998 ,0....
// Copyright (c) 2021 PaddlePaddle 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...
/* * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_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 th...
#include "medianfilter3d.h" bool puma::filter_Median3D(Workspace *work, int window_radius, int numThreads) { MedianFilter3D filter(work,window_radius,numThreads); return filter.execute(); } MedianFilter3D::MedianFilter3D(puma::Workspace *work, int window_radius, int numThreads) { this->work = work; ...