text
stringlengths
3.08k
12.5k
/*************************************************************************** vidhrdw.c Functions to emulate the video hardware of the machine. ***************************************************************************/ #include "driver.h" #include "vidhrdw/generic.h" static int gfx_bank,palette...
#include <algorithm> #include <iostream> #include <GL/glew.h> #include <SDL2/SDL.h> #include <SDL2/SDL_opengl.h> #include <config.hh> #include <fish.hh> #include <scene.hh> #include <triangle.hh> #include <frustum.hh> #include <look_at.hh> #include <mat4f.hh> #include <vec3f.hh> bool init_glew() { GLenum err = gl...
#include "compress_writer.cpp" #include <memory> #include <random> #include "gtest/gtest.h" class MockWriter : public Writer { public: MockWriter() { } virtual ~MockWriter() { } virtual void open(const S3Params &params) { } virtual uint64_t write(const char *buf, uint64_t count) { ...
#pragma once #include <unordered_map> #include <nlohmann/json_fwd.hpp> #include <functional> #include "object.hpp" #include "components.hpp" #include "utility.hpp" template<class Component> using Pool = std::unordered_map<Object, Component>; template<class... Components> class ObjectComponents : Pool<Components>......
/* * Copyright (c) 2019, The Robot Studio * 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 cond...
#include <iostream> #include <iomanip> #include <GL/glut.h> #include "cugl.h" using namespace std; using namespace cugl; // Initial size of graphics window. const int WIDTH = 600; const int HEIGHT = 600; // Current size of window. int width = WIDTH; int height = HEIGHT; // Bounds of viewing frustu...
#include "FilePush.h" #include <algorithm> std::string& nar::MessageTypes::FilePush::Request::get_file_name() { return this->_file_name; } unsigned long long int nar::MessageTypes::FilePush::Request::get_file_size() { return this->_file_size; } std::string& nar::MessageTypes::FilePush::Request::get_dir_name(...
struct PCEngine : Cartridge { auto name() -> string override { return "PC Engine"; } auto extensions() -> vector<string> override { return {"pce"}; } auto load(string location) -> bool override; auto save(string location) -> bool override; auto analyze(vector<u8>& rom) -> string; }; auto PCEngine::load(strin...
#include "encoder.h" #include <png.hpp> using png::rgb_pixel; #include <cstring> #include <iostream> #include <fstream> #include <filesystem> #include <chrono> #include <cmath> namespace fs = std::filesystem; using system_clock = std::chrono::system_clock; #define PRINT_RET(source, ret) std::cout << \ "[" << source ...
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2014 <NAME> Permission is hereby granted, free of charge, to any person obtai...
/* *********************************************************************************************************************** * * Copyright (c) 2017-2019 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associ...
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild #include "windows_resource_file.h" windows_resource_file_t::windows_resource_file_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, windows_resource_file_t* p__root) : kaitai::kstruct(p__io) { m__parent = p__pa...
// Copyright (c) 2015-2016, FlightAware LLC. // Copyright (c) 2015, <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: // * Redistributions of source code must retain the above co...
#include "screen.h" #include "map.h" #include "clock.h" #include "player.h" #include "config.h" #include "action.h" #include "error.h" object_t* actor = 0; int actorCount = 1; float actSpd = 1.0f; float zSpd = 0.7f; int run = 1; float stepLength = 0.0f; void init() { scrInit(); mapInit(); configInit(); actio...
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include "opencv2/core.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #define PI 3.14159265 void bilinearInterpolate(const cv::Mat& src, cv::Mat& dest, cv::Mat xq, cv::Mat yq) { assert(xq.rows == yq.rows && xq.cols ...
// Copyright (c) 2009 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/bookmarks/bookmark_index.h" #include <algorithm> #include <iterator> #include "app/l10n_util.h" #include "chrome/browser/bo...
//------------------------------------------------------------------------------ // 07_Cube.cpp //------------------------------------------------------------------------------ // Copyright (c) 2020 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associa...
/** \file * \brief Tests for LCA (lowest common ancestor) class * * \author <NAME> * * \par License: * This file is part of the Open Graph Drawing Framework (OGDF). * * \par * Copyright (C)<br> * See README.md in the OGDF root directory for details. * * \par * This program is free software; you can redistr...
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
#include "pch.h" #include "AclHelpers.h" #include "Console.h" #include "TerminalHelper.h" std::string GetSidName(PSID pSid) { /*if (!pSid) return "Unknown";*/ wchar_t username[1024] = L""; wchar_t domain[1024] = L""; ULONG len_username = sizeof(username); ULONG len_domain = sizeof(domain); SID_NAME_USE si...
#include <QTextStream> #include <QStringList> #include <QTemporaryFile> #include <QByteArray> #include <QFile> #include <QVector> #include <QDomDocument> #include "spiceserver.h" #include "Fixtures.h" #include "Pvl.h" #include "PvlGroup.h" #include "TestUtilities.h" #include "TextFile.h" #include "gmock/gmock.h" usi...
// // Copyright (C) 2011 <NAME> <<EMAIL>> // 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 <tinypq.hpp> #include <cassert> #include <algorithm> #include <array> #include <iostream> #include <iterator>...
/* * Copyright (c) 2016, Anonymous Institution. * 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, t...
/////////////////////////////////////////////////////////////////////////////// // Filename: FFontLoader.cpp /////////////////////////////////////////////////////////////////////////////// #include "FFontLoader.h" FFontLoader::FFontLoader() { } FFontLoader::FFontLoader(const FFontLoader& other) { } FFontLoader::~FFo...
/***************************************************************************************** NAME HotPixelMap DESCRIPTION Class to specify info to define a HotPIxelMap COPYRIGHT (C) QSI (Quantum Scientific Imaging) 2011 REVISION HISTORY DRC 03.23.11 Original Version *************************************************...
/*****************************************************************/ /* NAME: <NAME> */ /* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */ /* FILE: ZAIC_SPD_Model.cpp */ /* DATE: May 9th, 2016 ...
#include "Bicycle.h" void Cyclist::buildBB() { Ground& ground = model.updGround(); ground.attachGeometry(new Mesh("Geometry/bottombracket.stl")); } void Cyclist::buildCrankset() { double xx = 0.00980, yy = 0.00547, zz = 0.00829, xy = 0, xz = 0, yz = 0.00254; double cranksetMass = 1.15; Vec3 cran...
// Copyright (C) 2002-2003 RealVNC Ltd. 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 as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later ver...
#include <string.h> #include <math.h> // ************************************************************************** // Demonstrate the Pimoroni Trackball module // Assumes that a Pico Display Pack (a 1.14inch IPS LCD screen with four // useful buttons) is installed, and that the Trackball I2C module has // sda, scl an...
// pod-index // <NAME> #include "pod_index.h" #include "PxBytes.h" #include "PxTypes.h" #include "PxDeflate.h" #include "PxLookup.h" #include <cstring> #include "PxFile.h" template<bool reverse_bytes> PxResult writeBytes(PxContainer* container, File& file, PxCompression compression, PxChecksum checksum, uint32_t ch...
#include "motion_control.h" #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <math.h> #include <iostream> #include "control_macro.hpp" #include "field_control.h" #include "../vision/locate.h" #include "def_var.h" #define IOC_MAGIC 'x' #define COMBINE_CMD(cmd,ch) _IOWR(IOC_MAGIC,((cmd)<<1|((c...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #if !defined __GNUC__ #pragma warning( disable: 4571 4820 4514 4987 4710 4309 4986 4548 4189) // relative include path contains '..' // (function) selected for automatic inline expansion #pragma warning( disable: 4464 4711 ...
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // ** Copyright UCAR (c) 1992 - 2015 // ** University Corporation for Atmospheric Research(UCAR) // ** National Center for Atmospheric Research(NCAR) // ** Research Applications Laboratory(RAL) // ** P.O.Box 3000, Boulder, Colorado, 80307...
#include "Bore.h" Bore::Bore(float x, float y, Environment* room, Game* game) : Boss("res/sprites/bore/Bore_Moving.png", x, y, 64, 64, room, game) { importAnimations(); this->name = "Bore"; this->subtitle = "and Franky"; this->cooldown = DEFAULT_BOSS_CD; this->maxHp = BORE_HP; this->hp = maxHp; this->speed =...
// -*- Mode: c++ -*- // copyright (c) 2012 by <NAME> // $Revision$ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the term...
// // canvas.cpp // vox.render // // Created by 杨丰 on 2021/11/26. // #include "canvas.h" #include "../gui/imgui_impl_glfw.h" static void glfw_error_callback(int error, const char *description) { fprintf(stderr, "Glfw Error %d: %s\n", error, description); } namespace vox { std::vector<Canvas::CursorPosFunc> Ca...
// // Created by sunguoyan on 16/9/18. // #include "FDK.h" //从文件中读入max幅图像,并将这些图像存入二维数组中。 void FDK::readImage(vector<vector<usi>> &pic, vector<vector<double>> &fpic, string filename) { ifstream image; usi tmp; int i, j, cycle; image.open(filename, ios::binary); if (!image.is_open()) { cout...
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp // RUN: clang-modernize -use-auto %t.cpp -- --std=c++11 -I %S/Inputs // RUN: FileCheck -input-file=%t.cpp %s // // RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp // RUN: clang-modernize -use-auto %t.cpp -- --std=c++11 -I %S/Inputs \ // RUN: -DUSE_INLINE_NAMESPACE=1 // RUN: FileCh...
/** * @fileoverview Sphere collision detection system. * @author <EMAIL> (<NAME>) */ #include "sphereSystem2.h" smash::SphereSystem2::SphereSystem2() { this->spheres = new std::vector<smash::Sphere*>; collisions = 0; collisionChecks = 0; octreeRoot = new smash::Octree(-1000, 1000, -1000, 1000, -1000...
// // Framework for a raytracer // File: sphere.cpp // // Created for the Computer Science course "Introduction Computer Graphics" // taught at the University of Groningen by <NAME>. // // Authors: // <NAME> // <NAME> // <NAME> // <NAME> // // This framework is inspired by and uses code of the raytrac...
#include <NotepadUtils.h> #include <Shlwapi.h> #pragma comment(lib, "shlwapi.lib") #include <psapi.h> #pragma comment(lib, "psapi.lib") bool QueryRegistryString(HKEY hKey, std::wstring key, std::wstring &value) { DWORD iType = REG_NONE; DWORD iDataSize = 0; LSTATUS errorCode = ::RegQueryValueExW(hKey, key.c_str()...
#include "simulationdialog.h" #include "ui_simulationdialog.h" using namespace ossim; static const QColor colorTable[] = { // Qt::red, // Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::darkRed, Qt::darkGreen, Qt::darkBlue, Qt::darkCyan, Qt::darkMagenta, Qt::darkYellow, Q...
#include <robot_ur10.h> #include <trig_solvers.h> // Model of UR-10 robot // Any constant transform at base of end-effector void ecn::RobotUR10::init_wMe() { double wte = 0.1922; wMe[2][3] = wte; } // Direct Geometry vpHomogeneousMatrix ecn::RobotUR10::fMw(const vpColVector &q) const { vpHomogeneousMatri...
// // Created by <NAME> on 19/1/2019. // #include "Plane.h" using namespace std; using namespace stage; namespace stage { std::ostream &operator<<(std::ostream &fout, const Plane &s) { fout << "Plane At : " << s.pos <<" , "; fout << "Color : " << s.color << " , "; fout << "Emit : " << s.e...
/* * File: mapsettings.cpp * Author: <NAME> <<EMAIL>> * * Created on June 12, 2015, 8:21 PM */ #include "mapsettings.h" #include <QCoreApplication> #include <QFile> #include <QDir> #include <QTextStream> #include <QDebug> MapSettings::MapSettings(QString _filename, QObject* _parent) : QObject(_parent), ...
#include <future> #include <iostream> #include <memory> #include <queue> #include <regex> #include <string> #include <unordered_set> #include <utility> #include <vector> #include "../optionparser/optionparser.h" #include "../task/task_queue.hpp" #include "../DataConverter/SegmenterDataConverter.h" #include "../DataCon...
#include <cstdlib> #include <fstream> #include <iostream> #include <limits> #include <string> #include <utility> #include <vector> #include <marisa_alpha.h> #include "./cmdopt.h" namespace { typedef std::pair<std::string, double> Key; int param_num_tries = MARISA_ALPHA_DEFAULT_NUM_TRIES; int param_trie = MARISA_AL...
// // sync_task.cpp // kedis // // Created by ziteng on 17-11-20. // Copyright (c) 2017年 mgj. All rights reserved. // #include "sync_task.h" #include "cmd_line_parser.h" #include "redis_conn.h" #include "redis_parser.h" #include "rdb_reader.h" #include "event_loop.h" #include "simple_log.h" ThreadPool g_thread_po...
//////////////////////////////////////////////////////////////////////////////// // // MIT License // // Copyright (c) 2018-2019 <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...
#include <chrono> #include <cstdint> #include <iostream> #include <sstream> #include <stdexcept> #include <string> #include <vector> //sets the indexes that are multiples of sieve_width to false, // without modifying the original sieve_with value //for example, sieve_vec({true, true, true, true, true, true}, 2) // wou...
// AuthenticationPanel.cpp #include <stdio.h> #include <Screen.h> #include <Box.h> #include <Button.h> #include <CheckBox.h> #include <Message.h> #include <String.h> #include <StringView.h> #include <TextControl.h> #include "AuthenticationPanel.h" enum { MSG_PANEL_OK, MSG_PANEL_CANCEL, }; // constructor Authent...
/* ============================================================================== This file is part of the JUCE library - "Jules' Utility Class Extensions" Copyright 2004-11 by Raw Material Software Ltd. ------------------------------------------------------------------------------ JUCE can be r...
/* * Screen.cpp * * Created: 2018-10-04 11:50:08 * Author: Rodos */ #include "Screen.hpp" #define TEMPLATE_PATTERN 0x22 #define MAIN_PATTERN 0xee #define MAIN_DIM_PATTERN 0x44 char buffer[22]; void Screen::init (char names[][5], bool clean) { GUI_Init(); if (clean) { GUI_Clean(); } drawTemplate(names)...
// arrayopt.cpp : This file contains the 'main' function. Program execution begins and ends there. // #define FMT_HEADER_ONLY #define CXXOPTIONS_NO_EXCEPTIONS #include <iostream> #include <filesystem> #include <complex> #include <fmt/format.h> //while waiting for official C++20 support #include <Eigen/Dense> #include...
#include "Editor.h" void Editor::Start() { spritesheet = new Bitmap("Terrain.png"); gridtex = new Bitmap("Grid.png"); selectionRect = new Bitmap("SelectionRect.png"); map = new Map(100, 100, 3, -1, mapScale); grid = new Map(100, 100, 1, 0, mapScale); tilewidth = 128; tileheight = 128; selRectPos.x = -100;...
#include "shaperenderer.h" #include <tuple> #include "glprograms.h" ShapeRenderer::~ShapeRenderer() { for (auto &slice : shapeSlices_) { slice.free(); } glDeleteFramebuffers(fbos_.size(), fbos_.data()); glDeleteTextures(texComposed_.size(), texComposed_.data()); glDeleteTextures(texPlane...
#include "processor.hpp" processor::processor(::diagnostics::logger* const logger, const char* const simulatorEndpoint, model::state& state, ::zmq::context_t& context) : logger(logger), st(state), simulatorClientPool(context), threadCount(0), isRunning(false), doExit(false) { this->simulatorEndpoin...
/* * @Description: 1086. 恨7不成妻 * @Author: <NAME> * @Date: 2020-10-08 13:09:40 * @Last Modified time: 2020-10-08 13:09:56 */ #include<iostream> #include <algorithm> #include <cstring> #include <vector> using namespace std; typedef long long ll; //f[i][j][a][b] i位数 最高j 整个模7得a 数字和模7得b const int N = 20, p = 1e9 + 7; st...
/* Real time clock with matrix display. BOOTLOADER, ETC: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard sensors https://www.instructables.com/id/Simple-Guide-to-Setting-Time-on-a-DS3231DS3107DS13/ https://howtomechatronics.com/tutorials/arduino/8x8-led-matrix-max7219-tutorial-scrolling-text-android-contro...
#include <qtlinguistics.h> #if defined(Q_OS_ANDROID) #include <arpa/inet.h> #elif defined(Q_OS_LINUX) #include <arpa/inet.h> #endif N::IfoReader:: IfoReader(void) { } N::IfoReader::~IfoReader(void) { } bool N::IfoReader::addItem(QString line) { int length = line.length() ; nKickOut ( length...
/* ------------------------------------------------------------------------------- Copyright (c) <NAME>. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to a...
#include <itp/gmx> class Handle : public itp::GmxHandle { public: using GmxHandle::GmxHandle; /** * @brief 计算两个分子之间的相互作用 * @param mol1 第一个分子的序号 * @param mol2 第二个分子的序号 * @param vdw 输出的范德华能 * @param cou 输出的静电能 * @param D 介电常数 */ void calcEnergyBetweenTwoAtoms(int mol1, int mol2, double& vdw, double& cou...
#include "simularium/simpkg/readdypkg.h" #include "Eigen/Dense" #include "Eigen/Geometry" #include "readdy/model/observables/io/TrajectoryEntry.h" #include "readdy/model/observables/io/Types.h" #include "readdy/readdy.h" #include "simularium/agents/agent.h" #include <fstream> #include <limits> #include <readdy/model/to...
int get_projection_plane(double ov1x, double ov1y, double ov1z, double ov2x, double ov2y, double ov2z, double ov3x, double ov3y, double ov3z) { int r = triangle_normal_filtered(ov1x, ov1y, ov1z, ov2x, ov2y, ov2z, ov3x, ov3y, ov3z); if (r >= 0) return r; return triangle_normal_exact(ov1x, ov1y, ov1z...
/** * @file Parser.cpp * @author <NAME> (<EMAIL>) * @author <NAME> (<EMAIL>) * @brief This file implements the Parser class. * @version 0.1 * @date 2019-06-12 * * @copyright Copyright (c) 2019 * */ #include "../../include/parser/Parser.h" using namespace graphs; using nam...
//incomplete #include <bits/stdc++.h> #include "debug.h" using namespace std; vector<vector<int>> a, b, main_ans; vector<vector<int>> mat_add(vector<vector<int>> a, vector<vector<int>> b, int add = 1) { vector<vector<int>> ans(a.size(), vector<int>(a.size(), 0)); for (int i = 0; i <...
#include <algorithm> #include <assert.h> #include <cuda_runtime.h> #include <random> #include <stdlib.h> #include <string.h> #include <iostream> #include "cudaparticlefilter.h" #include "device.h" #include "robot.h" #define DEBUG 1 #define DEBUG_PRINTF(fmt, ...) do { if (DEBUG) fprintf(stderr, fmt, __VA_ARGS__); } whi...
// Copyright 2020 The Defold Foundation // Licensed under the Defold License version 1.0 (the "License"); you may not use // this file except in compliance with the License. // // You may obtain a copy of the License, together with FAQs at // https://www.defold.com/license // // Unless required by applicable law or a...
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<cstring> #include<map> #include<set> #include<vector> #include<utility> #include<queue> #include<stack> #include<complex> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #defin...
#include <gmock/gmock.h> #include <gtest/gtest.h> #include "../utils.h" #include "solution.h" #include <span> #include <sstream> #include <string> #include <string_view> using namespace Day04; constexpr std::string_view EXAMPLE = R"(7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 22 ...
#include <memory> #include "SimG4Core/Application/interface/OscarMTMasterThread.h" #include "FWCore/Utilities/interface/EDMException.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "SimG4Core/Application/interface/RunManagerMT.h" #include "SimG4Core/Geometry/interface/CustomUIsession.h" #includ...
#include <string> #include <vector> #include <cmath> #include <algorithm> #include <stdexcept> #include "site_rates.h" // get the lowest and highest positions of a transcripts coding sequence Region _get_gene_range(Tx & tx) { int boundary_1 = tx.get_cds_start(); int boundary_2 = tx.get_cds_end(); int...
#include <iostream> #include <fstream> #include <sstream> #include <vector> struct Point; struct Line; typedef std::pair<char, int> step_t; typedef std::vector<step_t> data_t; typedef std::vector<Line> wire_t; typedef std::vector<Point> crosses_t; template<typename T1, typename T2> std::ostream& operator<<(std::ostre...
/* * Copyright 2011 <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: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions...
/******************************************************************************* * Copyright 2018-2020 Intel Corporation. * * This software and the related documents are Intel copyrighted materials, and * your use of them is governed by the express license under which they were * provided to you (License). Unle...
/* * Copyright (c) 2016-2019, NVIDIA 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 copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
// // Copyright (C) 2007 by sinamas <sinamas at users.sourceforge.net> // // 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. // // This program is distributed in the hope tha...
#include <gtest/gtest.h> #include "SNLS_TrDLDenseG.h" #include "ECMech_cases.h" #include "ECMech_evptnWrap.h" #include <random> #define STACK_PARAMS #ifndef KIN_TYPE #define KIN_TYPE 1 #endif static int outputLevel = 0; TEST(ecmech, px_a) { // can adjust these to change the computational workload // con...
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribu...
/* the vast starry sky, bright for those who chase the light. */ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define mk make_pair const int inf=(int)1e9; const ll INF=(ll)5e18; const int MOD=998244353; int _abs(int x){return x<0 ? -x : x;} int add(int x,int y){x+=y; ret...
/* * Triangle polygon rasterizer pixel selector * * Copyright (C) 2018 by <NAME> * * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) */ #include <stdio.h> #include <math.h> #include <algorithm> #include <glm/glm.hpp> class Line { public: /* * Referenced from Stanford ...
/* Copyright (c) 2016-2017, <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: * * * Redistributions of source code must retain the above copyright * notice, this lis...
/* * This software is distributed under BSD 3-clause license (see LICENSE file). * * Authors: <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, * <NAME> */ #include <shogun/structure/SOSVMHelper.h> #include <shogun/base/Parameter.h> #include <shogun/labels/StructuredLabels.h> #include <shogun/mathematics/linalg/L...
// Copyright 2017 <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.0 // // Unless required by applicable law ...
/* Copyright 2018 <NAME>. 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 agreed to in writing,...
/* * Copyright 2019, <NAME>, All rights reserved. * This code is released into the public domain. * * 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 ...
#include "TrailsDrawer.h" TrailsDrawer::TrailsDrawer(Boids& flockPS) :flock_ps(flockPS) ,allocated_bytes(0) { trail_color[0] = 1.0f; trail_color[1] = 0.0f; trail_color[2] = 0.0f; trail_color[3] = 1.0f; } void TrailsDrawer::setup() { if(!shader.load("trails_drawer")) { printf("Cannot setup trails drawer sha...
// Copyright 2012 Cloudera Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
/** @file AStarAlgorithm.cpp * @brief AStarAlgorithm source file * @author <NAME> * Copyright 2018 <NAME> */ #include <math.h> #include <algorithm> #include <iterator> #include "../include/AStarAlgorithm.h" #include "../include/Arena.h" /** * @brief constructor for AStarAlgorithm class * @param none * @retur...
#include "SceneMesh.h" #include "Renderer.h" #include "utMath.h" #include <cstdio> #include <cerrno> #include <cassert> #if defined __APPLE__ #include <unistd.h> #elif defined _WIN32 || defined _WIN64 #include <direct.h> #endif struct FReader { int size; int cursor; }; static char *_readline(struct FReader ...
#include <Arduino.h> #include <Wire.h> #include <SPI.h> #include <WiFi.h> #include <WiFiClient.h> #include <HTTPClient.h> #include <AsyncMqttClient.h> extern "C" { #include "freertos/FreeRTOS.h" #include "freertos/timers.h" } #define MQTT_HOST IPAddress(192, 168, 141, 99) #define MQTT_PORT 1883 #define MQTT_QoS 1 ...
/* * Copyright (c) 2014, The Linux Foundation. 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 ...
/* ######################################################################## Node Type classes ######################################################################## */ #include <Muse.h> #include "SongLst.h" #include "SngTypes.h" #include <ctype.h> #include <iomanip.h> /* #####################...
/* Analog sound emulation library Copyright (c) 2004 <NAME> */ #include <assert.h> #include <math.h> #include "ase_bandpass_filter.h" const double PI = 3.1415926535898; AButterworthBandPassFilter::AButterworthBandPassFilter( AChannel & source ) : AFilter( source ) { clear(); } voi...
/* * * 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"); y...
#include "ConfigurationParser.hpp" #include <yaml-cpp/yaml.h> #include <hwloc.h> namespace fs = std::experimental::filesystem; using namespace std; std::tuple<int,int,int> get_topology() { hwloc_topology_t topology; hwloc_cpuset_t cpuset; hwloc_obj_t obj; /* Allocate and initialize topology object. */ hwl...
// Copyright (C) 2018-2019 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // /** * \brief The entry point for the Inference Engine Human Pose Estimation demo application * \file human_pose_estimation_demo/main.cpp * \example human_pose_estimation_demo/main.cpp */ #include <vector> #include <inference_engin...
//----------------------------------------------------------------------------- // Copyright (c) 2016 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, includ...
#include <cox.h> // #define TEST_LORA #define TEST_FLRC struct timeval tRxStarted; static void printLoRaFrameInfo(LoRa2GHzFrame *frame) { printf( "* LoRa RSSI:%d dB, SNR:%d", frame->power, frame->snr ); } static void printFLRCFrameInfo(FLRCFrame *frame) { printf( "* FLRC RSSI:%d dB", frame...
/*! * @section LICENSE * * @copyright * Copyright (c) 2015-2017 Intel Corporation * * @copyright * 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 * http://www.apach...