code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
/** * @desc express config * @author awwwesssooooome <chengpengcp9@gmail.com> * @date 2015-09-21 */ 'use strict'; /** * Module dependencies */ import express from 'express'; import cookieParser from 'cookie-parser'; import bodyParser from 'body-parser'; import favicon from 'serve-favicon'; import compression from 'compression'; import swig from 'swig'; import pkg from '../package.json'; /** * Expose */ export default ((app) => { // Compression middleware (should be placed before express.static) app.use(compression({ threshold: 512 })); // Set favicon app.use(favicon(`${__dirname}/../public/favicon.ico`)); // Static files middleware app.use(express.static(`${__dirname}/../public`)); // Set views path, template engine and default layout app.engine('html', swig.renderFile); app.set('views', `${__dirname}/../app/views`); app.set('view engine', 'html'); // For development app.set('view cache', false); swig.setDefaults({ cache: false }); // Expose package.json to views app.use((req, res, next) => { res.locals.pkg = pkg; res.locals.env = process.env.NODE_ENV || 'development'; next(); }); // bodyParser should be above methodOverride app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); // CookieParser should be above session app.use(cookieParser()); //app.use(cookieSession({ secret: 'secret' })); });
playwolsey/Robin
config/express.js
JavaScript
mit
1,492
// // COFolder.h // #import <Foundation/Foundation.h> #import <Mantle/Mantle.h> #import "COUser.h" @class Coding_DownloadTask; typedef NS_ENUM(NSInteger, DownloadState){ DownloadStateDefault = 0, DownloadStateDownloading, DownloadStatePausing, DownloadStateDownloaded }; @interface COFolder : MTLModel<MTLJSONSerializing> @property (nonatomic, copy) NSString *ownerName; @property (nonatomic, copy) NSString *name; @property (nonatomic, assign) NSTimeInterval createdAt; @property (nonatomic, assign) NSTimeInterval updatedAt; @property (nonatomic, assign) NSInteger parentId; @property (nonatomic, assign) NSInteger fileId; @property (nonatomic, strong) NSArray *subFolders; @property (nonatomic, assign) NSInteger type; @property (nonatomic, assign) NSInteger ownerId; @end @interface COFile : MTLModel<MTLJSONSerializing> @property (nonatomic, assign) NSInteger size; @property (nonatomic, copy) NSString *name; @property (nonatomic, copy) NSString *path; // 在动态中使用 @property (nonatomic, copy) NSString *title; // 在动态中使用 @property (nonatomic, assign) NSInteger currentUserRoleId; @property (nonatomic, copy) NSString *ownerPreview; @property (nonatomic, assign) NSTimeInterval createdAt; @property (nonatomic, assign) NSTimeInterval updatedAt; @property (nonatomic, assign) NSInteger number; @property (nonatomic, copy) NSString *storageKey; @property (nonatomic, assign) NSInteger parentId; @property (nonatomic, copy) NSString *storageType; @property (nonatomic, assign) NSInteger fileId; @property (nonatomic, strong) COUser *owner; @property (nonatomic, copy) NSString *preview; @property (nonatomic, assign) NSInteger type; @property (nonatomic, copy) NSString *fileType; @property (nonatomic, assign) NSInteger ownerId; @property (nonatomic, assign) NSInteger projectId; @property (readwrite, nonatomic, strong) NSString *diskFileName; - (BOOL)isEmpty; - (NSString *)downloadPath; @end @interface COFileView : MTLModel<MTLJSONSerializing> @property (nonatomic, copy) NSString *content; @property (nonatomic, strong) COFile *file; @end @interface COFileCount : MTLModel<MTLJSONSerializing> @property (nonatomic, assign) NSInteger folderId; @property (nonatomic, assign) NSInteger count; @end
Coding/Coding-iPad
CodingForiPad/Models/COFolder.h
C
mit
2,259
<?php /* * This file is part of KoolKode Async. * * (c) Martin Schröder <m.schroeder2007@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types = 1); namespace KoolKode\Async\Concurrent\Filesystem; use KoolKode\Async\Context; use KoolKode\Async\Promise; use KoolKode\Async\Success; use KoolKode\Async\Concurrent\Pool\FileDescriptor; use KoolKode\Async\Concurrent\Pool\FunctionCall; use KoolKode\Async\Concurrent\Pool\MethodCall; use KoolKode\Async\Concurrent\Pool\Pool; use KoolKode\Async\Concurrent\Pool\SyncPool; use KoolKode\Async\Filesystem\Filesystem; use KoolKode\Async\Filesystem\FilesystemException; use KoolKode\Async\Filesystem\TempStream; use KoolKode\Async\Stream\ReadableStream; /** * Async filesystem based on a worker pool. * * @author Martin Schröder */ class PoolFilesystem implements Filesystem { /** * Pool being used to generate temp file names. * * @var Pool */ protected $pool; /** * Is file descriptor transfer supported by the pool? * * @var bool */ protected $fileTransferSupported; /** * Create an async filesystem backed by the given worker pool. * * @param Pool $pool */ public function __construct(Pool $pool) { $this->pool = $pool; $this->fileTransferSupported = \KOOLKODE_ASYNC_SCM_RIGHTS_SUPPORTED || $this->pool instanceof SyncPool; } /** * {@inheritdoc} */ public function exists(Context $context, string $path): Promise { return $this->pool->submit($context, new FunctionCall('@file_exists', $path)); } /** * {@inheritdoc} */ public function size(Context $context, string $path): Promise { return $this->pool->submit($context, new MethodCall(static::class, 'sizeJob', $path)); } /** * Get size of a file on the local filesystem. * * @param string $path Absolute path to the file. * @return int Filesize in bytes or 0 when the path does not exist or is not a regular file. */ protected static function sizeJob(string $path): int { if (\is_file($path)) { return (int) @\filesize($path); } return 0; } /** * {@inheritdoc} */ public function isFile(Context $context, string $path): Promise { return $this->pool->submit($context, new FunctionCall('@is_file', $path)); } /** * {@inheritdoc} */ public function isDir(Context $context, string $path): Promise { return $this->pool->submit($context, new FunctionCall('@is_dir', $path)); } /** * {@inheritdoc} */ public function scandir(Context $context, string $path): Promise { return $context->task($this->scandirTask($context, \rtrim(\str_replace([ '/', '\\' ], \DIRECTORY_SEPARATOR, $path), \DIRECTORY_SEPARATOR))); } /** * Scan the given directory for items. * * @param Context $context Async execution context. * @param string $path Absolute path of the directory to be scanned. * @return array Absolute paths of all scanned items. * * @throws FilesystemException When scanning the directory has failed. */ protected function scandirTask(Context $context, string $path): \Generator { $entries = yield $this->pool->submit($context, new MethodCall(static::class, 'scandirJob', $path)); if ($entries === null) { throw new FilesystemException(\sprintf('Failed to scan directory: "%s"', $path)); } return $entries; } /** * Scan the given directory using sync fuctions. */ protected static function scandirJob(string $path): ?array { if (!\is_dir($path)) { return null; } $entries = @\glob($path . \DIRECTORY_SEPARATOR . '*', \GLOB_NOSORT); return ($entries === false) ? null : $entries; } /** * {@inheritdoc} */ public function readStream(Context $context, string $path): Promise { return $context->task($this->readStreamTask($context, $path)); } /** * Open a file descriptor stream to be used for reading. * * @param Context $context Async execution context. * @param string $path Absolute path to the target file. * @return ReadableDescriptorStream Async readable file stream. */ protected function readStreamTask(Context $context, string $path): \Generator { if (!yield $this->pool->submit($context, new MethodCall(static::class, 'checkFileReadableJob', $path))) { throw new FilesystemException(\sprintf('File is not readable: "%s"', $path)); } if (!$this->fileTransferSupported) { return new ReadableFileStream($this->pool, $path); } $file = yield $this->pool->submit($context, new MethodCall(FileDescriptor::class, 'open', $path, 'rb')); return new ReadableDescriptorStream($this->pool, $path, $file); } /** * Check if the given path is a regular file that is readable. */ protected static function checkFileReadableJob(string $path): bool { if (!\is_file($path) || !\is_readable($path)) { return false; } return true; } /** * {@inheritdoc} */ public function writeStream(Context $context, string $path): Promise { return $context->task($this->writeStreamTask($context, $path)); } /** * {@inheritdoc} */ public function appendStream(Context $context, string $path): Promise { return $context->task($this->writeStreamTask($context, $path, true)); } /** * {@inheritdoc} */ public function tempFile(Context $context, ReadableStream $stream, int $limit = 0x4000000): Promise { return $context->task(function (Context $context) use ($stream, $limit) { try { $file = yield $this->pool->submit($context, new FunctionCall('tempnam', \sys_get_temp_dir(), 'kkt')); try { $temp = yield $this->writeStream($context, $file); $size = 0; try { while (null !== ($chunk = yield $stream->read($context))) { if (($size + \strlen($chunk)) > $limit) { throw new FilesystemException('Temp file size exceeded'); } $size += yield $temp->write($context, $chunk); } } finally { $temp->close(); } } catch (\Throwable $e) { yield $this->removeFile($context, $file); throw $e; } } finally { $stream->close(); } return $file; }); } /** * {@inheritdoc} */ public function tempStream(Context $context, int $memory = 0xFFFF, int $limit = 0x4000000): Promise { return new Success($context, new TempStream($context, $this, $memory, $limit)); } /** * {@inheritdoc} */ public function removeFile(Context $context, string $file): Promise { $promise = $this->pool->submit($context, new FunctionCall('@unlink', $file)); $promise->when(function ($e, $v = null) use ($file) { if (!$v) { @\unlink($file); } }); return $promise; } /** * Open a file descriptor stream to be used for writing. * * @param Context $context Async execution context. * @param string $path Absolute path to the target file. * @return WritableDescriptorStream Async readable file stream. */ protected function writeStreamTask(Context $context, string $path, bool $append = false): \Generator { if (!yield $this->pool->submit($context, new MethodCall(static::class, 'checkFileWritableJob', $path, !$append && !$this->fileTransferSupported))) { throw new FilesystemException(\sprintf('File is not writable: "%s"', $path)); } if (!$this->fileTransferSupported) { return new WritableFileStream($this->pool, $path); } $file = yield $this->pool->submit($context, new MethodCall(FileDescriptor::class, 'open', $path, $append ? 'ab' : 'wb')); return new WritableDescriptorStream($this->pool, $path, $file); } /** * Check if the given path is a regular file that is writable. */ protected static function checkFileWritableJob(string $path, bool $truncate = false): bool { if (\file_exists($path) && (!\is_file($path) || !\is_writable($path))) { return false; } if ($truncate && \is_file($path)) { @\ftruncate(@\fopen($path, 'wb'), 0); } return true; } }
koolkode/async
src/Concurrent/Filesystem/PoolFilesystem.php
PHP
mit
9,372
///////////////////////////////////////////////////////////////// /// @file Lines.h /// @author Chris L Baker (clb) <chris@chimail.net> /// @date 2014.05.20 /// @brief Provide a simple interface to draw a line /// /// @attention Copyright (C) 2014 /// @attention All rights reserved ///////////////////////////////////////////////////////////////// #pragma once #include <osg/Geode> #include <osg/Vec3> #include <osg/Vec4> #include <vector> namespace d3 { /// @brief Define a single line struct Line { /// The beginning of the line osg::Vec3d begin; /// The end of the line osg::Vec3d end; /// The color of the line osg::Vec4 color; }; /// typedef a vector of lines typedef std::vector<Line> LineVec_t; /// @brief get an osg node from a vector of lines /// @param lines The lines we should draw /// @return The built node osg::ref_ptr<osg::Node> get(const LineVec_t& lines); /// @brief get an osg node from a single line /// @param line the line that we should draw /// @return The built node inline osg::ref_ptr<osg::Node> get(const Line& line) { return get(LineVec_t(1, line)); }; } // namespace d3
theidealist/developerDebugDisplay
DisplayObjects/Lines.h
C
mit
1,170
/***************************************************//** * @file ProtocolFamilies.cpp * @date February 2012 * @author Ocean Optics, Inc. * * This provides a way to get references to different kinds * of features (e.g. spectrometer, TEC) generically. * * LICENSE: * * SeaBreeze Copyright (C) 2014, Ocean Optics Inc * * 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 and this permission notice 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 THE AUTHORS OR COPYRIGHT HOLDERS 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. *******************************************************/ #include "common/globals.h" #include "api/seabreezeapi/ProtocolFamilies.h" /* Constants */ #define PROTOCOL_FAMILY_ID_UNDEFINED 0 #define PROTOCOL_FAMILY_ID_VIRTUAL 1 #define PROTOCOL_FAMILY_ID_OOI 2 #define PROTOCOL_FAMILY_ID_OCEAN_BINARY 3 #define PROTOCOL_FAMILY_ID_JAZ_MESSAGING 4 using namespace seabreeze; using namespace seabreeze::api; using namespace std; seabreeze::api::ProtocolFamilies::ProtocolFamilies() { } seabreeze::api::ProtocolFamilies::~ProtocolFamilies() { } seabreeze::api::UndefinedProtocolFamily::UndefinedProtocolFamily() : ProtocolFamily("Undefined", PROTOCOL_FAMILY_ID_UNDEFINED) { } seabreeze::api::UndefinedProtocolFamily::~UndefinedProtocolFamily() { } seabreeze::api::VirtualProtocolFamily::VirtualProtocolFamily() : ProtocolFamily("Virtual", PROTOCOL_FAMILY_ID_VIRTUAL) { } seabreeze::api::VirtualProtocolFamily::~VirtualProtocolFamily() { } seabreeze::api::OOIProtocolFamily::OOIProtocolFamily() : ProtocolFamily("OceanLegacyUSB", PROTOCOL_FAMILY_ID_OOI) { } seabreeze::api::OOIProtocolFamily::~OOIProtocolFamily() { } seabreeze::api::OceanBinaryProtocolFamily::OceanBinaryProtocolFamily() : ProtocolFamily("OceanBinary", PROTOCOL_FAMILY_ID_OCEAN_BINARY) { } seabreeze::api::OceanBinaryProtocolFamily::~OceanBinaryProtocolFamily() { } seabreeze::api::JazMessagingProtocolFamily::JazMessagingProtocolFamily() : ProtocolFamily("JazMessaging", PROTOCOL_FAMILY_ID_JAZ_MESSAGING) { } seabreeze::api::JazMessagingProtocolFamily::~JazMessagingProtocolFamily() { } vector<ProtocolFamily *> seabreeze::api::ProtocolFamilies::getAllProtocolFamilies() { vector<ProtocolFamily *> retval; /* This creates new instances of these so the class-wide fields do not risk * having their const flags ignored. */ retval.push_back(new OOIProtocolFamily()); retval.push_back(new OceanBinaryProtocolFamily()); retval.push_back(new JazMessagingProtocolFamily()); retval.push_back(new VirtualProtocolFamily()); return retval; }
ap--/python-seabreeze
src/libseabreeze/src/api/seabreezeapi/ProtocolFamilies.cpp
C++
mit
3,549
# frozen_string_literal: true describe RuboCop::Cop::Rails::IndexTrue, :config do subject(:cop) { described_class.new(config) } let(:source) do <<-RUBY class ExampleMigration < ActiveRecord::Migration def change #{code} end end RUBY end shared_examples :accepts do |name, code| let(:code) { code } it "accepts usages of #{name}" do inspect_source(cop, source) expect(cop.offenses).to be_empty end end shared_examples :offense do |name, code| let(:code) { code } it "registers an offense for #{name}" do inspect_source(cop, source) expect(cop.messages.any?).to eq(true) end end context 'when add_column statement contains `index: true`' do let(:code) do 'add_column :books, :author_id, :integer, index: true' end it 'adds an offense when an add_column statement contains `index: true`' do expect_offense(<<-RUBY.strip_indent) add_column :books, :author_id, :integer, index: true ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `index: true` does not work in an `add_column` or `change_column` method. Please use `add_index :table, :column`. RUBY end end context 'when add_column statement does not contain `index: true`' do let(:source) do 'add_column :books, :author_id, :integer' end it 'doest not add any offenses' do expect_no_offenses(<<-RUBY.strip_indent) add_column :books, :author_id, :integer RUBY end end context 'when change_column statement contains `index: true`' do let(:code) do 'change_column :books, :author_id, :integer, index: true' end it 'adds an offense' do expect_offense(<<-RUBY.strip_indent) change_column :books, :author_id, :integer, index: true ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `index: true` does not work in an `add_column` or `change_column` method. Please use `add_index :table, :column`. RUBY end end context 'when add_column statement does not contain `index: true`' do let(:source) do 'change_column :books, :author_id, :integer' end it 'does not add any offenses' do expect_no_offenses(<<-RUBY.strip_indent) change_column :books, :author_id, :integer RUBY end end end
alexcstark/rubocop
spec/rubocop/cop/rails/index_true_spec.rb
Ruby
mit
2,354
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script type="text/javascript" src="../node_modules/d3/d3.js"> </script> <style media="screen"> </style> <title>D3.JS</title> <style type="text/css"> /* rect:hover{ fill:orange; } rect{ -moz-transition:all 0.3s; -o-transition:all 0.3s; -webkit-transition:all:0.3; transition:all 0.3s; }*/ #tooltip{ position: absolute; width: 200px; height: auto; padding: 10px; background-color: white; -webkit-border-radius:10px; border-radius:10px; pointer-events:none; } #tooltip.hidden{ display: none; } #tooltip p{ margin: 0; font-family: sans-serif; font-size: 16px; line-height: 20px; } </style> </head> <body> <h1>Hello D3.js</h2> <button class="add">Click me to add the bar-chart</button> <button class="delete">Click me to delete the bar-chart</button> <button class="sortMe">sort me</button> <div id="tooltip" class="hidden"> <h3><strong>Tooltip label</strong></h3> <p><span id='value'>100</span>%</p> </div> <br/> <script type="text/javascript" src="./js/event-with-tooltips.js"> </script> </body> </html>
zhangmingkai4315/DataVis
d3js/event-with-tooltips.html
HTML
mit
1,329
package br.com.casadocodigo.redis.capitulo4.exemplo02; import redis.clients.jedis.Jedis; public class DefinirTempoExpiracaoDeSessaoDoUsuario { public static void main(String[] args) { String codigoDoUsuario = "1962"; String chave = "usuario:" + codigoDoUsuario + ":sessao"; int trintaMinutosEmSegundos = 1800; Jedis jedis = new Jedis("localhost"); long resultado = jedis.expire(chave, trintaMinutosEmSegundos); System.out.println(resultado); } }
rlazoti/exemplos-livro-redis
src/main/java/br/com/casadocodigo/redis/capitulo4/exemplo02/DefinirTempoExpiracaoDeSessaoDoUsuario.java
Java
mit
508
#!/bin/bash handlebars `ls widgets/*.handlebars` -f js/templates.js
42trees/godash
buildtemplates.sh
Shell
mit
68
<?php /** * Copyright (C) 2013 Emay Komarudin * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the 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/>. * * @author Emay Komarudin * **/ namespace Emayk\Ics\Repo\Factory\Order; use Emayk\Ics\Models\BaseModel; class Status extends BaseModel { protected $table = 'master_pr_status'; }
emayk/ics
src/Emayk/Ics/Repo/Factory/Order/Status.php
PHP
mit
880
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Griny - single & multi page theme</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="css/bootstrap-responsive.min.css" rel="stylesheet" media="screen"> <link rel="stylesheet" href="css/colorbox.css"> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,800,700,300,600,400italic&subset=latin,cyrillic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/font-awesome.min.css"> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="js/respond.min.js"></script> <![endif]--> <script src="js/vendor/modernizr-2.6.2.min.js"></script> </head> <body> <!--[if lt IE 7]> <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <![endif]--> <div class="navbar navbar-fixed-top"> <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 goTop" href="#">Griny</a> <div class="nav-collapse pull-right"> <ul class="nav"> <li><a href="index.html">Home</a></li> <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Pages <b class="caret"></b></a> <ul class="dropdown-menu" role="menu"> <li><a href="about.html">About Us</a></li> <li><a href="services.html">Services</a></li> <li class="active"><a href="price.html">Price</a></li> <li><a href="login.html">Login</a></li> <li><a href="register.html">Register</a></li> <li><a href="faq.html">F.A.Q.</a></li> <li><a href="contacts.html">Contact</a></li> </ul> </li> <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Blog <b class="caret"></b></a> <ul class="dropdown-menu" role="menu"> <li><a href="blog-right.html">Blog right sidebar</a></li> <li><a href="blog-left.html">Blog left sidebar</a></li> <li><a href="blog-full.html">Blog full</a></li> <li class="divider"></li> <li><a href="blog-single.html">Blog single one</a></li> <li><a href="blog-single2.html">Blog single two</a></li> </ul> </li> <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Gallery <b class="caret"></b></a> <ul class="dropdown-menu" role="menu"> <li><a href="works.html">Simple gallery</a></li> <li><a href="works2.html">With text</a></li> <li><a href="works3.html">With filter</a></li> <li class="divider"></li> <li><a href="works-single.html">Single project</a></li> </ul> </li> <li><a href="shortcodes.html">Shortcodes</a> </li> </ul> </div> </div> </div> </div> <div class="parallax" style="background-image: url(images/bg1.jpg);"> <div class="text"> <h1>Price</h1> <p>Buy this theme</p> </div> </div> <section class="text-block"> <div class="light-bg"> <div class="container"> <h2 class="with-border">Pricing tables <small class="color">/ 3 columns</small></h2> <div class="row-fluid"> <article class="span4 price-block"> <h3>Single purchase</h3> <div class="price-table"> <p>$ <span class="price">10</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> Single installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Select now</a> </div> </article> <article class="span4 price-block"> <h3>Multiple purchase</h3> <div class="price-table recommend"> <p>$ <span class="price">50</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> Multiple installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> <article class="span4 price-block"> <h3>Extended license</h3> <div class="price-table"> <p>$ <span class="price">500</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> Unlimited installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Select now</a> </div> </article> </div> </div> </div> <div class="dark-bg"> <div class="container"> <h2 class="with-border">Pricing tables <small class="color">/ 4 columns</small></h2> <div class="row-fluid"> <article class="span3 price-block"> <h3>Personal</h3> <div class="price-table"> <p>$ <span class="price">10</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> Single installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> <article class="span3 price-block"> <h3>Professional</h3> <div class="price-table recommend"> <p>$ <span class="price">50</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> 10 installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> <article class="span3 price-block"> <h3>Expert</h3> <div class="price-table"> <p>$ <span class="price">100</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> 20 installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> <article class="span3 price-block"> <h3>Unlimited</h3> <div class="price-table"> <p>$ <span class="price">500</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> Unlimited installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> </div> </div> </div> <div class="light-bg"> <div class="container"> <h2 class="with-border">Pricing tables <small class="color">/ animated class</small></h2> <div class="row-fluid"> <article class="span3 price-block animated"> <h3>Personal</h3> <div class="price-table"> <p>$ <span class="price">10</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> Single installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> <article class="span3 price-block animated"> <h3>Professional</h3> <div class="price-table recommend"> <p>$ <span class="price">50</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> 10 installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> <article class="span3 price-block animated"> <h3>Expert</h3> <div class="price-table"> <p>$ <span class="price">100</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> 20 installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> <article class="span3 price-block animated"> <h3>Unlimited</h3> <div class="price-table"> <p>$ <span class="price">500</span> / mo</p> <div class="price-features"> <ul> <li><i class="icon-ok"></i> Unlimited installation</li> <li><i class="icon-ok"></i> Full Responsive</li> <li><i class="icon-ok"></i> Parallax Effect</li> <li><i class="icon-ok"></i> HTML5 & CSS3</li> <li><i class="icon-ok"></i> Smooth scrolling</li> <li><i class="icon-ok"></i> Unlimited Support</li> <li><i class="icon-ok"></i> Bootstrap 2.3.0</li> </ul> </div> <a class="btn btn-large" href="#">Buy now</a> </div> </article> </div> </div> </div> </section> <div class="bottom-parallax small-view" style="background-image: url(images/bg1.jpg);"> <div class="black-bg"> <div class="container"> <div class="row-fluid"> <div class="span9"> <h3>Want to get started?</h3> <h4>Nullam iaculis dictum ullamcorper. In vitae pellentesque massa. Vivamus viverra libero dapibus, sodales lectus a, consectetur ante.</h4> </div> <div class="span3"> <a class="btn btn-large" href="#">Contact us</a> </div> </div> </div> </div> </div> <footer> <div class="light-bg"> <div class="container"> <div class="row-fluid"> <div class="span3"> <h4>Get in touch</h4> <div class="info-block"> <article class="clearfix"> <i class="icon-globe"></i> <address> 2425 West Boli Blvd. Suite 421.<br/> City, Merils. United States,<br/> Zip Code, 123456. </address> </article> <article class="clearfix"> <i class="icon-phone"></i> <p>8 417 274 2933</p> </article> <article class="clearfix"> <i class="icon-envelope"></i> <p><a href="mailto:bootstrap@twitter.com">bootstrap@twitter.com</a></p> </article> </div> </div> <div class="span3"> <h4>Follow us</h4> <div class="social"> <ul class="unstyled clearfix"> <li> <a target="_blank" title="" href="#"> <i class="icon-twitter"></i> </a> </li> <li> <a target="_blank" title="" href="#"> <i class="icon-facebook"></i> </a> </li> <li> <a target="_blank" title="" href="#"> <i class="icon-github"></i> </a> </li> <li> <a target="_blank" title="" href="#"> <i class="icon-linkedin"></i> </a> </li> <li> <a target="_blank" title="" href="#"> <i class="icon-pinterest"></i> </a> </li> <li> <a target="_blank" title="" href="#"> <i class="icon-google-plus"></i> </a> </li> <li> <a target="_blank" title="" href="#"> <i class="icon-vk"></i> </a> </li> <li> <a target="_blank" title="" href="#"> <i class="icon-rss"></i> </a> </li> </ul> </div> </div> <div class="span3"> <h4>Recent posts</h4> <ul class="link-list"> <li><a href="#">Lorem ipsum dolor sit amet</a></li> <li><a href="#">Cum maiestatis necessitatibus ad</a></li> <li><a href="#">Dicat tantas copiosae eam id</a></li> <li><a href="#">Theophrastus, dicat tantas</a></li> <li><a href="#">Cras metus elit, consectetur sed</a></li> <li><a href="#">Lorem ipsum dolor sit amet</a></li> </ul> </div> <div class="span3"> <h4>Photostream</h4> <ul class="footer-thumbnails unstyled clearfix"> <li class="stream"> <a href="#"> <img src="http://dummyimage.com/45x45/243135/fff" alt=""> </a> </li> <li class="stream"> <a href="#"> <img src="http://dummyimage.com/45x45/243135/fff" alt=""> </a> </li> <li class="stream"> <a href="#"> <img src="http://dummyimage.com/45x45/243135/fff" alt=""> </a> </li> <li class="stream"> <a href="#"> <img src="http://dummyimage.com/45x45/243135/fff" alt=""> </a> </li> <li class="stream"> <a href="#"> <img src="http://dummyimage.com/45x45/243135/fff" alt=""> </a> </li> <li class="stream"> <a href="#"> <img src="http://dummyimage.com/45x45/243135/fff" alt=""> </a> </li> <li class="stream"> <a href="#"> <img src="http://dummyimage.com/45x45/243135/fff" alt=""> </a> </li> <li class="stream"> <a href="#"> <img src="http://dummyimage.com/45x45/243135/fff" alt=""> </a> </li> </ul> </div> </div> </div> </div> <div class="copyright-block dark-bg clearfix"> <div class="container"> <div class="pull-left"> <p class="pull-left">Copyright &copy; 2013 by <a href="http://www.frosenka.ru" target="_blank">frosenka</a>. All Rights Reserved</p> </div> <div class="pull-right"> <p>Thanks <a href="http://www.unsplash.com" target="_blank">ooomf</a> for the pictures</p> </div> </div> </div> </footer> <a class="goTop goTop-link"><i class="icon-angle-up"></i></a> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script> <script src="js/bootstrap.min.js"></script> <script src="js/plugins.js"></script> <script src="js/jquery.colorbox-min.js"></script> <script src="js/main.js"></script> </body> </html>
grdt/foxlot
griny-template/multipage/price.html
HTML
mit
17,979
/* * Copyright (C) 2012 Google 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: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of Google Inc. 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "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 THE COPYRIGHT * OWNER 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. */ #include "config.h" #include "core/html/shadow/HTMLShadowElement.h" #include "HTMLNames.h" #include "core/dom/shadow/ShadowRoot.h" namespace WebCore { class Document; inline HTMLShadowElement::HTMLShadowElement(Document& document) : InsertionPoint(HTMLNames::shadowTag, document) { ScriptWrappable::init(this); } PassRefPtr<HTMLShadowElement> HTMLShadowElement::create(Document& document) { return adoptRef(new HTMLShadowElement(document)); } HTMLShadowElement::~HTMLShadowElement() { } ShadowRoot* HTMLShadowElement::olderShadowRoot() { ShadowRoot* containingRoot = containingShadowRoot(); if (!containingRoot) return 0; document().updateDistributionForNodeIfNeeded(this); ShadowRoot* older = containingRoot->olderShadowRoot(); if (!older || !older->shouldExposeToBindings() || older->shadowInsertionPointOfYoungerShadowRoot() != this) return 0; ASSERT(older->shouldExposeToBindings()); return older; } Node::InsertionNotificationRequest HTMLShadowElement::insertedInto(ContainerNode* insertionPoint) { if (insertionPoint->inDocument()) { // Warn if trying to reproject between user agent and author shadows. ShadowRoot* root = containingShadowRoot(); if (root && root->olderShadowRoot() && root->type() != root->olderShadowRoot()->type()) { String message = String::format("<shadow> doesn't work for %s element host.", root->host()->tagName().utf8().data()); document().addConsoleMessage(RenderingMessageSource, WarningMessageLevel, message); } } return InsertionPoint::insertedInto(insertionPoint); } } // namespace WebCore
lordmos/blink
Source/core/html/shadow/HTMLShadowElement.cpp
C++
mit
3,228
var Type = function(Bookshelf) { return Bookshelf.Model.extend({ tableName: 'types', model: function() { return this.belongsTo('model'); } }); }; module.exports = Type;
ericclemmons/bookshelf-manager
test/models/type.js
JavaScript
mit
193
package com.medallia.word2vec; import com.google.common.base.Function; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.google.common.primitives.Doubles; import com.medallia.word2vec.util.Pair; import java.nio.DoubleBuffer; import java.util.Arrays; import java.util.List; /** Implementation of {@link Searcher} */ class SearcherImpl implements Searcher { private final NormalizedWord2VecModel model; private final ImmutableMap<String, Integer> word2vectorOffset; SearcherImpl(final NormalizedWord2VecModel model) { this.model = model; final ImmutableMap.Builder<String, Integer> result = ImmutableMap.builder(); for (int i = 0; i < model.vocab.size(); i++) { result.put(model.vocab.get(i), i * model.layerSize); } word2vectorOffset = result.build(); } SearcherImpl(final Word2VecModel model) { this(NormalizedWord2VecModel.fromWord2VecModel(model)); } @Override public List<Match> getMatches(String s, int maxNumMatches) throws UnknownWordException { return getMatches(getVector(s), maxNumMatches); } @Override public double cosineDistance(String s1, String s2) throws UnknownWordException { return calculateDistance(getVector(s1), getVector(s2)); } @Override public boolean contains(String word) { return word2vectorOffset.containsKey(word); } @Override public List<Match> getMatches(final double[] vec, int maxNumMatches) { return Match.ORDERING.greatestOf( Iterables.transform(model.vocab, new Function<String, Match>() { @Override public Match apply(String other) { double[] otherVec = getVectorOrNull(other); double d = calculateDistance(otherVec, vec); return new MatchImpl(other, d); } }), maxNumMatches ); } public double calculateDistance(double[] otherVec, double[] vec) { double d = 0; for (int a = 0; a < model.layerSize; a++) d += vec[a] * otherVec[a]; return d; } public double calculateDistance2(double[] otherVec, double[] vec) { double d = 0; for (int a = 0; a < model.layerSize; a++) d += (vec[a] - otherVec[a]) * (vec[a] - otherVec[a]); return d; } @Override public ImmutableList<Double> getRawVector(String word) throws UnknownWordException { return ImmutableList.copyOf(Doubles.asList(getVector(word))); } /** * @return Vector for the given word * @throws UnknownWordException If word is not in the model's vocabulary */ private double[] getVector(String word) throws UnknownWordException { final double[] result = getVectorOrNull(word); if(result == null) throw new UnknownWordException(word); return result; } private double[] getVectorOrNull(final String word) { final Integer index = word2vectorOffset.get(word); if(index == null) return null; final DoubleBuffer vectors = model.vectors.duplicate(); double[] result = new double[model.layerSize]; vectors.position(index); vectors.get(result); return result; } /** @return Vector difference from v1 to v2 */ private double[] getDifference(double[] v1, double[] v2) { double[] diff = new double[model.layerSize]; for (int i = 0; i < model.layerSize; i++) diff[i] = v1[i] - v2[i]; return diff; } private double[] getSum(double[] v1, double[] v2) { double[] sum = new double[model.layerSize]; for (int i = 0; i < model.layerSize; i++) sum[i] = v1[i] + v2[i]; return sum; } private double[] getScaledVector(double[] v1, double k) { double[] scaled = new double[model.layerSize]; for (int i = 0; i < model.layerSize; i++) scaled[i] = v1[i] * k; return scaled; } public double[] getVectorFrom3Words(String word1, String word2, String word3) { try { double[] v1 = getVector(word1); double[] v2 = getVector(word2); double[] diff1 = getDifference(v1, v2); double[] v3 = getVector(word3); double[] diff2 = getDifference(v3, diff1); return diff2; } catch(UnknownWordException ex) { ex.printStackTrace(); } return null; } public double[] getAverageVector(String[] words) { double[] average = new double[model.layerSize]; for(int i = 0; i < model.layerSize; i++) average[i] = 0; int seqLength = 0; try { for(String word : words) { // if(model.forSearch().contains(word)) { double[] v = getVector(word); average = getSum(v, average); ++ seqLength; // } } } catch(UnknownWordException ex) { ex.printStackTrace(); } return getScaledVector(average, 1.0/(double)words.length); } @Override public SemanticDifference similarity(String s1, String s2) throws UnknownWordException { double[] v1 = getVector(s1); double[] v2 = getVector(s2); final double[] diff = getDifference(v1, v2); return new SemanticDifference() { @Override public List<Match> getMatches(String word, int maxMatches) throws UnknownWordException { double[] target = getDifference(getVector(word), diff); return SearcherImpl.this.getMatches(target, maxMatches); } }; } /** Implementation of {@link Match} */ private static class MatchImpl extends Pair<String, Double> implements Match { private MatchImpl(String first, Double second) { super(first, second); } @Override public String match() { return first; } @Override public double distance() { return second; } @Override public String toString() { return String.format("%s [%s]", first, second); } } }
thanhnguyen12/Word2Vec
src/main/java/com/medallia/word2vec/SearcherImpl.java
Java
mit
5,469
using System; namespace Synergy.Contracts.Requirements { public class BusinessRuleViolationException : Exception { public Business.Requirement Requirement { get; } public BusinessRuleViolationException(string message, Business.Requirement requirement) : base(message) { this.Requirement = requirement; } } }
synergy-software/synergy.framework
Contracts/Synergy.Contracts/Requirements/BusinessRuleViolationException.cs
C#
mit
368
var Mocha = require('mocha'); var path = require('path'); var Module = require('module'); var generateSauceReporter = require('./mocha-sauce-reporter'); var fs = require('fs'); var path = require('path'); module.exports = function (opts, fileGroup, browser, grunt, onTestFinish) { //browserTitle means we're on a SL test if (browser.browserTitle) { opts.reporter = generateSauceReporter(browser); } var cwd = process.cwd(); module.paths.push(cwd, path.join(cwd, 'node_modules')); if (opts && opts.require) { var mods = opts.require; if (!(mods instanceof Array)) { mods = [mods]; } mods.forEach(function(mod) { var abs = fs.existsSync(mod) || fs.existsSync(mod + '.js'); if (abs) { mod = path.resolve(mod); } require(mod); }); } var mocha = new Mocha(opts); mocha.suite.on('pre-require', function (context, file, m) { this.ctx.browser = browser; }); grunt.file.expand({filter: 'isFile'}, fileGroup.src).forEach(function (f) { var filePath = path.resolve(f); if (Module._cache[filePath]) { delete Module._cache[filePath]; } mocha.addFile(filePath); }); try { mocha.run(function(errCount) { var err; if (errCount !==0) { err = new Error('Tests encountered ' + errCount + ' errors.'); } onTestFinish(err); }); } catch (e) { grunt.log.error("Mocha failed to run"); grunt.log.error(e.stack); onTestFinish(false); } };
pdehaan/grunt-mocha-webdriver
tasks/lib/mocha-runner.js
JavaScript
mit
1,479
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sdl.Community.GroupShareKit.Helpers { public class ExpressionFieldValue { public string Name { get; set; } public string Value { get; set; } public string Operator { get; set; } public override string ToString() { return "\"" + EscapeString(Name) + "\"" + Operator + "\"" + EscapeString(Value) + "\""; } public static string EscapeString(string expression) { string str; var charactersToEscape = "\"\\"; if (!string.IsNullOrEmpty(expression) && !string.IsNullOrEmpty(charactersToEscape)) { var stringBuilder = new StringBuilder(); for (int i = 0; i < expression.Length; i++) { char chr = expression[i]; if (charactersToEscape.IndexOf(chr) >= 0) { stringBuilder.Append("\\"); } stringBuilder.Append(chr); } str = stringBuilder.ToString(); } else { str = expression; } return str; } } }
sdl/groupsharekit.net
Sdl.Community.GroupShareKit/Helpers/ExpressionFieldValue.cs
C#
mit
1,341
<?php /* * @author M2E Pro Developers Team * @copyright M2E LTD * @license Commercial use is forbidden */ class Ess_M2ePro_Model_Magento_Quote_Store_Configurator { /** @var $_quote Mage_Sales_Model_Quote */ protected $_quote = null; /** @var $proxy Ess_M2ePro_Model_Order_Proxy */ protected $_proxyOrder = null; /** @var $_taxConfig Mage_Tax_Model_Config */ protected $_taxConfig = null; //######################################## public function init(Mage_Sales_Model_Quote $quote, Ess_M2ePro_Model_Order_Proxy $proxyOrder) { // we need clear singleton stored instances, because magento caches tax rates in private properties Mage::unregister('_singleton/tax/calculation'); Mage::unregister('_resource_singleton/tax/calculation'); Mage::unregister('_singleton/sales/quote_address_total_collector'); $this->_quote = $quote; $this->_proxyOrder = $proxyOrder; $this->_taxConfig = Mage::getSingleton('tax/config'); } //######################################## /** * @return array */ public function getOriginalStoreConfig() { $keys = array( Mage_Tax_Model_Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX, Mage_Tax_Model_Config::CONFIG_XML_PATH_SHIPPING_INCLUDES_TAX, Mage_Tax_Model_Config::CONFIG_XML_PATH_SHIPPING_TAX_CLASS, Mage_Tax_Model_Config::CONFIG_XML_PATH_BASED_ON, Mage_Customer_Model_Group::XML_PATH_DEFAULT_ID, Mage_Weee_Helper_Data::XML_PATH_FPT_ENABLED, $this->getOriginCountryIdXmlPath(), $this->getOriginRegionIdXmlPath(), $this->getOriginPostcodeXmlPath() ); $config = array(); foreach ($keys as $key) { $config[$key] = $this->getStoreConfig($key); } return $config; } //######################################## public function prepareStoreConfigForOrder() { // catalog prices // --------------------------------------- // reset flag, use store config instead $this->_taxConfig->setNeedUsePriceExcludeTax(false); $this->setStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX, $this->isPriceIncludesTax()); // --------------------------------------- // shipping prices // --------------------------------------- $isShippingPriceIncludesTax = $this->isShippingPriceIncludesTax(); if (method_exists($this->_taxConfig, 'setShippingPriceIncludeTax')) { $this->_taxConfig->setShippingPriceIncludeTax($isShippingPriceIncludesTax); } else { $this->setStoreConfig( Mage_Tax_Model_Config::CONFIG_XML_PATH_SHIPPING_INCLUDES_TAX, $isShippingPriceIncludesTax ); } // --------------------------------------- // Fixed Product Tax settings // --------------------------------------- if ($this->_proxyOrder->isTaxModeChannel() || ($this->_proxyOrder->isTaxModeMixed() && $this->_proxyOrder->hasTax()) ) { $this->setStoreConfig(Mage_Weee_Helper_Data::XML_PATH_FPT_ENABLED, false); } // --------------------------------------- // store origin address // --------------------------------------- $this->setStoreConfig($this->getOriginCountryIdXmlPath(), $this->getOriginCountryId()); $this->setStoreConfig($this->getOriginRegionIdXmlPath(), $this->getOriginRegionId()); $this->setStoreConfig($this->getOriginPostcodeXmlPath(), $this->getOriginPostcode()); // --------------------------------------- // --------------------------------------- $this->setStoreConfig(Mage_Customer_Model_Group::XML_PATH_DEFAULT_ID, $this->getDefaultCustomerGroupId()); $this->setStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_BASED_ON, $this->getTaxCalculationBasedOn()); // --------------------------------------- // store shipping tax class // --------------------------------------- $this->setStoreConfig( Mage_Tax_Model_Config::CONFIG_XML_PATH_SHIPPING_TAX_CLASS, $this->getShippingTaxClassId() ); // --------------------------------------- } //######################################## public function isPriceIncludesTax() { if ($this->_proxyOrder->isProductPriceIncludeTax() !== null) { return $this->_proxyOrder->isProductPriceIncludeTax(); } return (bool)$this->getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX); } public function isShippingPriceIncludesTax() { if ($this->_proxyOrder->isShippingPriceIncludeTax() !== null) { return $this->_proxyOrder->isShippingPriceIncludeTax(); } return (bool)$this->getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_SHIPPING_INCLUDES_TAX); } //######################################## public function getShippingTaxClassId() { $proxyOrder = $this->_proxyOrder; $hasRatesForCountry = Mage::getSingleton('M2ePro/Magento_Tax_Helper') ->hasRatesForCountry($this->_quote->getShippingAddress()->getCountryId()); $storeShippingTaxRate = Mage::getSingleton('M2ePro/Magento_Tax_Helper') ->getStoreShippingTaxRate($this->getStore()); $calculationBasedOnOrigin = Mage::getSingleton('M2ePro/Magento_Tax_Helper') ->isCalculationBasedOnOrigin($this->getStore()); $shippingPriceTaxRate = $proxyOrder->getShippingPriceTaxRate(); $isTaxSourceChannel = $proxyOrder->isTaxModeChannel() || ($proxyOrder->isTaxModeMixed() && $shippingPriceTaxRate > 0); if ($proxyOrder->isTaxModeNone() || ($isTaxSourceChannel && $shippingPriceTaxRate <= 0) || ($proxyOrder->isTaxModeMagento() && !$hasRatesForCountry && !$calculationBasedOnOrigin) ) { return Ess_M2ePro_Model_Magento_Product::TAX_CLASS_ID_NONE; } if ($proxyOrder->isTaxModeMagento() || $proxyOrder->getShippingPriceTaxRate() <= 0 || $shippingPriceTaxRate == $storeShippingTaxRate ) { return $this->_taxConfig->getShippingTaxClass($this->getStore()); } // Create tax rule according to channel tax rate // --------------------------------------- /** @var $taxRuleBuilder Ess_M2ePro_Model_Magento_Tax_Rule_Builder */ $taxRuleBuilder = Mage::getModel('M2ePro/Magento_Tax_Rule_Builder'); $taxRuleBuilder->buildShippingTaxRule( $shippingPriceTaxRate, $this->_quote->getShippingAddress()->getCountryId(), $this->_quote->getCustomerTaxClassId() ); $taxRule = $taxRuleBuilder->getRule(); $productTaxClasses = $taxRule->getProductTaxClasses(); // --------------------------------------- return array_shift($productTaxClasses); } //######################################## protected function getOriginCountryId() { $originCountryId = $this->getStoreConfig($this->getOriginCountryIdXmlPath()); if ($this->_proxyOrder->isTaxModeMagento()) { return $originCountryId; } if ($this->_proxyOrder->isTaxModeMixed() && !$this->_proxyOrder->hasTax()) { return $originCountryId; } if ($this->_proxyOrder->isTaxModeNone() || ($this->_proxyOrder->isTaxModeChannel() && !$this->_proxyOrder->hasTax()) ) { return ''; } return $this->_quote->getShippingAddress()->getCountryId(); } protected function getOriginRegionId() { $originRegionId = $this->getStoreConfig($this->getOriginRegionIdXmlPath()); if ($this->_proxyOrder->isTaxModeMagento()) { return $originRegionId; } if ($this->_proxyOrder->isTaxModeMixed() && !$this->_proxyOrder->hasTax()) { return $originRegionId; } if ($this->_proxyOrder->isTaxModeNone() || ($this->_proxyOrder->isTaxModeChannel() && !$this->_proxyOrder->hasTax()) ) { return ''; } return $this->_quote->getShippingAddress()->getRegionId(); } protected function getOriginPostcode() { $originPostcode = $this->getStoreConfig($this->getOriginPostcodeXmlPath()); if ($this->_proxyOrder->isTaxModeMagento()) { return $originPostcode; } if ($this->_proxyOrder->isTaxModeMixed() && !$this->_proxyOrder->hasTax()) { return $originPostcode; } if ($this->_proxyOrder->isTaxModeNone() || ($this->_proxyOrder->isTaxModeChannel() && !$this->_proxyOrder->hasTax()) ) { return ''; } return $this->_quote->getShippingAddress()->getPostcode(); } //######################################## protected function getDefaultCustomerGroupId() { $defaultCustomerGroupId = $this->getStoreConfig(Mage_Customer_Model_Group::XML_PATH_DEFAULT_ID); if ($this->_proxyOrder->isTaxModeMagento()) { return $defaultCustomerGroupId; } $currentCustomerTaxClass = Mage::getSingleton('tax/calculation')->getDefaultCustomerTaxClass($this->getStore()); $quoteCustomerTaxClass = $this->_quote->getCustomerTaxClassId(); if ($currentCustomerTaxClass == $quoteCustomerTaxClass) { return $defaultCustomerGroupId; } // ugliest hack ever! // we have to remove exist singleton instance from the Mage registry // because Mage_Tax_Model_Calculation::getDefaultCustomerTaxClass() method stores the customer tax class // after the first call in protected variable and then it doesn't care what store was given to it Mage::unregister('_singleton/tax/calculation'); // default customer tax class depends on default customer group // so we override store setting for this with the customer group from the quote // this is done to make store & address tax requests equal return $this->_quote->getCustomerGroupId(); } //######################################## public function getTaxCalculationBasedOn() { $basedOn = $this->getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_BASED_ON); if ($this->_proxyOrder->isTaxModeMagento()) { return $basedOn; } if ($this->_proxyOrder->isTaxModeMixed() && !$this->_proxyOrder->hasTax()) { return $basedOn; } return 'shipping'; } //######################################## protected function getOriginCountryIdXmlPath() { // Magento 1.4.x backward compatibility return @defined('Mage_Shipping_Model_Config::XML_PATH_ORIGIN_COUNTRY_ID') ? Mage_Shipping_Model_Config::XML_PATH_ORIGIN_COUNTRY_ID : 'shipping/origin/country_id'; } protected function getOriginRegionIdXmlPath() { // Magento 1.4.x backward compatibility return @defined('Mage_Shipping_Model_Config::XML_PATH_ORIGIN_REGION_ID') ? Mage_Shipping_Model_Config::XML_PATH_ORIGIN_REGION_ID : 'shipping/origin/region_id'; } protected function getOriginPostcodeXmlPath() { // Magento 1.4.x backward compatibility return @defined('Mage_Shipping_Model_Config::XML_PATH_ORIGIN_POSTCODE') ? Mage_Shipping_Model_Config::XML_PATH_ORIGIN_POSTCODE : 'shipping/origin/postcode'; } //######################################## protected function getStore() { return $this->_quote->getStore(); } // --------------------------------------- protected function setStoreConfig($key, $value) { $this->getStore()->setConfig($key, $value); } protected function getStoreConfig($key) { return $this->getStore()->getConfig($key); } //######################################## }
portchris/NaturalRemedyCompany
src/app/code/community/Ess/M2ePro/Model/Magento/Quote/Store/Configurator.php
PHP
mit
12,176
#!/usr/bin/env python ################################################################## # Imports from __future__ import print_function from random import random import codecs import numpy as np import sys ################################################################## # Variables and Constants ENCODING = "utf-8" POS = {"gut": None, "gute": None} NEG = {"schlecht": None} ################################################################## # Methods def _get_vec_len(a_vec): """Return length of the vector @param a_vec - vector whose length should be computed @return vector's length """ return np.sqrt(sum([i**2 for i in a_vec])) def _compute_eucl_distance(a_vec1, a_vec2): """Compute Euclidean distance between two vectors @param a_vec1 - first vector @param a_vec2 - second vector @return squared Euclidean distance between two vectors """ return sum((a_vec1 - a_vec2)**2) def compute_distance(a_vecs1, a_vecs2): """Compute Euclidean distance between all pairs of vectors Compute \sum_{p^{+} \in P^{+}}\sum_{p^{-} \in P^{-}}||p^{+} - p^{-}||^{2} @param a_vecs1 - set of positive vectors @param a_vecs2 - set of negative vectors @return squared Euclidean distance between all pairs of vectors """ return sum([_compute_eucl_distance(ivec1, ivec2) for ivec1 in a_vecs1 \ for ivec2 in a_vecs2]) def _project_vec(a_vec, a_norm, a_prj_line): """Project original vector on projection line @param a_vec - vector whoch should e projected @param a_norm - square length of projection line @param a_prj_line - projection line @return a_vec's projection on a_prj_line """ # print("_project_vec: a_vec =", repr(a_vec), file = sys.stderr) # print("_project_vec: a_prj_line =", repr(a_prj_line), file = sys.stderr) # print("_project_vec: a_norm =", repr(a_norm), file = sys.stderr) # print("_project_vec: np.dot() =", repr(np.dot(a_vec, a_prj_line)), file = sys.stderr) # print("_project_vec: projection =", \ # repr((np.dot(a_vec, a_prj_line) / a_norm) * a_prj_line), file = sys.stderr) return (np.dot(a_vec, a_prj_line) / a_norm) * a_prj_line def _project(a_pos_set, a_neg_set, a_prj_line): """Project original vector sets on the projection line @param a_pos_set - set of positive vectors @param a_neg_set - set of negative vectors @param a_prj_line - projection line @return 2-tuple with sets of projected positive and negative vectors """ idiv = sum(a_prj_line ** 2) assert idiv != 0, "Projection vector cannot be zero vector." vecs1 = [_project_vec(ivec, idiv, a_prj_line) for ivec in a_pos_set] vecs2 = [_project_vec(ivec, idiv, a_prj_line) for ivec in a_neg_set] return (vecs1, vecs2) def _compute_gradient(a_pos_vecs, a_neg_vecs, a_prj_line): """Compute gradient of distance function wrt projection line @param a_pos_vecs - set of positive vectors @param a_neg_vecs - set of negative vectors @param a_prj_line - current projection line @return gradient vector """ print("a_prj_line = ", repr(a_prj_line), file=sys.stderr) # zero-out the gradient vector dot_prod = diff_vec = None # prj_squared = a_prj_line ** 2 idiv = 1. # np.float128(sum(a_prj_line ** 2)) idiv_squared = 1. # idiv ** 2 # normalized_prj = a_prj_line / idiv assert idiv != 0, "Projection vector cannot be zero vector." gradient = np.array([0 for _ in a_prj_line]) for pos_vec in a_pos_vecs: for neg_vec in a_neg_vecs: diff_vec = pos_vec - neg_vec dot_prod = np.dot(a_prj_line, diff_vec) print("dot_prod = ", repr(dot_prod), file=sys.stderr) print("idiv = ", repr(idiv), file=sys.stderr) print("idiv_squared = ", repr(idiv_squared), file=sys.stderr) # constant 0.5 below is a dirty hack gradient += (dot_prod) * (diff_vec - dot_prod * a_prj_line) # update = multi # print("0) update =", repr(update), file = sys.stderr) # update *= (pos_vec * idiv - 2 * np.dot(pos_vec, a_prj_line) * a_prj_line) / idiv_squared + \ # np.dot(pos_vec, a_prj_line) / idiv - \ # (neg_vec * idiv - 2 * np.dot(neg_vec, a_prj_line) * a_prj_line) / idiv_squared - \ # np.dot(neg_vec, a_prj_line) / idiv # update *= (diff_vec * idiv - 2 * np.dot(a_prj_line, diff_vec) * a_prj_line) * a_prj_line / \ # idiv_squared + np.dot(a_prj_line, diff_vec)/idiv * ones # print("1) update =", repr(update), file = sys.stderr) # gradient += update # since we have a quadratic function, the gradient has coefficient # two print("gradient =", repr(gradient), file=sys.stderr) return 2 * gradient def find_optimal_prj(a_dim): """Find projection line that maximizes distance between vectors @param a_dim - dimension of vectors @return 2-tuple with projection line and cost """ DELTA = 1e-10 # cost difference ALPHA = 0.00001 # learning rate n = 0 # current iteration max_n = 100000 # maximum number of iterations inf = float("inf") ipos = ineg = None prev_dist = dist = float(inf) prj_line = np.array([np.float128(1.) for _ in xrange(a_dim)]) # prj_line = np.array([random() for i in xrange(a_dim)]) # gradient = np.array([1 for i in xrange(a_dim)]) while (prev_dist == inf or dist - prev_dist > DELTA) and n < max_n: prev_dist = dist # normalize length of projection line prj_line /= _get_vec_len(prj_line) # project word vectors on the guessed polarity line # print("POS = ", repr(POS), file = sys.stderr) # print("NEG = ", repr(NEG), file = sys.stderr) ipos, ineg = _project(POS.itervalues(), NEG.itervalues(), prj_line) # compute distance between posiive and negative vectors # print("ipos = ", repr(ipos), file = sys.stderr) # print("ineg = ", repr(ineg), file = sys.stderr) dist = compute_distance(ipos, ineg) print("prj_line before = ", prj_line, file = sys.stderr) print("prev_dist = {:f}".format(prev_dist), file = sys.stderr) print("dist = {:f}".format(dist), file = sys.stderr) # update polarity line prj_line += ALPHA * _compute_gradient(POS.itervalues(), NEG.itervalues(), \ prj_line) print("prj_line after = ", prj_line, file = sys.stderr) n += 1 if dist - prev_dist < DELTA: print("Model converged: delta = {}".format(dist - prev_dist), file = sys.stderr) return (prj_line, dist) def parse_vecfile(a_fname): """Parse files containing word vectors @param a_fname - name of the wordvec file @return \c dimension of the vectors """ global POS, NEG ivec = None with codecs.open(a_fname, 'r', ENCODING) as ifile: fnr = True toks = None for iline in ifile: iline = iline.strip() if fnr: ndim = int(iline.split()[-1]) fnr = False continue elif not iline: continue toks = iline.split() assert (len(toks) - 1) == ndim, "Wrong vector dimension: {:d}".format(\ len(toks) - 1) if toks[0] in POS: ivec = np.array([np.float128(i) for i in toks[1:]]) # ivec /= _get_vec_len(ivec) POS[toks[0]] = ivec elif toks[0] in NEG: ivec = np.array([np.float128(i) for i in toks[1:]]) # ivec /= _get_vec_len(ivec) NEG[toks[0]] = ivec # prune words for which there were no vectors POS = {iword: ivec for iword, ivec in POS.iteritems() if ivec is not None} NEG = {iword: ivec for iword, ivec in NEG.iteritems() if ivec is not None} return ndim def main(): """Main method for finding optimal projection line @return square sum of the distances between positive and negative words projected on the line """ import argparse argparser = argparse.ArgumentParser() argparser.add_argument("vec_file", help = "file containing vectors") args = argparser.parse_args() ndim = parse_vecfile(args.vec_file) prj_line, ret = find_optimal_prj(ndim) print("ret =", str(ret)) ################################################################## # Main if __name__ == "__main__": main()
WladimirSidorenko/SentiLex
scripts/find_prj_line.py
Python
mit
8,625
namespace PersistentPlanet { public class WindowFocusChangedEvent { public bool HasFocus { get; set; } } }
James226/persistent-planet
PersistentPlanet/WindowFocusChangedEvent.cs
C#
mit
126
<footer class="site-footer"> <div class="wrapper"> <!-- <h2 class="footer-heading">{{ site.title }}</h2> <div class="footer-col-wrapper"> <div class="footer-col footer-col-1"> <ul class="contact-list"> <li>{{ site.title }}</li> <li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li> </ul> </div> <div class="footer-col footer-col-2"> <ul class="social-media-list"> {% if site.github_username %} <li> {% include icon-github.html username=site.github_username %} </li> {% endif %} {% if site.twitter_username %} <li> {% include icon-twitter.html username=site.twitter_username %} </li> {% endif %} </ul> </div> <div class="footer-col footer-col-3"> <p>{{ site.description }}</p> </div> </div> --> </div> </footer>
yhs-968/yhs-968.github.io
_includes/footer.html
HTML
mit
943
<!DOCTYPE HTML> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (11.0.13) on Thu Feb 03 14:46:53 MST 2022 --> <title>Uses of Class mil.nga.geopackage.style.Color (GeoPackage Core 6.2.0 API)</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="dc.created" content="2022-02-03"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> <script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif]--> <script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script> <script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class mil.nga.geopackage.style.Color (GeoPackage Core 6.2.0 API)"; } } catch(err) { } //--> var pathtoroot = "../../../../../"; var useModuleDirectories = true; loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <header role="banner"> <nav role="navigation"> <div class="fixedNav"> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a id="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../index.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../Color.html" title="class in mil.nga.geopackage.style">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li> </ul> <ul class="navListSearch"> <li><label for="search">SEARCH:</label> <input type="text" id="search" value="search" disabled="disabled"> <input type="reset" id="reset" value="reset" disabled="disabled"> </li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <a id="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> </div> <div class="navPadding">&nbsp;</div> <script type="text/javascript"><!-- $('.navPadding').css('padding-top', $('.fixedNav').css("height")); //--> </script> </nav> </header> <main role="main"> <div class="header"> <h2 title="Uses of Class mil.nga.geopackage.style.Color" class="title">Uses of Class<br>mil.nga.geopackage.style.Color</h2> </div> <div class="classUseContainer">No usage of mil.nga.geopackage.style.Color</div> </main> <footer role="contentinfo"> <nav role="navigation"> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a id="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../index.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../Color.html" title="class in mil.nga.geopackage.style">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <a id="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </nav> <p class="legalCopy"><small>Copyright &#169; 2022 <a href="https://www.nga.mil/">National Geospatial-Intelligence Agency</a>. All rights reserved.</small></p> </footer> </body> </html>
ngageoint/geopackage-core-java
docs/docs/api/mil/nga/geopackage/style/class-use/Color.html
HTML
mit
5,248
exports.BattleMovedex = { //----------------------------------------------------------------------------------------------- //Misc changes //----------------------------------------------------------------------------------------------- "shellsmash": { inherit: true, boosts: { atk: 2, spa: 2, spe: 2, def: -1, spd: -1 }, onModifyMove: function(move, user) { if (user.ability === 'shellarmor') { move.boosts = { spa: 1, atk: 1, spe: 2, }; } } }, //----------------------------------------------------------------------------------------------- //The freeze status was removed from the game entirely and replaced by flinch //----------------------------------------------------------------------------------------------- icebeam: { inherit: true, secondary: { chance: 10, volatileStatus: 'flinch' } }, icefang: { inherit: true, secondary: { chance: 20, volatileStatus: 'flinch' } }, icepunch: { inherit: true, secondary: { chance: 10, volatileStatus: 'flinch' } }, powdersnow: { inherit: true, secondary: { chance: 10, volatileStatus: 'flinch' } }, blizzard: { inherit: true, secondary: { chance: 10, volatileStatus: 'flinch' } }, triattack: { inherit: true, secondary: { chance: 20, onHit: function(target, source) { var result = this.random(3); if (result===0) { target.trySetStatus('brn', source); } else if (result===1) { target.trySetStatus('par', source); } else { target.trySetStatus('tox', source); } } } }, //----------------------------------------------------------------------------------------------- //Various nerfed moves //----------------------------------------------------------------------------------------------- thunder: { inherit: true, secondary: { chance: 10 } }, hurricane: { inherit: true, secondary: { chance: 0 } }, darkvoid: { inherit: true, target: "foes" }, stealthrock: { inherit: true, effect: { // this is a side condition onStart: function(side) { this.add('-sidestart',side,'move: Stealth Rock'); }, onSwitchIn: function(pokemon) { var typeMod = this.getEffectiveness('Rock', pokemon); var factor = 8; if (typeMod == 1) factor = 4; if (typeMod >= 2) factor = 4; if (typeMod == -1) factor = 16; if (typeMod <= -2) factor = 32; var damage = this.damage(pokemon.maxhp/factor); } } }, //----------------------------------------------------------------------------------------------- //More good critting moves //----------------------------------------------------------------------------------------------- explosion: { inherit: true, basePower: 200, willCrit: true }, selfdestruct: { inherit: true, basePower: 125, willCrit: true }, twineedle: { num: 41, accuracy: 100, basePower: 20, willCrit: true, category: "Physical", desc: "Deals damage to one adjacent target and hits twice, with each hit having a 20% chance to poison it. If the first hit breaks the target's Substitute, it will take damage for the second hit.", shortDesc: "Hits 2 times. Each hit has 20% chance to poison.", id: "twineedle", name: "Twineedle", pp: 20, priority: 0, multihit: [2,2], secondary: { chance: 20, status: 'psn' }, target: "normal", type: "Bug" }, drillrun: { inherit: true, basePower: 40, accuracy: 90, willCrit: true }, frostbreath: { inherit: true, power: 50, accuracy: 100 }, stormthrow: { inherit: true, power: 50, accuracy: 100 }, nightslash: { inherit: true, power: 50, willCrit: true }, //----------------------------------------------------------------------------------------------- //Various buffs //----------------------------------------------------------------------------------------------- bulldoze: { num: 523, accuracy: 100, basePower: 80, category: "Physical", desc: "Deals damage to all adjacent Pokemon with a 100% chance to lower their Speed by 1 stage each.", shortDesc: "100% chance to lower adjacent Pkmn Speed by 1.", id: "bulldoze", name: "Bulldoze", pp: 20, priority: 0, secondary: { chance: 50, boosts: { spe: -1 } }, target: "adjacent", type: "Ground" }, crosspoison: { inherit: true, basePower: 90 }, razorshell: { inherit: true, basePower: 100, accuracy: 85 }, glaciate: { inherit: true, basePower: 100, accuracy: 100, secondary: { chance: 50, boosts: { spe: -1 } } }, heatwave: { inherit: true, basePower: 90, accuracy: 100, secondary: { chance: 0 }, basePowerCallback: function() { if (this.isWeather('sunnyday')) { return 120; } return 90; } }, poisontail: { inherit: true, basePower: 95 }, xscissor: { inherit: true, basePower: 90 }, rockslide: { inherit: true, basePower: 80, accuracy: 100 }, stoneedge: { inherit: true, accuracy: 85 }, hammerarm: { inherit: true, secondary: { chance: 20, boosts: { spe: -1 } } }, toxic: { inherit: true, accuracy: 100 }, willowisp: { inherit: true, accuracy: 100 }, acidspray: { inherit: true, target: "adjacent", power: 70 }, relicsong: { inherit: true, secondary: { chance: 20, self: { boosts: { atk: 1, spa: 1 } } } }, honeclaws: { inherit: true, boosts: { atk: 1, accuracy: 2 } }, shadowpunch: { inherit: true, basePower: 85 }, wildcharge: { inherit: true, basePower: 100, }, nightdaze: { inherit: true, basePower: 90, accuracy: 100, secondary: { chance: 20, boosts: { accuracy: -1 } } }, meditate: { inherit: true, boosts: { atk: 1, spd: 1 } }, //----------------------------------------------------------------------------------------------- //Massively changed moves that are pretty much new ones //----------------------------------------------------------------------------------------------- "lockon": { num: 199, accuracy: true, basePower: 0, category: "Status", desc: "On the following turn, one adjacent target cannot avoid the user's moves, even if the target is in the middle of a two-turn move. Fails if the user tries to use this move again during effect.", shortDesc: "User's next move will not miss the target.", id: "lockon", name: "Lock-On", pp: 5, priority: 0, self: { boosts: { spa: 1, accuracy: 1 } }, secondary: false, target: "self", type: "Normal" }, lunardance: { num: 461, accuracy: true, basePower: 0, category: "Status", desc: "The user faints and the Pokemon brought out to replace it has its HP and PP fully restored along with having any major status condition cured. Fails if the user is the last unfainted Pokemon in its party.", shortDesc: "User faints. Replacement is fully healed, with PP.", id: "lunardance", isViable: true, name: "Lunar Dance", pp: 20, priority: 0, isSnatchable: true, boosts: { spa: 1, spe: 1 }, secondary: false, target: "self", type: "Psychic" }, rage: { inherit: true, basePower: 100, onHit: function(target, source) { source.addVolatile('confusion'); } }, poisonjab: { inherit: true, basePower: 40, priority: 1, secondary: { chance: 0 } }, skyattack: { num: 143, accuracy: 90, basePower: 100, category: "Physical", desc: "Deals damage to one adjacent or non-adjacent target with a 30% chance to flinch it and a higher chance for a critical hit. This attack charges on the first turn and strikes on the second. The user cannot make a move between turns. If the user is holding a Power Herb, the move completes in one turn.", shortDesc: "Charges, then hits turn 2. 30% flinch. High crit.", id: "skyattack", name: "Sky Attack", pp: 15, isViable: true, priority: 0, isTwoTurnMove: false, isContact: true, secondary: { chance: 20, boosts: { def: -1 } }, target: "any", type: "Flying" }, electroweb: { inherit: true, accuracy: 85, basePower: 70, secondary: { chance: 100, status: 'par' } }, payday: { inherit: true, basePower: 25, multihit: [2,5] }, barrage: { inherit: true, basePower: 25, type: "Fighting", multihit: [2,5] }, doubleslap: { inherit: true, basePower: 40, type: "Fighting", multihit: [2,2] }, "hydrocannon": { num: 308, accuracy: 100, basePower: 150, category: "Special", desc: "Deals damage to one adjacent target. If this move is successful, the user must recharge on the following turn and cannot make a move.", shortDesc: "User cannot move next turn.", id: "hydrocannon", name: "Hydro Cannon", pp: 20, priority: -3, beforeTurnCallback: function(pokemon) { pokemon.addVolatile('hydrocannon'); this.add('-message', pokemon.name+" is focusing it's aim!"); }, beforeMoveCallback: function(pokemon) { if (!pokemon.removeVolatile('hydrocannon')) { return false; } if (pokemon.lastAttackedBy && pokemon.lastAttackedBy.damage && pokemon.lastAttackedBy.thisTurn) { this.add('cant', pokemon, 'flinch', 'Hydro Cannon'); return true; } }, effect: { duration: 1, onStart: function(pokemon) { this.add('-singleturn', pokemon, 'move: Hydro Cannon'); } }, secondary: false, target: "normal", type: "Water" }, "blastburn": { inherit: true, accuracy: 100, basePower: 60, pp: 5, willCrit: true, selfdestruct: true, secondary: { chance: 100, status: 'brn' }, target: "allAdjacent", self: false }, "frenzyplant": { inherit: true, accuracy: 80, basePower: 100, category: "Physical", pp: 5, volatileStatus: 'partiallytrapped', self: false }, "triplekick": { inherit: true, basePowerCallback: function(pokemon) { pokemon.addVolatile('triplekick'); return 5 + (10 * pokemon.volatiles['triplekick'].hit); }, accuracy: 100 }, "dualchop": { inherit: true, accuracy: 100 }, "bonerush": { inherit: true, accuracy: 100 }, "feint": { inherit: true, basePower: 65 }, "spikecannon": { num: 131, accuracy: 80, basePower: 60, category: "Physical", desc: "Deals damage to one adjacent target and hits two to five times. Has a 35% chance to hit two or three times, and a 15% chance to hit four or five times. If one of the hits breaks the target's Substitute, it will take damage for the remaining hits. If the user has the Ability Skill Link, this move will always hit five times.", shortDesc: "Hits 2-5 times in one turn.", id: "spikecannon", name: "Spike Cannon", pp: 15, priority: 0, secondary: false, sideCondition: 'spikes', target: "normal", type: "Ground" }, "gastroacid": { inherit: true, basePower: 50, category: "Special", isBounceable: false }, "naturepower": { inherit: true, basePower: 80, accuracy: 100, priority: 0, category: "Physical", target: "normal", type: "Ground", onHit: false, onModifyMove: function(move, source, target) { if (source.hasType('Grass')) { move.basePower = 100; } } }, "electroweb": { inherit: true, target: "normal", }, "leechseed": { inherit: true, accuracy: 100, } };
DreMZ/PS
mods/duskmod/moves.js
JavaScript
mit
18,661
<?php return array( /* |-------------------------------------------------------------------------- | Workbench Author Name |-------------------------------------------------------------------------- | | When you create new packages via the Artisan "workbench" command your | name is needed to generate the composer.json file for your package. | You may specify it now so it is used for all of your workbenches. | */ 'name' => 'Marie Hogebrandt', /* |-------------------------------------------------------------------------- | Workbench Author E-Mail Address |-------------------------------------------------------------------------- | | Like the option above, your e-mail address is used when generating new | workbench packages. The e-mail is placed in your composer.json file | automatically after the package is created by the workbench tool. | */ 'email' => 'iam@mariehogebrandt.se', );
Melindrea/mhcm
app/config/workbench.php
PHP
mit
987
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Kombucha</title> <meta name="description" content="Learn how to make kombucha."> <meta name="author" content="Branden Byers"> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <link rel="stylesheet" href="css/reveal.min.css"> <link rel="stylesheet" href="css/theme/beige-edited.css" id="theme"> <!-- For syntax highlighting --> <link rel="stylesheet" href="lib/css/zenburn.css"> <!-- If the query includes 'print-pdf', include the PDF print sheet --> <script> if( window.location.search.match( /print-pdf/gi ) ) { var link = document.createElement( 'link' ); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = 'css/print/pdf.css'; document.getElementsByTagName( 'head' )[0].appendChild( link ); } </script> <!--[if lt IE 9]> <script src="lib/js/html5shiv.js"></script> <![endif]--> </head> <body> <div class="reveal"> <!-- Any section element inside of this container is displayed as a slide --> <div class="slides"> <section> <h1>Kombucha</h1> </section> <section> <h2>What is Kombucha?</h2> <ul> <li>Fermented Sweet Tea</li> <li>SCOBY</li> </ul> </section> <section> <h2>Where did it come from?</h2> <ul> <li>Most likely China</li> <li>Became popular in Russia</li> </ul> </section> <section> <h1>Supplies &amp; Ingredients</h1> </section> <section> <h2>SCOBY</h2> </section> <section> <h2>Where to get a SCOBY</h2> <ul> <li>online</li> <li>in-store</li> <li>grow your own</li> </ul> </section> <section> <h2>Brewed Kombucha</h2> <ul> <li>Lowers pH</li> <li>Innoculant</li> </ul> </section> <section> <h2>Water</h2> <ul> <li>Chlorine</li> <li>Used to kill microorganisms</li> <li>Boiling, Filtration, or Time</li> <li>Chloramines</li> <li>Can't be boiled out</li> <li>Filtration</li> <li>Contact your water supplier</li> </ul> </section> <section> <h2>Sugar</h2> <ul> <li>White Cane Sugar</li> <li>Less Refined Sugars</li> </ul> </section> <section> <h2>Camellia sinensis</h2> <ul> <li>Black Tea</li> <li>Green Tea</li> <li>Avoid Earl Grey</li> <li>No Herbal Teas</li> </ul> </section> <section> <h2>Tea Brewing</h2> <ul> <li>Tea Bags</li> <li>Loose Leaf</li> <ul> <li>Metal Tea Ball</li> <li>Coffee filter tea bag</li> </ul> </ul> </section> <section> <h2>Kombucha Covers</h2> <ul> <li>Fruit Flies</li> <li>Dust</li> <li>Cloth and String</li> <li>Coffee Filters & Rubber Bands</li> </ul> </section> <section> <h2>Jars &amp; Bottles</h2> <ul> <li>Fermentation</li> <ul> <li>Gallon jar</li> <li>2 quart mason jar</li> </ul> <li>2nd Fermentation</li> <ul> <li>1/2 Gallon Jug</li> <li>Mason Jar</li> <li>Flip-Top Bottles</li> </ul> </ul> </section> <section> <h2>Other Supplies</h2> <ul> <li>Large spoon</li> <li>Stainless Steel Bowl</li> <li>Funnel</li> <li>Ladle</li> <li>Auto-siphone</li> <li>Plastic Straw</li> <li>Thermometer</li> </ul> </section> <section> <h2>Recipe Specifics</h2> <ul> <li>1 gallong water</li> <li>25 grams tea or 8 tea bags</li> <li>225 grams sugar</li> <li>1/2 cup previous batch of kombucha</li> <li>SCOBY</li> </ul> </section> <section> <h2>Direction</h2> <ul> <li>Make Condensed Sweet Tea</li> <li>Combine Cold Water and Tea in Jar</li> <ul> <li>Check water temperature</li> <li>Wait if still hot</li> </ul> <li>Add SCOBY and Cover</li> </ul> </section> <section> <h2>Fermentation</h2> <ul> <li>Temperature</li> <ul> <li>70 to 85&deg;F</li> <li>Ideal: 75&deg;F</li> </ul> <li>Location</li> <ul> <li>Out of direct sunlight</li> <li>Consistent temperatures</li> </ul> <li>Time</li> <ul> <li>1 to 4 weeks</li> <li>Taste everyday after first week</li> </ul> </ul> </section> <section> <h2>Too sweet?</h2> <ul> <li>Continue Fermentation</li> <li>Check Daily</li> </ul> <p>&nbsp;</p> <h2>Too Tart?</h2> <ul> <li>Add sugar to bottle or 2nd fermentation</li> <li>Brew shorter next batch</li> </ul> </section> <section> <h2>2nd Fermentation</h2> <ul> <li>Carbonation?</li> <li>48 hours to 4 days</li> </ul> </section> <section> <h2>Flavor</h2> <ul> <li>Ginger</li> <li>Ginger Mint</li> <li>Lavender and Lemon</li> <ul> <li>3 lemons</li> <li>1 tablespoon lavender</li> </ul> <li>Fresh Fruit</li> <ul> <li>Caution: Vigorous Carbonation</li> <li>Berries</li> </ul> <li>Concord Grape Concentrate</li> <ul> <li>Without additives</li> </ul> </ul> </section> <section> <h1>Exploding Bottles Warning</h1> </section> <section> <h2>Bottling</h2> <ul> <li>Choose your Vessel</li> <li>From Jar to Bottle</li> <ul> <li>funnel and pour</li> <li>ladle</li> <li>auto-siphon</li> </ul> </ul> </section> <section> <h2>Storing your SCOBY</h2> <ul> <li>Do not refrigerate</li> <li>Brew next batch immediately</li> <li>Or make a SCOBY hotel</li> </ul> </section> <section> <h2>Grow Your Own SCOBY</h2> <ul> <li>Why does this work?</li> <li>1 to 4 weeks</li> <li>No need to add sweet tea</li> </ul> </section> <section> <h2>Other uses for kombucha</h2> <ul> <li>Kombucha Vinegar</li> <li>Mixed Drink</li> <li>SCOBY Candy</li> </ul> </section> <section> <h2>Drink 'buch and be merry</h2> </section> </div> </div> <script src="lib/js/head.min.js"></script> <script src="js/reveal.min.js"></script> <script> // Full list of configuration options available here: // https://github.com/hakimel/reveal.js#configuration Reveal.initialize({ controls: false, progress: true, history: true, center: true, width: 1366, height: 768, theme: Reveal.getQueryHash().theme, // available themes are in /css/theme transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none // Parallax scrolling // parallaxBackgroundImage: 'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg', // parallaxBackgroundSize: '2100px 900px', // Optional libraries used to extend on reveal.js dependencies: [ { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, { src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }, { src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } } ] }); </script> </body> </html>
brandenbyers/presentation-kombucha
index.html
HTML
mit
8,177
<?php namespace WowzaRestApi; class WowzaApplicationSettings { public $name; public $modules = array(); public function __construct($object = null) { if (!is_null($object) && is_object($object)) { $this->modules = array(); foreach ($object->modules->moduleList as $module) { $this->modules[] = new WowzaModule($module); } } } }
keyanmca/wowzarestapiclient
src/WowzaApplicationSettings.php
PHP
mit
417
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Description of Stocks * * @author rjgodia */ class Stocks extends MY_Model { //put your code here function __construct() { parent:: __construct('Stocks', 'Value'); } }
Rawrisaur/comp4711asn1
application/models/Stocks.php
PHP
mit
394
<?php namespace ApiGateway; use ApiGateway\ApiModel; use ApiGateway\Config\BaseConfig; use ApiGateway\Config\ArrayConfig; use ApiGateway\ClassSerialize; use ApiGateway\Constants; use ApiGateway\Auth\Signature; use ApiGateway\Http\HttpHelper; use ApiGateway\Exception\ServerException; /** * Api Service * * @author eddycjy <313687982@qq.com> * @license MIT */ class ApiService { use ClassSerialize; //请求路径 protected $url; //请求参数 protected $params; public function __construct(ApiModel $modelObject, BaseConfig $configObject = null) { if($configObject == null) { $configObject = new ArrayConfig(); } $this->params = $this->getRequestModelParams($modelObject) + $this->getRequestConfigParams($configObject); $this->url = $this->getRequestUrl($configObject->getRegionHost(), $this->params, $configObject->getAccessKeySecret()); } /** * 发起GET请求和解析结果 * * @param string $format 解析格式 * @return json/xml */ public function get($format = Constants::JSON_FORMAT) { $response = HttpHelper::curl($this->url); $body = $this->parseResponse($response->getBody(), $format); if($response->isSuccess() == false) { throw new ServerException($body['Message'], $body['Code'], $response->getStatus(), $body['RequestId']); } return $body; } /** * 执行结果解析 * * @param json/xml $response 请求结果 * @param string $format 解析格式 * @return json/xml */ private function parseResponse($body, $format) { if ($format == Constants::JSON_FORMAT) { $body = json_decode($body, true); } else if ($format == Constants::XML_FORMAT) { $body = @simplexml_load_string($body); } return $body; } /** * 获取请求Model参数 * * @param object $modelObject Model对象属性 * @return array */ private function getRequestModelParams($modelObject) { return $this->toArray($modelObject); } /** * 获取请求Config参数 * * @param object $configObject Config对象属性 * @return array */ private function getRequestConfigParams($configObject) { return [ 'AccessKeyId' => $configObject->getAccessKeyId(), 'AccessKeySecret' => $configObject->getAccessKeySecret(), 'Format' => $configObject->getFormat(), 'Version' => $configObject->getVersion(), 'SignatureMethod' => $configObject->getSignatureMethod(), 'SignatureVersion' => $configObject->getSignatureVersion(), 'SignatureNonce' => $configObject->getSignatureNonce(), 'Timestamp' => $configObject->getTimestamp(), ]; } /** * 获取请求路径 * * @param string $host 域名 * @param array $params 请求参数 * @param string $secret 密钥 * @return string */ private function getRequestUrl($host, $params, $secret) { $paramString = ""; foreach($params as $key => $value) { $paramString .= urlencode($key) . "=" . urlencode($value) . "&"; } $result = $host . "/?" . $paramString . "Signature=" . $this->getSignature("GET", $params, $secret . "&"); return $result; } /** * 获取签名 * * @param string $method 方法 * @param array $params 请求参数 * @param string $secret 密钥 * @return string */ private function getSignature($method, $params, $secret) { $object = new Signature(); return $object->getSignature($method, $params, $secret); } }
EDDYCJY/aliyun-api-gateway-sdk
src/ApiService.php
PHP
mit
3,688
<?php /** * Carpus Friendly Password Generator. * * The Carpus Friendly Password Generator uses a quantitative typing effort model to generate secure * passwords that are measurably easy-to-type (a.k.a. carpus friendly) on standard QWERTY keyboards. * Typing effort of the generated passwords is calculated based on the CarpalX Typing Effort Model * <http://mkweb.bcgsc.ca/carpalx/?typing_effort>. Some of the logic used in CFPG was derived from * code in CarpalX which is copyright 2002-2009 Martin Krzywinski <martink@bcgsc.ca>. * * PHP version 5 * * @author Jonathan Robson <jnrbsn@gmail.com> * @copyright 2011 Jonathan Robson * @license MIT License http://gist.github.com/802399 * @link http://github.com/jnrbsn/cfpg */ /** * Generates a secure, easy-to-type password for QWERTY keyboards. * * @param integer $length The number of characters to be in the password. * @param float $maxEffort The maximum typing effort the password should have. * @param boolean $returnEffort Whether or not to return the typing effort along with the password. * * @return mixed The password or an array containing the password and the effort if $returnEffort * is set to true. */ function cfpg($length=8, $maxEffort=4.362, $returnEffort=false) { // Pool of characters from which to generate the password. $pool = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz123456789!@#$%^&*()-=[];,./_+{}:<>?'; // Shift key map. "~" is left shift. "|" is right shift. $shiftMap = array( '!' => '~1', '@' => '~2', '#' => '~3', '$' => '~4', '%' => '~5', '^' => '~6', '&' => '|7', '*' => '|8', '(' => '|9', ')' => '|0', '_' => '|-', '+' => '|=', 'Q' => '~q', 'W' => '~w', 'E' => '~e', 'R' => '~r', 'T' => '~t', 'Y' => '|y', 'U' => '|u', 'P' => '|p', '{' => '|[', '}' => '|]', 'A' => '~a', 'S' => '~s', 'D' => '~d', 'F' => '~f', 'G' => '~g', 'H' => '|h', 'J' => '|j', 'K' => '|k', 'L' => '|l', ':' => '|;', 'Z' => '~z', 'X' => '~x', 'C' => '~c', 'V' => '~v', 'B' => '~b', 'N' => '|n', 'M' => '|m', '<' => '|,', '>' => '|.', '?' => '|/', ); // Each element: key => array(distance, penalty, hand, row, finger). $keyData = array( '1' => array(5, 3.2606, 0, 0, 1), '2' => array(4, 3.2606, 0, 0, 1), '3' => array(4, 1.9632, 0, 0, 2), '4' => array(4, 1.9632, 0, 0, 3), '5' => array(3.5, 1.9632, 0, 0, 3), '6' => array(4.5, 1.9632, 0, 0, 3), '7' => array(4, 1.9632, 1, 0, 6), '8' => array(4, 1.9632, 1, 0, 7), '9' => array(4, 1.9632, 1, 0, 7), '0' => array(4, 3.2606, 1, 0, 8), '-' => array(4, 4.558, 1, 0, 9), '=' => array(4.5, 4.558, 1, 0, 9), 'q' => array(2, 3.2492, 0, 1, 0), 'w' => array(2, 1.9518, 0, 1, 1), 'e' => array(2, 0.6544, 0, 1, 2), 'r' => array(2, 0.6544, 0, 1, 3), 't' => array(2.5, 0.6544, 0, 1, 3), 'y' => array(3, 0.6544, 1, 1, 6), 'u' => array(2, 0.6544, 1, 1, 6), 'i' => array(2, 0.6544, 1, 1, 7), 'p' => array(2, 3.2492, 1, 1, 9), '[' => array(2.5, 3.2492, 1, 1, 9), ']' => array(4, 3.2492, 1, 1, 9), 'a' => array(0, 2.5948, 0, 2, 0), 's' => array(0, 1.2974, 0, 2, 1), 'd' => array(0, 0, 0, 2, 2), 'f' => array(0, 0, 0, 2, 3), 'g' => array(2, 0, 0, 2, 3), 'h' => array(2, 0, 1, 2, 6), 'j' => array(0, 0, 1, 2, 6), 'k' => array(0, 0, 1, 2, 7), 'l' => array(0, 1.2974, 1, 2, 8), ';' => array(0, 2.5948, 1, 2, 9), 'z' => array(2, 3.9036, 0, 3, 0), 'x' => array(2, 2.6062, 0, 3, 1), 'c' => array(2, 1.3088, 0, 3, 2), 'v' => array(2, 1.3088, 0, 3, 3), 'b' => array(3.5, 1.3088, 0, 3, 3), 'n' => array(2, 1.3088, 1, 3, 6), 'm' => array(2, 1.3088, 1, 3, 6), ',' => array(2, 1.3088, 1, 3, 7), '.' => array(2, 2.6062, 1, 3, 8), '/' => array(2, 3.9036, 1, 3, 9), '~' => array(4, 3.9036, 0, 3, 0), '|' => array(4, 3.9036, 1, 3, 9), ); // Generate the first draft of the password. $password = ''; for ($i = 0; $i < $length; ++$i) { $password .= $pool[mt_rand(0, 82)]; } // This will store cached effort calculations for triads to improve efficiency. $effortCache = array(); do { // Replace a random character in the password. $password[mt_rand() % $length] = $pool[mt_rand(0, 82)]; // Translate all the keys that need shift. $keys = strtr($password, $shiftMap); // Get the total number of triads. $numTriads = strlen($keys) - 2; // This will store the overall effort of the password. $totalEffort = 0; for ($i = 0; $i < $numTriads; ++$i) { $c1 = $keys[$i]; $c2 = $keys[$i + 1]; $c3 = $keys[$i + 2]; $triad = $c1.$c2.$c3; if (isset($effortCache[$triad])) { // Don't calculate the effort of this triad if we already know it. $totalEffort += $effortCache[$triad]; continue; } // Base distances and penalties. $triadEffort = 0.3555 * $keyData[$c1][0] * (1 + 0.367 * $keyData[$c2][0] * (1 + 0.235 * $keyData[$c3][0])); $triadEffort += 0.6423 * $keyData[$c1][1] * (1 + 0.367 * $keyData[$c2][1] * (1 + 0.235 * $keyData[$c3][1])); // Hand penalty calculation. if ($keyData[$c1][2] == $keyData[$c3][2]) { if ($keyData[$c2][2] == $keyData[$c3][2]) { // Same hand. $pHand = 2; } else { // Alternating. $pHand = 1; } } else { // Both used, not alternating. $pHand = 0; } // Row penalty calculation. $row1 = $keyData[$c1][3]; $row2 = $keyData[$c2][3]; $row3 = $keyData[$c3][3]; $dr = array($row1 - $row2, $row1 - $row3, $row2 - $row3); $drAbs = array(abs($dr[0]), abs($dr[1]), abs($dr[2])); arsort($drAbs); // Max delta row absolute value. $drMaxAbs = reset($drAbs); // Max delta row. $drMax = $dr[key($drAbs)]; unset($dr, $drAbs); if ($row1 < $row2) { if ($row3 == $row2) { // Downward progression with repetition: 1 < 2 = 3. $pRow = 1; } else if ($row2 < $row3) { // Downward progression: 1 < 2 < 3. $pRow = 4; } else if ($drMaxAbs == 1) { $pRow = 3; } else { // All/some different; delta row > 1. if ($drMax < 0) { $pRow = 7; } else { $pRow = 5; } } } else if ($row1 > $row2) { if ($row3 == $row2) { // Upward progression with repetition: 1 > 2 = 3. $pRow = 2; } else if ($row2 > $row3) { // Upward progression: 1 > 2 > 3. $pRow = 6; } else if ($drMaxAbs == 1) { $pRow = 3; } else { if ($drMax < 0) { $pRow = 7; } else { $pRow = 5; } } } else { if ($row2 > $row3) { // Upward progression with repetition: 1 = 2 > 3. $pRow = 2; } else if ($row2 < $row3) { // Downward progression with repetition: 1 = 2 < 3. $pRow = 1; } else { // All same. $pRow = 0; } }//end if unset($drMax, $drMaxAbs); // Finger penalty calculation. $finger1 = $keyData[$c1][4]; $finger2 = $keyData[$c2][4]; $finger3 = $keyData[$c3][4]; if ($finger1 > $finger2) { if ($finger2 > $finger3) { // Monotonic; all different: 1 > 2 > 3. $pFinger = 0; } else if ($finger2 == $finger3) { // Monotonic; some different: 1 > 2 = 3. if ($c2 == $c3) { $pFinger = 1; } else { $pFinger = 6; } } else if ($finger3 == $finger1) { $pFinger = 4; } else if ($finger1 > $finger3 && $finger3 > $finger2) { // Rolling. $pFinger = 2; } else { // Not monotonic; all different. $pFinger = 3; } } else if ($finger1 < $finger2) { if ($finger2 < $finger3) { // Monotonic; all different: 1 < 2 < 3. $pFinger = 0; } else if ($finger2 == $finger3) { if ($c2 == $c3) { // Monotonic; some different: 1 < 2 = 3. $pFinger = 1; } else { $pFinger = 6; } } else if ($finger3 == $finger1) { // Not monotonic; some different: 1 = 3 < 2. $pFinger = 4; } else if ($finger1 < $finger3 && $finger3 < $finger2) { // Rolling. $pFinger = 2; } else { // Not monotonic; all different. $pFinger = 3; } } else if ($finger1 == $finger2) { if ($finger2 < $finger3 || $finger3 < $finger1) { // Monotonic; some different: 1 = 2 < 3, 3 < 1 = 2. if ($c1 == $c2) { $pFinger = 1; } else { $pFinger = 6; } } else if ($finger2 == $finger3) { if ($c1 != $c2 && $c2 != $c3 && $c1 != $c3) { $pFinger = 7; } else { // All same. $pFinger = 5; } } }//end if // Stroke path effort. $triadEffort += 0.4268 * ($pHand + 0.3 * $pRow + 0.3 * $pFinger); $effortCache[$triad] = $triadEffort; $totalEffort += $triadEffort; }//end for $totalEffort = $totalEffort / $numTriads; } while ($totalEffort > $maxEffort || !preg_match('/[0-9]/', $password) || !preg_match('/[A-Z]/', $password) || !preg_match('/[a-z]/', $password) || !preg_match('/[^0-9A-Za-z]/', $password)); if ($returnEffort === true) { return array($password, round($totalEffort, 1)); } else { return $password; } }//end cfpg()
jnrbsn/cfpg
cfpg.php
PHP
mit
11,278
package org.shkim.codility.lesson.countingelement; public class FrogRiverOne { public static int solution(int X, int A[]) { int step = X; int temp[] = new int[step]; for (int i = 0; i < temp.length; i++) { temp[i] = i+1; } for (int i = 0; i < A.length; i++) { if (A[i] > X || temp[A[i]-1] != 0) { temp[A[i]-1] = 0; step --; } if (step == 0) { return i; } } return -1; } }
KimSiHun/codility
src/org/shkim/codility/lesson/countingelement/FrogRiverOne.java
Java
mit
437
// Admin main // // This is the main execution loop of the admin panel. It provides basic // configuration, routing, and default imports. require.config({ paths: { 'jquery': 'lib/jquery-1.10.2.min', 'underscore': 'lib/underscore', 'backbone': 'lib/backbone', 'require-css': 'lib/require-css.min', 'require-text': 'lib/require-text', 'pure-min': '//yui.yahooapis.com/pure/0.5.0/pure-min', 'pure-responsive': '//yui.yahooapis.com/pure/0.5.0/grids-responsive-min' }, shim: { jquery: { exports: '$' }, underscore: { exports: '_' }, backbone: { deps: ['jquery', 'underscore'], exports: 'Backbone' } }, map: { '*': { 'css': 'require-css', 'text': 'require-text' } } }); require( [ 'jquery', 'backbone', 'css!pure-min', 'css!pure-responsive', 'css!styles/base' ], function($, Backbone) { var add_app_header = function(xhr) { xhr.setRequestHeader( 'x-peanuts-application', '6752e4b0-8122-4c9a-ad1d-19d703fdfed0' ); }; // The whole thing is wrapped in the success callback of a GET request for the // CSRF token. This is necessary since all requests to the peanuts API will // fail without it. $.ajax({ url: '/csrf/', beforeSend: add_app_header, success: function(data) { var add_csrf_token = function(xhr) { xhr.setRequestHeader( 'x-peanuts-csrf', data.csrf ); }, Router = Backbone.Router.extend({ routes: { 'first-use': 'firstUse' }, render: function(controllerFile) { var router = this; require([controllerFile], function(controller) { router.view = controller(); router.view.render(); $(document).prop( 'title', $(document).prop('title') + ' - ' + router.view.title ); }); }, firstUse: function() { this.render('views/first-use'); } }), router = new Router(), // The old backbone.sync method is retreived here so that the new one // can call it. old_sync = Backbone.sync; // We redefine the global app header here to add in the csrf token. Backbone.sync = function(method, model, options) { var beforeSend = options.beforeSend; options.beforeSend = function(xhr) { add_app_header(xhr); add_csrf_token(xhr); if (beforeSend) { beforeSend(xhr); } }; // Call the default method with our modified options. old_sync(method, model, options); }; Backbone.history.start(); } }); });
astex/peanuts.admin
static/main.js
JavaScript
mit
2,817
package fr.loganbraga.hogwash.Generator; public interface Generator { public String generate(); }
loganbraga/hogwash
src/main/java/fr/loganbraga/hogwash/Generator/Generator.java
Java
mit
102
import _plotly_utils.basevalidators class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="bar.error_y", **kwargs ): super(ArrayminussrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs )
plotly/plotly.py
packages/python/plotly/plotly/validators/bar/error_y/_arrayminussrc.py
Python
mit
429
module ActiveRecord class HasManyThroughAssociationNotFoundError < ActiveRecordError #:nodoc: def initialize(owner_class_name, reflection) super("Could not find the association #{reflection.options[:through].inspect} in model #{owner_class_name}") end end class HasManyThroughAssociationPolymorphicError < ActiveRecordError #:nodoc: def initialize(owner_class_name, reflection, source_reflection) super("Cannot have a has_many :through association '#{owner_class_name}##{reflection.name}' on the polymorphic object '#{source_reflection.class_name}##{source_reflection.name}'.") end end class HasManyThroughAssociationPointlessSourceTypeError < ActiveRecordError #:nodoc: def initialize(owner_class_name, reflection, source_reflection) super("Cannot have a has_many :through association '#{owner_class_name}##{reflection.name}' with a :source_type option if the '#{reflection.through_reflection.class_name}##{source_reflection.name}' is not polymorphic. Try removing :source_type on your association.") end end class HasManyThroughSourceAssociationNotFoundError < ActiveRecordError #:nodoc: def initialize(reflection) through_reflection = reflection.through_reflection source_reflection_names = reflection.source_reflection_names source_associations = reflection.through_reflection.klass.reflect_on_all_associations.collect { |a| a.name.inspect } super("Could not find the source association(s) #{source_reflection_names.collect(&:inspect).to_sentence(:two_words_connector => ' or ', :last_word_connector => ', or ', :locale => :en)} in model #{through_reflection.klass}. Try 'has_many #{reflection.name.inspect}, :through => #{through_reflection.name.inspect}, :source => <name>'. Is it one of #{source_associations.to_sentence(:two_words_connector => ' or ', :last_word_connector => ', or ', :locale => :en)}?") end end class HasManyThroughSourceAssociationMacroError < ActiveRecordError #:nodoc: def initialize(reflection) through_reflection = reflection.through_reflection source_reflection = reflection.source_reflection super("Invalid source reflection macro :#{source_reflection.macro}#{" :through" if source_reflection.options[:through]} for has_many #{reflection.name.inspect}, :through => #{through_reflection.name.inspect}. Use :source to specify the source reflection.") end end class HasManyThroughCantAssociateThroughHasManyReflection < ActiveRecordError #:nodoc: def initialize(owner, reflection) super("Cannot modify association '#{owner.class.name}##{reflection.name}' because the source reflection class '#{reflection.source_reflection.class_name}' is associated to '#{reflection.through_reflection.class_name}' via :#{reflection.source_reflection.macro}.") end end class HasManyThroughCantAssociateNewRecords < ActiveRecordError #:nodoc: def initialize(owner, reflection) super("Cannot associate new records through '#{owner.class.name}##{reflection.name}' on '#{reflection.source_reflection.class_name rescue nil}##{reflection.source_reflection.name rescue nil}'. Both records must have an id in order to create the has_many :through record associating them.") end end class HasManyThroughCantDissociateNewRecords < ActiveRecordError #:nodoc: def initialize(owner, reflection) super("Cannot dissociate new records through '#{owner.class.name}##{reflection.name}' on '#{reflection.source_reflection.class_name rescue nil}##{reflection.source_reflection.name rescue nil}'. Both records must have an id in order to delete the has_many :through record associating them.") end end class HasAndBelongsToManyAssociationForeignKeyNeeded < ActiveRecordError #:nodoc: def initialize(reflection) super("Cannot create self referential has_and_belongs_to_many association on '#{reflection.class_name rescue nil}##{reflection.name rescue nil}'. :association_foreign_key cannot be the same as the :foreign_key.") end end class EagerLoadPolymorphicError < ActiveRecordError #:nodoc: def initialize(reflection) super("Can not eagerly load the polymorphic association #{reflection.name.inspect}") end end class ReadOnlyAssociation < ActiveRecordError #:nodoc: def initialize(reflection) super("Can not add to a has_many :through association. Try adding to #{reflection.through_reflection.name.inspect}.") end end # See ActiveRecord::Associations::ClassMethods for documentation. module Associations # :nodoc: # These classes will be loaded when associations are created. # So there is no need to eager load them. autoload :AssociationCollection, 'active_record/associations/association_collection' autoload :AssociationProxy, 'active_record/associations/association_proxy' autoload :BelongsToAssociation, 'active_record/associations/belongs_to_association' autoload :BelongsToPolymorphicAssociation, 'active_record/associations/belongs_to_polymorphic_association' autoload :HasAndBelongsToManyAssociation, 'active_record/associations/has_and_belongs_to_many_association' autoload :HasManyAssociation, 'active_record/associations/has_many_association' autoload :HasManyThroughAssociation, 'active_record/associations/has_many_through_association' autoload :HasOneAssociation, 'active_record/associations/has_one_association' autoload :HasOneThroughAssociation, 'active_record/associations/has_one_through_association' def self.included(base) base.extend(ClassMethods) end # Clears out the association cache def clear_association_cache #:nodoc: self.class.reflect_on_all_associations.to_a.each do |assoc| instance_variable_set "@#{assoc.name}", nil end unless self.new_record? end private # Gets the specified association instance if it responds to :loaded?, nil otherwise. def association_instance_get(name) association = instance_variable_get("@#{name}") association if association.respond_to?(:loaded?) end # Set the specified association instance. def association_instance_set(name, association) instance_variable_set("@#{name}", association) end # Associations are a set of macro-like class methods for tying objects together through foreign keys. They express relationships like # "Project has one Project Manager" or "Project belongs to a Portfolio". Each macro adds a number of methods to the class which are # specialized according to the collection or association symbol and the options hash. It works much the same way as Ruby's own <tt>attr*</tt> # methods. Example: # # class Project < ActiveRecord::Base # belongs_to :portfolio # has_one :project_manager # has_many :milestones # has_and_belongs_to_many :categories # end # # The project class now has the following methods (and more) to ease the traversal and manipulation of its relationships: # * <tt>Project#portfolio, Project#portfolio=(portfolio), Project#portfolio.nil?</tt> # * <tt>Project#project_manager, Project#project_manager=(project_manager), Project#project_manager.nil?,</tt> # * <tt>Project#milestones.empty?, Project#milestones.size, Project#milestones, Project#milestones<<(milestone),</tt> # <tt>Project#milestones.delete(milestone), Project#milestones.find(milestone_id), Project#milestones.find(:all, options),</tt> # <tt>Project#milestones.build, Project#milestones.create</tt> # * <tt>Project#categories.empty?, Project#categories.size, Project#categories, Project#categories<<(category1),</tt> # <tt>Project#categories.delete(category1)</tt> # # === A word of warning # # Don't create associations that have the same name as instance methods of ActiveRecord::Base. Since the association # adds a method with that name to its model, it will override the inherited method and break things. # For instance, +attributes+ and +connection+ would be bad choices for association names. # # == Auto-generated methods # # === Singular associations (one-to-one) # | | belongs_to | # generated methods | belongs_to | :polymorphic | has_one # ----------------------------------+------------+--------------+--------- # other | X | X | X # other=(other) | X | X | X # build_other(attributes={}) | X | | X # create_other(attributes={}) | X | | X # other.create!(attributes={}) | | | X # # ===Collection associations (one-to-many / many-to-many) # | | | has_many # generated methods | habtm | has_many | :through # ----------------------------------+-------+----------+---------- # others | X | X | X # others=(other,other,...) | X | X | X # other_ids | X | X | X # other_ids=(id,id,...) | X | X | X # others<< | X | X | X # others.push | X | X | X # others.concat | X | X | X # others.build(attributes={}) | X | X | X # others.create(attributes={}) | X | X | X # others.create!(attributes={}) | X | X | X # others.size | X | X | X # others.length | X | X | X # others.count | X | X | X # others.sum(args*,&block) | X | X | X # others.empty? | X | X | X # others.clear | X | X | X # others.delete(other,other,...) | X | X | X # others.delete_all | X | X | # others.destroy_all | X | X | X # others.find(*args) | X | X | X # others.find_first | X | | # others.exists? | X | X | X # others.uniq | X | X | X # others.reset | X | X | X # # == Cardinality and associations # # Active Record associations can be used to describe one-to-one, one-to-many and many-to-many # relationships between models. Each model uses an association to describe its role in # the relation. The +belongs_to+ association is always used in the model that has # the foreign key. # # === One-to-one # # Use +has_one+ in the base, and +belongs_to+ in the associated model. # # class Employee < ActiveRecord::Base # has_one :office # end # class Office < ActiveRecord::Base # belongs_to :employee # foreign key - employee_id # end # # === One-to-many # # Use +has_many+ in the base, and +belongs_to+ in the associated model. # # class Manager < ActiveRecord::Base # has_many :employees # end # class Employee < ActiveRecord::Base # belongs_to :manager # foreign key - manager_id # end # # === Many-to-many # # There are two ways to build a many-to-many relationship. # # The first way uses a +has_many+ association with the <tt>:through</tt> option and a join model, so # there are two stages of associations. # # class Assignment < ActiveRecord::Base # belongs_to :programmer # foreign key - programmer_id # belongs_to :project # foreign key - project_id # end # class Programmer < ActiveRecord::Base # has_many :assignments # has_many :projects, :through => :assignments # end # class Project < ActiveRecord::Base # has_many :assignments # has_many :programmers, :through => :assignments # end # # For the second way, use +has_and_belongs_to_many+ in both models. This requires a join table # that has no corresponding model or primary key. # # class Programmer < ActiveRecord::Base # has_and_belongs_to_many :projects # foreign keys in the join table # end # class Project < ActiveRecord::Base # has_and_belongs_to_many :programmers # foreign keys in the join table # end # # Choosing which way to build a many-to-many relationship is not always simple. # If you need to work with the relationship model as its own entity, # use <tt>has_many :through</tt>. Use +has_and_belongs_to_many+ when working with legacy schemas or when # you never work directly with the relationship itself. # # == Is it a +belongs_to+ or +has_one+ association? # # Both express a 1-1 relationship. The difference is mostly where to place the foreign key, which goes on the table for the class # declaring the +belongs_to+ relationship. Example: # # class User < ActiveRecord::Base # # I reference an account. # belongs_to :account # end # # class Account < ActiveRecord::Base # # One user references me. # has_one :user # end # # The tables for these classes could look something like: # # CREATE TABLE users ( # id int(11) NOT NULL auto_increment, # account_id int(11) default NULL, # name varchar default NULL, # PRIMARY KEY (id) # ) # # CREATE TABLE accounts ( # id int(11) NOT NULL auto_increment, # name varchar default NULL, # PRIMARY KEY (id) # ) # # == Unsaved objects and associations # # You can manipulate objects and associations before they are saved to the database, but there is some special behavior you should be # aware of, mostly involving the saving of associated objects. # # Unless you enable the :autosave option on a <tt>has_one</tt>, <tt>belongs_to</tt>, # <tt>has_many</tt>, or <tt>has_and_belongs_to_many</tt> association, # in which case the members are always saved. # # === One-to-one associations # # * Assigning an object to a +has_one+ association automatically saves that object and the object being replaced (if there is one), in # order to update their primary keys - except if the parent object is unsaved (<tt>new_record? == true</tt>). # * If either of these saves fail (due to one of the objects being invalid) the assignment statement returns +false+ and the assignment # is cancelled. # * If you wish to assign an object to a +has_one+ association without saving it, use the <tt>association.build</tt> method (documented below). # * Assigning an object to a +belongs_to+ association does not save the object, since the foreign key field belongs on the parent. It # does not save the parent either. # # === Collections # # * Adding an object to a collection (+has_many+ or +has_and_belongs_to_many+) automatically saves that object, except if the parent object # (the owner of the collection) is not yet stored in the database. # * If saving any of the objects being added to a collection (via <tt>push</tt> or similar) fails, then <tt>push</tt> returns +false+. # * You can add an object to a collection without automatically saving it by using the <tt>collection.build</tt> method (documented below). # * All unsaved (<tt>new_record? == true</tt>) members of the collection are automatically saved when the parent is saved. # # === Association callbacks # # Similar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get # triggered when you add an object to or remove an object from an association collection. Example: # # class Project # has_and_belongs_to_many :developers, :after_add => :evaluate_velocity # # def evaluate_velocity(developer) # ... # end # end # # It's possible to stack callbacks by passing them as an array. Example: # # class Project # has_and_belongs_to_many :developers, :after_add => [:evaluate_velocity, Proc.new { |p, d| p.shipping_date = Time.now}] # end # # Possible callbacks are: +before_add+, +after_add+, +before_remove+ and +after_remove+. # # Should any of the +before_add+ callbacks throw an exception, the object does not get added to the collection. Same with # the +before_remove+ callbacks; if an exception is thrown the object doesn't get removed. # # === Association extensions # # The proxy objects that control the access to associations can be extended through anonymous modules. This is especially # beneficial for adding new finders, creators, and other factory-type methods that are only used as part of this association. # Example: # # class Account < ActiveRecord::Base # has_many :people do # def find_or_create_by_name(name) # first_name, last_name = name.split(" ", 2) # find_or_create_by_first_name_and_last_name(first_name, last_name) # end # end # end # # person = Account.find(:first).people.find_or_create_by_name("David Heinemeier Hansson") # person.first_name # => "David" # person.last_name # => "Heinemeier Hansson" # # If you need to share the same extensions between many associations, you can use a named extension module. Example: # # module FindOrCreateByNameExtension # def find_or_create_by_name(name) # first_name, last_name = name.split(" ", 2) # find_or_create_by_first_name_and_last_name(first_name, last_name) # end # end # # class Account < ActiveRecord::Base # has_many :people, :extend => FindOrCreateByNameExtension # end # # class Company < ActiveRecord::Base # has_many :people, :extend => FindOrCreateByNameExtension # end # # If you need to use multiple named extension modules, you can specify an array of modules with the <tt>:extend</tt> option. # In the case of name conflicts between methods in the modules, methods in modules later in the array supercede # those earlier in the array. Example: # # class Account < ActiveRecord::Base # has_many :people, :extend => [FindOrCreateByNameExtension, FindRecentExtension] # end # # Some extensions can only be made to work with knowledge of the association proxy's internals. # Extensions can access relevant state using accessors on the association proxy: # # * +proxy_owner+ - Returns the object the association is part of. # * +proxy_reflection+ - Returns the reflection object that describes the association. # * +proxy_target+ - Returns the associated object for +belongs_to+ and +has_one+, or the collection of associated objects for +has_many+ and +has_and_belongs_to_many+. # # === Association Join Models # # Has Many associations can be configured with the <tt>:through</tt> option to use an explicit join model to retrieve the data. This # operates similarly to a +has_and_belongs_to_many+ association. The advantage is that you're able to add validations, # callbacks, and extra attributes on the join model. Consider the following schema: # # class Author < ActiveRecord::Base # has_many :authorships # has_many :books, :through => :authorships # end # # class Authorship < ActiveRecord::Base # belongs_to :author # belongs_to :book # end # # @author = Author.find :first # @author.authorships.collect { |a| a.book } # selects all books that the author's authorships belong to. # @author.books # selects all books by using the Authorship join model # # You can also go through a +has_many+ association on the join model: # # class Firm < ActiveRecord::Base # has_many :clients # has_many :invoices, :through => :clients # end # # class Client < ActiveRecord::Base # belongs_to :firm # has_many :invoices # end # # class Invoice < ActiveRecord::Base # belongs_to :client # end # # @firm = Firm.find :first # @firm.clients.collect { |c| c.invoices }.flatten # select all invoices for all clients of the firm # @firm.invoices # selects all invoices by going through the Client join model. # # === Polymorphic Associations # # Polymorphic associations on models are not restricted on what types of models they can be associated with. Rather, they # specify an interface that a +has_many+ association must adhere to. # # class Asset < ActiveRecord::Base # belongs_to :attachable, :polymorphic => true # end # # class Post < ActiveRecord::Base # has_many :assets, :as => :attachable # The :as option specifies the polymorphic interface to use. # end # # @asset.attachable = @post # # This works by using a type column in addition to a foreign key to specify the associated record. In the Asset example, you'd need # an +attachable_id+ integer column and an +attachable_type+ string column. # # Using polymorphic associations in combination with single table inheritance (STI) is a little tricky. In order # for the associations to work as expected, ensure that you store the base model for the STI models in the # type column of the polymorphic association. To continue with the asset example above, suppose there are guest posts # and member posts that use the posts table for STI. In this case, there must be a +type+ column in the posts table. # # class Asset < ActiveRecord::Base # belongs_to :attachable, :polymorphic => true # # def attachable_type=(sType) # super(sType.to_s.classify.constantize.base_class.to_s) # end # end # # class Post < ActiveRecord::Base # # because we store "Post" in attachable_type now :dependent => :destroy will work # has_many :assets, :as => :attachable, :dependent => :destroy # end # # class GuestPost < Post # end # # class MemberPost < Post # end # # == Caching # # All of the methods are built on a simple caching principle that will keep the result of the last query around unless specifically # instructed not to. The cache is even shared across methods to make it even cheaper to use the macro-added methods without # worrying too much about performance at the first go. Example: # # project.milestones # fetches milestones from the database # project.milestones.size # uses the milestone cache # project.milestones.empty? # uses the milestone cache # project.milestones(true).size # fetches milestones from the database # project.milestones # uses the milestone cache # # == Eager loading of associations # # Eager loading is a way to find objects of a certain class and a number of named associations. This is # one of the easiest ways of to prevent the dreaded 1+N problem in which fetching 100 posts that each need to display their author # triggers 101 database queries. Through the use of eager loading, the 101 queries can be reduced to 2. Example: # # class Post < ActiveRecord::Base # belongs_to :author # has_many :comments # end # # Consider the following loop using the class above: # # for post in Post.all # puts "Post: " + post.title # puts "Written by: " + post.author.name # puts "Last comment on: " + post.comments.first.created_on # end # # To iterate over these one hundred posts, we'll generate 201 database queries. Let's first just optimize it for retrieving the author: # # for post in Post.find(:all, :include => :author) # # This references the name of the +belongs_to+ association that also used the <tt>:author</tt> symbol. After loading the posts, find # will collect the +author_id+ from each one and load all the referenced authors with one query. Doing so will cut down the number of queries from 201 to 102. # # We can improve upon the situation further by referencing both associations in the finder with: # # for post in Post.find(:all, :include => [ :author, :comments ]) # # This will load all comments with a single query. This reduces the total number of queries to 3. More generally the number of queries # will be 1 plus the number of associations named (except if some of the associations are polymorphic +belongs_to+ - see below). # # To include a deep hierarchy of associations, use a hash: # # for post in Post.find(:all, :include => [ :author, { :comments => { :author => :gravatar } } ]) # # That'll grab not only all the comments but all their authors and gravatar pictures. You can mix and match # symbols, arrays and hashes in any combination to describe the associations you want to load. # # All of this power shouldn't fool you into thinking that you can pull out huge amounts of data with no performance penalty just because you've reduced # the number of queries. The database still needs to send all the data to Active Record and it still needs to be processed. So it's no # catch-all for performance problems, but it's a great way to cut down on the number of queries in a situation as the one described above. # # Since only one table is loaded at a time, conditions or orders cannot reference tables other than the main one. If this is the case # Active Record falls back to the previously used LEFT OUTER JOIN based strategy. For example # # Post.find(:all, :include => [ :author, :comments ], :conditions => ['comments.approved = ?', true]) # # will result in a single SQL query with joins along the lines of: <tt>LEFT OUTER JOIN comments ON comments.post_id = posts.id</tt> and # <tt>LEFT OUTER JOIN authors ON authors.id = posts.author_id</tt>. Note that using conditions like this can have unintended consequences. # In the above example posts with no approved comments are not returned at all, because the conditions apply to the SQL statement as a whole # and not just to the association. You must disambiguate column references for this fallback to happen, for example # <tt>:order => "author.name DESC"</tt> will work but <tt>:order => "name DESC"</tt> will not. # # If you do want eagerload only some members of an association it is usually more natural to <tt>:include</tt> an association # which has conditions defined on it: # # class Post < ActiveRecord::Base # has_many :approved_comments, :class_name => 'Comment', :conditions => ['approved = ?', true] # end # # Post.find(:all, :include => :approved_comments) # # will load posts and eager load the +approved_comments+ association, which contains only those comments that have been approved. # # If you eager load an association with a specified <tt>:limit</tt> option, it will be ignored, returning all the associated objects: # # class Picture < ActiveRecord::Base # has_many :most_recent_comments, :class_name => 'Comment', :order => 'id DESC', :limit => 10 # end # # Picture.find(:first, :include => :most_recent_comments).most_recent_comments # => returns all associated comments. # # When eager loaded, conditions are interpolated in the context of the model class, not the model instance. Conditions are lazily interpolated # before the actual model exists. # # Eager loading is supported with polymorphic associations. # # class Address < ActiveRecord::Base # belongs_to :addressable, :polymorphic => true # end # # A call that tries to eager load the addressable model # # Address.find(:all, :include => :addressable) # # will execute one query to load the addresses and load the addressables with one query per addressable type. # For example if all the addressables are either of class Person or Company then a total of 3 queries will be executed. The list of # addressable types to load is determined on the back of the addresses loaded. This is not supported if Active Record has to fallback # to the previous implementation of eager loading and will raise ActiveRecord::EagerLoadPolymorphicError. The reason is that the parent # model's type is a column value so its corresponding table name cannot be put in the +FROM+/+JOIN+ clauses of that query. # # == Table Aliasing # # Active Record uses table aliasing in the case that a table is referenced multiple times in a join. If a table is referenced only once, # the standard table name is used. The second time, the table is aliased as <tt>#{reflection_name}_#{parent_table_name}</tt>. Indexes are appended # for any more successive uses of the table name. # # Post.find :all, :joins => :comments # # => SELECT ... FROM posts INNER JOIN comments ON ... # Post.find :all, :joins => :special_comments # STI # # => SELECT ... FROM posts INNER JOIN comments ON ... AND comments.type = 'SpecialComment' # Post.find :all, :joins => [:comments, :special_comments] # special_comments is the reflection name, posts is the parent table name # # => SELECT ... FROM posts INNER JOIN comments ON ... INNER JOIN comments special_comments_posts # # Acts as tree example: # # TreeMixin.find :all, :joins => :children # # => SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... # TreeMixin.find :all, :joins => {:children => :parent} # # => SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... # INNER JOIN parents_mixins ... # TreeMixin.find :all, :joins => {:children => {:parent => :children}} # # => SELECT ... FROM mixins INNER JOIN mixins childrens_mixins ... # INNER JOIN parents_mixins ... # INNER JOIN mixins childrens_mixins_2 # # Has and Belongs to Many join tables use the same idea, but add a <tt>_join</tt> suffix: # # Post.find :all, :joins => :categories # # => SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... # Post.find :all, :joins => {:categories => :posts} # # => SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... # INNER JOIN categories_posts posts_categories_join INNER JOIN posts posts_categories # Post.find :all, :joins => {:categories => {:posts => :categories}} # # => SELECT ... FROM posts INNER JOIN categories_posts ... INNER JOIN categories ... # INNER JOIN categories_posts posts_categories_join INNER JOIN posts posts_categories # INNER JOIN categories_posts categories_posts_join INNER JOIN categories categories_posts_2 # # If you wish to specify your own custom joins using a <tt>:joins</tt> option, those table names will take precedence over the eager associations: # # Post.find :all, :joins => :comments, :joins => "inner join comments ..." # # => SELECT ... FROM posts INNER JOIN comments_posts ON ... INNER JOIN comments ... # Post.find :all, :joins => [:comments, :special_comments], :joins => "inner join comments ..." # # => SELECT ... FROM posts INNER JOIN comments comments_posts ON ... # INNER JOIN comments special_comments_posts ... # INNER JOIN comments ... # # Table aliases are automatically truncated according to the maximum length of table identifiers according to the specific database. # # == Modules # # By default, associations will look for objects within the current module scope. Consider: # # module MyApplication # module Business # class Firm < ActiveRecord::Base # has_many :clients # end # # class Client < ActiveRecord::Base; end # end # end # # When <tt>Firm#clients</tt> is called, it will in turn call <tt>MyApplication::Business::Client.find_all_by_firm_id(firm.id)</tt>. # If you want to associate with a class in another module scope, this can be done by specifying the complete class name. # Example: # # module MyApplication # module Business # class Firm < ActiveRecord::Base; end # end # # module Billing # class Account < ActiveRecord::Base # belongs_to :firm, :class_name => "MyApplication::Business::Firm" # end # end # end # # == Type safety with <tt>ActiveRecord::AssociationTypeMismatch</tt> # # If you attempt to assign an object to an association that doesn't match the inferred or specified <tt>:class_name</tt>, you'll # get an <tt>ActiveRecord::AssociationTypeMismatch</tt>. # # == Options # # All of the association macros can be specialized through options. This makes cases more complex than the simple and guessable ones # possible. module ClassMethods # Specifies a one-to-many association. The following methods for retrieval and query of # collections of associated objects will be added: # # [collection(force_reload = false)] # Returns an array of all the associated objects. # An empty array is returned if none are found. # [collection<<(object, ...)] # Adds one or more objects to the collection by setting their foreign keys to the collection's primary key. # [collection.delete(object, ...)] # Removes one or more objects from the collection by setting their foreign keys to +NULL+. # Objects will be in addition destroyed if they're associated with <tt>:dependent => :destroy</tt>, # and deleted if they're associated with <tt>:dependent => :delete_all</tt>. # [collection=objects] # Replaces the collections content by deleting and adding objects as appropriate. # [collection_singular_ids] # Returns an array of the associated objects' ids # [collection_singular_ids=ids] # Replace the collection with the objects identified by the primary keys in +ids+ # [collection.clear] # Removes every object from the collection. This destroys the associated objects if they # are associated with <tt>:dependent => :destroy</tt>, deletes them directly from the # database if <tt>:dependent => :delete_all</tt>, otherwise sets their foreign keys to +NULL+. # [collection.empty?] # Returns +true+ if there are no associated objects. # [collection.size] # Returns the number of associated objects. # [collection.find(...)] # Finds an associated object according to the same rules as ActiveRecord::Base.find. # [collection.exists?(...)] # Checks whether an associated object with the given conditions exists. # Uses the same rules as ActiveRecord::Base.exists?. # [collection.build(attributes = {}, ...)] # Returns one or more new objects of the collection type that have been instantiated # with +attributes+ and linked to this object through a foreign key, but have not yet # been saved. <b>Note:</b> This only works if an associated object already exists, not if # it's +nil+! # [collection.create(attributes = {})] # Returns a new object of the collection type that has been instantiated # with +attributes+, linked to this object through a foreign key, and that has already # been saved (if it passed the validation). <b>Note:</b> This only works if an associated # object already exists, not if it's +nil+! # # (*Note*: +collection+ is replaced with the symbol passed as the first argument, so # <tt>has_many :clients</tt> would add among others <tt>clients.empty?</tt>.) # # === Example # # Example: A Firm class declares <tt>has_many :clients</tt>, which will add: # * <tt>Firm#clients</tt> (similar to <tt>Clients.find :all, :conditions => ["firm_id = ?", id]</tt>) # * <tt>Firm#clients<<</tt> # * <tt>Firm#clients.delete</tt> # * <tt>Firm#clients=</tt> # * <tt>Firm#client_ids</tt> # * <tt>Firm#client_ids=</tt> # * <tt>Firm#clients.clear</tt> # * <tt>Firm#clients.empty?</tt> (similar to <tt>firm.clients.size == 0</tt>) # * <tt>Firm#clients.size</tt> (similar to <tt>Client.count "firm_id = #{id}"</tt>) # * <tt>Firm#clients.find</tt> (similar to <tt>Client.find(id, :conditions => "firm_id = #{id}")</tt>) # * <tt>Firm#clients.exists?(:name => 'ACME')</tt> (similar to <tt>Client.exists?(:name => 'ACME', :firm_id => firm.id)</tt>) # * <tt>Firm#clients.build</tt> (similar to <tt>Client.new("firm_id" => id)</tt>) # * <tt>Firm#clients.create</tt> (similar to <tt>c = Client.new("firm_id" => id); c.save; c</tt>) # The declaration can also include an options hash to specialize the behavior of the association. # # === Supported options # [:class_name] # Specify the class name of the association. Use it only if that name can't be inferred # from the association name. So <tt>has_many :products</tt> will by default be linked to the Product class, but # if the real class name is SpecialProduct, you'll have to specify it with this option. # [:conditions] # Specify the conditions that the associated objects must meet in order to be included as a +WHERE+ # SQL fragment, such as <tt>price > 5 AND name LIKE 'B%'</tt>. Record creations from the association are scoped if a hash # is used. <tt>has_many :posts, :conditions => {:published => true}</tt> will create published posts with <tt>@blog.posts.create</tt> # or <tt>@blog.posts.build</tt>. # [:order] # Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment, # such as <tt>last_name, first_name DESC</tt>. # [:foreign_key] # Specify the foreign key used for the association. By default this is guessed to be the name # of this class in lower-case and "_id" suffixed. So a Person class that makes a +has_many+ association will use "person_id" # as the default <tt>:foreign_key</tt>. # [:primary_key] # Specify the method that returns the primary key used for the association. By default this is +id+. # [:dependent] # If set to <tt>:destroy</tt> all the associated objects are destroyed # alongside this object by calling their +destroy+ method. If set to <tt>:delete_all</tt> all associated # objects are deleted *without* calling their +destroy+ method. If set to <tt>:nullify</tt> all associated # objects' foreign keys are set to +NULL+ *without* calling their +save+ callbacks. *Warning:* This option is ignored when also using # the <tt>:through</tt> option. # [:finder_sql] # Specify a complete SQL statement to fetch the association. This is a good way to go for complex # associations that depend on multiple tables. Note: When this option is used, +find_in_collection+ is _not_ added. # [:counter_sql] # Specify a complete SQL statement to fetch the size of the association. If <tt>:finder_sql</tt> is # specified but not <tt>:counter_sql</tt>, <tt>:counter_sql</tt> will be generated by replacing <tt>SELECT ... FROM</tt> with <tt>SELECT COUNT(*) FROM</tt>. # [:extend] # Specify a named module for extending the proxy. See "Association extensions". # [:include] # Specify second-order associations that should be eager loaded when the collection is loaded. # [:group] # An attribute name by which the result should be grouped. Uses the <tt>GROUP BY</tt> SQL-clause. # [:having] # Combined with +:group+ this can be used to filter the records that a <tt>GROUP BY</tt> returns. Uses the <tt>HAVING</tt> SQL-clause. # [:limit] # An integer determining the limit on the number of rows that should be returned. # [:offset] # An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows. # [:select] # By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if you, for example, want to do a join # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error. # [:as] # Specifies a polymorphic interface (See <tt>belongs_to</tt>). # [:through] # Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt> # are ignored, as the association uses the source reflection. You can only use a <tt>:through</tt> query through a <tt>belongs_to</tt> # or <tt>has_many</tt> association on the join model. # [:source] # Specifies the source association name used by <tt>has_many :through</tt> queries. Only use it if the name cannot be # inferred from the association. <tt>has_many :subscribers, :through => :subscriptions</tt> will look for either <tt>:subscribers</tt> or # <tt>:subscriber</tt> on Subscription, unless a <tt>:source</tt> is given. # [:source_type] # Specifies type of the source association used by <tt>has_many :through</tt> queries where the source # association is a polymorphic +belongs_to+. # [:uniq] # If true, duplicates will be omitted from the collection. Useful in conjunction with <tt>:through</tt>. # [:readonly] # If true, all the associated objects are readonly through the association. # [:validate] # If false, don't validate the associated objects when saving the parent object. true by default. # [:autosave] # If true, always save any loaded members and destroy members marked for destruction, when saving the parent object. Off by default. # # Option examples: # has_many :comments, :order => "posted_on" # has_many :comments, :include => :author # has_many :people, :class_name => "Person", :conditions => "deleted = 0", :order => "name" # has_many :tracks, :order => "position", :dependent => :destroy # has_many :comments, :dependent => :nullify # has_many :tags, :as => :taggable # has_many :reports, :readonly => true # has_many :subscribers, :through => :subscriptions, :source => :user # has_many :subscribers, :class_name => "Person", :finder_sql => # 'SELECT DISTINCT people.* ' + # 'FROM people p, post_subscriptions ps ' + # 'WHERE ps.post_id = #{id} AND ps.person_id = p.id ' + # 'ORDER BY p.first_name' def has_many(association_id, options = {}, &extension) reflection = create_has_many_reflection(association_id, options, &extension) configure_dependency_for_has_many(reflection) add_association_callbacks(reflection.name, reflection.options) if options[:through] collection_accessor_methods(reflection, HasManyThroughAssociation) else collection_accessor_methods(reflection, HasManyAssociation) end end # Specifies a one-to-one association with another class. This method should only be used # if the other class contains the foreign key. If the current class contains the foreign key, # then you should use +belongs_to+ instead. See also ActiveRecord::Associations::ClassMethods's overview # on when to use has_one and when to use belongs_to. # # The following methods for retrieval and query of a single associated object will be added: # # [association(force_reload = false)] # Returns the associated object. +nil+ is returned if none is found. # [association=(associate)] # Assigns the associate object, extracts the primary key, sets it as the foreign key, # and saves the associate object. # [build_association(attributes = {})] # Returns a new object of the associated type that has been instantiated # with +attributes+ and linked to this object through a foreign key, but has not # yet been saved. <b>Note:</b> This ONLY works if an association already exists. # It will NOT work if the association is +nil+. # [create_association(attributes = {})] # Returns a new object of the associated type that has been instantiated # with +attributes+, linked to this object through a foreign key, and that # has already been saved (if it passed the validation). # # (+association+ is replaced with the symbol passed as the first argument, so # <tt>has_one :manager</tt> would add among others <tt>manager.nil?</tt>.) # # === Example # # An Account class declares <tt>has_one :beneficiary</tt>, which will add: # * <tt>Account#beneficiary</tt> (similar to <tt>Beneficiary.find(:first, :conditions => "account_id = #{id}")</tt>) # * <tt>Account#beneficiary=(beneficiary)</tt> (similar to <tt>beneficiary.account_id = account.id; beneficiary.save</tt>) # * <tt>Account#build_beneficiary</tt> (similar to <tt>Beneficiary.new("account_id" => id)</tt>) # * <tt>Account#create_beneficiary</tt> (similar to <tt>b = Beneficiary.new("account_id" => id); b.save; b</tt>) # # === Options # # The declaration can also include an options hash to specialize the behavior of the association. # # Options are: # [:class_name] # Specify the class name of the association. Use it only if that name can't be inferred # from the association name. So <tt>has_one :manager</tt> will by default be linked to the Manager class, but # if the real class name is Person, you'll have to specify it with this option. # [:conditions] # Specify the conditions that the associated object must meet in order to be included as a +WHERE+ # SQL fragment, such as <tt>rank = 5</tt>. # [:order] # Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment, # such as <tt>last_name, first_name DESC</tt>. # [:dependent] # If set to <tt>:destroy</tt>, the associated object is destroyed when this object is. If set to # <tt>:delete</tt>, the associated object is deleted *without* calling its destroy method. If set to <tt>:nullify</tt>, the associated # object's foreign key is set to +NULL+. Also, association is assigned. # [:foreign_key] # Specify the foreign key used for the association. By default this is guessed to be the name # of this class in lower-case and "_id" suffixed. So a Person class that makes a +has_one+ association will use "person_id" # as the default <tt>:foreign_key</tt>. # [:primary_key] # Specify the method that returns the primary key used for the association. By default this is +id+. # [:include] # Specify second-order associations that should be eager loaded when this object is loaded. # [:as] # Specifies a polymorphic interface (See <tt>belongs_to</tt>). # [:select] # By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error. # [:through] # Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt> # are ignored, as the association uses the source reflection. You can only use a <tt>:through</tt> query through a # <tt>has_one</tt> or <tt>belongs_to</tt> association on the join model. # [:source] # Specifies the source association name used by <tt>has_one :through</tt> queries. Only use it if the name cannot be # inferred from the association. <tt>has_one :favorite, :through => :favorites</tt> will look for a # <tt>:favorite</tt> on Favorite, unless a <tt>:source</tt> is given. # [:source_type] # Specifies type of the source association used by <tt>has_one :through</tt> queries where the source # association is a polymorphic +belongs_to+. # [:readonly] # If true, the associated object is readonly through the association. # [:validate] # If false, don't validate the associated object when saving the parent object. +false+ by default. # [:autosave] # If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. Off by default. # # Option examples: # has_one :credit_card, :dependent => :destroy # destroys the associated credit card # has_one :credit_card, :dependent => :nullify # updates the associated records foreign key value to NULL rather than destroying it # has_one :last_comment, :class_name => "Comment", :order => "posted_on" # has_one :project_manager, :class_name => "Person", :conditions => "role = 'project_manager'" # has_one :attachment, :as => :attachable # has_one :boss, :readonly => :true # has_one :club, :through => :membership # has_one :primary_address, :through => :addressables, :conditions => ["addressable.primary = ?", true], :source => :addressable def has_one(association_id, options = {}) if options[:through] reflection = create_has_one_through_reflection(association_id, options) association_accessor_methods(reflection, ActiveRecord::Associations::HasOneThroughAssociation) else reflection = create_has_one_reflection(association_id, options) association_accessor_methods(reflection, HasOneAssociation) association_constructor_method(:build, reflection, HasOneAssociation) association_constructor_method(:create, reflection, HasOneAssociation) configure_dependency_for_has_one(reflection) end end # Specifies a one-to-one association with another class. This method should only be used # if this class contains the foreign key. If the other class contains the foreign key, # then you should use +has_one+ instead. See also ActiveRecord::Associations::ClassMethods's overview # on when to use +has_one+ and when to use +belongs_to+. # # Methods will be added for retrieval and query for a single associated object, for which # this object holds an id: # # [association(force_reload = false)] # Returns the associated object. +nil+ is returned if none is found. # [association=(associate)] # Assigns the associate object, extracts the primary key, and sets it as the foreign key. # [build_association(attributes = {})] # Returns a new object of the associated type that has been instantiated # with +attributes+ and linked to this object through a foreign key, but has not yet been saved. # [create_association(attributes = {})] # Returns a new object of the associated type that has been instantiated # with +attributes+, linked to this object through a foreign key, and that # has already been saved (if it passed the validation). # # (+association+ is replaced with the symbol passed as the first argument, so # <tt>belongs_to :author</tt> would add among others <tt>author.nil?</tt>.) # # === Example # # A Post class declares <tt>belongs_to :author</tt>, which will add: # * <tt>Post#author</tt> (similar to <tt>Author.find(author_id)</tt>) # * <tt>Post#author=(author)</tt> (similar to <tt>post.author_id = author.id</tt>) # * <tt>Post#author?</tt> (similar to <tt>post.author == some_author</tt>) # * <tt>Post#build_author</tt> (similar to <tt>post.author = Author.new</tt>) # * <tt>Post#create_author</tt> (similar to <tt>post.author = Author.new; post.author.save; post.author</tt>) # The declaration can also include an options hash to specialize the behavior of the association. # # === Options # # [:class_name] # Specify the class name of the association. Use it only if that name can't be inferred # from the association name. So <tt>has_one :author</tt> will by default be linked to the Author class, but # if the real class name is Person, you'll have to specify it with this option. # [:conditions] # Specify the conditions that the associated object must meet in order to be included as a +WHERE+ # SQL fragment, such as <tt>authorized = 1</tt>. # [:select] # By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error. # [:foreign_key] # Specify the foreign key used for the association. By default this is guessed to be the name # of the association with an "_id" suffix. So a class that defines a <tt>belongs_to :person</tt> association will use # "person_id" as the default <tt>:foreign_key</tt>. Similarly, <tt>belongs_to :favorite_person, :class_name => "Person"</tt> # will use a foreign key of "favorite_person_id". # [:dependent] # If set to <tt>:destroy</tt>, the associated object is destroyed when this object is. If set to # <tt>:delete</tt>, the associated object is deleted *without* calling its destroy method. This option should not be specified when # <tt>belongs_to</tt> is used in conjunction with a <tt>has_many</tt> relationship on another class because of the potential to leave # orphaned records behind. # [:counter_cache] # Caches the number of belonging objects on the associate class through the use of +increment_counter+ # and +decrement_counter+. The counter cache is incremented when an object of this class is created and decremented when it's # destroyed. This requires that a column named <tt>#{table_name}_count</tt> (such as +comments_count+ for a belonging Comment class) # is used on the associate class (such as a Post class). You can also specify a custom counter cache column by providing # a column name instead of a +true+/+false+ value to this option (e.g., <tt>:counter_cache => :my_custom_counter</tt>.) # Note: Specifying a counter cache will add it to that model's list of readonly attributes using +attr_readonly+. # [:include] # Specify second-order associations that should be eager loaded when this object is loaded. # [:polymorphic] # Specify this association is a polymorphic association by passing +true+. # Note: If you've enabled the counter cache, then you may want to add the counter cache attribute # to the +attr_readonly+ list in the associated classes (e.g. <tt>class Post; attr_readonly :comments_count; end</tt>). # [:readonly] # If true, the associated object is readonly through the association. # [:validate] # If false, don't validate the associated objects when saving the parent object. +false+ by default. # [:autosave] # If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. Off by default. # [:touch] # If true, the associated object will be touched (the updated_at/on attributes set to now) when this record is either saved or # destroyed. If you specify a symbol, that attribute will be updated with the current time instead of the updated_at/on attribute. # # Option examples: # belongs_to :firm, :foreign_key => "client_of" # belongs_to :author, :class_name => "Person", :foreign_key => "author_id" # belongs_to :valid_coupon, :class_name => "Coupon", :foreign_key => "coupon_id", # :conditions => 'discounts > #{payments_count}' # belongs_to :attachable, :polymorphic => true # belongs_to :project, :readonly => true # belongs_to :post, :counter_cache => true # belongs_to :company, :touch => true # belongs_to :company, :touch => :employees_last_updated_at def belongs_to(association_id, options = {}) reflection = create_belongs_to_reflection(association_id, options) if reflection.options[:polymorphic] association_accessor_methods(reflection, BelongsToPolymorphicAssociation) else association_accessor_methods(reflection, BelongsToAssociation) association_constructor_method(:build, reflection, BelongsToAssociation) association_constructor_method(:create, reflection, BelongsToAssociation) end add_counter_cache_callbacks(reflection) if options[:counter_cache] add_touch_callbacks(reflection, options[:touch]) if options[:touch] configure_dependency_for_belongs_to(reflection) end # Specifies a many-to-many relationship with another class. This associates two classes via an # intermediate join table. Unless the join table is explicitly specified as an option, it is # guessed using the lexical order of the class names. So a join between Developer and Project # will give the default join table name of "developers_projects" because "D" outranks "P". Note that this precedence # is calculated using the <tt><</tt> operator for String. This means that if the strings are of different lengths, # and the strings are equal when compared up to the shortest length, then the longer string is considered of higher # lexical precedence than the shorter one. For example, one would expect the tables "paper_boxes" and "papers" # to generate a join table name of "papers_paper_boxes" because of the length of the name "paper_boxes", # but it in fact generates a join table name of "paper_boxes_papers". Be aware of this caveat, and use the # custom <tt>:join_table</tt> option if you need to. # # The join table should not have a primary key or a model associated with it. You must manually generate the # join table with a migration such as this: # # class CreateDevelopersProjectsJoinTable < ActiveRecord::Migration # def self.up # create_table :developers_projects, :id => false do |t| # t.integer :developer_id # t.integer :project_id # end # end # # def self.down # drop_table :developers_projects # end # end # # Deprecated: Any additional fields added to the join table will be placed as attributes when pulling records out through # +has_and_belongs_to_many+ associations. Records returned from join tables with additional attributes will be marked as # readonly (because we can't save changes to the additional attributes). It's strongly recommended that you upgrade any # associations with attributes to a real join model (see introduction). # # Adds the following methods for retrieval and query: # # [collection(force_reload = false)] # Returns an array of all the associated objects. # An empty array is returned if none are found. # [collection<<(object, ...)] # Adds one or more objects to the collection by creating associations in the join table # (<tt>collection.push</tt> and <tt>collection.concat</tt> are aliases to this method). # [collection.delete(object, ...)] # Removes one or more objects from the collection by removing their associations from the join table. # This does not destroy the objects. # [collection=objects] # Replaces the collection's content by deleting and adding objects as appropriate. # [collection_singular_ids] # Returns an array of the associated objects' ids. # [collection_singular_ids=ids] # Replace the collection by the objects identified by the primary keys in +ids+. # [collection.clear] # Removes every object from the collection. This does not destroy the objects. # [collection.empty?] # Returns +true+ if there are no associated objects. # [collection.size] # Returns the number of associated objects. # [collection.find(id)] # Finds an associated object responding to the +id+ and that # meets the condition that it has to be associated with this object. # Uses the same rules as ActiveRecord::Base.find. # [collection.exists?(...)] # Checks whether an associated object with the given conditions exists. # Uses the same rules as ActiveRecord::Base.exists?. # [collection.build(attributes = {})] # Returns a new object of the collection type that has been instantiated # with +attributes+ and linked to this object through the join table, but has not yet been saved. # [collection.create(attributes = {})] # Returns a new object of the collection type that has been instantiated # with +attributes+, linked to this object through the join table, and that has already been saved (if it passed the validation). # # (+collection+ is replaced with the symbol passed as the first argument, so # <tt>has_and_belongs_to_many :categories</tt> would add among others <tt>categories.empty?</tt>.) # # === Example # # A Developer class declares <tt>has_and_belongs_to_many :projects</tt>, which will add: # * <tt>Developer#projects</tt> # * <tt>Developer#projects<<</tt> # * <tt>Developer#projects.delete</tt> # * <tt>Developer#projects=</tt> # * <tt>Developer#project_ids</tt> # * <tt>Developer#project_ids=</tt> # * <tt>Developer#projects.clear</tt> # * <tt>Developer#projects.empty?</tt> # * <tt>Developer#projects.size</tt> # * <tt>Developer#projects.find(id)</tt> # * <tt>Developer#clients.exists?(...)</tt> # * <tt>Developer#projects.build</tt> (similar to <tt>Project.new("project_id" => id)</tt>) # * <tt>Developer#projects.create</tt> (similar to <tt>c = Project.new("project_id" => id); c.save; c</tt>) # The declaration may include an options hash to specialize the behavior of the association. # # === Options # # [:class_name] # Specify the class name of the association. Use it only if that name can't be inferred # from the association name. So <tt>has_and_belongs_to_many :projects</tt> will by default be linked to the # Project class, but if the real class name is SuperProject, you'll have to specify it with this option. # [:join_table] # Specify the name of the join table if the default based on lexical order isn't what you want. # <b>WARNING:</b> If you're overwriting the table name of either class, the +table_name+ method # MUST be declared underneath any +has_and_belongs_to_many+ declaration in order to work. # [:foreign_key] # Specify the foreign key used for the association. By default this is guessed to be the name # of this class in lower-case and "_id" suffixed. So a Person class that makes a +has_and_belongs_to_many+ association # to Project will use "person_id" as the default <tt>:foreign_key</tt>. # [:association_foreign_key] # Specify the foreign key used for the association on the receiving side of the association. # By default this is guessed to be the name of the associated class in lower-case and "_id" suffixed. # So if a Person class makes a +has_and_belongs_to_many+ association to Project, # the association will use "project_id" as the default <tt>:association_foreign_key</tt>. # [:conditions] # Specify the conditions that the associated object must meet in order to be included as a +WHERE+ # SQL fragment, such as <tt>authorized = 1</tt>. Record creations from the association are scoped if a hash is used. # <tt>has_many :posts, :conditions => {:published => true}</tt> will create published posts with <tt>@blog.posts.create</tt> # or <tt>@blog.posts.build</tt>. # [:order] # Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment, # such as <tt>last_name, first_name DESC</tt> # [:uniq] # If true, duplicate associated objects will be ignored by accessors and query methods. # [:finder_sql] # Overwrite the default generated SQL statement used to fetch the association with a manual statement # [:counter_sql] # Specify a complete SQL statement to fetch the size of the association. If <tt>:finder_sql</tt> is # specified but not <tt>:counter_sql</tt>, <tt>:counter_sql</tt> will be generated by replacing <tt>SELECT ... FROM</tt> with <tt>SELECT COUNT(*) FROM</tt>. # [:delete_sql] # Overwrite the default generated SQL statement used to remove links between the associated # classes with a manual statement. # [:insert_sql] # Overwrite the default generated SQL statement used to add links between the associated classes # with a manual statement. # [:extend] # Anonymous module for extending the proxy, see "Association extensions". # [:include] # Specify second-order associations that should be eager loaded when the collection is loaded. # [:group] # An attribute name by which the result should be grouped. Uses the <tt>GROUP BY</tt> SQL-clause. # [:having] # Combined with +:group+ this can be used to filter the records that a <tt>GROUP BY</tt> returns. Uses the <tt>HAVING</tt> SQL-clause. # [:limit] # An integer determining the limit on the number of rows that should be returned. # [:offset] # An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows. # [:select] # By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error. # [:readonly] # If true, all the associated objects are readonly through the association. # [:validate] # If false, don't validate the associated objects when saving the parent object. +true+ by default. # [:autosave] # If true, always save any loaded members and destroy members marked for destruction, when saving the parent object. Off by default. # # Option examples: # has_and_belongs_to_many :projects # has_and_belongs_to_many :projects, :include => [ :milestones, :manager ] # has_and_belongs_to_many :nations, :class_name => "Country" # has_and_belongs_to_many :categories, :join_table => "prods_cats" # has_and_belongs_to_many :categories, :readonly => true # has_and_belongs_to_many :active_projects, :join_table => 'developers_projects', :delete_sql => # 'DELETE FROM developers_projects WHERE active=1 AND developer_id = #{id} AND project_id = #{record.id}' def has_and_belongs_to_many(association_id, options = {}, &extension) reflection = create_has_and_belongs_to_many_reflection(association_id, options, &extension) collection_accessor_methods(reflection, HasAndBelongsToManyAssociation) # Don't use a before_destroy callback since users' before_destroy # callbacks will be executed after the association is wiped out. old_method = "destroy_without_habtm_shim_for_#{reflection.name}" class_eval <<-end_eval unless method_defined?(old_method) alias_method :#{old_method}, :destroy_without_callbacks # alias_method :destroy_without_habtm_shim_for_posts, :destroy_without_callbacks def destroy_without_callbacks # def destroy_without_callbacks #{reflection.name}.clear # posts.clear #{old_method} # destroy_without_habtm_shim_for_posts end # end end_eval add_association_callbacks(reflection.name, options) end private # Generates a join table name from two provided table names. # The names in the join table namesme end up in lexicographic order. # # join_table_name("members", "clubs") # => "clubs_members" # join_table_name("members", "special_clubs") # => "members_special_clubs" def join_table_name(first_table_name, second_table_name) if first_table_name < second_table_name join_table = "#{first_table_name}_#{second_table_name}" else join_table = "#{second_table_name}_#{first_table_name}" end table_name_prefix + join_table + table_name_suffix end def association_accessor_methods(reflection, association_proxy_class) define_method(reflection.name) do |*params| force_reload = params.first unless params.empty? association = association_instance_get(reflection.name) if association.nil? || force_reload association = association_proxy_class.new(self, reflection) retval = association.reload if retval.nil? and association_proxy_class == BelongsToAssociation association_instance_set(reflection.name, nil) return nil end association_instance_set(reflection.name, association) end association.target.nil? ? nil : association end define_method("loaded_#{reflection.name}?") do association = association_instance_get(reflection.name) association && association.loaded? end define_method("#{reflection.name}=") do |new_value| association = association_instance_get(reflection.name) if association.nil? || association.target != new_value association = association_proxy_class.new(self, reflection) end if association_proxy_class == HasOneThroughAssociation association.create_through_record(new_value) self.send(reflection.name, new_value) else association.replace(new_value) association_instance_set(reflection.name, new_value.nil? ? nil : association) end end define_method("set_#{reflection.name}_target") do |target| return if target.nil? and association_proxy_class == BelongsToAssociation association = association_proxy_class.new(self, reflection) association.target = target association_instance_set(reflection.name, association) end end def collection_reader_method(reflection, association_proxy_class) define_method(reflection.name) do |*params| force_reload = params.first unless params.empty? association = association_instance_get(reflection.name) unless association association = association_proxy_class.new(self, reflection) association_instance_set(reflection.name, association) end association.reload if force_reload association end define_method("#{reflection.name.to_s.singularize}_ids") do if send(reflection.name).loaded? || reflection.options[:finder_sql] send(reflection.name).map(&:id) else send(reflection.name).all(:select => "#{reflection.quoted_table_name}.#{reflection.klass.primary_key}").map(&:id) end end end def collection_accessor_methods(reflection, association_proxy_class, writer = true) collection_reader_method(reflection, association_proxy_class) if writer define_method("#{reflection.name}=") do |new_value| # Loads proxy class instance (defined in collection_reader_method) if not already loaded association = send(reflection.name) association.replace(new_value) association end define_method("#{reflection.name.to_s.singularize}_ids=") do |new_value| ids = (new_value || []).reject { |nid| nid.blank? } send("#{reflection.name}=", reflection.class_name.constantize.find(ids)) end end end def association_constructor_method(constructor, reflection, association_proxy_class) define_method("#{constructor}_#{reflection.name}") do |*params| attributees = params.first unless params.empty? replace_existing = params[1].nil? ? true : params[1] association = association_instance_get(reflection.name) unless association association = association_proxy_class.new(self, reflection) association_instance_set(reflection.name, association) end if association_proxy_class == HasOneAssociation association.send(constructor, attributees, replace_existing) else association.send(constructor, attributees) end end end def add_counter_cache_callbacks(reflection) cache_column = reflection.counter_cache_column method_name = "belongs_to_counter_cache_after_create_for_#{reflection.name}".to_sym define_method(method_name) do association = send(reflection.name) association.class.increment_counter(cache_column, send(reflection.primary_key_name)) unless association.nil? end after_create(method_name) method_name = "belongs_to_counter_cache_before_destroy_for_#{reflection.name}".to_sym define_method(method_name) do association = send(reflection.name) association.class.decrement_counter(cache_column, send(reflection.primary_key_name)) unless association.nil? end before_destroy(method_name) module_eval( "#{reflection.class_name}.send(:attr_readonly,\"#{cache_column}\".intern) if defined?(#{reflection.class_name}) && #{reflection.class_name}.respond_to?(:attr_readonly)" ) end def add_touch_callbacks(reflection, touch_attribute) method_name = "belongs_to_touch_after_save_or_destroy_for_#{reflection.name}".to_sym define_method(method_name) do association = send(reflection.name) if touch_attribute == true association.touch unless association.nil? else association.touch(touch_attribute) unless association.nil? end end after_save(method_name) after_destroy(method_name) end def find_with_associations(options = {}) catch :invalid_query do join_dependency = JoinDependency.new(self, merge_includes(scope(:find, :include), options[:include]), options[:joins]) rows = select_all_rows(options, join_dependency) return join_dependency.instantiate(rows) end [] end # Creates before_destroy callback methods that nullify, delete or destroy # has_many associated objects, according to the defined :dependent rule. # # See HasManyAssociation#delete_records. Dependent associations # delete children, otherwise foreign key is set to NULL. # # The +extra_conditions+ parameter, which is not used within the main # Active Record codebase, is meant to allow plugins to define extra # finder conditions. def configure_dependency_for_has_many(reflection, extra_conditions = nil) if reflection.options.include?(:dependent) # Add polymorphic type if the :as option is present dependent_conditions = [] dependent_conditions << "#{reflection.primary_key_name} = \#{record.quoted_id}" dependent_conditions << "#{reflection.options[:as]}_type = '#{base_class.name}'" if reflection.options[:as] dependent_conditions << sanitize_sql(reflection.options[:conditions], reflection.quoted_table_name) if reflection.options[:conditions] dependent_conditions << extra_conditions if extra_conditions dependent_conditions = dependent_conditions.collect {|where| "(#{where})" }.join(" AND ") dependent_conditions = dependent_conditions.gsub('@', '\@') case reflection.options[:dependent] when :destroy method_name = "has_many_dependent_destroy_for_#{reflection.name}".to_sym define_method(method_name) do send(reflection.name).each { |o| o.destroy } end before_destroy method_name when :delete_all module_eval %Q{ before_destroy do |record| # before_destroy do |record| delete_all_has_many_dependencies(record, # delete_all_has_many_dependencies(record, "#{reflection.name}", # "posts", #{reflection.class_name}, # Post, %@#{dependent_conditions}@) # %@...@) # this is a string literal like %(...) end # end } when :nullify module_eval %Q{ before_destroy do |record| # before_destroy do |record| nullify_has_many_dependencies(record, # nullify_has_many_dependencies(record, "#{reflection.name}", # "posts", #{reflection.class_name}, # Post, "#{reflection.primary_key_name}", # "user_id", %@#{dependent_conditions}@) # %@...@) # this is a string literal like %(...) end # end } else raise ArgumentError, "The :dependent option expects either :destroy, :delete_all, or :nullify (#{reflection.options[:dependent].inspect})" end end end # Creates before_destroy callback methods that nullify, delete or destroy # has_one associated objects, according to the defined :dependent rule. def configure_dependency_for_has_one(reflection) if reflection.options.include?(:dependent) case reflection.options[:dependent] when :destroy method_name = "has_one_dependent_destroy_for_#{reflection.name}".to_sym define_method(method_name) do association = send(reflection.name) association.destroy unless association.nil? end before_destroy method_name when :delete method_name = "has_one_dependent_delete_for_#{reflection.name}".to_sym define_method(method_name) do # Retrieve the associated object and delete it. The retrieval # is necessary because there may be multiple associated objects # with foreign keys pointing to this object, and we only want # to delete the correct one, not all of them. association = send(reflection.name) association.delete unless association.nil? end before_destroy method_name when :nullify method_name = "has_one_dependent_nullify_for_#{reflection.name}".to_sym define_method(method_name) do association = send(reflection.name) association.update_attribute(reflection.primary_key_name, nil) unless association.nil? end before_destroy method_name else raise ArgumentError, "The :dependent option expects either :destroy, :delete or :nullify (#{reflection.options[:dependent].inspect})" end end end def configure_dependency_for_belongs_to(reflection) if reflection.options.include?(:dependent) case reflection.options[:dependent] when :destroy method_name = "belongs_to_dependent_destroy_for_#{reflection.name}".to_sym define_method(method_name) do association = send(reflection.name) association.destroy unless association.nil? end after_destroy method_name when :delete method_name = "belongs_to_dependent_delete_for_#{reflection.name}".to_sym define_method(method_name) do association = send(reflection.name) association.delete unless association.nil? end after_destroy method_name else raise ArgumentError, "The :dependent option expects either :destroy or :delete (#{reflection.options[:dependent].inspect})" end end end def delete_all_has_many_dependencies(record, reflection_name, association_class, dependent_conditions) association_class.delete_all(dependent_conditions) end def nullify_has_many_dependencies(record, reflection_name, association_class, primary_key_name, dependent_conditions) association_class.update_all("#{primary_key_name} = NULL", dependent_conditions) end mattr_accessor :valid_keys_for_has_many_association @@valid_keys_for_has_many_association = [ :class_name, :table_name, :foreign_key, :primary_key, :dependent, :select, :conditions, :include, :order, :group, :having, :limit, :offset, :as, :through, :source, :source_type, :uniq, :finder_sql, :counter_sql, :before_add, :after_add, :before_remove, :after_remove, :extend, :readonly, :validate ] def create_has_many_reflection(association_id, options, &extension) options.assert_valid_keys(valid_keys_for_has_many_association) options[:extend] = create_extension_modules(association_id, extension, options[:extend]) create_reflection(:has_many, association_id, options, self) end mattr_accessor :valid_keys_for_has_one_association @@valid_keys_for_has_one_association = [ :class_name, :foreign_key, :remote, :select, :conditions, :order, :include, :dependent, :counter_cache, :extend, :as, :readonly, :validate, :primary_key ] def create_has_one_reflection(association_id, options) options.assert_valid_keys(valid_keys_for_has_one_association) create_reflection(:has_one, association_id, options, self) end def create_has_one_through_reflection(association_id, options) options.assert_valid_keys( :class_name, :foreign_key, :remote, :select, :conditions, :order, :include, :dependent, :counter_cache, :extend, :as, :through, :source, :source_type, :validate ) create_reflection(:has_one, association_id, options, self) end mattr_accessor :valid_keys_for_belongs_to_association @@valid_keys_for_belongs_to_association = [ :class_name, :foreign_key, :foreign_type, :remote, :select, :conditions, :include, :dependent, :counter_cache, :extend, :polymorphic, :readonly, :validate, :touch ] def create_belongs_to_reflection(association_id, options) options.assert_valid_keys(valid_keys_for_belongs_to_association) reflection = create_reflection(:belongs_to, association_id, options, self) if options[:polymorphic] reflection.options[:foreign_type] ||= reflection.class_name.underscore + "_type" end reflection end mattr_accessor :valid_keys_for_has_and_belongs_to_many_association @@valid_keys_for_has_and_belongs_to_many_association = [ :class_name, :table_name, :join_table, :foreign_key, :association_foreign_key, :select, :conditions, :include, :order, :group, :having, :limit, :offset, :uniq, :finder_sql, :counter_sql, :delete_sql, :insert_sql, :before_add, :after_add, :before_remove, :after_remove, :extend, :readonly, :validate ] def create_has_and_belongs_to_many_reflection(association_id, options, &extension) options.assert_valid_keys(valid_keys_for_has_and_belongs_to_many_association) options[:extend] = create_extension_modules(association_id, extension, options[:extend]) reflection = create_reflection(:has_and_belongs_to_many, association_id, options, self) if reflection.association_foreign_key == reflection.primary_key_name raise HasAndBelongsToManyAssociationForeignKeyNeeded.new(reflection) end reflection.options[:join_table] ||= join_table_name(undecorated_table_name(self.to_s), undecorated_table_name(reflection.class_name)) reflection end def reflect_on_included_associations(associations) [ associations ].flatten.collect { |association| reflect_on_association(association.to_s.intern) } end def guard_against_unlimitable_reflections(reflections, options) if (options[:offset] || options[:limit]) && !using_limitable_reflections?(reflections) raise( ConfigurationError, "You can not use offset and limit together with has_many or has_and_belongs_to_many associations" ) end end def select_all_rows(options, join_dependency) connection.select_all( construct_finder_sql_with_included_associations(options, join_dependency), "#{name} Load Including Associations" ) end def construct_finder_sql_with_included_associations(options, join_dependency) scope = scope(:find) sql = "SELECT #{column_aliases(join_dependency)} FROM #{(scope && scope[:from]) || options[:from] || quoted_table_name} " sql << join_dependency.join_associations.collect{|join| join.association_join }.join add_joins!(sql, options[:joins], scope) add_conditions!(sql, options[:conditions], scope) add_limited_ids_condition!(sql, options, join_dependency) if !using_limitable_reflections?(join_dependency.reflections) && ((scope && scope[:limit]) || options[:limit]) add_group!(sql, options[:group], options[:having], scope) add_order!(sql, options[:order], scope) add_limit!(sql, options, scope) if using_limitable_reflections?(join_dependency.reflections) add_lock!(sql, options, scope) return sanitize_sql(sql) end def add_limited_ids_condition!(sql, options, join_dependency) unless (id_list = select_limited_ids_list(options, join_dependency)).empty? sql << "#{condition_word(sql)} #{connection.quote_table_name table_name}.#{primary_key} IN (#{id_list}) " else throw :invalid_query end end def select_limited_ids_list(options, join_dependency) pk = columns_hash[primary_key] connection.select_all( construct_finder_sql_for_association_limiting(options, join_dependency), "#{name} Load IDs For Limited Eager Loading" ).collect { |row| connection.quote(row[primary_key], pk) }.join(", ") end def construct_finder_sql_for_association_limiting(options, join_dependency) scope = scope(:find) # Only join tables referenced in order or conditions since this is particularly slow on the pre-query. tables_from_conditions = conditions_tables(options) tables_from_order = order_tables(options) all_tables = tables_from_conditions + tables_from_order distinct_join_associations = all_tables.uniq.map{|table| join_dependency.joins_for_table_name(table) }.flatten.compact.uniq order = options[:order] if scoped_order = (scope && scope[:order]) order = order ? "#{order}, #{scoped_order}" : scoped_order end is_distinct = !options[:joins].blank? || include_eager_conditions?(options, tables_from_conditions) || include_eager_order?(options, tables_from_order) sql = "SELECT " if is_distinct sql << connection.distinct("#{connection.quote_table_name table_name}.#{primary_key}", order) else sql << primary_key end sql << " FROM #{connection.quote_table_name table_name} " if is_distinct sql << distinct_join_associations.collect { |assoc| assoc.association_join }.join add_joins!(sql, options[:joins], scope) end add_conditions!(sql, options[:conditions], scope) add_group!(sql, options[:group], options[:having], scope) if order && is_distinct connection.add_order_by_for_association_limiting!(sql, :order => order) else add_order!(sql, options[:order], scope) end add_limit!(sql, options, scope) return sanitize_sql(sql) end def tables_in_string(string) return [] if string.blank? string.scan(/([\.a-zA-Z_]+).?\./).flatten end def conditions_tables(options) # look in both sets of conditions conditions = [scope(:find, :conditions), options[:conditions]].inject([]) do |all, cond| case cond when nil then all when Array then all << cond.first when Hash then all << cond.keys else all << cond end end tables_in_string(conditions.join(' ')) end def order_tables(options) order = [options[:order], scope(:find, :order) ].join(", ") return [] unless order && order.is_a?(String) tables_in_string(order) end def selects_tables(options) select = options[:select] return [] unless select && select.is_a?(String) tables_in_string(select) end def joined_tables(options) scope = scope(:find) joins = options[:joins] merged_joins = scope && scope[:joins] && joins ? merge_joins(scope[:joins], joins) : (joins || scope && scope[:joins]) [table_name] + case merged_joins when Symbol, Hash, Array if array_of_strings?(merged_joins) tables_in_string(merged_joins.join(' ')) else join_dependency = ActiveRecord::Associations::ClassMethods::InnerJoinDependency.new(self, merged_joins, nil) join_dependency.join_associations.collect {|join_association| [join_association.aliased_join_table_name, join_association.aliased_table_name]}.flatten.compact end else tables_in_string(merged_joins) end end # Checks if the conditions reference a table other than the current model table def include_eager_conditions?(options, tables = nil, joined_tables = nil) ((tables || conditions_tables(options)) - (joined_tables || joined_tables(options))).any? end # Checks if the query order references a table other than the current model's table. def include_eager_order?(options, tables = nil, joined_tables = nil) ((tables || order_tables(options)) - (joined_tables || joined_tables(options))).any? end def include_eager_select?(options, joined_tables = nil) (selects_tables(options) - (joined_tables || joined_tables(options))).any? end def references_eager_loaded_tables?(options) joined_tables = joined_tables(options) include_eager_order?(options, nil, joined_tables) || include_eager_conditions?(options, nil, joined_tables) || include_eager_select?(options, joined_tables) end def using_limitable_reflections?(reflections) reflections.reject { |r| [ :belongs_to, :has_one ].include?(r.macro) }.length.zero? end def column_aliases(join_dependency) join_dependency.joins.collect{|join| join.column_names_with_alias.collect{|column_name, aliased_name| "#{connection.quote_table_name join.aliased_table_name}.#{connection.quote_column_name column_name} AS #{aliased_name}"}}.flatten.join(", ") end def add_association_callbacks(association_name, options) callbacks = %w(before_add after_add before_remove after_remove) callbacks.each do |callback_name| full_callback_name = "#{callback_name}_for_#{association_name}" defined_callbacks = options[callback_name.to_sym] if options.has_key?(callback_name.to_sym) class_inheritable_reader full_callback_name.to_sym write_inheritable_attribute(full_callback_name.to_sym, [defined_callbacks].flatten) else write_inheritable_attribute(full_callback_name.to_sym, []) end end end def condition_word(sql) sql =~ /where/i ? " AND " : "WHERE " end def create_extension_modules(association_id, block_extension, extensions) if block_extension extension_module_name = "#{self.to_s.demodulize}#{association_id.to_s.camelize}AssociationExtension" silence_warnings do self.parent.const_set(extension_module_name, Module.new(&block_extension)) end Array(extensions).push("#{self.parent}::#{extension_module_name}".constantize) else Array(extensions) end end class JoinDependency # :nodoc: attr_reader :joins, :reflections, :table_aliases def initialize(base, associations, joins) @joins = [JoinBase.new(base, joins)] @associations = associations @reflections = [] @base_records_hash = {} @base_records_in_order = [] @table_aliases = Hash.new { |aliases, table| aliases[table] = 0 } @table_aliases[base.table_name] = 1 build(associations) end def join_associations @joins[1..-1].to_a end def join_base @joins[0] end def instantiate(rows) rows.each_with_index do |row, i| primary_id = join_base.record_id(row) unless @base_records_hash[primary_id] @base_records_in_order << (@base_records_hash[primary_id] = join_base.instantiate(row)) end construct(@base_records_hash[primary_id], @associations, join_associations.dup, row) end remove_duplicate_results!(join_base.active_record, @base_records_in_order, @associations) return @base_records_in_order end def remove_duplicate_results!(base, records, associations) case associations when Symbol, String reflection = base.reflections[associations] if reflection && [:has_many, :has_and_belongs_to_many].include?(reflection.macro) records.each { |record| record.send(reflection.name).target.uniq! } end when Array associations.each do |association| remove_duplicate_results!(base, records, association) end when Hash associations.keys.each do |name| reflection = base.reflections[name] is_collection = [:has_many, :has_and_belongs_to_many].include?(reflection.macro) parent_records = records.map do |record| descendant = record.send(reflection.name) next unless descendant descendant.target.uniq! if is_collection descendant end.flatten.compact remove_duplicate_results!(reflection.class_name.constantize, parent_records, associations[name]) unless parent_records.empty? end end end def join_for_table_name(table_name) join = (@joins.select{|j|j.aliased_table_name == table_name.gsub(/^\"(.*)\"$/){$1} }.first) rescue nil return join unless join.nil? @joins.select{|j|j.is_a?(JoinAssociation) && j.aliased_join_table_name == table_name.gsub(/^\"(.*)\"$/){$1} }.first rescue nil end def joins_for_table_name(table_name) join = join_for_table_name(table_name) result = nil if join && join.is_a?(JoinAssociation) result = [join] if join.parent && join.parent.is_a?(JoinAssociation) result = joins_for_table_name(join.parent.aliased_table_name) + result end end result end protected def build(associations, parent = nil) parent ||= @joins.last case associations when Symbol, String reflection = parent.reflections[associations.to_s.intern] or raise ConfigurationError, "Association named '#{ associations }' was not found; perhaps you misspelled it?" @reflections << reflection @joins << build_join_association(reflection, parent) when Array associations.each do |association| build(association, parent) end when Hash associations.keys.sort{|a,b|a.to_s<=>b.to_s}.each do |name| build(name, parent) build(associations[name]) end else raise ConfigurationError, associations.inspect end end # overridden in InnerJoinDependency subclass def build_join_association(reflection, parent) JoinAssociation.new(reflection, self, parent) end def construct(parent, associations, joins, row) case associations when Symbol, String join = joins.detect{|j| j.reflection.name.to_s == associations.to_s && j.parent_table_name == parent.class.table_name } raise(ConfigurationError, "No such association") if join.nil? joins.delete(join) construct_association(parent, join, row) when Array associations.each do |association| construct(parent, association, joins, row) end when Hash associations.keys.sort{|a,b|a.to_s<=>b.to_s}.each do |name| join = joins.detect{|j| j.reflection.name.to_s == name.to_s && j.parent_table_name == parent.class.table_name } raise(ConfigurationError, "No such association") if join.nil? association = construct_association(parent, join, row) joins.delete(join) construct(association, associations[name], joins, row) if association end else raise ConfigurationError, associations.inspect end end def construct_association(record, join, row) case join.reflection.macro when :has_many, :has_and_belongs_to_many collection = record.send(join.reflection.name) collection.loaded return nil if record.id.to_s != join.parent.record_id(row).to_s or row[join.aliased_primary_key].nil? association = join.instantiate(row) collection.target.push(association) when :has_one return if record.id.to_s != join.parent.record_id(row).to_s return if record.instance_variable_defined?("@#{join.reflection.name}") association = join.instantiate(row) unless row[join.aliased_primary_key].nil? record.send("set_#{join.reflection.name}_target", association) when :belongs_to return if record.id.to_s != join.parent.record_id(row).to_s or row[join.aliased_primary_key].nil? association = join.instantiate(row) record.send("set_#{join.reflection.name}_target", association) else raise ConfigurationError, "unknown macro: #{join.reflection.macro}" end return association end class JoinBase # :nodoc: attr_reader :active_record, :table_joins delegate :table_name, :column_names, :primary_key, :reflections, :sanitize_sql, :to => :active_record def initialize(active_record, joins = nil) @active_record = active_record @cached_record = {} @table_joins = joins end def aliased_prefix "t0" end def aliased_primary_key "#{aliased_prefix}_r0" end def aliased_table_name active_record.table_name end def column_names_with_alias unless defined?(@column_names_with_alias) @column_names_with_alias = [] ([primary_key] + (column_names - [primary_key])).each_with_index do |column_name, i| @column_names_with_alias << [column_name, "#{aliased_prefix}_r#{i}"] end end @column_names_with_alias end def extract_record(row) column_names_with_alias.inject({}){|record, (cn, an)| record[cn] = row[an]; record} end def record_id(row) row[aliased_primary_key] end def instantiate(row) @cached_record[record_id(row)] ||= active_record.send(:instantiate, extract_record(row)) end end class JoinAssociation < JoinBase # :nodoc: attr_reader :reflection, :parent, :aliased_table_name, :aliased_prefix, :aliased_join_table_name, :parent_table_name delegate :options, :klass, :through_reflection, :source_reflection, :to => :reflection def initialize(reflection, join_dependency, parent = nil) reflection.check_validity! if reflection.options[:polymorphic] raise EagerLoadPolymorphicError.new(reflection) end super(reflection.klass) @join_dependency = join_dependency @parent = parent @reflection = reflection @aliased_prefix = "t#{ join_dependency.joins.size }" @parent_table_name = parent.active_record.table_name @aliased_table_name = aliased_table_name_for(table_name) if reflection.macro == :has_and_belongs_to_many @aliased_join_table_name = aliased_table_name_for(reflection.options[:join_table], "_join") end if [:has_many, :has_one].include?(reflection.macro) && reflection.options[:through] @aliased_join_table_name = aliased_table_name_for(reflection.through_reflection.klass.table_name, "_join") end end def association_join connection = reflection.active_record.connection join = case reflection.macro when :has_and_belongs_to_many " #{join_type} %s ON %s.%s = %s.%s " % [ table_alias_for(options[:join_table], aliased_join_table_name), connection.quote_table_name(aliased_join_table_name), options[:foreign_key] || reflection.active_record.to_s.foreign_key, connection.quote_table_name(parent.aliased_table_name), reflection.active_record.primary_key] + " #{join_type} %s ON %s.%s = %s.%s " % [ table_name_and_alias, connection.quote_table_name(aliased_table_name), klass.primary_key, connection.quote_table_name(aliased_join_table_name), options[:association_foreign_key] || klass.to_s.foreign_key ] when :has_many, :has_one case when reflection.options[:through] through_conditions = through_reflection.options[:conditions] ? "AND #{interpolate_sql(sanitize_sql(through_reflection.options[:conditions]))}" : '' jt_foreign_key = jt_as_extra = jt_source_extra = jt_sti_extra = nil first_key = second_key = as_extra = nil if through_reflection.options[:as] # has_many :through against a polymorphic join jt_foreign_key = through_reflection.options[:as].to_s + '_id' jt_as_extra = " AND %s.%s = %s" % [ connection.quote_table_name(aliased_join_table_name), connection.quote_column_name(through_reflection.options[:as].to_s + '_type'), klass.quote_value(parent.active_record.base_class.name) ] else jt_foreign_key = through_reflection.primary_key_name end case source_reflection.macro when :has_many if source_reflection.options[:as] first_key = "#{source_reflection.options[:as]}_id" second_key = options[:foreign_key] || primary_key as_extra = " AND %s.%s = %s" % [ connection.quote_table_name(aliased_table_name), connection.quote_column_name("#{source_reflection.options[:as]}_type"), klass.quote_value(source_reflection.active_record.base_class.name) ] else first_key = through_reflection.klass.base_class.to_s.foreign_key second_key = options[:foreign_key] || primary_key end unless through_reflection.klass.descends_from_active_record? jt_sti_extra = " AND %s.%s = %s" % [ connection.quote_table_name(aliased_join_table_name), connection.quote_column_name(through_reflection.active_record.inheritance_column), through_reflection.klass.quote_value(through_reflection.klass.sti_name)] end when :belongs_to first_key = primary_key if reflection.options[:source_type] second_key = source_reflection.association_foreign_key jt_source_extra = " AND %s.%s = %s" % [ connection.quote_table_name(aliased_join_table_name), connection.quote_column_name(reflection.source_reflection.options[:foreign_type]), klass.quote_value(reflection.options[:source_type]) ] else second_key = source_reflection.primary_key_name end end " #{join_type} %s ON (%s.%s = %s.%s%s%s%s) " % [ table_alias_for(through_reflection.klass.table_name, aliased_join_table_name), connection.quote_table_name(parent.aliased_table_name), connection.quote_column_name(parent.primary_key), connection.quote_table_name(aliased_join_table_name), connection.quote_column_name(jt_foreign_key), jt_as_extra, jt_source_extra, jt_sti_extra ] + " #{join_type} %s ON (%s.%s = %s.%s%s) " % [ table_name_and_alias, connection.quote_table_name(aliased_table_name), connection.quote_column_name(first_key), connection.quote_table_name(aliased_join_table_name), connection.quote_column_name(second_key), as_extra ] when reflection.options[:as] && [:has_many, :has_one].include?(reflection.macro) " #{join_type} %s ON %s.%s = %s.%s AND %s.%s = %s" % [ table_name_and_alias, connection.quote_table_name(aliased_table_name), "#{reflection.options[:as]}_id", connection.quote_table_name(parent.aliased_table_name), parent.primary_key, connection.quote_table_name(aliased_table_name), "#{reflection.options[:as]}_type", klass.quote_value(parent.active_record.base_class.name) ] else foreign_key = options[:foreign_key] || reflection.active_record.name.foreign_key " #{join_type} %s ON %s.%s = %s.%s " % [ table_name_and_alias, aliased_table_name, foreign_key, parent.aliased_table_name, reflection.options[:primary_key] || parent.primary_key ] end when :belongs_to " #{join_type} %s ON %s.%s = %s.%s " % [ table_name_and_alias, connection.quote_table_name(aliased_table_name), reflection.klass.primary_key, connection.quote_table_name(parent.aliased_table_name), options[:foreign_key] || reflection.primary_key_name ] else "" end || '' join << %(AND %s) % [ klass.send(:type_condition, aliased_table_name)] unless klass.descends_from_active_record? [through_reflection, reflection].each do |ref| join << "AND #{interpolate_sql(sanitize_sql(ref.options[:conditions], aliased_table_name))} " if ref && ref.options[:conditions] end join end protected def aliased_table_name_for(name, suffix = nil) if !parent.table_joins.blank? && parent.table_joins.to_s.downcase =~ %r{join(\s+\w+)?\s+#{active_record.connection.quote_table_name name.downcase}\son} @join_dependency.table_aliases[name] += 1 end unless @join_dependency.table_aliases[name].zero? # if the table name has been used, then use an alias name = active_record.connection.table_alias_for "#{pluralize(reflection.name)}_#{parent_table_name}#{suffix}" table_index = @join_dependency.table_aliases[name] @join_dependency.table_aliases[name] += 1 name = name[0..active_record.connection.table_alias_length-3] + "_#{table_index+1}" if table_index > 0 else @join_dependency.table_aliases[name] += 1 end name end def pluralize(table_name) ActiveRecord::Base.pluralize_table_names ? table_name.to_s.pluralize : table_name end def table_alias_for(table_name, table_alias) "#{reflection.active_record.connection.quote_table_name(table_name)} #{table_alias if table_name != table_alias}".strip end def table_name_and_alias table_alias_for table_name, @aliased_table_name end def interpolate_sql(sql) instance_eval("%@#{sql.gsub('@', '\@')}@") end private def join_type "LEFT OUTER JOIN" end end end class InnerJoinDependency < JoinDependency # :nodoc: protected def build_join_association(reflection, parent) InnerJoinAssociation.new(reflection, self, parent) end class InnerJoinAssociation < JoinAssociation private def join_type "INNER JOIN" end end end end end end
alphabetum/saasy
vendor/rails/activerecord/lib/active_record/associations.rb
Ruby
mit
115,997
# loudp2p [![MIT License][license-image]][license-url] [![GoDoc](https://godoc.org/github.com/matiasinsaurralde/loudp2p?status.svg)](https://godoc.org/github.com/matiasinsaurralde/loudp2p) [![wercker status](https://app.wercker.com/status/03d6050e5c3d48f8139ae9493f172b30/s/master "wercker status")](https://app.wercker.com/project/byKey/03d6050e5c3d48f8139ae9493f172b30) ![loudp2p](assets/logo.png) loudp2p is an experimental peer to peer network for music streaming. The idea comes after a few personal experiments with browser-based Bittorrent streaming, see [ng-chunked-audio](https://github.com/matiasinsaurralde/ng-chunked-audio). The rest was mostly based on [torrent-stream](https://github.com/mafintosh/torrent-stream). ## Protocol design My current plan is to use [Protocol Buffers](https://developers.google.com/protocol-buffers/) to describe the network messages. This makes it easier to generate bindings for other languages, enabling the community to write their own clients in a standard way. These messages will be exchanged using [gRPC](http://www.grpc.io/) over [HTTP2](https://en.wikipedia.org/wiki/HTTP/2). These will involve standard data structures for peer discovery (announcements), search (index lookup) and stream initiation (*Peer A would like to stream file X from Peer B and Peer C, etc.*). The data streams will use dedicated UDP sockets, on random ports, just like other P2P applications do. If UDP sockets aren't available, an alternative approach could wrap the data chunks as Protocol Buffer messages and send them over gRPC/HTTP2. Think about browser streaming. A network peer will have a hybrid role most of time, e.g participating as a server and a client at the same time. See the section about peer roles. A network peer will use an [ECDSA](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm) key to sign all sent messages. Peer IDs will be used instead of IP addresses most of the time. Key generation will take place during the bootstrap procedure and a peer ID will be derived from the public key. In a way, this process resembles the logic behind [Bitcoin address generation](https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses). Peer IDs will be useful for tracking peers when IP or network changes occur. ## Bootstrapping An initial list of peers will be used for bootstrapping. Peer discovery strategies need more investigation. Peer discovery should be implemented in a way that guarantees the unstructured operation of the network. ## Peer/cooperation roles A peer that participates as a "server" will reply general queries and stream requests if the data is available locally. It should also receive and handle announcement messages from other peers, and keep a track of them during its lifetime. A peer may assume different cooperation roles during its operation, making it easier for the network to scale or recover from failure. ## Light clients In the blockchain world, a light client represents a network client that doesn't need a copy of the whole blockchain to operate inside the network. In the context of this project, think about a mobile phone with a 3G connection, running a minimal client with support for peer discovery and streams. ## License [MIT](LICENSE.md) [license-url]: LICENSE [license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
matiasinsaurralde/loudp2p
README.md
Markdown
mit
3,400
--- layout: notes title: Optimization category: math typora-copy-images-to: ../assets --- {:toc} # convex optimization ## convex sets (boyd 2) - *affine set*: $x_1, x_2 \in C, \theta \in \mathbb{R} \implies \theta x_1 + (1 - \theta) x_2 \in C$ - *affine hull*: aff C = {$\sum \theta_i x_i | x_i \in C, \sum \theta_i =1 $} - *convex set*: $x_1, x_2 \in C, 0 \leq \theta \leq 1 \implies \theta x_1 + (1 - \theta) x_2 $ - *convex hull*: conv C = {$\sum \theta_i x_i \: | x_i \in C, \theta_i \geq 0, \sum \theta_i = 1$} - *cone*: $\theta \geq 0 \implies \theta x \in C$ - operations that preserve convexity - intersection (finite intersection of half-spaces) - pointwise max of affine funcs - composition - affine - perspective - linar fractional = projective - generalized inequalities: - *proper cone* K: convex, closed, pointed, solid - $x \preceq_K y \iff y-x \in K$ - *separating hyperplane thm*: C, D convex $C \cap D =\emptyset \implies \exists a \neq 0, b \: s.t. \\ a^Tx \leq b \forall x \in C, \\a^Tx \geq b \forall x \in D$ - *supporting hyperplane thm*: {$x|a^tx = a^t x_0$} where $x_0$ on boundary of convex C - dual cone $K^*$ = {$y|x^Ty \geq 0 \: \forall x \in K$} - $\preceq_{K^*}$ is dual of $\preceq_K$ - $x \preceq_K y \iff \lambda^T x \leq \lambda^T y \quad \forall \: \lambda \succeq_{K^*} 0$ ### geometry - *ellipsoid*: {$x \in \mathbb{R}^n | (x-x_c)^T P^{-1} (x-x_c) \leq 1$} where P symmetric, PSD - {$x_c + Au | ||u||_2 \leq 1$} - *hyperplane*: {$x|a^Tx = b$} ~ creates a halfspace - *norm cone*: {$(x, t)| \: ||x|| \leq t$} - *polyhedron*: {x | Ax=b, Cx=d} = $\{ \sum_i^k \theta_i v_i \; | \sum_i^m \theta_i = 1, \theta_i \geq 0 \} \: m \leq k$ - *simplex*: conv{$v_{0:k}$} ## convex funcs (boyd 3) - definitions 1. *Jensen's inequality* $0 \leq \theta \leq 1$ - $f(\theta x_1 + (1 - \theta) x_2) \leq \theta f(x_1) + (1 - \theta) f(x_2)$ - $f(E[X]) \leq E[f(X)]$ 2. $\nabla^2 f(x) \succeq 0$ 3. $f(x_2) \geq f(x_1) + \nabla f(x_1)^T (x_2 - x_1)$ - can show this by restricting to an arbitrary line 4. consider epi f - also use things that preseve convexity - concepts - *epigraph* epi f = $\{ (x, t) \; | \: x \in dom f, f(x) \leq t \}$ - *extended value extension*: $\tilde{f}(x) = f(x)$ if $x \in dom f$ else $\infty$ - *wide sense function* - can take on values $\pm \infty$ - = dom f = {$x | f(x) < \infty$} - *wide sense convex func*: $f(x) = inf \{ t \in \mathbb{R} | (x, t) \in F\}$ where $F \subseteq \mathbb{R}^{n+1}$ - $F(x) = inf \{ t \in \mathbb{R} | (x, t) \in F \}$ - $\alpha$-sublevel set of convex func is convex - operations that preserve convexity - nonnegative weighted sums ~ multiplies for logs - affine map - pointwise max of convex - composition - perspective - minimization ~ sometimes - *conjugate* of f - $f^*(y) = \underset{x \in dom f}{sup} \: y^T x - f(x)$ - dom $f^*$ = {$y|f^*(y)$ is finite} - called *Legendre transform* when f differentiable - *fenchel's inequality*: $f(x) + f^*(y) \geq x^ty$ - $f^{**} = f$ iff convex, closed - ex. $f(S) = log \: det X^{-1}$ - $f^*(Y) = \underset{X}{sup} [tr(YX) + log \: det X]$ - $= -n - log \: det(-Y) $ if $-Y \in S^n_{++}$ - can use conj. to go other way: $f(y) = \underset{x}{sup}(y^Tx - f^*(x))$ ## optimization problems (boyd 4) ## optimization - standard form: $p^* = min \: f_0(x)\\s.t. \: f_i(x) \leq 0 \\ h_i(x) = 0$ - equivalent problems - change of vars - constraint transformations - slack vars - eliminating equalities - eliminating linear equalities - introducing equalities - optimizing over some vars ~ ex. quadratic - epigraph form: $min \: t \: s.t. \: f_0 \leq t$ - implicit + explicit constraints ## convex optimization - standard form: $$p^* = min \: f_0(x)\\s.t. \: f_i(x) \leq 0 \\ a_i^Tx = b_i$$ where all f are convex - optimality criteria (special cases of KKT) - x optimal if 1. x is feasible 2. $\nabla f_0 (x)^T(y-x) \geq 0 \: \forall y $ feasible - if unconstrained $\nabla f_0 (x) = 0$ - if equality only Ax=b, $\nabla f_0 (x) \perp N(A)$ - $x \succeq 0$, $\nabla f_0 (x) \succeq 0; x_i (\nabla f_0 (x))_i = 0$ - equivalent convex problems - eliminating equality constraints - introducing equality constraints - slack vars ~ for linear inequalities - epigraph form - minimizing over some vars ## linear optimization - $$p^* = min \: c^T x + d\\s.t. \: Gx \succeq h \\ Ax=b$$ - standard form $x \succeq 0$ is the only inequality - standard dual: max $-b^T \nu$ s.t. $A^T \nu + c \geq 0$ - *linear-fractional* program - $min \: \frac{c^Tx + d}{e^tx+f} \\ s.t \: Gx \succeq h \\ Ax = b$ ~ can be converted to LP ## quadratic optimization - $$min \: 1/2 x^TPx + q^Txr \\s.t. \: Gx \succeq h$$ where $P \in S_+^n$ - *QCQP* - inequality constraints also convex - ex. $min \: ||Ax-b||_2^2$ - *SOCP* - $$min f^Tx \\ s.t. \: ||A_ix+b_i||_2 \leq c_i^T + d_i \\ Fx=g$$ ## geometric program - $$min \: f_0(x) \\ s.t. \: f_i(x) \leq 1 \: i = 1:m \\ h_i(x) = 1 \: i = 1:p$$ where $f_{0:m}$ posynomials, $h_i$ monomials - *monomial* $f(x) = c x_1^{a_1} \cdot x_n^{a_n}, c>0$ - posynomial ~ sum of monomials ~ can transform into convex w/ $y_i = log x_i$ ## generalized inequality - $$min \: f_0(x)\\s.t. \: f_i(x) \preceq_{K_i} 0, i=1:m\\Ax=b$$ - *conic form problem*: $$min \: c^Tx \\ s.t. \: Fx +g \preceq_K 0\\Ax=b$$ ~ set $K=S_+^K$ - *SDP* = *semi-definite program*: $$min \: c^T x\\s.t. \: x_1F_1+...+x_nF_n+G \preceq 0\\Ax=b$$ ~ where $F_1, ..., F_n \in S^k$ - standard form: $min \: tr(CX) \\ s.to \: tr(A_iX)=b_i \\ X \succeq 0$ # duality (boyd 5) - consider $\min \: f_0 (x) \\ s.t. \: f_i(x) \leq 0 \\ h_i(x) = 0$ - *lagrangian* $L(x, \lambda, \nu) = f_0(x) + \sum \lambda_i f_i(x) + \sum \nu_i h_i(x)$ - *dual function* $g(\lambda, \nu) = \underset{x \in D}{\inf} L(x, \lambda, \nu)$ ~ g always concave - $\lambda \succeq 0 \implies g(\lambda, \nu) \leq p^*$ - $(\lambda, \nu)$ *dual feasible* if 1. $\lambda \succeq 0$ 2. $(\lambda, \nu) \in dom \: g$ - when $p^* = - \infty$, dual infeasible - when $d^*=\infty$, primal infeasible - dual related to to conjugate func - ex. min f(x) s.t. $x = 0 \implies g(\nu) = -f^*(-\nu)$ - *lagrange dual problem*: $\max \: g(\lambda, \nu)\\s.t. \: \lambda \succeq 0$ - *weak duality*: $d^* \leq p^*$ - *optimal duality gap*: $p^* - d^*$ - *strong duality*: $d^* = p^*$ ~ requires more than convexity - *slater's condition* ~ if problem convex $\implies$ strong duality + $\exists$ dual optimal point - $\exists x \in relint \: D\\f_i(x) < 0\\Ax = b$ ~ point is strictly feasible - to weaken this, affine $f_i$ can be $\leq 0$ - *sion's minimax thm*: $x \to f(x, y)$ ~ conditions - $\implies \underset{x}{min} \: \underset{y}{sup} \: f(x,y) = \underset{y}{sup} \: \underset{x}{min} \: f(x,y)$ ## optimality conditions - *duality gap*: $f_0(x) - g(\lambda, \nu)$ - can use stopping condition duality gap $\leq \epsilon_{abs}$ to be $\epsilon_{abs}$ - suboptimal - strong duality yields *complementary slackness* - $\lambda_i f_i(x^*)=0$ - *KKT optimality conditions* ~ assume $f_0, f_i, h_i$ differentiable, strong duality 1. $f_i(x^*) \leq 0$ 2. $h_i(x^*) = 0$ 3. $\lambda_i^* \geq 0$ 4. $\lambda_i^*f(x_i^*) = 0$ 5. $\nabla f_0 (x^*) + \sum \lambda_i^* \nabla f_i (x_i^*) + \sum \nu_i^* \nabla h_i (x^*) = 0$ ## thms of alternatives - *weak alternative* - at most one of 2 is true - *strong alternative* - exactly one is true - ex. Fredholm alternative - ex. Farkas's lamma 1. $\exists x \: Ax \leq 0, c^Tx < 0$ 2. $\exists y \: y \geq 0, A^Ty + c = 0$ # approx + fitting (boyd 6) ## norm approx problem - minimize $||Ax-b||$ - ex. weighted norm approx. min||W(Ax-b)|| - ex. least squares min ||Ax-b||$_2^2$ - ex. chebyshev approx norm min||Ax-b||$_\infty$ - ex. penalty function approx problem: $min \: \phi(r_1) + ... + \phi(r_m)\\s.t. \: r=Ax-b$ ## least norm problem - min $||x||\\s.t. \: Ax=b$ ~ min $||x_0+ Zu||$, Z cols basis for N(A) ## regularized approximation - min $||Ax-b|| + \gamma ||x||$ - min $||Ax-b||^2 + \gamma ||x||^2$ - *Tikhonov*: $min \: ||Ax-b||_2^2 + \gamma ||x||_2^2$ - examples - ex. regularize w/ ||Dx|| - ex. lasso - ex. quadratic smoothing - ex. total variation ## robust approximation - $A = \bar{A} + U$ ~ random w/ mean 0 1. stochastic robust approx problem: $min \: E||Ax-b||$ 2. (worst-case) robust approx prob: $min \: sup ||Ax-b|| \: | A \in \mathcal{A}$ ## function fitting - $f(u) = x_1 f_1 (u) + .... + x_n f_n (u)$ ~ $f_i$ are basis funcs, $x_i$ are coefficients - sparse descriptions + basis pursuit - interpolation # unconstrained minimization (boyd 9) ## unconstrained problems - $x^* = \text{argmin} \: f(x) \implies \nabla f(x^*) = 0$ - examples - ex. quadratic: $\min \: 1/2 x^TPX + q^Tx + r$ - solved w/ $Px^* + q = 0$, if $P \succeq 0$, unique soln $-P^{-1}q$ - ex. unconstrained geometric program - ex. analytic center of linear inequalities - $\min \: f(x) = -\sum \: \log (b_i - a_i^Tx)$ where dom f = $\{x|a_i^Tx< b_i, i = 1:m\}$ - 3 definitions of convexity - $0 \leq \theta \leq 1$ - $f(\theta x_1 + (1 - \theta) x_2) \leq \theta f(x_1) + (1 - \theta) f(x_2)$ - $\nabla^2 f(x) \succeq 0$ - $f(x_2) \geq f(x_1) + \nabla f(x_1)^T (x_2 - x_1)$ - $\color{red}0 \preceq \color{green}{\underset{\text{strong convexity}}{mI}} \preceq \nabla^2 \color{cornflowerblue}{f(x)} \preceq \underset{\text{smoothness}}{MI}$ - $\kappa = M/m$ bounds *condition number* of $\nabla^2 f = \frac{\lambda_{\max}(\nabla^2 f)}{\lambda_{\min}(\nabla^2 f)}$ - *strongly convex*: $\nabla^2 f(x) \succeq mI$ - $\implies f(x_2) \geq f(x_1) + \nabla f(x_1)^T(x_2-x_1) + m/2 ||x_2-x_1||_2^2$ - minimizing yields $p^* \geq f(x) - 1/(2m) ||\nabla f(x)||_2^2$ - if the gradient of f at x is small enough, then the difference between f(x) and p⋆ is small - *smooth*: $\exists \: M, \: \nabla^2f(x) \preceq MI$ - $\implies f(y) \leq f(x) + \nabla f(x)^T(y-x) + M/2 ||y-x||_2^2$ - cond(*C*) = $W_{\max}^2 / W_{\min}^2$ - *width* of convex set $C \subset \mathbb{R}^n$ in direction q with $||q||_2=1$ - $W(C, q) = \underset{z \in C}{\sup} \: q^Tz - \underset{z \in C}{\inf} \: q^Tz$ - *alpha-level subset*: $C_\alpha = \{x|f(x) \leq \alpha\}$ ## descent methods - update rule $x = x + t \Delta x$ - *exact line search*: $t = \underset{s \geq 0}{\text{argmin}} \:f(x+s \Delta x)$ - *backtracking line search* - given a descent direction $\Delta x \text{ for } f, x \in dom \: f, \alpha \in (0, 0.5), \beta \in (0, 1)$ - t:=1, $\alpha \in (0, 0.5), \beta \in (0, 1)$ - while $f(x + t \Delta x) > f(x) + \alpha t \nabla f(x)^T \Delta x$ - $t *= \beta$ - ![Screen Shot 2018-07-30 at 10.23.19 PM-3014637](assets/Screen Shot 2018-07-30 at 10.23.19 PM-3014637.png) ## gd method - convergence - can bound number of iterations required to be less than $\epsilon$ - examples - a quadratic problem in $R^2$ - non-quadratic problem in $R^2$ - a problem in $R^{100}$ - gradient method and condition number - conclusions - gd often exhibits approximately linear convergence - convergence rate depends greatly on $cond (\nabla^2 f(x))$ or sublevel sets ## steepest descent method - examples - euclidean norm: $\Delta x_{sd} = - \nabla f(x)$ - quadratic norm $||z||_P = (z^TPz)^{1/2} = ||P^{1/2}z||_2$ where $P \in S_{++}^n$ - $\Delta x_{sd} = -P^{-1} \nabla f(x)$ - $\ell_1$ norm: $\Delta_{sd} = -\frac{\partial f(x)}{\partial x_i} e_i$ ## newton's method - *Newton step* $\Delta x_{nt} = - \nabla^2 f(x)^{-1} \nabla f(x)$ - PSD $\implies \nabla f(x)^T \Delta x_{nt} = - \nabla f(x)^T \nabla^2 f(x)^{-1} \nabla f(x) < 0$ - *Newton's method* 1. compute the newton step $\Delta x_{nt}$ and decrement $\lambda^2 = \nabla f(x)^T \nabla^2 f(x)^{-1} \nabla f(x)$ 2. stopping criterion: quit if $\lambda^2 / 2 \leq \epsilon$ 3. line search: choose step size t w/ backtracking line search 4. update: $x += t \Delta x_{nt}$ # basic algorithms - types: *batch* (have full data) vs *online* 1. gradient descent = *batch gradient descent* - *gradient* - vector that points to direction of maximum increase - at every step, subtract gradient multiplied by learning rate: $x_k = x_{k-1} - \alpha \nabla_x F(x_{k-1})$ - alpha = 0.05 seems to work - $J(\theta) = 1/2 (\theta ^T X^T X \theta - 2 \theta^T X^T y + y^T y)$ - $\nabla_\theta J(\theta) = X^T X \theta - X^T Y$ - = $\sum_i x_i (x_i^T - y_i)$ - this represents residuals * examples 2. stochastic gradient descent - don't use all training examples - approximates gradient - single-sample - mini-batch (usually better in offline case) - *coordinate-descent* algorithm - *online* algorithm - update theta while training data is changing - when to stop? - predetermined number of iterations - stop when improvement drops below a threshold - each pass of the whole data = 1 epoch - benefits 1. less prone to getting stuck to shallow local minima 2. don't need huge ram 3. faster 3. newton's method for optimization - *second-order* optimization - requires 1st & 2nd derivatives - $\theta_{k+1} = \theta_k - H_K^{-1} g_k$ - update with inverse of Hessian as alpha - this is an approximation to a taylor series - finding inverse of Hessian can be hard / expensive 4. ADMM - *alternating direction method of multipliers* (ADMM) is an algorithm that solves convex optimization problems by breaking them into smaller pieces, each of which are then easier to handle # expectation maximization - j 11 - method to maximize likelihood on model with observed X and hidden Z 1. *expectation step* - values of unobserved latent variables are filled in - calculates prob of latent variables given observed variables and current param values 2. *maximization step* - parameters are adjusted based on filled-in variables - goal: maximize *complete log-likelihood*, but don't know z - *expected complete log-likelihood* $E_{p'}[l(\theta; x,z)] = \sum_z p'(z|x,\theta) \cdot \log \: p(x,z|\theta)$ - p' distribution is assignment to z vars - deriving *auxilary function* $\mathcal L(q, \theta, x) = \sum_z p'(z|x) \log \frac{p(x,z|\theta)}{p'(z|x)}$ - lower bound for the log likelihood - $\begin{align} l(\theta; x) &= \log \: p(x|\theta) & \text{incomplete log-likelihood} \\&= \log \sum_z p(x,z|\theta) &\text{complete log-likelihood}\\&= \log\sum_z p'(z|x) \frac{p(x,z|\theta)}{p'(z|x)} &\text{multiplying by 1} \\ &\geq \sum_z p'(z|x) \log \frac{p(x,z|\theta)}{p'(z|x)} &\text{Jensen's inequality}\\&\triangleq \mathcal L (p', \theta) \end{align}$ - this removes dependence on z - steps - E: $p'(z|x, \theta) = \underset{p'}{\text{argmax}}\: \mathcal L(p',\theta, x)$ - M: $\theta = \underset{\theta}{\text{argmax}} \: \mathcal L(p', \theta, x)$ - equivalent to maximizing expected complete log-likelihood - *stochastically* converges to *local* minimum - alternatively, can look at kl-divergences # misc ## nn optimization ### why is it hard? - plateaus - winding canyons - cliffs - local maxima to dodge - saddle points (local max and local min) - most popular - sgd - sgd + nesterov momentum - adam - adagrad - maintains a per-parameter learning rate that improves performance on problems with sparse gradients - rmsprop - (ignore) per-parameter learning rates that are adapted based on the average of recent magnitudes of the gradients for the weight (e.g. how quickly it is changing) - adam - "adaptive moment estimation" (kingma_2015) - keep track of per-parameter learning rate (based on first moment of gradients tracked) and per-parameter second moment (based on variance of gradients tracked) - alpha - learning rate - beta1 - exponential decay rate for first moment estimate - default 0.9 - beta2 - exponential decay rate for 2nd moment estimates (should be higher when gradients sparser) - default 0.999 - epsilon - small number to prevent division by zero - default 1e-8 - usually requires tuning (ex. inception requires 1e-1) ![Screen Shot 2018-10-11 at 8.07.56 AM](../assets/adam.png)visualization - requires low dims - goodfellow 2015 "Qualitatively characterizing neural network optimization problems" plots loss on line from starting point to ending point - could do PCA on params ### complicated is simpler - ex. $x^3 \sin(x)$ is simpler than just $x$ on the domain [−0.01, 0.01] - dropout is like ridge ## mixed integer programming (mip) Notes from this [overview](https://www.gurobi.com/resource/mip-basics/) - ex: minimize $c^{\top} x$ s.t. - $\mathrm{A} \mathrm{x}=\mathrm{b}$ (linear constraints) - $l\leq x \leq u$ (bound constraints) - some or all $x_j$ must take integer values (integrality constraints) - solving: branch-and-bound - integer constraints make this difficult so start by solving the relaxation without integer constraints - pick one of the variables $x_b$ that was not integer to be our *branching variable* - say it's value was 5.7, now solve 2 MIPS, one with constraint $x_b \leq 5$ an $x_b \geq 6$ - return better solution of these two - iterate by solving relaxation and then adding more branching constraints
csinva/csinva.github.io
_notes/math/optimization.md
Markdown
mit
17,292
jest.mock("../../../NativeModules/GraphQLQueryCache") import * as _cache from "../../../NativeModules/GraphQLQueryCache" const cache: jest.Mocked<typeof _cache> = _cache as any import { NetworkError } from "lib/utils/errors" import { cacheMiddleware } from "../cacheMiddleware" describe("cacheMiddleware", () => { const operation = { id: "SomeQueryID", operationKind: "query", } const variables = { id: "banksy", } const cacheConfig = { force: false, } const request = { operation, variables, cacheConfig, fetchOpts: {}, } const response = { json: { artist: { name: "Banksy" } }, status: 200, statusText: "OK" } beforeEach(() => { cache.clear.mockClear() cache.clearAll.mockClear() cache.get.mockClear() cache.set.mockClear() }) const mockedNext = () => { return new Promise(resolve => { resolve(response) }) } describe("without cached data", () => { beforeEach(() => { cache.get.mockImplementation(() => { return Promise.resolve(null) }) }) it("performs a fetch", async () => { const data = await cacheMiddleware()(mockedNext)(request) expect(data).toEqual(response) }) it("caches the fetched data", async () => { await cacheMiddleware()(mockedNext)(request) expect(cache.set.mock.calls.length).toEqual(2) expect(cache.set.mock.calls[0][0]).toEqual(operation.id) }) describe("a response with errors", () => { it("clears the cache and throws an error", async () => { const mockedErrorsNext = () => { return new Promise(resolve => { resolve({ ...response, json: { ...response.json, errors: [{ errorCode: 1234 }], }, }) }) } await expect(cacheMiddleware()(mockedErrorsNext)(request)).rejects.toEqual(new NetworkError("OK")) // 1 cache call means we set request as in-flight. expect(cache.set).toHaveBeenCalledTimes(1) expect(cache.set).toHaveBeenCalledWith(operation.id, variables, null) expect(cache.clear).toHaveBeenCalledWith(operation.id, variables) }) }) }) describe("a 404 response from metaphysics", () => { beforeAll(() => { // @ts-ignore __DEV__ = false }) afterAll(() => { // @ts-ignore __DEV__ = true }) it(`will be retried if the query id was not recognized by MP`, async () => { let rejected = false let retried = false const mockedErrorsNext = req => { if (JSON.parse(req.fetchOpts.body).documentID) { rejected = true return Promise.reject(new Error("Unable to serve persisted query with ID")) } else { retried = true return Promise.resolve({ status: 200, json: { data: { success: true }, errors: undefined }, }) } } await expect(cacheMiddleware()(mockedErrorsNext)(request)).resolves.toMatchObject({ json: { data: { success: true } }, }) expect(rejected).toBe(true) expect(retried).toBe(true) }) it(`will be not be retried if failure was something else`, async () => { let rejected = false let retried = false const mockedErrorsNext = req => { if (JSON.parse(req.fetchOpts.body).documentID) { rejected = true return Promise.reject(new Error("something unrecognized went wrong")) } else { retried = true return Promise.resolve({ status: 200, json: { data: { success: true }, errors: undefined }, }) } } await expect(cacheMiddleware()(mockedErrorsNext)(request)).rejects.toEqual( new Error("something unrecognized went wrong") ) expect(rejected).toBe(true) expect(retried).toBe(false) }) }) describe("a 500 response from metaphysics", () => { it("clears the cache and throws an error", async () => { const mockedErrorsNext = () => { return new Promise(resolve => { resolve({ status: 500, statusText: "some weird 500 HTML page or something", }) }) } await expect(cacheMiddleware()(mockedErrorsNext)(request)).rejects.toEqual( new NetworkError("some weird 500 HTML page or something") ) // 1 cache call means we set request as in-flight. expect(cache.set).toHaveBeenCalledTimes(1) expect(cache.set).toHaveBeenCalledWith(operation.id, variables, null) expect(cache.clear).toHaveBeenCalledWith(operation.id, variables) }) }) describe("with cached data", () => { it("does not perform a fetch by default", async () => { cache.get.mockImplementation(() => Promise.resolve(JSON.stringify(response))) expect(await cacheMiddleware()(mockedNext)(request)).toEqual(response) }) it("does perform a fetch when forced", async () => { const aRequest = { operation, variables, cacheConfig: { force: true }, } expect(await cacheMiddleware()(mockedNext)(aRequest)).toEqual(response) }) it("clears the cache after a mutation", async () => { const bRequest = { operation: { id: "SomeMutation", operationKind: "mutation" }, variables, cacheConfig, } await cacheMiddleware()(mockedNext)(bRequest) expect(cache.clearAll).toHaveBeenCalled() }) }) })
artsy/emission
src/lib/relay/middlewares/__tests__/cacheMiddleware-tests.ts
TypeScript
mit
5,547
<?php // +---------------------------------------------------------------------- // | ShuipFCMS 帐户管理 // +---------------------------------------------------------------------- // | Copyright (c) 2012-2014 http://www.shuipfcms.com, All rights reserved. // +---------------------------------------------------------------------- // | Author: 水平凡 <admin@abc3210.com> // +---------------------------------------------------------------------- namespace Member\Controller; class AccountController extends MemberbaseController { //互联模型 protected $connect = NULL; protected function _initialize() { parent::_initialize(); $this->connect = D('Member/Connect'); } //个人帐户 public function assets() { $this->assign('isqqlogin', $this->connect->getUserAuthorize($this->userid, 'qq')); $this->assign('isweibologin', $this->connect->getUserAuthorize($this->userid, 'sina_weibo')); $this->display(); } //取消绑定 public function cancelbind() { $connectid = I('get.connectid', 0, 'intval'); if (empty($connectid)) { $this->error('参数不正确!'); } //查询出绑定信息 $info = $this->connect->where(array('connectid' => $connectid, 'uid' => $this->userid))->find(); if (empty($info)) { $this->error('该绑定信息不存在,无法解绑!'); } if ($this->connect->connectDel($connectid, $this->userid)) { $this->success('解绑成功!'); } else { $this->error('解绑失败!'); } } //授权绑定 public function authorize() { $type = I('get.type'); if (empty($type)) { $this->error('请指定授权类型!'); } switch ($type) { case 'qq': $redirect_uri = self::$Cache['Config']['siteurl'] . "index.php?g=Member&m=Account&a=qqbind"; header("location:" . $this->connect->getUrlConnectQQ($redirect_uri)); break; case 'sina_weibo': $redirect_uri = self::$Cache['Config']['siteurl'] . "index.php?g=Member&m=Account&a=sinabind"; header("location:" . $this->connect->getUrlConnectSinaWeibo($redirect_uri)); break; default: $this->error('授权类型错误!'); break; } } //QQ绑定 public function qqbind() { $curl = new \Curl(); $sUrl = "https://graph.qq.com/oauth2.0/token"; $aGetParam = array( "grant_type" => "authorization_code", "client_id" => $this->memberConfig['qq_akey'], "client_secret" => $this->memberConfig['qq_skey'], "code" => $_GET["code"], "state" => $_GET["state"], "redirect_uri" => session("redirect_uri") ); session("redirect_uri", NULL); //Step2:通过Authorization Code获取Access Token foreach ($aGetParam as $key => $val) { $aGet[] = $key . "=" . urlencode($val); } $sContent = $curl->get($sUrl . "?" . implode("&", $aGet)); if ($sContent == FALSE) { $this->error("帐号授权出现错误!"); } //参数处理 $aTemp = explode("&", $sContent); $aParam = array(); foreach ($aTemp as $val) { $aTemp2 = explode("=", $val); $aParam[$aTemp2[0]] = $aTemp2[1]; } $sUrl = "https://graph.qq.com/oauth2.0/me"; $aGetParam = array( "access_token" => $aParam["access_token"] ); //$sContent = $this->get($sUrl, $aGetParam); foreach ($aGetParam as $key => $val) { $aGet[] = $key . "=" . urlencode($val); } $sContent = $curl->get($sUrl . "?" . implode("&", $aGet)); if ($sContent == FALSE) { $this->error("帐号授权出现错误!"); } $aTemp = array(); //处理授权成功以后,返回的一串类似:callback( {"client_id":"000","openid":"xxx"} ); preg_match('/callback\(\s+(.*?)\s+\)/i', $sContent, $aTemp); //把json数据转换为数组 $aResult = json_decode($aTemp[1], true); //合并数组,把access_token和expires_in合并。 $Result = array_merge($aResult, $aParam); //检查帐号是否已经绑定过了 if ($this->connect->isUserAuthorize($Result['access_token'], 'qq')) { $this->error('您已经绑定过,不能重复绑定!'); } //绑定 if ($this->connect->connectAdd(array( 'openid' => $Result['openid'], 'uid' => $this->userid, 'app' => 'qq', 'accesstoken' => $Result['access_token'], 'expires' => time() + (int) $Result['expires_in'], ))) { $this->success('绑定成功!', U('Account/assets')); } else { $this->error($this->connect->getError()?:'绑定失败!'); } } //新浪微博绑定 public function sinabind() { $curl = new \Curl(); $sUrl = "https://api.weibo.com/oauth2/access_token"; $aGetParam = array( "code" => $_GET["code"], //用于调用access_token,接口获取授权后的access token "client_id" => $this->memberConfig['sinawb_akey'], //申请应用时分配的AppSecret "client_secret" => $this->memberConfig['sinawb_skey'], //申请应用时分配的AppSecret "grant_type" => "authorization_code", //请求的类型,可以为authorization_code、password、refresh_token。 "redirect_uri" => session("redirect_uri"), //回调地址 ); session("redirect_uri", NULL); $sContent = $curl->post($sUrl, $aGetParam); if ($sContent == FALSE) { $this->error("帐号授权出现错误!"); } //参数处理 $aParam = json_decode($sContent, true); //检查帐号是否已经绑定过了 if ($this->connect->isUserAuthorize($aParam['access_token'], 'sina_weibo')) { $this->error('您已经绑定过,不能重复绑定!'); } //绑定 if ($this->connect->connectAdd(array( 'openid' => $aParam['uid'], 'uid' => $this->userid, 'app' => 'sina_weibo', 'accesstoken' => $aParam['access_token'], 'expires' => time() + (int) $aParam['expires_in'], ))) { $this->success('绑定成功!', U('Account/assets')); } else { $this->error($this->connect->getError()?:'绑定失败!'); } } }
rentianhua/tsf
shuipf/Application/Member/Controller/AccountController.class.php
PHP
mit
6,831
// // Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.8-b130911.1802 // Vedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. // Generato il: 2016.09.12 alle 10:18:45 PM CEST // package org.docbook.ns.docbook; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlIDREF; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Classe Java per anonymous complex type. * * <p>Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;sequence> * &lt;choice maxOccurs="unbounded" minOccurs="0"> * &lt;element ref="{http://docbook.org/ns/docbook}title"/> * &lt;element ref="{http://docbook.org/ns/docbook}titleabbrev"/> * &lt;/choice> * &lt;element ref="{http://docbook.org/ns/docbook}info" minOccurs="0"/> * &lt;/sequence> * &lt;choice maxOccurs="unbounded" minOccurs="0"> * &lt;element ref="{http://docbook.org/ns/docbook}itemizedlist"/> * &lt;element ref="{http://docbook.org/ns/docbook}orderedlist"/> * &lt;element ref="{http://docbook.org/ns/docbook}procedure"/> * &lt;element ref="{http://docbook.org/ns/docbook}simplelist"/> * &lt;element ref="{http://docbook.org/ns/docbook}variablelist"/> * &lt;element ref="{http://docbook.org/ns/docbook}segmentedlist"/> * &lt;element ref="{http://docbook.org/ns/docbook}glosslist"/> * &lt;element ref="{http://docbook.org/ns/docbook}bibliolist"/> * &lt;element ref="{http://docbook.org/ns/docbook}calloutlist"/> * &lt;element ref="{http://docbook.org/ns/docbook}qandaset"/> * &lt;element ref="{http://docbook.org/ns/docbook}example"/> * &lt;element ref="{http://docbook.org/ns/docbook}figure"/> * &lt;element ref="{http://docbook.org/ns/docbook}table"/> * &lt;element ref="{http://docbook.org/ns/docbook}equation"/> * &lt;element ref="{http://docbook.org/ns/docbook}informalexample"/> * &lt;element ref="{http://docbook.org/ns/docbook}informalfigure"/> * &lt;element ref="{http://docbook.org/ns/docbook}informaltable"/> * &lt;element ref="{http://docbook.org/ns/docbook}informalequation"/> * &lt;element ref="{http://docbook.org/ns/docbook}sidebar"/> * &lt;element ref="{http://docbook.org/ns/docbook}blockquote"/> * &lt;element ref="{http://docbook.org/ns/docbook}address"/> * &lt;element ref="{http://docbook.org/ns/docbook}epigraph"/> * &lt;element ref="{http://docbook.org/ns/docbook}mediaobject"/> * &lt;element ref="{http://docbook.org/ns/docbook}screenshot"/> * &lt;element ref="{http://docbook.org/ns/docbook}task"/> * &lt;element ref="{http://docbook.org/ns/docbook}productionset"/> * &lt;element ref="{http://docbook.org/ns/docbook}constraintdef"/> * &lt;element ref="{http://docbook.org/ns/docbook}msgset"/> * &lt;element ref="{http://docbook.org/ns/docbook}screen"/> * &lt;element ref="{http://docbook.org/ns/docbook}literallayout"/> * &lt;element ref="{http://docbook.org/ns/docbook}programlistingco"/> * &lt;element ref="{http://docbook.org/ns/docbook}screenco"/> * &lt;element ref="{http://docbook.org/ns/docbook}programlisting"/> * &lt;element ref="{http://docbook.org/ns/docbook}synopsis"/> * &lt;element ref="{http://docbook.org/ns/docbook}bridgehead"/> * &lt;element ref="{http://docbook.org/ns/docbook}remark"/> * &lt;element ref="{http://docbook.org/ns/docbook}revhistory"/> * &lt;element ref="{http://docbook.org/ns/docbook}indexterm"/> * &lt;element ref="{http://docbook.org/ns/docbook}funcsynopsis"/> * &lt;element ref="{http://docbook.org/ns/docbook}classsynopsis"/> * &lt;element ref="{http://docbook.org/ns/docbook}methodsynopsis"/> * &lt;element ref="{http://docbook.org/ns/docbook}constructorsynopsis"/> * &lt;element ref="{http://docbook.org/ns/docbook}destructorsynopsis"/> * &lt;element ref="{http://docbook.org/ns/docbook}fieldsynopsis"/> * &lt;element ref="{http://docbook.org/ns/docbook}cmdsynopsis"/> * &lt;element ref="{http://docbook.org/ns/docbook}caution"/> * &lt;element ref="{http://docbook.org/ns/docbook}important"/> * &lt;element ref="{http://docbook.org/ns/docbook}note"/> * &lt;element ref="{http://docbook.org/ns/docbook}tip"/> * &lt;element ref="{http://docbook.org/ns/docbook}warning"/> * &lt;element ref="{http://docbook.org/ns/docbook}anchor"/> * &lt;element ref="{http://docbook.org/ns/docbook}para"/> * &lt;element ref="{http://docbook.org/ns/docbook}formalpara"/> * &lt;element ref="{http://docbook.org/ns/docbook}simpara"/> * &lt;element ref="{http://docbook.org/ns/docbook}annotation"/> * &lt;/choice> * &lt;element ref="{http://docbook.org/ns/docbook}listitem" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;attGroup ref="{http://docbook.org/ns/docbook}db.common.attributes"/> * &lt;attGroup ref="{http://docbook.org/ns/docbook}db.common.linking.attributes"/> * &lt;attribute name="role" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" /> * &lt;attribute name="spacing"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token"> * &lt;enumeration value="compact"/> * &lt;enumeration value="normal"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/attribute> * &lt;attribute name="mark" type="{http://www.w3.org/2001/XMLSchema}NMTOKEN" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "titlesAndTitleabbrevs", "info", "itemizedlistsAndOrderedlistsAndProcedures", "listitems" }) @XmlRootElement(name = "itemizedlist") public class Itemizedlist { @XmlElements({ @XmlElement(name = "title", type = Title.class), @XmlElement(name = "titleabbrev", type = Titleabbrev.class) }) protected List<Object> titlesAndTitleabbrevs; protected Info info; @XmlElements({ @XmlElement(name = "itemizedlist", type = Itemizedlist.class), @XmlElement(name = "orderedlist", type = Orderedlist.class), @XmlElement(name = "procedure", type = Procedure.class), @XmlElement(name = "simplelist", type = Simplelist.class), @XmlElement(name = "variablelist", type = Variablelist.class), @XmlElement(name = "segmentedlist", type = Segmentedlist.class), @XmlElement(name = "glosslist", type = Glosslist.class), @XmlElement(name = "bibliolist", type = Bibliolist.class), @XmlElement(name = "calloutlist", type = Calloutlist.class), @XmlElement(name = "qandaset", type = Qandaset.class), @XmlElement(name = "example", type = Example.class), @XmlElement(name = "figure", type = Figure.class), @XmlElement(name = "table", type = Table.class), @XmlElement(name = "equation", type = Equation.class), @XmlElement(name = "informalexample", type = Informalexample.class), @XmlElement(name = "informalfigure", type = Informalfigure.class), @XmlElement(name = "informaltable", type = Informaltable.class), @XmlElement(name = "informalequation", type = Informalequation.class), @XmlElement(name = "sidebar", type = Sidebar.class), @XmlElement(name = "blockquote", type = Blockquote.class), @XmlElement(name = "address", type = Address.class), @XmlElement(name = "epigraph", type = Epigraph.class), @XmlElement(name = "mediaobject", type = Mediaobject.class), @XmlElement(name = "screenshot", type = Screenshot.class), @XmlElement(name = "task", type = Task.class), @XmlElement(name = "productionset", type = Productionset.class), @XmlElement(name = "constraintdef", type = Constraintdef.class), @XmlElement(name = "msgset", type = Msgset.class), @XmlElement(name = "screen", type = Screen.class), @XmlElement(name = "literallayout", type = Literallayout.class), @XmlElement(name = "programlistingco", type = Programlistingco.class), @XmlElement(name = "screenco", type = Screenco.class), @XmlElement(name = "programlisting", type = Programlisting.class), @XmlElement(name = "synopsis", type = Synopsis.class), @XmlElement(name = "bridgehead", type = Bridgehead.class), @XmlElement(name = "remark", type = Remark.class), @XmlElement(name = "revhistory", type = Revhistory.class), @XmlElement(name = "indexterm", type = Indexterm.class), @XmlElement(name = "funcsynopsis", type = Funcsynopsis.class), @XmlElement(name = "classsynopsis", type = Classsynopsis.class), @XmlElement(name = "methodsynopsis", type = Methodsynopsis.class), @XmlElement(name = "constructorsynopsis", type = Constructorsynopsis.class), @XmlElement(name = "destructorsynopsis", type = Destructorsynopsis.class), @XmlElement(name = "fieldsynopsis", type = Fieldsynopsis.class), @XmlElement(name = "cmdsynopsis", type = Cmdsynopsis.class), @XmlElement(name = "caution", type = Caution.class), @XmlElement(name = "important", type = Important.class), @XmlElement(name = "note", type = Note.class), @XmlElement(name = "tip", type = Tip.class), @XmlElement(name = "warning", type = Warning.class), @XmlElement(name = "anchor", type = Anchor.class), @XmlElement(name = "para", type = Para.class), @XmlElement(name = "formalpara", type = Formalpara.class), @XmlElement(name = "simpara", type = Simpara.class), @XmlElement(name = "annotation", type = Annotation.class) }) protected List<Object> itemizedlistsAndOrderedlistsAndProcedures; @XmlElement(name = "listitem", required = true) protected List<Listitem> listitems; @XmlAttribute(name = "role") @XmlSchemaType(name = "anySimpleType") protected String role; @XmlAttribute(name = "spacing") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String spacing; @XmlAttribute(name = "mark") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "NMTOKEN") protected String mark; @XmlAttribute(name = "id", namespace = "http://www.w3.org/XML/1998/namespace") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") protected String id; @XmlAttribute(name = "version") @XmlSchemaType(name = "anySimpleType") protected String commonVersion; @XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace") @XmlSchemaType(name = "anySimpleType") protected String xmlLang; @XmlAttribute(name = "base", namespace = "http://www.w3.org/XML/1998/namespace") @XmlSchemaType(name = "anySimpleType") protected String base; @XmlAttribute(name = "remap") @XmlSchemaType(name = "anySimpleType") protected String remap; @XmlAttribute(name = "xreflabel") @XmlSchemaType(name = "anySimpleType") protected String xreflabel; @XmlAttribute(name = "revisionflag") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String revisionflag; @XmlAttribute(name = "dir") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String dir; @XmlAttribute(name = "arch") @XmlSchemaType(name = "anySimpleType") protected String arch; @XmlAttribute(name = "audience") @XmlSchemaType(name = "anySimpleType") protected String audience; @XmlAttribute(name = "condition") @XmlSchemaType(name = "anySimpleType") protected String condition; @XmlAttribute(name = "conformance") @XmlSchemaType(name = "anySimpleType") protected String conformance; @XmlAttribute(name = "os") @XmlSchemaType(name = "anySimpleType") protected String os; @XmlAttribute(name = "revision") @XmlSchemaType(name = "anySimpleType") protected String commonRevision; @XmlAttribute(name = "security") @XmlSchemaType(name = "anySimpleType") protected String security; @XmlAttribute(name = "userlevel") @XmlSchemaType(name = "anySimpleType") protected String userlevel; @XmlAttribute(name = "vendor") @XmlSchemaType(name = "anySimpleType") protected String vendor; @XmlAttribute(name = "wordsize") @XmlSchemaType(name = "anySimpleType") protected String wordsize; @XmlAttribute(name = "annotations") @XmlSchemaType(name = "anySimpleType") protected String annotations; @XmlAttribute(name = "linkend") @XmlIDREF @XmlSchemaType(name = "IDREF") protected Object linkend; @XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink") @XmlSchemaType(name = "anySimpleType") protected String href; @XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink") @XmlSchemaType(name = "anySimpleType") protected String xlinkType; @XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink") @XmlSchemaType(name = "anySimpleType") protected String xlinkRole; @XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink") @XmlSchemaType(name = "anySimpleType") protected String arcrole; @XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink") @XmlSchemaType(name = "anySimpleType") protected String xlinkTitle; @XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String show; @XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String actuate; /** * Gets the value of the titlesAndTitleabbrevs property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the titlesAndTitleabbrevs property. * * <p> * For example, to add a new item, do as follows: * <pre> * getTitlesAndTitleabbrevs().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Title } * {@link Titleabbrev } * * */ public List<Object> getTitlesAndTitleabbrevs() { if (titlesAndTitleabbrevs == null) { titlesAndTitleabbrevs = new ArrayList<Object>(); } return this.titlesAndTitleabbrevs; } /** * Recupera il valore della proprietà info. * * @return * possible object is * {@link Info } * */ public Info getInfo() { return info; } /** * Imposta il valore della proprietà info. * * @param value * allowed object is * {@link Info } * */ public void setInfo(Info value) { this.info = value; } /** * Gets the value of the itemizedlistsAndOrderedlistsAndProcedures property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the itemizedlistsAndOrderedlistsAndProcedures property. * * <p> * For example, to add a new item, do as follows: * <pre> * getItemizedlistsAndOrderedlistsAndProcedures().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Itemizedlist } * {@link Orderedlist } * {@link Procedure } * {@link Simplelist } * {@link Variablelist } * {@link Segmentedlist } * {@link Glosslist } * {@link Bibliolist } * {@link Calloutlist } * {@link Qandaset } * {@link Example } * {@link Figure } * {@link Table } * {@link Equation } * {@link Informalexample } * {@link Informalfigure } * {@link Informaltable } * {@link Informalequation } * {@link Sidebar } * {@link Blockquote } * {@link Address } * {@link Epigraph } * {@link Mediaobject } * {@link Screenshot } * {@link Task } * {@link Productionset } * {@link Constraintdef } * {@link Msgset } * {@link Screen } * {@link Literallayout } * {@link Programlistingco } * {@link Screenco } * {@link Programlisting } * {@link Synopsis } * {@link Bridgehead } * {@link Remark } * {@link Revhistory } * {@link Indexterm } * {@link Funcsynopsis } * {@link Classsynopsis } * {@link Methodsynopsis } * {@link Constructorsynopsis } * {@link Destructorsynopsis } * {@link Fieldsynopsis } * {@link Cmdsynopsis } * {@link Caution } * {@link Important } * {@link Note } * {@link Tip } * {@link Warning } * {@link Anchor } * {@link Para } * {@link Formalpara } * {@link Simpara } * {@link Annotation } * * */ public List<Object> getItemizedlistsAndOrderedlistsAndProcedures() { if (itemizedlistsAndOrderedlistsAndProcedures == null) { itemizedlistsAndOrderedlistsAndProcedures = new ArrayList<Object>(); } return this.itemizedlistsAndOrderedlistsAndProcedures; } /** * Gets the value of the listitems property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the listitems property. * * <p> * For example, to add a new item, do as follows: * <pre> * getListitems().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Listitem } * * */ public List<Listitem> getListitems() { if (listitems == null) { listitems = new ArrayList<Listitem>(); } return this.listitems; } /** * Recupera il valore della proprietà role. * * @return * possible object is * {@link String } * */ public String getRole() { return role; } /** * Imposta il valore della proprietà role. * * @param value * allowed object is * {@link String } * */ public void setRole(String value) { this.role = value; } /** * Recupera il valore della proprietà spacing. * * @return * possible object is * {@link String } * */ public String getSpacing() { return spacing; } /** * Imposta il valore della proprietà spacing. * * @param value * allowed object is * {@link String } * */ public void setSpacing(String value) { this.spacing = value; } /** * Recupera il valore della proprietà mark. * * @return * possible object is * {@link String } * */ public String getMark() { return mark; } /** * Imposta il valore della proprietà mark. * * @param value * allowed object is * {@link String } * */ public void setMark(String value) { this.mark = value; } /** * Recupera il valore della proprietà id. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Imposta il valore della proprietà id. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Recupera il valore della proprietà commonVersion. * * @return * possible object is * {@link String } * */ public String getCommonVersion() { return commonVersion; } /** * Imposta il valore della proprietà commonVersion. * * @param value * allowed object is * {@link String } * */ public void setCommonVersion(String value) { this.commonVersion = value; } /** * Recupera il valore della proprietà xmlLang. * * @return * possible object is * {@link String } * */ public String getXmlLang() { return xmlLang; } /** * Imposta il valore della proprietà xmlLang. * * @param value * allowed object is * {@link String } * */ public void setXmlLang(String value) { this.xmlLang = value; } /** * Recupera il valore della proprietà base. * * @return * possible object is * {@link String } * */ public String getBase() { return base; } /** * Imposta il valore della proprietà base. * * @param value * allowed object is * {@link String } * */ public void setBase(String value) { this.base = value; } /** * Recupera il valore della proprietà remap. * * @return * possible object is * {@link String } * */ public String getRemap() { return remap; } /** * Imposta il valore della proprietà remap. * * @param value * allowed object is * {@link String } * */ public void setRemap(String value) { this.remap = value; } /** * Recupera il valore della proprietà xreflabel. * * @return * possible object is * {@link String } * */ public String getXreflabel() { return xreflabel; } /** * Imposta il valore della proprietà xreflabel. * * @param value * allowed object is * {@link String } * */ public void setXreflabel(String value) { this.xreflabel = value; } /** * Recupera il valore della proprietà revisionflag. * * @return * possible object is * {@link String } * */ public String getRevisionflag() { return revisionflag; } /** * Imposta il valore della proprietà revisionflag. * * @param value * allowed object is * {@link String } * */ public void setRevisionflag(String value) { this.revisionflag = value; } /** * Recupera il valore della proprietà dir. * * @return * possible object is * {@link String } * */ public String getDir() { return dir; } /** * Imposta il valore della proprietà dir. * * @param value * allowed object is * {@link String } * */ public void setDir(String value) { this.dir = value; } /** * Recupera il valore della proprietà arch. * * @return * possible object is * {@link String } * */ public String getArch() { return arch; } /** * Imposta il valore della proprietà arch. * * @param value * allowed object is * {@link String } * */ public void setArch(String value) { this.arch = value; } /** * Recupera il valore della proprietà audience. * * @return * possible object is * {@link String } * */ public String getAudience() { return audience; } /** * Imposta il valore della proprietà audience. * * @param value * allowed object is * {@link String } * */ public void setAudience(String value) { this.audience = value; } /** * Recupera il valore della proprietà condition. * * @return * possible object is * {@link String } * */ public String getCondition() { return condition; } /** * Imposta il valore della proprietà condition. * * @param value * allowed object is * {@link String } * */ public void setCondition(String value) { this.condition = value; } /** * Recupera il valore della proprietà conformance. * * @return * possible object is * {@link String } * */ public String getConformance() { return conformance; } /** * Imposta il valore della proprietà conformance. * * @param value * allowed object is * {@link String } * */ public void setConformance(String value) { this.conformance = value; } /** * Recupera il valore della proprietà os. * * @return * possible object is * {@link String } * */ public String getOs() { return os; } /** * Imposta il valore della proprietà os. * * @param value * allowed object is * {@link String } * */ public void setOs(String value) { this.os = value; } /** * Recupera il valore della proprietà commonRevision. * * @return * possible object is * {@link String } * */ public String getCommonRevision() { return commonRevision; } /** * Imposta il valore della proprietà commonRevision. * * @param value * allowed object is * {@link String } * */ public void setCommonRevision(String value) { this.commonRevision = value; } /** * Recupera il valore della proprietà security. * * @return * possible object is * {@link String } * */ public String getSecurity() { return security; } /** * Imposta il valore della proprietà security. * * @param value * allowed object is * {@link String } * */ public void setSecurity(String value) { this.security = value; } /** * Recupera il valore della proprietà userlevel. * * @return * possible object is * {@link String } * */ public String getUserlevel() { return userlevel; } /** * Imposta il valore della proprietà userlevel. * * @param value * allowed object is * {@link String } * */ public void setUserlevel(String value) { this.userlevel = value; } /** * Recupera il valore della proprietà vendor. * * @return * possible object is * {@link String } * */ public String getVendor() { return vendor; } /** * Imposta il valore della proprietà vendor. * * @param value * allowed object is * {@link String } * */ public void setVendor(String value) { this.vendor = value; } /** * Recupera il valore della proprietà wordsize. * * @return * possible object is * {@link String } * */ public String getWordsize() { return wordsize; } /** * Imposta il valore della proprietà wordsize. * * @param value * allowed object is * {@link String } * */ public void setWordsize(String value) { this.wordsize = value; } /** * Recupera il valore della proprietà annotations. * * @return * possible object is * {@link String } * */ public String getAnnotations() { return annotations; } /** * Imposta il valore della proprietà annotations. * * @param value * allowed object is * {@link String } * */ public void setAnnotations(String value) { this.annotations = value; } /** * Recupera il valore della proprietà linkend. * * @return * possible object is * {@link Object } * */ public Object getLinkend() { return linkend; } /** * Imposta il valore della proprietà linkend. * * @param value * allowed object is * {@link Object } * */ public void setLinkend(Object value) { this.linkend = value; } /** * Recupera il valore della proprietà href. * * @return * possible object is * {@link String } * */ public String getHref() { return href; } /** * Imposta il valore della proprietà href. * * @param value * allowed object is * {@link String } * */ public void setHref(String value) { this.href = value; } /** * Recupera il valore della proprietà xlinkType. * * @return * possible object is * {@link String } * */ public String getXlinkType() { return xlinkType; } /** * Imposta il valore della proprietà xlinkType. * * @param value * allowed object is * {@link String } * */ public void setXlinkType(String value) { this.xlinkType = value; } /** * Recupera il valore della proprietà xlinkRole. * * @return * possible object is * {@link String } * */ public String getXlinkRole() { return xlinkRole; } /** * Imposta il valore della proprietà xlinkRole. * * @param value * allowed object is * {@link String } * */ public void setXlinkRole(String value) { this.xlinkRole = value; } /** * Recupera il valore della proprietà arcrole. * * @return * possible object is * {@link String } * */ public String getArcrole() { return arcrole; } /** * Imposta il valore della proprietà arcrole. * * @param value * allowed object is * {@link String } * */ public void setArcrole(String value) { this.arcrole = value; } /** * Recupera il valore della proprietà xlinkTitle. * * @return * possible object is * {@link String } * */ public String getXlinkTitle() { return xlinkTitle; } /** * Imposta il valore della proprietà xlinkTitle. * * @param value * allowed object is * {@link String } * */ public void setXlinkTitle(String value) { this.xlinkTitle = value; } /** * Recupera il valore della proprietà show. * * @return * possible object is * {@link String } * */ public String getShow() { return show; } /** * Imposta il valore della proprietà show. * * @param value * allowed object is * {@link String } * */ public void setShow(String value) { this.show = value; } /** * Recupera il valore della proprietà actuate. * * @return * possible object is * {@link String } * */ public String getActuate() { return actuate; } /** * Imposta il valore della proprietà actuate. * * @param value * allowed object is * {@link String } * */ public void setActuate(String value) { this.actuate = value; } }
mcaliman/dochi
src/org/docbook/ns/docbook/Itemizedlist.java
Java
mit
33,730
import angular from 'angular-fix'; import utils from '../other/utils'; export default formlyConfig; // @ngInject function formlyConfig(formlyUsabilityProvider, formlyErrorAndWarningsUrlPrefix, formlyApiCheck) { const typeMap = {}; const templateWrappersMap = {}; const defaultWrapperName = 'default'; const _this = this; const getError = formlyUsabilityProvider.getFormlyError; angular.extend(this, { setType, getType, getTypeHeritage, setWrapper, getWrapper, getWrapperByType, removeWrapperByName, removeWrappersForType, disableWarnings: false, extras: { disableNgModelAttrsManipulator: false, fieldTransform: [], ngModelAttrsManipulatorPreferUnbound: false, removeChromeAutoComplete: false, defaultHideDirective: 'ng-if', getFieldId: null }, templateManipulators: { preWrapper: [], postWrapper: [] }, $get: () => this }); function setType(options) { if (angular.isArray(options)) { const allTypes = []; angular.forEach(options, item => { allTypes.push(setType(item)); }); return allTypes; } else if (angular.isObject(options)) { checkType(options); if (options.extends) { extendTypeOptions(options); } typeMap[options.name] = options; return typeMap[options.name]; } else { throw getError(`You must provide an object or array for setType. You provided: ${JSON.stringify(arguments)}`); } } function checkType(options) { formlyApiCheck.throw(formlyApiCheck.formlyTypeOptions, options, { prefix: 'formlyConfig.setType', url: 'settype-validation-failed' }); if (!options.overwriteOk) { checkOverwrite(options.name, typeMap, options, 'types'); } else { options.overwriteOk = undefined; } } function extendTypeOptions(options) { const extendsType = getType(options.extends, true, options); extendTypeControllerFunction(options, extendsType); extendTypeLinkFunction(options, extendsType); extendTypeDefaultOptions(options, extendsType); utils.reverseDeepMerge(options, extendsType); extendTemplate(options, extendsType); } function extendTemplate(options, extendsType) { if (options.template && extendsType.templateUrl) { delete options.templateUrl; } else if (options.templateUrl && extendsType.template) { delete options.template; } } function extendTypeControllerFunction(options, extendsType) { const extendsCtrl = extendsType.controller; if (!angular.isDefined(extendsCtrl)) { return; } const optionsCtrl = options.controller; if (angular.isDefined(optionsCtrl)) { options.controller = function($scope, $controller) { $controller(extendsCtrl, {$scope}); $controller(optionsCtrl, {$scope}); }; options.controller.$inject = ['$scope', '$controller']; } else { options.controller = extendsCtrl; } } function extendTypeLinkFunction(options, extendsType) { const extendsFn = extendsType.link; if (!angular.isDefined(extendsFn)) { return; } const optionsFn = options.link; if (angular.isDefined(optionsFn)) { options.link = function() { extendsFn(...arguments); optionsFn(...arguments); }; } else { options.link = extendsFn; } } function extendTypeDefaultOptions(options, extendsType) { const extendsDO = extendsType.defaultOptions; if (!angular.isDefined(extendsDO)) { return; } const optionsDO = options.defaultOptions; const optionsDOIsFn = angular.isFunction(optionsDO); const extendsDOIsFn = angular.isFunction(extendsDO); if (extendsDOIsFn) { options.defaultOptions = function defaultOptions(opts, scope) { const extendsDefaultOptions = extendsDO(opts, scope); const mergedDefaultOptions = {}; utils.reverseDeepMerge(mergedDefaultOptions, opts, extendsDefaultOptions); let extenderOptionsDefaultOptions = optionsDO; if (optionsDOIsFn) { extenderOptionsDefaultOptions = extenderOptionsDefaultOptions(mergedDefaultOptions, scope); } utils.reverseDeepMerge(extendsDefaultOptions, extenderOptionsDefaultOptions); return extendsDefaultOptions; }; } else if (optionsDOIsFn) { options.defaultOptions = function defaultOptions(opts, scope) { const newDefaultOptions = {}; utils.reverseDeepMerge(newDefaultOptions, opts, extendsDO); return optionsDO(newDefaultOptions, scope); }; } } function getType(name, throwError, errorContext) { if (!name) { return undefined; } const type = typeMap[name]; if (!type && throwError === true) { throw getError( `There is no type by the name of "${name}": ${JSON.stringify(errorContext)}` ); } else { return type; } } function getTypeHeritage(parent) { const heritage = []; let type = parent; if (angular.isString(type)) { type = getType(parent); } parent = type.extends; while (parent) { type = getType(parent); heritage.push(type); parent = type.extends; } return heritage; } function setWrapper(options, name) { if (angular.isArray(options)) { return options.map(wrapperOptions => setWrapper(wrapperOptions)); } else if (angular.isObject(options)) { options.types = getOptionsTypes(options); options.name = getOptionsName(options, name); checkWrapperAPI(options); templateWrappersMap[options.name] = options; return options; } else if (angular.isString(options)) { return setWrapper({ template: options, name }); } } function getOptionsTypes(options) { if (angular.isString(options.types)) { return [options.types]; } if (!angular.isDefined(options.types)) { return []; } else { return options.types; } } function getOptionsName(options, name) { return options.name || name || options.types.join(' ') || defaultWrapperName; } function checkWrapperAPI(options) { formlyUsabilityProvider.checkWrapper(options); if (options.template) { formlyUsabilityProvider.checkWrapperTemplate(options.template, options); } if (!options.overwriteOk) { checkOverwrite(options.name, templateWrappersMap, options, 'templateWrappers'); } else { delete options.overwriteOk; } checkWrapperTypes(options); } function checkWrapperTypes(options) { const shouldThrow = !angular.isArray(options.types) || !options.types.every(angular.isString); if (shouldThrow) { throw getError(`Attempted to create a template wrapper with types that is not a string or an array of strings`); } } function checkOverwrite(property, object, newValue, objectName) { if (object.hasOwnProperty(property)) { warn('overwriting-types-or-wrappers', [ `Attempting to overwrite ${property} on ${objectName} which is currently`, `${JSON.stringify(object[property])} with ${JSON.stringify(newValue)}`, `To supress this warning, specify the property "overwriteOk: true"` ].join(' ')); } } function getWrapper(name) { return templateWrappersMap[name || defaultWrapperName]; } function getWrapperByType(type) { /* eslint prefer-const:0 */ const wrappers = []; for (let name in templateWrappersMap) { if (templateWrappersMap.hasOwnProperty(name)) { if (templateWrappersMap[name].types && templateWrappersMap[name].types.indexOf(type) !== -1) { wrappers.push(templateWrappersMap[name]); } } } return wrappers; } function removeWrapperByName(name) { const wrapper = templateWrappersMap[name]; delete templateWrappersMap[name]; return wrapper; } function removeWrappersForType(type) { const wrappers = getWrapperByType(type); if (!wrappers) { return undefined; } if (!angular.isArray(wrappers)) { return removeWrapperByName(wrappers.name); } else { wrappers.forEach((wrapper) => removeWrapperByName(wrapper.name)); return wrappers; } } function warn() { if (!_this.disableWarnings && console.warn) { /* eslint no-console:0 */ const args = Array.prototype.slice.call(arguments); const warnInfoSlug = args.shift(); args.unshift('Formly Warning:'); args.push(`${formlyErrorAndWarningsUrlPrefix}${warnInfoSlug}`); console.warn(...args); } } }
kentcdodds/angular-formly
src/providers/formlyConfig.js
JavaScript
mit
8,628
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | DATABASE CONNECTIVITY SETTINGS | ------------------------------------------------------------------- | This file will contain the settings needed to access your database. | | For complete instructions please consult the 'Database Connection' | page of the User Guide. | | ------------------------------------------------------------------- | EXPLANATION OF VARIABLES | ------------------------------------------------------------------- | | ['dsn'] The full DSN string describe a connection to the database. | ['hostname'] The hostname of your database server. | ['username'] The username used to connect to the database | ['password'] The password used to connect to the database | ['database'] The name of the database you want to connect to | ['dbdriver'] The database driver. e.g.: mysqli. | Currently supported: | cubrid, ibase, mssql, mysql, mysqli, oci8, | odbc, pdo, postgre, sqlite, sqlite3, sqlsrv | ['dbprefix'] You can add an optional prefix, which will be added | to the table name when using the Query Builder class | ['pconnect'] TRUE/FALSE - Whether to use a persistent connection | ['db_debug'] TRUE/FALSE - Whether database errors should be displayed. | ['cache_on'] TRUE/FALSE - Enables/disables query caching | ['cachedir'] The path to the folder where cache files should be stored | ['char_set'] The character set used in communicating with the database | ['dbcollat'] The character collation used in communicating with the database | NOTE: For MySQL and MySQLi databases, this setting is only used | as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7 | (and in table creation queries made with DB Forge). | There is an incompatibility in PHP with mysql_real_escape_string() which | can make your site vulnerable to SQL injection if you are using a | multi-byte character set and are running versions lower than these. | Sites using Latin-1 or UTF-8 database character set and collation are unaffected. | ['swap_pre'] A default table prefix that should be swapped with the dbprefix | ['encrypt'] Whether or not to use an encrypted connection. | | 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE | 'mysqli' and 'pdo/mysql' drivers accept an array with the following options: | | 'ssl_key' - Path to the private key file | 'ssl_cert' - Path to the public key certificate file | 'ssl_ca' - Path to the certificate authority file | 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format | 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':') | 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only) | | ['compress'] Whether or not to use client compression (MySQL only) | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections | - good for ensuring strict SQL while developing | ['ssl_options'] Used to set various SSL options that can be used when making SSL connections. | ['failover'] array - A array with 0 or more data for connections if the main should fail. | ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries. | NOTE: Disabling this will also effectively disable both | $this->db->last_query() and profiling of DB queries. | When you run a query, with this setting set to TRUE (default), | CodeIgniter will store the SQL statement for debugging purposes. | However, this may cause high memory usage, especially if you run | a lot of SQL queries ... disable this to avoid that problem. | | The $active_group variable lets you choose which connection group to | make active. By default there is only one group (the 'default' group). | | The $query_builder variables lets you determine whether or not to load | the query builder class. */ $active_group = 'default'; $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'controlx', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
leleuvilela/controlx
application/config/database.php
PHP
mit
4,527
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { HomeComponent as Home } from '../components'; import { ProtectedContainer } from '.'; class HomeContainer extends Component { render () { return ( <ProtectedContainer> <Home user={this.props.user} /> </ProtectedContainer> ); } } HomeContainer.navigationOptions = { title: 'Home', drawerLabel: 'Home' }; export default connect( state => ({ user: state.user }) )(HomeContainer);
advantys/workflowgen-templates
integration/azure/authentication/azure-v1/auth-code-pkce/WorkflowGenExample/containers/HomeContainer.js
JavaScript
mit
515
# encoding: utf-8 require 'spec_helper' describe "Form I Past" do context "regular past" do it 'conjugates form I regular past' do verb = Verb.new({root1: "ك", root2: "ت", root3: "ب", form: "1", tense: "past", pronoun: :she}) expect(verb.conjugate).to eq("كتبت") end it 'conjugates form I regular past with first radical hamza' do verb = Verb.new({root1: "ء", root2: "ك", root3: "ل", form: "1", tense: "past", pronoun: :she}) expect(verb.conjugate).to eq("أكلت") end it 'conjugates form I regular past with second radical hamza' do verb = Verb.new({root1: "س", root2: "ء", root3: "ل", form: "1", tense: "past", pronoun: :they}) expect(verb.conjugate).to eq("سألوا") end it 'conjugates form I regular past with third radical hamza' do verb = Verb.new({root1: "ج", root2: "ر", root3: "ء", form: "1", tense: "past", pronoun: :she}) expect(verb.conjugate).to eq("جرؤت") end end context "defective past" do it 'conjugates form I defective past with final root waaw, :he' do verb = Verb.new({root1: "ش", root2: "ك", root3: "و", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("شكا") end it 'conjugates form I defective past with final root waaw, :you_m' do verb = Verb.new({root1: "ش", root2: "ك", root3: "و", form: "1", tense: "past", pronoun: :you_m}) expect(verb.conjugate).to eq("شكوت") end it 'conjugates form I defective past, final root waaw, irregular' do verb = Verb.new({root1: "ر", root2: "ض", root3: "و", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("رضى") end it 'conjugates form I defective past with final root yaa' do verb = Verb.new({root1: "د", root2: "ع", root3: "ي", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("دعى") end it 'conjugates form I defective past with final root yaa, you_pl' do verb = Verb.new({root1: "د", root2: "ع", root3: "ي", form: "1", tense: "past", pronoun: :you_pl}) expect(verb.conjugate).to eq("دعيتم") end it 'conjugates form I defective past with final root yaa, irregular' do verb = Verb.new({root1: "ن", root2: "س", root3: "ي", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("نسي") end end context "hollow-defective past" do it 'conjugates form I hollow-defective, waaw-yaa' do verb = Verb.new({root1: "ر", root2: "و", root3: "ي", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("روى") end it 'conjugates form I hollow-defective, waaw-yaa, irregular' do verb = Verb.new({root1: "س", root2: "و", root3: "ي", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("سوي") end it 'conjugates form I hollow-defective, yaa-yaa' do verb = Verb.new({root1: "ح", root2: "ي", root3: "ي", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("حيي") end end context 'assimilated-defective past' do it 'conjugates form I assimilated-defective, waaw-yaa, :they' do verb = Verb.new({root1: "و", root2: "ف", root3: "ي", form: "1", tense: "past", pronoun: :they}) expect(verb.conjugate).to eq("وفوا") end it 'conjugates form I assimilated-defective, waaw-yaa, :he' do verb = Verb.new({root1: "و", root2: "ف", root3: "ي", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("وفى") end it 'conjugates form I assimilated-defective, waawy-yaa, irregular' do verb = Verb.new({root1: "و", root2: "ل", root3: "ي", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("ولي") end end context 'hamzated-defective past' do it 'conjugates form I hamzated-defective, second radical hamza' do verb = Verb.new({root1: "ر", root2: "ء", root3: "ي", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("رأى") end end context "hollow past" do it 'conjugates form I hollow past, :he' do verb = Verb.new({root1: "ق", root2: "و", root3: "ل", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("قال") end it 'conjugates form I hollow past, :you_f' do verb = Verb.new({root1: "ق", root2: "و", root3: "ل", form: "1", tense: "past", pronoun: :you_f}) expect(verb.conjugate).to eq("قلت") end it 'conjugates form I hollow past, irregular, :he' do verb = Verb.new({root1: "ل", root2: "ي", root3: "س", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("ليس") end end context 'hollow-hamzated' do it 'conjugates form I hollow past with third radical hamza, :he' do verb = Verb.new({root1: "ج", root2: "ي", root3: "ء", form: "1", tense: "past", pronoun: :he}) expect(verb.conjugate).to eq("جاء") end it 'conjugates form I hollow past with third radical hamza, :you_m' do verb = Verb.new({root1: "ج", root2: "ي", root3: "ء", form: "1", tense: "past", pronoun: :you_m}) expect(verb.conjugate).to eq("جئت") end end context "assimilated past" do it 'conjugates form I assimilated past with root 1 waaw' do verb = Verb.new({root1: "و", root2: "ص", root3: "ف", form: "1", tense: "past", pronoun: :she}) expect(verb.conjugate).to eq("وصفت") end it 'conjugates form I assimilated past with root 1 yaa' do verb = Verb.new({root1: "ي", root2: "ق", root3: "ظ", form: "1", tense: "past", pronoun: :you_m}) expect(verb.conjugate).to eq("يقظت") end end context "doubled past" do it 'conjugates form I doubled past, :you_m' do verb = Verb.new({root1: "ر", root2: "د", root3: "د", form: "1", tense: "past", pronoun: :you_m}) expect(verb.conjugate).to eq("رددت") end it 'conjugates form I doubled past, :she' do verb = Verb.new({root1: "ر", root2: "د", root3: "د", form: "1", tense: "past", pronoun: :she}) expect(verb.conjugate).to eq("ردّت") end it 'conjugates form I doubled assimilated past' do verb = Verb.new({root1: "و", root2: "د", root3: "د", form: "1", tense: "past", pronoun: :she}) expect(verb.conjugate).to eq("ودّت") end end end
awillborn/Arabic-Conjugator
spec/past_tense/formI_past_spec.rb
Ruby
mit
6,446
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class MeiziItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() page_num = scrapy.Field() img_url = scrapy.Field() img_md5 = scrapy.Field() up_vote = scrapy.Field() down_vote = scrapy.Field() image_urls = scrapy.Field() images = scrapy.Field()
JMwill/wiki
notebook/tool/spider/meizi_spider/python_spider/meizi/meizi/items.py
Python
mit
514
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Network::Mgmt::V2018_02_01 module Models # # Response for ListPeering API service call retrieves all peerings that # belong to an ExpressRouteCrossConnection. # class ExpressRouteCrossConnectionPeeringList include MsRestAzure include MsRest::JSONable # @return [Array<ExpressRouteCrossConnectionPeering>] The peerings in an # express route cross connection. attr_accessor :value # @return [String] The URL to get the next set of results. attr_accessor :next_link # return [Proc] with next page method call. attr_accessor :next_method # # Gets the rest of the items for the request, enabling auto-pagination. # # @return [Array<ExpressRouteCrossConnectionPeering>] operation results. # def get_all_items items = @value page = self while page.next_link != nil && !page.next_link.strip.empty? do page = page.get_next_page items.concat(page.value) end items end # # Gets the next page of results. # # @return [ExpressRouteCrossConnectionPeeringList] with next page # content. # def get_next_page response = @next_method.call(@next_link).value! unless @next_method.nil? unless response.nil? @next_link = response.body.next_link @value = response.body.value self end end # # Mapper for ExpressRouteCrossConnectionPeeringList class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { client_side_validation: true, required: false, serialized_name: 'ExpressRouteCrossConnectionPeeringList', type: { name: 'Composite', class_name: 'ExpressRouteCrossConnectionPeeringList', model_properties: { value: { client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'ExpressRouteCrossConnectionPeeringElementType', type: { name: 'Composite', class_name: 'ExpressRouteCrossConnectionPeering' } } } }, next_link: { client_side_validation: true, required: false, read_only: true, serialized_name: 'nextLink', type: { name: 'String' } } } } } end end end end
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-02-01/generated/azure_mgmt_network/models/express_route_cross_connection_peering_list.rb
Ruby
mit
3,078
<!DOCTYPE HTML> <html lang="default"> <head> <meta charset="UTF-8"> <title>categories | 思卓</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, minimum-scale=1"> <meta name="author" content="bobird"> <link rel="icon" href="/img/favicon.ico"> <link rel="apple-touch-icon" href="/img/pacman.jpg"> <link rel="apple-touch-icon-precomposed" href="/img/pacman.jpg"> <link rel="stylesheet" href="/css/style.css"> </head> <body> <header> <div> <div id="textlogo"> <h1 class="site-name"><a href="/" title="思卓">思卓</a></h1> <h2 class="blog-motto">It&#39;s only too late if you decide it is. Get busy living. or get busy dying!</h2> </div> <div class="navbar"><a class="navbutton navmobile" href="#" title="Menu"> </a></div> <nav class="animated"> <ul> <li><a href="/">Home</a></li> <li><a href="/archives">Archives</a></li> <li> <form class="search" action="//google.com/search" method="get" accept-charset="utf-8"> <label>Search</label> <input type="text" id="search" name="q" autocomplete="off" maxlength="20" placeholder="Search" /> <input type="hidden" name="q" value="site:yoursite.com"> </form> </li> </ul> </nav> </div> </header> <div id="container"> <div class="archive-title" > <h2 class="category-icon">Categories</h2> </div> <div id="main" class="archive-part"> <div class="all-list-box"></div> </div> </div> <script src="/js/jquery-2.1.0.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('.navbar').click(function(){ $('header nav').toggleClass('shownav'); }); var myWidth = 0; function getSize(){ if( typeof( window.innerWidth ) == 'number' ) { myWidth = window.innerWidth; } else if( document.documentElement && document.documentElement.clientWidth) { myWidth = document.documentElement.clientWidth; }; }; var m = $('#main'), a = $('#asidepart'), c = $('.closeaside'), o = $('.openaside'); $(window).resize(function(){ getSize(); if (myWidth >= 1024) { $('header nav').removeClass('shownav'); }else { m.removeClass('moveMain'); a.css('display', 'block').removeClass('fadeOut'); o.css('display', 'none'); } }); c.click(function(){ a.addClass('fadeOut').css('display', 'none'); o.css('display', 'block').addClass('fadeIn'); m.addClass('moveMain'); }); o.click(function(){ o.css('display', 'none').removeClass('beforeFadeIn'); a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn'); m.removeClass('moveMain'); }); $(window).scroll(function(){ o.css("top",Math.max(80,260-$(this).scrollTop())); }); }); </script> <script type="text/javascript"> $(document).ready(function(){ var list = $('.archive-title a'), box = $('.all-list-box'), first = $('.archive-title a:first-of-type'); box.load(first.attr('data-src').toString()+' #archive-page'); first.addClass('current'); list.each(function(){ $(this).click(function(){ var listSrc=$(this).attr('data-src').toString()+' #archive-page'; box.load(listSrc); list.removeClass('current'); $(this).addClass('current'); }); }); }); </script> </body> </html>
HBobird/HBobird.github.io
categories/index.html
HTML
mit
3,510
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "irc.h" #include "net.h" #include "strlcpy.h" #include "base58.h" using namespace std; using namespace boost; int nGotIRCAddresses = 0; void ThreadIRCSeed2(void* parg); #pragma pack(push, 1) struct ircaddr { struct in_addr ip; short port; }; #pragma pack(pop) string EncodeAddress(const CService& addr) { struct ircaddr tmp; if (addr.GetInAddr(&tmp.ip)) { tmp.port = htons(addr.GetPort()); vector<unsigned char> vch(UBEGIN(tmp), UEND(tmp)); return string("u") + EncodeBase58Check(vch); } return ""; } bool DecodeAddress(string str, CService& addr) { vector<unsigned char> vch; if (!DecodeBase58Check(str.substr(1), vch)) return false; struct ircaddr tmp; if (vch.size() != sizeof(tmp)) return false; memcpy(&tmp, &vch[0], sizeof(tmp)); addr = CService(tmp.ip, ntohs(tmp.port)); return true; } static bool Send(SOCKET hSocket, const char* pszSend) { if (strstr(pszSend, "PONG") != pszSend) printf("IRC SENDING: %s\n", pszSend); const char* psz = pszSend; const char* pszEnd = psz + strlen(psz); while (psz < pszEnd) { int ret = send(hSocket, psz, pszEnd - psz, MSG_NOSIGNAL); if (ret < 0) return false; psz += ret; } return true; } bool RecvLineIRC(SOCKET hSocket, string& strLine) { loop { bool fRet = RecvLine(hSocket, strLine); if (fRet) { if (fShutdown) return false; vector<string> vWords; ParseString(strLine, ' ', vWords); if (vWords.size() >= 1 && vWords[0] == "PING") { strLine[1] = 'O'; strLine += '\r'; Send(hSocket, strLine.c_str()); continue; } } return fRet; } } int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const char* psz3=NULL, const char* psz4=NULL) { loop { string strLine; strLine.reserve(10000); if (!RecvLineIRC(hSocket, strLine)) return 0; printf("IRC %s\n", strLine.c_str()); if (psz1 && strLine.find(psz1) != string::npos) return 1; if (psz2 && strLine.find(psz2) != string::npos) return 2; if (psz3 && strLine.find(psz3) != string::npos) return 3; if (psz4 && strLine.find(psz4) != string::npos) return 4; } } bool Wait(int nSeconds) { if (fShutdown) return false; printf("IRC waiting %d seconds to reconnect\n", nSeconds); for (int i = 0; i < nSeconds; i++) { if (fShutdown) return false; Sleep(1000); } return true; } bool RecvCodeLine(SOCKET hSocket, const char* psz1, string& strRet) { strRet.clear(); loop { string strLine; if (!RecvLineIRC(hSocket, strLine)) return false; vector<string> vWords; ParseString(strLine, ' ', vWords); if (vWords.size() < 2) continue; if (vWords[1] == psz1) { printf("IRC %s\n", strLine.c_str()); strRet = strLine; return true; } } } bool GetIPFromIRC(SOCKET hSocket, string strMyName, CNetAddr& ipRet) { Send(hSocket, strprintf("USERHOST %s\r", strMyName.c_str()).c_str()); string strLine; if (!RecvCodeLine(hSocket, "302", strLine)) return false; vector<string> vWords; ParseString(strLine, ' ', vWords); if (vWords.size() < 4) return false; string str = vWords[3]; if (str.rfind("@") == string::npos) return false; string strHost = str.substr(str.rfind("@")+1); // Hybrid IRC used by lfnet always returns IP when you userhost yourself, // but in case another IRC is ever used this should work. printf("GetIPFromIRC() got userhost %s\n", strHost.c_str()); CNetAddr addr(strHost, true); if (!addr.IsValid()) return false; ipRet = addr; return true; } void ThreadIRCSeed(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadIRCSeed(parg)); // Make this thread recognisable as the IRC seeding thread RenameThread("bitcoin-ircseed"); try { ThreadIRCSeed2(parg); } catch (std::exception& e) { PrintExceptionContinue(&e, "ThreadIRCSeed()"); } catch (...) { PrintExceptionContinue(NULL, "ThreadIRCSeed()"); } printf("ThreadIRCSeed exited\n"); } void ThreadIRCSeed2(void* parg) { /* Dont advertise on IRC if we don't allow incoming connections */ if (mapArgs.count("-connect") || fNoListen) return; if (!GetBoolArg("-irc", false)) return; printf("ThreadIRCSeed started\n"); int nErrorWait = 10; int nRetryWait = 10; while (!fShutdown) { CService addrConnect("92.243.23.21", 6667); // irc.lfnet.org CService addrIRC("irc.lfnet.org", 6667, true); if (addrIRC.IsValid()) addrConnect = addrIRC; SOCKET hSocket; if (!ConnectSocket(addrConnect, hSocket)) { printf("IRC connect failed\n"); nErrorWait = nErrorWait * 11 / 10; if (Wait(nErrorWait += 60)) continue; else return; } if (!RecvUntil(hSocket, "Found your hostname", "using your IP address instead", "Couldn't look up your hostname", "ignoring hostname")) { closesocket(hSocket); hSocket = INVALID_SOCKET; nErrorWait = nErrorWait * 11 / 10; if (Wait(nErrorWait += 60)) continue; else return; } CNetAddr addrIPv4("1.2.3.4"); // arbitrary IPv4 address to make GetLocal prefer IPv4 addresses CService addrLocal; string strMyName; if (GetLocal(addrLocal, &addrIPv4)) strMyName = EncodeAddress(GetLocalAddress(&addrConnect)); if (strMyName == "") strMyName = strprintf("x%u", GetRand(1000000000)); Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str()); Send(hSocket, strprintf("USER %s 8 * : %s\r", strMyName.c_str(), strMyName.c_str()).c_str()); int nRet = RecvUntil(hSocket, " 004 ", " 433 "); if (nRet != 1) { closesocket(hSocket); hSocket = INVALID_SOCKET; if (nRet == 2) { printf("IRC name already in use\n"); Wait(10); continue; } nErrorWait = nErrorWait * 11 / 10; if (Wait(nErrorWait += 60)) continue; else return; } Sleep(500); // Get our external IP from the IRC server and re-nick before joining the channel CNetAddr addrFromIRC; if (GetIPFromIRC(hSocket, strMyName, addrFromIRC)) { printf("GetIPFromIRC() returned %s\n", addrFromIRC.ToString().c_str()); if (addrFromIRC.IsRoutable()) { // IRC lets you to re-nick AddLocal(addrFromIRC, LOCAL_IRC); strMyName = EncodeAddress(GetLocalAddress(&addrConnect)); Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str()); } } if (fTestNet) { Send(hSocket, "JOIN #AFCoinTEST3\r"); Send(hSocket, "WHO #AFCoinTEST3\r"); } else { // randomly join #AFCoin00-#AFCoin99 int channel_number = GetRandInt(100); channel_number = 0; // Litecoin: for now, just use one channel Send(hSocket, strprintf("JOIN #AFCoin%02d\r", channel_number).c_str()); Send(hSocket, strprintf("WHO #AFCoin%02d\r", channel_number).c_str()); } int64 nStart = GetTime(); string strLine; strLine.reserve(10000); while (!fShutdown && RecvLineIRC(hSocket, strLine)) { if (strLine.empty() || strLine.size() > 900 || strLine[0] != ':') continue; vector<string> vWords; ParseString(strLine, ' ', vWords); if (vWords.size() < 2) continue; char pszName[10000]; pszName[0] = '\0'; if (vWords[1] == "352" && vWords.size() >= 8) { // index 7 is limited to 16 characters // could get full length name at index 10, but would be different from join messages strlcpy(pszName, vWords[7].c_str(), sizeof(pszName)); printf("IRC got who\n"); } if (vWords[1] == "JOIN" && vWords[0].size() > 1) { // :username!username@50000007.F000000B.90000002.IP JOIN :#channelname strlcpy(pszName, vWords[0].c_str() + 1, sizeof(pszName)); if (strchr(pszName, '!')) *strchr(pszName, '!') = '\0'; printf("IRC got join\n"); } if (pszName[0] == 'u') { CAddress addr; if (DecodeAddress(pszName, addr)) { addr.nTime = GetAdjustedTime(); if (addrman.Add(addr, addrConnect, 51 * 60)) printf("IRC got new address: %s\n", addr.ToString().c_str()); nGotIRCAddresses++; } else { printf("IRC decode failed\n"); } } } closesocket(hSocket); hSocket = INVALID_SOCKET; if (GetTime() - nStart > 20 * 60) { nErrorWait /= 3; nRetryWait /= 3; } nRetryWait = nRetryWait * 11 / 10; if (!Wait(nRetryWait += 60)) return; } } #ifdef TEST int main(int argc, char *argv[]) { WSADATA wsadata; if (WSAStartup(MAKEWORD(2,2), &wsadata) != NO_ERROR) { printf("Error at WSAStartup()\n"); return false; } ThreadIRCSeed(NULL); WSACleanup(); return 0; } #endif
afcoin/afcoin
src/irc.cpp
C++
mit
10,514
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" Bundler.require(*Rails.groups) require "cal_linker" module Dummy 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. # 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 end end
jdguzman/cal_linker
spec/dummy/config/application.rb
Ruby
mit
1,060
package se.slackers.nobloat.jsonrpc; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import se.slackers.nobloat.jsonrpc.annotation.JsonRpc; import se.slackers.nobloat.jsonrpc.annotation.JsonRpcNamespace; import se.slackers.nobloat.jsonrpc.model.MethodRegistration; import se.slackers.nobloat.jsonrpc.protocol.JsonRpcRequest; import javax.inject.Inject; import java.lang.reflect.Method; import java.util.Set; import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; public class MethodRegistryImpl implements MethodRegistry { private final Logger logger = LoggerFactory.getLogger(MethodRegistryImpl.class); private final ConcurrentMap<String, Set<MethodRegistration>> methodMap; @Inject public MethodRegistryImpl() { this.methodMap = new ConcurrentHashMap<>(); } @Override public <T> void register(T api) { Class<?> apiClass = api.getClass(); String basePath = apiClass.getSimpleName(); String declaredBasePath = findApiBasePath(apiClass); if (declaredBasePath != null) { basePath = declaredBasePath; } registerMethods(apiClass, basePath, api); } private <T> void registerMethods(Class<?> apiClass, String basePath, T instance) { for (Method method : apiClass.getDeclaredMethods()) { if (method.getAnnotation(JsonRpc.class) == null) { continue; } registerMethod(basePath, method, instance); } for (Class<?> classInterface : apiClass.getInterfaces()) { registerMethods(classInterface, basePath, instance); } } private String findApiBasePath(Class<?> apiClass) { JsonRpcNamespace rpcPath = apiClass.getAnnotation(JsonRpcNamespace.class); if (rpcPath != null) { return rpcPath.value(); } for (Class<?> classInterface : apiClass.getInterfaces()) { String basePath = findApiBasePath(classInterface); if (basePath != null) { return basePath; } } return null; } public MethodRegistration getMatchingMethod(JsonRpcRequest request) throws NoSuchMethodException { Set<MethodRegistration> registrations = methodMap.get(request.getMethod()); if (registrations == null || registrations.isEmpty()) { throw new NoSuchMethodException("Can't find method '" + request.getMethod() + "'"); } for (MethodRegistration registration : registrations) { if (methodMatch(registration, request)) { return registration; } } throw new NoSuchMethodException("Can't find any version of '" + request.getMethod() + "' with matching signature"); } private boolean methodMatch(MethodRegistration registration, JsonRpcRequest request) { Class<?>[] parameterTypes = registration.getParameterTypes(); Object[] parameters = request.getParams(); if (parameters.length != parameterTypes.length) { return false; } for (int i = 0; i < parameters.length; i++) { if (!parameterTypes[i].isAssignableFrom(parameters[i].getClass())) { return false; } } return true; } private synchronized <T> void registerMethod(String basePath, Method method, T api) { final String methodName = basePath + '.' + method.getName(); Set<MethodRegistration> registrations = methodMap.get(methodName); if (registrations == null) { registrations = new TreeSet<>(); methodMap.put(methodName, registrations); } logger.info("Registering JsonRPC method {}", methodName); registrations.add(new MethodRegistration(api, method)); } }
bysse/nobloat
jsonrpc-dispatch/src/main/java/se/slackers/nobloat/jsonrpc/MethodRegistryImpl.java
Java
mit
3,875
package com.github.btrekkie.reductions.mario; import java.util.Arrays; import java.util.List; import com.github.btrekkie.reductions.planar.Point; /** A horizontal wire gadget for MarioProblem, as in IPlanarWireFactory.horizontalWire. */ public class MarioHorizontalWireGadget extends MarioGadget { /** The height of horizontal wires. */ public static final int HEIGHT = 9; private final int width; public MarioHorizontalWireGadget(int width) { this.width = width; } @Override public int width() { return width; } @Override public int height() { return HEIGHT; } @Override public MarioTile[][] tiles(int minX, int minY, int width, int height) { // The wire consists of height - 3 rows of blocks, then two rows of air, then one row of blocks assertIsInBounds(minX, minY, width, height); MarioTile[][] tiles = new MarioTile[height][]; for (int y = minY; y < minY + height; y++) { MarioTile[] row = new MarioTile[width]; MarioTile tile; if (y >= HEIGHT - 3 && y < HEIGHT - 1) { tile = MarioTile.AIR; } else { tile = MarioTile.BLOCK; } for (int x = minX; x < minX + width; x++) { row[x - minX] = tile; } tiles[y - minY] = row; } return tiles; } @Override public MarioTile[][] tiles() { return tiles(0, 0, width, HEIGHT); } @Override public List<Point> ports() { return Arrays.asList(new Point(0, HEIGHT - 1), new Point(width, HEIGHT - 1)); } }
btrekkie/reductions
src/com/github/btrekkie/reductions/mario/MarioHorizontalWireGadget.java
Java
mit
1,661
<!doctype html> <html class="theme-next mist use-motion" lang="zh-Hans"> <head> <meta charset="UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> <meta http-equiv="Cache-Control" content="no-transform" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" /> <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css"> <link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" /> <link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" /> <meta name="keywords" content="passby" /> <link rel="alternate" href="/atom.xml" title="passby" type="application/atom+xml" /> <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico?v=5.1.0" /> <meta name="description" content="A man living in the word with his power"> <meta property="og:type" content="website"> <meta property="og:title" content="passby"> <meta property="og:url" content="http://yoursite.com/tags/Gulp/index.html"> <meta property="og:site_name" content="passby"> <meta property="og:description" content="A man living in the word with his power"> <meta name="twitter:card" content="summary"> <meta name="twitter:title" content="passby"> <meta name="twitter:description" content="A man living in the word with his power"> <script type="text/javascript" id="hexo.configurations"> var NexT = window.NexT || {}; var CONFIG = { root: '/', scheme: 'Mist', sidebar: {"position":"left","display":"post"}, fancybox: true, motion: true, duoshuo: { userId: '0', author: '博主' }, algolia: { applicationID: '', apiKey: '', indexName: '', hits: {"per_page":10}, labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"} } }; </script> <link rel="canonical" href="http://yoursite.com/tags/Gulp/"/> <title> 标签: Gulp | passby </title> </head> <body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans"> <div class="container one-collumn sidebar-position-left "> <div class="headband"></div> <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader"> <div class="header-inner"><div class="site-meta "> <div class="custom-logo-site-title"> <a href="/" class="brand" rel="start"> <span class="logo-line-before"><i></i></span> <span class="site-title">passby</span> <span class="logo-line-after"><i></i></span> </a> </div> <p class="site-subtitle">生活、个人博客</p> </div> <div class="site-nav-toggle"> <button> <span class="btn-bar"></span> <span class="btn-bar"></span> <span class="btn-bar"></span> </button> </div> <nav class="site-nav"> <ul id="menu" class="menu"> <li class="menu-item menu-item-home"> <a href="/" rel="section"> <i class="menu-item-icon fa fa-fw fa-home"></i> <br /> 首页 </a> </li> <li class="menu-item menu-item-tags"> <a href="/tags" rel="section"> <i class="menu-item-icon fa fa-fw fa-tags"></i> <br /> 标签 </a> </li> <li class="menu-item menu-item-archives"> <a href="/archives" rel="section"> <i class="menu-item-icon fa fa-fw fa-archive"></i> <br /> 归档 </a> </li> <li class="menu-item menu-item-about"> <a href="/about" rel="section"> <i class="menu-item-icon fa fa-fw fa-user"></i> <br /> 关于 </a> </li> <li class="menu-item menu-item-search"> <a href="javascript:;" class="popup-trigger"> <i class="menu-item-icon fa fa-search fa-fw"></i> <br /> 搜索 </a> </li> </ul> <div class="site-search"> <div class="popup"> <span class="search-icon fa fa-search"></span> <input type="text" id="local-search-input"> <div id="local-search-result"></div> <span class="popup-btn-close">close</span> </div> </div> </nav> </div> </header> <main id="main" class="main"> <div class="main-inner"> <div class="content-wrap"> <div id="content" class="content"> <div id="posts" class="posts-collapse"> <div class="collection-title"> <h2 > Gulp <small>标签</small> </h2> </div> <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article"> <header class="post-header"> <h1 class="post-title"> <a class="post-title-link" href="/year/12/13/Gulp练习/" itemprop="url"> <span itemprop="name">Gulp 练习</span> </a> </h1> <div class="post-meta"> <time class="post-time" itemprop="dateCreated" datetime="2016-12-13T21:11:23+08:00" content="2016-12-13" > 12-13 </time> </div> </header> </article> </div> </div> </div> <div class="sidebar-toggle"> <div class="sidebar-toggle-line-wrap"> <span class="sidebar-toggle-line sidebar-toggle-line-first"></span> <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span> <span class="sidebar-toggle-line sidebar-toggle-line-last"></span> </div> </div> <aside id="sidebar" class="sidebar"> <div class="sidebar-inner"> <section class="site-overview sidebar-panel sidebar-panel-active"> <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person"> <img class="site-author-image" itemprop="image" src="/images/avatar.gif" alt="passby" /> <p class="site-author-name" itemprop="name">passby</p> <p class="site-description motion-element" itemprop="description">A man living in the word with his power</p> </div> <nav class="site-state motion-element"> <div class="site-state-item site-state-posts"> <a href="/archives"> <span class="site-state-item-count">21</span> <span class="site-state-item-name">日志</span> </a> </div> <div class="site-state-item site-state-categories"> <span class="site-state-item-count">5</span> <span class="site-state-item-name">分类</span> </div> <div class="site-state-item site-state-tags"> <a href="/tags"> <span class="site-state-item-count">20</span> <span class="site-state-item-name">标签</span> </a> </div> </nav> <div class="feed-link motion-element"> <a href="/atom.xml" rel="alternate"> <i class="fa fa-rss"></i> RSS </a> </div> <div class="links-of-author motion-element"> <span class="links-of-author-item"> <a href="https://github.com/jiangxiaolin1995" target="_blank" title="github"> <i class="fa fa-fw fa-globe"></i> github </a> </span> <span class="links-of-author-item"> <a href="http://weibo.com/2908142897/profile?topnav=1&wvr=6" target="_blank" title="weibo"> <i class="fa fa-fw fa-globe"></i> weibo </a> </span> </div> <div class="links-of-blogroll motion-element links-of-blogroll-inline"> <div class="links-of-blogroll-title"> <i class="fa fa-fw fa-globe"></i> Links </div> <ul class="links-of-blogroll-list"> <li class="links-of-blogroll-item"> <a href="http://github.com/" title="github" target="_blank">github</a> </li> </ul> </div> <div class="widget-wrap"> <h3 class="widget-title"></h3> <div class="widget"> </div> </div> </section> </div> </aside> </div> </main> <footer id="footer" class="footer"> <div class="footer-inner"> <script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"> </script> <span id="busuanzi_container_site_pv"> 本站总访问量<span id="busuanzi_value_site_pv"></span>次 </span> <span id="busuanzi_container_page_pv"> 本文总阅读量<span id="busuanzi_value_page_pv"></span>次 </span> <div class="copyright" > &copy; 2016 - <span itemprop="copyrightYear">2017</span> <span class="with-love"> <i class="fa fa-heart"></i> </span> <span class="author" itemprop="copyrightHolder">passby</span> </div> <div class="powered-by"> 由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动 </div> <div class="theme-info"> 主题 - <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next"> NexT.Mist </a> </div> </div> </footer> <div class="back-to-top"> <i class="fa fa-arrow-up"></i> </div> </div> <script type="text/javascript"> if (Object.prototype.toString.call(window.Promise) !== '[object Function]') { window.Promise = null; } </script> <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script> <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script> <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script> <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script> <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script> <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script> <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script> <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script> <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script> <script type="text/javascript"> // Popup Window; var isfetched = false; // Search DB path; var search_path = "search.xml"; if (search_path.length == 0) { search_path = "search.xml"; } var path = "/" + search_path; // monitor main search box; function proceedsearch() { $("body").append('<div class="popoverlay">').css('overflow', 'hidden'); $('.popup').toggle(); } // search function; var searchFunc = function(path, search_id, content_id) { 'use strict'; $.ajax({ url: path, dataType: "xml", async: true, success: function( xmlResponse ) { // get the contents from search data isfetched = true; $('.popup').detach().appendTo('.header-inner'); var datas = $( "entry", xmlResponse ).map(function() { return { title: $( "title", this ).text(), content: $("content",this).text(), url: $( "url" , this).text() }; }).get(); var $input = document.getElementById(search_id); var $resultContent = document.getElementById(content_id); $input.addEventListener('input', function(){ var matchcounts = 0; var str='<ul class=\"search-result-list\">'; var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/); $resultContent.innerHTML = ""; if (this.value.trim().length > 1) { // perform local searching datas.forEach(function(data) { var isMatch = false; var content_index = []; var data_title = data.title.trim().toLowerCase(); var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase(); var data_url = decodeURIComponent(data.url); var index_title = -1; var index_content = -1; var first_occur = -1; // only match artiles with not empty titles and contents if(data_title != '') { keywords.forEach(function(keyword, i) { index_title = data_title.indexOf(keyword); index_content = data_content.indexOf(keyword); if( index_title >= 0 || index_content >= 0 ){ isMatch = true; if (i == 0) { first_occur = index_content; } } }); } // show search results if (isMatch) { matchcounts += 1; str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>"; var content = data.content.trim().replace(/<[^>]+>/g,""); if (first_occur >= 0) { // cut out 100 characters var start = first_occur - 20; var end = first_occur + 80; if(start < 0){ start = 0; } if(start == 0){ end = 50; } if(end > content.length){ end = content.length; } var match_content = content.substring(start, end); // highlight all keywords keywords.forEach(function(keyword){ var regS = new RegExp(keyword, "gi"); match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>"); }); str += "<p class=\"search-result\">" + match_content +"...</p>" } str += "</li>"; } })}; str += "</ul>"; if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' } if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' } $resultContent.innerHTML = str; }); proceedsearch(); } });} // handle and trigger popup window; $('.popup-trigger').click(function(e) { e.stopPropagation(); if (isfetched == false) { searchFunc(path, 'local-search-input', 'local-search-result'); } else { proceedsearch(); }; }); $('.popup-btn-close').click(function(e){ $('.popup').hide(); $(".popoverlay").remove(); $('body').css('overflow', ''); }); $('.popup').click(function(e){ e.stopPropagation(); }); </script> <script type="text/javascript" src="//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js"></script> </body> </html>
jiangxiaolin1995/jiangxiaolin1995.github.io
tags/Gulp/index.html
HTML
mit
16,315
<?php /* TwigBundle:Exception:error.css.twig */ class __TwigTemplate_da96a27dc9be5c9fa346531d80544769230940a893c62a301473c8c8fba3e15e extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo "/* "; // line 2 echo twig_escape_filter($this->env, (isset($context["status_code"]) ? $context["status_code"] : $this->getContext($context, "status_code")), "html", null, true); echo " "; echo twig_escape_filter($this->env, (isset($context["status_text"]) ? $context["status_text"] : $this->getContext($context, "status_text")), "html", null, true); echo " */ "; } public function getTemplateName() { return "TwigBundle:Exception:error.css.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 19 => 1, 79 => 21, 72 => 13, 69 => 12, 47 => 18, 40 => 11, 37 => 10, 22 => 2, 246 => 32, 157 => 56, 145 => 46, 139 => 45, 131 => 42, 123 => 41, 120 => 40, 115 => 39, 111 => 38, 108 => 37, 101 => 33, 98 => 32, 96 => 31, 83 => 25, 74 => 14, 66 => 11, 55 => 16, 52 => 21, 50 => 14, 43 => 9, 41 => 8, 35 => 9, 32 => 4, 29 => 6, 209 => 82, 203 => 78, 199 => 76, 193 => 73, 189 => 71, 187 => 70, 182 => 68, 176 => 64, 173 => 63, 168 => 62, 164 => 58, 162 => 57, 154 => 54, 149 => 51, 147 => 50, 144 => 49, 141 => 48, 133 => 42, 130 => 41, 125 => 38, 122 => 37, 116 => 36, 112 => 35, 109 => 34, 106 => 36, 103 => 32, 99 => 30, 95 => 28, 92 => 29, 86 => 24, 82 => 22, 80 => 24, 73 => 19, 64 => 19, 60 => 6, 57 => 12, 54 => 22, 51 => 10, 48 => 9, 45 => 17, 42 => 16, 39 => 6, 36 => 5, 33 => 4, 30 => 3,); } }
symfony2forclient/CustomLoginAndResistration
app/cache/dev/twig/da/96/a27dc9be5c9fa346531d80544769230940a893c62a301473c8c8fba3e15e.php
PHP
mit
1,979
""" Command to set maintenance status. """ from django.core.management.base import BaseCommand import sys import json import os BASE_DIR = os.path.dirname(__file__) JSON_FILE = os.path.join(BASE_DIR, '../../maintenance_settings.json') class Command(BaseCommand): """ Set maintenance status """ @classmethod def set_maintenance(cls, option): """ Set maintenance status """ json_data = json.dumps({"DJANGO_MAINTENANCE": option}, indent=4, separators=(',', ': ')) json_file = open(JSON_FILE, 'w') json_file.write(json_data) json_file.close() def handle(self, *args, **kwargs): """ Handle maintenance command """ # sys.argv mut be equal to 3 if len(sys.argv) != 3: print 'Invalid number of arguments: {0}'.format(len(sys.argv) - 2) # sys.argv[2] must have on or off elif sys.argv[2] != 'on' and sys.argv[2] != 'off': print 'Invalid maintenance option: {0}'.format(sys.argv[2]) print 'Valid options: on/off' else: self.set_maintenance(sys.argv[2])
mccricardo/django_maintenance
django_maintenance/management/commands/maintenance.py
Python
mit
1,052
# Idify Get any unique Id format guaranteed, power by the powerfull Redis Set Data Store. [![Build Status](https://secure.travis-ci.org/thanpolas/idify.png?branch=master)](http://travis-ci.org/thanpolas/idify) ## Install Install the module with: `npm install idify --save` ## Documentation ### Initialize Idify ```js var idify = require('idify'); // you can configure idify inline or afterwards. var userid = idify({ // The prefix to use for stored keys in redis. prefix: 'awesomeapp', // The name of the id (i.e. for the user table) name: 'user', // how long do you want the id to be idLength: 5, // Safety net, idify uses recursion until a unique id is secured. maxLoops: 100, // Redis configuration redis: { port: 6379, host: 'localhost', pass: null, redisOptions: null, // special redis options, pass as object uri: 'redis://user:pass@example.com:6379', // optional URI string }, }); // you can setup idify after instantiation userid.setup({/* opts */}); // a connection to redis is required before you perform any operation userid.connect().then(function() { // ready to get going }).catch(function(err) { // an error occured }); ``` ### Get a Unique Id ```js userid.get().then(function(id) { console.log('A 5 char Unique id guaranteed:', id); }); ``` ## Release History - **v1.0.0**, *29 Jun 2016* - Fixed issue after upgrading to redis client which had breaking changed. - Honorary release. - **v0.1.3**, *29 Jun 2016* - Upgraded all packages to latest. - **v0.1.2**, *28 Jun 2016* - Add support for redis URI. - **v0.1.1**, *08 Apr 2015* - Fix redis version check. - **v0.1.0**, *20 Feb 2015* - Fixed bug in recurse method. - **v0.0.1**, *09 Mar 2014* - Big Bang ## License Copyright ©Thanasis Polychronakis. Licensed under the MIT license. [express]: expressjs.com [kansas]: https://github.com/thanpolas/kansas
thanpolas/idify
README.md
Markdown
mit
1,958
#login{ width: 30%; position: absolute; top: 10%; left: 35%; padding: 30px 40px; background-color: white; border-radius: 15px; } #login button{ margin-top: -25px; margin-right: -20px; }
xianyinuma/totalProject
public/css/login.css
CSS
mit
221
# key-replace [![Build Status](https://travis-ci.org/gillstrom/key-replace.svg?branch=master)](https://travis-ci.org/gillstrom/key-replace) > Replace object keys with [String.prototype.replace](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) ## Install ``` $ npm install --save key-replace ``` ## Usage ```js const keyReplace = require('key-replace'); const obj = { foo: 'bar' }; keyReplace(obj, 'fo', 'y'); //=> {yo: 'bar'} keyReplace(obj, 'fo', str => str.toUpperCase()); //=> {FOo: 'bar'} ``` ## API ### keyReplace(input, search, replace) Returns a new object. #### input *Required* Type: `object` The object which keys will be replaced. #### search *Required* Type: `string` or `regexp` Search for matching substring that will be replaced. #### replace *Required* Type: `string` or `function` Replacing the matching substring. ## Related * [array-replace](https://github.com/gillstrom/array-replace) - Replace array values with `String.prototype.replace` * [value-replace](https://github.com/gillstrom/value-replace) - Replace object values with `String.prototype.replace` ## License MIT © [Andreas Gillström](http://github.com/gillstrom)
gillstrom/key-replace
readme.md
Markdown
mit
1,229
#ifndef JOHNPAUL_HPP_INCLUDED #define JOHNPAUL_HPP_INCLUDED void johnpaul (); // Prints "John, Paul, " #endif /* ifndef JOHNPAUL_HPP_INCLUDED */
CajetanP/code-learning
Build Systems/CommandLine/HelloBeatles/src/johnpaul/johnpaul.hpp
C++
mit
148
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="Token.cs" company="KlusterKite"> // All rights reserved // </copyright> // <summary> // The token response description // </summary> // -------------------------------------------------------------------------------------------------------------------- namespace KlusterKite.NodeManager.Launcher { using System; using JetBrains.Annotations; using Newtonsoft.Json; /// <summary> /// The token description /// </summary> [UsedImplicitly] public class Token { /// <summary> /// The token creation date /// </summary> private readonly DateTimeOffset created = DateTimeOffset.Now; /// <summary> /// Gets or sets the access token value /// </summary> [JsonProperty("access_token")] public string AccessToken { get; set; } /// <summary> /// Gets or sets the token expiration in seconds /// </summary> [JsonProperty("expires_in")] [UsedImplicitly] public int? Expires { get; set; } /// <summary> /// Gets a value indicating whether current token was expired /// </summary> public bool IsExpired => !this.Expires.HasValue || (DateTimeOffset.Now - this.created).TotalSeconds > this.Expires.Value; } }
KlusterKite/KlusterKite
KlusterKite.NodeManager/KlusterKite.NodeManager.Launcher/Token.cs
C#
mit
1,449
// generated by Neptune Namespaces v4.x.x // file: Art/Engine/Elements/ShapeChildren/index.js (module.exports = require('./namespace')) .addModules({ FillElement: require('./FillElement'), OutlineElement: require('./OutlineElement') });
art-suite/art-engine
source/Art/Engine/Elements/ShapeChildren/index.js
JavaScript
mit
245
//[Kores](../../../index.md)/[com.github.jonathanxd.kores.base](../../index.md)/[FieldAccess](../index.md)/[Builder](index.md)/[name](name.md) # name [jvm] Content open override fun [name](name.md)(value: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)): [FieldAccess.Builder](index.md) lateinit var [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
JonathanxD/CodeAPI
docs/-kores/com.github.jonathanxd.kores.base/-field-access/-builder/name.md
Markdown
mit
447
module.exports = { transform: { '^.+\\.(t|j)sx?$': 'ts-jest' }, testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', moduleFileExtensions: [ 'ts', 'tsx', 'js', 'jsx', 'json', 'node' ], globals: { 'ts-jest': { tsConfig: { jsx: 'react' } } } }
KeitIG/react-keybinding-component
jest.config.js
JavaScript
mit
323
'use strict'; // Setting up route angular.module('users').config(['$stateProvider', function ($stateProvider) { // Users state routing $stateProvider .state('settings', { abstract: true, url: '/settings', templateUrl: 'modules/users/client/views/settings/settings.client.view.html', data: { roles: ['user', 'admin'] } }) .state('settings.profile', { url: '/profile', templateUrl: 'modules/users/client/views/settings/edit-profile.client.view.html' }) .state('settings.password', { url: '/password', templateUrl: 'modules/users/client/views/settings/change-password.client.view.html' }) .state('settings.accounts', { url: '/accounts', templateUrl: 'modules/users/client/views/settings/manage-social-accounts.client.view.html' }) .state('settings.picture', { url: '/picture', templateUrl: 'modules/users/client/views/settings/change-profile-picture.client.view.html' }) .state('authentication', { abstract: true, url: '/authentication', templateUrl: 'modules/users/client/views/authentication/authentication.client.view.html' //templateUrl: 'modules/core/client/views/home.client.view.html' }) .state('authentication.signup', { url: '/', templateUrl: 'modules/users/client/views/authentication/signup.client.view.html' //templateUrl: 'modules/core/client/views/home.client.view.html' }) .state('authentication.signin', { url: '/signin?err', templateUrl: 'modules/core/client/views/home.client.view.html' //templateUrl: 'modules/users/client/views/authentication/signin.client.view.html' }) .state('password', { abstract: true, url: '/password', template: '<ui-view/>' }) .state('password.forgot', { url: '/forgot', templateUrl: 'modules/users/client/views/password/forgot-password.client.view.html' }) .state('password.reset', { abstract: true, url: '/reset', template: '<ui-view/>' }) .state('password.reset.invalid', { url: '/invalid', templateUrl: 'modules/users/client/views/password/reset-password-invalid.client.view.html' }) .state('password.reset.success', { url: '/success', templateUrl: 'modules/users/client/views/password/reset-password-success.client.view.html' }) .state('password.reset.form', { url: '/:token', templateUrl: 'modules/users/client/views/password/reset-password.client.view.html' }); } ]);
dpxxdp/segue4
modules/users/client/config/users.client.routes.js
JavaScript
mit
2,704
using System; using Xunit; namespace HelloWorld { public class HelloWorldTests { [Theory] [InlineData(12)] [InlineData(13)] [InlineData(14)] [InlineData(15)] [InlineData(16)] [InlineData(17)] [InlineData(18)] [InlineData(19)] [InlineData(20)] [InlineData(21)] [InlineData(22)] [InlineData(23)] public void GivenAfternoon_ThenAfternoonMessage(int hour) { // Arrange var afternoonTime = new TestTimeManager(); afternoonTime.SetDateTime(new DateTime(2017, 7, 13, hour, 0, 0)); var messageUtility = new MessageUtility(afternoonTime); // Act var message = messageUtility.GetMessage(); // Assert Assert.Equal("Good afternoon", message); } [Theory] [InlineData(0)] [InlineData(1)] [InlineData(2)] [InlineData(3)] [InlineData(4)] [InlineData(5)] [InlineData(6)] [InlineData(7)] [InlineData(8)] [InlineData(9)] [InlineData(10)] [InlineData(11)] public void GivenMorning_ThenMorningMessage(int hour) { // Arrange var morningTime = new TestTimeManager(); morningTime.SetDateTime(new DateTime(2017, 7, 13, hour, 0, 0)); var messageUtility = new MessageUtility(morningTime); // Act var message = messageUtility.GetMessage(); // Assert Assert.Equal("Good morning", message); } } }
PracticalTestDrivenDevelopment/Book-API
HelloWorld/HelloWorld/HelloWorldTests.cs
C#
mit
1,633
require 'spec_helper' describe Cms::User do subject(:model) { Cms::User } subject(:factory) { :ss_user } it_behaves_like "mongoid#save" it_behaves_like "mongoid#find" end
shakkun/ss-temp
spec/models/cms/user_spec.rb
Ruby
mit
181
# 1111-prebuy-robber chrome extension: 双11预售抢购插件 (2015) 实测可用,抢了不少好货,顺便记录一下怎么写插件 PS: "还有机会"抢购功能经测试不可用...
linx4200/1111-prebuy-robber
README.md
Markdown
mit
191
using Guitar32; using Guitar32.Database; using Guitar32.Utilities; using System; using System.Collections.Generic; using System.Linq; using System.Text; using TechByte.Configs; using TechByte.Values; namespace TechByte.Architecture.Usecases { public class UCNewSystemUser : TechByte.Architecture.Beans.Accounts.SystemUser { private DatabaseConnection dbConn = TechByte.Configs.DatabaseInstance.databaseConnection; public UCNewSystemUser() { } public void Register() { QueryBuilder query = new QueryBuilder(); int powerId, addressId, contactId, profileId ; // Check if already exists query.Select() .From("tblusers") .Where("upper(username) = " + Strings.Surround(this.getUsername().ToUpper())); QueryResultRow rowMatched = dbConn.QuerySingle(query); if (rowMatched != null && rowMatched.Count > 0) { this.setResponse(CODES.USERNAME_ALREADY_TAKEN); return; } // Get PowerID query.Select("id") .From("tblpowers") .Where("lower(name)", Strings.NoSpaces(Strings.Surround(this.getPower().ToLower())), true) ; // Check for database error try { QueryResultRow row = dbConn.QuerySingle(query); powerId = int.Parse(row["id"].ToString()); } catch (Exception ex) { this.setResponse(TechByte.Values.CODES.DATABASE_ERROR); return; } // {{ BLOCK for Contact details creation TechByte.Architecture.Beans.Profiles.ContactDetails contactDetails = this.getProfileDetails().getContactDetails(); query.InsertInto("tblcontactdetails", new string[] { "email", "mobile", "landline", "fax" }) .Values(new object[] { Strings.Surround(contactDetails.getEmail()), Strings.Surround(contactDetails.getMobile()), Strings.Surround(contactDetails.getLandline()), Strings.Surround(contactDetails.getFax()) }); // Check for database error if (!dbConn.Execute(query)) { this.setResponse(TechByte.Values.CODES.DATABASE_ERROR); return; } // Save Contact ID query.Select("last_insert_id() AS id"); contactId = int.Parse(dbConn.QuerySingle(query)["id"]+""); // }} // {{ BLOCK for Address details creation TechByte.Architecture.Beans.Profiles.AddressDetails addressDetails = this.getProfileDetails().getAddressDetails(); query.InsertInto("tbladdressdetails", new string[] { "street", "city", "region", "country" }) .Values(new object[] { Strings.Surround(addressDetails.getStreet()), Strings.Surround(addressDetails.getCity()), Strings.Surround(addressDetails.getRegion()), Strings.Surround(addressDetails.getCountry()) }); // Check for database error if (!dbConn.Execute(query)) { this.setResponse(TechByte.Values.CODES.DATABASE_ERROR); return; } // Save Address ID query.Select("last_insert_id() AS id"); addressId = int.Parse(dbConn.QuerySingle(query)["id"] + ""); // }} // {{ BLOCK for Profile details TechByte.Architecture.Beans.Accounts.ProfileDetails profileDetails = this.getProfileDetails(); query.InsertInto("tblprofiles", new string[] { "address_id", "contact_id", "fname", "mname", "lname", "gender", "birthdate", "birthplace", "nationality", "tin", "sss", "pagibig" }) .Values(new object[] { addressId, contactId, Strings.Surround(profileDetails.getFullname().getFirstName()), Strings.Surround(profileDetails.getFullname().getMiddleName()), Strings.Surround(profileDetails.getFullname().getLastName()), Strings.Surround(profileDetails.getGender()), Strings.Surround(profileDetails.getBirthDate()), Strings.Surround(profileDetails.getBirthPlace()), Strings.Surround(profileDetails.getNationality()), Strings.Surround(profileDetails.getTIN()), Strings.Surround(profileDetails.getSSS()), Strings.Surround(profileDetails.getPAGIBIG()) }); if (!dbConn.Execute(query)) { this.setResponse(TechByte.Values.CODES.DATABASE_ERROR); return; } // Save User ID query.Select("last_insert_id() AS id"); profileId = int.Parse(dbConn.QuerySingle(query)["id"] + ""); // }} // {{ BLOCK for User account creation query.InsertInto("tblusers", new string[] { "power_id", "profile_id", "username", "password", "status" }) .Values(new object[] { powerId, profileId, Strings.Surround(this.getUsername()), Strings.Surround(this.getPassword()), Strings.Surround(this.getStatus()) }); // Check for database error if (!dbConn.Execute(query)) { this.setResponse(TechByte.Values.CODES.DATABASE_ERROR); return; } // }} // Success! this.setResponse(new SystemResponse("00", "Account has been succcessfully created!")); } } }
allenlinatoc/techbyte
TechByte/Architecture/Usecases/UCNewSystemUser.cs
C#
mit
5,973
using UnityEngine; using UnityEngine.UI; using UnityEngine.Events; using UnityEngine.EventSystems; using NaughtyAttributes; public class ButtonPro : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler,IPointerExitHandler,IPointerDownHandler,IPointerUpHandler { public Graphic[] targetGraphics; public Graphic[] secondaryGraphics; public Color primaryColor; public Color secondaryColor; public bool useTertiaryColor; [ShowIf("useTertiaryColor")] public Color tertiaryColor; public float transitionSpeed = 1; public bool isHovered; public bool isHeld; public UnityEvent onClick; public UnityEvent onDragOff; public bool dragOffUI; public void OnPointerEnter(PointerEventData pointerEventData) { isHovered = true; } //Detect when Cursor leaves the GameObject public void OnPointerExit(PointerEventData pointerEventData) { isHovered = false; if(isHeld) { if(!dragOffUI) { onDragOff.Invoke(); isHeld = false; } } } public void OnPointerClick(PointerEventData pointerEventData) { onClick.Invoke(); isHeld = false; } void Update() { if(isHovered) { for(int i = 0; i < targetGraphics.Length; i++) { targetGraphics[i].color = Color.Lerp(targetGraphics[i].color, secondaryColor, Time.deltaTime * transitionSpeed); } for(int i = 0; i < secondaryGraphics.Length; i++) { if(useTertiaryColor) { secondaryGraphics[i].color = Color.Lerp(secondaryGraphics[i].color, tertiaryColor, Time.deltaTime * transitionSpeed); } else { secondaryGraphics[i].color = Color.Lerp(secondaryGraphics[i].color, primaryColor, Time.deltaTime * transitionSpeed); } } } else { for (int i = 0; i < targetGraphics.Length; i++) { targetGraphics[i].color = Color.Lerp(targetGraphics[i].color, primaryColor, Time.deltaTime * transitionSpeed); } for (int i = 0; i < secondaryGraphics.Length; i++) { secondaryGraphics[i].color = Color.Lerp(secondaryGraphics[i].color, secondaryColor, Time.deltaTime * transitionSpeed); } } if(isHeld && dragOffUI) { if(Input.GetMouseButtonUp(0)) { isHeld = false; } if (!EventSystem.current.IsPointerOverGameObject(-1)) { onDragOff.Invoke(); isHeld = false; } } } public void OnPointerDown(PointerEventData eventData) { isHeld = true; } public void OnPointerUp(PointerEventData eventData) { if(!Input.GetMouseButton(0)) { isHeld = false; } } }
uniquecorn/dungeon-crossing
Assets/Scripts/ButtonPro.cs
C#
mit
3,060
#region Copyright and License /* @Copyright JONVON(NetCreditHub.COM) 2017. All rights reserved. - 8502090@qq.com */ #endregion namespace NetCreditHub.Data { using Dependency; using Environment; public interface IZeroDatabaseFactory : ITransientDependency { IDatabase CreateDatabase(); IDatabase CreateLogDatabase(); IDatabase CreateDatabase(DatabaseInfo dbase); } }
netcredit/NetCreditHub
src/NetCreditHub.Zero/Data/IZeroDatabaseFactory.cs
C#
mit
416
import test from 'tape' import lerp from './' test('snap-lerp', t => { t.equal(lerp(1, 3, 0.5, 0.01), 2) t.equal(lerp(1, 3, 0.5, 2, false), 3) t.equal(lerp(1, 3, 0.5, 2, true), 3) t.equal(lerp(3, 1, 0.5, 0.01), 2) t.equal(lerp(3, 1, 0.5, 2, false), 1) t.equal(lerp(3, 1, 0.5, 2, true), 1) t.equal(lerp(1, 3, 0.6, 1), 2.2) t.equal(lerp(3, 1, 0.6, 1), 1.8) t.equal(lerp(1, 3, 0.4, 1), 1.8) t.equal(lerp(3, 1, 0.4, 1), 2.2) t.equal(lerp(1, 3, 0.6, 2, false), 3) t.equal(lerp(1, 3, 0.6, 2, true), 3) t.equal(lerp(3, 1, 0.6, 2, false), 1) t.equal(lerp(3, 1, 0.6, 2, true), 1) t.equal(lerp(1, 3, 0.4, 2, false), 1) t.equal(lerp(1, 3, 0.4, 2, true), 3) t.equal(lerp(3, 1, 0.4, 2, false), 3) t.equal(lerp(3, 1, 0.4, 2, true), 1) t.equal(lerp(1, 3, 0.6, 2), 3) t.equal(lerp(3, 1, 0.6, 2), 1) t.equal(lerp(1, 3, 0.4, 2), 1) t.equal(lerp(3, 1, 0.4, 2), 3) t.equal(lerp(10, 20, 0.5, 1), 15) t.equal(lerp(10, 20, 0.5, 10), 20) t.equal(lerp(10, 20, 0.4, 10), 10) t.end() })
hughsk/snap-lerp
test.js
JavaScript
mit
1,018
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" #import "AVAssetResourceLoaderDelegate.h" #import "VideoStreamDownloadLogicDelegate.h" @class NSMutableArray, NSString, VideoStreamDownloadLogic, VideoStreamInfo, VideoStreamKVReportLogic; @interface VideoStreamPlayerViewModel : NSObject <VideoStreamDownloadLogicDelegate, AVAssetResourceLoaderDelegate> { unsigned int m_uiLoadingRequestNum; NSMutableArray *m_arrPendingRequests; NSMutableArray *m_arrDownloadTaskArray; VideoStreamDownloadLogic *m_oDownloadLogic; VideoStreamKVReportLogic *m_oKVReportLogic; VideoStreamInfo *m_oVideoInfo; unsigned int _m_uiSeekTime; id <NSObject><VideoStreamPlayerViewModeDelegate> _delegate; } @property(nonatomic) unsigned int m_uiSeekTime; // @synthesize m_uiSeekTime=_m_uiSeekTime; @property(nonatomic) __weak id <NSObject><VideoStreamPlayerViewModeDelegate> delegate; // @synthesize delegate=_delegate; - (void).cxx_destruct; - (void)onChangeVideoDownloadMode:(unsigned long long)arg1; - (void)ShouldUpdateVideoThumbImage:(id)arg1; - (void)OnDownloadVideoErrorExpired:(_Bool)arg1; - (void)onGetFristPartAVData; - (void)onGetAVDataFromNetOffset:(unsigned int)arg1 Length:(unsigned int)arg2 NeedNotifyToPlay:(_Bool)arg3; - (void)resourceLoader:(id)arg1 didCancelLoadingRequest:(id)arg2; - (_Bool)resourceLoader:(id)arg1 shouldWaitForLoadingOfRequestedResource:(id)arg2; - (id)loaderCancelledError; - (void)cancelAllPendingRequests; - (void)fillInformationForRequest:(id)arg1; - (void)checkData:(id)arg1 length:(unsigned int)arg2; - (_Bool)respondWithDataForRequest:(id)arg1 offset:(unsigned int)arg2 length:(unsigned int)arg3; - (void)processPendingRequestsFromOffset:(unsigned int)arg1 length:(unsigned int)arg2; - (void)removeLoadingRequest:(id)arg1; - (void)addLoadingRequest:(id)arg1; - (void)cleanDownloadTask; - (void)consumeDownloadTask; - (void)addWCAVDownloadTaskBySec:(float)arg1; - (void)addOneSliceTimeDownloadTask; - (void)setVideoInfo:(id)arg1; - (unsigned long long)startVideoStreamDownload; - (id)initWithMediaItem:(id)arg1 KVReportLogic:(id)arg2; - (id)initWithVideoMessage:(id)arg1 KVReportLogic:(id)arg2; - (id)init; // Remaining properties @property(readonly, copy) NSString *debugDescription; @property(readonly, copy) NSString *description; @property(readonly) unsigned long long hash; @property(readonly) Class superclass; @end
walkdianzi/DashengHook
WeChat-Headers/VideoStreamPlayerViewModel.h
C
mit
2,487
"""Functionality to interact with Google Cloud Platform. """
chapmanb/bcbio-nextgen-vm
bcbiovm/gcp/__init__.py
Python
mit
61
# Notes The sources in this directory are unit test cases. Boost includes a unit testing framework, and since bitcoin already uses boost, it makes sense to simply use this framework rather than require developers to configure some other framework (we want as few impediments to creating unit tests as possible). The build system is setup to compile an executable called "test_neos" that runs all of the unit tests. The main source file is called test_neos.cpp, which simply includes other files that contain the actual unit tests (outside of a couple required preprocessor directives). The pattern is to create one test file for each class or source file for which you want to create unit tests. The file naming convention is "<source_filename>_tests.cpp" and such files should wrap their tests in a test suite called "<source_filename>_tests". For an examples of this pattern, examine uint160_tests.cpp and uint256_tests.cpp. For further reading, I found the following website to be helpful in explaining how the boost unit test framework works: [http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/).
neoscoin/neos-core
src/test/README.md
Markdown
mit
1,201
#!/usr/bin/env sh set -e git stash save gulp --prod REV=`git rev-parse HEAD` git checkout gh-pages git rm -rf . git checkout master -- .gitignore mv dist/* . && rm -rf dist # might to be changed if you have hidden files git add . git commit -m "deployed $REV" git push --all git checkout master git stash pop
niko-matses/nikomatses.com
deploy.sh
Shell
mit
308
require_relative '../client' module Spaceship module ConnectAPI class Client < Spaceship::Client ## # Spaceship HTTP client for the App Store Connect API. # # This client is solely responsible for the making HTTP requests and # parsing their responses. Parameters should be either named parameters, or # for large request data bodies, pass in anything that can resond to # `to_json`. # # Each request method should validate the required parameters. A required parameter is one that would result in 400-range response if it is not supplied. # Each request method should make only one request. For more high-level logic, put code in the data models. def self.hostname 'https://appstoreconnect.apple.com/iris/v1/' end def build_params(filter: nil, includes: nil, limit: nil, sort: nil) params = {} params[:filter] = filter if filter && !filter.empty? params[:include] = includes if includes params[:limit] = limit if limit params[:sort] = sort if sort return params end def get_beta_app_review_detail(filter: {}, includes: nil, limit: nil, sort: nil) # GET # https://appstoreconnect.apple.com/iris/v1/betaAppReviewDetails?filter[app]=<app_id> params = build_params(filter: filter, includes: includes, limit: limit, sort: sort) response = request(:get, "betaAppReviewDetails") do |req| req.options.params_encoder = Faraday::NestedParamsEncoder req.params = params end handle_response(response) end def patch_beta_app_review_detail(app_id: nil, attributes: {}) # PATCH # https://appstoreconnect.apple.com/iris/v1/apps/<app_id>/betaAppReviewDetails path = "betaAppReviewDetails/#{app_id}" body = { data: { attributes: attributes, id: app_id, type: "betaAppReviewDetails" } } response = request(:patch) do |req| req.url(path) req.body = body.to_json req.headers['Content-Type'] = 'application/json' end handle_response(response) end def get_beta_app_localizations(filter: {}, includes: nil, limit: nil, sort: nil) # GET # https://appstoreconnect.apple.com/iris/v1/betaAppLocalizations?filter[app]=<app_id> params = build_params(filter: filter, includes: includes, limit: limit, sort: sort) response = request(:get, "betaAppLocalizations") do |req| req.options.params_encoder = Faraday::NestedParamsEncoder req.params = params end handle_response(response) end def get_beta_build_localizations(filter: {}, includes: nil, limit: nil, sort: nil) # GET # https://appstoreconnect.apple.com/iris/v1/betaBuildLocalizations?filter[build]=<build_id> path = "betaBuildLocalizations" params = build_params(filter: filter, includes: includes, limit: limit, sort: sort) response = request(:get, path) do |req| req.options.params_encoder = Faraday::NestedParamsEncoder req.params = params end handle_response(response) end def post_beta_app_localizations(app_id: nil, attributes: {}) # POST # https://appstoreconnect.apple.com/iris/v1/betaAppLocalizations path = "betaAppLocalizations" body = { data: { attributes: attributes, type: "betaAppLocalizations", relationships: { app: { data: { type: "apps", id: app_id } } } } } response = request(:post) do |req| req.url(path) req.body = body.to_json req.headers['Content-Type'] = 'application/json' end handle_response(response) end def patch_beta_app_localizations(localization_id: nil, attributes: {}) # PATCH # https://appstoreconnect.apple.com/iris/v1/apps/<app_id>/betaAppLocalizations/<localization_id> path = "betaAppLocalizations/#{localization_id}" body = { data: { attributes: attributes, id: localization_id, type: "betaAppLocalizations" } } response = request(:patch) do |req| req.url(path) req.body = body.to_json req.headers['Content-Type'] = 'application/json' end handle_response(response) end def post_beta_build_localizations(build_id: nil, attributes: {}) # POST # https://appstoreconnect.apple.com/iris/v1/betaBuildLocalizations path = "betaBuildLocalizations" body = { data: { attributes: attributes, type: "betaBuildLocalizations", relationships: { build: { data: { type: "builds", id: build_id } } } } } response = request(:post) do |req| req.url(path) req.body = body.to_json req.headers['Content-Type'] = 'application/json' end handle_response(response) end def patch_beta_build_localizations(localization_id: nil, feedbackEmail: nil, attributes: {}) # PATCH # https://appstoreconnect.apple.com/iris/v1/apps/<app_id>/betaBuildLocalizations path = "betaBuildLocalizations/#{localization_id}" body = { data: { attributes: attributes, id: localization_id, type: "betaBuildLocalizations" } } response = request(:patch) do |req| req.url(path) req.body = body.to_json req.headers['Content-Type'] = 'application/json' end handle_response(response) end def get_build_beta_details(filter: {}, includes: nil, limit: nil, sort: nil) # GET # https://appstoreconnect.apple.com/iris/v1/buildBetaDetails params = build_params(filter: filter, includes: includes, limit: limit, sort: sort) response = request(:get, "buildBetaDetails") do |req| req.options.params_encoder = Faraday::NestedParamsEncoder req.params = params end handle_response(response) end def patch_build_beta_details(build_beta_details_id: nil, attributes: {}) # PATCH # https://appstoreconnect.apple.com/iris/v1/buildBetaDetails/<build_beta_details_id> path = "buildBetaDetails/#{build_beta_details_id}" body = { data: { attributes: attributes, id: build_beta_details_id, type: "buildBetaDetails" } } response = request(:patch) do |req| req.url(path) req.body = body.to_json req.headers['Content-Type'] = 'application/json' end handle_response(response) end def get_builds(filter: {}, includes: "buildBetaDetail,betaBuildMetrics", limit: 10, sort: "uploadedDate") # GET # https://appstoreconnect.apple.com/iris/v1/builds params = build_params(filter: filter, includes: includes, limit: limit, sort: sort) response = request(:get, "builds") do |req| req.options.params_encoder = Faraday::NestedParamsEncoder req.params = params end handle_response(response) end def patch_builds(build_id: nil, attributes: {}) # PATCH # https://appstoreconnect.apple.com/iris/v1/builds/<build_id> path = "builds/#{build_id}" body = { data: { attributes: attributes, id: build_id, type: "builds" } } response = request(:patch) do |req| req.url(path) req.body = body.to_json req.headers['Content-Type'] = 'application/json' end handle_response(response) end def post_beta_app_review_submissions(build_id: nil) # POST # https://appstoreconnect.apple.com/iris/v1/betaAppReviewSubmissions body = { data: { type: "betaAppReviewSubmissions", relationships: { build: { data: { type: "builds", id: build_id } } } } } response = request(:post) do |req| req.url("betaAppReviewSubmissions") req.body = body.to_json req.headers['Content-Type'] = 'application/json' end handle_response(response) end protected def handle_response(response) if (200...300).cover?(response.status) && (response.body.nil? || response.body.empty?) return end raise InternalServerError, "Server error got #{response.status}" if (500...600).cover?(response.status) unless response.body.kind_of?(Hash) raise UnexpectedResponse, response.body end raise UnexpectedResponse, response.body['error'] if response.body['error'] raise UnexpectedResponse, handle_errors(response) if response.body['errors'] raise UnexpectedResponse, "Temporary App Store Connect error: #{response.body}" if response.body['statusCode'] == 'ERROR' return response.body['data'] if response.body['data'] return response.body end def handle_errors(response) # Example error format # { # "errors" : [ { # "id" : "ce8c391e-f858-411b-a14b-5aa26e0915f2", # "status" : "400", # "code" : "PARAMETER_ERROR.INVALID", # "title" : "A parameter has an invalid value", # "detail" : "'uploadedDate3' is not a valid field name", # "source" : { # "parameter" : "sort" # } # } ] # } return response.body['errors'].map do |error| "#{error['title']} - #{error['detail']}" end.join(" ") end private # used to assert all of the named parameters are supplied values # # @raises NameError if the values are nil def assert_required_params(method_name, binding) parameter_names = method(method_name).parameters.map { |_, v| v } parameter_names.each do |name| if local_variable_get(binding, name).nil? raise NameError, "`#{name}' is a required parameter" end end end def local_variable_get(binding, name) if binding.respond_to?(:local_variable_get) binding.local_variable_get(name) else binding.eval(name.to_s) end end def provider_id return team_id if self.provider.nil? self.provider.provider_id end end end end
mgrebenets/fastlane
spaceship/lib/spaceship/connect_api/client.rb
Ruby
mit
11,093
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; class AppKernel extends Kernel { /** * {@inheritdoc} */ public function registerBundles() { return [ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(), new FOS\RestBundle\FOSRestBundle(), new JMS\SerializerBundle\JMSSerializerBundle($this), new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sylius\Bundle\MoneyBundle\SyliusMoneyBundle(), new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), ]; } /** * {@inheritdoc} */ public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__ . '/config/config.yml'); } /** * {@inheritdoc} */ protected function getContainerBaseClass() { if (0 === strpos($this->environment, 'test')) { return MockerContainer::class; } return parent::getContainerBaseClass(); } }
foobarflies/Sylius
src/Sylius/Bundle/MoneyBundle/test/app/AppKernel.php
PHP
mit
1,660
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ // **NOTE** This file was generated by a tool and any changes will be overwritten. namespace Microsoft.Graph { using System; using System.Collections.Generic; using System.IO; using System.Net.Http; using System.Threading; /// <summary> /// The interface IWorkbookFunctionsPiRequest. /// </summary> public partial interface IWorkbookFunctionsPiRequest : IBaseRequest { /// <summary> /// Issues the POST request. /// </summary> System.Threading.Tasks.Task<WorkbookFunctionResult> PostAsync(); /// <summary> /// Issues the POST request. /// </summary> /// <param name=""cancellationToken"">The <see cref=""CancellationToken""/> for the request.</param> /// <returns>The task to await for async call.</returns> System.Threading.Tasks.Task<WorkbookFunctionResult> PostAsync( CancellationToken cancellationToken); /// <summary> /// Adds the specified expand value to the request. /// </summary> /// <param name="value">The expand value.</param> /// <returns>The request object to send.</returns> IWorkbookFunctionsPiRequest Expand(string value); /// <summary> /// Adds the specified select value to the request. /// </summary> /// <param name="value">The select value.</param> /// <returns>The request object to send.</returns> IWorkbookFunctionsPiRequest Select(string value); } }
garethj-msft/msgraph-sdk-dotnet
src/Microsoft.Graph/Requests/Generated/IWorkbookFunctionsPiRequest.cs
C#
mit
1,849
<!DOCTYPE html> <HTML><head><TITLE>Manpage of PERLEBCDIC</TITLE> <meta charset="utf-8"> <link rel="stylesheet" href="/css/main.css" type="text/css"> </head> <body> <header class="site-header"> <div class="wrap"> <div class="site-title"><a href="/manpages/index.html">linux manpages</a></div> <div class="site-description">{"type":"documentation"}</div> </div> </header> <div class="page-content"><div class="wrap"> <H1>PERLEBCDIC</H1> Section: Perl Programmers Reference Guide (1)<BR>Updated: 2009-04-11<BR><A HREF="#index">Index</A> <A HREF="/manpages/index.html">Return to Main Contents</A><HR> <A NAME="lbAB">&nbsp;</A> <H2>NAME</H2> perlebcdic - Considerations for running Perl on EBCDIC platforms <A NAME="lbAC">&nbsp;</A> <H2>DESCRIPTION</H2> <A NAME="ixAAC"></A> An exploration of some of the issues facing Perl programmers on <FONT SIZE="-1">EBCDIC</FONT> based computers. We do not cover localization, internationalization, or multi byte character set issues other than some discussion of <FONT SIZE="-1">UTF-8</FONT> and UTF-EBCDIC. <P> Portions that are still incomplete are marked with <FONT SIZE="-1">XXX</FONT>. <A NAME="lbAD">&nbsp;</A> <H2>COMMON CHARACTER CODE SETS</H2> <A NAME="ixAAD"></A> <A NAME="lbAE">&nbsp;</A> <H3><FONT SIZE="-1">ASCII</FONT></H3> <A NAME="ixAAE"></A> The American Standard Code for Information Interchange (<FONT SIZE="-1">ASCII</FONT> or US-ASCII) is a set of integers running from 0 to 127 (decimal) that imply character interpretation by the display and other systems of computers. The range 0..127 can be covered by setting the bits in a 7-bit binary digit, hence the set is sometimes referred to as a ``7-bit <FONT SIZE="-1">ASCII</FONT>''. <FONT SIZE="-1">ASCII</FONT> was described by the American National Standards Institute document <FONT SIZE="-1">ANSI</FONT> X3.4-1986. It was also described by <FONT SIZE="-1">ISO</FONT> 646:1991 (with localization for currency symbols). The full <FONT SIZE="-1">ASCII</FONT> set is given in the table below as the first 128 elements. Languages that can be written adequately with the characters in <FONT SIZE="-1">ASCII</FONT> include English, Hawaiian, Indonesian, Swahili and some Native American languages. <P> There are many character sets that extend the range of integers from 0..2**7-1 up to 2**8-1, or 8 bit bytes (octets if you prefer). One common one is the <FONT SIZE="-1">ISO</FONT> 8859-1 character set. <A NAME="lbAF">&nbsp;</A> <H3><FONT SIZE="-1">ISO</FONT> 8859</H3> <A NAME="ixAAF"></A> The <FONT SIZE="-1">ISO</FONT> 8859-$n are a collection of character code sets from the International Organization for Standardization (<FONT SIZE="-1">ISO</FONT>) each of which adds characters to the <FONT SIZE="-1">ASCII</FONT> set that are typically found in European languages many of which are based on the Roman, or Latin, alphabet. <A NAME="lbAG">&nbsp;</A> <H3>Latin 1 (<FONT SIZE="-1">ISO</FONT> 8859-1)</H3> <A NAME="ixAAG"></A> A particular 8-bit extension to <FONT SIZE="-1">ASCII</FONT> that includes grave and acute accented Latin characters. Languages that can employ <FONT SIZE="-1">ISO</FONT> 8859-1 include all the languages covered by <FONT SIZE="-1">ASCII</FONT> as well as Afrikaans, Albanian, Basque, Catalan, Danish, Faroese, Finnish, Norwegian, Portuguese, Spanish, and Swedish. Dutch is covered albeit without the ij ligature. French is covered too but without the oe ligature. German can use <FONT SIZE="-1">ISO</FONT> 8859-1 but must do so without German-style quotation marks. This set is based on Western European extensions to <FONT SIZE="-1">ASCII</FONT> and is commonly encountered in world wide web work. In <FONT SIZE="-1">IBM</FONT> character code set identification terminology <FONT SIZE="-1">ISO</FONT> 8859-1 is also known as <FONT SIZE="-1">CCSID</FONT> 819 (or sometimes 0819 or even 00819). <A NAME="lbAH">&nbsp;</A> <H3><FONT SIZE="-1">EBCDIC</FONT></H3> <A NAME="ixAAH"></A> The Extended Binary Coded Decimal Interchange Code refers to a large collection of slightly different single and multi byte coded character sets that are different from <FONT SIZE="-1">ASCII</FONT> or <FONT SIZE="-1">ISO</FONT> 8859-1 and typically run on host computers. The <FONT SIZE="-1">EBCDIC</FONT> encodings derive from 8 bit byte extensions of Hollerith punched card encodings. The layout on the cards was such that high bits were set for the upper and lower case alphabet characters [a-z] and [A-Z], but there were gaps within each Latin alphabet range. <P> Some <FONT SIZE="-1">IBM</FONT> <FONT SIZE="-1">EBCDIC</FONT> character sets may be known by character code set identification numbers (<FONT SIZE="-1">CCSID</FONT> numbers) or code page numbers. Leading zero digits in <FONT SIZE="-1">CCSID</FONT> numbers within this document are insignificant. E.g. <FONT SIZE="-1">CCSID</FONT> 0037 may be referred to as 37 in places. <P> Perl can be compiled on platforms that run any of three commonly used <FONT SIZE="-1">EBCDIC</FONT> character sets, listed below. <A NAME="lbAI">&nbsp;</A> <H3>The 13 variant characters</H3> <A NAME="ixAAI"></A> Among <FONT SIZE="-1">IBM</FONT> <FONT SIZE="-1">EBCDIC</FONT> character code sets there are 13 characters that are often mapped to different integer values. Those characters are known as the 13 ``variant'' characters and are: <P> <PRE> \ [ ] { } ^ ~ ! # | $ @ ` </PRE> <P> When Perl is compiled for a platform, it looks at some of these characters to guess which <FONT SIZE="-1">EBCDIC</FONT> character set the platform uses, and adapts itself accordingly to that platform. If the platform uses a character set that is not one of the three Perl knows about, Perl will either fail to compile, or mistakenly and silently choose one of the three. They are: <A NAME="lbAJ">&nbsp;</A> <H3>0037</H3> <A NAME="ixAAJ"></A> Character code set <FONT SIZE="-1">ID</FONT> 0037 is a mapping of the <FONT SIZE="-1">ASCII</FONT> plus Latin-1 characters (i.e. <FONT SIZE="-1">ISO</FONT> 8859-1) to an <FONT SIZE="-1">EBCDIC</FONT> set. 0037 is used in North American English locales on the <FONT SIZE="-1">OS/400</FONT> operating system that runs on <FONT SIZE="-1">AS/400</FONT> computers. <FONT SIZE="-1">CCSID</FONT> 37 differs from <FONT SIZE="-1">ISO</FONT> 8859-1 in 237 places, in other words they agree on only 19 code point values. <A NAME="lbAK">&nbsp;</A> <H3>1047</H3> <A NAME="ixAAK"></A> Character code set <FONT SIZE="-1">ID</FONT> 1047 is also a mapping of the <FONT SIZE="-1">ASCII</FONT> plus Latin-1 characters (i.e. <FONT SIZE="-1">ISO</FONT> 8859-1) to an <FONT SIZE="-1">EBCDIC</FONT> set. 1047 is used under Unix System Services for <FONT SIZE="-1">OS/390</FONT> or z/OS, and OpenEdition for <FONT SIZE="-1">VM/ESA</FONT>. <FONT SIZE="-1">CCSID</FONT> 1047 differs from <FONT SIZE="-1">CCSID</FONT> 0037 in eight places. <A NAME="lbAL">&nbsp;</A> <H3>POSIX-BC</H3> <A NAME="ixAAL"></A> The <FONT SIZE="-1">EBCDIC</FONT> code page in use on Siemens' <FONT SIZE="-1">BS2000</FONT> system is distinct from 1047 and 0037. It is identified below as the POSIX-BC set. <A NAME="lbAM">&nbsp;</A> <H3>Unicode code points versus <FONT SIZE="-1">EBCDIC</FONT> code points</H3> <A NAME="ixAAM"></A> In Unicode terminology a <I>code point</I> is the number assigned to a character: for example, in <FONT SIZE="-1">EBCDIC</FONT> the character ``A'' is usually assigned the number 193. In Unicode the character ``A'' is assigned the number 65. This causes a problem with the semantics of the pack/unpack ``U'', which are supposed to pack Unicode code points to characters and back to numbers. The problem is: which code points to use for code points less than 256? (for 256 and over there's no problem: Unicode code points are used) In <FONT SIZE="-1">EBCDIC</FONT>, for the low 256 the <FONT SIZE="-1">EBCDIC</FONT> code points are used. This means that the equivalences <P> <PRE> pack(&quot;U&quot;, ord($character)) eq $character unpack(&quot;U&quot;, $character) == ord $character </PRE> <P> will hold. (If Unicode code points were applied consistently over all the possible code points, pack(``U'',ord(``A'')) would in <FONT SIZE="-1">EBCDIC</FONT> equal <I>A with acute</I> or chr(101), and unpack(``U'', ``A'') would equal 65, or <I>non-breaking space</I>, not 193, or ord ``A''.) <A NAME="lbAN">&nbsp;</A> <H3>Remaining Perl Unicode problems in <FONT SIZE="-1">EBCDIC</FONT></H3> <A NAME="ixAAN"></A> <DL COMPACT> <DT>*<DD> Many of the remaining problems seem to be related to case-insensitive matching <DT>*<DD> The extensions Unicode::Collate and Unicode::Normalized are not supported under <FONT SIZE="-1">EBCDIC</FONT>, likewise for the encoding pragma. </DL> <A NAME="lbAO">&nbsp;</A> <H3>Unicode and <FONT SIZE="-1">UTF</FONT></H3> <A NAME="ixAAO"></A> <FONT SIZE="-1">UTF</FONT> stands for <TT>&quot;Unicode Transformation Format&quot;</TT>. <FONT SIZE="-1">UTF-8</FONT> is an encoding of Unicode into a sequence of 8-bit byte chunks, based on <FONT SIZE="-1">ASCII</FONT> and Latin-1. The length of a sequence required to represent a Unicode code point depends on the ordinal number of that code point, with larger numbers requiring more bytes. UTF-EBCDIC is like <FONT SIZE="-1">UTF-8</FONT>, but based on <FONT SIZE="-1">EBCDIC</FONT>. <P> You may see the term <TT>&quot;invariant&quot;</TT> character or code point. This simply means that the character has the same numeric value when encoded as when not. (Note that this is a very different concept from ``The 13 variant characters'' mentioned above.) For example, the ordinal value of 'A' is 193 in most <FONT SIZE="-1">EBCDIC</FONT> code pages, and also is 193 when encoded in UTF-EBCDIC. All other code points occupy at least two bytes when encoded. In <FONT SIZE="-1">UTF-8</FONT>, the code points corresponding to the lowest 128 ordinal numbers (0 - 127: the <FONT SIZE="-1">ASCII</FONT> characters) are invariant. In UTF-EBCDIC, there are 160 invariant characters. (If you care, the <FONT SIZE="-1">EBCDIC</FONT> invariants are those characters which have <FONT SIZE="-1">ASCII</FONT> equivalents, plus those that correspond to the C1 controls (80..9f on <FONT SIZE="-1">ASCII</FONT> platforms).) <P> A string encoded in UTF-EBCDIC may be longer (but never shorter) than one encoded in <FONT SIZE="-1">UTF-8</FONT>. <A NAME="lbAP">&nbsp;</A> <H3>Using Encode</H3> <A NAME="ixAAP"></A> Starting from Perl 5.8 you can use the standard new module Encode to translate from <FONT SIZE="-1">EBCDIC</FONT> to Latin-1 code points. Encode knows about more <FONT SIZE="-1">EBCDIC</FONT> character sets than Perl can currently be compiled to run on. <P> <PRE> use Encode 'from_to'; my %ebcdic = ( 176 =&gt; 'cp37', 95 =&gt; 'cp1047', 106 =&gt; 'posix-bc' ); # $a is in EBCDIC code points from_to($a, $ebcdic{ord '^'}, 'latin1'); # $a is ISO 8859-1 code points </PRE> <P> and from Latin-1 code points to <FONT SIZE="-1">EBCDIC</FONT> code points <P> <PRE> use Encode 'from_to'; my %ebcdic = ( 176 =&gt; 'cp37', 95 =&gt; 'cp1047', 106 =&gt; 'posix-bc' ); # $a is ISO 8859-1 code points from_to($a, 'latin1', $ebcdic{ord '^'}); # $a is in EBCDIC code points </PRE> <P> For doing I/O it is suggested that you use the autotranslating features of PerlIO, see perluniintro. <P> Since version 5.8 Perl uses the new PerlIO I/O library. This enables you to use different encodings per <FONT SIZE="-1">IO</FONT> channel. For example you may use <P> <PRE> use Encode; open($f, &quot;&gt;:encoding(ascii)&quot;, &quot;test.ascii&quot;); print $f &quot;Hello World!\n&quot;; open($f, &quot;&gt;:encoding(cp37)&quot;, &quot;test.ebcdic&quot;); print $f &quot;Hello World!\n&quot;; open($f, &quot;&gt;:encoding(latin1)&quot;, &quot;test.latin1&quot;); print $f &quot;Hello World!\n&quot;; open($f, &quot;&gt;:encoding(utf8)&quot;, &quot;test.utf8&quot;); print $f &quot;Hello World!\n&quot;; </PRE> <P> to get four files containing ``Hello World!\n'' in <FONT SIZE="-1">ASCII</FONT>, <FONT SIZE="-1">CP</FONT> 37 <FONT SIZE="-1">EBCDIC</FONT>, <FONT SIZE="-1">ISO</FONT> 8859-1 (Latin-1) (in this example identical to <FONT SIZE="-1">ASCII</FONT> since only <FONT SIZE="-1">ASCII</FONT> characters were printed), and UTF-EBCDIC (in this example identical to normal <FONT SIZE="-1">EBCDIC</FONT> since only characters that don't differ between <FONT SIZE="-1">EBCDIC</FONT> and UTF-EBCDIC were printed). See the documentation of Encode::PerlIO for details. <P> As the PerlIO layer uses raw <FONT SIZE="-1">IO</FONT> (bytes) internally, all this totally ignores things like the type of your filesystem (<FONT SIZE="-1">ASCII</FONT> or <FONT SIZE="-1">EBCDIC</FONT>). <A NAME="lbAQ">&nbsp;</A> <H2>SINGLE OCTET TABLES</H2> <A NAME="ixAAQ"></A> The following tables list the <FONT SIZE="-1">ASCII</FONT> and Latin 1 ordered sets including the subsets: C0 controls (0..31), <FONT SIZE="-1">ASCII</FONT> graphics (32..7e), delete (7f), C1 controls (80..9f), and Latin-1 (a.k.a. <FONT SIZE="-1">ISO</FONT> 8859-1) (a0..ff). In the table non-printing control character names as well as the Latin 1 extensions to <FONT SIZE="-1">ASCII</FONT> have been labelled with character names roughly corresponding to <I>The Unicode Standard, Version 3.0</I> albeit with substitutions such as s/LATIN// and s/VULGAR// in all cases, s/CAPITAL <FONT SIZE="-1">LETTER//</FONT> in some cases, and s/SMALL <FONT SIZE="-1">LETTER</FONT> ([A-Z])/\l$1/ in some other cases (the <TT>&quot;charnames&quot;</TT> pragma names unfortunately do not list explicit names for the C0 or C1 control characters). The ``names'' of the C1 control set (128..159 in <FONT SIZE="-1">ISO</FONT> 8859-1) listed here are somewhat arbitrary. The differences between the 0037 and 1047 sets are flagged with ***. The differences between the 1047 and POSIX-BC sets are flagged with ###. All <I>ord()</I> numbers listed are decimal. If you would rather see this table listing octal values then run the table (that is, the pod version of this document since this recipe may not work with a pod2_other_format translation) through: <DL COMPACT> <DT>recipe 0<DD> <A NAME="ixAAR"></A> </DL> <P> <PRE> perl -ne 'if(/(.{33})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/)' \ -e '{printf(&quot;%s%-9o%-9o%-9o%o\n&quot;,$1,$2,$3,$4,$5)}' perlebcdic.pod </PRE> <P> If you want to retain the UTF-x code points then in script form you might want to write: <DL COMPACT> <DT>recipe 1<DD> <A NAME="ixAAS"></A> </DL> <P> <PRE> open(FH,&quot;&lt;perlebcdic.pod&quot;) or die &quot;Could not open perlebcdic.pod: $!&quot;; while (&lt;FH&gt;) { if (/(.{33})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\.?(\d*)\s+(\d+)\.?(\d*)/) { if ($7 ne '' &amp;&amp; $9 ne '') { printf(&quot;%s%-9o%-9o%-9o%-9o%-3o.%-5o%-3o.%o\n&quot;,$1,$2,$3,$4,$5,$6,$7,$8,$9); } elsif ($7 ne '') { printf(&quot;%s%-9o%-9o%-9o%-9o%-3o.%-5o%o\n&quot;,$1,$2,$3,$4,$5,$6,$7,$8); } else { printf(&quot;%s%-9o%-9o%-9o%-9o%-9o%o\n&quot;,$1,$2,$3,$4,$5,$6,$8); } } } </PRE> <P> If you would rather see this table listing hexadecimal values then run the table through: <DL COMPACT> <DT>recipe 2<DD> <A NAME="ixAAT"></A> </DL> <P> <PRE> perl -ne 'if(/(.{33})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/)' \ -e '{printf(&quot;%s%-9X%-9X%-9X%X\n&quot;,$1,$2,$3,$4,$5)}' perlebcdic.pod </PRE> <P> Or, in order to retain the UTF-x code points in hexadecimal: <DL COMPACT> <DT>recipe 3<DD> <A NAME="ixAAU"></A> </DL> <P> <PRE> open(FH,&quot;&lt;perlebcdic.pod&quot;) or die &quot;Could not open perlebcdic.pod: $!&quot;; while (&lt;FH&gt;) { if (/(.{33})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\.?(\d*)\s+(\d+)\.?(\d*)/) { if ($7 ne '' &amp;&amp; $9 ne '') { printf(&quot;%s%-9X%-9X%-9X%-9X%-2X.%-6X%-2X.%X\n&quot;,$1,$2,$3,$4,$5,$6,$7,$8,$9); } elsif ($7 ne '') { printf(&quot;%s%-9X%-9X%-9X%-9X%-2X.%-6X%X\n&quot;,$1,$2,$3,$4,$5,$6,$7,$8); } else { printf(&quot;%s%-9X%-9X%-9X%-9X%-9X%X\n&quot;,$1,$2,$3,$4,$5,$6,$8); } } } incomp- incomp- 8859-1 lete lete chr 0819 0037 1047 POSIX-BC UTF-8 UTF-EBCDIC ------------------------------------------------------------------------------------ &lt;NULL&gt; 0 0 0 0 0 0 &lt;START OF HEADING&gt; 1 1 1 1 1 1 &lt;START OF TEXT&gt; 2 2 2 2 2 2 &lt;END OF TEXT&gt; 3 3 3 3 3 3 &lt;END OF TRANSMISSION&gt; 4 55 55 55 4 55 &lt;ENQUIRY&gt; 5 45 45 45 5 45 &lt;ACKNOWLEDGE&gt; 6 46 46 46 6 46 &lt;BELL&gt; 7 47 47 47 7 47 &lt;BACKSPACE&gt; 8 22 22 22 8 22 &lt;HORIZONTAL TABULATION&gt; 9 5 5 5 9 5 &lt;LINE FEED&gt; 10 37 21 21 10 21 *** &lt;VERTICAL TABULATION&gt; 11 11 11 11 11 11 &lt;FORM FEED&gt; 12 12 12 12 12 12 &lt;CARRIAGE RETURN&gt; 13 13 13 13 13 13 &lt;SHIFT OUT&gt; 14 14 14 14 14 14 &lt;SHIFT IN&gt; 15 15 15 15 15 15 &lt;DATA LINK ESCAPE&gt; 16 16 16 16 16 16 &lt;DEVICE CONTROL ONE&gt; 17 17 17 17 17 17 &lt;DEVICE CONTROL TWO&gt; 18 18 18 18 18 18 &lt;DEVICE CONTROL THREE&gt; 19 19 19 19 19 19 &lt;DEVICE CONTROL FOUR&gt; 20 60 60 60 20 60 &lt;NEGATIVE ACKNOWLEDGE&gt; 21 61 61 61 21 61 &lt;SYNCHRONOUS IDLE&gt; 22 50 50 50 22 50 &lt;END OF TRANSMISSION BLOCK&gt; 23 38 38 38 23 38 &lt;CANCEL&gt; 24 24 24 24 24 24 &lt;END OF MEDIUM&gt; 25 25 25 25 25 25 &lt;SUBSTITUTE&gt; 26 63 63 63 26 63 &lt;ESCAPE&gt; 27 39 39 39 27 39 &lt;FILE SEPARATOR&gt; 28 28 28 28 28 28 &lt;GROUP SEPARATOR&gt; 29 29 29 29 29 29 &lt;RECORD SEPARATOR&gt; 30 30 30 30 30 30 &lt;UNIT SEPARATOR&gt; 31 31 31 31 31 31 &lt;SPACE&gt; 32 64 64 64 32 64 ! 33 90 90 90 33 90 &quot; 34 127 127 127 34 127 # 35 123 123 123 35 123 $ 36 91 91 91 36 91 % 37 108 108 108 37 108 &amp; 38 80 80 80 38 80 ' 39 125 125 125 39 125 ( 40 77 77 77 40 77 ) 41 93 93 93 41 93 * 42 92 92 92 42 92 + 43 78 78 78 43 78 , 44 107 107 107 44 107 - 45 96 96 96 45 96 . 46 75 75 75 46 75 / 47 97 97 97 47 97 0 48 240 240 240 48 240 1 49 241 241 241 49 241 2 50 242 242 242 50 242 3 51 243 243 243 51 243 4 52 244 244 244 52 244 5 53 245 245 245 53 245 6 54 246 246 246 54 246 7 55 247 247 247 55 247 8 56 248 248 248 56 248 9 57 249 249 249 57 249 : 58 122 122 122 58 122 ; 59 94 94 94 59 94 &lt; 60 76 76 76 60 76 = 61 126 126 126 61 126 &gt; 62 110 110 110 62 110 ? 63 111 111 111 63 111 @ 64 124 124 124 64 124 A 65 193 193 193 65 193 B 66 194 194 194 66 194 C 67 195 195 195 67 195 D 68 196 196 196 68 196 E 69 197 197 197 69 197 F 70 198 198 198 70 198 G 71 199 199 199 71 199 H 72 200 200 200 72 200 I 73 201 201 201 73 201 J 74 209 209 209 74 209 K 75 210 210 210 75 210 L 76 211 211 211 76 211 M 77 212 212 212 77 212 N 78 213 213 213 78 213 O 79 214 214 214 79 214 P 80 215 215 215 80 215 Q 81 216 216 216 81 216 R 82 217 217 217 82 217 S 83 226 226 226 83 226 T 84 227 227 227 84 227 U 85 228 228 228 85 228 V 86 229 229 229 86 229 W 87 230 230 230 87 230 X 88 231 231 231 88 231 Y 89 232 232 232 89 232 Z 90 233 233 233 90 233 [ 91 186 173 187 91 173 *** ### \ 92 224 224 188 92 224 ### ] 93 187 189 189 93 189 *** ^ 94 176 95 106 94 95 *** ### _ 95 109 109 109 95 109 ` 96 121 121 74 96 121 ### a 97 129 129 129 97 129 b 98 130 130 130 98 130 c 99 131 131 131 99 131 d 100 132 132 132 100 132 e 101 133 133 133 101 133 f 102 134 134 134 102 134 g 103 135 135 135 103 135 h 104 136 136 136 104 136 i 105 137 137 137 105 137 j 106 145 145 145 106 145 k 107 146 146 146 107 146 l 108 147 147 147 108 147 m 109 148 148 148 109 148 n 110 149 149 149 110 149 o 111 150 150 150 111 150 p 112 151 151 151 112 151 q 113 152 152 152 113 152 r 114 153 153 153 114 153 s 115 162 162 162 115 162 t 116 163 163 163 116 163 u 117 164 164 164 117 164 v 118 165 165 165 118 165 w 119 166 166 166 119 166 x 120 167 167 167 120 167 y 121 168 168 168 121 168 z 122 169 169 169 122 169 { 123 192 192 251 123 192 ### | 124 79 79 79 124 79 } 125 208 208 253 125 208 ### ~ 126 161 161 255 126 161 ### &lt;DELETE&gt; 127 7 7 7 127 7 &lt;C1 0&gt; 128 32 32 32 194.128 32 &lt;C1 1&gt; 129 33 33 33 194.129 33 &lt;C1 2&gt; 130 34 34 34 194.130 34 &lt;C1 3&gt; 131 35 35 35 194.131 35 &lt;C1 4&gt; 132 36 36 36 194.132 36 &lt;C1 5&gt; 133 21 37 37 194.133 37 *** &lt;C1 6&gt; 134 6 6 6 194.134 6 &lt;C1 7&gt; 135 23 23 23 194.135 23 &lt;C1 8&gt; 136 40 40 40 194.136 40 &lt;C1 9&gt; 137 41 41 41 194.137 41 &lt;C1 10&gt; 138 42 42 42 194.138 42 &lt;C1 11&gt; 139 43 43 43 194.139 43 &lt;C1 12&gt; 140 44 44 44 194.140 44 &lt;C1 13&gt; 141 9 9 9 194.141 9 &lt;C1 14&gt; 142 10 10 10 194.142 10 &lt;C1 15&gt; 143 27 27 27 194.143 27 &lt;C1 16&gt; 144 48 48 48 194.144 48 &lt;C1 17&gt; 145 49 49 49 194.145 49 &lt;C1 18&gt; 146 26 26 26 194.146 26 &lt;C1 19&gt; 147 51 51 51 194.147 51 &lt;C1 20&gt; 148 52 52 52 194.148 52 &lt;C1 21&gt; 149 53 53 53 194.149 53 &lt;C1 22&gt; 150 54 54 54 194.150 54 &lt;C1 23&gt; 151 8 8 8 194.151 8 &lt;C1 24&gt; 152 56 56 56 194.152 56 &lt;C1 25&gt; 153 57 57 57 194.153 57 &lt;C1 26&gt; 154 58 58 58 194.154 58 &lt;C1 27&gt; 155 59 59 59 194.155 59 &lt;C1 28&gt; 156 4 4 4 194.156 4 &lt;C1 29&gt; 157 20 20 20 194.157 20 &lt;C1 30&gt; 158 62 62 62 194.158 62 &lt;C1 31&gt; 159 255 255 95 194.159 255 ### &lt;NON-BREAKING SPACE&gt; 160 65 65 65 194.160 128.65 &lt;INVERTED EXCLAMATION MARK&gt; 161 170 170 170 194.161 128.66 &lt;CENT SIGN&gt; 162 74 74 176 194.162 128.67 ### &lt;POUND SIGN&gt; 163 177 177 177 194.163 128.68 &lt;CURRENCY SIGN&gt; 164 159 159 159 194.164 128.69 &lt;YEN SIGN&gt; 165 178 178 178 194.165 128.70 &lt;BROKEN BAR&gt; 166 106 106 208 194.166 128.71 ### &lt;SECTION SIGN&gt; 167 181 181 181 194.167 128.72 &lt;DIAERESIS&gt; 168 189 187 121 194.168 128.73 *** ### &lt;COPYRIGHT SIGN&gt; 169 180 180 180 194.169 128.74 &lt;FEMININE ORDINAL INDICATOR&gt; 170 154 154 154 194.170 128.81 &lt;LEFT POINTING GUILLEMET&gt; 171 138 138 138 194.171 128.82 &lt;NOT SIGN&gt; 172 95 176 186 194.172 128.83 *** ### &lt;SOFT HYPHEN&gt; 173 202 202 202 194.173 128.84 &lt;REGISTERED TRADE MARK SIGN&gt; 174 175 175 175 194.174 128.85 &lt;MACRON&gt; 175 188 188 161 194.175 128.86 ### &lt;DEGREE SIGN&gt; 176 144 144 144 194.176 128.87 &lt;PLUS-OR-MINUS SIGN&gt; 177 143 143 143 194.177 128.88 &lt;SUPERSCRIPT TWO&gt; 178 234 234 234 194.178 128.89 &lt;SUPERSCRIPT THREE&gt; 179 250 250 250 194.179 128.98 &lt;ACUTE ACCENT&gt; 180 190 190 190 194.180 128.99 &lt;MICRO SIGN&gt; 181 160 160 160 194.181 128.100 &lt;PARAGRAPH SIGN&gt; 182 182 182 182 194.182 128.101 &lt;MIDDLE DOT&gt; 183 179 179 179 194.183 128.102 &lt;CEDILLA&gt; 184 157 157 157 194.184 128.103 &lt;SUPERSCRIPT ONE&gt; 185 218 218 218 194.185 128.104 &lt;MASC. ORDINAL INDICATOR&gt; 186 155 155 155 194.186 128.105 &lt;RIGHT POINTING GUILLEMET&gt; 187 139 139 139 194.187 128.106 &lt;FRACTION ONE QUARTER&gt; 188 183 183 183 194.188 128.112 &lt;FRACTION ONE HALF&gt; 189 184 184 184 194.189 128.113 &lt;FRACTION THREE QUARTERS&gt; 190 185 185 185 194.190 128.114 &lt;INVERTED QUESTION MARK&gt; 191 171 171 171 194.191 128.115 &lt;A WITH GRAVE&gt; 192 100 100 100 195.128 138.65 &lt;A WITH ACUTE&gt; 193 101 101 101 195.129 138.66 &lt;A WITH CIRCUMFLEX&gt; 194 98 98 98 195.130 138.67 &lt;A WITH TILDE&gt; 195 102 102 102 195.131 138.68 &lt;A WITH DIAERESIS&gt; 196 99 99 99 195.132 138.69 &lt;A WITH RING ABOVE&gt; 197 103 103 103 195.133 138.70 &lt;CAPITAL LIGATURE AE&gt; 198 158 158 158 195.134 138.71 &lt;C WITH CEDILLA&gt; 199 104 104 104 195.135 138.72 &lt;E WITH GRAVE&gt; 200 116 116 116 195.136 138.73 &lt;E WITH ACUTE&gt; 201 113 113 113 195.137 138.74 &lt;E WITH CIRCUMFLEX&gt; 202 114 114 114 195.138 138.81 &lt;E WITH DIAERESIS&gt; 203 115 115 115 195.139 138.82 &lt;I WITH GRAVE&gt; 204 120 120 120 195.140 138.83 &lt;I WITH ACUTE&gt; 205 117 117 117 195.141 138.84 &lt;I WITH CIRCUMFLEX&gt; 206 118 118 118 195.142 138.85 &lt;I WITH DIAERESIS&gt; 207 119 119 119 195.143 138.86 &lt;CAPITAL LETTER ETH&gt; 208 172 172 172 195.144 138.87 &lt;N WITH TILDE&gt; 209 105 105 105 195.145 138.88 &lt;O WITH GRAVE&gt; 210 237 237 237 195.146 138.89 &lt;O WITH ACUTE&gt; 211 238 238 238 195.147 138.98 &lt;O WITH CIRCUMFLEX&gt; 212 235 235 235 195.148 138.99 &lt;O WITH TILDE&gt; 213 239 239 239 195.149 138.100 &lt;O WITH DIAERESIS&gt; 214 236 236 236 195.150 138.101 &lt;MULTIPLICATION SIGN&gt; 215 191 191 191 195.151 138.102 &lt;O WITH STROKE&gt; 216 128 128 128 195.152 138.103 &lt;U WITH GRAVE&gt; 217 253 253 224 195.153 138.104 ### &lt;U WITH ACUTE&gt; 218 254 254 254 195.154 138.105 &lt;U WITH CIRCUMFLEX&gt; 219 251 251 221 195.155 138.106 ### &lt;U WITH DIAERESIS&gt; 220 252 252 252 195.156 138.112 &lt;Y WITH ACUTE&gt; 221 173 186 173 195.157 138.113 *** ### &lt;CAPITAL LETTER THORN&gt; 222 174 174 174 195.158 138.114 &lt;SMALL LETTER SHARP S&gt; 223 89 89 89 195.159 138.115 &lt;a WITH GRAVE&gt; 224 68 68 68 195.160 139.65 &lt;a WITH ACUTE&gt; 225 69 69 69 195.161 139.66 &lt;a WITH CIRCUMFLEX&gt; 226 66 66 66 195.162 139.67 &lt;a WITH TILDE&gt; 227 70 70 70 195.163 139.68 &lt;a WITH DIAERESIS&gt; 228 67 67 67 195.164 139.69 &lt;a WITH RING ABOVE&gt; 229 71 71 71 195.165 139.70 &lt;SMALL LIGATURE ae&gt; 230 156 156 156 195.166 139.71 &lt;c WITH CEDILLA&gt; 231 72 72 72 195.167 139.72 &lt;e WITH GRAVE&gt; 232 84 84 84 195.168 139.73 &lt;e WITH ACUTE&gt; 233 81 81 81 195.169 139.74 &lt;e WITH CIRCUMFLEX&gt; 234 82 82 82 195.170 139.81 &lt;e WITH DIAERESIS&gt; 235 83 83 83 195.171 139.82 &lt;i WITH GRAVE&gt; 236 88 88 88 195.172 139.83 &lt;i WITH ACUTE&gt; 237 85 85 85 195.173 139.84 &lt;i WITH CIRCUMFLEX&gt; 238 86 86 86 195.174 139.85 &lt;i WITH DIAERESIS&gt; 239 87 87 87 195.175 139.86 &lt;SMALL LETTER eth&gt; 240 140 140 140 195.176 139.87 &lt;n WITH TILDE&gt; 241 73 73 73 195.177 139.88 &lt;o WITH GRAVE&gt; 242 205 205 205 195.178 139.89 &lt;o WITH ACUTE&gt; 243 206 206 206 195.179 139.98 &lt;o WITH CIRCUMFLEX&gt; 244 203 203 203 195.180 139.99 &lt;o WITH TILDE&gt; 245 207 207 207 195.181 139.100 &lt;o WITH DIAERESIS&gt; 246 204 204 204 195.182 139.101 &lt;DIVISION SIGN&gt; 247 225 225 225 195.183 139.102 &lt;o WITH STROKE&gt; 248 112 112 112 195.184 139.103 &lt;u WITH GRAVE&gt; 249 221 221 192 195.185 139.104 ### &lt;u WITH ACUTE&gt; 250 222 222 222 195.186 139.105 &lt;u WITH CIRCUMFLEX&gt; 251 219 219 219 195.187 139.106 &lt;u WITH DIAERESIS&gt; 252 220 220 220 195.188 139.112 &lt;y WITH ACUTE&gt; 253 141 141 141 195.189 139.113 &lt;SMALL LETTER thorn&gt; 254 142 142 142 195.190 139.114 &lt;y WITH DIAERESIS&gt; 255 223 223 223 195.191 139.115 </PRE> <P> If you would rather see the above table in <FONT SIZE="-1">CCSID</FONT> 0037 order rather than <FONT SIZE="-1">ASCII</FONT> + Latin-1 order then run the table through: <DL COMPACT> <DT>recipe 4<DD> <A NAME="ixAAV"></A> </DL> <P> <PRE> perl -ne 'if(/.{33}\d{1,3}\s{6,8}\d{1,3}\s{6,8}\d{1,3}\s{6,8}\d{1,3}/)'\ -e '{push(@l,$_)}' \ -e 'END{print map{$_-&gt;[0]}' \ -e ' sort{$a-&gt;[1] &lt;=&gt; $b-&gt;[1]}' \ -e ' map{[$_,substr($_,42,3)]}@l;}' perlebcdic.pod </PRE> <P> If you would rather see it in <FONT SIZE="-1">CCSID</FONT> 1047 order then change the digit 42 in the last line to 51, like this: <DL COMPACT> <DT>recipe 5<DD> <A NAME="ixAAW"></A> </DL> <P> <PRE> perl -ne 'if(/.{33}\d{1,3}\s{6,8}\d{1,3}\s{6,8}\d{1,3}\s{6,8}\d{1,3}/)'\ -e '{push(@l,$_)}' \ -e 'END{print map{$_-&gt;[0]}' \ -e ' sort{$a-&gt;[1] &lt;=&gt; $b-&gt;[1]}' \ -e ' map{[$_,substr($_,51,3)]}@l;}' perlebcdic.pod </PRE> <P> If you would rather see it in POSIX-BC order then change the digit 51 in the last line to 60, like this: <DL COMPACT> <DT>recipe 6<DD> <A NAME="ixAAX"></A> </DL> <P> <PRE> perl -ne 'if(/.{33}\d{1,3}\s{6,8}\d{1,3}\s{6,8}\d{1,3}\s{6,8}\d{1,3}/)'\ -e '{push(@l,$_)}' \ -e 'END{print map{$_-&gt;[0]}' \ -e ' sort{$a-&gt;[1] &lt;=&gt; $b-&gt;[1]}' \ -e ' map{[$_,substr($_,60,3)]}@l;}' perlebcdic.pod </PRE> <A NAME="lbAR">&nbsp;</A> <H2>IDENTIFYING CHARACTER CODE SETS</H2> <A NAME="ixAAY"></A> To determine the character set you are running under from perl one could use the return value of <I>ord()</I> or <I>chr()</I> to test one or more character values. For example: <P> <PRE> $is_ascii = &quot;A&quot; eq chr(65); $is_ebcdic = &quot;A&quot; eq chr(193); </PRE> <P> Also, ``\t'' is a <TT>&quot;HORIZONTAL TABULATION&quot;</TT> character so that: <P> <PRE> $is_ascii = ord(&quot;\t&quot;) == 9; $is_ebcdic = ord(&quot;\t&quot;) == 5; </PRE> <P> To distinguish <FONT SIZE="-1">EBCDIC</FONT> code pages try looking at one or more of the characters that differ between them. For example: <P> <PRE> $is_ebcdic_37 = &quot;\n&quot; eq chr(37); $is_ebcdic_1047 = &quot;\n&quot; eq chr(21); </PRE> <P> Or better still choose a character that is uniquely encoded in any of the code sets, e.g.: <P> <PRE> $is_ascii = ord('[') == 91; $is_ebcdic_37 = ord('[') == 186; $is_ebcdic_1047 = ord('[') == 173; $is_ebcdic_POSIX_BC = ord('[') == 187; </PRE> <P> However, it would be unwise to write tests such as: <P> <PRE> $is_ascii = &quot;\r&quot; ne chr(13); # WRONG $is_ascii = &quot;\n&quot; ne chr(10); # ILL ADVISED </PRE> <P> Obviously the first of these will fail to distinguish most <FONT SIZE="-1">ASCII</FONT> platforms from either a <FONT SIZE="-1">CCSID</FONT> 0037, a 1047, or a POSIX-BC <FONT SIZE="-1">EBCDIC</FONT> platform since ``\r'' eq chr(13) under all of those coded character sets. But note too that because ``\n'' is chr(13) and ``\r'' is chr(10) on the MacIntosh (which is an <FONT SIZE="-1">ASCII</FONT> platform) the second <TT>$is_ascii</TT> test will lead to trouble there. <P> To determine whether or not perl was built under an <FONT SIZE="-1">EBCDIC</FONT> code page you can use the Config module like so: <P> <PRE> use Config; $is_ebcdic = $Config{'ebcdic'} eq 'define'; </PRE> <A NAME="lbAS">&nbsp;</A> <H2>CONVERSIONS</H2> <A NAME="ixAAZ"></A> <A NAME="lbAT">&nbsp;</A> <H3>tr///</H3> <A NAME="ixABA"></A> In order to convert a string of characters from one character set to another a simple list of numbers, such as in the right columns in the above table, along with perl's tr/// operator is all that is needed. The data in the table are in <FONT SIZE="-1">ASCII</FONT> order hence the <FONT SIZE="-1">EBCDIC</FONT> columns provide easy to use <FONT SIZE="-1">ASCII</FONT> to <FONT SIZE="-1">EBCDIC</FONT> operations that are also easily reversed. <P> For example, to convert <FONT SIZE="-1">ASCII</FONT> to code page 037 take the output of the second column from the output of recipe 0 (modified to add \\ characters) and use it in tr/// like so: <P> <PRE> $cp_037 = '\000\001\002\003\234\011\206\177\227\215\216\013\014\015\016\017' . '\020\021\022\023\235\205\010\207\030\031\222\217\034\035\036\037' . '\200\201\202\203\204\012\027\033\210\211\212\213\214\005\006\007' . '\220\221\026\223\224\225\226\004\230\231\232\233\024\025\236\032' . '\040\240\342\344\340\341\343\345\347\361\242\056\074\050\053\174' . '\046\351\352\353\350\355\356\357\354\337\041\044\052\051\073\254' . '\055\057\302\304\300\301\303\305\307\321\246\054\045\137\076\077' . '\370\311\312\313\310\315\316\317\314\140\072\043\100\047\075\042' . '\330\141\142\143\144\145\146\147\150\151\253\273\360\375\376\261' . '\260\152\153\154\155\156\157\160\161\162\252\272\346\270\306\244' . '\265\176\163\164\165\166\167\170\171\172\241\277\320\335\336\256' . '\136\243\245\267\251\247\266\274\275\276\133\135\257\250\264\327' . '\173\101\102\103\104\105\106\107\110\111\255\364\366\362\363\365' . '\175\112\113\114\115\116\117\120\121\122\271\373\374\371\372\377' . '\134\367\123\124\125\126\127\130\131\132\262\324\326\322\323\325' . '\060\061\062\063\064\065\066\067\070\071\263\333\334\331\332\237' ; my $ebcdic_string = $ascii_string; eval '$ebcdic_string =~ tr/' . $cp_037 . '/\000-\377/'; </PRE> <P> To convert from <FONT SIZE="-1">EBCDIC</FONT> 037 to <FONT SIZE="-1">ASCII</FONT> just reverse the order of the tr/// arguments like so: <P> <PRE> my $ascii_string = $ebcdic_string; eval '$ascii_string =~ tr/\000-\377/' . $cp_037 . '/'; </PRE> <P> Similarly one could take the output of the third column from recipe 0 to obtain a <TT>$cp_1047</TT> table. The fourth column of the output from recipe 0 could provide a <TT>$cp_posix_bc</TT> table suitable for transcoding as well. <A NAME="lbAU">&nbsp;</A> <H3>iconv</H3> <A NAME="ixABB"></A> <FONT SIZE="-1">XPG</FONT> operability often implies the presence of an <I>iconv</I> utility available from the shell or from the C library. Consult your system's documentation for information on iconv. <P> On <FONT SIZE="-1">OS/390</FONT> or z/OS see the <I><A HREF="/manpages/index.html?1+iconv">iconv</A></I>(1) manpage. One way to invoke the iconv shell utility from within perl would be to: <P> <PRE> # OS/390 or z/OS example $ascii_data = `echo '$ebcdic_data'| iconv -f IBM-1047 -t ISO8859-1` </PRE> <P> or the inverse map: <P> <PRE> # OS/390 or z/OS example $ebcdic_data = `echo '$ascii_data'| iconv -f ISO8859-1 -t IBM-1047` </PRE> <P> For other perl based conversion options see the Convert::* modules on <FONT SIZE="-1">CPAN</FONT>. <A NAME="lbAV">&nbsp;</A> <H3>C <FONT SIZE="-1">RTL</FONT></H3> <A NAME="ixABC"></A> The <FONT SIZE="-1">OS/390</FONT> and z/OS C run time libraries provide <I>_atoe()</I> and <I>_etoa()</I> functions. <A NAME="lbAW">&nbsp;</A> <H2>OPERATOR DIFFERENCES</H2> <A NAME="ixABD"></A> The <TT>&quot;..&quot;</TT> range operator treats certain character ranges with care on <FONT SIZE="-1">EBCDIC</FONT> platforms. For example the following array will have twenty six elements on either an <FONT SIZE="-1">EBCDIC</FONT> platform or an <FONT SIZE="-1">ASCII</FONT> platform: <P> <PRE> @alphabet = ('A'..'Z'); # $#alphabet == 25 </PRE> <P> The bitwise operators such as &amp; ^ | may return different results when operating on string or character data in a perl program running on an <FONT SIZE="-1">EBCDIC</FONT> platform than when run on an <FONT SIZE="-1">ASCII</FONT> platform. Here is an example adapted from the one in perlop: <P> <PRE> # EBCDIC-based examples print &quot;j p \n&quot; ^ &quot; a h&quot;; # prints &quot;JAPH\n&quot; print &quot;JA&quot; | &quot; ph\n&quot;; # prints &quot;japh\n&quot; print &quot;JAPH\nJunk&quot; &amp; &quot;\277\277\277\277\277&quot;; # prints &quot;japh\n&quot;; print 'p N$' ^ &quot; E&lt;H\n&quot;; # prints &quot;Perl\n&quot;; </PRE> <P> An interesting property of the 32 C0 control characters in the <FONT SIZE="-1">ASCII</FONT> table is that they can ``literally'' be constructed as control characters in perl, e.g. <TT>&quot;(chr(0) eq &quot;\c@&quot;)&quot;</TT> <TT>&quot;(<A HREF="/manpages/index.html?1+chr">chr</A>(1) eq &quot;\cA&quot;)&quot;</TT>, and so on. Perl on <FONT SIZE="-1">EBCDIC</FONT> platforms has been ported to take ``\c@'' to <I>chr</I>(0) and ``\cA'' to <I><A HREF="/manpages/index.html?1+chr">chr</A></I>(1) as well, but the thirty three characters that result depend on which code page you are using. The table below uses the character names from the previous table but with substitutions such as s/START <FONT SIZE="-1">OF/S</FONT>.O./; s/END <FONT SIZE="-1">OF</FONT> /E.O./; s/TRANSMISSION/TRANS./; s/TABULATION/TAB./; s/VERTICAL/VERT./; s/HORIZONTAL/HORIZ./; s/DEVICE <FONT SIZE="-1">CONTROL/D</FONT>.C./; s/SEPARATOR/SEP./; s/NEGATIVE <FONT SIZE="-1">ACKNOWLEDGE/NEG</FONT>. <FONT SIZE="-1">ACK</FONT>./;. The POSIX-BC and 1047 sets are identical throughout this range and differ from the 0037 set at only one spot (21 decimal). Note that the <TT>&quot;LINE FEED&quot;</TT> character may be generated by ``\cJ'' on <FONT SIZE="-1">ASCII</FONT> platforms but by ``\cU'' on 1047 or POSIX-BC platforms and cannot be generated as a <TT>&quot;\c.letter.&quot;</TT> control character on 0037 platforms. Note also that ``\c\\'' maps to two characters not one. <P> <PRE> chr ord 8859-1 0037 1047 &amp;&amp; POSIX-BC ------------------------------------------------------------------------ &quot;\c?&quot; 127 &lt;DELETE&gt; &quot; &quot; ***&gt;&lt; &quot;\c@&quot; 0 &lt;NULL&gt; &lt;NULL&gt; &lt;NULL&gt; ***&gt;&lt; &quot;\cA&quot; 1 &lt;S.O. HEADING&gt; &lt;S.O. HEADING&gt; &lt;S.O. HEADING&gt; &quot;\cB&quot; 2 &lt;S.O. TEXT&gt; &lt;S.O. TEXT&gt; &lt;S.O. TEXT&gt; &quot;\cC&quot; 3 &lt;E.O. TEXT&gt; &lt;E.O. TEXT&gt; &lt;E.O. TEXT&gt; &quot;\cD&quot; 4 &lt;E.O. TRANS.&gt; &lt;C1 28&gt; &lt;C1 28&gt; &quot;\cE&quot; 5 &lt;ENQUIRY&gt; &lt;HORIZ. TAB.&gt; &lt;HORIZ. TAB.&gt; &quot;\cF&quot; 6 &lt;ACKNOWLEDGE&gt; &lt;C1 6&gt; &lt;C1 6&gt; &quot;\cG&quot; 7 &lt;BELL&gt; &lt;DELETE&gt; &lt;DELETE&gt; &quot;\cH&quot; 8 &lt;BACKSPACE&gt; &lt;C1 23&gt; &lt;C1 23&gt; &quot;\cI&quot; 9 &lt;HORIZ. TAB.&gt; &lt;C1 13&gt; &lt;C1 13&gt; &quot;\cJ&quot; 10 &lt;LINE FEED&gt; &lt;C1 14&gt; &lt;C1 14&gt; &quot;\cK&quot; 11 &lt;VERT. TAB.&gt; &lt;VERT. TAB.&gt; &lt;VERT. TAB.&gt; &quot;\cL&quot; 12 &lt;FORM FEED&gt; &lt;FORM FEED&gt; &lt;FORM FEED&gt; &quot;\cM&quot; 13 &lt;CARRIAGE RETURN&gt; &lt;CARRIAGE RETURN&gt; &lt;CARRIAGE RETURN&gt; &quot;\cN&quot; 14 &lt;SHIFT OUT&gt; &lt;SHIFT OUT&gt; &lt;SHIFT OUT&gt; &quot;\cO&quot; 15 &lt;SHIFT IN&gt; &lt;SHIFT IN&gt; &lt;SHIFT IN&gt; &quot;\cP&quot; 16 &lt;DATA LINK ESCAPE&gt; &lt;DATA LINK ESCAPE&gt; &lt;DATA LINK ESCAPE&gt; &quot;\cQ&quot; 17 &lt;D.C. ONE&gt; &lt;D.C. ONE&gt; &lt;D.C. ONE&gt; &quot;\cR&quot; 18 &lt;D.C. TWO&gt; &lt;D.C. TWO&gt; &lt;D.C. TWO&gt; &quot;\cS&quot; 19 &lt;D.C. THREE&gt; &lt;D.C. THREE&gt; &lt;D.C. THREE&gt; &quot;\cT&quot; 20 &lt;D.C. FOUR&gt; &lt;C1 29&gt; &lt;C1 29&gt; &quot;\cU&quot; 21 &lt;NEG. ACK.&gt; &lt;C1 5&gt; &lt;LINE FEED&gt; *** &quot;\cV&quot; 22 &lt;SYNCHRONOUS IDLE&gt; &lt;BACKSPACE&gt; &lt;BACKSPACE&gt; &quot;\cW&quot; 23 &lt;E.O. TRANS. BLOCK&gt; &lt;C1 7&gt; &lt;C1 7&gt; &quot;\cX&quot; 24 &lt;CANCEL&gt; &lt;CANCEL&gt; &lt;CANCEL&gt; &quot;\cY&quot; 25 &lt;E.O. MEDIUM&gt; &lt;E.O. MEDIUM&gt; &lt;E.O. MEDIUM&gt; &quot;\cZ&quot; 26 &lt;SUBSTITUTE&gt; &lt;C1 18&gt; &lt;C1 18&gt; &quot;\c[&quot; 27 &lt;ESCAPE&gt; &lt;C1 15&gt; &lt;C1 15&gt; &quot;\c\\&quot; 28 &lt;FILE SEP.&gt;\ &lt;FILE SEP.&gt;\ &lt;FILE SEP.&gt;\ &quot;\c]&quot; 29 &lt;GROUP SEP.&gt; &lt;GROUP SEP.&gt; &lt;GROUP SEP.&gt; &quot;\c^&quot; 30 &lt;RECORD SEP.&gt; &lt;RECORD SEP.&gt; &lt;RECORD SEP.&gt; ***&gt;&lt; &quot;\c_&quot; 31 &lt;UNIT SEP.&gt; &lt;UNIT SEP.&gt; &lt;UNIT SEP.&gt; ***&gt;&lt; </PRE> <A NAME="lbAX">&nbsp;</A> <H2>FUNCTION DIFFERENCES</H2> <A NAME="ixABE"></A> <DL COMPACT> <DT><I>chr()</I><DD> <A NAME="ixABF"></A> <I>chr()</I> must be given an <FONT SIZE="-1">EBCDIC</FONT> code number argument to yield a desired character return value on an <FONT SIZE="-1">EBCDIC</FONT> platform. For example: <P> <PRE> $CAPITAL_LETTER_A = chr(193); </PRE> <DT><I>ord()</I><DD> <A NAME="ixABG"></A> <I>ord()</I> will return <FONT SIZE="-1">EBCDIC</FONT> code number values on an <FONT SIZE="-1">EBCDIC</FONT> platform. For example: <P> <PRE> $the_number_193 = ord(&quot;A&quot;); </PRE> <DT><I>pack()</I><DD> <A NAME="ixABH"></A> The c and C templates for <I>pack()</I> are dependent upon character set encoding. Examples of usage on <FONT SIZE="-1">EBCDIC</FONT> include: <P> <PRE> $foo = pack(&quot;CCCC&quot;,193,194,195,196); # $foo eq &quot;ABCD&quot; $foo = pack(&quot;C4&quot;,193,194,195,196); # same thing $foo = pack(&quot;ccxxcc&quot;,193,194,195,196); # $foo eq &quot;AB\0\0CD&quot; </PRE> <DT><I>print()</I><DD> <A NAME="ixABI"></A> One must be careful with scalars and strings that are passed to print that contain <FONT SIZE="-1">ASCII</FONT> encodings. One common place for this to occur is in the output of the <FONT SIZE="-1">MIME</FONT> type header for <FONT SIZE="-1">CGI</FONT> script writing. For example, many perl programming guides recommend something similar to: <P> <PRE> print &quot;Content-type:\ttext/html\015\012\015\012&quot;; # this may be wrong on EBCDIC </PRE> <P> Under the <FONT SIZE="-1">IBM</FONT> <FONT SIZE="-1">OS/390</FONT> <FONT SIZE="-1">USS</FONT> Web Server or WebSphere on z/OS for example you should instead write that as: <P> <PRE> print &quot;Content-type:\ttext/html\r\n\r\n&quot;; # OK for DGW et alia </PRE> <P> That is because the translation from <FONT SIZE="-1">EBCDIC</FONT> to <FONT SIZE="-1">ASCII</FONT> is done by the web server in this case (such code will not be appropriate for the Macintosh however). Consult your web server's documentation for further details. <DT><I>printf()</I><DD> <A NAME="ixABJ"></A> The formats that can convert characters to numbers and vice versa will be different from their <FONT SIZE="-1">ASCII</FONT> counterparts when executed on an <FONT SIZE="-1">EBCDIC</FONT> platform. Examples include: <P> <PRE> printf(&quot;%c%c%c&quot;,193,194,195); # prints ABC </PRE> <DT><I>sort()</I><DD> <A NAME="ixABK"></A> <FONT SIZE="-1">EBCDIC</FONT> sort results may differ from <FONT SIZE="-1">ASCII</FONT> sort results especially for mixed case strings. This is discussed in more detail below. <DT><I>sprintf()</I><DD> <A NAME="ixABL"></A> See the discussion of <I>printf()</I> above. An example of the use of sprintf would be: <P> <PRE> $CAPITAL_LETTER_A = sprintf(&quot;%c&quot;,193); </PRE> <DT><I>unpack()</I><DD> <A NAME="ixABM"></A> See the discussion of <I>pack()</I> above. </DL> <A NAME="lbAY">&nbsp;</A> <H2>REGULAR EXPRESSION DIFFERENCES</H2> <A NAME="ixABN"></A> As of perl 5.005_03 the letter range regular expression such as [A-Z] and [a-z] have been especially coded to not pick up gap characters. For example, characters such as o <TT>&quot;o WITH CIRCUMFLEX&quot;</TT> that lie between I and J would not be matched by the regular expression range <TT>&quot;/[H-K]/&quot;</TT>. This works in the other direction, too, if either of the range end points is explicitly numeric: <TT>&quot;[\x89-\x91]&quot;</TT> will match <TT>&quot;\x8e&quot;</TT>, even though <TT>&quot;\x89&quot;</TT> is <TT>&quot;i&quot;</TT> and <TT>&quot;\x91 &quot;</TT> is <TT>&quot;j&quot;</TT>, and <TT>&quot;\x8e&quot;</TT> is a gap character from the alphabetic viewpoint. <P> If you do want to match the alphabet gap characters in a single octet regular expression try matching the hex or octal code such as <TT>&quot;/\313/&quot;</TT> on <FONT SIZE="-1">EBCDIC</FONT> or <TT>&quot;/\364/&quot;</TT> on <FONT SIZE="-1">ASCII</FONT> platforms to have your regular expression match <TT>&quot;o WITH CIRCUMFLEX&quot;</TT>. <P> Another construct to be wary of is the inappropriate use of hex or octal constants in regular expressions. Consider the following set of subs: <P> <PRE> sub is_c0 { my $char = substr(shift,0,1); $char =~ /[\000-\037]/; } sub is_print_ascii { my $char = substr(shift,0,1); $char =~ /[\040-\176]/; } sub is_delete { my $char = substr(shift,0,1); $char eq &quot;\177&quot;; } sub is_c1 { my $char = substr(shift,0,1); $char =~ /[\200-\237]/; } sub is_latin_1 { my $char = substr(shift,0,1); $char =~ /[\240-\377]/; } </PRE> <P> The above would be adequate if the concern was only with numeric code points. However, the concern may be with characters rather than code points and on an <FONT SIZE="-1">EBCDIC</FONT> platform it may be desirable for constructs such as <TT>&quot;if (is_print_ascii(&quot;A&quot;)) {print &quot;A is a printable character\n&quot;;}&quot;</TT> to print out the expected message. One way to represent the above collection of character classification subs that is capable of working across the four coded character sets discussed in this document is as follows: <P> <PRE> sub Is_c0 { my $char = substr(shift,0,1); if (ord('^')==94) { # ascii return $char =~ /[\000-\037]/; } if (ord('^')==176) { # 37 return $char =~ /[\000-\003\067\055-\057\026\005\045\013-\023\074\075\062\046\030\031\077\047\034-\037]/; } if (ord('^')==95 || ord('^')==106) { # 1047 || posix-bc return $char =~ /[\000-\003\067\055-\057\026\005\025\013-\023\074\075\062\046\030\031\077\047\034-\037]/; } } sub Is_print_ascii { my $char = substr(shift,0,1); $char =~ /[ !&quot;\#\$%&amp;'()*+,\-.\/0-9:;&lt;=&gt;?\@A-Z[\\\]^_`a-z{|}~]/; } sub Is_delete { my $char = substr(shift,0,1); if (ord('^')==94) { # ascii return $char eq &quot;\177&quot;; } else { # ebcdic return $char eq &quot;\007&quot;; } } sub Is_c1 { my $char = substr(shift,0,1); if (ord('^')==94) { # ascii return $char =~ /[\200-\237]/; } if (ord('^')==176) { # 37 return $char =~ /[\040-\044\025\006\027\050-\054\011\012\033\060\061\032\063-\066\010\070-\073\040\024\076\377]/; } if (ord('^')==95) { # 1047 return $char =~ /[\040-\045\006\027\050-\054\011\012\033\060\061\032\063-\066\010\070-\073\040\024\076\377]/; } if (ord('^')==106) { # posix-bc return $char =~ /[\040-\045\006\027\050-\054\011\012\033\060\061\032\063-\066\010\070-\073\040\024\076\137]/; } } sub Is_latin_1 { my $char = substr(shift,0,1); if (ord('^')==94) { # ascii return $char =~ /[\240-\377]/; } if (ord('^')==176) { # 37 return $char =~ /[\101\252\112\261\237\262\152\265\275\264\232\212\137\312\257\274\220\217\352\372\276\240\266\263\235\332\233\213\267\270\271\253\144\145\142\146\143\147\236\150\164\161-\163\170\165-\167\254\151\355\356\353\357\354\277\200\375\376\373\374\255\256\131\104\105\102\106\103\107\234\110\124\121-\123\130\125-\127\214\111\315\316\313\317\314\341\160\335\336\333\334\215\216\337]/; } if (ord('^')==95) { # 1047 return $char =~ /[\101\252\112\261\237\262\152\265\273\264\232\212\260\312\257\274\220\217\352\372\276\240\266\263\235\332\233\213\267\270\271\253\144\145\142\146\143\147\236\150\164\161-\163\170\165-\167\254\151\355\356\353\357\354\277\200\375\376\373\374\272\256\131\104\105\102\106\103\107\234\110\124\121-\123\130\125-\127\214\111\315\316\313\317\314\341\160\335\336\333\334\215\216\337]/; } if (ord('^')==106) { # posix-bc return $char =~ /[\101\252\260\261\237\262\320\265\171\264\232\212\272\312\257\241\220\217\352\372\276\240\266\263\235\332\233\213\267\270\271\253\144\145\142\146\143\147\236\150\164\161-\163\170\165-\167\254\151\355\356\353\357\354\277\200\340\376\335\374\255\256\131\104\105\102\106\103\107\234\110\124\121-\123\130\125-\127\214\111\315\316\313\317\314\341\160\300\336\333\334\215\216\337]/; } } </PRE> <P> Note however that only the <TT>&quot;Is_ascii_print()&quot;</TT> sub is really independent of coded character set. Another way to write <TT>&quot;Is_latin_1()&quot;</TT> would be to use the characters in the range explicitly: <P> <PRE> sub Is_latin_1 { my $char = substr(shift,0,1); $char =~ /[A&nbsp;AXAXAXAXAXAXAXAXAXAXAXAXAAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~&nbsp;A~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~A~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~X]/; } </PRE> <P> Although that form may run into trouble in network transit (due to the presence of 8 bit characters) or on non ISO-Latin character sets. <A NAME="lbAZ">&nbsp;</A> <H2>SOCKETS</H2> <A NAME="ixABO"></A> Most socket programming assumes <FONT SIZE="-1">ASCII</FONT> character encodings in network byte order. Exceptions can include <FONT SIZE="-1">CGI</FONT> script writing under a host web server where the server may take care of translation for you. Most host web servers convert <FONT SIZE="-1">EBCDIC</FONT> data to <FONT SIZE="-1">ISO-8859-1</FONT> or Unicode on output. <A NAME="lbBA">&nbsp;</A> <H2>SORTING</H2> <A NAME="ixABP"></A> One big difference between <FONT SIZE="-1">ASCII</FONT> based character sets and <FONT SIZE="-1">EBCDIC</FONT> ones are the relative positions of upper and lower case letters and the letters compared to the digits. If sorted on an <FONT SIZE="-1">ASCII</FONT> based platform the two letter abbreviation for a physician comes before the two letter for drive, that is: <P> <PRE> @sorted = sort(qw(Dr. dr.)); # @sorted holds ('Dr.','dr.') on ASCII, # but ('dr.','Dr.') on EBCDIC </PRE> <P> The property of lower case before uppercase letters in <FONT SIZE="-1">EBCDIC</FONT> is even carried to the Latin 1 <FONT SIZE="-1">EBCDIC</FONT> pages such as 0037 and 1047. An example would be that E. <TT>&quot;E WITH DIAERESIS&quot;</TT> (203) comes before e. <TT>&quot;e WITH DIAERESIS&quot;</TT> (235) on an <FONT SIZE="-1">ASCII</FONT> platform, but the latter (83) comes before the former (115) on an <FONT SIZE="-1">EBCDIC</FONT> platform. (Astute readers will note that the upper case version of beta <TT>&quot;SMALL LETTER SHARP S&quot;</TT> is simply ``<FONT SIZE="-1">SS</FONT>'' and that the upper case version of y. <TT>&quot;y WITH DIAERESIS&quot;</TT> is not in the 0..255 range but it is at U+x0178 in Unicode, or <TT>&quot;\x{178}&quot;</TT> in a Unicode enabled Perl). <P> The sort order will cause differences between results obtained on <FONT SIZE="-1">ASCII</FONT> platforms versus <FONT SIZE="-1">EBCDIC</FONT> platforms. What follows are some suggestions on how to deal with these differences. <A NAME="lbBB">&nbsp;</A> <H3>Ignore <FONT SIZE="-1">ASCII</FONT> vs. <FONT SIZE="-1">EBCDIC</FONT> sort differences.</H3> <A NAME="ixABQ"></A> This is the least computationally expensive strategy. It may require some user education. <A NAME="lbBC">&nbsp;</A> <H3><FONT SIZE="-1">MONO</FONT> <FONT SIZE="-1">CASE</FONT> then sort data.</H3> <A NAME="ixABR"></A> In order to minimize the expense of mono casing mixed test try to <TT>&quot;tr///&quot;</TT> towards the character set case most employed within the data. If the data are primarily <FONT SIZE="-1">UPPERCASE</FONT> non Latin 1 then apply tr/[a-z]/[A-Z]/ then <I>sort()</I>. If the data are primarily lowercase non Latin 1 then apply tr/[A-Z]/[a-z]/ before sorting. If the data are primarily <FONT SIZE="-1">UPPERCASE</FONT> and include Latin-1 characters then apply: <P> <PRE> tr/[a-z]/[A-Z]/; tr/[A~&nbsp;A~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~A~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~X]/[A~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~XA~X]/; s/A~X/SS/g; </PRE> <P> then <I>sort()</I>. Do note however that such Latin-1 manipulation does not address the y. <TT>&quot;y WITH DIAERESIS&quot;</TT> character that will remain at code point 255 on <FONT SIZE="-1">ASCII</FONT> platforms, but 223 on most <FONT SIZE="-1">EBCDIC</FONT> platforms where it will sort to a place less than the <FONT SIZE="-1">EBCDIC</FONT> numerals. With a Unicode enabled Perl you might try: <P> <PRE> tr/^?/\x{178}/; </PRE> <P> The strategy of mono casing data before sorting does not preserve the case of the data and may not be acceptable for that reason. <A NAME="lbBD">&nbsp;</A> <H3>Convert, sort data, then re convert.</H3> <A NAME="ixABS"></A> This is the most expensive proposition that does not employ a network connection. <A NAME="lbBE">&nbsp;</A> <H3>Perform sorting on one type of platform only.</H3> <A NAME="ixABT"></A> This strategy can employ a network connection. As such it would be computationally expensive. <A NAME="lbBF">&nbsp;</A> <H2>TRANSFORMATION FORMATS</H2> <A NAME="ixABU"></A> There are a variety of ways of transforming data with an intra character set mapping that serve a variety of purposes. Sorting was discussed in the previous section and a few of the other more popular mapping techniques are discussed next. <A NAME="lbBG">&nbsp;</A> <H3><FONT SIZE="-1">URL</FONT> decoding and encoding</H3> <A NAME="ixABV"></A> Note that some URLs have hexadecimal <FONT SIZE="-1">ASCII</FONT> code points in them in an attempt to overcome character or protocol limitation issues. For example the tilde character is not on every keyboard hence a <FONT SIZE="-1">URL</FONT> of the form: <P> <PRE> <A HREF="http://www.pvhp.com/~pvhp/">http://www.pvhp.com/~pvhp/</A> </PRE> <P> may also be expressed as either of: <P> <PRE> <A HREF="http://www.pvhp.com/%7Epvhp/">http://www.pvhp.com/%7Epvhp/</A> <A HREF="http://www.pvhp.com/%7epvhp/">http://www.pvhp.com/%7epvhp/</A> </PRE> <P> where 7E is the hexadecimal <FONT SIZE="-1">ASCII</FONT> code point for '~'. Here is an example of decoding such a <FONT SIZE="-1">URL</FONT> under <FONT SIZE="-1">CCSID</FONT> 1047: <P> <PRE> $url = '<A HREF="http://www.pvhp.com/%7Epvhp/';">http://www.pvhp.com/%7Epvhp/';</A> # this array assumes code page 1047 my @a2e_1047 = ( 0, 1, 2, 3, 55, 45, 46, 47, 22, 5, 21, 11, 12, 13, 14, 15, 16, 17, 18, 19, 60, 61, 50, 38, 24, 25, 63, 39, 28, 29, 30, 31, 64, 90,127,123, 91,108, 80,125, 77, 93, 92, 78,107, 96, 75, 97, 240,241,242,243,244,245,246,247,248,249,122, 94, 76,126,110,111, 124,193,194,195,196,197,198,199,200,201,209,210,211,212,213,214, 215,216,217,226,227,228,229,230,231,232,233,173,224,189, 95,109, 121,129,130,131,132,133,134,135,136,137,145,146,147,148,149,150, 151,152,153,162,163,164,165,166,167,168,169,192, 79,208,161, 7, 32, 33, 34, 35, 36, 37, 6, 23, 40, 41, 42, 43, 44, 9, 10, 27, 48, 49, 26, 51, 52, 53, 54, 8, 56, 57, 58, 59, 4, 20, 62,255, 65,170, 74,177,159,178,106,181,187,180,154,138,176,202,175,188, 144,143,234,250,190,160,182,179,157,218,155,139,183,184,185,171, 100,101, 98,102, 99,103,158,104,116,113,114,115,120,117,118,119, 172,105,237,238,235,239,236,191,128,253,254,251,252,186,174, 89, 68, 69, 66, 70, 67, 71,156, 72, 84, 81, 82, 83, 88, 85, 86, 87, 140, 73,205,206,203,207,204,225,112,221,222,219,220,141,142,223 ); $url =~ s/%([0-9a-fA-F]{2})/pack(&quot;c&quot;,$a2e_1047[hex($1)])/ge; </PRE> <P> Conversely, here is a partial solution for the task of encoding such a <FONT SIZE="-1">URL</FONT> under the 1047 code page: <P> <PRE> $url = '<A HREF="http://www.pvhp.com/~pvhp/';">http://www.pvhp.com/~pvhp/';</A> # this array assumes code page 1047 my @e2a_1047 = ( 0, 1, 2, 3,156, 9,134,127,151,141,142, 11, 12, 13, 14, 15, 16, 17, 18, 19,157, 10, 8,135, 24, 25,146,143, 28, 29, 30, 31, 128,129,130,131,132,133, 23, 27,136,137,138,139,140, 5, 6, 7, 144,145, 22,147,148,149,150, 4,152,153,154,155, 20, 21,158, 26, 32,160,226,228,224,225,227,229,231,241,162, 46, 60, 40, 43,124, 38,233,234,235,232,237,238,239,236,223, 33, 36, 42, 41, 59, 94, 45, 47,194,196,192,193,195,197,199,209,166, 44, 37, 95, 62, 63, 248,201,202,203,200,205,206,207,204, 96, 58, 35, 64, 39, 61, 34, 216, 97, 98, 99,100,101,102,103,104,105,171,187,240,253,254,177, 176,106,107,108,109,110,111,112,113,114,170,186,230,184,198,164, 181,126,115,116,117,118,119,120,121,122,161,191,208, 91,222,174, 172,163,165,183,169,167,182,188,189,190,221,168,175, 93,180,215, 123, 65, 66, 67, 68, 69, 70, 71, 72, 73,173,244,246,242,243,245, 125, 74, 75, 76, 77, 78, 79, 80, 81, 82,185,251,252,249,250,255, 92,247, 83, 84, 85, 86, 87, 88, 89, 90,178,212,214,210,211,213, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,179,219,220,217,218,159 ); # The following regular expression does not address the # mappings for: ('.' =&gt; '%2E', '/' =&gt; '%2F', ':' =&gt; '%3A') $url =~ s/([\t &quot;#%&amp;\(\),;&lt;=&gt;\?\@\[\\\]^`{|}~])/sprintf(&quot;%%%02X&quot;,$e2a_1047[ord($1)])/ge; </PRE> <P> where a more complete solution would split the <FONT SIZE="-1">URL</FONT> into components and apply a full s/// substitution only to the appropriate parts. <P> In the remaining examples a <TT>@e2a</TT> or <TT>@a2e</TT> array may be employed but the assignment will not be shown explicitly. For code page 1047 you could use the <TT>@a2e_1047</TT> or <TT>@e2a_1047</TT> arrays just shown. <A NAME="lbBH">&nbsp;</A> <H3>uu encoding and decoding</H3> <A NAME="ixABW"></A> The <TT>&quot;u&quot;</TT> template to <I>pack()</I> or <I>unpack()</I> will render <FONT SIZE="-1">EBCDIC</FONT> data in <FONT SIZE="-1">EBCDIC</FONT> characters equivalent to their <FONT SIZE="-1">ASCII</FONT> counterparts. For example, the following will print ``Yes indeed\n'' on either an <FONT SIZE="-1">ASCII</FONT> or <FONT SIZE="-1">EBCDIC</FONT> computer: <P> <PRE> $all_byte_chrs = ''; for (0..255) { $all_byte_chrs .= chr($_); } $uuencode_byte_chrs = pack('u', $all_byte_chrs); ($uu = &lt;&lt;'ENDOFHEREDOC') =~ s/^\s*//gm; M``$&quot;`P0%!@&lt;(&quot;0H+#`T.#Q`1$A,4%187&amp;!D:&amp;QP='A\@(2(C)&quot;4F)R@I*BLL M+2XO,#$R,S0U-C&lt;X.3H[/#T^/T!!0D-$149'2$E*2TQ-3D]045)35%565UA9 M6EM&lt;75Y?8&amp;%B8V1E9F=H:6IK;&amp;UN;W!Q&lt;G-T=79W&gt;'EZ&gt;WQ]?G^`@8*#A(6&amp; MAXB)BHN,C8Z/D)&amp;2DY25EI&gt;8F9J;G)V&gt;GZ&quot;AHJ.DI::GJ*FJJZRMKJ^PL;*S MM+6VM[BYNKN\O;Z_P,'&quot;P\3%QL?(R&lt;K+S,W.S]#1TM/4U=;7V-G:V]S=WM_@ ?X&gt;+CY.7FY^CIZNOL[&gt;[O\/'R\_3U]O?X^?K[_/W^_P`` ENDOFHEREDOC if ($uuencode_byte_chrs eq $uu) { print &quot;Yes &quot;; } $uudecode_byte_chrs = unpack('u', $uuencode_byte_chrs); if ($uudecode_byte_chrs eq $all_byte_chrs) { print &quot;indeed\n&quot;; } </PRE> <P> Here is a very spartan uudecoder that will work on <FONT SIZE="-1">EBCDIC</FONT> provided that the <TT>@e2a</TT> array is filled in appropriately: <P> <PRE> #!/usr/local/bin/perl @e2a = ( # this must be filled in ); $_ = &lt;&gt; until ($mode,$file) = /^begin\s*(\d*)\s*(\S*)/; open(OUT, &quot;&gt; $file&quot;) if $file ne &quot;&quot;; while(&lt;&gt;) { last if /^end/; next if /[a-z]/; next unless int(((($e2a[ord()] - 32 ) &amp; 077) + 2) / 3) == int(length() / 4); print OUT unpack(&quot;u&quot;, $_); } close(OUT); chmod oct($mode), $file; </PRE> <A NAME="lbBI">&nbsp;</A> <H3>Quoted-Printable encoding and decoding</H3> <A NAME="ixABX"></A> On <FONT SIZE="-1">ASCII</FONT> encoded platforms it is possible to strip characters outside of the printable set using: <P> <PRE> # This QP encoder works on ASCII only $qp_string =~ s/([=\x00-\x1F\x80-\xFF])/sprintf(&quot;=%02X&quot;,ord($1))/ge; </PRE> <P> Whereas a <FONT SIZE="-1">QP</FONT> encoder that works on both <FONT SIZE="-1">ASCII</FONT> and <FONT SIZE="-1">EBCDIC</FONT> platforms would look somewhat like the following (where the <FONT SIZE="-1">EBCDIC</FONT> branch <TT>@e2a</TT> array is omitted for brevity): <P> <PRE> if (ord('A') == 65) { # ASCII $delete = &quot;\x7F&quot;; # ASCII @e2a = (0 .. 255) # ASCII to ASCII identity map } else { # EBCDIC $delete = &quot;\x07&quot;; # EBCDIC @e2a = # EBCDIC to ASCII map (as shown above) } $qp_string =~ s/([^ !&quot;\#\$%&amp;'()*+,\-.\/0-9:;&lt;&gt;?\@A-Z[\\\]^_`a-z{|}~$delete])/sprintf(&quot;=%02X&quot;,$e2a[ord($1)])/ge; </PRE> <P> (although in production code the substitutions might be done in the <FONT SIZE="-1">EBCDIC</FONT> branch with the <TT>@e2a</TT> array and separately in the <FONT SIZE="-1">ASCII</FONT> branch without the expense of the identity map). <P> Such <FONT SIZE="-1">QP</FONT> strings can be decoded with: <P> <PRE> # This QP decoder is limited to ASCII only $string =~ s/=([0-9A-Fa-f][0-9A-Fa-f])/chr hex $1/ge; $string =~ s/=[\n\r]+$//; </PRE> <P> Whereas a <FONT SIZE="-1">QP</FONT> decoder that works on both <FONT SIZE="-1">ASCII</FONT> and <FONT SIZE="-1">EBCDIC</FONT> platforms would look somewhat like the following (where the <TT>@a2e</TT> array is omitted for brevity): <P> <PRE> $string =~ s/=([0-9A-Fa-f][0-9A-Fa-f])/chr $a2e[hex $1]/ge; $string =~ s/=[\n\r]+$//; </PRE> <A NAME="lbBJ">&nbsp;</A> <H3>Caesarian ciphers</H3> <A NAME="ixABY"></A> The practice of shifting an alphabet one or more characters for encipherment dates back thousands of years and was explicitly detailed by Gaius Julius Caesar in his <B>Gallic Wars</B> text. A single alphabet shift is sometimes referred to as a rotation and the shift amount is given as a number <TT>$n</TT> after the string 'rot' or ``rot$n''. Rot0 and rot26 would designate identity maps on the 26 letter English version of the Latin alphabet. Rot13 has the interesting property that alternate subsequent invocations are identity maps (thus rot13 is its own non-trivial inverse in the group of 26 alphabet rotations). Hence the following is a rot13 encoder and decoder that will work on <FONT SIZE="-1">ASCII</FONT> and <FONT SIZE="-1">EBCDIC</FONT> platforms: <P> <PRE> #!/usr/local/bin/perl while(&lt;&gt;){ tr/n-za-mN-ZA-M/a-zA-Z/; print; } </PRE> <P> In one-liner form: <P> <PRE> perl -ne 'tr/n-za-mN-ZA-M/a-zA-Z/;print' </PRE> <A NAME="lbBK">&nbsp;</A> <H2>Hashing order and checksums</H2> <A NAME="ixABZ"></A> To the extent that it is possible to write code that depends on hashing order there may be differences between hashes as stored on an <FONT SIZE="-1">ASCII</FONT> based platform and hashes stored on an <FONT SIZE="-1">EBCDIC</FONT> based platform. <FONT SIZE="-1">XXX</FONT> <A NAME="lbBL">&nbsp;</A> <H2>I18N AND L10N</H2> <A NAME="ixACA"></A> Internationalization(I18N) and localization(L10N) are supported at least in principle even on <FONT SIZE="-1">EBCDIC</FONT> platforms. The details are system dependent and discussed under the ``<FONT SIZE="-1">OS</FONT> <FONT SIZE="-1">ISSUES</FONT>'' in perlebcdic section below. <A NAME="lbBM">&nbsp;</A> <H2>MULTI OCTET CHARACTER SETS</H2> <A NAME="ixACB"></A> Perl may work with an internal UTF-EBCDIC encoding form for wide characters on <FONT SIZE="-1">EBCDIC</FONT> platforms in a manner analogous to the way that it works with the <FONT SIZE="-1">UTF-8</FONT> internal encoding form on <FONT SIZE="-1">ASCII</FONT> based platforms. <P> Legacy multi byte <FONT SIZE="-1">EBCDIC</FONT> code pages <FONT SIZE="-1">XXX</FONT>. <A NAME="lbBN">&nbsp;</A> <H2>OS ISSUES</H2> <A NAME="ixACC"></A> There may be a few system dependent issues of concern to <FONT SIZE="-1">EBCDIC</FONT> Perl programmers. <A NAME="lbBO">&nbsp;</A> <H3><FONT SIZE="-1">OS/400</FONT></H3> <A NAME="ixACD"></A> <DL COMPACT> <DT><FONT SIZE="-1">PASE</FONT><DD> <A NAME="ixACE"></A> The <FONT SIZE="-1">PASE</FONT> environment is runtime environment for <FONT SIZE="-1">OS/400</FONT> that can run executables built for PowerPC <FONT SIZE="-1">AIX</FONT> in <FONT SIZE="-1">OS/400</FONT>, see perlos400. <FONT SIZE="-1">PASE</FONT> is ASCII-based, not EBCDIC-based as the <FONT SIZE="-1">ILE</FONT>. <DT><FONT SIZE="-1">IFS</FONT> access<DD> <A NAME="ixACF"></A> <FONT SIZE="-1">XXX</FONT>. </DL> <A NAME="lbBP">&nbsp;</A> <H3><FONT SIZE="-1">OS/390</FONT>, z/OS</H3> <A NAME="ixACG"></A> Perl runs under Unix Systems Services or <FONT SIZE="-1">USS</FONT>. <DL COMPACT> <DT>chcp<DD> <A NAME="ixACH"></A> <B>chcp</B> is supported as a shell utility for displaying and changing one's code page. See also chcp. <DT>dataset access<DD> <A NAME="ixACI"></A> For sequential data set access try: <P> <PRE> my @ds_records = `cat //DSNAME`; </PRE> <P> or: <P> <PRE> my @ds_records = `cat //'HLQ.DSNAME'`; </PRE> <P> See also the OS390::Stdio module on <FONT SIZE="-1">CPAN</FONT>. <DT><FONT SIZE="-1">OS/390</FONT>, z/OS iconv<DD> <A NAME="ixACJ"></A> <B>iconv</B> is supported as both a shell utility and a C <FONT SIZE="-1">RTL</FONT> routine. See also the <I><A HREF="/manpages/index.html?1+iconv">iconv</A></I>(1) and <I><A HREF="http://localhost/cgi-bin/man/man2html?3+iconv">iconv</A></I>(3) manual pages. <DT>locales<DD> <A NAME="ixACK"></A> On <FONT SIZE="-1">OS/390</FONT> or z/OS see locale for information on locales. The L10N files are in <I>/usr/nls/locale</I>. <TT>$Config</TT>{d_setlocale} is 'define' on <FONT SIZE="-1">OS/390</FONT> or z/OS. </DL> <A NAME="lbBQ">&nbsp;</A> <H3><FONT SIZE="-1">VM/ESA</FONT>?</H3> <A NAME="ixACL"></A> <FONT SIZE="-1">XXX</FONT>. <A NAME="lbBR">&nbsp;</A> <H3>POSIX-BC?</H3> <A NAME="ixACM"></A> <FONT SIZE="-1">XXX</FONT>. <A NAME="lbBS">&nbsp;</A> <H2>BUGS</H2> <A NAME="ixACN"></A> This pod document contains literal Latin 1 characters and may encounter translation difficulties. In particular one popular nroff implementation was known to strip accented characters to their unaccented counterparts while attempting to view this document through the <B>pod2man</B> program (for example, you may see a plain <TT>&quot;y&quot;</TT> rather than one with a diaeresis as in y.). Another nroff truncated the resultant manpage at the first occurrence of 8 bit characters. <P> Not all shells will allow multiple <TT>&quot;-e&quot;</TT> string arguments to perl to be concatenated together properly as recipes 0, 2, 4, 5, and 6 might seem to imply. <A NAME="lbBT">&nbsp;</A> <H2>SEE ALSO</H2> <A NAME="ixACO"></A> perllocale, perlfunc, perlunicode, utf8. <A NAME="lbBU">&nbsp;</A> <H2>REFERENCES</H2> <A NAME="ixACP"></A> &lt;<A HREF="http://anubis.dkuug.dk/i18n/charmaps">http://anubis.dkuug.dk/i18n/charmaps</A>&gt; <P> &lt;<A HREF="http://www.unicode.org/">http://www.unicode.org/</A>&gt; <P> &lt;<A HREF="http://www.unicode.org/unicode/reports/tr16/">http://www.unicode.org/unicode/reports/tr16/</A>&gt; <P> &lt;<A HREF="http://www.wps.com/texts/codes/">http://www.wps.com/texts/codes/</A>&gt; <B></B><FONT SIZE="-1"><B>ASCII:</B></FONT><B> American Standard Code for Information Infiltration</B> Tom Jennings, September 1999. <P> <B>The Unicode Standard, Version 3.0</B> The Unicode Consortium, Lisa Moore ed., <FONT SIZE="-1">ISBN</FONT> 0-201-61633-5, Addison Wesley Developers Press, February 2000. <P> <B></B><FONT SIZE="-1"><B>CDRA:</B></FONT><B> </B><FONT SIZE="-1"><B>IBM</B></FONT><B> - Character Data Representation Architecture - Reference and Registry</B>, <FONT SIZE="-1">IBM</FONT> <FONT SIZE="-1">SC09-2190-00</FONT>, December 1996. <P> ``Demystifying Character Sets'', Andrea Vine, Multilingual Computing &amp; Technology, <B>#26 Vol. 10 Issue 4</B>, August/September 1999; <FONT SIZE="-1">ISSN</FONT> 1523-0309; Multilingual Computing Inc. Sandpoint <FONT SIZE="-1">ID</FONT>, <FONT SIZE="-1">USA</FONT>. <P> <B>Codes, Ciphers, and Other Cryptic and Clandestine Communication</B> Fred B. Wrixon, <FONT SIZE="-1">ISBN</FONT> 1-57912-040-7, Black Dog &amp; Leventhal Publishers, 1998. <P> &lt;<A HREF="http://www.bobbemer.com/P-BIT.HTM">http://www.bobbemer.com/P-BIT.HTM</A>&gt; <B></B><FONT SIZE="-1"><B>IBM</B></FONT><B> - </B><FONT SIZE="-1"><B>EBCDIC</B></FONT><B> and the P-bit; The biggest Computer Goof Ever</B> Robert Bemer. <A NAME="lbBV">&nbsp;</A> <H2>HISTORY</H2> <A NAME="ixACQ"></A> 15 April 2001: added <FONT SIZE="-1">UTF-8</FONT> and UTF-EBCDIC to main table, pvhp. <A NAME="lbBW">&nbsp;</A> <H2>AUTHOR</H2> <A NAME="ixACR"></A> Peter Prymmer <A HREF="mailto:pvhp@best.com">pvhp@best.com</A> wrote this in 1999 and 2000 with <FONT SIZE="-1">CCSID</FONT> 0819 and 0037 help from Chris Leach and Andre Pirard <A HREF="mailto:A.Pirard@ulg.ac.be">A.Pirard@ulg.ac.be</A> as well as POSIX-BC help from Thomas Dorner <A HREF="mailto:Thomas.Dorner@start.de">Thomas.Dorner@start.de</A>. Thanks also to Vickie Cooper, Philip Newton, William Raffloer, and Joe Smith. Trademarks, registered trademarks, service marks and registered service marks used in this document are the property of their respective owners. <P> <HR> <A NAME="index">&nbsp;</A><H2>Index</H2> <DL> <DT><A HREF="#lbAB">NAME</A><DD> <DT><A HREF="#lbAC">DESCRIPTION</A><DD> <DT><A HREF="#lbAD">COMMON CHARACTER CODE SETS</A><DD> <DL> <DT><A HREF="#lbAE"><FONT SIZE="-1">ASCII</FONT></A><DD> <DT><A HREF="#lbAF"><FONT SIZE="-1">ISO</FONT> 8859</A><DD> <DT><A HREF="#lbAG">Latin 1 (<FONT SIZE="-1">ISO</FONT> 8859-1)</A><DD> <DT><A HREF="#lbAH"><FONT SIZE="-1">EBCDIC</FONT></A><DD> <DT><A HREF="#lbAI">The 13 variant characters</A><DD> <DT><A HREF="#lbAJ">0037</A><DD> <DT><A HREF="#lbAK">1047</A><DD> <DT><A HREF="#lbAL">POSIX-BC</A><DD> <DT><A HREF="#lbAM">Unicode code points versus <FONT SIZE="-1">EBCDIC</FONT> code points</A><DD> <DT><A HREF="#lbAN">Remaining Perl Unicode problems in <FONT SIZE="-1">EBCDIC</FONT></A><DD> <DT><A HREF="#lbAO">Unicode and <FONT SIZE="-1">UTF</FONT></A><DD> <DT><A HREF="#lbAP">Using Encode</A><DD> </DL> <DT><A HREF="#lbAQ">SINGLE OCTET TABLES</A><DD> <DT><A HREF="#lbAR">IDENTIFYING CHARACTER CODE SETS</A><DD> <DT><A HREF="#lbAS">CONVERSIONS</A><DD> <DL> <DT><A HREF="#lbAT">tr///</A><DD> <DT><A HREF="#lbAU">iconv</A><DD> <DT><A HREF="#lbAV">C <FONT SIZE="-1">RTL</FONT></A><DD> </DL> <DT><A HREF="#lbAW">OPERATOR DIFFERENCES</A><DD> <DT><A HREF="#lbAX">FUNCTION DIFFERENCES</A><DD> <DT><A HREF="#lbAY">REGULAR EXPRESSION DIFFERENCES</A><DD> <DT><A HREF="#lbAZ">SOCKETS</A><DD> <DT><A HREF="#lbBA">SORTING</A><DD> <DL> <DT><A HREF="#lbBB">Ignore <FONT SIZE="-1">ASCII</FONT> vs. <FONT SIZE="-1">EBCDIC</FONT> sort differences.</A><DD> <DT><A HREF="#lbBC"><FONT SIZE="-1">MONO</FONT> <FONT SIZE="-1">CASE</FONT> then sort data.</A><DD> <DT><A HREF="#lbBD">Convert, sort data, then re convert.</A><DD> <DT><A HREF="#lbBE">Perform sorting on one type of platform only.</A><DD> </DL> <DT><A HREF="#lbBF">TRANSFORMATION FORMATS</A><DD> <DL> <DT><A HREF="#lbBG"><FONT SIZE="-1">URL</FONT> decoding and encoding</A><DD> <DT><A HREF="#lbBH">uu encoding and decoding</A><DD> <DT><A HREF="#lbBI">Quoted-Printable encoding and decoding</A><DD> <DT><A HREF="#lbBJ">Caesarian ciphers</A><DD> </DL> <DT><A HREF="#lbBK">Hashing order and checksums</A><DD> <DT><A HREF="#lbBL">I18N AND L10N</A><DD> <DT><A HREF="#lbBM">MULTI OCTET CHARACTER SETS</A><DD> <DT><A HREF="#lbBN">OS ISSUES</A><DD> <DL> <DT><A HREF="#lbBO"><FONT SIZE="-1">OS/400</FONT></A><DD> <DT><A HREF="#lbBP"><FONT SIZE="-1">OS/390</FONT>, z/OS</A><DD> <DT><A HREF="#lbBQ"><FONT SIZE="-1">VM/ESA</FONT>?</A><DD> <DT><A HREF="#lbBR">POSIX-BC?</A><DD> </DL> <DT><A HREF="#lbBS">BUGS</A><DD> <DT><A HREF="#lbBT">SEE ALSO</A><DD> <DT><A HREF="#lbBU">REFERENCES</A><DD> <DT><A HREF="#lbBV">HISTORY</A><DD> <DT><A HREF="#lbBW">AUTHOR</A><DD> </DL> <HR> This document was created by <A HREF="/manpages/index.html">man2html</A>, using the manual pages.<BR> Time: 05:29:08 GMT, December 24, 2015 </div></div> </body> </HTML>
yuweijun/yuweijun.github.io
manpages/man1/perlebcdic.1.html
HTML
mit
85,032
A dumb personal discord bot written in [Python](https://www.python.org/) 3.6 using the cogs rewrite version of [discord.py](https://github.com/Rapptz/discord.py/tree/rewrite) I made this while also learning git and programming, so there may be mistakes ## Usage If you want to use it, use your own [discord bot token](https://discordapp.com/developers/applications/me), [owm api key](https://home.openweathermap.org/api_keys), [google api key](https://developers.google.com/api-client-library/python/guide/aaa_apikeys), [google custom search engine id](https://support.google.com/customsearch/answer/2649143?hl=en), [steam api key](https://steamcommunity.com/dev/apikey), and [fortnite y3n key](https://fortnite.y3n.co/). Create a new file (name it 'config.py') inside of the 'config' folder. Inside of that file enter your keys, tokens, etc. into it following this format: ``` command_prefix = {command_prefix} bot_name = {bot_name} token = {token} owm_api_key = {owm_api_key} cse_api_key = {cse_api_key} cse_id = {cse_id} steam_api_key = {steam_api_key} fs_api_key = {fs_api_key} ``` ## Requirements You can install the requirements by running: ``` pip install -r requirements.txt ``` In the terminal while in the directory
Polokniko/lambda
README.md
Markdown
mit
1,256
<!DOCTYPE html> <meta charset="utf-8"> <style> .node { font: 11px "Helvetica Neue", Helvetica, Arial, sans-serif; } .link { stroke: steelblue; stroke-opacity: .4; fill: none; } </style> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var diameter = 960, radius = diameter / 2, innerRadius = radius - 120; var cluster = d3.layout.cluster() .size([360, innerRadius]) .sort(null) .value(function(d) { return d.size; }); var bundle = d3.layout.bundle(); var line = d3.svg.line.radial() .interpolate("bundle") .tension(.9999) .radius(function(d) { return d.y; }) .angle(function(d) { return d.x / 180 * Math.PI; }); var svg = d3.select("body").append("svg") .attr("width", diameter) .attr("height", diameter) .append("g") .attr("transform", "translate(" + radius + "," + radius + ")"); d3.json("devo.json", function(error, graph) { var classes = []; for (var key in graph) { var val = new Array(); var size = 0; try { for (var i in graph[key]["similar"]) { val.push(i); size++; } //val = keys(graph[key]["similar"]).map(function(x){ return x;}) ; } catch(e) { }; graph[key]["old"] = graph[key]["similar"]; graph[key]["similar"] = val; graph[key]["size"] = size; graph[key]["imports"] = val; classes.push(graph[key]); } var ph = packageHierarchy(classes); var nodes = cluster.nodes(ph); var links = packageSimilar(nodes); svg.selectAll(".link") .data(bundle(links)) .enter().append("path") .on("click", function(d) { console.log(d); }) .attr("class", "link") .attr("d", line); svg.selectAll(".node") .data(nodes.filter(function(n) { return !n.children; })) .enter().append("g") .attr("class", "node") .attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; }) .append("text") .attr("dx", function(d) { return d.x < 180 ? 8 : -8; }) .attr("dy", ".31em") .attr("text-anchor", function(d) { return d.x < 180 ? "start" : "end"; }) .attr("transform", function(d) { return d.x < 180 ? null : "rotate(180)"; }) .text(function(d) { return d.key; }) .on("click", function(d) { console.log(d.name) }); }); d3.select(self.frameElement).style("height", diameter + "px"); // Lazily construct the package hierarchy from class names. function packageHierarchy(classes) { var map = {}; function find(name, data) { var node = map[name], i; if (!node) { node = map[name] = data || {name: name, children: []}; node.children = node.children || []; if (name.length) { //var pname = "";//name.substring(0,name.length/2); var pname = name.substring(0,Math.min(name.length - 1, 1)); if (name!=pname) { node.parent = find( pname ); node.parent.children.push(node); //node.key = name.substring(i + 1); } node.key = name; } } return node; } classes.forEach(function(d) { find(d.name, d); }); return map[""]; } // Return a list of imports for the given array of nodes. function packageSimilar(nodes) { var map = {}, similar = []; // Compute a map from name to node. nodes.forEach(function(d) { map[d.name] = d; }); // For each import, construct a link from the source to target node. nodes.forEach(function(d) { //console.log(d); if (d.similar) d.similar.forEach(function(i) { similar.push({source: map[d.name], target: map[i]}); }); }); return similar; } </script>
abramhindle/CMPUT404-Web-Mining
d3.html
HTML
mit
3,732
--- layout: page title: About me subtitle: Who am I ? --- My name is Apoorva Kumar. I have pursued my Btech in Computer Science and Engineering from Indian Institute of Kharagpur(2020). And I am always looking for challenging opportunities worth my time, and worth the risk. ### Why I started blogging ? One of the major reason is, I spend a lot of time reading and experimenting, But not all turn to some fruitful project. But is that wasted ? No whatever I read nothing is wasted. So for every third person who might misjudge my caliber or knowledge, this blog is for those people. Clarifying to every person, that I am different is really painful for me. And in the world of social media where everyone is bogged down by information and story every story and information seems fake. ### My history This blog and my CV will tell a lot about my technological prowess. - [MY CV](https://rava-dosa.github.io/resume)
rava-dosa/rava-dosa.github.io
aboutme.md
Markdown
mit
922
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="Asciidoctor 1.5.6.2"> <meta name="author" content="Elias Abel"> <title>AsciiDoc 指引</title> <style> /*! normalize.css v2.1.2 | MIT License | git.io/normalize */ /* ========================================================================== HTML5 display definitions ========================================================================== */ /** Correct `block` display not defined in IE 8/9. */ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } /** Correct `inline-block` display not defined in IE 8/9. */ audio, canvas, video { display: inline-block; } /** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */ audio:not([controls]) { display: none; height: 0; } /** Address `[hidden]` styling not present in IE 8/9. Hide the `template` element in IE, Safari, and Firefox < 22. */ [hidden], template { display: none; } script { display: none !important; } /* ========================================================================== Base ========================================================================== */ /** 1. Set default font family to sans-serif. 2. Prevent iOS text size adjust after orientation change, without disabling user zoom. */ html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } /** Remove default margin. */ body { margin: 0; } /* ========================================================================== Links ========================================================================== */ /** Remove the gray background color from active links in IE 10. */ a { background: transparent; } /** Address `outline` inconsistency between Chrome and other browsers. */ a:focus { outline: thin dotted; } /** Improve readability when focused and also mouse hovered in all browsers. */ a:active, a:hover { outline: 0; } /* ========================================================================== Typography ========================================================================== */ /** Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari 5, and Chrome. */ h1 { font-size: 2em; margin: 0.67em 0; } /** Address styling not present in IE 8/9, Safari 5, and Chrome. */ abbr[title] { border-bottom: 1px dotted; } /** Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. */ b, strong { font-weight: bold; } /** Address styling not present in Safari 5 and Chrome. */ dfn { font-style: italic; } /** Address differences between Firefox and other browsers. */ hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } /** Address styling not present in IE 8/9. */ mark { background: #ff0; color: #000; } /** Correct font family set oddly in Safari 5 and Chrome. */ code, kbd, pre, samp { font-family: monospace, serif; font-size: 1em; } /** Improve readability of pre-formatted text in all browsers. */ pre { white-space: pre-wrap; } /** Set consistent quote types. */ q { quotes: "\201C" "\201D" "\2018" "\2019"; } /** Address inconsistent and variable font size in all browsers. */ small { font-size: 80%; } /** Prevent `sub` and `sup` affecting `line-height` in all browsers. */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } /* ========================================================================== Embedded content ========================================================================== */ /** Remove border when inside `a` element in IE 8/9. */ img { border: 0; } /** Correct overflow displayed oddly in IE 9. */ svg:not(:root) { overflow: hidden; } /* ========================================================================== Figures ========================================================================== */ /** Address margin not present in IE 8/9 and Safari 5. */ figure { margin: 0; } /* ========================================================================== Forms ========================================================================== */ /** Define consistent border, margin, and padding. */ fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } /** 1. Correct `color` not being inherited in IE 8/9. 2. Remove padding so people aren't caught out if they zero out fieldsets. */ legend { border: 0; /* 1 */ padding: 0; /* 2 */ } /** 1. Correct font family not being inherited in all browsers. 2. Correct font size not being inherited in all browsers. 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. */ button, input, select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 2 */ margin: 0; /* 3 */ } /** Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet. */ button, input { line-height: normal; } /** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. Correct `select` style inheritance in Firefox 4+ and Opera. */ button, select { text-transform: none; } /** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. */ button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } /** Re-set default cursor for disabled elements. */ button[disabled], html input[disabled] { cursor: default; } /** 1. Address box sizing set to `content-box` in IE 8/9. 2. Remove excess padding in IE 8/9. */ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } /** 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome (include `-moz` to future-proof). */ input[type="search"] { -webkit-appearance: textfield; /* 1 */ -moz-box-sizing: content-box; -webkit-box-sizing: content-box; /* 2 */ box-sizing: content-box; } /** Remove inner padding and search cancel button in Safari 5 and Chrome on OS X. */ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /** Remove inner padding and border in Firefox 4+. */ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } /** 1. Remove default vertical scrollbar in IE 8/9. 2. Improve readability and alignment in all browsers. */ textarea { overflow: auto; /* 1 */ vertical-align: top; /* 2 */ } /* ========================================================================== Tables ========================================================================== */ /** Remove most spacing between table cells. */ table { border-collapse: collapse; border-spacing: 0; } meta.foundation-mq-small { font-family: "only screen and (min-width: 768px)"; width: 768px; } meta.foundation-mq-medium { font-family: "only screen and (min-width:1280px)"; width: 1280px; } meta.foundation-mq-large { font-family: "only screen and (min-width:1440px)"; width: 1440px; } *, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } html, body { font-size: 100%; } body { background: white; color: #222222; padding: 0; margin: 0; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: normal; font-style: normal; line-height: 1; position: relative; cursor: auto; } a:hover { cursor: pointer; } img, object, embed { max-width: 100%; height: auto; } object, embed { height: 100%; } img { -ms-interpolation-mode: bicubic; } #map_canvas img, #map_canvas embed, #map_canvas object, .map_canvas img, .map_canvas embed, .map_canvas object { max-width: none !important; } .left { float: left !important; } .right { float: right !important; } .text-left { text-align: left !important; } .text-right { text-align: right !important; } .text-center { text-align: center !important; } .text-justify { text-align: justify !important; } .hide { display: none; } .antialiased { -webkit-font-smoothing: antialiased; } img { display: inline-block; vertical-align: middle; } textarea { height: auto; min-height: 50px; } select { width: 100%; } object, svg { display: inline-block; vertical-align: middle; } .center { margin-left: auto; margin-right: auto; } .stretch { width: 100%; } p.lead { font-size: 1.21875em; line-height: 1.6; } .subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { line-height: 1.4; color: #777777; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; } /* Typography resets */ div, dl, dt, dd, ul, ol, li, h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; direction: ltr; } /* Default Link Styles */ a { color: #9cb115; text-decoration: none; line-height: inherit; } a:hover, a:focus { color: #b7d30b; } a img { border: none; } /* Default paragraph styles */ p { font-family: inherit; font-weight: normal; font-size: 1em; line-height: 1.6; margin-bottom: 1.25em; text-rendering: optimizeLegibility; } p aside { font-size: 0.875em; line-height: 1.35; font-style: italic; } /* Default header styles */ h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: normal; font-style: normal; color: #333333; text-rendering: optimizeLegibility; margin-top: 1em; margin-bottom: 0.5em; line-height: 1.2125em; } h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small { font-size: 60%; color: gray; line-height: 0; } h1 { font-size: 2.125em; } h2 { font-size: 1.6875em; } h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.375em; } h4 { font-size: 1.125em; } h5 { font-size: 1.125em; } h6 { font-size: 1em; } hr { border: dotted #cccccc; border-width: 1px 0 0; clear: both; margin: 1.25em 0 1.1875em; height: 0; } /* Helpful Typography Defaults */ em, i { font-style: italic; line-height: inherit; } strong, b { font-weight: bold; line-height: inherit; } small { font-size: 60%; line-height: inherit; } code { font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: bold; color: #417b06; } /* Lists */ ul, ol, dl { font-size: 1em; line-height: 1.6; margin-bottom: 1.25em; list-style-position: outside; font-family: inherit; } ul, ol { margin-left: 1.5em; } ul.no-bullet, ol.no-bullet { margin-left: 1.5em; } /* Unordered Lists */ ul li ul, ul li ol { margin-left: 1.25em; margin-bottom: 0; font-size: 1em; /* Override nested font-size change */ } ul.square li ul, ul.circle li ul, ul.disc li ul { list-style: inherit; } ul.square { list-style-type: square; } ul.circle { list-style-type: circle; } ul.disc { list-style-type: disc; } ul.no-bullet { list-style: none; } /* Ordered Lists */ ol li ul, ol li ol { margin-left: 1.25em; margin-bottom: 0; } /* Definition Lists */ dl dt { margin-bottom: 0.3125em; font-weight: bold; } dl dd { margin-bottom: 1.25em; } /* Abbreviations */ abbr, acronym { text-transform: uppercase; font-size: 90%; color: #555555; border-bottom: 1px dotted #dddddd; cursor: help; } abbr { text-transform: none; } /* Blockquotes */ blockquote { margin: 0 0 1.25em; padding: 0.5625em 1.25em 0 1.1875em; border-left: 1px solid #efefef; } blockquote cite { display: block; font-size: 0.8125em; color: #5e5e5e; } blockquote cite:before { content: "\2014 \0020"; } blockquote cite a, blockquote cite a:visited { color: #5e5e5e; } blockquote, blockquote p { line-height: 1.6; color: #777777; } /* Microformats */ .vcard { display: inline-block; margin: 0 0 1.25em 0; border: 1px solid #dddddd; padding: 0.625em 0.75em; } .vcard li { margin: 0; display: block; } .vcard .fn { font-weight: bold; font-size: 0.9375em; } .vevent .summary { font-weight: bold; } .vevent abbr { cursor: auto; text-decoration: none; font-weight: bold; border: none; padding: 0 0.0625em; } @media only screen and (min-width: 768px) { h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.4; } h1 { font-size: 2.75em; } h2 { font-size: 2.3125em; } h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.6875em; } h4 { font-size: 1.4375em; } } /* Tables */ table { background: white; margin-bottom: 1.25em; border: solid 1px #dddddd; } table thead, table tfoot { background: whitesmoke; font-weight: normal; } table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: #333333; text-align: left; } table tr th, table tr td { padding: 0.5625em 0.625em; font-size: inherit; color: #555555; } table tr.even, table tr.alt, table tr:nth-of-type(even) { background: #f9f9f9; } table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { display: table-cell; line-height: 1.4; } body { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; tab-size: 4; } h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { line-height: 1.4; } .clearfix:before, .clearfix:after, .float-group:before, .float-group:after { content: " "; display: table; } .clearfix:after, .float-group:after { clear: both; } *:not(pre) > code { font-size: inherit; font-style: normal !important; letter-spacing: 0; padding: 0; line-height: inherit; word-wrap: break-word; } *:not(pre) > code.nobreak { word-wrap: normal; } *:not(pre) > code.nowrap { white-space: nowrap; } pre, pre > code { line-height: 1.4; color: black; font-family: monospace, serif; font-weight: normal; } em em { font-style: normal; } strong strong { font-weight: normal; } .keyseq { color: #888888; } kbd { font-family: Consolas, "Liberation Mono", Courier, monospace; display: inline-block; color: #555555; font-size: 0.65em; line-height: 1.45; background-color: #f7f7f7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 0.1em white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 0.1em white inset; margin: 0 0.15em; padding: 0.2em 0.5em; vertical-align: middle; position: relative; top: -0.1em; white-space: nowrap; } .keyseq kbd:first-child { margin-left: 0; } .keyseq kbd:last-child { margin-right: 0; } .menuseq, .menuref { color: #000; } .menuseq b:not(.caret), .menuref { font-weight: inherit; } .menuseq { word-spacing: -0.02em; } .menuseq b.caret { font-size: 1.25em; line-height: 0.8; } .menuseq i.caret { font-weight: bold; text-align: center; width: 0.45em; } b.button:before, b.button:after { position: relative; top: -1px; font-weight: normal; } b.button:before { content: "["; padding: 0 3px 0 2px; } b.button:after { content: "]"; padding: 0 2px 0 3px; } #header, #content, #footnotes, #footer { width: 100%; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; max-width: 62.5em; *zoom: 1; position: relative; padding-left: 0.9375em; padding-right: 0.9375em; } #header:before, #header:after, #content:before, #content:after, #footnotes:before, #footnotes:after, #footer:before, #footer:after { content: " "; display: table; } #header:after, #content:after, #footnotes:after, #footer:after { clear: both; } #content { margin-top: 1.25em; } #content:before { content: none; } #header > h1:first-child { color: #b7d30b; font-weight: bold; margin-top: 2.25rem; margin-bottom: 0; } #header > h1:first-child + #toc { margin-top: 8px; border-top: 1px dotted #cccccc; } #header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border-bottom: 1px dotted #cccccc; padding-bottom: 8px; } #header .details { border-bottom: 1px dotted #cccccc; line-height: 1.45; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 0.25em; color: #5e5e5e; display: -ms-flexbox; display: -webkit-flex; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; } #header .details span:first-child { margin-left: -0.125em; } #header .details span.email a { color: #777777; } #header .details br { display: none; } #header .details br + span:before { content: "\00a0\2013\00a0"; } #header .details br + span.author:before { content: "\00a0\22c5\00a0"; color: #777777; } #header .details br + span#revremark:before { content: "\00a0|\00a0"; } #header #revnumber { text-transform: capitalize; } #header #revnumber:after { content: "\00a0"; } #content > h1:first-child:not([class]) { color: #b7d30b; font-weight: bold; border-bottom: 1px dotted #cccccc; padding-bottom: 8px; margin-top: 0; padding-top: 1rem; margin-bottom: 1.25rem; } #toc { border-bottom: 1px solid #cccccc; padding-bottom: 0.5em; } #toc > ul { margin-left: 0.125em; } #toc ul.sectlevel0 > li > a { font-style: italic; } #toc ul.sectlevel0 ul.sectlevel1 { margin: 0.5em 0; } #toc ul { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; list-style-type: none; } #toc li { line-height: 1.3334; margin-top: 0.3334em; } #toc a { text-decoration: none; } #toc a:active { text-decoration: underline; } #toctitle { color: #777777; font-size: 1.2em; } @media only screen and (min-width: 768px) { #toctitle { font-size: 1.375em; } body.toc2 { padding-left: 15em; padding-right: 0; } #toc.toc2 { margin-top: 0 !important; background-color: #f2f2f2; position: fixed; width: 15em; left: 0; top: 0; border-right: 1px solid #cccccc; border-top-width: 0 !important; border-bottom-width: 0 !important; z-index: 1000; padding: 1.25em 1em; height: 100%; overflow: auto; } #toc.toc2 #toctitle { margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2em; } #toc.toc2 > ul { font-size: 0.9em; margin-bottom: 0; } #toc.toc2 ul ul { margin-left: 0; padding-left: 1em; } #toc.toc2 ul.sectlevel0 ul.sectlevel1 { padding-left: 0; margin-top: 0.5em; margin-bottom: 0.5em; } body.toc2.toc-right { padding-left: 0; padding-right: 15em; } body.toc2.toc-right #toc.toc2 { border-right-width: 0; border-left: 1px solid #cccccc; left: auto; right: 0; } } @media only screen and (min-width: 1280px) { body.toc2 { padding-left: 20em; padding-right: 0; } #toc.toc2 { width: 20em; } #toc.toc2 #toctitle { font-size: 1.375em; } #toc.toc2 > ul { font-size: 0.95em; } #toc.toc2 ul ul { padding-left: 1.25em; } body.toc2.toc-right { padding-left: 0; padding-right: 20em; } } #content #toc { border-style: solid; border-width: 1px; border-color: #d9d9d9; margin-bottom: 1.25em; padding: 1.25em; background: #f2f2f2; -webkit-border-radius: 0; border-radius: 0; } #content #toc > :first-child { margin-top: 0; } #content #toc > :last-child { margin-bottom: 0; } #footer { max-width: 100%; background-color: #272727; padding: 1.25em; } #footer-text { color: #bcbcbc; line-height: 1.44; } #content { margin-bottom: 0.625em; } .sect1 { padding-bottom: 0.625em; } @media only screen and (min-width: 768px) { #content { margin-bottom: 1.25em; } .sect1 { padding-bottom: 1.25em; } } .sect1:last-child { padding-bottom: 0; } .sect1 + .sect1 { border-top: 1px solid #cccccc; } #content h1 > a.anchor, h2 > a.anchor, h3 > a.anchor, #toctitle > a.anchor, .sidebarblock > .content > .title > a.anchor, h4 > a.anchor, h5 > a.anchor, h6 > a.anchor { position: absolute; z-index: 1001; width: 1.5ex; margin-left: -1.5ex; display: block; text-decoration: none !important; visibility: hidden; text-align: center; font-weight: normal; } #content h1 > a.anchor:before, h2 > a.anchor:before, h3 > a.anchor:before, #toctitle > a.anchor:before, .sidebarblock > .content > .title > a.anchor:before, h4 > a.anchor:before, h5 > a.anchor:before, h6 > a.anchor:before { content: "\00A7"; font-size: 0.85em; display: block; padding-top: 0.1em; } #content h1:hover > a.anchor, #content h1 > a.anchor:hover, h2:hover > a.anchor, h2 > a.anchor:hover, h3:hover > a.anchor, #toctitle:hover > a.anchor, .sidebarblock > .content > .title:hover > a.anchor, h3 > a.anchor:hover, #toctitle > a.anchor:hover, .sidebarblock > .content > .title > a.anchor:hover, h4:hover > a.anchor, h4 > a.anchor:hover, h5:hover > a.anchor, h5 > a.anchor:hover, h6:hover > a.anchor, h6 > a.anchor:hover { visibility: visible; } #content h1 > a.link, h2 > a.link, h3 > a.link, #toctitle > a.link, .sidebarblock > .content > .title > a.link, h4 > a.link, h5 > a.link, h6 > a.link { color: #333333; text-decoration: none; } #content h1 > a.link:hover, h2 > a.link:hover, h3 > a.link:hover, #toctitle > a.link:hover, .sidebarblock > .content > .title > a.link:hover, h4 > a.link:hover, h5 > a.link:hover, h6 > a.link:hover { color: #262626; } .audioblock, .imageblock, .literalblock, .listingblock, .stemblock, .videoblock { margin-bottom: 1.25em; } .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-rendering: optimizeLegibility; text-align: left; } table.tableblock > caption.title { white-space: nowrap; overflow: visible; max-width: 0; } .paragraph.lead > p, #preamble > .sectionbody > [class="paragraph"]:first-of-type p { font-size: 1.21875em; line-height: 1.6; font-color: #b7d30b; } table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p { font-size: inherit; } .admonitionblock > table { border-collapse: separate; border: 0; background: none; width: 100%; } .admonitionblock > table td.icon { text-align: center; width: 80px; } .admonitionblock > table td.icon img { max-width: none; } .admonitionblock > table td.icon .title { font-weight: bold; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; text-transform: uppercase; } .admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px dotted #cccccc; color: #5e5e5e; } .admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } .exampleblock > .content { border-style: solid; border-width: 1px; border-color: #e6e6e6; margin-bottom: 1.25em; padding: 1.25em; background: white; -webkit-border-radius: 0; border-radius: 0; } .exampleblock > .content > :first-child { margin-top: 0; } .exampleblock > .content > :last-child { margin-bottom: 0; } .sidebarblock { border-style: solid; border-width: 1px; border-color: #d9d9d9; margin-bottom: 1.25em; padding: 1.25em; background: #f2f2f2; -webkit-border-radius: 0; border-radius: 0; } .sidebarblock > :first-child { margin-top: 0; } .sidebarblock > :last-child { margin-bottom: 0; } .sidebarblock > .content > .title { color: #777777; margin-top: 0; } .exampleblock > .content > :last-child > :last-child, .exampleblock > .content .olist > ol > li:last-child > :last-child, .exampleblock > .content .ulist > ul > li:last-child > :last-child, .exampleblock > .content .qlist > ol > li:last-child > :last-child, .sidebarblock > .content > :last-child > :last-child, .sidebarblock > .content .olist > ol > li:last-child > :last-child, .sidebarblock > .content .ulist > ul > li:last-child > :last-child, .sidebarblock > .content .qlist > ol > li:last-child > :last-child { margin-bottom: 0; } .literalblock pre, .listingblock pre:not(.highlight), .listingblock pre[class="highlight"], .listingblock pre[class^="highlight "], .listingblock pre.CodeRay, .listingblock pre.prettyprint { background: #efefef; } .sidebarblock .literalblock pre, .sidebarblock .listingblock pre:not(.highlight), .sidebarblock .listingblock pre[class="highlight"], .sidebarblock .listingblock pre[class^="highlight "], .sidebarblock .listingblock pre.CodeRay, .sidebarblock .listingblock pre.prettyprint { background: #f2f1f1; } .literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] { border: 1px solid #cccccc; -webkit-border-radius: 0; border-radius: 0; word-wrap: break-word; padding: 0.75em 0.75em 0.625em 0.75em; font-size: 0.8125em; } .literalblock pre.nowrap, .literalblock pre[class].nowrap, .listingblock pre.nowrap, .listingblock pre[class].nowrap { overflow-x: auto; white-space: pre; word-wrap: normal; } @media only screen and (min-width: 768px) { .literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] { font-size: 0.90625em; } } @media only screen and (min-width: 1280px) { .literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] { font-size: 1em; } } .literalblock.output pre { color: #efefef; background-color: black; } .listingblock pre.highlightjs { padding: 0; } .listingblock pre.highlightjs > code { padding: 0.75em 0.75em 0.625em 0.75em; -webkit-border-radius: 0; border-radius: 0; } .listingblock > .content { position: relative; } .listingblock code[data-lang]:before { display: none; content: attr(data-lang); position: absolute; font-size: 0.75em; top: 0.425rem; right: 0.5rem; line-height: 1; text-transform: uppercase; color: #999; } .listingblock:hover code[data-lang]:before { display: block; } .listingblock.terminal pre .command:before { content: attr(data-prompt); padding-right: 0.5em; color: #999; } .listingblock.terminal pre .command:not([data-prompt]):before { content: "$"; } table.pyhltable { border-collapse: separate; border: 0; margin-bottom: 0; background: none; } table.pyhltable td { vertical-align: top; padding-top: 0; padding-bottom: 0; line-height: 1.4; } table.pyhltable td.code { padding-left: .75em; padding-right: 0; } pre.pygments .lineno, table.pyhltable td:not(.code) { color: #999; padding-left: 0; padding-right: .5em; border-right: 1px solid #cccccc; } pre.pygments .lineno { display: inline-block; margin-right: .25em; } table.pyhltable .linenodiv { background: none !important; padding-right: 0 !important; } .quoteblock { margin: 0 1em 1.25em 1.5em; display: table; } .quoteblock > .title { margin-left: -1.5em; margin-bottom: 0.75em; } .quoteblock blockquote, .quoteblock blockquote p { color: #777777; font-size: 1.15rem; line-height: 1.75; word-spacing: 0.1em; letter-spacing: 0; font-style: italic; text-align: justify; } .quoteblock blockquote { margin: 0; padding: 0; border: 0; } .quoteblock blockquote:before { content: "\201c"; float: left; font-size: 2.75em; font-weight: bold; line-height: 0.6em; margin-left: -0.6em; color: #777777; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } .quoteblock blockquote > .paragraph:last-child p { margin-bottom: 0; } .quoteblock .attribution { margin-top: 0.5em; margin-right: 0.5ex; text-align: right; } .quoteblock .quoteblock { margin-left: 0; margin-right: 0; padding: 0.5em 0; border-left: 3px solid #5e5e5e; } .quoteblock .quoteblock blockquote { padding: 0 0 0 0.75em; } .quoteblock .quoteblock blockquote:before { display: none; } .verseblock { margin: 0 1em 1.25em 1em; } .verseblock pre { font-family: "Open Sans", "DejaVu Sans", sans; font-size: 1.15rem; color: #777777; font-weight: 300; text-rendering: optimizeLegibility; } .verseblock pre strong { font-weight: 400; } .verseblock .attribution { margin-top: 1.25rem; margin-left: 0.5ex; } .quoteblock .attribution, .verseblock .attribution { font-size: 0.8125em; line-height: 1.45; font-style: italic; } .quoteblock .attribution br, .verseblock .attribution br { display: none; } .quoteblock .attribution cite, .verseblock .attribution cite { display: block; letter-spacing: -0.025em; color: #5e5e5e; } .quoteblock.abstract { margin: 0 0 1.25em 0; display: block; } .quoteblock.abstract blockquote, .quoteblock.abstract blockquote p { text-align: left; word-spacing: 0; } .quoteblock.abstract blockquote:before, .quoteblock.abstract blockquote p:first-of-type:before { display: none; } table.tableblock { max-width: 100%; border-collapse: separate; } p.tableblock:last-child { margin-bottom: 0; } td.tableblock > .content { margin-bottom: -1.25em; } table.tableblock, th.tableblock, td.tableblock { border: 0 solid #dddddd; } table.grid-all > thead > tr > .tableblock, table.grid-all > tbody > tr > .tableblock { border-width: 0 1px 1px 0; } table.grid-all > tfoot > tr > .tableblock { border-width: 1px 1px 0 0; } table.grid-cols > * > tr > .tableblock { border-width: 0 1px 0 0; } table.grid-rows > thead > tr > .tableblock, table.grid-rows > tbody > tr > .tableblock { border-width: 0 0 1px 0; } table.grid-rows > tfoot > tr > .tableblock { border-width: 1px 0 0 0; } table.grid-all > * > tr > .tableblock:last-child, table.grid-cols > * > tr > .tableblock:last-child { border-right-width: 0; } table.grid-all > tbody > tr:last-child > .tableblock, table.grid-all > thead:last-child > tr > .tableblock, table.grid-rows > tbody > tr:last-child > .tableblock, table.grid-rows > thead:last-child > tr > .tableblock { border-bottom-width: 0; } table.frame-all { border-width: 1px; } table.frame-sides { border-width: 0 1px; } table.frame-topbot { border-width: 1px 0; } table.stripe-all tr, table.stripe-odd tr:nth-of-type(odd) { background: #f9f9f9; } table.stripe-none tr, table.stripe-odd tr:nth-of-type(even) { background: none; } th.halign-left, td.halign-left { text-align: left; } th.halign-right, td.halign-right { text-align: right; } th.halign-center, td.halign-center { text-align: center; } th.valign-top, td.valign-top { vertical-align: top; } th.valign-bottom, td.valign-bottom { vertical-align: bottom; } th.valign-middle, td.valign-middle { vertical-align: middle; } table thead th, table tfoot th { font-weight: normal; } tbody tr th { display: table-cell; line-height: 1.4; background: whitesmoke; } tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p { color: #333333; font-weight: normal; } p.tableblock > code:only-child { background: none; padding: 0; } p.tableblock { font-size: 1em; } td > div.verse { white-space: pre; } ol { margin-left: 1.75em; } ul li ol { margin-left: 1.5em; } dl dd { margin-left: 1.125em; } dl dd:last-child, dl dd:last-child > :last-child { margin-bottom: 0; } ol > li p, ul > li p, ul dd, ol dd, .olist .olist, .ulist .ulist, .ulist .olist, .olist .ulist { margin-bottom: 0.625em; } ul.checklist, ul.none, ol.none, ul.no-bullet, ol.no-bullet, ol.unnumbered, ul.unstyled, ol.unstyled { list-style-type: none; } ul.no-bullet, ol.no-bullet, ol.unnumbered { margin-left: 0.625em; } ul.unstyled, ol.unstyled { margin-left: 0; } ul.checklist { margin-left: 0.625em; } ul.checklist li > p:first-child > .fa-square-o:first-child, ul.checklist li > p:first-child > .fa-check-square-o:first-child { width: 1.25em; font-size: 0.8em; position: relative; bottom: 0.125em; } ul.checklist li > p:first-child > input[type="checkbox"]:first-child { margin-right: 0.25em; } ul.inline { display: -ms-flexbox; display: -webkit-box; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; list-style: none; margin: 0 0 0.625em -1.25em; } ul.inline > li { margin-left: 1.25em; } .unstyled dl dt { font-weight: normal; font-style: normal; } ol.arabic { list-style-type: decimal; } ol.decimal { list-style-type: decimal-leading-zero; } ol.loweralpha { list-style-type: lower-alpha; } ol.upperalpha { list-style-type: upper-alpha; } ol.lowerroman { list-style-type: lower-roman; } ol.upperroman { list-style-type: upper-roman; } ol.lowergreek { list-style-type: lower-greek; } .hdlist > table, .colist > table { border: 0; background: none; } .hdlist > table > tbody > tr, .colist > table > tbody > tr { background: none; } td.hdlist1, td.hdlist2 { vertical-align: top; padding: 0 0.625em; } td.hdlist1 { font-weight: bold; padding-bottom: 1.25em; } .literalblock + .colist, .listingblock + .colist { margin-top: -0.5em; } .colist td:not([class]):first-child { padding: 0.4em 0.75em 0 0.75em; line-height: 1; vertical-align: top; } .colist td:not([class]):first-child img { max-width: none; } .colist td:not([class]):last-child { padding: 0.25em 0; } .thumb, .th { line-height: 0; display: inline-block; border: solid 4px white; -webkit-box-shadow: 0 0 0 1px #dddddd; box-shadow: 0 0 0 1px #dddddd; } .imageblock.left, .imageblock[style*="float: left"] { margin: 0.25em 0.625em 1.25em 0; } .imageblock.right, .imageblock[style*="float: right"] { margin: 0.25em 0 1.25em 0.625em; } .imageblock > .title { margin-bottom: 0; } .imageblock.thumb, .imageblock.th { border-width: 6px; } .imageblock.thumb > .title, .imageblock.th > .title { padding: 0 0.125em; } .image.left, .image.right { margin-top: 0.25em; margin-bottom: 0.25em; display: inline-block; line-height: 0; } .image.left { margin-right: 0.625em; } .image.right { margin-left: 0.625em; } a.image { text-decoration: none; display: inline-block; } a.image object { pointer-events: none; } sup.footnote, sup.footnoteref { font-size: 0.875em; position: static; vertical-align: super; } sup.footnote a, sup.footnoteref a { text-decoration: none; } sup.footnote a:active, sup.footnoteref a:active { text-decoration: underline; } #footnotes { padding-top: 0.75em; padding-bottom: 0.75em; margin-bottom: 0.625em; } #footnotes hr { width: 20%; min-width: 6.25em; margin: -0.25em 0 0.75em 0; border-width: 1px 0 0 0; } #footnotes .footnote { padding: 0 0.375em 0 0.225em; line-height: 1.3334; font-size: 0.875em; margin-left: 1.2em; margin-bottom: 0.2em; } #footnotes .footnote a:first-of-type { font-weight: bold; text-decoration: none; margin-left: -1.05em; } #footnotes .footnote:last-of-type { margin-bottom: 0; } #content #footnotes { margin-top: -0.625em; margin-bottom: 0; padding: 0.75em 0; } .gist .file-data > table { border: 0; background: #fff; width: 100%; margin-bottom: 0; } .gist .file-data > table td.line-data { width: 99%; } div.unbreakable { page-break-inside: avoid; } .big { font-size: larger; } .small { font-size: smaller; } .underline { text-decoration: underline; } .overline { text-decoration: overline; } .line-through { text-decoration: line-through; } .aqua { color: #00bfbf; } .aqua-background { background-color: #00fafa; } .black { color: black; } .black-background { background-color: black; } .blue { color: #0000bf; } .blue-background { background-color: #0000fa; } .fuchsia { color: #bf00bf; } .fuchsia-background { background-color: #fa00fa; } .gray { color: #606060; } .gray-background { background-color: #7d7d7d; } .green { color: #006000; } .green-background { background-color: #007d00; } .lime { color: #00bf00; } .lime-background { background-color: #00fa00; } .maroon { color: #600000; } .maroon-background { background-color: #7d0000; } .navy { color: #000060; } .navy-background { background-color: #00007d; } .olive { color: #606000; } .olive-background { background-color: #7d7d00; } .purple { color: #600060; } .purple-background { background-color: #7d007d; } .red { color: #bf0000; } .red-background { background-color: #fa0000; } .silver { color: #909090; } .silver-background { background-color: #bcbcbc; } .teal { color: #006060; } .teal-background { background-color: #007d7d; } .white { color: #bfbfbf; } .white-background { background-color: #fafafa; } .yellow { color: #bfbf00; } .yellow-background { background-color: #fafa00; } span.icon > .fa { cursor: default; } a span.icon > .fa { cursor: inherit; } .admonitionblock td.icon [class^="fa icon-"] { font-size: 2.5em; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); cursor: default; } .admonitionblock td.icon .icon-note:before { content: "\f05a"; color: #b1c918; } .admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 0.8); color: #111; } .admonitionblock td.icon .icon-warning:before { content: "\f071"; color: #bf6900; } .admonitionblock td.icon .icon-caution:before { content: "\f06d"; color: #bf3400; } .admonitionblock td.icon .icon-important:before { content: "\f06a"; color: #bf0000; } .conum[data-value] { display: inline-block; color: #fff !important; background-color: #555555; -webkit-border-radius: 100px; border-radius: 100px; text-align: center; font-size: 0.75em; width: 1.67em; height: 1.67em; line-height: 1.67em; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-style: normal; font-weight: bold; } .conum[data-value] * { color: #fff !important; } .conum[data-value] + b { display: none; } .conum[data-value]:after { content: attr(data-value); } pre .conum[data-value] { position: relative; top: -0.125em; } b.conum * { color: inherit !important; } .conum:not([data-value]):empty { display: none; } #header > h1 { border-bottom-style: solid; } #toctitle { color: #333333; } .listingblock pre, .literalblock pre { background: -moz-linear-gradient(top, white 0%, #f4f4f4 100%); background: -webkit-linear-gradient(top, white 0%, #f4f4f4 100%); background: linear-gradient(to bottom, #ffffff 0%, #f4f4f4 100%); -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); } .sidebarblock { background: none; border: none; -webkit-box-shadow: 0 0 5px rgba(118, 137, 4, 0.5); box-shadow: 0 0 5px rgba(118, 137, 4, 0.5); } .sidebarblock > .content > .title { color: #181818; } </style> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"> <style> .listingblock .pygments .hll { background-color: #ffffcc } .listingblock .pygments, .listingblock .pygments code { background: #f8f8f8; } .listingblock .pygments .tok-c { color: #408080; font-style: italic } /* Comment */ .listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ .listingblock .pygments .tok-k { color: #008000; font-weight: bold } /* Keyword */ .listingblock .pygments .tok-o { color: #666666 } /* Operator */ .listingblock .pygments .tok-ch { color: #408080; font-style: italic } /* Comment.Hashbang */ .listingblock .pygments .tok-cm { color: #408080; font-style: italic } /* Comment.Multiline */ .listingblock .pygments .tok-cp { color: #BC7A00 } /* Comment.Preproc */ .listingblock .pygments .tok-cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ .listingblock .pygments .tok-c1 { color: #408080; font-style: italic } /* Comment.Single */ .listingblock .pygments .tok-cs { color: #408080; font-style: italic } /* Comment.Special */ .listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ .listingblock .pygments .tok-ge { font-style: italic } /* Generic.Emph */ .listingblock .pygments .tok-gr { color: #FF0000 } /* Generic.Error */ .listingblock .pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */ .listingblock .pygments .tok-gi { color: #00A000 } /* Generic.Inserted */ .listingblock .pygments .tok-go { color: #888888 } /* Generic.Output */ .listingblock .pygments .tok-gp { color: #000080; font-weight: bold } /* Generic.Prompt */ .listingblock .pygments .tok-gs { font-weight: bold } /* Generic.Strong */ .listingblock .pygments .tok-gu { color: #800080; font-weight: bold } /* Generic.Subheading */ .listingblock .pygments .tok-gt { color: #0044DD } /* Generic.Traceback */ .listingblock .pygments .tok-kc { color: #008000; font-weight: bold } /* Keyword.Constant */ .listingblock .pygments .tok-kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ .listingblock .pygments .tok-kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ .listingblock .pygments .tok-kp { color: #008000 } /* Keyword.Pseudo */ .listingblock .pygments .tok-kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ .listingblock .pygments .tok-kt { color: #B00040 } /* Keyword.Type */ .listingblock .pygments .tok-m { color: #666666 } /* Literal.Number */ .listingblock .pygments .tok-s { color: #BA2121 } /* Literal.String */ .listingblock .pygments .tok-na { color: #7D9029 } /* Name.Attribute */ .listingblock .pygments .tok-nb { color: #008000 } /* Name.Builtin */ .listingblock .pygments .tok-nc { color: #0000FF; font-weight: bold } /* Name.Class */ .listingblock .pygments .tok-no { color: #880000 } /* Name.Constant */ .listingblock .pygments .tok-nd { color: #AA22FF } /* Name.Decorator */ .listingblock .pygments .tok-ni { color: #999999; font-weight: bold } /* Name.Entity */ .listingblock .pygments .tok-ne { color: #D2413A; font-weight: bold } /* Name.Exception */ .listingblock .pygments .tok-nf { color: #0000FF } /* Name.Function */ .listingblock .pygments .tok-nl { color: #A0A000 } /* Name.Label */ .listingblock .pygments .tok-nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ .listingblock .pygments .tok-nt { color: #008000; font-weight: bold } /* Name.Tag */ .listingblock .pygments .tok-nv { color: #19177C } /* Name.Variable */ .listingblock .pygments .tok-ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ .listingblock .pygments .tok-w { color: #bbbbbb } /* Text.Whitespace */ .listingblock .pygments .tok-mb { color: #666666 } /* Literal.Number.Bin */ .listingblock .pygments .tok-mf { color: #666666 } /* Literal.Number.Float */ .listingblock .pygments .tok-mh { color: #666666 } /* Literal.Number.Hex */ .listingblock .pygments .tok-mi { color: #666666 } /* Literal.Number.Integer */ .listingblock .pygments .tok-mo { color: #666666 } /* Literal.Number.Oct */ .listingblock .pygments .tok-sa { color: #BA2121 } /* Literal.String.Affix */ .listingblock .pygments .tok-sb { color: #BA2121 } /* Literal.String.Backtick */ .listingblock .pygments .tok-sc { color: #BA2121 } /* Literal.String.Char */ .listingblock .pygments .tok-dl { color: #BA2121 } /* Literal.String.Delimiter */ .listingblock .pygments .tok-sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ .listingblock .pygments .tok-s2 { color: #BA2121 } /* Literal.String.Double */ .listingblock .pygments .tok-se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ .listingblock .pygments .tok-sh { color: #BA2121 } /* Literal.String.Heredoc */ .listingblock .pygments .tok-si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ .listingblock .pygments .tok-sx { color: #008000 } /* Literal.String.Other */ .listingblock .pygments .tok-sr { color: #BB6688 } /* Literal.String.Regex */ .listingblock .pygments .tok-s1 { color: #BA2121 } /* Literal.String.Single */ .listingblock .pygments .tok-ss { color: #19177C } /* Literal.String.Symbol */ .listingblock .pygments .tok-bp { color: #008000 } /* Name.Builtin.Pseudo */ .listingblock .pygments .tok-fm { color: #0000FF } /* Name.Function.Magic */ .listingblock .pygments .tok-vc { color: #19177C } /* Name.Variable.Class */ .listingblock .pygments .tok-vg { color: #19177C } /* Name.Variable.Global */ .listingblock .pygments .tok-vi { color: #19177C } /* Name.Variable.Instance */ .listingblock .pygments .tok-vm { color: #19177C } /* Name.Variable.Magic */ .listingblock .pygments .tok-il { color: #666666 } /* Literal.Number.Integer.Long */ </style> </head> <body class="article toc2 toc-left"> <div id="header"> <h1>AsciiDoc 指引 <sup><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/full.html">full</a></sup></h1> <div class="details"> <span id="author" class="author">Elias Abel</span><br> </div> <div id="toc" class="toc2"> <div id="toctitle">索引</div> <ul class="sectlevel1"> <li><a href="#_简介">简介</a> <ul class="sectlevel2"> <li><a href="#_markdown_还不够吗">Markdown 还不够吗</a></li> <li><a href="#_为什么选择_asciidoc">为什么选择 AsciiDoc</a></li> <li><a href="#_asciidoc_与_markdown">AsciiDoc 与 Markdown</a></li> </ul> </li> <li><a href="#_语法">语法</a> <ul class="sectlevel2"> <li><a href="#_标题">标题</a></li> <li><a href="#_目录">目录</a></li> <li><a href="#_样式">样式</a> <ul class="sectlevel3"> <li><a href="#_粗体">粗体</a></li> <li><a href="#_斜体">斜体</a></li> <li><a href="#_高亮">高亮</a></li> <li><a href="#_下划线">下划线</a></li> <li><a href="#_删划线">删划线</a></li> <li><a href="#_大小标记">大小标记</a></li> <li><a href="#_上标下标">上标下标</a></li> </ul> </li> <li><a href="#_横线">横线</a></li> <li><a href="#_分页">分页</a></li> <li><a href="#_图片">图片</a> <ul class="sectlevel3"> <li><a href="#_行内图片">行内图片</a></li> <li><a href="#_块图片">块图片</a></li> </ul> </li> <li><a href="#_视频">视频</a> <ul class="sectlevel3"> <li><a href="#_普通视频">普通视频</a></li> <li><a href="#_youtube_视频">Youtube 视频</a></li> <li><a href="#_vimeo_视频">Vimeo 视频</a></li> </ul> </li> <li><a href="#_链接">链接</a></li> <li><a href="#_标记">标记</a></li> <li><a href="#_列表">列表</a> <ul class="sectlevel3"> <li><a href="#_无序列表">无序列表</a></li> <li><a href="#_有序列表">有序列表</a></li> <li><a href="#_勾选列表">勾选列表</a></li> <li><a href="#_混合列表">混合列表</a></li> <li><a href="#_标签列表">标签列表</a></li> </ul> </li> <li><a href="#_表格">表格</a> <ul class="sectlevel3"> <li><a href="#_简单列表">简单列表</a></li> <li><a href="#_嵌套语法">嵌套语法</a></li> <li><a href="#_停靠位置">停靠位置</a></li> <li><a href="#_合并单元格">合并单元格</a></li> </ul> </li> <li><a href="#_区块">区块</a> <ul class="sectlevel3"> <li><a href="#_横栏块">横栏块</a></li> <li><a href="#_示例块">示例块</a></li> <li><a href="#_透传块">透传块</a></li> <li><a href="#_引用块">引用块</a></li> <li><a href="#_警告块">警告块</a></li> <li><a href="#_代码块">代码块</a> <ul class="sectlevel4"> <li><a href="#_markdown_风格">Markdown 风格</a></li> </ul> </li> </ul> </li> <li><a href="#_行内代码">行内代码</a></li> <li><a href="#_注释">注释</a></li> <li><a href="#_键盘">键盘</a></li> <li><a href="#_导入">导入</a></li> <li><a href="#_脚注">脚注</a></li> </ul> </li> <li><a href="#_工具">工具</a> <ul class="sectlevel2"> <li><a href="#_asciidocfx">AsciidocFX</a></li> <li><a href="#_atom">Atom</a></li> <li><a href="#_asciidoctor">AsciiDoctor</a> <ul class="sectlevel3"> <li><a href="#_stylesheets">Stylesheets</a></li> </ul> </li> </ul> </li> <li><a href="#_关于">关于</a></li> </ul> </div> </div> <div id="content"> <div class="sect1"> <h2 id="_简介">简介</h2> <div class="sectionbody"> <div class="paragraph"> <p>轻量级的标记语言已经有很多(<a href="https://en.wikipedia.org/wiki/Lightweight_markup_language">Wikipedia</a>),例如我用来写博客的 <code>Markdown</code> 就是目前十分流行的一种轻量级标记语言,包括 <code>Github</code>、<code>StackOverflow</code> 等很多网站以及个人都在使用。</p> </div> <div class="sect2"> <h3 id="_markdown_还不够吗">Markdown 还不够吗</h3> <div class="paragraph"> <p><code>Markdown</code> 语法简介,即便阅读未经渲染的源文件也有不错的可读性。但它对于较为复杂的格式例如表格的支持始终遭人诟病,许多网站使用各自不同的扩展语法来实现,也从而导致了各种方言的滋生。这也是为何会出现 <a href="https://blog.codinghorror.com/standard-flavored-markdown/">Standard Markdown</a> 项目的原因,虽然因为种种原因又更名为 <a href="https://blog.codinghorror.com/standard-flavored-markdown/">Common Markdown</a>,然而整个 <code>Markdown</code> 社区依然缺乏创建者的支持,<code>Common Markdown</code> 也很可能沦为另一个方言。</p> </div> <div class="imageblock"> <div class="content"> <img src="/Users/Meniny/Projects/Github/Meniny.github.io//assets/images/posts/content/md_standards.png" alt="md standards"> </div> <div class="title">Figure 1. Markdown Standards</div> </div> </div> <div class="sect2"> <h3 id="_为什么选择_asciidoc">为什么选择 AsciiDoc</h3> <div class="paragraph"> <p>第一次接触到 AsciiDoc 是通过 <code>O&#8217;Reilly</code> 的图书,<code>Atlas</code> 的推荐语言就是 <code>AsciiDoc</code>。那么十多种标记语言中,为什么要选择 <code>AsciiDoc</code> 呢?其实在选择另一种标记语言时,我做过一些简单的研究:</p> </div> <div class="ulist"> <ul> <li> <p><strong>LaTex :</strong> 大名鼎鼎的 <code>LaTex</code> 是除了 <code>Markdown</code> 之外我第一个投入精力学习的标记语言。不得不说 <code>LaTex</code> 十分强大,但与这份强大伴随而来则是复杂的语法,导致了写作过程的枯燥,也让我失去了对 <code>LaTex</code> 的兴趣。</p> </li> <li> <p><strong>reStructuredText :</strong> <code>REST</code> 也是一种松散的文本结构,功能也较为全面,但书写起来更像是在写 <code>Python。</code></p> </li> <li> <p><strong>Org mode :</strong> 我想基本上只有 <code>Emacs</code> 社区的人在使用了吧。</p> </li> <li> <p><strong>Texy!,BBCode,Creole,Textile&#8230;&#8203; :</strong> 事实上大部分轻量级的标记语言语法都较为类似,所以这场抉择很大程度上是使用范围、功能、兼容性、扩展性等多方面的比赛,这也是我为什么不选择这些语言的原因。</p> </li> </ul> </div> </div> <div class="sect2"> <h3 id="_asciidoc_与_markdown">AsciiDoc 与 Markdown</h3> <div class="paragraph"> <p><code>AsciiDoc</code> 的语法与 <code>Markdown</code> 十分类似,在学会 <code>Markdown</code> 的前提下很容易转向 <code>AsciiDoc</code> 阵营。</p> </div> <div class="paragraph"> <p>在的功能方面,前面已经说过许多功能 <code>Markdown</code> 要通过扩展语法和 <code>HTML</code> 来实现,前者直接导致了通用性的缺失,后者提高了后期编撰的成本,而 AsciiDoc 的学习成本也远不及多学一门 <code>HTML</code> 甚至多种扩展语法。</p> </div> <div class="paragraph"> <p><code>AsciiDoc</code> 原生支持的特性就足以应付大多数电子文档的编撰需求,你可以使用标准的 <code>AsciiDoc</code> 语法为你的文档添加作者信息、版本信息、表格等特性,它还支持文档引入、自定义块语法等功能。</p> </div> </div> </div> </div> <div class="sect1"> <h2 id="_语法">语法</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_标题">标题</h3> <div class="paragraph"> <p>{ascii} 中的标题共分为六层,分别使用对应数量的 <code>=</code> 进行标识:</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>= 零级 == 一级 === 二级 ==== 三级 ===== 四级 ====== 五级</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 1. result</div> <div class="content"> <h1 id="_零级" class="float">零级</h1> <h2 id="_一级" class="float">一级</h2> <h3 id="_二级" class="float">二级</h3> <h4 id="_三级" class="float">三级</h4> <h5 id="_四级" class="float">四级</h5> <h6 id="_五级" class="float">五级</h6> </div> </div> </div> <div class="sect2"> <h3 id="_目录">目录</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>:toc: :toc: right :toc: left</code></pre> </div> </div> </div> <div class="sect2"> <h3 id="_样式">样式</h3> <div class="sect3"> <h4 id="_粗体">粗体</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>普通文字 *粗体字* 普通文字</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 2. result</div> <div class="content"> <div class="paragraph"> <p>普通文字 <strong>粗体字</strong> 普通文字</p> </div> </div> </div> </div> <div class="sect3"> <h4 id="_斜体">斜体</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>普通文字 _斜体字_ 普通文字</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 3. result</div> <div class="content"> <div class="paragraph"> <p>普通文字 <em>斜体字</em> 普通文字</p> </div> </div> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>*_粗体 &amp; 斜体_*</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 4. result</div> <div class="content"> <div class="paragraph"> <p><strong><em>粗体 &amp; 斜体</em></strong></p> </div> </div> </div> </div> <div class="sect3"> <h4 id="_高亮">高亮</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>普通文字 #高亮内容# 普通文字</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 5. result</div> <div class="content"> <div class="paragraph"> <p>普通文字 <mark>高亮内容</mark> 普通文字</p> </div> </div> </div> </div> <div class="sect3"> <h4 id="_下划线">下划线</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>[.underline]#下划线文字#</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 6. result</div> <div class="content"> <div class="paragraph"> <p><span class="underline">下划线文字</span></p> </div> </div> </div> </div> <div class="sect3"> <h4 id="_删划线">删划线</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>[.line-through]#删划线文字#</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 7. result</div> <div class="content"> <div class="paragraph"> <p><span class="line-through">删划线文字</span></p> </div> </div> </div> </div> <div class="sect3"> <h4 id="_大小标记">大小标记</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>普通文字中含有 [.small]#示例小标记# 以及 [.big]##示例大标记##。</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 8. result</div> <div class="content"> <div class="paragraph"> <p>普通文字中含有 <span class="small">示例小标记</span> 以及 <span class="big">示例大标记</span>。</p> </div> </div> </div> </div> <div class="sect3"> <h4 id="_上标下标">上标下标</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>普通文字^上标^ 普通文字~下标~</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 9. result</div> <div class="content"> <div class="paragraph"> <p>普通文字<sup>上标</sup></p> </div> <div class="paragraph"> <p>普通文字<sub>下标</sub></p> </div> </div> </div> </div> </div> <div class="sect2"> <h3 id="_横线">横线</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>***</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 10. result</div> <div class="content"> <hr> </div> </div> </div> <div class="sect2"> <h3 id="_分页">分页</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>&lt;&lt;&lt;</code></pre> </div> </div> </div> <div class="sect2"> <h3 id="_图片">图片</h3> <div class="sect3"> <h4 id="_行内图片">行内图片</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>An image image:{image}/avatar/oschina_200.jpg[some, 50] here.</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 11. result</div> <div class="content"> <div class="paragraph"> <p>An image <span class="image"><img src="/Users/Meniny/Projects/Github/Meniny.github.io//assets/images/avatar/oschina_200.jpg" alt="some" width="50"></span> here.</p> </div> </div> </div> </div> <div class="sect3"> <h4 id="_块图片">块图片</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>image::{image}/avatar/oschina_200.jpg[caption=&quot;Caption: &quot;, title=&quot;Blocked Image&quot;, 100]</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 12. result</div> <div class="content"> <div class="imageblock"> <div class="content"> <img src="/Users/Meniny/Projects/Github/Meniny.github.io//assets/images/avatar/oschina_200.jpg" alt="oschina 200" height="100"> </div> <div class="title">Caption: Blocked Image</div> </div> </div> </div> </div> </div> <div class="sect2"> <h3 id="_视频">视频</h3> <div class="sect3"> <h4 id="_普通视频">普通视频</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>video::video_file.mp4[] video::video_file.mp4[width=640, start=60, end=140, options=autoplay]</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 13. result</div> <div class="content"> <div class="videoblock"> <div class="content"> <video src="/Users/Meniny/Projects/Github/Meniny.github.io//assets/videos/wow.mp4" width="200" poster="WOW" controls> Your browser does not support the video tag. </video> </div> </div> </div> </div> </div> <div class="sect3"> <h4 id="_youtube_视频">Youtube 视频</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>video::rPQoq7ThGAU[youtube]</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 14. result</div> <div class="content"> <div class="videoblock"> <div class="content"> <iframe src="https://www.youtube.com/embed/rPQoq7ThGAU?rel=0" frameborder="0" allowfullscreen></iframe> </div> </div> </div> </div> </div> <div class="sect3"> <h4 id="_vimeo_视频">Vimeo 视频</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>video::67480300[vimeo]</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 15. result</div> <div class="content"> <div class="videoblock"> <div class="content"> <iframe src="https://player.vimeo.com/video/67480300" frameborder="0" allowfullscreen></iframe> </div> </div> </div> </div> </div> </div> <div class="sect2"> <h3 id="_链接">链接</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>获取更多详情,请link:{home}[点击这里], 或者 {home}[像这样]</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 16. result</div> <div class="content"> <div class="paragraph"> <p>获取更多详情,请<a href="/Users/Meniny/Projects/Github/Meniny.github.io/">点击这里</a>, 或者 /Users/Meniny/Projects/Github/Meniny.github.io/[像这样]</p> </div> </div> </div> </div> <div class="sect2"> <h3 id="_标记">标记</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>[#goals] * Goal 1 * Goal 2 Jump to link:#golas[Link with id].</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 17. result</div> <div class="content"> <div id="goals" class="ulist"> <ul> <li> <p>Goal 1</p> </li> <li> <p>Goal 2</p> </li> </ul> </div> <div class="paragraph"> <p>Jump to <a href="#golas">Link with id</a>.</p> </div> </div> </div> </div> <div class="sect2"> <h3 id="_列表">列表</h3> <div class="sect3"> <h4 id="_无序列表">无序列表</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>* level 1 ** level 2 *** level 3 **** level 4 ***** level 5 * level 1</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 18. result</div> <div class="content"> <div class="ulist"> <ul> <li> <p>level 1</p> <div class="ulist"> <ul> <li> <p>level 2</p> <div class="ulist"> <ul> <li> <p>level 3</p> <div class="ulist"> <ul> <li> <p>level 4</p> <div class="ulist"> <ul> <li> <p>level 5</p> </li> </ul> </div> </li> </ul> </div> </li> </ul> </div> </li> </ul> </div> </li> <li> <p>level 1</p> </li> </ul> </div> </div> </div> </div> <div class="sect3"> <h4 id="_有序列表">有序列表</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>. level 1 .. level 2 ... level 3 .... level 4 ..... level 5 . level 1</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 19. result</div> <div class="content"> <div class="olist arabic"> <ol class="arabic"> <li> <p>level 1</p> <div class="olist loweralpha"> <ol class="loweralpha" type="a"> <li> <p>level 2</p> <div class="olist lowerroman"> <ol class="lowerroman" type="i"> <li> <p>level 3</p> <div class="olist upperalpha"> <ol class="upperalpha" type="A"> <li> <p>level 4</p> <div class="olist upperroman"> <ol class="upperroman" type="I"> <li> <p>level 5</p> </li> </ol> </div> </li> </ol> </div> </li> </ol> </div> </li> </ol> </div> </li> <li> <p>level 1</p> </li> </ol> </div> </div> </div> </div> <div class="sect3"> <h4 id="_勾选列表">勾选列表</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>* [x] 已选 * [ ] 未选 * 普通</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 20. result</div> <div class="content"> <div class="ulist checklist"> <ul class="checklist"> <li> <p><i class="fa fa-check-square-o"></i> 已选</p> </li> <li> <p><i class="fa fa-square-o"></i> 未选</p> </li> <li> <p>普通</p> </li> </ul> </div> </div> </div> </div> <div class="sect3"> <h4 id="_混合列表">混合列表</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>Operating Systems:: Linux::: . Fedora * Desktop . Ubuntu * Desktop * Server BSD::: . FreeBSD . NetBSD Cloud Providers:: PaaS::: . OpenShift . CloudBees IaaS::: . Amazon EC2 . Rackspace</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 21. result</div> <div class="content"> <div class="dlist"> <dl> <dt class="hdlist1">Operating Systems</dt> <dd> <div class="dlist"> <dl> <dt class="hdlist1">Linux</dt> <dd> <div class="olist arabic"> <ol class="arabic"> <li> <p>Fedora</p> <div class="ulist"> <ul> <li> <p>Desktop</p> </li> </ul> </div> </li> <li> <p>Ubuntu</p> <div class="ulist"> <ul> <li> <p>Desktop</p> </li> <li> <p>Server</p> </li> </ul> </div> </li> </ol> </div> </dd> <dt class="hdlist1">BSD</dt> <dd> <div class="olist arabic"> <ol class="arabic"> <li> <p>FreeBSD</p> </li> <li> <p>NetBSD</p> </li> </ol> </div> </dd> </dl> </div> </dd> <dt class="hdlist1">Cloud Providers</dt> <dd> <div class="dlist"> <dl> <dt class="hdlist1">PaaS</dt> <dd> <div class="olist arabic"> <ol class="arabic"> <li> <p>OpenShift</p> </li> <li> <p>CloudBees</p> </li> </ol> </div> </dd> <dt class="hdlist1">IaaS</dt> <dd> <div class="olist arabic"> <ol class="arabic"> <li> <p>Amazon EC2</p> </li> <li> <p>Rackspace</p> </li> </ol> </div> </dd> </dl> </div> </dd> </dl> </div> </div> </div> </div> <div class="sect3"> <h4 id="_标签列表">标签列表</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>What is this?:: You tell me! Why?:: I don&#39;t know.</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 22. result</div> <div class="content"> <div class="dlist"> <dl> <dt class="hdlist1">What is this?</dt> <dd> <p>You tell me!</p> </dd> <dt class="hdlist1">Why?</dt> <dd> <p>I don&#8217;t know.</p> </dd> </dl> </div> </div> </div> </div> </div> <div class="sect2"> <h3 id="_表格">表格</h3> <div class="sect3"> <h4 id="_简单列表">简单列表</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>.表格标题 |=== |列标题 1 |列标题 2 |列标题 3 |列1行1 |列2行1 |列3行1 |列1行2 |列2行2 |列3行2 |===</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 23. result</div> <div class="content"> <table class="tableblock frame-all grid-all spread"> <caption class="title">Table 1. 表格标题</caption> <colgroup> <col style="width: 33.3333%;"> <col style="width: 33.3333%;"> <col style="width: 33.3334%;"> </colgroup> <thead> <tr> <th class="tableblock halign-left valign-top">列标题 1</th> <th class="tableblock halign-left valign-top">列标题 2</th> <th class="tableblock halign-left valign-top">列标题 3</th> </tr> </thead> <tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">列1行1</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列2行1</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列3行1</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">列1行2</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列2行2</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列3行2</p></td> </tr> </tbody> </table> </div> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>[%header,cols=2*] |=== |列标题 1 |列标题 2 |列1行1 |列2行1 |列1行2 |列2行2 |===</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 24. result</div> <div class="content"> <table class="tableblock frame-all grid-all spread"> <colgroup> <col style="width: 50%;"> <col style="width: 50%;"> </colgroup> <thead> <tr> <th class="tableblock halign-left valign-top">列标题 1</th> <th class="tableblock halign-left valign-top">列标题 2</th> </tr> </thead> <tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">列1行1</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列2行1</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">列1行2</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列2行2</p></td> </tr> </tbody> </table> </div> </div> </div> <div class="sect3"> <h4 id="_嵌套语法">嵌套语法</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>[cols=&quot;2,2,5a&quot;] |=== |Firefox |Browser |Mozilla Firefox is an open-source web browser. It&#39;s designed for: * standards compliance * performance * portability http://getfirefox.com[Get Firefox]! |===</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 25. result</div> <div class="content"> <table class="tableblock frame-all grid-all spread"> <colgroup> <col style="width: 22.2222%;"> <col style="width: 22.2222%;"> <col style="width: 55.5556%;"> </colgroup> <tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">Firefox</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Browser</p></td> <td class="tableblock halign-left valign-top"><div><div class="paragraph"> <p>Mozilla Firefox is an open-source web browser.</p> </div> <div class="paragraph"> <p>It&#8217;s designed for:</p> </div> <div class="ulist"> <ul> <li> <p>standards compliance</p> </li> <li> <p>performance</p> </li> <li> <p>portability</p> </li> </ul> </div> <div class="paragraph"> <p><a href="http://getfirefox.com">Get Firefox</a>!</p> </div></div></td> </tr> </tbody> </table> </div> </div> </div> <div class="sect3"> <h4 id="_停靠位置">停靠位置</h4> <div class="paragraph"> <p>在单元格分隔符 (<code>|</code>) 前使用 <code>^</code>、<code>&lt;</code>、<code>&gt;</code> 符号分别表示该单元格横向居中、左对齐、右对齐。</p> </div> <div class="paragraph"> <p>在单元格分隔符 (<code>|</code>) 前使用 <code>.^</code> 符号表示该单元格纵向居中。</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>|=== ^|居中 &lt;|左对齐 &gt;|右对齐 |这是一个普通的单元格,使用默认的停靠规则 |===</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 26. result</div> <div class="content"> <table class="tableblock frame-all grid-all spread"> <colgroup> <col style="width: 100%;"> </colgroup> <tbody> <tr> <td class="tableblock halign-center valign-top"><p class="tableblock">居中</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">左对齐</p></td> </tr> <tr> <td class="tableblock halign-right valign-top"><p class="tableblock">右对齐</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">这是一个普通的单元格,使用默认的停靠规则</p></td> </tr> </tbody> </table> </div> </div> </div> <div class="sect3"> <h4 id="_合并单元格">合并单元格</h4> <div class="paragraph"> <p>在单元格分隔符 (<code>|</code>) 前使用 <code>N\+</code> 表示该单元格横向占据 <code>N</code> 列。</p> </div> <div class="paragraph"> <p>在单元格分隔符 (<code>|</code>) 前使用 <code>.N\+</code> 表示该单元格纵向占据 <code>N</code> 行。</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>|=== |列1|列2|列3 2+|横向占据2个单元格|cell 2.2+|横竖均占据2个单元格|cell |cell |===</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 27. result</div> <div class="content"> <table class="tableblock frame-all grid-all spread"> <colgroup> <col style="width: 33.3333%;"> <col style="width: 33.3333%;"> <col style="width: 33.3334%;"> </colgroup> <tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">列1</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列2</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列3</p></td> </tr> <tr> <td class="tableblock halign-left valign-top" colspan="2"><p class="tableblock">横向占据2个单元格</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">cell</p></td> </tr> <tr> <td class="tableblock halign-left valign-top" colspan="2" rowspan="2"><p class="tableblock">横竖均占据2个单元格</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">cell</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">cell</p></td> </tr> </tbody> </table> </div> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>|=== |列1|列2|列3 2+^|横向占据2个单元格,横向居中|cell 2.2+^.^|横竖均占据2个单元格,横纵居中|cell |cell |===</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 28. result</div> <div class="content"> <table class="tableblock frame-all grid-all spread"> <colgroup> <col style="width: 33.3333%;"> <col style="width: 33.3333%;"> <col style="width: 33.3334%;"> </colgroup> <tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">列1</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列2</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">列3</p></td> </tr> <tr> <td class="tableblock halign-center valign-top" colspan="2"><p class="tableblock">横向占据2个单元格,横向居中</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">cell</p></td> </tr> <tr> <td class="tableblock halign-center valign-middle" colspan="2" rowspan="2"><p class="tableblock">横竖均占据2个单元格,横纵居中</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">cell</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">cell</p></td> </tr> </tbody> </table> </div> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>|=== |cell .3+^.^|纵向占据三个单元格,横纵居中 m|cell e|cell |===</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 29. result</div> <div class="content"> <table class="tableblock frame-all grid-all spread"> <colgroup> <col style="width: 50%;"> <col style="width: 50%;"> </colgroup> <tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">cell</p></td> <td class="tableblock halign-center valign-middle" rowspan="3"><p class="tableblock">纵向占据三个单元格,横纵居中</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock"><code>cell</code></p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock"><em>cell</em></p></td> </tr> </tbody> </table> </div> </div> </div> </div> <div class="sect2"> <h3 id="_区块">区块</h3> <div class="sect3"> <h4 id="_横栏块">横栏块</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>.横栏 **** 这是一个**横栏块** ****</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 30. result</div> <div class="content"> <div class="sidebarblock"> <div class="content"> <div class="title">横栏</div> <div class="paragraph"> <p>这是一个<strong><em>横栏块</em></strong></p> </div> </div> </div> </div> </div> </div> <div class="sect3"> <h4 id="_示例块">示例块</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>.result ==== 这是一个示例 ====</code></pre> </div> </div> </div> <div class="sect3"> <h4 id="_透传块">透传块</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>++++ &lt;a href=&quot;{home}&quot;&gt;内嵌 HTML 代码&lt;/a&gt; ++++</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 31. result</div> <div class="content"> <a href="{home}">内嵌 HTML 代码</a> </div> </div> </div> <div class="sect3"> <h4 id="_引用块">引用块</h4> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>[quote, 林肯, 第XX任美国总统] ____ Four score and seven years ago our fathers brought forth on this continent a new nation... ____</code></pre> </div> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>[quote, 爱因斯坦] A person who never made a mistake never tried anything new.</code></pre> </div> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>____ A person who never made a mistake never tried anything new. Contains a link:{home}[link]. ____</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 32. result</div> <div class="content"> <div class="quoteblock"> <blockquote> <div class="paragraph"> <p>Four score and seven years ago our fathers brought forth on this continent a new nation&#8230;&#8203;</p> </div> </blockquote> <div class="attribution"> &#8212; 林肯<br> <cite>第XX任美国总统</cite> </div> </div> </div> </div> <div class="exampleblock"> <div class="title">Example 33. result</div> <div class="content"> <div class="quoteblock"> <blockquote> A person who never made a mistake never tried anything new. </blockquote> <div class="attribution"> &#8212; 爱因斯坦 </div> </div> </div> </div> <div class="exampleblock"> <div class="title">Example 34. result</div> <div class="content"> <div class="quoteblock"> <blockquote> <div class="paragraph"> <p>A person who never made a mistake never tried anything new.</p> </div> <div class="paragraph"> <p>Contains a <a href="/Users/Meniny/Projects/Github/Meniny.github.io/">link</a>.</p> </div> </blockquote> </div> </div> </div> </div> <div class="sect3"> <h4 id="_警告块">警告块</h4> <div class="paragraph"> <p>在 <code>AsciiDoctor</code> 中, 使用这些图标需要在文档头配置 <code>:icons: font</code>。</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>NOTE: 备注 TIP: 提示 IMPORTANT: 重要 WARNING: 警告 CAUTION: 当心 [NOTE] ==== 一些备注内容 ====</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 35. result</div> <div class="content"> <div class="admonitionblock note"> <table> <tr> <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> <td class="content"> 备注 </td> </tr> </table> </div> <div class="admonitionblock tip"> <table> <tr> <td class="icon"> <i class="fa icon-tip" title="Tip"></i> </td> <td class="content"> 提示 </td> </tr> </table> </div> <div class="admonitionblock important"> <table> <tr> <td class="icon"> <i class="fa icon-important" title="Important"></i> </td> <td class="content"> 重要 </td> </tr> </table> </div> <div class="admonitionblock warning"> <table> <tr> <td class="icon"> <i class="fa icon-warning" title="Warning"></i> </td> <td class="content"> 警告 </td> </tr> </table> </div> <div class="admonitionblock caution"> <table> <tr> <td class="icon"> <i class="fa icon-caution" title="Caution"></i> </td> <td class="content"> 当心 </td> </tr> </table> </div> </div> </div> </div> <div class="sect3"> <h4 id="_代码块">代码块</h4> <div class="paragraph"> <p>在 <code>AsciiDoctor</code> 中, 使用代码高亮需要在文档头配置 <code>:source-highlighter: pygments</code>。</p> </div> <div class="paragraph"> <p>你可以通过 <code>gem install pygments.rb</code> 指令安装 <code>pygments</code> 的 <code>Ruby</code> 实现。除 <code>pygments</code>, 还可以使用 <code>coderay</code>, <code>highlightjs</code>, `prettify`等。</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>.index.html [source, html, subs=&quot;verbatim, attributes&quot;] .... &lt;div&gt; // &lt;1&gt; &lt;p&gt;{author}&lt;/p&gt; &lt;/div&gt; .... &lt;1&gt; 标注信息</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 36. result</div> <div class="content"> <div class="listingblock"> <div class="title">index.html</div> <div class="content"> <pre class="pygments highlight"><code data-lang="html"><span></span><span class="tok-p">&lt;</span><span class="tok-nt">div</span><span class="tok-p">&gt;</span> <i class="conum" data-value="1"></i><b>(1)</b> <span class="tok-p">&lt;</span><span class="tok-nt">p</span><span class="tok-p">&gt;</span>Elias Abel<span class="tok-p">&lt;/</span><span class="tok-nt">p</span><span class="tok-p">&gt;</span> <span class="tok-p">&lt;/</span><span class="tok-nt">div</span><span class="tok-p">&gt;</span></code></pre> </div> </div> <div class="colist arabic"> <table> <tr> <td><i class="conum" data-value="1"></i><b>1</b></td> <td>标注信息</td> </tr> </table> </div> </div> </div> <div class="sect4"> <h5 id="_markdown_风格">Markdown 风格</h5> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>```ruby def some() end ```</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 37. result</div> <div class="content"> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="ruby"><span></span><span class="tok-k">def</span> <span class="tok-nf">some</span><span class="tok-p">()</span> <span class="tok-k">end</span></code></pre> </div> </div> </div> </div> <div class="exampleblock"> <div class="title">Example 38. result</div> <div class="content"> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="swift"><span></span><span class="tok-kd">import</span> <span class="tok-nc">UIKit</span> <span class="tok-n">open</span> <span class="tok-kd">class</span> <span class="tok-nc">SomeClass</span> <span class="tok-p">{</span> <span class="tok-n">open</span> <span class="tok-kd">let</span> <span class="tok-nv">name</span><span class="tok-p">:</span> <span class="tok-nb">String</span> <span class="tok-kd">public</span> <span class="tok-kd">init</span><span class="tok-p">(</span><span class="tok-n">name</span><span class="tok-p">)</span> <span class="tok-p">{</span> <span class="tok-kc">self</span><span class="tok-p">.</span><span class="tok-n">name</span> <span class="tok-p">=</span> <span class="tok-n">name</span> <span class="tok-p">}</span> <span class="tok-p">}</span></code></pre> </div> </div> </div> </div> </div> </div> </div> <div class="sect2"> <h3 id="_行内代码">行内代码</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>普通文字 `&lt;div&gt;` 普通文字</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 39. result</div> <div class="content"> <div class="paragraph"> <p>普通文字 <code>&lt;div&gt;</code> 普通文字</p> </div> </div> </div> </div> <div class="sect2"> <h3 id="_注释">注释</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>// 单行注释 //// 多行注释 多行注释 ////</code></pre> </div> </div> </div> <div class="sect2"> <h3 id="_键盘">键盘</h3> <div class="paragraph"> <p>通过 <code>kdb:[键位+键位+键位]</code> 的语法使用键盘符号特性。</p> </div> <div class="admonitionblock important"> <table> <tr> <td class="icon"> <i class="fa icon-important" title="Important"></i> </td> <td class="content"> 在 <code>AsciiDoctor</code> 中, 你需要在文档前标记 <code>:experimental:</code> 才能使用键盘符号特性。 </td> </tr> </table> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>kbd:[Ctrl+T] kbd:[Command+Options+Control+T] kbd:[⌘+N]</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 40. result</div> <div class="content"> <div class="paragraph"> <p><span class="keyseq"><kbd>Ctrl</kbd>+<kbd>T</kbd></span></p> </div> <div class="paragraph"> <p><span class="keyseq"><kbd>Command</kbd>+<kbd>Options</kbd>+<kbd>Control</kbd>+<kbd>T</kbd></span></p> </div> <div class="paragraph"> <p><span class="keyseq"><kbd>⌘</kbd>+<kbd>N</kbd></span></p> </div> </div> </div> </div> <div class="sect2"> <h3 id="_导入">导入</h3> <div class="paragraph"> <p>通过 <code>include::文档路径[选项]</code> 语法来包含文件,其中选项可以为空</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>include::../somedir/somefile.txt[] include::../somedir/somefile.txt[tabsize=2]</code></pre> </div> </div> <div class="paragraph"> <p>在代码块中引用文件:</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>.index.adoc [source, asciidoc] .... include::./index.adoc[lines=1..5] ....</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 41. result</div> <div class="content"> <div class="listingblock"> <div class="title">index.adoc</div> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>:article: AsciiDoc 指引 :title: {article} :author: Elias Abel :mail: admin@meniny.cn :home: /Users/Meniny/Projects/Github/Meniny.github.io/</code></pre> </div> </div> </div> </div> </div> <div class="sect2"> <h3 id="_脚注">脚注</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="asciidoc"><span></span>一些文字。footnote:[示例脚注1.] 一些文字。footnoteref:[tag,示例脚注2.] 一些文字。footnoteref:[tag]</code></pre> </div> </div> <div class="exampleblock"> <div class="title">Example 42. result</div> <div class="content"> <div class="paragraph"> <p>一些文字。<sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</sup></p> </div> <div class="paragraph"> <p>一些文字。<sup class="footnote" id="_footnote_tag">[<a id="_footnoteref_2" class="footnote" href="#_footnote_2" title="View footnote.">2</a>]</sup></p> </div> <div class="paragraph"> <p>一些文字。<sup class="footnoteref">[<a class="footnote" href="#_footnote_2" title="View footnote.">2</a>]</sup></p> </div> </div> </div> </div> </div> </div> <div class="sect1"> <h2 id="_工具">工具</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_asciidocfx">AsciidocFX</h3> <div class="paragraph"> <p><a href="https://github.com/asciidocfx/AsciidocFX"><code>AsciidocFX</code></a> 是一款开源 GUI 编辑器。</p> </div> <div class="imageblock"> <div class="content"> <img src="https://github.com/asciidocfx/AsciidocFX/raw/master/images/asciidocfx.png" alt="asciidocfx"> </div> <div class="title">Figure 2. AsciidocFX</div> </div> </div> <div class="sect2"> <h3 id="_atom">Atom</h3> <div class="paragraph"> <p>来自 Github 的 <a href="https://atom.io/"><code>Atom</code></a>, 需要额外安装插件。</p> </div> <div class="imageblock"> <div class="content"> <img src="https://github-atom-io-herokuapp-com.global.ssl.fastly.net/assets/index-ide-screenshot-26fbe099e63e84c16a2a690e9de2b923.png" alt="index ide screenshot 26fbe099e63e84c16a2a690e9de2b923"> </div> <div class="title">Figure 3. Atom</div> </div> </div> <div class="sect2"> <h3 id="_asciidoctor">AsciiDoctor</h3> <div class="paragraph"> <p><a href="https://asciidoctor.org"><code>AsciiDocor</code></a> 是一个使用 <code>Ruby</code> 实现的 <code>AsciiDoc</code> 转换工具。你可以通过 <code>gem install asciidoctor</code> 进行安装。</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="console"><span></span><span class="tok-go">asciidoctor MyDoc.adoc</span> <span class="tok-go">asciidoctor -a stylesheet golo.css -o MyHTML.html MyDoc.adoc</span></code></pre> </div> </div> <div class="imageblock"> <div class="content"> <img src="https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/screenshot.png" alt="screenshot"> </div> <div class="title">Figure 4. AsciiDoctor</div> </div> <div class="sect3"> <h4 id="_stylesheets">Stylesheets</h4> <div class="ulist"> <ul> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/asciidoctor.css">asciidoctor.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/asciidoctor.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/colony.css">colony.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/colony.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/foundation-lime.css">foundation-lime.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/foundation-lime.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/foundation-potion.css">foundation-potion.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/foundation-potion.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/foundation.css">foundation.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/foundation.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/github.css">github.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/github.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/golo.css">golo.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/golo.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/iconic.css">iconic.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/iconic.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/maker.css">maker.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/maker.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/readthedocs.css">readthedocs.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/readthedocs.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/riak.css">riak.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/riak.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/rocket-panda.css">rocket-panda.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/rocket-panda.html">(预览)</a></p> </li> <li> <p><a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/rubygems.css">rubygems.css</a>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc/stylesheets/previews/rubygems.html">(预览)</a></p> </li> </ul> </div> </div> </div> </div> </div> <div class="sect1"> <h2 id="_关于">关于</h2> <div class="sectionbody"> <div class="sidebarblock"> <div class="content"> <div class="ulist"> <ul> <li> <p><strong>标题</strong>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//asciidoc">《AsciiDoc 指引》</a></p> </li> <li> <p><strong>作者</strong>: <a href="/Users/Meniny/Projects/Github/Meniny.github.io//about/">Elias Abel</a></p> </li> <li> <p><strong>版本</strong>: 1.0.1</p> </li> <li> <p><strong>链接</strong>: /Users/Meniny/Projects/Github/Meniny.github.io//asciidoc</p> </li> </ul> </div> </div> </div> </div> </div> </div> <div id="footnotes"> <hr> <div class="footnote" id="_footnote_1"> <a href="#_footnoteref_1">1</a>. 示例脚注1. </div> <div class="footnote" id="_footnote_2"> <a href="#_footnoteref_2">2</a>. 示例脚注2. </div> </div> <div id="footer"> <div id="footer-text"> Last updated 2018-05-03 15:38:11 CST </div> </div> </body> </html>
Meniny/Meniny.github.io
docs/asciidoc/stylesheets/previews/foundation-lime.html
HTML
mit
91,925
[![Build Status](https://travis-ci.org/tradewave/tradewave-python.svg?branch=master)](https://travis-ci.org/tradewave/tradewave-python) [![Coverage Status](https://coveralls.io/repos/tradewave/tradewave-python/badge.png?branch=master)](https://coveralls.io/r/tradewave/tradewave-python?branch=master) [![Code Quality](https://scrutinizer-ci.com/g/tradewave/tradewave-python/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/tradewave/tradewave-python/?branch=master) [![Requirements Status](https://requires.io/github/tradewave/tradewave-python/requirements.png?branch=master)](https://requires.io/github/tradewave/tradewave-python/requirements/?branch=master) # Tradewave Python interface to the Tradewave API ## Introduction This library provides a pure Python interface for the [Tradewave API](https://tradewave.net/developers/). It works with Python versions from 2.6 to 3.4, PyPy is supported. ## Installation ## Usage ## License
tradewave/tradewave-python
README.md
Markdown
mit
957
MiniPos::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise an error on page load if there are pending migrations config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true config.action_mailer.default_url_options = { host: 'localhost', port: '3000' } config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: "smtp.gmail.com", port: 587, domain: "mail.google.com", authentication: "login", enable_starttls_auto: true, user_name: ENV["GMAIL_USERNAME"], password: ENV["GMAIL_PASSWORD"] } end
tolerantx/MiniPOS
config/environments/development.rb
Ruby
mit
1,574
var raf = require('raf'); var createCaption = require('vendors/caption'); var glslify = require('glslify'); var windowSize = new THREE.Vector2(window.innerWidth, window.innerHeight); var SwapRenderer = require('vendors/swapRenderer'), swapRenderer; var velocityRenderer, pressureRenderer; var Solver = require('./fluid/solver'); var solver; var scene, camera, renderer; var object, id; var stats, wrapper; var mouse = new THREE.Vector2(-9999, -9999); var isAnimation = true; var orthShaderMaterial; var orthScene, orthCamera, orthPlane; var renderPlane, renderMaterial; var renderScene, renderCamera; var clock; var grid = { size : new THREE.Vector2(window.innerWidth/4, window.innerHeight/4), scale : 1 }; var time = { step : 1 }; var outputRenderer; function init(){ scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 1, 10000); camera.position.z = 200; renderer = new THREE.WebGLRenderer({alpha: true}); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); solver = Solver.make(grid, time, windowSize, renderer) outputRenderer = new SwapRenderer({ width : grid.size.width, height : grid.size.height, renderer : renderer }); setComponent(); raf(animate); } function setComponent(){ var title = 'Swap Rendering with the texture of random color'; var caption = 'Swap rendering with the texture of random color.'; var url = 'https://github.com/kenjiSpecial/webgl-sketch-dojo/tree/master/sketches/theme/swap-renderer/app00'; wrapper = createCaption(title, caption, url); wrapper.style.position = "absolute"; wrapper.style.top = '50px'; wrapper.style.left = '30px'; stats = new Stats(); stats.setMode( 0 ); // 0: fps, 1: ms, 2: mb // align top-left stats.domElement.style.position = 'absolute'; stats.domElement.style.bottom = '30px'; stats.domElement.style.left = '30px'; stats.domElement.style.zIndex= 9999; document.body.appendChild( stats.domElement ); } function animate() { /** --------------------- **/ renderScene = new THREE.Scene(); renderCamera = new THREE.OrthographicCamera( -window.innerWidth/2, window.innerWidth/2, -window.innerHeight/2, window.innerHeight/2, -10000, 10000 ); console.log(solver.density.output); renderMaterial = new THREE.ShaderMaterial({ depthTest : false, side : THREE.DoubleSide, uniforms : { "tDiffuse" : {type: "t", value: solver.velocity.output } }, vertexShader : glslify('./display/shader.vert'), fragmentShader : glslify('./display/shader.frag') }); renderPlane = new THREE.Mesh( new THREE.PlaneBufferGeometry(window.innerWidth, window.innerHeight), renderMaterial ); renderScene.add(renderPlane); clock = new THREE.Clock(); clock.start(); id = raf(loop); // } function loop(){ stats.begin(); var dt = clock.getDelta(); solver.step(mouse); renderer.render(renderScene, renderCamera); stats.end(); id=raf(loop); } window.addEventListener('click', function(ev){ // renderer.render(scene, camera, swapRenderer.target); }); window.addEventListener('keydown', function(ev){ if(ev.keyCode == 27){ if(isAnimation) raf.cancel(id); else id = raf(animate); isAnimation = !isAnimation; } }); window.addEventListener('mousemove', function(ev){ mouse.x = ev.clientX; mouse.y = ev.clientY; // swapRenderer.uniforms.uMouse.value = mouse; }); init();
kenjiSpecial/webgl-sketch-dojo
sketches/theme/fluid/app00temp01/app.js
JavaScript
mit
3,670
<?php $lang['profiler_database'] = 'DATABASE'; $lang['profiler_controller_info'] = 'CLASS/METHOD'; $lang['profiler_benchmarks'] = 'BENCHMARKS'; $lang['profiler_queries'] = 'QUERIES'; $lang['profiler_get_data'] = 'GET DATA'; $lang['profiler_post_data'] = 'POST DATA'; $lang['profiler_uri_string'] = 'URI STRING'; $lang['profiler_memory_usage'] = 'MEMORY USAGE'; $lang['profiler_config'] = ''; $lang['profiler_headers'] = ''; $lang['profiler_no_db'] = 'Il driver del database non &egrave; attualmente caricato'; $lang['profiler_no_queries'] = 'Nessuna query &egrave; stata eseguita'; $lang['profiler_no_post'] = 'Nessun POST esistente'; $lang['profiler_no_get'] = 'Nessun GET esistente'; $lang['profiler_no_uri'] = 'Nessun URI esistente'; $lang['profiler_no_memory'] = 'Utilizzo memoria non disponibile'; $lang['profiler_no_profiles'] = '';
srpurdy/SharpEdgeCMS
framework_2_2_3/language/it/profiler_lang.php
PHP
mit
839
~results.html- lib\phantomjs\phantomjs.exe lib/bambino.coffee ../../Volta.Web --auto-run --create-runner --runner-filename ~SpecRunner.html --specs-path specs --require-path lib --jasmine-path lib/jasmine --script-path lib/jasmine/jasmine-jquery.js --module-path ../../Volta.Web/scripts/underscore/underscore-config.js --output html --output-filename ~results pause
mikeobrien/volta
src/Volta.Tests/Client/run-tests.cmd
Batchfile
mit
369
--- layout: post theme: UbuntuMono title: Scala excerpt: "" modified: 2018-05-03T11:51:25-04:00 categories: articles tags: [Scala, Java] image: vendor: twitter feature: /media/Da_wGJhW4AIaSxO.jpg:large credit: National Geographic creditlink: https://twitter.com/NatGeoPhotos/status/986270834439393280 comments: true share: true references: - title: "Why Scala?" url: https://www.lightbend.com/blog/why-scala --- * TOC {:toc} https://www.scala-lang.org/ https://www.scala-sbt.org/index.html https://marketplace.visualstudio.com/items?itemName=dragos.scala-lsp ## About Typesafe [Typesafe][scala-creator-launches-typesafe], the Scala company, provides the most scalable software platform designed for the computing architectures of the future -- multicore, parallel and cloud applications. It does this through Scala, the 100 percent Java-compatible programming language created by Typesafe co-founder and CEO Martin Odersky for modern computing architectures. The company's Typesafe Stack provides a Scala runtime and Akka middleware solution with tools to accelerate Scala development. Typesafe provides subscription support, training and services for organizations ready to bet their software architecture on Scala. Typesafe is backed by Greylock Partners and headquartered in Cambridge, Mass. 现已改名为 [Lightbend](https://www.lightbend.com/blog/typesafe-changes-name-to-lightbend) Visit: https://www.lightbend.com/ ## 本系列学习文章 我们依照 Scala 的父亲 [Martin Odersky](https://www.scala-lang.org/old/node/8610) 先生给出的级别来循序渐进地学习 Scala 这门语言。 Level A1: Beginning application programmer * Java-like statements and expressions: standard operators, method calls, conditionals, loops, try/catch * class, object, def, val, var, import, package * Infix notation for method calls * Simple closures * Collections with map, filter, etc * for-expressions ## Vs. Kotlin https://www.codementor.io/jessicathornsby/kotlin-vs-scala-what-should-i-choose-instead-of-java-bwn9axvr8 https://superkotlin.com/kotlin-vs-scala/ [scala-creator-launches-typesafe]:http://www.marketwired.com/press-release/scala-creator-launches-typesafe-commercialize-modern-application-platform-multicore-1513767.htm
anypossiblew/tiven.wang
_posts/articles/java/scala/2018-05-03-scala.md
Markdown
mit
2,273
using System; using System.Reflection; namespace Eminent.CodeGenerator { /// <summary> /// Factory class to create objects exposing IRemoteInterface /// </summary> public class RemoteLoaderFactory : MarshalByRefObject { private const BindingFlags bfi = BindingFlags.Instance | BindingFlags.Public | BindingFlags.CreateInstance; public RemoteLoaderFactory() {} /// <summary> Factory method to create an instance of the type whose name is specified, /// using the named assembly file and the constructor that best matches the specified parameters. </summary> /// <param name="assemblyFile"> The name of a file that contains an assembly where the type named typeName is sought. </param> /// <param name="typeName"> The name of the preferred type. </param> /// <param name="constructArgs"> An array of arguments that match in number, order, and type the parameters of the constructor to invoke, or null for default constructor. </param> /// <returns> The return value is the created object represented as ILiveInterface. </returns> public IRemoteInterface Create( string assemblyFile, string typeName, object[] constructArgs ) { return (IRemoteInterface) Activator.CreateInstanceFrom( assemblyFile, typeName, false, bfi, null, constructArgs, null, null).Unwrap(); } } }
EminentTechnology/CodeTorch
src/core/Eminent.CodeGenerator/RemoteLoaderFactory.cs
C#
mit
1,301
--- layout: blog title: "Erie Outing Club Blog" permalink: /blog --- <center><h1>My Posts</h1></center> # The Erie Outing Club Blog
erieoutingclub/erieoutingclub.github.io
blog.md
Markdown
mit
137
module.exports = function() { return { connectionString : "mongodb://127.0.0.1:27017/mongolayer" } }
simpleviewinc/mongolayer
testing/config.js
JavaScript
mit
108
#include "stdafx.h" #include "Events.h" #include "PoseEffect2PStartMan.h" #include "ItemBoxItems.h" #include "EmeraldSync.h" #include "CharacterSync.h" #include "AddHP.h" #include "AddRings.h" #include "Damage.h" #include "OnStageChange.h" #include "OnResult.h" #include "Random.h" #include "OnInput.h" void nethax::events::Initialize() { InitCharacterSync(); InitEmeraldSync(); InitItemBoxItems(); InitPoseEffect2PStartMan(); InitAddHP(); InitAddRings(); InitDamage(); InitOnStageChange(); InitOnResult(); InitOnInput(); random::init(); } void nethax::events::Deinitialize() { DeinitCharacterSync(); DeinitEmeraldSync(); DeinitItemBoxItems(); DeinitPoseEffect2PStartMan(); DeinitAddHP(); DeinitAddRings(); DeinitDamage(); DeinitOnStageChange(); DeinitOnResult(); DeinitOnInput(); random::deinit(); }
SonicFreak94/sa2-battle-network
sa2-battle-network/Events.cpp
C++
mit
827
module MiniRacer VERSION = "0.1.12" end
kamillamagna/NMF_Tool
vendor/bundle/gems/mini_racer-0.1.12/lib/mini_racer/version.rb
Ruby
mit
42
#region PDFsharp - A .NET library for processing PDF // // Authors: // Stefan Lange // // Copyright (c) 2005-2016 empira Software GmbH, Cologne Area (Germany) // // http://www.pdfsharp.com // http://sourceforge.net/projects/pdfsharp // // 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 and this permission notice 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 // THE AUTHORS OR COPYRIGHT HOLDERS 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. #endregion namespace PdfSharp.Pdf { /// <summary> /// Specifies what color model is used in a PDF document. /// </summary> public enum PdfColorMode { /// <summary> /// All color values are written as specified in the XColor objects they come from. /// </summary> Undefined, /// <summary> /// All colors are converted to RGB. /// </summary> Rgb, /// <summary> /// All colors are converted to CMYK. /// </summary> Cmyk, } }
jumpchain/jumpmaker
JumpMaker/PDFSharp/PdfSharp/Pdf/enums/PdfColorMode.cs
C#
mit
1,855
<!-- Creator : groff version 1.19.2 --> <!-- CreationDate: Thu Dec 26 09:17:31 2019 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta name="generator" content="groff -Thtml, see www.gnu.org"> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="Content-Style" content="text/css"> <style type="text/css"> p { margin-top: 0; margin-bottom: 0; } pre { margin-top: 0; margin-bottom: 0; } table { margin-top: 0; margin-bottom: 0; } </style> <title>DWEBP</title> </head> <body> <h1 align=center>DWEBP</h1> <a href="#NAME">NAME</a><br> <a href="#SYNOPSIS">SYNOPSIS</a><br> <a href="#DESCRIPTION">DESCRIPTION</a><br> <a href="#OPTIONS">OPTIONS</a><br> <a href="#BUGS">BUGS</a><br> <a href="#EXAMPLES">EXAMPLES</a><br> <a href="#AUTHORS">AUTHORS</a><br> <a href="#SEE ALSO">SEE ALSO</a><br> <hr> <a name="NAME"></a> <h2>NAME</h2> <p style="margin-left:11%; margin-top: 1em">dwebp &minus; decompress a WebP file to an image file</p> <a name="SYNOPSIS"></a> <h2>SYNOPSIS</h2> <p style="margin-left:11%; margin-top: 1em"><b>dwebp</b> [<i>options</i>] <i>input_file.webp</i></p> <a name="DESCRIPTION"></a> <h2>DESCRIPTION</h2> <p style="margin-left:11%; margin-top: 1em">This manual page documents the <b>dwebp</b> command.</p> <p style="margin-left:11%; margin-top: 1em"><b>dwebp</b> decompresses WebP files into PNG, PAM, PPM or PGM images.</p> <a name="OPTIONS"></a> <h2>OPTIONS</h2> <p style="margin-left:11%; margin-top: 1em">The basic options are:</p> <table width="100%" border=0 rules="none" frame="void" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="11%"></td> <td width="3%"> <p style="margin-top: 1em" valign="top"><b>&minus;h</b></p> </td> <td width="8%"></td> <td width="30%"> <p style="margin-top: 1em" valign="top">Print usage summary.</p> </td> <td width="48%"> </td> </table> <p style="margin-left:11%;"><b>&minus;version</b></p> <p style="margin-left:22%;">Print the version number (as major.minor.revision) and exit.</p> <p style="margin-left:11%;"><b>&minus;o</b> <i>string</i></p> <p style="margin-left:22%;">Specify the name of the output file (as PNG format by default). Using &quot;-&quot; as output name will direct output to &rsquo;stdout&rsquo;.</p> <p style="margin-left:11%;"><b>&minus;&minus;</b> <i>string</i></p> <p style="margin-left:22%;">Explicitly specify the input file. This option is useful if the input file starts with an &rsquo;&minus;&rsquo; for instance. This option must appear <b>last</b>. Any other options afterward will be ignored. If the input file is &quot;&minus;&quot;, the data will be read from <i>stdin</i> instead of a file.</p> <table width="100%" border=0 rules="none" frame="void" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="11%"></td> <td width="7%"> <p style="margin-top: 1em" valign="top"><b>&minus;bmp</b></p> </td> <td width="4%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Change the output format to uncompressed BMP.</p></td> <tr valign="top" align="left"> <td width="11%"></td> <td width="7%"> <p style="margin-top: 1em" valign="top"><b>&minus;tiff</b></p> </td> <td width="4%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Change the output format to uncompressed TIFF.</p></td> <tr valign="top" align="left"> <td width="11%"></td> <td width="7%"> <p style="margin-top: 1em" valign="top"><b>&minus;pam</b></p> </td> <td width="4%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Change the output format to PAM (retains alpha).</p></td> <tr valign="top" align="left"> <td width="11%"></td> <td width="7%"> <p style="margin-top: 1em" valign="top"><b>&minus;ppm</b></p> </td> <td width="4%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Change the output format to PPM (discards alpha).</p></td> <tr valign="top" align="left"> <td width="11%"></td> <td width="7%"> <p style="margin-top: 1em" valign="top"><b>&minus;pgm</b></p> </td> <td width="4%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Change the output format to PGM. The output consists of luma/chroma samples instead of RGB, using the IMC4 layout. This option is mainly for verification and debugging purposes.</p></td> <tr valign="top" align="left"> <td width="11%"></td> <td width="7%"> <p style="margin-top: 1em" valign="top"><b>&minus;yuv</b></p> </td> <td width="4%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Change the output format to raw YUV. The output consists of luma/chroma-U/chroma-V samples instead of RGB, saved sequentially as individual planes. This option is mainly for verification and debugging purposes.</p></td> </table> <p style="margin-left:11%;"><b>&minus;nofancy</b></p> <p style="margin-left:22%;">Don&rsquo;t use the fancy upscaler for YUV420. This may lead to jaggy edges (especially the red ones), but should be faster.</p> <p style="margin-left:11%;"><b>&minus;nofilter</b></p> <p style="margin-left:22%;">Don&rsquo;t use the in-loop filtering process even if it is required by the bitstream. This may produce visible blocks on the non-compliant output, but it will make the decoding faster.</p> <p style="margin-left:11%;"><b>&minus;dither</b> <i>strength</i></p> <p style="margin-left:22%;">Specify a dithering <b>strength</b> between 0 and 100. Dithering is a post-processing effect applied to chroma components in lossy compression. It helps by smoothing gradients and avoiding banding artifacts.</p> <p style="margin-left:11%;"><b>&minus;alpha_dither</b></p> <p style="margin-left:22%;">If the compressed file contains a transparency plane that was quantized during compression, this flag will allow dithering the reconstructed plane in order to generate smoother transparency gradients.</p> <p style="margin-left:11%;"><b>&minus;nodither</b></p> <p style="margin-left:22%;">Disable all dithering (default).</p> <table width="100%" border=0 rules="none" frame="void" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="11%"></td> <td width="4%"> <p style="margin-top: 1em" valign="top"><b>&minus;mt</b></p> </td> <td width="7%"></td> <td width="70%"> <p style="margin-top: 1em" valign="top">Use multi-threading for decoding, if possible.</p></td> <td width="8%"> </td> </table> <p style="margin-left:11%;"><b>&minus;crop</b> <i>x_position y_position width height</i></p> <p style="margin-left:22%;">Crop the decoded picture to a rectangle with top-left corner at coordinates (<b>x_position</b>, <b>y_position</b>) and size <b>width</b> x <b>height</b>. This cropping area must be fully contained within the source rectangle. The top-left corner will be snapped to even coordinates if needed. This option is meant to reduce the memory needed for cropping large images. Note: the cropping is applied <i>before</i> any scaling.</p> <table width="100%" border=0 rules="none" frame="void" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="11%"></td> <td width="7%"> <p style="margin-top: 1em" valign="top"><b>&minus;flip</b></p> </td> <td width="4%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Flip decoded image vertically (can be useful for OpenGL textures for instance).</p> </td> </table> <p style="margin-left:11%;"><b>&minus;resize</b>, <b>&minus;scale</b> <i>width height</i></p> <p style="margin-left:22%;">Rescale the decoded picture to dimension <b>width</b> x <b>height</b>. This option is mostly intended to reducing the memory needed to decode large images, when only a small version is needed (thumbnail, preview, etc.). Note: scaling is applied <i>after</i> cropping. If either (but not both) of the <b>width</b> or <b>height</b> parameters is 0, the value will be calculated preserving the aspect-ratio.</p> <table width="100%" border=0 rules="none" frame="void" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="11%"></td> <td width="9%"> <p style="margin-top: 1em" valign="top"><b>&minus;quiet</b></p> </td> <td width="2%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Do not print anything.</p> </td> <tr valign="top" align="left"> <td width="11%"></td> <td width="9%"> <p style="margin-top: 1em" valign="top"><b>&minus;v</b></p> </td> <td width="2%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Print extra information (decoding time in particular).</p></td> <tr valign="top" align="left"> <td width="11%"></td> <td width="9%"> <p style="margin-top: 1em" valign="top"><b>&minus;noasm</b></p> </td> <td width="2%"></td> <td width="78%"> <p style="margin-top: 1em" valign="top">Disable all assembly optimizations.</p></td> </table> <a name="BUGS"></a> <h2>BUGS</h2> <p style="margin-left:11%; margin-top: 1em">Please report all bugs to the issue tracker: https://bugs.chromium.org/p/webp <br> Patches welcome! See this page to get started: http://www.webmproject.org/code/contribute/submitting-patches/</p> <a name="EXAMPLES"></a> <h2>EXAMPLES</h2> <p style="margin-left:11%; margin-top: 1em">dwebp picture.webp &minus;o output.png <br> dwebp picture.webp &minus;ppm &minus;o output.ppm <br> dwebp &minus;o output.ppm &minus;&minus; &minus;&minus;&minus;picture.webp <br> cat picture.webp | dwebp &minus;o &minus; &minus;&minus; &minus; &gt; output.ppm</p> <a name="AUTHORS"></a> <h2>AUTHORS</h2> <p style="margin-left:11%; margin-top: 1em"><b>dwebp</b> is a part of libwebp and was written by the WebP team. <br> The latest source tree is available at https://chromium.googlesource.com/webm/libwebp</p> <p style="margin-left:11%; margin-top: 1em">This manual page was written by Pascal Massimino &lt;pascal.massimino@gmail.com&gt;, for the Debian project (and may be used by others).</p> <a name="SEE ALSO"></a> <h2>SEE ALSO</h2> <p style="margin-left:11%; margin-top: 1em"><b>cwebp</b>(1), <b>gif2webp</b>(1), <b>webpmux</b>(1) <br> Please refer to http://developers.google.com/speed/webp/ for additional information.</p> <p style="margin-left:11%; margin-top: 1em"><b>Output file format details</b> <br> PAM: http://netpbm.sourceforge.net/doc/pam.html <br> PGM: http://netpbm.sourceforge.net/doc/pgm.html <br> PPM: http://netpbm.sourceforge.net/doc/ppm.html <br> PNG: http://www.libpng.org/pub/png/png-sitemap.html#info</p> <hr> </body> </html>
scionoftech/webp-converter
bin/libwebp_osx/doc/dwebp.html
HTML
mit
10,497
<form action="#" method="get" class="form-horizontal"> <div class="row"> <div class="col-xs-10"> <div class="form-group"> <label class="col-xs-2 control-label" for="youtubeID" id="youtubeurl">{{youtubeurl}}:</label> <div class="col-xs-10"> <input class="form-control" id="youtubeID" name="youtubeID" type="text" /> <p class="help-block alert alert-info">{{youtubeID}}</p> </div> </div> </div> </div> <div class="row"> <div class="col-xs-10"> <div class="form-group"> <label class="col-xs-2 control-label" for="youtubeWidth">{{youtubeWidth}}:</label> <div class="col-xs-2"> <input class="form-control" id="youtubeWidth" name="youtubeWidth" type="text" value="640" /> </div> <label class="col-xs-2 control-label" for="youtubeHeight">{{youtubeHeight}}:</label> <div class="col-xs-2"> <input class="form-control" id="youtubeHeight" name="youtubeHeight" type="text" value="385"> </div> </div> </div> </div> <div class="row"> <div class="col-xs-12"> <div class="checkbox-inline"> <label> <input type="checkbox" id="youtubeAutoplay" name="youtubeAutoplay" value="1"> {{youtubeAutoplay}} </label> </div> <div class="checkbox-inline"> <label> <input type="checkbox" id="youtubeREL" name="youtubeREL" value="1"> {{youtubeREL}} </label> </div> <div class="checkbox-inline"> <label> <input type="checkbox" id="youtubeHD" name="youtubeHD" value="1"> {{youtubeHD}} </label> </div> <div class="checkbox-inline"> <label> <input type="checkbox" id="video" name="video" value="1"> HTML5 </label> </div> </div> </div> <div class="row"> <div class="col-xs-11"> <div class="col-xs-9"> <div id="preview" class="thumbnail pull-left"></div> </div> <div class="col-xs-3"> <button id="insert-btn" class="btn btn-primary btn-lg btn-block" type="button">Insert</button> </div> </div> </div> </form>
dungphi/DATN
tinymce/plugins/youtube/view/forms.html
HTML
mit
2,602
## Bölüm 2
onokumus/kitap
bolum02.md
Markdown
mit
13
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="x-ua-compatible" content="IE=edge" /> <meta name="format-detection" content="telephone=no" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="search" content="algolia" /> <meta name="use.ic" content="no" /> <meta name="tocstandalone" content="no" /> <link rel="canonical" href="https://devcenter.bitrise.io/ja/steps-and-workflows/generic-workflow-recipes.html" /><meta property="og:url" content="https://devcenter.bitrise.io/ja/steps-and-workflows/generic-workflow-recipes.html" /> <meta name="theme" content="2" /> <meta name="search.placeholder" content="" /> <meta name="search.results" content="" /> <meta name="no.search.results" content="" /> <title>一般的なワークフローレシピ - Bitrise Docs</title><meta property="og:title" content="一般的なワークフローレシピ" /><meta property="og:locale" content="ja_JP" /><meta property="og:site_name" content="Bitrise Docs" /><meta property="og:image" content="https://devcenter.bitrise.io/favicon.ico" /><meta property="og:description" content="Bitrise is a Continuous Integration and Delivery (CI/CD) Platform as a Service (PaaS) with a main focus on mobile app development (iOS, Android, React Native, Flutter, and so on). It is a collection of tools and services to help you with the development and automation of your software projects." /> <link rel="stylesheet" type="text/css" href="../../css/docbook.css" /> <link rel="stylesheet" type="text/css" href="../../css/font-awesome.css" /> <link rel="stylesheet" type="text/css" href="../../css/roboto.font.css" /> <link rel="stylesheet" type="text/css" href="../../css/theme2.css?version=20220308" /> <link rel="stylesheet" type="text/css" href="../../css/theme2-colors.css?version=20220308" /> <link rel="stylesheet" type="text/css" href="../../css/content-theme2.css?version=20220308" /> <link rel="stylesheet" type="text/css" href="../../css/sm-core-css.css" /> <link rel="stylesheet" type="text/css" href="../../css/sm-simple.css" /> <link rel="stylesheet" type="text/css" href="../../css/style-print.css" /> <link rel="stylesheet" type="text/css" href="../../css/style-common.css" /> <link rel="stylesheet" type="text/css" href="../../css/html5.algoliasearch.css?version=20220308" /> <link rel="stylesheet" type="text/css" href="../../css/style-modern-tables.css" /> <link rel="stylesheet" type="text/css" href="../../css/graphical-lists.css" /> <link rel="stylesheet" type="text/css" href="../../css/layout-custom-style.css?version=20220308" /> <meta name="generator" content="Paligo" /> <link rel="prev" href="workflow-recipes-for-cross-platform-apps/-flutter--run-dart-analyzer.html" title="(Flutter) Run Dart Analyzer" /> <link rel="next" href="generic-workflow-recipes/-ios-android--send-build-status-to-slack.html" title="(iOS/Android) Send build status to Slack" /> <link rel="icon" href="/favicon.ico" type="image/x-icon" /> </head> <body class="theme2 fixed-toolbar colored-top page-toc current-toc-section-focus" data-spy="scroll" data-target=".section-nav-container" data-offset="100" data-link-prefix="../"> <header class="site-header"> <nav class="site-header-navbar navbar navbar-fixed-top"> <div class="navbar-container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".site-sidebar" aria-expanded="false" aria-controls="navbar"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button> <div id="logotype-container" class="pull-left"> <a class="navbar-brand" href="https://www.bitrise.io" target="_blank" rel="noopener"><img id="logotype-pageheader" src="../../css/image/corporate-logo.svg" alt="Corporate logotype" data-role="logotype" class="logo" /></a> </div> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="top-nav-menu sm sm-simple"> <li> <a href="https://support.bitrise.io/hc/en-us?utm_source=devcenter&amp;utm_medium=top_cta" class="external-top-nav-link" target="_blank">Go to Support</a> </li> <li> <a href="https://www.bitrise.io/contact?utm_source=website&amp;utm_medium=devcenter&amp;utm_campaign=contact" class="external-top-nav-link" target="_blank">Book a demo</a> </li> </ul> </div> </div> </nav> </header> <div class="site-body"> <div class="site-body-container"> <div class="site-body-row"> <aside class="site-sidebar"> <div class="site-sidebar-header"> <button type="button" class="navbar-toggle" aria-controls="nav-site-sidebar"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="https://www.bitrise.io" target="_blank" rel="noopener"><img id="logotype-pageheader" src= "../../css/image/corporate-logo.svg" alt="Corporate logotype" data-role="logotype" class="logo" /></a> </div> <ul class="toc nav nav-site-sidebar"> <li> <a href="../getting-started.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-9a2b4c43-179d-565a-f83c-6c5be7ea8e03" data-legacy-id="UUID-ba2dbb72-ce4f-b763-6e32-f60fc46f54e7" data-permalink="getting-started.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class= "glyphicon"></span> 入門</a> <ul> <li> <a href="../getting-started/migrating-to-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-84d717b2-29a0-3c37-bc73-674022db721b" data-legacy-id="UUID-9b9067bc-f8b8-279c-d25a-099cb3c7f3e6" data-permalink="getting-started/migrating-to-bitrise.html" data-topic-level="2" data-relative-prefix= "../" data-publication-date=""><span class="glyphicon"></span> Bitriseへの移行</a> <ul> <li> <a href="../getting-started/migrating-to-bitrise/migrating-from-jenkins-to-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-a94d0cf8-018a-53cb-6206-1da2bcc4fdf1" data-legacy-id="UUID-f1a2a395-0ecd-ca76-444d-367b22c8ad91" data-permalink= "getting-started/migrating-to-bitrise/migrating-from-jenkins-to-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">JenkinsからBitriseへの移行</a> </li> </ul> </li> <li> <a href="../getting-started/signing-up-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-545a2ebf-0220-d38a-26d6-a1627636e966" data-legacy-id="UUID-a1e20f66-0c9c-79b7-7936-9585028ae73c" data-permalink="getting-started/signing-up-for-bitrise.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Bitriseにサインアップする</a> <ul></ul> </li> <li> <a href="../getting-started/creating-your-first-workspace.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-workspaces-rel" data-origin-id="UUID-eba05717-4fe7-5ebc-64f9-e689bffff030" data-legacy-id="UUID-c54d4fa8-5398-1969-3724-e3d697d0b18e" data-permalink="getting-started/creating-your-first-workspace.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">最初のワークスペースの作成</a> </li> <li> <a href="../getting-started/adding-your-first-app.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-d0079852-0403-15f4-3828-c0205f0d21ce" data-legacy-id="UUID-c9904774-960e-0e41-1dcc-e17ebb7a9cc6" data-permalink="getting-started/adding-your-first-app.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">最初のアプリを追加する</a> </li> <li> <a href="../getting-started/getting-started-with-ios-apps.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-actions-testing taxonomy-platform-ios taxonomy-related-links-taxonomies-ios-rel" data-origin-id="UUID-f71aa52b-0097-a692-60ed-94b0e399d2a1" data-legacy-id= "UUID-19c1635c-1558-c3e1-f52a-720832ae2aa6" data-permalink="getting-started/getting-started-with-ios-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">iOSアプリ入門</a> <ul></ul> </li> <li> <a href="../getting-started/getting-started-with-android-apps.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-actions-testing taxonomy-platform-android taxonomy-related-links-taxonomies-android-rel original-topic original-topic" data-origin-id= "UUID-9ecfeed4-c9ce-dbec-45f0-6d7af933d514" data-legacy-id="UUID-1ee05462-efa0-7c7f-5923-a209af66031c" data-permalink="getting-started/getting-started-with-android-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Androidアプリ入門</a> <ul></ul> </li> <li> <a href="../getting-started/getting-started-with-react-native-apps.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-actions-testing taxonomy-platform-cross-platform original-topic original-topic" data-origin-id="UUID-68434c3f-aff3-9666-7817-728bf714b1c4" data-legacy-id= "UUID-890c4302-c957-2869-6808-da5e3e2ecdcb" data-permalink="getting-started/getting-started-with-react-native-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ReactNativeアプリの使用を開始する</a> <ul></ul> </li> <li> <a href="../getting-started/getting-started-with-flutter-apps.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-actions-testing taxonomy-platform-cross-platform original-topic original-topic" data-origin-id="UUID-6eb0b59c-d6d1-1c2f-93ab-3f9141b6213b" data-legacy-id= "UUID-9e965542-1915-7820-0f4f-540a23bcac5a" data-permalink="getting-started/getting-started-with-flutter-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Flutterアプリの使用を開始する</a> <ul></ul> </li> <li> <a href="../getting-started/getting-started-with-ionic-cordova-apps.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-actions-testing taxonomy-platform-cross-platform original-topic original-topic" data-origin-id="UUID-356bce7f-381d-aa65-4e51-f2d26a4ca4c2" data-legacy-id= "UUID-4db75d05-2100-84bd-8ee8-896ca1bbb34e" data-permalink="getting-started/getting-started-with-ionic-cordova-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Ionic / Cordovaアプリの使用を開始する</a> <ul></ul> </li> <li> <a href="../getting-started/getting-started-with-expo-apps.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-actions-testing taxonomy-platform-cross-platform original-topic original-topic" data-origin-id="UUID-f603ea52-367d-eea0-68c2-5d565c27a16b" data-legacy-id= "UUID-42ae15b5-fdbc-6ab8-4059-b53ebeaea46f" data-permalink="getting-started/getting-started-with-expo-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Expoアプリの使用を開始する</a> <ul></ul> </li> </ul> </li> <li> <a href="../infrastructure.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-3eab4c5e-529d-6c7d-833c-cb9969befbad" data-legacy-id="UUID-7f30c26d-f7df-1258-bbe9-78d286211d53" data-permalink="infrastructure.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class= "glyphicon"></span> インフラストラクチャー</a> <ul> <li> <a href="../infrastructure/build-machines.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-03e06c05-1450-1415-7613-b6ed7c04c079" data-legacy-id="UUID-7b37817f-7731-d1d2-5169-d877b622bdd2" data-permalink="infrastructure/build-machines.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> マシンを構築する</a> <ul> <li> <a href="../infrastructure/build-machines/configuring-your-network-to-access-our-build-machines.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-983fde2f-6b1c-3599-20b7-156fe731f12b" data-legacy-id="UUID-f4d6a932-da74-3244-29bb-6b70afaf7f63" data-permalink= "infrastructure/build-machines/configuring-your-network-to-access-our-build-machines.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドマシンにアクセスするためのネットワークの構成</a> </li> <li> <a href="../infrastructure/build-machines/storage-space-on-build-machines.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-53d69784-75b6-1df5-a99a-1a0cb43788b5" data-legacy-id="UUID-8d7834d2-e1a6-1aa6-ae09-7cdce19a8478" data-permalink="infrastructure/build-machines/storage-space-on-build-machines.html" data-topic-level= "3" data-relative-prefix="../../" data-publication-date="">ビルドマシンのストレージスペース</a> </li> <li> <a href="../infrastructure/build-machines/freeing-up-storage-space-on-build-machines.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-b07bf5c3-5e94-94ae-07f4-bd4872287215" data-legacy-id="UUID-92a05784-4888-ecb2-b314-19215667d699" data-permalink= "infrastructure/build-machines/freeing-up-storage-space-on-build-machines.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドマシンのストレージスペースを解放する</a> </li> <li> <a href="../infrastructure/build-machines/customizing-build-machines.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-0877efd2-d139-ee0a-b0bf-3d0ba1f8900a" data-legacy-id="UUID-7617f8b9-2f2a-1f21-27b8-20cdfb1e6bc6" data-permalink="infrastructure/build-machines/customizing-build-machines.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドマシンのカスタマイズ</a> </li> </ul> </li> <li> <a href="../infrastructure/build-stacks.html" hreflang="ja" class="topic-link section taxonomy-configuration-stacks taxonomy-related-links-taxonomies-stacks-rel original-topic original-topic" data-origin-id="UUID-d6a228ed-8c03-64f9-dd96-993adf80523b" data-legacy-id="UUID-312e1cf7-c9ba-7bc4-57f0-f6018e688116" data-permalink= "infrastructure/build-stacks.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> スタックを構築する</a> <ul> <li> <a href="../infrastructure/build-stacks/stack-update-policy.html" hreflang="ja" class="topic-link section taxonomy-configuration-stacks original-topic original-topic" data-origin-id="UUID-295ee35e-1f63-7adc-a05e-35490453f71b" data-legacy-id="UUID-4770071c-3ad4-304a-6dbc-0a1b408bc0e2" data-permalink= "infrastructure/build-stacks/stack-update-policy.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">スタック更新ポリシー</a> </li> <li> <a href="../infrastructure/build-stacks/stack-deprecation-and-removal-policy.html" hreflang="ja" class="topic-link section taxonomy-configuration-stacks" data-origin-id="UUID-5bac20c1-ade5-dca6-25f5-f54fc5ce7425" data-legacy-id="UUID-60ac6b6d-5fe5-d9d2-c650-c00f533da10d" data-permalink= "infrastructure/build-stacks/stack-deprecation-and-removal-policy.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">スタックの非推奨と削除のポリシー</a> </li> <li> <a href="../infrastructure/build-stacks/preinstalled-tools-on-bitrise-stacks.html" hreflang="ja" class="topic-link section taxonomy-configuration-stacks" data-origin-id="UUID-47c3c221-c9f4-7940-ef48-5ede8f6c626d" data-legacy-id="UUID-5abcfa09-d076-60c8-0a8a-e03c23f8fb55" data-permalink= "infrastructure/build-stacks/preinstalled-tools-on-bitrise-stacks.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitriseスタックにプレインストールされたツール</a> </li> <li> <a href="../infrastructure/build-stacks/the-android-linux-docker-environment.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-1a40baf9-7721-2b86-6115-0d13327bd3a4" data-legacy-id="UUID-98f81b04-a8ab-2e2e-75ef-7ae6bf17fe40" data-permalink= "infrastructure/build-stacks/the-android-linux-docker-environment.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Android / Linux / Docker環境</a> </li> <li> <a href="../infrastructure/build-stacks/managing-java-versions.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-0272d2fc-5d56-7f2c-e4c3-9da55fb22c8d" data-legacy-id="UUID-4cd528eb-a885-784f-bfa4-75a6fcbe97b3" data-permalink="infrastructure/build-stacks/managing-java-versions.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Javaバージョンの管理</a> </li> </ul> </li> <li> <a href="../infrastructure/code-security.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-7abef58e-ec4c-809d-54ac-61a591df4c51" data-legacy-id="UUID-b82b650e-e53e-1e8a-c588-dc37b67ae3e1" data-permalink="infrastructure/code-security.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">コードセキュリティ</a> <ul></ul> </li> <li> <a href="../infrastructure/customizable-enterprise-build-platforms.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-d3272c36-f9e9-0749-c1d9-7e40fe0b24bc" data-legacy-id="UUID-08878848-cb84-9df1-2d19-df312fdd6d04" data-permalink="infrastructure/customizable-enterprise-build-platforms.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">カスタマイズ可能なエンタープライズビルドプラットフォーム</a> <ul></ul> </li> <li> <a href="../infrastructure/using-your-own-docker-image.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-0ca8f98b-c25f-4ae9-7d48-1778af3ab9db" data-legacy-id="UUID-e4717876-4224-3632-f360-ebf17d8e5e90" data-permalink="infrastructure/using-your-own-docker-image.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">独自のDockerイメージを使用する</a> <ul></ul> </li> <li> <a href="../infrastructure/running-your-build-locally-in-docker.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-1c50574c-3c92-c29c-d531-19008eecca68" data-legacy-id="UUID-34a13218-f4c4-9696-b69a-3810d89bf8ef" data-permalink="infrastructure/running-your-build-locally-in-docker.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Dockerでローカルにビルドを実行する</a> <ul></ul> </li> </ul> </li> <li> <a href="../accounts.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-28ffb8a6-05b5-ddc0-a390-1d3e2d8f26b2" data-legacy-id="UUID-10060414-1163-d2be-0434-5350e8d697a1" data-permalink="accounts.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> アカウント</a> <ul> <li> <a href="../accounts/connecting-to-services.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-6e5ba70c-bdc9-4aaa-1b01-bd4a75f03a83" data-legacy-id="UUID-7b30fea4-0c65-ea17-9f13-310017dd36f8" data-permalink="accounts/connecting-to-services.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> サービスへの接続</a> <ul> <li> <a href="../accounts/connecting-to-services/connecting-your-github-gitlab-bitbucket-account-to-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-90a9b34b-1136-b823-ee94-99af39405c36" data-legacy-id="UUID-73acbb2a-384d-a9ec-d15d-6c0bb5a25970" data-permalink= "accounts/connecting-to-services/connecting-your-github-gitlab-bitbucket-account-to-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">GitHub / GitLab / BitbucketアカウントをBitriseに接続する</a> </li> <li> <a href="../accounts/connecting-to-services/connecting-self-hosted-gitlab-instances.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-c6504603-1afb-860b-ec65-37071bb15cd6" data-legacy-id="UUID-42b0f670-dea3-836a-4a05-a6cf37ca7b55" data-permalink= "accounts/connecting-to-services/connecting-self-hosted-gitlab-instances.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">セルフホストのGitLabインスタンスを接続する</a> </li> <li> <a href="../accounts/connecting-to-services/apple-services-connection.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-00110e6f-af8c-b0e8-156e-9ef423e3dab3" data-legacy-id="UUID-33b7a6d8-d765-56a8-6c46-87e5fba96f83" data-permalink= "accounts/connecting-to-services/apple-services-connection.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Appleサービス接続</a> </li> <li> <a href="../accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-9efbac46-99cc-7c73-250b-75a37c32783e" data-legacy-id="UUID-ec02efab-b151-f158-4120-ded409a0704f" data-permalink= "accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">APIキーを使用してAppleサービスに接続する</a> </li> <li> <a href="../accounts/connecting-to-services/connecting-to-an-apple-service-with-apple-id.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-26bcdf25-8daa-9c14-014d-f08ef9bac83f" data-legacy-id="UUID-9d7746cf-117c-c0e5-3e83-fb7f753c78fd" data-permalink= "accounts/connecting-to-services/connecting-to-an-apple-service-with-apple-id.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">AppleIDを使用してAppleサービスに接続する</a> </li> <li> <a href="../accounts/connecting-to-services/connecting-to-an-apple-service-with-step-inputs.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-0a53901c-7750-76e6-d4b6-c37b5b35ed17" data-legacy-id="UUID-50c5709a-dc82-305e-1806-83f446075516" data-permalink= "accounts/connecting-to-services/connecting-to-an-apple-service-with-step-inputs.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステップ入力でAppleサービスに接続する</a> </li> <li> <a href="../accounts/connecting-to-services/steps-requiring-apple-authentication.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-55861ef6-a689-7493-a090-16ee69f73ae5" data-legacy-id="UUID-1cb6ad34-6723-9215-cd4a-428eb2267d28" data-permalink= "accounts/connecting-to-services/steps-requiring-apple-authentication.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Apple認証が必要な手順</a> </li> </ul> </li> <li> <a href="../accounts/saml-sso-in-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-bca7875d-ba86-a5f9-a246-738204f83644" data-legacy-id="UUID-0c735250-ae6c-84a1-e00e-30ec068493f4" data-permalink="accounts/saml-sso-in-bitrise.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> BitriseでのSAMLSSO</a> <ul> <li> <a href="../accounts/saml-sso-in-bitrise/setting-up-google-sso-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-c4d5bf0b-e976-489a-8186-cfa441aae510" data-legacy-id="UUID-e952706d-347d-7d67-30fc-4f8b41121a73" data-permalink= "accounts/saml-sso-in-bitrise/setting-up-google-sso-for-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitrise用のGoogleSSOの設定</a> </li> <li> <a href="../accounts/saml-sso-in-bitrise/setting-up-ad-fs-sso-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-557b0daa-88db-9538-918b-611d6434d59d" data-legacy-id="UUID-e9924931-8dfa-3c50-5d35-b289dd34612f" data-permalink= "accounts/saml-sso-in-bitrise/setting-up-ad-fs-sso-for-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitrise用のADFSSSOの設定</a> </li> <li> <a href="../accounts/saml-sso-in-bitrise/setting-up-azure-ad-sso-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-216ae74a-9185-9547-8ca7-f77c3006b873" data-legacy-id="UUID-ee747bce-dc35-dffc-fe50-3b7253f19419" data-permalink= "accounts/saml-sso-in-bitrise/setting-up-azure-ad-sso-for-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitrise用のAzureADSSOのセットアップ</a> </li> <li> <a href="../accounts/saml-sso-in-bitrise/setting-up-auth0-sso-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-4b441cb7-8dd2-3589-705b-e23a800fd5e0" data-legacy-id="UUID-073f5008-8717-f256-e1b9-9ca79cf9dc39" data-permalink= "accounts/saml-sso-in-bitrise/setting-up-auth0-sso-for-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitrise用のAuth0SSOの設定</a> </li> <li> <a href="../accounts/saml-sso-in-bitrise/setting-up-idaptive-saml-sso-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-267a6d28-abf3-d722-b848-52ebc983c83a" data-legacy-id="UUID-3b0ca8cc-8749-2cdc-7c43-b314cffc9b7f" data-permalink= "accounts/saml-sso-in-bitrise/setting-up-idaptive-saml-sso-for-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitrise用のIdaptiveSAMLSSOのセットアップ</a> </li> <li> <a href="../accounts/saml-sso-in-bitrise/setting-up-okta-sso-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-e773a082-c1cf-dd22-4d98-0fe6ffd63c5f" data-legacy-id="UUID-646a304b-0651-c197-425e-b4d3c0a04c8f" data-permalink= "accounts/saml-sso-in-bitrise/setting-up-okta-sso-for-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitrise用のOktaSSOのセットアップ</a> </li> <li> <a href="../accounts/saml-sso-in-bitrise/setting-up-ping-identity-sso-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-3ff033de-eab6-30d7-cf01-6016fb4e0c87" data-legacy-id="UUID-d87403ae-48a8-e2a1-3d07-e8427a5fa9ee" data-permalink= "accounts/saml-sso-in-bitrise/setting-up-ping-identity-sso-for-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitrise用のPingIdentitySSOの設定</a> </li> <li> <a href="../accounts/saml-sso-in-bitrise/setting-up-onelogin-sso-for-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-92d5aa9a-09f2-05a4-c093-c7b0939b81ec" data-legacy-id="UUID-2147b512-8605-c973-ba55-170b30ac9515" data-permalink= "accounts/saml-sso-in-bitrise/setting-up-onelogin-sso-for-bitrise.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Bitrise用のOneLoginSSOのセットアップ</a> </li> </ul> </li> <li> <a href="../accounts/editing-your-profile-settings.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-5e0f29c7-1f97-6817-4b49-3d35767db39f" data-legacy-id="UUID-a0ea8cf6-db90-250c-a35e-f7e9a3c9adaf" data-permalink="accounts/editing-your-profile-settings.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">プロファイル設定の編集</a> <ul></ul> </li> <li> <a href="../accounts/resetting-your-password.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-d192d1df-da9e-ff21-8a58-4c2b4e55fa7d" data-legacy-id="UUID-d1170f5a-86b9-8d46-a5f8-b362671e62c7" data-permalink="accounts/resetting-your-password.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">パスワードのリセット</a> </li> <li> <a href="../accounts/two-factor-authentication.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-866a4f96-4583-8512-7fe7-f30e35d773bb" data-legacy-id="UUID-e0140fbf-cbf6-e155-d169-62eb247dfc19" data-permalink="accounts/two-factor-authentication.html" data-topic-level="2" data-relative-prefix="../" data-publication-date= "">二要素認証</a> <ul></ul> </li> <li> <a href="../accounts/personal-access-tokens.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-700aac93-033a-c35c-aa92-50c6508c19fa" data-legacy-id="UUID-1d13cbe0-9c39-4588-1cd2-e80d2e61350c" data-permalink="accounts/personal-access-tokens.html" data-topic-level="2" data-relative-prefix="../" data-publication-date= "">パーソナルアクセストークン</a> <ul></ul> </li> <li> <a href="../accounts/deleting-your-bitrise-account.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-7fc688db-e815-db86-5b75-3db0b85f3555" data-legacy-id="UUID-f9d14256-bdcd-cb82-ca20-ad2d8db79c2f" data-permalink="accounts/deleting-your-bitrise-account.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Bitriseアカウントを削除する</a> </li> </ul> </li> <li> <a href="../workspaces.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-workspaces-rel original-topic original-topic" data-origin-id="UUID-45bb61c5-c7f2-5871-ec0a-71f12394ef81" data-legacy-id="UUID-da6dd792-28d3-355b-3e62-d14e1df88f1c" data-permalink="workspaces.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> ワークスペース</a> <ul> <li> <a href="../workspaces/creating-workspaces.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-94274f32-1936-7a28-bd8d-ed56c00189c3" data-legacy-id="UUID-5f1d5b2e-dba6-e4a2-b021-0c606bf79d62" data-permalink="workspaces/creating-workspaces.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ワークスペースの作成</a> </li> <li> <a href="../workspaces/workspace-billing-and-invoicing.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-afa1dd04-2a80-3357-82ae-618a85e2f235" data-legacy-id="UUID-ad9fce4e-e747-f6fc-adb7-217042969efe" data-permalink="workspaces/workspace-billing-and-invoicing.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ワークスペースの請求と請求</a> <ul></ul> </li> <li> <a href="../workspaces/adding-other-users-to-workspaces.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-accounts-rel original-topic original-topic" data-origin-id="UUID-7a68f566-8e93-124c-439b-3f5c996d5fa7" data-legacy-id="UUID-d7d490da-a69a-d0f6-cb9f-9d71fa87e2bb" data-permalink= "workspaces/adding-other-users-to-workspaces.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">他のユーザーをワークスペースに追加する</a> <ul></ul> </li> <li> <a href="../workspaces/changing-the-owners-of-a-workspace.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-accounts-rel original-topic original-topic" data-origin-id="UUID-8ba812cb-8961-904d-7213-e05edffa575b" data-legacy-id="UUID-add07d66-0583-d53c-25be-81ffb9c2a371" data-permalink= "workspaces/changing-the-owners-of-a-workspace.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ワークスペースの所有者を変更する</a> </li> <li> <a href="../workspaces/workspace-faq.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-df9b3cdd-9336-287d-9030-6923df408c72" data-legacy-id="UUID-10223b8c-d323-c763-6e7e-8194e0c33a98" data-permalink="workspaces/workspace-faq.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ワークスペースに関するFAQ</a> </li> </ul> </li> <li> <a href="../apps.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-675eafcc-4ca9-1439-43d8-fa2abbec5513" data-legacy-id="UUID-dd2a8f8b-309e-2c28-d24e-b0a3eba4089f" data-permalink="apps.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> アプリ</a> <ul> <li> <a href="../apps/webhooks.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps taxonomy-related-links-taxonomies-trigger-rel original-topic original-topic" data-origin-id="UUID-5331ef8b-5840-9105-7763-81ca7b8525ac" data-legacy-id="UUID-248f4202-aeaa-df85-ea3b-6e942113291b" data-permalink="apps/webhooks.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> Webhook</a> <ul> <li> <a href="../apps/webhooks/adding-incoming-webhooks.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-a6eaea8e-c52c-28b3-540a-fd7678810798" data-legacy-id="UUID-4fcb3d20-c59c-b103-66f6-0189ab4ea872" data-permalink="apps/webhooks/adding-incoming-webhooks.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">着信Webhookの追加</a> </li> <li> <a href="../apps/webhooks/adding-a-github-webhook.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-f5f767f9-79c8-facf-eba8-4af37624924d" data-legacy-id="UUID-8d70d7b3-5483-8c27-0d17-214fd2a5696d" data-permalink="apps/webhooks/adding-a-github-webhook.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">GitHubWebhookの追加</a> </li> <li> <a href="../apps/webhooks/adding-a-gitlab-webhook.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-c10c83c9-4b2b-3772-e6bb-bbe94f3e80e2" data-legacy-id="UUID-02a75d6a-cdcb-a29e-a764-8b1de80841a1" data-permalink="apps/webhooks/adding-a-gitlab-webhook.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">GitlabWebhookの追加</a> </li> <li> <a href="../apps/webhooks/adding-a-bitbucket-webhook.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-8412e45f-b884-53e6-1c00-92650404a3c3" data-legacy-id="UUID-ede112b6-8609-4889-c265-bd35706e6011" data-permalink="apps/webhooks/adding-a-bitbucket-webhook.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">BitbucketWebhookを追加する</a> </li> <li> <a href="../apps/webhooks/adding-a-gogs-webhook.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-cb59d5d0-c554-e4ae-715c-14c9ff93b6b7" data-legacy-id="UUID-39497431-d7b5-d416-ede2-0a2418458bed" data-permalink="apps/webhooks/adding-a-gogs-webhook.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">GogsWebhookの追加</a> </li> <li> <a href="../apps/webhooks/adding-a-slack-webhook.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-5001d127-3897-d7d0-f03a-a7a6bd5423a9" data-legacy-id="UUID-d16b5a8f-6e37-f47b-6c8d-4501aa896602" data-permalink="apps/webhooks/adding-a-slack-webhook.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">SlackWebhookの追加</a> </li> <li> <a href="../apps/webhooks/adding-a-visual-studio-webhook.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-3837c77e-8098-a2a2-1872-e3dd8155642b" data-legacy-id="UUID-5c117d09-df29-55f7-3e2f-e21103f53fdb" data-permalink="apps/webhooks/adding-a-visual-studio-webhook.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Visual StudioWebhookの追加</a> </li> <li> <a href="../apps/webhooks/adding-an-assembla-webhook.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-965b0228-485f-608b-de15-e68b9e7b5faf" data-legacy-id="UUID-22b5e7bb-233d-a3e8-783d-2936e28d0035" data-permalink="apps/webhooks/adding-an-assembla-webhook.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">AssemblaWebhookの追加</a> </li> <li> <a href="../apps/webhooks/adding-a-deveo-webhook.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-f2850b49-0240-fa76-ac7c-c7126b940dd1" data-legacy-id="UUID-7b978561-02a0-78e3-7a48-05c16220c28d" data-permalink="apps/webhooks/adding-a-deveo-webhook.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">DeveoWebhookの追加</a> </li> <li> <a href="../apps/webhooks/adding-outgoing-webhooks.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-5c2b9338-918a-6e37-0bcf-c810acc60be6" data-legacy-id="UUID-b1f23513-7cba-b20b-550d-277ca13ac32d" data-permalink="apps/webhooks/adding-outgoing-webhooks.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">発信Webhookの追加</a> </li> </ul> </li> <li> <a href="../apps/configuring-the-repository-url-and-the-default-branch.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-b5902706-bb7c-f6d0-fee4-eff975bfccdc" data-legacy-id="UUID-a20822cb-314c-4407-6ff5-870e3b70a62c" data-permalink="apps/configuring-the-repository-url-and-the-default-branch.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">リポジトリのURLとデフォルトのブランチを設定する</a> <ul></ul> </li> <li> <a href="../apps/configuring-ssh-keys.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps" data-origin-id="UUID-579f7434-bcb0-3877-212f-df8bbec96b7c" data-legacy-id="UUID-477b75d3-5728-36e4-e48e-5484b40f8c40" data-permalink="apps/configuring-ssh-keys.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">SSHキーの構成</a> </li> <li> <a href="../apps/adding-team-members-to-an-app.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-d8d1b16d-0e6a-e08a-9949-af3b762614e4" data-legacy-id="UUID-2d67867f-e120-bacb-7c79-f1db292af049" data-permalink="apps/adding-team-members-to-an-app.html" data-topic-level= "2" data-relative-prefix="../" data-publication-date="">アプリへのチームメンバーの追加</a> <ul></ul> </li> <li> <a href="../apps/user-roles-on-app-teams.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-f2d36e34-20b0-22b7-8214-d75ca87322f6" data-legacy-id="UUID-1bd1363c-b921-320c-a34f-601147be01cd" data-permalink="apps/user-roles-on-app-teams.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">アプリチームでのユーザーの役割</a> <ul></ul> </li> <li> <a href="../apps/changing-the-owner-of-an-app.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-423552f8-7b5f-370e-2deb-03438f0c0303" data-legacy-id="UUID-c1830836-6a1b-d502-fe66-b1ce689bdc57" data-permalink="apps/changing-the-owner-of-an-app.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">アプリの所有者を変更する</a> <ul></ul> </li> <li> <a href="../apps/enabling-the-bitrise-support-user-for-your-app.html" hreflang="ja" class="topic-link section taxonomy-actions-troubleshooting taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-9f206309-7bea-860b-558c-97e4d7bb6c09" data-legacy-id="UUID-602ef5c8-641b-1c7d-7c6c-99934fddd540" data-permalink= "apps/enabling-the-bitrise-support-user-for-your-app.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">アプリのBitriseSupportユーザーを有効にする</a> </li> <li> <a href="../apps/apps-with-submodules-or-private-repo-dependencies.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-e9d90a45-3743-5c70-5890-451857d008cf" data-legacy-id="UUID-31d4342c-27d2-74b5-3132-b7f0b4e2eaac" data-permalink= "apps/apps-with-submodules-or-private-repo-dependencies.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">サブモジュールまたはプライベートリポジトリの依存関係を持つアプリ</a> <ul></ul> </li> <li> <a href="../apps/public-apps.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-d8ff76d0-d66b-4191-ef1e-fcf0b4f14e5e" data-legacy-id="UUID-d0c5e88d-9b78-113a-cd21-47ff87c98792" data-permalink="apps/public-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">公開アプリ</a> </li> <li> <a href="../apps/creating-white-label-app-versions.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-906f96f4-8f0d-4716-43a5-6c1a10d1ed85" data-legacy-id="UUID-56ee7172-ef31-676b-9dfa-20a9a01b5d65" data-permalink="apps/creating-white-label-app-versions.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ホワイトラベルアプリバージョンの作成</a> <ul></ul> </li> </ul> </li> <li> <a href="../steps-and-workflows.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml original-topic original-topic" data-origin-id="UUID-45f92eab-49aa-a0d2-6472-a2da060aee88" data-legacy-id="UUID-d4babe74-0174-93d4-3247-194da5073883" data-permalink="steps-and-workflows.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> 手順とワークフロー</a> <ul> <li> <a href="../steps-and-workflows/introduction-to-steps.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-4e72c2ab-b8a3-ad41-b32d-5e0c08db7a88" data-legacy-id="UUID-e49ab216-b55d-0243-0ea1-6da610e8fd08" data-permalink= "steps-and-workflows/introduction-to-steps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> ステップ</a> <ul> <li> <a href="../steps-and-workflows/introduction-to-steps/adding-steps-to-a-workflow.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-520f8b46-3247-b5e0-3138-b3033ab69d92" data-legacy-id="UUID-6c4bcc2e-683a-2a4f-8e80-25f7430aac2f" data-permalink= "steps-and-workflows/introduction-to-steps/adding-steps-to-a-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ワークフローへのステップの追加</a> </li> <li> <a href="../steps-and-workflows/introduction-to-steps/step-versions.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-f59797e7-f966-7727-3853-82bb40bba77f" data-legacy-id="UUID-8eb3d8a8-6d72-e2d8-1950-1908e6475656" data-permalink= "steps-and-workflows/introduction-to-steps/step-versions.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステップバージョン管理</a> </li> <li> <a href="../steps-and-workflows/introduction-to-steps/step-inputs.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps" data-origin-id="UUID-b0690127-a271-a392-b3e5-7e71daf207ba" data-legacy-id="UUID-402031a2-c547-0cfd-6f4f-ad509a09b313" data-permalink="steps-and-workflows/introduction-to-steps/step-inputs.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステップ入力</a> </li> <li> <a href="../steps-and-workflows/introduction-to-steps/skipping-steps.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-4f3c1c76-3d54-7e79-f543-525de22e6941" data-legacy-id="UUID-780cdf64-e416-ac4b-d589-71c9f628a958" data-permalink= "steps-and-workflows/introduction-to-steps/skipping-steps.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">手順をスキップする</a> </li> <li> <a href="../steps-and-workflows/introduction-to-steps/enabling-or-disabling-a-step-conditionally.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-2984dd3d-3e7e-7e53-2987-32fbfc5f0050" data-legacy-id="UUID-efb905e5-7a4d-9c19-80d9-213bd0d3a80a" data-permalink= "steps-and-workflows/introduction-to-steps/enabling-or-disabling-a-step-conditionally.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステップを条件付きで有効または無効にする</a> </li> <li> <a href="../steps-and-workflows/introduction-to-steps/setting-a-time-limit-for-steps.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-72c8d204-5d1c-6039-fb7f-2151c6e65c69" data-legacy-id="UUID-1008a236-83ae-9740-685b-535db113cb60" data-permalink= "steps-and-workflows/introduction-to-steps/setting-a-time-limit-for-steps.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステップの制限時間を設定する</a> </li> </ul> </li> <li> <a href="../steps-and-workflows/developing-your-own-bitrise-step.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-431581d4-f756-3167-7a10-13f70cd4dba4" data-legacy-id="UUID-19e4390c-ae3c-5d2c-2cce-80aed6acd7bf" data-permalink="steps-and-workflows/developing-your-own-bitrise-step.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> 独自のビットライズステップの開発</a> <ul> <li> <a href="../steps-and-workflows/developing-your-own-bitrise-step/developing-a-new-step.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-e67f6a64-56f0-20f4-4150-02ff566db8b7" data-legacy-id="UUID-bde734ed-ab81-6d56-4099-03e2f1f0aeac" data-permalink= "steps-and-workflows/developing-your-own-bitrise-step/developing-a-new-step.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">新しいステップの開発</a> </li> <li> <a href="../steps-and-workflows/developing-your-own-bitrise-step/sharing-steps-with-all-bitrise-users.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-68dd8146-6228-fa08-2f24-906f7c849313" data-legacy-id="UUID-3a777ba0-793b-f54c-9d76-1b8b2ab9e526" data-permalink= "steps-and-workflows/developing-your-own-bitrise-step/sharing-steps-with-all-bitrise-users.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">すべてのBitriseユーザーとステップを共有する</a> </li> <li> <a href="../steps-and-workflows/developing-your-own-bitrise-step/verified-steps.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-c66d6d34-8fb3-b9cb-38fb-aec1b0c97479" data-legacy-id="UUID-1f0b23cc-0e72-bde6-6f4e-587e83cba4a8" data-permalink= "steps-and-workflows/developing-your-own-bitrise-step/verified-steps.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">確認済みの手順</a> </li> <li> <a href="../steps-and-workflows/developing-your-own-bitrise-step/creating-your-own-bitrise-project-scanner.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-a34926b3-4944-74d2-3cd3-46a8df5881d8" data-legacy-id="UUID-ea834094-5aae-cc21-684e-6dfeffcb787d" data-permalink= "steps-and-workflows/developing-your-own-bitrise-step/creating-your-own-bitrise-project-scanner.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">独自のBitriseプロジェクトスキャナーの作成</a> </li> </ul> </li> <li> <a href="../steps-and-workflows/introduction-to-workflows.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml original-topic original-topic" data-origin-id="UUID-31bf6c77-1059-252e-fb0b-32941af36dd0" data-legacy-id="UUID-bc1fab84-f407-68e5-fa17-a784831d7007" data-permalink= "steps-and-workflows/introduction-to-workflows.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> ワークフロー</a> <ul> <li> <a href="../steps-and-workflows/introduction-to-workflows/default-workflows.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-ecad7fc7-429f-3659-a7fe-6eaeb453ac51" data-legacy-id="UUID-910f4654-1330-39c9-fa21-79b41cb2fbda" data-permalink= "steps-and-workflows/introduction-to-workflows/default-workflows.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">デフォルトのワークフロー</a> </li> <li> <a href="../steps-and-workflows/introduction-to-workflows/creating-a-workflow.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-65dc1d06-fcfe-b8f0-a78a-53b92d6f4a00" data-legacy-id="UUID-12da8fa4-1230-9623-8e3f-3e363e5e727a" data-permalink= "steps-and-workflows/introduction-to-workflows/creating-a-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ワークフローの作成</a> </li> <li> <a href="../steps-and-workflows/introduction-to-workflows/managing-workflows.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-b7677a8d-d8a3-a494-924c-2296184f7023" data-legacy-id="UUID-d0a02dbb-4a34-5ff2-5292-ac0f55bb66c7" data-permalink= "steps-and-workflows/introduction-to-workflows/managing-workflows.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ワークフローの管理</a> </li> <li> <a href="../steps-and-workflows/introduction-to-workflows/copying-workflows-from-one-app-to-another.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-3a2d360d-92eb-add6-2cae-e6f3c0298d2b" data-legacy-id="UUID-64c2cf60-ef2c-7a32-6cf0-188c4c9a04ee" data-permalink= "steps-and-workflows/introduction-to-workflows/copying-workflows-from-one-app-to-another.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">あるアプリから別のアプリへのワークフローのコピー</a> </li> </ul> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-27c020f9-d798-5865-6ed8-2ee30ee4fcc8" data-legacy-id="UUID-44e4634f-d103-fc7a-121a-d5181c5c8343" data-permalink="steps-and-workflows/workflow-recipes-for-android-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> Androidアプリのワークフローレシピ</a> <ul> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--deploy-to-visual-studio-app-center.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-883079d0-f3f4-3f6e-6455-00d2d2f2f4eb" data-legacy-id="UUID-0a3744bb-21f9-fcaa-8da3-248ba9a2f617" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--deploy-to-visual-studio-app-center.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Deploy to Visual Studio App Center</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--deploy-to-firebase-app-distribution.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-fcb0a2fa-917f-5fd3-7935-8b4f30ac75b6" data-legacy-id="UUID-959bcf6f-c379-a406-ca42-f5b68d641e66" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--deploy-to-firebase-app-distribution.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Deploy to Firebase App Distribution</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--deploy-to-google-play--internal,-alpha,-beta,-production-.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-d69b4448-289e-2ec5-002d-b3b613a4039a" data-legacy-id="UUID-9d49b2fc-9efc-3a1a-7b8a-fa64d7bbf457" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--deploy-to-google-play--internal,-alpha,-beta,-production-.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Deploy to Google Play (Internal, Alpha, Beta, Production)</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--deploy-to-bitrise-io.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-7adddc5d-d948-3100-436d-eda84c34e1ca" data-legacy-id="UUID-4b8497f5-c208-b068-cba6-8a58e1f24bc8" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--deploy-to-bitrise-io.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Deploy to Bitrise.io</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--example-ci-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-f5c5ffd2-f978-8b6f-478f-15c52c6583f7" data-legacy-id="UUID-7e23f3d6-0cbc-adcb-0386-d1888fecc77e" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--example-ci-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Example CI Workflow</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--example-nightly-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-9b4c2d3e-7686-2764-2303-6152472a5c16" data-legacy-id="UUID-9170d511-436b-31fd-2b51-2aad2c885209" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--example-nightly-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Example nightly Workflow</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--example-pull-request-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-1f77aec6-24f0-1d21-ca93-164af078c2f8" data-legacy-id="UUID-4b6a4e13-f574-12a0-cb55-c80d71ad15fa" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--example-pull-request-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Example pull request Workflow</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--run-instrumentation-tests-on-virtual-devices.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-46fda509-d40f-3f0e-d36f-01df4956564f" data-legacy-id="UUID-fdc51957-b261-27e1-81fe-fb143779458f" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--run-instrumentation-tests-on-virtual-devices.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Run instrumentation tests on virtual devices</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--example-release-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-4d8164cb-e18d-cf23-7a0a-29b2dada6726" data-legacy-id="UUID-3ed4a3e0-c485-ffb5-e823-9f2e64f99280" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--example-release-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Example release Workflow</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--run-lint.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-a1ec8025-b9e3-5c06-0733-73b8a2a41952" data-legacy-id="UUID-06762519-5778-7272-8b6c-f78846b61ca4" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--run-lint.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Run Lint</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/turn-on-gradle-build-profiling.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-dcdf1008-3782-4b10-a562-4b5904de7707" data-legacy-id="UUID-7ab4118b-fe11-d555-ea8f-4959c2836fcf" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/turn-on-gradle-build-profiling.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Turn on Gradle build profiling</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--run-unit-tests.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-4b6f0e68-d994-d1c2-eab1-ed3d03d47471" data-legacy-id="UUID-3c579a2c-91a0-7efa-c83b-09b56c542082" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--run-unit-tests.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Run unit tests</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-android-apps/-android--run-tests-using-the-emulator.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-b9726bc6-ffb8-937a-83b4-a54e23c670ff" data-legacy-id="UUID-c05dd4df-4709-1022-bc30-a421bb6357b7" data-permalink= "steps-and-workflows/workflow-recipes-for-android-apps/-android--run-tests-using-the-emulator.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Android) Run tests using the emulator</a> </li> </ul> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-095c2977-2548-824e-c84f-7ad9f6314704" data-legacy-id="UUID-ec5faa90-23eb-8899-b36a-f2af2a22bd54" data-permalink="steps-and-workflows/workflow-recipes-for-ios-apps.html" data-topic-level="2" data-relative-prefix= "../" data-publication-date=""><span class="glyphicon"></span> iOSアプリのワークフローレシピ</a> <ul> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--deploy-to-visual-studio-app-center.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-849db348-c6d4-9727-bd80-5b8f52987986" data-legacy-id="UUID-b413e321-d24e-56b5-0b49-9cedba975126" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--deploy-to-visual-studio-app-center.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Deploy to Visual Studio App Center</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--cache-cocoapods-dependencies.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-8c6c9c3f-95c1-0b70-256e-506edb1747f9" data-legacy-id="UUID-05b58448-d712-2e61-71ff-bcfa9741b73e" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--cache-cocoapods-dependencies.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Cache CocoaPods dependencies</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--deploy-to-app-store-connect---testflight.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-cfe6088b-c76d-28c8-d2b0-ef0dc9490265" data-legacy-id="UUID-f7ea2c6d-1189-2da4-511b-b9c801510656" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--deploy-to-app-store-connect---testflight.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Deploy to App Store Connect / TestFlight</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--example-ci-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-9830623e-bcb5-ef43-b930-bad41bf386e2" data-legacy-id="UUID-e1ff45fc-964e-a6c1-4e24-53eb0380d386" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--example-ci-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Example CI Workflow</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--deploy-to-bitrise-io.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-11ee0331-b9cb-c4c1-802a-e5a07a52188a" data-legacy-id="UUID-62ef8753-58c8-61de-92dd-4a7984aea81c" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--deploy-to-bitrise-io.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Deploy to bitrise.io</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--example-pull-request-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-64059077-f4a0-04f9-e61a-05a4a1452639" data-legacy-id="UUID-331c082e-8e00-7b8a-3fe9-85dc2e591568" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--example-pull-request-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Example pull request Workflow</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--deploy-to-firebase-app-distribution.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-e16efd58-2da0-11d8-3b87-77783e890018" data-legacy-id="UUID-8797f754-510c-e2d9-6264-8ff3ac71755e" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--deploy-to-firebase-app-distribution.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Deploy to Firebase App Distribution</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--example-nightly-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-67a95acd-479c-4963-f735-171278a6661d" data-legacy-id="UUID-fd5efbea-bd27-0c65-c6e0-587ccf7ec010" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--example-nightly-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Example nightly Workflow</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--run-tests-on-a-physical-device.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-f6c7f2b2-fd7e-6151-b499-9a675b7640cf" data-legacy-id="UUID-5d1a0796-2f6c-cce0-da34-4c1b8b0c56e8" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--run-tests-on-a-physical-device.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Run tests on a physical device</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--run-tests-on-a-simulator.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-244f401e-8aca-53f4-10da-104e1c016e48" data-legacy-id="UUID-0da81ecf-bd0e-a8b5-459d-978bfba50fc7" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--run-tests-on-a-simulator.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Run tests on a simulator</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--install-cocoapods-dependencies.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-96bff69d-7454-e504-5495-f09358ad5c6c" data-legacy-id="UUID-4ff5663b-43a9-8a10-45b0-606c865973f1" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--install-cocoapods-dependencies.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Install CocoaPods dependencies</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--install-carthage-dependencies.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-098a0349-83bf-4c3b-65af-0066202208da" data-legacy-id="UUID-3f80e917-f8f6-a75e-21e7-d7b3d6e45514" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--install-carthage-dependencies.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Install Carthage dependencies</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-ios-apps/-ios--example-release-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-9a3fd7b3-f005-e28e-2bd3-04a1cdca291b" data-legacy-id="UUID-80bc1d46-44cc-c14f-d353-e26ad9d04db1" data-permalink= "steps-and-workflows/workflow-recipes-for-ios-apps/-ios--example-release-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS) Example release Workflow</a> </li> </ul> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-cross-platform-apps.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-f4ed0e7e-27f7-4eb8-c2f5-81133289dd74" data-legacy-id="UUID-bd816f59-9a0a-0a0a-7b38-9a38ca866ccc" data-permalink="steps-and-workflows/workflow-recipes-for-cross-platform-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> クロスプラットフォームアプリのワークフローレシピ</a> <ul> <li> <a href="../steps-and-workflows/workflow-recipes-for-cross-platform-apps/-react-native--cache-dependencies--node_modules-.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-839de6c8-8bb2-1f2e-2462-3ed5a0429131" data-legacy-id="UUID-52459b20-f020-59cc-582d-47addabe15f4" data-permalink= "steps-and-workflows/workflow-recipes-for-cross-platform-apps/-react-native--cache-dependencies--node_modules-.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(React Native) Cache dependencies (node_modules)</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-cross-platform-apps/-react-native--expo--build-using-turtle-cli.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-b7cb73aa-01c7-a15c-b821-d3bd9461c203" data-legacy-id="UUID-c8b65940-6499-3a90-f941-77051fb90ae9" data-permalink= "steps-and-workflows/workflow-recipes-for-cross-platform-apps/-react-native--expo--build-using-turtle-cli.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(React Native) Expo: Build using Turtle CLI</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-cross-platform-apps/-react-native--run-tests.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-c7c24cd9-fb88-6ae2-68cc-207c7836d90f" data-legacy-id="UUID-25bdd052-97a6-f48d-76ac-e69518f18300" data-permalink= "steps-and-workflows/workflow-recipes-for-cross-platform-apps/-react-native--run-tests.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(React Native) Run tests</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-cross-platform-apps/-react-native--install-dependencies.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-666f2fdc-82af-24f4-c30a-b1ecefa9123c" data-legacy-id="UUID-9ab45570-f84c-31ad-520e-ed18a617555e" data-permalink= "steps-and-workflows/workflow-recipes-for-cross-platform-apps/-react-native--install-dependencies.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(React Native) Install dependencies</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-cross-platform-apps/-flutter--run-tests.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-79e5d24a-2395-cedd-0ae7-4cf87e937abb" data-legacy-id="UUID-4da65bc1-a943-df91-563f-80ea3611df2f" data-permalink= "steps-and-workflows/workflow-recipes-for-cross-platform-apps/-flutter--run-tests.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Flutter) Run tests</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-cross-platform-apps/-flutter--install-flutter-sdk.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-3620f76a-bd7a-c9c4-a5d0-eb2df497aa8d" data-legacy-id="UUID-f7fbeeed-0beb-b862-69b6-1561d77e0d35" data-permalink= "steps-and-workflows/workflow-recipes-for-cross-platform-apps/-flutter--install-flutter-sdk.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Flutter) Install Flutter SDK</a> </li> <li> <a href="../steps-and-workflows/workflow-recipes-for-cross-platform-apps/-flutter--run-dart-analyzer.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-1308579a-034d-c7e5-088c-fc5521ff93cb" data-legacy-id="UUID-16aa2345-0f32-95db-1948-25242e5b39ad" data-permalink= "steps-and-workflows/workflow-recipes-for-cross-platform-apps/-flutter--run-dart-analyzer.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(Flutter) Run Dart Analyzer</a> </li> </ul> </li> <li> <a href="../steps-and-workflows/generic-workflow-recipes.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-d56a5129-1646-2ed7-42db-09794018edd5" data-legacy-id="UUID-7a564da7-e804-140e-de7e-353c9a047054" data-permalink="steps-and-workflows/generic-workflow-recipes.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> 一般的なワークフローレシピ</a> <ul> <li> <a href="../steps-and-workflows/generic-workflow-recipes/-ios-android--send-build-status-to-slack.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-31b2afbb-35f8-65ac-c20c-f06ee06daf07" data-legacy-id="UUID-f2377e6e-08a7-27c0-6a9d-6925180f1a39" data-permalink= "steps-and-workflows/generic-workflow-recipes/-ios-android--send-build-status-to-slack.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS/Android) Send build status to Slack</a> </li> <li> <a href="../steps-and-workflows/generic-workflow-recipes/cloning-a-git-repository.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-4468473d-9be4-fae2-493c-102000ad652b" data-legacy-id="UUID-e3d0f8ae-377e-e704-a565-cc6a87bc7391" data-permalink="steps-and-workflows/generic-workflow-recipes/cloning-a-git-repository.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Cloning a Git repository</a> </li> <li> <a href="../steps-and-workflows/generic-workflow-recipes/shallow-clone-a-git-repository.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-873d8d4d-ea32-62b8-e273-b498f80af700" data-legacy-id="UUID-ae580d09-b83a-4ac3-cdbd-6a646263c20e" data-permalink= "steps-and-workflows/generic-workflow-recipes/shallow-clone-a-git-repository.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Shallow clone a Git repository</a> </li> <li> <a href="../steps-and-workflows/generic-workflow-recipes/example-workflow--create-gitflow-release-branch.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-1fd25694-6391-f4ad-ecde-4fec65b34f4c" data-legacy-id="UUID-99b2327a-cce8-367b-d019-235af3191398" data-permalink= "steps-and-workflows/generic-workflow-recipes/example-workflow--create-gitflow-release-branch.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Example Gitflow release branch Workflow</a> </li> <li> <a href="../steps-and-workflows/generic-workflow-recipes/-ios-android--send-qr-code-to-slack.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-616b377c-852b-e6ef-fb76-d527c331fc9d" data-legacy-id="UUID-646265c4-1d5f-10c5-2348-6951427624df" data-permalink= "steps-and-workflows/generic-workflow-recipes/-ios-android--send-qr-code-to-slack.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">(iOS/Android) Send QR code to Slack</a> </li> <li> <a href="../steps-and-workflows/generic-workflow-recipes/start--parallel--builds-from-the-workflow.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-374e7111-7853-4108-94a1-d0697d303d56" data-legacy-id="UUID-d1428e58-7488-2ead-3f36-fc786f7319a5" data-permalink= "steps-and-workflows/generic-workflow-recipes/start--parallel--builds-from-the-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Start builds from a parent Workflow</a> </li> <li> <a href="../steps-and-workflows/generic-workflow-recipes/make-caching-efficient-for-pull-request-builds.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-d76e8a50-f26c-478c-423b-a593ce642d73" data-legacy-id="UUID-c7691539-1145-9472-ef9d-4f9eac518768" data-permalink= "steps-and-workflows/generic-workflow-recipes/make-caching-efficient-for-pull-request-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Optimizing cache efficiency for pull request builds</a> </li> <li> <a href="../steps-and-workflows/generic-workflow-recipes/github-pull-request--send-the-build-qr-code.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-c70cffa4-0c74-182d-11fd-bff1a2fd5040" data-legacy-id="UUID-7ba9aa48-1123-0f1b-26e6-3046e3d21c38" data-permalink= "steps-and-workflows/generic-workflow-recipes/github-pull-request--send-the-build-qr-code.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">GitHub pull request: send the build QR code</a> </li> </ul> </li> </ul> </li> <li> <a href="../builds.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-d1227f29-9b5f-0237-ec0d-cf81c662d61e" data-legacy-id="UUID-0f130c27-ad82-ff42-a001-6b38d922476f" data-permalink="builds.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> ビルド</a> <ul> <li> <a href="../builds/configuring-build-settings.html" hreflang="ja" class="topic-link section taxonomy-actions-builds" data-origin-id="UUID-9664acae-1c6a-b44e-2fb6-8d2815834003" data-legacy-id="UUID-3b2060df-1350-eb76-98ca-d54288272689" data-permalink="builds/configuring-build-settings.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> ビルド設定の構成</a> <ul> <li> <a href="../builds/configuring-build-settings/setting-the-stack-for-your-builds.html" hreflang="ja" class="topic-link section taxonomy-configuration-stacks taxonomy-related-links-taxonomies-stacks-rel" data-origin-id="UUID-8c7a43db-c7da-ed14-f6d3-5f5f28685b31" data-legacy-id="UUID-8add719e-be31-79a0-c38c-83f3f80e553b" data-permalink= "builds/configuring-build-settings/setting-the-stack-for-your-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドのスタックを設定する</a> </li> <li> <a href="../builds/configuring-build-settings/managing-an-app-s-bitrise-yml-file.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-bitrise-yml taxonomy-related-links-taxonomies-bitrise-yml-rel original-topic original-topic" data-origin-id="UUID-fa61c122-0d5b-a9c2-1894-19c46053c2d3" data-legacy-id= "UUID-162a6e44-340e-720b-f934-9066f2d049bb" data-permalink="builds/configuring-build-settings/managing-an-app-s-bitrise-yml-file.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">アプリのbitrise.ymlファイルの管理</a> </li> <li> <a href="../builds/configuring-build-settings/editing-an-app-s-bitrise-yml-file.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml" data-origin-id="UUID-27994b5b-7eef-8e27-211c-3b8d5944ec64" data-legacy-id="UUID-b143bd44-8dd2-5150-9b34-b0f7c425cf50" data-permalink= "builds/configuring-build-settings/editing-an-app-s-bitrise-yml-file.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">アプリのbitrise.ymlファイルを編集する</a> </li> <li> <a href="../builds/configuring-build-settings/accessing-a-build-s-bitrise-yml-file.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-bitrise-yml" data-origin-id="UUID-ef139639-ec20-2648-6864-745661a48f54" data-legacy-id="UUID-0d36ae47-0c69-ae38-580e-0be4270615d9" data-permalink= "builds/configuring-build-settings/accessing-a-build-s-bitrise-yml-file.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドのbitrise.ymlファイルへのアクセス</a> </li> <li> <a href="../builds/configuring-build-settings/selective-builds.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-7ea21aeb-894c-2fbf-740c-855f7c44468f" data-legacy-id="UUID-463dbb1f-ea7d-6cb2-39ea-5cef8f1cc551" data-permalink= "builds/configuring-build-settings/selective-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">選択的ビルド</a> </li> <li> <a href="../builds/configuring-build-settings/rolling-builds.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-b37ee7d4-5345-d0eb-8a90-28a14a7147a0" data-legacy-id="UUID-053831d5-e75f-f2b3-ff34-64415e4496c4" data-permalink= "builds/configuring-build-settings/rolling-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ローリングビルド</a> </li> <li> <a href="../builds/configuring-build-settings/configuring-email-notifications.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-a99f035b-3782-57a3-f1cd-6b5fa90a7119" data-legacy-id="UUID-9c6bb39b-7420-fc75-be92-a74a73380c06" data-permalink= "builds/configuring-build-settings/configuring-email-notifications.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">電子メール通知の構成</a> </li> <li> <a href="../builds/configuring-build-settings/configuring-slack-integration.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-0b9ffab0-7e83-f821-f700-05800f3e04f4" data-legacy-id="UUID-1fc52417-ef2b-591d-4483-fe5737d1fc2e" data-permalink="builds/configuring-build-settings/configuring-slack-integration.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Slack統合の構成</a> </li> <li> <a href="../builds/configuring-build-settings/setting-your-git-credentials-on-build-machines.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-24466c62-468b-f760-5cba-57f411ef244b" data-legacy-id="UUID-13df7c4f-514b-bc57-5dfd-0aabcf524f17" data-permalink= "builds/configuring-build-settings/setting-your-git-credentials-on-build-machines.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドマシンでのGitクレデンシャルの設定</a> </li> <li> <a href="../builds/configuring-build-settings/reporting-the-build-status-to-your-git-hosting-provider.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-89a809e8-c5a5-931a-0cd0-2fad85a2e3d3" data-legacy-id="UUID-a8940fc6-f44f-3e23-7143-6e867f401e2b" data-permalink= "builds/configuring-build-settings/reporting-the-build-status-to-your-git-hosting-provider.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドステータスをGitホスティングプロバイダーに報告する</a> </li> </ul> </li> <li> <a href="../builds/starting-builds.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-bitrise-yml original-topic original-topic" data-origin-id="UUID-8e0ac4ce-7b16-a294-9ab2-4a313fbb1beb" data-legacy-id="UUID-7a5babee-e4ce-3cd1-a9d3-d6a584076e28" data-permalink="builds/starting-builds.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> ビルドの開始</a> <ul> <li> <a href="../builds/starting-builds/starting-builds-manually.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-related-links-taxonomies-trigger-rel original-topic original-topic" data-origin-id="UUID-15b65886-09d5-4911-92c5-737b131485e4" data-legacy-id="UUID-14db9d3c-937f-3575-9881-32c68b4b5c65" data-permalink= "builds/starting-builds/starting-builds-manually.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">手動でビルドを開始する</a> </li> <li> <a href="../builds/starting-builds/triggering-builds-automatically.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-trigger-rel" data-origin-id="UUID-552bb6f5-13fb-66cc-3fd9-fcb9e55f08ad" data-legacy-id="UUID-06923acf-f63d-2a1f-f6fb-5f1fd1a050a4" data-permalink= "builds/starting-builds/triggering-builds-automatically.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドを自動的にトリガーする</a> </li> <li> <a href="../builds/starting-builds/scheduling-builds.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-befcf35c-25d4-5439-7bb3-f259ab4e9c8e" data-legacy-id="UUID-6418e051-49d4-e466-88a7-dd1cdfa081ca" data-permalink="builds/starting-builds/scheduling-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドのスケジューリング</a> </li> <li> <a href="../builds/starting-builds/approving-pull-request-builds.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-f6704323-3520-bed6-b9d7-76e2941c8339" data-legacy-id="UUID-e60a6674-7b2c-1472-ebbe-69cd6acb09f6" data-permalink="builds/starting-builds/approving-pull-request-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">プルリクエストビルドの承認</a> </li> <li> <a href="../builds/starting-builds/using-the-trigger-map-to-trigger-builds.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-5132c5a7-c6f6-02f2-9e2c-352a6f85cf5e" data-legacy-id="UUID-bfc6dff0-5cba-ce7e-9d78-86bf4789e430" data-permalink= "builds/starting-builds/using-the-trigger-map-to-trigger-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">トリガーマップを使用してビルドをトリガーする</a> </li> <li> <a href="../builds/starting-builds/starting-parallel-builds-with-a-single-trigger.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-bitrise-yml taxonomy-related-links-taxonomies-trigger-rel original-topic original-topic" data-origin-id="UUID-0471dd25-5a86-78e4-ba04-30b3a15d213a" data-legacy-id= "UUID-0b1c49ab-c0a0-d9ee-aefb-753f6eb64877" data-permalink="builds/starting-builds/starting-parallel-builds-with-a-single-trigger.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">単一のトリガーで並列ビルドを開始する</a> </li> <li> <a href="../builds/starting-builds/skipping-a-given-commit-or-pull-request.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-1e25a28b-a398-ac68-258b-d551610aceff" data-legacy-id="UUID-11454234-4d3d-9d4e-c3e3-7b152ba41bc6" data-permalink= "builds/starting-builds/skipping-a-given-commit-or-pull-request.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">特定のコミットまたはプルリクエストをスキップする</a> </li> </ul> </li> <li> <a href="../builds/caching.html" hreflang="ja" class="topic-link section taxonomy-actions-builds original-topic original-topic" data-origin-id="UUID-d6b033d3-46c5-ccdb-ad09-0e32eecc58d1" data-legacy-id="UUID-cb391959-16f9-34a6-f25e-c212ab029a22" data-permalink="builds/caching.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> キャッシング</a> <ul> <li> <a href="../builds/caching/using-caching-in-your-builds.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-bd7ea83f-5029-5c9d-a1b8-49e0fee1ae58" data-legacy-id="UUID-159ec88a-cca1-9be6-b62d-9c7aae08008b" data-permalink="builds/caching/using-caching-in-your-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドでのキャッシュの使用</a> </li> <li> <a href="../builds/caching/caching-cocoapods.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-e63c69a5-3212-850e-e163-75d79a4b428c" data-legacy-id="UUID-deb6ce8a-8332-93e7-2667-fbd1f33f2511" data-permalink="builds/caching/caching-cocoapods.html" data-topic-level="3" data-relative-prefix= "../../" data-publication-date="">Cocoapodsのキャッシング</a> </li> <li> <a href="../builds/caching/caching-gradle.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-02d4b8d8-d505-fa9d-3894-f9c987bc5f65" data-legacy-id="UUID-bb248b31-7a4f-cd75-656e-6b0b1a277e71" data-permalink="builds/caching/caching-gradle.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">キャッシングGradle</a> </li> <li> <a href="../builds/caching/caching-maven.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-3a7cc027-74dc-7275-40a7-183b14b1a933" data-legacy-id="UUID-22b3d079-610a-beca-3be1-a3a202a6e1d2" data-permalink="builds/caching/caching-maven.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Mavenのキャッシュ</a> </li> <li> <a href="../builds/caching/caching-ruby-gems.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-8b9f4f15-0700-166a-bb13-74c14a2fd862" data-legacy-id="UUID-485cce15-2bee-a3a7-1990-b09fd4cfc03c" data-permalink="builds/caching/caching-ruby-gems.html" data-topic-level="3" data-relative-prefix= "../../" data-publication-date="">RubyGemsのキャッシュ</a> </li> <li> <a href="../builds/caching/caching-homebrew-installers.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-67134aea-b72d-eb67-6268-b71ae501455f" data-legacy-id="UUID-8b77b885-77d9-7c06-21d1-acf3fe60a206" data-permalink="builds/caching/caching-homebrew-installers.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">自作インストーラーのキャッシュ</a> </li> </ul> </li> <li> <a href="../builds/managing-build-files.html" hreflang="ja" class="topic-link section taxonomy-actions-builds original-topic original-topic" data-origin-id="UUID-349c1927-26cf-9a2f-bf23-21a934aa45c2" data-legacy-id="UUID-f2bd6af3-988a-4a09-1aea-232482fdd9ca" data-permalink="builds/managing-build-files.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> ビルドファイルの管理</a> <ul> <li> <a href="../builds/managing-build-files/uploading-files-for-your-builds.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-6b0e6ac6-9657-fd31-16cc-7ae85af61551" data-legacy-id="UUID-58c978da-5697-54b2-6656-bf8c92f19199" data-permalink="builds/managing-build-files/uploading-files-for-your-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルド用のファイルのアップロード</a> </li> <li> <a href="../builds/managing-build-files/using-files-in-your-builds.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-aa7247c0-e9ba-c44f-8e9a-2a9a2df6df86" data-legacy-id="UUID-e980fbbb-9dfa-bfa9-525b-ecded2eddc46" data-permalink="builds/managing-build-files/using-files-in-your-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドでのファイルの使用</a> </li> <li> <a href="../builds/managing-build-files/using-encrypted-files-in-your-builds.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-946a4987-2a3c-9576-2acb-50f457ff0703" data-legacy-id="UUID-29f2a9e8-90cb-e1b0-2c0e-83385a0f9e30" data-permalink="builds/managing-build-files/using-encrypted-files-in-your-builds.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドで暗号化されたファイルを使用する</a> </li> <li> <a href="../builds/managing-build-files/build-artifacts-online.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-9acbfd32-8157-4ce9-2fe4-67bdf8ef3507" data-legacy-id="UUID-943d6cfb-c906-d834-8046-3246b2bab582" data-permalink="builds/managing-build-files/build-artifacts-online.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">オンラインでアーティファクトを作成する</a> </li> </ul> </li> <li> <a href="../builds/environment-variables.html" hreflang="ja" class="topic-link section taxonomy-configuration-env-vars original-topic original-topic" data-origin-id="UUID-9ff79df6-9953-1bf5-76a5-852420b21ed4" data-legacy-id="UUID-9e1b5aee-d60f-441c-d75c-fc15814c2988" data-permalink="builds/environment-variables.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">環境変数</a> <ul></ul> </li> <li> <a href="../builds/secrets.html" hreflang="ja" class="topic-link section taxonomy-configuration-env-vars taxonomy-related-links-taxonomies-bitrise-yml-rel" data-origin-id="UUID-e6946697-1571-f957-a619-8973cd5cf399" data-legacy-id="UUID-61932413-6328-dfe6-b5f5-610ab2556ce2" data-permalink="builds/secrets.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">秘密</a> <ul></ul> </li> <li> <a href="../builds/build-statuses.html" hreflang="ja" class="topic-link section taxonomy-actions-builds" data-origin-id="UUID-1c01835f-ecc2-1079-16e8-7660fe017a91" data-legacy-id="UUID-071a5c49-837a-d7ed-e0bf-5989c6d309e3" data-permalink="builds/build-statuses.html" data-topic-level="2" data-relative-prefix="../" data-publication-date= "">ビルドステータス</a> </li> <li> <a href="../builds/installing-tools-during-a-build.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-stacks original-topic original-topic" data-origin-id="UUID-aec439b6-736b-333f-6dc0-4cdc46b621e2" data-legacy-id="UUID-b0a55b5f-81b0-8ae7-8900-aea4c94ccb54" data-permalink= "builds/installing-tools-during-a-build.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ビルド中のツールのインストール</a> <ul></ul> </li> <li> <a href="../builds/connecting-to-a-vpn-during-a-build.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-builds-rel original-topic original-topic" data-origin-id="UUID-21a2136d-0e93-1e81-6bd8-c39085d5a543" data-legacy-id="UUID-22f77fd6-d80c-b9b5-049d-128651fc6ac4" data-permalink= "builds/connecting-to-a-vpn-during-a-build.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ビルド中にVPNに接続する</a> <ul></ul> </li> <li> <a href="../builds/finding-a-specific-build.html" hreflang="ja" class="topic-link section taxonomy-actions-builds" data-origin-id="UUID-95336313-9e6d-d72e-1a4a-7fe9076f0948" data-legacy-id="UUID-2ca76374-67ac-f310-9efc-916708670a91" data-permalink="builds/finding-a-specific-build.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">特定のビルドを見つける</a> </li> <li> <a href="../builds/build-numbering-and-app-versioning.html" hreflang="ja" class="topic-link section taxonomy-actions-builds original-topic original-topic" data-origin-id="UUID-a7dc4565-2965-aae9-c388-af8889ffe1a3" data-legacy-id="UUID-9dab82c8-74b8-8912-944a-014aa4a2d58c" data-permalink="builds/build-numbering-and-app-versioning.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ビルドのナンバリングとアプリのバージョン管理</a> <ul></ul> </li> <li> <a href="../builds/build-data-and-troubleshooting.html" hreflang="ja" class="topic-link section taxonomy-actions-builds" data-origin-id="UUID-66c5bce9-ccd5-ebc0-2716-f22a20df3dc0" data-legacy-id="UUID-873efeb4-c257-e462-2dee-5673fb302fbf" data-permalink="builds/build-data-and-troubleshooting.html" data-topic-level="2" data-relative-prefix= "../" data-publication-date=""><span class="glyphicon"></span> ビルドデータとトラブルシューティング</a> <ul> <li> <a href="../builds/build-data-and-troubleshooting/build-logs.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-actions-troubleshooting original-topic original-topic" data-origin-id="UUID-8e2ac26a-22c2-ce48-bc28-c9188fcbef7b" data-legacy-id="UUID-ef0d34e9-df1b-58fa-a19c-51a608ed9eec" data-permalink= "builds/build-data-and-troubleshooting/build-logs.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ビルドログ</a> </li> <li> <a href="../builds/build-data-and-troubleshooting/remote-access.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-actions-troubleshooting original-topic original-topic" data-origin-id="UUID-c330b88b-5906-b45d-74fb-2e68d19e9d0b" data-legacy-id="UUID-ef4aab78-d42f-effa-116b-a2c3878abd27" data-permalink= "builds/build-data-and-troubleshooting/remote-access.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">リモートアクセス</a> </li> <li> <a href="../builds/build-data-and-troubleshooting/debugging-your-build-on-your-own-machine.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-96d78e2c-40c2-1d53-05ae-658018113300" data-legacy-id="UUID-92eaad46-609a-a5a5-dae2-c290ad6ebd16" data-permalink= "builds/build-data-and-troubleshooting/debugging-your-build-on-your-own-machine.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">自分のマシンでビルドをデバッグする</a> </li> <li> <a href="../builds/build-data-and-troubleshooting/bitrise-checks-on-github.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-actions-troubleshooting original-topic original-topic" data-origin-id="UUID-c2aca2c7-4d07-1b83-aacf-697303551f2d" data-legacy-id="UUID-34ed9662-c93a-cdfe-fdfb-d7ef82da6bc4" data-permalink="builds/build-data-and-troubleshooting/bitrise-checks-on-github.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">GitHubでのビットライズチェック</a> </li> <li> <a href="../builds/build-data-and-troubleshooting/monitoring-your-builds-with-meercode.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-5066f347-fd45-5f13-7a8c-ddf058ac7922" data-legacy-id="UUID-5f3c4cd9-71f1-e46b-deb3-1311862a5837" data-permalink= "builds/build-data-and-troubleshooting/monitoring-your-builds-with-meercode.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Meercodeを使用してビルドを監視する</a> </li> </ul> </li> </ul> </li> <li> <a href="../code-signing.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-related-links-taxonomies-code-signing-rel original-topic original-topic" data-origin-id="UUID-258c2c25-158e-51b1-0b6e-f739cbd5eb0f" data-legacy-id="UUID-f726801e-3495-e587-a213-7294d85e39cb" data-permalink="code-signing.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> コード署名</a> <ul> <li> <a href="../code-signing/android-code-signing.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-platform-android taxonomy-related-links-taxonomies-android-rel original-topic original-topic" data-origin-id="UUID-0ea7b738-1527-6a4d-687a-b3552b3fa0e2" data-legacy-id="UUID-474baabc-711f-55f8-3b37-837bdac01c8f" data-permalink="code-signing/android-code-signing.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> Androidコード署名</a> <ul> <li> <a href="../code-signing/android-code-signing/android-code-signing-using-the-android-sign-step.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-platform-android" data-origin-id="UUID-d00c628e-d72b-57d8-f8e6-c0b25e0053bb" data-legacy-id="UUID-52707ea4-64ad-aa87-e0d4-c8569bd519a5" data-permalink= "code-signing/android-code-signing/android-code-signing-using-the-android-sign-step.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Androidサインステップを使用したAndroidコード署名</a> </li> <li> <a href="../code-signing/android-code-signing/android-code-signing-with-android-studio.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-platform-android original-topic original-topic" data-origin-id="UUID-97a3dc89-365c-a4cc-ceb2-a33701d413ad" data-legacy-id="UUID-8c590be8-41ad-129e-86fd-259cc2ef3e53" data-permalink="code-signing/android-code-signing/android-code-signing-with-android-studio.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">AndroidStudioを使用したAndroidコード署名</a> </li> <li> <a href="../code-signing/android-code-signing/android-code-signing-in-gradle.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-platform-android original-topic original-topic" data-origin-id="UUID-a26fc278-b856-fd5b-b678-feee463f248e" data-legacy-id="UUID-c69ca0db-02d0-a770-e3be-9c6a471b2248" data-permalink="code-signing/android-code-signing/android-code-signing-in-gradle.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">GradleでのAndroidコード署名</a> </li> <li> <a href="../code-signing/android-code-signing/downloading-a-keystore-file.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing original-topic original-topic" data-origin-id="UUID-441b0774-edef-b033-7a01-c7f77b043c58" data-legacy-id="UUID-29c4cd7d-a8dd-e271-09e2-105b47d4f646" data-permalink= "code-signing/android-code-signing/downloading-a-keystore-file.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">キーストアファイルのダウンロード</a> </li> </ul> </li> <li> <a href="../code-signing/ios-code-signing.html" hreflang="ja" class="topic-link section taxonomy-platform-ios taxonomy-related-links-taxonomies-ios-rel original-topic original-topic" data-origin-id="UUID-95beece4-a703-8f4d-5793-ee34f765cb76" data-legacy-id="UUID-d36ce185-2cd0-000d-06d0-724ff68af5fb" data-permalink= "code-signing/ios-code-signing.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> iOSコード署名</a> <ul> <li> <a href="../code-signing/ios-code-signing/collecting-and-exporting-code-signing-files-with-codesigndoc.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-972cfe0e-c096-da27-7f07-e2b8bf426847" data-legacy-id="UUID-b0bb1c8c-5ed9-0d4c-a812-4521e1e5e365" data-permalink= "code-signing/ios-code-signing/collecting-and-exporting-code-signing-files-with-codesigndoc.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">codesigndocを使用したコード署名ファイルの収集とエクスポート</a> </li> <li> <a href="../code-signing/ios-code-signing/managing-ios-code-signing-files---automatic-provisioning.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-platform-ios original-topic original-topic" data-origin-id="UUID-5b2a76ce-6ef6-8e63-fba1-3dbb51a06921" data-legacy-id= "UUID-b3ccb26c-e693-c87d-3bbb-c80ed6e9620d" data-permalink="code-signing/ios-code-signing/managing-ios-code-signing-files---automatic-provisioning.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">iOSコード署名ファイルの管理-自動プロビジョニング</a> </li> <li> <a href="../code-signing/ios-code-signing/managing-ios-code-signing-files---manual-provisioning.html" hreflang="ja" class="topic-link section taxonomy-platform-ios original-topic original-topic" data-origin-id="UUID-3c74d4ea-423e-cb76-1c1a-aa2f44737a94" data-legacy-id="UUID-f285233a-ceb7-e79b-cf49-a4633a2bac26" data-permalink= "code-signing/ios-code-signing/managing-ios-code-signing-files---manual-provisioning.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">iOSコード署名ファイルの管理-手動プロビジョニング</a> </li> <li> <a href="../code-signing/ios-code-signing/creating-a-signed-ipa-for-xcode-projects.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-platform-ios original-topic original-topic" data-origin-id="UUID-39fbc767-f894-36b9-67c4-77255dcf2fed" data-legacy-id= "UUID-75a05aff-7687-7e6e-23c4-d7b867798f5b" data-permalink="code-signing/ios-code-signing/creating-a-signed-ipa-for-xcode-projects.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Xcodeプロジェクト用に署名されたIPAを作成する</a> </li> <li> <a href="../code-signing/ios-code-signing/signing-an-ipa-with-multiple-code-signing-identities.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying original-topic original-topic" data-origin-id="UUID-d3c66ba4-3ae2-a1e2-3a05-15adce30e2fc" data-legacy-id= "UUID-1d4f851c-156c-c625-0b70-8ea6c73aba5a" data-permalink="code-signing/ios-code-signing/signing-an-ipa-with-multiple-code-signing-identities.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">複数のコード署名IDを使用してIPAに署名する</a> </li> <li> <a href="../code-signing/ios-code-signing/ios-code-signing-for-ionic-and-cordova-projects.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-platform-cross-platform original-topic original-topic" data-origin-id="UUID-6ae15f90-c4f1-e899-dcf5-f25bf374bfa5" data-legacy-id= "UUID-6bd3c0a4-be9f-524e-a527-0d901ba2fee9" data-permalink="code-signing/ios-code-signing/ios-code-signing-for-ionic-and-cordova-projects.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">IonicおよびCordovaプロジェクトのiOSコード署名</a> </li> <li> <a href="../code-signing/ios-code-signing/protecting-your-code-signing-files.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-04c7cf5c-55ff-8552-6009-a76c5af7d334" data-legacy-id="UUID-7938a135-a086-dc7b-213a-fc2a082b3c60" data-permalink= "code-signing/ios-code-signing/protecting-your-code-signing-files.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">コード署名ファイルの保護</a> </li> <li> <a href="../code-signing/ios-code-signing/generating-ios-code-signing-files.html" hreflang="ja" class="topic-link section taxonomy-platform-ios original-topic original-topic" data-origin-id="UUID-5da9aa01-42ef-7197-5586-68cac312c5ec" data-legacy-id="UUID-e1a1bf3c-3b1b-ce04-a8ad-81aba1b06904" data-permalink= "code-signing/ios-code-signing/generating-ios-code-signing-files.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">iOSコード署名ファイルの生成</a> </li> <li> <a href="../code-signing/ios-code-signing/exporting-ios-code-signing-files-without-codesigndoc.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-04ee983e-4340-c63d-ed02-43de23cae41d" data-legacy-id="UUID-d94478a6-0e45-37b0-35ef-e1e5e4e6dbeb" data-permalink= "code-signing/ios-code-signing/exporting-ios-code-signing-files-without-codesigndoc.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">codesigndocを使用せずにiOSコード署名ファイルをエクスポートする</a> </li> <li> <a href="../code-signing/ios-code-signing/troubleshooting-ios-code-signing.html" hreflang="ja" class="topic-link section taxonomy-actions-code-signing taxonomy-actions-deploying taxonomy-actions-troubleshooting original-topic original-topic" data-origin-id="UUID-03a0d092-2594-d8cf-c2f2-1dc5fab0d47b" data-legacy-id= "UUID-5170a6a2-46af-4767-84bf-fb7bd3f0cdbc" data-permalink="code-signing/ios-code-signing/troubleshooting-ios-code-signing.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">iOSコード署名のトラブルシューティング</a> </li> </ul> </li> </ul> </li> <li> <a href="../testing.html" hreflang="ja" class="topic-link section taxonomy-actions-testing original-topic original-topic" data-origin-id="UUID-16c1dbdf-cbd3-6f01-1d2b-91d812c8ab4f" data-legacy-id="UUID-1050ded8-6ea2-c69c-2f86-fe19a1f32df6" data-permalink="testing.html" data-topic-level="1" data-relative-prefix="" data-publication-date= ""><span class="glyphicon"></span> テスト</a> <ul> <li> <a href="../testing/test-reports.html" hreflang="ja" class="topic-link section taxonomy-actions-testing taxonomy-actions-troubleshooting taxonomy-platform-android taxonomy-platform-cross-platform taxonomy-platform-ios original-topic original-topic" data-origin-id="UUID-42d03dc2-a21c-1daf-e851-a6c46adcde01" data-legacy-id= "UUID-23e122bc-41cd-fee5-7a24-e72b59503484" data-permalink="testing/test-reports.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">テストレポート</a> <ul></ul> </li> <li> <a href="../testing/exporting-to-test-reports-from-any-step.html" hreflang="ja" class="topic-link section taxonomy-actions-testing taxonomy-platform-cross-platform original-topic original-topic" data-origin-id="UUID-19746872-1371-1bf6-acf1-12d7663fae86" data-legacy-id="UUID-6a29fea7-ab01-01f6-252b-22bd962a8aa7" data-permalink= "testing/exporting-to-test-reports-from-any-step.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">任意のステップからのテストレポートへのエクスポート</a> <ul></ul> </li> <li> <a href="../testing/running-xcode-tests.html" hreflang="ja" class="topic-link section taxonomy-actions-testing taxonomy-platform-ios original-topic original-topic" data-origin-id="UUID-43229fb9-7af4-8829-c020-91c6fcdb768f" data-legacy-id="UUID-7e25ef4d-c72e-c389-acaa-88677328e973" data-permalink="testing/running-xcode-tests.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Xcodeテストの実行</a> <ul></ul> </li> <li> <a href="../testing/installing-an-ipa-file-from-the-public-install-page.html" hreflang="ja" class="topic-link section taxonomy-actions-testing taxonomy-platform-ios original-topic original-topic" data-origin-id="UUID-03a475d5-58a6-b62f-5d0f-8f92454f5491" data-legacy-id="UUID-b97e4c19-2e6a-79c3-618d-ebf4c5ab2b14" data-permalink= "testing/installing-an-ipa-file-from-the-public-install-page.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">パブリックインストールページからのipaファイルのインストール</a> <ul></ul> </li> <li> <a href="../testing/registering-a-test-device.html" hreflang="ja" class="topic-link section taxonomy-actions-testing original-topic original-topic" data-origin-id="UUID-4048bab6-2101-fc89-888f-14aefee6e7ef" data-legacy-id="UUID-d09298de-9395-6bce-d417-89bbc96290fa" data-permalink="testing/registering-a-test-device.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">テストデバイスの登録</a> <ul></ul> </li> <li> <a href="../testing/device-testing-for-ios.html" hreflang="ja" class="topic-link section taxonomy-actions-testing taxonomy-platform-ios original-topic original-topic" data-origin-id="UUID-a7dd930d-ded0-fb68-9c16-6556dad515c4" data-legacy-id="UUID-f4179a26-1ed4-717b-bd7a-cd897450b377" data-permalink="testing/device-testing-for-ios.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">iOSのデバイステスト</a> <ul></ul> </li> <li> <a href="../testing/android-unit-tests.html" hreflang="ja" class="topic-link section taxonomy-actions-testing taxonomy-platform-android original-topic original-topic" data-origin-id="UUID-766b3bd1-5c47-4d03-91e7-d30eac2eae8a" data-legacy-id="UUID-74a1e9d8-8e12-2ef0-c035-88033afb4d89" data-permalink="testing/android-unit-tests.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Androidユニットテスト</a> <ul></ul> </li> <li> <a href="../testing/device-testing-for-android.html" hreflang="ja" class="topic-link section taxonomy-actions-testing taxonomy-platform-android original-topic original-topic" data-origin-id="UUID-0900864b-58e4-f571-50a0-377a2624b836" data-legacy-id="UUID-48173269-ac2f-a467-640b-99fb997e5c6a" data-permalink= "testing/device-testing-for-android.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Androidのデバイステスト</a> <ul></ul> </li> <li> <a href="../testing/running-tests-in-the-visual-studio-app-center.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-294acb61-4f0c-baf1-9cb6-9a1c93dd9b27" data-legacy-id="UUID-7ee7bd8d-b5cb-8545-5e67-55237820e9f6" data-permalink="testing/running-tests-in-the-visual-studio-app-center.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Visual Studio AppCenterでのテストの実行</a> </li> <li> <a href="../testing/running-detox-tests-on-bitrise.html" hreflang="ja" class="topic-link section taxonomy-actions-testing taxonomy-platform-cross-platform original-topic original-topic" data-origin-id="UUID-aa43cb68-94fb-86be-470b-93c9eae82bc1" data-legacy-id="UUID-75f389f7-4f06-e719-1539-e1fa20f6a5b0" data-permalink= "testing/running-detox-tests-on-bitrise.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Bitriseでのデトックステストの実行</a> <ul></ul> </li> </ul> </li> <li> <a href="../deploying.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-5b1d4326-81f8-90a8-18bc-83bef25a8536" data-legacy-id="UUID-c37e7e5a-ec91-7264-8654-db4643771ba4" data-permalink="deploying.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class= "glyphicon"></span> 展開</a> <ul> <li> <a href="../deploying/android-deployment.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-android-rel original-topic original-topic" data-origin-id="UUID-ae57c4fd-3338-1749-3423-301d5554584f" data-legacy-id="UUID-23ceae1b-1528-ab36-db0a-f8496a2806eb" data-permalink="deploying/android-deployment.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> Androidの展開</a> <ul> <li> <a href="../deploying/android-deployment/deploying-android-apps-to-bitrise-and-google-play.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-5fce7c55-2d78-10fa-6980-7c8fbcdf1248" data-legacy-id="UUID-d5217e49-ec62-ca98-64b9-6ca7fa283799" data-permalink= "deploying/android-deployment/deploying-android-apps-to-bitrise-and-google-play.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">BitriseとGooglePlayへのAndroidアプリのデプロイ</a> </li> <li> <a href="../deploying/android-deployment/deploying-apps-to-huawei-appgallery.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-c4522aa2-80a6-36ca-f716-bf398931d09f" data-legacy-id="UUID-595ed037-9b50-9676-c4bd-8f42200619e2" data-permalink= "deploying/android-deployment/deploying-apps-to-huawei-appgallery.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">HuaweiAppGalleryへのアプリのデプロイ</a> </li> <li> <a href="../deploying/android-deployment/generate-and-deploy-multiple-flavor-apks-in-a-single-workflow.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-d856df0e-2c91-4328-af8d-c4cef99def94" data-legacy-id="UUID-30d567ce-12a8-87db-271a-b2823624f13c" data-permalink= "deploying/android-deployment/generate-and-deploy-multiple-flavor-apks-in-a-single-workflow.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">単一のワークフローで複数のフレーバーAPKを生成してデプロイする</a> </li> <li> <a href="../deploying/android-deployment/generating-and-deploying-android-app-bundles.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-bba05c8f-bc65-1e68-6d73-8d701a3ef7dc" data-legacy-id="UUID-daaf2f46-a4dd-2895-2f23-b1da44cce183" data-permalink= "deploying/android-deployment/generating-and-deploying-android-app-bundles.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Androidアプリバンドルの生成と展開</a> </li> <li> <a href="../deploying/android-deployment/exporting-a-universal-apk-from-an-aab.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-b2a83029-ee24-4016-f978-5b4531ce186a" data-legacy-id="UUID-f2fde620-ebaa-bb38-039a-adc8916818fa" data-permalink= "deploying/android-deployment/exporting-a-universal-apk-from-an-aab.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">AABからユニバーサルAPKをエクスポートする</a> </li> </ul> </li> <li> <a href="../deploying/ios-deployment.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-ios-rel original-topic original-topic" data-origin-id="UUID-f34cbdba-ea23-f773-be03-cf7e28638977" data-legacy-id="UUID-4b35ec31-4574-caad-19d1-42bc625d5e78" data-permalink="deploying/ios-deployment.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> iOSの展開</a> <ul> <li> <a href="../deploying/ios-deployment/deploying-an-ios-app-to-bitrise-io.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-b1b5b411-2188-cc3e-5857-6749bc2e12f7" data-legacy-id="UUID-390316a2-5029-5007-f081-eff288c0c0f6" data-permalink= "deploying/ios-deployment/deploying-an-ios-app-to-bitrise-io.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">iOSアプリをBitrise.ioにデプロイする</a> </li> <li> <a href="../deploying/ios-deployment/deploying-an-ios-app-for-external-testing.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-ios-rel original-topic original-topic" data-origin-id="UUID-0c413c05-b60a-9eb0-9e06-8fbcdd6c9cc3" data-legacy-id="UUID-db34e0a9-53cd-0fba-7c0f-316715eb8086" data-permalink= "deploying/ios-deployment/deploying-an-ios-app-for-external-testing.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">外部テスト用のiOSアプリのデプロイ</a> </li> <li> <a href="../deploying/ios-deployment/deploying-an-ios-app-to-app-store-connect.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-code-signing-rel taxonomy-related-links-taxonomies-ios-rel original-topic original-topic" data-origin-id="UUID-da669359-c4bb-5049-ab4a-ad56926dab44" data-legacy-id= "UUID-302df510-d0ea-c62b-5069-02eebd5c9272" data-permalink="deploying/ios-deployment/deploying-an-ios-app-to-app-store-connect.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">iOSアプリをiTunesConnectにデプロイする</a> </li> <li> <a href="../deploying/ios-deployment/deploying-an-ios-app-for-simulators.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-b8b67f37-232b-a487-cd68-9401862fdb2e" data-legacy-id="UUID-1bfef8bc-f675-2ea8-9b7b-865afbc61f80" data-permalink= "deploying/ios-deployment/deploying-an-ios-app-for-simulators.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">シミュレーター用のiOSアプリのデプロイ</a> </li> </ul> </li> <li> <a href="../deploying/deploying-with-ship.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-3c9287e4-770b-f853-30dd-a1cd1849416c" data-legacy-id="UUID-3fd86123-186c-7ff6-66ba-3ac9199b542f" data-permalink="deploying/deploying-with-ship.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> 船での展開</a> <ul> <li> <a href="../deploying/deploying-with-ship/getting-started-with-ship.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-22775316-af19-31b1-bf64-2a4ad579bed5" data-legacy-id="UUID-41ce3912-3860-89de-c3d9-c93f3893e76c" data-permalink="deploying/deploying-with-ship/getting-started-with-ship.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Shipの使用を開始する</a> </li> <li> <a href="../deploying/deploying-with-ship/configuring-an-app-for-publishing-with-ship.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-9d206adc-1e0c-f2b7-76d8-d53636d99b8f" data-legacy-id="UUID-3b6a3b93-7b6d-b1b4-500c-ee336e649036" data-permalink= "deploying/deploying-with-ship/configuring-an-app-for-publishing-with-ship.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Shipで公開するためのアプリの構成</a> </li> <li> <a href="../deploying/deploying-with-ship/installing-an-app-on-a-test-device-with-ship.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-f8f70801-5a37-b1ba-f3c4-a57e7b7357de" data-legacy-id="UUID-d90d264d-2df6-a7e8-84c1-9ebcb7fc776c" data-permalink= "deploying/deploying-with-ship/installing-an-app-on-a-test-device-with-ship.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Shipを使用してテストデバイスにアプリをインストールする</a> </li> <li> <a href="../deploying/deploying-with-ship/publishing-an-app-to-a-store-with-ship.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-f6c01f12-dcb7-5a3a-e005-ff893d474de9" data-legacy-id="UUID-32002270-02dd-7f53-3d46-cb809b624327" data-permalink="deploying/deploying-with-ship/publishing-an-app-to-a-store-with-ship.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">Shipを使用してストアにアプリを公開する</a> </li> <li> <a href="../deploying/deploying-with-ship/using-ship-for-apps-built-with-cross-platform-frameworks.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-75d18344-1afc-0efa-1e3c-8463345c0c9d" data-legacy-id="UUID-2d66c61d-d927-38d8-c5a0-75b00998764e" data-permalink= "deploying/deploying-with-ship/using-ship-for-apps-built-with-cross-platform-frameworks.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">クロスプラットフォームフレームワークで構築されたアプリにShipを使用する</a> </li> <li> <a href="../deploying/deploying-with-ship/app-details-in-ship.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-5f83d763-3d84-0626-3ffe-b72ae661208b" data-legacy-id="UUID-958b2b3e-0d5a-3368-c0c3-4d46071696eb" data-permalink="deploying/deploying-with-ship/app-details-in-ship.html" data-topic-level="3" data-relative-prefix= "../../" data-publication-date="">船内のアプリの詳細</a> </li> <li> <a href="../deploying/deploying-with-ship/ship-notifications.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-42427c87-4755-3022-2521-3dd00c0b3dc5" data-legacy-id="UUID-6aff0063-fc6e-4330-d1d5-5ddb1c529585" data-permalink="deploying/deploying-with-ship/ship-notifications.html" data-topic-level="3" data-relative-prefix= "../../" data-publication-date="">出荷通知</a> </li> </ul> </li> <li> <a href="../deploying/deploying-apps-to-applivery.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-1adbe843-e24b-907d-480c-cf2cf5f17fba" data-legacy-id="UUID-5dd58ac5-f4fe-4e17-4a05-6363f26bc0ae" data-permalink="deploying/deploying-apps-to-applivery.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Appliveryへのアプリのデプロイ</a> <ul></ul> </li> <li> <a href="../deploying/deploying-apps-to-deploygate-from-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-066787b9-e3c2-8826-acde-b0a0d5d794b9" data-legacy-id="UUID-632764fb-7d84-992f-d4e2-b53a55fb8c12" data-permalink="deploying/deploying-apps-to-deploygate-from-bitrise.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">BitriseからDeployGateへのアプリのデプロイ</a> </li> <li> <a href="../deploying/deploying-your-app-to-appaloosa.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-fc974e4a-6215-4464-82b9-e499900c5791" data-legacy-id="UUID-db10f62a-8b57-0b1e-665c-1a9d1879fdfc" data-permalink="deploying/deploying-your-app-to-appaloosa.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">アプリをAppaloosaにデプロイする</a> </li> <li> <a href="../deploying/deploying-to-testfairy-with-bitrise.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-7f8d8f2a-0c96-b2a2-d22a-848d2f58488a" data-legacy-id="UUID-a28a90a4-c515-24d4-d322-673814515a30" data-permalink="deploying/deploying-to-testfairy-with-bitrise.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Bitriseを使用したTestFairyへのデプロイ</a> </li> </ul> </li> <li> <a href="../build-insights.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-actions-troubleshooting original-topic original-topic" data-origin-id="UUID-e0616761-9cb7-7321-e585-c89c5747026d" data-legacy-id="UUID-9bd3a8e4-236f-f47c-95dd-bc27a511a16f" data-permalink="build-insights.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> インサイトを構築する</a> <ul> <li> <a href="../build-insights/getting-started-with-insights.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-b08cc96c-32cb-f704-788c-bbfd1fe854b9" data-legacy-id="UUID-e3ff43e7-45e2-03e0-cf75-47a506baa5e2" data-permalink="build-insights/getting-started-with-insights.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">インサイトの使用を開始する</a> <ul></ul> </li> <li> <a href="../build-insights/available-metrics-in-insights.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-882de749-0081-e73f-b327-a8aa4f7dca44" data-legacy-id="UUID-8c83a6e5-986c-3c57-7b56-65ed069996c6" data-permalink="build-insights/available-metrics-in-insights.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Insightsで利用可能なメトリック</a> <ul></ul> </li> <li> <a href="../build-insights/test-stats-in-build-insights.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-1a12ee14-e155-58fb-9808-99d117a5e7de" data-legacy-id="UUID-d6b6eb3a-a842-bb5c-e12f-e31ddc113ea7" data-permalink="build-insights/test-stats-in-build-insights.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">BuildInsightsで統計をテストします</a> <ul></ul> </li> </ul> </li> <li> <a href="../bitrise-cli.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-27017f65-ad72-12cd-02b8-7d543d112a63" data-legacy-id="UUID-e9345ec7-292e-a6e2-e70e-2d876908aec8" data-permalink="bitrise-cli.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class= "glyphicon"></span> Bitrise CLI</a> <ul> <li> <a href="../bitrise-cli/installing-and-updating-the-bitrise-cli.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-d610eedd-c45f-e1a2-8071-2968f86a4af8" data-legacy-id="UUID-7646c9ae-7085-91b7-723d-34f7442c0aaa" data-permalink="bitrise-cli/installing-and-updating-the-bitrise-cli.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">BitriseCLIのインストールと更新</a> <ul></ul> </li> <li> <a href="../bitrise-cli/adding-a-new-app-from-a-cli.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-f900869d-cbec-8aa0-6f35-25fec828d88f" data-legacy-id="UUID-1079bc04-ec61-f882-c3a8-faca2105b38f" data-permalink="bitrise-cli/adding-a-new-app-from-a-cli.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">CLIからの新しいアプリの追加</a> </li> <li> <a href="../bitrise-cli/initializing-a-bitrise-project-locally.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml original-topic original-topic" data-origin-id="UUID-13ec887e-137f-b3eb-2dc4-f22944dd1d01" data-legacy-id="UUID-151fcbbc-c9fb-6803-e4a0-34df36e6301a" data-permalink= "bitrise-cli/initializing-a-bitrise-project-locally.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Bitriseプロジェクトをローカルで初期化する</a> </li> <li> <a href="../bitrise-cli/installing-and-upgrading-the-offline-workflow-editor.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-0fc16f0c-c014-d02a-e3cf-8c660d7c542b" data-legacy-id="UUID-048848eb-eb79-a5a9-a5d8-22f4b5766e1a" data-permalink= "bitrise-cli/installing-and-upgrading-the-offline-workflow-editor.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">オフラインワークフローエディターのインストールとアップグレード</a> <ul></ul> </li> <li> <a href="../bitrise-cli/running-your-first-local-build-with-the-cli.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-bitrise-yml original-topic original-topic" data-origin-id="UUID-c4e3dad2-d242-d8c7-fdce-e87b02b0339b" data-legacy-id="UUID-70b77658-138c-afa4-5e97-c33dc8122ae3" data-permalink= "bitrise-cli/running-your-first-local-build-with-the-cli.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">CLIを使用して最初のローカルビルドを実行する</a> </li> <li> <a href="../bitrise-cli/managing-secrets-locally.html" hreflang="ja" class="topic-link section taxonomy-configuration-env-vars original-topic original-topic" data-origin-id="UUID-ac254cae-50e4-fbb0-9dd0-7a4e66a780e3" data-legacy-id="UUID-2d28d165-eb76-78a8-2290-adab1fc4ae69" data-permalink="bitrise-cli/managing-secrets-locally.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">シークレットをローカルで管理する</a> </li> </ul> </li> <li> <a href="../api.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-cb55b806-0981-0f42-eeff-5e2683d7829a" data-legacy-id="UUID-e907f989-b825-9411-9398-e10036885ddb" data-permalink="api.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> API</a> <ul> <li> <a href="../api/authenticating-with-the-bitrise-api.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-accounts-rel original-topic original-topic" data-origin-id="UUID-b33dbf25-c5e4-11c8-f20c-a619a4616911" data-legacy-id="UUID-37d98545-a334-a3e0-ea1d-676c05cf4f9b" data-permalink= "api/authenticating-with-the-bitrise-api.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">BitriseAPIを使用した認証</a> </li> <li> <a href="../api/pagination-of-api-calls.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-4d7629da-3db4-6b4d-3ce7-053eb3cb7a46" data-legacy-id="UUID-bacb6520-d6a4-c7fc-51bd-b2f985824545" data-permalink="api/pagination-of-api-calls.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">API呼び出しのページ付け</a> </li> <li> <a href="../api/adding-and-managing-apps.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-f589566f-87a7-bde7-d6b0-676cd3bbf33f" data-legacy-id="UUID-7f6e234a-f7d5-04b9-ebd9-3b4bbafedd05" data-permalink="api/adding-and-managing-apps.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">アプリの追加と管理</a> <ul></ul> </li> <li> <a href="../api/triggering-and-aborting-builds.html" hreflang="ja" class="topic-link section taxonomy-actions-builds original-topic original-topic" data-origin-id="UUID-7f0fe70c-83aa-8955-4153-192fa5308866" data-legacy-id="UUID-8101784e-bfc1-88ac-7fe1-f90ecaa3c339" data-permalink="api/triggering-and-aborting-builds.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ビルドのトリガーと中止</a> <ul></ul> </li> <li> <a href="../api/incoming-and-outgoing-webhooks.html" hreflang="ja" class="topic-link section taxonomy-configuration-apps original-topic original-topic" data-origin-id="UUID-40445e57-5661-4a26-710b-bfafeb921453" data-legacy-id="UUID-062ec1ad-a9f9-0a19-f4d0-50b01fb6468e" data-permalink="api/incoming-and-outgoing-webhooks.html" data-topic-level= "2" data-relative-prefix="../" data-publication-date="">着信および発信Webhook</a> <ul></ul> </li> <li> <a href="../api/managing-ios-code-signing-files.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-code-signing-rel taxonomy-related-links-taxonomies-ios-rel original-topic original-topic" data-origin-id="UUID-dce4d841-fb55-0714-cb04-a4b91884b4d1" data-legacy-id="UUID-9ceef8b2-5917-b9d8-5fe2-510b0c8c49ec" data-permalink="api/managing-ios-code-signing-files.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">iOSコード署名ファイルの管理</a> <ul></ul> </li> <li> <a href="../api/managing-files-in-generic-file-storage.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-configuration-env-vars original-topic original-topic" data-origin-id="UUID-555289d2-cdf2-0a32-114d-626663437bd1" data-legacy-id="UUID-1dcd8575-d195-377d-0e4f-157443b0e93c" data-permalink= "api/managing-files-in-generic-file-storage.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">汎用ファイルストレージ内のファイルの管理</a> <ul></ul> </li> <li> <a href="../api/managing-build-artifacts.html" hreflang="ja" class="topic-link section taxonomy-actions-builds taxonomy-related-links-taxonomies-builds-rel original-topic original-topic" data-origin-id="UUID-80a5c036-577b-12c1-1929-9f32be653983" data-legacy-id="UUID-301c547a-e269-1494-43be-cc6e326c3636" data-permalink= "api/managing-build-artifacts.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ビルドアーティファクトの管理</a> <ul></ul> </li> <li> <a href="../api/api-reference.html" hreflang="ja" class="topic-link section swagger-topic swagger-topic" data-origin-id="UUID-3208c6b4-0ebf-fb66-853b-34dc4f4590e1" data-legacy-id="UUID-6651274d-fb0d-cd13-6eae-1aa5b64e3cba" data-permalink="api/api-reference.html" data-topic-level="2" data-relative-prefix="../" data-publication-date= "">APIリファレンス</a> </li> </ul> </li> <li> <a href="../references.html" hreflang="ja" class="topic-link section" data-origin-id="UUID-e512a445-f4b3-b030-d8ea-4ac0e2b045f6" data-legacy-id="UUID-65ffd971-f2df-01e9-40b3-fe591c681b49" data-permalink="references.html" data-topic-level="1" data-relative-prefix="" data-publication-date=""><span class="glyphicon"></span> 参考文献</a> <ul> <li> <a href="../references/basics-of-bitrise-yml.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml taxonomy-related-links-taxonomies-bitrise-yml-rel original-topic original-topic" data-origin-id="UUID-e2b5d350-3596-52e2-e43b-bbbc8c13e4d7" data-legacy-id="UUID-2cda69d1-a002-7b51-e372-0f9fdfb56702" data-permalink= "references/basics-of-bitrise-yml.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">bitrise.ymlの基本</a> </li> <li> <a href="../references/customizing-bitrise-yml.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml taxonomy-related-links-taxonomies-bitrise-yml-rel original-topic original-topic" data-origin-id="UUID-2e4ed86d-f923-7a38-1158-b021f4c1c44d" data-legacy-id="UUID-b66dcf4e-390d-6e39-435d-7aa3b63057bb" data-permalink= "references/customizing-bitrise-yml.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">bitrise.yml設定のカスタマイズ</a> </li> <li> <a href="../references/workflows-reference.html" hreflang="ja" class="topic-link section taxonomy-related-links-taxonomies-bitrise-yml-rel original-topic original-topic" data-origin-id="UUID-4c05eb0d-ec75-1f61-34b2-71e39a7d7c97" data-legacy-id="UUID-a6fcc659-cdca-a8ab-99b7-72c2f55ee624" data-permalink="references/workflows-reference.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">ワークフローリファレンス</a> </li> <li> <a href="../references/steps-reference.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-0ec53551-c5ec-c23a-0bfc-06d3402e2b9e" data-legacy-id="UUID-c5229546-0af7-44b6-f3b4-828065b04f57" data-permalink="references/steps-reference.html" data-topic-level="2" data-relative-prefix="../" data-publication-date=""><span class="glyphicon"></span> 手順リファレンス</a> <ul> <li> <a href="../references/steps-reference/step-reference-id-format.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml taxonomy-configuration-steps" data-origin-id="UUID-5145156c-cbf0-fea5-bc5f-74b144587a22" data-legacy-id="UUID-bbc2f5b5-1077-ec64-2006-8a60990df870" data-permalink= "references/steps-reference/step-reference-id-format.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステップリファレンス/ IDフォーマット</a> </li> <li> <a href="../references/steps-reference/step-data-in-the-bitrise-yml-file.html" hreflang="ja" class="topic-link section taxonomy-configuration-bitrise-yml taxonomy-configuration-steps" data-origin-id="UUID-f403d515-c887-5c34-6fbc-5ec2d34c84c1" data-legacy-id="UUID-79e8efe7-af2a-be81-ac18-4f7e5bb904d9" data-permalink= "references/steps-reference/step-data-in-the-bitrise-yml-file.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">bitrise.ymlファイルのステップデータ</a> </li> <li> <a href="../references/steps-reference/step-properties-reference.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-b47c2d93-6f1c-2883-2f4c-3f7b74e67870" data-legacy-id="UUID-2dd3fba3-31bf-e1c2-b5a7-366837170082" data-permalink= "references/steps-reference/step-properties-reference.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステッププロパティ</a> </li> <li> <a href="../references/steps-reference/step-inputs-reference.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-adadfd2d-d409-915c-2a14-a23845d8f930" data-legacy-id="UUID-4e634a4d-3415-960e-a65c-3fe481664149" data-permalink= "references/steps-reference/step-inputs-reference.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステップ入力リファレンス</a> </li> <li> <a href="../references/steps-reference/step-outputs-reference.html" hreflang="ja" class="topic-link section taxonomy-configuration-steps original-topic original-topic" data-origin-id="UUID-60e62e69-617d-3d17-40cb-7db191191c11" data-legacy-id="UUID-a5d0555f-842b-f43b-6aff-e4368b57d933" data-permalink= "references/steps-reference/step-outputs-reference.html" data-topic-level="3" data-relative-prefix="../../" data-publication-date="">ステップ出力リファレンス</a> </li> </ul> </li> <li> <a href="../references/available-environment-variables.html" hreflang="ja" class="topic-link section taxonomy-configuration-env-vars original-topic original-topic" data-origin-id="UUID-06a76a7c-35cb-ddb5-1c8f-b5eacfcea5ae" data-legacy-id="UUID-61fec685-5924-fa38-d35f-72b7c421738a" data-permalink= "references/available-environment-variables.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">利用可能な環境変数</a> </li> <li> <a href="../references/bitrise-tools.html" hreflang="ja" class="topic-link section original-topic original-topic" data-origin-id="UUID-dbe33c5c-925b-fbc2-2a2b-e917954c4f4a" data-legacy-id="UUID-61452e0b-d5a1-25e0-9ea8-8e71d494219a" data-permalink="references/bitrise-tools.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="">Bitriseツール</a> </li> </ul> </li> </ul> </aside> <div class="site-content"> <div class="toolbar top-nav-on"> <div class="toolbar-tools"> <div id="navbar" class="navbar-collapse collapse"> <ul class="top-nav-menu sm sm-simple"> <li> <a href="https://support.bitrise.io/hc/en-us?utm_source=devcenter&amp;utm_medium=top_cta" class="external-top-nav-link" target="_blank">Go to Support</a> </li> <li> <a href="https://www.bitrise.io/contact?utm_source=website&amp;utm_medium=devcenter&amp;utm_campaign=contact" class="external-top-nav-link" target="_blank">Book a demo</a> </li> </ul> </div> <div class="tool-print"> <i class="fa fa-print" aria-hidden="true">print</i> </div> <div class="tool-search"> <i class="fa fa-search" aria-hidden="true"></i> <form class="tool-search-form" autocomplete="off"> <input type="text" class="form-control search-field" placeholder="" id="aa-search-input" /> </form> </div><button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".site-sidebar" aria-expanded="false" aria-controls="navbar"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button> </div> </div> <main> <div id="top-pager"> <ul class="pager"> <li class="previous"> <a accesskey="p" id="header-navigation-prev" class="pull-left prev visible-lg visible-md" href="workflow-recipes-for-cross-platform-apps/-flutter--run-dart-analyzer.html">戻る</a> </li> <li class="next"> <a accesskey="n" id="header-navigation-next" class="pull-right next visible-lg visible-md" href="generic-workflow-recipes/-ios-android--send-build-status-to-slack.html">次へ</a> </li> </ul> </div> <article class="topic content-container" id="content-wrapper"> <div id="topic-content" class="topic-content"> <div class="breadcrumb-container"> <ul class="breadcrumb"> <li class="breadcrumb-link"> <a href="../index-ja.html">Bitriseドキュメントへようこそ!</a> </li> <li class="breadcrumb-link"> <a href="../steps-and-workflows.html">手順とワークフロー</a> </li> <li class="breadcrumb-node">一般的なワークフローレシピ</li> </ul> </div> <section xml:lang="ja" lang="ja" dir="ltr" class="section" data-origin-id="UUID-d56a5129-1646-2ed7-42db-09794018edd5" data-legacy-id="UUID-7a564da7-e804-140e-de7e-353c9a047054" data-permalink="steps-and-workflows/generic-workflow-recipes.html" data-topic-level="2" data-relative-prefix="../" data-publication-date="" id= "一般的なワークフローレシピ"> <div class="titlepage"> <div> <div class="title"> <h1 class="title" style="clear: both">一般的なワークフローレシピ</h1> </div> </div> </div> <p id="UUID-7a564da7-e804-140e-de7e-353c9a047054_para-idm33289851085070">ワークフローレシピは、一般的なワークフロータスク用の既製のソリューションを提供します。ここでは、ワークフロー全体の例とともに、さまざまなレシピを見つけることができます。</p> <p>ここでは、プラットフォームタイプ(iOS、Android、Flutterなど)に固有ではないが、CI / CDプロセスおよび一般的なBitriseの使用に役立つワークフローレシピを見つけることができます。</p> </section> <div class="footer-content"> <div class="section-toc section-toc-after"> <div class="section-toc-title"> <span class="section-toc-title-delimiter">:</span> </div> </div> <div class="glossary-definitions"></div> </div> <footer></footer> </div> </article> <article id="search-result-wrapper"> <div class="search-container" style="display: none;"> <h2></h2> <ul class="searchresults"></ul> <p class="noresults"></p> </div> </article> <div class="feedback-panel"> <div class="voting-title"> Was this helpful? </div> <div class="btn-group btn-group-toggle" data-toggle="buttons"> <button id="feedback-yes-btn" class="btn toggle-yes">Yes</button><button id="feedback-no-btn" class="btn">No</button> </div> <div id="email-feedback" class="toggle-feedback"> <p><a href= "mailto:letsconnect@bitrise.io?subject=Feedback%20for%20help%20topic%20%22%E4%B8%80%E8%88%AC%E7%9A%84%E3%81%AA%E3%83%AF%E3%83%BC%E3%82%AF%E3%83%95%E3%83%AD%E3%83%BC%E3%83%AC%E3%82%B7%E3%83%94%22&amp;body=%0A%09%09%09%09%0A%09%09%09%09%0A%09%09%09%09_______________________%0A%09%09%09%09%0A%09%09%09Please%20add%20your%20feedback%20above%20for%20topic%20%22%E4%B8%80%E8%88%AC%E7%9A%84%E3%81%AA%E3%83%AF%E3%83%BC%E3%82%AF%E3%83%95%E3%83%AD%E3%83%BC%E3%83%AC%E3%82%B7%E3%83%94%22%20in%20the%20publication%20%22Bitrise%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E3%81%B8%E3%82%88%E3%81%86%E3%81%93%E3%81%9D%EF%BC%81%22."> <i aria-hidden="true" class="fa fa-pencil-square-o feedbackicon voting-feedbackicon"></i>Would you like to provide feedback? Just click here to suggest edits.</a></p> </div> </div> </main> <div id="bottom-pager"> <ul class="pager"> <li class="previous"> <a accesskey="p" id="header-navigation-prev" class="pull-left prev visible-lg visible-md" href="workflow-recipes-for-cross-platform-apps/-flutter--run-dart-analyzer.html">戻る</a> </li> <li class="next"> <a accesskey="n" id="header-navigation-next" class="pull-right next visible-lg visible-md" href="generic-workflow-recipes/-ios-android--send-build-status-to-slack.html">次へ</a> </li> </ul> </div> <footer class="site-footer"> <div class="inner"> <div class="copyright"> © 2022 </div> <div class="publication-date"> <span class="publication-date-text">発行日</span><span class="pubdate-delimiter">:</span> <span class="formatted-date"></span> </div> </div> </footer> </div> </div> </div> </div> <script type="text/javascript"> //<![CDATA[ var theme = '2'; var versionsfile = ''; var indexDict = new Array(); var store = {}; var portalLanguage = 'ja'; var enterKey = 'select'; var fuse_threshold = 0.3; var local_csh = false; var anchoroption = false; var instantsearch_minlength = 1; var useanchorlinks = false; useanchorlinks = true; var clicktocopy = 'Click to copy link'; var linkcopied = 'Link copied!'; //]]> </script> <script src="../../js/jquery-3/jquery-3.4.1.min.js" type="text/javascript"></script> <script src="../../js/jquery-migrate-3.0.1.min.js" type="text/javascript"></script> <script src="../../js/materialize.min.js" type="text/javascript"></script> <script src="../../js/bootstrap.min.js" type="text/javascript"></script> <script src="../../js/purl.js" type="text/javascript"></script> <script src="../../js/jquery.smartmenus.js" type="text/javascript"></script> <script src="../../js/html5-2-mp-common.js?version=20220308" type="text/javascript"></script> <script src="../../js/html5-2.js?version=20220308" type="text/javascript"></script> <script src="../../js/checklist.js" type="text/javascript"></script> <script src="../../js/clipboard.min.js" type="text/javascript"></script> <script src="../../js/anchorlinks.js" type="text/javascript"></script> <script src="../../js/updateurl.js" type="text/javascript"></script> <script src="../../js/html5.algoliasearch.js?version=20220308" type="text/javascript"></script> <script src="../../js/csh.js" type="text/javascript"></script> <script src="../../js/layout-custom-script.js?version=20220308" type="text/javascript"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML" async="async"></script> <script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-53276411-1"></script> <script type="text/javascript"> //<![CDATA[ var propertyid = 'UA-53276411-1'; window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date()); gtag('config', propertyid); //]]> </script> <script type="text/javascript"> //<![CDATA[ $(document).ready(function () { $(".mediaobject img").addClass('materialboxed'); //Exclude images with links $(".mediaobject a img").removeClass('materialboxed'); if (!document.documentMode) { $('.materialboxed').materialbox(); }}); //]]> </script> <script type="text/javascript"> //<![CDATA[ var publication_id = 'ja-UUID-7395f1f7-ccf0-589c-1269-55efc35b445b'; var algolia_application_id = 'HI1538U2K4'; var algolia_search_only_api_key = 'e1a727481ac4f75db3e93c7763f02c8a'; //]]> </script> <script src="https://cdn.jsdelivr.net/algoliasearch/3/algoliasearch.min.js"></script> <script src="https://cdn.jsdelivr.net/autocomplete.js/0/autocomplete.jquery.min.js"></script> </body> </html>
bitrise-io/devcenter
ja/steps-and-workflows/generic-workflow-recipes.html
HTML
mit
171,704
package lateralview.net.m2xapiv2exampleapp.activities; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import org.json.JSONException; import org.json.JSONObject; import lateralview.net.attm2xapiv2.listeners.ResponseListener; import lateralview.net.attm2xapiv2.model.Distribution; import lateralview.net.attm2xapiv2.network.ApiV2Response; import lateralview.net.m2xapiv2exampleapp.R; public class DistributionActivity extends Activity implements ResponseListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_distribution); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_distribution, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } public void listDistributions(View view) { Distribution.list(DistributionActivity.this, new ResponseListener() { @Override public void onRequestCompleted(ApiV2Response result, int requestCode) { } @Override public void onRequestError(ApiV2Response error, int requestCode) { } }); } public void createDistribution(View view){ try { JSONObject o = new JSONObject("{ \"name\": \"Sample Distribution\",\n" + " \"description\": \"Longer description for Sample Distribution\",\n" + " \"visibility\": \"public\" }"); Distribution.create(DistributionActivity.this, o, this); } catch (JSONException e) { e.printStackTrace(); } } public void viewDistributionDetails(View view){ Distribution.viewDetails(DistributionActivity.this,"cc86b9c881755506d356659363680d29",this); } public void updateDistributionDetails(View view){ try { JSONObject o = new JSONObject("{ \"name\": \"Sample Distribution\",\n" + " \"description\": \"Longer description for Sample Distribution\",\n" + " \"visibility\": \"public\" }"); Distribution.updateDetails(DistributionActivity.this, o, "cc86b9c881755506d356659363680d29", this); } catch (JSONException e) { e.printStackTrace(); } } public void listDevicesExistingDistribution(View view){ Distribution.listDevices(DistributionActivity.this,"cc86b9c881755506d356659363680d29",this); } public void addDeviceToDistribution(View view){ try { JSONObject o = new JSONObject("{ \"serial\": \"ABC1234\"}"); Distribution.addDevice(DistributionActivity.this, o, "cc86b9c881755506d356659363680d29", this); } catch (JSONException e) { e.printStackTrace(); } } public void deleteDistribution(View view){ Distribution.delete(DistributionActivity.this,"cc86b9c881755506d356659363680d29",this); } public void listDataStreams(View view){ Distribution.listDataStreams(DistributionActivity.this,"cc86b9c881755506d356659363680d29",this); } public void createUpdateDataStream(View view){ try{ JSONObject o = new JSONObject("{ \"unit\": { \"label\": \"celsius\", symbol: \"C\" }, \"type\": \"numeric\" }"); Distribution.createUpdateDataStream(DistributionActivity.this,o,"cc86b9c881755506d356659363680d29","LVStream",this); }catch(JSONException e){ e.printStackTrace(); } } public void viewDataStream(View view){ Distribution.viewDataStream(DistributionActivity.this,"cc86b9c881755506d356659363680d29","LVStream",this); } public void deleteDataStream(View view){ Distribution.deleteDataStream(DistributionActivity.this,"cc86b9c881755506d356659363680d29","LVStreams",this); } //API listeners @Override public void onRequestCompleted(ApiV2Response result, int requestCode) { Log.d("APIV2Request", "Completed"); Log.d("APIV2 - RESULT",result.get_raw()); } @Override public void onRequestError(ApiV2Response error, int requestCode) { Log.d("APIV2Request","Error"); Log.d("APIV2 - ERROR",error.get_raw()); } }
attm2x/m2x-android-test-app
app/src/main/java/lateralview/net/m2xapiv2exampleapp/activities/DistributionActivity.java
Java
mit
4,951
<?php /** * Lithium: the most rad php framework * * @copyright Copyright 2011, Union of RAD (http://union-of-rad.org) * @license http://opensource.org/licenses/bsd-license.php The BSD License */ namespace lithium\tests\mocks\core; class MockCallable extends \lithium\core\Object { public function __call($method, $params = array()) { return $params; } } ?>
WarToaster/HangOn
libraries/lithium/tests/mocks/core/MockCallable.php
PHP
mit
379
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="author" content="SP"> <meta name="description" content="จัดเลี้ยงนอกสถานที่ บุฟเฟต์ ราคาถูก อร่อย สะอาด บริการดี เหมาะสำหรับ คอฟฟี่เบรค เลี้ยงพระ แต่งงาน วันเกิด เลี้ยงรวมรุ่น ของว่าง อาหารกล่อง ขนมโบราณ หาทานยาก"> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@baimaiprachan" /> <meta name="twitter:image" content="https://raw.githubusercontent.com/baimaiprachan/baimaiprachan.github.io/master/img/%E0%B9%80%E0%B8%A1%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%87%E0%B8%81%E0%B8%A5%E0%B8%B5%E0%B8%9A%E0%B8%9A%E0%B8%B1%E0%B8%A72.jpg" /> <meta property="og:url" content="http://www.baimaiprachan.com/savory4-pics.html" /> <meta property="og:title" content="ใบไม้พระจันทร์ เคเธอริ่ง - รูปอาหารคาว รายการ 4" /> <meta property="og:description" content="บุฟเฟต์ไทย จีน ฝรั่ง ของว่าง คาว และขนม ประณีต อร่อยและไม่ใส่สารเคมี ที่ย่านวัชรพล รามอินทรา" /> <meta property="og:image" content="https://raw.githubusercontent.com/baimaiprachan/baimaiprachan.github.io/master/img/%E0%B9%80%E0%B8%A1%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%87%E0%B8%81%E0%B8%A5%E0%B8%B5%E0%B8%9A%E0%B8%9A%E0%B8%B1%E0%B8%A72.jpg" /> <script type='application/ld+json'>{ "@context":"https://schema.org", "@type":"LocalBusiness", "image": "https://www.baimaiprachan.com/img/twitter_card.jpg", "priceRange": "฿฿", "address": { "@type": "PostalAddress", "addressLocality": "บางเขน", "addressRegion": "กรุงเทพ", "postalCode":"10220", "streetAddress": "1/224 โครงการเวนิส ดิ ไอริส ซอย วัชรพล 2/8 แขวง ท่าแร้ง" }, "description": "จัดเลี้ยงนอกสถานที่ บุฟเฟต์ ราคาถูก อร่อย สะอาด บริการดี เหมาะสำหรับ คอฟฟี่เบรค เลี้ยงพระ แต่งงาน วันเกิด เลี้ยงรวมรุ่น ของว่าง อาหารกล่อง ขนมโบราณ หาทานยาก", "name": "ใบไม้พระจันทร์ เคเธอริ่ง- จัดเลี้ยงนอกสถานที่", "telephone": ["02-024-1480", "092-267-4722"], "openingHours": ["Tu,We,Th,Fr,Sa,Su 11:30-14:30", "Tu,We,Th,Fr,Sa,Su 17:30-20:30"], "geo": { "@type": "GeoCoordinates", "latitude": "13.879958", "longitude": "100.644763" }, "sameAs" : ["http://www.facebook.com/BaimaiPrachanVeniceWatcharaphol", "https://www.instagram.com/baimaiprachan/", "https://www.pinterest.com/baimaiprachan/"] } "@id":"#website", "url":"https://www.baimaiprachan.com/", "email": "info.baimaiprachan@gmail.com" }</script> <title>ใบไม้พระจันทร์ - รูปอาหารคาว รายการ 4</title> <!-- Favicon --> <link rel="icon" type="image/png" href="favicon.png"> <!-- Bootstrap core CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <!-- Custom fonts for this template --> <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Athiti|Prompt" rel="stylesheet"> <!-- Custom styles for this template --> <link href="css/landing-page.css" rel="stylesheet"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> <script> $(document).ready(function(){ $('.navbar-toggler').on('click', function(){ $('.navbar-collapse').collapse('hide'); }); $("#top-btn").click(function() { $('html, body').animate({ scrollTop: $("#top").offset().top-50 }, 500); }); $("#restaurant-btn").click(function() { $('html, body').animate({ scrollTop: $("#restaurant").offset().top-50 }, 500); }); $("#gallery-btn").click(function() { $('html, body').animate({ scrollTop: $("#gallery").offset().top-50 }, 500); }); $("#contact-btn").click(function() { $('html, body').animate({ scrollTop: $("#contact-anchor").offset().top-50 }, 500); }); }); </script> <script> jQuery(document).ready(function(){ // run on DOM ready // grab target from URL hash (i.e. www.mysite.com/page-a.html#target-name) var target = window.location.hash; // only try to scroll to offset if target has been set in location hash if ( target != '' ){ var $target = jQuery(target); jQuery('html, body').stop().animate({ 'scrollTop': $target.offset().top - 50}, 900, 'swing',function () { window.location.hash = target - 40; }); } }); </script> </head> <body> <!-- Navigation --> <nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top"> <a class="navbar-brand" href="#">ใบไม้พระจันทร์</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarResponsive"> <ul class="navbar-nav ml-auto"> <li class="nav-item"> <a class="nav-link" href="https://www.baimaiprachan.com/#about">เกี่ยวกับเรา</a> </li> <li class="nav-item"> <a class="nav-link" href="https://www.baimaiprachan.com/#in-the-news">ในข่าว</a> </li> <li class="nav-item"> <a class="nav-link" href="https://www.baimaiprachan.com/#catering-buffet">จัดเลี้ยง <i class="fa fa-caret-down"></i></a> <ul class="nav-link"> <a class="nav-link-sub" href="https://www.baimaiprachan.com/#sample-menus"><li>ตัวอย่างราคาจัดเลี้ยง</li></a> <a class="nav-link-sub" href="https://www.baimaiprachan.com/#mains"><li>อาหารคาว</li></a> <a class="nav-link-sub" href="https://www.baimaiprachan.com/#desserts"><li>ของหวาน</li></a> <a class="nav-link-sub" href="https://www.baimaiprachan.com/#alms"><li>เลี้ยงพระ</li></a> <a class="nav-link-sub" id="menupdf-btn" target="_blank" href="documents/รายการอาหารจัดเลี้ยง_ใบไม้พระจันทร์.pdf"><li>ดาวโหลดเมนู</li></a> </ul> </li> <li class="nav-item"> <a class="nav-link" id="restaurant-btn">ร้านอาหาร</a> </li> <li class="nav-item"> <a class="nav-link" id="gallery-btn">ดูรูป</a> </li> <li class="nav-item"> <a class="nav-link" id="contact-btn">ติดต่อเรา</a> </li> </ul> </div> </div> </nav> <!-- Page Content --> <section id="top" class="content-section-a"> <div class="container"> <h2><br></h2> <h2 align="center">อาหารคาว - รายการ 4</h2> <hr class="section-heading-spacer-c" align="center" style="width: 200px;"> <p class="lead" align="center"> </p> <h5><br></h5> <div class="d-flex flex-row justify-content-center flex-wrap"> <div class="p-2 mt-auto my-flex-item" align="left"> <img class="img-fluid" src="img/indiv/กุ้งผัดผงกะหรี่.jpg" alt="กุ้งผัดผงกะหรี่ จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto my-flex-item"> <img class="img-fluid" src="img/indiv/ไก่กรอบมะนาว.jpg" alt="ไก่กรอบมะนาว จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto my-flex-item" align="left"> <img class="img-fluid" src="img/indiv/ไก่ผัดขิง.jpg" alt="ไก่ผัดขิง จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto my-flex-item"> <img class="img-fluid" src="img/indiv/ไก่ผัดเม็ดมะม่วง.jpg" alt="ไก่ผัดเม็ดมะม่วง จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto my-flex-item"> <img class="img-fluid" src="img/indiv/ไข่ตุ๋นญี่ปุ่น.jpg" alt="ไข่ตุ๋นญี่ปุ่น จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto my-flex-item" align="left"> <img class="img-fluid" src="img/indiv/ซี่โครงหมูอบซอสมะขาม.jpg" alt="ซี่โครงหมูอบซอสมะขาม จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto my-flex-item" align="left"> <img class="img-fluid" src="img/indiv/ปลาผัดคื่นช่าย.jpg" alt="ปลาผัดคื่นช่าย จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto my-flex-item"> <img class="img-fluid" src="img/indiv/เป็ดกีตาร์.jpg" alt="เป็ดกีตาร์ จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto my-flex-item" align="left"> <img class="img-fluid" src="img/indiv/สลัดหมูเทอริยากิ.jpg" alt="สลัดหมูเทอริยากิ จัดเลี้ยง ใบไม้พระจันทร์"> </div> <div class="p-2 mt-auto align-self-center my-flex-item" align="left"> <img class="img-fluid" src="img/indiv/ปลาราดพริก.JPG" alt="ปลาราดพริก จัดเลี้ยง ใบไม้พระจันทร์"> </div> </div> </div> </section> <section id="restaurant" class="content-section-b"> <div class="container"> <div class="row"> <div class="col-lg-5 mr-auto order-lg-2" style="text-align: left"> <h2 class="section-heading">ร้านอาหารบุฟเฟต์<br>ของว่าง คาว หวาน ไทย จีน ฝรั่ง</h2> <hr class="section-heading-spacer"> <div class="clearfix"></div> <p class="lead">ทดลองรับประทานอาหารร้านใบไมพระจันทร์ได้ที่ <a target="_blank" href="http://iris.co.th/venicediiris/">เวนิสชอปปิ้ง พลาซ่า วัชรพล</a> อาหารบุฟเฟ่ต์ ไทย จีน ฝรั่ง ดูรายการวันนี้ได้ทาง <a href="https://www.facebook.com/BaimaiPrachanVeniceWatcharaphol/"> <i class="fa fa-facebook fa-fw"></i> ใบไม้พระจันทร์ ที่ เวนิสวัชรพล </a> </p> <p class="lead">ราคา 180 บาทต่อท่าน<br> เด็ก 1-5 ขวบฟรี<br> เด็ก 6-12 ขวบ 75 บาท </p> <p class="lead"> รวมอาหารคาวอย่างน้อย 10 รายการ อาหารหวานอย่างน้อย 5 รายการ ไอศกรีม ผลไม้ และน้ำเปล่า ไม่จำกัดเวลา อาหารทำใหม่ทุกวัน </p> <p class="lead"> มื้อเที่ยง 11:30 - 14:30<br> มื้อเย็น 17:30 - 20:30<br> ปิดวันจันทร์ </p> </div> <div class="col-lg-5 ml-auto order-lg-1"> <img class="img-fluid" src="img/restaurant2.png" alt=""> </div> </div> </div> </section> <section id="gallery" class="content-section-a"> <div class="container"> <h2 align="center">ดูรูป</h2> <hr class="section-heading-spacer-c" align="center" style="width: 200px;"> <div class="d-flex flex-row justify-content-center flex-wrap"> <div class="column"> <div class="content"> <a target="_blank" href="savory1-pics.html"> <div class="card"> <img src="img\indiv\แกงเลียง.jpg" alt="จัดเลี้ยง ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>อาหารคาว รายการ 1</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </a> </div> </div> <div class="column"> <div class="content"> <a target="_blank" href="savory2-pics.html"> <div class="card"> <img src="img\indiv\ยำปลาทอดผลไม้.jpg" alt="จัดเลี้ยง ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>อาหารคาว รายการ 2</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </a> </div> </div> <div class="column"> <div class="content"> <a target="_blank" href="savory3-pics.html"> <div class="card"> <img src="img\indiv\กุ้งโสร่ง.jpg" alt="กุ้งโสร่ง จัดเลี้ยง รายการ 3 ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>อาหารคาว รายการ 3</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </a> </div> </div> <div class="column"> <div class="content"> <div class="card btn" id="top-btn"> <img src="img\indiv\กุ้งผัดผงกะหรี่.jpg" alt="จัดเลี้ยง ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>อาหารคาว รายการ 4</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </div> </div> <div class="column"> <div class="content"> <a target="_blank" href="savory5-pics.html"> <div class="card"> <img src="img\indiv\กระทงทอง.jpg" alt="จัดเลี้ยง ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>อาหารคาว รายการ 5</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </a> </div> </div> <div class="column"> <div class="content"> <a target="_blank" href="savory6-pics.html"> <div class="card"> <img src="img\indiv\แกงเจ้าเต่า.jpg" alt="จัดเลี้ยง ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>อาหารคาว รายการพิเศษ</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </a> </div> </div> <div class="column"> <div class="content"> <a target="_blank" href="thai-desserts-pics.html"> <div class="card"> <img src="img\indiv\ส้มฉุน.jpg" alt="ส้มฉุน ของหวานไทย ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>ของหวานไทย</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </a> </div> </div> <div class="column"> <div class="content"> <a target="_blank" href="western-desserts-pics.html"> <div class="card"> <img src="img\indiv\เครปซูเซท.jpg" alt="เครปซูเซท ขนมฝรั่ง ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>ของหวานฝรั่ง</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </a> </div> </div> <div class="column"> <div class="content"> <a target="_blank" href="catering-pics.html"> <div class="card"> <img src="img\buffet_tables.jpg" alt="จัดเลี้ยง ใบไม้พระจันทร์" style="width:100%"> <div class="container"> <h4><b>รูปการจัดเลี้ยง</b></h4> <p>กดดูภาพและคำบรรยายเพิ่มเติม...</p> </div> </div> </a> </div> </div> </div> </div> </section> <section id="contact-anchor"> <aside class="banner"> <div class="container"> <div class="row"> <div class="col-lg-6 my-auto"> <div class="intrinsic-container intrinsic-container-16x9"> <iframe frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?q=place_id:ChIJdSIvFTh9HTERzAZ5hrNUfEQ&key=AIzaSyDCkcQlKpb_fgbfFPbpeVIxbgld89HUwLo" allowfullscreen></iframe> </div> <h3>ติดต่อเรา:</h3> <div id="left-float" class="col-lg-6 my-auto order-lg-1"> <p> ร้านใบไม้พระจันทร์<br> 1/224 เวนิส ช็อปปิ้ง พลาซ่า<br> ซอยวัชรพล 2/8 ท่าแรง บางเขน<br> กทม 10220 </p> </div> <div id="right-float" class="col-lg-6 my-auto order-lg-2"> <p> <i class="fa fa-phone fa-fw"></i> <a color="black" href="tel:+6620241480">02-024 1480</a><br> <i class="fa fa-mobile fa-fw"></i> <a color="black" href="tel:+66922674722">092-267-4722</a><br> <i class="fa fa-envelope fa-fw"></i> <a href="mailto:info.baimaiprachan@gmail.com">info.baimaiprachan@gmail.com</a><br> <i class="fa fa-facebook fa-fw"></i> <a href="https://www.facebook.com/BaimaiPrachanVeniceWatcharaphol/">ใบไม้พระจันทร์ ที่ เวนิสวัชรพล</a> </p> </div> </div> <div class="col-lg-6 my-auto"> <div class="container"> <form id="contact" action="https://docs.google.com/forms/d/e/1FAIpQLScoZ87o6UVzmfyJhSmSGnk7AvhhE4prnrpcjhWSRXATsndSIA/formResponse" method="post"> <h3>ส่งข้อความถึงทางร้าน</h3> <fieldset> <input name="entry.2005620554" placeholder="นามผู้ติดต่อ" type="text" tabindex="1" required> </fieldset> <fieldset> <input name="entry.1798251433" placeholder="อีเมล์ของท่าน" type="email" tabindex="2"> </fieldset> <fieldset> <input name="entry.1166974658" placeholder="เบอร์ติดต่อ" type="tel" tabindex="3" required> </fieldset> <fieldset> <textarea name="entry.839337160" placeholder="ข้อความ..." tabindex="4" required></textarea> </fieldset> <fieldset> <button name="submit" type="submit" id="contact-submit" data-submit="...กำลังส่งข้อความ">Submit</button> </fieldset> </form> </div> </div> </div> </div> <!-- /.container --> </aside> <!-- /.banner --> </section> <!-- Footer --> <footer> <div class="container"> <div id="left-float" class="col-lg-6 mr-auto order-lg-1"> <ul class="list-inline"> <li class="list-inline-item"> <a href="#">หน้าหลัก</a> </li> <li class="footer-menu-divider list-inline-item">&sdot;</li> <li class="list-inline-item"> <a href="#about">เกี่ยวกับเรา</a> </li> <li class="footer-menu-divider list-inline-item">&sdot;</li> <li class="list-inline-item"> <a href="#in-the-news">ในข่าว</a> </li> <li class="footer-menu-divider list-inline-item">&sdot;</li> <li class="list-inline-item"> <a href="#catering-buffet">จัดเลี้ยง</a> </li> <li class="list-inline-item"> <a href="#sample-menus">ตัวอย่างราคาจัดเลี้ยง</a> </li> <li class="list-inline-item"> <a href="#mains">อาหารคาว</a> </li> <li class="list-inline-item"> <a href="#desserts">ของหวาน</a> </li> <li class="list-inline-item"> <a href="#alms">เลี้ยงพระ</a> </li> <li class="footer-menu-divider list-inline-item">&sdot;</li> <li class="list-inline-item"> <a href="#restaurant">ร้านอาหาร</a> </li> <li class="footer-menu-divider list-inline-item">&sdot;</li> <li class="list-inline-item"> <a href="#gallery">ดูรูป</a> </li> </ul> <p class="copyright text-muted small">Copyright &copy; Baimaiprachan 2019. All Rights Reserved</p> </div> <div id="left-float" class="col-lg-6 mr-auto order-lg-2"> <div class="line-it-button" style="display: inline; width: 72px; height: 28px;" data-lang="en" data-type="share-a" data-url="https://www.baimaiprachan.com/"> </div> <script src="https://d.line-scdn.net/r/web/social-plugin/js/thirdparty/loader.min.js" async="async" defer="defer"></script> <div class="box"> <iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FBaimaiPrachanVeniceWatcharaphol%2F&width=125&layout=button_count&action=like&size=small&show_faces=false&share=true&height=46&appId=119989415323780" width="125" height="46" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"> </iframe> </div> <a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-url="https://www.baimaiprachan.com/savory4-pics.html" data-via="baimaiprachan" data-show-count="false"> TweetNow</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </div> </div> </footer> <!-- Bootstrap core JavaScript --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </body> </html>
baimaiprachan/baimaiprachan.github.io
savory4-pics.html
HTML
mit
27,408