text
stringlengths
2
100k
meta
dict
class AdministratorInvitationsController < ApplicationController before_action :authenticate_administrator! before_action :set_user # PUT /admin_invitations/:id # PATCH /admin_invitations/:id def update if [email protected]_or_not_invited? @user.invite! flash[:success] = t("devise.invitations.send_instructions", email: @user.email) else flash[:success] = t("devise.invitations.not_sent", email: @user.email) end redirect_to user_path(@user) end private def set_user @user = User.find(params[:id]) end end
{ "pile_set_name": "Github" }
#include "qt_utils.h" QImage GrayMat2QImage(cv::Mat const& src) { cv::Mat temp; src.copyTo(temp); QImage dest((const uchar *)temp.data, temp.cols, temp.rows, static_cast<int>(temp.step), QImage::Format_Indexed8); dest.bits(); return dest; } QImage Mat2QImage(cv::Mat const& src) { cv::Mat temp; cvtColor(src, temp, CV_BGR2RGB); QImage dest((const uchar *)temp.data, temp.cols, temp.rows, static_cast<int>(temp.step), QImage::Format_RGB888); dest.bits(); return dest; } cv::Mat QImage2Mat(QImage const& src) { cv::Mat tmp(src.height(), src.width(), CV_8UC3, (uchar*)src.bits(), static_cast<size_t>(src.bytesPerLine())); cv::Mat result; cvtColor(tmp, result, CV_RGB2BGR); return result; } QString base64_encode(const QString string) { QByteArray ba; ba.append(string); return ba.toBase64(); } QString base64_decode(const QString string) { QByteArray ba; ba.append(string); return QByteArray::fromBase64(ba); } QString md5_encode(const QString string) { QByteArray ba; ba.append(string); return QString(QCryptographicHash::hash((ba), QCryptographicHash::Md5).toHex()); } int str2int(const std::string &s) { int i; std::stringstream ss; ss << s; ss >> i; return i; } template<typename T> std::string to_string(T t) { std::stringstream ss; ss << t; return ss.str(); } template std::string to_string<double>(double); template std::string to_string<int>(int); template std::string to_string<size_t>(size_t); template std::string to_string<long>(long); template std::string to_string<long long>(long long); bool fileExists(QString path) { QFileInfo check_file(path); // check if file exists and if yes: Is it really a file and no directory? return check_file.exists() && check_file.isFile(); }
{ "pile_set_name": "Github" }
/** ****************************************************************************** * @file imagebrowser_res.c * @author MCD Application Team * @brief resources define for Image Browser module ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics International N.V. * All rights reserved.</center></h2> * * Redistribution and use in source and binary forms, with or without * modification, are permitted, provided that the following conditions are met: * * 1. Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of other * contributors to this software may be used to endorse or promote products * derived from this software without specific written permission. * 4. This software, including modifications and/or derivative works of this * software, must execute solely and exclusively on microcontroller or * microprocessor devices manufactured by or for STMicroelectronics. * 5. Redistribution and use of this software other than as permitted under * this license is void and will automatically terminate your rights under * this license. * * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include <stdlib.h> #include "GUI.h" #ifndef GUI_CONST_STORAGE #define GUI_CONST_STORAGE const #endif /** @addtogroup IMAGE_BROWSER_MODULE * @{ */ /** @defgroup IMAGE_BROWSER_RES * @brief image browser resources * @{ */ #if defined(__CC_ARM) __attribute__((section(".ExtFlashSection"))) #elif defined(__GNUC__) __attribute__((section(".ExtFlashSection"))) #elif defined(__ICCARM__) #pragma location="ExtFlashSection" #endif static GUI_CONST_STORAGE unsigned long _acimage[] = { 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xF9E6B26C, 0xF3E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF2E6B26C, 0xF3E6B26C, 0xFBE6B26C, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xEDE6B26C, 0xA4E6B26C, 0x79E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x76E6B26C, 0x79E6B26C, 0xAEE6B26C, 0xF5E6B26C, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xB3E6B26C, 0x21E7B573, 0x00ECC48E, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EDC997, 0x00EBC28C, 0x19E7B673, 0xC5E6B26C, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x9CE6B26C, 0x0AEABF84, 0x00F7E8D3, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00FCF5EB, 0x00F7E5CE, 0x00EABD81, 0x9DE6B26C, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0xC6E6B26C, 0xBEE6B26C, 0xBEE6B26C, 0xBEE6B26C, 0xBEE6B26C, 0xBEE6B26C, 0xC7E6B26C, 0xFADBAA67, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x46E6B26C, 0x2CE6B26C, 0x2CE6B26C, 0x2CE6B26C, 0x2CE6B26C, 0x2CE6B26C, 0x47E6B26C, 0xEEE3B06B, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B571, 0x00EECC9E, 0x00F6E5CE, 0x00F6E5CE, 0x00F6E5CE, 0x00EECD9F, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3D9B7, 0x00FFFEFE, 0x00FFFEFE, 0x00FFFEFE, 0x00F3DAB8, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFD, 0x00FDFAF5, 0x00FDF9F5, 0x00FFFEFE, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FDFAF5, 0x00F7E6D0, 0x00EECEA2, 0x00EFCDA1, 0x00FBF2E5, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FDFAF6, 0x00F3D9B6, 0x00EBC087, 0x00EABE82, 0x00E7B471, 0x00EECB9A, 0x00FCF7EF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F5DFC3, 0x00EABE83, 0x00F3D9B7, 0x00F7E8D3, 0x00ECC693, 0x00E6B46F, 0x00F0D1A7, 0x00FCF6EF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEFE1, 0x00E9BC80, 0x00F0CFA4, 0x00FDF8F2, 0x00FFFEFD, 0x00FAF0E2, 0x00ECC48E, 0x00E7B572, 0x00F0D2A9, 0x00FDF9F4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FEFBF8, 0x00EDC693, 0x00EDC692, 0x00FDF7EF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFE, 0x00FCF4EB, 0x00EABF84, 0x00E7B674, 0x00F1D5B1, 0x00FDF9F5, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FDFAF6, 0x00F1D3AA, 0x00EABF85, 0x00FCF7F0, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FCF5EB, 0x00ECC590, 0x00E7B673, 0x00F1D4AD, 0x00FDF8F2, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FEFCFA, 0x00F4DEC0, 0x00EBC189, 0x00F7E7D1, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFE, 0x00FBF1E3, 0x00EDC895, 0x00E8B878, 0x00F2D9B6, 0x00FDF9F4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFC, 0x00F8EAD7, 0x00ECC692, 0x00F3DBBB, 0x00FEFCF9, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFE, 0x00FAEFDF, 0x00EDC897, 0x00E8B978, 0x00F2D8B4, 0x00FEFCFA, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFDFC, 0x00FFFEFD, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFE, 0x00FAF1E3, 0x00EDC998, 0x00F0D2A8, 0x00FCF7EF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFE, 0x00FAEFE0, 0x00EDC896, 0x00E8B776, 0x00F4DEC0, 0x00FEFDFB, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFC, 0x00F9EFE0, 0x00F3D9B8, 0x00F8E8D4, 0x00FEFDFB, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FDF9F4, 0x00EFCEA2, 0x00EDC795, 0x00FAF0E3, 0x00FFFFFE, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFE, 0x00FBF1E4, 0x00ECC693, 0x00E9BA7C, 0x00F4DEBF, 0x00FEFDFB, 0x00FFFFFF, 0x00FFFFFF, 0x00FEFCF9, 0x00F3D9B7, 0x00EBC38C, 0x00E9BC7F, 0x00EBC087, 0x00F5E1C6, 0x00FEFCFA, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F4DEC0, 0x00EABF86, 0x00F8E8D4, 0x00FFFEFD, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFE, 0x00FCF6ED, 0x00EBC088, 0x00E9BB7C, 0x00F4DEC1, 0x00FEFCFA, 0x00F8EAD7, 0x00ECC591, 0x00EABE83, 0x00F5DFC1, 0x00FAF0E3, 0x00EFCFA4, 0x00E8BA7B, 0x00F3DBB9, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFE, 0x00F9EAD8, 0x00E9BB7C, 0x00F5E0C3, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FCF6ED, 0x00ECC793, 0x00E8B979, 0x00EAC086, 0x00E9BC7F, 0x00F0D1A7, 0x00FDF9F3, 0x00FFFFFF, 0x00FFFFFF, 0x00FEFCF8, 0x00F2D7B3, 0x00E8B878, 0x00F0D0A5, 0x00FCF8F1, 0x00FFFEFE, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAF1E5, 0x00EBC189, 0x00F1D5AF, 0x00FEFDFC, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFE, 0x00FBF2E6, 0x00EFCD9F, 0x00EECB9C, 0x00F8E9D4, 0x00FEFDFB, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FEFDFB, 0x00F5DEC0, 0x00E9BC7F, 0x00EECB9B, 0x00FAF0E2, 0x00FEFDFC, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FDF7F0, 0x00EFCEA0, 0x00EDC997, 0x00FEFBF7, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFE, 0x00FDF8F2, 0x00FDF9F3, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F5E1C6, 0x00EBC188, 0x00ECC693, 0x00F8EAD7, 0x00FEFDFB, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FEFBF7, 0x00F3DBBA, 0x00ECC590, 0x00F9EDDC, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FEFDFB, 0x00F7E7D1, 0x00ECC691, 0x00ECC38C, 0x00F7E5CD, 0x00FEFDFB, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFEFD, 0x00F7E6CE, 0x00EABD81, 0x00F0D1A6, 0x00F7E8D3, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F8EAD7, 0x00F7E8D3, 0x00F1D6B2, 0x00E9BA7C, 0x00E9BD80, 0x00F3DCBC, 0x00FFFEFE, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFE, 0x00FAEEE0, 0x00EBC188, 0x00E6B36D, 0x00E8B775, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B979, 0x00E8B777, 0x00E6B46F, 0x00E6B26C, 0x00E7B674, 0x00F2D6B1, 0x00FEFDFA, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFEFD, 0x00FCF5ED, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9ECDB, 0x00F9EEDE, 0x00FDF9F3, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EBC38C, 0x00FAF1E4, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x00EBC086, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09EAC087, 0x00FAF0E1, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00FFFFFE, 0x00F9EDDD, 0x00EABF85, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09E7B775, 0x00EECC9D, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00F1D3AA, 0x00EECB9B, 0x00E8B776, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x98E6B26C, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0x9BE6B26C, 0x09E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x9EE5B16B, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DAB9, 0x20E6B26C, 0xE9E6B26C, 0xC6E3B06B, 0x3FE5B16C, 0x10E6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x0FE6B26C, 0x10E6B26C, 0x2BE5B16C, 0xDADFAC69, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F3DBBA, 0x1DE6B26C, 0xD4E5B16C, 0xE7E2AF6A, 0xB7E3B06B, 0x84E3B06B, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7EE3B06A, 0x7FE3B06A, 0x90E3B06B, 0xD3DAA966, 0xFCC99B5E, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00F7E6D0, 0x0DE6B470, 0x5BE5B16C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x64E6B26C, 0x6AE6B26C, 0xC2E6B26C, 0xFF000000, 0xFF000000, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FDFBF7, 0x00F2DAB8, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EFCFA2, 0x00EDC896, 0x09E7B674, 0x9AE6B26C, 0xFF000000, 0xFF000000, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FEFCF9, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00FCF7F0, 0x00F8E8D3, 0x09E9BC7F, 0x9AE6B26C, 0xFF000000, 0xFF000000, 0x1FE7B674, 0x00F3DAB8, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FAEEDF, 0x09EABD81, 0x9AE6B26C, 0xFF000000, 0xFF000000, 0x1FE7B471, 0x00EECC9E, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F8E9D5, 0x00F4DDBE, 0x09E9BA7B, 0x9AE6B26C, 0xFF000000, 0xFF000000, 0x1FE6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x09E6B26C, 0x9AE6B26C, 0xFF000000, 0xFF000000, 0x29E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x00E6B26C, 0x09E6B26C, 0x9AE6B26C, 0xFF000000, 0xFF000000, 0x87E6B26C, 0x1FE6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x14E6B26C, 0x1DE6B26C, 0xA3E5B16B, 0xFF000000, 0xFF000000, 0xEEE6B26C, 0xC6E5B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC0E6B26C, 0xC3E6B26C, 0xE7E5B16B, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000 }; static GUI_CONST_STORAGE GUI_BITMAP bmimage = { 60, /* x Size */ 60, /* y Size */ 240, /* Bytes Per Line */ 32, /* Bits Per Pixel */ (unsigned char *)_acimage, /* Pointer to picture data */ NULL, /* Pointer to palette */ GUI_DRAW_BMP8888 }; /** * @} */ /** * @} */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
{ "pile_set_name": "Github" }
// Copyright 2012 Neal van Veen. All rights reserved. // Usage of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package gotty type TermInfo struct { boolAttributes map[string]bool numAttributes map[string]int16 strAttributes map[string]string // The various names of the TermInfo file. Names []string } type stacker interface { } type stack []stacker type parser struct { st stack parameters []stacker dynamicVar map[byte]stacker }
{ "pile_set_name": "Github" }
/* * * Copyright 2015 gRPC authors. * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include <grpc/support/port_platform.h> #ifdef GPR_POSIX_STRING #include <stdarg.h> #include <stdio.h> #include <string.h> #include <grpc/support/alloc.h> int gpr_asprintf(char **strp, const char *format, ...) { va_list args; int ret; char buf[64]; size_t strp_buflen; /* Use a constant-sized buffer to determine the length. */ va_start(args, format); ret = vsnprintf(buf, sizeof(buf), format, args); va_end(args); if (ret < 0) { *strp = NULL; return -1; } /* Allocate a new buffer, with space for the NUL terminator. */ strp_buflen = (size_t)ret + 1; if ((*strp = (char *)gpr_malloc(strp_buflen)) == NULL) { /* This shouldn't happen, because gpr_malloc() calls abort(). */ return -1; } /* Return early if we have all the bytes. */ if (strp_buflen <= sizeof(buf)) { memcpy(*strp, buf, strp_buflen); return ret; } /* Try again using the larger buffer. */ va_start(args, format); ret = vsnprintf(*strp, strp_buflen, format, args); va_end(args); if ((size_t)ret == strp_buflen - 1) { return ret; } /* This should never happen. */ gpr_free(*strp); *strp = NULL; return -1; } #endif /* GPR_POSIX_STRING */
{ "pile_set_name": "Github" }
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. Eigen itself is part of the KDE project. // // Copyright (C) 2008 Daniel Gomez Ferro <[email protected]> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #include "sparse.h" template<typename SparseMatrixType> void sparse_product(const SparseMatrixType& ref) { const int rows = ref.rows(); const int cols = ref.cols(); typedef typename SparseMatrixType::Scalar Scalar; enum { Flags = SparseMatrixType::Flags }; double density = std::max(8./(rows*cols), 0.01); typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix; typedef Matrix<Scalar,Dynamic,1> DenseVector; // test matrix-matrix product { DenseMatrix refMat2 = DenseMatrix::Zero(rows, rows); DenseMatrix refMat3 = DenseMatrix::Zero(rows, rows); DenseMatrix refMat4 = DenseMatrix::Zero(rows, rows); DenseMatrix dm4 = DenseMatrix::Zero(rows, rows); SparseMatrixType m2(rows, rows); SparseMatrixType m3(rows, rows); SparseMatrixType m4(rows, rows); initSparse<Scalar>(density, refMat2, m2); initSparse<Scalar>(density, refMat3, m3); initSparse<Scalar>(density, refMat4, m4); VERIFY_IS_APPROX(m4=m2*m3, refMat4=refMat2*refMat3); VERIFY_IS_APPROX(m4=m2.transpose()*m3, refMat4=refMat2.transpose()*refMat3); VERIFY_IS_APPROX(m4=m2.transpose()*m3.transpose(), refMat4=refMat2.transpose()*refMat3.transpose()); VERIFY_IS_APPROX(m4=m2*m3.transpose(), refMat4=refMat2*refMat3.transpose()); // sparse * dense VERIFY_IS_APPROX(dm4=m2*refMat3, refMat4=refMat2*refMat3); VERIFY_IS_APPROX(dm4=m2*refMat3.transpose(), refMat4=refMat2*refMat3.transpose()); VERIFY_IS_APPROX(dm4=m2.transpose()*refMat3, refMat4=refMat2.transpose()*refMat3); VERIFY_IS_APPROX(dm4=m2.transpose()*refMat3.transpose(), refMat4=refMat2.transpose()*refMat3.transpose()); // dense * sparse VERIFY_IS_APPROX(dm4=refMat2*m3, refMat4=refMat2*refMat3); VERIFY_IS_APPROX(dm4=refMat2*m3.transpose(), refMat4=refMat2*refMat3.transpose()); VERIFY_IS_APPROX(dm4=refMat2.transpose()*m3, refMat4=refMat2.transpose()*refMat3); VERIFY_IS_APPROX(dm4=refMat2.transpose()*m3.transpose(), refMat4=refMat2.transpose()*refMat3.transpose()); VERIFY_IS_APPROX(m3=m3*m3, refMat3=refMat3*refMat3); } // test matrix - diagonal product if(false) // it compiles, but the precision is terrible. probably doesn't matter in this branch.... { DenseMatrix refM2 = DenseMatrix::Zero(rows, rows); DenseMatrix refM3 = DenseMatrix::Zero(rows, rows); DiagonalMatrix<DenseVector> d1(DenseVector::Random(rows)); SparseMatrixType m2(rows, rows); SparseMatrixType m3(rows, rows); initSparse<Scalar>(density, refM2, m2); initSparse<Scalar>(density, refM3, m3); VERIFY_IS_APPROX(m3=m2*d1, refM3=refM2*d1); VERIFY_IS_APPROX(m3=m2.transpose()*d1, refM3=refM2.transpose()*d1); VERIFY_IS_APPROX(m3=d1*m2, refM3=d1*refM2); VERIFY_IS_APPROX(m3=d1*m2.transpose(), refM3=d1 * refM2.transpose()); } // test self adjoint products { DenseMatrix b = DenseMatrix::Random(rows, rows); DenseMatrix x = DenseMatrix::Random(rows, rows); DenseMatrix refX = DenseMatrix::Random(rows, rows); DenseMatrix refUp = DenseMatrix::Zero(rows, rows); DenseMatrix refLo = DenseMatrix::Zero(rows, rows); DenseMatrix refS = DenseMatrix::Zero(rows, rows); SparseMatrixType mUp(rows, rows); SparseMatrixType mLo(rows, rows); SparseMatrixType mS(rows, rows); do { initSparse<Scalar>(density, refUp, mUp, ForceRealDiag|/*ForceNonZeroDiag|*/MakeUpperTriangular); } while (refUp.isZero()); refLo = refUp.transpose().conjugate(); mLo = mUp.transpose().conjugate(); refS = refUp + refLo; refS.diagonal() *= 0.5; mS = mUp + mLo; for (int k=0; k<mS.outerSize(); ++k) for (typename SparseMatrixType::InnerIterator it(mS,k); it; ++it) if (it.index() == k) it.valueRef() *= 0.5; VERIFY_IS_APPROX(refS.adjoint(), refS); VERIFY_IS_APPROX(mS.transpose().conjugate(), mS); VERIFY_IS_APPROX(mS, refS); VERIFY_IS_APPROX(x=mS*b, refX=refS*b); VERIFY_IS_APPROX(x=mUp.template marked<UpperTriangular|SelfAdjoint>()*b, refX=refS*b); VERIFY_IS_APPROX(x=mLo.template marked<LowerTriangular|SelfAdjoint>()*b, refX=refS*b); VERIFY_IS_APPROX(x=mS.template marked<SelfAdjoint>()*b, refX=refS*b); } } void test_eigen2_sparse_product() { for(int i = 0; i < g_repeat; i++) { CALL_SUBTEST_1( sparse_product(SparseMatrix<double>(8, 8)) ); CALL_SUBTEST_2( sparse_product(SparseMatrix<std::complex<double> >(16, 16)) ); CALL_SUBTEST_1( sparse_product(SparseMatrix<double>(33, 33)) ); CALL_SUBTEST_3( sparse_product(DynamicSparseMatrix<double>(8, 8)) ); } }
{ "pile_set_name": "Github" }
/* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * shall be included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Except as contained in this notice, the name of Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ /* ** Author: Eric Veach, July 1994. ** */ #include "gluos.h" #include <stdlib.h> #include "geom.h" #include "mesh.h" #include "tessmono.h" #include <assert.h> #define AddWinding(eDst,eSrc) (eDst->winding += eSrc->winding, \ eDst->Sym->winding += eSrc->Sym->winding) /* __gl_meshTessellateMonoRegion( face ) tessellates a monotone region * (what else would it do??) The region must consist of a single * loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this * case means that any vertical line intersects the interior of the * region in a single interval. * * Tessellation consists of adding interior edges (actually pairs of * half-edges), to split the region into non-overlapping triangles. * * The basic idea is explained in Preparata and Shamos (which I don''t * have handy right now), although their implementation is more * complicated than this one. The are two edge chains, an upper chain * and a lower chain. We process all vertices from both chains in order, * from right to left. * * The algorithm ensures that the following invariant holds after each * vertex is processed: the untessellated region consists of two * chains, where one chain (say the upper) is a single edge, and * the other chain is concave. The left vertex of the single edge * is always to the left of all vertices in the concave chain. * * Each step consists of adding the rightmost unprocessed vertex to one * of the two chains, and forming a fan of triangles from the rightmost * of two chain endpoints. Determining whether we can add each triangle * to the fan is a simple orientation test. By making the fan as large * as possible, we restore the invariant (check it yourself). */ int __gl_meshTessellateMonoRegion( GLUface *face ) { GLUhalfEdge *up, *lo; /* All edges are oriented CCW around the boundary of the region. * First, find the half-edge whose origin vertex is rightmost. * Since the sweep goes from left to right, face->anEdge should * be close to the edge we want. */ up = face->anEdge; assert( up->Lnext != up && up->Lnext->Lnext != up ); for( ; VertLeq( up->Dst, up->Org ); up = up->Lprev ) ; for( ; VertLeq( up->Org, up->Dst ); up = up->Lnext ) ; lo = up->Lprev; while( up->Lnext != lo ) { if( VertLeq( up->Dst, lo->Org )) { /* up->Dst is on the left. It is safe to form triangles from lo->Org. * The EdgeGoesLeft test guarantees progress even when some triangles * are CW, given that the upper and lower chains are truly monotone. */ while( lo->Lnext != up && (EdgeGoesLeft( lo->Lnext ) || EdgeSign( lo->Org, lo->Dst, lo->Lnext->Dst ) <= 0 )) { GLUhalfEdge *tempHalfEdge= __gl_meshConnect( lo->Lnext, lo ); if (tempHalfEdge == NULL) return 0; lo = tempHalfEdge->Sym; } lo = lo->Lprev; } else { /* lo->Org is on the left. We can make CCW triangles from up->Dst. */ while( lo->Lnext != up && (EdgeGoesRight( up->Lprev ) || EdgeSign( up->Dst, up->Org, up->Lprev->Org ) >= 0 )) { GLUhalfEdge *tempHalfEdge= __gl_meshConnect( up, up->Lprev ); if (tempHalfEdge == NULL) return 0; up = tempHalfEdge->Sym; } up = up->Lnext; } } /* Now lo->Org == up->Dst == the leftmost vertex. The remaining region * can be tessellated in a fan from this leftmost vertex. */ assert( lo->Lnext != up ); while( lo->Lnext->Lnext != up ) { GLUhalfEdge *tempHalfEdge= __gl_meshConnect( lo->Lnext, lo ); if (tempHalfEdge == NULL) return 0; lo = tempHalfEdge->Sym; } return 1; } /* __gl_meshTessellateInterior( mesh ) tessellates each region of * the mesh which is marked "inside" the polygon. Each such region * must be monotone. */ int __gl_meshTessellateInterior( GLUmesh *mesh ) { GLUface *f, *next; /*LINTED*/ for( f = mesh->fHead.next; f != &mesh->fHead; f = next ) { /* Make sure we don''t try to tessellate the new triangles. */ next = f->next; if( f->inside ) { if ( !__gl_meshTessellateMonoRegion( f ) ) return 0; } } return 1; } /* __gl_meshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces * which are not marked "inside" the polygon. Since further mesh operations * on NULL faces are not allowed, the main purpose is to clean up the * mesh so that exterior loops are not represented in the data structure. */ void __gl_meshDiscardExterior( GLUmesh *mesh ) { GLUface *f, *next; /*LINTED*/ for( f = mesh->fHead.next; f != &mesh->fHead; f = next ) { /* Since f will be destroyed, save its next pointer. */ next = f->next; if( ! f->inside ) { __gl_meshZapFace( f ); } } } #define MARKED_FOR_DELETION 0x7fffffff /* __gl_meshSetWindingNumber( mesh, value, keepOnlyBoundary ) resets the * winding numbers on all edges so that regions marked "inside" the * polygon have a winding number of "value", and regions outside * have a winding number of 0. * * If keepOnlyBoundary is TRUE, it also deletes all edges which do not * separate an interior region from an exterior one. */ int __gl_meshSetWindingNumber( GLUmesh *mesh, int value, GLboolean keepOnlyBoundary ) { GLUhalfEdge *e, *eNext; for( e = mesh->eHead.next; e != &mesh->eHead; e = eNext ) { eNext = e->next; if( e->Rface->inside != e->Lface->inside ) { /* This is a boundary edge (one side is interior, one is exterior). */ e->winding = (e->Lface->inside) ? value : -value; } else { /* Both regions are interior, or both are exterior. */ if( ! keepOnlyBoundary ) { e->winding = 0; } else { if ( !__gl_meshDelete( e ) ) return 0; } } } return 1; }
{ "pile_set_name": "Github" }
/* original parser id follows */ /* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */ /* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */ #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 #define YYCHECK "yyyymmdd" #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) #define yyerrok (yyerrflag = 0) #define YYRECOVERING() (yyerrflag != 0) #define YYENOMEM (-2) #define YYEOF 0
{ "pile_set_name": "Github" }
# Space [`Space`](#space-space) provides a general context for its points to be expressed. Each subclass of `Space` represents a specific context. Currently **`Pts`** includes [`CanvasSpace`](#canvas-canvasspace) which corresponds to the [`canvas`](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) element, and [`SVGSpace`](#svg-svgspace) which lets you create vector graphics in svg format instead. There is also an experimental [`HTMLSpace`](#dom-htmlspace) which renders forms in basic html elements. Soon we will have spaces for other contexts too. [`CanvasSpace`](#canvas-canvasspace) can be created like this: ``` let space = new CanvasSpace( "#hello" ); space.setup({ bgcolor: "#123", retina: true }); ``` The "#hello" is a [`selector string`](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector) that selects an element in the html page. If the element is a `<canvas>`, it will be used by CanvasSpace. If the element is a `<div>` or other block element, a new `<canvas>` will be appended into it. You may also pass a HTMLElement directly, instead of a query selector string. Once the space is created, you can optionally call the [`setup`](#canvas-canvasspace) function to specify its background color (`bgcolor`) and other properties. Take a look at the [`setup`](#canvas-canvasspace) documentation for more. Now the space is set up, let's look at what it can do. ### Players A space by itself is void of form. Let's add a "player" to it. A player can be either a function or an object with specific properties. ``` space.add( (time, ftime) => { // do things }); ``` In the above, we use [`add`](#canvas-canvasspace) to add a simple callback function. It has 2 parameters: `time` which gives the current running time, and `ftime` which gives the time taken to draw the previous frame. This callback is like an animation loop, which will be called continuously when the player plays. Let's look at a more elaborate player: ``` space.add( { start: (bound, space) => { // code for init }, animate: (time, ftime, space) => { // code for animation }, action: (type, x, y, event) => { // code for interaction }, resize: (size, event) => { // code for resize } } ); ``` Here we add an object that conforms to the [IPlayer](../docs/?p=Types_IPlayer) interface, which defines 4 optional callback functions: - `start` function is called when the space is ready. It includes 2 parameters: `bound` which returns the bounding box, and `space` which returns its space. - `animate` function is called continuously when the space plays. It includes 2 parameters: `time` which gives the current running time, and `ftime` which gives the time taken to draw the previous frame. - `action` function is called when an user event is detected. It includes 4 parameters: `type` is a string that returns the action's name. ("up", "down", "move", "drag", "drop", "over", and "out"). `x` and `y` returns the position at which the action happened, and `event` returns the actual event object. See also: [`bindMouse`](#canvas-canvasspace) - `resize` function is called when the space is resized. It includes 2 parameter: `size` which returns the new size, and event which returns the event object You may add multiple players into a space, each taking care of specific parts of a scene. Use [`add`](#canvas-canvasspace) and [`remove`](#canvas-canvasspace) to manage a space's players. ### Animation and interaction You can tell a space to play or stop its players using [`play`](#canvas-canvasspace), [`stop`](#canvas-canvasspace) and other functions: ``` space.play(); space.playOnce( 1000 ); // play 1 sec then stop space.pause(); space.resume(); space.stop(); ``` Using [`bindMouse`](#canvas-canvasspace) and [`bindTouch`](#canvas-canvasspace), you can easily make the space respond to user interactions. Once the space can receive mouse or touch events, you can track the events using a player's `action` callback function, as described above. ``` // You can chain multiple functions together space.bindMouse().bindTouch().play(); ``` CanvasSpace also provides a couple convenient properties which you may access once the space is initiated. [`.pointer`](#canvas-canvasspace) gives you the current pointer position. [`.size`](#canvas-canvasspace), [`.center`](#canvas-canvasspace), [`.width`](#canvas-canvasspace), [`.height`](#canvas-canvasspace) and [`.innerBound`](#canvas-canvasspace) are handy to get a space's size and center point. [`.element`](#canvas-canvasspace) and [`.parent`](#canvas-canvasspace) returns the html elements of this space. CanvasSpace also supports offscreen rendering which may help with rendering complex scene. Take a look at the source code of [this study](../study/index.html?name=CanvasSpace.offscreen) for more. ### Form In the [Get Started](./Get-started-0100.html) guide, we made an analogy of paper and pencil when introducing Space and Form. So [`CanvasForm`](#canvas-canvasform) represents a pencil to draw on CanvasSpace. You can get the form with a single function call. ``` let space = new CanvasSpace("#paper"); let form = space.getForm(); // get default CanvasForm ``` [`CanvasForm`](#canvas-canvasform) includes many convenient functions to draw shapes on `<canvas>` element. Usually, you'll use these drawing functions in a player's `animate` function like this: ``` // Draw points inside the animate callback function space.add( (time, ftime) => { form.stroke("#fff").fill("#f03").circle( c ); form.point( p, 10 ); } ); ``` If you need more advanced canvas functions, you can get canvas' rendering context by accessing `ctx` property. For example: `form.ctx.clip()`. ![js:space_form](./assets/bg.png) ##### A demo of drawing different shapes And since both Space and Form are javascript classes, you can extend them to override its functions and add new ones. ### SVG Space You can easily switch you code from [`CanvasSpace`](#canvas-canvasspace) to [`SVGSpace`](#svg-svgspace) in 3 easy steps: First, initiate space as `SVGSpace` instead of `CanvasSpace`. If you use `space.getForm()`, then it will return an `SVGForm` instead of `CanvasForm` automatically. Second, in the beginning of your animate callback function, add this line: ``` form.scope( this ); ``` This keeps track of the created svg or dom elements to optimize rendering. Lastly, if you use es6 arrow function in a player's callback functions, for example: ``` animate: (time, ftime) => ... ``` You should change it back to the standard form: ``` animate: function( time, ftime) ... ``` The arrow function automatically binds `this` and will confuse the `form.scope(this)` call. Take a look at the source code of the [svg demo](https://ptsjs.org/demo/index.html?name=svgform.scope). It's pretty straightforward. ### HTML Space There's also experimental support for rendering HTML elements using [`HTMLSpace`](#dom-htmlspace), which you can use by making similar changes in your code as described in SVG section above. Take a look at the [html demo](https://ptsjs.org/demo/index.html?name=htmlform.scope) and its source code. Because of the limitations of HTML, you cannot draw polygon, arc, and some other shapes with it. If you use Pts with React or other web rendering frameworks, it will be better to use the props and states of their virtual DOM implementations instead. ### Cheat sheet The quickest way to start is to use the `quickStart` function, which initiates a [`CanvasSpace`](#canvas-canvasspace) and adds `space` and `form` instances into current scope. You can create an interactive piece in 2 lines of code: ``` Pts.namespace( this ); // not needed if using npm package let run = Pts.quickStart( "elemID", "#f03" ) run( (time, ftime) => form.fill("#f03").point( space.pointer, 10, "circle" ) ); ``` The following snippet is a typical template for creating a Pts space and form. Use this if you need more than an animation loop. You can add either an animation function or an `IPlayer` object to a space. (See above for details) ``` Pts.namespace( this ); // not needed if using npm package var space = new CanvasSpace("elemID").setup({ retina: true }); var form = space.getForm(); space.add( (time, ftime) => { form.fill("#f03").point( space.pointer, 10, "circle" ); } ); space.bindMouse().bindTouch().play(); ```
{ "pile_set_name": "Github" }
// Copyright (c) 2013 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. #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_H_ #define UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_H_ #include "base/macros.h" #include "base/observer_list.h" #include "base/strings/string16.h" #include "ui/message_center/message_center_export.h" #include "ui/message_center/message_center_observer.h" #include "ui/message_center/message_center_tray_delegate.h" #include "ui/message_center/notifier_settings.h" namespace ui { class MenuModel; } namespace message_center { class MessageCenter; class MessageBubbleBase; class MessagePopupBubble; class QuietModeBubble; // Implementation found with each supported platform's implementation of // MessageCenterTrayDelegate. MessageCenterTrayDelegate* CreateMessageCenterTray(); // Class that observes a MessageCenter. Manages the popup and message center // bubbles. Tells the MessageCenterTrayHost when the tray is changed, as well // as when bubbles are shown and hidden. class MESSAGE_CENTER_EXPORT MessageCenterTray : public MessageCenterObserver { public: MessageCenterTray(MessageCenterTrayDelegate* delegate, message_center::MessageCenter* message_center); ~MessageCenterTray() override; // Shows or updates the message center bubble and hides the popup bubble. // Returns whether the message center is visible after the call, whether or // not it was visible before. bool ShowMessageCenterBubble(); // Hides the message center if visible and returns whether the message center // was visible before. bool HideMessageCenterBubble(); // Marks the message center as "not visible" (this method will not hide the // message center). void MarkMessageCenterHidden(); // Causes an update if the popup bubble is already shown. void ShowPopupBubble(); // Returns whether the popup was visible before. bool HidePopupBubble(); // Toggles the visibility of the settings view in the message center bubble. void ShowNotifierSettingsBubble(); // Creates a model for the context menu for a notification card. std::unique_ptr<ui::MenuModel> CreateNotificationMenuModel( const NotifierId& notifier_id, const base::string16& display_source); bool message_center_visible() { return message_center_visible_; } bool popups_visible() { return popups_visible_; } MessageCenterTrayDelegate* delegate() { return delegate_; } const message_center::MessageCenter* message_center() const { return message_center_; } message_center::MessageCenter* message_center() { return message_center_; } // Overridden from MessageCenterObserver: void OnNotificationAdded(const std::string& notification_id) override; void OnNotificationRemoved(const std::string& notification_id, bool by_user) override; void OnNotificationUpdated(const std::string& notification_id) override; void OnNotificationClicked(const std::string& notification_id) override; void OnNotificationButtonClicked(const std::string& notification_id, int button_index) override; void OnNotificationDisplayed(const std::string& notification_id, const DisplaySource source) override; void OnQuietModeChanged(bool in_quiet_mode) override; void OnBlockingStateChanged(NotificationBlocker* blocker) override; private: void OnMessageCenterChanged(); void NotifyMessageCenterTrayChanged(); void HidePopupBubbleInternal(); // |message_center_| is a weak pointer that must live longer than // MessageCenterTray. message_center::MessageCenter* message_center_; bool message_center_visible_; bool popups_visible_; // |delegate_| is a weak pointer that must live longer than MessageCenterTray. MessageCenterTrayDelegate* delegate_; DISALLOW_COPY_AND_ASSIGN(MessageCenterTray); }; } // namespace message_center #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_H_
{ "pile_set_name": "Github" }
<resources> <!-- Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. --> <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> <!-- API 14 theme customizations can go here. --> </style> </resources>
{ "pile_set_name": "Github" }
<!DOCTYPE html> <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" xmlns="http://www.w3.org/1999/html"> <!--<![endif]--> <head> <!-- Basic Page Needs ================================================== --> <meta charset="utf-8" /> <title>icon-copy: Font Awesome Icons</title> <meta name="description" content="Font Awesome, the iconic font designed for Bootstrap"> <meta name="author" content="Dave Gandy"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--<meta name="viewport" content="initial-scale=1; maximum-scale=1">--> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- CSS ================================================== --> <link rel="stylesheet" href="../../assets/css/site.css"> <link rel="stylesheet" href="../../assets/css/pygments.css"> <link rel="stylesheet" href="../../assets/font-awesome/css/font-awesome.css"> <!--[if IE 7]> <link rel="stylesheet" href="../../assets/font-awesome/css/font-awesome-ie7.css"> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="../../assets/ico/favicon.ico"> <script type="text/javascript" src="//use.typekit.net/wnc7ioh.js"></script> <script type="text/javascript">try{Typekit.load();}catch(e){}</script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-30136587-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body data-spy="scroll" data-target=".navbar"> <div class="wrapper"> <!-- necessary for sticky footer. wrap all content except footer --> <div class="navbar navbar-inverse navbar-static-top hidden-print"> <div class="navbar-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="../../"><i class="icon-flag"></i> Font Awesome</a> <div class="nav-collapse collapse"> <ul class="nav"> <li class="hidden-tablet "><a href="../../">Home</a></li> <li><a href="../../get-started/">Get Started</a></li> <li class="dropdown-split-left"><a href="../../icons/">Icons</a></li> <li class="dropdown dropdown-split-right hidden-phone"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="icon-caret-down"></i> </a> <ul class="dropdown-menu pull-right"> <li><a href="../../icons/"><i class="icon-flag icon-fixed-width"></i>&nbsp; Icons</a></li> <li class="divider"></li> <li><a href="../../icons/#new"><i class="icon-shield icon-fixed-width"></i>&nbsp; New Icons in 3.2.1</a></li> <li><a href="../../icons/#web-application"><i class="icon-camera-retro icon-fixed-width"></i>&nbsp; Web Application Icons</a></li> <li><a href="../../icons/#currency"><i class="icon-won icon-fixed-width"></i>&nbsp; Currency Icons</a></li> <li><a href="../../icons/#text-editor"><i class="icon-file-text-alt icon-fixed-width"></i>&nbsp; Text Editor Icons</a></li> <li><a href="../../icons/#directional"><i class="icon-hand-right icon-fixed-width"></i>&nbsp; Directional Icons</a></li> <li><a href="../../icons/#video-player"><i class="icon-play-sign icon-fixed-width"></i>&nbsp; Video Player Icons</a></li> <li><a href="../../icons/#brand"><i class="icon-github icon-fixed-width"></i>&nbsp; Brand Icons</a></li> <li><a href="../../icons/#medical"><i class="icon-medkit icon-fixed-width"></i>&nbsp; Medical Icons</a></li> </ul> </li> <li class="dropdown-split-left"><a href="../../examples/">Examples</a></li> <li class="dropdown dropdown-split-right hidden-phone"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="icon-caret-down"></i> </a> <ul class="dropdown-menu pull-right"> <li><a href="../../examples/">Examples</a></li> <li class="divider"></li> <li><a href="../../examples/#new-styles">New Styles</a></li> <li><a href="../../examples/#inline-icons">Inline Icons</a></li> <li><a href="../../examples/#larger-icons">Larger Icons</a></li> <li><a href="../../examples/#bordered-pulled">Bordered & Pulled</a></li> <li><a href="../../examples/#buttons">Buttons</a></li> <li><a href="../../examples/#button-groups">Button Groups</a></li> <li><a href="../../examples/#button-dropdowns">Button Dropdowns</a></li> <li><a href="../../examples/#bulleted-lists">Bulleted Lists</a></li> <li><a href="../../examples/#navigation">Navigation</a></li> <li><a href="../../examples/#form-inputs">Form Inputs</a></li> <li><a href="../../examples/#animated-spinner">Animated Spinner</a></li> <li><a href="../../examples/#rotated-flipped">Rotated &amp; Flipped</a></li> <li><a href="../../examples/#stacked">Stacked</a></li> <li><a href="../../examples/#custom">Custom CSS</a></li> </ul> </li> <li><a href="../../whats-new/"> <span class="hidden-tablet">What's </span>New</a> </li> <li><a href="../../community/">Community</a></li> <li><a href="../../license/">License</a></li> </ul> <ul class="nav pull-right"> <li><a href="http://blog.fontawesome.io">Blog</a></li> </ul> </div> </div> </div> </div> <div class="jumbotron jumbotron-icon"> <div class="container"> <div class="info-icons"> <i class="icon-copy icon-6"></i>&nbsp;&nbsp; <span class="hidden-phone"> <i class="icon-copy icon-5"></i>&nbsp;&nbsp; <span class="hidden-tablet"><i class="icon-copy icon-4"></i>&nbsp;&nbsp;</span> <i class="icon-copy icon-3"></i>&nbsp;&nbsp; <i class="icon-copy icon-2"></i>&nbsp; </span> <i class="icon-copy icon-1"></i> </div> <h1 class="info-class"> icon-copy <small> <i class="icon-copy"></i> &middot; Unicode: <span class="upper">f0c5</span> &middot; Created: v2.0 &middot; Categories: Text Editor Icons </small> </h1> </div> </div> <div class="container"> <section> <div class="row-fluid"> <div class="span9"> <p>After you get <a href="../../integration/">up and running</a>, you can place Font Awesome icons just about anywhere with the <code>&lt;i&gt;</code> tag:</p> <div class="well well-transparent"> <div style="font-size: 24px; line-height: 1.5em;"> <i class="icon-copy"></i> icon-copy </div> </div> <div class="highlight"><pre><code class="html"><span class="nt">&lt;i</span> <span class="na">class=</span><span class="s">&quot;icon-copy&quot;</span><span class="nt">&gt;&lt;/i&gt;</span> icon-copy </code></pre></div> <br> <div class="lead"><i class="icon-info-sign"></i> Looking for more? Check out the <a href="../../examples/">examples</a>.</div> </div> <div class="span3"> <div class="info-ad"><div id="carbonads-container"><div class="carbonad"><div id="azcarbon"></div><script type="text/javascript">var z = document.createElement("script"); z.type = "text/javascript"; z.async = true; z.src = "http://engine.carbonads.com/z/32291/azcarbon_2_1_0_VERT"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script></div></div> </div> </div> </div> </section> </div> <div class="push"><!-- necessary for sticky footer --></div> </div> <footer class="footer hidden-print"> <div class="container text-center"> <div> <i class="icon-flag"></i> Font Awesome 3.2.1 <span class="hidden-phone">&middot;</span><br class="visible-phone"> Created and Maintained by <a href="http://twitter.com/davegandy">Dave Gandy</a> </div> <div> Font Awesome licensed under <a href="http://scripts.sil.org/OFL">SIL OFL 1.1</a> <span class="hidden-phone">&middot;</span><br class="visible-phone"> Code licensed under <a href="http://opensource.org/licenses/mit-license.html">MIT License</a> <span class="hidden-phone hidden-tablet">&middot;</span><br class="visible-phone visible-tablet"> Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a> </div> <div> Thanks to <a href="http://maxcdn.com"><i class="icon-maxcdn"></i> MaxCDN</a> for providing the excellent <a href="http://www.bootstrapcdn.com/#tab_fontawesome">BootstrapCDN for Font Awesome</a> </div> <div class="project"> <a href="https://github.com/FortAwesome/Font-Awesome">GitHub Project</a> &middot; <a href="https://github.com/FortAwesome/Font-Awesome/issues">Issues</a> </div> </div> </footer> <script src="http://platform.twitter.com/widgets.js"></script> <script src="../../assets/js/jquery-1.7.1.min.js"></script> <script src="../../assets/js/ZeroClipboard-1.1.7.min.js"></script> <script src="../../assets/js/bootstrap-2.3.1.min.js"></script> <script src="../../assets/js/site.js"></script> </body> </html>
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="style.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.1/css/all.min.css" /> <title>Ads Manager</title> </head> <body> <div class="container"> <div class="user"> <i class="fas fa-user"></i> UI Design </div> <div class="search-area"> <div class="search"> <form> <input type="text" placeholder="Search ads" name="search" /> <button type="submit"><i class="fa fa-search"></i></button> </form> </div> <div class="filter"> <button type="submit">Filter</button> </div> </div> <table> <thead> <tr> <th>Name</th> <th>Clicks</th> <th>Priority</th> <th>Impressions</th> <th></th> </tr> </thead> <tbody> <tr class="priority-200"> <td>Shure SE110 in-ear headphones</td> <td>875</td> <td><i class="fas fa-circle"></i>200</td> <td>190</td> <td> <button class="delete"><i class="fas fa-trash"></i></button> </td> </tr> <tr class="priority-600"> <td>Our favourite IPhone solution</td> <td>620</td> <td><i class="fas fa-circle"></i>600</td> <td>478</td> <td> <button class="delete"><i class="fas fa-trash"></i></button> </td> </tr> <tr class="priority-300"> <td>Audio jack for connecting to your own headphones</td> <td>500</td> <td><i class="fas fa-circle"></i>300</td> <td>322</td> <td> <button class="delete"><i class="fas fa-trash"></i></button> </td> </tr> <tr class="priority-200"> <td>Memory-foam tips</td> <td>430</td> <td><i class="fas fa-circle"></i>200</td> <td>197</td> <td> <button class="delete"><i class="fas fa-trash"></i></button> </td> </tr> <tr class="priority-300"> <td>Cables over the tops</td> <td>170</td> <td><i class="fas fa-circle"></i>300</td> <td>289</td> <td> <button class="delete"><i class="fas fa-trash"></i></button> </td> </tr> </tbody> </table> <button type="submit" class="add-btn"> <i class="fas fa-plus"></i> </button> </div> </body> </html>
{ "pile_set_name": "Github" }
rows = {[2.320856e+002 2.770294e+002 2.950069e+002 3.049944e+002 3.159806e+002 3.279656e+002 3.399506e+002 3.529344e+002 3.649194e+002 3.779031e+002 3.908869e+002 4.038706e+002 4.158556e+002 4.278406e+002 4.388269e+002 4.498131e+002 4.598006e+002 4.687894e+002 4.767794e+002 4.827719e+002 4.887644e+002 4.927594e+002 4.967544e+002 4.957556e+002 4.937581e+002 4.907619e+002 4.867669e+002 4.817731e+002 4.697881e+002 4.627969e+002 4.558056e+002 4.478156e+002 4.398256e+002 4.308369e+002 4.228469e+002 4.138581e+002 3.968794e+002 3.878906e+002 3.799006e+002 3.729094e+002 3.659181e+002 3.549319e+002 3.509369e+002 3.469419e+002 3.449444e+002 3.429469e+002 3.439456e+002 3.449444e+002 3.499381e+002 3.539331e+002 3.589269e+002 3.649194e+002 3.779031e+002 3.848944e+002 3.918856e+002 4.078656e+002 4.158556e+002 4.228469e+002 4.308369e+002 4.388269e+002 4.518106e+002 4.578031e+002 4.637956e+002 4.677906e+002 4.747819e+002 4.767794e+002 4.777781e+002 4.777781e+002 4.757806e+002 4.737831e+002 4.697881e+002 4.617981e+002 4.558056e+002 4.508119e+002 4.438206e+002 4.368294e+002 4.218481e+002 4.138581e+002 3.958806e+002 3.868919e+002 3.769044e+002 3.669169e+002 3.469419e+002 3.359556e+002 3.259681e+002 3.049944e+002 2.960056e+002 2.860181e+002 2.690394e+002 2.610494e+002 2.460681e+002 2.410744e+002 2.310869e+002 2.270919e+002 2.201006e+002 ]; }; cols = {[3.670419e+002 3.590519e+002 3.580531e+002 3.570544e+002 3.560556e+002 3.550569e+002 3.540581e+002 3.540581e+002 3.520606e+002 3.510619e+002 3.500631e+002 3.480656e+002 3.470669e+002 3.450694e+002 3.430719e+002 3.420731e+002 3.400756e+002 3.380781e+002 3.370794e+002 3.350819e+002 3.340831e+002 3.330844e+002 3.330844e+002 3.340831e+002 3.350819e+002 3.370794e+002 3.400756e+002 3.430719e+002 3.500631e+002 3.540581e+002 3.590519e+002 3.640456e+002 3.690394e+002 3.740331e+002 3.790269e+002 3.840206e+002 3.950069e+002 4.000006e+002 4.059931e+002 4.109869e+002 4.149819e+002 4.239706e+002 4.279656e+002 4.309619e+002 4.349569e+002 4.419481e+002 4.449444e+002 4.489394e+002 4.559306e+002 4.589269e+002 4.619231e+002 4.659181e+002 4.719106e+002 4.759056e+002 4.789019e+002 4.858931e+002 4.888894e+002 4.928844e+002 4.958806e+002 4.998756e+002 5.068669e+002 5.098631e+002 5.128594e+002 5.158556e+002 5.198506e+002 5.218481e+002 5.238456e+002 5.248444e+002 5.258431e+002 5.268419e+002 5.268419e+002 5.268419e+002 5.258431e+002 5.258431e+002 5.258431e+002 5.248444e+002 5.238456e+002 5.228469e+002 5.208494e+002 5.188519e+002 5.178531e+002 5.168544e+002 5.148569e+002 5.138581e+002 5.138581e+002 5.128594e+002 5.128594e+002 5.138581e+002 5.148569e+002 5.158556e+002 5.178531e+002 5.188519e+002 5.208494e+002 5.218481e+002 5.238456e+002 ]; };
{ "pile_set_name": "Github" }
rose手册第四章: 安全 ==================== * 在controller中,如果你不想将一个方法公开对外,那就不要将其标识为public,因为public的方法会被rose认为是一个要公开的action。
{ "pile_set_name": "Github" }
{ "sources": { "package.json.tpl.merge": { "12322b2f0769f491000df8ec0e012dd2d78a7eaf": "eJx1zrEKwjAQgOG9TxE6S9HV2VFcFBdxONJrDW1y8XIRSum7m2pTJzMd/3cHGQuVXunAYrlX5ei79pTmqdx8QQa/wiXNK2hGEOLZwJEbLMWQLURrgYfZzg9iUTksXqOA6bE+YNBsvBhy8+6RXKvqX1PUKA+6gxbz5Qs5LNu7altt19+Q9SDXP9oQW5BPzqknDX0qwhGXxPiMhjGkersXU/EGNatRVA\u003d\u003d" }, "config.rb.tpl.merge": { "33f446bd02c3fd24eb27891582eff6a2e789796b": "eJxLLi2KT8ksUrBVcMvMSdUDMvMSc1M14uPdPH1c4+M1ufJLSwpKS+KLSypzUoGqrPJSi0tSU7gALskTcA\u003d\u003d" }, "all.scss.merge": { "da39a3ee5e6b4b0d3255bfef95601890afd80709": "eJwDAAAAAAE\u003d" }, "custom.js.merge": { "199e99bbd15c3c0415569425cb21e77c95e9042a": "eJxlj0FOxDAMRfdziq9ZwUjTHIAlYslquIAncdtA4lSxC8PtSdoREmIV6f/4+dmdDjjhbY6KMSZGeycWrmQcQAqCGlWLMmEpUQzXb1xY/Ex4zgFnRMNXTAlSWseovCTybbbUDl6XsJHa1FH3sYX8B03cqqlS4OPQ//2V8CQ7K5fPriEBNjPU17gYjCZE6UnmYbacfj/GsaUNslUIhbVzu5lwq/2qVjIohGixCCVkkjiyWrOFzqWaXw0sViPr0IRYGVQ7yq+55X2HdObg7meo45udt4XnKyk7Je0Z5SWxqyyB6/Cu/Uh3ODj3crNhN28ar/f1D49P/7rLXUd7+QPuPI9g" }, "theme.html.tpl.merge": { "f403b931962ae2dd2b31228a98b1548129830244": "eJytVE1vEzEQvedXTPcECK/TwgGlm1xCESBEKxIOHB3vJOvWay+eSZqoyn/H3l1KWoJAFZa1X2/mvTezIxcnby+n829XF1BxbSeD4kSIAQBMfbMLZlUxPNPP4Wx4eibi5VUOM3S6UvDB6XwgREzo8ypU5SRlQsGGLU4utgwfZzCvsEZ4r4JDokJ2WBdXI6soy43A72uzGWdT7xgdi/muwQx09zbOGLcsk8w5ROlAyOOv83fiTTYZdES9Z/jkVQnKWgiJMGAJ1rgbAuVKIB1Mw9TGJd9tYoJjsB1nxDuLVCFyBhzle1VNlEEVcDnO8lwGJL8OGkneNTerz6rGvYhyIrAVJS7Wq7yNlz17J3lId602qvuaAQXdksZ9F7EvaK8UV3sZn1vSjvCaskkhu5yj5XKFMLNGY4gNC3i8zn9wEtCVGP6ul9pbK2eWSNx3tvKB9foJml31caeaOQ2KWChCSYooflN1Y1H+FHtk7b9q3JfwRBG9Jvb10ea1g9UxpZXfmnKFLNJwK+PiX7u7x9KqVVgZN4LTYbM9f4DERK5G8Hr4G9J4Mmx8zIqjrNhs8CHuNxiW1t+OYGPILOwBvB/8crYV1M6R4OgB+eUfEXjxyLRvlDa8i64PmdvyZV9/IQ8OiIUvd7FR7S0h7QnyA++XX40\u003d" }, "build.properties.merge": { "384d894dcb5df6a9f1d339fa2df9be051c821b20": "eJytV81ymzAQvvspNJPOOE0T0kN7aGd87KH3voCMhVEiJEY/Tjwd3r27QoCQwTW0uZgs3/59u1otd2R3+9/mjvwquSEFF4wcWMElM6TWqmbacnh0hh3I/kwAt3dcHJ54VYvsvRKP5K3keUlA15aM7KlhBN8BUBWESkLrWvCcWq6kaXXRbs6MyQCzJMSF8Ls4fp8Sl0dyoporBwKuWW6VPgNOqBDfQg8+mwws7T78rmn+So8s62VNeK2ZUU5DvgE4AJ77V5tOOwV38hm4oWYSifLldLUctYWC2nVM+ZaQtGKkptYy7Wny/VAoTZSztbOEAs0Fze06CtF6Vmvw/z5maMgLIU0MzyH1RGXE3lVl7fbnXa5kwY+Z3m+6SrJTZlyBJp/guZfu3TGSw3/hDRWil8NzV3A7SOF5E4EjB13Mg42mz7xHNSPdKIyr2gMu1o/CuqI9oFLdW/1HFqZDWteXzI+X0G0vUVca34bA2aOHgqdHGDsHkqsK2sNgn95LRVrvH1e1J2b5Yvqko25tQH5RoxnoJBup/unv2qdYdzGZgcGEPuTWwIny8nVn2LcCmLgafdrIjVdJu/QWK2lLBkv/kY+eDrz0jkwyTS0OPa2qhC+8GLWTeL8AlPrWgwnsf7nwV8tqSnHMtXn2w2401WaZnbIxPynnHTbZZYWWBHVRqDlbtwQ35TwNcHQxzIY1ydKt/Fxn5jZOZtlYwkMcSGwJr7fkIk1uvxVzWNXtbmAV8e0Nv3gOtobJvKSkMMTApse22PcVjOBVPe9NZMHVqp2PhfUSl5MQsd9W3komu3PcnlRYAGDxY9Kfa7hTolmwbga2B57BYPZzusvCd+t3qx2bwmEnj5EFFWYCOgVazE93LYKlQE/LDhSzm3Fki9vMFsBjTv6Vks717tPZ8eWRGyb8xg4pOGmh9cBWqYQPHVJo64s4+N6wWGGYxAZ+xDDKCZcArpywvPb5DCP8/uePwYPgFbfkTelXqsHZYd3agAe0M5l5k7svn799XX/woF+tVkJgbqEu7Yhp2xk/dsJ3VrSZb7P69bhdU0DQGz5nYJwgHwYcxh85F0s2KqEv/286AzEUj+AyF+7AzO7h4fnBS9h7kHQKLwZuzT+yw9yO" }, "sencha.cfg.tpl.merge": { "d39a37145778a7da6b2c8943013251055365d2e2": "eJzFVU1r20AQvftXDHKhDSRyboWCIWnooT20AffYy1ga2dusdtXdlR235L/37a4smzjpBxQaTJB2Zue9efOhKX1eCxluhWxDAc8dV3e8Erogv7a9rqnlUK2TqYh+BXXOduLCjpShcjb4l1+9NZPpZP8aXec/urvVRzw8TCbTEcjDRShY2q5VCqz8HvSlp8X1YkGVdQ5+1tS+TPdqabjXgTas+8gU4Yp396GgVth4xOCQGDZKi8+8PHs/866iV2zq/fuG3dmQUKVxkJwRLN5N8Zy14cCypPeGLIyOttbV/jyhlh0b0eVt/A8G3IGARZAD5ix5zJJH6SvvS5ijBJZ82GkZwRtnW2KzO0Cek5eQRYFES83mDiyafIJfOjnPlE10yQFPee1sD9KxgF0fsqwp1SOWuPMU07GG0bEcmc3hnuuYmUTNKtu2fOGlY8dBatLKh9hIjdW1OI8Siztki5qqWlJFvSDS/rztcWspJPedVpUKegfXb71yiBhFEDCvdF/jFaWNuMte6fqYagrVcVjPX3zpLy9fv90bauUeYrJ/yxyPdiPOgTB68FrrQ2/FUiBaRKOtggUEV2qDcjAFXsWrxQD/aR+iGLod6NwHixZUFWu9Q5wxVYReiZHMhzu01XKXRxLCiamGEUUIrUzUJDph7t5AhykRzWZXQyy6eox/JNWY1pNSjdbHgmVhhoqmdiogazEUNc1pdvbCrlojhcY6WtwsFgiUtUtjelgnH3jDi8qpLoyd0HvcG7JGcugGCGXNSVMC+fliD+39BwlgHfj/lAGgf50BHMYMIvhJ65BqO+tCahxMSQRMWaXZQE+CvAwpnqBL+I1+cJgBJK2EZ4RE/w0b3FKn404vYpeuOW/z+A1JVAqyfcAOOiaR5xdwTzJIVqDO/+kfsrjBosHCvc0fMIVyXdBtol4li/qeioXBE223R7OGFHljFT6G4lZpdVnToLYBK05hDRjZQhGMjo/XJz8BiBR/Lg\u003d\u003d" }, "testing.properties.merge": { "e65f969c42eb4f355c850fc58fea852582f20db8": "eJyVkUFywyAQBO9+xVb5oIutH/gX+QCCkbUOAooFOf59FsmqpHKKOFEwOzM0Z7r9f53O9DGx0Mge5DBygFDKMSEX1m0VOBpepLqhsndXnpPvv2Z/oefEdiKdLRNoMAJqdyqMI5lAJiXP1hSOQbbZ5msh0mskmuOvnDHHWY32JjbmDEkxOCqxBai6K5DC4d693RAWzjHMCOVCkmB5ZLhW9EWdINjJtBJv9T7cU0vXsk/2rWwxn9AisHA6AooLcgNhqi8riYXdimAn0P+07vXsCOuD8rNimLWaiDKkmBrK7UOUyR0B2RRQdzXedyp+CMVaUi0rQn3ninMxvurPspjBQ/54jjHvYLbHycGKG5Fm2SIf0u/ut9M3l43NIg\u003d\u003d" } }, "targets": { "package.json": { "source": "package.json.tpl.merge", "version": "12322b2f0769f491000df8ec0e012dd2d78a7eaf", "parameters": { "pkgName": "ext-theme-classic", "senchadir": ".sencha", "touchRelPath": "${touch.dir}", "extRelPath": "../..", "pkgType": "${args.type}" } }, "sass/config.rb": { "source": "config.rb.tpl.merge", "version": "33f446bd02c3fd24eb27891582eff6a2e789796b", "parameters": { "pkgName": "ext-theme-classic", "senchadir": ".sencha", "touchRelPath": "${touch.dir}", "extRelPath": "../..", "pkgType": "${args.type}" } }, "sass/etc/all.scss": { "source": "all.scss.merge", "version": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "parameters": { "pkgName": "ext-theme-classic", "senchadir": ".sencha", "touchRelPath": "${touch.dir}", "extRelPath": "../..", "pkgType": "${args.type}" } }, "sass/example/custom.js": { "source": "custom.js.merge", "version": "199e99bbd15c3c0415569425cb21e77c95e9042a", "parameters": { "pkgName": "ext-theme-classic", "senchadir": ".sencha", "touchRelPath": "${touch.dir}", "extRelPath": "../..", "pkgType": "${args.type}" } }, "sass/example/theme.html": { "source": "theme.html.tpl.merge", "version": "f403b931962ae2dd2b31228a98b1548129830244", "parameters": { "pkgName": "ext-theme-classic", "senchadir": ".sencha", "touchRelPath": "${touch.dir}", "extRelPath": "../..", "pkgType": "${args.type}" } }, ".sencha/package/build.properties": { "source": "build.properties.merge", "version": "384d894dcb5df6a9f1d339fa2df9be051c821b20", "parameters": { "pkgName": "ext-theme-classic", "senchadir": ".sencha", "touchRelPath": "${touch.dir}", "extRelPath": "../..", "pkgType": "${args.type}" } }, ".sencha/package/sencha.cfg": { "source": "sencha.cfg.tpl.merge", "version": "d39a37145778a7da6b2c8943013251055365d2e2", "parameters": { "pkgName": "ext-theme-classic", "senchadir": ".sencha", "touchRelPath": "${touch.dir}", "extRelPath": "../..", "pkgType": "${args.type}" } }, ".sencha/package/testing.properties": { "source": "testing.properties.merge", "version": "e65f969c42eb4f355c850fc58fea852582f20db8", "parameters": { "pkgName": "ext-theme-classic", "senchadir": ".sencha", "touchRelPath": "${touch.dir}", "extRelPath": "../..", "pkgType": "${args.type}" } } } }
{ "pile_set_name": "Github" }
package org.nustaq.kontraktor.services.rlclient; import com.beust.jcommander.Parameter; import org.nustaq.kontraktor.services.ServiceArgs; import java.util.function.Supplier; /** * Created by ruedi on 15.08.2015. */ public class DataShardArgs extends ServiceArgs { public static Supplier<DataShardArgs> factory = () -> new DataShardArgs(); public static DataShardArgs New() { return factory.get(); } public static DataShardArgs from(ServiceArgs toCopy, int shardNo) { DataShardArgs aNew = New(); aNew.registryHost( toCopy.getRegistryHost() ); aNew.registry( toCopy.getRegistryPort() ); aNew.help(toCopy.isHelp()); aNew.host(toCopy.getHost()); aNew.dataShardPortBase(toCopy.getDataShardPortBase()); aNew.asyncLog(toCopy.isAsyncLog()); aNew.monhost(toCopy.getMonhost()); aNew.monport(toCopy.getMonport()); aNew.shardNo = shardNo; return aNew; } protected DataShardArgs() { super(); } @Parameter( required = true, names = { "-sn","-shardNo" }) int shardNo; public int getShardNo() { return shardNo; } @Override public String toString() { return "DataShardArgs{" + "shardNo=" + shardNo + "} " + super.toString(); } }
{ "pile_set_name": "Github" }
// Copyright 2015 go-swagger maintainers // // 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 // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package spec // XMLObject a metadata object that allows for more fine-tuned XML model definitions. // // For more information: http://goo.gl/8us55a#xmlObject type XMLObject struct { Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` Prefix string `json:"prefix,omitempty"` Attribute bool `json:"attribute,omitempty"` Wrapped bool `json:"wrapped,omitempty"` } // WithName sets the xml name for the object func (x *XMLObject) WithName(name string) *XMLObject { x.Name = name return x } // WithNamespace sets the xml namespace for the object func (x *XMLObject) WithNamespace(namespace string) *XMLObject { x.Namespace = namespace return x } // WithPrefix sets the xml prefix for the object func (x *XMLObject) WithPrefix(prefix string) *XMLObject { x.Prefix = prefix return x } // AsAttribute flags this object as xml attribute func (x *XMLObject) AsAttribute() *XMLObject { x.Attribute = true return x } // AsElement flags this object as an xml node func (x *XMLObject) AsElement() *XMLObject { x.Attribute = false return x } // AsWrapped flags this object as wrapped, this is mostly useful for array types func (x *XMLObject) AsWrapped() *XMLObject { x.Wrapped = true return x } // AsUnwrapped flags this object as an xml node func (x *XMLObject) AsUnwrapped() *XMLObject { x.Wrapped = false return x }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2011-2018, Meituan Dianping. All Rights Reserved. * * 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 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.dianping.cat.configuration; import java.net.Inet4Address; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Collections; import java.util.List; public enum NetworkInterfaceManager { INSTANCE; private InetAddress m_local; private NetworkInterfaceManager() { load(); } public InetAddress findValidateIp(List<InetAddress> addresses) { InetAddress local = null; for (InetAddress address : addresses) { if (address instanceof Inet4Address) { if (address.isLoopbackAddress() || address.isSiteLocalAddress()) { if (local == null) { local = address; } else if (address.isSiteLocalAddress() && !address.isLoopbackAddress()) { // site local address has higher priority than other address local = address; } else if (local.isSiteLocalAddress() && address.isSiteLocalAddress()) { // site local address with a host name has higher // priority than one without host name if (local.getHostName().equals(local.getHostAddress()) && !address.getHostName() .equals(address.getHostAddress())) { local = address; } } } else { if (local == null) { local = address; } } } } return local; } public String getLocalHostAddress() { return m_local.getHostAddress(); } public String getLocalHostName() { try { return InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { return m_local.getHostName(); } } private String getProperty(String name) { String value = null; value = System.getProperty(name); if (value == null) { value = System.getenv(name); } return value; } private void load() { String ip = getProperty("host.ip"); if (ip != null) { try { m_local = InetAddress.getByName(ip); return; } catch (Exception e) { System.err.println(e); // ignore } } try { List<NetworkInterface> nis = Collections.list(NetworkInterface.getNetworkInterfaces()); List<InetAddress> addresses = new ArrayList<InetAddress>(); InetAddress local = null; try { for (NetworkInterface ni : nis) { if (ni.isUp()) { addresses.addAll(Collections.list(ni.getInetAddresses())); } } local = findValidateIp(addresses); } catch (Exception e) { // ignore } m_local = local; } catch (SocketException e) { // ignore it } } }
{ "pile_set_name": "Github" }
--- ../src-base/minecraft/net/minecraft/potion/Potion.java +++ ../src-work/minecraft/net/minecraft/potion/Potion.java @@ -13,7 +13,9 @@ import net.minecraft.entity.ai.attributes.IAttribute; import net.minecraft.entity.ai.attributes.IAttributeInstance; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.MobEffects; +import net.minecraft.network.play.server.SPacketUpdateHealth; import net.minecraft.util.DamageSource; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StringUtils; @@ -21,6 +23,8 @@ import net.minecraft.util.registry.RegistryNamespaced; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory; +import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; public class Potion extends net.minecraftforge.registries.IForgeRegistryEntry.Impl<Potion> { @@ -30,7 +34,7 @@ private final int liquidColor; private String name = ""; private int statusIconIndex = -1; - private double effectiveness; + public double effectiveness; private boolean beneficial; @Nullable @@ -78,14 +82,14 @@ { if (entityLivingBaseIn.getHealth() < entityLivingBaseIn.getMaxHealth()) { - entityLivingBaseIn.heal(1.0F); + entityLivingBaseIn.heal(1.0F, RegainReason.MAGIC_REGEN); } } else if (this == MobEffects.POISON) { if (entityLivingBaseIn.getHealth() > 1.0F) { - entityLivingBaseIn.attackEntityFrom(DamageSource.MAGIC, 1.0F); + entityLivingBaseIn.attackEntityFrom(CraftEventFactory.POISON, 1.0F); // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON } } else if (this == MobEffects.WITHER) @@ -100,7 +104,19 @@ { if (!entityLivingBaseIn.world.isRemote) { - ((EntityPlayer)entityLivingBaseIn).getFoodStats().addStats(amplifier + 1, 1.0F); + // ((EntityPlayer)entityLivingBaseIn).getFoodStats().addStats(amplifier + 1, 1.0F); + // CraftBukkit start + EntityPlayer entityhuman = (EntityPlayer) entityLivingBaseIn; + int oldFoodLevel = entityhuman.getFoodStats().foodLevel; + + org.bukkit.event.entity.FoodLevelChangeEvent event = CraftEventFactory.callFoodLevelChangeEvent(entityhuman, amplifier + 1 + oldFoodLevel); + + if (!event.isCancelled()) { + entityhuman.getFoodStats().addStats(event.getFoodLevel() - oldFoodLevel, 1.0F); + } + + ((EntityPlayerMP) entityhuman).connection.sendPacket(new SPacketUpdateHealth(((EntityPlayerMP) entityhuman).getBukkitEntity().getScaledHealth(), entityhuman.getFoodStats().foodLevel, entityhuman.getFoodStats().foodSaturationLevel)); + // CraftBukkit end } } else if ((this != MobEffects.INSTANT_HEALTH || entityLivingBaseIn.isEntityUndead()) && (this != MobEffects.INSTANT_DAMAGE || !entityLivingBaseIn.isEntityUndead())) @@ -112,7 +128,7 @@ } else { - entityLivingBaseIn.heal((float)Math.max(4 << amplifier, 0)); + entityLivingBaseIn.heal((float)Math.max(4 << amplifier, 0), RegainReason.MAGIC); } } @@ -328,29 +344,11 @@ * @param y the y coordinate * @param effect the active PotionEffect * @param mc the Minecraft instance, for convenience - * @deprecated use {@link #renderInventoryEffect(PotionEffect, net.minecraft.client.gui.Gui, int, int, float)} */ @SideOnly(Side.CLIENT) - @Deprecated // TODO: remove public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc) { } /** - * Called to draw the this Potion onto the player's inventory when it's active. - * This can be used to e.g. render Potion icons from your own texture. - * - * @param effect the active PotionEffect - * @param gui the gui instance - * @param x the x coordinate - * @param y the y coordinate - * @param z the z level - */ - @SideOnly(Side.CLIENT) - public void renderInventoryEffect(PotionEffect effect, net.minecraft.client.gui.Gui gui, int x, int y, float z) - { - renderInventoryEffect(x, y, effect, net.minecraft.client.Minecraft.getMinecraft()); - } - - /** * Called to draw the this Potion onto the player's ingame HUD when it's active. * This can be used to e.g. render Potion icons from your own texture. * @param x the x coordinate @@ -358,30 +356,11 @@ * @param effect the active PotionEffect * @param mc the Minecraft instance, for convenience * @param alpha the alpha value, blinks when the potion is about to run out - * @deprecated use {@link #renderHUDEffect(PotionEffect, net.minecraft.client.gui.Gui, int, int, float, float)} */ @SideOnly(Side.CLIENT) - @Deprecated // TODO: remove public void renderHUDEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc, float alpha) { } /** - * Called to draw the this Potion onto the player's ingame HUD when it's active. - * This can be used to e.g. render Potion icons from your own texture. - * - * @param effect the active PotionEffect - * @param gui the gui instance - * @param x the x coordinate - * @param y the y coordinate - * @param z the z level - * @param alpha the alpha value, blinks when the potion is about to run out - */ - @SideOnly(Side.CLIENT) - public void renderHUDEffect(PotionEffect effect, net.minecraft.client.gui.Gui gui, int x, int y, float z, float alpha) - { - renderHUDEffect(x, y, effect, net.minecraft.client.Minecraft.getMinecraft(), alpha); - } - - /** * Get a fresh list of items that can cure this Potion. * All new PotionEffects created from this Potion will call this to initialize the default curative items * @see PotionEffect#getCurativeItems
{ "pile_set_name": "Github" }
Myslim se, až mója francojšćina jo wjelgickano špatna. Wóna jo žywa na jsy. Njejsom twóje pšašanje rozměł. Wón jo mój młodšy bratš. Tom njejo rowno doma. Mam lubjej kafej. Wón ma dwě źowce. Tom njejo taki tłusty kaž ja. Wón jo mój nan. Wóna jo młoda była. Wóni su swój cil dostali. To buźo pitśku traś. Som student. A ty? To jo mója maś. Kótare źiwadło jo to? Wěm, což se mysliśo. Anja jo žywa w Gdańsku. Źo jo mójo awto? Tom pśebywa wětšy źěl swójogo casa, aby Mariji pomagał. Njamam psa. Tom grajo na orgelach w našej cerkwi. To jo był tšašny tyźeń. Ja se znojm. To jo napšawdu zajmne było. Ja com wěźeś, co jo se stało. Njamam awto. Ptašk jo w njebju. Wón jo wjele glucnjejša ako wón. Njamam kólaso. To jo mě luto, až pśeśiwim śi. Njepótrjebujom wěcej kredit. Njeglědajucy na zakaz gólc jo kurił. Wumyjom se ruce. Jo było tak zymno, až njejsom spaś mógł. Ja budu knigły cytaś. Njepšašaj se mě, co jo to było! Njemusyš wótegroniś, jolic njocoš. To jo wjelgin dobre. Jo, pśiźom! Tom co sławny byś. Tom jo se rowno smjejkotał. Njepowědam derje engelšćinu, lěcrownož som šesć lět w šuli wuknuł. Wumyj swójej noze. Jogo štrumpa ma źěru. Njebjo jo módre. Pódaj mě pšosym cukor. Maš rad muziku? Wěm, źož sy. Com jadne knigły. Tom jo wót swójogo kafeja srěbkotał. Mójej noze bólitej. Wjele płaśi toś ta šapka? Tom jo se rowno smjał. K comu maš noze? Toś ta wucbnica jo zestarjona. Wucho mě swjerbi. Myslim se, až nazyma jo nejrědnjejšy lětny cas. Tom se njegóźi za toś te źěło. Co cyniš? Som tak tłusty. Krokodil jo Tomasa žrał. Tom jě ze swójeju lěweju ruku, ale wón pišo ze swójeju pšaweju. Musym mě wucabnika wěźeś. To jo dobre znamje było. Tom jo dermotne awto dobył. Afrikańske słony maju wětšej wušy ako aziske słony. Wóna jo bogate indiske źowća wuwucowała. Słon jo šery. Sy južo lětajucy słon wiźeł? Som žurnalist. Tom njejo taki tłusty ako ja. Maśo afrikańske słony? Słon ma dłujki nos. Tom a Marija matej wokoło dwaźasća źiśi, ale se njejstej wěstej dokładneje licby. Woglědanje jo dermotne. Tam jězdźi naš bus. Psy njamógu powědaś, ale jo se zdało, ako by wócy psa groniłej: "Ně, njamam doma.". Wjele wuknikow jo na wašej šuli? Com Toma zasej wiźeś. Jeje zuby su běłe byli. Jaj, a derekam! Kak se wašej maśeri źo? Chirurg jo něco w pacienśe zabył. Něnto njamam cas. Com w groźe bydliś. Sy jadnosame góle? Tom grilujo měso. Wón se stara wó swóju swójźbu. To jo rostlina družyny Schlumbergera truncata. Tom jo Mariju załapił pśi tom, gaž wóna jo pjenjeze z kase kšadnuła. Njamam rad wóń toś togo płoda. Wóni su wjelike. Wóna jo sněžynku z papjery wubasliła. Kakosć wódy jo wjelgin wažna za zgótowanje piwa. Znajośo mě? Móžośo mnjo groniś, co toś to słowo wóznamjenijo? Móje włose su take njerěšne! Tu jo mója wutšoba. Wóna ma suche włose. Gólc jo muske źiśe. Kuždy znajo kazń. Nowy plan se na našych idejach złožyjo. Naju póśěg se rowna dyrdakojstwoju. Wón móžo cyniś, co wón co! Cogodla sy sam? Wóna jo mimo šła, bźez togo až jo mě wiźeła. Wón derje engelšćinu powěda. Dalokož wěm wón jo kriminelny. Ja hyšći cakam na móju skazanku. To jo kamel Toma. Wóna jo njerěšne talarje do womyjadła stajiła. Tom jo do plěwańskego basena skócył. How njesmějośo wóstaś. Njewěm, cogodla njamaš rad ju. Tom ma dwa kompjutera. Rěka źěli město do pódzajtšnego a pódwjacornego źěla. Wuglěda ako Łatyńšćina, ale to njejo. Njejo notnje, až wóstanjoš. Bóžko jo se dešćowiło. Móje źiśi su w šuli. Wóna jo melodiju na klawěrje grała. Źowćo jo samotne. Ně, budu to zapłaśiś. To jo prědny raz. Wóni cytaju jogo knigły. Ja musym se zuby cysćiś. Móžoš to z e-mejlu pósłaś? Wón jo studěrował elektromechaniku a buddhizm na tudejšej uniwersiśe. Tom jo był sam. Śpa jo namała. Móje wucho jo źinsa rano kšawiło. Som mócne bóli měł. To jo mě luto, ale som pśeśiwo toś tomu projektoju. Tom groni, až jo śěžko, wuknuś cuzu rěc. Wěm, źo su. Mam krowu. Tom južo znajo wěrnosć. Wón njepśełožujo žednje móje sady. Pótrjebujom wěcej pśikładow, aby rozměł, kak toś te słowo se wužywa. Wócyń flašu. Njejsom był nigdy w Nowoseelandskej. Powědaśo makedońšćinu? Tam jo dama, kótaraž se wó was pšaša. Cogodla sy kwětki kupił? To jo foto mójeje mólby. Sta bźezdźěłabnych spě tam wódnjo a w nocy. Nejskerjej wón njebuźo žeden wuspěch měś. Som gójc. Źo se chowaš? Njamam lušt wuknuś. Kak cesto źoš na tyźeń w supermarku nakupowat? Wóna co planet wumóc. Ja zajmujom se za toś te knigły. Sy glucny w twójom domje? Glědaj ze swójima wušoma. Źowćo z dłujkimi włosami jo Judy. Kněz Suzuki jo wuznamny wědomnostnik. Bus jo był połny. Cogodla njejźoš do póstole? Toś te knigły su wjelgin stare. Mam jabłuko. Ptaški maju wótšej wócy. Jo widobnje, až to jo łdža. Nimska lažy w Srjejźnej Europje. Znajoš někogo, kótaryž spiwkoco pśi źěle? Njejsom z twójim rozjasnjenim spokojny. Bźez toś tych knigłow ja njeby wuknuś mógł. Kócki nježeru banany. Wóno jo wjelgin droge. Wóna jo samodruga abo jano tłusta? Toś ten wuž njejo gadojty. Wón pśecej žortujo. Wón ma kolaso. Com knigły napisaś. Toś ta zemja jo bogata na humusu. Mašina jo defektna wót zachadnego mjaseca. Kak se twójej žeńskej źo? Pśicyna wognja jo njeznata. Źowćo skoka. Mój nan njejo doma. Wóna mě pśecej wěri. Tom ma dwě góleśi. Powědaju Marsowe wobydlarje engelski? Wóna jě płod. Cogodla koalamjadwjeźe njamaju pupk? Wokolina jo była wjelgin měrna. Powědamy doma francojšćinu. Mamy tśi psy a jadnu kócku. Tom płaśi. Wjele rěcow jo w Europje? Tom powěda francojšćinu wopšawdu derje. Wóna zajmujo se jano za ryby a šwoby. Som mucny kaž pjelch. Mjasec jo wobswěśował śpu. Njejsom wiźeł, až sy tak dobry kuchaŕ. Kompjuter jo kompleksna mašina. Mója maśeršćina jo francojšćina. Wón jo pśeliš wěrkojty. Ja njewěm, chto to jo. Wótcakujom wót njeje list. Sy gdy taku wěc słyšał? Kněz Ricardo jo wjelgin dobry wucabnik. Wóna jo młodša ako jogo źowka. Tekst jo pśeliś dłujki. Zagroda kněza White jo wjelika. Som rowno tak wjeliki ako mój nan. Wjelika wóda jo žni znicyła. Mam rad psy, ale mója sotša ma rada kócki. Wěcej to njok. Njejsom bogaty a njok byś. Musym ned hyś? Tom studěrujo francojšćinu. Źo jo mój wobjed? Za co se zajmujośo? Tom njama bankowe konto. Kupka jo była pśeliś wjelika. Pytam běłu minikóšulu! Bóli mě kśebjat. Mam někotare francojske knigły. Słony maju dwě wušy. Powědaš derje francojšćinu? Hyšći se sy njerozsuźił? Sy mój nan. Na Marsu teke su kócki. Wón jo se dnja 28. julija 1888 naroźił. Toś ta góra jo ze sněgom pókšyta. Za cas zymy cesto mam zymnej noze. Wóda jo cysta. W toś tom domje bydlim. Wón jo pśez gólu šeł. Wón jo łdgaŕ, a ty teke. Som bźezdźěłabny. Wiźim twóju kócku w zagroźe. Wětš dujo. Nimska jo znata ako kraj basnikarjow a myslarjow. Sy samodruga? Njamógu twóje zaźaržanje pódprěś. Dojki su wužytne zwěrjeta. Pótrjebujom nowe awto. Wón móžo francojšćinu powědaś a pisaś. Pytam źěło. Som sebjezastaraŕ. Ja znajom jogo derje. Musym francojšćinu wuknuś. My smy nagromadu pěśnasćo wósobow. Bóžko słony njamógu derje spiwaś. To som. Znajom jogo wjelgin derje. Kak wjele wołojnikow maš? Mysliš se, až změjomy pěkne wjedro. Som wucabnik. Wy njamóžośo mě pomagaś. Mamy dosć wódy. Njepowědam japańšćinu. To su móje knigły. Móžoš jogo zazwóniś? Ja by z tobu wjacerjaś kśěł. Pśichod pótrjebujo zajźonosć. Smy tšašne sceny w telewiziju wiźeli. A ja wótegranjam: ně. Myslim se, až maš pšawo. Ja by se lubował. Woblutosćim toś ten rozsud. Žrawiki su dobre plěwarje. Grimanje se grimoco. Słony su žywe w Aziji a Africe. Źo sy wuknuł francojšćinu? Źinsa jo pětk. Som dobry taksijowy šofer. Smy z Nimskeje. Budu śi pjenjeze witśe daś. Gibamy se na pódpołnoc. Smej z Nimskeje. Pjas spi na weranźe. Njecytaj take knigły. Chowaj jo na chłodnem městnje. To jo waša konkluzija, nic mója. Wón rady słyšy radijo. Som myslił, až njeby wón pśišeł. Muski krokodil jo žrał beju. Salvador Dalí jo był spański wuměłc. Maśo alergiju pśeśiwo někakim rostlinam? Ty sy wusnuł, Tom? Klima jo how ako we Francojskej. Tom jo swóju wucbnicu francojšćiny zgubił. Grajoš muzikowy instrument? Mója manźelska jo gójcowka. Wóna ma małkej noze. Mam dwě kócce. Cogodla njewopytajoš twóje pjenjeze slědk dostaś? Tom jo wjelgin dobrośiwy a wjelikomyslny luź. Som francojšćinu w Parisu wuknuł. Njejsćo z gójcom. Sy wjelgin dobry wuměłc. Wugasni pšosym radijo. Kubłański system musy wěcej fleksibelny byś. Mam tak wjele pjenjez ako wón. Na wšu njegluku jo se chopiło sněg padaś. Wóna njejo chórobna sotša, ale gójcowka. Toś ta śpa ma rědny wuglěd na góru. Śpa jo była śamna a zymna. Za cas wójny by płaśizny kšuśe regulěrowane. Prědna kupka studěrujo rano, druga kupka studěrujo wjacor. Baskišćinu wuknjom. Jogo žywjenje jo w tšachośe. Wy njesmějośo tu waše awto bźez dowólnosći parkowaś. Pśikłady w toś tem słowniku se góźe lažko rozměś. Musyš na kuždy pad toś ten film wiźeś. To jo prědny raz, až se pśi wognje grěju. Kótare zwěrjeta se nejlěpjej ako domacne zwěrjeta za źiśi góźe? Wóna njejo bogata daniž sławna. Nan Toma sejźi w popajźeństwje. Tykańc słoźi słodko. Kótara rěc se w Mexiko powěda? Wjele bratšow maśo? Wóna jo Japanarka. Pó mójich znajobnosćach wón jo spšawny a spušćobny. Tom njewóstanjo. Yen jo słabšy ako dolar. Njemusyš nic groniś, kótarež njocoš groniś. Zelezo wóźi śopłotu cele derje. Kopańca jo wěcej popularna ako tenis. Gólc jo jabłuko jědł. Persišćina njejo śěžka rěc. Njespušć nas! Coš persišćinu wuknuś? Pšašajśo jogo, ga slědujuce lětadło źo. Pjacoš w twójej kuchni. Ja som wóno w telewiziju wěźeł. Móje bydlenje jo bliske. Kócka ma dwě wušy. My gromaźimy listowe znamki ze cełego swěta. Som tłusty. Mam rad wuchace. Com tu dlej wóstaś. Njelubujom kafej. Pokazuj mě, kak to funkcioněrujo. Buź wobglědniwy! Nož jo wjelgin wótšy. Krokodile maju wótše zuby. Ja njepijom nigdy tej z mlokom. Wóna njejo mója starka, ale mója mama. My smy měr lubujucy lud. Źiśe, kótaregož grajki pytam, jo mój syn. Mam problem a pótrjebujom twóju radu. Groń mě mě źewjetego mjaseca. Wótegrono jo pšawe. Słon jo mócne zwěrje. Tom ma wjelikej, módrej wušy. Njewuraźujomy z teroristami! Wóna jo wjele powědała. Módry słon ma rowno tak wjelikej wušy kaž rožojty słon. Sy źěłał wěcej ako ja. Som wjelgin tłusty. Som knigły z wjele wobrazami pytał. Banka ma filiale we wšych źělach kraja. Njewěm. Njejsom gójc. Tom a Marija matej dwě kócce. W kuchni jo kócka. Rozmějom twóju rěc. Mam rad kócki. Naša kócka jo w kuchni. Słony su wjelicke zwěrjeta. Tam jo kócka. Wěm, až nic njewěm. Źiśi Toma a Marije rad jěźe słynicy. Nejwětše wukniki chójźe pěšy k šuli. Kócki njamaju rad wódu. Dostanu cesto list wót njogo. Toś ta myš bu wót mójeje kócki skóńcowana. Wjele cukora wužywaš? Kócka spi na bliźe. Budu witśe tam byś. Pótrjebujom śpu za dwě wósobje. Myslim se, až mój kompjuter jo był pitśku drošy ako twój. Som student. Mam něco za tebje. Myslim se, až wón jo glucny. Marija jodlujo. Śpa jo była śamna. Smjejkocśo se pšosym do kamery. Glědaj pšosym lěpjej w pśichoźe. Smějom se tebje za twójim starstwom pšašaś? Som śi z wjelikim gólcom wiźeł. Mam jano małku zagrodu. Tom jo wujšeł aby wunamakał kaki zogol jo był tam. Jeje swójźba jo wjelgin wjelika. Njamam kócku. Wón njejo se tšacha wědobny był. Mój wujk wucy engelšćinu na uniwersiśe. Com hebrejšćinu wuknuś. Mam wjele knigłow. Wóna bydli we wjelickem domje. Ja musym źěłaś. Mójo awto njezaskócyjo. Jěm rad tykańc. Mjatel pjerchoco. Wiźimy jogo kuždy źeń. Kluc se njejo góźił niźi namakaś. Wěš, co dejš cyniś? Słyńco swěśi wob źeń, mjasec swěśi w nocy. Wóna jo swójogo manźela wó źaseś lět pśežywiła. Som chudy student, a njamóžom śi płaśiś. Ja som twója starša sotša. Som ceły cas nerwozny był. To jo ako wustśěl klincało. Kak wjele źowćow jo na toś tom wobrazu? To jo mój problem z Tomom. Njamóžom jo. To jo eufemizm! Teke ty njejsy janźel. My wšitke su wó tom wěźeli. My su wšo wó tom wěźeli. Źiśe pótrjebujo lubosć. Słon jo wjelgin wjelike zwěrje. Wóda jo marznuła. Njejsom wěsty, lěc com to wěźeś. Wón jo wumarły wót tśoch lět. Tom njoco tak dłujko cakaś. Telefon jo znowa zwónił. Tom tužny wuglěda. Myslim se, až som w zachadnem žywjenju princesna była. Studěrujom Korejańšćinu. Wóna jo mě wutšobu łamała. Tom grajka z kócku Marije. Coš pśichod wěźeś? Tom jo hyšći w póstoli. Snaź wón znajo toś te tšojenje. Wón póchada ze Zjadnośonych statow Ameriki. Com finšćinu wuknuś. Pšosym groń nam, cogodla musyš tu wóstaś. Com letišćinu wuknuś. Ja powědam z Tomom a Mariju francojšćinu. To jo dobre měso. Wóna ma rada toś togo basa. Tom pitśku powěda francojšćinu. Dešć praskota na kšywo. Njelubujom jajka. Wucabnik a wukniki su w muzeju. To wóni wše gronje. Źo wóna jo to wuknuła? Jack gromaźi listowe znamki. Tom njerozmějo sanskrit. Wón njamóžo plěwaś. To jo jogo rozsud. Sada, kótaraž rowno cyta, njeeksistěrujo. Znajośo jogo bratša? Com, aby ty spiwał. Som jadne knigły cytaś kśěł. Njejsom twój pśijaśel. Rozsuźujomy gromaźe. Maju mroje wušy? Tom jo nan tśich źiśi. Tom njekuri daniž pijo. Cogodla źoš pěšy, jolic maš awto? Toś te źiśi caka na swóju maś. To jo było njeplanowane. Klěb se z muki gótujo. Tom jo swóju cytańsku brylu wótstajił. Som se w kopicy zgubił. Źinsa jo njeźela. Wjele płaśi toś te radijo? Ja ako grajaŕ wuglědam? Witśe daju jomu jogo knigły. Na kupje njejo žywjenje. Toś ta kista jo śěžka. Dny dlejše bywaju. To jo pjas. Wóno jo kradu wjelike. Wobglědujśo sebje toś te fota! Z jadnogo mjaseca wóna jo w hospitalu. Pawoł jo mudrjejšy ako Otto. Cogodla płacośo? Cogodla wósoł ma tak dłujkej wušy? Tom njejo głupak. Tom njejo głupjeńc. Wóna jo se se w Americe naroźiła. Wóni jěźe z nožom a widlickami. Glědaj, což groniš!
{ "pile_set_name": "Github" }
<component name="org.nuxeo.ecm.automation.io.services.IOComponent.codec.contrib"> <extension point="codecs" target="org.nuxeo.ecm.automation.io.services.IOComponent"> <codec class="org.nuxeo.ecm.automation.io.services.codec.DocumentModelCodec" /> <codec class="org.nuxeo.ecm.automation.io.services.codec.NuxeoPrincipalCodec" /> <codec class="org.nuxeo.ecm.automation.io.services.codec.BulkCodec" /> </extension> </component>
{ "pile_set_name": "Github" }
#!/bin/sh #---------------------------------------------------------------------------- # configure script for L-SMASH # # Currently, this script is considering only GCC. # If you want to use other compiler based on C99 standerd (e.g. llvm), # we just say to you "patches welcome." #---------------------------------------------------------------------------- if test x"$1" = x"-h" -o x"$1" = x"--help" ; then cat << EOF Usage: ./configure [options] options: -h, --help print this message --prefix=PREFIX install architecture-independent files into PREFIX [/usr/local] --exec-prefix=EPREFIX install architecture-dependent files into EPREFIX [PREFIX] --bindir=DIR install binaries in DIR [EPREFIX/bin] --libdir=DIR install libs in DIR [EPREFIX/lib] --includedir=DIR install headers in DIR [PREFIX/include] --cc=CC use a defined compiler for compilation and linking [gcc] --target-os=OS build programs to run on OS [auto] --cross-prefix=PREFIX use PREFIX for compilation tools [none] --sysroot=DIR specify toolchain's directory [none] --disable-static doesn't compile static library --enable-shared also compile shared library besides static library --enable-debug compile with debug symbols and never strip --extra-cflags=XCFLAGS add XCFLAGS to CFLAGS --extra-ldflags=XLDFLAGS add XLDFLAGS to LDFLAGS --extra-libs=XLIBS add XLIBS to LIBS EOF exit 1 fi #----------------------------------------------------------------------------- error_exit() { echo error: $1 exit 1 } #Currently, this is used only for the flag check of compiler. cc_check() { echo 'int main(void){return 0;}' > conftest.c $CC conftest.c $1 $2 -o conftest 2> /dev/null ret=$? rm -f conftest* return $ret } is_64bit() { echo 'int main(void){int a[2*(sizeof(void *)>4)-1]; return 0;}' > conftest.c $CC conftest.c -o conftest 2> /dev/null ret=$? rm -f conftest* return $ret } #----------------------------------------------------------------------------- rm -f config.* .depend conftest* liblsmash.pc *.ver echo echo generating config.mak ... echo SRCDIR=$(dirname "$0") SRCDIR=$(cd "$SRCDIR"; pwd) test "$SRCDIR" = "$(pwd)" && SRCDIR=. test -n "$(echo $SRCDIR | grep ' ')" && \ error_exit "out-of-tree builds are impossible with whitespace in source path" prefix="" exec_prefix="" bindir="" libdir="" includedir="" DESTDIR="" TARGET_OS="" CROSS="" SYSROOT="" CC="gcc" AR="ar" LD="gcc" RANLIB="ranlib" STRIP="strip" DEBUG="" EXT="" STATIC_NAME="liblsmash" STATIC_EXT=".a" STATICLIB="enabled" SHARED_NAME="liblsmash" SHARED_EXT=".so" SHAREDLIB="" IMPLIB="" TOOLS="" CFLAGS="-Wshadow -Wall -std=c99 -pedantic -I. -I$SRCDIR" LDFLAGS="-L." SO_LDFLAGS='-shared -Wl,-soname,$@ -Wl,--version-script,liblsmash.ver' LIBS="-lm" for opt; do optarg="${opt#*=}" case "$opt" in --prefix=*) prefix="$optarg" ;; --exec-prefix=*) exec_prefix="$optarg" ;; --bindir=*) bindir="$optarg" ;; --libdir=*) libdir="$optarg" ;; --includedir=*) includedir="$optarg" ;; --destdir=*) DESTDIR="$optarg" ;; --cc=*) CC="$optarg" LD="$optarg" ;; --target-os=*) TARGET_OS="$optarg" ;; --cross-prefix=*) CROSS="$optarg" ;; --sysroot=*) CFLAGS="$CFLAGS --sysroot=$optarg" LDFLAGS="$LDFLAGS --sysroot=$optarg" ;; --disable-static) STATICLIB="" SHAREDLIB="enabled" ;; --enable-shared) SHAREDLIB="enabled" ;; --enable-debug) DEBUG="enabled" ;; --extra-cflags=*) XCFLAGS="$optarg" ;; --extra-ldflags=*) XLDFLAGS="$optarg" ;; --extra-libs=*) XLIBS="$optarg" ;; *) error_exit "unknown option $opt" ;; esac done test -n "$prefix" || prefix="/usr/local" test -n "$exec_prefix" || exec_prefix='${prefix}' test -n "$bindir" || bindir='${exec_prefix}/bin' test -n "$libdir" || libdir='${exec_prefix}/lib' test -n "$includedir" || includedir='${prefix}/include' CC="${CROSS}${CC}" AR="${CROSS}${AR}" LD="${CROSS}${LD}" RANLIB="${CROSS}${RANLIB}" STRIP="${CROSS}${STRIP}" for f in "$CC" "$AR" "$LD" "$RANLIB" "$STRIP"; do test -n "$(which $f 2> /dev/null)" || error_exit "$f is not executable" done MAJVER=$(grep -e '#define LSMASH_VERSION_MAJOR' $SRCDIR/lsmash.h | sed -e 's/#define LSMASH_VERSION_MAJOR //;s/ //g') MINVER=$(grep -e '#define LSMASH_VERSION_MINOR' $SRCDIR/lsmash.h | sed -e 's/#define LSMASH_VERSION_MINOR //;s/ //g') MICVER=$(grep -e '#define LSMASH_VERSION_MICRO' $SRCDIR/lsmash.h | sed -e 's/#define LSMASH_VERSION_MICRO //;s/ //g') if test -n "$TARGET_OS"; then TARGET_OS=$(echo $TARGET_OS | tr '[A-Z]' '[a-z]') else TARGET_OS=$($CC -dumpmachine | tr '[A-Z]' '[a-z]') fi case "$TARGET_OS" in *mingw*) EXT=".exe" SHARED_NAME="liblsmash-$MAJVER" SHARED_EXT=".dll" DEFNAME="${SHARED_NAME}.def" IMPLIB="liblsmash.dll.a" SO_LDFLAGS="-shared -Wl,--output-def,$DEFNAME -Wl,--out-implib,$IMPLIB -Wl,--version-script,liblsmash.ver" CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO=1" LIBARCH=i386 if lib.exe --list > /dev/null 2>&1 ; then if is_64bit ; then LIBARCH=x64 fi SLIB_CMD='sed -i "s/ @[^ ]*//" $(DEFNAME); lib.exe -machine:$(LIBARCH) -def:$(DEFNAME) -out:lsmash.lib' elif genlib -V > /dev/null 2>&1 ; then if is_64bit ; then LIBARCH=x86_64 else LIBARCH=x86 fi SLIB_CMD='sed -i "s/ @[^ ]*//" $(DEFNAME); genlib -a $(LIBARCH) -o lsmash.lib -d $(SHAREDLIBNAME) $(DEFNAME)' elif ${CROSS}dlltool --version > /dev/null 2>&1 ; then if is_64bit ; then LIBARCH="i386:x86-64" fi SLIB_CMD="sed -i \"s/ @[^ ]*//\" \$(DEFNAME); ${CROSS}dlltool -m \$(LIBARCH) -d \$(DEFNAME) -l lsmash.lib -D \$(SHAREDLIBNAME)" fi ;; *cygwin*) EXT=".exe" SHARED_NAME="cyglsmash" SHARED_EXT=".dll" IMPLIB="liblsmash.dll.a" SO_LDFLAGS="-shared -Wl,--out-implib,$IMPLIB -Wl,--version-script,liblsmash.ver" ;; *darwin*) SHARED_EXT=".dylib" SO_LDFLAGS="-dynamiclib -Wl,-undefined,suppress -Wl,-read_only_relocs,suppress -Wl,-flat_namespace -Wl,--version-script,liblsmash.ver" ;; *solaris*) #patches welcome SHAREDLIB="" ;; *) SHARED_NAME="liblsmash" SHARED_EXT=".so.$MAJVER" if test -n "$SHAREDLIB"; then CFLAGS="$CFLAGS -fPIC" LDFLAGS="$LDFLAGS -fPIC" fi ;; esac STATICLIBNAME="${STATIC_NAME}${STATIC_EXT}" SHAREDLIBNAME="${SHARED_NAME}${SHARED_EXT}" test -n "$STATICLIB" && STATICLIB="$STATICLIBNAME" test -n "$SHAREDLIB" && SHAREDLIB="$SHAREDLIBNAME" test -z "$STATICLIB" -a -z "$SHAREDLIB" && \ error_exit "--disable-static requires --enable-shared were specified" test -z "$SHAREDLIB" && SO_LDFLAGS="" CFLAGS="$CFLAGS $XCFLAGS" LDFLAGS="$LDFLAGS $XLDFLAGS" LIBS="$LIBS $XLIBS" # In order to avoid some compiler bugs, we don't use "-O3" for the default. # "-Os" unites "-O2" and "-finline-funtions" on x86/x86_64 in the latest GCC. # As a result of taking these into consideration, we make "-Os" a rated value. # And, we don't care about architecture related options. # If you want them, set up by yourself like --extra-cflags="-O3 -march=native". if test -n "$DEBUG"; then CFLAGS="$CFLAGS -g3 -O0" STRIP="" else CFLAGS="-Os -ffast-math $CFLAGS" fi if ! cc_check "$CFLAGS" "$LDFLAGS"; then error_exit "invalid CFLAGS/LDFLAGS" fi if cc_check "$CFLAGS -fexcess-precision=fast" "$LDFLAGS"; then CFLAGS="$CFLAGS -fexcess-precision=fast" fi if cc_check "$CFLAGS" "$LDFLAGS -Wl,--large-address-aware"; then LDFLAGS="$LDFLAGS -Wl,--large-address-aware" fi #============================================================================= # Notation for developpers. # Be sure to modified this block when you add/delete source files. SRC_COMMON=" \ alloc.c \ bits.c \ bytes.c \ list.c \ multibuf.c \ osdep.c \ utils.c" SRC_CODECS=" \ a52.c \ alac.c \ description.c \ dts.c \ h264.c \ hevc.c \ id.c \ mp4sys.c \ mp4a.c \ mp4v.c \ nalu.c \ qt_wfex.c \ vc1.c \ wma.c" SRC_IMPORTER=" \ a52_imp.c \ adts_imp.c \ als_imp.c \ amr_imp.c \ dts_imp.c \ importer.c \ isobm_imp.c \ mp3_imp.c \ nalu_imp.c \ vc1_imp.c \ wave_imp.c" SRC_CORE=" \ box.c \ box_default.c \ box_type.c \ chapter.c \ file.c \ fragment.c \ isom.c \ meta.c \ print.c \ read.c \ summary.c \ timeline.c \ write.c" SRCS="" for src in $SRC_COMMON; do SRCS="$SRCS common/$src" done for src in $SRC_CODECS; do SRCS="$SRCS codecs/$src" done for src in $SRC_IMPORTER; do SRCS="$SRCS importer/$src" done for src in $SRC_CORE; do SRCS="$SRCS core/$src" done SRC_CLI="cli.c" SRC_TOOLS="" OBJ_TOOLS="" for src in $SRC_CLI; do SRC_TOOLS="$SRC_TOOLS cli/$src" done for src in $SRC_TOOLS; do OBJ_TOOLS="$OBJ_TOOLS ${src%.c}.o" done TOOLS_ALL="muxer remuxer boxdumper timelineeditor" TOOLS_NAME="" TOOLS="$TOOLS_ALL" for tool in $TOOLS; do SRC_TOOLS="$SRC_TOOLS cli/${tool}.c" TOOLS_NAME="$TOOLS_NAME cli/${tool}${EXT}" done #============================================================================= CURDIR="$PWD" cd $SRCDIR VER=$MAJVER.$MINVER.$MICVER if test -d .git && type git > /dev/null 2>&1 ; then REV="$(git rev-list HEAD 2> /dev/null | wc -l)" HASH="$(git describe --always 2> /dev/null)" else REV=0 HASH= fi if test $REV -ne 0; then VER_STRING="$VER rev.$REV" else VER_STRING="$VER" fi cd "$CURDIR" cat >> config.h << EOF #define LSMASH_REV "$REV" #define LSMASH_GIT_HASH "$HASH" EOF sed "s/\\\$MAJOR/$MAJVER/" $SRCDIR/liblsmash.v > liblsmash.ver # Add non-public symbols which have lsmash_* prefix to local. find $SRCDIR/common/ $SRCDIR/importer/ -name "*.h" | xargs sed -e 's/^[ ]*//g' | \ grep "^\(void\|lsmash_bits_t\|uint64_t\|int\|int64_t\|lsmash_bs_t\|uint8_t\|uint16_t\|uint32_t\|lsmash_entry_list_t\|lsmash_entry_t\|lsmash_multiple_buffers_t\|double\|float\|FILE\) \+\*\{0,1\}lsmash_" | \ sed -e "s/.*\(lsmash_.*\)(.*/\1/g" -e "s/.*\(lsmash_.*\)/\1;/g" | xargs -I% sed -i "/^};$/i \ %" liblsmash.ver # Get rid of non-public symbols for the cli tools from local. sed -i -e '/lsmash_win32_fopen/d' \ -e '/lsmash_string_from_wchar/d' \ -e '/lsmash_importer_open/d' \ -e '/lsmash_importer_close/d' \ -e '/lsmash_importer_get_access_unit/d' \ -e '/lsmash_importer_get_last_delta/d' \ -e '/lsmash_importer_construct_timeline/d' \ -e '/lsmash_importer_get_track_count/d' \ -e '/lsmash_duplicate_summary/d' liblsmash.ver cat >> liblsmash.pc << EOF prefix=$prefix exec_prefix=$exec_prefix libdir=$libdir includedir=$includedir Name: liblsmash Description: Loyal to Spec of MPEG4, and Ad-hock Simple Hackwork Version: $VER_STRING Requires: URL: https://github.com/l-smash/l-smash Libs: -L${libdir} -llsmash $(test -z "$SHAREDLIB" && echo $LIBS) Libs.private: $(test -n "$SHAREDLIB" && echo $LIBS) Cflags: -I${includedir} EOF cat >> config.mak << EOF SRCDIR = $SRCDIR DESTDIR = $DESTDIR prefix = $prefix exec_prefix = $exec_prefix bindir = $bindir libdir = $libdir includedir = $includedir CC = $CC AR = $AR LD = $LD RANLIB = $RANLIB STRIP = $STRIP STATICLIBNAME = $STATICLIBNAME STATICLIB = $STATICLIB SHAREDLIBNAME = $SHAREDLIBNAME SHAREDLIB = $SHAREDLIB IMPLIB = $IMPLIB CFLAGS = $CFLAGS LDFLAGS = $LDFLAGS SO_LDFLAGS = $SO_LDFLAGS LIBS = $LIBS LIBARCH = $LIBARCH DEFNAME = $DEFNAME SLIB_CMD = $SLIB_CMD EOF cat config.mak cat >> config.mak << EOF SRCS = $SRCS SRC_TOOLS = $SRC_TOOLS TOOLS_ALL = $TOOLS_ALL TOOLS = $TOOLS_NAME MAJVER = $MAJVER EOF for tool in $TOOLS; do cat >> config.mak2 << EOF cli/${tool}${EXT}: cli/${tool}.o $OBJ_TOOLS $STATICLIB $SHAREDLIB \$(CC) \$(CFLAGS) \$(LDFLAGS) -o \$@ \$< $OBJ_TOOLS -llsmash \$(LIBS) -@ \$(if \$(STRIP), \$(STRIP) \$@) EOF done test "$SRCDIR" = "." || ln -sf ${SRCDIR}/Makefile . mkdir -p cli codecs common core importer cat << EOF configure finished type 'make' : compile library and tools type 'make install' : install all into system type 'make lib' : compile library only type 'make install-lib' : install library and header into system EOF exit 0
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- File created by the Android Action Bar Style Generator Copyright (C) 2011 The Android Open Source Project Copyright (C) 2012 readyState Software Ltd 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 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background" android:drawable="@drawable/progress_bg_nebula" /> <item android:id="@android:id/secondaryProgress"> <scale android:scaleWidth="100%" android:drawable="@drawable/progress_secondary_nebula" /> </item> <item android:id="@android:id/progress"> <scale android:scaleWidth="100%" android:drawable="@drawable/progress_primary_nebula" /> </item> </layer-list>
{ "pile_set_name": "Github" }
--- de: link: by: by %{author} confirm_delete: Link löschen? errors: loading: Fehler beim Laden only_webs: Nur Webseiten werden unterstützt form: title: Link input: Gib die Web Addresse ein name: Link one: Ein Link other: links title: Links linkser: title: Linkser
{ "pile_set_name": "Github" }
package transport import ( "github.com/concourse/retryhttp" ) type UnreachableWorkerRetryer struct { DelegateRetryer retryhttp.Retryer } func (r *UnreachableWorkerRetryer) IsRetryable(err error) bool { if _, ok := err.(WorkerUnreachableError); ok { return true } return r.DelegateRetryer.IsRetryable(err) }
{ "pile_set_name": "Github" }
import PropTypes from 'prop-types'; import React from 'react'; import autoBind from 'react-autobind'; class Suggestion extends React.Component { constructor(props) { super(props); autoBind(this, 'handleClick', 'handleMouseMove'); } handleClick() { this.props.onClick(this.props.suggestion); } handleMouseMove(event) { this.props.onMouseMove(event, this.props.index); } render() { const { props } = this; return ( <li className={props.className} key={props.suggestion} ref={ref => (this.item = ref)} onClick={this.handleClick} onMouseMove={this.handleMouseMove} > {props.suggestionRenderer(props.suggestion, props.searchTerm)} </li> ); } } Suggestion.propTypes = { className: PropTypes.string, index: PropTypes.number.isRequired, onClick: PropTypes.func.isRequired, onMouseMove: PropTypes.func.isRequired, suggestion: PropTypes.string.isRequired, suggestionRenderer: PropTypes.func.isRequired }; export default Suggestion;
{ "pile_set_name": "Github" }
export const enum SymbolFlags { None = 0, FunctionScopedVariable = 1 << 0, // Variable (var) or parameter BlockScopedVariable = 1 << 1, // A block-scoped variable (let or const) Property = 1 << 2, // Property or enum member EnumMember = 1 << 3, // Enum member Function = 1 << 4, // Function Class = 1 << 5, // Class Interface = 1 << 6, // Interface ConstEnum = 1 << 7, // Const enum RegularEnum = 1 << 8, // Enum ValueModule = 1 << 9, // Instantiated module NamespaceModule = 1 << 10, // Uninstantiated module TypeLiteral = 1 << 11, // Type Literal or mapped type ObjectLiteral = 1 << 12, // Object Literal Method = 1 << 13, // Method Constructor = 1 << 14, // Constructor GetAccessor = 1 << 15, // Get accessor SetAccessor = 1 << 16, // Set accessor Signature = 1 << 17, // Call, construct, or index signature TypeParameter = 1 << 18, // Type parameter TypeAlias = 1 << 19, // Type alias ExportValue = 1 << 20, // Exported value marker (see comment in declareModuleMember in binder) Alias = 1 << 21, // An alias for another symbol (see comment in isAliasSymbolDeclaration in checker) Prototype = 1 << 22, // Prototype property (no source representation) ExportStar = 1 << 23, // Export * declaration Optional = 1 << 24, // Optional property Transient = 1 << 25, // Transient symbol (created during type check) Assignment = 1 << 26, // Assignment treated as declaration (eg `this.prop = 1`) ModuleExports = 1 << 27, // Symbol for CommonJS `module` of `module.exports` /* @internal */ All = FunctionScopedVariable | BlockScopedVariable | Property | EnumMember | Function | Class | Interface | ConstEnum | RegularEnum | ValueModule | NamespaceModule | TypeLiteral | ObjectLiteral | Method | Constructor | GetAccessor | SetAccessor | Signature | TypeParameter | TypeAlias | ExportValue | Alias | Prototype | ExportStar | Optional | Transient, Enum = RegularEnum | ConstEnum, Variable = FunctionScopedVariable | BlockScopedVariable, Value = Variable | Property | EnumMember | ObjectLiteral | Function | Class | Enum | ValueModule | Method | GetAccessor | SetAccessor, Type = Class | Interface | Enum | EnumMember | TypeLiteral | TypeParameter | TypeAlias, Namespace = ValueModule | NamespaceModule | Enum, Module = ValueModule | NamespaceModule, Accessor = GetAccessor | SetAccessor, // Variables can be redeclared, but can not redeclare a block-scoped declaration with the // same name, or any other value that is not a variable, e.g. ValueModule or Class FunctionScopedVariableExcludes = Value & ~FunctionScopedVariable, // Block-scoped declarations are not allowed to be re-declared // they can not merge with anything in the value space BlockScopedVariableExcludes = Value, ParameterExcludes = Value, PropertyExcludes = None, EnumMemberExcludes = Value | Type, FunctionExcludes = Value & ~(Function | ValueModule | Class), ClassExcludes = (Value | Type) & ~(ValueModule | Interface | Function), // class-interface mergability done in checker.ts InterfaceExcludes = Type & ~(Interface | Class), RegularEnumExcludes = (Value | Type) & ~(RegularEnum | ValueModule), // regular enums merge only with regular enums and modules ConstEnumExcludes = (Value | Type) & ~ConstEnum, // const enums merge only with const enums ValueModuleExcludes = Value & ~(Function | Class | RegularEnum | ValueModule), NamespaceModuleExcludes = 0, MethodExcludes = Value & ~Method, GetAccessorExcludes = Value & ~SetAccessor, SetAccessorExcludes = Value & ~GetAccessor, TypeParameterExcludes = Type & ~TypeParameter, TypeAliasExcludes = Type, AliasExcludes = Alias, ModuleMember = Variable | Function | Class | Interface | Enum | Module | TypeAlias | Alias, ExportHasLocal = Function | Class | Enum | ValueModule, BlockScoped = BlockScopedVariable | Class | Enum, PropertyOrAccessor = Property | Accessor, ClassMember = Method | Accessor | Property, /* @internal */ ExportSupportsDefaultModifier = Class | Function | Interface, /* @internal */ ExportDoesNotSupportDefaultModifier = ~ExportSupportsDefaultModifier, /* @internal */ // The set of things we consider semantically classifiable. Used to speed up the LS during // classification. Classifiable = Class | Enum | TypeAlias | Interface | TypeParameter | Module | Alias, /* @internal */ LateBindingContainer = Class | Interface | TypeLiteral | ObjectLiteral | Function, } /* @internal */ export type SymbolId = number; export interface Symbol { flags: SymbolFlags; // Symbol flags escapedName: __String; // Name of symbol declarations: Declaration[]; // Declarations associated with this symbol valueDeclaration: Declaration; // First value declaration of the symbol members?: SymbolTable; // Class, interface or object literal instance members exports?: SymbolTable; // Module exports globalExports?: SymbolTable; // Conditional global UMD exports /* @internal */ id?: SymbolId; // Unique id (used to look up SymbolLinks) /* @internal */ mergeId?: number; // Merge id (used to look up merged symbol) /* @internal */ parent?: Symbol; // Parent symbol /* @internal */ exportSymbol?: Symbol; // Exported symbol associated with this symbol /* @internal */ constEnumOnlyModule?: boolean; // True if module contains only const enums or other modules with only const enums /* @internal */ isReferenced?: SymbolFlags; // True if the symbol is referenced elsewhere. Keeps track of the meaning of a reference in case a symbol is both a type parameter and parameter. /* @internal */ isReplaceableByMethod?: boolean; // Can this Javascript class property be replaced by a method symbol? /* @internal */ isAssigned?: boolean; // True if the symbol is a parameter with assignments /* @internal */ assignmentDeclarationMembers?: ESMap<number, Declaration>; // detected late-bound assignment declarations associated with the symbol } /* @internal */ export interface SymbolLinks { immediateTarget?: Symbol; // Immediate target of an alias. May be another alias. Do not access directly, use `checker.getImmediateAliasedSymbol` instead. target?: Symbol; // Resolved (non-alias) target of an alias type?: Type; // Type of value symbol nameType?: Type; // Type associated with a late-bound symbol uniqueESSymbolType?: Type; // UniqueESSymbol type for a symbol declaredType?: Type; // Type of class, interface, enum, type alias, or type parameter typeParameters?: TypeParameter[]; // Type parameters of type alias (undefined if non-generic) outerTypeParameters?: TypeParameter[]; // Outer type parameters of anonymous object type instantiations?: ESMap<string, Type>; // Instantiations of generic type alias (undefined if non-generic) inferredClassSymbol?: ESMap<SymbolId, TransientSymbol>; // Symbol of an inferred ES5 constructor function mapper?: TypeMapper; // Type mapper for instantiation alias referenced?: boolean; // True if alias symbol has been referenced as a value that can be emitted constEnumReferenced?: boolean; // True if alias symbol resolves to a const enum and is referenced as a value ('referenced' will be false) containingType?: UnionOrIntersectionType; // Containing union or intersection type for synthetic property leftSpread?: Symbol; // Left source for synthetic spread property rightSpread?: Symbol; // Right source for synthetic spread property syntheticOrigin?: Symbol; // For a property on a mapped or spread type, points back to the original property isDiscriminantProperty?: boolean; // True if discriminant synthetic property resolvedExports?: SymbolTable; // Resolved exports of module or combined early- and late-bound static members of a class. resolvedMembers?: SymbolTable; // Combined early- and late-bound members of a symbol exportsChecked?: boolean; // True if exports of external module have been checked typeParametersChecked?: boolean; // True if type parameters of merged class and interface declarations have been checked. isDeclarationWithCollidingName?: boolean; // True if symbol is block scoped redeclaration bindingElement?: BindingElement; // Binding element associated with property symbol exportsSomeValue?: boolean; // True if module exports some value (not just types) enumKind?: EnumKind; // Enum declaration classification originatingImport?: ImportDeclaration | ImportCall; // Import declaration which produced the symbol, present if the symbol is marked as uncallable but had call signatures in `resolveESModuleSymbol` lateSymbol?: Symbol; // Late-bound symbol for a computed property specifierCache?: ESMap<string, string>; // For symbols corresponding to external modules, a cache of incoming path -> module specifier name mappings extendedContainers?: Symbol[]; // Containers (other than the parent) which this symbol is aliased in extendedContainersByFile?: ESMap<NodeId, Symbol[]>; // Containers (other than the parent) which this symbol is aliased in variances?: VarianceFlags[]; // Alias symbol type argument variance cache deferralConstituents?: Type[]; // Calculated list of constituents for a deferred type deferralParent?: Type; // Source union/intersection of a deferred type cjsExportMerged?: Symbol; // Version of the symbol with all non export= exports merged with the export= target typeOnlyDeclaration?: TypeOnlyCompatibleAliasDeclaration | false; // First resolved alias declaration that makes the symbol only usable in type constructs isConstructorDeclaredProperty?: boolean; // Property declared through 'this.x = ...' assignment in constructor tupleLabelDeclaration?: NamedTupleMember | ParameterDeclaration; // Declaration associated with the tuple's label } /* @internal */ export const enum EnumKind { Numeric, // Numeric enum (each member has a TypeFlags.Enum type) Literal // Literal enum (each member has a TypeFlags.EnumLiteral type) } /* @internal */ export const enum CheckFlags { Instantiated = 1 << 0, // Instantiated symbol SyntheticProperty = 1 << 1, // Property in union or intersection type SyntheticMethod = 1 << 2, // Method in union or intersection type Readonly = 1 << 3, // Readonly transient symbol ReadPartial = 1 << 4, // Synthetic property present in some but not all constituents WritePartial = 1 << 5, // Synthetic property present in some but only satisfied by an index signature in others HasNonUniformType = 1 << 6, // Synthetic property with non-uniform type in constituents HasLiteralType = 1 << 7, // Synthetic property with at least one literal type in constituents ContainsPublic = 1 << 8, // Synthetic property with public constituent(s) ContainsProtected = 1 << 9, // Synthetic property with protected constituent(s) ContainsPrivate = 1 << 10, // Synthetic property with private constituent(s) ContainsStatic = 1 << 11, // Synthetic property with static constituent(s) Late = 1 << 12, // Late-bound symbol for a computed property with a dynamic name ReverseMapped = 1 << 13, // Property of reverse-inferred homomorphic mapped type OptionalParameter = 1 << 14, // Optional parameter RestParameter = 1 << 15, // Rest parameter DeferredType = 1 << 16, // Calculation of the type of this symbol is deferred due to processing costs, should be fetched with `getTypeOfSymbolWithDeferredType` HasNeverType = 1 << 17, // Synthetic property with at least one never type in constituents Mapped = 1 << 18, // Property of mapped type StripOptional = 1 << 19, // Strip optionality in mapped property Synthetic = SyntheticProperty | SyntheticMethod, Discriminant = HasNonUniformType | HasLiteralType, Partial = ReadPartial | WritePartial }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2014 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once #if ENABLE(DFG_JIT) #include "DFGSafepoint.h" namespace JSC { namespace DFG { class Graph; class GraphSafepoint { public: GraphSafepoint(Graph&, Safepoint::Result&); ~GraphSafepoint(); private: Safepoint m_safepoint; }; } } // namespace JSC::DFG #endif // ENABLE(DFG_JIT)
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>BuildMachineOSBuild</key> <string>18A391</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>CodecCommander</string> <key>CFBundleGetInfoString</key> <string>2.7.1, Copyright © 2013-2014 TimeWalker. All rights reserved.</string> <key>CFBundleIdentifier</key> <string>org.tw.CodecCommander</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>CodecCommander</string> <key>CFBundlePackageType</key> <string>KEXT</string> <key>CFBundleShortVersionString</key> <string>2.7.1</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleSupportedPlatforms</key> <array> <string>MacOSX</string> </array> <key>CFBundleVersion</key> <string>2.7.1</string> <key>DTCompiler</key> <string>com.apple.compilers.llvm.clang.1_0</string> <key>DTPlatformBuild</key> <string>9F2000</string> <key>DTPlatformVersion</key> <string>GM</string> <key>DTSDKBuild</key> <string>10M2518</string> <key>DTSDKName</key> <string>macosx10.6</string> <key>DTXcode</key> <string>0941</string> <key>DTXcodeBuild</key> <string>9F2000</string> <key>IOKitPersonalities</key> <dict> <key>CodecCommander</key> <dict> <key>CFBundleIdentifier</key> <string>org.tw.CodecCommander</string> <key>Codec Profile</key> <dict> <key>1002</key> <string>Disabled HDMI</string> <key>10de</key> <string>Disabled HDMI</string> <key>10ec_0233</key> <string>Realtek ALC283,etc</string> <key>10ec_0235</key> <string>Realtek ALC283,etc</string> <key>10ec_0236</key> <string>Realtek ALC283,etc</string> <key>10ec_0255</key> <string>Realtek ALC283,etc</string> <key>10ec_0269</key> <string>Realtek ALC269</string> <key>10ec_0269_HDA_1028_04d9</key> <string>Realtek ALC269VB</string> <key>10ec_0269_HDA_1458_fa50</key> <string>Realtek ALC269 BRIX</string> <key>10ec_0282</key> <string>Realtek ALC283,etc</string> <key>10ec_0283</key> <string>Realtek ALC283,etc</string> <key>10ec_0292</key> <string>Realtek ALC292</string> <key>10ec_0668</key> <string>Realtek ALC668</string> <key>10ec_0892_HDA_1458</key> <string>Realtek ALC892 desktop</string> <key>10ec_0892_HDA_8086</key> <string>Realtek ALC892 desktop</string> <key>10ec_0900</key> <string>Realtek ALC1150</string> <key>8086</key> <string>Disabled HDMI</string> <key>Default</key> <dict> <key>Check Infinitely</key> <false/> <key>Check Interval</key> <integer>3000</integer> <key>Custom Commands</key> <array/> <key>Perform Reset on EAPD Fail</key> <false/> <key>Send Delay</key> <integer>300</integer> <key>Sleep Nodes</key> <true/> <key>Update Nodes</key> <true/> </dict> <key>Disabled HDMI</key> <dict> <key>Check Infinitely</key> <false/> <key>Disable</key> <true/> <key>Sleep Nodes</key> <false/> <key>Update Nodes</key> <false/> </dict> <key>Realtek ALC1150</key> <dict> <key>Custom Commands</key> <array> <dict> <key>Command</key> <data> AgUABw== </data> <key>Comment</key> <string>0x20 SET_COEF_INDEX 0x07</string> <key>On Init</key> <true/> <key>On Sleep</key> <true/> <key>On Wake</key> <true/> </dict> <dict> <key>Command</key> <data> AgR8sA== </data> <key>Comment</key> <string>0x20 SET_PROC_COEF 0x7CB0</string> <key>On Init</key> <true/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> </array> <key>Send Delay</key> <integer>100</integer> <key>Sleep Nodes</key> <false/> <key>Update Nodes</key> <false/> </dict> <key>Realtek ALC269</key> <dict> <key>Custom Commands</key> <array> <dict> <key>Command</key> <data> AVcIgw== </data> <key>Comment</key> <string>0x15 SET_UNSOLICITED_ENABLE 0x83</string> <key>On Init</key> <true/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> </array> </dict> <key>Realtek ALC269 BRIX</key> <dict> <key>Custom Commands</key> <array> <dict> <key>Command</key> <data> AVcIgw== </data> <key>Comment</key> <string>0x15 SET_UNSOLICITED_ENABLE 0x83</string> <key>On Init</key> <false/> <key>On Sleep</key> <false/> <key>On Wake</key> <false/> </dict> </array> </dict> <key>Realtek ALC269VB</key> <dict> <key>Custom Commands</key> <array> <dict> <key>Command</key> <data> AhcIgw== </data> <key>Comment</key> <string>0x21 SET_UNSOLICITED_ENABLE 0x83</string> <key>On Init</key> <true/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> </array> <key>Send Delay</key> <integer>20</integer> <key>Sleep Nodes</key> <false/> </dict> <key>Realtek ALC283,etc</key> <dict> <key>Custom Commands</key> <array> <dict> <key>Command</key> <data> AZcHJQ== </data> <key>Comment</key> <string>0x19 SET_PIN_WIDGET_CONTROL 0x25</string> <key>On Init</key> <true/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> <dict> <key>Command</key> <data> AhcIgw== </data> <key>Comment</key> <string>0x21 SET_UNSOLICITED_ENABLE 0x83</string> <key>On Init</key> <true/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> </array> <key>Perform Reset</key> <false/> <key>Send Delay</key> <integer>10</integer> <key>Sleep Nodes</key> <false/> </dict> <key>Realtek ALC292</key> <dict> <key>Custom Commands</key> <array> <dict> <key>Command</key> <string>0x01a70724</string> <key>Comment</key> <string>Node 0x1a - Pin Control (In Enable / VRefEn)</string> <key>On Init</key> <true/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> <dict> <key>Command</key> <data> AVcIgw== </data> <key>Comment</key> <string>0x15 SET_UNSOLICITED_ENABLE 0x83</string> <key>On Init</key> <true/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> </array> <key>Perform Reset</key> <false/> </dict> <key>Realtek ALC668</key> <dict> <key>Custom Commands</key> <array> <dict> <key>Command</key> <data> AVcIgw== </data> <key>Comment</key> <string>0x15 SET_UNSOLICITED_ENABLE 0x83</string> <key>On Init</key> <true/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> <dict> <key>Command</key> <data> AbcHIA== </data> <key>Comment</key> <string>Node 0x1b - Pin Control (In Enable)</string> <key>On Init</key> <false/> <key>On Sleep</key> <false/> <key>On Wake</key> <true/> </dict> </array> <key>Perform Reset</key> <false/> </dict> <key>Realtek ALC892 desktop</key> <dict> <key>Sleep Nodes</key> <false/> <key>Update Nodes</key> <false/> </dict> </dict> <key>IOClass</key> <string>CodecCommander</string> <key>IOMatchCategory</key> <string>CodecCommander</string> <key>IOProviderClass</key> <string>IOHDACodecFunction</string> <key>IOUserClientClass</key> <string>CodecCommanderClient</string> </dict> <key>CodecCommanderPowerHook</key> <dict> <key>CFBundleIdentifier</key> <string>org.tw.CodecCommander</string> <key>Codec Profile</key> <dict> <key>1002</key> <string>Disabled HDMI</string> <key>10de</key> <string>Disabled HDMI</string> <key>8086</key> <string>Disabled HDMI</string> <key>Disabled HDMI</key> <dict> <key>Disable</key> <true/> </dict> </dict> <key>IOClass</key> <string>CodecCommanderPowerHook</string> <key>IOMatchCategory</key> <string>CodecCommanderPowerHook</string> <key>IOProviderClass</key> <string>AppleHDADriver</string> </dict> <key>CodecCommanderProbeInit</key> <dict> <key>CFBundleIdentifier</key> <string>org.tw.CodecCommander</string> <key>Codec Profile</key> <dict> <key>Default</key> <dict> <key>Custom Commands</key> <array/> </dict> </dict> <key>IOClass</key> <string>CodecCommanderProbeInit</string> <key>IOProbeScore</key> <integer>5000</integer> <key>IOProviderClass</key> <string>IOHDACodecDevice</string> </dict> <key>CodecCommanderResidency</key> <dict> <key>CFBundleIdentifier</key> <string>org.tw.CodecCommander</string> <key>IOClass</key> <string>CodecCommanderResidency</string> <key>IOMatchCategory</key> <string>CodecCommanderResidency</string> <key>IOProviderClass</key> <string>IOResources</string> </dict> <key>CodecCommanderVoodooHDA</key> <dict> <key>CFBundleIdentifier</key> <string>org.tw.CodecCommander</string> <key>Codec Profile</key> <dict> <key>1002</key> <string>Disabled HDMI</string> <key>10de</key> <string>Disabled HDMI</string> <key>8086</key> <string>Disabled HDMI</string> <key>Default</key> <dict> <key>Check Infinitely</key> <false/> <key>Perform Reset</key> <false/> <key>Perform Reset on EAPD Fail</key> <false/> <key>Perform Reset on External Wake</key> <false/> <key>Sleep Nodes</key> <false/> <key>Update Nodes</key> <false/> </dict> <key>Disabled HDMI</key> <dict> <key>Check Infinitely</key> <false/> <key>Disable</key> <true/> <key>Sleep Nodes</key> <false/> <key>Update Nodes</key> <false/> </dict> </dict> <key>IOClass</key> <string>CodecCommander</string> <key>IOMatchCategory</key> <string>CodecCommander</string> <key>IOProviderClass</key> <string>VoodooHDADevice</string> <key>IOUserClientClass</key> <string>CodecCommanderClient</string> </dict> </dict> <key>NSHumanReadableCopyright</key> <string>Copyright © 2013-2014 TimeWalker/RehabMan. All rights reserved.</string> <key>OSBundleLibraries</key> <dict> <key>com.apple.iokit.IOACPIFamily</key> <string>1.0d1</string> <key>com.apple.iokit.IOAudioFamily</key> <string>1.1</string> <key>com.apple.iokit.IOPCIFamily</key> <string>1.0.0b1</string> <key>com.apple.kpi.bsd</key> <string>9.0.0</string> <key>com.apple.kpi.iokit</key> <string>9.0.0</string> <key>com.apple.kpi.libkern</key> <string>9.0.0</string> </dict> <key>Source Code</key> <string>https://github.com/RehabMan/EAPD-Codec-Commander</string> </dict> </plist>
{ "pile_set_name": "Github" }
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!74 &7400000 AnimationClip: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: DefaultCursorWaitingAnim serializedVersion: 6 m_Legacy: 0 m_Compressed: 0 m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: [] m_SampleRate: 60 m_WrapMode: 0 m_Bounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: [] pptrCurveMapping: [] m_AnimationClipSettings: serializedVersion: 2 m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 m_StopTime: 1 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 m_LoopBlendPositionXZ: 0 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 1 m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: []
{ "pile_set_name": "Github" }
/*! * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ .btn-default, .btn-primary, .btn-success, .btn-info, .btn-warning, .btn-danger { text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); } .btn-default:active, .btn-primary:active, .btn-success:active, .btn-info:active, .btn-warning:active, .btn-danger:active, .btn-default.active, .btn-primary.active, .btn-success.active, .btn-info.active, .btn-warning.active, .btn-danger.active { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn-default.disabled, .btn-primary.disabled, .btn-success.disabled, .btn-info.disabled, .btn-warning.disabled, .btn-danger.disabled, .btn-default[disabled], .btn-primary[disabled], .btn-success[disabled], .btn-info[disabled], .btn-warning[disabled], .btn-danger[disabled], fieldset[disabled] .btn-default, fieldset[disabled] .btn-primary, fieldset[disabled] .btn-success, fieldset[disabled] .btn-info, fieldset[disabled] .btn-warning, fieldset[disabled] .btn-danger { -webkit-box-shadow: none; box-shadow: none; } .btn-default .badge, .btn-primary .badge, .btn-success .badge, .btn-info .badge, .btn-warning .badge, .btn-danger .badge { text-shadow: none; } .btn:active, .btn.active { background-image: none; } .btn-default { text-shadow: 0 1px 0 #fff; background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); background-repeat: repeat-x; border-color: #dbdbdb; border-color: #ccc; } .btn-default:hover, .btn-default:focus { background-color: #e0e0e0; background-position: 0 -15px; } .btn-default:active, .btn-default.active { background-color: #e0e0e0; border-color: #dbdbdb; } .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active { background-color: #e0e0e0; background-image: none; } .btn-primary { background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); background-repeat: repeat-x; border-color: #245580; } .btn-primary:hover, .btn-primary:focus { background-color: #265a88; background-position: 0 -15px; } .btn-primary:active, .btn-primary.active { background-color: #265a88; border-color: #245580; } .btn-primary.disabled, .btn-primary[disabled], fieldset[disabled] .btn-primary, .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus, .btn-primary.disabled:active, .btn-primary[disabled]:active, fieldset[disabled] .btn-primary:active, .btn-primary.disabled.active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary.active { background-color: #265a88; background-image: none; } .btn-success { background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); background-repeat: repeat-x; border-color: #3e8f3e; } .btn-success:hover, .btn-success:focus { background-color: #419641; background-position: 0 -15px; } .btn-success:active, .btn-success.active { background-color: #419641; border-color: #3e8f3e; } .btn-success.disabled, .btn-success[disabled], fieldset[disabled] .btn-success, .btn-success.disabled:hover, .btn-success[disabled]:hover, fieldset[disabled] .btn-success:hover, .btn-success.disabled:focus, .btn-success[disabled]:focus, fieldset[disabled] .btn-success:focus, .btn-success.disabled.focus, .btn-success[disabled].focus, fieldset[disabled] .btn-success.focus, .btn-success.disabled:active, .btn-success[disabled]:active, fieldset[disabled] .btn-success:active, .btn-success.disabled.active, .btn-success[disabled].active, fieldset[disabled] .btn-success.active { background-color: #419641; background-image: none; } .btn-info { background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); background-repeat: repeat-x; border-color: #28a4c9; } .btn-info:hover, .btn-info:focus { background-color: #2aabd2; background-position: 0 -15px; } .btn-info:active, .btn-info.active { background-color: #2aabd2; border-color: #28a4c9; } .btn-info.disabled, .btn-info[disabled], fieldset[disabled] .btn-info, .btn-info.disabled:hover, .btn-info[disabled]:hover, fieldset[disabled] .btn-info:hover, .btn-info.disabled:focus, .btn-info[disabled]:focus, fieldset[disabled] .btn-info:focus, .btn-info.disabled.focus, .btn-info[disabled].focus, fieldset[disabled] .btn-info.focus, .btn-info.disabled:active, .btn-info[disabled]:active, fieldset[disabled] .btn-info:active, .btn-info.disabled.active, .btn-info[disabled].active, fieldset[disabled] .btn-info.active { background-color: #2aabd2; background-image: none; } .btn-warning { background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); background-repeat: repeat-x; border-color: #e38d13; } .btn-warning:hover, .btn-warning:focus { background-color: #eb9316; background-position: 0 -15px; } .btn-warning:active, .btn-warning.active { background-color: #eb9316; border-color: #e38d13; } .btn-warning.disabled, .btn-warning[disabled], fieldset[disabled] .btn-warning, .btn-warning.disabled:hover, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning:hover, .btn-warning.disabled:focus, .btn-warning[disabled]:focus, fieldset[disabled] .btn-warning:focus, .btn-warning.disabled.focus, .btn-warning[disabled].focus, fieldset[disabled] .btn-warning.focus, .btn-warning.disabled:active, .btn-warning[disabled]:active, fieldset[disabled] .btn-warning:active, .btn-warning.disabled.active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning.active { background-color: #eb9316; background-image: none; } .btn-danger { background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); background-repeat: repeat-x; border-color: #b92c28; } .btn-danger:hover, .btn-danger:focus { background-color: #c12e2a; background-position: 0 -15px; } .btn-danger:active, .btn-danger.active { background-color: #c12e2a; border-color: #b92c28; } .btn-danger.disabled, .btn-danger[disabled], fieldset[disabled] .btn-danger, .btn-danger.disabled:hover, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger:hover, .btn-danger.disabled:focus, .btn-danger[disabled]:focus, fieldset[disabled] .btn-danger:focus, .btn-danger.disabled.focus, .btn-danger[disabled].focus, fieldset[disabled] .btn-danger.focus, .btn-danger.disabled:active, .btn-danger[disabled]:active, fieldset[disabled] .btn-danger:active, .btn-danger.disabled.active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger.active { background-color: #c12e2a; background-image: none; } .thumbnail, .img-thumbnail { -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); box-shadow: 0 1px 2px rgba(0, 0, 0, .075); } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { background-color: #e8e8e8; background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); background-repeat: repeat-x; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { background-color: #2e6da4; background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); background-repeat: repeat-x; } .navbar-default { background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); background-repeat: repeat-x; border-radius: 4px; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .active > a { background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); background-repeat: repeat-x; -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); } .navbar-brand, .navbar-nav > li > a { text-shadow: 0 1px 0 rgba(255, 255, 255, .25); } .navbar-inverse { background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); background-repeat: repeat-x; border-radius: 4px; } .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .active > a { background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); background-repeat: repeat-x; -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); } .navbar-inverse .navbar-brand, .navbar-inverse .navbar-nav > li > a { text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); } .navbar-static-top, .navbar-fixed-top, .navbar-fixed-bottom { border-radius: 0; } @media (max-width: 767px) { .navbar .navbar-nav .open .dropdown-menu > .active > a, .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { color: #fff; background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); background-repeat: repeat-x; } } .alert { text-shadow: 0 1px 0 rgba(255, 255, 255, .2); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); } .alert-success { background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); background-repeat: repeat-x; border-color: #b2dba1; } .alert-info { background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); background-repeat: repeat-x; border-color: #9acfea; } .alert-warning { background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); background-repeat: repeat-x; border-color: #f5e79e; } .alert-danger { background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); background-repeat: repeat-x; border-color: #dca7a7; } .progress { background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); background-repeat: repeat-x; } .progress-bar { background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); background-repeat: repeat-x; } .progress-bar-success { background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); background-repeat: repeat-x; } .progress-bar-info { background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); background-repeat: repeat-x; } .progress-bar-warning { background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); background-repeat: repeat-x; } .progress-bar-danger { background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); background-repeat: repeat-x; } .progress-bar-striped { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .list-group { border-radius: 4px; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); box-shadow: 0 1px 2px rgba(0, 0, 0, .075); } .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { text-shadow: 0 -1px 0 #286090; background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); background-repeat: repeat-x; border-color: #2b669a; } .list-group-item.active .badge, .list-group-item.active:hover .badge, .list-group-item.active:focus .badge { text-shadow: none; } .panel { -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); } .panel-default > .panel-heading { background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); background-repeat: repeat-x; } .panel-primary > .panel-heading { background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); background-repeat: repeat-x; } .panel-success > .panel-heading { background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); background-repeat: repeat-x; } .panel-info > .panel-heading { background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); background-repeat: repeat-x; } .panel-warning > .panel-heading { background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); background-repeat: repeat-x; } .panel-danger > .panel-heading { background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); background-repeat: repeat-x; } .well { background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); background-repeat: repeat-x; border-color: #dcdcdc; -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); } /*# sourceMappingURL=bootstrap-theme.css.map */
{ "pile_set_name": "Github" }
Require Import Coqlib. Require Import List. Import ListNotations. Require Import Coq.Strings.String. Require Import Coq.Strings.Ascii. Require Import sha.functional_prog. Require Import HMAC256_DRBG_functional_prog. Require Import entropy. Require Import DRBG_state_handle. Require Import DRBG_generate_function. Require Import DRBG_instantiate_function. Require Import DRBG_reseed_function. Require Import sha.ByteBitRelations. Definition stream_dummy (result: string) (n: nat) : option bool := let hex := bytesToBits (hexstring_to_Zlist result) in if nth_ok n hex false then Some (nth n hex false) else None. Definition get_nonce_dummy (result: string) (_: unit) := hexstring_to_Zlist result. Fixpoint DRBG_generate_check (state_handle: DRBG_state_handle) (internal_states: list (string * string * string * string)) (returned_bits: string) := match internal_states with | [] => True | (key, v, additional_input, entropy_input_reseed)::[] => let test_HMAC256_DRBG_reseed_function := HMAC256_DRBG_reseed_function 32 32 256 in let test_HMAC256_DRBG_generate_function := HMAC256_DRBG_generate_function test_HMAC256_DRBG_reseed_function 1024 128 128 in let key := hexstring_to_Zlist key in let value := hexstring_to_Zlist v in let additional_input := hexstring_to_Zlist additional_input in let returned_bits := hexstring_to_Zlist returned_bits in match test_HMAC256_DRBG_generate_function (stream_dummy entropy_input_reseed) state_handle 128 256 true additional_input with | ENTROPY.success (returned_bits', ((value', key', _), _, _)) _ => listZ_eq value value' = true /\ listZ_eq key key' = true /\ listZ_eq returned_bits returned_bits' = true | ENTROPY.error _ _ => False end | (key, v, additional_input, entropy_input_reseed)::tl => let test_HMAC256_DRBG_reseed_function := HMAC256_DRBG_reseed_function 32 32 256 in let test_HMAC256_DRBG_generate_function := HMAC256_DRBG_generate_function test_HMAC256_DRBG_reseed_function 1024 128 128 in let key := hexstring_to_Zlist key in let value := hexstring_to_Zlist v in let additional_input := hexstring_to_Zlist additional_input in match test_HMAC256_DRBG_generate_function (stream_dummy entropy_input_reseed) state_handle 128 256 true additional_input with | ENTROPY.success (_, ((value', key', x), y, z)) _ => listZ_eq value value' = true /\ listZ_eq key key' = true /\ DRBG_generate_check ((value', key', x), y, z) tl returned_bits | ENTROPY.error _ _ => False end end. Definition DRBG_check (entropy_input nonce key value personalization_string: string) (internal_states: list (string * string * string * string)) (returned_bits: string) := let key := hexstring_to_Zlist key in let value := hexstring_to_Zlist value in let personalization_string := hexstring_to_Zlist personalization_string in match HMAC256_DRBG_instantiate_function 32 32 (get_nonce_dummy nonce) 256 256 true (stream_dummy entropy_input) 256 true personalization_string with | ENTROPY.success ((value', key', x), y, z) _ => listZ_eq value value' = true /\ listZ_eq key key' = true /\ DRBG_generate_check ((value', key', x), y, z) internal_states returned_bits | _ => False end. Lemma test0: DRBG_check "9969e54b4703ff31785b879a7e5c0eae0d3e309559e9fe96b0676d49d591ea4d" "07d20d46d064757d3023cac2376127ab" "c2d1fd328b9789a72097325a5623f1b23eed73ed2fdcb477e9a2dd10a96f9d27" "cba657aa552473950ef85a02f228224514c648f01cdb2cd04aa773c25ca836f2" "" [ ("d89d68107440e91a57a841b688ad0fd1fbeb440d26b199bad639280ba809da2e"%string, "df85d42ae075f3560d00a653ecf4dba120a90dc4510245aaf77c799f488df76e"%string, ""%string, "c60f2999100f738c10f74792676a3fc4a262d13721798046e29a295181569f54"%string); ("ee60a512e1383ffef37971a07a9754ceeb5b3d0aa640514e13e2a7359ec7157e"%string, "a964fd634f8f05a22719d37453ede555d6dd8fdf7beccf757e69c6fa782c5f16"%string, ""%string, "c11d4524c9071bd3096015fcf7bc24a607f22fa065c937658a2a77a8699089f4"%string) ] "abc015856094803a938dffd20da94843870ef935b82cfec17706b8f551b8385044235dd44b599f94b39be78dd476e0cf11309c995a7334e0a78b37bc9586235086fa3b637ba91cf8fb65efa22a589c137531aa7b2d4e2607aac27292b01c698e6e01ae679eb87c01a89c7422d4372d6d754ababb4bf896fcb1cd09d692d0283f"%string. vm_compute. repeat (split;auto). Qed. Lemma test_with_personalization0: DRBG_check "f7b90c797a4a376cdd9f5c435f5985e77f36ec1df1145a12072cbb2a0da378fc" "d95202986d45896e9f4a65f2f353fa35" "628f0d947dca7e4171940799bfbc9b61c0ec7c2555a606c75940c37c9432bad0" "2fbafb7afd31927f8f5ee0c4fcdb27c15db4c5dda3d40bc091bfdb782561df85" "61535c5c045e784267fd0d85f2861778fa53c8e8586af67cf5c9f21a28ebb656" [ ("b31f8c3d56139a901abc4dd953c43a3fc65cfcb7647061e4d9e2a7e31206a5f3"%string, "1ef1e9d5d8901b71c4f9cca6c68f320d5493f2fef1c71f5e58c5c83e144822f2"%string, ""%string, "130ab64f41a5d49d6a241e0260b4bb8a46a16c6ac9e234c84b5b26cdb518d459"%string); ("da8e4563d0180619c92b29c3b8dd8f3508df3e8fa844bf331cfb0b1f4205df75"%string, "4fe4168ff2aa97bdc0235b4df3eed8bd377aa3805ff6cd9445efb6e287a71e80"%string, ""%string, "f7670e817ac061ac60439be60982492000dc5da8bc6636bdac8b1cab03198dfd"%string) ] "8df4e349f9ea43cc509ecb2b1124358cda2de1f5cc9315edca63610a413478d68b8bb49c2814c82ce571f6e0a6780fa21c4b570610ee0c04d3edb92124f580f962d741330200c19885ca716502223247b728d66fbbeb7c6cc25cfe9866b1450b346227c7663074c8b15d189f1c6edba172a53c733d67c1c69bd7aca7e62013cd"%string. vm_compute. repeat (split;auto). Qed. Lemma test_with_additional_input0: DRBG_check "2cad88b2b6a06e703de46185ccb2ddcf5e0ee030995ebdf95cc4fbc38441f17f" "32310770e04172c0cf91f6590cce44a4" "bef6a1ebb29164bc4d7ae6ca2d5a02d619b91dd0d88147e7e87454898ce99338" "6f78b5982fef43f09bd7096ecc3aa02a5c3a4dbf71e17341ff3814bbc5dcddd2" "" [ ("bc4186dc24c4b64d8c094c79c7605ae9a3ce6a9e6cdb071a766897c8df302e4c"%string, "5f1aa99b991e37d7ffa7e6779d36b8295976a26ff13efaf72fe90f30a2d16aff"%string, "ef6da5e6530e0d621749ab192e06327e995c3ac0c3963ab8c8cd2df2839ab5df"%string, "448bfbc5ce9e3b9da3e9642daecd994dfe373e75253e8eb585141224eca7ad7b"%string); ("2afc9c4d27f850d0f982499199af67d0c20d324ebf9260fb021d377861ef257e"%string, "c5beeb04e4bfae254053c26d1ef0ff637da4873e7488fc08ab5660142a6311ae"%string, "44278b31ed853f0a510bd14650ac4b4971d8b426799a43511d016be68dedbb8d"%string, "afb57f69799c0b892b3015990e133698d543aa87829ace868e4a5e9525d62357"%string) ] "4c7dfbe509dc5a3ac26998723c6a44cad20b197fc86117c778d1568ab828923862885e97198f77a1cb45113f5d78726a0f120aec94afc45f57c8dcc1cb092b343480012858ef5bc559f57023442209326ec4a54d91ca3a77dfdf9e75f117cef50e6fd2dc9af6ddce8e6515b4a97357a97b6cd274f68a042fa41bbd7b7261b034"%string. vm_compute. repeat (split;auto). Qed. Lemma test_with_additional_input_and_personalization0: DRBG_check "4294671d493dc085b5184607d7de2ff2b6aceb734a1b026f6cfee7c5a90f03da" "d071544e599235d5eb38b64b551d2a6e" "3ab4e27f331bf194cec5762baf84b7fb16e7cf81d69635c48b96febdfb809c18" "7a232bc40bdd9c92ddaffbe76aa322ba1a47234d227060d8ac187e680780c02a" "63bc769ae1d95a98bde870e4db7776297041d37c8a5c688d4e024b78d83f4d78" [ ("6acd0c98e1f7340bd7ab4a594960b63357bd19b99471cc8ea34817af77259880"%string, "db7c92e4c55c43b370b81a6024f0e14675a86c9667412b10ce5d1ea76259c1e4"%string, "28848becd3f47696f124f4b14853a456156f69be583a7d4682cff8d44b39e1d3"%string, "db9b4790b62336fbb9a684b82947065393eeef8f57bd2477141ad17e776dac34"%string); ("2bcafedb81361b2cf44555d3739fdff9dcd6315dd861bb640e812ddcb26045a5"%string, "48e842ba5cb7784211bdc0c19eedec0e23cdfa6c81ad56a7e993eee15a604e2e"%string, "8bfce0b7132661c3cd78175d83926f643e36f7608eec2c5dac3ddcbacc8c2182"%string, "4a9abe80f6f522f29878bedf8245b27940a76471006fb4a4110beb4decb6c341"%string) ] "e580dc969194b2b18a97478aef9d1a72390aff14562747bf080d741527a6655ce7fc135325b457483a9f9c70f91165a811cf4524b50d51199a0df3bd60d12abac27d0bf6618e6b114e05420352e23f3603dfe8a225dc19b3d1fff1dc245dc6b1df24c741744bec3f9437dbbf222df84881a457a589e7815ef132f686b760f012"%string. vm_compute. repeat (split;auto). Qed.
{ "pile_set_name": "Github" }
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import sys #sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages') import os import datetime from timeit import time import warnings import cv2 import numpy as np import argparse from PIL import Image from yolo import YOLO from deep_sort import preprocessing from deep_sort import nn_matching from deep_sort.detection import Detection from deep_sort.tracker import Tracker from tools import generate_detections as gdet from deep_sort.detection import Detection as ddet from collections import deque from keras import backend import tensorflow as tf from tensorflow.compat.v1 import InteractiveSession config = tf.ConfigProto() config.gpu_options.allow_growth = True session = InteractiveSession(config=config) ap = argparse.ArgumentParser() ap.add_argument("-i", "--input",help="path to input video", default = "./test_video/TownCentreXVID.avi") ap.add_argument("-c", "--class",help="name of class", default = "person") args = vars(ap.parse_args()) pts = [deque(maxlen=30) for _ in range(9999)] warnings.filterwarnings('ignore') # initialize a list of colors to represent each possible class label np.random.seed(100) COLORS = np.random.randint(0, 255, size=(200, 3), dtype="uint8") #list = [[] for _ in range(100)] def main(yolo): start = time.time() max_cosine_distance = 0.3 nn_budget = None nms_max_overlap = 1.0 counter = [] #deep_sort model_filename = 'model_data/market1501.pb' encoder = gdet.create_box_encoder(model_filename,batch_size=1) find_objects = ['person'] metric = nn_matching.NearestNeighborDistanceMetric("cosine", max_cosine_distance, nn_budget) tracker = Tracker(metric) writeVideo_flag = True video_capture = cv2.VideoCapture(args["input"]) if writeVideo_flag: # Define the codec and create VideoWriter object w = int(video_capture.get(3)) h = int(video_capture.get(4)) fourcc = cv2.VideoWriter_fourcc(*'MJPG') out = cv2.VideoWriter('./output/output.avi', fourcc, 15, (w, h)) list_file = open('detection_rslt.txt', 'w') frame_index = -1 fps = 0.0 while True: ret, frame = video_capture.read() # frame shape 640*480*3 if ret != True: break t1 = time.time() #image = Image.fromarray(frame) image = Image.fromarray(frame[...,::-1]) #bgr to rgb boxs, confidence, class_names = yolo.detect_image(image) features = encoder(frame,boxs) # score to 1.0 here). detections = [Detection(bbox, 1.0, feature) for bbox, feature in zip(boxs, features)] # Run non-maxima suppression. boxes = np.array([d.tlwh for d in detections]) scores = np.array([d.confidence for d in detections]) indices = preprocessing.non_max_suppression(boxes, nms_max_overlap, scores) detections = [detections[i] for i in indices] # Call the tracker tracker.predict() tracker.update(detections) i = int(0) indexIDs = [] c = [] boxes = [] for det in detections: bbox = det.to_tlbr() cv2.rectangle(frame,(int(bbox[0]), int(bbox[1])), (int(bbox[2]), int(bbox[3])),(255,255,255), 2) #print(class_names) #print(class_names[p]) for track in tracker.tracks: if not track.is_confirmed() or track.time_since_update > 1: continue #boxes.append([track[0], track[1], track[2], track[3]]) indexIDs.append(int(track.track_id)) counter.append(int(track.track_id)) bbox = track.to_tlbr() color = [int(c) for c in COLORS[indexIDs[i] % len(COLORS)]] #print(frame_index) list_file.write(str(frame_index)+',') list_file.write(str(track.track_id)+',') cv2.rectangle(frame, (int(bbox[0]), int(bbox[1])), (int(bbox[2]), int(bbox[3])),(color), 3) b0 = str(bbox[0])#.split('.')[0] + '.' + str(bbox[0]).split('.')[0][:1] b1 = str(bbox[1])#.split('.')[0] + '.' + str(bbox[1]).split('.')[0][:1] b2 = str(bbox[2]-bbox[0])#.split('.')[0] + '.' + str(bbox[3]).split('.')[0][:1] b3 = str(bbox[3]-bbox[1]) list_file.write(str(b0) + ','+str(b1) + ','+str(b2) + ','+str(b3)) #print(str(track.track_id)) list_file.write('\n') #list_file.write(str(track.track_id)+',') cv2.putText(frame,str(track.track_id),(int(bbox[0]), int(bbox[1] -50)),0, 5e-3 * 150, (color),2) if len(class_names) > 0: class_name = class_names[0] cv2.putText(frame, str(class_names[0]),(int(bbox[0]), int(bbox[1] -20)),0, 5e-3 * 150, (color),2) i += 1 #bbox_center_point(x,y) center = (int(((bbox[0])+(bbox[2]))/2),int(((bbox[1])+(bbox[3]))/2)) #track_id[center] pts[track.track_id].append(center) thickness = 5 #center point cv2.circle(frame, (center), 1, color, thickness) # draw motion path for j in range(1, len(pts[track.track_id])): if pts[track.track_id][j - 1] is None or pts[track.track_id][j] is None: continue thickness = int(np.sqrt(64 / float(j + 1)) * 2) cv2.line(frame,(pts[track.track_id][j-1]), (pts[track.track_id][j]),(color),thickness) #cv2.putText(frame, str(class_names[j]),(int(bbox[0]), int(bbox[1] -20)),0, 5e-3 * 150, (255,255,255),2) count = len(set(counter)) cv2.putText(frame, "Total Pedestrian Counter: "+str(count),(int(20), int(120)),0, 5e-3 * 200, (0,255,0),2) cv2.putText(frame, "Current Pedestrian Counter: "+str(i),(int(20), int(80)),0, 5e-3 * 200, (0,255,0),2) cv2.putText(frame, "FPS: %f"%(fps),(int(20), int(40)),0, 5e-3 * 200, (0,255,0),3) cv2.namedWindow("YOLO4_Deep_SORT", 0); cv2.resizeWindow('YOLO4_Deep_SORT', 1024, 768); cv2.imshow('YOLO4_Deep_SORT', frame) if writeVideo_flag: # save a frame out.write(frame) frame_index = frame_index + 1 fps = ( fps + (1./(time.time()-t1)) ) / 2 out.write(frame) frame_index = frame_index + 1 # Press Q to stop! if cv2.waitKey(1) & 0xFF == ord('q'): break print(" ") print("[Finish]") end = time.time() if len(pts[track.track_id]) != None: print(args["input"][43:57]+": "+ str(count) + " " + str(class_name) +' Found') else: print("[No Found]") #print("[INFO]: model_image_size = (960, 960)") video_capture.release() if writeVideo_flag: out.release() list_file.close() cv2.destroyAllWindows() if __name__ == '__main__': main(YOLO())
{ "pile_set_name": "Github" }
<html> <head> <style> //input#time { border:1px solid black; } //input#time:focus { border:1px solid red; } /*input#time > caption > span.hour { border:1px solid black; } input#time > caption > span.minute { border:1px solid blue; } input#time > caption > span.second { border:1px solid green; } input#time > caption > span.ampm { border:1px solid red; }*/ /* button { display: block; } */ </style> <script type="text/tiscript"> </script> </head> <body> <h1>Time input</h1> Time: <input type="time" id="time" value="now" /> </body> </html>
{ "pile_set_name": "Github" }
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 9d1de2691495b304e9843ac3335b626d, type: 3} m_Name: head_beaniedurathread m_EditorClassIdentifier: Variance: - Frames: - sprite: {fileID: 21300000, guid: 4c2af8e6932e20f469880a287e4a9c83, type: 3} secondDelay: 0 - Frames: - sprite: {fileID: 21300002, guid: 4c2af8e6932e20f469880a287e4a9c83, type: 3} secondDelay: 0 - Frames: - sprite: {fileID: 21300004, guid: 4c2af8e6932e20f469880a287e4a9c83, type: 3} secondDelay: 0 - Frames: - sprite: {fileID: 21300006, guid: 4c2af8e6932e20f469880a287e4a9c83, type: 3} secondDelay: 0 IsPalette: 0 setID: 20166
{ "pile_set_name": "Github" }
# Translation of Odoo Server. # This file contains the translation of the following modules: # * base_gengo # # Translators: # William Surya Permana <[email protected]>, 2019 # Martin Trigaux, 2019 # Wahyu Setiawan <[email protected]>, 2019 # oon arfiandwi <[email protected]>, 2019 # Dedi Santoso <[email protected]>, 2019 # Bonny Useful <[email protected]>, 2019 # Ryanto The <[email protected]>, 2019 # PAS IRVANUS <[email protected]>, 2019 # msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-11-22 08:19+0000\n" "PO-Revision-Date: 2019-08-26 09:09+0000\n" "Last-Translator: PAS IRVANUS <[email protected]>, 2019\n" "Language-Team: Indonesian (https://www.transifex.com/odoo/teams/41243/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Language: id\n" "Plural-Forms: nplurals=1; plural=0;\n" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.base_gengo_translation_wizard_from msgid "" "<span class=\"o_form_label\">Gengo Public or Private keys are wrong or " "missing.</span>" msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.view_ir_translation_inherit_base_gengo_form msgid "" "<span class=\"o_form_label\">Note: If the translation state is 'In " "Progress', it means that the translation has to be approved to be uploaded " "in this system. You are supposed to do that directly by using your Gengo " "Account</span>" msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.res_config_settings_view_form msgid "Add Gengo login Private Key..." msgstr "Tambah Gengo login Private Key..." #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.res_config_settings_view_form msgid "Add Gengo login Public Key..." msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.res_config_settings_view_form msgid "Add your comments here for translator...." msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.res_config_settings_view_form msgid "Auto Approve Translation" msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_res_company__gengo_auto_approve #: model:ir.model.fields,field_description:base_gengo.field_res_config_settings__gengo_auto_approve msgid "Auto Approve Translation ?" msgstr "" #. module: base_gengo #: model:ir.model,name:base_gengo.model_base_gengo_translations msgid "Base Gengo Translations" msgstr "" #. module: base_gengo #: model:ir.model.fields.selection,name:base_gengo.selection__base_gengo_translations__sync_type__both msgid "Both" msgstr "Dua-duanya" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.base_gengo_translation_wizard_from msgid "Cancel" msgstr "Batalkan" #. module: base_gengo #: model:ir.model.fields,help:base_gengo.field_res_company__gengo_sandbox #: model:ir.model.fields,help:base_gengo.field_res_config_settings__gengo_sandbox msgid "" "Check this box if you're using the sandbox mode of Gengo, mainly used for " "testing purpose." msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.base_gengo_translation_wizard_from msgid "Click here to Configure Gengo Parameters" msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.res_config_settings_view_form msgid "Comment" msgstr "Komentar" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_res_company__gengo_comment #: model:ir.model.fields,field_description:base_gengo.field_res_config_settings__gengo_comment msgid "Comments" msgstr "Komentar" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_ir_translation__gengo_comment msgid "Comments & Activity Linked to Gengo" msgstr "" #. module: base_gengo #: model:ir.model,name:base_gengo.model_res_company msgid "Companies" msgstr "Perusahaan" #. module: base_gengo #: model:ir.model,name:base_gengo.model_res_config_settings msgid "Config Settings" msgstr "Config Settings" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__create_uid msgid "Created by" msgstr "Dibuat oleh" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__create_date msgid "Created on" msgstr "Dibuat pada" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__display_name msgid "Display Name" msgstr "Nama Tampilan" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.view_ir_translation_inherit_base_gengo_form msgid "Gengo Comments & Activity..." msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_ir_translation__order_id msgid "Gengo Order ID" msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_res_company__gengo_private_key #: model:ir.model.fields,field_description:base_gengo.field_res_config_settings__gengo_private_key msgid "Gengo Private Key" msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_res_company__gengo_public_key #: model:ir.model.fields,field_description:base_gengo.field_res_config_settings__gengo_public_key msgid "Gengo Public Key" msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.base_gengo_translation_wizard_from msgid "Gengo Request Form" msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.view_ir_translation_inherit_base_gengo_form msgid "Gengo Translation Service" msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_ir_translation__gengo_translation msgid "Gengo Translation Service Level" msgstr "" #. module: base_gengo #: code:addons/base_gengo/wizard/base_gengo_translations.py:0 #, python-format msgid "" "Gengo `Public Key` or `Private Key` are missing. Enter your Gengo " "authentication parameters under `Settings > Companies > Gengo Parameters`." msgstr "" #. module: base_gengo #: code:addons/base_gengo/wizard/base_gengo_translations.py:0 #, python-format msgid "" "Gengo connection failed with this message:\n" "``%s``" msgstr "" #. module: base_gengo #: code:addons/base_gengo/wizard/base_gengo_translations.py:0 #, python-format msgid "" "Gengo library not installed. Contact your system administrator to use it." msgstr "" #. module: base_gengo #: model:ir.actions.act_window,name:base_gengo.action_wizard_base_gengo_translations #: model:ir.ui.menu,name:base_gengo.menu_action_wizard_base_gengo_translations msgid "Gengo: Manual Request of Translation" msgstr "" #. module: base_gengo #: model:ir.actions.server,name:base_gengo.gengo_sync_send_request_scheduler_ir_actions_server #: model:ir.cron,cron_name:base_gengo.gengo_sync_send_request_scheduler #: model:ir.cron,name:base_gengo.gengo_sync_send_request_scheduler msgid "Gengo: Sync translation (Request)" msgstr "" #. module: base_gengo #: model:ir.actions.server,name:base_gengo.gengo_sync_receive_request_scheduler_ir_actions_server #: model:ir.cron,cron_name:base_gengo.gengo_sync_receive_request_scheduler #: model:ir.cron,name:base_gengo.gengo_sync_receive_request_scheduler msgid "Gengo: Sync translation (Response)" msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__id msgid "ID" msgstr "ID" #. module: base_gengo #: model:ir.model.fields,help:base_gengo.field_res_company__gengo_auto_approve #: model:ir.model.fields,help:base_gengo.field_res_config_settings__gengo_auto_approve msgid "Jobs are Automatically Approved by Gengo." msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__lang_id msgid "Language" msgstr "Bahasa" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations____last_update msgid "Last Modified on" msgstr "Terakhir Diubah Pada" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__write_uid msgid "Last Updated by" msgstr "Terakhir Diperbarui oleh" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__write_date msgid "Last Updated on" msgstr "Terakhir Diperbarui pada" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__sync_limit msgid "No. of terms to sync" msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.res_config_settings_view_form msgid "Private Key" msgstr "" #. module: base_gengo #: model:ir.model.fields.selection,name:base_gengo.selection__ir_translation__gengo_translation__pro msgid "Pro" msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.res_config_settings_view_form msgid "Public Key" msgstr "" #. module: base_gengo #: model:ir.model.fields.selection,name:base_gengo.selection__base_gengo_translations__sync_type__receive msgid "Receive Translation" msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_res_company__gengo_sandbox #: model:ir.model.fields,field_description:base_gengo.field_res_config_settings__gengo_sandbox #: model_terms:ir.ui.view,arch_db:base_gengo.res_config_settings_view_form msgid "Sandbox Mode" msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.base_gengo_translation_wizard_from msgid "Send" msgstr "Kirim" #. module: base_gengo #: model:ir.model.fields.selection,name:base_gengo.selection__base_gengo_translations__sync_type__send msgid "Send New Terms" msgstr "" #. module: base_gengo #: model:ir.model.fields.selection,name:base_gengo.selection__ir_translation__gengo_translation__standard msgid "Standard" msgstr "Standar" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__sync_type msgid "Sync Type" msgstr "" #. module: base_gengo #: code:addons/base_gengo/wizard/base_gengo_translations.py:0 #, python-format msgid "" "The number of terms to sync should be between 1 to 200 to work with Gengo " "translation services." msgstr "" #. module: base_gengo #: model:ir.model.fields,field_description:base_gengo.field_base_gengo_translations__authorized_credentials msgid "The private and public keys are valid" msgstr "" #. module: base_gengo #: model:ir.model.fields,help:base_gengo.field_res_company__gengo_comment #: model:ir.model.fields,help:base_gengo.field_res_config_settings__gengo_comment msgid "" "This comment will be automatically be enclosed in each an every request sent" " to Gengo" msgstr "" #. module: base_gengo #: code:addons/base_gengo/wizard/base_gengo_translations.py:0 #, python-format msgid "This language is not supported by the Gengo translation services." msgstr "" #. module: base_gengo #: model_terms:ir.ui.view,arch_db:base_gengo.view_translation_search msgid "To Approve In Gengo" msgstr "" #. module: base_gengo #: model:ir.model,name:base_gengo.model_ir_translation msgid "Translation" msgstr "Terjemahan" #. module: base_gengo #: model:ir.model.fields.selection,name:base_gengo.selection__ir_translation__gengo_translation__machine msgid "Translation By Machine" msgstr "" #. module: base_gengo #: model:ir.model.fields.selection,name:base_gengo.selection__ir_translation__gengo_translation__ultra msgid "Ultra" msgstr "" #. module: base_gengo #: model:ir.model.fields,help:base_gengo.field_ir_translation__gengo_translation msgid "" "You can select here the service level you want for an automatic translation " "using Gengo." msgstr ""
{ "pile_set_name": "Github" }
/* cx25840 audio functions * * 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 useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <linux/videodev2.h> #include <linux/i2c.h> #include <media/v4l2-common.h> #include <media/cx25840.h> #include "cx25840-core.h" /* * Note: The PLL and SRC parameters are based on a reference frequency that * would ideally be: * * NTSC Color subcarrier freq * 8 = 4.5 MHz/286 * 455/2 * 8 = 28.63636363... MHz * * However, it's not the exact reference frequency that matters, only that the * firmware and modules that comprise the driver for a particular board all * use the same value (close to the ideal value). * * Comments below will note which reference frequency is assumed for various * parameters. They will usually be one of * * ref_freq = 28.636360 MHz * or * ref_freq = 28.636363 MHz */ static int cx25840_set_audclk_freq(struct i2c_client *client, u32 freq) { struct cx25840_state *state = to_state(i2c_get_clientdata(client)); if (state->aud_input != CX25840_AUDIO_SERIAL) { switch (freq) { case 32000: /* * VID_PLL Integer = 0x0f, VID_PLL Post Divider = 0x04 * AUX_PLL Integer = 0x06, AUX PLL Post Divider = 0x10 */ cx25840_write4(client, 0x108, 0x1006040f); /* * VID_PLL Fraction (register 0x10c) = 0x2be2fe * 28636360 * 0xf.15f17f0/4 = 108 MHz * 432 MHz pre-postdivide */ cx25840_write4(client, 0x110, 0x01bb39ee); /* * SA_MCLK_SEL = 1 * SA_MCLK_DIV = 0x10 = 384/384 * AUX_PLL post dvivider */ cx25840_write(client, 0x127, 0x50); if (is_cx2583x(state)) break; /* src3/4/6_ctl */ /* 0x1.f77f = (4 * 28636360/8 * 2/455) / 32000 */ cx25840_write4(client, 0x900, 0x0801f77f); cx25840_write4(client, 0x904, 0x0801f77f); cx25840_write4(client, 0x90c, 0x0801f77f); break; case 44100: /* * VID_PLL Integer = 0x0f, VID_PLL Post Divider = 0x04 * AUX_PLL Integer = 0x09, AUX PLL Post Divider = 0x10 */ cx25840_write4(client, 0x108, 0x1009040f); /* * VID_PLL Fraction (register 0x10c) = 0x2be2fe * 28636360 * 0xf.15f17f0/4 = 108 MHz * 432 MHz pre-postdivide */ cx25840_write4(client, 0x110, 0x00ec6bd6); /* * SA_MCLK_SEL = 1 * SA_MCLK_DIV = 0x10 = 384/384 * AUX_PLL post dvivider */ cx25840_write(client, 0x127, 0x50); if (is_cx2583x(state)) break; /* src3/4/6_ctl */ /* 0x1.6d59 = (4 * 28636360/8 * 2/455) / 44100 */ cx25840_write4(client, 0x900, 0x08016d59); cx25840_write4(client, 0x904, 0x08016d59); cx25840_write4(client, 0x90c, 0x08016d59); break; case 48000: /* * VID_PLL Integer = 0x0f, VID_PLL Post Divider = 0x04 * AUX_PLL Integer = 0x0a, AUX PLL Post Divider = 0x10 */ cx25840_write4(client, 0x108, 0x100a040f); /* * VID_PLL Fraction (register 0x10c) = 0x2be2fe * 28636360 * 0xf.15f17f0/4 = 108 MHz * 432 MHz pre-postdivide */ cx25840_write4(client, 0x110, 0x0098d6e5); /* * SA_MCLK_SEL = 1 * SA_MCLK_DIV = 0x10 = 384/384 * AUX_PLL post dvivider */ cx25840_write(client, 0x127, 0x50); if (is_cx2583x(state)) break; /* src3/4/6_ctl */ /* 0x1.4faa = (4 * 28636360/8 * 2/455) / 48000 */ cx25840_write4(client, 0x900, 0x08014faa); cx25840_write4(client, 0x904, 0x08014faa); cx25840_write4(client, 0x90c, 0x08014faa); break; } } else { switch (freq) { case 32000: /* * VID_PLL Integer = 0x0f, VID_PLL Post Divider = 0x04 * AUX_PLL Integer = 0x08, AUX PLL Post Divider = 0x1e */ cx25840_write4(client, 0x108, 0x1e08040f); /* * VID_PLL Fraction (register 0x10c) = 0x2be2fe * 28636360 * 0xf.15f17f0/4 = 108 MHz * 432 MHz pre-postdivide */ cx25840_write4(client, 0x110, 0x012a0869); /* * SA_MCLK_SEL = 1 * SA_MCLK_DIV = 0x14 = 256/384 * AUX_PLL post dvivider */ cx25840_write(client, 0x127, 0x54); if (is_cx2583x(state)) break; /* src1_ctl */ /* 0x1.0000 = 32000/32000 */ cx25840_write4(client, 0x8f8, 0x08010000); /* src3/4/6_ctl */ /* 0x2.0000 = 2 * (32000/32000) */ cx25840_write4(client, 0x900, 0x08020000); cx25840_write4(client, 0x904, 0x08020000); cx25840_write4(client, 0x90c, 0x08020000); break; case 44100: /* * VID_PLL Integer = 0x0f, VID_PLL Post Divider = 0x04 * AUX_PLL Integer = 0x09, AUX PLL Post Divider = 0x18 */ cx25840_write4(client, 0x108, 0x1809040f); /* * VID_PLL Fraction (register 0x10c) = 0x2be2fe * 28636360 * 0xf.15f17f0/4 = 108 MHz * 432 MHz pre-postdivide */ cx25840_write4(client, 0x110, 0x00ec6bd6); /* * SA_MCLK_SEL = 1 * SA_MCLK_DIV = 0x10 = 256/384 * AUX_PLL post dvivider */ cx25840_write(client, 0x127, 0x50); if (is_cx2583x(state)) break; /* src1_ctl */ /* 0x1.60cd = 44100/32000 */ cx25840_write4(client, 0x8f8, 0x080160cd); /* src3/4/6_ctl */ /* 0x1.7385 = 2 * (32000/44100) */ cx25840_write4(client, 0x900, 0x08017385); cx25840_write4(client, 0x904, 0x08017385); cx25840_write4(client, 0x90c, 0x08017385); break; case 48000: /* * VID_PLL Integer = 0x0f, VID_PLL Post Divider = 0x04 * AUX_PLL Integer = 0x0a, AUX PLL Post Divider = 0x18 */ cx25840_write4(client, 0x108, 0x180a040f); /* * VID_PLL Fraction (register 0x10c) = 0x2be2fe * 28636360 * 0xf.15f17f0/4 = 108 MHz * 432 MHz pre-postdivide */ cx25840_write4(client, 0x110, 0x0098d6e5); /* * SA_MCLK_SEL = 1 * SA_MCLK_DIV = 0x10 = 256/384 * AUX_PLL post dvivider */ cx25840_write(client, 0x127, 0x50); if (is_cx2583x(state)) break; /* src1_ctl */ /* 0x1.8000 = 48000/32000 */ cx25840_write4(client, 0x8f8, 0x08018000); /* src3/4/6_ctl */ /* 0x1.5555 = 2 * (32000/48000) */ cx25840_write4(client, 0x900, 0x08015555); cx25840_write4(client, 0x904, 0x08015555); cx25840_write4(client, 0x90c, 0x08015555); break; } } state->audclk_freq = freq; return 0; } static inline int cx25836_set_audclk_freq(struct i2c_client *client, u32 freq) { return cx25840_set_audclk_freq(client, freq); } static int cx23885_set_audclk_freq(struct i2c_client *client, u32 freq) { struct cx25840_state *state = to_state(i2c_get_clientdata(client)); if (state->aud_input != CX25840_AUDIO_SERIAL) { switch (freq) { case 32000: case 44100: case 48000: /* We don't have register values * so avoid destroying registers. */ break; } } else { switch (freq) { case 32000: case 44100: /* We don't have register values * so avoid destroying registers. */ break; case 48000: /* src1_ctl */ /* 0x1.867c = 48000 / (2 * 28636360/8 * 2/455) */ cx25840_write4(client, 0x8f8, 0x0801867c); /* src3/4/6_ctl */ /* 0x1.4faa = (4 * 28636360/8 * 2/455) / 48000 */ cx25840_write4(client, 0x900, 0x08014faa); cx25840_write4(client, 0x904, 0x08014faa); cx25840_write4(client, 0x90c, 0x08014faa); break; } } state->audclk_freq = freq; return 0; } static int cx231xx_set_audclk_freq(struct i2c_client *client, u32 freq) { struct cx25840_state *state = to_state(i2c_get_clientdata(client)); if (state->aud_input != CX25840_AUDIO_SERIAL) { switch (freq) { case 32000: /* src3/4/6_ctl */ /* 0x1.f77f = (4 * 28636360/8 * 2/455) / 32000 */ cx25840_write4(client, 0x900, 0x0801f77f); cx25840_write4(client, 0x904, 0x0801f77f); cx25840_write4(client, 0x90c, 0x0801f77f); break; case 44100: /* src3/4/6_ctl */ /* 0x1.6d59 = (4 * 28636360/8 * 2/455) / 44100 */ cx25840_write4(client, 0x900, 0x08016d59); cx25840_write4(client, 0x904, 0x08016d59); cx25840_write4(client, 0x90c, 0x08016d59); break; case 48000: /* src3/4/6_ctl */ /* 0x1.4faa = (4 * 28636360/8 * 2/455) / 48000 */ cx25840_write4(client, 0x900, 0x08014faa); cx25840_write4(client, 0x904, 0x08014faa); cx25840_write4(client, 0x90c, 0x08014faa); break; } } else { switch (freq) { case 32000: /* src1_ctl */ /* 0x1.0000 = 32000/32000 */ cx25840_write4(client, 0x8f8, 0x08010000); /* src3/4/6_ctl */ /* 0x2.0000 = 2 * (32000/32000) */ cx25840_write4(client, 0x900, 0x08020000); cx25840_write4(client, 0x904, 0x08020000); cx25840_write4(client, 0x90c, 0x08020000); break; case 44100: /* src1_ctl */ /* 0x1.60cd = 44100/32000 */ cx25840_write4(client, 0x8f8, 0x080160cd); /* src3/4/6_ctl */ /* 0x1.7385 = 2 * (32000/44100) */ cx25840_write4(client, 0x900, 0x08017385); cx25840_write4(client, 0x904, 0x08017385); cx25840_write4(client, 0x90c, 0x08017385); break; case 48000: /* src1_ctl */ /* 0x1.867c = 48000 / (2 * 28636360/8 * 2/455) */ cx25840_write4(client, 0x8f8, 0x0801867c); /* src3/4/6_ctl */ /* 0x1.4faa = (4 * 28636360/8 * 2/455) / 48000 */ cx25840_write4(client, 0x900, 0x08014faa); cx25840_write4(client, 0x904, 0x08014faa); cx25840_write4(client, 0x90c, 0x08014faa); break; } } state->audclk_freq = freq; return 0; } static int set_audclk_freq(struct i2c_client *client, u32 freq) { struct cx25840_state *state = to_state(i2c_get_clientdata(client)); if (freq != 32000 && freq != 44100 && freq != 48000) return -EINVAL; if (is_cx231xx(state)) return cx231xx_set_audclk_freq(client, freq); if (is_cx2388x(state)) return cx23885_set_audclk_freq(client, freq); if (is_cx2583x(state)) return cx25836_set_audclk_freq(client, freq); return cx25840_set_audclk_freq(client, freq); } void cx25840_audio_set_path(struct i2c_client *client) { struct cx25840_state *state = to_state(i2c_get_clientdata(client)); /* assert soft reset */ cx25840_and_or(client, 0x810, ~0x1, 0x01); /* stop microcontroller */ cx25840_and_or(client, 0x803, ~0x10, 0); /* Mute everything to prevent the PFFT! */ cx25840_write(client, 0x8d3, 0x1f); if (state->aud_input == CX25840_AUDIO_SERIAL) { /* Set Path1 to Serial Audio Input */ cx25840_write4(client, 0x8d0, 0x01011012); /* The microcontroller should not be started for the * non-tuner inputs: autodetection is specific for * TV audio. */ } else { /* Set Path1 to Analog Demod Main Channel */ cx25840_write4(client, 0x8d0, 0x1f063870); } set_audclk_freq(client, state->audclk_freq); if (state->aud_input != CX25840_AUDIO_SERIAL) { /* When the microcontroller detects the * audio format, it will unmute the lines */ cx25840_and_or(client, 0x803, ~0x10, 0x10); } /* deassert soft reset */ cx25840_and_or(client, 0x810, ~0x1, 0x00); /* Ensure the controller is running when we exit */ if (is_cx2388x(state) || is_cx231xx(state)) cx25840_and_or(client, 0x803, ~0x10, 0x10); } static void set_volume(struct i2c_client *client, int volume) { int vol; /* Convert the volume to msp3400 values (0-127) */ vol = volume >> 9; /* now scale it up to cx25840 values * -114dB to -96dB maps to 0 * this should be 19, but in my testing that was 4dB too loud */ if (vol <= 23) { vol = 0; } else { vol -= 23; } /* PATH1_VOLUME */ cx25840_write(client, 0x8d4, 228 - (vol * 2)); } static void set_balance(struct i2c_client *client, int balance) { int bal = balance >> 8; if (bal > 0x80) { /* PATH1_BAL_LEFT */ cx25840_and_or(client, 0x8d5, 0x7f, 0x80); /* PATH1_BAL_LEVEL */ cx25840_and_or(client, 0x8d5, ~0x7f, bal & 0x7f); } else { /* PATH1_BAL_LEFT */ cx25840_and_or(client, 0x8d5, 0x7f, 0x00); /* PATH1_BAL_LEVEL */ cx25840_and_or(client, 0x8d5, ~0x7f, 0x80 - bal); } } int cx25840_s_clock_freq(struct v4l2_subdev *sd, u32 freq) { struct i2c_client *client = v4l2_get_subdevdata(sd); struct cx25840_state *state = to_state(sd); int retval; if (!is_cx2583x(state)) cx25840_and_or(client, 0x810, ~0x1, 1); if (state->aud_input != CX25840_AUDIO_SERIAL) { cx25840_and_or(client, 0x803, ~0x10, 0); cx25840_write(client, 0x8d3, 0x1f); } retval = set_audclk_freq(client, freq); if (state->aud_input != CX25840_AUDIO_SERIAL) cx25840_and_or(client, 0x803, ~0x10, 0x10); if (!is_cx2583x(state)) cx25840_and_or(client, 0x810, ~0x1, 0); return retval; } static int cx25840_audio_s_ctrl(struct v4l2_ctrl *ctrl) { struct v4l2_subdev *sd = to_sd(ctrl); struct cx25840_state *state = to_state(sd); struct i2c_client *client = v4l2_get_subdevdata(sd); switch (ctrl->id) { case V4L2_CID_AUDIO_VOLUME: if (state->mute->val) set_volume(client, 0); else set_volume(client, state->volume->val); break; case V4L2_CID_AUDIO_BASS: /* PATH1_EQ_BASS_VOL */ cx25840_and_or(client, 0x8d9, ~0x3f, 48 - (ctrl->val * 48 / 0xffff)); break; case V4L2_CID_AUDIO_TREBLE: /* PATH1_EQ_TREBLE_VOL */ cx25840_and_or(client, 0x8db, ~0x3f, 48 - (ctrl->val * 48 / 0xffff)); break; case V4L2_CID_AUDIO_BALANCE: set_balance(client, ctrl->val); break; default: return -EINVAL; } return 0; } const struct v4l2_ctrl_ops cx25840_audio_ctrl_ops = { .s_ctrl = cx25840_audio_s_ctrl, };
{ "pile_set_name": "Github" }
import UIKit import CoreData import Fabric import Crashlytics @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { Fabric.with([Crashlytics.self]) self.migrateSchemaIfNeeded() self.setDefaultSettings() return true } func applicationDidEnterBackground(_ application: UIApplication) { UIApplication.shared.isIdleTimerDisabled = false } func applicationDidBecomeActive(_ application: UIApplication) { UIApplication.shared.isIdleTimerDisabled = true } func setDefaultSettings() { let defaults = Foundation.UserDefaults.standard if(defaults.object(forKey: "playAudioWhenTimerStops") == nil) { defaults.set(true, forKey: "playAudioWhenTimerStops") } if(defaults.object(forKey: "showRestTimer") == nil) { defaults.set(true, forKey: "showRestTimer") } if(defaults.object(forKey: "showRestTimerAfterWarmup") == nil) { defaults.set(false, forKey: "showRestTimerAfterWarmup") } if(defaults.object(forKey: "showRestTimerAfterBodylineDrills") == nil) { defaults.set(true, forKey: "showRestTimerAfterBodylineDrills") } if(defaults.object(forKey: "showRestTimerAfterFlexibilityExercises") == nil) { defaults.set(false, forKey: "showRestTimerAfterFlexibilityExercises") } } func migrateSchemaIfNeeded() { if (RepositoryStream.sharedInstance.repositoryRoutineForTodayExists()) { let routine = RoutineStream.sharedInstance.routine let currentSchema = RepositoryStream.sharedInstance.getRepositoryRoutineForToday() let (shouldRemoveCurrentSchema, newSchema) = migrateSchemaIfNeeded(routine, currentSchema: currentSchema) if shouldRemoveCurrentSchema { let realm = RepositoryStream.sharedInstance.getRealm() try! realm.write { realm.add(newSchema, update: false) realm.delete(currentSchema) } } } } func migrateSchemaIfNeeded(_ routine: Routine, currentSchema: RepositoryRoutine) -> (Bool, RepositoryRoutine) { if (!isValidSchema(routine, currentSchema: currentSchema)) { let newSchema = RepositoryStream.sharedInstance.buildRoutine(routine) newSchema.startTime = currentSchema.startTime newSchema.lastUpdatedTime = currentSchema.lastUpdatedTime for exercise in newSchema.exercises { if let currentExercise = currentSchema.exercises.filter({ $0.exerciseId == exercise.exerciseId }).first { exercise.sets.removeAll() for set in currentExercise.sets { exercise.sets.append(set) } } } return (true, newSchema) } return (false, currentSchema) } func isValidSchema(_ routine: Routine, currentSchema: RepositoryRoutine) -> Bool { for exercise in routine.exercises { if let exercise = exercise as? Exercise { let containsExercise = currentSchema.exercises.contains(where: { $0.exerciseId == exercise.exerciseId }) if (!containsExercise) { return false } } } return true } }
{ "pile_set_name": "Github" }
/***************************************************************************/ /* */ /* cidparse.h */ /* */ /* CID-keyed Type1 parser (specification). */ /* */ /* Copyright 1996-2016 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef CIDPARSE_H_ #define CIDPARSE_H_ #include <ft2build.h> #include FT_INTERNAL_TYPE1_TYPES_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_POSTSCRIPT_AUX_H FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Struct> */ /* CID_Parser */ /* */ /* <Description> */ /* A CID_Parser is an object used to parse a Type 1 fonts very */ /* quickly. */ /* */ /* <Fields> */ /* root :: The root PS_ParserRec fields. */ /* */ /* stream :: The current input stream. */ /* */ /* postscript :: A pointer to the data to be parsed. */ /* */ /* postscript_len :: The length of the data to be parsed. */ /* */ /* data_offset :: The start position of the binary data (i.e., the */ /* end of the data to be parsed. */ /* */ /* binary_length :: The length of the data after the `StartData' */ /* command if the data format is hexadecimal. */ /* */ /* cid :: A structure which holds the information about */ /* the current font. */ /* */ /* num_dict :: The number of font dictionaries. */ /* */ typedef struct CID_Parser_ { PS_ParserRec root; FT_Stream stream; FT_Byte* postscript; FT_ULong postscript_len; FT_ULong data_offset; FT_ULong binary_length; CID_FaceInfo cid; FT_Int num_dict; } CID_Parser; FT_LOCAL( FT_Error ) cid_parser_new( CID_Parser* parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux ); FT_LOCAL( void ) cid_parser_done( CID_Parser* parser ); /*************************************************************************/ /* */ /* PARSING ROUTINES */ /* */ /*************************************************************************/ #define cid_parser_skip_spaces( p ) \ (p)->root.funcs.skip_spaces( &(p)->root ) #define cid_parser_skip_PS_token( p ) \ (p)->root.funcs.skip_PS_token( &(p)->root ) #define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root ) #define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t ) #define cid_parser_to_coord_array( p, m, c ) \ (p)->root.funcs.to_coord_array( &(p)->root, m, c ) #define cid_parser_to_fixed_array( p, m, f, t ) \ (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t ) #define cid_parser_to_token( p, t ) \ (p)->root.funcs.to_token( &(p)->root, t ) #define cid_parser_to_token_array( p, t, m, c ) \ (p)->root.funcs.to_token_array( &(p)->root, t, m, c ) #define cid_parser_load_field( p, f, o ) \ (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 ) #define cid_parser_load_field_table( p, f, o ) \ (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 ) FT_END_HEADER #endif /* CIDPARSE_H_ */ /* END */
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PreferenceSpecifiers</key> <array> <dict> <key>File</key> <string>Acknowledgements</string> <key>Title</key> <string>Acknowledgements</string> <key>Type</key> <string>PSChildPaneSpecifier</string> </dict> </array> <key>StringsTable</key> <string>Root</string> </dict> </plist>
{ "pile_set_name": "Github" }
 Microsoft Visual Studio Solution File, Format Version 12.00 # Visual C++ Express 2013 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LayeredWindow", "LayeredWindow-vc2013.vcxproj", "{4E27E943-27C7-4F00-A431-B6ACA237766A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4E27E943-27C7-4F00-A431-B6ACA237766A}.Debug|Win32.ActiveCfg = Debug|Win32 {4E27E943-27C7-4F00-A431-B6ACA237766A}.Debug|Win32.Build.0 = Debug|Win32 {4E27E943-27C7-4F00-A431-B6ACA237766A}.Release|Win32.ActiveCfg = Release|Win32 {4E27E943-27C7-4F00-A431-B6ACA237766A}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
{ "pile_set_name": "Github" }
package com.test.sharksharding.use.resource; /* * Copyright 2015-2101 gaoxianglong * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.BufferedReader; import java.io.FileReader; import java.util.HashSet; import java.util.Set; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; import org.junit.BeforeClass; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import redis.clients.jedis.HostAndPort; import redis.clients.jedis.JedisCluster; /** * 向zookeeper配置中心添加数据 * * @author gaoxianglong * * @version 1.3.7 */ public class RedisSetData { private static JedisCluster jedis; private Logger logger = LoggerFactory.getLogger(RedisSetData.class); public @BeforeClass static void init() { GenericObjectPoolConfig cfg = new GenericObjectPoolConfig(); cfg.setMaxIdle(10); cfg.setMinIdle(1); cfg.setMaxIdle(5); cfg.setMaxWaitMillis(5000); cfg.setTestOnBorrow(true); cfg.setTestOnReturn(true); Set<HostAndPort> hostAndPorts = new HashSet<HostAndPort>(); HostAndPort hostAndPort = new HostAndPort("ip", 7000); hostAndPorts.add(hostAndPort); jedis = new JedisCluster(hostAndPorts, cfg); } public @Test void testVersionSetData() { try (BufferedReader reader = new BufferedReader(new FileReader("c:/shark-datasource.xml"))) { StringBuffer str = new StringBuffer(); String value = ""; while (null != (value = reader.readLine())) str.append(value); jedis.set("shark-datasource", "2%@%" + str.toString()); logger.info("insert success"); } catch (Exception e) { logger.error("insert fail", e); } } public @Test void testMd5SetData() { try (BufferedReader reader = new BufferedReader(new FileReader("c:/shark-datasource.xml"))) { StringBuffer str = new StringBuffer(); String value = ""; while (null != (value = reader.readLine())) str.append(value); jedis.set("shark-datasource", str.toString()); logger.info("insert success"); } catch (Exception e) { logger.error("insert fail", e); } } }
{ "pile_set_name": "Github" }
<div class="black"> <div class="container text-center"> <h1>SMOKE</h1> <p class="lead">{{'SLOGAN' | translate}}</p> <p><a class="btn btn-default btn-lg smk-transition1" role="button" href="#getting-started">{{'DOWNLOAD' | translate}} Smoke {{version}}</a></p> </div><!-- /.container --> </div> <div class="white"> <div class="container text-center"> <div class="row"> <p class="lead">{{'FEATURES' | translate}}</p> <hr class="small"> </div> <div class="row"> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> <a class="smk-transition1" href="#validate"> <span class="glyphicon glyphicon-ok"></span> <h3>{{'VALIDATE' | translate}}</h3> </a> </div> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> <a class="smk-transition1" href="#notifications"> <span class="glyphicon glyphicon-bell"></span> <h3>{{'NOTIFICATIONS' | translate}}</h3> </a> </div> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> <a class="smk-transition1" href="#progressbar"> <span class="glyphicon glyphicon-tasks"></span> <h3>{{'PROGRESSBAR' | translate}}</h3> </a> </div> </div> <div class="row"> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> <a class="smk-transition1" href="#fullscreen"> <span class="glyphicon glyphicon-fullscreen"></span> <h3>{{'FULLSCREEN' | translate}}</h3> </a> </div> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> <a class="smk-transition1" href="#panel"> <span class="glyphicon glyphicon-list-alt"></span> <h3>{{'PANEL' | translate}}</h3> </a> </div> <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> <a class="smk-transition1" href="#helpers"> <span class="glyphicon glyphicon-gift"></span> <h3>{{'HELPERS' | translate}}</h3> </a> </div> </div> <div class="row"> <hr class="small"> <p class="lead">Keep It Simple, Stupid!</p> </div> <div class="row"> <hr class="small"> <p class="lead2">{{'GITHUB' | translate}}</p> <p><a class="btn btn-default btn-lg smk-transition1" role="button" href="https://github.com/alfredobarron/smoke" target="_blank" ng-click="github()">{{'VIEW-IN' | translate}} GitHub</a></p> </div> </div> </div>
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Carbon package. * * (c) Brian Nesbitt <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/pl/date.php */ return array( 'year' => '1 rok|:count lata|:count lat', 'month' => '1 miesiąc|:count miesiące|:count miesięcy', 'week' => '1 tydzień|:count tygodnie|:count tygodni', 'day' => '1 dzień|:count dni|:count dni', 'hour' => '1 godzina|:count godziny|:count godzin', 'minute' => '1 minuta|:count minuty|:count minut', 'second' => '1 sekunda|:count sekundy|:count sekund', 'ago' => ':time temu', 'from_now' => ':time od teraz', 'after' => ':time przed', 'before' => ':time po' );
{ "pile_set_name": "Github" }
#! /usr/bin/env perl # Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html # Reads one or more template files and runs it through Text::Template # # It is assumed that this scripts is called with -Mconfigdata, a module # that holds configuration data in %config use strict; use warnings; use FindBin; use Getopt::Std; # We actually expect to get the following hash tables from configdata: # # %config # %target # %withargs # %unified_info # # We just do a minimal test to see that we got what we expected. # $config{target} must exist as an absolute minimum. die "You must run this script with -Mconfigdata\n" if !exists($config{target}); # Make a subclass of Text::Template to override append_text_to_result, # as recommended here: # # http://search.cpan.org/~mjd/Text-Template-1.46/lib/Text/Template.pm#Automatic_postprocessing_of_template_hunks package OpenSSL::Template; # Because we know that Text::Template isn't a core Perl module, we use # a fallback in case it's not installed on the system use File::Basename; use File::Spec::Functions; use lib "$FindBin::Bin/perl"; use with_fallback "Text::Template 1.46"; #use parent qw/Text::Template/; use vars qw/@ISA/; push @ISA, qw/Text::Template/; # Override constructor sub new { my ($class) = shift; # Call the constructor of the parent class, Person. my $self = $class->SUPER::new( @_ ); # Add few more attributes $self->{_output_off} = 0; # Default to output hunks bless $self, $class; return $self; } sub append_text_to_output { my $self = shift; if ($self->{_output_off} == 0) { $self->SUPER::append_text_to_output(@_); } return; } sub output_reset_on { my $self = shift; $self->{_output_off} = 0; } sub output_on { my $self = shift; if (--$self->{_output_off} < 0) { $self->{_output_off} = 0; } } sub output_off { my $self = shift; $self->{_output_off}++; } # Come back to main package main; # Helper functions for the templates ################################# # It might be practical to quotify some strings and have them protected # from possible harm. These functions primarly quote things that might # be interpreted wrongly by a perl eval. # quotify1 STRING # This adds quotes (") around the given string, and escapes any $, @, \, # " and ' by prepending a \ to them. sub quotify1 { my $s = shift @_; $s =~ s/([\$\@\\"'])/\\$1/g; '"'.$s.'"'; } # quotify_l LIST # For each defined element in LIST (i.e. elements that aren't undef), have # it quotified with 'quotofy1' sub quotify_l { map { if (!defined($_)) { (); } else { quotify1($_); } } @_; } # Error reporter ##################################################### # The error reporter uses %lines to figure out exactly which file the # error happened and at what line. Not that the line number may be # the start of a perl snippet rather than the exact line where it # happened. Nothing we can do about that here. my %lines = (); sub broken { my %args = @_; my $filename = "<STDIN>"; my $deducelines = 0; foreach (sort keys %lines) { $filename = $lines{$_}; last if ($_ > $args{lineno}); $deducelines += $_; } print STDERR $args{error}," in $filename, fragment starting at line ",$args{lineno}-$deducelines; undef; } # Check options ###################################################### my %opts = (); # -o ORIGINATOR # declares ORIGINATOR as the originating script. getopt('o', \%opts); my @autowarntext = ("WARNING: do not edit!", "Generated" . (defined($opts{o}) ? " by ".$opts{o} : "") . (scalar(@ARGV) > 0 ? " from ".join(", ",@ARGV) : "")); # Template reading ################################################### # Read in all the templates into $text, while keeping track of each # file and its size in lines, to try to help report errors with the # correct file name and line number. my $prev_linecount = 0; my $text = @ARGV ? join("", map { my $x = Text::Template::_load_text($_); if (!defined($x)) { die $Text::Template::ERROR, "\n"; } $x = "{- output_reset_on() -}" . $x; my $linecount = $x =~ tr/\n//; $prev_linecount = ($linecount += $prev_linecount); $lines{$linecount} = $_; $x } @ARGV) : join("", <STDIN>); # Engage! ############################################################ # Load the full template (combination of files) into Text::Template # and fill it up with our data. Output goes directly to STDOUT my $template = OpenSSL::Template->new(TYPE => 'STRING', SOURCE => $text, PREPEND => qq{use lib "$FindBin::Bin/perl";}); sub output_reset_on { $template->output_reset_on(); ""; } sub output_on { $template->output_on(); ""; } sub output_off { $template->output_off(); ""; } $template->fill_in(OUTPUT => \*STDOUT, HASH => { config => \%config, target => \%target, disabled => \%disabled, withargs => \%withargs, unified_info => \%unified_info, autowarntext => \@autowarntext, quotify1 => \&quotify1, quotify_l => \&quotify_l, output_reset_on => \&output_reset_on, output_on => \&output_on, output_off => \&output_off }, DELIMITERS => [ "{-", "-}" ], BROKEN => \&broken);
{ "pile_set_name": "Github" }
Solarus Quest Editor is a graphical user interface to create and modify quests for the Solarus engine. WWW: http://www.solarus-games.org/engine/solarus-quest-editor
{ "pile_set_name": "Github" }
include_directories( ../external/liblbfgs/include ../external/ ) add_library( densecrf util.cpp permutohedral.cpp unary.cpp pairwise.cpp objective.cpp densecrf.cpp labelcompatibility.cpp ) add_library( optimization optimization.cpp ) target_link_libraries( optimization lbfgs )
{ "pile_set_name": "Github" }
import React from 'react'; import cx from 'classnames'; import styles from './LaunchButton.module.scss'; function LaunchButton({ onClick, visible, icon: RegularIcon }) { const classNames = cx(styles.button, { [styles.selected]: visible, }); return ( <button type="button" aria-haspopup className={classNames} onClick={onClick} aria-label="This launches a modal form to give website feedback."> <RegularIcon /> </button> ); } export default LaunchButton;
{ "pile_set_name": "Github" }
OC.L10N.register( "files_external", { "Step 1 failed. Exception: %s" : "ขั้นตอนที่ 1 ล้มเหลว ข้อยกเว้น: %s", "Step 2 failed. Exception: %s" : "ขั้นตอนที่ 2 ล้มเหลว ข้อยกเว้น: %s", "External storage" : "จัดเก็บข้อมูลภายนอก", "Google Drive App Configuration" : "ตั้งค่าแอปฯ Google Drive", "Error verifying OAuth2 Code for " : "เกิดข้อผิดพลาดในการยืนยันรหัส OAuth2 สำหรับ", "Personal" : "ส่วนตัว", "System" : "ระบบ", "Grant access" : "อนุญาตให้เข้าถึงได้", "Error configuring OAuth1" : "ข้อผิดพลาดในการกำหนดค่า OAuth1", "Please provide a valid app key and secret." : "โปรดระบุคีย์และรหัสลับของแอปฯ ให้ถูกต้อง", "Generate keys" : "สร้างคีย์", "Error generating key pair" : "ข้อผิดพลาดในการสร้างคีย์แบบเป็นคู่", "All users. Type to select user or group." : "ผู้ใช้ทุกคน พิมพ์เพื่อเลือกผู้ใช้หรือกลุ่ม", "(group)" : "(กลุ่ม)", "Compatibility with Mac NFD encoding (slow)" : "ความเข้ากันได้กับการเข้ารหัส Mac NFS (ช้า)", "Unknown auth backend \"{b}\"" : "พบใบรับรองแบ็กเอนด์ ที่ไม่รู้จัก \"{b}\"", "Please make sure that the app that provides this backend is installed and enabled" : "โปรดตรวจสอบว่ามีการติดตั้งและเปิดใช้แอปฯสำหรับแบ็กเอนด์นี้แล้ว", "Admin defined" : "ถูกกำหนดโดยผู้ดูแลระบบ", "Saved" : "บันทึกแล้ว", "Disabling external storage will unmount all storages for all users, are you sure ?" : "หากปิดการใช้งานการจัดเก็บข้อมูลภายนอก ข้อมูลของผู้ใช้ทั้งหมดจะถูกยกเลิกการต่อเชื่อม คุณแน่ใจ?", "Disable external storage" : "ปิดการใช้งานพื้นที่จัดเก็บข้อมูลภายนอก", "No URL provided by backend " : "ไม่มี URL ที่มาจากแบ็กเอนด์", "Error getting OAuth2 URL for " : "เกิดข้อผิดพลาดในการรับ URL OAuth2 สำหรับ", "Empty response from the server" : "ไม่มีการตอบสนองจากเซิร์ฟเวอร์", "Couldn't access. Please logout and login to activate this mount point" : "ไม่สามารถเข้าถึง กรุณออกจากระบบและาเข้าสู่ระบบใหม่เพื่อเปิดใช้งานจุดเชื่อมต่อนี้", "Couldn't get the information from the ownCloud server: {code} {type}" : "ไม่สามารถรับข้อมูลจากเซิร์ฟเวอร์ ownCloud: {code} {type}", "Couldn't get the list of external mount points: {type}" : "ไม่สามารถรับรายชื่อของจุดเชื่อมต่อภายนอก: {type}", "There was an error with message: " : "มีข้อความแสดงข้อผิดพลาด", "External mount error" : "การติดจากตั้งภายนอกเกิดข้อผิดพลาด", "Couldn't get the list of Windows network drive mount points: empty response from the server" : "ไม่สามารถรับรายชื่อไดรฟ์เครือข่ายของวินโดว์ส จุดที่ติดตั้ง: ไม่มีการตอบสนองจากเซิร์ฟเวอร์", "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "การกำหนดค่าบางส่วนของจุดเชื่อมต่อภายนอกไม่ถูกเชื่อมต่อ กรุณาคลิกที่ตรงสีแดงสำหรับข้อมูลเพิ่มเติม", "Please enter the credentials for the {mount} mount" : "กรุณากรอกหนังสือรับรองสำหรับ {mount} ", "Username" : "ชื่อผู้ใช้งาน", "Password" : "รหัสผ่าน", "Credentials saved" : "หนังสือรับรองได้ถูกบันทึก", "Credentials saving failed" : "บันทึกหนังสือรับรองล้มเหลว", "Credentials required" : "จำเป็นต้องระบบหนังสือรับรอง", "Save" : "บันทึก", "Storage with id \"%i\" not found" : "ไม่พบจัดการเก็บข้อมูลของ ID \"%i\"", "Invalid backend or authentication mechanism class" : "แบ็กเอนด์ไม่ถูกต้องหรือระดับการรับรองความถูกต้องไม่เพียงพอ", "Invalid mount point" : "จุดเชื่อมต่อที่ไม่ถูกต้อง", "Objectstore forbidden" : "เก็บวัตถุต้องห้าม", "Invalid storage backend \"%s\"" : "การจัดเก็บข้อมูลแบ็กเอนด์ไม่ถูกต้อง \"%s\"", "Not permitted to use backend \"%s\"" : "ไม่อนุญาตให้ใช้แบ็กเอนด์ \"%s\"", "Not permitted to use authentication mechanism \"%s\"" : "ไม่อนุญาตให้ตรวจสอบการรับรองความถูกต้อง \"%s\"", "Unsatisfied backend parameters" : "พารามิเตอร์แบ็กเอนด์ไม่ได้รับอนุญาต", "Unsatisfied authentication mechanism parameters" : "การรับรองความถูกต้องไม่เพียงพอ", "Insufficient data: %s" : "ข้อมูลไม่เพียงพอ: %s", "%s" : "%s", "Storage with id \"%i\" is not user editable" : "พื้นที่เก็บข้อมูล รหัส \"%i\" ไม่อนุญาตให้ผู้ใช้แก้ไขข้อมูลได้", "OAuth1" : "OAuth1", "App key" : "App key", "App secret" : "App secret", "OAuth2" : "OAuth2", "Client ID" : "Client ID", "Client secret" : "Client secret", "OpenStack" : "OpenStack", "Tenant name" : "ชื่อผู้เช่า", "Identity endpoint URL" : "ตัวตนของ URL ปลายทาง", "Rackspace" : "Rackspace", "API key" : "รหัส API", "RSA public key" : "RSA คีย์สาธารณะ", "Public key" : "คีย์สาธารณะ", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "โฟลเดอร์ย่อยรีโมท", "Secure https://" : "โหมดปลอดภัย https://", "Google Drive" : "กูเกิ้ลไดร์ฟ", "Local" : "ในเครื่อง", "Location" : "ตำแหน่งที่อยู่", "ownCloud" : "ownCloud", "SFTP" : "SFTP", "Host" : "โฮสต์", "Root" : "รูท", "SFTP with secret key login" : "SFTP กับคีย์ลับสำหรับเข้าสู่ระบบ", "SMB / CIFS" : "SMB / CIFS", "Share" : "แชร์", "Domain" : "โดเมน", "SMB / CIFS using OC login" : "SMB/CIFS กำลังใช้ OC เข้าสู่ระบบ", "Username as share" : "ชื่อผู้ใช้ที่แชร์", "<b>Note:</b> " : "<b>หมายเหตุ:</b>", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>หมายเหตุ:</b> การสนับสนุน cURL ใน PHP ไม่ได้เปิดใช้งานหรือติดตั้ง %s เป็นไปไม่ได้ กรุณาขอให้ผู้ดูแลระบบของคุณติดตั้งมัน", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>หมายเหตุ:</b> %s ไม่ได้ติดตั้ง การติดตั้ง %s เป็นไปไม่ได้ กรุณาขอให้ผู้ดูแลระบบของคุณติดตั้งมัน", "No external storage configured" : "ไม่มีการใช้งานการจัดเก็บข้อมูลภายนอก", "You can add external storages in the storage settings" : "คุณสามารถเพิ่มการจัดเก็บข้อมูลภายนอกในการตั้งค่าพื้นที่เก็บข้อมูลได้", "Name" : "ชื่อ", "Storage type" : "ชนิดการจัดเก็บข้อมูล", "Scope" : "ขอบเขต", "Enable encryption" : "เปิดใช้งานการเข้ารหัส", "Set read-only" : "ตั้งค่าเป็นอ่านอย่างเดียว", "Enable previews" : "เปิดใช้งานการแสดงตัวอย่าง", "Enable sharing" : "เปิดให้สามารถแชร์ได้", "Check for changes" : "ตรวจสอบการเปลี่ยนแปลง", "Never" : "ไม่เคย", "Once every direct access" : "เมื่อทุกคนเข้าถึงโดยตรง", "External Storage" : "พื้นทีจัดเก็บข้อมูลภายนอก", "Enable external storage" : "เปิดการใช้งานพื้นที่จัดเก็บข้อมูลภายนอก", "External storage has been disabled by the administrator" : "ผู้ดูแลระบบได้ปิดการใช้งานการจัดเก็บข้อมูลภายนอก", "Folder name" : "ชื่อโฟลเดอร์", "Authentication" : "รับรองความถูกต้อง", "Configuration" : "การกำหนดค่า", "Available for" : "สามารถใช้ได้สำหรับ", "Add storage" : "เพิ่มพื้นที่จัดเก็บข้อมูล", "Advanced settings" : "ตั้งค่าขั้นสูง", "Delete" : "ลบ", "Allow users to mount external storage" : "อนุญาตให้ผู้ใช้ติดตั้งการจัดเก็บข้อมูลภายนอก", "Allow users to mount the following external storage" : "อนุญาตให้ผู้ใช้ติดตั้งจัดเก็บข้อมูลภายนอกต่อไปนี้", "Allow sharing on user-mounted external storages" : "อนุญาตให้แชร์การจัดเก็บข้อมูลภายนอกของผู้ใช้" }, "nplurals=1; plural=0;");
{ "pile_set_name": "Github" }
/* * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information * * 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 useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "scriptPCH.h" #include <array> enum FireworksShowTypeObjects { FIREWORK_SHOW_TYPE_1_RED = 180703, FIREWORK_SHOW_TYPE_2_RED = 180704, FIREWORK_SHOW_TYPE_1_RED_BIG = 180707, FIREWORK_SHOW_TYPE_2_RED_BIG = 180708, FIREWORK_SHOW_TYPE_1_BLUE = 180720, FIREWORK_SHOW_TYPE_2_BLUE = 180721, FIREWORK_SHOW_TYPE_1_BLUE_BIG = 180722, FIREWORK_SHOW_TYPE_2_BLUE_BIG = 180723, FIREWORK_SHOW_TYPE_1_GREEN = 180724, FIREWORK_SHOW_TYPE_2_GREEN_BIG = 180725, FIREWORK_SHOW_TYPE_1_GREEN_BIG = 180726, FIREWORK_SHOW_TYPE_2_GREEN = 180727, FIREWORK_SHOW_TYPE_1_WHITE = 180728, FIREWORK_SHOW_TYPE_1_WHITE_BIG = 180729, FIREWORK_SHOW_TYPE_2_WHITE = 180730, FIREWORK_SHOW_TYPE_2_WHITE_BIG = 180731, FIREWORK_SHOW_TYPE_1_YELLOW = 180736, FIREWORK_SHOW_TYPE_1_YELLOW_BIG = 180737, FIREWORK_SHOW_TYPE_2_YELLOW = 180738, FIREWORK_SHOW_TYPE_2_YELLOW_BIG = 180739, FIREWORK_SHOW_TYPE_2_PURPLE = 180740, FIREWORK_SHOW_TYPE_1_PURPLE_BIG = 180741, FIREWORK_SHOW_TYPE_2_PURPLE_BIG = 180733 }; enum FireworksMisc { SOUND_CHEER_1 = 8574, SOUND_CHEER_2 = 8573, SOUND_CHEER_3 = 8572, SOUND_CHEER_4 = 8571, EVENT_CHEER = 1, EVENT_FIRE = 2, GAME_EVENT_FIREWORKS = 6 }; enum FireworksZones { STRANGLETHORN_VALE = 33, // Booty bay ORGRIMMAR = 1637, DUROTAR = 14, // Orgrimmar UNDERCITY = 1497, TIRISFAL_GLADES = 85, // Undercity TELDRASSIL = 141, // Darnassus THUNDERBLUFF = 1638, DUN_MOROGH = 1, // Ironforge IRONFORGE = 1537, STORMWIND = 1519 }; static const std::vector<Position> BootyBayPos = { { -14358.03f, 515.058f, 34.2664f, 3.68265f }, { -14357.49f, 490.8445f, 39.47329f, 0.9773831f }, { -14355.49f, 518.5656f, 35.36923f, 4.76475f }, { -14353.66f, 485.8341f, 36.86639f, 4.886924f }, { -14376.54f, 487.5282f, 44.47044f, 5.899214f }, { -14376.66f, 516.6852f, 38.5385f, 2.199115f }, { -14382.42f, 516.2576f, 37.59617f, 5.846854f }, { -14389.55f, 485.7437f, 36.32653f, 6.0912f }, { -14376.76f, 507.9842f, 59.56532f, 0.9773831f }, { -14358.97f, 502.0223f, 43.82631f, 2.199115f }, { -14370.77f, 487.4859f, 45.46445f, 4.886924f }, { -14379.15f, 507.237f, 43.95641f, 6.0912f }, { -14363.28f, 506.7344f, 41.27156f, 5.899214f }, { -14374.43f, 496.0701f, 31.31265f, 4.76475f }, { -14360.71f, 493.6036f, 32.06157f, 5.846854f }, { -14354.37f, 491.8791f, 39.83374f, 3.68265f }, { -14371.19f, 505.8404f, 28.75178f, 6.0912f }, { -14356.57f, 494.1887f, 39.58786f, 3.68265f }, { -14380.02f, 506.3313f, 59.75512f, 6.0912f }, { -14389.84f, 503.4612f, 37.37088f, 5.899214f }, { -14353.64f, 485.4063f, 34.11704f, 4.76475f }, { -14359.63f, 522.2571f, 31.2866f, 2.199115f }, { -14374.91f, 491.508f, 40.34925f, 4.886924f }, { -14351.33f, 506.1898f, 28.69684f, 5.846854f }, { -14378.1f, 473.5608f, 40.16786f, 0.9773831f } }; static const std::vector<Position> StormwindPos = { { -8823.592f, 470.316f, 179.2295f, 1.239183f }, { -8883.005f, 590.1927f, 163.1264f, 0.9773831f }, { -8919.692f, 482.9097f, 185.6471f, 3.735006f }, { -8907.228f, 551.7864f, 188.68f, 4.729844f }, { -8979.651f, 639.3976f, 184.4983f, 3.961899f }, { -8878.851f, 583.1771f, 166.3018f, 3.700105f }, { -8937.466f, 517.0521f, 183.7207f, 3.68265f }, { -8919.247f, 562.2882f, 176.1023f, 3.630291f }, { -8866.37f, 576.0504f, 157.8798f, 3.47321f }, { -8957.122f, 517.7014f, 161.3226f, 3.630291f }, { -8957.857f, 521.934f, 158.9058f, 4.729844f }, { -8851.988f, 486.5625f, 179.6635f, 4.258607f }, { -8972.651f, 531.0799f, 176.6744f, 4.886924f }, { -8986.207f, 560.9792f, 179.1758f, 5.550147f }, { -8848.866f, 488.8281f, 184.9777f, 3.961899f }, { -8946.897f, 521.3976f, 193.4021f, 0.9424766f }, { -8876.854f, 593.6771f, 171.0399f, 0.1396245f }, { -8828.743f, 463.0382f, 195.7672f, 0.9424766f }, { -8968.125f, 525.1285f, 181.9304f, 3.054327f }, { -8952.893f, 629.2743f, 188.2722f, 0.9424766f }, { -8882.172f, 574.4219f, 181.7124f, 6.0912f }, { -8980.363f, 546.7934f, 180.4686f, 4.66003f }, { -8874.944f, 575.5f, 175.7746f, 0.9075702f }, { -8945.109f, 496.3715f, 153.2825f, 6.073746f }, { -8953.094f, 513.5521f, 180.9165f, 3.735006f }, { -8955.02f, 623.7621f, 193.7679f, 0.9424766f }, { -8977.524f, 644.9097f, 197.926f, 3.961899f }, { -8985.639f, 653.9809f, 200.0452f, 3.630291f }, { -8985.639f, 653.9809f, 200.0452f, 3.630291f }, { -8849.723f, 624.1337f, 144.0357f, 0.8552105f }, { -8938.404f, 511.8854f, 179.5132f, 0.4712385f }, { -8815.946f, 571.0833f, 166.8412f, 0.8552105f }, { -8968.125f, 525.1285f, 180.6735f, 3.054327f }, { -8887.63f, 582.0261f, 180.219f, 3.787367f }, { -8962.538f, 541.4132f, 169.8063f, 0.6283169f }, { -8854.854f, 503.4115f, 194.6336f, 3.630291f }, { -8810.004f, 589.0504f, 150.2928f, 0.8552105f }, { -8921.13f, 570.2153f, 186.4456f, 3.857183f }, { -8957.076f, 538.8073f, 165.0997f, 0.5235979f }, { -8954.139f, 507.5695f, 178.861f, 3.595379f }, { -8817.174f, 577.4948f, 152.5639f, 0.8552105f }, { -8808.778f, 582.6389f, 158.5705f, 0.8552105f }, { -8898.136f, 566.4236f, 186.5282f, 6.0912f }, { -8877.205f, 598.0347f, 164.5646f, 0.1396245f }, { -8815.911f, 460.2049f, 179.4585f, 3.926996f }, { -8836.877f, 574.1649f, 168.0506f, 0.8552105f }, { -8883.005f, 590.1927f, 157.0154f, 0.9773831f }, { -8942.71f, 561.3316f, 198.328f, 3.630291f }, { -8949.616f, 617.007f, 197.4469f, 3.630291f }, { -8939.357f, 507.9288f, 155.7625f, 0.6457717f }, { -8976.667f, 558.6233f, 170.7597f, 5.550147f }, { -8871.924f, 609.7327f, 151.6364f, 0.8552105f }, { -8829.264f, 551.5052f, 137.5144f, 0.8552105f }, { -8859.802f, 567.184f, 162.9909f, 3.47321f }, { -8864.504f, 604.0816f, 144.7161f, 0.8552105f }, { -8854.042f, 616.0121f, 146.4188f, 0.8552105f }, { -8839.778f, 576.8004f, 163.2873f, 0.8552105f }, { -8863.049f, 497.7986f, 179.2041f, 3.926996f }, { -8951.743f, 611.4948f, 185.3027f, 3.630291f }, { -8976.063f, 535.0504f, 178.1283f, 4.66003f }, { -8937.466f, 517.0521f, 170.561f, 3.68265f }, { -8940.363f, 490.4288f, 180.8207f, 3.996807f }, { -8838.177f, 541.6476f, 168.6789f, 0.8552105f }, { -8825.467f, 450.7708f, 196.6236f, 3.630291f }, { -8878.851f, 583.1771f, 165.5726f, 3.700105f }, { -8822.146f, 557.2292f, 147.8244f, 0.8552105f }, { -8953.243f, 523.8958f, 158.0031f, 3.630291f }, { -8983.514f, 659.493f, 198.6248f, 3.630291f }, { -8939.941f, 499.6163f, 158.6714f, 3.944446f }, { -8925.567f, 542.2158f, 116.1619f, 6.0912f }, { -8964.125f, 634.6736f, 182.0301f, 0.6283169f }, { -8930.696f, 491.8021f, 185.6471f, 3.944446f }, { -8882.172f, 574.4219f, 165.4764f, 6.0912f }, { -8943.316f, 516.0191f, 155.9438f, 5.846854f }, { -8871.973f, 589.2795f, 159.1132f, 0.4712385f }, { -8883.328f, 579.6736f, 172.1912f, 0.6283169f }, { -8961.998f, 640.1858f, 188.2798f, 0.6283169f }, { -8912.467f, 506.625f, 175.9382f, 5.846854f }, { -8843.524f, 481.7865f, 179.664f, 0.9250238f }, { -8964.986f, 535.2136f, 163.4313f, 4.886924f }, { -8833.341f, 484.1042f, 192.8578f, 0.6283169f }, { -8861.382f, 574.7413f, 162.1575f, 3.47321f }, { -8973.627f, 631.7726f, 192.3904f, 0.6283169f }, { -8878.851f, 583.1771f, 166.149f, 3.700105f }, { -8842.842f, 481.2031f, 204.4827f, 0.6283169f }, { -8902.143f, 527.5035f, 187.1883f, 3.630291f }, { -8956.248f, 514.2257f, 161.3226f, 3.630291f }, { -8835.826f, 488.0764f, 179.2099f, 0.9250238f }, { -8961.319f, 533.3333f, 162.5372f, 3.961899f }, { -8947.649f, 516.0955f, 163.2207f, 3.68265f }, { -8949.186f, 504.1337f, 180.9165f, 3.804818f }, { -8945.564f, 511.5156f, 164.3801f, 5.899214f }, { -8969.266f, 543.882f, 180.4686f, 4.66003f }, { -8874.156f, 586.6302f, 161.5547f, 0.9773831f }, { -8919.748f, 552.2986f, 176.0453f, 3.996807f }, { -8971.5f, 637.2847f, 197.926f, 0.6283169f }, { -8965.389f, 525.8906f, 170.2664f, 2.199115f }, { -8885.1768f, 584.675781f, 141.623886f, 0.62527f }, { -8880.427734f, 576.678406f, 141.62886f, 0.69819f }, { -8873.7005f, 570.2418f, 139.33889f, 0.762973f }, { -8888.692383f, 571.265015f, 120.36886f, 0.601966f }, { -8870.9571f, 575.9952f, 120.811226f, 0.880780f }, { -8875.3905f, 582.87028f, 120.81226f, 0.76898f }, { -8887.0238f, 594.304871f, 120.81226f, 0.700139f }, { -8887.0238f, 594.3041f, 132.571243f, 5.30658f }, { -8874.3430f, 584.368164f, 131.409271f, 5.428242f }, { -8856.23049f, 573.789795f, 131.861237f, 5.707060f }, { -8881.462891f, 592.391418f, 118.883751f, 0.464518f }, { -8871.443359f, 582.234802f, 117.030724f, 0.562685f }, { -8884.809570f, 576.020081f, 110.489868f, 0.621592f }, { -8871.830078f, 585.984314f, 110.492371f, 0.696206f }, { -8871.830078f, 585.984314f, 119.252373f, 0.700133f }, { -8875.578125f, 563.403931f, 114.059372f, 4.521095f }, { -8896.128906f, 584.406311f, 117.437462f, 2.922810f }, { -8873.742188f, 599.873718f, 117.512787f, 3.001356f }, { -8885.817383f, 586.529175f, 108.614265f, 0.437024f }, { -8872.734375f, 573.338440f, 107.723770f, 1.831103f } }; static const std::vector<Position> OrgrimmarPos = { { 1609.075f, -4383.707f, 90.23414f, 0.3665176f }, { 1469.648f, -4371.285f, 113.8313f, 6.073746f }, { 1391.792f, -4371.f, 165.0406f, 3.630291f }, { 1405.918f, -4504.896f, 123.1683f, 3.700105f }, { 1610.016f, -4386.493f, 82.81187f, 3.909541f }, { 1523.767f, -4385.934f, 100.7948f, 4.572764f }, { 1486.345f, -4493.087f, 146.1718f, 0.1396245f }, { 1606.724f, -4414.668f, 121.4687f, 5.550147f }, { 1647.043f, -4402.644f, 121.7353f, 1.570796f }, { 1573.078f, -4426.342f, 104.5087f, 5.550147f }, { 1600.927f, -4367.731f, 87.9886f, 3.874631f }, { 1558.359f, -4368.33f, 120.0258f, 4.363324f }, { 1377.49f, -4298.74f, 136.4911f, 5.846854f }, { 1395.439f, -4403.583f, 170.1769f, 3.68265f }, { 1394.175f, -4390.438f, 166.5045f, 5.550147f }, { 1389.752f, -4352.681f, 150.5359f, 3.228859f }, { 1471.724f, -4393.083f, 129.966f, 3.159062f }, { 1586.208f, -4334.78f, 104.248f, 2.617989f }, { 1590.582f, -4338.588f, 110.6812f, 0.2094394f }, { 1601.163f, -4367.491f, 105.1535f, 0.5410506f }, { 1493.476f, -4448.524f, 142.9773f, 3.630291f }, { 1481.592f, -4421.177f, 156.4658f, 0.1396245f }, { 1382.604f, -4319.927f, 143.5185f, 3.298687f }, { 1647.483f, -4404.724f, 113.3714f, 2.617989f }, { 1567.398f, -4423.649f, 108.9948f, 4.206246f }, { 1560.326f, -4372.816f, 112.5343f, 6.19592f }, { 1521.741f, -4390.443f, 103.8611f, 5.550147f }, { 1479.924f, -4424.903f, 156.0753f, 3.054327f }, { 1387.427f, -4334.854f, 150.2641f, 0.9773831f }, { 1481.771f, -4466.378f, 138.0009f, 3.47321f }, { 1390.512f, -4372.778f, 154.748f, 3.071766f }, { 1605.115f, -4411.217f, 112.0536f, 0.06981169f }, { 1466.144f, -4341.917f, 140.5263f, 2.548179f }, { 1479.922f, -4467.948f, 129.9536f, 3.33359f }, { 1397.09f, -4405.764f, 149.5936f, 2.199115f }, { 1404.153f, -4497.729f, 121.3236f, 6.0912f }, { 1493.337f, -4441.268f, 137.3894f, 3.211419f }, { 1469.385f, -4340.427f, 150.2859f, 2.548179f }, { 1385.043f, -4317.056f, 145.6198f, 3.194002f }, { 1472.734f, -4398.983f, 135.9285f, 3.47321f }, { 1469.135f, -4380.587f, 117.5022f, 0.1396245f }, { 1389.047f, -4339.42f, 150.2229f, 4.76475f }, { 1476.245f, -4420.931f, 159.4286f, 3.630291f }, { 1479.87f, -4421.628f, 161.0234f, 3.054327f }, { 1391.415f, -4370.76f, 161.9061f, 3.089183f }, { 1394.175f, -4385.715f, 153.2316f, 5.899214f }, { 1396.132f, -4411.295f, 161.1071f, 4.66003f }, { 1403.262f, -4474.733f, 103.9363f, 4.886924f }, { 1488.257f, -4491.f, 130.442f, 0.03490625f }, { 1467.707f, -4361.327f, 105.1312f, 3.700105f }, { 1375.649f, -4366.401f, 152.1661f, 0.1745321f }, { 1389.922f, -4375.253f, 77.87833f, 6.0912f }, { 1392.398f, -4379.628f, 172.5377f, 2.199115f }, { 1394.943f, -4388.257f, 176.3171f, 3.246347f }, { 1481.833f, -4466.399f, 160.8109f, 3.630291f }, { 1469.816f, -4366.597f, 120.6296f, 3.159062f }, { 1379.802f, -4309.967f, 146.3039f, 2.984498f }, { 1388.002f, -4353.233f, 148.1396f, 5.899214f }, { 1378.589f, -4296.118f, 144.691f, 5.846854f }, { 1470.207f, -4395.868f, 133.8257f, 6.073746f }, { 1406.467f, -4511.327f, 123.2332f, 0.1396245f }, { 1395.04f, -4390.569f, 167.5848f, 3.228859f }, { 1480.908f, -4422.219f, 154.6776f, 3.194002f }, { 1486.033f, -4493.719f, 144.937f, 3.47321f }, { 1403.845f, -4488.743f, 124.8069f, 3.700105f }, { 1494.733f, -4446.885f, 140.0633f, 6.248279f }, { 1481.875f, -4428.431f, 161.3601f, 3.316144f }, { 1384.299f, -4332.253f, 146.5117f, 3.194002f }, { 1468.939f, -4346.42f, 143.6888f, 3.054327f }, { 1393.356f, -4478.347f, 125.5958f, 6.0912f }, { 1384.672f, -4449.229f, 146.3165f, 4.886924f }, { 1486.5393f, -4372.5333f, 117.014f, 5.951700f }, { 1489.1738f, -4415.65091f, 110.5526f, 1.309994f }, { 1501.63171f, -4454.74668f, 107.716637f, 0.387151f }, { 1518.3159f, -4438.94873f, 82.9114f, 1.891189f }, { 1511.754272f, -4423.58203f, 75.781662f, 6.1763f }, { 1508.1212f, -4399.4312f, 75.781662f, 3.575869f }, { 1515.1198f, -4356.886719f, 81.859f, 5.87775f }, { 1553.78795f, -4387.95084f, 72.565178f, 1.372812f }, { 1549.74023f, -4413.03227f, 74.2219f, 0.42641f }, { 1528.63644f, -4408.71850f, 118.7224f, 0.23985f }, { 1532.7171f, -4399.64944f, 70.62704f, 0.13188f }, { 1509.3391f, -4422.2905f, 75.24475f, 0.1554f }, { 1501.4160f, -4413.1782f, 62.63250f, 0.347852f }, { 1499.258179f, -4395.1628f, 62.230198f, 6.02282f }, { 1485.33571f, -4397.560547f, 71.07567f, 3.2190f }, { 1495.2693f, -4417.2910f, 70.232471f, 3.31666f }, { 1498.65912f, -4439.20613f, 69.07176f, 3.7643f }, { 1523.45699f, -4393.04395f, 59.775066f, 3.71542f }, { 1536.62665f, -4419.85963f, 60.4508f, 3.46193f }, { 1497.2632f, -4401.54637f, 53.805511f, 2.60181f }, { 1497.9363f, -4437.58008f, 52.326393f, 4.96205f }, { 1493.26253f, -4402.19919f, 79.147816f, 2.2917f } }; static const std::vector<Position> IronForgePos = { { -5196.038f, -858.4618f, 525.0447f, 6.073746f }, { -5195.734f, -887.6441f, 534.168f, 3.68265f }, { -5195.063f, -762.2795f, 510.0929f, 4.66003f }, { -5164.59f, -858.3264f, 540.0117f, 5.899214f }, { -5130.776f, -791.1945f, 523.2938f, 5.846854f }, { -5127.663f, -827.1771f, 534.2573f, 4.76475f }, { -5227.184f, -754.8802f, 500.0329f, 5.550147f }, { -5197.655f, -857.8889f, 525.5248f, 2.199115f }, { -5227.705f, -859.0052f, 513.9084f, 6.0912f }, { -5227.f, -821.7795f, 471.7424f, 3.700105f }, { -5131.42f, -791.9445f, 537.8198f, 3.054327f }, { -5223.59f, -889.6302f, 509.3725f, 4.886924f }, { -5164.124f, -825.3795f, 525.2161f, 0.9773831f }, { -5196.168f, -826.6163f, 517.4463f, 2.111848f }, { -5227.393f, -757.1059f, 501.0704f, 3.47321f }, { -5192.556f, -784.4583f, 506.9716f, 4.729844f }, { -5227.965f, -792.184f, 509.1933f, 0.1396245f }, { -5182.054f, -782.283f, 514.0707f, 4.886924f }, { -5152.384f, -819.2031f, 508.2252f, 0.9773831f }, { -5220.162f, -722.941f, 501.573f, 3.700105f }, { -5218.438f, -879.0486f, 534.1289f, 2.111848f }, { -5186.096f, -846.5903f, 526.4001f, 3.054327f }, { -5182.972f, -816.2309f, 522.7172f, 5.550147f }, { -5172.745f, -854.6077f, 541.5695f, 2.548179f }, { -5126.936f, -816.5712f, 506.1032f, 4.76475f }, { -5214.637f, -850.4496f, 524.1501f, 4.729844f }, { -5156.693f, -818.3021f, 532.9488f, 4.66003f }, { -5188.997f, -876.8524f, 544.1463f, 6.073746f }, { -5216.222f, -817.3351f, 498.4872f, 3.630291f }, { -5190.08f, -758.6545f, 507.9708f, 6.0912f }, { -5156.724f, -844.0851f, 529.4639f, 5.899214f }, { -5215.002f, -754.8802f, 488.5055f, 0.1396245f }, { -5137.646f, -787.2882f, 502.1171f, 5.846854f }, { -5183.194f, -817.217f, 508.4071f, 3.68265f }, { -5183.191f, -848.6163f, 518.0361f, 2.199115f }, { -5215.972f, -785.0452f, 494.1193f, 3.47321f }, { -5117.396f, -791.4796f, 483.5854f, 6.0912f }, { -5153.132f, -781.2309f, 539.7031f, 5.899214f }, { -5209.993f, -710.1337f, 501.9293f, 5.846854f }, { -5172.809f, -848.1094f, 520.4458f, 6.0912f }, { -5120.552f, -812.3004f, 547.9608f, 3.68265f }, { -5142.92f, -811.507f, 526.748f, 4.886924f }, { -5208.391f, -773.4583f, 497.451f, 4.729844f }, { -5181.903f, -779.1979f, 518.5895f, 0.9773831f }, { -5208.097f, -843.934f, 514.2054f, 3.47321f }, { -5118.309f, -783.3246f, 545.3275f, 2.199115f }, { -5213.969f, -715.6684f, 493.5344f, 6.073746f }, { -5211.384f, -872.493f, 523.3142f, 0.1396245f }, { -5215.563f, -812.7205f, 501.1313f, 2.548179f }, { -5159.971f, -819.0695f, 523.9502f, 5.550147f }, { -5243.21f, -741.7934f, 479.6208f, 2.111848f }, { -5158.577f, -784.243f, 515.7791f, 3.054327f }, { -5210.179f, -809.2413f, 507.136f, 3.630291f }, { -5182.26f, -818.6476f, 519.5022f, 4.66003f }, { -5178.493f, -870.8143f, 539.2921f, 3.700105f }, { -5206.622f, -741.5938f, 511.1593f, 4.76475f }, { -5194.976f, -759.9896f, 517.6288f, 3.630291f } }; static const std::vector<Position> ThunderBluffPos = { { -1234.804f, -19.72239f, 206.5436f, 0.1396245f }, { -1244.442f, -35.88308f, 206.82f, 4.729844f }, { -1239.212f, -11.25857f, 208.6352f, 3.700105f }, { -1217.165f, -15.58898f, 207.4553f, 3.68265f }, { -1229.332f, -6.54617f, 208.2537f, 2.548179f }, { -1227.353f, -14.30225f, 206.6192f, 3.054327f }, { -1234.8f, -14.12402f, 208.0964f, 6.0912f }, { -1246.791f, -38.59223f, 206.846f, 6.073746f }, { -1229.818f, -6.788249f, 209.4552f, 4.886924f }, { -1223.867f, -10.67551f, 205.7558f, 0.9773831f }, { -1229.833f, -6.403429f, 208.6842f, 4.76475f }, { -1239.199f, -23.20622f, 207.0188f, 3.47321f }, { -1246.258f, -37.36089f, 208.2598f, 2.199115f }, { -1223.363f, -12.2462f, 201.3805f, 4.66003f }, { -1218.116f, -16.37305f, 199.9185f, 5.550147f }, { -1239.709f, -42.34294f, 204.2466f, 2.111848f }, { -1219.295f, -12.87424f, 206.2387f, 5.899214f }, { -1251.241f, -33.18164f, 209.7986f, 3.630291f }, { -1219.549f, -12.32769f, 207.9862f, 3.47321f }, { -1251.181f, -34.52919f, 206.8795f, 4.66003f }, { -1235.567f, -15.02116f, 205.3759f, 2.199115f }, { -1241.148f, -41.8049f, 205.8436f, 0.1396245f }, { -1241.41f, -23.09136f, 206.5933f, 3.054327f }, { -1235.885f, -19.49116f, 206.4422f, 3.68265f }, { -1234.823f, -13.99685f, 210.1406f, 6.073746f }, { -1220.117f, -10.93815f, 204.8297f, 4.76475f }, { -1219.087f, -6.230252f, 206.5717f, 5.899214f }, { -1235.053f, -20.39225f, 206.5732f, 3.630291f }, { -1239.364f, -22.23714f, 207.2047f, 4.886924f }, { -1245.448f, -37.35639f, 208.0733f, 3.700105f }, { -1222.941f, -10.68441f, 208.3044f, 0.9773831f }, { -1238.765f, -11.7156f, 203.8905f, 2.111848f }, { -1251.638f, -34.5931f, 207.4821f, 6.0912f }, { -1229.332f, -6.54617f, 205.5314f, 4.729844f }, { -1245.196f, -37.02111f, 208.2277f, 5.550147f }, { -1235.227f, -19.88525f, 206.9543f, 2.548179f }, { -1249.993f, -35.97727f, 206.9852f, 5.846854f }, { -1238.741f, -11.55127f, 216.4102f, 4.76475f }, { -1242.702f, -23.95698f, 215.8784f, 2.199115f }, { -1223.998f, -11.75629f, 187.3124f, 6.0912f }, { -1220.138f, -16.90701f, 218.7182f, 2.111848f }, { -1239.351f, -23.36654f, 218.1057f, 5.550147f }, { -1222.544f, -11.58713f, 218.9956f, 3.630291f }, { -1234.379f, -19.82167f, 211.3573f, 5.899214f }, { -1224.649f, -16.73172f, 217.2839f, 6.073746f }, { -1219.856f, -11.69358f, 218.5711f, 0.1396245f }, { -1223.967f, -8.415148f, 219.2347f, 3.47321f }, { -1252.266f, -33.21897f, 215.823f, 3.68265f }, { -1244.304f, -41.49599f, 214.7235f, 3.700105f }, { -1245.102f, -34.69542f, 215.4592f, 4.886924f }, { -1239.761f, -41.99474f, 211.7772f, 6.0912f }, { -1219.803f, -11.18414f, 219.6471f, 4.729844f }, { -1219.832f, -12.19803f, 219.4899f, 5.846854f }, { -1236.825f, -18.4617f, 220.2076f, 4.66003f }, { -1239.635f, -11.55973f, 220.694f, 2.548179f }, { -1233.765f, -15.5765f, 216.1068f, 3.054327f }, { -1233.56f, -15.80257f, 215.6199f, 0.9773831f }, { -1240.617f, -41.39486f, 205.0362f, 5.846854f } }; static const std::vector<Position> UndercityPos = { { 1850.231f, 257.0156f, 124.1743f, 4.729844f }, { 1863.302f, 193.9063f, 114.5829f, 0.9773831f }, { 1851.997f, 212.7726f, 127.959f, 5.550147f }, { 1862.474f, 288.1528f, 118.4504f, 6.0912f }, { 1851.906f, 267.6267f, 131.5442f, 3.054327f }, { 1868.905f, 323.2587f, 131.801f, 0.1396245f }, { 1849.677f, 196.5052f, 119.4152f, 2.548179f }, { 1870.382f, 155.8438f, 135.8888f, 5.846854f }, { 1863.309f, 211.9219f, 117.2065f, 5.899214f }, { 1849.877f, 215.7413f, 120.1931f, 6.073746f }, { 1864.762f, 170.5399f, 108.2692f, 4.76475f }, { 1839.986f, 288.4306f, 126.1348f, 3.47321f }, { 1875.91f, 230.566f, 125.1612f, 2.199115f }, { 1854.146f, 238.7622f, 131.7162f, 4.66003f }, { 1863.307f, 264.4583f, 123.374f, 4.886924f }, { 1871.578f, 266.8681f, 108.0443f, 4.66003f }, { 1836.901f, 185.5868f, 113.362f, 3.630291f }, { 1871.545f, 191.2622f, 105.8294f, 6.073746f }, { 1863.307f, 211.816f, 114.3906f, 4.76475f }, { 1841.543f, 205.1754f, 102.9691f, 3.47321f }, { 1843.304f, 273.4757f, 104.6566f, 6.0912f }, { 1870.818f, 167.0938f, 126.3066f, 4.729844f }, { 1840.653f, 227.6319f, 106.8095f, 0.1396245f }, { 1863.299f, 282.1806f, 110.9902f, 2.199115f }, { 1875.688f, 230.5278f, 112.7081f, 3.054327f }, { 1872.264f, 311.1458f, 119.7756f, 3.68265f }, { 1871.248f, 297.1684f, 113.6078f, 5.550147f }, { 1863.293f, 186.4896f, 114.6143f, 5.846854f }, { 1838.384f, 252.3264f, 103.8479f, 3.700105f }, { 1886.804f, 166.3976f, 125.2679f, 2.111848f }, { 1863.363f, 237.5417f, 125.3641f, 0.9773831f }, { 1863.307f, 267.875f, 113.7794f, 5.899214f }, { 1845.602f, 299.4445f, 120.9578f, 4.886924f }, { 1871.884f, 217.2656f, 108.2966f, 2.548179f }, { 1867.459f, 240.2357f, 106.0639f, 6.0912f }, { 1863.326f, 298.4879f, 121.1103f, 3.054327f }, { 1844.776f, 287.776f, 131.6692f, 4.76475f }, { 1842.595f, 299.8854f, 132.9048f, 5.846854f }, { 1843.754f, 233.0833f, 122.607f, 3.68265f }, { 1865.563f, 238.7674f, 127.128f, 5.550147f }, { 1863.302f, 282.6076f, 117.6718f, 2.548179f }, { 1850.063f, 218.7344f, 116.5234f, 4.886924f }, { 1852.528f, 257.8333f, 125.5587f, 5.899214f }, { 1870.385f, 321.809f, 123.7424f, 4.66003f }, { 1864.694f, 167.474f, 111.3632f, 0.1396245f }, { 1846.231f, 194.2656f, 108.0038f, 3.700105f }, { 1876.434f, 227.1129f, 116.7266f, 4.729844f }, { 1839.993f, 245.0399f, 120.8441f, 2.199115f }, { 1864.042f, 204.4774f, 105.6403f, 3.630291f }, { 1875.594f, 246.9271f, 110.0379f, 2.111848f }, { 1850.892f, 273.6059f, 133.6044f, 0.9773831f }, { 1863.3f, 186.2188f, 118.3104f, 3.47321f }, { 1851.578f, 203.2604f, 118.5638f, 6.0912f }, { 1863.307f, 259.8038f, 116.5421f, 6.073746f }, { 1877.592f, 247.3872f, 128.022f, 3.68265f }, { 1850.288f, 267.309f, 125.0537f, 3.630291f } }; static const std::vector<Position> DarnassusPos = { { 8578.888f, 975.2604f, 42.48742f, 5.846854f }, { 8574.236f, 944.2083f, 44.71943f, 4.76475f }, { 8517.067f, 986.0851f, 66.32562f, 4.729844f }, { 8553.734f, 780.0504f, 63.21661f, 4.886924f }, { 8537.763f, 877.8924f, 76.7791f, 3.054327f }, { 8572.691f, 814.7379f, 72.4253f, 3.68265f }, { 8572.691f, 814.7379f, 72.4253f, 3.68265f }, { 8494.191f, 943.868f, 59.0681f, 6.073746f }, { 8536.576f, 873.7222f, 45.29478f, 0.1396245f }, { 8550.191f, 850.7222f, 57.6362f, 3.700105f }, { 8554.281f, 875.8316f, 48.10747f, 5.550147f }, { 8590.731f, 846.9427f, 56.89664f, 2.199115f }, { 8519.5f, 949.7708f, 63.29575f, 3.630291f }, { 8508.24f, 838.3646f, 77.00415f, 4.66003f }, { 8588.622f, 912.0434f, 49.60857f, 0.9773831f }, { 8538.786f, 820.7361f, 67.0003f, 6.0912f }, { 8488.077f, 983.2379f, 59.87747f, 2.111848f }, { 8494.68f, 911.783f, 72.29862f, 2.548179f }, { 8556.297f, 920.9479f, 42.13089f, 3.47321f }, { 8571.629f, 880.1511f, 53.78056f, 5.899214f }, { 8544.278f, 885.059f, 70.3073f, 0.1396245f }, { 8551.224f, 947.6059f, 60.74737f, 6.0912f }, { 8586.716f, 913.4774f, 42.5911f, 4.76475f }, { 8617.442f, 917.658f, 41.92455f, 4.886924f }, { 8519.375f, 917.842f, 74.22758f, 2.111848f }, { 8550.322f, 910.9809f, 52.84513f, 3.700105f }, { 8582.255f, 848.0608f, 53.87154f, 5.899214f }, { 8547.279f, 964.1684f, 45.09663f, 5.550147f }, { 8581.158f, 881.2344f, 54.83494f, 0.9773831f }, { 8550.932f, 817.2396f, 60.80384f, 3.630291f }, { 8550.214f, 787.1684f, 66.42948f, 4.729844f }, { 8583.88f, 948.4114f, 41.32378f, 5.846854f }, { 8550.997f, 848.8594f, 70.56313f, 3.47321f }, { 8517.45f, 879.5555f, 83.80603f, 6.073746f }, { 8558.55f, 838.934f, 56.89937f, 4.66003f }, { 8617.526f, 851.5955f, 37.39491f, 3.68265f }, { 8579.229f, 911.8906f, 44.37334f, 3.054327f }, { 8581.771f, 817.0295f, 30.07061f, 2.199115f }, { 8514.054f, 848.6059f, 59.20383f, 2.548179f }, { 8570.65f, 885.1719f, 59.11485f, 2.548179f }, { 8576.803f, 814.3611f, 50.15007f, 4.66003f }, { 8697.891f, 991.0841f, 39.18531f, 6.0912f }, { 8547.403f, 974.4879f, 63.7893f, 5.846854f }, { 8553.929f, 853.6476f, 84.47609f, 0.1396245f }, { 8507.603f, 878.8854f, 70.23988f, 5.899214f }, { 8570.95f, 854.1406f, 65.7302f, 3.054327f }, { 8560.618f, 777.342f, 79.87446f, 4.886924f }, { 8542.07f, 852.0174f, 64.99033f, 3.700105f }, { 8514.364f, 940.0868f, 64.65899f, 4.76475f }, { 8526.2f, 848.8542f, 63.1242f, 2.199115f }, { 8571.85f, 913.1511f, 43.11662f, 6.073746f }, { 8591.914f, 901.6493f, 26.83536f, 5.550147f }, { 8539.892f, 914.3368f, 45.99331f, 3.630291f }, { 8578.143f, 948.3264f, 62.56763f, 2.111848f }, { 8539.493f, 887.2274f, 79.56437f, 3.47321f }, { 8538.561f, 951.6632f, 69.08958f, 4.729844f }, { 8523.006f, 907.7413f, 72.85262f, 0.9773831f }, { 8520.907f, 813.0208f, 81.70242f, 3.68265f }, { 8554.825f, 813.0746f, 78.88226f, 6.0912f } }; static const std::unordered_map<uint32, std::vector<Position> const&> pos = { { STRANGLETHORN_VALE, BootyBayPos }, { STORMWIND, StormwindPos }, { ORGRIMMAR, OrgrimmarPos }, { DUROTAR, OrgrimmarPos }, { DUN_MOROGH, IronForgePos }, { IRONFORGE, IronForgePos }, { THUNDERBLUFF, ThunderBluffPos }, { UNDERCITY, UndercityPos }, { TIRISFAL_GLADES, UndercityPos }, { TELDRASSIL, DarnassusPos } }; std::array<uint32, 23> const fireworkIds = { FIREWORK_SHOW_TYPE_1_RED, FIREWORK_SHOW_TYPE_2_RED, FIREWORK_SHOW_TYPE_1_RED_BIG, FIREWORK_SHOW_TYPE_2_RED_BIG, FIREWORK_SHOW_TYPE_1_BLUE, FIREWORK_SHOW_TYPE_2_BLUE, FIREWORK_SHOW_TYPE_1_BLUE_BIG, FIREWORK_SHOW_TYPE_2_BLUE_BIG, FIREWORK_SHOW_TYPE_1_GREEN, FIREWORK_SHOW_TYPE_2_GREEN_BIG, FIREWORK_SHOW_TYPE_1_GREEN_BIG, FIREWORK_SHOW_TYPE_2_GREEN, FIREWORK_SHOW_TYPE_1_WHITE, FIREWORK_SHOW_TYPE_1_WHITE_BIG, FIREWORK_SHOW_TYPE_2_WHITE, FIREWORK_SHOW_TYPE_2_WHITE_BIG, FIREWORK_SHOW_TYPE_1_YELLOW, FIREWORK_SHOW_TYPE_1_YELLOW_BIG, FIREWORK_SHOW_TYPE_2_YELLOW, FIREWORK_SHOW_TYPE_2_YELLOW_BIG, FIREWORK_SHOW_TYPE_2_PURPLE, FIREWORK_SHOW_TYPE_1_PURPLE_BIG, FIREWORK_SHOW_TYPE_2_PURPLE_BIG }; std::array<uint32, 12> const fireworkBigIds = { FIREWORK_SHOW_TYPE_1_RED_BIG, FIREWORK_SHOW_TYPE_2_RED_BIG, FIREWORK_SHOW_TYPE_1_BLUE_BIG, FIREWORK_SHOW_TYPE_2_BLUE_BIG, FIREWORK_SHOW_TYPE_2_GREEN_BIG, FIREWORK_SHOW_TYPE_1_GREEN_BIG, FIREWORK_SHOW_TYPE_1_WHITE_BIG, FIREWORK_SHOW_TYPE_2_WHITE_BIG, FIREWORK_SHOW_TYPE_1_YELLOW_BIG, FIREWORK_SHOW_TYPE_2_YELLOW_BIG, FIREWORK_SHOW_TYPE_1_PURPLE_BIG, FIREWORK_SHOW_TYPE_2_PURPLE_BIG }; struct go_cheer_speakerAI : public GameObjectAI { go_cheer_speakerAI(GameObject* go) : GameObjectAI(go) { m_started = false; m_big = false; } uint32 CheerPicker() { switch (urand(0, 3)) { case 0: return SOUND_CHEER_1; case 1: return SOUND_CHEER_2; case 2: return SOUND_CHEER_3; } return SOUND_CHEER_4; } uint32 FireworksPicker() { return SelectRandomContainerElement(fireworkIds); } uint32 FireworksBIGOnlyPicker() { return SelectRandomContainerElement(fireworkBigIds); } void UpdateAI(uint32 const diff) override { m_events.Update(diff); time_t rawtime = time(nullptr); struct tm* localTm; localTm = localtime(&rawtime); // Start if ((localTm->tm_min == 0 && localTm->tm_sec == 0) && !m_started && sGameEventMgr.IsActiveEvent(GAME_EVENT_FIREWORKS)) { m_events.ScheduleEvent(EVENT_CHEER, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_started = true; } // Event is active if ((localTm->tm_min >= 0 && localTm->tm_sec >= 1 && localTm->tm_min <= 9 && localTm->tm_sec <= 59 && !m_started) && sGameEventMgr.IsActiveEvent(GAME_EVENT_FIREWORKS)) { m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_started = true; } // Stop if ((localTm->tm_min == 10 && localTm->tm_sec == 0) && m_started == true) { m_started = false; m_events.ScheduleEvent(EVENT_CHEER, Seconds(1)); m_events.CancelEvent(EVENT_FIRE); } // New Year (Only!) - One more big bang! if ((localTm->tm_min == 10 && localTm->tm_sec == 30 && localTm->tm_hour == 0) && sGameEventMgr.IsActiveEvent(GAME_EVENT_FIREWORKS) && m_big == false) { m_big = true; m_events.ScheduleEvent(EVENT_CHEER, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); m_events.ScheduleEvent(EVENT_FIRE, Seconds(1)); } while (uint32 eventId = m_events.ExecuteEvent()) { switch (eventId) { case EVENT_CHEER: { me->PlayDistanceSound(CheerPicker()); break; } case EVENT_FIRE: { auto it = pos.find(me->GetZoneId()); if (it != pos.end()) { Position const& rndpos = SelectRandomContainerElement(it->second); float rndrot = frand(-1.0000000f, 1.0000000f); float rndrot2 = frand(-1.0000000f, 1.0000000f); if (m_big) { if (GameObject* firework = me->SummonGameObject(FireworksBIGOnlyPicker(), rndpos.x, rndpos.y, rndpos.z, rndpos.o, 0.f, 0.f, rndrot, rndrot2, 1)) { firework->SetRespawnTime(0); firework->Delete(); } } else { if (GameObject* firework = me->SummonGameObject(FireworksPicker(), rndpos.x, rndpos.y, rndpos.z, rndpos.o, 0.f, 0.f, rndrot, rndrot2, 1)) { firework->SetRespawnTime(0); firework->Delete(); } } } if (m_started == true) m_events.ScheduleEvent(EVENT_FIRE, Seconds(1), Seconds(2)); break; } default: break; } } } private: EventMap m_events; bool m_started; bool m_big; }; GameObjectAI* GetAI_go_cheer_speaker(GameObject* gameobject) { return new go_cheer_speakerAI(gameobject); } void AddSC_event_fireworks() { Script* newscript; newscript = new Script; newscript->Name = "go_cheer_speaker"; newscript->GOGetAI = &GetAI_go_cheer_speaker; newscript->RegisterSelf(); }
{ "pile_set_name": "Github" }
/* * Copyright (c) 1993, 1994, 1995, 1996, 1997 * 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: (1) source code distributions * retain the above copyright notice and this paragraph in its entirety, (2) * distributions including binary code include the above copyright notice and * this paragraph in its entirety in the documentation or other materials * provided with the distribution, and (3) all advertising materials mentioning * features or use of this software display the following acknowledgement: * ``This product includes software developed by the University of California, * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of * the University nor the names of its contributors may be used to endorse * or promote products derived from this software without specific prior * written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * pcap-common.c - common code for pcap and pcapng files */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <pcap-types.h> #include "pcap-int.h" #include "extract.h" #include "pcap/sll.h" #include "pcap/usb.h" #include "pcap/nflog.h" #include "pcap/can_socketcan.h" #include "pcap-common.h" /* * We don't write DLT_* values to capture files, because they're not the * same on all platforms. * * Unfortunately, the various flavors of BSD have not always used the same * numerical values for the same data types, and various patches to * libpcap for non-BSD OSes have added their own DLT_* codes for link * layer encapsulation types seen on those OSes, and those codes have had, * in some cases, values that were also used, on other platforms, for other * link layer encapsulation types. * * This means that capture files of a type whose numerical DLT_* code * means different things on different BSDs, or with different versions * of libpcap, can't always be read on systems other than those like * the one running on the machine on which the capture was made. * * Instead, we define here a set of LINKTYPE_* codes, and map DLT_* codes * to LINKTYPE_* codes when writing a savefile header, and map LINKTYPE_* * codes to DLT_* codes when reading a savefile header. * * For those DLT_* codes that have, as far as we know, the same values on * all platforms (DLT_NULL through DLT_FDDI), we define LINKTYPE_xxx as * DLT_xxx; that way, captures of those types can still be read by * versions of libpcap that map LINKTYPE_* values to DLT_* values, and * captures of those types written by versions of libpcap that map DLT_ * values to LINKTYPE_ values can still be read by older versions * of libpcap. * * The other LINKTYPE_* codes are given values starting at 100, in the * hopes that no DLT_* code will be given one of those values. * * In order to ensure that a given LINKTYPE_* code's value will refer to * the same encapsulation type on all platforms, you should not allocate * a new LINKTYPE_* value without consulting * "[email protected]". The tcpdump developers will * allocate a value for you, and will not subsequently allocate it to * anybody else; that value will be added to the "pcap.h" in the * tcpdump.org Git repository, so that a future libpcap release will * include it. * * You should, if possible, also contribute patches to libpcap and tcpdump * to handle the new encapsulation type, so that they can also be checked * into the tcpdump.org Git repository and so that they will appear in * future libpcap and tcpdump releases. * * Do *NOT* assume that any values after the largest value in this file * are available; you might not have the most up-to-date version of this * file, and new values after that one might have been assigned. Also, * do *NOT* use any values below 100 - those might already have been * taken by one (or more!) organizations. * * Any platform that defines additional DLT_* codes should: * * request a LINKTYPE_* code and value from tcpdump.org, * as per the above; * * add, in their version of libpcap, an entry to map * those DLT_* codes to the corresponding LINKTYPE_* * code; * * redefine, in their "net/bpf.h", any DLT_* values * that collide with the values used by their additional * DLT_* codes, to remove those collisions (but without * making them collide with any of the LINKTYPE_* * values equal to 50 or above; they should also avoid * defining DLT_* values that collide with those * LINKTYPE_* values, either). */ #define LINKTYPE_NULL DLT_NULL #define LINKTYPE_ETHERNET DLT_EN10MB /* also for 100Mb and up */ #define LINKTYPE_EXP_ETHERNET DLT_EN3MB /* 3Mb experimental Ethernet */ #define LINKTYPE_AX25 DLT_AX25 #define LINKTYPE_PRONET DLT_PRONET #define LINKTYPE_CHAOS DLT_CHAOS #define LINKTYPE_IEEE802_5 DLT_IEEE802 /* DLT_IEEE802 is used for 802.5 Token Ring */ #define LINKTYPE_ARCNET_BSD DLT_ARCNET /* BSD-style headers */ #define LINKTYPE_SLIP DLT_SLIP #define LINKTYPE_PPP DLT_PPP #define LINKTYPE_FDDI DLT_FDDI /* * LINKTYPE_PPP is for use when there might, or might not, be an RFC 1662 * PPP in HDLC-like framing header (with 0xff 0x03 before the PPP protocol * field) at the beginning of the packet. * * This is for use when there is always such a header; the address field * might be 0xff, for regular PPP, or it might be an address field for Cisco * point-to-point with HDLC framing as per section 4.3.1 of RFC 1547 ("Cisco * HDLC"). This is, for example, what you get with NetBSD's DLT_PPP_SERIAL. * * We give it the same value as NetBSD's DLT_PPP_SERIAL, in the hopes that * nobody else will choose a DLT_ value of 50, and so that DLT_PPP_SERIAL * captures will be written out with a link type that NetBSD's tcpdump * can read. */ #define LINKTYPE_PPP_HDLC 50 /* PPP in HDLC-like framing */ #define LINKTYPE_PPP_ETHER 51 /* NetBSD PPP-over-Ethernet */ #define LINKTYPE_SYMANTEC_FIREWALL 99 /* Symantec Enterprise Firewall */ /* * These correspond to DLT_s that have different values on different * platforms; we map between these values in capture files and * the DLT_ values as returned by pcap_datalink() and passed to * pcap_open_dead(). */ #define LINKTYPE_ATM_RFC1483 100 /* LLC/SNAP-encapsulated ATM */ #define LINKTYPE_RAW 101 /* raw IP */ #define LINKTYPE_SLIP_BSDOS 102 /* BSD/OS SLIP BPF header */ #define LINKTYPE_PPP_BSDOS 103 /* BSD/OS PPP BPF header */ /* * Values starting with 104 are used for newly-assigned link-layer * header type values; for those link-layer header types, the DLT_ * value returned by pcap_datalink() and passed to pcap_open_dead(), * and the LINKTYPE_ value that appears in capture files, are the * same. * * LINKTYPE_MATCHING_MIN is the lowest such value; LINKTYPE_MATCHING_MAX * is the highest such value. */ #define LINKTYPE_MATCHING_MIN 104 /* lowest value in the "matching" range */ #define LINKTYPE_C_HDLC 104 /* Cisco HDLC */ #define LINKTYPE_IEEE802_11 105 /* IEEE 802.11 (wireless) */ #define LINKTYPE_ATM_CLIP 106 /* Linux Classical IP over ATM */ #define LINKTYPE_FRELAY 107 /* Frame Relay */ #define LINKTYPE_LOOP 108 /* OpenBSD loopback */ #define LINKTYPE_ENC 109 /* OpenBSD IPSEC enc */ /* * These three types are reserved for future use. */ #define LINKTYPE_LANE8023 110 /* ATM LANE + 802.3 */ #define LINKTYPE_HIPPI 111 /* NetBSD HIPPI */ #define LINKTYPE_HDLC 112 /* NetBSD HDLC framing */ #define LINKTYPE_LINUX_SLL 113 /* Linux cooked socket capture */ #define LINKTYPE_LTALK 114 /* Apple LocalTalk hardware */ #define LINKTYPE_ECONET 115 /* Acorn Econet */ /* * Reserved for use with OpenBSD ipfilter. */ #define LINKTYPE_IPFILTER 116 #define LINKTYPE_PFLOG 117 /* OpenBSD DLT_PFLOG */ #define LINKTYPE_CISCO_IOS 118 /* For Cisco-internal use */ #define LINKTYPE_IEEE802_11_PRISM 119 /* 802.11 plus Prism II monitor mode radio metadata header */ #define LINKTYPE_IEEE802_11_AIRONET 120 /* 802.11 plus FreeBSD Aironet driver radio metadata header */ /* * Reserved for Siemens HiPath HDLC. */ #define LINKTYPE_HHDLC 121 #define LINKTYPE_IP_OVER_FC 122 /* RFC 2625 IP-over-Fibre Channel */ #define LINKTYPE_SUNATM 123 /* Solaris+SunATM */ /* * Reserved as per request from Kent Dahlgren <[email protected]> * for private use. */ #define LINKTYPE_RIO 124 /* RapidIO */ #define LINKTYPE_PCI_EXP 125 /* PCI Express */ #define LINKTYPE_AURORA 126 /* Xilinx Aurora link layer */ #define LINKTYPE_IEEE802_11_RADIOTAP 127 /* 802.11 plus radiotap radio metadata header */ /* * Reserved for the TZSP encapsulation, as per request from * Chris Waters <[email protected]> * TZSP is a generic encapsulation for any other link type, * which includes a means to include meta-information * with the packet, e.g. signal strength and channel * for 802.11 packets. */ #define LINKTYPE_TZSP 128 /* Tazmen Sniffer Protocol */ #define LINKTYPE_ARCNET_LINUX 129 /* Linux-style headers */ /* * Juniper-private data link types, as per request from * Hannes Gredler <[email protected]>. The corresponding * DLT_s are used for passing on chassis-internal * metainformation such as QOS profiles, etc.. */ #define LINKTYPE_JUNIPER_MLPPP 130 #define LINKTYPE_JUNIPER_MLFR 131 #define LINKTYPE_JUNIPER_ES 132 #define LINKTYPE_JUNIPER_GGSN 133 #define LINKTYPE_JUNIPER_MFR 134 #define LINKTYPE_JUNIPER_ATM2 135 #define LINKTYPE_JUNIPER_SERVICES 136 #define LINKTYPE_JUNIPER_ATM1 137 #define LINKTYPE_APPLE_IP_OVER_IEEE1394 138 /* Apple IP-over-IEEE 1394 cooked header */ #define LINKTYPE_MTP2_WITH_PHDR 139 #define LINKTYPE_MTP2 140 #define LINKTYPE_MTP3 141 #define LINKTYPE_SCCP 142 #define LINKTYPE_DOCSIS 143 /* DOCSIS MAC frames */ #define LINKTYPE_LINUX_IRDA 144 /* Linux-IrDA */ /* * Reserved for IBM SP switch and IBM Next Federation switch. */ #define LINKTYPE_IBM_SP 145 #define LINKTYPE_IBM_SN 146 /* * Reserved for private use. If you have some link-layer header type * that you want to use within your organization, with the capture files * using that link-layer header type not ever be sent outside your * organization, you can use these values. * * No libpcap release will use these for any purpose, nor will any * tcpdump release use them, either. * * Do *NOT* use these in capture files that you expect anybody not using * your private versions of capture-file-reading tools to read; in * particular, do *NOT* use them in products, otherwise you may find that * people won't be able to use tcpdump, or snort, or Ethereal, or... to * read capture files from your firewall/intrusion detection/traffic * monitoring/etc. appliance, or whatever product uses that LINKTYPE_ value, * and you may also find that the developers of those applications will * not accept patches to let them read those files. * * Also, do not use them if somebody might send you a capture using them * for *their* private type and tools using them for *your* private type * would have to read them. * * Instead, in those cases, ask "[email protected]" for a * new DLT_ and LINKTYPE_ value, as per the comment in pcap/bpf.h, and use * the type you're given. */ #define LINKTYPE_USER0 147 #define LINKTYPE_USER1 148 #define LINKTYPE_USER2 149 #define LINKTYPE_USER3 150 #define LINKTYPE_USER4 151 #define LINKTYPE_USER5 152 #define LINKTYPE_USER6 153 #define LINKTYPE_USER7 154 #define LINKTYPE_USER8 155 #define LINKTYPE_USER9 156 #define LINKTYPE_USER10 157 #define LINKTYPE_USER11 158 #define LINKTYPE_USER12 159 #define LINKTYPE_USER13 160 #define LINKTYPE_USER14 161 #define LINKTYPE_USER15 162 /* * For future use with 802.11 captures - defined by AbsoluteValue * Systems to store a number of bits of link-layer information * including radio information: * * http://www.shaftnet.org/~pizza/software/capturefrm.txt */ #define LINKTYPE_IEEE802_11_AVS 163 /* 802.11 plus AVS radio metadata header */ /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. The corresponding * DLT_s are used for passing on chassis-internal * metainformation such as QOS profiles, etc.. */ #define LINKTYPE_JUNIPER_MONITOR 164 /* * BACnet MS/TP frames. */ #define LINKTYPE_BACNET_MS_TP 165 /* * Another PPP variant as per request from Karsten Keil <[email protected]>. * * This is used in some OSes to allow a kernel socket filter to distinguish * between incoming and outgoing packets, on a socket intended to * supply pppd with outgoing packets so it can do dial-on-demand and * hangup-on-lack-of-demand; incoming packets are filtered out so they * don't cause pppd to hold the connection up (you don't want random * input packets such as port scans, packets from old lost connections, * etc. to force the connection to stay up). * * The first byte of the PPP header (0xff03) is modified to accomodate * the direction - 0x00 = IN, 0x01 = OUT. */ #define LINKTYPE_PPP_PPPD 166 /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. The DLT_s are used * for passing on chassis-internal metainformation such as * QOS profiles, cookies, etc.. */ #define LINKTYPE_JUNIPER_PPPOE 167 #define LINKTYPE_JUNIPER_PPPOE_ATM 168 #define LINKTYPE_GPRS_LLC 169 /* GPRS LLC */ #define LINKTYPE_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */ #define LINKTYPE_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */ /* * Requested by Oolan Zimmer <[email protected]> for use in Gcom's T1/E1 line * monitoring equipment. */ #define LINKTYPE_GCOM_T1E1 172 #define LINKTYPE_GCOM_SERIAL 173 /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. The DLT_ is used * for internal communication to Physical Interface Cards (PIC) */ #define LINKTYPE_JUNIPER_PIC_PEER 174 /* * Link types requested by Gregor Maier <[email protected]> of Endace * Measurement Systems. They add an ERF header (see * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of * the link-layer header. */ #define LINKTYPE_ERF_ETH 175 /* Ethernet */ #define LINKTYPE_ERF_POS 176 /* Packet-over-SONET */ /* * Requested by Daniele Orlandi <[email protected]> for raw LAPD * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header * includes additional information before the LAPD header, so it's * not necessarily a generic LAPD header. */ #define LINKTYPE_LINUX_LAPD 177 /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. * The Link Types are used for prepending meta-information * like interface index, interface name * before standard Ethernet, PPP, Frelay & C-HDLC Frames */ #define LINKTYPE_JUNIPER_ETHER 178 #define LINKTYPE_JUNIPER_PPP 179 #define LINKTYPE_JUNIPER_FRELAY 180 #define LINKTYPE_JUNIPER_CHDLC 181 /* * Multi Link Frame Relay (FRF.16) */ #define LINKTYPE_MFR 182 /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. * The DLT_ is used for internal communication with a * voice Adapter Card (PIC) */ #define LINKTYPE_JUNIPER_VP 183 /* * Arinc 429 frames. * DLT_ requested by Gianluca Varenni <[email protected]>. * Every frame contains a 32bit A429 label. * More documentation on Arinc 429 can be found at * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf */ #define LINKTYPE_A429 184 /* * Arinc 653 Interpartition Communication messages. * DLT_ requested by Gianluca Varenni <[email protected]>. * Please refer to the A653-1 standard for more information. */ #define LINKTYPE_A653_ICM 185 /* * This used to be "USB packets, beginning with a USB setup header; * requested by Paolo Abeni <[email protected]>." * * However, that header didn't work all that well - it left out some * useful information - and was abandoned in favor of the DLT_USB_LINUX * header. * * This is now used by FreeBSD for its BPF taps for USB; that has its * own headers. So it is written, so it is done. */ #define LINKTYPE_USB_FREEBSD 186 /* * Bluetooth HCI UART transport layer (part H:4); requested by * Paolo Abeni. */ #define LINKTYPE_BLUETOOTH_HCI_H4 187 /* * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz * <[email protected]>. */ #define LINKTYPE_IEEE802_16_MAC_CPS 188 /* * USB packets, beginning with a Linux USB header; requested by * Paolo Abeni <[email protected]>. */ #define LINKTYPE_USB_LINUX 189 /* * Controller Area Network (CAN) v. 2.0B packets. * DLT_ requested by Gianluca Varenni <[email protected]>. * Used to dump CAN packets coming from a CAN Vector board. * More documentation on the CAN v2.0B frames can be found at * http://www.can-cia.org/downloads/?269 */ #define LINKTYPE_CAN20B 190 /* * IEEE 802.15.4, with address fields padded, as is done by Linux * drivers; requested by Juergen Schimmer. */ #define LINKTYPE_IEEE802_15_4_LINUX 191 /* * Per Packet Information encapsulated packets. * LINKTYPE_ requested by Gianluca Varenni <[email protected]>. */ #define LINKTYPE_PPI 192 /* * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header; * requested by Charles Clancy. */ #define LINKTYPE_IEEE802_16_MAC_CPS_RADIO 193 /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. * The DLT_ is used for internal communication with a * integrated service module (ISM). */ #define LINKTYPE_JUNIPER_ISM 194 /* * IEEE 802.15.4, exactly as it appears in the spec (no padding, no * nothing), and with the FCS at the end of the frame; requested by * Mikko Saarnivala <[email protected]>. * * This should only be used if the FCS is present at the end of the * frame; if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be * used. */ #define LINKTYPE_IEEE802_15_4_WITHFCS 195 /* * Various link-layer types, with a pseudo-header, for SITA * (http://www.sita.aero/); requested by Fulko Hew ([email protected]). */ #define LINKTYPE_SITA 196 /* * Various link-layer types, with a pseudo-header, for Endace DAG cards; * encapsulates Endace ERF records. Requested by Stephen Donnelly * <[email protected]>. */ #define LINKTYPE_ERF 197 /* * Special header prepended to Ethernet packets when capturing from a * u10 Networks board. Requested by Phil Mulholland * <[email protected]>. */ #define LINKTYPE_RAIF1 198 /* * IPMB packet for IPMI, beginning with a 2-byte header, followed by * the I2C slave address, followed by the netFn and LUN, etc.. * Requested by Chanthy Toeung <[email protected]>. * * XXX - its DLT_ value used to be called DLT_IPMB, back when we got the * impression from the email thread requesting it that the packet * had no extra 2-byte header. We've renamed it; if anybody used * DLT_IPMB and assumed no 2-byte header, this will cause the compile * to fail, at which point we'll have to figure out what to do about * the two header types using the same DLT_/LINKTYPE_ value. If that * doesn't happen, we'll assume nobody used it and that the redefinition * is safe. */ #define LINKTYPE_IPMB_KONTRON 199 /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. * The DLT_ is used for capturing data on a secure tunnel interface. */ #define LINKTYPE_JUNIPER_ST 200 /* * Bluetooth HCI UART transport layer (part H:4), with pseudo-header * that includes direction information; requested by Paolo Abeni. */ #define LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR 201 /* * AX.25 packet with a 1-byte KISS header; see * * http://www.ax25.net/kiss.htm * * as per Richard Stearn <[email protected]>. */ #define LINKTYPE_AX25_KISS 202 /* * LAPD packets from an ISDN channel, starting with the address field, * with no pseudo-header. * Requested by Varuna De Silva <[email protected]>. */ #define LINKTYPE_LAPD 203 /* * PPP, with a one-byte direction pseudo-header prepended - zero means * "received by this host", non-zero (any non-zero value) means "sent by * this host" - as per Will Barker <[email protected]>. */ #define LINKTYPE_PPP_WITH_DIR 204 /* Don't confuse with LINKTYPE_PPP_PPPD */ /* * Cisco HDLC, with a one-byte direction pseudo-header prepended - zero * means "received by this host", non-zero (any non-zero value) means * "sent by this host" - as per Will Barker <[email protected]>. */ #define LINKTYPE_C_HDLC_WITH_DIR 205 /* Cisco HDLC */ /* * Frame Relay, with a one-byte direction pseudo-header prepended - zero * means "received by this host" (DCE -> DTE), non-zero (any non-zero * value) means "sent by this host" (DTE -> DCE) - as per Will Barker * <[email protected]>. */ #define LINKTYPE_FRELAY_WITH_DIR 206 /* Frame Relay */ /* * LAPB, with a one-byte direction pseudo-header prepended - zero means * "received by this host" (DCE -> DTE), non-zero (any non-zero value) * means "sent by this host" (DTE -> DCE)- as per Will Barker * <[email protected]>. */ #define LINKTYPE_LAPB_WITH_DIR 207 /* LAPB */ /* * 208 is reserved for an as-yet-unspecified proprietary link-layer * type, as requested by Will Barker. */ /* * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman * <[email protected]>. */ #define LINKTYPE_IPMB_LINUX 209 /* * FlexRay automotive bus - http://www.flexray.com/ - as requested * by Hannes Kaelber <[email protected]>. */ #define LINKTYPE_FLEXRAY 210 /* * Media Oriented Systems Transport (MOST) bus for multimedia * transport - http://www.mostcooperation.com/ - as requested * by Hannes Kaelber <[email protected]>. */ #define LINKTYPE_MOST 211 /* * Local Interconnect Network (LIN) bus for vehicle networks - * http://www.lin-subbus.org/ - as requested by Hannes Kaelber * <[email protected]>. */ #define LINKTYPE_LIN 212 /* * X2E-private data link type used for serial line capture, * as requested by Hannes Kaelber <[email protected]>. */ #define LINKTYPE_X2E_SERIAL 213 /* * X2E-private data link type used for the Xoraya data logger * family, as requested by Hannes Kaelber <[email protected]>. */ #define LINKTYPE_X2E_XORAYA 214 /* * IEEE 802.15.4, exactly as it appears in the spec (no padding, no * nothing), but with the PHY-level data for non-ASK PHYs (4 octets * of 0 as preamble, one octet of SFD, one octet of frame length+ * reserved bit, and then the MAC-layer data, starting with the * frame control field). * * Requested by Max Filippov <[email protected]>. */ #define LINKTYPE_IEEE802_15_4_NONASK_PHY 215 /* * David Gibson <[email protected]> requested this for * captures from the Linux kernel /dev/input/eventN devices. This * is used to communicate keystrokes and mouse movements from the * Linux kernel to display systems, such as Xorg. */ #define LINKTYPE_LINUX_EVDEV 216 /* * GSM Um and Abis interfaces, preceded by a "gsmtap" header. * * Requested by Harald Welte <[email protected]>. */ #define LINKTYPE_GSMTAP_UM 217 #define LINKTYPE_GSMTAP_ABIS 218 /* * MPLS, with an MPLS label as the link-layer header. * Requested by Michele Marchetto <[email protected]> on behalf * of OpenBSD. */ #define LINKTYPE_MPLS 219 /* * USB packets, beginning with a Linux USB header, with the USB header * padded to 64 bytes; required for memory-mapped access. */ #define LINKTYPE_USB_LINUX_MMAPPED 220 /* * DECT packets, with a pseudo-header; requested by * Matthias Wenzel <[email protected]>. */ #define LINKTYPE_DECT 221 /* * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <[email protected]> * Date: Mon, 11 May 2009 11:18:30 -0500 * * DLT_AOS. We need it for AOS Space Data Link Protocol. * I have already written dissectors for but need an OK from * legal before I can submit a patch. * */ #define LINKTYPE_AOS 222 /* * Wireless HART (Highway Addressable Remote Transducer) * From the HART Communication Foundation * IES/PAS 62591 * * Requested by Sam Roberts <[email protected]>. */ #define LINKTYPE_WIHART 223 /* * Fibre Channel FC-2 frames, beginning with a Frame_Header. * Requested by Kahou Lei <[email protected]>. */ #define LINKTYPE_FC_2 224 /* * Fibre Channel FC-2 frames, beginning with an encoding of the * SOF, and ending with an encoding of the EOF. * * The encodings represent the frame delimiters as 4-byte sequences * representing the corresponding ordered sets, with K28.5 * represented as 0xBC, and the D symbols as the corresponding * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2, * is represented as 0xBC 0xB5 0x55 0x55. * * Requested by Kahou Lei <[email protected]>. */ #define LINKTYPE_FC_2_WITH_FRAME_DELIMS 225 /* * Solaris ipnet pseudo-header; requested by Darren Reed <[email protected]>. * * The pseudo-header starts with a one-byte version number; for version 2, * the pseudo-header is: * * struct dl_ipnetinfo { * uint8_t dli_version; * uint8_t dli_family; * uint16_t dli_htype; * uint32_t dli_pktlen; * uint32_t dli_ifindex; * uint32_t dli_grifindex; * uint32_t dli_zsrc; * uint32_t dli_zdst; * }; * * dli_version is 2 for the current version of the pseudo-header. * * dli_family is a Solaris address family value, so it's 2 for IPv4 * and 26 for IPv6. * * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing * packets, and 2 for packets arriving from another zone on the same * machine. * * dli_pktlen is the length of the packet data following the pseudo-header * (so the captured length minus dli_pktlen is the length of the * pseudo-header, assuming the entire pseudo-header was captured). * * dli_ifindex is the interface index of the interface on which the * packet arrived. * * dli_grifindex is the group interface index number (for IPMP interfaces). * * dli_zsrc is the zone identifier for the source of the packet. * * dli_zdst is the zone identifier for the destination of the packet. * * A zone number of 0 is the global zone; a zone number of 0xffffffff * means that the packet arrived from another host on the network, not * from another zone on the same machine. * * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates * which of those it is. */ #define LINKTYPE_IPNET 226 /* * CAN (Controller Area Network) frames, with a pseudo-header as supplied * by Linux SocketCAN, and with multi-byte numerical fields in that header * in big-endian byte order. * * See Documentation/networking/can.txt in the Linux source. * * Requested by Felix Obenhuber <[email protected]>. */ #define LINKTYPE_CAN_SOCKETCAN 227 /* * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies * whether it's v4 or v6. Requested by Darren Reed <[email protected]>. */ #define LINKTYPE_IPV4 228 #define LINKTYPE_IPV6 229 /* * IEEE 802.15.4, exactly as it appears in the spec (no padding, no * nothing), and with no FCS at the end of the frame; requested by * Jon Smirl <[email protected]>. */ #define LINKTYPE_IEEE802_15_4_NOFCS 230 /* * Raw D-Bus: * * http://www.freedesktop.org/wiki/Software/dbus * * messages: * * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages * * starting with the endianness flag, followed by the message type, etc., * but without the authentication handshake before the message sequence: * * http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol * * Requested by Martin Vidner <[email protected]>. */ #define LINKTYPE_DBUS 231 /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. */ #define LINKTYPE_JUNIPER_VS 232 #define LINKTYPE_JUNIPER_SRX_E2E 233 #define LINKTYPE_JUNIPER_FIBRECHANNEL 234 /* * DVB-CI (DVB Common Interface for communication between a PC Card * module and a DVB receiver). See * * http://www.kaiser.cx/pcap-dvbci.html * * for the specification. * * Requested by Martin Kaiser <[email protected]>. */ #define LINKTYPE_DVB_CI 235 /* * Variant of 3GPP TS 27.010 multiplexing protocol. Requested * by Hans-Christoph Schemmel <[email protected]>. */ #define LINKTYPE_MUX27010 236 /* * STANAG 5066 D_PDUs. Requested by M. Baris Demiray * <[email protected]>. */ #define LINKTYPE_STANAG_5066_D_PDU 237 /* * Juniper-private data link type, as per request from * Hannes Gredler <[email protected]>. */ #define LINKTYPE_JUNIPER_ATM_CEMIC 238 /* * NetFilter LOG messages * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets) * * Requested by Jakub Zawadzki <[email protected]> */ #define LINKTYPE_NFLOG 239 /* * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type * for Ethernet packets with a 4-byte pseudo-header and always * with the payload including the FCS, as supplied by their * netANALYZER hardware and software. * * Requested by Holger P. Frommer <[email protected]> */ #define LINKTYPE_NETANALYZER 240 /* * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type * for Ethernet packets with a 4-byte pseudo-header and FCS and * 1 byte of SFD, as supplied by their netANALYZER hardware and * software. * * Requested by Holger P. Frommer <[email protected]> */ #define LINKTYPE_NETANALYZER_TRANSPARENT 241 /* * IP-over-InfiniBand, as specified by RFC 4391. * * Requested by Petr Sumbera <[email protected]>. */ #define LINKTYPE_IPOIB 242 /* * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0). * * Requested by Guy Martin <[email protected]>. */ #define LINKTYPE_MPEG_2_TS 243 /* * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as * used by their ng40 protocol tester. * * Requested by Jens Grimmer <[email protected]>. */ #define LINKTYPE_NG40 244 /* * Pseudo-header giving adapter number and flags, followed by an NFC * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU, * as specified by NFC Forum Logical Link Control Protocol Technical * Specification LLCP 1.1. * * Requested by Mike Wakerly <[email protected]>. */ #define LINKTYPE_NFC_LLCP 245 /* * pfsync output; DLT_PFSYNC is 18, which collides with DLT_CIP in * SuSE 6.3, on OpenBSD, NetBSD, DragonFly BSD, and macOS, and * is 121, which collides with DLT_HHDLC, in FreeBSD. We pick a * shiny new link-layer header type value that doesn't collide with * anything, in the hopes that future pfsync savefiles, if any, * won't require special hacks to distinguish from other savefiles. * */ #define LINKTYPE_PFSYNC 246 /* * Raw InfiniBand packets, starting with the Local Routing Header. * * Requested by Oren Kladnitsky <[email protected]>. */ #define LINKTYPE_INFINIBAND 247 /* * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6). * * Requested by Michael Tuexen <[email protected]>. */ #define LINKTYPE_SCTP 248 /* * USB packets, beginning with a USBPcap header. * * Requested by Tomasz Mon <[email protected]> */ #define LINKTYPE_USBPCAP 249 /* * Schweitzer Engineering Laboratories "RTAC" product serial-line * packets. * * Requested by Chris Bontje <[email protected]>. */ #define DLT_RTAC_SERIAL 250 /* * Bluetooth Low Energy air interface link-layer packets. * * Requested by Mike Kershaw <[email protected]>. */ #define LINKTYPE_BLUETOOTH_LE_LL 251 /* * Link-layer header type for upper-protocol layer PDU saves from wireshark. * * the actual contents are determined by two TAGs stored with each * packet: * EXP_PDU_TAG_LINKTYPE the link type (LINKTYPE_ value) of the * original packet. * * EXP_PDU_TAG_PROTO_NAME the name of the wireshark dissector * that can make sense of the data stored. */ #define LINKTYPE_WIRESHARK_UPPER_PDU 252 /* * Link-layer header type for the netlink protocol (nlmon devices). */ #define LINKTYPE_NETLINK 253 /* * Bluetooth Linux Monitor headers for the BlueZ stack. */ #define LINKTYPE_BLUETOOTH_LINUX_MONITOR 254 /* * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as * captured by Ubertooth. */ #define LINKTYPE_BLUETOOTH_BREDR_BB 255 /* * Bluetooth Low Energy link layer packets, as captured by Ubertooth. */ #define LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR 256 /* * PROFIBUS data link layer. */ #define LINKTYPE_PROFIBUS_DL 257 /* * Apple's DLT_PKTAP headers. * * Sadly, the folks at Apple either had no clue that the DLT_USERn values * are for internal use within an organization and partners only, and * didn't know that the right way to get a link-layer header type is to * ask tcpdump.org for one, or knew and didn't care, so they just * used DLT_USER2, which causes problems for everything except for * their version of tcpdump. * * So I'll just give them one; hopefully this will show up in a * libpcap release in time for them to get this into 10.10 Big Sur * or whatever Mavericks' successor is called. LINKTYPE_PKTAP * will be 258 *even on macOS*; that is *intentional*, so that * PKTAP files look the same on *all* OSes (different OSes can have * different numerical values for a given DLT_, but *MUST NOT* have * different values for what goes in a file, as files can be moved * between OSes!). */ #define LINKTYPE_PKTAP 258 /* * Ethernet packets preceded by a header giving the last 6 octets * of the preamble specified by 802.3-2012 Clause 65, section * 65.1.3.2 "Transmit". */ #define LINKTYPE_EPON 259 /* * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format" * in the PICMG HPM.2 specification. */ #define LINKTYPE_IPMI_HPM_2 260 /* * per Joshua Wright <[email protected]>, formats for Zwave captures. */ #define LINKTYPE_ZWAVE_R1_R2 261 #define LINKTYPE_ZWAVE_R3 262 /* * per Steve Karg <[email protected]>, formats for Wattstopper * Digital Lighting Management room bus serial protocol captures. */ #define LINKTYPE_WATTSTOPPER_DLM 263 /* * ISO 14443 contactless smart card messages. */ #define LINKTYPE_ISO_14443 264 /* * Radio data system (RDS) groups. IEC 62106. * Per Jonathan Brucker <[email protected]>. */ #define LINKTYPE_RDS 265 /* * USB packets, beginning with a Darwin (macOS, etc.) header. */ #define LINKTYPE_USB_DARWIN 266 /* * OpenBSD DLT_OPENFLOW. */ #define LINKTYPE_OPENFLOW 267 /* * SDLC frames containing SNA PDUs. */ #define LINKTYPE_SDLC 268 /* * per "Selvig, Bjorn" <[email protected]> used for * TI protocol sniffer. */ #define LINKTYPE_TI_LLN_SNIFFER 269 /* * per: Erik de Jong <erikdejong at gmail.com> for * https://github.com/eriknl/LoRaTap/releases/tag/v0.1 */ #define LINKTYPE_LORATAP 270 /* * per: Stefanha at gmail.com for * http://lists.sandelman.ca/pipermail/tcpdump-workers/2017-May/000772.html * and: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/vsockmon.h * for: http://qemu-project.org/Features/VirtioVsock */ #define LINKTYPE_VSOCK 271 /* * Nordic Semiconductor Bluetooth LE sniffer. */ #define LINKTYPE_NORDIC_BLE 272 /* * Excentis DOCSIS 3.1 RF sniffer (XRA-31) * per: bruno.verstuyft at excentis.com * http://www.xra31.com/xra-header */ #define LINKTYPE_DOCSIS31_XRA31 273 /* * mPackets, as specified by IEEE 802.3br Figure 99-4, starting * with the preamble and always ending with a CRC field. */ #define LINKTYPE_ETHERNET_MPACKET 274 /* * DisplayPort AUX channel monitoring data as specified by VESA * DisplayPort(DP) Standard preceeded by a pseudo-header. * per dirk.eibach at gdsys.cc */ #define LINKTYPE_DISPLAYPORT_AUX 275 /* * Linux cooked sockets v2. */ #define LINKTYPE_LINUX_SLL2 276 #define LINKTYPE_MATCHING_MAX 276 /* highest value in the "matching" range */ /* * The DLT_ and LINKTYPE_ values in the "matching" range should be the * same, so DLT_MATCHING_MAX and LINKTYPE_MATCHING_MAX should be the * same. */ #if LINKTYPE_MATCHING_MAX != DLT_MATCHING_MAX #error The LINKTYPE_ matching range does not match the DLT_ matching range #endif static struct linktype_map { int dlt; int linktype; } map[] = { /* * These DLT_* codes have LINKTYPE_* codes with values identical * to the values of the corresponding DLT_* code. */ { DLT_NULL, LINKTYPE_NULL }, { DLT_EN10MB, LINKTYPE_ETHERNET }, { DLT_EN3MB, LINKTYPE_EXP_ETHERNET }, { DLT_AX25, LINKTYPE_AX25 }, { DLT_PRONET, LINKTYPE_PRONET }, { DLT_CHAOS, LINKTYPE_CHAOS }, { DLT_IEEE802, LINKTYPE_IEEE802_5 }, { DLT_ARCNET, LINKTYPE_ARCNET_BSD }, { DLT_SLIP, LINKTYPE_SLIP }, { DLT_PPP, LINKTYPE_PPP }, { DLT_FDDI, LINKTYPE_FDDI }, { DLT_SYMANTEC_FIREWALL, LINKTYPE_SYMANTEC_FIREWALL }, /* * These DLT_* codes have different values on different * platforms; we map them to LINKTYPE_* codes that * have values that should never be equal to any DLT_* * code. */ #ifdef DLT_FR /* BSD/OS Frame Relay */ { DLT_FR, LINKTYPE_FRELAY }, #endif { DLT_ATM_RFC1483, LINKTYPE_ATM_RFC1483 }, { DLT_RAW, LINKTYPE_RAW }, { DLT_SLIP_BSDOS, LINKTYPE_SLIP_BSDOS }, { DLT_PPP_BSDOS, LINKTYPE_PPP_BSDOS }, /* BSD/OS Cisco HDLC */ { DLT_C_HDLC, LINKTYPE_C_HDLC }, /* * These DLT_* codes are not on all platforms, but, so far, * there don't appear to be any platforms that define * other codes with those values; we map them to * different LINKTYPE_* values anyway, just in case. */ /* Linux ATM Classical IP */ { DLT_ATM_CLIP, LINKTYPE_ATM_CLIP }, /* NetBSD sync/async serial PPP (or Cisco HDLC) */ { DLT_PPP_SERIAL, LINKTYPE_PPP_HDLC }, /* NetBSD PPP over Ethernet */ { DLT_PPP_ETHER, LINKTYPE_PPP_ETHER }, /* * All LINKTYPE_ values between LINKTYPE_MATCHING_MIN * and LINKTYPE_MATCHING_MAX are mapped to identical * DLT_ values. */ { -1, -1 } }; int dlt_to_linktype(int dlt) { int i; /* * DLTs that, on some platforms, have values in the matching range * but that *don't* have the same value as the corresponding * LINKTYPE because, for some reason, not all OSes have the * same value for that DLT (note that the DLT's value might be * outside the matching range on some of those OSes). */ if (dlt == DLT_PFSYNC) return (LINKTYPE_PFSYNC); if (dlt == DLT_PKTAP) return (LINKTYPE_PKTAP); /* * For all other values in the matching range, the DLT * value is the same as the LINKTYPE value. */ if (dlt >= DLT_MATCHING_MIN && dlt <= DLT_MATCHING_MAX) return (dlt); /* * Map the values outside that range. */ for (i = 0; map[i].dlt != -1; i++) { if (map[i].dlt == dlt) return (map[i].linktype); } /* * If we don't have a mapping for this DLT, return an * error; that means that this is a value with no corresponding * LINKTYPE, and we need to assign one. */ return (-1); } int linktype_to_dlt(int linktype) { int i; /* * LINKTYPEs in the matching range that *don't* * have the same value as the corresponding DLTs * because, for some reason, not all OSes have the * same value for that DLT. */ if (linktype == LINKTYPE_PFSYNC) return (DLT_PFSYNC); if (linktype == LINKTYPE_PKTAP) return (DLT_PKTAP); /* * For all other values in the matching range, the LINKTYPE * value is the same as the DLT value. */ if (linktype >= LINKTYPE_MATCHING_MIN && linktype <= LINKTYPE_MATCHING_MAX) return (linktype); /* * Map the values outside that range. */ for (i = 0; map[i].linktype != -1; i++) { if (map[i].linktype == linktype) return (map[i].dlt); } /* * If we don't have an entry for this LINKTYPE, return * the link type value; it may be a DLT from an older * version of libpcap. */ return linktype; } /* * Return the maximum snapshot length for a given DLT_ value. * * For most link-layer types, we use MAXIMUM_SNAPLEN. * * For DLT_DBUS, the maximum is 128MiB, as per * * https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages * * For DLT_USBPCAP, the maximum is 1MiB, as per * * https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15985 */ u_int max_snaplen_for_dlt(int dlt) { switch (dlt) { case DLT_DBUS: return 128*1024*1024; case DLT_USBPCAP: return 1024*1024; default: return MAXIMUM_SNAPLEN; } } /* * DLT_LINUX_SLL packets with a protocol type of LINUX_SLL_P_CAN or * LINUX_SLL_P_CANFD have SocketCAN headers in front of the payload, * with the CAN ID being in host byte order. * * When reading a DLT_LINUX_SLL capture file, we need to check for those * packets and convert the CAN ID from the byte order of the host that * wrote the file to this host's byte order. */ static void swap_linux_sll_header(const struct pcap_pkthdr *hdr, u_char *buf) { u_int caplen = hdr->caplen; u_int length = hdr->len; struct sll_header *shdr = (struct sll_header *)buf; uint16_t protocol; pcap_can_socketcan_hdr *chdr; if (caplen < (u_int) sizeof(struct sll_header) || length < (u_int) sizeof(struct sll_header)) { /* Not enough data to have the protocol field */ return; } protocol = EXTRACT_16BITS(&shdr->sll_protocol); if (protocol != LINUX_SLL_P_CAN && protocol != LINUX_SLL_P_CANFD) return; /* * SocketCAN packet; fix up the packet's header. */ chdr = (pcap_can_socketcan_hdr *)(buf + sizeof(struct sll_header)); if (caplen < (u_int) sizeof(struct sll_header) + sizeof(chdr->can_id) || length < (u_int) sizeof(struct sll_header) + sizeof(chdr->can_id)) { /* Not enough data to have the CAN ID */ return; } chdr->can_id = SWAPLONG(chdr->can_id); } /* * The DLT_USB_LINUX and DLT_USB_LINUX_MMAPPED headers are in host * byte order when capturing (it's supplied directly from a * memory-mapped buffer shared by the kernel). * * When reading a DLT_USB_LINUX or DLT_USB_LINUX_MMAPPED capture file, * we need to convert it from the byte order of the host that wrote * the file to this host's byte order. */ static void swap_linux_usb_header(const struct pcap_pkthdr *hdr, u_char *buf, int header_len_64_bytes) { pcap_usb_header_mmapped *uhdr = (pcap_usb_header_mmapped *)buf; bpf_u_int32 offset = 0; /* * "offset" is the offset *past* the field we're swapping; * we skip the field *before* checking to make sure * the captured data length includes the entire field. */ /* * The URB id is a totally opaque value; do we really need to * convert it to the reading host's byte order??? */ offset += 8; /* skip past id */ if (hdr->caplen < offset) return; uhdr->id = SWAPLL(uhdr->id); offset += 4; /* skip past various 1-byte fields */ offset += 2; /* skip past bus_id */ if (hdr->caplen < offset) return; uhdr->bus_id = SWAPSHORT(uhdr->bus_id); offset += 2; /* skip past various 1-byte fields */ offset += 8; /* skip past ts_sec */ if (hdr->caplen < offset) return; uhdr->ts_sec = SWAPLL(uhdr->ts_sec); offset += 4; /* skip past ts_usec */ if (hdr->caplen < offset) return; uhdr->ts_usec = SWAPLONG(uhdr->ts_usec); offset += 4; /* skip past status */ if (hdr->caplen < offset) return; uhdr->status = SWAPLONG(uhdr->status); offset += 4; /* skip past urb_len */ if (hdr->caplen < offset) return; uhdr->urb_len = SWAPLONG(uhdr->urb_len); offset += 4; /* skip past data_len */ if (hdr->caplen < offset) return; uhdr->data_len = SWAPLONG(uhdr->data_len); if (uhdr->transfer_type == URB_ISOCHRONOUS) { offset += 4; /* skip past s.iso.error_count */ if (hdr->caplen < offset) return; uhdr->s.iso.error_count = SWAPLONG(uhdr->s.iso.error_count); offset += 4; /* skip past s.iso.numdesc */ if (hdr->caplen < offset) return; uhdr->s.iso.numdesc = SWAPLONG(uhdr->s.iso.numdesc); } else offset += 8; /* skip USB setup header */ /* * With the old header, there are no isochronous descriptors * after the header. * * With the new header, the actual number of descriptors in * the header is not s.iso.numdesc, it's ndesc - only the * first N descriptors, for some value of N, are put into * the header, and ndesc is set to the actual number copied. * In addition, if s.iso.numdesc is negative, no descriptors * are captured, and ndesc is set to 0. */ if (header_len_64_bytes) { /* * This is either the "version 1" header, with * 16 bytes of additional fields at the end, or * a "version 0" header from a memory-mapped * capture, with 16 bytes of zeroed-out padding * at the end. Byte swap them as if this were * a "version 1" header. */ offset += 4; /* skip past interval */ if (hdr->caplen < offset) return; uhdr->interval = SWAPLONG(uhdr->interval); offset += 4; /* skip past start_frame */ if (hdr->caplen < offset) return; uhdr->start_frame = SWAPLONG(uhdr->start_frame); offset += 4; /* skip past xfer_flags */ if (hdr->caplen < offset) return; uhdr->xfer_flags = SWAPLONG(uhdr->xfer_flags); offset += 4; /* skip past ndesc */ if (hdr->caplen < offset) return; uhdr->ndesc = SWAPLONG(uhdr->ndesc); if (uhdr->transfer_type == URB_ISOCHRONOUS) { /* swap the values in struct linux_usb_isodesc */ usb_isodesc *pisodesc; uint32_t i; pisodesc = (usb_isodesc *)(void *)(buf+offset); for (i = 0; i < uhdr->ndesc; i++) { offset += 4; /* skip past status */ if (hdr->caplen < offset) return; pisodesc->status = SWAPLONG(pisodesc->status); offset += 4; /* skip past offset */ if (hdr->caplen < offset) return; pisodesc->offset = SWAPLONG(pisodesc->offset); offset += 4; /* skip past len */ if (hdr->caplen < offset) return; pisodesc->len = SWAPLONG(pisodesc->len); offset += 4; /* skip past padding */ pisodesc++; } } } } /* * The DLT_NFLOG "packets" have a mixture of big-endian and host-byte-order * data. They begin with a fixed-length header with big-endian fields, * followed by a set of TLVs, where the type and length are in host * byte order but the values are either big-endian or are a raw byte * sequence that's the same regardless of the host's byte order. * * When reading a DLT_NFLOG capture file, we need to convert the type * and length values from the byte order of the host that wrote the * file to the byte order of this host. */ static void swap_nflog_header(const struct pcap_pkthdr *hdr, u_char *buf) { u_char *p = buf; nflog_hdr_t *nfhdr = (nflog_hdr_t *)buf; nflog_tlv_t *tlv; u_int caplen = hdr->caplen; u_int length = hdr->len; uint16_t size; if (caplen < (u_int) sizeof(nflog_hdr_t) || length < (u_int) sizeof(nflog_hdr_t)) { /* Not enough data to have any TLVs. */ return; } if (nfhdr->nflog_version != 0) { /* Unknown NFLOG version */ return; } length -= sizeof(nflog_hdr_t); caplen -= sizeof(nflog_hdr_t); p += sizeof(nflog_hdr_t); while (caplen >= sizeof(nflog_tlv_t)) { tlv = (nflog_tlv_t *) p; /* Swap the type and length. */ tlv->tlv_type = SWAPSHORT(tlv->tlv_type); tlv->tlv_length = SWAPSHORT(tlv->tlv_length); /* Get the length of the TLV. */ size = tlv->tlv_length; if (size % 4 != 0) size += 4 - size % 4; /* Is the TLV's length less than the minimum? */ if (size < sizeof(nflog_tlv_t)) { /* Yes. Give up now. */ return; } /* Do we have enough data for the full TLV? */ if (caplen < size || length < size) { /* No. */ return; } /* Skip over the TLV. */ length -= size; caplen -= size; p += size; } } void swap_pseudo_headers(int linktype, struct pcap_pkthdr *hdr, u_char *data) { /* * Convert pseudo-headers from the byte order of * the host on which the file was saved to our * byte order, as necessary. */ switch (linktype) { case DLT_LINUX_SLL: swap_linux_sll_header(hdr, data); break; case DLT_USB_LINUX: swap_linux_usb_header(hdr, data, 0); break; case DLT_USB_LINUX_MMAPPED: swap_linux_usb_header(hdr, data, 1); break; case DLT_NFLOG: swap_nflog_header(hdr, data); break; } }
{ "pile_set_name": "Github" }
/** * \file lib/fprint.c */ #include "system.h" #include <rpm/rpmfileutil.h> /* for rpmCleanPath */ #include <rpm/rpmts.h> #include <rpm/rpmsq.h> #include "lib/rpmdb_internal.h" #include "lib/rpmfi_internal.h" #include "lib/rpmte_internal.h" #include "lib/fprint.h" #include "lib/misc.h" #include "debug.h" #include <libgen.h> /* Create new hash table type rpmFpEntryHash */ #undef HASHTYPE #undef HTKEYTYPE #undef HTDATATYPE #define HASHTYPE rpmFpEntryHash #define HTKEYTYPE rpmsid #define HTDATATYPE const struct fprintCacheEntry_s * #include "lib/rpmhash.H" #include "lib/rpmhash.C" /* Create by-fingerprint hash table */ #undef HASHTYPE #undef HTKEYTYPE #undef HTDATATYPE #define HASHTYPE rpmFpHash #define HTKEYTYPE const fingerPrint * #define HTDATATYPE struct rpmffi_s #include "lib/rpmhash.H" #include "lib/rpmhash.C" #undef HASHTYPE #undef HTKEYTYPE #undef HTDATATYPE static unsigned int sidHash(rpmsid sid) { return sid; } static int sidCmp(rpmsid a, rpmsid b) { return (a != b); } /** * Finger print cache entry. * This is really a directory and symlink cache. We don't differentiate between * the two. We can prepopulate it, which allows us to easily conduct "fake" * installs of a system w/o actually mounting filesystems. */ struct fprintCacheEntry_s { rpmsid dirId; /*!< path to existing directory */ dev_t dev; /*!< stat(2) device number */ ino_t ino; /*!< stat(2) inode number */ }; /** * Associates a trailing sub-directory and final base name with an existing * directory finger print. */ struct fingerPrint_s { /*! directory finger print entry (the directory path is stat(2)-able */ const struct fprintCacheEntry_s * entry; /*! trailing sub-directory path (directories that are not stat(2)-able */ rpmsid subDirId; rpmsid baseNameId; /*!< file base name id */ }; #define FP_ENTRY_EQUAL(a, b) (((a)->dev == (b)->dev) && ((a)->ino == (b)->ino)) #define FP_EQUAL(a, b) ( \ FP_ENTRY_EQUAL((a).entry, (b).entry) && \ ((a).baseNameId == (b).baseNameId) && \ ((a).subDirId == (b).subDirId) \ ) /** * Finger print cache. */ struct fprintCache_s { rpmFpEntryHash ht; /*!< hashed by dirName */ rpmFpHash fp; /*!< hashed by fingerprint */ rpmstrPool pool; /*!< string pool */ }; fingerPrintCache fpCacheCreate(int sizeHint, rpmstrPool pool) { fingerPrintCache fpc; fpc = xcalloc(1, sizeof(*fpc)); fpc->ht = rpmFpEntryHashCreate(sizeHint, sidHash, sidCmp, NULL, (rpmFpEntryHashFreeData)free); fpc->pool = (pool != NULL) ? rpmstrPoolLink(pool) : rpmstrPoolCreate(); return fpc; } fingerPrintCache fpCacheFree(fingerPrintCache cache) { if (cache) { cache->ht = rpmFpEntryHashFree(cache->ht); cache->fp = rpmFpHashFree(cache->fp); cache->pool = rpmstrPoolFree(cache->pool); free(cache); } return NULL; } /** * Find directory name entry in cache. * @param cache pointer to fingerprint cache * @param dirId string id to locate in cache * @return pointer to directory name entry (or NULL if not found). */ static const struct fprintCacheEntry_s * cacheContainsDirectory( fingerPrintCache cache, rpmsid dirId) { const struct fprintCacheEntry_s ** data; if (rpmFpEntryHashGetEntry(cache->ht, dirId, &data, NULL, NULL)) return data[0]; return NULL; } static char * canonDir(rpmstrPool pool, rpmsid dirNameId) { const char * dirName = rpmstrPoolStr(pool, dirNameId); size_t cdnl = rpmstrPoolStrlen(pool, dirNameId);; char *cdnbuf = NULL; if (*dirName == '/') { cdnbuf = xstrdup(dirName); cdnbuf = rpmCleanPath(cdnbuf); /* leave my trailing slashes along you b**** */ if (cdnl > 1) cdnbuf = rstrcat(&cdnbuf, "/"); } else { /* Using realpath on the arg isn't correct if the arg is a symlink, * especially if the symlink is a dangling link. What we * do instead is use realpath() on `.' and then append arg to * the result. */ /* if the current directory doesn't exist, we might fail. oh well. likewise if it's too long. */ /* XXX we should let realpath() allocate if it can */ cdnbuf = xmalloc(PATH_MAX); cdnbuf[0] = '\0'; if (realpath(".", cdnbuf) != NULL) { char *end = cdnbuf + strlen(cdnbuf); if (end[-1] != '/') *end++ = '/'; end = stpncpy(end, dirName, PATH_MAX - (end - cdnbuf)); *end = '\0'; (void)rpmCleanPath(cdnbuf); /* XXX possible /../ from concatenation */ end = cdnbuf + strlen(cdnbuf); if (end[-1] != '/') *end++ = '/'; *end = '\0'; } else { cdnbuf = _free(cdnbuf); } } return cdnbuf; } static int doLookupId(fingerPrintCache cache, rpmsid dirNameId, rpmsid baseNameId, fingerPrint *fp) { struct stat sb; const struct fprintCacheEntry_s * cacheHit; char *cdn = canonDir(cache->pool, dirNameId); rpmsid fpId; size_t fpLen; if (cdn == NULL) goto exit; /* XXX only if realpath() above fails */ memset(fp, 0, sizeof(*fp)); fpId = rpmstrPoolId(cache->pool, cdn, 1); fpLen = rpmstrPoolStrlen(cache->pool, fpId);; while (1) { /* as we're stating paths here, we want to follow symlinks */ cacheHit = cacheContainsDirectory(cache, fpId); if (cacheHit != NULL) { fp->entry = cacheHit; } else if (!stat(rpmstrPoolStr(cache->pool, fpId), &sb)) { struct fprintCacheEntry_s * newEntry = xmalloc(sizeof(* newEntry)); newEntry->ino = sb.st_ino; newEntry->dev = sb.st_dev; newEntry->dirId = fpId; fp->entry = newEntry; rpmFpEntryHashAddEntry(cache->ht, fpId, fp->entry); } if (fp->entry) { const char * subDir = cdn + fpLen - 1; /* XXX don't bother saving '/' as subdir */ if (subDir[0] == '\0' || (subDir[0] == '/' && subDir[1] == '\0')) subDir = NULL; fp->baseNameId = baseNameId; if (subDir != NULL) fp->subDirId = rpmstrPoolId(cache->pool, subDir, 1); goto exit; } /* stat of '/' just failed! */ if (fpLen == 1) abort(); /* Find the parent directory and its id for the next round */ fpLen--; while (fpLen > 1 && cdn[fpLen-1] != '/') fpLen--; fpId = rpmstrPoolIdn(cache->pool, cdn, fpLen, 1); } exit: free(cdn); /* XXX TODO: failure from eg realpath() should be returned and handled */ return 0; } static int doLookup(fingerPrintCache cache, const char * dirName, const char * baseName, fingerPrint *fp) { rpmsid dirNameId = rpmstrPoolId(cache->pool, dirName, 1); rpmsid baseNameId = rpmstrPoolId(cache->pool, baseName, 1); return doLookupId(cache, dirNameId, baseNameId, fp); } int fpLookup(fingerPrintCache cache, const char * dirName, const char * baseName, fingerPrint **fp) { if (*fp == NULL) *fp = xcalloc(1, sizeof(**fp)); return doLookup(cache, dirName, baseName, *fp); } int fpLookupId(fingerPrintCache cache, rpmsid dirNameId, rpmsid baseNameId, fingerPrint **fp) { if (*fp == NULL) *fp = xcalloc(1, sizeof(**fp)); return doLookupId(cache, dirNameId, baseNameId, *fp); } /** * Return hash value for a finger print. * Hash based on dev and inode only! * @param fp pointer to finger print entry * @return hash value */ static unsigned int fpHashFunction(const fingerPrint * fp) { unsigned int hash = 0; int j; hash = sidHash(fp->baseNameId); if (fp->subDirId) hash ^= sidHash(fp->subDirId); hash ^= ((unsigned)fp->entry->dev); for (j=0; j<4; j++) hash ^= ((fp->entry->ino >> (8*j)) & 0xFF) << ((3-j)*8); return hash; } int fpEqual(const fingerPrint * k1, const fingerPrint * k2) { /* If the addresses are the same, so are the values. */ if (k1 == k2) return 0; /* Otherwise, compare fingerprints by value. */ if (FP_EQUAL(*k1, *k2)) return 0; return 1; } const char * fpEntryDir(fingerPrintCache cache, fingerPrint *fp) { const char * dn = NULL; if (fp && fp->entry) dn = rpmstrPoolStr(cache->pool, fp->entry->dirId); return dn; } dev_t fpEntryDev(fingerPrintCache cache, fingerPrint *fp) { return (fp && fp->entry) ? fp->entry->dev : 0; } int fpLookupEquals(fingerPrintCache cache, fingerPrint *fp, const char * dirName, const char * baseName) { struct fingerPrint_s ofp; doLookup(cache, dirName, baseName, &ofp); return FP_EQUAL(*fp, ofp); } int fpLookupEqualsId(fingerPrintCache cache, fingerPrint *fp, rpmsid dirNameId, rpmsid baseNameId) { struct fingerPrint_s ofp; doLookupId(cache, dirNameId, baseNameId, &ofp); return FP_EQUAL(*fp, ofp); } fingerPrint * fpLookupList(fingerPrintCache cache, rpmstrPool pool, rpmsid * dirNames, rpmsid * baseNames, const uint32_t * dirIndexes, int fileCount) { fingerPrint * fps = xmalloc(fileCount * sizeof(*fps)); int i; /* * We could handle different pools easily enough, but there should be * no need for that. Make sure we catch any oddball cases there might be * lurking about. */ assert(cache->pool == pool); for (i = 0; i < fileCount; i++) { /* If this is in the same directory as the last file, don't bother redoing all of this work */ if (i > 0 && dirIndexes[i - 1] == dirIndexes[i]) { fps[i].entry = fps[i - 1].entry; fps[i].subDirId = fps[i - 1].subDirId; /* XXX if the pools are different, copy would be needed */ fps[i].baseNameId = baseNames[i]; } else { doLookupId(cache, dirNames[dirIndexes[i]], baseNames[i], &fps[i]); } } return fps; } /* Check file for to be installed symlinks in their path and correct their fp */ static void fpLookupSubdir(rpmFpHash symlinks, fingerPrintCache fpc, fingerPrint *fp) { struct fingerPrint_s current_fp; const char *currentsubdir; size_t lensubDir, bnStart, bnEnd; struct rpmffi_s * recs; int numRecs; int i; int symlinkcount = 0; for (;;) { int found = 0; if (fp->subDirId == 0) break; /* directory exists - no need to look for symlinks */ currentsubdir = rpmstrPoolStr(fpc->pool, fp->subDirId); lensubDir = rpmstrPoolStrlen(fpc->pool, fp->subDirId); current_fp = *fp; /* Set baseName to the upper most dir */ bnStart = bnEnd = 1; while (bnEnd < lensubDir && currentsubdir[bnEnd] != '/') bnEnd++; /* no subDir for now */ current_fp.subDirId = 0; while (bnEnd < lensubDir) { current_fp.baseNameId = rpmstrPoolIdn(fpc->pool, currentsubdir + bnStart, bnEnd - bnStart, 1); rpmFpHashGetEntry(symlinks, &current_fp, &recs, &numRecs, NULL); for (i = 0; i < numRecs; i++) { rpmfiles foundfi = rpmteFiles(recs[i].p); char const *linktarget = rpmfilesFLink(foundfi, recs[i].fileno); char *link; rpmsid linkId; foundfi = rpmfilesFree(foundfi); if (!linktarget || *linktarget == '\0') continue; /* this "directory" will be symlink */ link = NULL; if (*linktarget != '/') { const char *dn, *subDir = NULL; dn = rpmstrPoolStr(fpc->pool, current_fp.entry->dirId); if (current_fp.subDirId) { subDir = rpmstrPoolStr(fpc->pool, current_fp.subDirId); } rstrscat(&link, dn, subDir ? subDir : "", "/", NULL); } rstrscat(&link, linktarget, "/", NULL); if (currentsubdir[bnEnd]) rstrscat(&link, currentsubdir + bnEnd, NULL); linkId = rpmstrPoolId(fpc->pool, link, 1); free(link); /* this modifies the fingerprint! */ doLookupId(fpc, linkId, fp->baseNameId, fp); found = 1; break; } if (found) break; /* Set former baseName as subDir */ bnEnd++; current_fp.subDirId = rpmstrPoolIdn(fpc->pool, currentsubdir, bnEnd, 1); /* set baseName to the next lower dir */ bnStart = bnEnd; while (bnEnd < lensubDir && currentsubdir[bnEnd] != '/') bnEnd++; } if (!found) break; /* no symlink found, we are done */ if (++symlinkcount > 50) { /* we followed too many symlinks, there is most likely a cycle */ /* TODO: warning/error */ break; } } } fingerPrint * fpCacheGetByFp(fingerPrintCache cache, struct fingerPrint_s * fp, int ix, struct rpmffi_s ** recs, int * numRecs) { if (rpmFpHashGetEntry(cache->fp, fp + ix, recs, numRecs, NULL)) return fp + ix; else return NULL; } void fpCachePopulate(fingerPrintCache fpc, rpmts ts, int fileCount) { rpmtsi pi; rpmte p; rpmfs fs; rpmfiles fi; int i, fc; int havesymlinks = 0; if (fpc->fp == NULL) fpc->fp = rpmFpHashCreate(fileCount/2 + 10001, fpHashFunction, fpEqual, NULL, NULL); rpmFpHash symlinks = rpmFpHashCreate(fileCount/16+16, fpHashFunction, fpEqual, NULL, NULL); /* populate the fingerprints of all packages in the transaction */ /* also create a hash of all symlinks in the new packages */ pi = rpmtsiInit(ts); while ((p = rpmtsiNext(pi, 0)) != NULL) { (void) rpmsqPoll(); if ((fi = rpmteFiles(p)) == NULL) continue; (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0); rpmfilesFpLookup(fi, fpc); fs = rpmteGetFileStates(p); fc = rpmfsFC(fs); if (rpmteType(p) != TR_REMOVED) { fingerPrint *fpList = rpmfilesFps(fi); /* collect symbolic links */ for (i = 0; i < fc; i++) { struct rpmffi_s ffi; char const *linktarget; if (XFA_SKIPPING(rpmfsGetAction(fs, i))) continue; linktarget = rpmfilesFLink(fi, i); if (!(linktarget && *linktarget != '\0')) continue; ffi.p = p; ffi.fileno = i; rpmFpHashAddEntry(symlinks, fpList + i, ffi); havesymlinks = 1; } } (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), fc); rpmfilesFree(fi); } rpmtsiFree(pi); /* =============================================== * Create the fingerprint -> (p, fileno) hash table * Also adapt the fingerprint if we have symlinks */ pi = rpmtsiInit(ts); while ((p = rpmtsiNext(pi, 0)) != NULL) { fingerPrint *fpList, *lastfp = NULL; (void) rpmsqPoll(); if ((fi = rpmteFiles(p)) == NULL) continue; fs = rpmteGetFileStates(p); fc = rpmfsFC(fs); fpList = rpmfilesFps(fi); (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0); for (i = 0; i < fc; i++) { struct rpmffi_s ffi; if (XFA_SKIPPING(rpmfsGetAction(fs, i))) continue; if (havesymlinks) { /* if the entry/subdirid matches the one from the * last entry we do not need to call fpLookupSubdir */ if (!lastfp || lastfp->entry != fpList[i].entry || lastfp->subDirId != fpList[i].subDirId) fpLookupSubdir(symlinks, fpc, fpList + i); } ffi.p = p; ffi.fileno = i; rpmFpHashAddEntry(fpc->fp, fpList + i, ffi); lastfp = fpList + i; } (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0); rpmfilesFree(fi); } rpmtsiFree(pi); rpmFpHashFree(symlinks); }
{ "pile_set_name": "Github" }
{ "name": "<%= optAppName %>", "version": "0.0.0", "homepage": "https://github.com/<%= optGithubName%>/<%= optAppName %>", "authors": [ "<%= optAuthorName %>" ], "description": "<%= optAppDescription %>", "keywords": [ <% for(var ii=0; ii<optAppKeywords.length; ii++) { if(ii !==0) { print(' '); } print('"'+optAppKeywords[ii]+'"'); if(ii !==(optAppKeywords.length -1)) { print(',\n'); } } %> ], "dependencies": { "angular": "1.4.8", "angular-animate": "1.4.8", "angular-sanitize": "1.4.8", "angular-touch": "1.4.8", "angular-route": "1.4.8", "angular-cookies": "1.4.8", "angular-mocks": "1.4.8", "bourbon": "latest", "neat": "latest", "font-awesome": "latest", "less-flexbox": "latest", "momentjs": "latest", "angular-string": "latest", "angular-array": "latest", "angular-forminput": "latest", "angular-socket-io": "latest" }, "license": "MIT", "resolutions": { "angular": "1.4.8", "angular-animate": "1.4.8", "angular-sanitize": "1.4.8", "angular-touch": "1.4.8" } }
{ "pile_set_name": "Github" }
/**************************************************************** * 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 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 distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * * KIND, either express or implied. See the License for the * * specific language governing permissions and limitations * * under the License. * ****************************************************************/ package org.apache.james.protocols.netty; import static org.jboss.netty.channel.Channels.pipeline; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.channel.ChannelPipelineFactory; import org.jboss.netty.channel.ChannelUpstreamHandler; import org.jboss.netty.channel.group.ChannelGroup; import org.jboss.netty.handler.execution.ExecutionHandler; import org.jboss.netty.handler.stream.ChunkedWriteHandler; import org.jboss.netty.util.HashedWheelTimer; /** * Abstract base class for {@link ChannelPipelineFactory} implementations */ public abstract class AbstractChannelPipelineFactory implements ChannelPipelineFactory { public static final int MAX_LINE_LENGTH = 8192; protected final ConnectionLimitUpstreamHandler connectionLimitHandler; protected final ConnectionPerIpLimitUpstreamHandler connectionPerIpLimitHandler; private final HashedWheelTimer timer; private final ChannelGroupHandler groupHandler; private final int timeout; private final ExecutionHandler eHandler; private final ChannelHandlerFactory frameHandlerFactory; public AbstractChannelPipelineFactory(int timeout, int maxConnections, int maxConnectsPerIp, ChannelGroup channels, ExecutionHandler eHandler, ChannelHandlerFactory frameHandlerFactory, HashedWheelTimer hashedWheelTimer) { this.connectionLimitHandler = new ConnectionLimitUpstreamHandler(maxConnections); this.connectionPerIpLimitHandler = new ConnectionPerIpLimitUpstreamHandler(maxConnectsPerIp); this.groupHandler = new ChannelGroupHandler(channels); this.timeout = timeout; this.eHandler = eHandler; this.frameHandlerFactory = frameHandlerFactory; this.timer = hashedWheelTimer; } @Override public ChannelPipeline getPipeline() throws Exception { // Create a default pipeline implementation. ChannelPipeline pipeline = pipeline(); pipeline.addLast(HandlerConstants.GROUP_HANDLER, groupHandler); pipeline.addLast(HandlerConstants.CONNECTION_LIMIT_HANDLER, connectionLimitHandler); pipeline.addLast(HandlerConstants.CONNECTION_PER_IP_LIMIT_HANDLER, connectionPerIpLimitHandler); // Add the text line decoder which limit the max line length, don't strip the delimiter and use CRLF as delimiter pipeline.addLast(HandlerConstants.FRAMER, frameHandlerFactory.create(pipeline)); // Add the ChunkedWriteHandler to be able to write ChunkInput pipeline.addLast(HandlerConstants.CHUNK_HANDLER, new ChunkedWriteHandler()); pipeline.addLast(HandlerConstants.TIMEOUT_HANDLER, new TimeoutHandler(timer, timeout)); if (eHandler != null) { pipeline.addLast(HandlerConstants.EXECUTION_HANDLER, eHandler); } pipeline.addLast(HandlerConstants.CORE_HANDLER, createHandler()); return pipeline; } /** * Create the core {@link ChannelUpstreamHandler} to use * * @return coreHandler */ protected abstract ChannelUpstreamHandler createHandler(); }
{ "pile_set_name": "Github" }
<resources> <!-- Default screen margins, per the Android Design guidelines. --> <dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_vertical_margin">16dp</dimen> </resources>
{ "pile_set_name": "Github" }
/* * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.jdi; /** * Provides information on the accessibility of a type or type component. * Mirrors for program elements which allow an * an access specifier (private, protected, public) provide information * on that part of the declaration through this interface. * * @author Robert Field * @author Gordon Hirsch * @author James McIlree * @since 1.3 */ @jdk.Exported public interface Accessible { /** * Returns the Java<sup><font size=-2>TM</font></sup> * programming language modifiers, encoded in an integer. * <p> * The modifier encodings are defined in * <cite>The Java&trade; Virtual Machine Specification</cite> * in the <code>access_flag</code> tables for classes(section 4.1), fields(section 4.5), and methods(section 4.6). */ public int modifiers(); /** * Determines if this object mirrors a private item. * For {@link ArrayType}, the return value depends on the * array component type. For primitive arrays the return value * is always false. For object arrays, the return value is the * same as would be returned for the component type. * For primitive classes, such as {@link java.lang.Integer#TYPE}, * the return value is always false. * * @return <code>true</code> for items with private access; * <code>false</code> otherwise. */ boolean isPrivate(); /** * Determines if this object mirrors a package private item. * A package private item is declared with no access specifier. * For {@link ArrayType}, the return value depends on the * array component type. For primitive arrays the return value * is always false. For object arrays, the return value is the * same as would be returned for the component type. * For primitive classes, such as {@link java.lang.Integer#TYPE}, * the return value is always false. * * @return <code>true</code> for items with package private access; * <code>false</code> otherwise. */ boolean isPackagePrivate(); /** * Determines if this object mirrors a protected item. * For {@link ArrayType}, the return value depends on the * array component type. For primitive arrays the return value * is always false. For object arrays, the return value is the * same as would be returned for the component type. * For primitive classes, such as {@link java.lang.Integer#TYPE}, * the return value is always false. * * @return <code>true</code> for items with private access; * <code>false</code> otherwise. */ boolean isProtected(); /** * Determines if this object mirrors a public item. * For {@link ArrayType}, the return value depends on the * array component type. For primitive arrays the return value * is always true. For object arrays, the return value is the * same as would be returned for the component type. * For primitive classes, such as {@link java.lang.Integer#TYPE}, * the return value is always true. * * @return <code>true</code> for items with public access; * <code>false</code> otherwise. */ boolean isPublic(); }
{ "pile_set_name": "Github" }
/********** This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.) This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA **********/ // "liveMedia" // Copyright (c) 1996-2019 Live Networks, Inc. All rights reserved. // A filter that breaks up an AC3 audio elementary stream into frames // Implementation #include "AC3AudioStreamFramer.hh" #include "StreamParser.hh" #include <GroupsockHelper.hh> ////////// AC3AudioStreamParser definition ////////// class AC3FrameParams { public: AC3FrameParams() : samplingFreq(0) {} // 8-byte header at the start of each frame: // u_int32_t hdr0, hdr1; unsigned hdr0, hdr1; // parameters derived from the headers unsigned kbps, samplingFreq, frameSize; void setParamsFromHeader(); }; class AC3AudioStreamParser: public StreamParser { public: AC3AudioStreamParser(AC3AudioStreamFramer* usingSource, FramedSource* inputSource); virtual ~AC3AudioStreamParser(); public: void testStreamCode(unsigned char ourStreamCode, unsigned char* ptr, unsigned size); unsigned parseFrame(unsigned& numTruncatedBytes); // returns the size of the frame that was acquired, or 0 if none was void registerReadInterest(unsigned char* to, unsigned maxSize); AC3FrameParams const& currentFrame() const { return fCurrentFrame; } Boolean haveParsedAFrame() const { return fHaveParsedAFrame; } void readAndSaveAFrame(); private: static void afterGettingSavedFrame(void* clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds); void afterGettingSavedFrame1(unsigned frameSize); static void onSavedFrameClosure(void* clientData); void onSavedFrameClosure1(); private: AC3AudioStreamFramer* fUsingSource; unsigned char* fTo; unsigned fMaxSize; Boolean fHaveParsedAFrame; unsigned char* fSavedFrame; unsigned fSavedFrameSize; char fSavedFrameFlag; // Parameters of the most recently read frame: AC3FrameParams fCurrentFrame; }; ////////// AC3AudioStreamFramer implementation ////////// AC3AudioStreamFramer::AC3AudioStreamFramer(UsageEnvironment& env, FramedSource* inputSource, unsigned char streamCode) : FramedFilter(env, inputSource), fOurStreamCode(streamCode) { // Use the current wallclock time as the initial 'presentation time': gettimeofday(&fNextFramePresentationTime, NULL); fParser = new AC3AudioStreamParser(this, inputSource); } AC3AudioStreamFramer::~AC3AudioStreamFramer() { delete fParser; } AC3AudioStreamFramer* AC3AudioStreamFramer::createNew(UsageEnvironment& env, FramedSource* inputSource, unsigned char streamCode) { // Need to add source type checking here??? ##### return new AC3AudioStreamFramer(env, inputSource, streamCode); } unsigned AC3AudioStreamFramer::samplingRate() { if (!fParser->haveParsedAFrame()) { // Because we haven't yet parsed a frame, we don't yet know the input // stream's sampling rate. So, we first need to read a frame // (into a special buffer that we keep around for later use). fParser->readAndSaveAFrame(); } return fParser->currentFrame().samplingFreq; } void AC3AudioStreamFramer::flushInput() { fParser->flushInput(); } void AC3AudioStreamFramer::doGetNextFrame() { fParser->registerReadInterest(fTo, fMaxSize); parseNextFrame(); } #define MILLION 1000000 struct timeval AC3AudioStreamFramer::currentFramePlayTime() const { AC3FrameParams const& fr = fParser->currentFrame(); unsigned const numSamples = 1536; unsigned const freq = fr.samplingFreq; // result is numSamples/freq unsigned const uSeconds = (freq == 0) ? 0 : ((numSamples*2*MILLION)/freq + 1)/2; // rounds to nearest integer struct timeval result; result.tv_sec = uSeconds/MILLION; result.tv_usec = uSeconds%MILLION; return result; } void AC3AudioStreamFramer ::handleNewData(void* clientData, unsigned char* ptr, unsigned size, struct timeval /*presentationTime*/) { AC3AudioStreamFramer* framer = (AC3AudioStreamFramer*)clientData; framer->handleNewData(ptr, size); } void AC3AudioStreamFramer ::handleNewData(unsigned char* ptr, unsigned size) { fParser->testStreamCode(fOurStreamCode, ptr, size); parseNextFrame(); } void AC3AudioStreamFramer::parseNextFrame() { unsigned acquiredFrameSize = fParser->parseFrame(fNumTruncatedBytes); if (acquiredFrameSize > 0) { // We were able to acquire a frame from the input. // It has already been copied to the reader's space. fFrameSize = acquiredFrameSize; // Also set the presentation time, and increment it for next time, // based on the length of this frame: fPresentationTime = fNextFramePresentationTime; struct timeval framePlayTime = currentFramePlayTime(); fDurationInMicroseconds = framePlayTime.tv_sec*MILLION + framePlayTime.tv_usec; fNextFramePresentationTime.tv_usec += framePlayTime.tv_usec; fNextFramePresentationTime.tv_sec += framePlayTime.tv_sec + fNextFramePresentationTime.tv_usec/MILLION; fNextFramePresentationTime.tv_usec %= MILLION; // Call our own 'after getting' function. Because we're not a 'leaf' // source, we can call this directly, without risking infinite recursion. afterGetting(this); } else { // We were unable to parse a complete frame from the input, because: // - we had to read more data from the source stream, or // - the source stream has ended. } } ////////// AC3AudioStreamParser implementation ////////// static int const kbpsTable[] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640}; void AC3FrameParams::setParamsFromHeader() { unsigned char byte4 = hdr1 >> 24; unsigned char kbpsIndex = (byte4&0x3E) >> 1; if (kbpsIndex > 18) kbpsIndex = 18; kbps = kbpsTable[kbpsIndex]; unsigned char samplingFreqIndex = (byte4&0xC0) >> 6; switch (samplingFreqIndex) { case 0: samplingFreq = 48000; frameSize = 4*kbps; break; case 1: samplingFreq = 44100; frameSize = 2*(320*kbps/147 + (byte4&1)); break; case 2: case 3: // not legal? samplingFreq = 32000; frameSize = 6*kbps; } } AC3AudioStreamParser ::AC3AudioStreamParser(AC3AudioStreamFramer* usingSource, FramedSource* inputSource) : StreamParser(inputSource, FramedSource::handleClosure, usingSource, &AC3AudioStreamFramer::handleNewData, usingSource), fUsingSource(usingSource), fHaveParsedAFrame(False), fSavedFrame(NULL), fSavedFrameSize(0) { } AC3AudioStreamParser::~AC3AudioStreamParser() { } void AC3AudioStreamParser::registerReadInterest(unsigned char* to, unsigned maxSize) { fTo = to; fMaxSize = maxSize; } void AC3AudioStreamParser ::testStreamCode(unsigned char ourStreamCode, unsigned char* ptr, unsigned size) { if (ourStreamCode == 0) return; // we assume that there's no stream code at the beginning of the data if (size < 4) return; unsigned char streamCode = *ptr; if (streamCode == ourStreamCode) { // Remove the first 4 bytes from the stream: memmove(ptr, ptr + 4, size - 4); totNumValidBytes() = totNumValidBytes() - 4; } else { // Discard all of the data that was just read: totNumValidBytes() = totNumValidBytes() - size; } } unsigned AC3AudioStreamParser::parseFrame(unsigned& numTruncatedBytes) { if (fSavedFrameSize > 0) { // We've already read and parsed a frame. Use it instead: memmove(fTo, fSavedFrame, fSavedFrameSize); delete[] fSavedFrame; fSavedFrame = NULL; unsigned frameSize = fSavedFrameSize; fSavedFrameSize = 0; return frameSize; } try { saveParserState(); // We expect an AC3 audio header (first 2 bytes == 0x0B77) at the start: while (1) { unsigned next4Bytes = test4Bytes(); if (next4Bytes>>16 == 0x0B77) break; skipBytes(1); saveParserState(); } fCurrentFrame.hdr0 = get4Bytes(); fCurrentFrame.hdr1 = test4Bytes(); fCurrentFrame.setParamsFromHeader(); fHaveParsedAFrame = True; // Copy the frame to the requested destination: unsigned frameSize = fCurrentFrame.frameSize; if (frameSize > fMaxSize) { numTruncatedBytes = frameSize - fMaxSize; frameSize = fMaxSize; } else { numTruncatedBytes = 0; } fTo[0] = fCurrentFrame.hdr0 >> 24; fTo[1] = fCurrentFrame.hdr0 >> 16; fTo[2] = fCurrentFrame.hdr0 >> 8; fTo[3] = fCurrentFrame.hdr0; getBytes(&fTo[4], frameSize-4); skipBytes(numTruncatedBytes); return frameSize; } catch (int /*e*/) { #ifdef DEBUG fUsingSource->envir() << "AC3AudioStreamParser::parseFrame() EXCEPTION (This is normal behavior - *not* an error)\n"; #endif return 0; // the parsing got interrupted } } void AC3AudioStreamParser::readAndSaveAFrame() { unsigned const maxAC3FrameSize = 4000; fSavedFrame = new unsigned char[maxAC3FrameSize]; fSavedFrameSize = 0; fSavedFrameFlag = 0; fUsingSource->getNextFrame(fSavedFrame, maxAC3FrameSize, afterGettingSavedFrame, this, onSavedFrameClosure, this); fUsingSource->envir().taskScheduler().doEventLoop(&fSavedFrameFlag); } void AC3AudioStreamParser ::afterGettingSavedFrame(void* clientData, unsigned frameSize, unsigned /*numTruncatedBytes*/, struct timeval /*presentationTime*/, unsigned /*durationInMicroseconds*/) { AC3AudioStreamParser* parser = (AC3AudioStreamParser*)clientData; parser->afterGettingSavedFrame1(frameSize); } void AC3AudioStreamParser ::afterGettingSavedFrame1(unsigned frameSize) { fSavedFrameSize = frameSize; fSavedFrameFlag = ~0; } void AC3AudioStreamParser::onSavedFrameClosure(void* clientData) { AC3AudioStreamParser* parser = (AC3AudioStreamParser*)clientData; parser->onSavedFrameClosure1(); } void AC3AudioStreamParser::onSavedFrameClosure1() { delete[] fSavedFrame; fSavedFrame = NULL; fSavedFrameSize = 0; fSavedFrameFlag = ~0; }
{ "pile_set_name": "Github" }
<HTML> <BODY> Provides classes to control or read data from GSM phones. @hide </BODY> </HTML>
{ "pile_set_name": "Github" }
package gitserver import ( "fmt" "io" "os" kapi "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" buildapi "github.com/openshift/origin/pkg/build/api" "github.com/openshift/origin/pkg/client" ) const gitRepositoryAnnotationKey = "openshift.io/git-repository" func GetRepositoryBuildConfigs(c client.Interface, name string, out io.Writer) error { ns := os.Getenv("POD_NAMESPACE") buildConfigList, err := c.BuildConfigs(ns).List(kapi.ListOptions{}) if err != nil { return err } matchingBuildConfigs := []*buildapi.BuildConfig{} for i := range buildConfigList.Items { bc := &buildConfigList.Items[i] repoAnnotation, hasAnnotation := bc.Annotations[gitRepositoryAnnotationKey] if hasAnnotation { if repoAnnotation == name { matchingBuildConfigs = append(matchingBuildConfigs, bc) } continue } if bc.Name == name { matchingBuildConfigs = append(matchingBuildConfigs, bc) } } for _, bc := range matchingBuildConfigs { var ref string if bc.Spec.Source.Git != nil { ref = bc.Spec.Source.Git.Ref } if ref == "" { ref = "master" } fmt.Fprintf(out, "%s %s\n", bc.Name, ref) } return nil } func GetClient() (client.Interface, error) { clientConfig, err := restclient.InClusterConfig() if err != nil { return nil, fmt.Errorf("failed to get client config: %v", err) } osClient, err := client.New(clientConfig) if err != nil { return nil, fmt.Errorf("error obtaining OpenShift client: %v", err) } return osClient, nil }
{ "pile_set_name": "Github" }
import Categories from './routes/categories/Index.vue' import Posts from './routes/posts/Index.vue' import PostTags from './routes/post-tags/Index.vue' import Tags from './routes/tags/Index.vue' let blogRoutes = [ { path: 'categories', name: 'blog-categories', component: Categories, }, { path: 'posts', name: 'blog-posts', component: Posts, }, { path: 'post-tags', name: 'blog-post-tags', component: PostTags, }, { path: 'tags', name: 'blog-tags', component: Tags, }, ] export default blogRoutes
{ "pile_set_name": "Github" }
package fyne // Size describes something with width and height. type Size struct { Width int // The number of units along the X axis. Height int // The number of units along the Y axis. } // Add returns a new Size that is the result of increasing the current size by // s2 Width and Height. func (s1 Size) Add(s2 Size) Size { return Size{s1.Width + s2.Width, s1.Height + s2.Height} } // Subtract returns a new Size that is the result of decreasing the current size // by s2 Width and Height. func (s1 Size) Subtract(s2 Size) Size { return Size{s1.Width - s2.Width, s1.Height - s2.Height} } // Union returns a new Size that is the maximum of the current Size and s2. func (s1 Size) Union(s2 Size) Size { maxW := Max(s1.Width, s2.Width) maxH := Max(s1.Height, s2.Height) return NewSize(maxW, maxH) } // NewSize returns a newly allocated Size of the specified dimensions. func NewSize(w int, h int) Size { return Size{w, h} } // Position describes a generic X, Y coordinate relative to a parent Canvas // or CanvasObject. type Position struct { X int // The position from the parent's left edge Y int // The position from the parent's top edge } // Add returns a new Position that is the result of offsetting the current // position by p2 X and Y. func (p1 Position) Add(p2 Position) Position { return Position{p1.X + p2.X, p1.Y + p2.Y} } // Subtract returns a new Position that is the result of offsetting the current // position by p2 -X and -Y. func (p1 Position) Subtract(p2 Position) Position { return Position{p1.X - p2.X, p1.Y - p2.Y} } // NewPos returns a newly allocated Position representing the specified coordinates. func NewPos(x int, y int) Position { return Position{x, y} }
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0+ */ /* * Interface for Dynamic Logical Partitioning of I/O Slots on * RPA-compliant PPC64 platform. * * John Rose <[email protected]> * October 2003 * * Copyright (C) 2003 IBM. */ #ifndef _RPADLPAR_IO_H_ #define _RPADLPAR_IO_H_ int dlpar_sysfs_init(void); void dlpar_sysfs_exit(void); int dlpar_add_slot(char *drc_name); int dlpar_remove_slot(char *drc_name); #endif
{ "pile_set_name": "Github" }
LIBRARY history_browser.dll EXPORTS ;history_browser ; CommandHistoryInitialize CommandHistoryAppendLine CommandHistoryLoadFromFile CommandHistoryReset CommandHistoryDeleteLine CommandHistoryExpandAll
{ "pile_set_name": "Github" }
/* * Copyright (c) 2016, Alliance for Open Media. All rights reserved * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at www.aomedia.org/license/software. If the Alliance for Open * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ #include "av1/common/tile_common.h" #include "av1/common/onyxc_int.h" #include "aom_dsp/aom_dsp_common.h" void av1_tile_set_row(TileInfo *tile, const AV1_COMMON *cm, int row) { tile->mi_row_start = row * cm->tile_height; tile->mi_row_end = AOMMIN(tile->mi_row_start + cm->tile_height, cm->mi_rows); } void av1_tile_set_col(TileInfo *tile, const AV1_COMMON *cm, int col) { tile->mi_col_start = col * cm->tile_width; tile->mi_col_end = AOMMIN(tile->mi_col_start + cm->tile_width, cm->mi_cols); } #if CONFIG_DEPENDENT_HORZTILES && CONFIG_TILE_GROUPS void av1_tile_set_tg_boundary(TileInfo *tile, const AV1_COMMON *const cm, int row, int col) { if (row < cm->tile_rows - 1) { tile->tg_horz_boundary = col >= cm->tile_group_start_col[row][col] ? (row == cm->tile_group_start_row[row][col] ? 1 : 0) : (row == cm->tile_group_start_row[row + 1][col] ? 1 : 0); } else { assert(col >= cm->tile_group_start_col[row][col]); tile->tg_horz_boundary = (row == cm->tile_group_start_row[row][col] ? 1 : 0); } } #endif void av1_tile_init(TileInfo *tile, const AV1_COMMON *cm, int row, int col) { av1_tile_set_row(tile, cm, row); av1_tile_set_col(tile, cm, col); #if CONFIG_DEPENDENT_HORZTILES && CONFIG_TILE_GROUPS av1_tile_set_tg_boundary(tile, cm, row, col); #endif } #if !CONFIG_EXT_TILE #if CONFIG_EXT_PARTITION #define MIN_TILE_WIDTH_MAX_SB 2 #define MAX_TILE_WIDTH_MAX_SB 32 #else #define MIN_TILE_WIDTH_MAX_SB 4 #define MAX_TILE_WIDTH_MAX_SB 64 #endif // CONFIG_EXT_PARTITION static int get_min_log2_tile_cols(int max_sb_cols) { int min_log2 = 0; while ((MAX_TILE_WIDTH_MAX_SB << min_log2) < max_sb_cols) ++min_log2; return min_log2; } static int get_max_log2_tile_cols(int max_sb_cols) { int max_log2 = 1; while ((max_sb_cols >> max_log2) >= MIN_TILE_WIDTH_MAX_SB) ++max_log2; return max_log2 - 1; } void av1_get_tile_n_bits(int mi_cols, int *min_log2_tile_cols, int *max_log2_tile_cols) { const int max_sb_cols = ALIGN_POWER_OF_TWO(mi_cols, MAX_MIB_SIZE_LOG2) >> MAX_MIB_SIZE_LOG2; *min_log2_tile_cols = get_min_log2_tile_cols(max_sb_cols); *max_log2_tile_cols = get_max_log2_tile_cols(max_sb_cols); assert(*min_log2_tile_cols <= *max_log2_tile_cols); } #endif // !CONFIG_EXT_TILE void av1_update_boundary_info(const struct AV1Common *cm, const TileInfo *const tile_info, int mi_row, int mi_col) { int row, col; for (row = mi_row; ((row < (mi_row + cm->mib_size)) && (row < cm->mi_rows)); row++) for (col = mi_col; ((col < (mi_col + cm->mib_size)) && (col < cm->mi_cols)); col++) { MODE_INFO *const mi = cm->mi + row * cm->mi_stride + col; mi->mbmi.boundary_info = 0; // If horizontal dependent tile is enabled, then the horizontal // tile boundary is not treated as real tile boundary for loop // filtering, only the horizontal tile group boundary is treated // as tile boundary. // Otherwise, tile group boundary is treated the same as tile boundary. // Loop filtering operation is done based on the // loopfilter_across_tiles_enabled flag for both tile boundary and tile // group boundary. if (cm->tile_cols * cm->tile_rows > 1) { #if CONFIG_DEPENDENT_HORZTILES #if CONFIG_TILE_GROUPS if (row == tile_info->mi_row_start && (!cm->dependent_horz_tiles || tile_info->tg_horz_boundary)) #else if (row == tile_info->mi_row_start && !cm->dependent_horz_tiles) #endif // CONFIG_TILE_GROUPS #else if (row == tile_info->mi_row_start) #endif // CONFIG_DEPENDENT_HORZTILES mi->mbmi.boundary_info |= TILE_ABOVE_BOUNDARY; if (col == tile_info->mi_col_start) mi->mbmi.boundary_info |= TILE_LEFT_BOUNDARY; if ((row + 1) >= tile_info->mi_row_end) mi->mbmi.boundary_info |= TILE_BOTTOM_BOUNDARY; if ((col + 1) >= tile_info->mi_col_end) mi->mbmi.boundary_info |= TILE_RIGHT_BOUNDARY; } // Frame boundary is treated as tile boundary if (row == 0) mi->mbmi.boundary_info |= FRAME_ABOVE_BOUNDARY | TILE_ABOVE_BOUNDARY; if (col == 0) mi->mbmi.boundary_info |= FRAME_LEFT_BOUNDARY | TILE_LEFT_BOUNDARY; if ((row + 1) >= cm->mi_rows) mi->mbmi.boundary_info |= FRAME_BOTTOM_BOUNDARY | TILE_BOTTOM_BOUNDARY; if ((col + 1) >= cm->mi_cols) mi->mbmi.boundary_info |= FRAME_RIGHT_BOUNDARY | TILE_RIGHT_BOUNDARY; } } #if CONFIG_LOOPFILTERING_ACROSS_TILES int av1_disable_loopfilter_on_tile_boundary(const struct AV1Common *cm) { return (!cm->loop_filter_across_tiles_enabled && (cm->tile_cols * cm->tile_rows > 1)); } #endif // CONFIG_LOOPFILTERING_ACROSS_TILES
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <class-diagram version="1.1.13" icons="true" automaticImage="JPEG" always-add-relationships="false" generalizations="true" realizations="true" associations="true" dependencies="false" nesting-relationships="true" router="FAN"> <class id="1" language="java" name="com.iluwatar.guarded.suspension.GuardedQueue" project="java-design-patterns_guarded-suspension" file="/java-design-patterns_guarded-suspension/src/main/java/com/iluwatar/guarded/suspension/GuardedQueue.java" binary="false" corner="BOTTOM_RIGHT"> <position height="277" width="326" x="301" y="172"/> <display autosize="false" stereotype="true" package="true" initial-value="false" signature="true" sort-features="false" accessors="true" visibility="true"> <attributes public="true" package="true" protected="true" private="true" static="true"/> <operations public="true" package="true" protected="true" private="true" static="true"/> </display> </class> <classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" sort-features="false" accessors="true" visibility="true"> <attributes public="true" package="true" protected="true" private="true" static="true"/> <operations public="true" package="true" protected="true" private="true" static="true"/> </classifier-display> <association-display labels="true" multiplicity="true"/> </class-diagram>
{ "pile_set_name": "Github" }
<?php /** * This source file is part of the open source project * ExpressionEngine (https://expressionengine.com) * * @link https://expressionengine.com/ * @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) * @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 */ namespace EllisLab\ExpressionEngine\Updater\Version_2_11_7; /** * Update */ class Updater { var $version_suffix = ''; /** * Do Update * * @return TRUE */ public function do_update() { return TRUE; } } // EOF
{ "pile_set_name": "Github" }
Title: prefer ucd_mem over hr_mem in case of pfSense monitoring Level: 1 Component: checks Class: fix Compatible: incomp Edition: cre State: unknown Version: 1.5.0i1 Date: 1488466566 If monitoring pfSense firewalls the hr_mem check does not provide the right data. Because of this ucd_mem is preferred here. The change is incompatible because you have to rediscover the affected hosts so ucd_mem is used instead of hr_mem.
{ "pile_set_name": "Github" }
// // AppDelegate.swift // IOSDragViewsGesturesTutorial // // Created by Arthur Knopper on 07/02/2019. // Copyright © 2019 Arthur Knopper. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } }
{ "pile_set_name": "Github" }
/* * Copyright LWJGL. All rights reserved. * License terms: https://www.lwjgl.org/license * MACHINE GENERATED FILE, DO NOT EDIT */ package org.lwjgl.opengles; import javax.annotation.*; import org.lwjgl.system.*; import static org.lwjgl.system.MemoryUtil.*; /** * Instances of this class may be passed to the {@link GLES32#glDebugMessageCallback DebugMessageCallback} method. * * <h3>Type</h3> * * <pre><code> * void (*) ( * GLenum source, * GLenum type, * GLuint id, * GLenum severity, * GLsizei length, * GLchar const *message, * void const *userParam * )</code></pre> */ public abstract class GLDebugMessageCallback extends Callback implements GLDebugMessageCallbackI { /** * Creates a {@code GLDebugMessageCallback} instance from the specified function pointer. * * @return the new {@code GLDebugMessageCallback} */ public static GLDebugMessageCallback create(long functionPointer) { GLDebugMessageCallbackI instance = Callback.get(functionPointer); return instance instanceof GLDebugMessageCallback ? (GLDebugMessageCallback)instance : new Container(functionPointer, instance); } /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ @Nullable public static GLDebugMessageCallback createSafe(long functionPointer) { return functionPointer == NULL ? null : create(functionPointer); } /** Creates a {@code GLDebugMessageCallback} instance that delegates to the specified {@code GLDebugMessageCallbackI} instance. */ public static GLDebugMessageCallback create(GLDebugMessageCallbackI instance) { return instance instanceof GLDebugMessageCallback ? (GLDebugMessageCallback)instance : new Container(instance.address(), instance); } protected GLDebugMessageCallback() { super(SIGNATURE); } GLDebugMessageCallback(long functionPointer) { super(functionPointer); } /** * Converts the specified {@link GLDebugMessageCallback} arguments to a String. * * <p>This method may only be used inside a GLDebugMessageCallback invocation.</p> * * @param length the GLDebugMessageCallback {@code length} argument * @param message the GLDebugMessageCallback {@code message} argument * * @return the message as a String */ public static String getMessage(int length, long message) { return memUTF8(memByteBuffer(message, length)); } private static final class Container extends GLDebugMessageCallback { private final GLDebugMessageCallbackI delegate; Container(long functionPointer, GLDebugMessageCallbackI delegate) { super(functionPointer); this.delegate = delegate; } @Override public void invoke(int source, int type, int id, int severity, int length, long message, long userParam) { delegate.invoke(source, type, id, severity, length, message, userParam); } } }
{ "pile_set_name": "Github" }
#include <stdlib.h> #include "ia32_implicit.h" #include "ia32_insn.h" #include "ia32_reg.h" #include "x86_operand_list.h" /* Conventions: Register operands which are aliases of another register * operand (e.g. AX in one operand and AL in another) assume that the * operands are different registers and that alias tracking will resolve * data flow. This means that something like * mov ax, al * would have 'write only' access for AX and 'read only' access for AL, * even though both AL and AX are read and written */ typedef struct { uint32_t type; uint32_t operand; } op_implicit_list_t; static op_implicit_list_t list_aaa[] = /* 37 : AAA : rw AL */ /* 3F : AAS : rw AL */ {{ OP_R | OP_W, REG_BYTE_OFFSET }, {0}}; /* aaa */ static op_implicit_list_t list_aad[] = /* D5 0A, D5 (ib) : AAD : rw AX */ /* D4 0A, D4 (ib) : AAM : rw AX */ {{ OP_R | OP_W, REG_WORD_OFFSET }, {0}}; /* aad */ static op_implicit_list_t list_call[] = /* E8, FF, 9A, FF : CALL : rw ESP, rw EIP */ /* C2, C3, CA, CB : RET : rw ESP, rw EIP */ {{ OP_R | OP_W, REG_EIP_INDEX }, { OP_R | OP_W, REG_ESP_INDEX }, {0}}; /* call, ret */ static op_implicit_list_t list_cbw[] = /* 98 : CBW : r AL, rw AX */ {{ OP_R | OP_W, REG_WORD_OFFSET }, { OP_R, REG_BYTE_OFFSET}, {0}}; /* cbw */ static op_implicit_list_t list_cwde[] = /* 98 : CWDE : r AX, rw EAX */ {{ OP_R | OP_W, REG_DWORD_OFFSET }, { OP_R, REG_WORD_OFFSET }, {0}}; /* cwde */ static op_implicit_list_t list_clts[] = /* 0F 06 : CLTS : rw CR0 */ {{ OP_R | OP_W, REG_CTRL_OFFSET}, {0}}; /* clts */ static op_implicit_list_t list_cmpxchg[] = /* 0F B0 : CMPXCHG : rw AL */ {{ OP_R | OP_W, REG_BYTE_OFFSET }, {0}}; /* cmpxchg */ static op_implicit_list_t list_cmpxchgb[] = /* 0F B1 : CMPXCHG : rw EAX */ {{ OP_R | OP_W, REG_DWORD_OFFSET }, {0}}; /* cmpxchg */ static op_implicit_list_t list_cmpxchg8b[] = /* 0F C7 : CMPXCHG8B : rw EDX, rw EAX, r ECX, r EBX */ {{ OP_R | OP_W, REG_DWORD_OFFSET }, { OP_R | OP_W, REG_DWORD_OFFSET + 2 }, { OP_R, REG_DWORD_OFFSET + 1 }, { OP_R, REG_DWORD_OFFSET + 3 }, {0}}; /* cmpxchg8b */ static op_implicit_list_t list_cpuid[] = /* 0F A2 : CPUID : rw EAX, w EBX, w ECX, w EDX */ {{ OP_R | OP_W, REG_DWORD_OFFSET }, { OP_W, REG_DWORD_OFFSET + 1 }, { OP_W, REG_DWORD_OFFSET + 2 }, { OP_W, REG_DWORD_OFFSET + 3 }, {0}}; /* cpuid */ static op_implicit_list_t list_cwd[] = /* 99 : CWD/CWQ : rw EAX, w EDX */ {{ OP_R | OP_W, REG_DWORD_OFFSET }, { OP_W, REG_DWORD_OFFSET + 2 }, {0}}; /* cwd */ static op_implicit_list_t list_daa[] = /* 27 : DAA : rw AL */ /* 2F : DAS : rw AL */ {{ OP_R | OP_W, REG_BYTE_OFFSET }, {0}}; /* daa */ static op_implicit_list_t list_idiv[] = /* F6 : DIV, IDIV : r AX, w AL, w AH */ /* FIXED: first op was EAX, not Aw. TODO: verify! */ {{ OP_R, REG_WORD_OFFSET }, { OP_W, REG_BYTE_OFFSET }, { OP_W, REG_BYTE_OFFSET + 4 }, {0}}; /* div */ static op_implicit_list_t list_div[] = /* F7 : DIV, IDIV : rw EDX, rw EAX */ {{ OP_R | OP_W, REG_DWORD_OFFSET + 2 }, { OP_R | OP_W, REG_DWORD_OFFSET }, {0}}; /* div */ static op_implicit_list_t list_enter[] = /* C8 : ENTER : rw ESP w EBP */ {{ OP_R | OP_W, REG_DWORD_OFFSET + 4 }, { OP_R, REG_DWORD_OFFSET + 5 }, {0}}; /* enter */ static op_implicit_list_t list_f2xm1[] = /* D9 F0 : F2XM1 : rw ST(0) */ /* D9 E1 : FABS : rw ST(0) */ /* D9 E0 : FCHS : rw ST(0) */ /* D9 FF : FCOS : rw ST(0)*/ /* D8, DA : FDIV : rw ST(0) */ /* D8, DA : FDIVR : rw ST(0) */ /* D9 F2 : FPTAN : rw ST(0) */ /* D9 FC : FRNDINT : rw ST(0) */ /* D9 FB : FSINCOS : rw ST(0) */ /* D9 FE : FSIN : rw ST(0) */ /* D9 FA : FSQRT : rw ST(0) */ /* D9 F4 : FXTRACT : rw ST(0) */ {{ OP_R | OP_W, REG_FPU_OFFSET }, {0}}; /* f2xm1 */ static op_implicit_list_t list_fcom[] = /* D8, DC, DE D9 : FCOM : r ST(0) */ /* DE, DA : FICOM : r ST(0) */ /* DF, D8 : FIST : r ST(0) */ /* D9 E4 : FTST : r ST(0) */ /* D9 E5 : FXAM : r ST(0) */ {{ OP_R, REG_FPU_OFFSET }, {0}}; /* fcom */ static op_implicit_list_t list_fpatan[] = /* D9 F3 : FPATAN : r ST(0), rw ST(1) */ {{ OP_R, REG_FPU_OFFSET }, {0}}; /* fpatan */ static op_implicit_list_t list_fprem[] = /* D9 F8, D9 F5 : FPREM : rw ST(0) r ST(1) */ /* D9 FD : FSCALE : rw ST(0), r ST(1) */ {{ OP_R | OP_W, REG_FPU_OFFSET }, { OP_R, REG_FPU_OFFSET + 1 }, {0}}; /* fprem */ static op_implicit_list_t list_faddp[] = /* DE C1 : FADDP : r ST(0), rw ST(1) */ /* DE E9 : FSUBP : r ST(0), rw ST(1) */ /* D9 F1 : FYL2X : r ST(0), rw ST(1) */ /* D9 F9 : FYL2XP1 : r ST(0), rw ST(1) */ {{ OP_R, REG_FPU_OFFSET }, { OP_R | OP_W, REG_FPU_OFFSET + 1 }, {0}}; /* faddp */ static op_implicit_list_t list_fucompp[] = /* DA E9 : FUCOMPP : r ST(0), r ST(1) */ {{ OP_R, REG_FPU_OFFSET }, { OP_R, REG_FPU_OFFSET + 1 }, {0}}; /* fucompp */ static op_implicit_list_t list_imul[] = /* F6 : IMUL : r AL, w AX */ /* F6 : MUL : r AL, w AX */ {{ OP_R, REG_BYTE_OFFSET }, { OP_W, REG_WORD_OFFSET }, {0}}; /* imul */ static op_implicit_list_t list_mul[] = /* F7 : IMUL : rw EAX, w EDX */ /* F7 : MUL : rw EAX, w EDX */ {{ OP_R | OP_W, REG_DWORD_OFFSET }, { OP_W, REG_DWORD_OFFSET + 2 }, {0}}; /* imul */ static op_implicit_list_t list_lahf[] = /* 9F : LAHF : r EFLAGS, w AH */ {{ OP_R, REG_FLAGS_INDEX }, { OP_W, REG_BYTE_OFFSET + 4 }, {0}}; /* lahf */ static op_implicit_list_t list_ldmxcsr[] = /* 0F AE : LDMXCSR : w MXCSR SSE Control Status Reg */ {{ OP_W, REG_MXCSG_INDEX }, {0}}; /* ldmxcsr */ static op_implicit_list_t list_leave[] = /* C9 : LEAVE : rw ESP, w EBP */ {{ OP_R | OP_W, REG_ESP_INDEX }, { OP_W, REG_DWORD_OFFSET + 5 }, {0}}; /* leave */ static op_implicit_list_t list_lgdt[] = /* 0F 01 : LGDT : w GDTR */ {{ OP_W, REG_GDTR_INDEX }, {0}}; /* lgdt */ static op_implicit_list_t list_lidt[] = /* 0F 01 : LIDT : w IDTR */ {{ OP_W, REG_IDTR_INDEX }, {0}}; /* lidt */ static op_implicit_list_t list_lldt[] = /* 0F 00 : LLDT : w LDTR */ {{ OP_W, REG_LDTR_INDEX }, {0}}; /* lldt */ static op_implicit_list_t list_lmsw[] = /* 0F 01 : LMSW : w CR0 */ {{ OP_W, REG_CTRL_OFFSET }, {0}}; /* lmsw */ static op_implicit_list_t list_loop[] = /* E0, E1, E2 : LOOP : rw ECX */ {{ OP_R | OP_W, REG_DWORD_OFFSET + 1 }, {0}};/* loop */ static op_implicit_list_t list_ltr[] = /* 0F 00 : LTR : w Task Register */ {{ OP_W, REG_TR_INDEX }, {0}}; /* ltr */ static op_implicit_list_t list_pop[] = /* 8F, 58, 1F, 07, 17, 0F A1, 0F A9 : POP : rw ESP */ /* FF, 50, 6A, 68, 0E, 16, 1E, 06, 0F A0, 0F A8 : PUSH : rw ESP */ {{ OP_R | OP_W, REG_ESP_INDEX }, {0}}; /* pop, push */ static op_implicit_list_t list_popad[] = /* 61 : POPAD : rw esp, w edi esi ebp ebx edx ecx eax */ {{ OP_R | OP_W, REG_ESP_INDEX }, { OP_W, REG_DWORD_OFFSET + 7 }, { OP_W, REG_DWORD_OFFSET + 6 }, { OP_W, REG_DWORD_OFFSET + 5 }, { OP_W, REG_DWORD_OFFSET + 3 }, { OP_W, REG_DWORD_OFFSET + 2 }, { OP_W, REG_DWORD_OFFSET + 1 }, { OP_W, REG_DWORD_OFFSET }, {0}}; /* popad */ static op_implicit_list_t list_popfd[] = /* 9D : POPFD : rw esp, w eflags */ {{ OP_R | OP_W, REG_ESP_INDEX }, { OP_W, REG_FLAGS_INDEX }, {0}}; /* popfd */ static op_implicit_list_t list_pushad[] = /* FF, 50, 6A, 68, 0E, 16, 1E, 06, 0F A0, 0F A8 : PUSH : rw ESP */ /* 60 : PUSHAD : rw esp, r eax ecx edx ebx esp ebp esi edi */ {{ OP_R | OP_W, REG_ESP_INDEX }, { OP_R, REG_DWORD_OFFSET }, { OP_R, REG_DWORD_OFFSET + 1 }, { OP_R, REG_DWORD_OFFSET + 2 }, { OP_R, REG_DWORD_OFFSET + 3 }, { OP_R, REG_DWORD_OFFSET + 5 }, { OP_R, REG_DWORD_OFFSET + 6 }, { OP_R, REG_DWORD_OFFSET + 7 }, {0}}; /* pushad */ static op_implicit_list_t list_pushfd[] = /* 9C : PUSHFD : rw esp, r eflags */ {{ OP_R | OP_W, REG_ESP_INDEX }, { OP_R, REG_FLAGS_INDEX }, {0}}; /* pushfd */ static op_implicit_list_t list_rdmsr[] = /* 0F 32 : RDMSR : r ECX, w EDX, w EAX */ {{ OP_R, REG_DWORD_OFFSET + 1 }, { OP_W, REG_DWORD_OFFSET + 2 }, { OP_W, REG_DWORD_OFFSET }, {0}}; /* rdmsr */ static op_implicit_list_t list_rdpmc[] = /* 0F 33 : RDPMC : r ECX, w EDX, w EAX */ {{ OP_R, REG_DWORD_OFFSET + 1 }, { OP_W, REG_DWORD_OFFSET + 2 }, { OP_W, REG_DWORD_OFFSET }, {0}}; /* rdpmc */ static op_implicit_list_t list_rdtsc[] = /* 0F 31 : RDTSC : rw EDX, rw EAX */ {{ OP_R | OP_W, REG_DWORD_OFFSET + 2 }, { OP_R | OP_W, REG_DWORD_OFFSET }, {0}}; /* rdtsc */ static op_implicit_list_t list_rep[] = /* F3, F2 ... : REP : rw ECX */ {{ OP_R | OP_W, REG_DWORD_OFFSET + 1 }, {0}};/* rep */ static op_implicit_list_t list_rsm[] = /* 0F AA : RSM : r CR4, r CR0 */ {{ OP_R, REG_CTRL_OFFSET + 4 }, { OP_R, REG_CTRL_OFFSET }, {0}}; /* rsm */ static op_implicit_list_t list_sahf[] = /* 9E : SAHF : r ah, rw eflags (set SF ZF AF PF CF) */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sahf */ static op_implicit_list_t list_sgdt[] = /* 0F : SGDT : r gdtr */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sgdt */ static op_implicit_list_t list_sidt[] = /* 0F : SIDT : r idtr */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sidt */ static op_implicit_list_t list_sldt[] = /* 0F : SLDT : r ldtr */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sldt */ static op_implicit_list_t list_smsw[] = /* 0F : SMSW : r CR0 */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* smsw */ static op_implicit_list_t list_stmxcsr[] = /* 0F AE : STMXCSR : r MXCSR */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* stmxcsr */ static op_implicit_list_t list_str[] = /* 0F 00 : STR : r TR (task register) */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* str */ static op_implicit_list_t list_sysenter[] = /* 0F 34 : SYSENTER : w cs, w eip, w ss, w esp, r CR0, w eflags * r sysenter_cs_msr, sysenter_esp_msr, sysenter_eip_msr */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sysenter */ static op_implicit_list_t list_sysexit[] = /* 0F 35 : SYSEXIT : r edx, r ecx, w cs, w eip, w ss, w esp * r sysenter_cs_msr */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sysexit */ static op_implicit_list_t list_wrmsr[] = /* 0F 30 : WRMST : r edx, r eax, r ecx */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* wrmsr */ static op_implicit_list_t list_xlat[] = /* D7 : XLAT : rw al r ebx (ptr) */ /* TODO: finish this! */ {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* xlat */ /* TODO: * monitor 0f 01 c8 eax OP_R ecx OP_R edx OP_R * mwait 0f 01 c9 eax OP_R ecx OP_R */ static op_implicit_list_t list_monitor[] = {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* monitor */ static op_implicit_list_t list_mwait[] = {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* mwait */ op_implicit_list_t *op_implicit_list[] = { /* This is a list of implicit operands which are read/written by * various x86 instructions. Note that modifications to the stack * register are mentioned here, but that additional information on * the effect an instruction has on the stack is contained in the * x86_insn_t 'stack_mod' and 'stack_mod_val' fields. Use of the * eflags register, i.e. setting, clearing, and testing flags, is * not recorded here but rather in the flags_set and flags_tested * fields of the x86_insn_t.*/ NULL, list_aaa, list_aad, list_call, list_cbw, /* 1 - 4 */ list_cwde, list_clts, list_cmpxchg, list_cmpxchgb, /* 5 - 8 */ list_cmpxchg8b, list_cpuid, list_cwd, list_daa, /* 9 - 12 */ list_idiv, list_div, list_enter, list_f2xm1, /* 13 - 16 */ list_fcom, list_fpatan, list_fprem, list_faddp, /* 17 - 20 */ list_fucompp, list_imul, list_mul, list_lahf, /* 21 - 24 */ list_ldmxcsr, list_leave, list_lgdt, list_lidt, /* 25 - 28 */ list_lldt, list_lmsw, list_loop, list_ltr, /* 29 - 32 */ list_pop, list_popad, list_popfd, list_pushad, /* 33 - 36 */ list_pushfd, list_rdmsr, list_rdpmc, list_rdtsc, /* 37 - 40 */ /* NOTE: 'REP' is a hack since it is a prefix: if its position * in the table changes, then change IDX_IMPLICIT_REP in the .h */ list_rep, list_rsm, list_sahf, list_sgdt, /* 41 - 44 */ list_sidt, list_sldt, list_smsw, list_stmxcsr, /* 45 - 48 */ list_str, list_sysenter, list_sysexit, list_wrmsr, /* 49 - 52 */ list_xlat, list_monitor, list_mwait, /* 53 - 55*/ NULL /* end of list */ }; #define LAST_IMPL_IDX 55 static void handle_impl_reg( x86_op_t *op, uint32_t val ) { x86_reg_t *reg = &op->data.reg; op->type = op_register; ia32_handle_register( reg, (unsigned int) val ); switch (reg->size) { case 1: op->datatype = op_byte; break; case 2: op->datatype = op_word; break; case 4: op->datatype = op_dword; break; case 8: op->datatype = op_qword; break; case 10: op->datatype = op_extreal; break; case 16: op->datatype = op_dqword; break; } return; } /* 'impl_idx' is the value from the opcode table: between 1 and LAST_IMPL_IDX */ /* returns number of operands added */ unsigned int ia32_insn_implicit_ops( x86_insn_t *insn, unsigned int impl_idx ) { op_implicit_list_t *list; x86_op_t *op; unsigned int num = 0; if (! impl_idx || impl_idx > LAST_IMPL_IDX ) { return 0; } for ( list = op_implicit_list[impl_idx]; list->type; list++, num++ ) { enum x86_op_access access = (enum x86_op_access) OP_PERM(list->type); enum x86_op_flags flags = (enum x86_op_flags) (OP_FLAGS(list->type) >> 12); op = NULL; /* In some cases (MUL), EAX is an implicit operand hardcoded in * the instruction without being explicitly listed in assembly. * For this situation, find the hardcoded operand and add the * implied flag rather than adding a new implicit operand. */ x86_oplist_t * existing; if (ia32_true_register_id(list->operand) == REG_DWORD_OFFSET) { for ( existing = insn->operands; existing; existing = existing->next ) { if (existing->op.type == op_register && existing->op.data.reg.id == list->operand) { op = &existing->op; break; } } } if (!op) { op = x86_operand_new( insn ); /* all implicit operands are registers */ handle_impl_reg( op, list->operand ); /* decrement the 'explicit count' incremented by default in * x86_operand_new */ insn->explicit_count = insn->explicit_count -1; } if (!op) { return num; /* gah! return early */ } op->access |= access; op->flags |= flags; op->flags |= op_implied; } return num; }
{ "pile_set_name": "Github" }
Test wasm memory names Waiting for wasm script to be parsed. Setting breakpoint in wasm. Running main. Paused in debugger. name: memory0 Finished. Waiting for wasm script to be parsed. Setting breakpoint in wasm. Running main. Paused in debugger. name: exported_memory Finished. Waiting for wasm script to be parsed. Setting breakpoint in wasm. Running main. Paused in debugger. name: module_name.imported_mem Finished.
{ "pile_set_name": "Github" }
<?php namespace Doctrine\ODM\PHPCR\Query\Builder; class OperandDynamicName extends AbstractLeafNode { protected $alias; public function __construct(AbstractNode $parent, $alias) { $this->alias = $alias; parent::__construct($parent); } public function getAlias() { return $this->alias; } public function getNodeType() { return self::NT_OPERAND_DYNAMIC; } }
{ "pile_set_name": "Github" }
#ifndef BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // 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) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include <boost/mpl/vector/vector30.hpp> #endif #include <boost/mpl/aux_/config/use_preprocessed.hpp> #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector40.hpp # include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else # include <boost/mpl/aux_/config/typeof.hpp> # include <boost/mpl/aux_/config/ctps.hpp> # include <boost/preprocessor/iterate.hpp> namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, <boost/mpl/vector/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED
{ "pile_set_name": "Github" }
/** * Copyright 2009-2016 the original author or authors. * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ibatis.submitted.cache; import org.apache.ibatis.annotations.CacheNamespace; import org.apache.ibatis.annotations.Property; @CacheNamespace(implementation = CustomCache.class, properties = { @Property(name = "stringValue", value = "bar"), @Property(name = "integerValue", value = "1"), @Property(name = "intValue", value = "2"), @Property(name = "longWrapperValue", value = "3"), @Property(name = "longValue", value = "4"), @Property(name = "shortWrapperValue", value = "5"), @Property(name = "shortValue", value = "6"), @Property(name = "floatWrapperValue", value = "7.1"), @Property(name = "floatValue", value = "8.1"), @Property(name = "doubleWrapperValue", value = "9.01"), @Property(name = "doubleValue", value = "10.01"), @Property(name = "byteWrapperValue", value = "11"), @Property(name = "byteValue", value = "12"), @Property(name = "booleanWrapperValue", value = "true"), @Property(name = "booleanValue", value = "true") }) public interface CustomCacheMapper { }
{ "pile_set_name": "Github" }
require File.expand_path('../boot', __FILE__) require 'rails/all' if defined?(Bundler) # If you precompile assets before deploying to production, use this line Bundler.require(*Rails.groups(:assets => %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end module Store class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Custom directories with classes and modules you want to be autoloadable. # config.autoload_paths += %W(#{config.root}/extras) # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named. # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Activate observers that should always be running. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] # Use SQL instead of Active Record's schema dumper when creating the database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql # Enforce whitelist mode for mass assignment. # This will create an empty whitelist of attributes available for mass-assignment for all models # in your app. As such, your models will need to explicitly whitelist or blacklist accessible # parameters by using an attr_accessible or attr_protected declaration. # config.active_record.whitelist_attributes = true # Enable the asset pipeline config.assets.enabled = true # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' end end
{ "pile_set_name": "Github" }
/* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.as.webservices.dmr; import static org.jboss.as.webservices.dmr.Constants.CLIENT_CONFIG; import static org.jboss.as.webservices.dmr.Constants.ENDPOINT_CONFIG; import static org.jboss.as.webservices.dmr.Constants.HANDLER; import static org.jboss.as.webservices.dmr.Constants.NAME; import static org.jboss.as.webservices.dmr.Constants.POST_HANDLER_CHAIN; import static org.jboss.as.webservices.dmr.Constants.PRE_HANDLER_CHAIN; import static org.jboss.as.webservices.dmr.Constants.PROPERTY; import static org.jboss.as.webservices.dmr.Constants.PROTOCOL_BINDINGS; import javax.xml.stream.XMLStreamException; import org.jboss.as.controller.SimpleAttributeDefinition; import org.jboss.as.controller.persistence.SubsystemMarshallingContext; import org.jboss.dmr.ModelNode; import org.jboss.staxmapper.XMLElementWriter; import org.jboss.staxmapper.XMLExtendedStreamWriter; /** * @author <a href="mailto:[email protected]">Richard Opalka</a> * @author <a href="mailto:[email protected]">Alessio Soldano</a> */ final class WSSubsystemWriter implements XMLElementWriter<SubsystemMarshallingContext> { WSSubsystemWriter() { } @Override public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { // write ws subsystem start element context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); ModelNode subsystem = context.getModelNode(); if (Attributes.STATISTICS_ENABLED.isMarshallable(subsystem)) { Attributes.STATISTICS_ENABLED.marshallAsAttribute(subsystem, writer); } for (SimpleAttributeDefinition attr : Attributes.SUBSYSTEM_ATTRIBUTES) { attr.marshallAsElement(subsystem, true, writer); } if (subsystem.hasDefined(ENDPOINT_CONFIG)) { // write endpoint-config elements final ModelNode endpointConfigs = subsystem.get(ENDPOINT_CONFIG); writeConfigs(ENDPOINT_CONFIG, writer, endpointConfigs); } if (subsystem.hasDefined(CLIENT_CONFIG)) { // write client-config elements final ModelNode clientConfigs = subsystem.get(CLIENT_CONFIG); writeConfigs(CLIENT_CONFIG, writer, clientConfigs); } // write ws subsystem end element writer.writeEndElement(); } private static void writeConfigs(final String elementName, final XMLExtendedStreamWriter writer, final ModelNode configs) throws XMLStreamException { ModelNode config = null; for (final String configName : configs.keys()) { config = configs.get(configName); // start config element writer.writeStartElement(elementName); writer.writeAttribute(Constants.NAME, configName); // write pre-handler-chain elements if (config.hasDefined(Constants.PRE_HANDLER_CHAIN)) { final ModelNode handlerChains = config.get(Constants.PRE_HANDLER_CHAIN); writeHandlerChains(writer, handlerChains, true); } // write post-handler-chain elements if (config.hasDefined(Constants.POST_HANDLER_CHAIN)) { final ModelNode handlerChains = config.get(Constants.POST_HANDLER_CHAIN); writeHandlerChains(writer, handlerChains, false); } // write property elements if (config.hasDefined(Constants.PROPERTY)) { final ModelNode properties = config.get(PROPERTY); writeProperties(writer, properties); } // close endpoint-config element writer.writeEndElement(); } } private static void writeProperties(final XMLExtendedStreamWriter writer, final ModelNode properties) throws XMLStreamException { ModelNode property; // write property elements for (final String propertyName : properties.keys()) { property = properties.get(propertyName); writer.writeStartElement(PROPERTY); writer.writeAttribute(NAME, propertyName); Attributes.VALUE.marshallAsAttribute(property, false, writer); writer.writeEndElement(); } } private static void writeHandlerChains(final XMLExtendedStreamWriter writer, final ModelNode handlerChains, final boolean isPre) throws XMLStreamException { ModelNode handlerChain = null; ModelNode handler = null; for (final String handlerChainName : handlerChains.keys()) { handlerChain = handlerChains.get(handlerChainName); // start either pre-handler-chain or post-handler-chain element writer.writeStartElement(isPre ? PRE_HANDLER_CHAIN : POST_HANDLER_CHAIN); writer.writeAttribute(NAME, handlerChainName); if (handlerChain.hasDefined(PROTOCOL_BINDINGS)) { final String protocolBinding = handlerChain.get(PROTOCOL_BINDINGS).asString(); writer.writeAttribute(PROTOCOL_BINDINGS, protocolBinding); } // write handler elements if (handlerChain.hasDefined(HANDLER)) { for (final String handlerName : handlerChain.require(HANDLER).keys()) { handler = handlerChain.get(HANDLER).get(handlerName); writer.writeStartElement(HANDLER); writer.writeAttribute(NAME, handlerName); Attributes.CLASS.marshallAsAttribute(handler, writer); writer.writeEndElement(); } } // end either pre-handler-chain or post-handler-chain element writer.writeEndElement(); } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Stretch="Uniform"> <Canvas Width="48" Height="48"> <Rectangle xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Canvas.Left="1" Canvas.Top="5" Width="46" Height="36" StrokeThickness="2" Stroke="#FF000000" StrokeMiterLimit="10"/> <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="1" Y1="13" X2="47" Y2="13" StrokeThickness="2" Stroke="#FF000000" StrokeMiterLimit="10"/> <Ellipse xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Canvas.Left="15" Canvas.Top="18" Width="18" Height="18" StrokeThickness="2" Stroke="#FF000000" StrokeMiterLimit="10"/> <Ellipse xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Canvas.Left="19.8" Width="8.4" Canvas.Top="18" Height="18" StrokeThickness="2" Stroke="#FF000000" StrokeMiterLimit="10"/> <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="15.3" Y1="30" X2="32.608" Y2="30" StrokeThickness="2" Stroke="#FF000000" StrokeMiterLimit="10"/> <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="15.392" Y1="24" X2="32.7" Y2="24" StrokeThickness="2" Stroke="#FF000000" StrokeMiterLimit="10"/> </Canvas> </Viewbox>
{ "pile_set_name": "Github" }
\* Source Pyomo model name=Scenario1 *\ min x20: +1 x2 -1 x4 +1 x5 s.t. c_l_x21_: +1 x1 >= 0 c_l_x22_: +1 x1 +0 x5 >= -100 r_l_x23_: +1 x5 >= 0 r_u_x23_: +1 x5 <= 0 c_e_x24_: +1 x1 -2 x6 -3 x7 -2 x8 -3 x9 = 0 c_e_x25_: +1 x2 +1 x7 -1 x8 = 10 c_u_x26_: -1 x10 +1 x7 <= 0 c_u_x27_: -1 x11 +1 x8 <= 0 c_u_x28_: -1 x12 +1 x9 <= 0 c_u_x29_: +1 x10 -1 x6 <= 0 c_u_x30_: +1 x11 -1 x7 <= 0 c_u_x31_: +1 x12 -1 x8 <= 0 c_e_x32_: -5 x13 -5 x14 -5 x15 -5 x16 +1 x3 = -10 c_e_x33_: +1 x14 -3 x15 +1 x16 +1 x4 = 0 c_u_x34_: +1 x14 -1 x17 <= 0 c_u_x35_: +1 x15 -1 x18 <= 0 c_u_x36_: +1 x16 -1 x19 <= 0 c_u_x37_: -1 x13 +1 x17 <= 0 c_u_x38_: -1 x14 +1 x18 <= 0 c_u_x39_: -1 x15 +1 x19 <= 0 c_e_ONE_VAR_CONSTANT: ONE_VAR_CONSTANT = 1.0 bounds 0 <= x1 <= 10 -inf <= x2 <= +inf -10 <= x3 <= 10 -inf <= x4 <= +inf -inf <= x5 <= +inf -inf <= x6 <= 1 -inf <= x7 <= +inf -inf <= x8 <= +inf 0 <= x9 <= +inf 0 <= x10 <= 1 0 <= x11 <= 1 0 <= x12 <= 1 -inf <= x13 <= 1 -inf <= x14 <= +inf -inf <= x15 <= +inf 0 <= x16 <= +inf 0 <= x17 <= 1 0 <= x18 <= 1 0 <= x19 <= 1 binary x10 x11 x12 x17 x18 x19 end
{ "pile_set_name": "Github" }
"use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const impl = utils.implSymbol; const HTMLElement = require("./HTMLElement.js"); function HTMLParagraphElement() { throw new TypeError("Illegal constructor"); } Object.setPrototypeOf(HTMLParagraphElement.prototype, HTMLElement.interface.prototype); Object.setPrototypeOf(HTMLParagraphElement, HTMLElement.interface); Object.defineProperty(HTMLParagraphElement, "prototype", { value: HTMLParagraphElement.prototype, writable: false, enumerable: false, configurable: false }); Object.defineProperty(HTMLParagraphElement.prototype, "align", { get() { if (!this || !module.exports.is(this)) { throw new TypeError("Illegal invocation"); } const value = this.getAttribute("align"); return value === null ? "" : value; }, set(V) { if (!this || !module.exports.is(this)) { throw new TypeError("Illegal invocation"); } V = conversions["DOMString"](V, { context: "Failed to set the 'align' property on 'HTMLParagraphElement': The provided value" }); this.setAttribute("align", V); }, enumerable: true, configurable: true }); Object.defineProperty(HTMLParagraphElement.prototype, Symbol.toStringTag, { value: "HTMLParagraphElement", writable: false, enumerable: false, configurable: true }); const iface = { // When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()` // method into this array. It allows objects that directly implements *those* interfaces to be recognized as // implementing this mixin interface. _mixedIntoPredicates: [], is(obj) { if (obj) { if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) { return true; } for (const isMixedInto of module.exports._mixedIntoPredicates) { if (isMixedInto(obj)) { return true; } } } return false; }, isImpl(obj) { if (obj) { if (obj instanceof Impl.implementation) { return true; } const wrapper = utils.wrapperForImpl(obj); for (const isMixedInto of module.exports._mixedIntoPredicates) { if (isMixedInto(wrapper)) { return true; } } } return false; }, convert(obj, { context = "The provided value" } = {}) { if (module.exports.is(obj)) { return utils.implForWrapper(obj); } throw new TypeError(`${context} is not of type 'HTMLParagraphElement'.`); }, create(constructorArgs, privateData) { let obj = Object.create(HTMLParagraphElement.prototype); obj = this.setup(obj, constructorArgs, privateData); return obj; }, createImpl(constructorArgs, privateData) { let obj = Object.create(HTMLParagraphElement.prototype); obj = this.setup(obj, constructorArgs, privateData); return utils.implForWrapper(obj); }, _internalSetup(obj) { HTMLElement._internalSetup(obj); }, setup(obj, constructorArgs, privateData) { if (!privateData) privateData = {}; privateData.wrapper = obj; this._internalSetup(obj); Object.defineProperty(obj, impl, { value: new Impl.implementation(constructorArgs, privateData), writable: false, enumerable: false, configurable: true }); obj[impl][utils.wrapperSymbol] = obj; if (Impl.init) { Impl.init(obj[impl], privateData); } return obj; }, interface: HTMLParagraphElement, expose: { Window: { HTMLParagraphElement } } }; // iface module.exports = iface; const Impl = require("../nodes/HTMLParagraphElement-impl.js");
{ "pile_set_name": "Github" }
/* Demo: https://www.youtube.com/watch?v=MRhAljmHq-o Capture webcam video, show it on screen, and next to it show a version modified by a fragment shader. Computer vision on the GPU. Usage: ./prog [width [height [cpu]] - width and height: size of captured image. Only certain sizes can be returned by the camera. If what you put is not one of them, the largest possible one is taken, and a warning is printed saying what was actually used, and a segfault may happen. You can then just use the actual numbers reported and it should work. TODO don't segfault. `v4l2-ctl --all` shows the largest supported size. TODO how to get all supported sub-sizes. - cpu: if `1`, use a CPU of the image transform, to see if are actually gaining anything with the GPU. Using -O3 can make a HUGE difference, so always use it. TODO: does O3 use SIMD operations? If not, we should use some portable library for it to be faire and use the full CPU power. Examples: ./prog ./prog 960 540 1 Fragment shaders can access any byte of a texture, and so do operations over multiple pixels. Several web examples: https://www.chromeexperiments.com/webgl,webcam-input?page=0 Questions: - http://stackoverflow.com/questions/13693946/image-processing-with-glsl-shaders Demos: - https://www.youtube.com/watch?v=fJtOdJ9MHsA GLSL Linux camera real time edge detection shown on screen. Getting started: <https://github.com/premsasidharan/gpu_img_proc/issues/1#issuecomment-257504913> - WebRTC chess with camera: https://www.youtube.com/watch?v=aK1DC2zp6ZE Android: - http://stackoverflow.com/questions/7847912/is-it-possible-to-give-effect-like-vertex-shader-and-fragment-shader-to-the-andr - http://stackoverflow.com/questions/30723055/how-to-obtain-the-rgb-colors-of-the-camera-texture-in-opengl-es-2-0-for-android - http://stackoverflow.com/questions/18449162/simultaneous-camera-preview-and-processing - http://stackoverflow.com/questions/12519235/modifying-camera-output-using-surfacetexture-and-opengl Post processing is equivalent to image processing (unless there is some magic Krhonos way to bypass the CPU camera image copy to texture): - https://en.wikibooks.org/wiki/OpenGL_Programming/Post-Processing - r3dux tori demo https://www.youtube.com/watch?v=9nDxIbj3mPU ## Benchmark results Lenovo Thinkpad T430, NVIDIA NVS 5400, Linux: - linear blur: max width without frame drop: - CPU: 5 - GPU: 23 Consider that this parameter has a squared effect, and feel the wrath of the GPU here. AKA box blur: https://en.wikipedia.org/wiki/Box_blur Good GPU bogger since n^2. */ #include "common.h" #include "../v4l2/common_v4l2.h" static const GLuint WIDTH = 640; static const GLuint HEIGHT = 480; static const GLfloat vertices[] = { /* xy uv */ -1.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -1.0, -1.0, 1.0, 1.0, }; static const GLuint indices[] = { 0, 1, 2, 0, 2, 3, }; static const GLchar *vertex_shader_source = "#version 330 core\n" "in vec2 coord2d;\n" "in vec2 vertexUv;\n" "out vec2 fragmentUv;\n" "void main() {\n" " gl_Position = vec4(coord2d, 0, 1);\n" " fragmentUv = vertexUv;\n" "}\n"; static const GLchar *fragment_shader_source = "#version 330 core\n" "in vec2 fragmentUv;\n" "out vec3 color;\n" "uniform sampler2D textureSampler;\n" "void main() {\n" " color = texture(textureSampler, fragmentUv.yx).rgb;\n" "}\n"; static const GLchar *vertex_shader_source2 = "#version 330 core\n" "in vec2 coord2d;\n" "in vec2 vertexUv;\n" "out vec2 fragmentUv;\n" "void main() {\n" " gl_Position = vec4(coord2d + vec2(1.0, 0.0), 0, 1);\n" " fragmentUv = vertexUv;\n" "}\n"; static const GLchar *fragment_shader_source2 = "#version 330 core\n" "in vec2 fragmentUv;\n" "out vec3 color;\n" "uniform sampler2D textureSampler;\n" "/* pixel Delta. How large a pixel is in 0.0 to 1.0 that textures use. */\n" "uniform vec2 pixD;\n" "void main() {\n" /*"// Identity\n"*/ /*" color = texture(textureSampler, fragmentUv.yx ).rgb;\n"*/ /*"// Inverter\n"*/ /*" color = 1.0 - texture(textureSampler, fragmentUv.yx ).rgb;\n"*/ /*"// Swapper\n"*/ /*" color = texture(textureSampler, fragmentUv.yx ).gbr;\n"*/ /*"// Double vision ortho.\n"*/ /*" color = ("*/ /*" texture(textureSampler, fragmentUv.yx ).rgb +\n"*/ /*" texture(textureSampler, fragmentUv.xy ).rgb\n"*/ /*" ) / 2.0;\n"*/ /*"// Multi-me.\n"*/ /*" color = texture(textureSampler, 4.0 * fragmentUv.yx ).rgb;\n"*/ /*"// Horizontal linear blur.\n"*/ /*" int blur_width = 21;\n"*/ /*" int blur_width_half = blur_width / 2;\n"*/ /*" color = vec3(0.0, 0.0, 0.0);\n"*/ /*" for (int i = -blur_width_half; i <= blur_width_half; ++i) {\n"*/ /*" color += texture(textureSampler, vec2(fragmentUv.y + i * pixD.x, fragmentUv.x)).rgb;\n"*/ /*" }\n"*/ /*" color /= blur_width;\n"*/ /*"// Square linear blur.\n"*/ " int blur_width = 23;\n" " int blur_width_half = blur_width / 2;\n" " color = vec3(0.0, 0.0, 0.0);\n" " for (int i = -blur_width_half; i <= blur_width_half; ++i) {\n" " for (int j = -blur_width_half; j <= blur_width_half; ++j) {\n" " color += texture(\n" " textureSampler, fragmentUv.yx + ivec2(i, j) * pixD\n" " ).rgb;\n" " }\n" " }\n" " color /= (blur_width * blur_width);\n" "}\n"; int main(int argc, char **argv) { CommonV4l2 common_v4l2; GLFWwindow *window; GLint coord2d_location, textureSampler_location, vertexUv_location, coord2d_location2, pixD_location2, textureSampler_location2, vertexUv_location2 ; GLuint ebo, program, program2, texture, vbo, vao, vao2 ; unsigned int cpu, width, height ; uint8_t *image; float *image2 = NULL; /* CLI arguments. */ if (argc > 1) { width = strtol(argv[1], NULL, 10); } else { width = WIDTH; } if (argc > 2) { height = strtol(argv[2], NULL, 10); } else { height = HEIGHT; } if (argc > 3) { cpu = (argv[3][0] == '1'); } else { cpu = 0; } /* Window system. */ glfwInit(); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); window = glfwCreateWindow(2 * width, height, __FILE__, NULL, NULL); glfwMakeContextCurrent(window); glewInit(); CommonV4l2_init(&common_v4l2, COMMON_V4L2_DEVICE, width, height); /* Shader setup. */ program = common_get_shader_program(vertex_shader_source, fragment_shader_source); coord2d_location = glGetAttribLocation(program, "coord2d"); vertexUv_location = glGetAttribLocation(program, "vertexUv"); textureSampler_location = glGetUniformLocation(program, "textureSampler"); /* Shader setup 2. */ const GLchar *fs; if (cpu) { fs = fragment_shader_source; } else { fs = fragment_shader_source2; } program2 = common_get_shader_program(vertex_shader_source2, fs); coord2d_location2 = glGetAttribLocation(program2, "coord2d"); vertexUv_location2 = glGetAttribLocation(program2, "vertexUv"); textureSampler_location2 = glGetUniformLocation(program2, "textureSampler"); pixD_location2 = glGetUniformLocation(program2, "pixD"); /* Create vbo. */ glGenBuffers(1, &vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, 0); /* Create ebo. */ glGenBuffers(1, &ebo); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); /* vao. */ glGenVertexArrays(1, &vao); glBindVertexArray(vao); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glVertexAttribPointer(coord2d_location, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(vertices[0]), (GLvoid*)0); glEnableVertexAttribArray(coord2d_location); glVertexAttribPointer(vertexUv_location, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(GLfloat), (GLvoid*)(2 * sizeof(vertices[0]))); glEnableVertexAttribArray(vertexUv_location); glBindVertexArray(0); /* vao2. */ glGenVertexArrays(1, &vao2); glBindVertexArray(vao2); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glVertexAttribPointer(coord2d_location2, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(vertices[0]), (GLvoid*)0); glEnableVertexAttribArray(coord2d_location2); glVertexAttribPointer(vertexUv_location2, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(GLfloat), (GLvoid*)(2 * sizeof(vertices[0]))); glEnableVertexAttribArray(vertexUv_location2); glBindVertexArray(0); /* Texture buffer. */ glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); /* Constant state. */ glViewport(0, 0, 2 * width, height); glClearColor(1.0f, 1.0f, 1.0f, 1.0f); glActiveTexture(GL_TEXTURE0); /* Main loop. */ common_fps_init(); do { /* Blocks until an image is available, thus capping FPS to that. * 30FPS is common in cheap webcams. */ CommonV4l2_updateImage(&common_v4l2); image = CommonV4l2_getImage(&common_v4l2); glClear(GL_COLOR_BUFFER_BIT); /* Original. */ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, image ); glUseProgram(program); glUniform1i(textureSampler_location, 0); glBindVertexArray(vao); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0); glBindVertexArray(0); if (cpu) { image2 = realloc(image2, 3 * width * height * sizeof(image2[0])); for (unsigned int i = 0; i < height; ++i) { for (unsigned int j = 0; j < width; ++j) { size_t index = 3 * (i * width + j); /* Inverter. */ /*image2[index + 0] = 1.0 - (image[index + 0] / 255.0);*/ /*image2[index + 1] = 1.0 - (image[index + 1] / 255.0);*/ /*image2[index + 2] = 1.0 - (image[index + 2] / 255.0);*/ /* Swapper. */ /*image2[index + 0] = image[index + 1] / 255.0;*/ /*image2[index + 1] = image[index + 2] / 255.0;*/ /*image2[index + 2] = image[index + 0] / 255.0;*/ /* Square linear blur. */ int blur_width = 5; int blur_width_half = blur_width / 2; int blur_width2 = (blur_width * blur_width); image2[index + 0] = 0.0; image2[index + 1] = 0.0; image2[index + 2] = 0.0; for (int k = -blur_width_half; k <= blur_width_half; ++k) { for (int l = -blur_width_half; l <= blur_width_half; ++l) { int i2 = i + k; int j2 = j + l; // Out of bounds is black. TODO: do module to match shader exactly. if (i2 > 0 && i2 < (int)height && j2 > 0 && j2 < (int)width) { unsigned int srcIndex = index + 3 * (k * width + l); image2[index + 0] += image[srcIndex + 0]; image2[index + 1] += image[srcIndex + 1]; image2[index + 2] += image[srcIndex + 2]; } } } image2[index + 0] /= (blur_width2 * 255.0); image2[index + 1] /= (blur_width2 * 255.0); image2[index + 2] /= (blur_width2 * 255.0); } } glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_FLOAT, image2 ); } /* Modified. */ glUseProgram(program2); glUniform1i(textureSampler_location2, 0); glUniform2f(pixD_location2, 1.0 / width, 1.0 / height); glBindVertexArray(vao2); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0); glBindVertexArray(0); glfwSwapBuffers(window); glfwPollEvents(); common_fps_print(); } while (!glfwWindowShouldClose(window)); /* Cleanup. */ if (cpu) { free(image2); } CommonV4l2_deinit(&common_v4l2); glDeleteBuffers(1, &vbo); glDeleteVertexArrays(1, &vao); glDeleteTextures(1, &texture); glDeleteProgram(program); glfwTerminate(); return EXIT_SUCCESS; }
{ "pile_set_name": "Github" }
import os import stat import pytest from . import environment from .textwrap import DALS from . import contexts class TestEggInfo: setup_script = DALS(""" from setuptools import setup setup( name='foo', py_modules=['hello'], entry_points={'console_scripts': ['hi = hello.run']}, zip_safe=False, ) """) def _create_project(self): with open('setup.py', 'w') as f: f.write(self.setup_script) with open('hello.py', 'w') as f: f.write(DALS(""" def run(): print('hello') """)) @pytest.yield_fixture def env(self): class Environment(str): pass with contexts.tempdir(prefix='setuptools-test.') as env_dir: env = Environment(env_dir) os.chmod(env_dir, stat.S_IRWXU) subs = 'home', 'lib', 'scripts', 'data', 'egg-base' env.paths = dict( (dirname, os.path.join(env_dir, dirname)) for dirname in subs ) list(map(os.mkdir, env.paths.values())) config = os.path.join(env.paths['home'], '.pydistutils.cfg') with open(config, 'w') as f: f.write(DALS(""" [egg_info] egg-base = %(egg-base)s """ % env.paths )) yield env def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): self._create_project() environ = os.environ.copy().update( HOME=env.paths['home'], ) cmd = [ 'install', '--home', env.paths['home'], '--install-lib', env.paths['lib'], '--install-scripts', env.paths['scripts'], '--install-data', env.paths['data'], ] code, data = environment.run_setup_py( cmd=cmd, pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), data_stream=1, env=environ, ) if code: raise AssertionError(data) actual = self._find_egg_info_files(env.paths['lib']) expected = [ 'PKG-INFO', 'SOURCES.txt', 'dependency_links.txt', 'entry_points.txt', 'not-zip-safe', 'top_level.txt', ] assert sorted(actual) == expected def _find_egg_info_files(self, root): results = ( filenames for dirpath, dirnames, filenames in os.walk(root) if os.path.basename(dirpath) == 'EGG-INFO' ) # expect exactly one result result, = results return result
{ "pile_set_name": "Github" }
/* * Memory Setup stuff - taken from blob memsetup.S * * Copyright (C) 2009 Samsung Electronics * Kyungmin Park <[email protected]> * * SPDX-License-Identifier: GPL-2.0+ */ #include <config.h> #include <version.h> #include <asm/arch/cpu.h> #include <asm/arch/clock.h> #include <asm/arch/power.h> /* * Register usages: * * r5 has zero always * r7 has S5PC100 GPIO base, 0xE0300000 * r8 has real GPIO base, 0xE0300000, 0xE0200000 at S5PC100, S5PC110 repectively * r9 has Mobile DDR size, 1 means 1GiB, 2 means 2GiB and so on */ .globl lowlevel_init lowlevel_init: mov r11, lr /* r5 has always zero */ mov r5, #0 ldr r7, =S5PC100_GPIO_BASE ldr r8, =S5PC100_GPIO_BASE /* Read CPU ID */ ldr r2, =S5PC110_PRO_ID ldr r0, [r2] mov r1, #0x00010000 and r0, r0, r1 cmp r0, r5 beq 100f ldr r8, =S5PC110_GPIO_BASE 100: /* Turn on KEY_LED_ON [GPJ4(1)] XMSMWEN */ cmp r7, r8 beq skip_check_didle @ Support C110 only ldr r0, =S5PC110_RST_STAT ldr r1, [r0] and r1, r1, #0x000D0000 cmp r1, #(0x1 << 19) @ DEEPIDLE_WAKEUP beq didle_wakeup cmp r7, r8 skip_check_didle: addeq r0, r8, #0x280 @ S5PC100_GPIO_J4 addne r0, r8, #0x2C0 @ S5PC110_GPIO_J4 ldr r1, [r0, #0x0] @ GPIO_CON_OFFSET bic r1, r1, #(0xf << 4) @ 1 * 4-bit orr r1, r1, #(0x1 << 4) str r1, [r0, #0x0] @ GPIO_CON_OFFSET ldr r1, [r0, #0x4] @ GPIO_DAT_OFFSET bic r1, r1, #(1 << 1) str r1, [r0, #0x4] @ GPIO_DAT_OFFSET /* Don't setup at s5pc100 */ beq 100f /* * Initialize Async Register Setting for EVT1 * Because we are setting EVT1 as the default value of EVT0, * setting EVT0 as well does not make things worse. * Thus, for the simplicity, we set for EVT0, too * * The "Async Registers" are: * 0xE0F0_0000 * 0xE1F0_0000 * 0xF180_0000 * 0xF190_0000 * 0xF1A0_0000 * 0xF1B0_0000 * 0xF1C0_0000 * 0xF1D0_0000 * 0xF1E0_0000 * 0xF1F0_0000 * 0xFAF0_0000 */ ldr r0, =0xe0f00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xe1f00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xf1800000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xf1900000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xf1a00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xf1b00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xf1c00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xf1d00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xf1e00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xf1f00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] ldr r0, =0xfaf00000 ldr r1, [r0] bic r1, r1, #0x1 str r1, [r0] /* * Diable ABB block to reduce sleep current at low temperature * Note that it's hidden register setup don't modify it */ ldr r0, =0xE010C300 ldr r1, =0x00800000 str r1, [r0] 100: /* IO retension release */ ldreq r0, =S5PC100_OTHERS @ 0xE0108200 ldrne r0, =S5PC110_OTHERS @ 0xE010E000 ldr r1, [r0] ldreq r2, =(1 << 31) @ IO_RET_REL ldrne r2, =((1 << 31) | (1 << 30) | (1 << 29) | (1 << 28)) orr r1, r1, r2 /* Do not release retention here for S5PC110 */ streq r1, [r0] /* Disable Watchdog */ ldreq r0, =S5PC100_WATCHDOG_BASE @ 0xEA200000 ldrne r0, =S5PC110_WATCHDOG_BASE @ 0xE2700000 str r5, [r0] /* setting SRAM */ ldreq r0, =S5PC100_SROMC_BASE ldrne r0, =S5PC110_SROMC_BASE ldr r1, =0x9 str r1, [r0] /* S5PC100 has 3 groups of interrupt sources */ ldreq r0, =S5PC100_VIC0_BASE @ 0xE4000000 ldrne r0, =S5PC110_VIC0_BASE @ 0xF2000000 add r1, r0, #0x00100000 add r2, r0, #0x00200000 /* Disable all interrupts (VIC0, VIC1 and VIC2) */ mvn r3, #0x0 str r3, [r0, #0x14] @ INTENCLEAR str r3, [r1, #0x14] @ INTENCLEAR str r3, [r2, #0x14] @ INTENCLEAR /* Set all interrupts as IRQ */ str r5, [r0, #0xc] @ INTSELECT str r5, [r1, #0xc] @ INTSELECT str r5, [r2, #0xc] @ INTSELECT /* Pending Interrupt Clear */ str r5, [r0, #0xf00] @ INTADDRESS str r5, [r1, #0xf00] @ INTADDRESS str r5, [r2, #0xf00] @ INTADDRESS /* for UART */ bl uart_asm_init bl internal_ram_init cmp r7, r8 /* Clear wakeup status register */ ldreq r0, =S5PC100_WAKEUP_STAT ldrne r0, =S5PC110_WAKEUP_STAT ldr r1, [r0] str r1, [r0] /* IO retension release */ ldreq r0, =S5PC100_OTHERS @ 0xE0108200 ldrne r0, =S5PC110_OTHERS @ 0xE010E000 ldr r1, [r0] ldreq r2, =(1 << 31) @ IO_RET_REL ldrne r2, =((1 << 31) | (1 << 30) | (1 << 29) | (1 << 28)) orr r1, r1, r2 str r1, [r0] b 1f didle_wakeup: /* Wait when APLL is locked */ ldr r0, =0xE0100100 @ S5PC110_APLL_CON lockloop: ldr r1, [r0] and r1, r1, #(1 << 29) cmp r1, #(1 << 29) bne lockloop ldr r0, =S5PC110_INFORM0 ldr r1, [r0] mov pc, r1 nop nop nop nop nop 1: mov lr, r11 mov pc, lr /* * system_clock_init: Initialize core clock and bus clock. * void system_clock_init(void) */ system_clock_init: ldr r0, =S5PC110_CLOCK_BASE @ 0xE0100000 /* Check S5PC100 */ cmp r7, r8 bne 110f 100: /* Set Lock Time */ ldr r1, =0xe10 @ Locktime : 0xe10 = 3600 str r1, [r0, #0x000] @ S5PC100_APLL_LOCK str r1, [r0, #0x004] @ S5PC100_MPLL_LOCK str r1, [r0, #0x008] @ S5PC100_EPLL_LOCK str r1, [r0, #0x00C] @ S5PC100_HPLL_LOCK /* S5P_APLL_CON */ ldr r1, =0x81bc0400 @ SDIV 0, PDIV 4, MDIV 444 (1333MHz) str r1, [r0, #0x100] /* S5P_MPLL_CON */ ldr r1, =0x80590201 @ SDIV 1, PDIV 2, MDIV 89 (267MHz) str r1, [r0, #0x104] /* S5P_EPLL_CON */ ldr r1, =0x80870303 @ SDIV 3, PDIV 3, MDIV 135 (67.5MHz) str r1, [r0, #0x108] /* S5P_HPLL_CON */ ldr r1, =0x80600603 @ SDIV 3, PDIV 6, MDIV 96 str r1, [r0, #0x10C] ldr r1, [r0, #0x300] ldr r2, =0x00003fff bic r1, r1, r2 ldr r2, =0x00011301 orr r1, r1, r2 str r1, [r0, #0x300] ldr r1, [r0, #0x304] ldr r2, =0x00011110 orr r1, r1, r2 str r1, [r0, #0x304] ldr r1, =0x00000001 str r1, [r0, #0x308] /* Set Source Clock */ ldr r1, =0x00001111 @ A, M, E, HPLL Muxing str r1, [r0, #0x200] @ S5PC1XX_CLK_SRC0 b 200f 110: ldr r0, =0xE010C000 @ S5PC110_PWR_CFG /* Set OSC_FREQ value */ ldr r1, =0xf str r1, [r0, #0x100] @ S5PC110_OSC_FREQ /* Set MTC_STABLE value */ ldr r1, =0xffffffff str r1, [r0, #0x110] @ S5PC110_MTC_STABLE /* Set CLAMP_STABLE value */ ldr r1, =0x3ff03ff str r1, [r0, #0x114] @ S5PC110_CLAMP_STABLE ldr r0, =S5PC110_CLOCK_BASE @ 0xE0100000 /* Set Clock divider */ ldr r1, =0x14131330 @ 1:1:4:4, 1:4:5 str r1, [r0, #0x300] ldr r1, =0x11110111 @ UART[3210]: MMC[3210] str r1, [r0, #0x310] /* Set Lock Time */ ldr r1, =0x2cf @ Locktime : 30us str r1, [r0, #0x000] @ S5PC110_APLL_LOCK ldr r1, =0xe10 @ Locktime : 0xe10 = 3600 str r1, [r0, #0x008] @ S5PC110_MPLL_LOCK str r1, [r0, #0x010] @ S5PC110_EPLL_LOCK str r1, [r0, #0x020] @ S5PC110_VPLL_LOCK /* S5PC110_APLL_CON */ ldr r1, =0x80C80601 @ 800MHz str r1, [r0, #0x100] /* S5PC110_MPLL_CON */ ldr r1, =0x829B0C01 @ 667MHz str r1, [r0, #0x108] /* S5PC110_EPLL_CON */ ldr r1, =0x80600602 @ 96MHz VSEL 0 P 6 M 96 S 2 str r1, [r0, #0x110] /* S5PC110_VPLL_CON */ ldr r1, =0x806C0603 @ 54MHz str r1, [r0, #0x120] /* Set Source Clock */ ldr r1, =0x10001111 @ A, M, E, VPLL Muxing str r1, [r0, #0x200] @ S5PC1XX_CLK_SRC0 /* OneDRAM(DMC0) clock setting */ ldr r1, =0x01000000 @ ONEDRAM_SEL[25:24] 1 SCLKMPLL str r1, [r0, #0x218] @ S5PC110_CLK_SRC6 ldr r1, =0x30000000 @ ONEDRAM_RATIO[31:28] 3 + 1 str r1, [r0, #0x318] @ S5PC110_CLK_DIV6 /* XCLKOUT = XUSBXTI 24MHz */ add r2, r0, #0xE000 @ S5PC110_OTHERS ldr r1, [r2] orr r1, r1, #(0x3 << 8) @ CLKOUT[9:8] 3 XUSBXTI str r1, [r2] /* CLK_IP0 */ ldr r1, =0x8fefeeb @ DMC[1:0] PDMA0[3] IMEM[5] str r1, [r0, #0x460] @ S5PC110_CLK_IP0 /* CLK_IP1 */ ldr r1, =0xe9fdf0f9 @ FIMD[0] USBOTG[16] @ NANDXL[24] str r1, [r0, #0x464] @ S5PC110_CLK_IP1 /* CLK_IP2 */ ldr r1, =0xf75f7fc @ CORESIGHT[8] MODEM[9] @ HOSTIF[10] HSMMC0[16] @ HSMMC2[18] VIC[27:24] str r1, [r0, #0x468] @ S5PC110_CLK_IP2 /* CLK_IP3 */ ldr r1, =0x8eff038c @ I2C[8:6] @ SYSTIMER[16] UART0[17] @ UART1[18] UART2[19] @ UART3[20] WDT[22] @ PWM[23] GPIO[26] SYSCON[27] str r1, [r0, #0x46c] @ S5PC110_CLK_IP3 /* CLK_IP4 */ ldr r1, =0xfffffff1 @ CHIP_ID[0] TZPC[8:5] str r1, [r0, #0x470] @ S5PC110_CLK_IP3 200: /* wait at least 200us to stablize all clock */ mov r2, #0x10000 1: subs r2, r2, #1 bne 1b mov pc, lr internal_ram_init: ldreq r0, =0xE3800000 ldrne r0, =0xF1500000 ldr r1, =0x0 str r1, [r0] mov pc, lr /* * uart_asm_init: Initialize UART's pins */ uart_asm_init: /* set GPIO to enable UART0-UART4 */ mov r0, r8 ldr r1, =0x22222222 str r1, [r0, #0x0] @ S5PC100_GPIO_A0_OFFSET ldr r1, =0x00002222 str r1, [r0, #0x20] @ S5PC100_GPIO_A1_OFFSET /* Check S5PC100 */ cmp r7, r8 bne 110f /* UART_SEL GPK0[5] at S5PC100 */ add r0, r8, #0x2A0 @ S5PC100_GPIO_K0_OFFSET ldr r1, [r0, #0x0] @ S5PC1XX_GPIO_CON_OFFSET bic r1, r1, #(0xf << 20) @ 20 = 5 * 4-bit orr r1, r1, #(0x1 << 20) @ Output str r1, [r0, #0x0] @ S5PC1XX_GPIO_CON_OFFSET ldr r1, [r0, #0x8] @ S5PC1XX_GPIO_PULL_OFFSET bic r1, r1, #(0x3 << 10) @ 10 = 5 * 2-bit orr r1, r1, #(0x2 << 10) @ Pull-up enabled str r1, [r0, #0x8] @ S5PC1XX_GPIO_PULL_OFFSET ldr r1, [r0, #0x4] @ S5PC1XX_GPIO_DAT_OFFSET orr r1, r1, #(1 << 5) @ 5 = 5 * 1-bit str r1, [r0, #0x4] @ S5PC1XX_GPIO_DAT_OFFSET b 200f 110: /* * Note that the following address * 0xE020'0360 is reserved address at S5PC100 */ /* UART_SEL MP0_5[7] at S5PC110 */ add r0, r8, #0x360 @ S5PC110_GPIO_MP0_5_OFFSET ldr r1, [r0, #0x0] @ S5PC1XX_GPIO_CON_OFFSET bic r1, r1, #(0xf << 28) @ 28 = 7 * 4-bit orr r1, r1, #(0x1 << 28) @ Output str r1, [r0, #0x0] @ S5PC1XX_GPIO_CON_OFFSET ldr r1, [r0, #0x8] @ S5PC1XX_GPIO_PULL_OFFSET bic r1, r1, #(0x3 << 14) @ 14 = 7 * 2-bit orr r1, r1, #(0x2 << 14) @ Pull-up enabled str r1, [r0, #0x8] @ S5PC1XX_GPIO_PULL_OFFSET ldr r1, [r0, #0x4] @ S5PC1XX_GPIO_DAT_OFFSET orr r1, r1, #(1 << 7) @ 7 = 7 * 1-bit str r1, [r0, #0x4] @ S5PC1XX_GPIO_DAT_OFFSET 200: mov pc, lr
{ "pile_set_name": "Github" }
/* * Copyright 2015 The SageTV Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package sage.miniclient; import com.jogamp.opengl.GL2; import com.jogamp.opengl.GLContext; import com.jogamp.opengl.Threading; public class OpenGLVideoRenderer { private sage.miniclient.JOGLVideoUI owner; private boolean pureNativeMode=false; // defer drawing to underlying native code private int videowidth, videoheight; private int videoy, videoypitch, videou, videoupitch, videov, videovpitch; private java.nio.ByteBuffer videobuffer; private boolean activevideo=false; private int videot[]; // textures of the video private int videotemp[]; // temporary texture for nvidia combiner private int fragProg=0; private int videoMode=0; // 0=Unknown 1=fragment program 2=ATI 8500+ 3=NVCombiner 4=Y // Native calls are only used on OSX/Windows (linux uses jtux) public native int initVideoServer(); public native void deinitVideoServer(); public native String getServerVideoOutParams(); public native boolean isGLSLHardware(); // native mode methods, called with the correct GL context active and from within the GL thread public native void createVideo0(int width, int height); // allocate GL resources that need to exist in our GL context public native void closeVideo0(); public native void updateVideo0(); // update internal image data if they need to be done in our GL context public native void drawVideo0(java.awt.Rectangle srcVideoRect, java.awt.Rectangle currVideoBounds); public OpenGLVideoRenderer(sage.miniclient.JOGLVideoUI owner) { this.owner = owner; try { if(MiniClient.MAC_OS_X) initVideoServer(); else if (MiniClient.WINDOWS_OS) { sage.Native.loadLibrary("SageTVWin32"); // For Windows we create the thread in Java Thread t = new Thread("OpenGLVideo") { public void run() { initVideoServer(); } }; t.setDaemon(true); t.setPriority(Thread.MAX_PRIORITY); // video is highest priority t.start(); System.out.println("Started Win32 opengl video thread"); } } catch (Throwable t) { System.out.println("Error creating OpenGL Video of:" + t); } } private void createVideo() { //System.out.println("createvideo"); if(owner.isInFrame() || (owner.getPbuffer().getContext().makeCurrent()==GLContext.CONTEXT_NOT_CURRENT)) { if(!owner.isInFrame()) { System.out.println("Couldn't make pbuffer current?"); return; } else { System.out.println("Create video while already in frame"); } } GL2 gl = owner.getPbuffer().getGL().getGL2(); System.out.println("createvideo width: "+videowidth+" height: "+videoheight); if(videot!=null) gl.glDeleteTextures(3, videot, 0); // try { // closeVideo0(); // } catch(Throwable t) {} if(pureNativeMode) { videot = null; videoMode = 0; // release resources and force reallocation when we leave native mode try { createVideo0(videowidth, videoheight); } catch(Throwable t) {} } else { byte img[] = new byte[videowidth*videoheight*2]; videot = new int[3]; gl.glGenTextures(3, videot, 0); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videot[0]); if(MiniClient.MAC_OS_X) { gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, 0x85BC/*GL_TEXTURE_STORAGE_HINT_APPLE*/, 0x85Be/*GL_STORAGE_CACHED_APPLE*/); gl.glPixelStorei(0x85B2/*GL_UNPACK_CLIENT_STORAGE_APPLE*/, gl.GL_TRUE); } gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR); gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR); gl.glTexImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 1, videowidth, videoheight, 0, gl.GL_LUMINANCE, gl.GL_UNSIGNED_BYTE, java.nio.ByteBuffer.wrap(img)); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videot[1]); if(MiniClient.MAC_OS_X) { gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, 0x85BC/*GL_TEXTURE_STORAGE_HINT_APPLE*/, 0x85Be/*GL_STORAGE_CACHED_APPLE*/); gl.glPixelStorei(0x85B2/*GL_UNPACK_CLIENT_STORAGE_APPLE*/, gl.GL_TRUE); } gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR); gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR); gl.glTexImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 1, videowidth/2, videoheight/2, 0, gl.GL_LUMINANCE, gl.GL_UNSIGNED_BYTE, java.nio.ByteBuffer.wrap(img)); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videot[2]); if(MiniClient.MAC_OS_X) { gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, 0x85BC/*GL_TEXTURE_STORAGE_HINT_APPLE*/, 0x85Be/*GL_STORAGE_CACHED_APPLE*/); gl.glPixelStorei(0x85B2/*GL_UNPACK_CLIENT_STORAGE_APPLE*/, gl.GL_TRUE); } gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR); gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR); gl.glTexImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 1, videowidth/2, videoheight/2, 0, gl.GL_LUMINANCE, gl.GL_UNSIGNED_BYTE, java.nio.ByteBuffer.wrap(img)); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); } if(!owner.isInFrame()) owner.getPbuffer().getContext().release(); } private void updateVideo(int frametype) { if(owner.isInFrame() || (owner.getPbuffer().getContext().makeCurrent()==GLContext.CONTEXT_NOT_CURRENT)) { if(!owner.isInFrame()) { System.out.println("Couldn't make pbuffer current?"); return; } else { System.out.println("update video while already in frame"); } } GL2 gl = owner.getPbuffer().getGL().getGL2(); if(pureNativeMode) { try { updateVideo0(); } catch(Throwable t) {} } else { //System.out.println("20,20 pixel: "+videobuffer.get(20*720+20)); //System.out.println(" width: "+videowidth+" height: "+videoheight); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videot[0]); gl.glPixelStorei(gl.GL_UNPACK_SKIP_PIXELS, videoy); gl.glTexSubImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 0, 0, videowidth, videoheight, gl.GL_LUMINANCE, gl.GL_UNSIGNED_BYTE, videobuffer); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videot[1]); gl.glPixelStorei(gl.GL_UNPACK_SKIP_PIXELS, videou); gl.glTexSubImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 0, 0, videowidth/2, videoheight/2, gl.GL_LUMINANCE, gl.GL_UNSIGNED_BYTE, videobuffer); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videot[2]); gl.glPixelStorei(gl.GL_UNPACK_SKIP_PIXELS, videov); gl.glTexSubImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 0, 0, videowidth/2, videoheight/2, gl.GL_LUMINANCE, gl.GL_UNSIGNED_BYTE, videobuffer); gl.glPixelStorei(gl.GL_UNPACK_SKIP_PIXELS, 0); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glFlush(); } if(!owner.isInFrame()) owner.getPbuffer().getContext().release(); } public void initFragmentProgram(GL2 gl) { int[] fragProgTmp = new int[1]; gl.glGenProgramsARB(1, fragProgTmp, 0); fragProg = fragProgTmp[0]; // R = Y + 1.371 (Cr - 128) // G = Y - 0.698 (Cr - 128) - 0.336 (Cb - 128) // B = Y + 1.732 (Cb - 128) String combineFragProg = "!!ARBfp1.0\n" + "TEMP texSamp0, texSamp1, texSamp2;\n" + "PARAM half = { 0.5, 0.5, 0.5, 0.5 };\n" + "PARAM mulY = { 1.0, 1.0, 1.0, 0.0 };\n" + "PARAM mulCr = { 1.371, -0.698, 0.0, 0.0 };\n" + "PARAM mulCb = { 0.0, -0.336, 1.732, 0.0 };\n" + "TEX texSamp0, fragment.texcoord[0], texture[0], RECT;\n" + "TEX texSamp1, fragment.texcoord[1], texture[1], RECT;\n" + "TEX texSamp2, fragment.texcoord[2], texture[2], RECT;\n" + "SUB texSamp1, texSamp1, half;\n" + "SUB texSamp2, texSamp2, half;\n" + "MUL texSamp0, texSamp0, mulY;\n" + "MAD texSamp0, texSamp1, mulCr, texSamp0;\n" + "MAD texSamp0, texSamp2, mulCb, texSamp0;\n" + "MOV result.color, texSamp0;\n" + "END"; gl.glBindProgramARB (gl.GL_FRAGMENT_PROGRAM_ARB, fragProg); gl.glProgramStringARB(gl.GL_FRAGMENT_PROGRAM_ARB, gl.GL_PROGRAM_FORMAT_ASCII_ARB, combineFragProg.length(), combineFragProg); int[] errPos = new int[1]; gl.glGetIntegerv(gl.GL_PROGRAM_ERROR_POSITION_ARB, errPos, 0); if (errPos[0] >= 0) { System.out.println("Fragment program failed to load:"); String errMsg = gl.glGetString(gl.GL_PROGRAM_ERROR_STRING_ARB); if (errMsg == null) { System.out.println("[No error message available]"); } else { System.out.println("Error message: \"" + errMsg + "\""); } System.out.println("Error occurred at position " + errPos[0] + " in program:"); int endPos = errPos[0]; while (endPos < combineFragProg.length() && combineFragProg.charAt(endPos) != '\n') { ++endPos; } System.out.println(combineFragProg.substring(errPos[0], endPos)); } } /*public void initATIFragmentProgram(GL2 gl) { int[] fragProgTmp = new int[1]; gl.glGenProgramsARB(1, fragProgTmp, 0); fragProg = fragProgTmp[0]; // R = Y + 1.371 (Cr - 128) // G = Y - 0.698 (Cr - 128) - 0.336 (Cb - 128) // B = Y + 1.732 (Cb - 128) String combineFragProg = "!!ATIfs1.0\n" + "StartConstants;\n" + "CONSTANT c0 = { 1.0, 1.0, 1.0, 0.0 };\n" + "CONSTANT c1 = { 0.84275, 0.3255, 0.5, 0.5 };\n" + "CONSTANT c2 = { 0.5, 0.416, 0.933, 0.5 };\n" + "EndConstants;\n" + "StartOutputPass;\n" + "SampleMap r0, t0.stq_dq; #sample the texture\n" + "SampleMap r1, t1.stq_dq; #sample the texture\n" + "SampleMap r2, t2.stq_dq; #sample the texture\n" + "MAD r0, r1.2x.bias, c1.2x.bias, r0;\n" + "MAD r0, r2.2x.bias, c2.2x.bias, r0;\n" + "EndPass;\n"; gl.glBindProgramARB (gl.GL_TEXT_FRAGMENT_SHADER_ATI, fragProg); gl.glProgramStringARB(gl.GL_TEXT_FRAGMENT_SHADER_ATI, gl.GL_PROGRAM_FORMAT_ASCII_ARB, combineFragProg.length(), combineFragProg); int[] errPos = new int[1]; gl.glGetIntegerv(gl.GL_PROGRAM_ERROR_POSITION_ARB, errPos, 0); if (errPos[0] >= 0) { System.out.println("Fragment program failed to load:"); String errMsg = gl.glGetString(gl.GL_PROGRAM_ERROR_STRING_ARB); if (errMsg == null) { System.out.println("[No error message available]"); } else { System.out.println("Error message: \"" + errMsg + "\""); } System.out.println("Error occurred at position " + errPos[0] + " in program:"); int endPos = errPos[0]; while (endPos < combineFragProg.length() && combineFragProg.charAt(endPos) != '\n') { ++endPos; } System.out.println(combineFragProg.substring(errPos[0], endPos)); } }*/ /*public void initNVCombiner(GL2 gl) { videotemp = new int[1]; gl.glGenTextures(1, videotemp, 0); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videotemp[0]); if(MiniClient.MAC_OS_X) { gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, 0x85BC/*GL_TEXTURE_STORAGE_HINT_APPLE*//*, 0x85BE*//*GL_STORAGE_CACHED_APPLE*//*);*/ //gl.glPixelStorei(0x85B2/*GL_UNPACK_CLIENT_STORAGE_APPLE*/, gl.GL_TRUE); /*} gl.glTexImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 4, videowidth, videoheight, 0, gl.GL_BGRA, gl.GL_UNSIGNED_BYTE, null); gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR); gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR); gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_REPLACE); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); }*/ // Shaders from MAC version // TODO: verify math on color transforms and divide into video and pc levels... // can be used for ATI text fragment shader private static String arbVertexProgram = "!!ARBvp1.0\n" + "ATTRIB vertexPosition = vertex.position;\n" + "OUTPUT outputPosition = result.position;\n" + "DP4 outputPosition.x, state.matrix.mvp.row[0], vertexPosition;\n" + "DP4 outputPosition.y, state.matrix.mvp.row[1], vertexPosition;\n" + "DP4 outputPosition.z, state.matrix.mvp.row[2], vertexPosition;\n" + "DP4 outputPosition.w, state.matrix.mvp.row[3], vertexPosition;\n" + "MOV result.color, vertex.color;\n" + "MOV result.texcoord[0], vertex.texcoord[0];\n" + "MOV result.texcoord[1], vertex.texcoord[1];\n" + "MOV result.texcoord[2], vertex.texcoord[2];\n" + "END"; private static String glslVertexProgram = "void main() {\n" + "gl_TexCoord[0] = gl_MultiTexCoord0;\n" + "gl_TexCoord[1] = gl_MultiTexCoord1;\n" + "gl_TexCoord[2] = gl_MultiTexCoord2;\n" + "gl_Position = ftransform();\n" + "}\n"; private static String glslFragmentProgram = "uniform sampler2DRect luma;\n" + "uniform sampler2DRect chromaBlue;\n" + "uniform sampler2DRect chromaRed;\n" + "void main(void) {\n" + "vec4 c0 = vec4(1.403, 0.714, 0.0, 1.0);\n" + "vec4 c1 = vec4(0.0, 0.344, 1.770, 1.0);\n" + "vec4 Y = texture2DRect(luma, gl_TexCoord[0].st) - 0.0625;\n" + "vec4 Cb = texture2DRect(chromaBlue, gl_TexCoord[1].st) - 0.5;\n" + "vec4 Cr = texture2DRect(chromaRed, gl_TexCoord[2].st) - 0.5;\n" + "Cb *= c1;\n" + "Cr *= c0;\n" + "gl_FragColor.r = Y.r + Cr.r;\n" + "gl_FragColor.g = Y.g - Cr.g - Cb.g;\n" + "gl_FragColor.b = Y.b + Cb.b;\n" + "gl_FragColor.a = 1.0;\n" + "}\n"; private static String atiFragmentProgram = "!!ATIfs1.0\n" + "StartConstants;\n" + "CONSTANT c0 = {0.7015, 0.0, 0.885, 0.0};\n" + "CONSTANT c1 = {0.714, 0.344, 0.0, 0.0};\n" + "CONSTANT c2 = {0.0625, 0.0625, 0.0625, 0.0};\n" + "EndConstants;\n" + "StartPrelimPass;\n" + "SampleMap r0, t0.str;\n" + "SampleMap r1, t1.str;\n" + "SampleMap r2, t2.str;\n" + "SUB r0.rgb, r0, c2;\n" + "MOV r3.r, r2.bias;\n" + "MOV r3.g, r1.bias;\n" + "MOV r0.a, 1;\n" + "EndPass;\n" + "StartOutputPass;\n" + "PassTexCoord r0, r0.str;\n" + "PassTexCoord r1, r1.str;\n" + "PassTexCoord r2, r2.str;\n" + "PassTexCoord r3, r3.str;\n" + "DOT2ADD r3.g, r3, c1, 0;\n" + "SUB r0.g, r0, r3;\n" + "MOV r3.rb, c0;\n" + "MAD r0.r, r2.bias, r3.2x, r0;\n" + "MAD r0.b, r1.bias, r3.2x, r0;\n" + "EndPass;\n"; public void renderFragmentProgram(GL2 gl, java.awt.Rectangle srcVideoRect, java.awt.Rectangle currVideoBounds) { gl.glEnable(gl.GL_FRAGMENT_PROGRAM_ARB); gl.glBindProgramARB(gl.GL_FRAGMENT_PROGRAM_ARB, fragProg); gl.glActiveTexture(gl.GL_TEXTURE0); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE,videot[0]); gl.glActiveTexture(gl.GL_TEXTURE1); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE,videot[1]); gl.glActiveTexture(gl.GL_TEXTURE2); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE,videot[2]); gl.glDisable(gl.GL_BLEND); gl.glColor4f(1,1,1,1); gl.glBegin(gl.GL_QUADS); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x, srcVideoRect.y); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, srcVideoRect.x/2, srcVideoRect.y/2); gl.glMultiTexCoord2f(gl.GL_TEXTURE2, srcVideoRect.x/2, srcVideoRect.y/2); gl.glVertex3f(currVideoBounds.x, currVideoBounds.y, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x+srcVideoRect.width, srcVideoRect.y); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, (srcVideoRect.x+srcVideoRect.width)/2, srcVideoRect.y/2); gl.glMultiTexCoord2f(gl.GL_TEXTURE2, (srcVideoRect.x+srcVideoRect.width)/2, srcVideoRect.y/2); gl.glVertex3f(currVideoBounds.x+currVideoBounds.width, currVideoBounds.y, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x+srcVideoRect.width, srcVideoRect.y + srcVideoRect.height); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, (srcVideoRect.x+srcVideoRect.width)/2, (srcVideoRect.y + srcVideoRect.height)/2); gl.glMultiTexCoord2f(gl.GL_TEXTURE2, (srcVideoRect.x+srcVideoRect.width)/2, (srcVideoRect.y + srcVideoRect.height)/2); gl.glVertex3f(currVideoBounds.x+currVideoBounds.width, currVideoBounds.y+currVideoBounds.height, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x, srcVideoRect.y + srcVideoRect.height); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, srcVideoRect.x/2, (srcVideoRect.y + srcVideoRect.height)/2); gl.glMultiTexCoord2f(gl.GL_TEXTURE2, srcVideoRect.x/2, (srcVideoRect.y + srcVideoRect.height)/2); gl.glVertex3f(currVideoBounds.x, currVideoBounds.y+currVideoBounds.height, 1.0f); gl.glEnd(); gl.glActiveTexture(gl.GL_TEXTURE2); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glActiveTexture(gl.GL_TEXTURE1); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glActiveTexture(gl.GL_TEXTURE0); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glDisable(gl.GL_FRAGMENT_PROGRAM_ARB); } /*public void renderATIFragmentProgram(GL2 gl, java.awt.Rectangle srcVideoRect, java.awt.Rectangle currVideoBounds) { gl.glEnable(gl.GL_TEXT_FRAGMENT_SHADER_ATI); gl.glBindProgramARB(gl.GL_TEXT_FRAGMENT_SHADER_ATI, fragProg); gl.glActiveTexture(gl.GL_TEXTURE0); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE,videot[0]); gl.glActiveTexture(gl.GL_TEXTURE1); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE,videot[1]); gl.glActiveTexture(gl.GL_TEXTURE2); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE,videot[2]); gl.glDisable(gl.GL_BLEND); gl.glColor4f(1,1,1,1); gl.glBegin(gl.GL_QUADS); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x, srcVideoRect.y); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, srcVideoRect.x/2, srcVideoRect.y/2); gl.glMultiTexCoord2f(gl.GL_TEXTURE2, srcVideoRect.x/2, srcVideoRect.y/2); gl.glVertex3f(currVideoBounds.x, currVideoBounds.y, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x+srcVideoRect.width, srcVideoRect.y); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, (srcVideoRect.x+srcVideoRect.width)/2, srcVideoRect.y/2); gl.glMultiTexCoord2f(gl.GL_TEXTURE2, (srcVideoRect.x+srcVideoRect.width)/2, srcVideoRect.y/2); gl.glVertex3f(currVideoBounds.x+currVideoBounds.width, currVideoBounds.y, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x+srcVideoRect.width, srcVideoRect.y + srcVideoRect.height); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, (srcVideoRect.x+srcVideoRect.width)/2, (srcVideoRect.y + srcVideoRect.height)/2); gl.glMultiTexCoord2f(gl.GL_TEXTURE2, (srcVideoRect.x+srcVideoRect.width)/2, (srcVideoRect.y + srcVideoRect.height)/2); gl.glVertex3f(currVideoBounds.x+currVideoBounds.width, currVideoBounds.y+currVideoBounds.height, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x, srcVideoRect.y + srcVideoRect.height); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, srcVideoRect.x/2, (srcVideoRect.y + srcVideoRect.height)/2); gl.glMultiTexCoord2f(gl.GL_TEXTURE2, srcVideoRect.x/2, (srcVideoRect.y + srcVideoRect.height)/2); gl.glVertex3f(currVideoBounds.x, currVideoBounds.y+currVideoBounds.height, 1.0f); gl.glEnd(); gl.glActiveTexture(gl.GL_TEXTURE2); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glActiveTexture(gl.GL_TEXTURE1); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glActiveTexture(gl.GL_TEXTURE0); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glDisable(gl.GL_TEXT_FRAGMENT_SHADER_ATI); }*/ // JFT: This is based on the old eavios opengl mode... /*public void renderNVCombiner(GL2 gl, java.awt.Rectangle srcVideoRect, java.awt.Rectangle currVideoBounds) { /* YUV to RGB conversion R = Y + 1.371 (Cr - 128) G = Y - 0.698 (Cr - 128) - 0.336 (Cb - 128) B = Y + 1.732 (Cb - 128) Using 9bit precision I think we can obtain partial conversion in hardware : Generate texture from : (Cr-0.5) * (C0R/2-0.5) + 0.5 (Cr-0.5) * (C0G/2-0.5) + 0.5 (Cr-0.5) * (C0B/2-0.5) + 0.5 + (Cb-0.5) * (C1R/2-0.5) + 0.5 (Cb-0.5) * (C1G/2-0.5) + 0.5 (Cb-0.5) * (C1B/2-0.5) + 0.5 C0R,C0G,C0B = 1.371, -0.698, 0 C1R,C1G,C1B = 0, -0.336, 1.732 Then combine with Y : Y + (T0-0.5)*2 Y + (T0-0.5)*2 Y + (T0-0.5)*2 */ /* float constConv0[] = {1.371f/4.0f+0.5f, -0.698f/4.0f+0.5f, 0.0f+0.5f, 0.0f+0.5f}; float constConv1[] = {0.0f+0.5f, -0.336f/4.0f+0.5f, 1.732f/4.0f+0.5f, 0.0f+0.5f}; gl.glCombinerParameteriNV(gl.GL_NUM_GENERAL_COMBINERS_NV, 2); gl.glCombinerParameterfvNV(gl.GL_CONSTANT_COLOR0_NV, constConv0, 0); gl.glCombinerParameterfvNV(gl.GL_CONSTANT_COLOR1_NV, constConv1, 0); /* A = (Cr Texture - 0.5) B = (constant 0 - 0.5)*2 C = (Cb Texture - 0.5) D = (constant 1 - 0.5)*2 out = AB+CD */ /* gl.glCombinerInputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_VARIABLE_A_NV, gl.GL_TEXTURE0, gl.GL_HALF_BIAS_NORMAL_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_VARIABLE_B_NV, gl.GL_CONSTANT_COLOR0_NV, gl.GL_EXPAND_NORMAL_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_VARIABLE_C_NV, gl.GL_TEXTURE1, gl.GL_HALF_BIAS_NORMAL_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_VARIABLE_D_NV, gl.GL_CONSTANT_COLOR1_NV, gl.GL_EXPAND_NORMAL_NV, gl.GL_RGB); gl.glCombinerOutputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_DISCARD_NV, gl.GL_DISCARD_NV, gl.GL_SPARE0_NV, gl.GL_NONE, gl.GL_NONE, false , false, false); /* A = Spare0 B = 1-0 C = 1-0 D = -0+0.5 out = AB+CD */ /* gl.glCombinerInputNV(gl.GL_COMBINER1_NV, gl.GL_RGB, gl.GL_VARIABLE_A_NV, gl.GL_SPARE0_NV, gl.GL_SIGNED_IDENTITY_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER1_NV, gl.GL_RGB, gl.GL_VARIABLE_B_NV, gl.GL_ZERO, gl.GL_UNSIGNED_INVERT_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER1_NV, gl.GL_RGB, gl.GL_VARIABLE_C_NV, gl.GL_ZERO, gl.GL_UNSIGNED_INVERT_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER1_NV, gl.GL_RGB, gl.GL_VARIABLE_D_NV, gl.GL_ZERO, gl.GL_HALF_BIAS_NEGATE_NV, gl.GL_RGB); gl.glCombinerOutputNV(gl.GL_COMBINER1_NV, gl.GL_RGB, gl.GL_DISCARD_NV, gl.GL_DISCARD_NV, gl.GL_SPARE1_NV, gl.GL_NONE, gl.GL_NONE, false , false, false); /* out = SPARE1 */ /*gl.glFinalCombinerInputNV(gl.GL_VARIABLE_A_NV, gl.GL_SPARE1_NV, gl.GL_UNSIGNED_IDENTITY_NV, gl.GL_RGB); gl.glFinalCombinerInputNV(gl.GL_VARIABLE_B_NV, gl.GL_ZERO, gl.GL_UNSIGNED_INVERT_NV, gl.GL_RGB); gl.glFinalCombinerInputNV(gl.GL_VARIABLE_C_NV, gl.GL_ZERO, gl.GL_UNSIGNED_IDENTITY_NV, gl.GL_RGB); gl.glFinalCombinerInputNV(gl.GL_VARIABLE_D_NV, gl.GL_ZERO, gl.GL_UNSIGNED_IDENTITY_NV, gl.GL_RGB); gl.glActiveTexture(gl.GL_TEXTURE0); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE,videot[1]); gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_REPLACE); gl.glColor4f(1,1,1,1); gl.glActiveTexture(gl.GL_TEXTURE1); gl.glEnable(gl.GL_TEXTURE_RECTANGLE); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE,videot[2]); gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_REPLACE); gl.glColor4f(1,1,1,1); gl.glActiveTexture(gl.GL_TEXTURE0); gl.glDisable(gl.GL_BLEND); gl.glColor4f(1,1,1,1); gl.glEnable(gl.GL_REGISTER_COMBINERS_NV); gl.glBegin(gl.GL_QUADS); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, 0.0f , 0.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, 0.0f , 0.0f); gl.glVertex3f(0, 0, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, videowidth/2.0f, 0.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, videowidth/2.0f, 0.0f); gl.glVertex3f(videowidth/2.0f, 0, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, videowidth/2.0f, videoheight/2.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, videowidth/2.0f, videoheight/2.0f); gl.glVertex3f(videowidth/2.0f, videoheight/2.0f, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, 0.0f, videoheight/2.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, 0.0f, videoheight/2.0f); gl.glVertex3f(0.0f, videoheight/2.0f, 1.0f); gl.glEnd(); gl.glDisable(gl.GL_REGISTER_COMBINERS_NV); /* glClearColor( 128/256.0, 128/256.0, 128/256.0, 0.5); // TODO: Optimization, no need to clear if video takes all the space... gl.glClear( GL_COLOR_BUFFER_BIT);*/ /* gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videotemp[0]); gl.glCopyTexSubImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 0, 0, 0, owner.getCanvasHeight()-videoheight/2, videowidth/2, videoheight/2); //windowheight-videoheight/2 gl.glClearColor( 0.0f, 0.0f, 0.0f, 0.0f); gl.glClear(gl.GL_COLOR_BUFFER_BIT); gl.glActiveTexture(gl.GL_TEXTURE0); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videot[0]); gl.glActiveTexture(gl.GL_TEXTURE1); gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, videotemp[0]); gl.glCombinerParameteriNV(gl.GL_NUM_GENERAL_COMBINERS_NV, 1); gl.glCombinerInputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_VARIABLE_A_NV, gl.GL_TEXTURE0, gl.GL_UNSIGNED_IDENTITY_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_VARIABLE_B_NV, gl.GL_ZERO, gl.GL_UNSIGNED_INVERT_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_VARIABLE_C_NV, gl.GL_TEXTURE1, gl.GL_EXPAND_NORMAL_NV, gl.GL_RGB); gl.glCombinerInputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_VARIABLE_D_NV, gl.GL_ZERO, gl.GL_UNSIGNED_INVERT_NV, gl.GL_RGB); gl.glCombinerOutputNV(gl.GL_COMBINER0_NV, gl.GL_RGB, gl.GL_DISCARD_NV, gl.GL_DISCARD_NV, gl.GL_SPARE0_NV, gl.GL_NONE, gl.GL_NONE, false , false, false); gl.glFinalCombinerInputNV(gl.GL_VARIABLE_A_NV, gl.GL_SPARE0_NV, gl.GL_UNSIGNED_IDENTITY_NV, gl.GL_RGB); gl.glFinalCombinerInputNV(gl.GL_VARIABLE_B_NV, gl.GL_ZERO, gl.GL_UNSIGNED_INVERT_NV, gl.GL_RGB); gl.glFinalCombinerInputNV(gl.GL_VARIABLE_C_NV, gl.GL_ZERO, gl.GL_UNSIGNED_IDENTITY_NV, gl.GL_RGB); gl.glFinalCombinerInputNV(gl.GL_VARIABLE_D_NV, gl.GL_ZERO, gl.GL_UNSIGNED_IDENTITY_NV, gl.GL_RGB); gl.glEnable(gl.GL_REGISTER_COMBINERS_NV); gl.glBegin(gl.GL_QUADS); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x, srcVideoRect.y); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, srcVideoRect.x/2.0f , (srcVideoRect.y + srcVideoRect.height)/2.0f); gl.glVertex3f(currVideoBounds.x, currVideoBounds.y, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x + srcVideoRect.width, srcVideoRect.y); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, (srcVideoRect.x + srcVideoRect.width)/2.0f, (srcVideoRect.y + srcVideoRect.height)/2.0f); gl.glVertex3f(currVideoBounds.x+currVideoBounds.width, currVideoBounds.y, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x + srcVideoRect.width, srcVideoRect.y + srcVideoRect.height); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, (srcVideoRect.x + srcVideoRect.width)/2.0f, srcVideoRect.y/2.0f); gl.glVertex3f(currVideoBounds.x+currVideoBounds.width, currVideoBounds.y+currVideoBounds.height, 1.0f); gl.glMultiTexCoord2f(gl.GL_TEXTURE0, srcVideoRect.x, srcVideoRect.y + srcVideoRect.height); gl.glMultiTexCoord2f(gl.GL_TEXTURE1, srcVideoRect.x/2.0f, srcVideoRect.y/2.0f); gl.glVertex3f(currVideoBounds.x, currVideoBounds.y+currVideoBounds.height, 1.0f); gl.glEnd(); gl.glDisable(gl.GL_REGISTER_COMBINERS_NV); gl.glActiveTexture(gl.GL_TEXTURE1); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glActiveTexture(gl.GL_TEXTURE0); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glDisable(gl.GL_BLEND); gl.glColor4f(1,1,1,1); }*/ public boolean drawVideo(GL2 gl, java.awt.Rectangle srcVideoRect, java.awt.Rectangle currVideoBounds) { if(activevideo && pureNativeMode) { try { drawVideo0(srcVideoRect, currVideoBounds); } catch(Throwable t) {} return true; } else if(activevideo && videot!=null && currVideoBounds!=null) { if (srcVideoRect == null) srcVideoRect = new java.awt.Rectangle(0, 0, videowidth, videoheight); if(videoMode==0) { String rndrStr = gl.glGetString(gl.GL_RENDERER).toUpperCase(); String vendrStr = gl.glGetString(gl.GL_VENDOR).toUpperCase(); if(gl.isExtensionAvailable("GL_ARB_fragment_program")) { System.out.println("Using fragment program mode\n"); videoMode=1; initFragmentProgram(gl); } // JFT: those are not supported anymore in recent jogl /*else if(gl.isExtensionAvailable("GL_ATI_text_fragment_shader")) { System.out.println("Using ATI mode\n"); videoMode=2; initATIFragmentProgram(gl); } else if(gl.isExtensionAvailable("GL_NV_register_combiners")) { System.out.println("Using NV_register_combiners mode\n"); videoMode=3; initNVCombiner(gl); }*/ else { System.out.println("Couldn't find fragment program extension? No video will be shown\n"); videoMode=9; } } switch(videoMode) { case 0: gl.glClear( gl.GL_COLOR_BUFFER_BIT); break; case 1: renderFragmentProgram(gl, srcVideoRect, currVideoBounds); break; /*case 2: renderATIFragmentProgram(gl, srcVideoRect, currVideoBounds); break; case 3: renderNVCombiner(gl, srcVideoRect, currVideoBounds); break;*/ case 9: gl.glClear( gl.GL_COLOR_BUFFER_BIT); break; } return true; } else { gl.glClear(gl.GL_COLOR_BUFFER_BIT); return false; } } // defer rendering to underlying native code (for integration with other non-Java APIs, like CoreVideo or QT) // calling closeVideo or createVideo will end native mode public boolean startNativeMode(int width, int height) { System.out.println("OpenGLVideoRenderer startNativeMode "+width+" "+height); videowidth=width; videoheight=height; pureNativeMode=true; if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) { Threading.invokeOnOpenGLThread(true, new Runnable() { public void run() { createVideo(); } }); } else createVideo(); return true; } // This method is called to create the video server public boolean createVideo(int width, int height, int format) { System.out.println("OpenGLVideoRenderer createVideo "+width+" "+height+" "+format); videowidth=width; videoheight=height; pureNativeMode=false; if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) { Threading.invokeOnOpenGLThread(true, new Runnable() { public void run() { createVideo(); } }); } else createVideo(); return true; } public boolean updateVideo(final int frametype, java.nio.ByteBuffer buf) { //System.out.println("OpenGLVideoRenderer updateVideo "+frametype); if(!pureNativeMode) { videoy=0; videoypitch=videowidth; videou=videowidth*videoheight; videoupitch=videowidth/2; videov=videowidth*videoheight+videowidth*videoheight/4; videovpitch=videowidth/2; videobuffer=buf; } if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) { Threading.invokeOnOpenGLThread(true, new Runnable() { public void run() { updateVideo(frametype); } }); } else updateVideo(frametype); activevideo=true; owner.videoWasUpdated(); return true; } public boolean closeVideo() { System.out.println("OpenGLVideoRenderer closeVideo"); activevideo=false; pureNativeMode=false; if(MiniClient.MAC_OS_X) { if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) { Threading.invokeOnOpenGLThread(true,new Runnable() { public void run() { closeVideo0(); } }); } else closeVideo0(); } return true; } }
{ "pile_set_name": "Github" }
/*============================================================================= Copyright (c) 2001-2014 Joel de Guzman 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) ==============================================================================*/ #if !defined(BOOST_SPIRIT_X3_NUMERIC_FEBRUARY_05_2007_1231PM) #define BOOST_SPIRIT_X3_NUMERIC_FEBRUARY_05_2007_1231PM #include <boost/spirit/home/x3/numeric/bool.hpp> #include <boost/spirit/home/x3/numeric/int.hpp> #include <boost/spirit/home/x3/numeric/uint.hpp> #include <boost/spirit/home/x3/numeric/real.hpp> #endif
{ "pile_set_name": "Github" }
/* Copyright The Kubernetes Authors. 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 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by informer-gen. DO NOT EDIT. package v1 import ( "context" time "time" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" v1 "k8s.io/client-go/listers/core/v1" cache "k8s.io/client-go/tools/cache" ) // ConfigMapInformer provides access to a shared informer and lister for // ConfigMaps. type ConfigMapInformer interface { Informer() cache.SharedIndexInformer Lister() v1.ConfigMapLister } type configMapInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } // NewConfigMapInformer constructs a new informer for ConfigMap type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewConfigMapInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredConfigMapInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredConfigMapInformer constructs a new informer for ConfigMap type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredConfigMapInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ConfigMaps(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ConfigMaps(namespace).Watch(context.TODO(), options) }, }, &corev1.ConfigMap{}, resyncPeriod, indexers, ) } func (f *configMapInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredConfigMapInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *configMapInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&corev1.ConfigMap{}, f.defaultInformer) } func (f *configMapInformer) Lister() v1.ConfigMapLister { return v1.NewConfigMapLister(f.Informer().GetIndexer()) }
{ "pile_set_name": "Github" }
"use strict"; module.exports = require("./is-implemented")() ? Math.asinh : require("./shim");
{ "pile_set_name": "Github" }
"""Subset of inspect module from upstream python We use this instead of upstream because upstream inspect is slow to import, and significantly contributes to numpy import times. Importing this copy has almost no overhead. """ from __future__ import division, absolute_import, print_function import types __all__ = ['getargspec', 'formatargspec'] # ----------------------------------------------------------- type-checking def ismethod(object): """Return true if the object is an instance method. Instance method objects provide these attributes: __doc__ documentation string __name__ name with which this method was defined im_class class object in which this method belongs im_func function object containing implementation of method im_self instance to which this method is bound, or None """ return isinstance(object, types.MethodType) def isfunction(object): """Return true if the object is a user-defined function. Function objects provide these attributes: __doc__ documentation string __name__ name with which this function was defined func_code code object containing compiled function bytecode func_defaults tuple of any default values for arguments func_doc (same as __doc__) func_globals global namespace in which this function was defined func_name (same as __name__) """ return isinstance(object, types.FunctionType) def iscode(object): """Return true if the object is a code object. Code objects provide these attributes: co_argcount number of arguments (not including * or ** args) co_code string of raw compiled bytecode co_consts tuple of constants used in the bytecode co_filename name of file in which this code object was created co_firstlineno number of first line in Python source code co_flags bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg co_lnotab encoded mapping of line numbers to bytecode indices co_name name with which this code object was defined co_names tuple of names of local variables co_nlocals number of local variables co_stacksize virtual machine stack space required co_varnames tuple of names of arguments and local variables """ return isinstance(object, types.CodeType) # ------------------------------------------------ argument list extraction # These constants are from Python's compile.h. CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS = 1, 2, 4, 8 def getargs(co): """Get information about the arguments accepted by a code object. Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None. """ if not iscode(co): raise TypeError('arg is not a code object') nargs = co.co_argcount names = co.co_varnames args = list(names[:nargs]) # The following acrobatics are for anonymous (tuple) arguments. # Which we do not need to support, so remove to avoid importing # the dis module. for i in range(nargs): if args[i][:1] in ['', '.']: raise TypeError("tuple function arguments are not supported") varargs = None if co.co_flags & CO_VARARGS: varargs = co.co_varnames[nargs] nargs = nargs + 1 varkw = None if co.co_flags & CO_VARKEYWORDS: varkw = co.co_varnames[nargs] return args, varargs, varkw def getargspec(func): """Get the names and default values of a function's arguments. A tuple of four things is returned: (args, varargs, varkw, defaults). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'defaults' is an n-tuple of the default values of the last n arguments. """ if ismethod(func): func = func.__func__ if not isfunction(func): raise TypeError('arg is not a Python function') args, varargs, varkw = getargs(func.__code__) return args, varargs, varkw, func.__defaults__ def getargvalues(frame): """Get information about arguments passed into a particular frame. A tuple of four things is returned: (args, varargs, varkw, locals). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'locals' is the locals dictionary of the given frame. """ args, varargs, varkw = getargs(frame.f_code) return args, varargs, varkw, frame.f_locals def joinseq(seq): if len(seq) == 1: return '(' + seq[0] + ',)' else: return '(' + ', '.join(seq) + ')' def strseq(object, convert, join=joinseq): """Recursively walk a sequence, stringifying each element. """ if type(object) in [list, tuple]: return join([strseq(_o, convert, join) for _o in object]) else: return convert(object) def formatargspec(args, varargs=None, varkw=None, defaults=None, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value), join=joinseq): """Format an argument spec from the 4 values returned by getargspec. The first four arguments are (args, varargs, varkw, defaults). The other four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional function to format the sequence of arguments. """ specs = [] if defaults: firstdefault = len(args) - len(defaults) for i in range(len(args)): spec = strseq(args[i], formatarg, join) if defaults and i >= firstdefault: spec = spec + formatvalue(defaults[i - firstdefault]) specs.append(spec) if varargs is not None: specs.append(formatvarargs(varargs)) if varkw is not None: specs.append(formatvarkw(varkw)) return '(' + ', '.join(specs) + ')' def formatargvalues(args, varargs, varkw, locals, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value), join=joinseq): """Format an argument spec from the 4 values returned by getargvalues. The first four arguments are (args, varargs, varkw, locals). The next four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional function to format the sequence of arguments. """ def convert(name, locals=locals, formatarg=formatarg, formatvalue=formatvalue): return formatarg(name) + formatvalue(locals[name]) specs = [] for i in range(len(args)): specs.append(strseq(args[i], convert, join)) if varargs: specs.append(formatvarargs(varargs) + formatvalue(locals[varargs])) if varkw: specs.append(formatvarkw(varkw) + formatvalue(locals[varkw])) return '(' + ', '.join(specs) + ')'
{ "pile_set_name": "Github" }
#!/usr/bin/env sh ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done SAVED="`pwd`" cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn () { echo "$*" } die () { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=true ;; NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin, switch paths to Windows format before running java if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=$((i+1)) done case $i in (0) set -- ;; (1) set -- "$args0" ;; (2) set -- "$args0" "$args1" ;; (3) set -- "$args0" "$args1" "$args2" ;; (4) set -- "$args0" "$args1" "$args2" "$args3" ;; (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi # Escape application args save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } APP_ARGS=$(save "$@") # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then cd "$(dirname "$0")" fi exec "$JAVACMD" "$@"
{ "pile_set_name": "Github" }
<p>Nested <code>if</code>, <code>for</code>, <code>while</code>, <code>switch</code>, and <code>try</code> statements are key ingredients for making what's known as "Spaghetti code".</p> <p>Such code is hard to read, refactor and therefore maintain.</p> <h2>Noncompliant Code Example</h2> <p>With the default threshold of 3:</p> <pre> if condition1 { // Compliant - depth = 1 /* ... */ if condition2 { // Compliant - depth = 2 /* ... */ for i := 1; i &lt;= 10; i++ { // Compliant - depth = 3, not exceeding the limit /* ... */ if condition4 { // Noncompliant - depth = 4 if condition5 { // Depth = 5, exceeding the limit, but issues are only reported on depth = 4 /* ... */ } return } } } } </pre>
{ "pile_set_name": "Github" }
// // CQDeclareAlertView.m // iDeliver // // Created by 蔡强 on 2017/4/3. // Copyright © 2017年 Caiqiang. All rights reserved. // //========== 申报异常弹窗 ==========// #import "CQDeclareAlertView.h" #import "UIColor+Util.h" #import "UIView+frameAdjust.h" @interface CQDeclareAlertView ()<UITextViewDelegate> /** 弹窗主内容view */ @property (nonatomic,strong) UIView *contentView; /** 弹窗标题 */ @property (nonatomic,copy) NSString *title; /** 弹窗message */ @property (nonatomic,copy) NSString *message; /** message label */ @property (nonatomic,strong) UILabel *messageLabel; /** 左边按钮title */ @property (nonatomic,copy) NSString *leftButtonTitle; /** 右边按钮title */ @property (nonatomic,copy) NSString *rightButtonTitle; @end #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height @implementation CQDeclareAlertView #pragma mark - 构造方法 /** 申报异常弹窗的构造方法 @param title 弹窗标题 @param message 弹窗message @param delegate 确定代理方 @param leftButtonTitle 左边按钮的title @param rightButtonTitle 右边按钮的title @return 一个申报异常的弹窗 */ - (instancetype)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate leftButtonTitle:(NSString *)leftButtonTitle rightButtonTitle:(NSString *)rightButtonTitle { if (self = [super init]) { self.title = title; self.message = message; self.delegate = delegate; self.leftButtonTitle = leftButtonTitle; self.rightButtonTitle = rightButtonTitle; // 接收键盘显示隐藏的通知 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleKeyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleKeyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; // UI搭建 [self setupUI]; } return self; } #pragma mark - UI搭建 /** UI搭建 */ - (void)setupUI { self.frame = [UIScreen mainScreen].bounds; self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; //------- 弹窗主内容 -------// self.contentView = [[UIView alloc] init]; self.contentView.frame = CGRectMake((SCREEN_WIDTH - 285) / 2, (SCREEN_HEIGHT - 215) / 2, 285, 215); self.contentView.center = self.center; [self addSubview:self.contentView]; self.contentView.backgroundColor = [UIColor whiteColor]; self.contentView.layer.cornerRadius = 6; // 标题 UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 10, self.contentView.width, 22)]; [self.contentView addSubview:titleLabel]; titleLabel.font = [UIFont boldSystemFontOfSize:20]; titleLabel.textAlignment = NSTextAlignmentCenter; titleLabel.text = self.title; // 填写异常情况描述的textView self.textView = [[UITextView alloc]initWithFrame:CGRectMake(22, titleLabel.maxY + 10, self.contentView.width - 44, 103)]; [self.contentView addSubview:self.textView]; self.textView.layer.cornerRadius = 6; self.textView.backgroundColor = [UIColor colorWithHexString:@"e0e0e0"]; self.textView.font = [UIFont systemFontOfSize:12]; [self.textView becomeFirstResponder]; self.textView.delegate = self; // textView里面的占位label self.messageLabel = [[UILabel alloc] initWithFrame:CGRectMake(8, 8, self.textView.width - 16, self.textView.height - 16)]; self.messageLabel.text = self.message; self.messageLabel.numberOfLines = 0; self.messageLabel.font = [UIFont systemFontOfSize:12]; self.messageLabel.textColor = [UIColor colorWithHexString:@"484848"]; [self.messageLabel sizeToFit]; [self.textView addSubview:self.messageLabel]; // 红色提示label UILabel *redLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.textView.x, self.textView.maxY + 5, self.textView.width, 20)]; [self.contentView addSubview:redLabel]; redLabel.textColor = [UIColor colorWithHexString:@"d51619"]; redLabel.font = [UIFont systemFontOfSize:12]; redLabel.numberOfLines = 0; if ([self.message isEqualToString:@""]) { redLabel.text = @""; }else{ redLabel.text = [NSString stringWithFormat:@"(%@)",self.message]; } [redLabel sizeToFit]; // 申报异常按钮 UIButton *abnormalButton = [[UIButton alloc]initWithFrame:CGRectMake(self.textView.minX, redLabel.maxY + 5, 100, 40)]; [self.contentView addSubview:abnormalButton]; abnormalButton.backgroundColor = [UIColor colorWithHexString:@"d51619"]; [abnormalButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [abnormalButton setTitle:@"申报异常" forState:UIControlStateNormal]; [abnormalButton.titleLabel setFont:[UIFont systemFontOfSize:18]]; abnormalButton.layer.cornerRadius = 6; [abnormalButton addTarget:self action:@selector(abnormalButtonClicked) forControlEvents:UIControlEventTouchUpInside]; // 取消按钮 UIButton *cancelButton = [[UIButton alloc] initWithFrame:CGRectMake(self.textView.maxX - 100, abnormalButton.minY, 100, 40)]; [self.contentView addSubview:cancelButton]; [cancelButton setTitle:@"取消" forState:UIControlStateNormal]; cancelButton.backgroundColor = [UIColor colorWithHexString:@"c8c8c8"]; [cancelButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [cancelButton.titleLabel setFont:[UIFont systemFontOfSize:18]]; cancelButton.layer.cornerRadius = 6; [cancelButton addTarget:self action:@selector(cancelButtonClicked) forControlEvents:UIControlEventTouchUpInside]; //------- 调整弹窗高度和中心 -------// self.contentView.height = cancelButton.maxY + 10; self.contentView.center = self.center; } #pragma mark - 弹窗展示/隐藏 /** 弹出此弹窗 */ - (void)show { // 出场动画 self.alpha = 0; self.contentView.transform = CGAffineTransformScale(self.contentView.transform, 1.3, 1.3); [UIView animateWithDuration:0.2 animations:^{ self.alpha = 1; self.contentView.transform = CGAffineTransformIdentity; }]; UIWindow *window = [UIApplication sharedApplication].delegate.window; [window addSubview:self]; } /** 移除此弹窗 */ - (void)dismiss { [self removeFromSuperview]; } #pragma mark - User Action /** 申报异常按钮点击 */ - (void)abnormalButtonClicked { if ([self.delegate respondsToSelector:@selector(CQDeclareAlertView:clickedButtonAtIndex:)]) { [self.delegate CQDeclareAlertView:self clickedButtonAtIndex:0]; } [self dismiss]; } /** 取消按钮点击 */ - (void)cancelButtonClicked { if ([self.delegate respondsToSelector:@selector(CQDeclareAlertView:clickedButtonAtIndex:)]) { [self.delegate CQDeclareAlertView:self clickedButtonAtIndex:1]; } [self dismiss]; } - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [self endEditing:YES]; } #pragma mark - 处理键盘显示/隐藏 /** 处理键盘将要显示 */ - (void)handleKeyboardWillShow:(NSNotification *)notification { // 获取到了键盘frame CGRect frame = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; CGFloat keyboardHeight = frame.size.height; self.contentView.maxY = SCREEN_HEIGHT - keyboardHeight - 10; } - (void)handleKeyboardWillHide:(NSNotification *)notification { // 弹窗回到屏幕正中 self.contentView.centerY = SCREEN_HEIGHT / 2; } #pragma mark - UITextView Delegate - (void)textViewDidChange:(UITextView *)textView { self.messageLabel.hidden = ![textView.text isEqualToString:@""]; } @end
{ "pile_set_name": "Github" }
# -*- text -*- # # $Id: 1b8e396ca2700571130db6effe184ac347f2cd49 $ ####################################################################### # # = Attr_filter Module # # The `attr_filter` module exists for filtering certain attributes and # values in received (or transmitted) radius packets. It gives the # server a flexible framework to filter the attributes we send to or # receive from home servers or NASes. This makes sense, for example, # in an out-sourced dialup situation to various policy decisions, such as # restricting a client to certain ranges of `Idle-Timeout` or `Session-Time-out`. # # Filter rules are normally defined and applied on a per-realm basis, Filter # rules can optionally be applied using another attribute, by editing the key # configuration for this module. # # The rules for each entry are parsed to top to bottom, and an attribute # must pass *all* the rules which affect it in order to make it past the filter. # Order of the rules is important. # The operators and their purpose in defining the rules are as follows: # # [options="header", cols="10%,90%"] # |=== # | Operator | Description # | = | THIS OPERATOR IS NOT ALLOWED. If used, and warning message is # printed and it is treated as *==*. # | := | Set, this attribute and value will always be placed in the # output A/V Pairs. If the attribute exists, it is overwritten. # | == | Equal, value must match exactly. # | =* | Always Equal, allow all values for the specified attribute. # | !* | Never Equal, disallow all values for the specified attribute. # (This is redundant, as any A/V Pair not explicitly permitted # will be dropped). # | != | Not Equal, value must not match. # | >= | Greater Than or Equal. # | <= | Less Than or Equal. # | > | Greater Than. # | < | Less Than. # |=== # # If regular expressions are enabled the following operators are also possible. # (Regular Expressions are included by default unless your system doesn't support # them, which should be rare). The value field uses standard regular expression syntax. # # [options="header", cols="10%,90%"] # |=== # | Operator | Description # | =~ | Regular Expression Equal # | !~ | Regular Expression Not Equal # |=== # # ## Syntax # # The configuration items are: # #attr_filter attr_filter.<section> { # # key:: The `key` to use for filter the packets. # # key = "<value>" # # relaxed:: Only move attribute if it passed all rules, or if the config says we # should copy unmatched attributes. # # relaxed = no # # filename:: The `filename` with the attributes to filter. # # filename = </path/><section> #} # # ## Configuration Settings # # The following default instances. # # # ### pre-proxy # # Filters the attributes in the packets we send to # the RADIUS home servers. # # Add this before calling rlm_radius for proxying. # attr_filter attr_filter.pre-proxy { key = "%{Realm}" filename = ${modconfdir}/${.:name}/pre-proxy } # # ### post-proxy # # Filters the attributes received in replies from proxied # servers, to make sure we send back to our RADIUS client # only allowed attributes. # # Add this after calling `rlm_radius` for proxying. # attr_filter attr_filter.post-proxy { key = "%{Realm}" filename = ${modconfdir}/${.:name}/post-proxy } # # ### access_reject # # Enforce RFC requirements on the contents of `Access-Reject` # packets. This should be called from `send Access-Reject`. # attr_filter attr_filter.access_reject { key = "%{User-Name}" filename = ${modconfdir}/${.:name}/access_reject } # # ### access_challenge # # Enforce RFC requirements on the contents of `Access-Challenge` # packets. This is called from `send Access-Challenge`. # attr_filter attr_filter.access_challenge { key = "%{User-Name}" filename = ${modconfdir}/${.:name}/access_challenge } # # ### accounting_response # # Enforce RFC requirements on the contents of the # `Accounting-Response` packets. Called from the # `send Accounting-Response` section. # attr_filter attr_filter.accounting_response { key = "%{User-Name}" filename = ${modconfdir}/${.:name}/accounting_response }
{ "pile_set_name": "Github" }
""" ================== Two-class AdaBoost ================== This example fits an AdaBoosted decision stump on a non-linearly separable classification dataset composed of two "Gaussian quantiles" clusters (see :func:`sklearn.datasets.make_gaussian_quantiles`) and plots the decision boundary and decision scores. The distributions of decision scores are shown separately for samples of class A and B. The predicted class label for each sample is determined by the sign of the decision score. Samples with decision scores greater than zero are classified as B, and are otherwise classified as A. The magnitude of a decision score determines the degree of likeness with the predicted class label. Additionally, a new dataset could be constructed containing a desired purity of class B, for example, by only selecting samples with a decision score above some value. """ print(__doc__) # Author: Noel Dawe <[email protected]> # # License: BSD 3 clause import numpy as np import matplotlib.pyplot as plt from sklearn.ensemble import AdaBoostClassifier from sklearn.tree import DecisionTreeClassifier from sklearn.datasets import make_gaussian_quantiles # Construct dataset X1, y1 = make_gaussian_quantiles(cov=2., n_samples=200, n_features=2, n_classes=2, random_state=1) X2, y2 = make_gaussian_quantiles(mean=(3, 3), cov=1.5, n_samples=300, n_features=2, n_classes=2, random_state=1) X = np.concatenate((X1, X2)) y = np.concatenate((y1, - y2 + 1)) # Create and fit an AdaBoosted decision tree bdt = AdaBoostClassifier(DecisionTreeClassifier(max_depth=1), algorithm="SAMME", n_estimators=200) bdt.fit(X, y) plot_colors = "br" plot_step = 0.02 class_names = "AB" plt.figure(figsize=(10, 5)) # Plot the decision boundaries plt.subplot(121) x_min, x_max = X[:, 0].min() - 1, X[:, 0].max() + 1 y_min, y_max = X[:, 1].min() - 1, X[:, 1].max() + 1 xx, yy = np.meshgrid(np.arange(x_min, x_max, plot_step), np.arange(y_min, y_max, plot_step)) Z = bdt.predict(np.c_[xx.ravel(), yy.ravel()]) Z = Z.reshape(xx.shape) cs = plt.contourf(xx, yy, Z, cmap=plt.cm.Paired) plt.axis("tight") # Plot the training points for i, n, c in zip(range(2), class_names, plot_colors): idx = np.where(y == i) plt.scatter(X[idx, 0], X[idx, 1], c=c, cmap=plt.cm.Paired, label="Class %s" % n) plt.xlim(x_min, x_max) plt.ylim(y_min, y_max) plt.legend(loc='upper right') plt.xlabel('x') plt.ylabel('y') plt.title('Decision Boundary') # Plot the two-class decision scores twoclass_output = bdt.decision_function(X) plot_range = (twoclass_output.min(), twoclass_output.max()) plt.subplot(122) for i, n, c in zip(range(2), class_names, plot_colors): plt.hist(twoclass_output[y == i], bins=10, range=plot_range, facecolor=c, label='Class %s' % n, alpha=.5) x1, x2, y1, y2 = plt.axis() plt.axis((x1, x2, y1, y2 * 1.2)) plt.legend(loc='upper right') plt.ylabel('Samples') plt.xlabel('Score') plt.title('Decision Scores') plt.tight_layout() plt.subplots_adjust(wspace=0.35) plt.show()
{ "pile_set_name": "Github" }
# Common stuff for "foo" modulefiles # Using "homebrewed flavors" strategy # # This file expects the following Tcl variables to have been # previously set: # version: version of foo # Declare the path where the packages are installed # The reference to the environment variable is a hack # for this example; normally one would hard code a path set rootdir $::env(MOD_GIT_ROOTDIR) set swroot $rootdir/doc/example/compiler-etc-dependencies/dummy-sw-root # Also get location of and load common procedures # This is a hack for the cookbook examples, in production # one should either # 1) declare the procedures in a site config file (preferred) # 2) hardcode the path to $tcllibdir and common_utilities.tcl set tcllibdir $rootdir/doc/example/compiler-etc-dependencies/tcllib source $tcllibdir/common_utilities.tcl proc ModulesHelp { } { global version puts stderr " foo: Test dummy version of foo $version For testing packages depending on compilers/MPI " } module-whatis "Dummy foo $version" # Figure out what compiler we have loaded # Will default to and load default compiler if none loaded set ctag [ GetLoadedCompiler 1 1 1 ] # Figure out what MPI we have loaded # We do NOT want to default to intelmpi if intel compiler loaded set mtag [ GetLoadedMPI ] # Set mtag it nompi if no MPI library found loaded if { $mtag eq {} } { set mtag nompi } # Set mtag to intelmpi if intelmpi/default found loaded if { $mtag eq {intelmpi/default} } { set mtag intelmpi } # Compute the installation prefix set pkgroot $swroot/foo set vroot $pkgroot/$version set prefix $vroot/$ctag/$mtag # Make sure there is a build for this foo version/compiler/MPI library # I.e. that the prefix exists if ![ file exists $prefix ] { # Not built for this compiler/MPI, alert user and abort PrintLoadError " foo/$version does not appear to be built for compiler $ctag and MPI $mtag Please select a different openmpi version or different compiler/MPI library combination. " } # We need to prereq the compiler to allow autohandling to work prereq $ctag # and the MPI library if used if { $mtag ne {nompi} } { # We currently require one to load intelmpi to use Intel MPI with # intel compilers. So we prereq on intelmpi as well # But if not, we could place the prereq below in an if-then block # so is only executed if mtag != intelmpi prereq $mtag } # Set environment variables setenv FOO_DIR $prefix set bindir $prefix/bin set libdir $prefix/lib set incdir $prefix/include prepend-path PATH $bindir prepend-path LIBRARY_PATH $libdir prepend-path LD_LIBRARY_PATH $libdir prepend-path CPATH $incdir conflict foo
{ "pile_set_name": "Github" }
/* * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.security.ssl; import java.io.IOException; import java.nio.ByteBuffer; interface SSLConsumer { void consume(ConnectionContext context, ByteBuffer message) throws IOException; }
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <swiftCore/_TtCs12_SwiftObject.h> @interface _TtC7SwiftUIP33_D63C4EB7F2B205694B6515509E76E98B16AsyncTransaction : _TtCs12_SwiftObject { // Error parsing type: , name: transaction // Error parsing type: , name: mutations } @end
{ "pile_set_name": "Github" }
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file memoryUsagePointers_ext.cxx * @author rdb * @date 2013-12-10 */ #include "memoryUsagePointers_ext.h" #if defined(HAVE_PYTHON) && defined(DO_MEMORY_USAGE) #ifndef CPPPARSER extern Dtool_PyTypedObject Dtool_TypedObject; extern Dtool_PyTypedObject Dtool_TypedReferenceCount; extern Dtool_PyTypedObject Dtool_ReferenceCount; #endif // CPPPARSER /** * Returns the nth object, represented as a Python object of the appropriate * type. Reference counting will be properly set on the Python object. * * get_typed_pointer() is almost as good as this, but (a) it does not set the * reference count, and (b) it does not work for objects that do not inherit * from TypedObject. This will work for any object whose type is known, which * has a Python representation. */ PyObject *Extension<MemoryUsagePointers>:: get_python_pointer(size_t n) const { TypedObject *typed_ptr = _this->get_typed_pointer(n); ReferenceCount *ref_ptr = _this->get_pointer(n); bool memory_rules = false; if (ref_ptr != nullptr) { memory_rules = true; ref_ptr->ref(); } if (typed_ptr != nullptr) { return DTool_CreatePyInstanceTyped(typed_ptr, Dtool_TypedObject, memory_rules, false, typed_ptr->get_type_index()); } if (ref_ptr == nullptr) { return Py_BuildValue(""); } TypeHandle type = _this->get_type(n); if (type != TypeHandle::none()) { // Trust that there is a downcast path to the actual type. return DTool_CreatePyInstanceTyped(ref_ptr, Dtool_ReferenceCount, memory_rules, false, type.get_index()); } // If worse comes to worst, just return a ReferenceCount wrapper. return DTool_CreatePyInstance(ref_ptr, Dtool_ReferenceCount, memory_rules, false); } #endif // HAVE_PYTHON && DO_MEMORY_USAGE
{ "pile_set_name": "Github" }
^<\?xml version="1.0"\?> <CastXML[^>]*> <Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/> <Typedef id="_3" name="Int" type="_6" context="_1" location="f1:2" file="f1" line="2"/> <Variable id="_4" name="var_int" type="_6" init="\(int\)123" context="_1" location="f1:3" file="f1" line="3" mangled="[^"]+"/> <Variable id="_5" name="var_int2" type="_6" init="static_cast&lt;int&gt;\(123\)" context="_1" location="f1:4" file="f1" line="4" mangled="[^"]+"/> <FundamentalType id="_6" name="int" size="[0-9]+" align="[0-9]+"/> <Namespace id="_2" name="::"/> <File id="f1" name=".*/test/input/Variable-init-cast.cxx"/> </CastXML>$
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="lbl_status.Text" xml:space="preserve"> <value>Статус</value> </data> <data name="lbl_AP.Text" xml:space="preserve"> <value>ArduPlane</value> </data> <data name="label2.Text" xml:space="preserve"> <value>Изобр. Max Levine</value> </data> <data name="lbl_APHil.Text" xml:space="preserve"> <value>ArduPlane (Xplane симулятор)</value> </data> <data name="lbl_ACQuad.Text" xml:space="preserve"> <value>ArduCopter Quad</value> </data> <data name="lbl_ACHexa.Text" xml:space="preserve"> <value>ArduCopter Hexa</value> </data> <data name="lbl_ACTri.Text" xml:space="preserve"> <value>ArduCopter Tri</value> </data> <data name="lbl_ACY6.Text" xml:space="preserve"> <value>ArduCopter Y6</value> </data> <data name="lbl_Heli.Text" xml:space="preserve"> <value>ArduCopter Heli</value> </data> <data name="lbl_ACHil.Text" xml:space="preserve"> <value>ArduCopter Quad (Симулятор)</value> </data> <data name="BUT_setup.Text" xml:space="preserve"> <value>Настройка автопилота</value> </data> </root>
{ "pile_set_name": "Github" }
{ "component": true }
{ "pile_set_name": "Github" }