text
stringlengths
3.08k
12.5k
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=132000; const int MOD=1004535809; inline int read(){ int x=0,f=0; char ch=getchar(); while(ch<'0'||ch>'9') f|=(ch=='-'),ch=getchar(); while(ch>='0'&&ch<='9') x=(x<<1)+(x<<3)+(ch^48),ch=getchar(); return f==0 ? x : -x; } inlin...
//============================================================================ // Name : deviceOnline.cpp // Author : yaocoder // Version : // Copyright : Your copyright notice // Description : Hello World in C, Ansi-style //============================================================================ ...
#include "Mouse.h" Mouse* Mouse::instance = 0; Mouse::Mouse(HWND &hwnd) { ZeroMemory( buttons, sizeof(bool) * MOUSE_MAX ); ZeroMemory( holdButtons, sizeof(bool) * MOUSE_MAX ); ZeroMemory( doubleClicks, sizeof(bool) * MOUSE_MAX ); ZeroMemory( lastClickTime, sizeof(float) * MOUSE_MAX ); lastWheel = 0; fram...
#include <iostream> #include "regexp/fa_state.h" #include "regexp/nfa.h" #include "regexp/re_to_postfix.h" #include "regexp/directMethod.h" #include "regexp/regexp.h" #include <fstream> #include <sstream> void testNumbers() { // NFA numberMatch = lex::regexp(R"((([1-9][0-9]*)|0)((\.[0-9][0-9]*)|#)(([Ee]([+-]|#)[0...
/*--------------------------------------------------------------------------------------------- * Copyright (c) <NAME>. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------------------------...
//----------------------------------------------------------------------------- // Copyright (c) 2015 GarageGames, LLC // // 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 restrictio...
#include "MySliceGLWidget.h" #include <QtGui> #include <algorithm> #include <cmath> using namespace std; // -------------------------------------------------------------------------- MySliceGLWidget::MySliceGLWidget(const QGLFormat &format, QWidget *parent, const QGLWidget *shareWidg...
#include <iostream> #include <fstream> #include <vector> #include <map> #include <cstring> #include <getopt.h> #include <ext/hash_map> namespace Sgi = ::__gnu_cxx; // GCC 4.0 and later #define HASHMAP __gnu_cxx using namespace::std; //////////////////////////////////////////////////////////// // hash_map ////...
/****************************************************************************** * Authors: <NAME> & <NAME> * * Contact: <EMAIL> * * License: Copyright (c) 2013 <NAME>, ANU. All rights reserved. * * ...
/**************************************************************************** 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 Softw...
// // Created by <NAME> on 10/10/17. // #include <iostream> #include <fstream> #include <iomanip> #include <clocale> #include "file_io.h" #include "boost/lexical_cast.hpp" #include "boost/format.hpp" #include "boost/filesystem.hpp" namespace std { namespace filesystem = boost::filesystem; } namespace fs = std::f...
#include "../../../benchmarks/Github/code/JodiTheTigger_meow_fft/context_code.c" #include "../../benchmarks/Accelerators/FFTW/interface.hpp" #include "complex" #include<vector> #include<nlohmann/json.hpp> #include<fstream> #include<iomanip> #include<clib/synthesizer.h> #include<time.h> #include<iostream> char *out...
/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certain ...
// Copyright 2018 The Fuchsia 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 <cstdlib> #include <iostream> #include <memory> #include <fuchsia/ui/scenic/cpp/fidl.h> #include <lib/async-loop/cpp/loop.h> #include <trace-prov...
#include "replay_system.hpp" #include "hooks.hpp" void ReplaySystem::record_action(bool hold, bool player1, bool flip) { if (is_recording()) { auto gm = gd::GameManager::sharedState(); auto play_layer = gm->getPlayLayer(); auto is_two_player = play_layer->m_levelSettings->m_twoPlayerMode; ...
/* * See header file for a description of this class. * * \author <NAME> INFN Padova * */ //----------------------- // This Class' Header -- //----------------------- #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHDecayVertex.h" //------------------------------- // Collaborating Class Headers -- //------...
#include "AutoLayout/ForceDirectedLayoutStrategy.h" static inline float CoolDown(float Temp, float CoolDownRate) { if (Temp < .01) return .01; return Temp - (Temp / CoolDownRate); } static inline float GetAttractForce(float X, float K) { return (X * X) / K; } static inline float GetRepulseForce(float X, float k) ...
#include <cstdio> #include <math.h> #include <memory> #include "Eisenstein.h" Eisenstein::Eisenstein (Complex input, const unsigned int weight) { input = Complex(input.Re() - floor(input.Re()), input.Im()); this->setInput(input); this->weight = weight; this->validateInput(); } Eisenstein::Eisenstein (const uns...
#include <websocketpp/config/asio_no_tls.hpp> #include <websocketpp/server.hpp> #include <fstream> #include <iostream> #include <set> #include <streambuf> #include <string> /** * The telemetry server accepts connections and sends a message every second to * each client containing an integer count. This...
#include "Validation/EventGenerator/interface/TTbar_GenLepAnalyzer.h" #include "DQMServices/Core/interface/DQMStore.h" #include "DataFormats/HepMCCandidate/interface/GenParticle.h" #include "Validation/EventGenerator/interface/PdtPdgMini.h" #include "Validation/EventGenerator/interface/DQMHelper.h" TTbar_GenLepAnalyze...
#include <stdexcept> #include <string> #include "OnlineDB/Oracle/interface/Oracle.h" #include "OnlineDB/EcalCondDB/interface/FEConfigLUTParamDat.h" #include "OnlineDB/EcalCondDB/interface/FEConfigLUTInfo.h" using namespace std; using namespace oracle::occi; FEConfigLUTParamDat::FEConfigLUTParamDat() { m_env = NULL...
/******************************************************************** * * LIL Is a Language * * AUTHORS: <NAME> * * COPYRIGHT: ©2020-today: All Rights Reserved * * LICENSE: see LICENSE file * * This file inserts calls to type conversion functions * *********************************...
#include "Stdafx.h" #include "ReversePolish.h" map<char, int> initPriorOperator() { map<char, int> priorOpertor; int max = 10; // numbers have no priority priorOpertor['+'] = 1; priorOpertor['-'] = 1; priorOpertor['*'] = 2; priorOpertor['/'] = 2; priorOpertor['('] = 3; priorOpertor[')'] = 3; priorOpertor[...
// Copyright [2017] <<NAME>> #include "../../include/noise.h" double noise::cubic_func(double x, const double param0, const double param1, const double param2, const double param3) { return param0+param1*x+param2*x*x+param3*x*x*x; } std::vector<double> noise::discrete_random_series(unsigned int siz...
#include <iostream> #include <string> #include <fstream> using namespace std; string arr1[20],arr2[20],arr3[20],arr4[20],arr5[20]; int total = 0; void enter(){ int choice; cout << "How many student do you want to enter: "; cin >> choice; if(total ==0){ total += choice; for( int i=0;i<choice;i++...
/* * TestLMICWrapper * * - LMIC callbacks with CallbackRegister * - standby with EnergyController * - timer interrupt with ISRTimer */ #include <Arduino.h> #include <arduino_lmic_hal_boards.h> #include <Wire.h> // leuville-arduino-easy-lmic #include <LMICWrapper.h> // leuville-arduino-utilities #include <misc-u...
/* * String.cxx * Copyright 2020 ItJustWorksTM * * 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 appli...
///////////////////////////////////////////////////////////////////////////// // // FILE NAME // LSpaceCharge.cc // // 05/30/12 // // DESCRIPTION // Calculate the effects of longitudinal space charge and impedance // on the bunch (1D) using impedance formulation // //////////////////////////////////////////////...
#include "Scene.h" #include <cmath> #include "sfml_c01.hpp" // Test d'interception du rayon contre toutes les objets de la scène puis renvoi des // rayons ré-émis; la première interception sur le trajet du rayon est choisie. // Voir ObjetComposite::essai_intercept_composite pour un code similaire. // std::vector<Rayo...
#include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <cstring> #include "tool/config.hpp" #include "eglstate/common.hpp" #include "image/image_all.hpp" using namespace pat; namespace { void PrintUsage(const char *argv0) { std::cout << "\n" "Usage: " << argv0 << " [OPTION] INPUT_IMAGE [OUTPUT...
#include <iostream> #include <chrono> #include <string> #include <vector> #include <thread> #include <atomic> #include <mutex> #include <stdint.h> #include <fcntl.h> #include <unistd.h> #include <cassert> #include <random> #include <functional> #include "param.h" #include "fsapi.h" //uint32_t maxFileSize = 2 * 1024...
// Minimal audio streaming using OpenSL. // // Loosely based on the Android NDK sample code. #include <assert.h> #include <string.h> #include <unistd.h> // for native audio #include <SLES/OpenSLES.h> #include <SLES/OpenSLES_Android.h> #include "../base/logging.h" #include "native-audio-so.h" // This is kinda ugly, ...
/* This file is part of cpp-ethereum. cpp-ethereum 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 3 of the License, or (at your option) any later version. cpp-ethereum is distributed in the...
// KTH DD2458 popuph14 // authors: <EMAIL> // <EMAIL> #pragma once #include <stdexcept> #include <vector> #include <bitset> #include <limits> #include <map> #include <algorithm> //Calculates GCD(a, b) template<typename T> T gcd(T a, T b) { T t; while (b != 0) { t = b; b = a % b; a = t; } ...
#include <algorithm> #include <string> #include <GL/glew.h> #include <GL/wgl.h> #include <GL/wglext.h> #include <GL/gl.h> #include <GLFW/glfw3.h> #include "Version.h" #include "common/Graphics.h" #include "gameplay/PlayScreenMarathon.h" #include "gameplay/PlayScreenSprint.h" #include "gameplay/PlayScreenUltra.h" #inc...
#include "json_writer_node.hpp" #include "json_atlas_dict.hpp" #include "helpers.hpp" #include <atlas2d/pixel_format.hpp> #include <rapidjson/document.h> #include <rapidjson/writer.h> #include <rapidjson/ostreamwrapper.h> #include <rapidjson/writer.h> #include <rapidjson/prettywriter.h> #include <easylogging++.h> #inc...
/* * Copyright (C) 2016 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 app...
/* Copyright 2016 Fixstars 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 agreed to in writing, softwa...
/*========================== begin_copyright_notice ============================ Copyright (C) 2020-2021 Intel Corporation SPDX-License-Identifier: MIT ============================= end_copyright_notice ===========================*/ #include "SendDescriptorDecoding.hpp" #include "../bits.hpp" #include "../IR/Messag...
/* @copyright <NAME> 2000-2013 @author <NAME> This file is part of Classdesc Open source licensed under the MIT license. See LICENSE for details. */ /* process a header file, inserting the macro CLASSDESC_ACCESS(classname) into each class or struct encountered conatining private definitions. CLASSDESC_ACCESS(...
/* * GetListOfConnTri2Tri_mex.cpp * * * Created by <NAME> on 1/7/09. * Copyright 2009 __MyCompanyName__. All rights reserved. * */ #include "GetListOfConnTri2Tri_mex.h" // #define p(i,j) p[(i)+np*(j)] #define ele(i,j) ele[(i)+nele*(j)] //#define list(i,j) list[(i)+nele*(j)]; /* To compile this file use: ...
/* <NAME> IIIT Bangalore */ #include<bits/stdc++.h> #define mt make_tuple #define mp make_pair #define pu push_back #define INF 4e9+1 #define MOD 1000000007 #define ll long long int #define ld long double #define fi first #define se second #define all(v) v.begin(),v.end() #define pr(v) { for(int i=0;i<v.size();i++) { ...
#include "rulemanager.h" #include <algorithm> #include <string> #include "completion.h" #include "globals.h" #include "ipc-protocol.h" #include "utils.h" using std::string; using std::to_string; using std::endl; using std::unique_ptr; /** * @brief RuleManager::parseRule * @param input * @param output * @param t...
// Copyright (c) 2009-2019 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. // Maintainer: joaander /*! \file BoxResizeUpdater.cc \brief Defines the BoxResizeUpdater class */ #include "BoxResizeUpdater.h" #include <math.h> #inclu...
/* ============================================================================== VoiceController.cpp Created: 9 May 2015 12:55:47pm Author: nik ============================================================================== */ #include "VoiceController.h" using namespace teragon; Voi...
// Copyright 2019 The Fuchsia 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 <arpa/inet.h> #include <errno.h> #include <lib/fit/defer.h> #include <lib/fitx/result.h> #include <netdb.h> #include <netinet/in.h> #include <stdi...
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" /*====== This file is part of PerconaFT. Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. PerconaFT is free software: you can redistribute it and/or modif...
#include "stdhdr.h" #include "aircrft.h" #include "fack.h" #include "icp.h" #include "simdrive.h" //MI for ICP stuff extern bool g_bRealisticAvionics; void ICPClass::ExecFACKMode(void) { AircraftClass *playerAC = SimDriver.GetPlayerAircraft(); if(!g_bRealisticAvionics) { //MI original Code FaultClass::str...
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // // Copyright (c) 2017, University of Bonn, Institute of Computer Science 4. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following cond...
/********************************************************************* * Fractal Calculation Engine * * The FractalEngine class provides an application-level interface * to Fractal computation, supporting both standard software and * accelerated implementations. ***************************************************...
/** * SimpleVario!! * Copyright <NAME> */ #include <SPI.h> #include "IGCFileRecorder.h" #include "SdFat/SdFat.h" #include "SimpleGPS.h" #include "TimeLib.h" #include "LiquidCrystal_I2C.h" #include "SimpleVario.h" #include "Utils.h" #include "Units/Measurement.h" #include "Units/UnitDuration.h" #define earthRadiusK...
/* * LZW file compressor adapted from the article on Dr.Dobbs Journal * (C) <NAME> * Modified by <NAME> * * Legend of Saladir (C) 1997/1998 */ #include "saladir.h" #include "output.h" #include "file.h" #include "process.h" #include "compress.h" /* * Global variables * */ FILE *istream=NULL; FILE *ostream...
#include "Skybox.hpp" #include <cassert> #include <fstream> #include <iostream> #include <memory> #include <string> #include <stb_image.h> #include <vector> #include <glm/glm.hpp> Skybox::Skybox(std::string const &pathShader, std::string const &pathDirectorySkyBox, std::list< std::string > const &skyboxFile) {...
#include "App.h" #include "Input.h" #include "Textures.h" #include "Audio.h" #include "Render.h" #include "Window.h" #include "Scene.h" #include "Map.h" #include "ModulePhysics.h" #include "ModulePlayer.h" #include "ModuleFadeToBlack.h" #include "Defs.h" #include "Log.h" Scene::Scene() : Module() { name.Create("scene...
//============================================================================ // Copyright 2009- ECMWF. // This software is licensed under the terms of the Apache Licence version 2.0 // which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. // In applying this licence, ECMWF does not waive the privileges...
//////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <SFML/Window.hpp> #include <X11/Xlib.h> #include <GL/gl.h> #include <GL/glu.h> #include <iostream> //////////////////////////////////////////////////////////// ///...
// Copyright (c) 2021 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/createnewsdialog.h> #include <qt/forms/ui_createnewsdialog.h> #include <amount.h> #include <wallet/wallet.h> #inclu...
#include <chrono> #include <iomanip> #include <thread> #include <sstream> //for std::stringstream #include "chrono_time.h" //[cppreference - chrono](https://zh.cppreference.com/w/cpp/chrono) //[c++数值极限numeric_limits](https://blog.csdn.net/yhc166188/article/details/90287807) const Time Time::MAX = Time(std::numeric_li...
#include <cctype> #include <string> #include <vector> bool isAllWhitespace( const std::string token) // No obvious way to do it in REGEX so that CLANG // on Linux won't miscompile it. { for (unsigned i = 0; i < token.size(); i++) if (!std::isspace(token[i])) return false; ...
#include "network/postgres/postgres_protocol_interpreter.h" #include <algorithm> #include <memory> #include <string> #include <thread> // NOLINT #include <utility> #include "network/network_defs.h" #include "network/postgres/postgres_network_commands.h" #include "network/terrier_server.h" constexpr uint32_t SSL_MES...
/* nymph_test_client.cpp - Test client application using the NymphRPC library. Revision 0 Features: - Notes: - 2017/06/24, <NAME> : Initial version. (c) Nyanko.ws */ #include "../../src/nymph.h" #include <iostream> #include <vector> void logFunction(int level, std::string logStr) { s...
/* * ImagePatch2.cpp * OpenCV * * Created by <NAME> on 10/24/10. * Copyright 2010 UC San Diego. All rights reserved. * */ #include "ImagePatch2.h" #include "DebugGlobals.h" #include "NMPTUtils.h" #include <iostream> #include <math.h> #include <fstream> #include <opencv2/imgproc/imgproc.hpp> using namespace...
/* Copyright (c) 2013 <NAME> http://RandyGaul.net 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 anyone to use this software for any purpose, including commerc...
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=4 sw=4 et tw=99 ft=cpp: * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file...
/* _____ ______ _____ / ____/ /\ | ____ | __ \ | | / \ | |__ | |__) | Caer - Modern Computer Vision | | / /\ \ | __| | _ / Languages: Python, C, C++, Cuda | |___ / ____ \ | |____ | | \ \ http://github.com/jasmcaus/caer \_____\/_/ \_ \______ |_| \_\ Licensed under...
#include <iostream> #include <SFML/Network.hpp> #include "..\Minesweeper\Minesweeper.h" #include <random> #include <vector> #include <iomanip> #include <sstream> #include <chrono> #include <thread> #define port 2002 using namespace std::chrono_literals; #define WaitFor(x) std::this_thread::sleep_for(x) // Struct to...
// <NAME> 2013. // // Trains a small artificial neural network using L-BFGS. // Learns the xor function from two inputs to one output // variable. // // This example illustrates how functions of matrices can // be optimized using automatic differentiations. #include <iostream> #include <random> #include <stdexcept> #...
#include "Normalizer.h" #include "MeanSubtraction.h" #include "MovingWindowMeanSub.h" #include "MaxSubtraction.h" #include "ContourSmoother.h" #include "MovingWindowSmoother.h" #include "ContourInterpolater.h" #include "CubicSplineInterpolater.h" #include "LinearInterpolater.h" #include "Config.h" #include "util.h" #in...
#include <ATen/Parallel.h> #include<ATen/ParallelOpenMP.h> #include <torch/extension.h> #define INDEX(A, i, j, si, sj) ( A[i * si + j * sj] ) #define ASSERT_IS_CPU(x) AT_ASSERTM(x.device().is_cpu(), #x " must be CPU tensor") template <typename scalar_t> static void run_parallel(scalar_t* A_data, scalar_t* B_data, sc...
/* * Copyright © 2011 Linaro Limited * * This file is part of the glmark2 OpenGL (ES) 2.0 benchmark. * * glmark2 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 3 of the License, or (at y...
/* * 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 w...
#include "lrcdecoder.h" #include <fstream> #include <iostream> #include <map> #include <sstream> #include <vector> static const string MetaData[7][2] = { {"ti", "title"}, {"al", "album"}, {"ar", "artist"}, {"au", "author"}, {"by", "creator"}, {"re", "encoder"}, {"ve", "encoder_version"} };...
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 <NAME> * Copyright (C) 2010-10-21 VIRES Simulationstechnologie GmbH * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The...
// Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: MIT #include <CL/sycl.hpp> #include <algorithm> #include <complex> #include <cstdio> #include <cstdlib> #include <fstream> #include <iostream> #include <numeric> #include <random> using namespace sycl; using namespace sycl::intel; const uint32_t ma...
// SPDX-License-Identifier: MIT #include "pacman.hh" #include <glob.h> #include <fstream> #include <string> #include <string_view> #include <vector> #include "absl/strings/ascii.h" #include "absl/types/span.h" namespace { class Glob { public: explicit Glob(std::string_view pattern) { glob_ok_ = glob...
#include "dashboard_page.h" #include "ui_dashboard_page.h" DashboardPage::~DashboardPage() { delete ui; } DashboardPage::DashboardPage(QWidget *parent) : QWidget(parent), ui(new Ui::DashboardPage), cpuBar(new CircleBar(tr("CPU"), {"#A8E063", "#56AB2F"}, this)), memBar(new CircleBar(tr("MEMORY"), {...
#include "router_hal.h" #include <ncurses.h> #include <readline/history.h> #include <readline/readline.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> void printMAC(macaddr_t mac) { printf("%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); } ...
#include "BMP180.h" uint8_t BMP180::OSS = 0; int16_t BMP180::ac1 = 0; int16_t BMP180::ac2 = 0; int16_t BMP180::ac3 = 0; int16_t BMP180::b1 = 0; int16_t BMP180::b2 = 0; int16_t BMP180::mb = 0; int16_t BMP180::mc = 0; int16_t BMP180::md = 0; uint16_t BMP180::ac4 = 0; uint16_t BMP180::ac5 = 0; uint16_t BMP180::ac6 = 0...
//Including SILVER_CORE header and includes. #include "silver_inc.h" #include "silver_core.h" #include "silver_primitive.h" #include "silver_renderbus.h" // SECTION 0 // GLOBAL DECLARATION SDL_GLContext slvr::glGhostContext = NULL; bool slvr::isGlInitialized = false; // SECTION I // FUNCTION DECLARATION //Start...
/* * Copyright (c) 2019 Samsung Electronics Co., Ltd. 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...
#include "weapon_armor_tooltip.h" #include <SCBW/api.h> #include <SCBW/enumerations/WeaponId.h> #include <cstdio> char buffer[128]; //Returns the special damage multiplier factor for units that don't use the //"Damage Factor" property in weapons.dat. u8 getDamageFactorForTooltip(u8 weaponId, const CUnit *u...
// // Created by fyabc on 2021/3/12. // #include "support/IO.h" #include <algorithm> #include <numeric> #include <vector> #include <unordered_map> using namespace std; class WC224Q2_Problem1726 { /** * WC224Q2_Problem1726: https://leetcode.com/contest/weekly-contest-224/problems/tuple-with-same-product/ ...
#include "muscle.h" #include "profile.h" #include "pwpath.h" #include <math.h> #define TRACE 0 #define EQ(a, b) (fabs(a-b) < 0.1) SCORE TraceBack(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB, unsigned uLengthB, const SCORE *DPM_, const SCORE *DPD_, const SCORE *DPI_, PWPath &Path) { #if ...
// Copyright 2013 Sina Inc. All rights reserved. // Author: <EMAIL> (<NAME>) // Only for testing #include <stdio.h> #include <stdlib.h> #include <string.h> #include <boost/shared_ptr.hpp> #include <boost/unordered_set.hpp> #include <string> #include <vector> #include <map> #include <iostream> // NOLINT #include "./in...
#include "../include/JogoForca.h" #include "../include/util.h" #include <iostream> #include <fstream> #include <string> #include <chrono>//sleep #include <thread>//sleep #include <random>//random number #include <ctime>//random number using namespace std; JogoForca::JogoForca(int argc, string nomeArquivo){ let...
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
/* * GameState.cpp * * Created on: 15 ene. 2018 * Author: manupc */ #include "GameState.h" #include <cstring> #include <string> using namespace std; GameState::GameState() { // Se construye un estado no válido // Ningún jugador inicializado turno= NONE; // Cada casilla de cada jugador contiene 4 gr...
// Optimise #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; // #define MULTI_TEST #ifdef LOCAL #define db(...) ZZ(#__VA_ARGS__, __VA_ARGS__); #define pc(...) PC(#__VA_ARGS__, __VA_ARGS__); template <typename T, type...
#include "lyricwidget.h" #include "libs/doubanplayer.h" #include <QVBoxLayout> #include <QDebug> #include <QPropertyAnimation> #include <QDebug> LyricWidget::LyricWidget(QWidget *parent) : QWidget(parent), ui(new Ui_LyricWidget), animWidget(nullptr), firstShowing(false), lyricGetter(new LyricGetter(th...
/** * Copyright (c) 2011, 2012 * <NAME> <<EMAIL>> * and the IceCube Collaboration <http://www.icecube.wisc.edu> * * 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 appea...
/*============================================================================== Copyright(c) 2017 Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including w...
/**************************************************************************** * Copyright (C) 2019 RoboMaster. * * 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 3 of the ...
// Copyright 2016-2018 <NAME> and <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 or ag...
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking. * Copyright (C) 2006-2016 <NAME>. All Rights Received. * https://github.com/kwhat/libuiohook/ * * libUIOHook is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by...
/* * NaryTree.cpp * hog2 * * Created by <NAME> on 10/20/10. * Copyright 2010 University of Denver. All rights reserved. * */ #include "NaryTree.h" #include <iostream> NaryTree::NaryTree(int branchingFactor, int depth) :b(branchingFactor), d(depth) { scaleWidth = 1.0; uint64_t tot = 1; uint64_t sum = 1; ...
#include "sn2_functions.h" #include "lemon/list_graph.h" #include "opencv2/imgproc.hpp" #include <fstream> //returns a pointer to an arc between source and target if it exists in graph, INVALID otherwise lemon::ListDigraph::OutArcIt GetArc(lemon::ListDigraph& graph, lemon::ListDigraph::Node& source, lemon::ListDigr...
/*This file is part of the FEBio Studio source code and is licensed under the MIT license listed below. See Copyright-FEBio-Studio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any per...
#include <iostream> const double EPS = 0.001; const double EPS_SQUARE = EPS * EPS; double side(double x1, double y1, double x2, double y2, double x, double y) { return (y2 - y1) * (x - x1) + (-x2 + x1) * (y - y1); } bool naivePointInTriangle(double x1, double y1, double x2, double y2, double x3, double y3, doubl...
#include "Boneco.h" #include <GL/glut.h> #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include "readBMP.h" Boneco::Boneco(){ // this->tipo = 6; } static GLfloat vdata[8][3] = { {-1.0, -1.0, -1.0}, {1.0, -1.0, -1.0}, {1.0, 1.0, -1.0}, {-1.0, 1.0, -1.0}, {-1.0, -1.0, 1.0}, {1....
/* * The file is licensed under the Apache License, Version 2.0 * (c) 2021 <NAME> * 31515 Wunstorf (Hannover) Germany */ #include <Arduino.h> #include "ESP32Led.h" uint16_t ESP32Led::_rmt_channel = 0; ESP32Led::~ESP32Led() { if (!_initDone) return; if (_clearLedsOnExit) Clear(); ESP_ERROR_CHECK(rmt_wait...