answer
stringlengths
15
1.25M
/** * Get a number suffix * e.g. 1 -> st * @param {int} i number to get suffix * @return suffix */ var getSuffix = function (i) { var j = i % 10, k = i % 100; if (j == 1 && k != 11) { return i + "st"; } if (j == 2 && k != 12) { return i + "nd"; } if (j == 3 && k != 13) { return i + "rd"; } return i + "th"; } module.exports = { getSuffix: getSuffix, };
# Minitest::Mock::Easily use MiniTest::Mock with easier API ## Installation Add this line to your application's Gemfile: gem '<API key>' And then execute: $ bundle Or install it yourself as: $ gem install <API key> ## Usage include MockEasily m = mock do expect :hello, 'hello' expect :world, 'world' end assert_equal 'hello', m.hello assert_equal 'world', m.world ## Contributing 1. Fork it ( http://github.com/<my-github-username>/<API key>/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
redirect_to: - http://tech.hbc.com/<API key>.html layout:: post title: Welcome Jonathan Leibiusky! date: '2013-10-04T15:24:00-04:00' tags: - Jonathan Leibiusky - Infrastructure Engineering - people - gilt tech - nyc - immutable deployment - xetorthio tumblr_url: http://tech.gilt.com/post/63102481375/<API key> <p><img alt="image" height="597" src="http://media.tumblr.com/<API key>/<API key>.jpg" width="800"/></p> <p>We&rsquo;re excited to have Jonathan Leibiusky join Gilt&rsquo;s Infrastructure Engineering team! Jon will work from NYC and help us to drive <a href="http: <p>More about Jon:</p> <ul><li>He&rsquo;s originally from Argentina, but spent some of his childhood in Israel</li> <li>Previous job: Head of Research &amp; Development for <a href="http: <li>He&rsquo;s a fan of Node.js and Go</li> <li>Preferred IDE: vim</li> <li>Preferred OS: Ubuntu + xfce</li> <li>Plays some ukelele (and guitar)</li> <li><a href="https: </ul>
namespace CSharpGL { partial class FormPropertyGrid { <summary> Required designer variable. </summary> private System.ComponentModel.IContainer components = null; <summary> Clean up any resources being used. </summary> <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code <summary> Required method for Designer support - do not modify the contents of this method with the code editor. </summary> private void InitializeComponent() { this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); this.SuspendLayout(); // propertyGrid1 this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill; this.propertyGrid1.Font = new System.Drawing.Font("", 12F); this.propertyGrid1.Location = new System.Drawing.Point(0, 0); this.propertyGrid1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.propertyGrid1.Name = "propertyGrid1"; this.propertyGrid1.Size = new System.Drawing.Size(534, 545); this.propertyGrid1.TabIndex = 0; // FormProperyGrid this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(534, 545); this.Controls.Add(this.propertyGrid1); this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.Name = "FormProperyGrid"; this.Text = "FormPropertyGrid"; this.ResumeLayout(false); } #endregion private System.Windows.Forms.PropertyGrid propertyGrid1; } }
package net.pinemz.hm.gui; import net.pinemz.hm.R; import net.pinemz.hm.api.HmApi; import net.pinemz.hm.api.Prefecture; import net.pinemz.hm.api.<API key>; import net.pinemz.hm.storage.CommonSettings; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.Toast; import com.android.volley.RequestQueue; import com.android.volley.toolbox.Volley; import com.google.common.base.Optional; public class SettingsActivity extends BasicActivity { public static final String TAG = "SettingsActivity"; private RequestQueue requestQueue; private HmApi hmApi; private <API key> prefectures; private CommonSettings settings; private ListView listViewPrefectures; @Override protected void onCreate(Bundle savedInstanceState) { Log.d(TAG, "onCreate"); super.onCreate(savedInstanceState); this.setContentView(R.layout.activity_settings); this.requestQueue = Volley.newRequestQueue(this.<API key>()); this.hmApi = new HmApi(this.<API key>(), this.requestQueue); this.listViewPrefectures = (ListView)this.findViewById(R.id.listViewPrefectures); assert this.listViewPrefectures != null; this.settings = new CommonSettings(this.<API key>()); } @Override protected void onResume() { Log.d(TAG, "onResume"); super.onResume(); this.loadPrefectures(); } @Override protected void onPause() { Log.d(TAG, "onPause"); super.onPause(); } @Override protected void onDestroy() { Log.d(TAG, "onDestroy"); super.onDestroy(); this.requestQueue = null; this.hmApi = null; this.settings = null; } @Override public boolean onCreateOptionsMenu(Menu menu) { Log.d(TAG, "onCreateOptionsMenu"); super.onCreateOptionsMenu(menu); return true; } @Override public boolean <API key>(MenuItem item) { Log.d(TAG, "<API key>"); return super.<API key>(item); } public void okButtonClicked(View view) { Log.d(TAG, "okButtonClicked"); assert view instanceof Button; int checkedPosition = this.listViewPrefectures.<API key>(); Log.v(TAG, "onButtonClicked><API key> = " + checkedPosition); if (checkedPosition == ListView.INVALID_POSITION) { return; } String <API key> = (String)this.listViewPrefectures.getItemAtPosition(checkedPosition); assert <API key> != null; Optional<Prefecture> prefecture = this.prefectures.getByName(<API key>); if (prefecture.isPresent()) { Log.i(TAG, "Prefecture.id = " + prefecture.get().getId()); Log.i(TAG, "Prefecture.name = " + prefecture.get().getName()); this.saveSettings(prefecture.get()); } } public void cancelButtonClicked(View view) { Log.d(TAG, "cancelButtonClicked"); assert view instanceof Button; this.cancelSettings(); } private void setPrefectures(<API key> prefectures) { Log.d(TAG, "setPrefectures"); this.prefectures = prefectures; assert prefectures != null; ArrayAdapter<String> adapter = new ArrayAdapter<>( this.<API key>(), android.R.layout.<API key>, prefectures.getNames() ); this.listViewPrefectures.setAdapter(adapter); this.listViewPrefectures.setChoiceMode(ListView.CHOICE_MODE_SINGLE); if (adapter.getCount() > 0) { int prefectureId = this.settings.loadPrefectureId(); if (prefectureId < 0) { prefectureId = prefectures.getIds()[0]; } Integer[] ids = prefectures.getIds(); for (int i = 0; i < ids.length; ++i) { if (ids[i] == prefectureId) { this.listViewPrefectures.setItemChecked(i, true); break; } } } } private void saveSettings(Prefecture prefecture) { Log.d(TAG, "saveSettings"); assert prefecture != null; this.settings.savePrefectureId(prefecture.getId()); Toast.makeText( this.<API key>(), R.string.setting_save_toast, Toast.LENGTH_SHORT ).show(); this.finish(); } private void cancelSettings() { Toast.makeText( this.<API key>(), R.string.<API key>, Toast.LENGTH_SHORT ).show(); this.finish(); } private void loadPrefectures() { this.showProgressDialog(R.string.<API key>); this.hmApi.getPrefectures(new HmApi.Listener<<API key>>() { @Override public void onSuccess(HmApi api, <API key> data) { Log.d(TAG, "HmApi.Listener#onSuccess"); SettingsActivity.this.closeDialog(); SettingsActivity.this.setPrefectures(data); } @Override public void onFailure() { Log.e(TAG, "HmApi.Listener#onFailure"); SettingsActivity.this.<API key>( R.string.<API key>, R.string.<API key> ); } @Override public void onException(Exception exception) { Log.e(TAG, "HmApi.Listener#onException", exception); SettingsActivity.this.<API key>( R.string.network_error_title, R.string.<API key> ); } }); } }
'use strict'; const chai = require('chai'), expect = chai.expect, config = require('../config/config'), Support = require('./support'), dialect = Support.getTestDialect(), Sequelize = Support.Sequelize, fs = require('fs'), path = require('path'); if (dialect === 'sqlite') { var sqlite3 = require('sqlite3'); // eslint-disable-line } describe(Support.<API key>('Configuration'), () => { describe('Connections problems should fail with a nice message', () => { it('when we don\'t have the correct server details', () => { const seq = new Sequelize(config[dialect].database, config[dialect].username, config[dialect].password, { storage: '/path/to/no/where/land', logging: false, host: '0.0.0.1', port: config[dialect].port, dialect }); if (dialect === 'sqlite') { // SQLite doesn't have a breakdown of error codes, so we are unable to discern between the different types of errors. return expect(seq.query('select 1 as hello')).to.eventually.be.rejectedWith(Sequelize.ConnectionError, 'SQLITE_CANTOPEN: unable to open database file'); } return expect(seq.query('select 1 as hello')).to.eventually.be.rejectedWith([Sequelize.<API key>, Sequelize.<API key>]); }); it('when we don\'t have the correct login information', () => { if (dialect === 'mssql') { // NOTE: Travis seems to be having trouble with this test against the // AWS instance. Works perfectly fine on a local setup. expect(true).to.be.true; return; } const seq = new Sequelize(config[dialect].database, config[dialect].username, 'fakepass123', { logging: false, host: config[dialect].host, port: 1, dialect }); if (dialect === 'sqlite') { // SQLite doesn't require authentication and `select 1 as hello` is a valid query, so this should be fulfilled not rejected for it. return expect(seq.query('select 1 as hello')).to.eventually.be.fulfilled; } return expect(seq.query('select 1 as hello')).to.eventually.be.rejectedWith(Sequelize.<API key>, 'connect ECONNREFUSED'); }); it('when we don\'t have a valid dialect.', () => { expect(() => { new Sequelize(config[dialect].database, config[dialect].username, config[dialect].password, { host: '0.0.0.1', port: config[dialect].port, dialect: 'some-fancy-dialect' }); }).to.throw(Error, 'The dialect some-fancy-dialect is not supported. Supported dialects: mssql, mariadb, mysql, postgres, and sqlite.'); }); }); describe('Instantiation with arguments', () => { if (dialect === 'sqlite') { it('should respect READONLY / READWRITE connection modes', () => { const p = path.join(__dirname, '../tmp', 'foo.sqlite'); const createTableFoo = 'CREATE TABLE foo (faz TEXT);'; const createTableBar = 'CREATE TABLE bar (baz TEXT);'; const testAccess = Sequelize.Promise.method(() => { return Sequelize.Promise.promisify(fs.access)(p, fs.R_OK | fs.W_OK); }); return Sequelize.Promise.promisify(fs.unlink)(p) .catch(err => { expect(err.code).to.equal('ENOENT'); }) .then(() => { const sequelizeReadOnly = new Sequelize('sqlite://foo', { storage: p, dialectOptions: { mode: sqlite3.OPEN_READONLY } }); const sequelizeReadWrite = new Sequelize('sqlite://foo', { storage: p, dialectOptions: { mode: sqlite3.OPEN_READWRITE } }); expect(sequelizeReadOnly.config.dialectOptions.mode).to.equal(sqlite3.OPEN_READONLY); expect(sequelizeReadWrite.config.dialectOptions.mode).to.equal(sqlite3.OPEN_READWRITE); return Sequelize.Promise.join( sequelizeReadOnly.query(createTableFoo) .should.be.rejectedWith(Error, 'SQLITE_CANTOPEN: unable to open database file'), sequelizeReadWrite.query(createTableFoo) .should.be.rejectedWith(Error, 'SQLITE_CANTOPEN: unable to open database file') ); }) .then(() => { // By default, sqlite creates a connection that's READWRITE | CREATE const sequelize = new Sequelize('sqlite://foo', { storage: p }); return sequelize.query(createTableFoo); }) .then(testAccess) .then(() => { const sequelizeReadOnly = new Sequelize('sqlite://foo', { storage: p, dialectOptions: { mode: sqlite3.OPEN_READONLY } }); const sequelizeReadWrite = new Sequelize('sqlite://foo', { storage: p, dialectOptions: { mode: sqlite3.OPEN_READWRITE } }); return Sequelize.Promise.join( sequelizeReadOnly.query(createTableBar) .should.be.rejectedWith(Error, 'SQLITE_READONLY: attempt to write a readonly database'), sequelizeReadWrite.query(createTableBar) ); }) .finally(() => { return Sequelize.Promise.promisify(fs.unlink)(p); }); }); } }); });
package uk.jamierocks.zinc.example; import com.google.common.collect.Lists; import org.spongepowered.api.command.CommandResult; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.command.args.CommandArgs; import org.spongepowered.api.text.Text; import uk.jamierocks.zinc.Command; import uk.jamierocks.zinc.TabComplete; import java.util.List; public class ExampleCommands { @Command(name = "example") public CommandResult exampleCommand(CommandSource source, CommandArgs args) { source.sendMessage(Text.of("This is the base command.")); return CommandResult.success(); } @Command(parent = "example", name = "sub") public CommandResult exampleSubCommand(CommandSource source, CommandArgs args) { source.sendMessage(Text.of("This is a sub command.")); return CommandResult.success(); } @TabComplete(name = "example") public List<String> tabComplete(CommandSource source, String args) { return Lists.newArrayList(); } }
import * as strings from 'vs/base/common/strings'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { ApplyEditsResult, EndOfLinePreference, FindMatch, <API key>, <API key>, ITextBuffer, ITextSnapshot, <API key>, IValidEditOperation } from 'vs/editor/common/model'; import { PieceTreeBase, StringBuffer } from 'vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase'; import { SearchData } from 'vs/editor/common/model/textModelSearch'; import { countEOL, StringEOL } from 'vs/editor/common/model/tokensStore'; import { TextChange } from 'vs/editor/common/model/textChange'; export interface <API key> { sortIndex: number; identifier: <API key> | null; range: Range; rangeOffset: number; rangeLength: number; text: string; eolCount: number; firstLineLength: number; lastLineLength: number; forceMoveMarkers: boolean; <API key>: boolean; } export interface <API key> extends IValidEditOperation { sortIndex: number; } export class PieceTreeTextBuffer implements ITextBuffer { private readonly _pieceTree: PieceTreeBase; private readonly _BOM: string; private _mightContainRTL: boolean; private <API key>: boolean; constructor(chunks: StringBuffer[], BOM: string, eol: '\r\n' | '\n', containsRTL: boolean, isBasicASCII: boolean, eolNormalized: boolean) { this._BOM = BOM; this.<API key> = !isBasicASCII; this._mightContainRTL = containsRTL; this._pieceTree = new PieceTreeBase(chunks, eol, eolNormalized); } // #region TextBuffer public equals(other: ITextBuffer): boolean { if (!(other instanceof PieceTreeTextBuffer)) { return false; } if (this._BOM !== other._BOM) { return false; } if (this.getEOL() !== other.getEOL()) { return false; } return this._pieceTree.equal(other._pieceTree); } public mightContainRTL(): boolean { return this._mightContainRTL; } public <API key>(): boolean { return this.<API key>; } public getBOM(): string { return this._BOM; } public getEOL(): '\r\n' | '\n' { return this._pieceTree.getEOL(); } public createSnapshot(preserveBOM: boolean): ITextSnapshot { return this._pieceTree.createSnapshot(preserveBOM ? this._BOM : ''); } public getOffsetAt(lineNumber: number, column: number): number { return this._pieceTree.getOffsetAt(lineNumber, column); } public getPositionAt(offset: number): Position { return this._pieceTree.getPositionAt(offset); } public getRangeAt(start: number, length: number): Range { let end = start + length; const startPosition = this.getPositionAt(start); const endPosition = this.getPositionAt(end); return new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column); } public getValueInRange(range: Range, eol: EndOfLinePreference = EndOfLinePreference.TextDefined): string { if (range.isEmpty()) { return ''; } const lineEnding = this._getEndOfLine(eol); return this._pieceTree.getValueInRange(range, lineEnding); } public <API key>(range: Range, eol: EndOfLinePreference = EndOfLinePreference.TextDefined): number { if (range.isEmpty()) { return 0; } if (range.startLineNumber === range.endLineNumber) { return (range.endColumn - range.startColumn); } let startOffset = this.getOffsetAt(range.startLineNumber, range.startColumn); let endOffset = this.getOffsetAt(range.endLineNumber, range.endColumn); return endOffset - startOffset; } public <API key>(range: Range, eol: EndOfLinePreference = EndOfLinePreference.TextDefined): number { if (this.<API key>) { // we must count by iterating let result = 0; const fromLineNumber = range.startLineNumber; const toLineNumber = range.endLineNumber; for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) { const lineContent = this.getLineContent(lineNumber); const fromOffset = (lineNumber === fromLineNumber ? range.startColumn - 1 : 0); const toOffset = (lineNumber === toLineNumber ? range.endColumn - 1 : lineContent.length); for (let offset = fromOffset; offset < toOffset; offset++) { if (strings.isHighSurrogate(lineContent.charCodeAt(offset))) { result = result + 1; offset = offset + 1; } else { result = result + 1; } } } result += this._getEndOfLine(eol).length * (toLineNumber - fromLineNumber); return result; } return this.<API key>(range, eol); } public getLength(): number { return this._pieceTree.getLength(); } public getLineCount(): number { return this._pieceTree.getLineCount(); } public getLinesContent(): string[] { return this._pieceTree.getLinesContent(); } public getLineContent(lineNumber: number): string { return this._pieceTree.getLineContent(lineNumber); } public getLineCharCode(lineNumber: number, index: number): number { return this._pieceTree.getLineCharCode(lineNumber, index); } public getLineLength(lineNumber: number): number { return this._pieceTree.getLineLength(lineNumber); } public getLineMinColumn(lineNumber: number): number { return 1; } public getLineMaxColumn(lineNumber: number): number { return this.getLineLength(lineNumber) + 1; } public <API key>(lineNumber: number): number { const result = strings.<API key>(this.getLineContent(lineNumber)); if (result === -1) { return 0; } return result + 1; } public <API key>(lineNumber: number): number { const result = strings.<API key>(this.getLineContent(lineNumber)); if (result === -1) { return 0; } return result + 2; } private _getEndOfLine(eol: EndOfLinePreference): string { switch (eol) { case EndOfLinePreference.LF: return '\n'; case EndOfLinePreference.CRLF: return '\r\n'; case EndOfLinePreference.TextDefined: return this.getEOL(); } throw new Error('Unknown EOL preference'); } public setEOL(newEOL: '\r\n' | '\n'): void { this._pieceTree.setEOL(newEOL); } public applyEdits(rawOperations: <API key>[], <API key>: boolean, computeUndoEdits: boolean): ApplyEditsResult { let mightContainRTL = this._mightContainRTL; let <API key> = this.<API key>; let canReduceOperations = true; let operations: <API key>[] = []; for (let i = 0; i < rawOperations.length; i++) { let op = rawOperations[i]; if (canReduceOperations && op._isTracked) { canReduceOperations = false; } let validatedRange = op.range; if (!mightContainRTL && op.text) { // check if the new inserted text contains RTL mightContainRTL = strings.containsRTL(op.text); } if (!<API key> && op.text) { <API key> = !strings.isBasicASCII(op.text); } let validText = ''; let eolCount = 0; let firstLineLength = 0; let lastLineLength = 0; if (op.text) { let strEOL: StringEOL; [eolCount, firstLineLength, lastLineLength, strEOL] = countEOL(op.text); const bufferEOL = this.getEOL(); const expectedStrEOL = (bufferEOL === '\r\n' ? StringEOL.CRLF : StringEOL.LF); if (strEOL === StringEOL.Unknown || strEOL === expectedStrEOL) { validText = op.text; } else { validText = op.text.replace(/\r\n|\r|\n/g, bufferEOL); } } operations[i] = { sortIndex: i, identifier: op.identifier || null, range: validatedRange, rangeOffset: this.getOffsetAt(validatedRange.startLineNumber, validatedRange.startColumn), rangeLength: this.<API key>(validatedRange), text: validText, eolCount: eolCount, firstLineLength: firstLineLength, lastLineLength: lastLineLength, forceMoveMarkers: Boolean(op.forceMoveMarkers), <API key>: op.<API key> || false }; } // Sort operations ascending operations.sort(PieceTreeTextBuffer._sortOpsAscending); let hasTouchingRanges = false; for (let i = 0, count = operations.length - 1; i < count; i++) { let rangeEnd = operations[i].range.getEndPosition(); let nextRangeStart = operations[i + 1].range.getStartPosition(); if (nextRangeStart.isBeforeOrEqual(rangeEnd)) { if (nextRangeStart.isBefore(rangeEnd)) { // overlapping ranges throw new Error('Overlapping ranges are not allowed!'); } hasTouchingRanges = true; } } if (canReduceOperations) { operations = this._reduceOperations(operations); } // Delta encode operations let reverseRanges = (computeUndoEdits || <API key> ? PieceTreeTextBuffer.<API key>(operations) : []); let <API key>: { lineNumber: number, oldContent: string }[] = []; if (<API key>) { for (let i = 0; i < operations.length; i++) { let op = operations[i]; let reverseRange = reverseRanges[i]; if (op.<API key> && op.range.isEmpty()) { // Record already the future line numbers that might be auto whitespace removal candidates on next edit for (let lineNumber = reverseRange.startLineNumber; lineNumber <= reverseRange.endLineNumber; lineNumber++) { let currentLineContent = ''; if (lineNumber === reverseRange.startLineNumber) { currentLineContent = this.getLineContent(op.range.startLineNumber); if (strings.<API key>(currentLineContent) !== -1) { continue; } } <API key>.push({ lineNumber: lineNumber, oldContent: currentLineContent }); } } } } let reverseOperations: <API key>[] | null = null; if (computeUndoEdits) { let <API key> = 0; reverseOperations = []; for (let i = 0; i < operations.length; i++) { const op = operations[i]; const reverseRange = reverseRanges[i]; const bufferText = this.getValueInRange(op.range); const reverseRangeOffset = op.rangeOffset + <API key>; <API key> += (op.text.length - bufferText.length); reverseOperations[i] = { sortIndex: op.sortIndex, identifier: op.identifier, range: reverseRange, text: bufferText, textChange: new TextChange(op.rangeOffset, bufferText, reverseRangeOffset, op.text) }; } // Can only sort reverse operations when the order is not significant if (!hasTouchingRanges) { reverseOperations.sort((a, b) => a.sortIndex - b.sortIndex); } } this._mightContainRTL = mightContainRTL; this.<API key> = <API key>; const contentChanges = this._doApplyEdits(operations); let <API key>: number[] | null = null; if (<API key> && <API key>.length > 0) { // sort line numbers auto whitespace removal candidates for next edit descending <API key>.sort((a, b) => b.lineNumber - a.lineNumber); <API key> = []; for (let i = 0, len = <API key>.length; i < len; i++) { let lineNumber = <API key>[i].lineNumber; if (i > 0 && <API key>[i - 1].lineNumber === lineNumber) { // Do not have the same line number twice continue; } let prevContent = <API key>[i].oldContent; let lineContent = this.getLineContent(lineNumber); if (lineContent.length === 0 || lineContent === prevContent || strings.<API key>(lineContent) !== -1) { continue; } <API key>.push(lineNumber); } } return new ApplyEditsResult( reverseOperations, contentChanges, <API key> ); } /** * Transform operations such that they represent the same logic edit, * but that they also do not cause OOM crashes. */ private _reduceOperations(operations: <API key>[]): <API key>[] { if (operations.length < 1000) { // We know from empirical testing that a thousand edits work fine regardless of their shape. return operations; } // At one point, due to how events are emitted and how each operation is handled, // some operations can trigger a high amount of temporary string allocations, // that will immediately get edited again. // e.g. a formatter inserting ridiculous ammounts of \n on a model with a single line // Therefore, the strategy is to collapse all the operations into a huge single edit operation return [this.<API key>(operations)]; } <API key>(operations: <API key>[]): <API key> { let forceMoveMarkers = false; const firstEditRange = operations[0].range; const lastEditRange = operations[operations.length - 1].range; const entireEditRange = new Range(firstEditRange.startLineNumber, firstEditRange.startColumn, lastEditRange.endLineNumber, lastEditRange.endColumn); let lastEndLineNumber = firstEditRange.startLineNumber; let lastEndColumn = firstEditRange.startColumn; const result: string[] = []; for (let i = 0, len = operations.length; i < len; i++) { const operation = operations[i]; const range = operation.range; forceMoveMarkers = forceMoveMarkers || operation.forceMoveMarkers; // (1) -- Push old text result.push(this.getValueInRange(new Range(lastEndLineNumber, lastEndColumn, range.startLineNumber, range.startColumn))); // (2) -- Push new text if (operation.text.length > 0) { result.push(operation.text); } lastEndLineNumber = range.endLineNumber; lastEndColumn = range.endColumn; } const text = result.join(''); const [eolCount, firstLineLength, lastLineLength] = countEOL(text); return { sortIndex: 0, identifier: operations[0].identifier, range: entireEditRange, rangeOffset: this.getOffsetAt(entireEditRange.startLineNumber, entireEditRange.startColumn), rangeLength: this.<API key>(entireEditRange, EndOfLinePreference.TextDefined), text: text, eolCount: eolCount, firstLineLength: firstLineLength, lastLineLength: lastLineLength, forceMoveMarkers: forceMoveMarkers, <API key>: false }; } private _doApplyEdits(operations: <API key>[]): <API key>[] { operations.sort(PieceTreeTextBuffer._sortOpsDescending); let contentChanges: <API key>[] = []; // operations are from bottom to top for (let i = 0; i < operations.length; i++) { let op = operations[i]; const startLineNumber = op.range.startLineNumber; const startColumn = op.range.startColumn; const endLineNumber = op.range.endLineNumber; const endColumn = op.range.endColumn; if (startLineNumber === endLineNumber && startColumn === endColumn && op.text.length === 0) { // no-op continue; } if (op.text) { // replacement this._pieceTree.delete(op.rangeOffset, op.rangeLength); this._pieceTree.insert(op.rangeOffset, op.text, true); } else { // deletion this._pieceTree.delete(op.rangeOffset, op.rangeLength); } const contentChangeRange = new Range(startLineNumber, startColumn, endLineNumber, endColumn); contentChanges.push({ range: contentChangeRange, rangeLength: op.rangeLength, text: op.text, rangeOffset: op.rangeOffset, forceMoveMarkers: op.forceMoveMarkers }); } return contentChanges; } <API key>(searchRange: Range, searchData: SearchData, captureMatches: boolean, limitResultCount: number): FindMatch[] { return this._pieceTree.<API key>(searchRange, searchData, captureMatches, limitResultCount); } // #endregion // #region helper // testing purpose. public getPieceTree(): PieceTreeBase { return this._pieceTree; } /** * Assumes `operations` are validated and sorted ascending */ public static <API key>(operations: <API key>[]): Range[] { let result: Range[] = []; let prevOpEndLineNumber: number = 0; let prevOpEndColumn: number = 0; let prevOp: <API key> | null = null; for (let i = 0, len = operations.length; i < len; i++) { let op = operations[i]; let startLineNumber: number; let startColumn: number; if (prevOp) { if (prevOp.range.endLineNumber === op.range.startLineNumber) { startLineNumber = prevOpEndLineNumber; startColumn = prevOpEndColumn + (op.range.startColumn - prevOp.range.endColumn); } else { startLineNumber = prevOpEndLineNumber + (op.range.startLineNumber - prevOp.range.endLineNumber); startColumn = op.range.startColumn; } } else { startLineNumber = op.range.startLineNumber; startColumn = op.range.startColumn; } let resultRange: Range; if (op.text.length > 0) { // the operation inserts something const lineCount = op.eolCount + 1; if (lineCount === 1) { // single line insert resultRange = new Range(startLineNumber, startColumn, startLineNumber, startColumn + op.firstLineLength); } else { // multi line insert resultRange = new Range(startLineNumber, startColumn, startLineNumber + lineCount - 1, op.lastLineLength + 1); } } else { // There is nothing to insert resultRange = new Range(startLineNumber, startColumn, startLineNumber, startColumn); } prevOpEndLineNumber = resultRange.endLineNumber; prevOpEndColumn = resultRange.endColumn; result.push(resultRange); prevOp = op; } return result; } private static _sortOpsAscending(a: <API key>, b: <API key>): number { let r = Range.<API key>(a.range, b.range); if (r === 0) { return a.sortIndex - b.sortIndex; } return r; } private static _sortOpsDescending(a: <API key>, b: <API key>): number { let r = Range.<API key>(a.range, b.range); if (r === 0) { return b.sortIndex - a.sortIndex; } return -r; } // #endregion }
// Template Source: <API key>.java.tt package com.microsoft.graph.requests; import com.microsoft.graph.models.<API key>; import com.microsoft.graph.requests.<API key>; import javax.annotation.Nullable; import javax.annotation.Nonnull; import com.microsoft.graph.requests.<API key>; import com.microsoft.graph.http.BaseCollectionPage; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The class for the Terms And Conditions Acceptance Status Collection Page. */ public class <API key> extends BaseCollectionPage<<API key>, <API key>> { /** * A collection page for <API key> * * @param response the serialized <API key> from the service * @param builder the request builder for the next collection page */ public <API key>(@Nonnull final <API key> response, @Nonnull final <API key> builder) { super(response, builder); } /** * Creates the collection page for <API key> * * @param pageContents the contents of this page * @param nextRequestBuilder the request builder for the next page */ public <API key>(@Nonnull final java.util.List<<API key>> pageContents, @Nullable final <API key> nextRequestBuilder) { super(pageContents, nextRequestBuilder); } }
#import <iWorkImport/TSUProgress.h> @class NSArray, NSObject<OS_dispatch_queue>; // Not exported @interface TSUProgressGroup : TSUProgress { NSArray *mChildren; NSArray *<API key>; NSObject<OS_dispatch_queue> *<API key>; } - (void)<API key>; - (void)<API key>:(id)arg1; - (id)<API key>:(double)arg1 queue:(id)arg2 handler:(id)arg3; - (_Bool)isIndeterminate; - (double)maxValue; - (double)value; - (void)dealloc; - (id)initWithChildren:(id)arg1; @end
Dockermail - Email Core ======= This image provides a secure, minimal mail server based on 'postfix' and 'dovecot'. All incoming mail to your domains is accepted. For outgoing mail, only authenticated (logged in with username and password) clients can send messages via STARTTLS. ## Setup You will need 2 folder on your host, one to store your configuration and another one to store your email. For example: * `/opt/dockermail/settings` * `/opt/dockermail/vmail` These will be mounted into container and store settings and email on host. All the configuration is done through a single `config.json` file, extra files (eg. SSL keys) will be stored in the settings directory for backup. There is an example file in `config/example` to get you started. # Remember to restart your container if you update the settings! config.json json { "settings": { "myhostname": "mail.example.com" }, "domains": { "example.com" : [ { "email": "info@example.com", "password": "{PLAIN}SuperSecure123", "aliases": ["@example.com"] }, { "email": "admin@example.com", "password": "{SHA256-CRYPT}$5$ojXGqoxOAygN91er$VQD/<API key>.NSrB3seZGXBRMdZAr6" } ] } } The hash within *config.json* contains 2 primary keys: `domains` and `settings`. ## settings * `myhostname` - should be the fully qualified domain of the server hosting email. Although optional you will have problems with EHLO commands and `amavis` without it. # domains Each domain has an array of account objects, each account has the following keys: * `email` - email address of the account. Will also be used as the login. * `password` - password for the account. See below for details. * `aliases` - (Optional) Array of aliases to redirect to this account. For a catch-all use your domain with no account, eg: `@example.com`. ## Generating passwords Passwords have to be in a dovecot format. A plain-text password looks like this: `{PLAIN}SuperSecure123`. To get more secure hash values, you need to start the container and run: bash docker exec -it [<API key>] doveadm pw -s [scheme-name] This will attach to a running container, prompt you for a password and provide a hash. For example: bash > docker exec -it dockermail_core_1 doveadm pw -s SHA512-CRYPT Enter new password: Retype new password: {SHA512-CRYPT}$6$OA/BzvLzf7C9uohz$a9B0kCihcHsfnK.x4xJWHs9V7.<API key>.<API key>/ See [Dovecot Wiki](http://wiki.dovecot.org/Authentication/PasswordSchemes) for more details on different schemes. ## Run Using the pre-built image from docker hub, you can start your email by running: bash docker run -name dockermail -d \ -p 25:25 -p 587:587 -p 143:143 -p 993:993 \ -v /opt/dockermail/settings:/mail_settings \ -v /opt/dockermail/vmail:/vmail \ adaline/dockermail-core This will connect SMTP ports 25/587 and IMAP port 143/993 to host and mount the folders as per examples given above. ## SSL Container will produce own SSL keys and back these up into the settings folder. These files are: ssl-cert-snakeoil.key ssl-cert-snakeoil.pem On boot it will use these if present. You can replace these backup keys with your own, just restart the container.
/** @file safesysstat.h * @brief #include <sys/stat.h> with portability enhancements */ #ifndef <API key> #define <API key> #include <sys/stat.h> #include <sys/types.h> #ifdef __WIN32__ // MSVC lacks these POSIX macros and other compilers may too: #ifndef S_ISDIR # define S_ISDIR(ST_MODE) (((ST_MODE) & _S_IFMT) == _S_IFDIR) #endif #ifndef S_ISREG # define S_ISREG(ST_MODE) (((ST_MODE) & _S_IFMT) == _S_IFREG) #endif // On UNIX, mkdir() is prototyped in <sys/stat.h> but on Windows it's in // <direct.h>, so just include that from here to avoid build failures on // MSVC just because of some new use of mkdir(). This also reduces the // number of conditionalised #include statements we need in the sources. #include <direct.h> // Add overloaded version of mkdir which takes an (ignored) mode argument // to allow source code to just specify a mode argument unconditionally. // The () around mkdir are in case it's defined as a macro. inline int (mkdir)(const char *pathname, mode_t /*mode*/) { return _mkdir(pathname); } #else // These were specified by POSIX.1-1996, so most platforms should have // these by now: #ifndef S_ISDIR # define S_ISDIR(ST_MODE) (((ST_MODE) & S_IFMT) == S_IFDIR) #endif #ifndef S_ISREG # define S_ISREG(ST_MODE) (((ST_MODE) & S_IFMT) == S_IFREG) #endif #endif #endif /* <API key> */
// Script by Bo Tranberg // This script requires jQuery and jQuery UI $(function() { // Inser html for dialog just before the button to open it var butt = document.getElementById('citations'); butt.insertAdjacentHTML('beforeBegin', '\ <div id="dialog" title="Cite this paper" style="text-align:left"> \ <p style="text-align: center;"><b>Copy and paste one of the formatted citations into your bibliography manager.</b></p> \ <table style="border-collapse:separate; border-spacing:2em"> \ <tr style="vertical-align:top;"> \ <td><strong>APA</strong></td> \ <td><span id="APA1"></span><span id="APA2"></span><span id="APA3"></span><span id="APA4" style="font-style: italic"></span></td> \ </tr> \ <tr style="vertical-align:top;"> \ <td><strong>Bibtex</strong></td> \ <td> \ @article{<span id="bibtag"></span>,<br> \ &nbsp;&nbsp;&nbsp;&nbsp;title={<span id="bibtitle"></span>},<br> \ &nbsp;&nbsp;&nbsp;&nbsp;author={<span id="bibauthor"></span>},<br> \ &nbsp;&nbsp;&nbsp;&nbsp;journal={<span id="bibjournal"></span>},<br> \ &nbsp;&nbsp;&nbsp;&nbsp;year={<span id="bibyear"></span>},<br> \ &nbsp;&nbsp;&nbsp;&nbsp;url={<span id="biburl"></span>},<br> \ } \ </td> \ </tr> \ </table> \ </div>'); // Definitions of citations dialog $("#dialog").dialog({ autoOpen: false, show: { effect: "fade", duration: 200 }, hide: { effect: "fade", duration: 200 }, maxWidth:600, maxHeight: 600, width: 660, height: 400, modal: true, }); // Open citation dialog on click $("#citations").click(function() { $("#dialog").dialog("open"); }); // Find authors var metas = document.<API key>('meta'); var author = '' // Determine number of authors var numAuthors = 0 for (i=0; i<metas.length; i++) { if (metas[i].getAttribute("name") == "citation_author") { numAuthors += 1 }; }; // Build a string of authors for Bibtex var authorIndex = 0 for (i=0; i<metas.length; i++) { if (metas[i].getAttribute("name") == "citation_author") { authorIndex += 1 if (authorIndex>1) { if (authorIndex<=numAuthors) { author = author+' and ' }; }; author = author+metas[i].getAttribute("content") }; }; // Populate formatted citations in Bibtex var title = $("meta[name='citation_title']").attr('content') // The following test might seem stupid, but it's needed because some php function at OpenPsych appends two whitespaces to the start of the title in the meta data if (title[1] == ' ') { title = title.slice(2) }; var journal = $("meta[name='<API key>']").attr('content') var pubyear = $("meta[name='<API key>']").attr('content').substring(0,4) var puburl = document.URL // Build a string for the Bibtex tag if (author.indexOf(',') < author.indexOf(' ')) { var firstAuthor = author.substr(0,author.indexOf(',')); } else { var firstAuthor = author.substr(0,author.indexOf(' ')); }; if (title.indexOf(',')<title.indexOf('0')) { var startTitle = title.substr(0,title.indexOf(',')); } else { var startTitle = title.substr(0,title.indexOf(' ')); }; $('#bibtag').html(firstAuthor+pubyear) $('#bibtitle').html(title) $('#bibauthor').html(author) $('#bibjournal').html(journal) $('#bibyear').html(pubyear) $('#biburl').html(puburl) //Build a string of authors for APA var author = '' var authorIndex = 0 for (i=0; i<metas.length; i++) { if (metas[i].getAttribute("name") == "citation_author") { authorIndex += 1 if (authorIndex>1) { if (authorIndex<numAuthors) { author = author+', ' }; }; if (authorIndex>1) { if (authorIndex===numAuthors) { author = author+', & ' }; }; // Check if author only has a single name if (metas[i].getAttribute("content").indexOf(', ')>0) { // Append author string with the surnames and first letter of next author's name author = author+metas[i].getAttribute("content").substr(0,metas[i].getAttribute("content").indexOf(', ')+3)+'.' // If the author has several names, append the first letter of these to the string if (metas[i].getAttribute("content").indexOf(', ') < metas[i].getAttribute("content").lastIndexOf(' ')-1) { var extraNames = metas[i].getAttribute("content").substr(metas[i].getAttribute("content").indexOf(', ')+2) var addNames = extraNames.substr(extraNames.indexOf(' ')) author = author+addNames.substr(addNames.indexOf(' ')) }; } else { author = author+metas[i].getAttribute("content") }; }; }; // Populate formatted citations in APA $('#APA1').html(author) $('#APA2').html(' ('+pubyear+').') $('#APA3').html(' '+title+'.') $('#APA4').html(' '+journal+'.') });
{% extends "base.html" %} {% block content %} <h1>{{ question.question_text }}</h1> {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %} <form action="{% url 'polls:vote' question.id %}" method="post"> {% csrf_token %} {% for choice in question.choice_set.all %} <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" /> <label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</label><br/> {% endfor %} <input type="submit" value="Vote" /> </form> {% endblock content %}
package io.github.ageofwar.telejam.updates; import io.github.ageofwar.telejam.Bot; import io.github.ageofwar.telejam.TelegramException; import io.github.ageofwar.telejam.methods.GetUpdates; import java.io.IOException; import java.util.Collections; import java.util.Objects; import java.util.concurrent.<API key>; import java.util.function.LongUnaryOperator; /** * Utility class that reads new updates received from a bot. * * @author Michi Palazzo */ public final class UpdateReader implements AutoCloseable { private final Bot bot; private final <API key><Update> updates; private final LongUnaryOperator backOff; private long lastUpdateId; /** * Constructs an UpdateReader. * * @param bot the bot that receive updates * @param backOff back off to be used when long polling fails */ public UpdateReader(Bot bot, LongUnaryOperator backOff) { this.bot = Objects.requireNonNull(bot); this.backOff = Objects.requireNonNull(backOff); updates = new <API key><>(); lastUpdateId = -1; } /** * Constructs an UpdateReader. * * @param bot the bot that receive updates */ public UpdateReader(Bot bot) { this(bot, a -> 500L); } /** * Returns the number of updates that can be read from this update reader without blocking by the * next invocation read method for this update reader. The next invocation * might be the same thread or another thread. * If the available updates are more than {@code Integer.MAX_VALUE}, returns * {@code Integer.MAX_VALUE}. * * @return the number of updates that can be read from this update reader * without blocking by the next invocation read method */ public int available() { return updates.size(); } /** * Tells whether this stream is ready to be read. * * @return <code>true</code> if the next read() is guaranteed not to block for input, * <code>false</code> otherwise. Note that returning false does not guarantee that the * next read will block. */ public boolean ready() { return !updates.isEmpty(); } /** * Reads one update from the stream. * * @return the read update * @throws IOException if an I/O Exception occurs * @throws <API key> if any thread has interrupted the current * thread while waiting for updates */ public Update read() throws IOException, <API key> { if (!ready()) { for (long attempts = 0; getUpdates() == 0; attempts++) { Thread.sleep(backOff.applyAsLong(attempts)); } } return updates.remove(); } /** * Retrieves new updates received from the bot. * * @return number of updates received * @throws IOException if an I/O Exception occurs */ public int getUpdates() throws IOException { try { Update[] newUpdates = getUpdates(lastUpdateId + 1); Collections.addAll(updates, newUpdates); if (newUpdates.length > 0) { lastUpdateId = newUpdates[newUpdates.length - 1].getId(); } return newUpdates.length; } catch (Throwable e) { if (!(e instanceof TelegramException)) { lastUpdateId++; } throw e; } } /** * Discards buffered updates and all received updates. * * @throws IOException if an I/O Exception occurs */ public void discardAll() throws IOException { Update[] newUpdate = getUpdates(-1); if (newUpdate.length == 1) { lastUpdateId = newUpdate[0].getId(); } updates.clear(); } private Update[] getUpdates(long offset) throws IOException { GetUpdates getUpdates = new GetUpdates() .offset(offset) .allowedUpdates(); return bot.execute(getUpdates); } @Override public void close() throws IOException { try { Update nextUpdate = updates.peek(); getUpdates(nextUpdate != null ? nextUpdate.getId() : lastUpdateId + 1); lastUpdateId = -1; updates.clear(); } catch (IOException e) { throw new IOException("Unable to close update reader", e); } } }
@import url("//fonts.googleapis.com/css?family=News+Cycle:400,700"); article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } audio, canvas, video { display: inline-block; } audio:not([controls]) { display: none; height: 0; } [hidden], template { display: none; } html { font-family: sans-serif; -<API key>: 100%; -ms-text-size-adjust: 100%; } body { margin: 0; } a { background: transparent; } a:focus { outline: thin dotted; } a:active, a:hover { outline: 0; } h1 { margin: 0.67em 0; font-size: 2em; } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; } dfn { font-style: italic; } hr { height: 0; -moz-box-sizing: content-box; box-sizing: content-box; } mark { color: #000; background: #ff0; } code, kbd, pre, samp { font-family: monospace, serif; font-size: 1em; } pre { white-space: pre-wrap; } q { quotes: "\201C" "\201D" "\2018" "\2019"; } small { font-size: 80%; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img { border: 0; } svg:not(:root) { overflow: hidden; } figure { margin: 0; } fieldset { padding: 0.35em 0.625em 0.75em; margin: 0 2px; border: 1px solid #c0c0c0; } legend { padding: 0; border: 0; } button, input, select, textarea { margin: 0; font-family: inherit; font-size: 100%; } button, input { line-height: normal; } button, select { text-transform: none; } button, html input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } button[disabled], html input[disabled] { cursor: default; } input[type="checkbox"], input[type="radio"] { padding: 0; box-sizing: border-box; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-<API key>, input[type="search"]::-<API key> { -webkit-appearance: none; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } textarea { overflow: auto; vertical-align: top; } table { border-collapse: collapse; border-spacing: 0; } @media print { * { color: #000 !important; text-shadow: none !important; background: transparent !important; box-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } @page { margin: 2cm .5cm; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } select { background: #fff !important; } .navbar { display: none; } .table td, .table th { background-color: #fff !important; } .btn > .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px solid #000; } .table { border-collapse: collapse !important; } .table-bordered th, .table-bordered td { border: 1px solid #ddd !important; } } *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { font-size: 62.5%; -<API key>: rgba(0, 0, 0, 0); } body { /*font-family: Georgia, "Times New Roman", Times, serif;*/ font-size: 15px; line-height: 1.428571429; color: #777777; background-color: #ffffff; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } a { color: #eb6864; text-decoration: none; } a:hover, a:focus { color: #e22620; text-decoration: underline; } a:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } img { vertical-align: middle; } .img-responsive { display: block; height: auto; max-width: 100%; } .img-rounded { border-radius: 6px; } .img-thumbnail { display: inline-block; height: auto; max-width: 100%; padding: 4px; line-height: 1.428571429; background-color: #ffffff; border: 1px solid #dddddd; border-radius: 4px; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } .img-circle { border-radius: 50%; } hr { margin-top: 21px; margin-bottom: 21px; border: 0; border-top: 1px solid #eeeeee; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } p { margin: 0 0 10.5px; } .lead { margin-bottom: 21px; font-size: 17px; font-weight: 200; line-height: 1.4; } @media (min-width: 768px) { .lead { font-size: 22.5px; } } small, .small { font-size: 85%; } cite { font-style: normal; } .text-muted { color: #999999; } .text-primary { color: #eb6864; } .text-primary:hover { color: #e53c37; } .text-warning { color: #c09853; } .text-warning:hover { color: #a47e3c; } .text-danger { color: #b94a48; } .text-danger:hover { color: #953b39; } .text-success { color: #468847; } .text-success:hover { color: #356635; } .text-info { color: #3a87ad; } .text-info:hover { color: #2d6987; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: "News Cycle", "Arial Narrow Bold", sans-serif; font-weight: 700; line-height: 1.1; color: #000000; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { font-weight: normal; line-height: 1; color: #999999; } h1, h2, h3 { margin-top: 21px; margin-bottom: 10.5px; } h1 small, h2 small, h3 small, h1 .small, h2 .small, h3 .small { font-size: 65%; } h4, h5, h6 { margin-top: 10.5px; margin-bottom: 10.5px; } h4 small, h5 small, h6 small, h4 .small, h5 .small, h6 .small { font-size: 75%; } h1, .h1 { font-size: 39px; } h2, .h2 { font-size: 32px; } h3, .h3 { font-size: 26px; } h4, .h4 { font-size: 19px; } h5, .h5 { font-size: 15px; } h6, .h6 { font-size: 13px; } .page-header { padding-bottom: 9.5px; margin: 42px 0 21px; border-bottom: 1px solid #eeeeee; } ul, ol { margin-top: 0; margin-bottom: 10.5px; } ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; } .list-unstyled { padding-left: 0; list-style: none; } .list-inline { padding-left: 0; list-style: none; } .list-inline > li { display: inline-block; padding-right: 5px; padding-left: 5px; } .list-inline > li:first-child { padding-left: 0; } dl { margin-bottom: 21px; } dt, dd { line-height: 1.428571429; } dt { font-weight: bold; } dd { margin-left: 0; } @media (min-width: 768px) { .dl-horizontal dt { float: left; width: 160px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } .dl-horizontal dd:before, .dl-horizontal dd:after { display: table; content: " "; } .dl-horizontal dd:after { clear: both; } .dl-horizontal dd:before, .dl-horizontal dd:after { display: table; content: " "; } .dl-horizontal dd:after { clear: both; } .dl-horizontal dd:before, .dl-horizontal dd:after { display: table; content: " "; } .dl-horizontal dd:after { clear: both; } .dl-horizontal dd:before, .dl-horizontal dd:after { display: table; content: " "; } .dl-horizontal dd:after { clear: both; } .dl-horizontal dd:before, .dl-horizontal dd:after { display: table; content: " "; } .dl-horizontal dd:after { clear: both; } } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #999999; } abbr.initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 10.5px 21px; margin: 0 0 21px; border-left: 5px solid #eeeeee; } blockquote p { font-size: 18.75px; font-weight: 300; line-height: 1.25; } blockquote p:last-child { margin-bottom: 0; } blockquote small { display: block; line-height: 1.428571429; color: #999999; } blockquote small:before { content: '\2014 \00A0'; } blockquote.pull-right { padding-right: 15px; padding-left: 0; border-right: 5px solid #eeeeee; border-left: 0; } blockquote.pull-right p, blockquote.pull-right small, blockquote.pull-right .small { text-align: right; } blockquote.pull-right small:before, blockquote.pull-right .small:before { content: ''; } blockquote.pull-right small:after, blockquote.pull-right .small:after { content: '\00A0 \2014'; } blockquote:before, blockquote:after { content: ""; } address { margin-bottom: 21px; font-style: normal; line-height: 1.428571429; } code, kbd, pre, samp { font-family: Monaco, Menlo, Consolas, "Courier New", monospace; } code { padding: 2px 4px; font-size: 90%; color: #c7254e; white-space: nowrap; background-color: #f9f2f4; border-radius: 4px; } pre { display: block; padding: 10px; margin: 0 0 10.5px; font-size: 14px; line-height: 1.428571429; color: #333333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; } pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } .container { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } .container:before, .container:after { display: table; content: " "; } .container:after { clear: both; } .container:before, .container:after { display: table; content: " "; } .container:after { clear: both; } .container:before, .container:after { display: table; content: " "; } .container:after { clear: both; } .container:before, .container:after { display: table; content: " "; } .container:after { clear: both; } .container:before, .container:after { display: table; content: " "; } .container:after { clear: both; } .row { margin-right: -15px; margin-left: -15px; } .row:before, .row:after { display: table; content: " "; } .row:after { clear: both; } .row:before, .row:after { display: table; content: " "; } .row:after { clear: both; } .row:before, .row:after { display: table; content: " "; } .row:after { clear: both; } .row:before, .row:after { display: table; content: " "; } .row:after { clear: both; } .row:before, .row:after { display: table; content: " "; } .row:after { clear: both; } .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; } .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11 { float: left; } .col-xs-12 { width: 100%; } .col-xs-11 { width: 91.66666666666666%; } .col-xs-10 { width: 83.33333333333334%; } .col-xs-9 { width: 75%; } .col-xs-8 { width: 66.66666666666666%; } .col-xs-7 { width: 58.333333333333336%; } .col-xs-6 { width: 50%; } .col-xs-5 { width: 41.66666666666667%; } .col-xs-4 { width: 33.33333333333333%; } .col-xs-3 { width: 25%; } .col-xs-2 { width: 16.666666666666664%; } .col-xs-1 { width: 8.333333333333332%; } .col-xs-pull-12 { right: 100%; } .col-xs-pull-11 { right: 91.66666666666666%; } .col-xs-pull-10 { right: 83.33333333333334%; } .col-xs-pull-9 { right: 75%; } .col-xs-pull-8 { right: 66.66666666666666%; } .col-xs-pull-7 { right: 58.333333333333336%; } .col-xs-pull-6 { right: 50%; } .col-xs-pull-5 { right: 41.66666666666667%; } .col-xs-pull-4 { right: 33.33333333333333%; } .col-xs-pull-3 { right: 25%; } .col-xs-pull-2 { right: 16.666666666666664%; } .col-xs-pull-1 { right: 8.333333333333332%; } .col-xs-pull-0 { right: 0; } .col-xs-push-12 { left: 100%; } .col-xs-push-11 { left: 91.66666666666666%; } .col-xs-push-10 { left: 83.33333333333334%; } .col-xs-push-9 { left: 75%; } .col-xs-push-8 { left: 66.66666666666666%; } .col-xs-push-7 { left: 58.333333333333336%; } .col-xs-push-6 { left: 50%; } .col-xs-push-5 { left: 41.66666666666667%; } .col-xs-push-4 { left: 33.33333333333333%; } .col-xs-push-3 { left: 25%; } .col-xs-push-2 { left: 16.666666666666664%; } .col-xs-push-1 { left: 8.333333333333332%; } .col-xs-push-0 { left: 0; } .col-xs-offset-12 { margin-left: 100%; } .col-xs-offset-11 { margin-left: 91.66666666666666%; } .col-xs-offset-10 { margin-left: 83.33333333333334%; } .col-xs-offset-9 { margin-left: 75%; } .col-xs-offset-8 { margin-left: 66.66666666666666%; } .col-xs-offset-7 { margin-left: 58.333333333333336%; } .col-xs-offset-6 { margin-left: 50%; } .col-xs-offset-5 { margin-left: 41.66666666666667%; } .col-xs-offset-4 { margin-left: 33.33333333333333%; } .col-xs-offset-3 { margin-left: 25%; } .col-xs-offset-2 { margin-left: 16.666666666666664%; } .col-xs-offset-1 { margin-left: 8.333333333333332%; } .col-xs-offset-0 { margin-left: 0; } @media (min-width: 768px) { .container { width: 750px; } .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11 { float: left; } .col-sm-12 { width: 100%; } .col-sm-11 { width: 91.66666666666666%; } .col-sm-10 { width: 83.33333333333334%; } .col-sm-9 { width: 75%; } .col-sm-8 { width: 66.66666666666666%; } .col-sm-7 { width: 58.333333333333336%; } .col-sm-6 { width: 50%; } .col-sm-5 { width: 41.66666666666667%; } .col-sm-4 { width: 33.33333333333333%; } .col-sm-3 { width: 25%; } .col-sm-2 { width: 16.666666666666664%; } .col-sm-1 { width: 8.333333333333332%; } .col-sm-pull-12 { right: 100%; } .col-sm-pull-11 { right: 91.66666666666666%; } .col-sm-pull-10 { right: 83.33333333333334%; } .col-sm-pull-9 { right: 75%; } .col-sm-pull-8 { right: 66.66666666666666%; } .col-sm-pull-7 { right: 58.333333333333336%; } .col-sm-pull-6 { right: 50%; } .col-sm-pull-5 { right: 41.66666666666667%; } .col-sm-pull-4 { right: 33.33333333333333%; } .col-sm-pull-3 { right: 25%; } .col-sm-pull-2 { right: 16.666666666666664%; } .col-sm-pull-1 { right: 8.333333333333332%; } .col-sm-pull-0 { right: 0; } .col-sm-push-12 { left: 100%; } .col-sm-push-11 { left: 91.66666666666666%; } .col-sm-push-10 { left: 83.33333333333334%; } .col-sm-push-9 { left: 75%; } .col-sm-push-8 { left: 66.66666666666666%; } .col-sm-push-7 { left: 58.333333333333336%; } .col-sm-push-6 { left: 50%; } .col-sm-push-5 { left: 41.66666666666667%; } .col-sm-push-4 { left: 33.33333333333333%; } .col-sm-push-3 { left: 25%; } .col-sm-push-2 { left: 16.666666666666664%; } .col-sm-push-1 { left: 8.333333333333332%; } .col-sm-push-0 { left: 0; } .col-sm-offset-12 { margin-left: 100%; } .col-sm-offset-11 { margin-left: 91.66666666666666%; } .col-sm-offset-10 { margin-left: 83.33333333333334%; } .col-sm-offset-9 { margin-left: 75%; } .col-sm-offset-8 { margin-left: 66.66666666666666%; } .col-sm-offset-7 { margin-left: 58.333333333333336%; } .col-sm-offset-6 { margin-left: 50%; } .col-sm-offset-5 { margin-left: 41.66666666666667%; } .col-sm-offset-4 { margin-left: 33.33333333333333%; } .col-sm-offset-3 { margin-left: 25%; } .col-sm-offset-2 { margin-left: 16.666666666666664%; } .col-sm-offset-1 { margin-left: 8.333333333333332%; } .col-sm-offset-0 { margin-left: 0; } } @media (min-width: 992px) { .container { width: 970px; } .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11 { float: left; } .col-md-12 { width: 100%; } .col-md-11 { width: 91.66666666666666%; } .col-md-10 { width: 83.33333333333334%; } .col-md-9 { width: 75%; } .col-md-8 { width: 66.66666666666666%; } .col-md-7 { width: 58.333333333333336%; } .col-md-6 { width: 50%; } .col-md-5 { width: 41.66666666666667%; } .col-md-4 { width: 33.33333333333333%; } .col-md-3 { width: 25%; } .col-md-2 { width: 16.666666666666664%; } .col-md-1 { width: 8.333333333333332%; } .col-md-pull-12 { right: 100%; } .col-md-pull-11 { right: 91.66666666666666%; } .col-md-pull-10 { right: 83.33333333333334%; } .col-md-pull-9 { right: 75%; } .col-md-pull-8 { right: 66.66666666666666%; } .col-md-pull-7 { right: 58.333333333333336%; } .col-md-pull-6 { right: 50%; } .col-md-pull-5 { right: 41.66666666666667%; } .col-md-pull-4 { right: 33.33333333333333%; } .col-md-pull-3 { right: 25%; } .col-md-pull-2 { right: 16.666666666666664%; } .col-md-pull-1 { right: 8.333333333333332%; } .col-md-pull-0 { right: 0; } .col-md-push-12 { left: 100%; } .col-md-push-11 { left: 91.66666666666666%; } .col-md-push-10 { left: 83.33333333333334%; } .col-md-push-9 { left: 75%; } .col-md-push-8 { left: 66.66666666666666%; } .col-md-push-7 { left: 58.333333333333336%; } .col-md-push-6 { left: 50%; } .col-md-push-5 { left: 41.66666666666667%; } .col-md-push-4 { left: 33.33333333333333%; } .col-md-push-3 { left: 25%; } .col-md-push-2 { left: 16.666666666666664%; } .col-md-push-1 { left: 8.333333333333332%; } .col-md-push-0 { left: 0; } .col-md-offset-12 { margin-left: 100%; } .col-md-offset-11 { margin-left: 91.66666666666666%; } .col-md-offset-10 { margin-left: 83.33333333333334%; } .col-md-offset-9 { margin-left: 75%; } .col-md-offset-8 { margin-left: 66.66666666666666%; } .col-md-offset-7 { margin-left: 58.333333333333336%; } .col-md-offset-6 { margin-left: 50%; } .col-md-offset-5 { margin-left: 41.66666666666667%; } .col-md-offset-4 { margin-left: 33.33333333333333%; } .col-md-offset-3 { margin-left: 25%; } .col-md-offset-2 { margin-left: 16.666666666666664%; } .col-md-offset-1 { margin-left: 8.333333333333332%; } .col-md-offset-0 { margin-left: 0; } } @media (min-width: 1200px) { .container { width: 1170px; } .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11 { float: left; } .col-lg-12 { width: 100%; } .col-lg-11 { width: 91.66666666666666%; } .col-lg-10 { width: 83.33333333333334%; } .col-lg-9 { width: 75%; } .col-lg-8 { width: 66.66666666666666%; } .col-lg-7 { width: 58.333333333333336%; } .col-lg-6 { width: 50%; } .col-lg-5 { width: 41.66666666666667%; } .col-lg-4 { width: 33.33333333333333%; } .col-lg-3 { width: 25%; } .col-lg-2 { width: 16.666666666666664%; } .col-lg-1 { width: 8.333333333333332%; } .col-lg-pull-12 { right: 100%; } .col-lg-pull-11 { right: 91.66666666666666%; } .col-lg-pull-10 { right: 83.33333333333334%; } .col-lg-pull-9 { right: 75%; } .col-lg-pull-8 { right: 66.66666666666666%; } .col-lg-pull-7 { right: 58.333333333333336%; } .col-lg-pull-6 { right: 50%; } .col-lg-pull-5 { right: 41.66666666666667%; } .col-lg-pull-4 { right: 33.33333333333333%; } .col-lg-pull-3 { right: 25%; } .col-lg-pull-2 { right: 16.666666666666664%; } .col-lg-pull-1 { right: 8.333333333333332%; } .col-lg-pull-0 { right: 0; } .col-lg-push-12 { left: 100%; } .col-lg-push-11 { left: 91.66666666666666%; } .col-lg-push-10 { left: 83.33333333333334%; } .col-lg-push-9 { left: 75%; } .col-lg-push-8 { left: 66.66666666666666%; } .col-lg-push-7 { left: 58.333333333333336%; } .col-lg-push-6 { left: 50%; } .col-lg-push-5 { left: 41.66666666666667%; } .col-lg-push-4 { left: 33.33333333333333%; } .col-lg-push-3 { left: 25%; } .col-lg-push-2 { left: 16.666666666666664%; } .col-lg-push-1 { left: 8.333333333333332%; } .col-lg-push-0 { left: 0; } .col-lg-offset-12 { margin-left: 100%; } .col-lg-offset-11 { margin-left: 91.66666666666666%; } .col-lg-offset-10 { margin-left: 83.33333333333334%; } .col-lg-offset-9 { margin-left: 75%; } .col-lg-offset-8 { margin-left: 66.66666666666666%; } .col-lg-offset-7 { margin-left: 58.333333333333336%; } .col-lg-offset-6 { margin-left: 50%; } .col-lg-offset-5 { margin-left: 41.66666666666667%; } .col-lg-offset-4 { margin-left: 33.33333333333333%; } .col-lg-offset-3 { margin-left: 25%; } .col-lg-offset-2 { margin-left: 16.666666666666664%; } .col-lg-offset-1 { margin-left: 8.333333333333332%; } .col-lg-offset-0 { margin-left: 0; } } table { max-width: 100%; background-color: transparent; } th { text-align: left; } .table { width: 100%; margin-bottom: 21px; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { padding: 8px; line-height: 1.428571429; vertical-align: top; border-top: 1px solid #dddddd; } .table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid #dddddd; } .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td { border-top: 0; } .table > tbody + tbody { border-top: 2px solid #dddddd; } .table .table { background-color: #ffffff; } .table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 5px; } .table-bordered { border: 1px solid #dddddd; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 1px solid #dddddd; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table-striped > tbody > tr:nth-child(odd) > td, .table-striped > tbody > tr:nth-child(odd) > th { background-color: #f9f9f9; } .table-hover > tbody > tr:hover > td, .table-hover > tbody > tr:hover > th { background-color: #f5f5f5; } table col[class*="col-"] { display: table-column; float: none; } table td[class*="col-"], table th[class*="col-"] { display: table-cell; float: none; } .table > thead > tr > td.active, .table > tbody > tr > td.active, .table > tfoot > tr > td.active, .table > thead > tr > th.active, .table > tbody > tr > th.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > tbody > tr.active > td, .table > tfoot > tr.active > td, .table > thead > tr.active > th, .table > tbody > tr.active > th, .table > tfoot > tr.active > th { background-color: #f5f5f5; } .table > thead > tr > td.success, .table > tbody > tr > td.success, .table > tfoot > tr > td.success, .table > thead > tr > th.success, .table > tbody > tr > th.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > tbody > tr.success > td, .table > tfoot > tr.success > td, .table > thead > tr.success > th, .table > tbody > tr.success > th, .table > tfoot > tr.success > th { background-color: #dff0d8; } .table-hover > tbody > tr > td.success:hover, .table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr.success:hover > th { background-color: #d0e9c6; } .table > thead > tr > td.danger, .table > tbody > tr > td.danger, .table > tfoot > tr > td.danger, .table > thead > tr > th.danger, .table > tbody > tr > th.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > tbody > tr.danger > td, .table > tfoot > tr.danger > td, .table > thead > tr.danger > th, .table > tbody > tr.danger > th, .table > tfoot > tr.danger > th { background-color: #f2dede; } .table-hover > tbody > tr > td.danger:hover, .table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr.danger:hover > th { background-color: #ebcccc; } .table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot > tr > td.warning, .table > thead > tr > th.warning, .table > tbody > tr > th.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > tbody > tr.warning > td, .table > tfoot > tr.warning > td, .table > thead > tr.warning > th, .table > tbody > tr.warning > th, .table > tfoot > tr.warning > th { background-color: #fcf8e3; } .table-hover > tbody > tr > td.warning:hover, .table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr.warning:hover > th { background-color: #faf2cc; } @media (max-width: 767px) { .table-responsive { width: 100%; margin-bottom: 15.75px; overflow-x: scroll; overflow-y: hidden; border: 1px solid #dddddd; -ms-overflow-style: -<API key>; -<API key>: touch; } .table-responsive > .table { margin-bottom: 0; } .table-responsive > .table > thead > tr > th, .table-responsive > .table > tbody > tr > th, .table-responsive > .table > tfoot > tr > th, .table-responsive > .table > thead > tr > td, .table-responsive > .table > tbody > tr > td, .table-responsive > .table > tfoot > tr > td { white-space: nowrap; } .table-responsive > .table-bordered { border: 0; } .table-responsive > .table-bordered > thead > tr > th:first-child, .table-responsive > .table-bordered > tbody > tr > th:first-child, .table-responsive > .table-bordered > tfoot > tr > th:first-child, .table-responsive > .table-bordered > thead > tr > td:first-child, .table-responsive > .table-bordered > tbody > tr > td:first-child, .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .table-responsive > .table-bordered > thead > tr > th:last-child, .table-responsive > .table-bordered > tbody > tr > th:last-child, .table-responsive > .table-bordered > tfoot > tr > th:last-child, .table-responsive > .table-bordered > thead > tr > td:last-child, .table-responsive > .table-bordered > tbody > tr > td:last-child, .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .table-responsive > .table-bordered > tbody > tr:last-child > th, .table-responsive > .table-bordered > tfoot > tr:last-child > th, .table-responsive > .table-bordered > tbody > tr:last-child > td, .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; } } fieldset { padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 21px; font-size: 22.5px; line-height: inherit; color: #777777; border: 0; border-bottom: 1px solid #e5e5e5; } label { display: inline-block; margin-bottom: 5px; font-weight: bold; } input[type="search"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; /* IE8-9 */ line-height: normal; } input[type="file"] { display: block; } select[multiple], select[size] { height: auto; } select optgroup { font-family: inherit; font-size: inherit; font-style: inherit; } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } input[type="number"]::-<API key>, input[type="number"]::-<API key> { height: auto; } output { display: block; padding-top: 9px; font-size: 15px; line-height: 1.428571429; color: #777777; vertical-align: middle; } .form-control { display: block; width: 100%; height: 39px; padding: 8px 12px; font-size: 15px; line-height: 1.428571429; color: #777777; vertical-align: middle; background-color: #ffffff; background-image: none; border: 1px solid #cccccc; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; } .form-control:focus { border-color: #66afe9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); } .form-control:-moz-placeholder { color: #999999; } .form-control::-moz-placeholder { color: #999999; } .form-control:-<API key> { color: #999999; } .form-control::-<API key> { color: #999999; } .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { cursor: not-allowed; background-color: #eeeeee; } textarea.form-control { height: auto; } .form-group { margin-bottom: 15px; } .radio, .checkbox { display: block; min-height: 21px; padding-left: 20px; margin-top: 10px; margin-bottom: 10px; vertical-align: middle; } .radio label, .checkbox label { display: inline; margin-bottom: 0; font-weight: normal; cursor: pointer; } .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { float: left; margin-left: -20px; } .radio + .radio, .checkbox + .checkbox { margin-top: -5px; } .radio-inline, .checkbox-inline { display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: normal; vertical-align: middle; cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-top: 0; margin-left: 10px; } input[type="radio"][disabled], input[type="checkbox"][disabled], .radio[disabled], .radio-inline[disabled], .checkbox[disabled], .checkbox-inline[disabled], fieldset[disabled] input[type="radio"], fieldset[disabled] input[type="checkbox"], fieldset[disabled] .radio, fieldset[disabled] .radio-inline, fieldset[disabled] .checkbox, fieldset[disabled] .checkbox-inline { cursor: not-allowed; } .input-sm { height: 31px; padding: 5px 10px; font-size: 13px; line-height: 1.5; border-radius: 3px; } select.input-sm { height: 31px; line-height: 31px; } textarea.input-sm { height: auto; } .input-lg { height: 58px; padding: 14px 16px; font-size: 19px; line-height: 1.33; border-radius: 6px; } select.input-lg { height: 58px; line-height: 58px; } textarea.input-lg { height: auto; } .has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline { color: #c09853; } .has-warning .form-control { border-color: #c09853; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-warning .form-control:focus { border-color: #a47e3c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; } .has-warning .input-group-addon { color: #c09853; background-color: #fcf8e3; border-color: #c09853; } .has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline { color: #b94a48; } .has-error .form-control { border-color: #b94a48; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-error .form-control:focus { border-color: #953b39; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; } .has-error .input-group-addon { color: #b94a48; background-color: #f2dede; border-color: #b94a48; } .has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline { color: #468847; } .has-success .form-control { border-color: #468847; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-success .form-control:focus { border-color: #356635; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; } .has-success .input-group-addon { color: #468847; background-color: #dff0d8; border-color: #468847; } .form-control-static { margin-bottom: 0; } .help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #b7b7b7; } @media (min-width: 768px) { .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .form-inline .form-control { display: inline-block; } .form-inline .radio, .form-inline .checkbox { display: inline-block; padding-left: 0; margin-top: 0; margin-bottom: 0; } .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { float: none; margin-left: 0; } } .form-horizontal .control-label, .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { padding-top: 9px; margin-top: 0; margin-bottom: 0; } .form-horizontal .form-group { margin-right: -15px; margin-left: -15px; } .form-horizontal .form-group:before, .form-horizontal .form-group:after { display: table; content: " "; } .form-horizontal .form-group:after { clear: both; } .form-horizontal .form-group:before, .form-horizontal .form-group:after { display: table; content: " "; } .form-horizontal .form-group:after { clear: both; } .form-horizontal .form-group:before, .form-horizontal .form-group:after { display: table; content: " "; } .form-horizontal .form-group:after { clear: both; } .form-horizontal .form-group:before, .form-horizontal .form-group:after { display: table; content: " "; } .form-horizontal .form-group:after { clear: both; } .form-horizontal .form-group:before, .form-horizontal .form-group:after { display: table; content: " "; } .form-horizontal .form-group:after { clear: both; } .form-horizontal .form-control-static { padding-top: 9px; } @media (min-width: 768px) { .form-horizontal .control-label { text-align: right; } } .btn { display: inline-block; padding: 8px 12px; margin-bottom: 0; font-size: 15px; font-weight: normal; line-height: 1.428571429; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; background-image: none; border: 1px solid transparent; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; } .btn:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } .btn:hover, .btn:focus { color: #ffffff; text-decoration: none; } .btn:active, .btn.active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn.disabled, .btn[disabled], fieldset[disabled] .btn { pointer-events: none; cursor: not-allowed; opacity: 0.65; filter: alpha(opacity=65); -webkit-box-shadow: none; box-shadow: none; } .btn-default { color: #ffffff; background-color: #999999; border-color: #999999; } .btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default { color: #ffffff; background-color: #858585; border-color: #7a7a7a; } .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default { background-image: none; } .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active { background-color: #999999; border-color: #999999; } .btn-primary { color: #ffffff; background-color: #eb6864; border-color: #eb6864; } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary { color: #ffffff; background-color: #e64540; border-color: #e4332e; } .btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary { background-image: none; } .btn-primary.disabled, .btn-primary[disabled], fieldset[disabled] .btn-primary, .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled:active, .btn-primary[disabled]:active, fieldset[disabled] .btn-primary:active, .btn-primary.disabled.active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary.active { background-color: #eb6864; border-color: #eb6864; } .btn-warning { color: #ffffff; background-color: #f5e625; border-color: #f5e625; } .btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .open .dropdown-toggle.btn-warning { color: #ffffff; background-color: #e7d70b; border-color: #d3c50a; } .btn-warning:active, .btn-warning.active, .open .dropdown-toggle.btn-warning { background-image: none; } .btn-warning.disabled, .btn-warning[disabled], fieldset[disabled] .btn-warning, .btn-warning.disabled:hover, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning:hover, .btn-warning.disabled:focus, .btn-warning[disabled]:focus, fieldset[disabled] .btn-warning:focus, .btn-warning.disabled:active, .btn-warning[disabled]:active, fieldset[disabled] .btn-warning:active, .btn-warning.disabled.active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning.active { background-color: #f5e625; border-color: #f5e625; } .btn-danger { color: #ffffff; background-color: #f57a00; border-color: #f57a00; } .btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active, .open .dropdown-toggle.btn-danger { color: #ffffff; background-color: #cc6600; border-color: #b85c00; } .btn-danger:active, .btn-danger.active, .open .dropdown-toggle.btn-danger { background-image: none; } .btn-danger.disabled, .btn-danger[disabled], fieldset[disabled] .btn-danger, .btn-danger.disabled:hover, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger:hover, .btn-danger.disabled:focus, .btn-danger[disabled]:focus, fieldset[disabled] .btn-danger:focus, .btn-danger.disabled:active, .btn-danger[disabled]:active, fieldset[disabled] .btn-danger:active, .btn-danger.disabled.active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger.active { background-color: #f57a00; border-color: #f57a00; } .btn-success { color: #ffffff; background-color: #22b24c; border-color: #22b24c; } .btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .open .dropdown-toggle.btn-success { color: #ffffff; background-color: #1b903d; border-color: #187f36; } .btn-success:active, .btn-success.active, .open .dropdown-toggle.btn-success { background-image: none; } .btn-success.disabled, .btn-success[disabled], fieldset[disabled] .btn-success, .btn-success.disabled:hover, .btn-success[disabled]:hover, fieldset[disabled] .btn-success:hover, .btn-success.disabled:focus, .btn-success[disabled]:focus, fieldset[disabled] .btn-success:focus, .btn-success.disabled:active, .btn-success[disabled]:active, fieldset[disabled] .btn-success:active, .btn-success.disabled.active, .btn-success[disabled].active, fieldset[disabled] .btn-success.active { background-color: #22b24c; border-color: #22b24c; } .btn-info { color: #ffffff; background-color: #336699; border-color: #336699; } .btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .open .dropdown-toggle.btn-info { color: #ffffff; background-color: #29527a; border-color: #24476b; } .btn-info:active, .btn-info.active, .open .dropdown-toggle.btn-info { background-image: none; } .btn-info.disabled, .btn-info[disabled], fieldset[disabled] .btn-info, .btn-info.disabled:hover, .btn-info[disabled]:hover, fieldset[disabled] .btn-info:hover, .btn-info.disabled:focus, .btn-info[disabled]:focus, fieldset[disabled] .btn-info:focus, .btn-info.disabled:active, .btn-info[disabled]:active, fieldset[disabled] .btn-info:active, .btn-info.disabled.active, .btn-info[disabled].active, fieldset[disabled] .btn-info.active { background-color: #336699; border-color: #336699; } .btn-link { font-weight: normal; color: #eb6864; cursor: pointer; border-radius: 0; } .btn-link, .btn-link:active, .btn-link[disabled], fieldset[disabled] .btn-link { background-color: transparent; -webkit-box-shadow: none; box-shadow: none; } .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { border-color: transparent; } .btn-link:hover, .btn-link:focus { color: #e22620; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, fieldset[disabled] .btn-link:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:focus { color: #999999; text-decoration: none; } .btn-lg { padding: 14px 16px; font-size: 19px; line-height: 1.33; border-radius: 6px; } .btn-sm, .btn-xs { padding: 5px 10px; font-size: 13px; line-height: 1.5; border-radius: 3px; } .btn-xs { padding: 1px 5px; } .btn-block { display: block; width: 100%; padding-right: 0; padding-left: 0; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } .collapse { display: none; } .collapse.in { display: block; } .collapsing { position: relative; height: 0; overflow: hidden; -webkit-transition: height 0.35s ease; transition: height 0.35s ease; } @font-face { font-family: 'Glyphicons Halflings'; src: url('../fonts/<API key>.eot'); src: url('../fonts/<API key>.eot?#iefix') format('embedded-opentype'), url('../fonts/<API key>.woff') format('woff'), url('../fonts/<API key>.ttf') format('truetype'), url('../fonts/<API key>.svg#<API key>') format('svg'); } .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; -<API key>: antialiased; font-style: normal; font-weight: normal; line-height: 1; -<API key>: grayscale; } .glyphicon:empty { width: 1em; } .glyphicon-asterisk:before { content: "\2a"; } .glyphicon-plus:before { content: "\2b"; } .glyphicon-euro:before { content: "\20ac"; } .glyphicon-minus:before { content: "\2212"; } .glyphicon-cloud:before { content: "\2601"; } .glyphicon-envelope:before { content: "\2709"; } .glyphicon-pencil:before { content: "\270f"; } .glyphicon-glass:before { content: "\e001"; } .glyphicon-music:before { content: "\e002"; } .glyphicon-search:before { content: "\e003"; } .glyphicon-heart:before { content: "\e005"; } .glyphicon-star:before { content: "\e006"; } .<API key>:before { content: "\e007"; } .glyphicon-user:before { content: "\e008"; } .glyphicon-film:before { content: "\e009"; } .glyphicon-th-large:before { content: "\e010"; } .glyphicon-th:before { content: "\e011"; } .glyphicon-th-list:before { content: "\e012"; } .glyphicon-ok:before { content: "\e013"; } .glyphicon-remove:before { content: "\e014"; } .glyphicon-zoom-in:before { content: "\e015"; } .glyphicon-zoom-out:before { content: "\e016"; } .glyphicon-off:before { content: "\e017"; } .glyphicon-signal:before { content: "\e018"; } .glyphicon-cog:before { content: "\e019"; } .glyphicon-trash:before { content: "\e020"; } .glyphicon-home:before { content: "\e021"; } .glyphicon-file:before { content: "\e022"; } .glyphicon-time:before { content: "\e023"; } .glyphicon-road:before { content: "\e024"; } .<API key>:before { content: "\e025"; } .glyphicon-download:before { content: "\e026"; } .glyphicon-upload:before { content: "\e027"; } .glyphicon-inbox:before { content: "\e028"; } .<API key>:before { content: "\e029"; } .glyphicon-repeat:before { content: "\e030"; } .glyphicon-refresh:before { content: "\e031"; } .glyphicon-list-alt:before { content: "\e032"; } .glyphicon-lock:before { content: "\e033"; } .glyphicon-flag:before { content: "\e034"; } .<API key>:before { content: "\e035"; } .<API key>:before { content: "\e036"; } .<API key>:before { content: "\e037"; } .glyphicon-volume-up:before { content: "\e038"; } .glyphicon-qrcode:before { content: "\e039"; } .glyphicon-barcode:before { content: "\e040"; } .glyphicon-tag:before { content: "\e041"; } .glyphicon-tags:before { content: "\e042"; } .glyphicon-book:before { content: "\e043"; } .glyphicon-bookmark:before { content: "\e044"; } .glyphicon-print:before { content: "\e045"; } .glyphicon-camera:before { content: "\e046"; } .glyphicon-font:before { content: "\e047"; } .glyphicon-bold:before { content: "\e048"; } .glyphicon-italic:before { content: "\e049"; } .<API key>:before { content: "\e050"; } .<API key>:before { content: "\e051"; } .<API key>:before { content: "\e052"; } .<API key>:before { content: "\e053"; } .<API key>:before { content: "\e054"; } .<API key>:before { content: "\e055"; } .glyphicon-list:before { content: "\e056"; } .<API key>:before { content: "\e057"; } .<API key>:before { content: "\e058"; } .<API key>:before { content: "\e059"; } .glyphicon-picture:before { content: "\e060"; } .<API key>:before { content: "\e062"; } .glyphicon-adjust:before { content: "\e063"; } .glyphicon-tint:before { content: "\e064"; } .glyphicon-edit:before { content: "\e065"; } .glyphicon-share:before { content: "\e066"; } .glyphicon-check:before { content: "\e067"; } .glyphicon-move:before { content: "\e068"; } .<API key>:before { content: "\e069"; } .<API key>:before { content: "\e070"; } .glyphicon-backward:before { content: "\e071"; } .glyphicon-play:before { content: "\e072"; } .glyphicon-pause:before { content: "\e073"; } .glyphicon-stop:before { content: "\e074"; } .glyphicon-forward:before { content: "\e075"; } .<API key>:before { content: "\e076"; } .<API key>:before { content: "\e077"; } .glyphicon-eject:before { content: "\e078"; } .<API key>:before { content: "\e079"; } .<API key>:before { content: "\e080"; } .glyphicon-plus-sign:before { content: "\e081"; } .<API key>:before { content: "\e082"; } .<API key>:before { content: "\e083"; } .glyphicon-ok-sign:before { content: "\e084"; } .<API key>:before { content: "\e085"; } .glyphicon-info-sign:before { content: "\e086"; } .<API key>:before { content: "\e087"; } .<API key>:before { content: "\e088"; } .glyphicon-ok-circle:before { content: "\e089"; } .<API key>:before { content: "\e090"; } .<API key>:before { content: "\e091"; } .<API key>:before { content: "\e092"; } .glyphicon-arrow-up:before { content: "\e093"; } .<API key>:before { content: "\e094"; } .glyphicon-share-alt:before { content: "\e095"; } .<API key>:before { content: "\e096"; } .<API key>:before { content: "\e097"; } .<API key>:before { content: "\e101"; } .glyphicon-gift:before { content: "\e102"; } .glyphicon-leaf:before { content: "\e103"; } .glyphicon-fire:before { content: "\e104"; } .glyphicon-eye-open:before { content: "\e105"; } .glyphicon-eye-close:before { content: "\e106"; } .<API key>:before { content: "\e107"; } .glyphicon-plane:before { content: "\e108"; } .glyphicon-calendar:before { content: "\e109"; } .glyphicon-random:before { content: "\e110"; } .glyphicon-comment:before { content: "\e111"; } .glyphicon-magnet:before { content: "\e112"; } .<API key>:before { content: "\e113"; } .<API key>:before { content: "\e114"; } .glyphicon-retweet:before { content: "\e115"; } .<API key>:before { content: "\e116"; } .<API key>:before { content: "\e117"; } .<API key>:before { content: "\e118"; } .<API key>:before { content: "\e119"; } .<API key>:before { content: "\e120"; } .glyphicon-hdd:before { content: "\e121"; } .glyphicon-bullhorn:before { content: "\e122"; } .glyphicon-bell:before { content: "\e123"; } .<API key>:before { content: "\e124"; } .glyphicon-thumbs-up:before { content: "\e125"; } .<API key>:before { content: "\e126"; } .<API key>:before { content: "\e127"; } .glyphicon-hand-left:before { content: "\e128"; } .glyphicon-hand-up:before { content: "\e129"; } .glyphicon-hand-down:before { content: "\e130"; } .<API key>:before { content: "\e131"; } .<API key>:before { content: "\e132"; } .<API key>:before { content: "\e133"; } .<API key>:before { content: "\e134"; } .glyphicon-globe:before { content: "\e135"; } .glyphicon-wrench:before { content: "\e136"; } .glyphicon-tasks:before { content: "\e137"; } .glyphicon-filter:before { content: "\e138"; } .glyphicon-briefcase:before { content: "\e139"; } .<API key>:before { content: "\e140"; } .glyphicon-dashboard:before { content: "\e141"; } .glyphicon-paperclip:before { content: "\e142"; } .<API key>:before { content: "\e143"; } .glyphicon-link:before { content: "\e144"; } .glyphicon-phone:before { content: "\e145"; } .glyphicon-pushpin:before { content: "\e146"; } .glyphicon-usd:before { content: "\e148"; } .glyphicon-gbp:before { content: "\e149"; } .glyphicon-sort:before { content: "\e150"; } .<API key>:before { content: "\e151"; } .<API key>:before { content: "\e152"; } .<API key>:before { content: "\e153"; } .<API key>:before { content: "\e154"; } .<API key>:before { content: "\e155"; } .<API key>:before { content: "\e156"; } .glyphicon-unchecked:before { content: "\e157"; } .glyphicon-expand:before { content: "\e158"; } .<API key>:before { content: "\e159"; } .<API key>:before { content: "\e160"; } .glyphicon-log-in:before { content: "\e161"; } .glyphicon-flash:before { content: "\e162"; } .glyphicon-log-out:before { content: "\e163"; } .<API key>:before { content: "\e164"; } .glyphicon-record:before { content: "\e165"; } .glyphicon-save:before { content: "\e166"; } .glyphicon-open:before { content: "\e167"; } .glyphicon-saved:before { content: "\e168"; } .glyphicon-import:before { content: "\e169"; } .glyphicon-export:before { content: "\e170"; } .glyphicon-send:before { content: "\e171"; } .<API key>:before { content: "\e172"; } .<API key>:before { content: "\e173"; } .<API key>:before { content: "\e174"; } .<API key>:before { content: "\e175"; } .<API key>:before { content: "\e176"; } .<API key>:before { content: "\e177"; } .glyphicon-transfer:before { content: "\e178"; } .glyphicon-cutlery:before { content: "\e179"; } .glyphicon-header:before { content: "\e180"; } .<API key>:before { content: "\e181"; } .glyphicon-earphone:before { content: "\e182"; } .glyphicon-phone-alt:before { content: "\e183"; } .glyphicon-tower:before { content: "\e184"; } .glyphicon-stats:before { content: "\e185"; } .glyphicon-sd-video:before { content: "\e186"; } .glyphicon-hd-video:before { content: "\e187"; } .glyphicon-subtitles:before { content: "\e188"; } .<API key>:before { content: "\e189"; } .<API key>:before { content: "\e190"; } .glyphicon-sound-5-1:before { content: "\e191"; } .glyphicon-sound-6-1:before { content: "\e192"; } .glyphicon-sound-7-1:before { content: "\e193"; } .<API key>:before { content: "\e194"; } .<API key>:before { content: "\e195"; } .<API key>:before { content: "\e197"; } .<API key>:before { content: "\e198"; } .<API key>:before { content: "\e199"; } .<API key>:before { content: "\e200"; } .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px solid #000000; border-right: 4px solid transparent; border-bottom: 0 dotted; border-left: 4px solid transparent; } .dropdown { position: relative; } .dropdown-toggle:focus { outline: 0; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; font-size: 15px; list-style: none; background-color: #ffffff; border: 1px solid #cccccc; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box; } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { height: 1px; margin: 9.5px 0; overflow: hidden; background-color: #e5e5e5; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.428571429; color: #333333; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { color: #ffffff; text-decoration: none; background-color: #eb6864; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #ffffff; text-decoration: none; background-color: #eb6864; outline: 0; } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #999999; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; cursor: not-allowed; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .open > .dropdown-menu { display: block; } .open > a { outline: 0; } .dropdown-header { display: block; padding: 3px 20px; font-size: 13px; line-height: 1.428571429; color: #999999; } .dropdown-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { border-top: 0 dotted; border-bottom: 4px solid #000000; content: ""; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } @media (min-width: 768px) { .navbar-right .dropdown-menu { right: 0; left: auto; } } .btn-default .caret { border-top-color: #ffffff; } .btn-primary .caret, .btn-success .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret { border-top-color: #fff; } .dropup .btn-default .caret { border-bottom-color: #ffffff; } .dropup .btn-primary .caret, .dropup .btn-success .caret, .dropup .btn-warning .caret, .dropup .btn-danger .caret, .dropup .btn-info .caret { border-bottom-color: #fff; } .btn-group, .btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; } .btn-group > .btn, .btn-group-vertical > .btn { position: relative; float: left; } .btn-group > .btn:hover, .btn-group-vertical > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:focus, .btn-group > .btn:active, .btn-group-vertical > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn.active { z-index: 2; } .btn-group > .btn:focus, .btn-group-vertical > .btn:focus { outline: none; } .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { margin-left: -1px; } .btn-toolbar:before, .btn-toolbar:after { display: table; content: " "; } .btn-toolbar:after { clear: both; } .btn-toolbar:before, .btn-toolbar:after { display: table; content: " "; } .btn-toolbar:after { clear: both; } .btn-toolbar:before, .btn-toolbar:after { display: table; content: " "; } .btn-toolbar:after { clear: both; } .btn-toolbar:before, .btn-toolbar:after { display: table; content: " "; } .btn-toolbar:after { clear: both; } .btn-toolbar:before, .btn-toolbar:after { display: table; content: " "; } .btn-toolbar:after { clear: both; } .btn-toolbar .btn-group { float: left; } .btn-toolbar > .btn + .btn, .btn-toolbar > .btn-group + .btn, .btn-toolbar > .btn + .btn-group, .btn-toolbar > .btn-group + .btn-group { margin-left: 5px; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; } .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { <API key>: 0; <API key>: 0; } .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { <API key>: 0; <API key>: 0; } .btn-group > .btn-group { float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group > .btn-group:first-child > .btn:last-child, .btn-group > .btn-group:first-child > .dropdown-toggle { <API key>: 0; <API key>: 0; } .btn-group > .btn-group:last-child > .btn:first-child { <API key>: 0; <API key>: 0; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group-xs > .btn { padding: 5px 10px; padding: 1px 5px; font-size: 13px; line-height: 1.5; border-radius: 3px; } .btn-group-sm > .btn { padding: 5px 10px; font-size: 13px; line-height: 1.5; border-radius: 3px; } .btn-group-lg > .btn { padding: 14px 16px; font-size: 19px; line-height: 1.33; border-radius: 6px; } .btn-group > .btn + .dropdown-toggle { padding-right: 8px; padding-left: 8px; } .btn-group > .btn-lg + .dropdown-toggle { padding-right: 12px; padding-left: 12px; } .btn-group.open .dropdown-toggle { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn-group.open .dropdown-toggle.btn-link { -webkit-box-shadow: none; box-shadow: none; } .btn .caret { margin-left: 0; } .btn-lg .caret { border-width: 5px 5px 0; border-bottom-width: 0; } .dropup .btn-lg .caret { border-width: 0 5px 5px; } .btn-group-vertical > .btn, .btn-group-vertical > .btn-group { display: block; float: none; width: 100%; max-width: 100%; } .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after { display: table; content: " "; } .btn-group-vertical > .btn-group:after { clear: both; } .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after { display: table; content: " "; } .btn-group-vertical > .btn-group:after { clear: both; } .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after { display: table; content: " "; } .btn-group-vertical > .btn-group:after { clear: both; } .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after { display: table; content: " "; } .btn-group-vertical > .btn-group:after { clear: both; } .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after { display: table; content: " "; } .btn-group-vertical > .btn-group:after { clear: both; } .btn-group-vertical > .btn-group > .btn { float: none; } .btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { margin-top: -1px; margin-left: 0; } .btn-group-vertical > .btn:not(:first-child):not(:last-child) { border-radius: 0; } .btn-group-vertical > .btn:first-child:not(:last-child) { <API key>: 4px; <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn:last-child:not(:first-child) { <API key>: 0; <API key>: 4px; <API key>: 0; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group-vertical > .btn-group:first-child > .btn:last-child, .btn-group-vertical > .btn-group:first-child > .dropdown-toggle { <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn-group:last-child > .btn:first-child { <API key>: 0; <API key>: 0; } .btn-group-justified { display: table; width: 100%; border-collapse: separate; table-layout: fixed; } .btn-group-justified .btn { display: table-cell; float: none; width: 1%; } [data-toggle="buttons"] > .btn > input[type="radio"], [data-toggle="buttons"] > .btn > input[type="checkbox"] { display: none; } .input-group { position: relative; display: table; border-collapse: separate; } .input-group.col { float: none; padding-right: 0; padding-left: 0; } .input-group .form-control { width: 100%; margin-bottom: 0; } .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { height: 58px; padding: 14px 16px; font-size: 19px; line-height: 1.33; border-radius: 6px; } select.input-group-lg > .form-control, select.input-group-lg > .input-group-addon, select.input-group-lg > .input-group-btn > .btn { height: 58px; line-height: 58px; } textarea.input-group-lg > .form-control, textarea.input-group-lg > .input-group-addon, textarea.input-group-lg > .input-group-btn > .btn { height: auto; } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { height: 31px; padding: 5px 10px; font-size: 13px; line-height: 1.5; border-radius: 3px; } select.input-group-sm > .form-control, select.input-group-sm > .input-group-addon, select.input-group-sm > .input-group-btn > .btn { height: 31px; line-height: 31px; } textarea.input-group-sm > .form-control, textarea.input-group-sm > .input-group-addon, textarea.input-group-sm > .input-group-btn > .btn { height: auto; } .input-group-addon, .input-group-btn, .input-group .form-control { display: table-cell; } .input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; } .input-group-addon, .input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle; } .input-group-addon { padding: 8px 12px; font-size: 15px; font-weight: normal; line-height: 1; color: #777777; text-align: center; background-color: #eeeeee; border: 1px solid #cccccc; border-radius: 4px; } .input-group-addon.input-sm { padding: 5px 10px; font-size: 13px; border-radius: 3px; } .input-group-addon.input-lg { padding: 14px 16px; font-size: 19px; border-radius: 6px; } .input-group-addon input[type="radio"], .input-group-addon input[type="checkbox"] { margin-top: 0; } .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { <API key>: 0; <API key>: 0; } .input-group-addon:first-child { border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child) { <API key>: 0; <API key>: 0; } .input-group-addon:last-child { border-left: 0; } .input-group-btn { position: relative; white-space: nowrap; } .input-group-btn:first-child > .btn { margin-right: -1px; } .input-group-btn:last-child > .btn { margin-left: -1px; } .input-group-btn > .btn { position: relative; } .input-group-btn > .btn + .btn { margin-left: -4px; } .input-group-btn > .btn:hover, .input-group-btn > .btn:active { z-index: 2; } .nav { padding-left: 0; margin-bottom: 0; list-style: none; } .nav:before, .nav:after { display: table; content: " "; } .nav:after { clear: both; } .nav:before, .nav:after { display: table; content: " "; } .nav:after { clear: both; } .nav:before, .nav:after { display: table; content: " "; } .nav:after { clear: both; } .nav:before, .nav:after { display: table; content: " "; } .nav:after { clear: both; } .nav:before, .nav:after { display: table; content: " "; } .nav:after { clear: both; } .nav > li { position: relative; display: block; } .nav > li > a { position: relative; display: block; padding: 10px 15px; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #eeeeee; } .nav > li.disabled > a { color: #999999; } .nav > li.disabled > a:hover, .nav > li.disabled > a:focus { color: #999999; text-decoration: none; cursor: not-allowed; background-color: transparent; } .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { background-color: #eeeeee; border-color: #eb6864; } .nav .open > a .caret, .nav .open > a:hover .caret, .nav .open > a:focus .caret { border-top-color: #e22620; border-bottom-color: #e22620; } .nav .nav-divider { height: 1px; margin: 9.5px 0; overflow: hidden; background-color: #e5e5e5; } .nav > li > a > img { max-width: none; } .nav-tabs { border-bottom: 1px solid #dddddd; } .nav-tabs > li { float: left; margin-bottom: -1px; } .nav-tabs > li > a { margin-right: 2px; line-height: 1.428571429; border: 1px solid transparent; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover { border-color: #eeeeee #eeeeee #dddddd; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { color: #777777; cursor: default; background-color: #ffffff; border: 1px solid #dddddd; border-bottom-color: transparent; } .nav-tabs.nav-justified { width: 100%; border-bottom: 0; } .nav-tabs.nav-justified > li { float: none; } .nav-tabs.nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-tabs.nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-tabs.nav-justified > li { display: table-cell; width: 1%; } .nav-tabs.nav-justified > li > a { margin-bottom: 0; } } .nav-tabs.nav-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border: 1px solid #dddddd; } @media (min-width: 768px) { .nav-tabs.nav-justified > li > a { border-bottom: 1px solid #dddddd; border-radius: 4px 4px 0 0; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border-bottom-color: #ffffff; } } .nav-pills > li { float: left; } .nav-pills > li > a { border-radius: 4px; } .nav-pills > li + li { margin-left: 2px; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { color: #ffffff; background-color: #eb6864; } .nav-pills > li.active > a .caret, .nav-pills > li.active > a:hover .caret, .nav-pills > li.active > a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .nav-stacked > li { float: none; } .nav-stacked > li + li { margin-top: 2px; margin-left: 0; } .nav-justified { width: 100%; } .nav-justified > li { float: none; } .nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-justified > li { display: table-cell; width: 1%; } .nav-justified > li > a { margin-bottom: 0; } } .nav-tabs-justified { border-bottom: 0; } .nav-tabs-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border: 1px solid #dddddd; } @media (min-width: 768px) { .nav-tabs-justified > li > a { border-bottom: 1px solid #dddddd; border-radius: 4px 4px 0 0; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border-bottom-color: #ffffff; } } .tab-content > .tab-pane { display: none; } .tab-content > .active { display: block; } .nav .caret { border-top-color: #eb6864; border-bottom-color: #eb6864; } .nav a:hover .caret { border-top-color: #e22620; border-bottom-color: #e22620; } .nav-tabs .dropdown-menu { margin-top: -1px; <API key>: 0; <API key>: 0; } .navbar { position: relative; min-height: 60px; margin-bottom: 21px; border: 1px solid transparent; } .navbar:before, .navbar:after { display: table; content: " "; } .navbar:after { clear: both; } .navbar:before, .navbar:after { display: table; content: " "; } .navbar:after { clear: both; } .navbar:before, .navbar:after { display: table; content: " "; } .navbar:after { clear: both; } .navbar:before, .navbar:after { display: table; content: " "; } .navbar:after { clear: both; } .navbar:before, .navbar:after { display: table; content: " "; } .navbar:after { clear: both; } @media (min-width: 768px) { .navbar { border-radius: 4px; } } .navbar-header:before, .navbar-header:after { display: table; content: " "; } .navbar-header:after { clear: both; } .navbar-header:before, .navbar-header:after { display: table; content: " "; } .navbar-header:after { clear: both; } .navbar-header:before, .navbar-header:after { display: table; content: " "; } .navbar-header:after { clear: both; } .navbar-header:before, .navbar-header:after { display: table; content: " "; } .navbar-header:after { clear: both; } .navbar-header:before, .navbar-header:after { display: table; content: " "; } .navbar-header:after { clear: both; } @media (min-width: 768px) { .navbar-header { float: left; } } .navbar-collapse { max-height: 340px; padding-right: 15px; padding-left: 15px; overflow-x: visible; border-top: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); -<API key>: touch; } .navbar-collapse:before, .navbar-collapse:after { display: table; content: " "; } .navbar-collapse:after { clear: both; } .navbar-collapse:before, .navbar-collapse:after { display: table; content: " "; } .navbar-collapse:after { clear: both; } .navbar-collapse:before, .navbar-collapse:after { display: table; content: " "; } .navbar-collapse:after { clear: both; } .navbar-collapse:before, .navbar-collapse:after { display: table; content: " "; } .navbar-collapse:after { clear: both; } .navbar-collapse:before, .navbar-collapse:after { display: table; content: " "; } .navbar-collapse:after { clear: both; } .navbar-collapse.in { overflow-y: auto; } @media (min-width: 768px) { .navbar-collapse { width: auto; border-top: 0; box-shadow: none; } .navbar-collapse.collapse { display: block !important; height: auto !important; padding-bottom: 0; overflow: visible !important; } .navbar-collapse.in { overflow-y: auto; } .navbar-collapse .navbar-nav.navbar-left:first-child { margin-left: -15px; } .navbar-collapse .navbar-nav.navbar-right:last-child { margin-right: -15px; } .navbar-collapse .navbar-text:last-child { margin-right: 0; } } .container > .navbar-header, .container > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .container > .navbar-header, .container > .navbar-collapse { margin-right: 0; margin-left: 0; } } .navbar-static-top { z-index: 1000; border-width: 0 0 1px; } @media (min-width: 768px) { .navbar-static-top { border-radius: 0; } } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; } @media (min-width: 768px) { .navbar-fixed-top, .navbar-fixed-bottom { border-radius: 0; } } .navbar-fixed-top { top: 0; border-width: 0 0 1px; } .navbar-fixed-bottom { bottom: 0; margin-bottom: 0; border-width: 1px 0 0; } .navbar-brand { float: left; padding: 19.5px 15px; font-size: 19px; line-height: 21px; } .navbar-brand:hover, .navbar-brand:focus { text-decoration: none; } @media (min-width: 768px) { .navbar > .container .navbar-brand { margin-left: -15px; } } .navbar-toggle { position: relative; float: right; padding: 9px 10px; margin-top: 13px; margin-right: 15px; margin-bottom: 13px; background-color: transparent; border: 1px solid transparent; border-radius: 4px; } .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; } .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; } @media (min-width: 768px) { .navbar-toggle { display: none; } } .navbar-nav { margin: 9.75px -15px; } .navbar-nav > li > a { padding-top: 10px; padding-bottom: 10px; line-height: 21px; } @media (max-width: 767px) { .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin-top: 0; background-color: transparent; border: 0; box-shadow: none; } .navbar-nav .open .dropdown-menu > li > a, .navbar-nav .open .dropdown-menu .dropdown-header { padding: 5px 15px 5px 25px; } .navbar-nav .open .dropdown-menu > li > a { line-height: 21px; } .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus { background-image: none; } } @media (min-width: 768px) { .navbar-nav { float: left; margin: 0; } .navbar-nav > li { float: left; } .navbar-nav > li > a { padding-top: 19.5px; padding-bottom: 19.5px; } } @media (min-width: 768px) { .navbar-left { float: left !important; } .navbar-right { float: right !important; } } .navbar-form { padding: 10px 15px; margin-top: 10.5px; margin-right: -15px; margin-bottom: 10.5px; margin-left: -15px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); } @media (min-width: 768px) { .navbar-form .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .navbar-form .form-control { display: inline-block; } .navbar-form .radio, .navbar-form .checkbox { display: inline-block; padding-left: 0; margin-top: 0; margin-bottom: 0; } .navbar-form .radio input[type="radio"], .navbar-form .checkbox input[type="checkbox"] { float: none; margin-left: 0; } } @media (max-width: 767px) { .navbar-form .form-group { margin-bottom: 5px; } } @media (min-width: 768px) { .navbar-form { width: auto; padding-top: 0; padding-bottom: 0; margin-right: 0; margin-left: 0; border: 0; -webkit-box-shadow: none; box-shadow: none; } } .navbar-nav > li > .dropdown-menu { margin-top: 0; <API key>: 0; <API key>: 0; } .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { <API key>: 0; <API key>: 0; } .navbar-nav.pull-right > li > .dropdown-menu, .navbar-nav > li > .dropdown-menu.pull-right { right: 0; left: auto; } .navbar-btn { margin-top: 10.5px; margin-bottom: 10.5px; } .navbar-text { float: left; margin-top: 19.5px; margin-bottom: 19.5px; } @media (min-width: 768px) { .navbar-text { margin-right: 15px; margin-left: 15px; } } .navbar-default { background-color: #ffffff; border-color: #eeeeee; } .navbar-default .navbar-brand { color: #000000; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #000000; background-color: #eeeeee; } .navbar-default .navbar-text { color: #000000; } .navbar-default .navbar-nav > li > a { color: #000000; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #000000; background-color: #eeeeee; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { color: #000000; background-color: #eeeeee; } .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { color: #cccccc; background-color: transparent; } .navbar-default .navbar-toggle { border-color: #dddddd; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: #dddddd; } .navbar-default .navbar-toggle .icon-bar { background-color: #cccccc; } .navbar-default .navbar-collapse, .navbar-default .navbar-form { border-color: #eeeeee; } .navbar-default .navbar-nav > .dropdown > a:hover .caret, .navbar-default .navbar-nav > .dropdown > a:focus .caret { border-top-color: #000000; border-bottom-color: #000000; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { color: #000000; background-color: #eeeeee; } .navbar-default .navbar-nav > .open > a .caret, .navbar-default .navbar-nav > .open > a:hover .caret, .navbar-default .navbar-nav > .open > a:focus .caret { border-top-color: #000000; border-bottom-color: #000000; } .navbar-default .navbar-nav > .dropdown > a .caret { border-top-color: #000000; border-bottom-color: #000000; } @media (max-width: 767px) { .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #000000; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { color: #000000; background-color: #eeeeee; } .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { color: #000000; background-color: #eeeeee; } .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #cccccc; background-color: transparent; } } .navbar-default .navbar-link { color: #000000; } .navbar-default .navbar-link:hover { color: #000000; } .navbar-inverse { background-color: #eb6864; border-color: #e53c37; } .navbar-inverse .navbar-brand { color: #ffffff; } .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus { color: #ffffff; background-color: #e74b47; } .navbar-inverse .navbar-text { color: #ffffff; } .navbar-inverse .navbar-nav > li > a { color: #ffffff; } .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #ffffff; background-color: #e74b47; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: #ffffff; background-color: #e74b47; } .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus { color: #444444; background-color: transparent; } .navbar-inverse .navbar-toggle { border-color: #e53c37; } .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { background-color: #e53c37; } .navbar-inverse .navbar-toggle .icon-bar { background-color: #ffffff; } .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { border-color: #e74944; } .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus { color: #ffffff; background-color: #e74b47; } .navbar-inverse .navbar-nav > .dropdown > a:hover .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .navbar-inverse .navbar-nav > .dropdown > a .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .navbar-inverse .navbar-nav > .open > a .caret, .navbar-inverse .navbar-nav > .open > a:hover .caret, .navbar-inverse .navbar-nav > .open > a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } @media (max-width: 767px) { .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { border-color: #e53c37; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { color: #ffffff; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { color: #ffffff; background-color: #e74b47; } .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { color: #ffffff; background-color: #e74b47; } .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #444444; background-color: transparent; } } .navbar-inverse .navbar-link { color: #ffffff; } .navbar-inverse .navbar-link:hover { color: #ffffff; } .breadcrumb { padding: 8px 15px; margin-bottom: 21px; list-style: none; background-color: #f5f5f5; border-radius: 4px; } .breadcrumb > li { display: inline-block; } .breadcrumb > li + li:before { padding: 0 5px; color: #cccccc; content: "/\00a0"; } .breadcrumb > .active { color: #999999; } .pagination { display: inline-block; padding-left: 0; margin: 21px 0; border-radius: 4px; } .pagination > li { display: inline; } .pagination > li > a, .pagination > li > span { position: relative; float: left; padding: 8px 12px; margin-left: -1px; line-height: 1.428571429; text-decoration: none; background-color: #ffffff; border: 1px solid #dddddd; } .pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; <API key>: 4px; <API key>: 4px; } .pagination > li:last-child > a, .pagination > li:last-child > span { <API key>: 4px; <API key>: 4px; } .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus { background-color: #eeeeee; } .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus { z-index: 2; color: #999999; cursor: default; background-color: #f5f5f5; border-color: #f5f5f5; } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: #999999; cursor: not-allowed; background-color: #ffffff; border-color: #dddddd; } .pagination-lg > li > a, .pagination-lg > li > span { padding: 14px 16px; font-size: 19px; } .pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { <API key>: 6px; <API key>: 6px; } .pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { <API key>: 6px; <API key>: 6px; } .pagination-sm > li > a, .pagination-sm > li > span { padding: 5px 10px; font-size: 13px; } .pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { <API key>: 3px; <API key>: 3px; } .pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { <API key>: 3px; <API key>: 3px; } .pager { padding-left: 0; margin: 21px 0; text-align: center; list-style: none; } .pager:before, .pager:after { display: table; content: " "; } .pager:after { clear: both; } .pager:before, .pager:after { display: table; content: " "; } .pager:after { clear: both; } .pager:before, .pager:after { display: table; content: " "; } .pager:after { clear: both; } .pager:before, .pager:after { display: table; content: " "; } .pager:after { clear: both; } .pager:before, .pager:after { display: table; content: " "; } .pager:after { clear: both; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #ffffff; border: 1px solid #dddddd; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #eeeeee; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #999999; cursor: not-allowed; background-color: #ffffff; } .label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #ffffff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; } .label[href]:hover, .label[href]:focus { color: #ffffff; text-decoration: none; cursor: pointer; } .label:empty { display: none; } .label-default { background-color: #999999; } .label-default[href]:hover, .label-default[href]:focus { background-color: #808080; } .label-primary { background-color: #eb6864; } .label-primary[href]:hover, .label-primary[href]:focus { background-color: #e53c37; } .label-success { background-color: #22b24c; } .label-success[href]:hover, .label-success[href]:focus { background-color: #1a873a; } .label-info { background-color: #336699; } .label-info[href]:hover, .label-info[href]:focus { background-color: #264c73; } .label-warning { background-color: #f5e625; } .label-warning[href]:hover, .label-warning[href]:focus { background-color: #ddce0a; } .label-danger { background-color: #f57a00; } .label-danger[href]:hover, .label-danger[href]:focus { background-color: #c26100; } .badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 13px; font-weight: bold; line-height: 1; color: #ffffff; text-align: center; white-space: nowrap; vertical-align: baseline; background-color: #999999; border-radius: 10px; } .badge:empty { display: none; } a.badge:hover, a.badge:focus { color: #ffffff; text-decoration: none; cursor: pointer; } .btn .badge { position: relative; top: -1px; } a.list-group-item.active > .badge, .nav-pills > .active > a > .badge { color: #eb6864; background-color: #ffffff; } .nav-pills > li > a > .badge { margin-left: 3px; } .jumbotron { padding: 30px; margin-bottom: 30px; font-size: 23px; font-weight: 200; line-height: 2.1428571435; color: inherit; background-color: #eeeeee; } .jumbotron h1 { line-height: 1; color: inherit; } .jumbotron p { line-height: 1.4; } .container .jumbotron { border-radius: 6px; } @media screen and (min-width: 768px) { .jumbotron { padding-top: 48px; padding-bottom: 48px; } .container .jumbotron { padding-right: 60px; padding-left: 60px; } .jumbotron h1 { font-size: 67.5px; } } .thumbnail { display: inline-block; display: block; height: auto; max-width: 100%; padding: 4px; margin-bottom: 21px; line-height: 1.428571429; background-color: #ffffff; border: 1px solid #dddddd; border-radius: 4px; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } .thumbnail > img { display: block; height: auto; max-width: 100%; margin-right: auto; margin-left: auto; } a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active { border-color: #eb6864; } .thumbnail .caption { padding: 9px; color: #777777; } .alert { padding: 15px; margin-bottom: 21px; border: 1px solid transparent; border-radius: 4px; } .alert h4 { margin-top: 0; color: inherit; } .alert .alert-link { font-weight: bold; } .alert > p, .alert > ul { margin-bottom: 0; } .alert > p + p { margin-top: 5px; } .alert-dismissable { padding-right: 35px; } .alert-dismissable .close { position: relative; top: -2px; right: -21px; color: inherit; } .alert-success { color: #468847; background-color: #dff0d8; border-color: #d6e9c6; } .alert-success hr { border-top-color: #c9e2b3; } .alert-success .alert-link { color: #356635; } .alert-info { color: #3a87ad; background-color: #d9edf7; border-color: #bce8f1; } .alert-info hr { border-top-color: #a6e1ec; } .alert-info .alert-link { color: #2d6987; } .alert-warning { color: #c09853; background-color: #fcf8e3; border-color: #fbeed5; } .alert-warning hr { border-top-color: #f8e5be; } .alert-warning .alert-link { color: #a47e3c; } .alert-danger { color: #b94a48; background-color: #f2dede; border-color: #eed3d7; } .alert-danger hr { border-top-color: #e6c1c7; } .alert-danger .alert-link { color: #953b39; } @-webkit-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-moz-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes <API key> { from { background-position: 0 0; } to { background-position: 40px 0; } } @keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { height: 21px; margin-bottom: 21px; overflow: hidden; background-color: #f5f5f5; border-radius: 4px; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } .progress-bar { float: left; width: 0; height: 100%; font-size: 13px; line-height: 21px; color: #ffffff; text-align: center; background-color: #eb6864; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -webkit-transition: width 0.6s ease; transition: width 0.6s ease; } .progress-striped .progress-bar { background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-size: 40px 40px; } .progress.active .progress-bar { -webkit-animation: <API key> 2s linear infinite; animation: <API key> 2s linear infinite; } .<API key> { background-color: #22b24c; } .progress-striped .<API key> { background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-info { background-color: #336699; } .progress-striped .progress-bar-info { background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .<API key> { background-color: #f5e625; } .progress-striped .<API key> { background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-danger { background-color: #f57a00; } .progress-striped .progress-bar-danger { background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .media, .media-body { overflow: hidden; zoom: 1; } .media, .media .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media-object { display: block; } .media-heading { margin: 0 0 5px; } .media > .pull-left { margin-right: 10px; } .media > .pull-right { margin-left: 10px; } .media-list { padding-left: 0; list-style: none; } .list-group { padding-left: 0; margin-bottom: 20px; } .list-group-item { position: relative; display: block; padding: 10px 15px; margin-bottom: -1px; background-color: #ffffff; border: 1px solid #dddddd; } .list-group-item:first-child { <API key>: 4px; <API key>: 4px; } .list-group-item:last-child { margin-bottom: 0; <API key>: 4px; <API key>: 4px; } .list-group-item > .badge { float: right; } .list-group-item > .badge + .badge { margin-right: 5px; } a.list-group-item { color: #555555; } a.list-group-item .<API key> { color: #333333; } a.list-group-item:hover, a.list-group-item:focus { text-decoration: none; background-color: #f5f5f5; } a.list-group-item.active, a.list-group-item.active:hover, a.list-group-item.active:focus { z-index: 2; color: #ffffff; background-color: #eb6864; border-color: #eb6864; } a.list-group-item.active .<API key>, a.list-group-item.active:hover .<API key>, a.list-group-item.active:focus .<API key> { color: inherit; } a.list-group-item.active .<API key>, a.list-group-item.active:hover .<API key>, a.list-group-item.active:focus .<API key> { color: #ffffff; } .<API key> { margin-top: 0; margin-bottom: 5px; } .<API key> { margin-bottom: 0; line-height: 1.3; } .panel { margin-bottom: 21px; background-color: #ffffff; border: 1px solid transparent; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); } .panel-body { padding: 15px; } .panel-body:before, .panel-body:after { display: table; content: " "; } .panel-body:after { clear: both; } .panel-body:before, .panel-body:after { display: table; content: " "; } .panel-body:after { clear: both; } .panel-body:before, .panel-body:after { display: table; content: " "; } .panel-body:after { clear: both; } .panel-body:before, .panel-body:after { display: table; content: " "; } .panel-body:after { clear: both; } .panel-body:before, .panel-body:after { display: table; content: " "; } .panel-body:after { clear: both; } .panel > .list-group { margin-bottom: 0; } .panel > .list-group .list-group-item { border-width: 1px 0; } .panel > .list-group .list-group-item:first-child { <API key>: 0; <API key>: 0; } .panel > .list-group .list-group-item:last-child { border-bottom: 0; } .panel-heading + .list-group .list-group-item:first-child { border-top-width: 0; } .panel > .table, .panel > .table-responsive { margin-bottom: 0; } .panel > .panel-body + .table, .panel > .panel-body + .table-responsive { border-top: 1px solid #dddddd; } .panel > .table-bordered, .panel > .table-responsive > .table-bordered { border: 0; } .panel > .table-bordered > thead > tr > th:first-child, .panel > .table-responsive > .table-bordered > thead > tr > th:first-child, .panel > .table-bordered > tbody > tr > th:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, .panel > .table-bordered > tfoot > tr > th:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, .panel > .table-bordered > thead > tr > td:first-child, .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, .panel > .table-bordered > tbody > tr > td:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, .panel > .table-bordered > tfoot > tr > td:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .panel > .table-bordered > thead > tr > th:last-child, .panel > .table-responsive > .table-bordered > thead > tr > th:last-child, .panel > .table-bordered > tbody > tr > th:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, .panel > .table-bordered > tfoot > tr > th:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, .panel > .table-bordered > thead > tr > td:last-child, .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, .panel > .table-bordered > tbody > tr > td:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, .panel > .table-bordered > tfoot > tr > td:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .panel > .table-bordered > thead > tr:last-child > th, .panel > .table-responsive > .table-bordered > thead > tr:last-child > th, .panel > .table-bordered > tbody > tr:last-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, .panel > .table-bordered > tfoot > tr:last-child > th, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th, .panel > .table-bordered > thead > tr:last-child > td, .panel > .table-responsive > .table-bordered > thead > tr:last-child > td, .panel > .table-bordered > tbody > tr:last-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, .panel > .table-bordered > tfoot > tr:last-child > td, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; } .panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; <API key>: 3px; <API key>: 3px; } .panel-heading > .dropdown .dropdown-toggle { color: inherit; } .panel-title { margin-top: 0; margin-bottom: 0; font-size: 17px; } .panel-title > a { color: inherit; } .panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #dddddd; <API key>: 3px; <API key>: 3px; } .panel-group .panel { margin-bottom: 0; overflow: hidden; border-radius: 4px; } .panel-group .panel + .panel { margin-top: 5px; } .panel-group .panel-heading { border-bottom: 0; } .panel-group .panel-heading + .panel-collapse .panel-body { border-top: 1px solid #dddddd; } .panel-group .panel-footer { border-top: 0; } .panel-group .panel-footer + .panel-collapse .panel-body { border-bottom: 1px solid #dddddd; } .panel-default { border-color: #dddddd; } .panel-default > .panel-heading { color: #777777; background-color: #f5f5f5; border-color: #dddddd; } .panel-default > .panel-heading + .panel-collapse .panel-body { border-top-color: #dddddd; } .panel-default > .panel-heading > .dropdown .caret { border-color: #777777 transparent; } .panel-default > .panel-footer + .panel-collapse .panel-body { border-bottom-color: #dddddd; } .panel-primary { border-color: #eb6864; } .panel-primary > .panel-heading { color: #ffffff; background-color: #eb6864; border-color: #eb6864; } .panel-primary > .panel-heading + .panel-collapse .panel-body { border-top-color: #eb6864; } .panel-primary > .panel-heading > .dropdown .caret { border-color: #ffffff transparent; } .panel-primary > .panel-footer + .panel-collapse .panel-body { border-bottom-color: #eb6864; } .panel-success { border-color: #22b24c; } .panel-success > .panel-heading { color: #468847; background-color: #22b24c; border-color: #22b24c; } .panel-success > .panel-heading + .panel-collapse .panel-body { border-top-color: #22b24c; } .panel-success > .panel-heading > .dropdown .caret { border-color: #468847 transparent; } .panel-success > .panel-footer + .panel-collapse .panel-body { border-bottom-color: #22b24c; } .panel-warning { border-color: #f5e625; } .panel-warning > .panel-heading { color: #c09853; background-color: #f5e625; border-color: #f5e625; } .panel-warning > .panel-heading + .panel-collapse .panel-body { border-top-color: #f5e625; } .panel-warning > .panel-heading > .dropdown .caret { border-color: #c09853 transparent; } .panel-warning > .panel-footer + .panel-collapse .panel-body { border-bottom-color: #f5e625; } .panel-danger { border-color: #f57a00; } .panel-danger > .panel-heading { color: #b94a48; background-color: #f57a00; border-color: #f57a00; } .panel-danger > .panel-heading + .panel-collapse .panel-body { border-top-color: #f57a00; } .panel-danger > .panel-heading > .dropdown .caret { border-color: #b94a48 transparent; } .panel-danger > .panel-footer + .panel-collapse .panel-body { border-bottom-color: #f57a00; } .panel-info { border-color: #336699; } .panel-info > .panel-heading { color: #3a87ad; background-color: #336699; border-color: #336699; } .panel-info > .panel-heading + .panel-collapse .panel-body { border-top-color: #336699; } .panel-info > .panel-heading > .dropdown .caret { border-color: #3a87ad transparent; } .panel-info > .panel-footer + .panel-collapse .panel-body { border-bottom-color: #336699; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } .well-lg { padding: 24px; border-radius: 6px; } .well-sm { padding: 9px; border-radius: 3px; } .close { float: right; font-size: 22.5px; font-weight: bold; line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.2; filter: alpha(opacity=20); } .close:hover, .close:focus { color: #000000; text-decoration: none; cursor: pointer; opacity: 0.5; filter: alpha(opacity=50); } button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; } .modal-open { overflow: hidden; } .modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; display: none; overflow: auto; overflow-y: scroll; } .modal.fade .modal-dialog { -webkit-transform: translate(0, -25%); -ms-transform: translate(0, -25%); transform: translate(0, -25%); -webkit-transition: -webkit-transform 0.3s ease-out; -moz-transition: -moz-transform 0.3s ease-out; -o-transition: -o-transform 0.3s ease-out; transition: transform 0.3s ease-out; } .modal.in .modal-dialog { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0); } .modal-dialog { position: relative; z-index: 1050; width: auto; padding: 10px; margin-right: auto; margin-left: auto; } .modal-content { position: relative; background-color: #ffffff; border: 1px solid #999999; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; outline: none; -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); background-clip: padding-box; } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1030; background-color: #000000; } .modal-backdrop.fade { opacity: 0; filter: alpha(opacity=0); } .modal-backdrop.in { opacity: 0.5; filter: alpha(opacity=50); } .modal-header { min-height: 16.428571429px; padding: 15px; border-bottom: 1px solid #e5e5e5; } .modal-header .close { margin-top: -2px; } .modal-title { margin: 0; line-height: 1.428571429; } .modal-body { position: relative; padding: 20px; } .modal-footer { padding: 19px 20px 20px; margin-top: 15px; text-align: right; border-top: 1px solid #e5e5e5; } .modal-footer:before, .modal-footer:after { display: table; content: " "; } .modal-footer:after { clear: both; } .modal-footer:before, .modal-footer:after { display: table; content: " "; } .modal-footer:after { clear: both; } .modal-footer:before, .modal-footer:after { display: table; content: " "; } .modal-footer:after { clear: both; } .modal-footer:before, .modal-footer:after { display: table; content: " "; } .modal-footer:after { clear: both; } .modal-footer:before, .modal-footer:after { display: table; content: " "; } .modal-footer:after { clear: both; } .modal-footer .btn + .btn { margin-bottom: 0; margin-left: 5px; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } @media screen and (min-width: 768px) { .modal-dialog { width: 600px; padding-top: 30px; padding-bottom: 30px; } .modal-content { -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); } } .tooltip { position: absolute; z-index: 1030; display: block; font-size: 13px; line-height: 1.4; opacity: 0; filter: alpha(opacity=0); visibility: visible; } .tooltip.in { opacity: 0.9; filter: alpha(opacity=90); } .tooltip.top { padding: 5px 0; margin-top: -3px; } .tooltip.right { padding: 0 5px; margin-left: 3px; } .tooltip.bottom { padding: 5px 0; margin-top: 3px; } .tooltip.left { padding: 0 5px; margin-left: -3px; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #ffffff; text-align: center; text-decoration: none; background-color: rgba(0, 0, 0, 0.9); border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-color: rgba(0, 0, 0, 0.9); border-width: 5px 5px 0; } .tooltip.top-left .tooltip-arrow { bottom: 0; left: 5px; border-top-color: rgba(0, 0, 0, 0.9); border-width: 5px 5px 0; } .tooltip.top-right .tooltip-arrow { right: 5px; bottom: 0; border-top-color: rgba(0, 0, 0, 0.9); border-width: 5px 5px 0; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-right-color: rgba(0, 0, 0, 0.9); border-width: 5px 5px 5px 0; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-left-color: rgba(0, 0, 0, 0.9); border-width: 5px 0 5px 5px; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-bottom-color: rgba(0, 0, 0, 0.9); border-width: 0 5px 5px; } .tooltip.bottom-left .tooltip-arrow { top: 0; left: 5px; border-bottom-color: rgba(0, 0, 0, 0.9); border-width: 0 5px 5px; } .tooltip.bottom-right .tooltip-arrow { top: 0; right: 5px; border-bottom-color: rgba(0, 0, 0, 0.9); border-width: 0 5px 5px; } .popover { position: absolute; top: 0; left: 0; z-index: 1010; display: none; max-width: 276px; padding: 1px; text-align: left; white-space: normal; background-color: #ffffff; border: 1px solid #cccccc; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); background-clip: padding-box; } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { padding: 8px 14px; margin: 0; font-size: 15px; font-weight: normal; line-height: 18px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-radius: 5px 5px 0 0; } .popover-content { padding: 9px 14px; } .popover .arrow, .popover .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover .arrow { border-width: 11px; } .popover .arrow:after { border-width: 10px; content: ""; } .popover.top .arrow { bottom: -11px; left: 50%; margin-left: -11px; border-top-color: #999999; border-top-color: rgba(0, 0, 0, 0.25); border-bottom-width: 0; } .popover.top .arrow:after { bottom: 1px; margin-left: -10px; border-top-color: #ffffff; border-bottom-width: 0; content: " "; } .popover.right .arrow { top: 50%; left: -11px; margin-top: -11px; border-right-color: #999999; border-right-color: rgba(0, 0, 0, 0.25); border-left-width: 0; } .popover.right .arrow:after { bottom: -10px; left: 1px; border-right-color: #ffffff; border-left-width: 0; content: " "; } .popover.bottom .arrow { top: -11px; left: 50%; margin-left: -11px; border-bottom-color: #999999; border-bottom-color: rgba(0, 0, 0, 0.25); border-top-width: 0; } .popover.bottom .arrow:after { top: 1px; margin-left: -10px; border-bottom-color: #ffffff; border-top-width: 0; content: " "; } .popover.left .arrow { top: 50%; right: -11px; margin-top: -11px; border-left-color: #999999; border-left-color: rgba(0, 0, 0, 0.25); border-right-width: 0; } .popover.left .arrow:after { right: 1px; bottom: -10px; border-left-color: #ffffff; border-right-width: 0; content: " "; } .carousel { position: relative; } .carousel-inner { position: relative; width: 100%; overflow: hidden; } .carousel-inner > .item { position: relative; display: none; -webkit-transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; height: auto; max-width: 100%; line-height: 1; } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 0; bottom: 0; left: 0; width: 15%; font-size: 20px; color: #ffffff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); opacity: 0.5; filter: alpha(opacity=50); } .carousel-control.left { background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001))); background-image: -<API key>(left, color-stop(rgba(0, 0, 0, 0.5) 0), color-stop(rgba(0, 0, 0, 0.0001) 100%)); background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%); background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); } .carousel-control.right { right: 0; left: auto; background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5))); background-image: -<API key>(left, color-stop(rgba(0, 0, 0, 0.0001) 0), color-stop(rgba(0, 0, 0, 0.5) 100%)); background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%); background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); } .carousel-control:hover, .carousel-control:focus { color: #ffffff; text-decoration: none; opacity: 0.9; filter: alpha(opacity=90); } .carousel-control .icon-prev, .carousel-control .icon-next, .carousel-control .<API key>, .carousel-control .<API key> { position: absolute; top: 50%; z-index: 5; display: inline-block; } .carousel-control .icon-prev, .carousel-control .<API key> { left: 50%; } .carousel-control .icon-next, .carousel-control .<API key> { right: 50%; } .carousel-control .icon-prev, .carousel-control .icon-next { width: 20px; height: 20px; margin-top: -10px; margin-left: -10px; font-family: serif; } .carousel-control .icon-prev:before { content: '\2039'; } .carousel-control .icon-next:before { content: '\203a'; } .carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; padding-left: 0; margin-left: -30%; text-align: center; list-style: none; } .carousel-indicators li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; cursor: pointer; background-color: #000 \9; background-color: rgba(0, 0, 0, 0); border: 1px solid #ffffff; border-radius: 10px; } .carousel-indicators .active { width: 12px; height: 12px; margin: 0; background-color: #ffffff; } .carousel-caption { position: absolute; right: 15%; bottom: 20px; left: 15%; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: #ffffff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } .carousel-caption .btn { text-shadow: none; } @media screen and (min-width: 768px) { .carousel-control .<API key>, .carousel-control .<API key>, .carousel-control .icon-prev, .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; margin-left: -15px; font-size: 30px; } .carousel-caption { right: 20%; left: 20%; padding-bottom: 30px; } .carousel-indicators { bottom: 20px; } } .clearfix:before, .clearfix:after { display: table; content: " "; } .clearfix:after { clear: both; } .clearfix:before, .clearfix:after { display: table; content: " "; } .clearfix:after { clear: both; } .center-block { display: block; margin-right: auto; margin-left: auto; } .pull-right { float: right !important; } .pull-left { float: left !important; } .hide { display: none !important; } .show { display: block !important; } .invisible { visibility: hidden; } .text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .hidden { display: none !important; visibility: hidden !important; } .affix { position: fixed; } @-ms-viewport { width: device-width; } .visible-xs, tr.visible-xs, th.visible-xs, td.visible-xs { display: none !important; } @media (max-width: 767px) { .visible-xs { display: block !important; } tr.visible-xs { display: table-row !important; } th.visible-xs, td.visible-xs { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-xs.visible-sm { display: block !important; } tr.visible-xs.visible-sm { display: table-row !important; } th.visible-xs.visible-sm, td.visible-xs.visible-sm { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-xs.visible-md { display: block !important; } tr.visible-xs.visible-md { display: table-row !important; } th.visible-xs.visible-md, td.visible-xs.visible-md { display: table-cell !important; } } @media (min-width: 1200px) { .visible-xs.visible-lg { display: block !important; } tr.visible-xs.visible-lg { display: table-row !important; } th.visible-xs.visible-lg, td.visible-xs.visible-lg { display: table-cell !important; } } .visible-sm, tr.visible-sm, th.visible-sm, td.visible-sm { display: none !important; } @media (max-width: 767px) { .visible-sm.visible-xs { display: block !important; } tr.visible-sm.visible-xs { display: table-row !important; } th.visible-sm.visible-xs, td.visible-sm.visible-xs { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm { display: block !important; } tr.visible-sm { display: table-row !important; } th.visible-sm, td.visible-sm { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-sm.visible-md { display: block !important; } tr.visible-sm.visible-md { display: table-row !important; } th.visible-sm.visible-md, td.visible-sm.visible-md { display: table-cell !important; } } @media (min-width: 1200px) { .visible-sm.visible-lg { display: block !important; } tr.visible-sm.visible-lg { display: table-row !important; } th.visible-sm.visible-lg, td.visible-sm.visible-lg { display: table-cell !important; } } .visible-md, tr.visible-md, th.visible-md, td.visible-md { display: none !important; } @media (max-width: 767px) { .visible-md.visible-xs { display: block !important; } tr.visible-md.visible-xs { display: table-row !important; } th.visible-md.visible-xs, td.visible-md.visible-xs { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-md.visible-sm { display: block !important; } tr.visible-md.visible-sm { display: table-row !important; } th.visible-md.visible-sm, td.visible-md.visible-sm { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md { display: block !important; } tr.visible-md { display: table-row !important; } th.visible-md, td.visible-md { display: table-cell !important; } } @media (min-width: 1200px) { .visible-md.visible-lg { display: block !important; } tr.visible-md.visible-lg { display: table-row !important; } th.visible-md.visible-lg, td.visible-md.visible-lg { display: table-cell !important; } } .visible-lg, tr.visible-lg, th.visible-lg, td.visible-lg { display: none !important; } @media (max-width: 767px) { .visible-lg.visible-xs { display: block !important; } tr.visible-lg.visible-xs { display: table-row !important; } th.visible-lg.visible-xs, td.visible-lg.visible-xs { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-lg.visible-sm { display: block !important; } tr.visible-lg.visible-sm { display: table-row !important; } th.visible-lg.visible-sm, td.visible-lg.visible-sm { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-lg.visible-md { display: block !important; } tr.visible-lg.visible-md { display: table-row !important; } th.visible-lg.visible-md, td.visible-lg.visible-md { display: table-cell !important; } } @media (min-width: 1200px) { .visible-lg { display: block !important; } tr.visible-lg { display: table-row !important; } th.visible-lg, td.visible-lg { display: table-cell !important; } } .hidden-xs { display: block !important; } tr.hidden-xs { display: table-row !important; } th.hidden-xs, td.hidden-xs { display: table-cell !important; } @media (max-width: 767px) { .hidden-xs, tr.hidden-xs, th.hidden-xs, td.hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-xs.hidden-sm, tr.hidden-xs.hidden-sm, th.hidden-xs.hidden-sm, td.hidden-xs.hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-xs.hidden-md, tr.hidden-xs.hidden-md, th.hidden-xs.hidden-md, td.hidden-xs.hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-xs.hidden-lg, tr.hidden-xs.hidden-lg, th.hidden-xs.hidden-lg, td.hidden-xs.hidden-lg { display: none !important; } } .hidden-sm { display: block !important; } tr.hidden-sm { display: table-row !important; } th.hidden-sm, td.hidden-sm { display: table-cell !important; } @media (max-width: 767px) { .hidden-sm.hidden-xs, tr.hidden-sm.hidden-xs, th.hidden-sm.hidden-xs, td.hidden-sm.hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-sm, tr.hidden-sm, th.hidden-sm, td.hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-sm.hidden-md, tr.hidden-sm.hidden-md, th.hidden-sm.hidden-md, td.hidden-sm.hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-sm.hidden-lg, tr.hidden-sm.hidden-lg, th.hidden-sm.hidden-lg, td.hidden-sm.hidden-lg { display: none !important; } } .hidden-md { display: block !important; } tr.hidden-md { display: table-row !important; } th.hidden-md, td.hidden-md { display: table-cell !important; } @media (max-width: 767px) { .hidden-md.hidden-xs, tr.hidden-md.hidden-xs, th.hidden-md.hidden-xs, td.hidden-md.hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-md.hidden-sm, tr.hidden-md.hidden-sm, th.hidden-md.hidden-sm, td.hidden-md.hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-md, tr.hidden-md, th.hidden-md, td.hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-md.hidden-lg, tr.hidden-md.hidden-lg, th.hidden-md.hidden-lg, td.hidden-md.hidden-lg { display: none !important; } } .hidden-lg { display: block !important; } tr.hidden-lg { display: table-row !important; } th.hidden-lg, td.hidden-lg { display: table-cell !important; } @media (max-width: 767px) { .hidden-lg.hidden-xs, tr.hidden-lg.hidden-xs, th.hidden-lg.hidden-xs, td.hidden-lg.hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-lg.hidden-sm, tr.hidden-lg.hidden-sm, th.hidden-lg.hidden-sm, td.hidden-lg.hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-lg.hidden-md, tr.hidden-lg.hidden-md, th.hidden-lg.hidden-md, td.hidden-lg.hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-lg, tr.hidden-lg, th.hidden-lg, td.hidden-lg { display: none !important; } } .visible-print, tr.visible-print, th.visible-print, td.visible-print { display: none !important; } @media print { .visible-print { display: block !important; } tr.visible-print { display: table-row !important; } th.visible-print, td.visible-print { display: table-cell !important; } .hidden-print, tr.hidden-print, th.hidden-print, td.hidden-print { display: none !important; } } .navbar { font-family: "News Cycle", "Arial Narrow Bold", sans-serif; font-size: 18px; font-weight: 700; } .navbar-brand { font-size: 18px; font-weight: 700; text-transform: uppercase; } .has-warning .help-block, .has-warning .control-label { color: #f57a00; } .has-warning .form-control, .has-warning .form-control:focus { border-color: #f57a00; } .has-error .help-block, .has-error .control-label { color: #eb6864; } .has-error .form-control, .has-error .form-control:focus { border-color: #eb6864; } .has-success .help-block, .has-success .control-label { color: #22b24c; } .has-success .form-control, .has-success .form-control:focus { border-color: #22b24c; } .pagination .active > a, .pagination .active > a:hover { border-color: #ddd; } .jumbotron h1, .jumbotron h2, .jumbotron h3, .jumbotron h4, .jumbotron h5, .jumbotron h6 { font-family: "News Cycle", "Arial Narrow Bold", sans-serif; font-weight: 700; color: #000; } .panel-primary .panel-title, .panel-success .panel-title, .panel-warning .panel-title, .panel-danger .panel-title, .panel-info .panel-title { color: #fff; } .clearfix:before, .clearfix:after { display: table; content: " "; } .clearfix:after { clear: both; } .clearfix:before, .clearfix:after { display: table; content: " "; } .clearfix:after { clear: both; } .center-block { display: block; margin-right: auto; margin-left: auto; } .pull-right { float: right !important; } .pull-left { float: left !important; } .hide { display: none !important; } .show { display: block !important; } .invisible { visibility: hidden; } .text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .hidden { display: none !important; visibility: hidden !important; } .affix { position: fixed; } .top-space { margin-top: 45px; }
Copyright 2013 Romens Team http://romens.ru/ 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 <gtest/gtest.h> #include "loquat/misc/binary_search.hpp" TEST(BinarySearchTest, Integer){ for(int l = -16; l <= 16; ++l){ for(int r = l; r <= 16; ++r){ for(int expect = l; expect <= r; ++expect){ const auto actual = loquat::binary_search( l, r, [=](int x){ return x < expect; }); EXPECT_EQ(expect, actual); } } } } TEST(BinarySearchTest, Floating){ for(int li = -16; li <= 16; ++li){ for(int ri = li; ri <= li; ++ri){ const double l = li * 1.1, r = ri * 1.1; for(double expect = l; expect < r; expect += 0.2){ const auto actual = loquat::binary_search( l, r, [=](double x){ return x < expect; }); EXPECT_DOUBLE_EQ(expect, actual); } const auto min_actual = loquat::binary_search( l, r, [=](double){ return true; }); EXPECT_DOUBLE_EQ(l, min_actual); const auto max_actual = loquat::binary_search( l, r, [=](double){ return false; }); EXPECT_DOUBLE_EQ(r, max_actual); } } }
""" ``editquality generate_make -h`` :: Code-generate Makefile from template and configuration :Usage: generate_make -h | --help generate_make [--config=<path>] [--main=<filename>] [--output=<path>] [--templates=<path>] [--debug] :Options: --config=<path> Directory to search for configuration files [default: config/] --main=<filename> Override to use a main template other than the default [default: Makefile.j2] --output=<path> Where to write the Makefile output. [default: <stdout>] --templates=<path> Directory to search for input templates. [default: templates/] --debug Print debug logging """ # TODO: # * make API calls to learn things # * ores/config has dict merge # * survey dependency solvers # ** Still considering: scons, doit, drake, ninja, meson # ** Don't like so far: waf # * Where can we store information about samples? # Original population rates; how we've distorted them. import logging import os.path import sys import docopt from .. import config from ..codegen import generate logger = logging.getLogger(__name__) def main(argv=None): args = docopt.docopt(__doc__, argv=argv) logging.basicConfig( level=logging.DEBUG if args['--debug'] else logging.WARNING, format='%(asctime)s %(levelname)s:%(name)s -- %(message)s' ) config_path = args["--config"] output_f = sys.stdout \ if args["--output"] == "<stdout>" \ else open(args["--output"], "w") templates_path = args["--templates"] main_template_path = args["--main"] if not os.path.isabs(main_template_path): # Join a filename to the default templates dir. main_template_path = os.path.join(templates_path, main_template_path) with open(main_template_path, "r") as f: main_template = f.read() variables = config.load_config(config_path) output = generate.generate(variables, templates_path, main_template) output_f.write(output)
#include "config.h" #include <math.h> #include <stdlib.h> #include "AL/al.h" #include "AL/alc.h" #include "alMain.h" #include "alAuxEffectSlot.h" #include "alEffect.h" #include "alError.h" #include "alu.h" typedef struct DelayLine { // The delay lines use sample lengths that are powers of 2 to allow // bitmasking instead of modulus wrapping. ALuint Mask; ALfloat *Line; } DelayLine; typedef struct ALverbState { // Must be first in all effects! ALeffectState state; // All delay lines are allocated as a single buffer to reduce memory // fragmentation and management code. ALfloat *SampleBuffer; // Master effect low-pass filter (2 chained 1-pole filters). FILTER LpFilter; ALfloat LpHistory[2]; // Initial effect delay and decorrelation. DelayLine Delay; // The tap points for the initial delay. First tap goes to early // reflections, the last four decorrelate to late reverb. ALuint Tap[5]; struct { // Total gain for early reflections. ALfloat Gain; // Early reflections are done with 4 delay lines. ALfloat Coeff[4]; DelayLine Delay[4]; ALuint Offset[4]; // The gain for each output channel based on 3D panning. ALfloat PanGain[OUTPUTCHANNELS]; } Early; struct { // Total gain for late reverb. ALfloat Gain; // Attenuation to compensate for modal density and decay rate. ALfloat DensityGain; // The feed-back and feed-forward all-pass coefficient. ALfloat ApFeedCoeff; // Mixing matrix coefficient. ALfloat MixCoeff; // Late reverb has 4 parallel all-pass filters. ALfloat ApCoeff[4]; DelayLine ApDelay[4]; ALuint ApOffset[4]; // In addition to 4 cyclical delay lines. ALfloat Coeff[4]; DelayLine Delay[4]; ALuint Offset[4]; // The cyclical delay lines are 1-pole low-pass filtered. ALfloat LpCoeff[4]; ALfloat LpSample[4]; // The gain for each output channel based on 3D panning. ALfloat PanGain[OUTPUTCHANNELS]; } Late; // The current read offset for all delay lines. ALuint Offset; } ALverbState; // All delay line lengths are specified in seconds. // The lengths of the early delay lines. static const ALfloat EARLY_LINE_LENGTH[4] = { 0.0015f, 0.0045f, 0.0135f, 0.0405f }; // The lengths of the late all-pass delay lines. static const ALfloat ALLPASS_LINE_LENGTH[4] = { 0.0151f, 0.0167f, 0.0183f, 0.0200f, }; // The lengths of the late cyclical delay lines. static const ALfloat LATE_LINE_LENGTH[4] = { 0.0211f, 0.0311f, 0.0461f, 0.0680f }; // The late cyclical delay lines have a variable length dependent on the // effect's density parameter (inverted for some reason) and this multiplier. static const ALfloat <API key> = 4.0f; // Input into the late reverb is decorrelated between four channels. Their // timings are dependent on a fraction and multiplier. See VerbUpdate() for // the calculations involved. static const ALfloat DECO_FRACTION = 1.0f / 32.0f; static const ALfloat DECO_MULTIPLIER = 2.0f; // The maximum length of initial delay for the master delay line (a sum of // the maximum early reflection and late reverb delays). static const ALfloat MASTER_LINE_LENGTH = 0.3f + 0.1f; // Find the next power of 2. Actually, this will return the input value if // it is already a power of 2. static ALuint NextPowerOf2(ALuint value) { ALuint powerOf2 = 1; if(value) { value while(value) { value >>= 1; powerOf2 <<= 1; } } return powerOf2; } // Basic delay line input/output routines. static __inline ALfloat DelayLineOut(DelayLine *Delay, ALuint offset) { return Delay->Line[offset&Delay->Mask]; } static __inline ALvoid DelayLineIn(DelayLine *Delay, ALuint offset, ALfloat in) { Delay->Line[offset&Delay->Mask] = in; } // Delay line output routine for early reflections. static __inline ALfloat EarlyDelayLineOut(ALverbState *State, ALuint index) { return State->Early.Coeff[index] * DelayLineOut(&State->Early.Delay[index], State->Offset - State->Early.Offset[index]); } // Given an input sample, this function produces stereo output for early // reflections. static __inline ALvoid EarlyReflection(ALverbState *State, ALfloat in, ALfloat *out) { ALfloat d[4], v, f[4]; // Obtain the decayed results of each early delay line. d[0] = EarlyDelayLineOut(State, 0); d[1] = EarlyDelayLineOut(State, 1); d[2] = EarlyDelayLineOut(State, 2); d[3] = EarlyDelayLineOut(State, 3); v = (d[0] + d[1] + d[2] + d[3]) * 0.5f; // The junction is loaded with the input here. v += in; // Calculate the feed values for the delay lines. f[0] = v - d[0]; f[1] = v - d[1]; f[2] = v - d[2]; f[3] = v - d[3]; // Refeed the delay lines. DelayLineIn(&State->Early.Delay[0], State->Offset, f[0]); DelayLineIn(&State->Early.Delay[1], State->Offset, f[1]); DelayLineIn(&State->Early.Delay[2], State->Offset, f[2]); DelayLineIn(&State->Early.Delay[3], State->Offset, f[3]); // Output the results of the junction for all four lines. out[0] = State->Early.Gain * f[0]; out[1] = State->Early.Gain * f[1]; out[2] = State->Early.Gain * f[2]; out[3] = State->Early.Gain * f[3]; } // All-pass input/output routine for late reverb. static __inline ALfloat LateAllPassInOut(ALverbState *State, ALuint index, ALfloat in) { ALfloat out; out = State->Late.ApCoeff[index] * DelayLineOut(&State->Late.ApDelay[index], State->Offset - State->Late.ApOffset[index]); out -= (State->Late.ApFeedCoeff * in); DelayLineIn(&State->Late.ApDelay[index], State->Offset, (State->Late.ApFeedCoeff * out) + in); return out; } // Delay line output routine for late reverb. static __inline ALfloat LateDelayLineOut(ALverbState *State, ALuint index) { return State->Late.Coeff[index] * DelayLineOut(&State->Late.Delay[index], State->Offset - State->Late.Offset[index]); } // Low-pass filter input/output routine for late reverb. static __inline ALfloat LateLowPassInOut(ALverbState *State, ALuint index, ALfloat in) { State->Late.LpSample[index] = in + ((State->Late.LpSample[index] - in) * State->Late.LpCoeff[index]); return State->Late.LpSample[index]; } // Given four decorrelated input samples, this function produces stereo // output for late reverb. static __inline ALvoid LateReverb(ALverbState *State, ALfloat *in, ALfloat *out) { ALfloat d[4], f[4]; // Obtain the decayed results of the cyclical delay lines, and add the // corresponding input channels attenuated by density. Then pass the // results through the low-pass filters. d[0] = LateLowPassInOut(State, 0, (State->Late.DensityGain * in[0]) + LateDelayLineOut(State, 0)); d[1] = LateLowPassInOut(State, 1, (State->Late.DensityGain * in[1]) + LateDelayLineOut(State, 1)); d[2] = LateLowPassInOut(State, 2, (State->Late.DensityGain * in[2]) + LateDelayLineOut(State, 2)); d[3] = LateLowPassInOut(State, 3, (State->Late.DensityGain * in[3]) + LateDelayLineOut(State, 3)); // To help increase diffusion, run each line through an all-pass filter. // The order of the all-pass filters is selected so that the shortest // all-pass filter will feed the shortest delay line. d[0] = LateAllPassInOut(State, 1, d[0]); d[1] = LateAllPassInOut(State, 3, d[1]); d[2] = LateAllPassInOut(State, 0, d[2]); d[3] = LateAllPassInOut(State, 2, d[3]); /* Late reverb is done with a modified feedback delay network (FDN) * topology. Four input lines are each fed through their own all-pass * filter and then into the mixing matrix. The four outputs of the * mixing matrix are then cycled back to the inputs. Each output feeds * a different input to form a circlular feed cycle. * * The mixing matrix used is a 4D skew-symmetric rotation matrix derived * using a single unitary rotational parameter: * * [ d, a, b, c ] 1 = a^2 + b^2 + c^2 + d^2 * [ -a, d, c, -b ] * [ -b, -c, d, a ] * [ -c, b, -a, d ] * * The rotation is constructed from the effect's diffusion parameter, * yielding: 1 = x^2 + 3 y^2; where a, b, and c are the coefficient y * with differing signs, and d is the coefficient x. The matrix is thus: * * [ x, y, -y, y ] x = 1 - (0.5 diffusion^3) * [ -y, x, y, y ] y = sqrt((1 - x^2) / 3) * [ y, -y, x, y ] * [ -y, -y, -y, x ] * * To reduce the number of multiplies, the x coefficient is applied with * the cyclical delay line coefficients. Thus only the y coefficient is * applied when mixing, and is modified to be: y / x. */ f[0] = d[0] + (State->Late.MixCoeff * ( d[1] - d[2] + d[3])); f[1] = d[1] + (State->Late.MixCoeff * (-d[0] + d[2] + d[3])); f[2] = d[2] + (State->Late.MixCoeff * ( d[0] - d[1] + d[3])); f[3] = d[3] + (State->Late.MixCoeff * (-d[0] - d[1] - d[2])); // Output the results of the matrix for all four cyclical delay lines, // attenuated by the late reverb gain (which is attenuated by the 'x' // mix coefficient). out[0] = State->Late.Gain * f[0]; out[1] = State->Late.Gain * f[1]; out[2] = State->Late.Gain * f[2]; out[3] = State->Late.Gain * f[3]; // The delay lines are fed circularly in the order: // 0 -> 1 -> 3 -> 2 -> 0 ... DelayLineIn(&State->Late.Delay[0], State->Offset, f[2]); DelayLineIn(&State->Late.Delay[1], State->Offset, f[0]); DelayLineIn(&State->Late.Delay[2], State->Offset, f[3]); DelayLineIn(&State->Late.Delay[3], State->Offset, f[1]); } // Process the reverb for a given input sample, resulting in separate four- // channel output for both early reflections and late reverb. static __inline ALvoid ReverbInOut(ALverbState *State, ALfloat in, ALfloat *early, ALfloat *late) { ALfloat taps[4]; // Low-pass filter the incoming sample. in = lpFilter2P(&State->LpFilter, 0, in); // Feed the initial delay line. DelayLineIn(&State->Delay, State->Offset, in); // Calculate the early reflection from the first delay tap. in = DelayLineOut(&State->Delay, State->Offset - State->Tap[0]); EarlyReflection(State, in, early); // Calculate the late reverb from the last four delay taps. taps[0] = DelayLineOut(&State->Delay, State->Offset - State->Tap[1]); taps[1] = DelayLineOut(&State->Delay, State->Offset - State->Tap[2]); taps[2] = DelayLineOut(&State->Delay, State->Offset - State->Tap[3]); taps[3] = DelayLineOut(&State->Delay, State->Offset - State->Tap[4]); LateReverb(State, taps, late); // Step all delays forward one sample. State->Offset++; } // This destroys the reverb state. It should be called only when the effect // slot has a different (or no) effect loaded over the reverb effect. ALvoid VerbDestroy(ALeffectState *effect) { ALverbState *State = (ALverbState*)effect; if(State) { free(State->SampleBuffer); State->SampleBuffer = NULL; free(State); } } // NOTE: Temp, remove later. static __inline ALint aluCart2LUTpos(ALfloat re, ALfloat im) { ALint pos = 0; ALfloat denom = aluFabs(re) + aluFabs(im); if(denom > 0.0f) pos = (ALint)(QUADRANT_NUM*aluFabs(im) / denom + 0.5); if(re < 0.0) pos = 2 * QUADRANT_NUM - pos; if(im < 0.0) pos = LUT_NUM - pos; return pos%LUT_NUM; } // This updates the reverb state. This is called any time the reverb effect // is loaded into a slot. ALvoid VerbUpdate(ALeffectState *effect, ALCcontext *Context, ALeffect *Effect) { ALverbState *State = (ALverbState*)effect; ALuint index; ALfloat length, mixCoeff, cw, g, coeff; ALfloat hfRatio = Effect->Reverb.DecayHFRatio; // Calculate the master low-pass filter (from the master effect HF gain). cw = cos(2.0 * M_PI * Effect->Reverb.HFReference / Context->Frequency); g = __max(Effect->Reverb.GainHF, 0.0001f); State->LpFilter.coeff = 0.0f; if(g < 0.9999f) // 1-epsilon State->LpFilter.coeff = (1 - g*cw - aluSqrt(2*g*(1-cw) - g*g*(1 - cw*cw))) / (1 - g); // Calculate the initial delay taps. length = Effect->Reverb.ReflectionsDelay; State->Tap[0] = (ALuint)(length * Context->Frequency); length += Effect->Reverb.LateReverbDelay; /* The four inputs to the late reverb are decorrelated to smooth the * initial reverb and reduce harsh echos. The timings are calculated as * multiples of a fraction of the smallest cyclical delay time. This * result is then adjusted so that the first tap occurs immediately (all * taps are reduced by the shortest fraction). * * offset[index] = ((FRACTION MULTIPLIER^index) - 1) delay */ for(index = 0;index < 4;index++) { length += LATE_LINE_LENGTH[0] * (1.0f + (Effect->Reverb.Density * <API key>)) * (DECO_FRACTION * (pow(DECO_MULTIPLIER, (ALfloat)index) - 1.0f)); State->Tap[1 + index] = (ALuint)(length * Context->Frequency); } // Calculate the early reflections gain (from the master effect gain, and // reflections gain parameters). State->Early.Gain = Effect->Reverb.Gain * Effect->Reverb.ReflectionsGain; // Calculate the gain (coefficient) for each early delay line. for(index = 0;index < 4;index++) State->Early.Coeff[index] = pow(10.0f, EARLY_LINE_LENGTH[index] / Effect->Reverb.LateReverbDelay * -60.0f / 20.0f); // Calculate the first mixing matrix coefficient (x). mixCoeff = 1.0f - (0.5f * pow(Effect->Reverb.Diffusion, 3.0f)); // Calculate the late reverb gain (from the master effect gain, and late // reverb gain parameters). Since the output is tapped prior to the // application of the delay line coefficients, this gain needs to be // attenuated by the 'x' mix coefficient from above. State->Late.Gain = Effect->Reverb.Gain * Effect->Reverb.LateReverbGain * mixCoeff; /* To compensate for changes in modal density and decay time of the late * reverb signal, the input is attenuated based on the maximal energy of * the outgoing signal. This is calculated as the ratio between a * reference value and the current approximation of energy for the output * signal. * * Reverb output matches exponential decay of the form Sum(a^n), where a * is the attenuation coefficient, and n is the sample ranging from 0 to * infinity. The signal energy can thus be approximated using the area * under this curve, calculated as: 1 / (1 - a). * * The reference energy is calculated from a signal at the lowest (effect * at 1.0) density with a decay time of one second. * * The coefficient is calculated as the average length of the cyclical * delay lines. This produces a better result than calculating the gain * for each line individually (most likely a side effect of diffusion). * * The final result is the square root of the ratio bound to a maximum * value of 1 (no amplification). */ length = (LATE_LINE_LENGTH[0] + LATE_LINE_LENGTH[1] + LATE_LINE_LENGTH[2] + LATE_LINE_LENGTH[3]); g = length * (1.0f + <API key>) * 0.25f; g = pow(10.0f, g * -60.0f / 20.0f); g = 1.0f / (1.0f - (g * g)); length *= 1.0f + (Effect->Reverb.Density * <API key>) * 0.25f; length = pow(10.0f, length / Effect->Reverb.DecayTime * -60.0f / 20.0f); length = 1.0f / (1.0f - (length * length)); State->Late.DensityGain = __min(aluSqrt(g / length), 1.0f); // Calculate the all-pass feed-back and feed-forward coefficient. State->Late.ApFeedCoeff = 0.6f * pow(Effect->Reverb.Diffusion, 3.0f); // Calculate the mixing matrix coefficient (y / x). g = aluSqrt((1.0f - (mixCoeff * mixCoeff)) / 3.0f); State->Late.MixCoeff = g / mixCoeff; for(index = 0;index < 4;index++) { // Calculate the gain (coefficient) for each all-pass line. State->Late.ApCoeff[index] = pow(10.0f, ALLPASS_LINE_LENGTH[index] / Effect->Reverb.DecayTime * -60.0f / 20.0f); } // If the HF limit parameter is flagged, calculate an appropriate limit // based on the air absorption parameter. if(Effect->Reverb.DecayHFLimit && Effect->Reverb.AirAbsorptionGainHF < 1.0f) { ALfloat limitRatio; // For each of the cyclical delays, find the attenuation due to air // absorption in dB (converting delay time to meters using the speed // of sound). Then reversing the decay equation, solve for HF ratio. // The delay length is cancelled out of the equation, so it can be // calculated once for all lines. limitRatio = 1.0f / (log10(Effect->Reverb.AirAbsorptionGainHF) * <API key> * Effect->Reverb.DecayTime / -60.0f * 20.0f); // Need to limit the result to a minimum of 0.1, just like the HF // ratio parameter. limitRatio = __max(limitRatio, 0.1f); // Using the limit calculated above, apply the upper bound to the // HF ratio. hfRatio = __min(hfRatio, limitRatio); } // Calculate the low-pass filter frequency. cw = cos(2.0f * M_PI * Effect->Reverb.HFReference / Context->Frequency); for(index = 0;index < 4;index++) { // Calculate the length (in seconds) of each cyclical delay line. length = LATE_LINE_LENGTH[index] * (1.0f + (Effect->Reverb.Density * <API key>)); // Calculate the delay offset for the cyclical delay lines. State->Late.Offset[index] = (ALuint)(length * Context->Frequency); // Calculate the gain (coefficient) for each cyclical line. State->Late.Coeff[index] = pow(10.0f, length / Effect->Reverb.DecayTime * -60.0f / 20.0f); // Eventually this should boost the high frequencies when the ratio // exceeds 1. coeff = 0.0f; if (hfRatio < 1.0f) { // Calculate the decay equation for each low-pass filter. g = pow(10.0f, length / (Effect->Reverb.DecayTime * hfRatio) * -60.0f / 20.0f) / State->Late.Coeff[index]; g = __max(g, 0.1f); g *= g; // Calculate the gain (coefficient) for each low-pass filter. if(g < 0.9999f) // 1-epsilon coeff = (1 - g*cw - aluSqrt(2*g*(1-cw) - g*g*(1 - cw*cw))) / (1 - g); // Very low decay times will produce minimal output, so apply an // upper bound to the coefficient. coeff = __min(coeff, 0.98f); } State->Late.LpCoeff[index] = coeff; // Attenuate the cyclical line coefficients by the mixing coefficient State->Late.Coeff[index] *= mixCoeff; } // Calculate the 3D-panning gains for the early reflections and late // reverb (for EAX mode). { ALfloat earlyPan[3] = { Effect->Reverb.ReflectionsPan[0], Effect->Reverb.ReflectionsPan[1], Effect->Reverb.ReflectionsPan[2] }; ALfloat latePan[3] = { Effect->Reverb.LateReverbPan[0], Effect->Reverb.LateReverbPan[1], Effect->Reverb.LateReverbPan[2] }; ALfloat *speakerGain, dirGain, ambientGain; ALfloat length; ALint pos; length = earlyPan[0]*earlyPan[0] + earlyPan[1]*earlyPan[1] + earlyPan[2]*earlyPan[2]; if(length > 1.0f) { length = 1.0f / aluSqrt(length); earlyPan[0] *= length; earlyPan[1] *= length; earlyPan[2] *= length; } length = latePan[0]*latePan[0] + latePan[1]*latePan[1] + latePan[2]*latePan[2]; if(length > 1.0f) { length = 1.0f / aluSqrt(length); latePan[0] *= length; latePan[1] *= length; latePan[2] *= length; } // This code applies directional reverb just like the mixer applies // directional sources. It diffuses the sound toward all speakers // as the magnitude of the panning vector drops, which is only an // approximation of the expansion of sound across the speakers from // the panning direction. pos = aluCart2LUTpos(earlyPan[2], earlyPan[0]); speakerGain = &Context->PanningLUT[OUTPUTCHANNELS * pos]; dirGain = aluSqrt((earlyPan[0] * earlyPan[0]) + (earlyPan[2] * earlyPan[2])); ambientGain = (1.0 - dirGain); for(index = 0;index < OUTPUTCHANNELS;index++) State->Early.PanGain[index] = dirGain * speakerGain[index] + ambientGain; pos = aluCart2LUTpos(latePan[2], latePan[0]); speakerGain = &Context->PanningLUT[OUTPUTCHANNELS * pos]; dirGain = aluSqrt((latePan[0] * latePan[0]) + (latePan[2] * latePan[2])); ambientGain = (1.0 - dirGain); for(index = 0;index < OUTPUTCHANNELS;index++) State->Late.PanGain[index] = dirGain * speakerGain[index] + ambientGain; } } // This processes the reverb state, given the input samples and an output // buffer. ALvoid VerbProcess(ALeffectState *effect, const ALeffectslot *Slot, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[OUTPUTCHANNELS]) { ALverbState *State = (ALverbState*)effect; ALuint index; ALfloat early[4], late[4], out[4]; ALfloat gain = Slot->Gain; for(index = 0;index < SamplesToDo;index++) { // Process reverb for this sample. ReverbInOut(State, SamplesIn[index], early, late); // Mix early reflections and late reverb. out[0] = (early[0] + late[0]) * gain; out[1] = (early[1] + late[1]) * gain; out[2] = (early[2] + late[2]) * gain; out[3] = (early[3] + late[3]) * gain; // Output the results. SamplesOut[index][FRONT_LEFT] += out[0]; SamplesOut[index][FRONT_RIGHT] += out[1]; SamplesOut[index][FRONT_CENTER] += out[3]; SamplesOut[index][SIDE_LEFT] += out[0]; SamplesOut[index][SIDE_RIGHT] += out[1]; SamplesOut[index][BACK_LEFT] += out[0]; SamplesOut[index][BACK_RIGHT] += out[1]; SamplesOut[index][BACK_CENTER] += out[2]; } } // This processes the EAX reverb state, given the input samples and an output // buffer. ALvoid EAXVerbProcess(ALeffectState *effect, const ALeffectslot *Slot, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[OUTPUTCHANNELS]) { ALverbState *State = (ALverbState*)effect; ALuint index; ALfloat early[4], late[4]; ALfloat gain = Slot->Gain; for(index = 0;index < SamplesToDo;index++) { // Process reverb for this sample. ReverbInOut(State, SamplesIn[index], early, late); // Unfortunately, while the number and configuration of gains for // panning adjust according to OUTPUTCHANNELS, the output from the // reverb engine is not so scalable. SamplesOut[index][FRONT_LEFT] += (State->Early.PanGain[FRONT_LEFT]*early[0] + State->Late.PanGain[FRONT_LEFT]*late[0]) * gain; SamplesOut[index][FRONT_RIGHT] += (State->Early.PanGain[FRONT_RIGHT]*early[1] + State->Late.PanGain[FRONT_RIGHT]*late[1]) * gain; SamplesOut[index][FRONT_CENTER] += (State->Early.PanGain[FRONT_CENTER]*early[3] + State->Late.PanGain[FRONT_CENTER]*late[3]) * gain; SamplesOut[index][SIDE_LEFT] += (State->Early.PanGain[SIDE_LEFT]*early[0] + State->Late.PanGain[SIDE_LEFT]*late[0]) * gain; SamplesOut[index][SIDE_RIGHT] += (State->Early.PanGain[SIDE_RIGHT]*early[1] + State->Late.PanGain[SIDE_RIGHT]*late[1]) * gain; SamplesOut[index][BACK_LEFT] += (State->Early.PanGain[BACK_LEFT]*early[0] + State->Late.PanGain[BACK_LEFT]*late[0]) * gain; SamplesOut[index][BACK_RIGHT] += (State->Early.PanGain[BACK_RIGHT]*early[1] + State->Late.PanGain[BACK_RIGHT]*late[1]) * gain; SamplesOut[index][BACK_CENTER] += (State->Early.PanGain[BACK_CENTER]*early[2] + State->Late.PanGain[BACK_CENTER]*late[2]) * gain; } } // This creates the reverb state. It should be called only when the reverb // effect is loaded into a slot that doesn't already have a reverb effect. ALeffectState *VerbCreate(ALCcontext *Context) { ALverbState *State = NULL; ALuint samples, length[13], totalLength, index; State = malloc(sizeof(ALverbState)); if(!State) { alSetError(AL_OUT_OF_MEMORY); return NULL; } State->state.Destroy = VerbDestroy; State->state.Update = VerbUpdate; State->state.Process = VerbProcess; // All line lengths are powers of 2, calculated from their lengths, with // an additional sample in case of rounding errors. // See VerbUpdate() for an explanation of the additional calculation // added to the master line length. samples = (ALuint) ((MASTER_LINE_LENGTH + (LATE_LINE_LENGTH[0] * (1.0f + <API key>) * (DECO_FRACTION * ((DECO_MULTIPLIER * DECO_MULTIPLIER * DECO_MULTIPLIER) - 1.0f)))) * Context->Frequency) + 1; length[0] = NextPowerOf2(samples); totalLength = length[0]; for(index = 0;index < 4;index++) { samples = (ALuint)(EARLY_LINE_LENGTH[index] * Context->Frequency) + 1; length[1 + index] = NextPowerOf2(samples); totalLength += length[1 + index]; } for(index = 0;index < 4;index++) { samples = (ALuint)(ALLPASS_LINE_LENGTH[index] * Context->Frequency) + 1; length[5 + index] = NextPowerOf2(samples); totalLength += length[5 + index]; } for(index = 0;index < 4;index++) { samples = (ALuint)(LATE_LINE_LENGTH[index] * (1.0f + <API key>) * Context->Frequency) + 1; length[9 + index] = NextPowerOf2(samples); totalLength += length[9 + index]; } // All lines share a single sample buffer and have their masks and start // addresses calculated once. State->SampleBuffer = malloc(totalLength * sizeof(ALfloat)); if(!State->SampleBuffer) { free(State); alSetError(AL_OUT_OF_MEMORY); return NULL; } for(index = 0; index < totalLength;index++) State->SampleBuffer[index] = 0.0f; State->LpFilter.coeff = 0.0f; State->LpFilter.history[0] = 0.0f; State->LpFilter.history[1] = 0.0f; State->Delay.Mask = length[0] - 1; State->Delay.Line = &State->SampleBuffer[0]; totalLength = length[0]; State->Tap[0] = 0; State->Tap[1] = 0; State->Tap[2] = 0; State->Tap[3] = 0; State->Tap[4] = 0; State->Early.Gain = 0.0f; for(index = 0;index < 4;index++) { State->Early.Coeff[index] = 0.0f; State->Early.Delay[index].Mask = length[1 + index] - 1; State->Early.Delay[index].Line = &State->SampleBuffer[totalLength]; totalLength += length[1 + index]; // The early delay lines have their read offsets calculated once. State->Early.Offset[index] = (ALuint)(EARLY_LINE_LENGTH[index] * Context->Frequency); } State->Late.Gain = 0.0f; State->Late.DensityGain = 0.0f; State->Late.ApFeedCoeff = 0.0f; State->Late.MixCoeff = 0.0f; for(index = 0;index < 4;index++) { State->Late.ApCoeff[index] = 0.0f; State->Late.ApDelay[index].Mask = length[5 + index] - 1; State->Late.ApDelay[index].Line = &State->SampleBuffer[totalLength]; totalLength += length[5 + index]; // The late all-pass lines have their read offsets calculated once. State->Late.ApOffset[index] = (ALuint)(ALLPASS_LINE_LENGTH[index] * Context->Frequency); } for(index = 0;index < 4;index++) { State->Late.Coeff[index] = 0.0f; State->Late.Delay[index].Mask = length[9 + index] - 1; State->Late.Delay[index].Line = &State->SampleBuffer[totalLength]; totalLength += length[9 + index]; State->Late.Offset[index] = 0; State->Late.LpCoeff[index] = 0.0f; State->Late.LpSample[index] = 0.0f; } // Panning is applied as an independent gain for each output channel. for(index = 0;index < OUTPUTCHANNELS;index++) { State->Early.PanGain[index] = 0.0f; State->Late.PanGain[index] = 0.0f; } State->Offset = 0; return &State->state; } ALeffectState *EAXVerbCreate(ALCcontext *Context) { ALeffectState *State = VerbCreate(Context); if(State) State->Process = EAXVerbProcess; return State; }
# baites.github.io # Installation * Cloning and creating docker image **NOTE**: This installation requires installed docker server. bash $ git clone git clone https://github.com/baites/baites.github.io.git $ cd baites.github.io $ docker build -t jekyll -f jekyll.dockerfile . Successfully tagged jekyll:latest * Creating container bash $ USER_ID=$(id -u) $ USER_NAME=$(id -un) $ GROUP_ID=$(id -g) $ GROUP_NAME=$(id -gn) $ docker create \ --name jekyll-$USER_NAME \ --mount type=bind,source=$PWD,target=/home/$USER_NAME/baites.github.io \ --mount type=bind,source=$HOME/.ssh,target=/home/$USER_NAME/.ssh \ --workdir /home/$USER_NAME/baites.github.io \ -t -p 4000:4000 jekyll $ docker start jekyll-$USER_NAME * Mirror user and group to the container bash $ CMD="useradd -u $USER_ID -N $USER_NAME && \ groupadd -g $GROUP_ID $GROUP_NAME && \ usermod -g $GROUP_NAME $USER_NAME &&\ echo '$USER_NAME ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/$USER_NAME &&\ chown -R $USER_NAME:$GROUP_NAME /home/$USER_NAME" docker exec jekyll-$USER_NAME /bin/bash -c "$CMD" * Entering in the container install gihub pages bash $ docker exec -it -u $USER_NAME jekyll-$USER_NAME /bin/bash $USER_NAME@bcfa7ea7eb52 baites.github.io$ export PATH="/home/baites/.gem/ruby/2.7.0/bin:$PATH" $USER_NAME@bcfa7ea7eb52 baites.github.io$ gem install bundler $USER_NAME@bcfa7ea7eb52 baites.github.io$ bundle exec jekyll serve -I --future --host 0.0.0.0 * Open browser at http://localhost:4000/
# coding=utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. from msrest.serialization import Model class Product(Model): _required = [] _attribute_map = { 'integer': {'key': 'integer', 'type': 'int'}, 'string': {'key': 'string', 'type': 'str'}, } def __init__(self, *args, **kwargs): """Product :param int integer :param str string """ self.integer = None self.string = None super(Product, self).__init__(*args, **kwargs)
// # Ghost Configuration // Setup your Ghost install for various environments var path = require('path'), config; config = { // ### Production // When running Ghost in the wild, use the production environment // Configure your URL and mail settings here production: { url: 'http://my-ghost-blog.com', mail: {}, database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost.db') }, debug: false }, server: { // Host to be passed to node's `net.Server#listen()` host: '127.0.0.1', // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT` port: '2368' } }, // ### Development **(default)** development: { // The url to use when providing links to the site, E.g. in RSS and email. // Change this to your Ghost blogs published URL. url: 'http://localhost:2368', // Example mail config mail: { transport: 'SMTP', options: { service: 'Gmail', auth: { user: '<API key>@gmail.com', // mailgun username pass: 'ghostblogwandering' // mailgun password } } }, database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost-dev.db') }, debug: false }, server: { // Host to be passed to node's `net.Server#listen()` host: '127.0.0.1', // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT` port: '2368' }, paths: { contentPath: path.join(__dirname, '/content/') } }, // **Developers only need to edit below here** // ### Testing // Used when developing Ghost to run tests and check the health of Ghost // Uses a different port number testing: { url: 'http://127.0.0.1:2369', database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost-test.db') } }, server: { host: '127.0.0.1', port: '2369' }, logging: false }, // ### Testing MySQL // Used by Travis - Automated testing run through GitHub 'testing-mysql': { url: 'http://127.0.0.1:2369', database: { client: 'mysql', connection: { host : '127.0.0.1', user : 'root', password : '', database : 'ghost_testing', charset : 'utf8' } }, server: { host: '127.0.0.1', port: '2369' }, logging: false }, // ### Testing pg // Used by Travis - Automated testing run through GitHub 'testing-pg': { url: 'http://127.0.0.1:2369', database: { client: 'pg', connection: { host : '127.0.0.1', user : 'postgres', password : '', database : 'ghost_testing', charset : 'utf8' } }, server: { host: '127.0.0.1', port: '2369' }, logging: false } }; // Export config module.exports = config;
import React from 'react'; import PropTypes from 'prop-types'; import styled, { keyframes } from 'styled-components'; const blink = keyframes` from, to { opacity: 1; } 50% { opacity: 0; } `; const CursorSpan = styled.span` font-weight: 100; color: black; font-size: 1em; padding-left: 2px; animation: ${blink} 1s step-end infinite; `; const Cursor = ({ className }) => ( <CursorSpan className={className}>|</CursorSpan> ); Cursor.propTypes = { className: PropTypes.string }; Cursor.defaultProps = { className: '' }; export default Cursor;
#include <type_traits> template <typename T> using void_t = std::conditional_t<true, void, T>; // sample(common_type-N3843) template <typename T, typename U> using builtin_common_t = std::decay_t<decltype( true ? std::declval<T>() : std::declval<U>() )>; template <typename, typename ...> struct ct { }; template <typename T> struct ct<void, T> : std::decay<T> { }; template <typename T, typename U, typename ...V> struct ct<void_t<builtin_common_t<T, U>>, T, U, V...> : ct<void, builtin_common_t<T, U>, V...> { }; template <typename ...T> struct common_type : ct<void, T...> { }; // end-sample template <typename ...Ts> using common_type_t = typename common_type<Ts...>::type; // Tests template <typename T, typename = void> struct has_type : std::false_type { }; template <typename T> struct has_type<T, void_t<typename T::type>> : std::true_type { }; struct A { }; struct B { }; struct C { }; // Ensure proper behavior in normal cases static_assert(std::is_same< common_type_t<char>, char >{}, ""); static_assert(std::is_same< common_type_t<A, A>, A >{}, ""); static_assert(std::is_same< common_type_t<char, short, char, short>, int >{}, ""); static_assert(std::is_same< common_type_t<char, double, short, char, short, double>, double >{}, ""); static_assert(std::is_same< common_type_t<char, short, float, short>, float >{}, ""); // Ensure SFINAE-friendliness static_assert(!has_type<common_type<>>{}, ""); static_assert(!has_type<common_type<int, void>>{}, ""); int main() { }
package <API key>; import common.ListNode; public class <API key> { public class Solution { public ListNode deleteDuplicates(ListNode head) { if (head != null) { ListNode pre = head; ListNode p = pre.next; while (p != null) { if (p.val == pre.val) { pre.next = p.next; } else { pre = p; } p = p.next; } } return head; } } public static class UnitTest { } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection; namespace Umbraco.Core.Models.EntityBase { <summary> A base class for use to implement IRememberBeingDirty/ICanBeDirty </summary> public abstract class <API key> : IRememberBeingDirty { <summary> Tracks the properties that have changed </summary> private readonly IDictionary<string, bool> <API key> = new Dictionary<string, bool>(); <summary> Tracks the properties that we're changed before the last commit (or last call to <API key>) </summary> private IDictionary<string, bool> <API key> = null; <summary> Property changed event </summary> public event <API key> PropertyChanged; <summary> Method to call on a property setter. </summary> <param name="propertyInfo">The property info.</param> protected virtual void OnPropertyChanged(PropertyInfo propertyInfo) { <API key>[propertyInfo.Name] = true; if (PropertyChanged != null) { PropertyChanged(this, new <API key>(propertyInfo.Name)); } } <summary> Indicates whether a specific property on the current entity is dirty. </summary> <param name="propertyName">Name of the property to check</param> <returns>True if Property is dirty, otherwise False</returns> public virtual bool IsPropertyDirty(string propertyName) { return <API key>.Any(x => x.Key == propertyName); } <summary> Indicates whether the current entity is dirty. </summary> <returns>True if entity is dirty, otherwise False</returns> public virtual bool IsDirty() { return <API key>.Any(); } <summary> Indicates that the entity had been changed and the changes were committed </summary> <returns></returns> public bool WasDirty() { return <API key> != null && <API key>.Any(); } <summary> Indicates whether a specific property on the current entity was changed and the changes were committed </summary> <param name="propertyName">Name of the property to check</param> <returns>True if Property was changed, otherwise False. Returns false if the entity had not been previously changed.</returns> public virtual bool WasPropertyDirty(string propertyName) { return WasDirty() && <API key>.Any(x => x.Key == propertyName); } <summary> Resets the remembered dirty properties from before the last commit </summary> public void <API key>() { <API key>.Clear(); } <summary> Resets dirty properties by clearing the dictionary used to track changes. </summary> <remarks> Please note that resetting the dirty properties could potentially obstruct the saving of a new or updated entity. </remarks> public virtual void <API key>() { <API key>(true); } <summary> Resets dirty properties by clearing the dictionary used to track changes. </summary> <param name="<API key>"> true if we are to remember the last changes made after resetting </param> <remarks> Please note that resetting the dirty properties could potentially obstruct the saving of a new or updated entity. </remarks> public virtual void <API key>(bool <API key>) { if (<API key>) { //copy the changed properties to the last changed properties <API key> = <API key>.ToDictionary(v => v.Key, v => v.Value); } <API key>.Clear(); } <summary> Used by inheritors to set the value of properties, this will detect if the property value actually changed and if it did it will ensure that the property has a dirty flag set. </summary> <param name="setValue"></param> <param name="value"></param> <param name="propertySelector"></param> <returns>returns true if the value changed</returns> <remarks> This is required because we don't want a property to show up as "dirty" if the value is the same. For example, when we save a document type, nearly all properties are flagged as dirty just because we've 'reset' them, but they are all set to the same value, so it's really not dirty. </remarks> internal bool <API key><T>(Func<T, T> setValue, T value, PropertyInfo propertySelector) { var initVal = value; var newVal = setValue(value); if (!Equals(initVal, newVal)) { OnPropertyChanged(propertySelector); return true; } return false; } } }
# coding=utf8 """ Parser for todo format string. from todo.parser import parser parser.parse(string) # return an Todo instance """ from models import Task from models import Todo from ply import lex from ply import yacc class TodoLexer(object): """ Lexer for Todo format string. Tokens ID e.g. '1.' DONE e.g. '(x)' TASK e.g. 'This is a task' """ tokens = ( "ID", "DONE", "TASK", ) t_ignore = "\x20\x09" # ignore spaces and tabs def t_ID(self, t): r'\d+\.([uU]|[lL]|[uU][lL]|[lL][uU])?' t.value = int(t.value[:-1]) return t def t_DONE(self, t): r'(\(x\))' return t def t_TASK(self, t): r'((?!\(x\))).+' return t def t_newline(self, t): r'\n+' t.lexer.lineno += len(t.value) def t_error(self, t): raise SyntaxError( "Illegal character: '%s' at Line %d" % (t.value[0], t.lineno) ) def __init__(self): self.lexer = lex.lex(module=self) class TodoParser(object): """ Parser for Todo format string, works with a todo lexer. Parse string to Python list todo_str = "1. (x) Write email to tom" TodoParser().parse(todo_str) """ tokens = TodoLexer.tokens def p_error(self, p): if p: raise SyntaxError( "Character '%s' at line %d" % (p.value[0], p.lineno) ) else: raise SyntaxError("SyntaxError at EOF") def p_start(self, p): "start : translation_unit" p[0] = self.todo def p_translation_unit(self, p): """ translation_unit : translate_task | translation_unit translate_task | """ pass def p_translation_task(self, p): """ translate_task : ID DONE TASK | ID TASK """ if len(p) == 4: done = True content = p[3] elif len(p) == 3: done = False content = p[2] task = Task(p[1], content, done) self.todo.append(task) def __init__(self): self.parser = yacc.yacc(module=self, debug=0, write_tables=0) def parse(self, data): # reset list self.todo = Todo() return self.parser.parse(data) lexer = TodoLexer() # build lexer parser = TodoParser() # build parser
var test = require('tape'); var BSFS = require('../lib/bsfs'); indexedDB.deleteDatabase('bsfs-tests'); function randomId () { return Math.random().toString(36).substr(2) } test('bsfs exists', function (t) { t.plan(1); var bsfs = new BSFS('bsfs-tests'); if (!bsfs._ready) return bsfs.once('ready', ready); else process.nextTick(ready); function ready () { t.equals(typeof bsfs, 'object'); } }); test('bsfs has file router', function (t) { t.plan(1); var bsfs = new BSFS('bsfs-tests'); if (!bsfs._ready) return bsfs.once('ready', ready); else process.nextTick(ready); function ready () { t.equal(typeof bsfs._fileRouter, 'object'); } }); test('write without path throws', function (t) { t.plan(1); var bsfs = new BSFS('bsfs-tests'); if (!bsfs._ready) return bsfs.once('ready', ready); else process.nextTick(ready); function ready () { t.throws(function() { bsfs.createWriteStream(null, function() {}) }); } }); test('write file', function (t) { t.plan(1); var bsfs = new BSFS('bsfs-tests'); if (!bsfs._ready) return bsfs.once('ready', ready); else process.nextTick(ready); function ready () { var path = '/tmp/test-' + randomId(); var content = 'Hello cruel world ' + randomId(); var w = bsfs.createWriteStream(path, function(err, meta) { t.equal(err, null); }); w.end(content); } }); test('write then read file by key', function (t) { t.plan(1); var path = '/tmp/test-' + randomId(); var content = 'Hello cruel world ' + randomId(); var bsfs = new BSFS('bsfs-tests'); if (!bsfs._ready) return bsfs.once('ready', ready); else process.nextTick(ready); function readBack (key) { var r = bsfs.<API key>(key); var readContent = ''; r.on('data', function (chunk) { readContent += chunk; }); r.on('end', function () { t.equal(content, readContent); }); } function ready () { var w = bsfs.createWriteStream(path, function(err, meta) { readBack(meta.key); }); w.end(content); } }); test('write then read file by name', function (t) { t.plan(1); var content = 'Hello cruel world ' + randomId(); var path = '/tmp/test-' + randomId(); var bsfs = new BSFS('bsfs-tests'); if (!bsfs._ready) return bsfs.once('ready', ready); else process.nextTick(ready); function readBack (path) { var r = bsfs.createReadStream(path); var readContent = ''; r.on('data', function (chunk) { readContent += chunk; }); r.on('end', function () { t.equal(content, readContent); }); } function ready () { var w = bsfs.createWriteStream(path, function(err, meta) { readBack(path); }); w.end(content); } }); test('access', function (t) { t.test('is silent (for now)', function (t) { t.plan(3); var bsfs = new BSFS('bsfs-tests'); if (!bsfs.ready) return bsfs.once('ready', ready) else process.nextTick(ready); function ready () { bsfs.access(null, function (err) { t.ifError(err); }); bsfs.access('/tmp', function (err) { t.ifError(err); }); bsfs.access('/tmp', 2, function (err) { t.ifError(err); }); } }); t.test('throws on invalid callback argument', function (t) { t.plan(1); var bsfs = new BSFS('bsfs-tests'); if (!bsfs.ready) return bsfs.once('ready', ready) else process.nextTick(ready); function ready () { t.throws(function () { bsfs.access('/tmp/', 0, 'potatoe'); }) } }); }); test('accessSync', function (t) { t.test('is silent (for now)', function (t) { t.plan(2); var bsfs = new BSFS('bsfs-tests'); if (!bsfs.ready) return bsfs.once('ready', ready) else process.nextTick(ready); function ready () { t.ifError(bsfs.accessSync(randomId())); t.ifError(bsfs.accessSync()); } }) }); test('exists', function (t) { t.test('is true for all paths (for now)', function (t) { t.plan(1); var bsfs = new BSFS('bsfs-tests'); if (!bsfs.ready) return bsfs.once('ready', ready); else proccess.nextTick(ready); function ready () { bsfs.exists(randomId(), function (exists) { t.ok(exists); }); } }); }); test('existsSync', function (t) { t.test('throws on null path', function (t) { t.plan(1); var bsfs = new BSFS('bsfs-tests'); if (!bsfs.ready) return bsfs.once('ready', ready); else proccess.nextTick(ready); function ready () { t.throws(bsfs.existsSync()); } }); t.test('is true for all paths (for now)', function (t) { t.plan(2); var bsfs = new BSFS('bsfs-tests'); if (!bsfs.ready) return bsfs.once('ready', ready); else proccess.nextTick(ready); function ready () { t.ok(bsfs.existsSync(randomId())); t.ok(bsfs.existsSync()); } }); }); test('appendFile without path throws', function (t) { t.plan(1); var bsfs = new BSFS('bsfs-tests'); if (!bsfs._ready) return bsfs.once('ready', ready); else process.nextTick(ready); function ready () { t.throws(function () { bsfs.appendFile(null, function () {}); }); } });
title: A List of the White Rabbit Mechanics We Are Considering author: all date: 15/01/11 tags: [concept, summary, gamemechanics, whiterabbit] layout: post The white rabbit. Here is a list of some of the rabbits we could pull out of our designer's magical top hat. ## Cooperative Rope Walking Summary One scenario is while one person crawls across a cable to breach the hull of another ship, the other must move the ship in sync with the other ship to ensure the crawling player doesn't fall. Could further add elements of wind and obstacles. Pros + Very explicit cooperative components + Leaves room for interesting use of physics + Fits well as minigame between core hack and slash Cons + Direct cooperation between players requires very fast and accurate network syncing + Can be frustrating if your partner is very poor at this minigame ## Ghost with Visibility Goggles Summary While one player only sees shimmers of an enemy or an important object, the other can see it very clearly. They must cooperate Pros Cons ## Building Blocks with Imbuement > Originally by me but I find the gravitational singularities to be more interesting and probably even easier to implement. This could be interesting regardless and could be considered in another light where one player can imbue the weaponry of the others. - Calem Summary Pros Cons ## Cooperative Gravitational Singularities Summary Players get a singularity tool that can produce singularities that either push or pull all objects within a sphere of influence. The map would preferably be prepared to be interactive with this weapon. For the ice planet, this could be as simple as pre-subdividing the terrain mesh into large icy chunks and into ice shards that can damage enemies. Interesting physics based puzzles become available. In the prototype, this was used to traverse a bridge of objects trapped between to singularities. Another mode is allowing a double jump by jumping onto the top of a singularity, which pushes the character up or allows them to walk on top of the sphere of influence depending on the gravitational factor. ![Little dude traversing a bridge between singularities](http://i.imgur.com/FKQWq0h.png) ![Low framerate gif from proof of concept](http://i.gyazo.com/<API key>.gif) (note this image has a low framerate as it is a low quality gif :-) actual prototype is very smooth) Mesh collision can greatly improve the look and feel, but will dramatically reduce performance. Smooth performance with mesh collision limited to some 250 cubes. ![Mesh collision rather than box collision](http://i.imgur.com/H5u0owO.png) A bridge can be formed with 25 sheets if optimising for few objects with convex collision meshes. ![Flatter sheets bridge](http://i.imgur.com/sq5tF9N.png) Pros + Very easy to implemented if the prototyping is any indication + Adds more interesting components to level design + Purely physics based cooperation and problem solving, which should be very intuitive, deterministic (like Portal) + No particularly special considerations for AI + Concept has been tested for resource usage and does well without optimisations + Particle effects can be used to hide unrealistic collision a bit and make sense in the context of the singularity + Cooperative elements are less contrived, and if friendly fire is enabled accidentally sucking your partner into a singularity could be very amusing given the appropriate sound effects and cues Cons + Would require level design considerations beyond normal puzzle making (subdivisions) + Fine control of singularity location may be awkward (though could be easy if both joysticks used in fine control mode?) + Syncing physics of multiple bodies between players may be difficult and needs to be tested. + Approximated collision has to be used for the objects in the sphere of influence if there are going to be more than a couple hundred objects ## Transition into spirit with different environmental interactions Summary Pros Cons ## Time travelling with effects on past Summary Pros Cons ## Collector and defender with pinging for resource collection Summary Pros Cons ## Single item to share Summary > The mechanics of this need to be fleshed out more, I think. - Calem Pros Cons ## One player can transform the other, changing their abilities Summary Pros Cons
#include "stateengine/AtomicState.h" #include "stateengine/Defines.h" // TAtomicState namespace donut { typedef void (*TUpdaterFunction)(const TStateEngineId&, double); typedef void (*TStateCallBack)(const TStateEngineId&, TStateData *); TAtomicState::TAtomicState(TStateEngineId parStateEngineId, TStateId parId, TStateData (* parTStateData), void (* parEnterCallBack), void (* parLeaveCallBack), void (* parUpdater)) : FStateEngineId (parStateEngineId) { FEnterCallBack = parEnterCallBack; FLeaveCallBack = parLeaveCallBack; FStateData = parTStateData; FUpdater = parUpdater; FId = parId; } TAtomicState::~TAtomicState() { // <API key>(FStateData!=NULL, "The state data has been already deleted. you do not need to.") delete FStateData; } void TAtomicState::AddTransition(TTransitionId parId, TTransition * parTransition) { FOutTransitions[parId] = parTransition; } #if _DEBUG void TAtomicState::AddInTransition(const TTransition * parTransition) { // FInTransitions.push_back(parTransition) } #endif void TAtomicState::Update(double parDt) { void (*updater)( const TStateEngineId&, double) = *((TUpdaterFunction*) (&FUpdater)); updater(FStateEngineId , parDt); } void TAtomicState::Enter() { void (*enter)(const TStateEngineId&, TStateData *) = *((TStateCallBack*) (&FEnterCallBack)); enter(FStateEngineId, FStateData); } void TAtomicState::Leave() { void (*leave)(const TStateEngineId&, TStateData *) = *((TStateCallBack*) (&FLeaveCallBack)); leave(FStateEngineId, FStateData); } void TAtomicState::TransitionCallBack() { } } // End namestate StateEngine
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Symfony\Bundle\DoctrineBundle\DoctrineBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Sensio\Bundle\<API key>\<API key>(), new JMS\SecurityExtraBundle\<API key>(), new FOS\UserBundle\FOSUserBundle(), new Psa\PageBundle\PsaPageBundle(), //new Psa\UserBundle\PsaUserBundle(), new Psa\AdminBundle\PsaAdminBundle(), new Psa\CommonBundle\PsaCommonBundle(), //Forum Bundles new EWZ\Bundle\TimeBundle\EWZTimeBundle(), new WhiteOctober\PagerfantaBundle\<API key>(), new CCDNComponent\CommonBundle\<API key>(), new CCDNComponent\BBCodeBundle\<API key>(), new CCDNComponent\CrumbTrailBundle\<API key>(), new CCDNComponent\DashboardBundle\<API key>(), new CCDNComponent\AttachmentBundle\<API key>(), new CCDNComponent\MenuBundle\<API key>(), new CCDNForum\KarmaBundle\<API key>(), new CCDNUser\UserBundle\CCDNUserUserBundle(), new CCDNForum\AdminBundle\<API key>(), new CCDNForum\ForumBundle\<API key>(), new CCDNUser\AdminBundle\CCDNUserAdminBundle(), new EWZ\Bundle\RecaptchaBundle\EWZRecaptchaBundle(), new CCDNUser\ProfileBundle\<API key>(), new CCDNForum\ModeratorBundle\<API key>(), new CCDNUser\MemberBundle\<API key>(), new CCDNMessage\MessageBundle\<API key>(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Acme\DemoBundle\AcmeDemoBundle(); $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\<API key>(); $bundles[] = new Sensio\Bundle\GeneratorBundle\<API key>(); $bundles[] = new CoreSphere\ConsoleBundle\<API key>(); } return $bundles; } public function <API key>(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } }
<?php namespace Symfony\Component\DependencyInjection\Dumper; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Parameter; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\Scope; class GraphvizDumper extends Dumper { private $nodes; private $edges; private $options = array( 'graph' => array('ratio' => 'compress'), 'node' => array('fontsize' => 11, 'fontname' => 'Arial', 'shape' => 'record'), 'edge' => array('fontsize' => 9, 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => 0.5), 'node.instance' => array('fillcolor' => '#9999ff', 'style' => 'filled'), 'node.definition' => array('fillcolor' => '#eeeeee'), 'node.missing' => array('fillcolor' => '#ff9999', 'style' => 'filled'), ); /** * Dumps the service container as a graphviz graph. * * Available options: * * * graph: The default options for the whole graph * * node: The default options for nodes * * edge: The default options for edges * * node.instance: The default options for services that are defined directly by object instances * * node.definition: The default options for services that are defined via service definition instances * * node.missing: The default options for missing services * * @param array $options An array of options * * @return string The dot representation of the service container */ public function dump(array $options = array()) { foreach (array('graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing') as $key) { if (isset($options[$key])) { $this->options[$key] = array_merge($this->options[$key], $options[$key]); } } $this->nodes = $this->findNodes(); $this->edges = array(); foreach ($this->container->getDefinitions() as $id => $definition) { $this->edges[$id] = array_merge( $this->findEdges($id, $definition->getArguments(), true, ''), $this->findEdges($id, $definition->getProperties(), false, '') ); foreach ($definition->getMethodCalls() as $call) { $this->edges[$id] = array_merge( $this->edges[$id], $this->findEdges($id, $call[1], false, $call[0].'()') ); } } return $this->startDot().$this->addNodes().$this->addEdges().$this->endDot(); } /** * Returns all nodes. * * @return string A string representation of all nodes */ private function addNodes() { $code = ''; foreach ($this->nodes as $id => $node) { $aliases = $this->getAliases($id); $code .= sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id.($aliases ? ' ('.implode(', ', $aliases).')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes'])); } return $code; } /** * Returns all edges. * * @return string A string representation of all edges */ private function addEdges() { $code = ''; foreach ($this->edges as $id => $edges) { foreach ($edges as $edge) { $code .= sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed'); } } return $code; } /** * Finds all edges belonging to a specific service id. * * @param string $id The service id used to find edges * @param array $arguments An array of arguments * @param bool $required * @param string $name * * @return array An array of edges */ private function findEdges($id, $arguments, $required, $name) { $edges = array(); foreach ($arguments as $argument) { if ($argument instanceof Parameter) { $argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null; } elseif (is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) { $argument = $this->container->hasParameter($match[1]) ? $this->container->getParameter($match[1]) : null; } if ($argument instanceof Reference) { if (!$this->container->has((string) $argument)) { $this->nodes[(string) $argument] = array('name' => $name, 'required' => $required, 'class' => '', 'attributes' => $this->options['node.missing']); } $edges[] = array('name' => $name, 'required' => $required, 'to' => $argument); } elseif (is_array($argument)) { $edges = array_merge($edges, $this->findEdges($id, $argument, $required, $name)); } } return $edges; } /** * Finds all nodes. * * @return array An array of all nodes */ private function findNodes() { $nodes = array(); $container = $this->cloneContainer(); foreach ($container->getDefinitions() as $id => $definition) { $class = $definition->getClass(); if ('\\' === substr($class, 0, 1)) { $class = substr($class, 1); } $nodes[$id] = array('class' => str_replace('\\', '\\\\', $this->container->getParameterBag()->resolveValue($class)), 'attributes' => array_merge($this->options['node.definition'], array('style' => ContainerInterface::SCOPE_PROTOTYPE !== $definition->getScope() ? 'filled' : 'dotted'))); $container->setDefinition($id, new Definition('stdClass')); } foreach ($container->getServiceIds() as $id) { $service = $container->get($id); if (array_key_exists($id, $container->getAliases())) { continue; } if (!$container->hasDefinition($id)) { $class = ('service_container' === $id) ? get_class($this->container) : get_class($service); $nodes[$id] = array('class' => str_replace('\\', '\\\\', $class), 'attributes' => $this->options['node.instance']); } } return $nodes; } private function cloneContainer() { $parameterBag = new ParameterBag($this->container->getParameterBag()->all()); $container = new ContainerBuilder($parameterBag); $container->setDefinitions($this->container->getDefinitions()); $container->setAliases($this->container->getAliases()); $container->setResources($this->container->getResources()); foreach ($this->container->getScopes() as $scope => $parentScope) { $container->addScope(new Scope($scope, $parentScope)); } foreach ($this->container->getExtensions() as $extension) { $container->registerExtension($extension); } return $container; } /** * Returns the start dot. * * @return string The string representation of a start dot */ private function startDot() { return sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n", $this->addOptions($this->options['graph']), $this->addOptions($this->options['node']), $this->addOptions($this->options['edge']) ); } /** * Returns the end dot. * * @return string */ private function endDot() { return "}\n"; } /** * Adds attributes. * * @param array $attributes An array of attributes * * @return string A comma separated list of attributes */ private function addAttributes($attributes) { $code = array(); foreach ($attributes as $k => $v) { $code[] = sprintf('%s="%s"', $k, $v); } return $code ? ', '.implode(', ', $code) : ''; } /** * Adds options. * * @param array $options An array of options * * @return string A space separated list of options */ private function addOptions($options) { $code = array(); foreach ($options as $k => $v) { $code[] = sprintf('%s="%s"', $k, $v); } return implode(' ', $code); } /** * Dotizes an identifier. * * @param string $id The identifier to dotize * * @return string A dotized string */ private function dotize($id) { return strtolower(preg_replace('/\W/i', '_', $id)); } /** * Compiles an array of aliases for a specified service id. * * @param string $id A service id * * @return array An array of aliases */ private function getAliases($id) { $aliases = array(); foreach ($this->container->getAliases() as $alias => $origin) { if ($id == $origin) { $aliases[] = $alias; } } return $aliases; } }
'use strict'; angular.module('mean.system').directive('googleMaps', ['GoogleMaps', 'Global', function(GoogleMaps, Global) { return { restrict: 'E', template: '<div id="map" style="height: 600px; width: 100%;"></div>', controller: function() { var mapOptions; if ( GoogleMaps ) { mapOptions = { center: new GoogleMaps.LatLng(-34.397, 150.644), zoom: 14, mapTypeId: GoogleMaps.MapTypeId.ROADMAP }; Global.map = new GoogleMaps.Map(document.getElementById('map'), mapOptions); } } }; }]);
#!/bin/sh set -e NEEDS_CONFIG=0 if [ "$#" -lt "1" ]; then echo "Bad usage: check_reconf.sh [target_package] (optional configure arguments)" exit 1 fi if [ "$ONYX_ARCH" = "" ]; then echo "ONYX_ARCH needs to be set!" exit 1 fi if [ "$HOST" = "" ]; then echo "HOST needs to be set!" exit 1 fi if [ "$SYSROOT" = "" ]; then echo "SYSROOT needs to be set!" exit 1 fi TARGET_PKG=$1 cd $TARGET_PKG if [ -f "CONF_STAMP" ]; then if [ $(cat CONF_STAMP) != "ARCH=${ONYX_ARCH}" ]; then NEEDS_CONFIG=1 fi else NEEDS_CONFIG=1 fi #echo "Needs conf: ${NEEDS_CONFIG}" # Shift the arguments by one so we discard the first argument shift 1 if [ "$NEEDS_CONFIG" = 0 ]; then exit 0 fi # Try and make clean/make distclean because some makefiles are kind of buggy **cough cough musl** if [ -f Makefile ]; then make distclean || make clean || true fi ./configure --host=$HOST --with-sysroot=$SYSROOT "$@" echo "ARCH=${ONYX_ARCH}" > CONF_STAMP
<?php namespace PxS\PeerReviewingBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class <API key> extends WebTestCase { public function testIndex() { $client = static::createClient(); $crawler = $client->request('GET', '/hello/Fabien'); $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); } }
// URBSegmentedControl.h // <API key> #import <UIKit/UIKit.h> typedef NS_ENUM(NSUInteger, <API key>) { <API key> = 0, <API key> }; typedef NS_ENUM(NSUInteger, <API key>) { <API key> = 0, <API key> }; typedef NS_ENUM(NSUInteger, <API key>) { <API key> = 0, <API key> }; @interface URBSegmentedControl : UISegmentedControl <UIAppearance> typedef void (^<API key>)(NSInteger index, URBSegmentedControl *segmentedControl); /** Layout behavior for the segments (row or columns). */ @property (nonatomic) <API key> layoutOrientation; /** Layout behavior of the segment contents. */ @property (nonatomic) <API key> segmentViewLayout; /** * Position of the image when placed horizontally next to a segment label. Not used for controls containing only text or images. */ @property (nonatomic, assign) <API key> imagePosition; /** Block handle called when the selected segment has changed. */ @property (nonatomic, copy) <API key> controlEventBlock; /** Background color for the base container view. */ @property (nonatomic, strong) UIColor *baseColor; @property (nonatomic, strong) UIColor *baseGradient; /** Stroke color used around the base container view. */ @property (nonatomic, strong) UIColor *strokeColor; /** Stroke width for the base container view. */ @property (nonatomic, assign) CGFloat strokeWidth; /** Corner radius for the base container view. */ @property (nonatomic) CGFloat cornerRadius; /** Whether or not a gradient should be automatically applied to the base and segment backgrounds based on the defined base colors. */ @property (nonatomic, assign) BOOL showsGradient; /** Padding between the segments and the base container view. */ @property (nonatomic, assign) UIEdgeInsets segmentEdgeInsets; @name Segment Customization @property (nonatomic, strong) UIColor *<API key> <API key>; @property (nonatomic, strong) UIColor *<API key> <API key>; @property (nonatomic, strong) UIColor *imageColor <API key>; @property (nonatomic, strong) UIColor *selectedImageColor <API key>; @property (nonatomic, assign) UIEdgeInsets contentEdgeInsets; @property (nonatomic, assign) UIEdgeInsets titleEdgeInsets; @property (nonatomic, assign) UIEdgeInsets imageEdgeInsets; - (id)initWithTitles:(NSArray *)titles; - (id)initWithIcons:(NSArray *)icons; - (id)initWithTitles:(NSArray *)titles icons:(NSArray *)icons; - (void)<API key>:(NSString *)title image:(UIImage *)image atIndex:(NSUInteger)segment animated:(BOOL)animated; - (void)<API key>:(UIColor *)<API key> atIndex:(NSUInteger)segment; - (void)setImageColor:(UIColor *)imageColor forState:(UIControlState)state <API key>; - (void)<API key>:(UIColor *)<API key> <API key>; - (void)<API key>:(<API key>)controlEventBlock; @end @interface UIImage (URBSegmentedControl) - (UIImage *)<API key>:(UIColor *)color; @end
// <auto-generated> // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> namespace WinFormsApp.Properties { [global::System.Runtime.CompilerServices.<API key>()] [global::System.CodeDom.Compiler.<API key>("Microsoft.VisualStudio.Editors.SettingsDesigner.<API key>", "11.0.0.0")] internal sealed partial class Settings : global::System.Configuration.<API key> { private static Settings defaultInstance = ((Settings)(global::System.Configuration.<API key>.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
import { Component, OnInit, HostListener, ElementRef } from '@angular/core'; import { Router, NavigationEnd, NavigationExtras } from '@angular/router'; import { AuthService } from '../../services/auth.service'; @Component({ selector: 'app-nav', templateUrl: 'app-nav.component.html' }) export class AppNavComponent implements OnInit { loggedIn: boolean; menuDropped: boolean; searchKeyword: string; constructor( public auth: AuthService, private router: Router, private elementRef: ElementRef ) { this.router.events.subscribe(event => { if (event instanceof NavigationEnd) { this.menuDropped = false; this.searchKeyword = ''; } }); this.searchKeyword = ''; } ngOnInit() { this.auth.checkLogin(); } toggleMenu() { this.menuDropped = !this.menuDropped; } logout(): void { this.auth.logout(); this.menuDropped = false; } searchPackages(e: Event): void { e.preventDefault(); const navigationExtras: NavigationExtras = { queryParams: { 'keyword': this.searchKeyword } }; this.router.navigate(['search'], navigationExtras); } @HostListener('document:click', ['$event']) onBlur(e: MouseEvent) { if (!this.menuDropped) { return; } let toggleBtn = this.elementRef.nativeElement.querySelector('.drop-menu-act'); if (e.target === toggleBtn || toggleBtn.contains(<any>e.target)) { return; } let dropMenu: HTMLElement = this.elementRef.nativeElement.querySelector('.nav-dropdown'); if (dropMenu && dropMenu !== e.target && !dropMenu.contains((<any>e.target))) { this.menuDropped = false; } } }
#include "walletview.h" #include "addressbookpage.h" #include "askpassphrasedialog.h" #include "bitcoingui.h" #include "clientmodel.h" #include "guiutil.h" #include "optionsmodel.h" #include "overviewpage.h" #include "receivecoinsdialog.h" #include "sendcoinsdialog.h" #include "<API key>.h" #include "<API key>.h" #include "transactionview.h" #include "walletmodel.h" #include "miningpage.h" #include "ui_interface.h" #include <QAction> #include <QActionGroup> #include <QFileDialog> #include <QHBoxLayout> #include <QProgressDialog> #include <QPushButton> #include <QVBoxLayout> WalletView::WalletView(QWidget *parent): QStackedWidget(parent), clientModel(0), walletModel(0) { // Create tabs overviewPage = new OverviewPage(); transactionsPage = new QWidget(this); QVBoxLayout *vbox = new QVBoxLayout(); QHBoxLayout *hbox_buttons = new QHBoxLayout(); transactionView = new TransactionView(this); vbox->addWidget(transactionView); QPushButton *exportButton = new QPushButton(tr("&Export"), this); exportButton->setToolTip(tr("Export the data in the current tab to a file")); #ifndef Q_OS_MAC // Icons on push buttons are very uncommon on Mac exportButton->setIcon(QIcon(":/icons/export")); #endif hbox_buttons->addStretch(); hbox_buttons->addWidget(exportButton); vbox->addLayout(hbox_buttons); transactionsPage->setLayout(vbox); receiveCoinsPage = new ReceiveCoinsDialog(); sendCoinsPage = new SendCoinsDialog(); miningPage = new MiningPage(); addWidget(overviewPage); addWidget(transactionsPage); addWidget(receiveCoinsPage); addWidget(sendCoinsPage); addWidget(miningPage); // Clicking on a transaction on the overview pre-selects the transaction on the transaction history page connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex))); // Double-clicking on a transaction on the transaction history page shows details connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails())); // Clicking on "Export" allows to export the transaction list connect(exportButton, SIGNAL(clicked()), transactionView, SLOT(exportClicked())); // Pass through messages from sendCoinsPage connect(sendCoinsPage, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int))); // Pass through messages from transactionView connect(transactionView, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int))); } WalletView::~WalletView() { } void WalletView::setBitcoinGUI(BitcoinGUI *gui) { if (gui) { // Clicking on a transaction on the overview page simply sends you to transaction history page connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), gui, SLOT(gotoHistoryPage())); // Receive and report messages connect(this, SIGNAL(message(QString,QString,unsigned int)), gui, SLOT(message(QString,QString,unsigned int))); // Pass through encryption status changed signals connect(this, SIGNAL(<API key>(int)), gui, SLOT(setEncryptionStatus(int))); // Pass through transaction notifications connect(this, SIGNAL(incomingTransaction(QString,int,qint64,QString,QString)), gui, SLOT(incomingTransaction(QString,int,qint64,QString,QString))); } } void WalletView::setClientModel(ClientModel *clientModel) { this->clientModel = clientModel; overviewPage->setClientModel(clientModel); miningPage->setClientModel(clientModel); } void WalletView::setWalletModel(WalletModel *walletModel) { this->walletModel = walletModel; // Put transaction list in tabs transactionView->setModel(walletModel); overviewPage->setWalletModel(walletModel); receiveCoinsPage->setModel(walletModel); sendCoinsPage->setModel(walletModel); miningPage->setWalletModel(walletModel); if (walletModel) { // Receive and pass through messages from wallet model connect(walletModel, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int))); // Handle changes in encryption status connect(walletModel, SIGNAL(<API key>(int)), this, SIGNAL(<API key>(int))); <API key>(); // Balloon pop-up for new transaction connect(walletModel-><API key>(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(<API key>(QModelIndex,int,int))); // Ask for passphrase if needed connect(walletModel, SIGNAL(requireUnlock()), this, SLOT(unlockWallet())); // Show progress dialog connect(walletModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int))); } } void WalletView::<API key>(const QModelIndex& parent, int start, int /*end*/) { // Prevent balloon-spam when initial block download is in progress if (!walletModel || !clientModel || clientModel-><API key>()) return; <API key> *ttm = walletModel-><API key>(); QString date = ttm->index(start, <API key>::Date, parent).data().toString(); qint64 amount = ttm->index(start, <API key>::Amount, parent).data(Qt::EditRole).toULongLong(); QString type = ttm->index(start, <API key>::Type, parent).data().toString(); QString address = ttm->index(start, <API key>::ToAddress, parent).data().toString(); emit incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address); } void WalletView::gotoOverviewPage() { setCurrentWidget(overviewPage); } void WalletView::gotoHistoryPage() { setCurrentWidget(transactionsPage); } void WalletView::<API key>() { setCurrentWidget(receiveCoinsPage); } void WalletView::gotoSendCoinsPage(QString addr) { setCurrentWidget(sendCoinsPage); if (!addr.isEmpty()) sendCoinsPage->setAddress(addr); } void WalletView::gotoMiningPage() { setCurrentWidget(miningPage); } void WalletView::gotoSignMessageTab(QString addr) { // calls show() in showTab_SM() <API key> *<API key> = new <API key>(this); <API key>->setAttribute(Qt::WA_DeleteOnClose); <API key>->setModel(walletModel); <API key>->showTab_SM(true); if (!addr.isEmpty()) <API key>->setAddress_SM(addr); } void WalletView::<API key>(QString addr) { // calls show() in showTab_VM() <API key> *<API key> = new <API key>(this); <API key>->setAttribute(Qt::WA_DeleteOnClose); <API key>->setModel(walletModel); <API key>->showTab_VM(true); if (!addr.isEmpty()) <API key>->setAddress_VM(addr); } bool WalletView::<API key>(const SendCoinsRecipient& recipient) { return sendCoinsPage-><API key>(recipient); } void WalletView::<API key>(bool fShow) { overviewPage-><API key>(fShow); } void WalletView::<API key>() { emit <API key>(walletModel->getEncryptionStatus()); } void WalletView::encryptWallet(bool status) { if(!walletModel) return; AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt : AskPassphraseDialog::Decrypt, this); dlg.setModel(walletModel); dlg.exec(); <API key>(); } void WalletView::backupWallet() { QString filename = GUIUtil::getSaveFileName(this, tr("Backup Wallet"), QString(), tr("Wallet Data (*.dat)"), NULL); if (filename.isEmpty()) return; if (!walletModel->backupWallet(filename)) { emit message(tr("Backup Failed"), tr("There was an error trying to save the wallet data to %1.").arg(filename), CClientUIInterface::MSG_ERROR); } else { emit message(tr("Backup Successful"), tr("The wallet data was successfully saved to %1.").arg(filename), CClientUIInterface::MSG_INFORMATION); } } void WalletView::changePassphrase() { AskPassphraseDialog dlg(AskPassphraseDialog::ChangePass, this); dlg.setModel(walletModel); dlg.exec(); } void WalletView::unlockWallet() { if(!walletModel) return; // Unlock wallet when requested by wallet model if (walletModel->getEncryptionStatus() == WalletModel::Locked) { AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this); dlg.setModel(walletModel); dlg.exec(); } } void WalletView::<API key>() { if(!walletModel) return; AddressBookPage *dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab, this); dlg->setAttribute(Qt::WA_DeleteOnClose); dlg->setModel(walletModel-><API key>()); dlg->show(); } void WalletView::<API key>() { if(!walletModel) return; AddressBookPage *dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab, this); dlg->setAttribute(Qt::WA_DeleteOnClose); dlg->setModel(walletModel-><API key>()); dlg->show(); } void WalletView::showProgress(const QString &title, int nProgress) { if (nProgress == 0) { progressDialog = new QProgressDialog(title, "", 0, 100); progressDialog->setWindowModality(Qt::ApplicationModal); progressDialog->setMinimumDuration(0); progressDialog->setCancelButton(0); progressDialog->setAutoClose(false); progressDialog->setValue(0); } else if (nProgress == 100) { if (progressDialog) { progressDialog->close(); progressDialog->deleteLater(); } } else if (progressDialog) progressDialog->setValue(nProgress); }
<?php return array ( 'id' => '<API key>', 'fallback' => 'generic_dolfin', 'capabilities' => array ( 'pointing_method' => 'touchscreen', '<API key>' => '1.0', 'uaprof' => 'http://wap.samsungmobile.com/uaprof/GT-M5650.rdf', 'model_name' => 'GT M5650', 'brand_name' => 'Samsung', 'marketing_name' => 'Corby Lindy', 'release_date' => '2010_february', 'softkey_support' => 'true', 'table_support' => 'true', 'wml_1_1' => 'true', 'wml_1_2' => 'true', 'xhtml_support_level' => '3', 'wml_1_3' => 'true', 'columns' => '20', 'rows' => '16', 'max_image_width' => '228', 'resolution_width' => '240', 'resolution_height' => '320', 'max_image_height' => '280', 'jpg' => 'true', 'gif' => 'true', 'bmp' => 'true', 'wbmp' => 'true', 'png' => 'true', 'colors' => '65536', 'nokia_voice_call' => 'true', '<API key>' => '0', '<API key>' => '10', 'streaming_3g2' => 'true', 'streaming_3gpp' => 'true', '<API key>' => 'nb', '<API key>' => '1', 'streaming_video' => 'true', '<API key>' => '0', 'wap_push_support' => 'true', 'mms_png' => 'true', 'mms_max_size' => '307200', 'mms_max_width' => '0', 'mms_spmidi' => 'true', 'mms_max_height' => '0', 'mms_gif_static' => 'true', 'mms_wav' => 'true', 'mms_vcard' => 'true', 'mms_midi_monophonic' => 'true', 'mms_bmp' => 'true', 'mms_wbmp' => 'true', 'mms_amr' => 'true', 'mms_jpeg_baseline' => 'true', 'aac' => 'true', 'sp_midi' => 'true', 'mp3' => 'true', 'amr' => 'true', 'midi_monophonic' => 'true', 'imelody' => 'true', 'j2me_midp_2_0' => 'true', 'j2me_cldc_1_0' => 'true', 'j2me_cldc_1_1' => 'true', 'j2me_midp_1_0' => 'true', 'wifi' => 'true', 'max_data_rate' => '3600', '<API key>' => 'true', 'oma_support' => 'true', '<API key>' => 'true', 'image_inlining' => 'true', ), );
<?php class <API key> { public $image; public $image_type; public function __construct($filename = null) { if (!empty($filename)) { $this->load($filename); } } public function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if ($this->image_type == IMAGETYPE_JPEG) { $this->image = imagecreatefromjpeg($filename); } elseif ($this->image_type == IMAGETYPE_GIF) { $this->image = imagecreatefromgif($filename); } elseif ($this->image_type == IMAGETYPE_PNG) { $this->image = imagecreatefrompng($filename); } else { throw new Exception("The file you're trying to open is not supported"); } } public function example($url) { // Usage: // Load the original image $image = new SimpleImage($url); // Resize the image to 600px width and the proportional height $image->resizeToWidth(600); $image->save('lemon_resized.jpg'); // Create a squared version of the image $image->square(200); $image->save('lemon_squared.jpg'); // Scales the image to 75% $image->scale(75); $image->save('lemon_scaled.jpg'); // Resize the image to specific width and height $image->resize(80, 60); $image->save('lemon_resized2.jpg'); // Resize the canvas and fill the empty space with a color of your choice $image->maxareafill(600, 400, 32, 39, 240); $image->save('lemon_filled.jpg'); // Output the image to the browser: $image->output(); } public function save($filename, $image_type = IMAGETYPE_JPEG, $compression = 75, $permissions = null) { if ($image_type == IMAGETYPE_JPEG) { imagejpeg($this->image, $filename, $compression); } elseif ($image_type == IMAGETYPE_GIF) { imagegif($this->image, $filename); } elseif ($image_type == IMAGETYPE_PNG) { imagepng($this->image, $filename); } if ($permissions != null) { chmod($filename, $permissions); } } public function output($image_type = IMAGETYPE_JPEG, $quality = 80) { if ($image_type == IMAGETYPE_JPEG) { header("Content-type: image/jpeg"); imagejpeg($this->image, null, $quality); } elseif ($image_type == IMAGETYPE_GIF) { header("Content-type: image/gif"); imagegif($this->image); } elseif ($image_type == IMAGETYPE_PNG) { header("Content-type: image/png"); imagepng($this->image); } } public function getWidth() { return imagesx($this->image); } public function getHeight() { return imagesy($this->image); } public function resizeToHeight($height) { $ratio = $height / $this->getHeight(); $width = round($this->getWidth() * $ratio); $this->resize($width, $height); } public function resizeToWidth($width) { $ratio = $width / $this->getWidth(); $height = round($this->getHeight() * $ratio); $this->resize($width, $height); } public function square($size) { $new_image = <API key>($size, $size); if ($this->getWidth() > $this->getHeight()) { $this->resizeToHeight($size); <API key>($new_image, imagecolorallocate($new_image, 0, 0, 0)); imagealphablending($new_image, false); imagesavealpha($new_image, true); imagecopy($new_image, $this->image, 0, 0, ($this->getWidth() - $size) / 2, 0, $size, $size); } else { $this->resizeToWidth($size); <API key>($new_image, imagecolorallocate($new_image, 0, 0, 0)); imagealphablending($new_image, false); imagesavealpha($new_image, true); imagecopy($new_image, $this->image, 0, 0, 0, ($this->getHeight() - $size) / 2, $size, $size); } $this->image = $new_image; } public function scale($scale) { $width = $this->getWidth() * $scale / 100; $height = $this->getHeight() * $scale / 100; $this->resize($width, $height); } public function resize($width, $height) { $new_image = <API key>($width, $height); <API key>($new_image, imagecolorallocate($new_image, 0, 0, 0)); imagealphablending($new_image, false); imagesavealpha($new_image, true); imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); $this->image = $new_image; } public function cut($x, $y, $width, $height) { $new_image = <API key>($width, $height); <API key>($new_image, imagecolorallocate($new_image, 0, 0, 0)); imagealphablending($new_image, false); imagesavealpha($new_image, true); imagecopy($new_image, $this->image, 0, 0, $x, $y, $width, $height); $this->image = $new_image; } public function maxarea($width, $height = null) { $height = $height ? $height : $width; if ($this->getWidth() > $width) { $this->resizeToWidth($width); } if ($this->getHeight() > $height) { $this->resizeToheight($height); } } public function minarea($width, $height = null) { $height = $height ? $height : $width; if ($this->getWidth() < $width) { $this->resizeToWidth($width); } if ($this->getHeight() < $height) { $this->resizeToheight($height); } } public function cutFromCenter($width, $height) { if ($width < $this->getWidth() && $width > $height) { $this->resizeToWidth($width); } if ($height < $this->getHeight() && $width < $height) { $this->resizeToHeight($height); } $x = ($this->getWidth() / 2) - ($width / 2); $y = ($this->getHeight() / 2) - ($height / 2); return $this->cut($x, $y, $width, $height); } public function maxareafill($width, $height, $red = 0, $green = 0, $blue = 0) { $this->maxarea($width, $height); $new_image = <API key>($width, $height); $color_fill = imagecolorallocate($new_image, $red, $green, $blue); imagefill($new_image, 0, 0, $color_fill); imagecopyresampled($new_image, $this->image, floor(($width - $this->getWidth()) / 2), floor(($height - $this->getHeight()) / 2), 0, 0, $this->getWidth(), $this->getHeight(), $this->getWidth(), $this->getHeight() ); $this->image = $new_image; } }
# == Schema Information # Table name: accounts # id :integer not null, primary key # type :string default("Account"), not null # description :string default(""), not null # currency :string default("USD"), not null # created_at :datetime not null # updated_at :datetime not null # owner_id :integer # owner_type :string # standalone :boolean default(FALSE) # <API key> :integer # Indexes # <API key> (owner_id) # <API key> (owner_type) # <API key> (type) class Account::<API key> < Account end
package illume.analysis; import java.awt.image.BufferedImage; /* This simple analyser example averages pixel values. */ public class SimpleImageAnalyser<T extends BufferedImage> extends <API key><T> { @Override public double analyse(T input) { int sum_r = 0; int sum_g = 0; int sum_b = 0; for (int y = 0; y < input.getHeight(); y++) { for (int x = 0; x < input.getWidth(); x++) { final int clr = input.getRGB(x, y); sum_r += (clr & 0x00ff0000) >> 16; sum_g += (clr & 0x0000ff00) >> 8; sum_b += clr & 0x000000ff; } } double sum_rgb = ((sum_r + sum_b + sum_g) / 3.0d); double avg = sum_rgb / (input.getHeight() * input.getWidth()); // 8-bit RGB return avg / 255; } }
import { ExtraGlamorousProps } from './glamorous-component' import { ViewProperties, TextStyle, ViewStyle, ImageStyle, TextInputProperties, ImageProperties, ScrollViewProps, TextProperties, <API key>, <API key>, <API key>, <API key>, FlatListProperties, <API key> } from 'react-native' export interface NativeComponent { Image: React.StatelessComponent< ImageProperties & ExtraGlamorousProps & ImageStyle > ScrollView: React.StatelessComponent< ScrollViewProps & ExtraGlamorousProps & ViewStyle > Text: React.StatelessComponent< TextProperties & ExtraGlamorousProps & TextStyle > TextInput: React.StatelessComponent< TextInputProperties & ExtraGlamorousProps & TextStyle > TouchableHighlight: React.StatelessComponent< <API key> & ExtraGlamorousProps & ViewStyle > <API key>: React.StatelessComponent< <API key> & ExtraGlamorousProps & ViewStyle > TouchableOpacity: React.StatelessComponent< <API key> & ExtraGlamorousProps & ViewStyle > <API key>: React.StatelessComponent< <API key> & ExtraGlamorousProps & ViewStyle > View: React.StatelessComponent< ViewProperties & ExtraGlamorousProps & ViewStyle > FlatList: React.StatelessComponent< FlatListProperties<any> & ExtraGlamorousProps & ViewStyle > SectionList: React.StatelessComponent< <API key><any> & ExtraGlamorousProps & ViewStyle > }
var express = require('../') , Router = express.Router , request = require('./support/http') , methods = require('methods') , assert = require('assert'); describe('Router', function(){ var router, app; beforeEach(function(){ router = new Router; app = express(); }) describe('.match(method, url, i)', function(){ it('should match based on index', function(){ router.route('get', '/foo', function(){}); router.route('get', '/foob?', function(){}); router.route('get', '/bar', function(){}); var method = 'GET'; var url = '/foo?bar=baz'; var route = router.match(method, url, 0); route.constructor.name.should.equal('Route'); route.method.should.equal('get'); route.path.should.equal('/foo'); var route = router.match(method, url, 1); route.path.should.equal('/foob?'); var route = router.match(method, url, 2); assert(!route); url = '/bar'; var route = router.match(method, url); route.path.should.equal('/bar'); }) }) describe('.matchRequest(req, i)', function(){ it('should match based on index', function(){ router.route('get', '/foo', function(){}); router.route('get', '/foob?', function(){}); router.route('get', '/bar', function(){}); var req = { method: 'GET', url: '/foo?bar=baz' }; var route = router.matchRequest(req, 0); route.constructor.name.should.equal('Route'); route.method.should.equal('get'); route.path.should.equal('/foo'); var route = router.matchRequest(req, 1); req._route_index.should.equal(1); route.path.should.equal('/foob?'); var route = router.matchRequest(req, 2); assert(!route); req.url = '/bar'; var route = router.matchRequest(req); route.path.should.equal('/bar'); }) }) describe('.middleware', function(){ it('should dispatch', function(done){ router.route('get', '/foo', function(req, res){ res.send('foo'); }); app.use(router.middleware); request(app) .get('/foo') .expect('foo', done); }) }) describe('.multiple callbacks', function(){ it('should throw if a callback is null', function(){ assert.throws(function () { router.route('get', '/foo', null, function(){}); }) }) it('should throw if a callback is undefined', function(){ assert.throws(function () { router.route('get', '/foo', undefined, function(){}); }) }) it('should throw if a callback is not a function', function(){ assert.throws(function () { router.route('get', '/foo', 'not a function', function(){}); }) }) it('should not throw if all callbacks are functions', function(){ router.route('get', '/foo', function(){}, function(){}); }) }) describe('.all', function() { it('should support using .all to capture all http verbs', function() { var router = new Router(); router.all('/foo', function(){}); var url = '/foo?bar=baz'; methods.forEach(function testMethod(method) { var route = router.match(method, url); route.constructor.name.should.equal('Route'); route.method.should.equal(method); route.path.should.equal('/foo'); }); }) }) })
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title><API key> example</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="../bower_components/slickgrid/slick.grid.css" type="text/css" /> <link rel="stylesheet" href="../bower_components/slickgrid/css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" /> <link rel="stylesheet" href="../bower_components/slickgrid/examples/examples.css" type="text/css" /> <style> body {margin: 0;} .grid {background: white; outline: 0; border: 1px solid gray;} .slick-row.active {background-color: #fcc;} .idx {background-color: #f2f2f2; border-right: 1px solid #aaa; text-align: right; font-size: 0.8em; padding-right: 8px;} </style> </head> <body> <div id="my-grid" class="grid" style="width: 800px; height: 400px"></div> <script src="../bower_components/slickgrid/lib/jquery-1.7.min.js"></script> <script src="../bower_components/slickgrid/lib/jquery-ui-1.8.16.custom.min.js"></script> <script src="../bower_components/slickgrid/lib/jquery.event.drag-2.2.js"></script> <script src="../bower_components/slickgrid/slick.core.js"></script> <script src="../bower_components/slickgrid/slick.grid.js"></script> <script src="../dist/slick.colfix.js"></script> <script> /** columns defination */ var columns = [ {id: '#', name: '', field: 'idx', width: 50, cssClass: 'idx'}, {id: 'col1', name: 'col 1', field: 'col1', width: 50}, {id: 'col2', name: 'col 2', field: 'col2', width: 80}, {id: 'col3', name: 'col 3', field: 'col3', width: 100}, {id: 'col4', name: 'col 4', field: 'col4', width: 200}, {id: 'col5', name: 'col 5', field: 'col5', width: 50}, {id: 'col6', name: 'col 6', field: 'col6', width: 300}, {id: 'col7', name: 'col 7', field: 'col7', width: 100}, {id: 'col8', name: 'col 8', field: 'col8', width: 200}, {id: 'col9', name: 'col 9', field: 'col9', width: 100} ]; /** grid options */ var options = { enableColumnReorder: false, <API key>: true }; /** data */ var data = []; for (var i = 0; i < 500; i++) { data[i] = { idx: i, col1: 'col 1-' + i, col2: 'col 2-' + i, col3: 'col 3-' + i, col4: 'col 4-' + i, col5: 'col 5-' + i, col6: 'col 6-' + i, col7: 'col 7-' + i, col8: 'col 8-' + i, col9: 'col 9-' + i }; } /** SlickGrid */ var grid = new Slick.Grid('#my-grid', data, columns, options); // register colfix plguin grid.registerPlugin(new Slick.Plugins.ColFix(' // initialize grid.init(); </script> </body> </html>
using Foundation; using System; using System.Linq; using UIKit; namespace UICatalog { public partial class <API key> : <API key>, <API key> { private const string CellIdentifier = "searchResultsCell"; private readonly string[] allItems = { "Here's", "to", "the", "crazy", "ones.", "The", "misfits.", "The", "rebels.", "The", "troublemakers.", "The", "round", "pegs", "in", "the", "square", "holes.", "The", "ones", "who", "see", "things", "differently.", "They're", "not", "fond", "of", @"rules.", "And", "they", "have", "no", "respect", "for", "the", "status", "quo.", "You", "can", "quote", "them,", "disagree", "with", "them,", "glorify", "or", "vilify", "them.", "About", "the", "only", "thing", "you", "can't", "do", "is", "ignore", "them.", "Because", "they", "change", "things.", "They", "push", "the", "human", "race", "forward.", "And", "while", "some", "may", "see", "them", "as", "the", "crazy", "ones,", "we", "see", "genius.", "Because", "the", "people", "who", "are", "crazy", "enough", "to", "think", "they", "can", "change", "the", "world,", "are", "the", "ones", "who", "do." }; private string[] items; private string query; public <API key>(IntPtr handle) : base(handle) { } public override void ViewDidLoad() { base.ViewDidLoad(); items = allItems; } protected void ApplyFilter(string filter) { query = filter; items = string.IsNullOrEmpty(query) ? allItems : allItems.Where(s => s.Contains(query)).ToArray(); TableView.ReloadData(); } public override nint RowsInSection(UITableView tableView, nint section) { return items.Length; } public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(CellIdentifier, indexPath); cell.TextLabel.Text = items[indexPath.Row]; return cell; } #region <API key> [Export("<API key>:")] public void <API key>(UISearchController searchController) { // <API key> is called when the controller is being dismissed // to allow those who are using the controller they are search as the results controller a chance to reset their state. // No need to update anything if we're being dismissed. if (searchController.Active) { ApplyFilter(searchController.SearchBar.Text); } } #endregion } }
// AppDelegate.h // DecoratorPattern #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <<API key>> @property (strong, nonatomic) UIWindow *window; @end
<?php namespace Cubiche\Core\EventDispatcher; use Cubiche\Core\Bus\MessageInterface; interface EventInterface extends MessageInterface { /** * Stop event propagation. * * @return $this */ public function stopPropagation(); /** * Check whether propagation was stopped. * * @return bool */ public function <API key>(); /** * Get the event name. * * @return string */ public function eventName(); }
<?php namespace Kordy\Ticketit\Controllers; use App\Http\Controllers\Controller; use App\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\File; use Kordy\Ticketit\Models\Agent; use Kordy\Ticketit\Models\Setting; use Kordy\Ticketit\Seeds\SettingsTableSeeder; use Kordy\Ticketit\Seeds\TicketitTableSeeder; class InstallController extends Controller { public $migrations_tables = []; public function __construct() { $migrations = \File::files(dirname(dirname(__FILE__)).'/Migrations'); foreach ($migrations as $migration) { $this->migrations_tables[] = basename($migration, '.php'); } } public function publicAssets() { $public = $this->allFilesList(public_path('vendor/ticketit')); $assets = $this->allFilesList(base_path('vendor/kordy/ticketit/src/Public')); if ($public !== $assets) { Artisan::call('vendor:publish', [ '--provider' => 'Kordy\\Ticketit\\<API key>', '--tag' => ['public'], ]); } } /* * Initial install form */ public function index() { // if all migrations are not yet installed or missing settings table, // then start the initial install with admin and master template choices if (count($this->migrations_tables) == count($this->inactiveMigrations()) || in_array('<API key>', $this->inactiveMigrations()) ) { $views_files_list = $this->viewsFilesList('../resources/views/') + ['another' => trans('ticketit::install.another-file')]; $inactive_migrations = $this->inactiveMigrations(); $users_list = User::lists('first_name', 'id')->toArray(); return view('ticketit::install.index', compact('views_files_list', 'inactive_migrations', 'users_list')); } // other than that, Upgrade to a new version, installing new migrations and new settings slugs if (Agent::isAdmin()) { $inactive_migrations = $this->inactiveMigrations(); $inactive_settings = $this->inactiveSettings(); return view('ticketit::install.upgrade', compact('inactive_migrations', 'inactive_settings')); } \Log::emergency('Ticketit needs upgrade, admin should login and visit ticketit-install to activate the upgrade'); throw new \Exception('Ticketit needs upgrade, admin should login and visit ticketit install route'); } /* * Do all pre-requested setup */ public function setup(Request $request) { $master = $request->master; if ($master == 'another') { $another_file = $request->other_path; $views_content = strstr(substr(strstr($another_file, 'views/'), 6), '.blade.php', true); $master = str_replace('/', '.', $views_content); } $this->initialSettings($master); $admin_id = $request->admin_id; $admin = User::find($admin_id); $admin->ticketit_admin = true; $admin->save(); return redirect('/'.Setting::grab('main_route')); } /* * Do version upgrade */ public function upgrade() { if (Agent::isAdmin()) { $this->initialSettings(); return redirect('/'.Setting::grab('main_route')); } \Log::emergency('Ticketit upgrade path access: Only admin is allowed to upgrade'); throw new \Exception('Ticketit upgrade path access: Only admin is allowed to upgrade'); } /* * Initial installer to install migrations, seed default settings, and configure the master_template */ public function initialSettings($master = false) { $inactive_migrations = $this->inactiveMigrations(); if ($inactive_migrations) { // If a migration is missing, do the migrate Artisan::call('vendor:publish', [ '--provider' => 'Kordy\\Ticketit\\<API key>', '--tag' => ['db'], ]); Artisan::call('migrate'); $this->settingsSeeder($master); // if this is the first install of the html editor, seed old posts text to the new html column if (in_array('<API key>', $inactive_migrations)) { Artisan::call('ticketit:htmlify'); } } elseif ($this->inactiveSettings()) { // new settings to be installed $this->settingsSeeder($master); } \Cache::forget('settings'); } /** * Run the settings table seeder. * * @param string $master */ public function settingsSeeder($master = false) { $cli_path = 'config/ticketit.php'; // if seeder run from cli, use the cli path $provider_path = '../config/ticketit.php'; // if seeder run from provider, use the provider path $config_settings = []; $settings_file_path = false; if (File::isFile($cli_path)) { $settings_file_path = $cli_path; } elseif (File::isFile($provider_path)) { $settings_file_path = $provider_path; } if ($settings_file_path) { $config_settings = include $settings_file_path; File::move($settings_file_path, $settings_file_path.'.backup'); } $seeder = new SettingsTableSeeder(); if ($master) { $config_settings['master_template'] = $master; } $seeder->config = $config_settings; $seeder->run(); } /** * Get list of all files in the views folder. * * @return mixed */ public function viewsFilesList($dir_path) { $dir_files = File::files($dir_path); $files = []; foreach ($dir_files as $file) { $path = basename($file); $name = strstr(basename($file), '.', true); $files[$name] = $path; } return $files; } /** * Get list of all files in the views folder. * * @return mixed */ public function allFilesList($dir_path) { $files = []; if (File::exists($dir_path)) { $dir_files = File::allFiles($dir_path); foreach ($dir_files as $file) { $path = basename($file); $name = strstr(basename($file), '.', true); $files[$name] = $path; } } return $files; } /** * Get all Ticketit Package migrations that were not migrated. * * @return array */ public function inactiveMigrations() { $inactiveMigrations = []; $migration_arr = []; // Package Migrations $tables = $this->migrations_tables; // Application active migrations $migrations = DB::select('select * from migrations'); foreach ($migrations as $migration_parent) { // Count active package migrations $migration_arr [] = $migration_parent->migration; } foreach ($tables as $table) { if (!in_array($table, $migration_arr)) { $inactiveMigrations [] = $table; } } return $inactiveMigrations; } /** * Check if all Ticketit Package settings that were not installed to setting table. * * @return bool */ public function inactiveSettings() { $seeder = new SettingsTableSeeder(); // Package Settings $installed_settings = DB::table('ticketit_settings')->lists('value', 'slug'); // Application active migrations $default_Settings = $seeder->getDefaults(); if (count($installed_settings) == count($default_Settings)) { return false; } $inactive_settings = array_diff_key($default_Settings, $installed_settings); return $inactive_settings; } /** * Generate demo users, agents, and tickets. * * @return \Illuminate\Http\RedirectResponse */ public function demoDataSeeder() { $seeder = new TicketitTableSeeder(); $seeder->run(); session()->flash('status', 'Demo tickets, users, and agents are seeded!'); return redirect()->action('\Kordy\Ticketit\Controllers\TicketsController@index'); } }
<!DOCTYPE html PUBLIC "- <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>V8 API Reference Guide for node.js v7.2.1: v8::Maybe&lt; T &gt; Class Template Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">V8 API Reference Guide for node.js v7.2.1 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="<API key>"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1Maybe.html">Maybe</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="#friends">Friends</a> &#124; <a href="<API key>.html">List of all members</a> </div> <div class="headertitle"> <div class="title">v8::Maybe&lt; T &gt; Class Template Reference</div> </div> </div><!--header <div class="contents"> <p><code>#include &lt;<a class="el" href="v8_8h_source.html">v8.h</a>&gt;</code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> V8_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsNothing</b> () const </td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> V8_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsJust</b> () const </td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> V8_INLINE T&#160;</td><td class="memItemRight" valign="bottom"><b>ToChecked</b> () const </td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> <API key> V8_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><b>To</b> (T *out) const </td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> V8_INLINE T&#160;</td><td class="memItemRight" valign="bottom"><b>FromJust</b> () const </td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> V8_INLINE T&#160;</td><td class="memItemRight" valign="bottom"><b>FromMaybe</b> (const T &amp;default_value) const </td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> V8_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="classv8_1_1Maybe.html">Maybe</a> &amp;other) const </td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> V8_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="classv8_1_1Maybe.html">Maybe</a> &amp;other) const </td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> Friends</h2></td></tr> <tr class="memitem:<API key>"><td class="memTemplParams" colspan="2"><a class="anchor" id="<API key>"></a> template&lt;class U &gt; </td></tr> <tr class="memitem:<API key>"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Maybe.html">Maybe</a>&lt; U &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><b>Nothing</b> ()</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memTemplParams" colspan="2"><a class="anchor" id="<API key>"></a> template&lt;class U &gt; </td></tr> <tr class="memitem:<API key>"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Maybe.html">Maybe</a>&lt; U &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><b>Just</b> (const U &amp;u)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><h3>template&lt;class T&gt;<br /> class v8::Maybe&lt; T &gt;</h3> <p>A simple <a class="el" href="classv8_1_1Maybe.html">Maybe</a> type, representing an object which may or may not have a value, see <a href="https: <p>If an API method returns a Maybe&lt;&gt;, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a TerminateExecution exception was thrown. In that case, a "Nothing" value is returned. </p> </div><hr/>The documentation for this class was generated from the following file:<ul> <li>deps/v8/include/<a class="el" href="v8_8h_source.html">v8.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by & <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>
package com.covoex.qarvox; import com.covoex.qarvox.Application.BasicFunction; /** * @author Myeongjun Kim */ public class Main { public static void main(String[] args) { BasicFunction.programStart(); } }
<?php /* Safe sample input : get the field UserData from the variable $_POST sanitize : use of ternary condition construction : concatenation with simple quote */ $tainted = $_POST['UserData']; $tainted = $tainted == 'safe1' ? 'safe1' : 'safe2'; $var = http_redirect("pages/'". $tainted . "'.php"); ?>
import {Curve} from '../curve' export class Line extends Curve { constructor(p0, v) { super(); this.p0 = p0; this.v = v; this._pointsCache = new Map(); } intersectSurface(surface) { if (surface.isPlane) { const s0 = surface.normal.multiply(surface.w); return surface.normal.dot(s0.minus(this.p0)) / surface.normal.dot(this.v); // 4.7.4 } else { return super.intersectSurface(surface); } } intersectCurve(curve, surface) { if (curve.isLine && surface.isPlane) { const otherNormal = surface.normal.cross(curve.v)._normalize(); return otherNormal.dot(curve.p0.minus(this.p0)) / otherNormal.dot(this.v); // (4.8.3) } return super.intersectCurve(curve, surface); } parametricEquation(t) { return this.p0.plus(this.v.multiply(t)); } t(point) { return point.minus(this.p0).dot(this.v); } <API key>(surface) { let point = this._pointsCache.get(surface); if (!point) { const t = this.intersectSurface(surface); point = this.parametricEquation(t); this._pointsCache.set(surface, point); } return point; } translate(vector) { return new Line(this.p0.plus(vector), this.v); } approximate(resolution, from, to, path) { } offset() {}; } Line.prototype.isLine = true; Line.<API key> = function(plane1, plane2) { const n1 = plane1.normal; const n2 = plane2.normal; const v = n1.cross(n2)._normalize(); const pf1 = plane1.toParametricForm(); const pf2 = plane2.toParametricForm(); const r0diff = pf1.r0.minus(pf2.r0); const ww = r0diff.minus(n2.multiply(r0diff.dot(n2))); const p0 = pf2.r0.plus( ww.multiply( n1.dot(r0diff) / n1.dot(ww))); return new Line(p0, v); }; Line.fromSegment = function(a, b) { return new Line(a, b.minus(a)._normalize()); };
# 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::V2019_11_01 module Models # Properties of the Radius client root certificate of # <API key>. class <API key> include MsRestAzure # @return [String] The certificate name. attr_accessor :name # @return [String] The Radius client root certificate thumbprint. attr_accessor :thumbprint # Mapper for <API key> class as Ruby # Hash. # This will be used for serialization/deserialization. def self.mapper() { <API key>: true, required: false, serialized_name: '<API key>', type: { name: 'Composite', class_name: '<API key>', model_properties: { name: { <API key>: true, required: false, serialized_name: 'name', type: { name: 'String' } }, thumbprint: { <API key>: true, required: false, serialized_name: 'thumbprint', type: { name: 'String' } } } } } end end end end
<?php // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); ?> <fieldset> <legend> <?php echo '<span class="userfields_info">' .vmText::_('<API key>').'</span>'; ?> </legend> <?php echo $this->lists['shipTo']; ?> </fieldset>
#include "TString.h" #include "TGraph.h" #include "TGraphErrors.h" #include "TGraphAsymmErrors.h" #include <fstream> #include <Riostream.h> #include <sstream> #include <fstream> using namespace std; TGraphErrors* <API key>(TString txtFileName, Color_t markerColor=1, Style_t markerStyle=20, Size_t markerSize=1, Style_t lineStyle=1,Width_t lineWidth=2, bool IsNoErr=0) { Float_t x_array[400],ex_array[400],y_array[400],ey_array[400]; Char_t buffer[2048]; Float_t x,y,ex,ey; Int_t nlines = 0; ifstream infile(txtFileName.Data()); if (!infile.is_open()) { cout << "Error opening file. Exiting." << endl; } else { while (!infile.eof()) { infile.getline(buffer,2048); sscanf(buffer,"%f %f %f\n",&x,&y,&ey); x_array[nlines] = x; ex_array[nlines] = 0; y_array[nlines] = y; ey_array[nlines] = ey; if(IsNoErr) ey_array[nlines]=0; nlines++; } } TGraphErrors *graph = new TGraphErrors(nlines-1,x_array,y_array,ex_array,ey_array); txtFileName.Remove(txtFileName.Index(".txt"),4); graph->SetName(txtFileName.Data()); graph->SetMarkerStyle(markerStyle); graph->SetMarkerColor(markerColor); graph->SetLineStyle(lineStyle); graph->SetLineColor(markerColor); graph->SetMarkerSize(markerSize); graph->SetLineWidth(3); return graph; } void drawSysBoxValue(TGraph* gr, int fillcolor=TColor::GetColor("#ffff00"), double xwidth=0.3, double *percent, double xshift=0) { TBox* box; for(int n=0;n<gr->GetN();n++) { double x,y; gr->GetPoint(n,x,y); double yerr = percent[n]; box = new TBox(x+xshift-xwidth,y-fabs(yerr),x+xwidth,y+fabs(yerr)); box->SetLineWidth(0); box->SetFillColor(kGray); box->Draw("Fsame"); } }
<?php // Documentation test config file for "Components / Jumbotron" part return [ 'title' => 'Jumbotron', 'url' => '%bootstrap-url%/components/jumbotron/', 'rendering' => function (\Laminas\View\Renderer\PhpRenderer $oView) { echo $oView->jumbotron([ 'title' => 'Hello, world!', 'lead' => 'This is a simple hero unit, a simple jumbotron-style component ' . 'for calling extra attention to featured content or information.', '---' => ['attributes' => ['class' => 'my-4']], 'It uses utility classes for typography and spacing to space ' . 'content out within the larger container.', 'button' => [ 'options' => [ 'tag' => 'a', 'label' => 'Learn more', 'variant' => 'primary', 'size' => 'lg', ], 'attributes' => [ 'href' => ' ] ], ]) . PHP_EOL; // To make the jumbotron full width, and without rounded corners, add the option fluid echo $oView->jumbotron( [ 'title' => 'Fluid jumbotron', 'lead' => 'This is a modified jumbotron that occupies the entire horizontal space of its parent.', ], ['fluid' => true] ); }, 'expected' => '<div class="jumbotron">' . PHP_EOL . ' <h1 class="display-4">Hello, world!</h1>' . PHP_EOL . ' <p class="lead">This is a simple hero unit, a simple jumbotron-style component ' . 'for calling extra attention to featured content or information.</p>' . PHP_EOL . ' <hr class="my-4" />' . PHP_EOL . ' <p>It uses utility classes for typography and spacing to space ' . 'content out within the larger container.</p>' . PHP_EOL . ' <a href="&#x23;" class="btn&#x20;btn-lg&#x20;btn-primary" role="button">Learn more</a>' . PHP_EOL . '</div>' . PHP_EOL . '<div class="jumbotron&#x20;jumbotron-fluid">' . PHP_EOL . ' <div class="container">' . PHP_EOL . ' <h1 class="display-4">Fluid jumbotron</h1>' . PHP_EOL . ' <p class="lead">This is a modified jumbotron that occupies ' . 'the entire horizontal space of its parent.</p>' . PHP_EOL . ' </div>' . PHP_EOL . '</div>', ];
import time import pymemcache.client import pytest from limits import <API key>, <API key> from limits.storage import MemcachedStorage, storage_from_string from limits.strategies import ( <API key>, <API key>, ) from tests.utils import fixed_start @pytest.mark.memcached @pytest.mark.flaky class <API key>: @pytest.fixture(autouse=True) def setup(self, memcached, memcached_cluster): self.storage_url = "memcached://localhost:22122" def test_init_options(self, mocker): constructor = mocker.spy(pymemcache.client, "PooledClient") assert storage_from_string(self.storage_url, connect_timeout=1).check() assert constructor.call_args[1]["connect_timeout"] == 1 @fixed_start def test_fixed_window(self): storage = MemcachedStorage("memcached://localhost:22122") limiter = <API key>(storage) per_min = <API key>(10) start = time.time() count = 0 while time.time() - start < 0.5 and count < 10: assert limiter.hit(per_min) count += 1 assert not limiter.hit(per_min) while time.time() - start <= 1: time.sleep(0.1) assert limiter.hit(per_min) @fixed_start def <API key>(self): storage = MemcachedStorage("memcached://localhost:22122,localhost:22123") limiter = <API key>(storage) per_min = <API key>(10) start = time.time() count = 0 while time.time() - start < 0.5 and count < 10: assert limiter.hit(per_min) count += 1 assert not limiter.hit(per_min) while time.time() - start <= 1: time.sleep(0.1) assert limiter.hit(per_min) @fixed_start def <API key>(self): storage = MemcachedStorage("memcached://localhost:22122") limiter = <API key>(storage) per_sec = <API key>(2, 2) assert limiter.hit(per_sec) time.sleep(1) assert limiter.hit(per_sec) assert not limiter.test(per_sec) time.sleep(1) assert not limiter.test(per_sec) time.sleep(1) assert limiter.test(per_sec) @fixed_start def <API key>(self): storage = MemcachedStorage("memcached://localhost:22122,localhost:22123") limiter = <API key>(storage) per_sec = <API key>(2, 2) assert limiter.hit(per_sec) time.sleep(1) assert limiter.hit(per_sec) assert not limiter.test(per_sec) time.sleep(1) assert not limiter.test(per_sec) time.sleep(1) assert limiter.test(per_sec) def test_clear(self): storage = MemcachedStorage("memcached://localhost:22122") limiter = <API key>(storage) per_min = <API key>(1) limiter.hit(per_min) assert not limiter.hit(per_min) limiter.clear(per_min) assert limiter.hit(per_min)
<?php namespace Tutorial\ToDoListBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; class <API key> extends Extension { /** * {@inheritDoc} */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this-><API key>($configuration, $configs); $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.xml'); } }
import os import sys import tempfile from fabric.api import run, sudo, env, local, hide, settings from fabric.contrib.files import append, sed, exists, contains from fabric.context_managers import prefix from fabric.operations import get, put from fabric.context_managers import cd from fabric.tasks import Task from fab_deploy.functions import random_password from fab_deploy.base import postgres as base_postgres class JoyentMixin(object): <API key> = '' def _get_data_dir(self, db_version): # Try to get from svc first output = run('svcprop -p config/data postgresql') if output.stdout and exists(output.stdout, use_sudo=True): return output.stdout return base_postgres.PostgresInstall._get_data_dir(self, db_version) def _install_package(self, db_version): sudo("pkg_add postgresql%s-server" %db_version) sudo("pkg_add postgresql%s-replicationtools" %db_version) sudo("svcadm enable postgresql") def _restart_db_server(self, db_version): sudo('svcadm restart postgresql') def _stop_db_server(self, db_version): sudo('svcadm disable postgresql') def _start_db_server(self, db_version): sudo('svcadm enable postgresql') class PostgresInstall(JoyentMixin, base_postgres.PostgresInstall): """ Install postgresql on server install postgresql package; enable postgres access from localhost without password; enable all other user access from other machines with password; setup a few parameters related with streaming replication; database server listen to all machines '*'; create a user for database with password. """ name = 'master_setup' db_version = '9.1' class SlaveSetup(JoyentMixin, base_postgres.SlaveSetup): """ Set up master-slave streaming replication: slave node """ name = 'slave_setup' class PGBouncerInstall(Task): """ Set up PGBouncer on a database server """ name = 'setup_pgbouncer' pgbouncer_src = 'http://pkgsrc.smartos.org/packages/SmartOS/2012Q2/databases/pgbouncer-1.4.2.tgz' pkg_name = 'pgbouncer-1.4.2.tgz' config_dir = '/etc/opt/pkg' config = { '*': 'host=127.0.0.1', 'logfile': '/var/log/pgbouncer/pgbouncer.log', 'listen_addr': '*', 'listen_port': '6432', 'unix_socket_dir': '/tmp', 'auth_type': 'md5', 'auth_file': '%s/pgbouncer.userlist' %config_dir, 'pool_mode': 'session', 'admin_users': 'postgres', 'stats_users': 'postgres', } def install_package(self): sudo('pkg_add libevent') with cd('/tmp'): run('wget %s' %self.pgbouncer_src) sudo('pkg_add %s' %self.pkg_name) def _setup_parameter(self, file_name, **kwargs): for key, value in kwargs.items(): origin = "%s =" %key new = "%s = %s" %(key, value) sudo('sed -i "/%s/ c\%s" %s' %(origin, new, file_name)) def _get_passwd(self, username): with hide('output'): string = run('echo "select usename, passwd from pg_shadow where ' 'usename=\'%s\' order by 1" | sudo su postgres -c ' '"psql"' %username) user, passwd = string.split('\n')[2].split('|') user = user.strip() passwd = passwd.strip() __, tmp_name = tempfile.mkstemp() fn = open(tmp_name, 'w') fn.write('"%s" "%s" ""\n' %(user, passwd)) fn.close() put(tmp_name, '%s/pgbouncer.userlist'%self.config_dir, use_sudo=True) local('rm %s' %tmp_name) def _get_username(self, section=None): try: names = env.config_object.get_list(section, env.config_object.USERNAME) username = names[0] except: print ('You must first set up a database server on this machine, ' 'and create a database user') raise return username def run(self, section=None): sudo('mkdir -p /opt/pkg/bin') sudo("ln -sf /opt/local/bin/awk /opt/pkg/bin/nawk") sudo("ln -sf /opt/local/bin/sed /opt/pkg/bin/nbsed") self.install_package() svc_method = os.path.join(env.configs_dir, 'pgbouncer.xml') put(svc_method, self.config_dir, use_sudo=True) home = run('bash -c "echo ~postgres"') bounce_home = os.path.join(home, 'pgbouncer') pidfile = os.path.join(bounce_home, 'pgbouncer.pid') self._setup_parameter('%s/pgbouncer.ini' %self.config_dir, pidfile=pidfile, **self.config) if not section: section = 'db-server' username = self._get_username(section) self._get_passwd(username) # postgres should be the owner of these config files sudo('chown -R postgres:postgres %s' %self.config_dir) sudo('mkdir -p %s' % bounce_home) sudo('chown postgres:postgres %s' % bounce_home) sudo('mkdir -p /var/log/pgbouncer') sudo('chown postgres:postgres /var/log/pgbouncer') # set up log sudo('logadm -C 3 -p1d -c -w /var/log/pgbouncer/pgbouncer.log -z 1') run('svccfg import %s/pgbouncer.xml' %self.config_dir) # start pgbouncer sudo('svcadm enable pgbouncer') setup = PostgresInstall() slave_setup = SlaveSetup() setup_pgbouncer = PGBouncerInstall()
#!/bin/sh # CYBERWATCH SAS - 2017 # Security fix for DSA-3345-1 # Operating System: Debian 8 (Jessie) # Architecture: x86_64 # - iceweasel:38.2.1esr-1~deb8u1 # Last versions recommanded by security team: # - iceweasel:38.8.0esr-1~deb8u1 # CVE List: # - CVE-2015-4497 # - CVE-2015-4498 # More details: sudo apt-get install --only-upgrade iceweasel=38.8.0esr-1~deb8u1 -y
package mockit.external.asm4; import java.lang.reflect.Constructor; import java.lang.reflect.Method; /** * A Java field or method type. This class can be used to make it easier to * manipulate type and method descriptors. * * @author Eric Bruneton * @author Chris Nokleberg */ public class Type { /** * The sort of the <tt>void</tt> type. See {@link #getSort getSort}. */ public static final int VOID = 0; /** * The sort of the <tt>boolean</tt> type. See {@link #getSort getSort}. */ public static final int BOOLEAN = 1; /** * The sort of the <tt>char</tt> type. See {@link #getSort getSort}. */ public static final int CHAR = 2; /** * The sort of the <tt>byte</tt> type. See {@link #getSort getSort}. */ public static final int BYTE = 3; /** * The sort of the <tt>short</tt> type. See {@link #getSort getSort}. */ public static final int SHORT = 4; /** * The sort of the <tt>int</tt> type. See {@link #getSort getSort}. */ public static final int INT = 5; /** * The sort of the <tt>float</tt> type. See {@link #getSort getSort}. */ public static final int FLOAT = 6; /** * The sort of the <tt>long</tt> type. See {@link #getSort getSort}. */ public static final int LONG = 7; /** * The sort of the <tt>double</tt> type. See {@link #getSort getSort}. */ public static final int DOUBLE = 8; /** * The sort of array reference types. See {@link #getSort getSort}. */ public static final int ARRAY = 9; /** * The sort of object reference types. See {@link #getSort getSort}. */ public static final int OBJECT = 10; /** * The sort of method types. See {@link #getSort getSort}. */ public static final int METHOD = 11; /** * The <tt>void</tt> type. */ public static final Type VOID_TYPE = new Type(VOID, null, ('V' << 24) | (5 << 16) | (0 << 8) | 0, 1); /** * The <tt>boolean</tt> type. */ public static final Type BOOLEAN_TYPE = new Type(BOOLEAN, null, ('Z' << 24) | (0 << 16) | (5 << 8) | 1, 1); /** * The <tt>char</tt> type. */ public static final Type CHAR_TYPE = new Type(CHAR, null, ('C' << 24) | (0 << 16) | (6 << 8) | 1, 1); /** * The <tt>byte</tt> type. */ public static final Type BYTE_TYPE = new Type(BYTE, null, ('B' << 24) | (0 << 16) | (5 << 8) | 1, 1); /** * The <tt>short</tt> type. */ public static final Type SHORT_TYPE = new Type(SHORT, null, ('S' << 24) | (0 << 16) | (7 << 8) | 1, 1); /** * The <tt>int</tt> type. */ public static final Type INT_TYPE = new Type(INT, null, ('I' << 24) | (0 << 16) | (0 << 8) | 1, 1); /** * The <tt>float</tt> type. */ public static final Type FLOAT_TYPE = new Type(FLOAT, null, ('F' << 24) | (2 << 16) | (2 << 8) | 1, 1); /** * The <tt>long</tt> type. */ public static final Type LONG_TYPE = new Type(LONG, null, ('J' << 24) | (1 << 16) | (1 << 8) | 2, 1); /** * The <tt>double</tt> type. */ public static final Type DOUBLE_TYPE = new Type(DOUBLE, null, ('D' << 24) | (3 << 16) | (3 << 8) | 2, 1); private static final Type[] NO_ARGS = new Type[0]; // Fields /** * The sort of this Java type. */ private final int sort; /** * A buffer containing the internal name of this Java type. This field is * only used for reference types. */ private final char[] buf; /** * The offset of the internal name of this Java type in {@link #buf buf} or, * for primitive types, the size, descriptor and getOpcode offsets for this * type (byte 0 contains the size, byte 1 the descriptor, byte 2 the offset * for IALOAD or IASTORE, byte 3 the offset for all other instructions). */ private final int off; /** * The length of the internal name of this Java type. */ private final int len; // Constructors /** * Constructs a reference type. * * @param sort the sort of the reference type to be constructed. * @param buf a buffer containing the descriptor of the previous type. * @param off the offset of this descriptor in the previous buffer. * @param len the length of this descriptor. */ private Type(int sort, char[] buf, int off, int len) { this.sort = sort; this.buf = buf; this.off = off; this.len = len; } /** * Returns the Java type corresponding to the given type descriptor. * * @param typeDescriptor a field or method type descriptor. * @return the Java type corresponding to the given type descriptor. */ public static Type getType(String typeDescriptor) { return getType(typeDescriptor.toCharArray(), 0); } /** * Returns the Java type corresponding to the given internal name. * * @param internalName an internal name. * @return the Java type corresponding to the given internal name. */ public static Type getObjectType(String internalName) { char[] buf = internalName.toCharArray(); return new Type(buf[0] == '[' ? ARRAY : OBJECT, buf, 0, buf.length); } /** * Returns the Java type corresponding to the given method descriptor. * Equivalent to <code>Type.getType(methodDescriptor)</code>. * * @param methodDescriptor a method descriptor. * @return the Java type corresponding to the given method descriptor. */ public static Type getMethodType(String methodDescriptor) { return getType(methodDescriptor.toCharArray(), 0); } /** * Returns the Java type corresponding to the given class. * * @param c a class. * @return the Java type corresponding to the given class. */ public static Type getType(Class<?> c) { if (c.isPrimitive()) { if (c == Integer.TYPE) { return INT_TYPE; } else if (c == Void.TYPE) { return VOID_TYPE; } else if (c == Boolean.TYPE) { return BOOLEAN_TYPE; } else if (c == Byte.TYPE) { return BYTE_TYPE; } else if (c == Character.TYPE) { return CHAR_TYPE; } else if (c == Short.TYPE) { return SHORT_TYPE; } else if (c == Double.TYPE) { return DOUBLE_TYPE; } else if (c == Float.TYPE) { return FLOAT_TYPE; } else /* if (c == Long.TYPE) */{ return LONG_TYPE; } } else { return getType(getDescriptor(c)); } } /** * Returns the Java method type corresponding to the given constructor. * * @param c a {@link Constructor Constructor} object. * @return the Java method type corresponding to the given constructor. */ public static Type getType(Constructor<?> c) { return getType(<API key>(c)); } /** * Returns the Java method type corresponding to the given method. * * @param m a {@link Method Method} object. * @return the Java method type corresponding to the given method. */ public static Type getType(Method m) { return getType(getMethodDescriptor(m)); } /** * Returns the Java types corresponding to the argument types of the given * method descriptor. * * @param methodDescriptor a method descriptor. * @return the Java types corresponding to the argument types of the given * method descriptor. */ public static Type[] getArgumentTypes(String methodDescriptor) { if (methodDescriptor.charAt(1) == ')') return NO_ARGS; char[] buf = methodDescriptor.toCharArray(); int off = 1; int size = 0; while (true) { char car = buf[off++]; if (car == ')') { break; } else if (car == 'L') { while (buf[off++] != ';') { } ++size; } else if (car != '[') { ++size; } } Type[] args = new Type[size]; off = 1; size = 0; while (buf[off] != ')') { args[size] = getType(buf, off); off += args[size].len + (args[size].sort == OBJECT ? 2 : 0); size += 1; } return args; } /** * Returns the Java type corresponding to the return type of the given * method descriptor. * * @param methodDescriptor a method descriptor. * @return the Java type corresponding to the return type of the given * method descriptor. */ public static Type getReturnType(String methodDescriptor) { char[] buf = methodDescriptor.toCharArray(); return getType(buf, methodDescriptor.indexOf(')') + 1); } /** * Computes the size of the arguments and of the return value of a method. * * @param desc the descriptor of a method. * @return the size of the arguments of the method (plus one for the * implicit this argument), argSize, and the size of its return * value, retSize, packed into a single int i = * <tt>(argSize << 2) | retSize</tt> (argSize is therefore equal * to <tt>i >> 2</tt>, and retSize to <tt>i & 0x03</tt>). */ public static int <API key>(String desc) { int n = 1; int c = 1; while (true) { char car = desc.charAt(c++); if (car == ')') { car = desc.charAt(c); return n << 2 | (car == 'V' ? 0 : (car == 'D' || car == 'J' ? 2 : 1)); } else if (car == 'L') { while (desc.charAt(c++) != ';') { } n += 1; } else if (car == '[') { while ((car = desc.charAt(c)) == '[') { ++c; } if (car == 'D' || car == 'J') { n -= 1; } } else if (car == 'D' || car == 'J') { n += 2; } else { n += 1; } } } /** * Returns the Java type corresponding to the given type descriptor. For * method descriptors, buf is supposed to contain nothing more than the * descriptor itself. * * @param buf a buffer containing a type descriptor. * @param off the offset of this descriptor in the previous buffer. * @return the Java type corresponding to the given type descriptor. */ private static Type getType(char[] buf, int off) { int len; switch (buf[off]) { case 'V': return VOID_TYPE; case 'Z': return BOOLEAN_TYPE; case 'C': return CHAR_TYPE; case 'B': return BYTE_TYPE; case 'S': return SHORT_TYPE; case 'I': return INT_TYPE; case 'F': return FLOAT_TYPE; case 'J': return LONG_TYPE; case 'D': return DOUBLE_TYPE; case '[': len = 1; while (buf[off + len] == '[') { ++len; } if (buf[off + len] == 'L') { ++len; while (buf[off + len] != ';') { ++len; } } return new Type(ARRAY, buf, off, len + 1); case 'L': len = 1; while (buf[off + len] != ';') { ++len; } return new Type(OBJECT, buf, off + 1, len - 1); case '(': return new Type(METHOD, buf, 0, buf.length); default: throw new <API key>("Invalid type descriptor: " + new String(buf)); } } // Accessors /** * Returns the sort of this Java type. * * @return {@link #VOID VOID}, {@link #BOOLEAN BOOLEAN}, * {@link #CHAR CHAR}, {@link #BYTE BYTE}, {@link #SHORT SHORT}, * {@link #INT INT}, {@link #FLOAT FLOAT}, {@link #LONG LONG}, * {@link #DOUBLE DOUBLE}, {@link #ARRAY ARRAY}, * {@link #OBJECT OBJECT} or {@link #METHOD METHOD}. */ public int getSort() { return sort; } /** * Returns the number of dimensions of this array type. This method should * only be used for an array type. * * @return the number of dimensions of this array type. */ public int getDimensions() { int i = 1; while (buf[off + i] == '[') { ++i; } return i; } /** * Returns the type of the elements of this array type. This method should * only be used for an array type. * * @return Returns the type of the elements of this array type. */ public Type getElementType() { return getType(buf, off + getDimensions()); } /** * Returns the binary name of the class corresponding to this type. This * method must not be used on method types. * * @return the binary name of the class corresponding to this type. */ public String getClassName() { switch (sort) { case VOID: return "void"; case BOOLEAN: return "boolean"; case CHAR: return "char"; case BYTE: return "byte"; case SHORT: return "short"; case INT: return "int"; case FLOAT: return "float"; case LONG: return "long"; case DOUBLE: return "double"; case ARRAY: StringBuffer b = new StringBuffer(getElementType().getClassName()); for (int i = getDimensions(); i > 0; --i) { b.append("[]"); } return b.toString(); case OBJECT: return new String(buf, off, len).replace('/', '.'); default: return null; } } /** * Returns the internal name of the class corresponding to this object or * array type. The internal name of a class is its fully qualified name (as * returned by Class.getName(), where '.' are replaced by '/'. This method * should only be used for an object or array type. * * @return the internal name of the class corresponding to this object type. */ public String getInternalName() { return new String(buf, off, len); } // Conversion to type descriptors /** * Returns the descriptor corresponding to this Java type. * * @return the descriptor corresponding to this Java type. */ public String getDescriptor() { StringBuffer buf = new StringBuffer(); getDescriptor(buf); return buf.toString(); } /** * Appends the descriptor corresponding to this Java type to the given * string buffer. * * @param buf the string buffer to which the descriptor must be appended. */ private void getDescriptor(StringBuffer buf) { if (this.buf == null) { // descriptor is in byte 3 of 'off' for primitive types (buf == null) buf.append((char) ((off & 0xFF000000) >>> 24)); } else if (sort == OBJECT) { buf.append('L'); buf.append(this.buf, off, len); buf.append(';'); } else { // sort == ARRAY || sort == METHOD buf.append(this.buf, off, len); } } // Direct conversion from classes to type descriptors, // without intermediate Type objects /** * Returns the internal name of the given class. The internal name of a * class is its fully qualified name, as returned by Class.getName(), where * '.' are replaced by '/'. * * @param c an object or array class. * @return the internal name of the given class. */ public static String getInternalName(Class<?> c) { return c.getName().replace('.', '/'); } /** * Returns the descriptor corresponding to the given Java type. * * @param c an object class, a primitive class or an array class. * @return the descriptor corresponding to the given class. */ public static String getDescriptor(Class<?> c) { StringBuffer buf = new StringBuffer(); getDescriptor(buf, c); return buf.toString(); } /** * Returns the descriptor corresponding to the given constructor. * * @param c a {@link Constructor Constructor} object. * @return the descriptor of the given constructor. */ public static String <API key>(Constructor<?> c) { Class<?>[] parameters = c.getParameterTypes(); StringBuffer buf = new StringBuffer(); buf.append('('); for (int i = 0; i < parameters.length; ++i) { getDescriptor(buf, parameters[i]); } return buf.append(")V").toString(); } /** * Returns the descriptor corresponding to the given method. * * @param m a {@link Method Method} object. * @return the descriptor of the given method. */ public static String getMethodDescriptor(Method m) { Class<?>[] parameters = m.getParameterTypes(); StringBuffer buf = new StringBuffer(); buf.append('('); for (int i = 0; i < parameters.length; ++i) { getDescriptor(buf, parameters[i]); } buf.append(')'); getDescriptor(buf, m.getReturnType()); return buf.toString(); } /** * Appends the descriptor of the given class to the given string buffer. * * @param buf the string buffer to which the descriptor must be appended. * @param c the class whose descriptor must be computed. */ private static void getDescriptor(StringBuffer buf, Class<?> c) { Class<?> d = c; while (true) { if (d.isPrimitive()) { char car; if (d == Integer.TYPE) { car = 'I'; } else if (d == Void.TYPE) { car = 'V'; } else if (d == Boolean.TYPE) { car = 'Z'; } else if (d == Byte.TYPE) { car = 'B'; } else if (d == Character.TYPE) { car = 'C'; } else if (d == Short.TYPE) { car = 'S'; } else if (d == Double.TYPE) { car = 'D'; } else if (d == Float.TYPE) { car = 'F'; } else /* if (d == Long.TYPE) */{ car = 'J'; } buf.append(car); return; } else if (d.isArray()) { buf.append('['); d = d.getComponentType(); } else { buf.append('L'); String name = d.getName(); int len = name.length(); for (int i = 0; i < len; ++i) { char car = name.charAt(i); buf.append(car == '.' ? '/' : car); } buf.append(';'); return; } } } // Corresponding size and opcodes /** * Returns the size of values of this type. This method must not be used for * method types. * * @return the size of values of this type, i.e., 2 for <tt>long</tt> and * <tt>double</tt>, 0 for <tt>void</tt> and 1 otherwise. */ public int getSize() { // the size is in byte 0 of 'off' for primitive types (buf == null) return buf == null ? off & 0xFF : 1; } /** * Returns a JVM instruction opcode adapted to this Java type. This method * must not be used for method types. * * @param opcode a JVM instruction opcode. This opcode must be one of ILOAD, * ISTORE, IALOAD, IASTORE, IADD, ISUB, IMUL, IDIV, IREM, INEG, ISHL, * ISHR, IUSHR, IAND, IOR, IXOR and IRETURN. * @return an opcode that is similar to the given opcode, but adapted to * this Java type. For example, if this type is <tt>float</tt> and * <tt>opcode</tt> is IRETURN, this method returns FRETURN. */ public int getOpcode(int opcode) { if (opcode == Opcodes.IALOAD || opcode == Opcodes.IASTORE) { // the offset for IALOAD or IASTORE is in byte 1 of 'off' for // primitive types (buf == null) return opcode + (buf == null ? (off & 0xFF00) >> 8 : 4); } else { // the offset for other instructions is in byte 2 of 'off' for // primitive types (buf == null) return opcode + (buf == null ? (off & 0xFF0000) >> 16 : 4); } } // Equals, hashCode and toString /** * Tests if the given object is equal to this type. * * @param o the object to be compared to this type. * @return <tt>true</tt> if the given object is equal to this type. */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Type)) { return false; } Type t = (Type) o; if (sort != t.sort) { return false; } if (sort >= ARRAY) { if (len != t.len) { return false; } for (int i = off, j = t.off, end = i + len; i < end; i++, j++) { if (buf[i] != t.buf[j]) { return false; } } } return true; } /** * Returns a hash code value for this type. * * @return a hash code value for this type. */ @Override public int hashCode() { int hc = 13 * sort; if (sort >= ARRAY) { for (int i = off, end = i + len; i < end; i++) { hc = 17 * (hc + buf[i]); } } return hc; } /** * Returns a string representation of this type. * * @return the descriptor of this type. */ @Override public String toString() { return getDescriptor(); } }
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("<API key>", "ibtokin.settings") try: from django.core.management import <API key> except ImportError: # The above import may fail for some other reason. Ensure that the # issue is really that Django is missing to avoid masking other # exceptions on Python 2. try: import django except ImportError: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) raise <API key>(sys.argv)
<table class="table table-striped table-bordered table-hover"> <tr> <th>Student Id</th> <th>Student Name</th> <th>Course</th> <! <select class="form-control" name='Year Level' required> <option> THIRD YEAR</option> <option> ALL</option> <option> FIRST YEAR</option> <option> SECOND YEAR</option> <option> FOURTH YEAR</option> </select> </th> <th colspan="2">Action</th> </tr> <?php // fetch the records in tbl_enrollment $result = $this->enrollment->getStud($param); foreach($result as $info) { extract($info); $stud_info = $this->party->getStudInfo($partyid); $course = $this->course->getCourse($coursemajor); ?> <tr> <td><?php echo $stud_info['legacyid']; ?></td> <td><?php echo $stud_info['lastname'] . ' , ' . $stud_info['firstname'] ?></td> <td><?php echo $course; ?></td> <!--<td></td>--> <td> <?php if($stud_info['status'] != 'C'){ ?> <a class="a-table label label-info" href="/rgstr_build/<?php echo $stud_info['legacyid'];?>">View Records <span class="glyphicon glyphicon-file"></span></a> <?php } ?> </td> </tr> <?php } ?> </table>
package org.eclipse.bpel4chor.model.pbd; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Query</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.eclipse.bpel4chor.model.pbd.Query#getQueryLanguage <em>Query Language</em>}</li> * <li>{@link org.eclipse.bpel4chor.model.pbd.Query#getOpaque <em>Opaque</em>}</li> * <li>{@link org.eclipse.bpel4chor.model.pbd.Query#getValue <em>Value</em>}</li> * </ul> * </p> * * @see org.eclipse.bpel4chor.model.pbd.PbdPackage#getQuery() * @model * @generated */ public interface Query extends ExtensibleElements { /** * Returns the value of the '<em><b>Query Language</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Query Language</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Query Language</em>' attribute. * @see #setQueryLanguage(String) * @see org.eclipse.bpel4chor.model.pbd.PbdPackage#<API key>() * @model * @generated */ String getQueryLanguage(); /** * Sets the value of the '{@link org.eclipse.bpel4chor.model.pbd.Query#getQueryLanguage <em>Query Language</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Query Language</em>' attribute. * @see #getQueryLanguage() * @generated */ void setQueryLanguage(String value); /** * Returns the value of the '<em><b>Opaque</b></em>' attribute. * The literals are from the enumeration {@link org.eclipse.bpel4chor.model.pbd.OpaqueBoolean}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Opaque</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Opaque</em>' attribute. * @see org.eclipse.bpel4chor.model.pbd.OpaqueBoolean * @see #setOpaque(OpaqueBoolean) * @see org.eclipse.bpel4chor.model.pbd.PbdPackage#getQuery_Opaque() * @model * @generated */ OpaqueBoolean getOpaque(); /** * Sets the value of the '{@link org.eclipse.bpel4chor.model.pbd.Query#getOpaque <em>Opaque</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Opaque</em>' attribute. * @see org.eclipse.bpel4chor.model.pbd.OpaqueBoolean * @see #getOpaque() * @generated */ void setOpaque(OpaqueBoolean value); /** * Returns the value of the '<em><b>Value</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Value</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Value</em>' attribute. * @see #setValue(String) * @see org.eclipse.bpel4chor.model.pbd.PbdPackage#getQuery_Value() * @model * @generated */ String getValue(); /** * Sets the value of the '{@link org.eclipse.bpel4chor.model.pbd.Query#getValue <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Value</em>' attribute. * @see #getValue() * @generated */ void setValue(String value); } // Query
// <API key>.h // SessionMEventsKit #ifndef <API key> #define <API key> #import "SMEventBuilder.h" #import "SMActivityEvent.h" <API key> /*! @class <API key> @abstract Class used for building <code>SMActivityEvent</code> objects that represent a basic activity event performed by the user to make progress towards completing an <API key> campaign. */ @interface <API key> : SMEventBuilder /*! @abstract Generates an activity event based on the builder's current configuration. @result The generated <code>SMActivityEvent</code> object. */ - (SMActivityEvent *)build; @end <API key> #endif /* <API key> */
import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextPane; import java.awt.SystemColor; /** * The GUIError object is used to show an error message if the Path of Exile API is not responding. * * @author Joschn */ public class GUIError{ private JFrame windowError; private JButton buttonRetry; private volatile boolean buttonPressed = false; private ButtonRetryListener buttonRetryListener = new ButtonRetryListener(); private String errorMessage = "Error! Path of Exile's API is not responding! Servers are probably down! Check www.pathofexile.com"; private String version = "2.7"; /** * Constructor for the GUIError object. */ public GUIError(){ initialize(); } /** * Initializes the GUI. */ private void initialize(){ Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); // error window windowError = new JFrame(); windowError.setBounds(100, 100, 300, 145); windowError.setLocation(dim.width/2-windowError.getSize().width/2, dim.height/2-windowError.getSize().height/2); windowError.setResizable(false); windowError.setTitle("Ladder Tracker v" + version); windowError.setIconImage(new ImageIcon(getClass().getResource("icon.png")).getImage()); windowError.<API key>(JFrame.EXIT_ON_CLOSE); windowError.getContentPane().setLayout(null); // button retry buttonRetry = new JButton("Retry"); buttonRetry.setBounds(10, 80, 274, 23); buttonRetry.addActionListener(buttonRetryListener); windowError.getContentPane().add(buttonRetry); // error text JTextPane textError = new JTextPane(); textError.setText(errorMessage); textError.setEditable(false); textError.setBackground(SystemColor.menu); textError.setBounds(10, 21, 274, 39); windowError.getContentPane().add(textError); } /** * Shows the error GUI and waits for the retry button to be pressed. */ public void show(){ windowError.setVisible(true); while(!buttonPressed){} windowError.dispose(); } /** * The definition of the action listener for the retry button. * * @author Joschn */ private class ButtonRetryListener implements ActionListener{ public void actionPerformed(ActionEvent e){ buttonPressed = true; } } }
import { GraphQLError } from '../../error/GraphQLError'; import type { <API key>, SchemaExtensionNode, } from '../../language/ast'; import type { ASTVisitor } from '../../language/visitor'; import type { <API key> } from '../ValidationContext'; /** * Unique operation types * * A GraphQL document is only valid if it has only one type per operation. */ export function <API key>( context: <API key>, ): ASTVisitor { const schema = context.getSchema(); const <API key> = Object.create(null); const <API key> = schema ? { query: schema.getQueryType(), mutation: schema.getMutationType(), subscription: schema.getSubscriptionType(), } : {}; return { SchemaDefinition: checkOperationTypes, SchemaExtension: checkOperationTypes, }; function checkOperationTypes( node: <API key> | SchemaExtensionNode, ) { /* c8 ignore next */ const operationTypesNodes = node.operationTypes ?? []; for (const operationType of operationTypesNodes) { const operation = operationType.operation; const <API key> = <API key>[operation]; if (<API key>[operation]) { context.reportError( new GraphQLError( `Type for ${operation} already defined in the schema. It cannot be redefined.`, operationType, ), ); } else if (<API key>) { context.reportError( new GraphQLError( `There can be only one ${operation} type in schema.`, [<API key>, operationType], ), ); } else { <API key>[operation] = operationType; } } return false; } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml; using Windows.UI.Xaml.Data; namespace Podcasts.Converters { public class <API key> : TypedConverter<TimeSpan?, string> { public override string Convert(TimeSpan? duration, object parameter, string language) { if (!duration.HasValue) { return " } else if (duration.Value.TotalHours >= 1.0) { return duration?.ToString(@"h\:mm\:ss"); } else { return duration?.ToString(@"m\:ss"); } } public override TimeSpan? ConvertBack(string value, object parameter, string language) { throw new <API key>(); } } }
include(Util) once() include (Plugins) if (ANDROID) set (Android_List_dir ${<API key>}) if (NOT ANDROID_SDK) MESSAGE(SEND_ERROR "No ANDROID_SDK location provided!") endif() MESSAGE(STATUS "Targeting Android-SDK version: ${<API key>}") file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/gradle) if (CMAKE_HOST_WIN32) add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/gradle/gradlew COMMAND gradle wrapper --gradle-version=4.10.2 --distribution-type=all COMMAND gradle --stop WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/gradle) else() add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/gradle/gradlew COMMAND gradle wrapper --gradle-version=4.10.2 --distribution-type=all WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/gradle) endif() add_custom_target(gradlew DEPENDS ${CMAKE_BINARY_DIR}/gradle/gradlew) macro(<API key> target) set(target ${target}) string(REGEX REPLACE "\\\\" "\\\\\\\\" ANDROID_SDK_ESCAPED "${ANDROID_SDK}") configure_file(${Android_List_dir}/android/build.gradle.in build.gradle @ONLY) configure_file(${Android_List_dir}/android/local.properties.in local.properties @ONLY) configure_file(${Android_List_dir}/android/AndroidManifest.xml.in AndroidManifest.xml.in @ONLY) file(GENERATE OUTPUT AndroidManifest.xml INPUT ${<API key>}/AndroidManifest.xml.in) #configure_file(${Android_List_dir}/android/launch.vs.json.in ${CMAKE_SOURCE_DIR}/.vs/launch.vs.json @ONLY) #configure_file(${Android_List_dir}/android/debug_apk.bat.in debug_${target}_apk.bat @ONLY) #configure_file(${Android_List_dir}/android/launch_apk.sh.in launch_${target}_apk.sh @ONLY) #configure_file(${Android_List_dir}/android/gdbcommands.in gdbcommands_${target}_apk @ONLY) #configure_file(${Android_List_dir}/android/launch_jdb.bat.in launch_jdb.bat @ONLY) add_library(${target} SHARED ${ARGN}) if (NOT <API key>) <API key>(${target}) endif() add_executable(${target}_apk android/dummy.cpp) <API key>(${target}_apk PRIVATE ${target}) if (CMAKE_HOST_WIN32) add_custom_command( TARGET ${target} POST_BUILD COMMAND ${CMAKE_BINARY_DIR}/gradle/gradlew assembleDebug COMMAND ${CMAKE_BINARY_DIR}/gradle/gradlew --stop COMMENT "Build APK - ${target}" BYPRODUCTS apk/${target}-debug.apk ) else() add_custom_command( TARGET ${target} POST_BUILD COMMAND ${CMAKE_BINARY_DIR}/gradle/gradlew assembleDebug COMMENT "Build APK - ${target}" BYPRODUCTS apk/${target}-debug.apk ) endif() add_dependencies(${target} gradlew) endmacro(<API key>) endif()
// JJProductCell.h // Footprints #import <UIKit/UIKit.h> typedef void(^ExchangeBlock)(GiftProductModel *model); @interface JJProductCell : UITableViewCell @property (weak, nonatomic) IBOutlet UIView *realCotent; @property (weak, nonatomic) IBOutlet UILabel *nameLabel; @property (weak, nonatomic) IBOutlet UILabel *jifenLabel; @property (weak, nonatomic) IBOutlet UIImageView *avatarLabel; @property (weak, nonatomic) IBOutlet UIButton *exchangeBtn; @property (nonatomic,strong) GiftProductModel *model; @property (nonatomic,strong) ExchangeBlock exChangeBlock; @property (weak, nonatomic) IBOutlet UILabel *countLabel; - (IBAction)exchangeBtnDidTap:(id)sender; @end
import ApiClient from '../ApiClient'; import <API key> from './<API key>'; /** * The PipelineRunNode model module. * @module model/PipelineRunNode * @version 1.1.2-pre.0 */ class PipelineRunNode { /** * Constructs a new <code>PipelineRunNode</code>. * @alias module:model/PipelineRunNode */ constructor() { PipelineRunNode.initialize(this); } /** * Initializes the fields of this object. * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ static initialize(obj) { } /** * Constructs a <code>PipelineRunNode</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/PipelineRunNode} obj Optional instance to populate. * @return {module:model/PipelineRunNode} The populated <code>PipelineRunNode</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new PipelineRunNode(); if (data.hasOwnProperty('_class')) { obj['_class'] = ApiClient.convertToType(data['_class'], 'String'); } if (data.hasOwnProperty('displayName')) { obj['displayName'] = ApiClient.convertToType(data['displayName'], 'String'); } if (data.hasOwnProperty('durationInMillis')) { obj['durationInMillis'] = ApiClient.convertToType(data['durationInMillis'], 'Number'); } if (data.hasOwnProperty('edges')) { obj['edges'] = ApiClient.convertToType(data['edges'], [<API key>]); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'String'); } if (data.hasOwnProperty('result')) { obj['result'] = ApiClient.convertToType(data['result'], 'String'); } if (data.hasOwnProperty('startTime')) { obj['startTime'] = ApiClient.convertToType(data['startTime'], 'String'); } if (data.hasOwnProperty('state')) { obj['state'] = ApiClient.convertToType(data['state'], 'String'); } } return obj; } } /** * @member {String} _class */ PipelineRunNode.prototype['_class'] = undefined; /** * @member {String} displayName */ PipelineRunNode.prototype['displayName'] = undefined; /** * @member {Number} durationInMillis */ PipelineRunNode.prototype['durationInMillis'] = undefined; /** * @member {Array.<module:model/<API key>>} edges */ PipelineRunNode.prototype['edges'] = undefined; /** * @member {String} id */ PipelineRunNode.prototype['id'] = undefined; /** * @member {String} result */ PipelineRunNode.prototype['result'] = undefined; /** * @member {String} startTime */ PipelineRunNode.prototype['startTime'] = undefined; /** * @member {String} state */ PipelineRunNode.prototype['state'] = undefined; export default PipelineRunNode;
package com.lamost.update; import java.io.IOException; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.<API key>; import org.ksoap2.transport.HttpTransportSE; import org.xmlpull.v1.<API key>; import android.util.Log; public class UpdateWebService { private static final String TAG = "WebService"; private final static String SERVICE_NS = "http://ws.smarthome.zfznjj.com/"; private final static String SERVICE_URL = "http://101.201.211.87:8080/zfzn02/services/smarthome?wsdl=SmarthomeWs.wsdl"; // SOAP Action private static String soapAction = ""; private static String methodName = ""; private HttpTransportSE ht; private <API key> envelope; private SoapObject soapObject; private SoapObject result; public UpdateWebService() { ht = new HttpTransportSE(SERVICE_URL); ht.debug = true; } public String getAppVersionVoice(String appName) { ht = new HttpTransportSE(SERVICE_URL); ht.debug = true; methodName = "getAppVersionVoice"; soapAction = SERVICE_NS + methodName; // SOAP1.1Envelop envelope = new <API key>(SoapEnvelope.VER11); // SoapObject soapObject = new SoapObject(SERVICE_NS, methodName); // soapObject SoapSerializationEnvelopeSOAP envelope.bodyOut = soapObject; envelope.dotNet = true; envelope.setOutputSoapObject(soapObject); soapObject.addProperty("appName", appName); try { // System.out.println("1"); ht.call(soapAction, envelope); // System.out.println("2"); if (envelope != null && envelope.getResponse() != null) { // SOAP // System.out.println("3"); result = (SoapObject) envelope.bodyIn; // SoapObject // System.out.println("4"); String flag = result.getProperty(0).toString(); Log.e(TAG, "*********Webservice <API key> " + flag); return flag; } } catch (IOException e) { e.printStackTrace(); } catch (<API key> e) { e.printStackTrace(); } finally { resetParam(); } return -1 + ""; } private void resetParam() { envelope = null; soapObject = null; result = null; } }
<?php namespace gries\Pokemath\Numbers; use gries\Pokemath\PokeNumber; class Mienshao extends PokeNumber { public function __construct() { parent::__construct('mienshao'); } }
Blog Powered by Jekyll | Theme H2O
<API key> ====================== a minimal eclipse rcp example for integrating caleydo gl elements into a view
<?php namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class ShippingMethodMini extends RecurlyResource { private $_code; private $_id; private $_name; private $_object; protected static $array_hints = [ ]; /** * Getter method for the code attribute. * The internal name used identify the shipping method. * * @return ?string */ public function getCode(): ?string { return $this->_code; } /** * Setter method for the code attribute. * * @param string $code * * @return void */ public function setCode(string $code): void { $this->_code = $code; } /** * Getter method for the id attribute. * Shipping Method ID * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the name attribute. * The name of the shipping method displayed to customers. * * @return ?string */ public function getName(): ?string { return $this->_name; } /** * Setter method for the name attribute. * * @param string $name * * @return void */ public function setName(string $name): void { $this->_name = $name; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } }
<!-- content start --> <div class="admin-content" style="min-height:450px"> <div class="am-cf am-padding"> <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg"></strong></div> </div> <div class="am-g"> <div class="am-u-sm-12 am-u-md-6">&nbsp;</div> <form method="post" action="{{site_url url='cw_brokerage/list_brokerage'}}" class="search_form"> <div class="am-u-sm-12 am-u-md-3"> <div class="am-input-group am-input-group-sm"> <select data-am-selected="{btnWidth: '120', btnSize: 'sm', btnStyle: 'default'}" name="house_id"> <option value="0">- () -</option> {{foreach from=$houses item=item}} <option value="{{$item.id}}" {{if $item.id == $data.house_id}}selected{{/if}}>{{$item.name}}</option> {{/foreach}} </select> </div> </div> <div class="am-u-sm-12 am-u-md-3"> <div class="am-input-group am-input-group-sm"> <input type="text" class="am-form-field" name="uname" value="{{$data.uname}}"> <span class="am-input-group-btn"> <input type="submit" class="am-btn am-btn-default" value="" /> </span> </div> </div> </form> </div> <div class="am-g"> <div class="am-u-sm-12"> <table class="am-table am-table-striped am-table-hover table-main"> <thead> <tr> <th class="table-id">ID</th> <th class="table-title"></th> <th class="table-title"></th> <th class="table-title"></th> <th class="table-title"></th> <th class="table-title"></th> <th class="table-title"></th> <th class="table-title"></th> <th class="table-title"></th> <th class="table-set"></th> </tr> </thead> <tbody> {{foreach from=$data.items key=key item=item}} <tr> <td>{{$item.id}}</td> <td>{{$item.customer}}</td> <td>{{$item.phone}}</td> <td>{{$item.name}}</td> <td>{{$item.house_no}}</td> <td>{{$item.acreage}}</td> <td>{{$item.total_price}}</td> <td>{{$item.rel_name}}</td> <td class="am-hide-sm-only">{{$item.date}}</td> <td> <div class="am-btn-toolbar"> <div class="am-btn-group am-btn-group-xs"> <button class="am-btn am-btn-default am-btn-xs am-text-secondary" onclick="javascript:location.href='{{site_url url='cw_brokerage/view_brokerage'}}/{{$item.id}}';"><span class="<API key>"></span> </button> </div> </div> </td> </tr> {{/foreach}} </tbody> </table> <div class="am-cf">{{$pager}}</div> </div> </div> </div> <!-- content end -->
class Client { constructor(http_client){ this.http_client = http_client this.method_list = [] } xyz() { return this.http_client } } function chainable_client () { HttpClient = require('./http_client.js') http_client = new HttpClient(arguments[0]) chainable_method = require('./chainable_method.js') return chainable_method(new Client(http_client), true) } module.exports = chainable_client
<div class="<API key>" id="<API key>"><br/><div style="border:solid 1px #DEDEDE;background:#E2E0E0; color:#222222;padding:4px;">Check if a template has related data</div><br/><br/><span style="color:#EA33A6">Arguments</span><br/><span style="font-size:80%"><b>id</b> (Required)<br/>        The template id<br/><br/><div><div style="border:solid 1px #DEDEDE;background:#FFF1BC;color:#222222;padding:4px;"><pre><b>General structure</b><br/> int <span style="color:#2A33A6"> <i>//The template id</i></span><br/> </pre></div></div><div><div style="border:solid 1px #DEDEDE;background:#DFEEE7;color:#222222;padding:4px;"><pre><b>XML-RPC (PHP structure)</b><br/> [id] =&gt; int </pre></div></div><div><div style="border:solid 1px #DEDEDE;background:#FEEBE5;color:#222222;padding:4px;"><pre><b>REST (POST parameters)</b><br/> id= int </pre></div></div></span><br/><br/><span style="color:#EA33A6">Response</span><br/><span style="font-size:80%">True if the template has related data<br/><br/><div><div style="border:solid 1px #DEDEDE;background:#FFF1BC;color:#222222;padding:4px;"><pre><b>General structure</b><br/> int <span style="color:#2A33A6"> <i>//True if the template has related data</i></span><br/> </pre></div></div><div><div style="border:solid 1px #DEDEDE;background:#DFEEE7;color:#222222;padding:4px;"><pre><b>XML-RPC (PHP structure)</b><br/> int </pre></div></div><div><div style="border:solid 1px #DEDEDE;background:#FEEBE5;color:#222222;padding:4px;"><pre><b>REST</b><br/> &lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;RESPONSE&gt; &lt;VALUE&gt;int&lt;/VALUE&gt; &lt;/RESPONSE&gt; </pre></div></div></span><br/><br/><span style="color:#EA33A6">Error message</span><br/><br/><span style="font-size:80%"><div><div style="border:solid 1px #DEDEDE;background:#FEEBE5;color:#222222;padding:4px;"><pre><b>REST</b><br/> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;EXCEPTION class="<API key>"&gt; &lt;MESSAGE&gt;Invalid parameter value detected&lt;/MESSAGE&gt; &lt;DEBUGINFO&gt;&lt;/DEBUGINFO&gt; &lt;/EXCEPTION&gt; </pre></div></div></span><br/><br/><span style="color:#EA33A6">Restricted to logged-in users<br/></span>Yes<br/><br/><span style="color:#EA33A6">Callable from AJAX<br/></span>Yes<br/><br/></div>
<table width="90%" border="0"><tr><td><script>function openfile(url) {fullwin = window.open(url, "fulltext", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}</script><div class="flayoutclass"><div class="flayoutclass_first"><table class="tableoutfmt2"><tr><th class="std1"><b>&nbsp;</b></th><td class="std2"></td></tr> <tr><th class="std1"><b>&nbsp;</b></th><td class="std2"><sup class="subfont">ˇ</sup><sup class="subfont">ˋ</sup></td></tr> <tr><th class="std1"><b>&nbsp;</b></th><td class="std2"><font class="english_word">ruǎn yìng jiān shī</font></td></tr> <tr><th class="std1"><b>&nbsp;</b></th><td class="std2"><img src=/cydic/dicword/fa40.gif border=0 alt=* class=fontimg valign=center><img src=/cydic/dicword/fa41.gif border=0 alt=* class=fontimg valign=center></td></tr> <tr><th class="std1"><b><font class="fltypefont"></font>&nbsp;</b></th><td class="std2"></td></tr> </td></tr></table></div> <!-- flayoutclass_first --><div class="flayoutclass_second"></div> <!-- flayoutclass_second --></div> <!-- flayoutclass --></td></tr></table>
import boto import mock import moto import tempfile import unittest from click.testing import CliRunner from rubberjackcli.click import rubberjack class CLITests(unittest.TestCase): @moto.mock_s3_deprecated @mock.patch('boto.beanstalk.layer1.Layer1.<API key>') @mock.patch('boto.beanstalk.layer1.Layer1.update_environment') def test_deploy(self, cav, ue): s3 = boto.connect_s3() s3.create_bucket("<API key>") # FIXME Remove hardcoded bucket name with tempfile.NamedTemporaryFile() as tmp: result = CliRunner().invoke(rubberjack, ['deploy', tmp.name], catch_exceptions=False) self.assertEquals(result.exit_code, 0, result.output) @moto.mock_s3_deprecated @mock.patch('boto.beanstalk.layer1.Layer1.<API key>') @mock.patch('boto.beanstalk.layer1.Layer1.update_environment') def test_promote(self, ue, de): de.return_value = { '<API key>': { '<API key>': { 'Environments': [ { 'EnvironmentName': '<API key>', # FIXME Remove hardcoded EnvName 'VersionLabel': 'old', }, { 'EnvironmentName': '<API key>', # FIXME Remove hardcoded EnvName 'VersionLabel': 'new', }, ], }, }, } CliRunner().invoke(rubberjack, ['promote'], catch_exceptions=False) @moto.mock_s3_deprecated @mock.patch('sys.exit') @mock.patch('boto.beanstalk.layer1.Layer1.<API key>') @mock.patch('boto.beanstalk.layer1.Layer1.update_environment') def <API key>(self, ue, de, se): de.return_value = { '<API key>': { '<API key>': { 'Environments': [ { 'EnvironmentName': '<API key>', # FIXME Remove hardcoded EnvName 'VersionLabel': 'same', }, { 'EnvironmentName': '<API key>', # FIXME Remove hardcoded EnvName 'VersionLabel': 'same', }, ], }, }, } CliRunner().invoke(rubberjack, ['promote'], catch_exceptions=False) self.assertTrue(se.called) @moto.mock_s3_deprecated def test_sigv4(self): CliRunner().invoke(rubberjack, ['--sigv4-host', 'foo', 'deploy'], catch_exceptions=False) @moto.mock_s3_deprecated @mock.patch('boto.beanstalk.layer1.Layer1.<API key>') @mock.patch('boto.beanstalk.layer1.Layer1.update_environment') def <API key>(self, ue, cav): s3 = boto.connect_s3() s3.create_bucket("<API key>") # FIXME Remove hardcoded bucket name with tempfile.NamedTemporaryFile() as tmp: result = CliRunner().invoke(rubberjack, ['deploy', '--environment', 'wibble', tmp.name], catch_exceptions=False) self.assertEquals(result.exit_code, 0, result.output) self.assertEqual(cav.call_count, 1, "<API key> wasn't called, but it should") self.assertEqual(ue.call_count, 1, "update_environment wasn't called, but it should") @moto.mock_s3_deprecated @mock.patch('boto.beanstalk.layer1.Layer1.<API key>') @mock.patch('boto.beanstalk.layer1.Layer1.update_environment') def <API key>(self, ue, cav): s3 = boto.connect_s3() s3.create_bucket("<API key>") # FIXME Remove hardcoded bucket name with tempfile.NamedTemporaryFile() as tmp: result = CliRunner().invoke(rubberjack, ['deploy', '--<API key>', tmp.name], catch_exceptions=False) self.assertEquals(result.exit_code, 0, result.output) self.assertEqual(cav.call_count, 1, "<API key> wasn't called, but it should") self.assertEqual(ue.call_count, 0, "update_environment was called, but it shouldn't") @moto.mock_s3_deprecated @mock.patch('boto.beanstalk.layer1.Layer1.<API key>') @mock.patch('boto.beanstalk.layer1.Layer1.update_environment') def <API key>(self, ue, cav): bucket_name = 'rbbrjck-test' s3 = boto.connect_s3() s3.create_bucket(bucket_name) with tempfile.NamedTemporaryFile() as tmp: result = CliRunner().invoke(rubberjack, ['--bucket', bucket_name, 'deploy', tmp.name], catch_exceptions=False) self.assertEquals(result.exit_code, 0, result.output) self.assertEqual(cav.call_count, 1, "<API key> wasn't called, but it should") self.assertEqual(ue.call_count, 1, "update_environment wasn't called, but it should") _, cav_kwargs = cav.call_args self.assertEqual(bucket_name, cav_kwargs['s3_bucket']) @moto.mock_s3_deprecated @mock.patch('boto.beanstalk.layer1.Layer1.update_environment') @mock.patch('boto.beanstalk.layer1.Layer1.<API key>') def <API key>(self, de, ue): <API key> = "loremipsum" de.return_value = { '<API key>': { '<API key>': { 'Environments': [ { 'EnvironmentName': <API key>, 'VersionLabel': 'old', }, { 'EnvironmentName': '<API key>', # FIXME Remove hardcoded EnvName 'VersionLabel': 'new', }, ], }, }, } result = CliRunner().invoke(rubberjack, ['promote', '--to-environment', <API key>], catch_exceptions=False) self.assertEquals(result.exit_code, 0, result.output)
# Flask based simple API char-rnn from https://github.com/sherjilozair/char-rnn-tensorflow. ## Launch Server in Heroku * Run heroku create and push to heroku: bash cd poem-bot heroku create git push heroku master * Alternatively, click the button below: [![Deploy](https:
require 'spec_helper' describe Blockhead::Extractors::Value, '#valid?' do it 'returns true' do extractor = Blockhead::Extractors::Value.new('test', nil, nil) expect(extractor).to be_valid end end describe Blockhead::Extractors::Value, '#extract_value' do it 'returns @value unmolested' do extractor = Blockhead::Extractors::Value.new('test', nil, nil) expect(extractor.extract_value).to eq 'test' end it 'cleans up strings when passed with: :pretty_print' do extractor = Blockhead::Extractors::Value.new( "This is Crazy \n", { with: :pretty_print }, nil ) expect(extractor.extract_value).to eq 'This Is Crazy' end end
<?php class UploadHandler { protected $options; // PHP File Upload error message codes: protected $error_messages = array( 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini', 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', 3 => 'The uploaded file was only partially uploaded', 4 => 'No file was uploaded', 6 => 'Missing a temporary folder', 7 => 'Failed to write file to disk', 8 => 'A PHP extension stopped the file upload', 'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini', 'max_file_size' => 'File is too big', 'min_file_size' => 'File is too small', 'accept_file_types' => 'Filetype not allowed', 'max_number_of_files' => 'Maximum number of files exceeded', 'max_width' => 'Image exceeds maximum width', 'min_width' => 'Image requires a minimum width', 'max_height' => 'Image exceeds maximum height', 'min_height' => 'Image requires a minimum height' ); function __construct($options = null, $initialize = true) { $this->options = array( 'script_url' => $this->get_full_url().'/', 'upload_dir' => dirname($_SERVER['SCRIPT_FILENAME']).'/files/', 'upload_url' => $this->get_full_url().'/files/', 'user_dirs' => false, 'mkdir_mode' => 0755, 'param_name' => 'files', // Set the following option to 'POST', if your server does not support // DELETE requests. This is a parameter sent to the client: 'delete_type' => 'DELETE', '<API key>' => '*', '<API key>' => false, '<API key>' => array( 'OPTIONS', 'HEAD', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE' ), '<API key>' => array( 'Content-Type', 'Content-Range', 'Content-Disposition' ), // Enable to provide file downloads via GET requests to the PHP script: 'download_via_php' => false, // Defines which files can be displayed inline when downloaded: 'inline_file_types' => '/\.(gif|jpe?g|png)$/i', // Defines which files (based on their names) are accepted for upload: 'accept_file_types' => '/.+$/i', // The php.ini settings upload_max_filesize and post_max_size // take precedence over the following max_file_size setting: 'max_file_size' => null, 'min_file_size' => 1, // The maximum number of files for the upload directory: 'max_number_of_files' => null, // Image resolution restrictions: 'max_width' => null, 'max_height' => null, 'min_width' => 1, 'min_height' => 1, // Set the following option to false to enable resumable uploads: '<API key>' => true, // Set to true to rotate images based on EXIF meta data, if available: 'orient_image' => false, 'image_versions' => array( // Uncomment the following version to restrict the size of // uploaded images: /* '' => array( 'max_width' => 1920, 'max_height' => 1200, 'jpeg_quality' => 95 ), */ // Uncomment the following to create medium sized images: /* 'medium' => array( 'max_width' => 800, 'max_height' => 600, 'jpeg_quality' => 80 ), */ 'thumbnail' => array( 'max_width' => 80, 'max_height' => 80 ) ) ); if ($options) { $this->options = array_merge($this->options, $options); } if ($initialize) { $this->initialize(); } } protected function initialize() { switch ($_SERVER['REQUEST_METHOD']) { case 'OPTIONS': case 'HEAD': $this->head(); break; case 'GET': $this->get(); break; case 'PATCH': case 'PUT': case 'POST': $this->post(); break; case 'DELETE': $this->delete(); break; default: $this->header('HTTP/1.1 405 Method Not Allowed'); } } protected function get_full_url() { $https = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'; return ($https ? 'https: (!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : ''). (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME']. ($https && $_SERVER['SERVER_PORT'] === 443 || $_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))). substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/')); } protected function get_user_id() { @session_start(); return session_id(); } protected function get_user_path() { if ($this->options['user_dirs']) { return $this->get_user_id().'/'; } return ''; } protected function get_upload_path($file_name = null, $version = null) { $file_name = $file_name ? $file_name : ''; $version_path = empty($version) ? '' : $version.'/'; return $this->options['upload_dir'].$this->get_user_path() .$version_path.$file_name; } protected function get_query_separator($url) { return strpos($url, '?') === false ? '?' : '&'; } protected function get_download_url($file_name, $version = null) { if ($this->options['download_via_php']) { $url = $this->options['script_url'] .$this->get_query_separator($this->options['script_url']) .'file='.rawurlencode($file_name); if ($version) { $url .= '&version='.rawurlencode($version); } return $url.'&download=1'; } $version_path = empty($version) ? '' : rawurlencode($version).'/'; return $this->options['upload_url'].$this->get_user_path() .$version_path.rawurlencode($file_name); } protected function <API key>($file) { $file->delete_url = $this->options['script_url'] .$this->get_query_separator($this->options['script_url']) .'file='.rawurlencode($file->name); $file->delete_type = $this->options['delete_type']; if ($file->delete_type !== 'DELETE') { $file->delete_url .= '&_method=DELETE'; } if ($this->options['<API key>']) { $file-><API key> = true; } } // Fix for overflowing signed 32 bit integers, // works for sizes up to 2^32-1 bytes (4 GiB - 1): protected function <API key>($size) { if ($size < 0) { $size += 2.0 * (PHP_INT_MAX + 1); } return $size; } protected function get_file_size($file_path, $clear_stat_cache = false) { if ($clear_stat_cache) { clearstatcache(true, $file_path); } return $this-><API key>(filesize($file_path)); } protected function <API key>($file_name) { $file_path = $this->get_upload_path($file_name); if (is_file($file_path) && $file_name[0] !== '.') { return true; } return false; } protected function get_file_object($file_name) { if ($this-><API key>($file_name)) { $file = new stdClass(); $file->name = $file_name; $file->size = $this->get_file_size( $this->get_upload_path($file_name) ); $file->url = $this->get_download_url($file->name); foreach($this->options['image_versions'] as $version => $options) { if (!empty($version)) { if (is_file($this->get_upload_path($file_name, $version))) { $file->{$version.'_url'} = $this->get_download_url( $file->name, $version ); } } } $this-><API key>($file); return $file; } return null; } protected function get_file_objects($iteration_method = 'get_file_object') { $upload_dir = $this->get_upload_path(); if (!is_dir($upload_dir)) { return array(); } return array_values(array_filter(array_map( array($this, $iteration_method), scandir($upload_dir) ))); } protected function count_file_objects() { return count($this->get_file_objects('<API key>')); } protected function create_scaled_image($file_name, $version, $options) { $file_path = $this->get_upload_path($file_name); if (!empty($version)) { $version_dir = $this->get_upload_path(null, $version); if (!is_dir($version_dir)) { mkdir($version_dir, $this->options['mkdir_mode'], true); } $new_file_path = $version_dir.'/'.$file_name; } else { $new_file_path = $file_path; } list($img_width, $img_height) = @getimagesize($file_path); if (!$img_width || !$img_height) { return false; } $scale = min( $options['max_width'] / $img_width, $options['max_height'] / $img_height ); if ($scale >= 1) { if ($file_path !== $new_file_path) { return copy($file_path, $new_file_path); } return true; } $new_width = $img_width * $scale; $new_height = $img_height * $scale; $new_img = @<API key>($new_width, $new_height); switch (strtolower(substr(strrchr($file_name, '.'), 1))) { case 'jpg': case 'jpeg': $src_img = @imagecreatefromjpeg($file_path); $write_image = 'imagejpeg'; $image_quality = isset($options['jpeg_quality']) ? $options['jpeg_quality'] : 75; break; case 'gif': @<API key>($new_img, @imagecolorallocate($new_img, 0, 0, 0)); $src_img = @imagecreatefromgif($file_path); $write_image = 'imagegif'; $image_quality = null; break; case 'png': @<API key>($new_img, @imagecolorallocate($new_img, 0, 0, 0)); @imagealphablending($new_img, false); @imagesavealpha($new_img, true); $src_img = @imagecreatefrompng($file_path); $write_image = 'imagepng'; $image_quality = isset($options['png_quality']) ? $options['png_quality'] : 9; break; default: $src_img = null; } $success = $src_img && @imagecopyresampled( $new_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, $img_width, $img_height ) && $write_image($new_img, $new_file_path, $image_quality); // Free up memory (imagedestroy does not delete files): @imagedestroy($src_img); @imagedestroy($new_img); return $success; } protected function get_error_message($error) { return array_key_exists($error, $this->error_messages) ? $this->error_messages[$error] : $error; } function get_config_bytes($val) { $val = trim($val); $last = strtolower($val[strlen($val)-1]); switch($last) { case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; } return $this-><API key>($val); } protected function validate($uploaded_file, $file, $error, $index) { if ($error) { $file->error = $this->get_error_message($error); return false; } $content_length = $this-><API key>(intval($_SERVER['CONTENT_LENGTH'])); if ($content_length > $this->get_config_bytes(ini_get('post_max_size'))) { $file->error = $this->get_error_message('post_max_size'); return false; } if (!preg_match($this->options['accept_file_types'], $file->name)) { $file->error = $this->get_error_message('accept_file_types'); return false; } if ($uploaded_file && is_uploaded_file($uploaded_file)) { $file_size = $this->get_file_size($uploaded_file); } else { $file_size = $content_length; } if ($this->options['max_file_size'] && ( $file_size > $this->options['max_file_size'] || $file->size > $this->options['max_file_size']) ) { $file->error = $this->get_error_message('max_file_size'); return false; } if ($this->options['min_file_size'] && $file_size < $this->options['min_file_size']) { $file->error = $this->get_error_message('min_file_size'); return false; } if (is_int($this->options['max_number_of_files']) && ( $this->count_file_objects() >= $this->options['max_number_of_files']) ) { $file->error = $this->get_error_message('max_number_of_files'); return false; } list($img_width, $img_height) = @getimagesize($uploaded_file); if (is_int($img_width)) { if ($this->options['max_width'] && $img_width > $this->options['max_width']) { $file->error = $this->get_error_message('max_width'); return false; } if ($this->options['max_height'] && $img_height > $this->options['max_height']) { $file->error = $this->get_error_message('max_height'); return false; } if ($this->options['min_width'] && $img_width < $this->options['min_width']) { $file->error = $this->get_error_message('min_width'); return false; } if ($this->options['min_height'] && $img_height < $this->options['min_height']) { $file->error = $this->get_error_message('min_height'); return false; } } return true; } protected function <API key>($matches) { $index = isset($matches[1]) ? intval($matches[1]) + 1 : 1; $ext = isset($matches[2]) ? $matches[2] : ''; return ' ('.$index.')'.$ext; } protected function upcount_name($name) { return <API key>( '/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/', array($this, '<API key>'), $name, 1 ); } protected function get_unique_filename($name, $type, $index, $content_range) { while(is_dir($this->get_upload_path($name))) { $name = $this->upcount_name($name); } // Keep an existing filename if this is part of a chunked upload: $uploaded_bytes = $this-><API key>(intval($content_range[1])); while(is_file($this->get_upload_path($name))) { if ($uploaded_bytes === $this->get_file_size( $this->get_upload_path($name))) { break; } $name = $this->upcount_name($name); } return $name; } protected function trim_file_name($name, $type, $index, $content_range) { // Remove path information and dots around the filename, to prevent uploading // into different directories or replacing hidden system files. // Also remove control characters and spaces (\x00..\x20) around the filename: $name = trim(basename(stripslashes($name)), ".\x00..\x20"); // Use a timestamp for empty filenames: if (!$name) { $name = str_replace('.', '-', microtime(true)); } // Add missing file extension for known image types: if (strpos($name, '.') === false && preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) { $name .= '.'.$matches[1]; } return $name; } protected function get_file_name($name, $type, $index, $content_range) { return $this->get_unique_filename( $this->trim_file_name($name, $type, $index, $content_range), $type, $index, $content_range ); } protected function handle_form_data($file, $index) { // Handle form data, e.g. $_REQUEST['description'][$index] } protected function orient_image($file_path) { if (!function_exists('exif_read_data')) { return false; } $exif = @exif_read_data($file_path); if ($exif === false) { return false; } $orientation = intval(@$exif['Orientation']); if (!in_array($orientation, array(3, 6, 8))) { return false; } $image = @imagecreatefromjpeg($file_path); switch ($orientation) { case 3: $image = @imagerotate($image, 180, 0); break; case 6: $image = @imagerotate($image, 270, 0); break; case 8: $image = @imagerotate($image, 90, 0); break; default: return false; } $success = imagejpeg($image, $file_path); // Free up memory (imagedestroy does not delete files): @imagedestroy($image); return $success; } protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) { $file = new stdClass(); $file->name = $this->get_file_name($name, $type, $index, $content_range); $file->size = $this-><API key>(intval($size)); $file->type = $type; if ($this->validate($uploaded_file, $file, $error, $index)) { $this->handle_form_data($file, $index); $upload_dir = $this->get_upload_path(); if (!is_dir($upload_dir)) { mkdir($upload_dir, $this->options['mkdir_mode'], true); } $file_path = $this->get_upload_path($file->name); $append_file = $content_range && is_file($file_path) && $file->size > $this->get_file_size($file_path); if ($uploaded_file && is_uploaded_file($uploaded_file)) { // multipart/formdata uploads (POST method uploads) if ($append_file) { file_put_contents( $file_path, fopen($uploaded_file, 'r'), FILE_APPEND ); } else { move_uploaded_file($uploaded_file, $file_path); } } else { // Non-multipart uploads (PUT method support) file_put_contents( $file_path, fopen('php://input', 'r'), $append_file ? FILE_APPEND : 0 ); } $file_size = $this->get_file_size($file_path, $append_file); if ($file_size === $file->size) { if ($this->options['orient_image']) { $this->orient_image($file_path); } $file->url = $this->get_download_url($file->name); foreach($this->options['image_versions'] as $version => $options) { if ($this->create_scaled_image($file->name, $version, $options)) { if (!empty($version)) { $file->{$version.'_url'} = $this->get_download_url( $file->name, $version ); } else { $file_size = $this->get_file_size($file_path, true); } } } } else if (!$content_range && $this->options['<API key>']) { unlink($file_path); $file->error = 'abort'; } $file->size = $file_size; $this-><API key>($file); } return $file; } protected function readfile($file_path) { return readfile($file_path); } protected function body($str) { echo $str; } protected function header($str) { header($str); } protected function generate_response($content, $print_response = true) { if ($print_response) { $json = json_encode($content); $redirect = isset($_REQUEST['redirect']) ? stripslashes($_REQUEST['redirect']) : null; if ($redirect) { $this->header('Location: '.sprintf($redirect, rawurlencode($json))); return; } $this->head(); if (isset($_SERVER['HTTP_CONTENT_RANGE'])) { $files = isset($content[$this->options['param_name']]) ? $content[$this->options['param_name']] : null; if ($files && is_array($files) && is_object($files[0]) && $files[0]->size) { $this->header('Range: 0-'.($this-><API key>(intval($files[0]->size)) - 1)); } } $this->body($json); } return $content; } protected function get_version_param() { return isset($_GET['version']) ? basename(stripslashes($_GET['version'])) : null; } protected function get_file_name_param() { return isset($_GET['file']) ? basename(stripslashes($_GET['file'])) : null; } protected function get_file_type($file_path) { switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) { case 'jpeg': case 'jpg': return 'image/jpeg'; case 'png': return 'image/png'; case 'gif': return 'image/gif'; default: return ''; } } protected function download() { if (!$this->options['download_via_php']) { $this->header('HTTP/1.1 403 Forbidden'); return; } $file_name = $this->get_file_name_param(); if ($this-><API key>($file_name)) { $file_path = $this->get_upload_path($file_name, $this->get_version_param()); if (is_file($file_path)) { if (!preg_match($this->options['inline_file_types'], $file_name)) { $this->header('Content-Description: File Transfer'); $this->header('Content-Type: application/octet-stream'); $this->header('Content-Disposition: attachment; filename="'.$file_name.'"'); $this->header('<API key>: binary'); } else { // Prevent Internet Explorer from MIME-sniffing the content-type: $this->header('<API key>: nosniff'); $this->header('Content-Type: '.$this->get_file_type($file_path)); $this->header('Content-Disposition: inline; filename="'.$file_name.'"'); } $this->header('Content-Length: '.$this->get_file_size($file_path)); $this->header('Last-Modified: '.gmdate('D, d M Y H:i:s T', filemtime($file_path))); $this->readfile($file_path); } } } protected function <API key>() { $this->header('Vary: Accept'); if (isset($_SERVER['HTTP_ACCEPT']) && (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false)) { $this->header('Content-type: application/json'); } else { $this->header('Content-type: text/plain'); } } protected function <API key>() { $this->header('<API key>: '.$this->options['<API key>']); $this->header('<API key>: ' .($this->options['<API key>'] ? 'true' : 'false')); $this->header('<API key>: ' .implode(', ', $this->options['<API key>'])); $this->header('<API key>: ' .implode(', ', $this->options['<API key>'])); } public function head() { $this->header('Pragma: no-cache'); $this->header('Cache-Control: no-store, no-cache, must-revalidate'); $this->header('Content-Disposition: inline; filename="files.json"'); // Prevent Internet Explorer from MIME-sniffing the content-type: $this->header('<API key>: nosniff'); if ($this->options['<API key>']) { $this-><API key>(); } $this-><API key>(); } public function get($print_response = true) { if ($print_response && isset($_GET['download'])) { return $this->download(); } $file_name = $this->get_file_name_param(); if ($file_name) { $response = array( substr($this->options['param_name'], 0, -1) => $this->get_file_object($file_name) ); } else { $response = array( $this->options['param_name'] => $this->get_file_objects() ); } return $this->generate_response($response, $print_response); } public function post($print_response = true) { if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') { return $this->delete($print_response); } $upload = isset($_FILES[$this->options['param_name']]) ? $_FILES[$this->options['param_name']] : null; // Parse the Content-Disposition header, if available: $file_name = isset($_SERVER['<API key>']) ? rawurldecode(preg_replace( '/(^[^"]+")|("$)/', '', $_SERVER['<API key>'] )) : null; // Parse the Content-Range header, which has the following form: // Content-Range: bytes 0-524287/2000000 $content_range = isset($_SERVER['HTTP_CONTENT_RANGE']) ? preg_split('/[^0-9]+/', $_SERVER['HTTP_CONTENT_RANGE']) : null; $size = $content_range ? $content_range[3] : null; $files = array(); if ($upload && is_array($upload['tmp_name'])) { // param_name is an array identifier like "files[]", // $_FILES is a multi-dimensional array: foreach ($upload['tmp_name'] as $index => $value) { $files[] = $this->handle_file_upload( $upload['tmp_name'][$index], $file_name ? $file_name : $upload['name'][$index], $size ? $size : $upload['size'][$index], $upload['type'][$index], $upload['error'][$index], $index, $content_range ); } } else { // param_name is a single object identifier like "file", // $_FILES is a one-dimensional array: $files[] = $this->handle_file_upload( isset($upload['tmp_name']) ? $upload['tmp_name'] : null, $file_name ? $file_name : (isset($upload['name']) ? $upload['name'] : null), $size ? $size : (isset($upload['size']) ? $upload['size'] : $_SERVER['CONTENT_LENGTH']), isset($upload['type']) ? $upload['type'] : $_SERVER['CONTENT_TYPE'], isset($upload['error']) ? $upload['error'] : null, null, $content_range ); } return $this->generate_response( array($this->options['param_name'] => $files), $print_response ); } public function delete($print_response = true) { $file_name = $this->get_file_name_param(); $file_path = $this->get_upload_path($file_name); $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); if ($success) { foreach($this->options['image_versions'] as $version => $options) { if (!empty($version)) { $file = $this->get_upload_path($file_name, $version); if (is_file($file)) { unlink($file); } } } } return $this->generate_response(array('success' => $success), $print_response); } }
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>class RubyXL::VectorValue - rubyXL 3.4.21</title> <script type="text/javascript"> var rdoc_rel_prefix = "../"; var index_rel_prefix = "../"; </script> <script src="../js/navigation.js" defer></script> <script src="../js/search.js" defer></script> <script src="../js/search_index.js" defer></script> <script src="../js/searcher.js" defer></script> <script src="../js/darkfish.js" defer></script> <link href="../css/fonts.css" rel="stylesheet"> <link href="../css/rdoc.css" rel="stylesheet"> <body id="top" role="document" class="class"> <nav role="navigation"> <div id="project-navigation"> <div id="home-section" role="region" title="Quick navigation" class="nav-section"> <h2> <a href="../index.html" rel="home">Home</a> </h2> <div id="<API key>"> <a href="../table_of_contents.html#pages">Pages</a> <a href="../table_of_contents.html#classes">Classes</a> <a href="../table_of_contents.html#methods">Methods</a> </div> </div> <div id="search-section" role="search" class="project-section initially-hidden"> <form action="#" method="get" accept-charset="utf-8"> <div id="<API key>"> <input id="search-field" role="combobox" aria-label="Search" aria-autocomplete="list" aria-controls="search-results" type="text" name="search" placeholder="Search" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"> </div> <ul id="search-results" aria-label="Search Results" aria-busy="false" aria-expanded="false" aria-atomic="false" class="initially-hidden"></ul> </form> </div> </div> <div id="class-metadata"> <div id="<API key>" class="nav-section"> <h3>Parent</h3> <p class="link">OOXMLObject </div> </div> </nav> <main role="main" aria-labelledby="class-RubyXL::VectorValue"> <h1 id="class-RubyXL::VectorValue" class="class"> class RubyXL::VectorValue </h1> <section class="description"> </section> <section id="5Buntitled-5D" class="<API key>"> </section> </main> <footer id="validator-badges" role="contentinfo"> <p><a href="https://validator.w3.org/check/referer">Validate</a> <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0. <p>Based on <a href="http: </footer>
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.<API key>(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = require("@angular/core"); var http_1 = require("@angular/http"); var RegService = (function () { function RegService(_http) { this._http = _http; } RegService.prototype.ngOnInit = function () { }; RegService.prototype.getUsers = function () { return this._http.get('http://ankitesh.pythonanywhere.com/api/v1.0/get_books_data') .map(function (response) { return response.json(); }); }; RegService.prototype.regUser = function (User) { var payload = JSON.stringify({ payload: { "Username": User.Username, "Email_id": User.Email_id, "Password": User.Password } }); return this._http.post('http://ankitesh.pythonanywhere.com/api/v1.0/get_book_summary', payload) .map(function (response) { return response.json(); }); }; return RegService; }()); RegService = __decorate([ core_1.Injectable(), __metadata("design:paramtypes", [http_1.Http]) ], RegService); exports.RegService = RegService; //# sourceMappingURL=register.service.js.map
require File.expand_path('../../spec_helper', __FILE__) module Pod describe Command::Search do extend SpecHelper::TemporaryRepos describe 'Search' do it 'registers it self' do Command.parse(%w{ search }).should.be.instance_of Command::Search end it 'runs with correct parameters' do lambda { run_command('search', 'JSON') }.should.not.raise lambda { run_command('search', 'JSON', '--simple') }.should.not.raise end it 'complains for wrong parameters' do lambda { run_command('search') }.should.raise CLAide::Help lambda { run_command('search', 'too', '--wrong') }.should.raise CLAide::Help lambda { run_command('search', '--wrong') }.should.raise CLAide::Help end it 'searches for a pod with name matching the given query ignoring case' do output = run_command('search', 'json', '--simple') output.should.include? 'JSONKit' end it 'searches for a pod with name, summary, or description matching the given query ignoring case' do output = run_command('search', 'engelhart') output.should.include? 'JSONKit' end it 'searches for a pod with name, summary, or description matching the given multi-word query ignoring case' do output = run_command('search', 'very', 'high', 'performance') output.should.include? 'JSONKit' end it 'prints search results in order' do output = run_command('search', 'lib') output.should.match /BananaLib.*JSONKit/m end it 'restricts the search to Pods supported on iOS' do output = run_command('search', 'BananaLib', '--ios') output.should.include? 'BananaLib' Specification.any_instance.stubs(:available_platforms).returns([Platform.osx]) output = run_command('search', 'BananaLib', '--ios') output.should.not.include? 'BananaLib' end it 'restricts the search to Pods supported on OS X' do output = run_command('search', 'BananaLib', '--osx') output.should.not.include? 'BananaLib' end it 'restricts the search to Pods supported on Watch OS' do output = run_command('search', 'a', '--watchos') output.should.include? 'Realm' output.should.not.include? 'BananaLib' end it 'restricts the search to Pods supported on tvOS' do output = run_command('search', 'n', '--tvos') output.should.include? 'monkey' output.should.not.include? 'BananaLib' end it 'outputs with the silent parameter' do output = run_command('search', 'BananaLib', '--silent') output.should.include? 'BananaLib' end it 'shows a friendly message when locally searching with invalid regex' do lambda { run_command('search', '--regex', '+') }.should.raise CLAide::Help end it 'does not try to validate the query as a regex with plain-text search' do lambda { run_command('search', '+') }.should.not.raise CLAide::Help end it 'uses regex search when asked for regex mode' do output = run_command('search', '--regex', 'Ba(na)+Lib') output.should.include? 'BananaLib' output.should.not.include? 'Pod+With+Plus+Signs' output.should.not.include? 'JSONKit' end it 'uses plain-text search when not asked for regex mode' do output = run_command('search', 'Pod+With+Plus+Signs') output.should.include? 'Pod+With+Plus+Signs' output.should.not.include? 'BananaLib' end end describe 'option --web' do extend SpecHelper::TemporaryRepos it 'searches with invalid regex' do Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=NSAttributedString%2BCCLFormat']) run_command('search', '--web', 'NSAttributedString+CCLFormat') end it 'should url encode search queries' do Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=NSAttributedString%2BCCLFormat']) run_command('search', '--web', 'NSAttributedString+CCLFormat') end it 'searches the web via the open! command' do Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=bananalib']) run_command('search', '--web', 'bananalib') end it 'includes option --osx correctly' do Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=on%3Aosx%20bananalib']) run_command('search', '--web', '--osx', 'bananalib') end it 'includes option --ios correctly' do Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=on%3Aios%20bananalib']) run_command('search', '--web', '--ios', 'bananalib') end it 'includes option --watchos correctly' do Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=on%3Awatchos%20bananalib']) run_command('search', '--web', '--watchos', 'bananalib') end it 'includes option --tvos correctly' do Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=on%3Atvos%20bananalib']) run_command('search', '--web', '--tvos', 'bananalib') end it 'includes any new platform option correctly' do Platform.stubs(:all).returns([Platform.ios, Platform.tvos, Platform.new('whateveros')]) Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=on%3Awhateveros%20bananalib']) run_command('search', '--web', '--whateveros', 'bananalib') end it 'does not matter in which order the ios/osx options are set' do Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=on%3Aios%20on%3Aosx%20bananalib']) run_command('search', '--web', '--ios', '--osx', 'bananalib') Executable.expects(:execute_command).with(:open, ['https://cocoapods.org/?q=on%3Aios%20on%3Aosx%20bananalib']) run_command('search', '--web', '--osx', '--ios', 'bananalib') end end end end
from __future__ import absolute_import, division, print_function # note: py.io capture tests where copied from # pylib 1.4.20.dev2 (rev 13d9af95547e) from __future__ import with_statement import pickle import os import sys from io import <API key> import _pytest._code import py import pytest import contextlib from _pytest import capture from _pytest.capture import CaptureManager from _pytest.main import <API key> needsosdup = pytest.mark.xfail("not hasattr(os, 'dup')") if sys.version_info >= (3, 0): def tobytes(obj): if isinstance(obj, str): obj = obj.encode('UTF-8') assert isinstance(obj, bytes) return obj def totext(obj): if isinstance(obj, bytes): obj = str(obj, 'UTF-8') assert isinstance(obj, str) return obj else: def tobytes(obj): if isinstance(obj, unicode): obj = obj.encode('UTF-8') assert isinstance(obj, str) return obj def totext(obj): if isinstance(obj, str): obj = unicode(obj, 'UTF-8') assert isinstance(obj, unicode) return obj def oswritebytes(fd, obj): os.write(fd, tobytes(obj)) def StdCaptureFD(out=True, err=True, in_=True): return capture.MultiCapture(out, err, in_, Capture=capture.FDCapture) def StdCapture(out=True, err=True, in_=True): return capture.MultiCapture(out, err, in_, Capture=capture.SysCapture) class TestCaptureManager(object): def <API key>(self, monkeypatch): from _pytest.capture import pytest_addoption from _pytest.config import Parser parser = Parser() pytest_addoption(parser) default = parser._groups[0].options[0].default assert default == "fd" if hasattr(os, "dup") else "sys" parser = Parser() monkeypatch.delattr(os, 'dup', raising=False) pytest_addoption(parser) assert parser._groups[0].options[0].default == "sys" @needsosdup @pytest.mark.parametrize("method", ['no', 'sys', pytest.mark.skipif('not hasattr(os, "dup")', 'fd')]) def <API key>(self, method): capouter = StdCaptureFD() old = sys.stdout, sys.stderr, sys.stdin try: capman = CaptureManager(method) capman.<API key>() outerr = capman.<API key>() assert outerr == ("", "") outerr = capman.<API key>() assert outerr == ("", "") print("hello") out, err = capman.<API key>() if method == "no": assert old == (sys.stdout, sys.stderr, sys.stdin) else: assert not out capman.<API key>() print("hello") out, err = capman.<API key>() if method != "no": assert out == "hello\n" capman.<API key>() finally: capouter.stop_capturing() @needsosdup def test_init_capturing(self): capouter = StdCaptureFD() try: capman = CaptureManager("fd") capman.<API key>() pytest.raises(AssertionError, "capman.<API key>()") capman.<API key>() finally: capouter.stop_capturing() @pytest.mark.parametrize("method", ['fd', 'sys']) def <API key>(testdir, method): if hasattr(sys, "pypy_version_info") and sys.pypy_version_info < (2, 2): pytest.xfail("does not work on pypy < 2.2") if sys.version_info >= (3, 0): obj = "'b\u00f6y'" else: obj = "u'\u00f6y'" testdir.makepyfile(""" # coding=utf8 # taken from issue 227 from nosetests def test_unicode(): import sys print (sys.stdout) print (%s) """ % obj) result = testdir.runpytest("--capture=%s" % method) result.stdout.fnmatch_lines([ "*1 passed*" ]) @pytest.mark.parametrize("method", ['fd', 'sys']) def <API key>(testdir, method): testdir.makepyfile(""" def test_unicode(): print ('b\\u00f6y') """) result = testdir.runpytest("--capture=%s" % method) result.stdout.fnmatch_lines([ "*1 passed*" ]) def <API key>(testdir): p = testdir.makepyfile(""" print ("collect %s failure" % 13) import xyz42123 """) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ "*Captured stdout*", "*collect 13 failure*", ]) class <API key>(object): def <API key>(self, testdir): p = testdir.makepyfile(""" def setup_module(mod): print ("setup module") def setup_function(function): print ("setup " + function.__name__) def test_func1(): print ("in func1") assert 0 def test_func2(): print ("in func2") assert 0 """) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ "setup module*", "setup test_func1*", "in func1*", "setup test_func2*", "in func2*", ]) @pytest.mark.xfail(reason="unimplemented feature") def <API key>(self, testdir): p = testdir.makepyfile(""" import sys def setup_module(func): print ("module-setup") def setup_function(func): print ("function-setup") def test_func(): print ("in function") assert 0 def teardown_function(func): print ("in teardown") """) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ "*test_func():*", "*Captured stdout during setup*", "module-setup*", "function-setup*", "*Captured stdout*", "in teardown*", ]) def test_no_carry_over(self, testdir): p = testdir.makepyfile(""" def test_func1(): print ("in func1") def test_func2(): print ("in func2") assert 0 """) result = testdir.runpytest(p) s = result.stdout.str() assert "in func1" not in s assert "in func2" in s def <API key>(self, testdir): p = testdir.makepyfile(""" def setup_function(function): print ("setup func1") def teardown_function(function): print ("teardown func1") assert 0 def test_func1(): print ("in func1") pass """) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ '*teardown_function*', '*Captured stdout*', "setup func1*", "in func1*", "teardown func1*", # "*1 fixture failure*" ]) def <API key>(self, testdir): p = testdir.makepyfile(""" def teardown_module(mod): print ("teardown module") assert 0 def test_func(): pass """) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ "*def teardown_module(mod):*", "*Captured stdout*", "*teardown module*", "*1 error*", ]) def <API key>(self, testdir): p1 = testdir.makepyfile(""" import sys def test_capturing(): print (42) sys.stderr.write(str(23)) def <API key>(): print (1) sys.stderr.write(str(2)) raise ValueError """) result = testdir.runpytest(p1) result.stdout.fnmatch_lines([ "*<API key>.py .F*", "====* FAILURES *====", "____*____", "*<API key>.py:8: ValueError", "*--- Captured stdout *call*", "1", "*--- Captured stderr *call*", "2", ]) class <API key>(object): def <API key>(self, testdir): p = testdir.makepyfile(""" def test_logging(): import logging import pytest stream = capture.CaptureIO() logging.basicConfig(stream=stream) stream.close() # to free memory/release resources """) result = testdir.<API key>(p) assert result.stderr.str().find("atexit") == -1 def <API key>(self, testdir): p = testdir.makepyfile(""" import logging def setup_function(function): logging.warn("hello1") def test_logging(): logging.warn("hello2") assert 0 def teardown_function(function): logging.warn("hello3") assert 0 """) for optargs in (('--capture=sys',), ('--capture=fd',)): print(optargs) result = testdir.<API key>(p, *optargs) s = result.stdout.str() result.stdout.fnmatch_lines([ "*WARN*hello3", # errors show first! "*WARN*hello1", "*WARN*hello2", ]) # verify proper termination assert "closed" not in s def <API key>(self, testdir): p = testdir.makepyfile(""" import logging def setup_module(function): logging.warn("hello1") def test_logging(): logging.warn("hello2") assert 0 def teardown_module(function): logging.warn("hello3") assert 0 """) for optargs in (('--capture=sys',), ('--capture=fd',)): print(optargs) result = testdir.<API key>(p, *optargs) s = result.stdout.str() result.stdout.fnmatch_lines([ "*WARN*hello3", # errors come first "*WARN*hello1", "*WARN*hello2", ]) # verify proper termination assert "closed" not in s def <API key>(self, testdir): testdir.makeconftest(""" import logging logging.basicConfig() logging.warn("hello435") """) # make sure that logging is still captured in tests result = testdir.<API key>("-s", "-p", "no:capturelog") assert result.ret == <API key> result.stderr.fnmatch_lines([ "WARNING*hello435*", ]) assert 'operation on closed file' not in result.stderr.str() def <API key>(self, testdir): testdir.makeconftest(""" import logging logging.basicConfig() """) # make sure that logging is still captured in tests p = testdir.makepyfile(""" def test_hello(): import logging logging.warn("hello433") assert 0 """) result = testdir.<API key>(p, "-p", "no:capturelog") assert result.ret != 0 result.stdout.fnmatch_lines([ "WARNING*hello433*", ]) assert 'something' not in result.stderr.str() assert 'operation on closed file' not in result.stderr.str() class TestCaptureFixture(object): @pytest.mark.parametrize("opt", [[], ["-s"]]) def test_std_functional(self, testdir, opt): reprec = testdir.inline_runsource(""" def test_hello(capsys): print (42) out, err = capsys.readouterr() assert out.startswith("42") """, *opt) reprec.assertoutcome(passed=1) def test_capsyscapfd(self, testdir): p = testdir.makepyfile(""" def test_one(capsys, capfd): pass def test_two(capfd, capsys): pass """) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ "*ERROR*setup*test_one*", "E*capfd*capsys*same*time*", "*ERROR*setup*test_two*", "E*capsys*capfd*same*time*", "*2 error*"]) def <API key>(self, testdir): """Test that asking for "capfd" and "capsys" using request.getfixturevalue in the same test is an error. """ testdir.makepyfile(""" def test_one(capsys, request): request.getfixturevalue("capfd") def test_two(capfd, request): request.getfixturevalue("capsys") """) result = testdir.runpytest() result.stdout.fnmatch_lines([ "*test_one*", "*capsys*capfd*same*time*", "*test_two*", "*capfd*capsys*same*time*", "*2 failed in*", ]) def <API key>(self, testdir): p = testdir.makepyfile(""" def test_one(capsys, capfdbinary): pass """) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ "*ERROR*setup*test_one*", "E*capfdbinary*capsys*same*time*", "*1 error*"]) @pytest.mark.parametrize("method", ["sys", "fd"]) def <API key>(self, testdir, method): p = testdir.makepyfile(""" def test_hello(cap%s): print ("xxx42xxx") assert 0 """ % method) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ "xxx42xxx", ]) @needsosdup def <API key>(self, testdir): reprec = testdir.inline_runsource(""" def test_hello(capfd): import os os.write(1, "42".encode('ascii')) out, err = capfd.readouterr() assert out.startswith("42") capfd.close() """) reprec.assertoutcome(passed=1) @needsosdup def test_capfdbinary(self, testdir): reprec = testdir.inline_runsource(""" def test_hello(capfdbinary): import os # some likely un-decodable bytes os.write(1, b'\\xfe\\x98\\x20') out, err = capfdbinary.readouterr() assert out == b'\\xfe\\x98\\x20' assert err == b'' """) reprec.assertoutcome(passed=1) @pytest.mark.skipif( sys.version_info < (3,), reason='only have capsysbinary in python 3', ) def test_capsysbinary(self, testdir): reprec = testdir.inline_runsource(""" def test_hello(capsysbinary): import sys # some likely un-decodable bytes sys.stdout.buffer.write(b'\\xfe\\x98\\x20') out, err = capsysbinary.readouterr() assert out == b'\\xfe\\x98\\x20' assert err == b'' """) reprec.assertoutcome(passed=1) @pytest.mark.skipif( sys.version_info >= (3,), reason='only have capsysbinary in python 3', ) def <API key>(self, testdir): testdir.makepyfile(""" def test_hello(capsysbinary): pass """) result = testdir.runpytest() result.stdout.fnmatch_lines([ "*test_hello*", "*capsysbinary is only supported on python 3*", "*1 error in*", ]) def <API key>(self, testdir): p = testdir.makepyfile(""" def test_hello(capsys, missingarg): pass """) result = testdir.runpytest(p) result.stdout.fnmatch_lines([ "*<API key>*", "*1 error*", ]) @needsosdup def <API key>(self, testdir): p = testdir.makepyfile(""" def test_hello(capfd): import os os.write(1, str(42).encode('ascii')) raise KeyboardInterrupt() """) result = testdir.<API key>(p) result.stdout.fnmatch_lines([ "*KeyboardInterrupt*" ]) assert result.ret == 2 @pytest.mark.issue14 def <API key>(self, testdir): p = testdir.makepyfile(""" import logging def test_log(capsys): logging.error('x') """) result = testdir.<API key>(p) assert 'closed' not in result.stderr.str() @pytest.mark.parametrize('fixture', ['capsys', 'capfd']) @pytest.mark.parametrize('no_capture', [True, False]) def <API key>(self, testdir, fixture, no_capture): testdir.makepyfile(""" def test_disabled({fixture}): print('captured before') with {fixture}.disabled(): print('while capture is disabled') print('captured after') assert {fixture}.readouterr() == ('captured before\\ncaptured after\\n', '') def test_normal(): print('test_normal executed') """.format(fixture=fixture)) args = ('-s',) if no_capture else () result = testdir.<API key>(*args) result.stdout.fnmatch_lines(""" *while capture is disabled* """) assert 'captured before' not in result.stdout.str() assert 'captured after' not in result.stdout.str() if no_capture: assert 'test_normal executed' in result.stdout.str() else: assert 'test_normal executed' not in result.stdout.str() @pytest.mark.parametrize('fixture', ['capsys', 'capfd']) def <API key>(self, testdir, fixture): """ Ensure that capsys and capfd can be used by other fixtures during setup and teardown. """ testdir.makepyfile(""" from __future__ import print_function import sys import pytest @pytest.fixture def captured_print({fixture}): print('stdout contents begin') print('stderr contents begin', file=sys.stderr) out, err = {fixture}.readouterr() yield out, err print('stdout contents end') print('stderr contents end', file=sys.stderr) out, err = {fixture}.readouterr() assert out == 'stdout contents end\\n' assert err == 'stderr contents end\\n' def test_captured_print(captured_print): out, err = captured_print assert out == 'stdout contents begin\\n' assert err == 'stderr contents begin\\n' """.format(fixture=fixture)) result = testdir.<API key>() result.stdout.fnmatch_lines("*1 passed*") assert 'stdout contents begin' not in result.stdout.str() assert 'stderr contents begin' not in result.stdout.str() def <API key>(testdir): sub1 = testdir.mkpydir("sub1") sub1.join("conftest.py").write(_pytest._code.Source(""" def <API key>(item): raise ValueError(42) """)) sub1.join("test_mod.py").write("def test_func1(): pass") result = testdir.runpytest(testdir.tmpdir, '--traceconfig') result.stdout.fnmatch_lines([ "*ValueError(42)*", "*1 error*" ]) def <API key>(testdir): testdir.makepyfile(""" import os if hasattr(os, 'dup'): del os.dup def test_hello(capfd): pass """) result = testdir.<API key>("--capture=no") result.stdout.fnmatch_lines([ "*1 skipped*" ]) def <API key>(testdir): testdir.makeconftest(""" def <API key>(): print ("hello19") """) testdir.makepyfile("def test_func(): pass") result = testdir.runpytest() assert result.ret == 0 assert 'hello19' not in result.stdout.str() def <API key>(testdir): testdir.makepyfile(""" import os def test_func(): omg = bytearray([1,129,1]) os.write(1, omg) assert 0 """) result = testdir.runpytest('--cap=fd') result.stdout.fnmatch_lines(''' *def test_func* *assert 0* *Captured* *1 failed* ''') def <API key>(testdir): testdir.makeconftest(""" def <API key>(): print ("hello19") """) testdir.makepyfile("def test_func(): pass") result = testdir.runpytest("-vs") assert result.ret == 0 assert 'hello19' in result.stdout.str() def <API key>(testdir): testdir.makepyfile(r""" import pytest def test_a(): import sys import subprocess subprocess.call([sys.executable, __file__]) def test_foo(): import os;os.write(1, b'\xc3') if __name__ == '__main__': test_foo() """) result = testdir.runpytest('--assert=plain') result.assert_outcomes(passed=2) def <API key>(testdir): """Make sure we suspend capturing if errors occur during readouterr""" testdir.makepyfile(pytest_xyz=""" from _pytest.capture import FDCapture def bad_snap(self): raise Exception('boom') assert FDCapture.snap FDCapture.snap = bad_snap """) result = testdir.<API key>( "-p", "pytest_xyz", "--version", syspathinsert=True ) result.stderr.fnmatch_lines([ "*in bad_snap", " raise Exception('boom')", "Exception: boom", ]) class TestCaptureIO(object): def test_text(self): f = capture.CaptureIO() f.write("hello") s = f.getvalue() assert s == "hello" f.close() def <API key>(self): f = capture.CaptureIO() if sys.version_info >= (3, 0): f.write("\u00f6") pytest.raises(TypeError, "f.write(bytes('hello', 'UTF-8'))") else: f.write(unicode("\u00f6", 'UTF-8')) f.write("hello") # bytes s = f.getvalue() f.close() assert isinstance(s, unicode) @pytest.mark.skipif( sys.version_info[0] == 2, reason='python 3 only behaviour', ) def <API key>(self): """In python3, stdout / stderr are text io wrappers (exposing a buffer property of the underlying bytestream). See issue #1407 """ f = capture.CaptureIO() f.buffer.write(b'foo\r\n') assert f.getvalue() == 'foo\r\n' def test_bytes_io(): f = py.io.BytesIO() f.write(tobytes("hello")) pytest.raises(TypeError, "f.write(totext('hello'))") s = f.getvalue() assert s == tobytes("hello") def <API key>(): from _pytest.capture import DontReadFromInput f = DontReadFromInput() assert not f.isatty() pytest.raises(IOError, f.read) pytest.raises(IOError, f.readlines) pytest.raises(IOError, iter, f) pytest.raises(<API key>, f.fileno) f.close() # just for completeness @pytest.mark.skipif('sys.version_info < (3,)', reason='python2 has no buffer') def <API key>(): from _pytest.capture import DontReadFromInput f = DontReadFromInput() fb = f.buffer assert not fb.isatty() pytest.raises(IOError, fb.read) pytest.raises(IOError, fb.readlines) pytest.raises(IOError, iter, fb) pytest.raises(ValueError, fb.fileno) f.close() # just for completeness @pytest.mark.skipif('sys.version_info >= (3,)', reason='python2 has no buffer') def <API key>(): from _pytest.capture import DontReadFromInput f = DontReadFromInput() with pytest.raises(AttributeError): f.buffer f.close() # just for completeness @pytest.yield_fixture def tmpfile(testdir): f = testdir.makepyfile("").open('wb+') yield f if not f.closed: f.close() @needsosdup def test_dupfile(tmpfile): flist = [] for i in range(5): nf = capture.safe_text_dupfile(tmpfile, "wb") assert nf != tmpfile assert nf.fileno() != tmpfile.fileno() assert nf not in flist print(i, end="", file=nf) flist.append(nf) fname_open = flist[0].name assert fname_open == repr(flist[0].buffer) for i in range(5): f = flist[i] f.close() fname_closed = flist[0].name assert fname_closed == repr(flist[0].buffer) assert fname_closed != fname_open tmpfile.seek(0) s = tmpfile.read() assert "01234" in repr(s) tmpfile.close() assert fname_closed == repr(flist[0].buffer) def <API key>(): io = py.io.BytesIO() f = capture.safe_text_dupfile(io, "wb") f.write("hello") assert io.getvalue() == b"hello" assert 'BytesIO object' in f.name def <API key>(): io = py.io.TextIO() f = capture.safe_text_dupfile(io, "wb") f.write("hello") assert io.getvalue() == "hello" assert not hasattr(f, 'name') @contextlib.contextmanager def lsof_check(): pid = os.getpid() try: out = py.process.cmdexec("lsof -p %d" % pid) except (py.process.cmdexec.Error, UnicodeDecodeError): # about UnicodeDecodeError, see note on pytester pytest.skip("could not run 'lsof'") yield out2 = py.process.cmdexec("lsof -p %d" % pid) len1 = len([x for x in out.split("\n") if "REG" in x]) len2 = len([x for x in out2.split("\n") if "REG" in x]) assert len2 < len1 + 3, out2 class TestFDCapture(object): pytestmark = needsosdup def test_simple(self, tmpfile): fd = tmpfile.fileno() cap = capture.FDCapture(fd) data = tobytes("hello") os.write(fd, data) s = cap.snap() cap.done() assert not s cap = capture.FDCapture(fd) cap.start() os.write(fd, data) s = cap.snap() cap.done() assert s == "hello" def test_simple_many(self, tmpfile): for i in range(10): self.test_simple(tmpfile) def <API key>(self, testdir): with lsof_check(): with testdir.makepyfile("").open('wb+') as tmpfile: self.test_simple_many(tmpfile) def <API key>(self, tmpfile): fd = tmpfile.fileno() cap = capture.FDCapture(fd) cap.done() pytest.raises(ValueError, cap.start) def test_stderr(self): cap = capture.FDCapture(2) cap.start() print("hello", file=sys.stderr) s = cap.snap() cap.done() assert s == "hello\n" def test_stdin(self, tmpfile): cap = capture.FDCapture(0) cap.start() x = os.read(0, 100).strip() cap.done() assert x == tobytes('') def test_writeorg(self, tmpfile): data1, data2 = tobytes("foo"), tobytes("bar") cap = capture.FDCapture(tmpfile.fileno()) cap.start() tmpfile.write(data1) tmpfile.flush() cap.writeorg(data2) scap = cap.snap() cap.done() assert scap == totext(data1) with open(tmpfile.name, 'rb') as stmp_file: stmp = stmp_file.read() assert stmp == data2 def <API key>(self, tmpfile): with saved_fd(1): cap = capture.FDCapture(1) cap.start() data = tobytes("hello") os.write(1, data) sys.stdout.write("whatever") s = cap.snap() assert s == "hellowhatever" cap.suspend() os.write(1, tobytes("world")) sys.stdout.write("qlwkej") assert not cap.snap() cap.resume() os.write(1, tobytes("but now")) sys.stdout.write(" yes\n") s = cap.snap() assert s == "but now yes\n" cap.suspend() cap.done() pytest.raises(AttributeError, cap.suspend) @contextlib.contextmanager def saved_fd(fd): new_fd = os.dup(fd) try: yield finally: os.dup2(new_fd, fd) os.close(new_fd) class TestStdCapture(object): captureclass = staticmethod(StdCapture) @contextlib.contextmanager def getcapture(self, **kw): cap = self.__class__.captureclass(**kw) cap.start_capturing() try: yield cap finally: cap.stop_capturing() def <API key>(self): with self.getcapture() as cap: sys.stdout.write("hello") sys.stderr.write("world") out, err = cap.readouterr() assert out == "hello" assert err == "world" def <API key>(self): with self.getcapture() as cap: print("hello world") sys.stderr.write("hello error\n") out, err = cap.readouterr() assert out == "hello world\n" assert err == "hello error\n" def <API key>(self): with self.getcapture() as cap: print("hello world") sys.stderr.write("hello error\n") out, err = cap.readouterr() assert out == "hello world\n" assert err == "hello error\n" sys.stderr.write("error2") out, err = cap.readouterr() assert err == "error2" def <API key>(self): with self.getcapture() as cap: sys.stdout.write("hello") sys.stderr.write("world") capture_result = cap.readouterr() assert capture_result.out == "hello" assert capture_result.err == "world" def <API key>(self): with self.getcapture() as cap: print("hx\xc4\x85\xc4\x87") out, err = cap.readouterr() assert out == py.builtin._totext("hx\xc4\x85\xc4\x87\n", "utf8") @pytest.mark.skipif('sys.version_info >= (3,)', reason='text output different for bytes on python3') def <API key>(self): with self.getcapture() as cap: # triggered a internal error in pytest print('\xa6') out, err = cap.readouterr() assert out == py.builtin._totext('\ufffd\n', 'unicode-escape') def <API key>(self): with self.getcapture() as cap: print("hello") out, err = cap.readouterr() pytest.raises(ValueError, cap.stop_capturing) assert out == "hello\n" assert not err def <API key>(self): oldout = sys.stdout olderr = sys.stderr with self.getcapture() as cap: sys.stdout.write("hello") sys.stderr.write("world") sys.stdout = capture.CaptureIO() sys.stderr = capture.CaptureIO() print("not seen") sys.stderr.write("not seen\n") out, err = cap.readouterr() assert out == "hello" assert err == "world" assert sys.stdout == oldout assert sys.stderr == olderr def <API key>(self): with self.getcapture() as cap1: print("cap1") with self.getcapture() as cap2: print("cap2") out2, err2 = cap2.readouterr() out1, err1 = cap1.readouterr() assert out1 == "cap1\n" assert out2 == "cap2\n" def <API key>(self): with self.getcapture(out=True, err=False) as cap: sys.stdout.write("hello") sys.stderr.write("world") out, err = cap.readouterr() assert out == "hello" assert not err def <API key>(self): with self.getcapture(out=False, err=True) as cap: sys.stdout.write("hello") sys.stderr.write("world") out, err = cap.readouterr() assert err == "world" assert not out def test_stdin_restored(self): old = sys.stdin with self.getcapture(in_=True): newstdin = sys.stdin assert newstdin != sys.stdin assert sys.stdin is old def <API key>(self): print("XXX this test may well hang instead of crashing") print("XXX which indicates an error in the underlying capturing") print("XXX mechanisms") with self.getcapture(): pytest.raises(IOError, "sys.stdin.read()") class TestStdCaptureFD(TestStdCapture): pytestmark = needsosdup captureclass = staticmethod(StdCaptureFD) def test_simple_only_fd(self, testdir): testdir.makepyfile(""" import os def test_x(): os.write(1, "hello\\n".encode("ascii")) assert 0 """) result = testdir.<API key>() result.stdout.fnmatch_lines(""" *test_x* *assert 0* *Captured stdout* """) def test_intermingling(self): with self.getcapture() as cap: oswritebytes(1, "1") sys.stdout.write(str(2)) sys.stdout.flush() oswritebytes(1, "3") oswritebytes(2, "a") sys.stderr.write("b") sys.stderr.flush() oswritebytes(2, "c") out, err = cap.readouterr() assert out == "123" assert err == "abc" def test_many(self, capfd): with lsof_check(): for i in range(10): cap = StdCaptureFD() cap.stop_capturing() class <API key>(object): pytestmark = needsosdup def <API key>(self, testdir): testdir.makepyfile(""" import os from _pytest import capture def StdCaptureFD(out=True, err=True, in_=True): return capture.MultiCapture(out, err, in_, Capture=capture.FDCapture) def test_stdout(): os.close(1) cap = StdCaptureFD(out=True, err=False, in_=False) cap.stop_capturing() def test_stderr(): os.close(2) cap = StdCaptureFD(out=False, err=True, in_=False) cap.stop_capturing() def test_stdin(): os.close(0) cap = StdCaptureFD(out=False, err=False, in_=True) cap.stop_capturing() """) result = testdir.<API key>("--capture=fd") assert result.ret == 0 assert result.parseoutcomes()['passed'] == 3 def <API key>(): capsys = StdCapture() capsys.stop_capturing() def <API key>(capsys): test_text = 'test text' print(test_text.encode(sys.stdout.encoding, 'replace')) (out, err) = capsys.readouterr() assert out assert err == '' def <API key>(capsys): sys.stdout.write("spam") sys.stderr.write("eggs") capture_result = capsys.readouterr() assert capture_result.out == "spam" assert capture_result.err == "eggs" @needsosdup @pytest.mark.parametrize('use', [True, False]) def <API key>(tmpfile, use): if not use: tmpfile = True cap = StdCaptureFD(out=False, err=tmpfile) try: cap.start_capturing() capfile = cap.err.tmpfile cap.readouterr() finally: cap.stop_capturing() capfile2 = cap.err.tmpfile assert capfile2 == capfile @needsosdup def <API key>(testdir): testdir.makepyfile(""" import os def test_close(): os.close(1) def test_capture_again(): os.write(1, b"hello\\n") assert 0 """) result = testdir.<API key>() result.stdout.fnmatch_lines(""" *test_capture_again* *assert 0* *stdout* *hello* """) @pytest.mark.parametrize('method', ['SysCapture', 'FDCapture']) def <API key>(testdir, method): if method == "StdCaptureFD" and not hasattr(os, 'dup'): pytest.skip("need os.dup") # here we check a fundamental feature p = testdir.makepyfile(""" import sys, os import py, logging from _pytest import capture cap = capture.MultiCapture(out=False, in_=False, Capture=capture.%s) cap.start_capturing() logging.warn("hello1") outerr = cap.readouterr() print ("suspend, captured %%s" %%(outerr,)) logging.warn("hello2") cap.pop_outerr_to_orig() logging.warn("hello3") outerr = cap.readouterr() print ("suspend2, captured %%s" %% (outerr,)) """ % (method,)) result = testdir.runpython(p) result.stdout.fnmatch_lines(""" suspend, captured*hello1* suspend2, captured*WARNING:root:hello3* """) result.stderr.fnmatch_lines(""" WARNING:root:hello2 """) assert "atexit" not in result.stderr.str() def <API key>(testdir): testdir.makepyfile(""" import sys def test_capattr(): assert sys.stdout.errors == "strict" assert sys.stderr.errors == "strict" """) reprec = testdir.inline_run() reprec.assertoutcome(passed=1) @pytest.mark.skipif(not sys.platform.startswith('win') and sys.version_info[:2] >= (3, 6), reason='only py3.6+ on windows') def <API key>(): """ Ensure <API key> function works with objects that do not implement the full ``io``-based stream protocol, for example execnet channels (#2666). """ from _pytest.capture import <API key> class DummyStream(object): def write(self, s): pass stream = DummyStream() <API key>(stream) def <API key>(testdir): testdir.makepyfile(""" import sys def test_capattr(): # should not raise AttributeError assert sys.stdout.encoding assert sys.stderr.encoding """) reprec = testdir.inline_run() reprec.assertoutcome(passed=1) def <API key>(testdir): testdir.makepyfile(''' from __future__ import print_function import time import threading import sys def spam(): f = sys.stderr while True: print('.', end='', file=f) def test_silly(): t = threading.Thread(target=spam) t.daemon = True t.start() time.sleep(0.5) ''') result = testdir.<API key>() assert result.ret == 0 assert 'IOError' not in result.stdout.str() def <API key>(): # pickle.loads() raises infinite recursion if # EncodedFile.__getattr__ is not implemented properly ef = capture.EncodedFile(None, None) ef_as_str = pickle.dumps(ef) pickle.loads(ef_as_str)
package cn.winxo.gank.module.view; import android.content.Intent; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.util.Log; import cn.winxo.gank.R; import cn.winxo.gank.adapter.DetailTitleBinder; import cn.winxo.gank.adapter.DetailViewBinder; import cn.winxo.gank.base.BaseMvpActivity; import cn.winxo.gank.data.Injection; import cn.winxo.gank.data.entity.constants.Constant; import cn.winxo.gank.data.entity.remote.GankData; import cn.winxo.gank.module.contract.DetailContract; import cn.winxo.gank.module.presenter.DetailPresenter; import cn.winxo.gank.util.Toasts; import java.text.SimpleDateFormat; import java.util.Locale; import me.drakeet.multitype.Items; import me.drakeet.multitype.MultiTypeAdapter; public class DetailActivity extends BaseMvpActivity<DetailContract.Presenter> implements DetailContract.View { protected Toolbar mToolbar; protected RecyclerView mRecycler; protected SwipeRefreshLayout mSwipeLayout; private long mDate; private MultiTypeAdapter mTypeAdapter; @Override protected int setLayoutResourceID() { return R.layout.activity_detail; } @Override protected void init(Bundle savedInstanceState) { super.init(savedInstanceState); mDate = getIntent().getLongExtra(Constant.ExtraKey.DATE, -1); } @Override protected void initView() { mToolbar = findViewById(R.id.toolbar); mRecycler = findViewById(R.id.recycler); mSwipeLayout = findViewById(R.id.swipe_layout); mToolbar.<API key>(view -> finish()); mToolbar.setNavigationIcon(R.drawable.<API key>); mRecycler.setLayoutManager(new LinearLayoutManager(this)); mTypeAdapter = new MultiTypeAdapter(); mTypeAdapter.register(String.class, new DetailTitleBinder()); DetailViewBinder detailViewBinder = new DetailViewBinder(); detailViewBinder.<API key>((v, gankData) -> { Intent intent = new Intent(); intent.setClass(DetailActivity.this, WebActivity.class); intent.putExtra("url", gankData.getUrl()); intent.putExtra("name", gankData.getDesc()); startActivity(intent); }); mTypeAdapter.register(GankData.class, detailViewBinder); mRecycler.setAdapter(mTypeAdapter); mSwipeLayout.<API key>(() -> mPresenter.refreshDayGank(mDate)); } @Override protected void initData() { if (mDate != -1) { String dateShow = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA).format(mDate); mToolbar.setTitle(dateShow); mSwipeLayout.setRefreshing(true); mPresenter.loadDayGank(mDate); } else { finish(); } } @Override protected DetailPresenter onLoadPresenter() { return new DetailPresenter(this, Injection.<API key>(this)); } @Override public void showLoading() { mSwipeLayout.setRefreshing(true); } @Override public void hideLoading() { mSwipeLayout.setRefreshing(false); } @Override public void loadSuccess(Items items) { hideLoading(); mTypeAdapter.setItems(items); mTypeAdapter.<API key>(); } @Override public void loadFail(String message) { Toasts.showShort(""); Log.e("DetailActivity", "loadFail: " + message); } }
<?php /** * Converts phone numbers to the formatting standard * * @param String $num A unformatted phone number * @return String Returns the formatted phone number */ function formatPhone($num) { $num = preg_replace('/[^0-9]/', '', $num); $len = strlen($num); if($len == 7) $num = preg_replace('/([0-9]{3})([0-9]{4})/', '$1-$2', $num); elseif($len == 10) $num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{4})/', '($1) $2-$3', $num); return $num; } function formatCurrency($num){ if ($num === "") return ""; else return number_format($num, 2); } function <API key>($stamp) { $formatted = []; $formatted['date'] = date("M jS, Y", $stamp); $formatted['day'] = date("l", $stamp); $formatted['time'] = date("g:i a", $stamp); return $formatted; } function formatSignInDate($stamp){ $stamp = intval($stamp); if ($stamp == '0'){ return "Brand new!"; } else { $datetime = new DateTime(); $datetime->setTimestamp($stamp); return $datetime->format('l, F j Y'); } } // Filter out all non-digits from a string function filterNonDigits($num){ return preg_replace("/[^0-9]/", "", $num); } // Convert text that might be in a different case or with trailing/leading whitespace to a standard form function str_normalize($str) { return strtolower(trim($str)); } // Parse a comment block into a description and array of parameters function parseCommentBlock($comment){ $lines = explode("\n", $comment); $result = array('description' => "", 'parameters' => array()); foreach ($lines as $line){ if (!preg_match('/^\s*\/?\*+\/?\s*$/', $line)){ // Extract description or parameters if (preg_match('/^\s*\**\s*@param\s+(\w+)\s+\$(\w+)\s+(.*)$/', $line, $matches)){ $type = $matches[1]; $name = $matches[2]; $description = $matches[3]; $result['parameters'][$name] = array('type' => $type, 'description' => $description); } else if (preg_match('/^\s*\**\s*@(.*)$/', $line, $matches)){ // Skip other types of special entities } else if (preg_match('/^\s*\**\s*(.*)$/', $line, $matches)){ $description = $matches[1]; $result['description'] .= $description; } } } return $result; } // Useful for testing output of API functions function prettyPrint( $json ) { $result = ''; $level = 0; $in_quotes = false; $in_escape = false; $ends_line_level = NULL; $json_length = strlen( $json ); for( $i = 0; $i < $json_length; $i++ ) { $char = $json[$i]; $new_line_level = NULL; $post = ""; if( $ends_line_level !== NULL ) { $new_line_level = $ends_line_level; $ends_line_level = NULL; } if ( $in_escape ) { $in_escape = false; } else if( $char === '"' ) { $in_quotes = !$in_quotes; } else if( ! $in_quotes ) { switch( $char ) { case '}': case ']': $level $ends_line_level = NULL; $new_line_level = $level; break; case '{': case '[': $level++; case ',': $ends_line_level = $level; break; case ':': $post = " "; break; case " ": case "\t": case "\n": case "\r": $char = ""; $ends_line_level = $new_line_level; $new_line_level = NULL; break; } } else if ( $char === '\\' ) { $in_escape = true; } if( $new_line_level !== NULL ) { $result .= "\n".str_repeat( "\t", $new_line_level ); } $result .= $char.$post; } return $result; } //Retrieve a list of all .php files in models/languages function getLanguageFiles() { $directory = "../models/languages/"; $languages = glob($directory . "*.php"); //print each file name return $languages; } //Inputs language strings from selected language. function lang($key,$markers = NULL) { global $lang; if($markers == NULL) { $str = $lang[$key]; } else { //Replace any dyamic markers $str = $lang[$key]; $iteration = 1; foreach($markers as $marker) { $str = str_replace("%m".$iteration."%",$marker,$str); $iteration++; } } //Ensure we have something to return if($str == "") { return ("No language key=$key found (markers=$markers)"); } else { return $str; } } function getCurrentLanguage($language){ $ex_l = explode('/', $language); $ex_l_2 = explode('.', $ex_l[2]); return $ex_l_2[0]; } //Retrieve a list of all .php files in a given directory function getPageFiles($directory) { /*used for manual implementation of bcrypt*/ /* simply add inside of a form tag like so: form_protect($loggedInUser->csrf_token); then in the processing script: require_once __DIR__ . '/models/post.php'; < OR > require_once 'models/post.php'; */ function form_protect($token) { if(isUserLoggedIn()) {echo '<input type="hidden" name="csrf_token" value="'. $token .'">';} } // Check that request is made by a logged in user. Immediately fail if not. function checkLoggedInUser($ajax){ if (!isUserLoggedIn()){ addAlert("danger", lang("LOGIN_REQUIRED")); apiReturnError($ajax, getReferralPage()); } } // Check that a CSRF token is specified and valid. function checkCSRF($ajax, $csrf_token){ global $loggedInUser; if ($csrf_token) { if (!$loggedInUser->csrf_validate(trim($csrf_token))){ addAlert("danger", lang("ACCESS_DENIED")); if (LOG_AUTH_FAILURES) error_log("CSRF token failure - invalid token."); apiReturnError($ajax, $<API key>); } } else { addAlert("danger", lang("ACCESS_DENIED")); if (LOG_AUTH_FAILURES) error_log("CSRF token failure - token not specified."); apiReturnError($ajax, $<API key>); } } //Checks if an email is valid function isValidEmail($email) { if (filter_var($email, <API key>)) { return true; } else { return false; } } function isValidName($name) { return preg_match('/^[A-Za-z0-9 ]+$/', $name); } //Checks if a string is within a min and max length function minMaxRange($min, $max, $what) { if(strlen(trim($what)) < $min) return true; else if(strlen(trim($what)) > $max) return true; else return false; } /** * <API key> does indeed merge arrays, but it converts values with duplicate * keys to arrays rather than overwriting the value in the first array with the duplicate * value in the second array, as array_merge does. I.e., with <API key>, * this happens (documented behavior): * * <API key>(array('key' => 'org value'), array('key' => 'new value')); * => array('key' => array('org value', 'new value')); * * <API key> does not change the datatypes of the values in the arrays. * Matching keys' values in the second array overwrite those in the first array, as is the * case with array_merge, i.e.: * * <API key>(array('key' => 'org value'), array('key' => 'new value')); * => array('key' => array('new value')); * * Parameters are passed by reference, though only for performance reasons. They're not * altered by this function. * * @param array $array1 * @param array $array2 * @return array * @author Daniel <daniel (at) <API key> (dot) dk> * @author Gabriel Sobrinho <gabriel (dot) sobrinho (at) gmail (dot) com> */ function <API key> ( array &$array1, array &$array2 ) { $merged = $array1; foreach ( $array2 as $key => &$value ) { if ( is_array ( $value ) && isset ( $merged [$key] ) && is_array ( $merged [$key] ) ) { $merged [$key] = <API key> ( $merged [$key], $value ); } else { $merged [$key] = $value; } } return $merged; } function generateCaptcha(){ /* generates a base 64 string to be placed inside the src attribute of an html image tag. @blame -r3wt */ $md5_hash = md5(rand(0,99999)); $security_code = substr($md5_hash, 25, 5); $enc = md5($security_code); $_SESSION['captcha'] = $enc; $width = 150; $height = 30; $image = <API key>(150, 30); //color pallette $white = imagecolorallocate($image, 255, 255, 255); $black = imagecolorallocate($image, 0, 0, 0); $red = imagecolorallocate($image,255,0,0); $yellow = imagecolorallocate($image, 255, 255, 0); $dark_grey = imagecolorallocate($image, 64,64,64); $blue = imagecolorallocate($image, 0,0,255); //create white rectangle <API key>($image,0,0,150,30,$white); //add some lines for($i=0;$i<2;$i++) { imageline($image,0,rand()%10,10,rand()%30,$dark_grey); imageline($image,0,rand()%30,150,rand()%30,$red); imageline($image,0,rand()%30,150,rand()%30,$yellow); } // RandTab color pallette $randc[0] = imagecolorallocate($image, 0, 0, 0); $randc[1] = imagecolorallocate($image,255,0,0); $randc[2] = imagecolorallocate($image, 255, 255, 0); $randc[3] = imagecolorallocate($image, 64,64,64); $randc[4] = imagecolorallocate($image, 0,0,255); //add some dots for($i=0;$i<1000;$i++) { imagesetpixel($image,rand()%200,rand()%50,$randc[rand()%5]); } //calculate center of text $x = ( 150 - 0 - imagefontwidth( 5 ) * strlen( $security_code ) ) / 2 + 0 + 5; //write string twice ImageString($image,5, $x, 7, $security_code, $black); ImageString($image,5, $x, 7, $security_code, $black); //start ob ob_start(); ImagePng($image); //get binary image data $data = ob_get_clean(); //return base64 return 'data:image/png;base64,'.chunk_split(base64_encode($data)); //return the base64 encoded image. } function checkUpgrade($version, $dev_env){ if(is_dir("upgrade/") && $dev_env != TRUE) { // Grab up the current changes from the master repo so that we can update (cache them to file if able to otherwise move on) $versions = file_get_contents('upgrade/versions.txt'); // Grab all versions from the update url and push the values to a array $versionList = explode("\n", $versions); // Remove new lines and carriage returns from the array $versionList = str_replace(array("\n", "\r"), '', $versionList); // Search the array to find out where the currently installed version falls $nV = array_search($version, $versionList); // Find out if the update is in the list or not $newVersion = isset($versionList[$nV - 1]); // Find out if we need to do the update or not based on the version information // If update is found then forward to the installer to run the script else exit if($newVersion != NULL) { header('Location: upgrade/'); die(); } } }
package br.com.swconsultoria.nfe.schema.retEnvEpec; import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.<API key>; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TEvento", namespace = "http: "infEvento", "signature" }) public class TEvento { @XmlElement(namespace = "http: protected TEvento.InfEvento infEvento; @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) protected SignatureType signature; @XmlAttribute(name = "versao", required = true) protected String versao; /** * Obtm o valor da propriedade infEvento. * * @return possible object is * {@link TEvento.InfEvento } */ public TEvento.InfEvento getInfEvento() { return infEvento; } /** * Define o valor da propriedade infEvento. * * @param value allowed object is * {@link TEvento.InfEvento } */ public void setInfEvento(TEvento.InfEvento value) { this.infEvento = value; } /** * Obtm o valor da propriedade signature. * * @return possible object is * {@link SignatureType } */ public SignatureType getSignature() { return signature; } /** * Define o valor da propriedade signature. * * @param value allowed object is * {@link SignatureType } */ public void setSignature(SignatureType value) { this.signature = value; } /** * Obtm o valor da propriedade versao. * * @return possible object is * {@link String } */ public String getVersao() { return versao; } /** * Define o valor da propriedade versao. * * @param value allowed object is * {@link String } */ public void setVersao(String value) { this.versao = value; } @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "cOrgao", "tpAmb", "cnpj", "cpf", "chNFe", "dhEvento", "tpEvento", "nSeqEvento", "verEvento", "detEvento" }) public static class InfEvento { @XmlElement(namespace = "http: protected String cOrgao; @XmlElement(namespace = "http: protected String tpAmb; @XmlElement(name = "CNPJ", namespace = "http: protected String cnpj; @XmlElement(name = "CPF", namespace = "http: protected String cpf; @XmlElement(namespace = "http: protected String chNFe; @XmlElement(namespace = "http: protected String dhEvento; @XmlElement(namespace = "http: protected String tpEvento; @XmlElement(namespace = "http: protected String nSeqEvento; @XmlElement(namespace = "http: protected String verEvento; @XmlElement(namespace = "http: protected TEvento.InfEvento.DetEvento detEvento; @XmlAttribute(name = "Id", required = true) @XmlJavaTypeAdapter(<API key>.class) @XmlID protected String id; /** * Obtm o valor da propriedade cOrgao. * * @return possible object is * {@link String } */ public String getCOrgao() { return cOrgao; } /** * Define o valor da propriedade cOrgao. * * @param value allowed object is * {@link String } */ public void setCOrgao(String value) { this.cOrgao = value; } /** * Obtm o valor da propriedade tpAmb. * * @return possible object is * {@link String } */ public String getTpAmb() { return tpAmb; } /** * Define o valor da propriedade tpAmb. * * @param value allowed object is * {@link String } */ public void setTpAmb(String value) { this.tpAmb = value; } /** * Obtm o valor da propriedade cnpj. * * @return possible object is * {@link String } */ public String getCNPJ() { return cnpj; } /** * Define o valor da propriedade cnpj. * * @param value allowed object is * {@link String } */ public void setCNPJ(String value) { this.cnpj = value; } /** * Obtm o valor da propriedade cpf. * * @return possible object is * {@link String } */ public String getCPF() { return cpf; } /** * Define o valor da propriedade cpf. * * @param value allowed object is * {@link String } */ public void setCPF(String value) { this.cpf = value; } /** * Obtm o valor da propriedade chNFe. * * @return possible object is * {@link String } */ public String getChNFe() { return chNFe; } /** * Define o valor da propriedade chNFe. * * @param value allowed object is * {@link String } */ public void setChNFe(String value) { this.chNFe = value; } /** * Obtm o valor da propriedade dhEvento. * * @return possible object is * {@link String } */ public String getDhEvento() { return dhEvento; } /** * Define o valor da propriedade dhEvento. * * @param value allowed object is * {@link String } */ public void setDhEvento(String value) { this.dhEvento = value; } /** * Obtm o valor da propriedade tpEvento. * * @return possible object is * {@link String } */ public String getTpEvento() { return tpEvento; } /** * Define o valor da propriedade tpEvento. * * @param value allowed object is * {@link String } */ public void setTpEvento(String value) { this.tpEvento = value; } /** * Obtm o valor da propriedade nSeqEvento. * * @return possible object is * {@link String } */ public String getNSeqEvento() { return nSeqEvento; } /** * Define o valor da propriedade nSeqEvento. * * @param value allowed object is * {@link String } */ public void setNSeqEvento(String value) { this.nSeqEvento = value; } /** * Obtm o valor da propriedade verEvento. * * @return possible object is * {@link String } */ public String getVerEvento() { return verEvento; } /** * Define o valor da propriedade verEvento. * * @param value allowed object is * {@link String } */ public void setVerEvento(String value) { this.verEvento = value; } /** * Obtm o valor da propriedade detEvento. * * @return possible object is * {@link TEvento.InfEvento.DetEvento } */ public TEvento.InfEvento.DetEvento getDetEvento() { return detEvento; } /** * Define o valor da propriedade detEvento. * * @param value allowed object is * {@link TEvento.InfEvento.DetEvento } */ public void setDetEvento(TEvento.InfEvento.DetEvento value) { this.detEvento = value; } /** * Obtm o valor da propriedade id. * * @return possible object is * {@link String } */ public String getId() { return id; } /** * Define o valor da propriedade id. * * @param value allowed object is * {@link String } */ public void setId(String value) { this.id = value; } @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "descEvento", "cOrgaoAutor", "tpAutor", "verAplic", "dhEmi", "tpNF", "ie", "dest" }) public static class DetEvento { @XmlElement(namespace = "http: protected String descEvento; @XmlElement(namespace = "http: protected String cOrgaoAutor; @XmlElement(namespace = "http: protected String tpAutor; @XmlElement(namespace = "http: protected String verAplic; @XmlElement(namespace = "http: protected String dhEmi; @XmlElement(namespace = "http: protected String tpNF; @XmlElement(name = "IE", namespace = "http: protected String ie; @XmlElement(namespace = "http: protected TEvento.InfEvento.DetEvento.Dest dest; @XmlAttribute(name = "versao", required = true) protected String versao; /** * Obtm o valor da propriedade descEvento. * * @return possible object is * {@link String } */ public String getDescEvento() { return descEvento; } /** * Define o valor da propriedade descEvento. * * @param value allowed object is * {@link String } */ public void setDescEvento(String value) { this.descEvento = value; } /** * Obtm o valor da propriedade cOrgaoAutor. * * @return possible object is * {@link String } */ public String getCOrgaoAutor() { return cOrgaoAutor; } /** * Define o valor da propriedade cOrgaoAutor. * * @param value allowed object is * {@link String } */ public void setCOrgaoAutor(String value) { this.cOrgaoAutor = value; } /** * Obtm o valor da propriedade tpAutor. * * @return possible object is * {@link String } */ public String getTpAutor() { return tpAutor; } /** * Define o valor da propriedade tpAutor. * * @param value allowed object is * {@link String } */ public void setTpAutor(String value) { this.tpAutor = value; } /** * Obtm o valor da propriedade verAplic. * * @return possible object is * {@link String } */ public String getVerAplic() { return verAplic; } /** * Define o valor da propriedade verAplic. * * @param value allowed object is * {@link String } */ public void setVerAplic(String value) { this.verAplic = value; } /** * Obtm o valor da propriedade dhEmi. * * @return possible object is * {@link String } */ public String getDhEmi() { return dhEmi; } /** * Define o valor da propriedade dhEmi. * * @param value allowed object is * {@link String } */ public void setDhEmi(String value) { this.dhEmi = value; } /** * Obtm o valor da propriedade tpNF. * * @return possible object is * {@link String } */ public String getTpNF() { return tpNF; } /** * Define o valor da propriedade tpNF. * * @param value allowed object is * {@link String } */ public void setTpNF(String value) { this.tpNF = value; } /** * Obtm o valor da propriedade ie. * * @return possible object is * {@link String } */ public String getIE() { return ie; } /** * Define o valor da propriedade ie. * * @param value allowed object is * {@link String } */ public void setIE(String value) { this.ie = value; } /** * Obtm o valor da propriedade dest. * * @return possible object is * {@link TEvento.InfEvento.DetEvento.Dest } */ public TEvento.InfEvento.DetEvento.Dest getDest() { return dest; } /** * Define o valor da propriedade dest. * * @param value allowed object is * {@link TEvento.InfEvento.DetEvento.Dest } */ public void setDest(TEvento.InfEvento.DetEvento.Dest value) { this.dest = value; } /** * Obtm o valor da propriedade versao. * * @return possible object is * {@link String } */ public String getVersao() { return versao; } /** * Define o valor da propriedade versao. * * @param value allowed object is * {@link String } */ public void setVersao(String value) { this.versao = value; } @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "uf", "cnpj", "cpf", "idEstrangeiro", "ie", "vnf", "vicms", "vst" }) public static class Dest { @XmlElement(name = "UF", namespace = "http: @XmlSchemaType(name = "string") protected TUf uf; @XmlElement(name = "CNPJ", namespace = "http: protected String cnpj; @XmlElement(name = "CPF", namespace = "http: protected String cpf; @XmlElement(namespace = "http: protected String idEstrangeiro; @XmlElement(name = "IE", namespace = "http: protected String ie; @XmlElement(name = "vNF", namespace = "http: protected String vnf; @XmlElement(name = "vICMS", namespace = "http: protected String vicms; @XmlElement(name = "vST", namespace = "http: protected String vst; /** * Obtm o valor da propriedade uf. * * @return possible object is * {@link TUf } */ public TUf getUF() { return uf; } /** * Define o valor da propriedade uf. * * @param value allowed object is * {@link TUf } */ public void setUF(TUf value) { this.uf = value; } /** * Obtm o valor da propriedade cnpj. * * @return possible object is * {@link String } */ public String getCNPJ() { return cnpj; } /** * Define o valor da propriedade cnpj. * * @param value allowed object is * {@link String } */ public void setCNPJ(String value) { this.cnpj = value; } /** * Obtm o valor da propriedade cpf. * * @return possible object is * {@link String } */ public String getCPF() { return cpf; } /** * Define o valor da propriedade cpf. * * @param value allowed object is * {@link String } */ public void setCPF(String value) { this.cpf = value; } /** * Obtm o valor da propriedade idEstrangeiro. * * @return possible object is * {@link String } */ public String getIdEstrangeiro() { return idEstrangeiro; } /** * Define o valor da propriedade idEstrangeiro. * * @param value allowed object is * {@link String } */ public void setIdEstrangeiro(String value) { this.idEstrangeiro = value; } /** * Obtm o valor da propriedade ie. * * @return possible object is * {@link String } */ public String getIE() { return ie; } /** * Define o valor da propriedade ie. * * @param value allowed object is * {@link String } */ public void setIE(String value) { this.ie = value; } /** * Obtm o valor da propriedade vnf. * * @return possible object is * {@link String } */ public String getVNF() { return vnf; } /** * Define o valor da propriedade vnf. * * @param value allowed object is * {@link String } */ public void setVNF(String value) { this.vnf = value; } /** * Obtm o valor da propriedade vicms. * * @return possible object is * {@link String } */ public String getVICMS() { return vicms; } /** * Define o valor da propriedade vicms. * * @param value allowed object is * {@link String } */ public void setVICMS(String value) { this.vicms = value; } /** * Obtm o valor da propriedade vst. * * @return possible object is * {@link String } */ public String getVST() { return vst; } /** * Define o valor da propriedade vst. * * @param value allowed object is * {@link String } */ public void setVST(String value) { this.vst = value; } } } } }
<?php /** <API key> */ // require_once 'Zend/Form/Element/Select.php'; class <API key> extends <API key> { /** * 'multiple' attribute * @var string */ public $multiple = 'multiple'; /** * Use formSelect view helper by default * @var string */ public $helper = 'formSelect'; /** * Multiselect is an array of values by default * @var bool */ protected $_isArray = true; }
\documentclass[12pt,a4paper,openany,oneside]{book} \input{thesis-setting} % \usepackage{blindtext} \title{\textsf{}} \author{{\kai }} \date{May 20, 20xx} \begin{document} \sloppy \pagenumbering{Roman} % \frontmatter \input{cover.tex} \setcounter{page}{1} \renewcommand{\baselinestretch}{1.25} % \include{preface/c_abstract} % \include{preface/e_abstract} \renewcommand{\baselinestretch}{1.25} \fontsize{12pt}{12pt}\selectfont \phantomsection \addcontentsline{toc}{chapter}{\fHei } \tableofcontents \clearpage \mainmatter \renewcommand{\baselinestretch}{1.0} \sHalfXiaosi\fSong % \input{chapters/chapter01.tex} \input{chapters/chapter02.tex} % \clearpage \phantomsection \addcontentsline{toc}{chapter}{\fHei } \sWuhao % npu \bibliographystyle{nputhesis} % \bibliography{references/reference} % \backmatter \input{appendix/acknowledgements.tex} \input{appendix/design-conclusion.tex} \clearpage \end{document}
.work { min-height: 520px; } .work > div > p { margin-bottom: 5px; }
package com.azure.ai.formrecognizer.administration; import com.azure.ai.formrecognizer.administration.models.AccountProperties; import com.azure.ai.formrecognizer.administration.models.BuildModelOptions; import com.azure.ai.formrecognizer.administration.models.CopyAuthorization; import com.azure.ai.formrecognizer.administration.models.Copy<API key>; import com.azure.ai.formrecognizer.administration.models.<API key>; import com.azure.ai.formrecognizer.administration.models.DocumentBuildMode; import com.azure.ai.formrecognizer.administration.models.DocumentModel; import com.azure.ai.formrecognizer.administration.models.ModelOperation; import com.azure.ai.formrecognizer.administration.models.<API key>; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.util.polling.AsyncPollResponse; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Code snippet for {@link <API key>} */ public class <API key> { private final <API key> <API key> = new <API key>().buildAsyncClient(); /** * Code snippet for {@link <API key>} initialization */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.initialization <API key> <API key> = new <API key>().buildAsyncClient(); // END: com.azure.ai.formrecognizer.administration.<API key>.initialization } /** * Code snippet for creating a {@link <API key>} with pipeline */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.pipeline.instantiation HttpPipeline pipeline = new HttpPipelineBuilder() .policies(/* add policies */) .build(); <API key> <API key> = new <API key>() .credential(new AzureKeyCredential("{key}")) .endpoint("{endpoint}") .pipeline(pipeline) .buildAsyncClient(); // END: com.azure.ai.formrecognizer.administration.<API key>.pipeline.instantiation } /** * Code snippet for {@link <API key>#beginBuildModel(String, DocumentBuildMode, String)} */ public void beginBuildModel() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.beginBuildModel#String-String String trainingFilesUrl = "{<API key>}"; <API key>.beginBuildModel(trainingFilesUrl, DocumentBuildMode.TEMPLATE, "model-name" ) // if polling operation completed, retrieve the final result. .flatMap(AsyncPollResponse::getFinalResult) .subscribe(documentModel -> { System.out.printf("Model ID: %s%n", documentModel.getModelId()); System.out.printf("Model Created on: %s%n", documentModel.getCreatedOn()); documentModel.getDocTypes().forEach((key, docTypeInfo) -> { docTypeInfo.getFieldSchema().forEach((field, documentFieldSchema) -> { System.out.printf("Field: %s", field); System.out.printf("Field type: %s", documentFieldSchema.getType()); System.out.printf("Field confidence: %.2f", docTypeInfo.getFieldConfidence().get(field)); }); }); }); // END: com.azure.ai.formrecognizer.administration.<API key>.beginBuildModel#String-String } /** * Code snippet for {@link <API key>#beginBuildModel(String, DocumentBuildMode, String, BuildModelOptions)} * with options */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.beginBuildModel#<API key> String trainingFilesUrl = "{<API key>}"; Map<String, String> attrs = new HashMap<String, String>(); attrs.put("createdBy", "sample"); <API key>.beginBuildModel(trainingFilesUrl, DocumentBuildMode.TEMPLATE, "model-name", new BuildModelOptions() .setDescription("model desc") .setPrefix("Invoice") .setTags(attrs)) // if polling operation completed, retrieve the final result. .flatMap(AsyncPollResponse::getFinalResult) .subscribe(documentModel -> { System.out.printf("Model ID: %s%n", documentModel.getModelId()); System.out.printf("Model Description: %s%n", documentModel.getDescription()); System.out.printf("Model Created on: %s%n", documentModel.getCreatedOn()); System.out.printf("Model assigned tags: %s%n", documentModel.getTags()); documentModel.getDocTypes().forEach((key, docTypeInfo) -> { docTypeInfo.getFieldSchema().forEach((field, documentFieldSchema) -> { System.out.printf("Field: %s", field); System.out.printf("Field type: %s", documentFieldSchema.getType()); System.out.printf("Field confidence: %.2f", docTypeInfo.getFieldConfidence().get(field)); }); }); }); // END: com.azure.ai.formrecognizer.administration.<API key>.beginBuildModel#<API key> } /** * Code snippet for {@link <API key>#deleteModel} */ public void deleteModel() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.deleteModel#string String modelId = "{model_id}"; <API key>.deleteModel(modelId) .subscribe(ignored -> System.out.printf("Model ID: %s is deleted%n", modelId)); // END: com.azure.ai.formrecognizer.administration.<API key>.deleteModel#string } /** * Code snippet for {@link <API key>#<API key>(String)} */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.<API key>#string String modelId = "{model_id}"; <API key>.<API key>(modelId) .subscribe(response -> { System.out.printf("Response Status Code: %d.", response.getStatusCode()); System.out.printf("Model ID: %s is deleted.%n", modelId); }); // END: com.azure.ai.formrecognizer.administration.<API key>.<API key>#string } /** * Code snippet for {@link <API key>#<API key>(String)} */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.<API key>#string String modelId = "my-copied-model"; <API key>.<API key>(modelId) .subscribe(copyAuthorization -> System.out.printf("Copy Authorization for model id: %s, access token: %s, expiration time: %s, " + "target resource ID; %s, target resource region: %s%n", copyAuthorization.getTargetModelId(), copyAuthorization.getAccessToken(), copyAuthorization.getExpiresOn(), copyAuthorization.getTargetResourceId(), copyAuthorization.<API key>() )); // END: com.azure.ai.formrecognizer.administration.<API key>.<API key>#string } /** * Code snippet for {@link <API key>#getCopy<API key>(String, Copy<API key>)} */ public void getCopy<API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.getCopy<API key>#string-Copy<API key> String modelId = "my-copied-model"; Map<String, String> attrs = new HashMap<String, String>(); attrs.put("createdBy", "sample"); <API key>.getCopy<API key>(modelId, new Copy<API key>() .setDescription("model desc") .setTags(attrs)) .subscribe(copyAuthorization -> System.out.printf("Copy Authorization response status: %s, for model id: %s, access token: %s, " + "expiration time: %s, target resource ID; %s, target resource region: %s%n", copyAuthorization.getStatusCode(), copyAuthorization.getValue().getTargetModelId(), copyAuthorization.getValue().getAccessToken(), copyAuthorization.getValue().getExpiresOn(), copyAuthorization.getValue().getTargetResourceId(), copyAuthorization.getValue().<API key>() )); // END: com.azure.ai.formrecognizer.administration.<API key>.getCopy<API key>#string-Copy<API key> } /** * Code snippet for {@link <API key>#<API key>()} */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.<API key> <API key>.<API key>() .subscribe(accountProperties -> { System.out.printf("Max number of models that can be build for this account: %d%n", accountProperties.<API key>()); System.out.printf("Current count of built document analysis models: %d%n", accountProperties.<API key>()); }); // END: com.azure.ai.formrecognizer.administration.<API key>.<API key> } /** * Code snippet for {@link <API key>#<API key>()} */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.<API key> <API key>.<API key>() .subscribe(response -> { System.out.printf("Response Status Code: %d.", response.getStatusCode()); AccountProperties accountProperties = response.getValue(); System.out.printf("Max number of models that can be build for this account: %d%n", accountProperties.<API key>()); System.out.printf("Current count of built document analysis models: %d%n", accountProperties.<API key>()); }); // END: com.azure.ai.formrecognizer.administration.<API key>.<API key> } /** * Code snippet for {@link <API key>#<API key>(List, String)} */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.<API key>#list-String String modelId1 = "{model_Id_1}"; String modelId2 = "{model_Id_2}"; <API key>.<API key>(Arrays.asList(modelId1, modelId2), "my-composed-model") // if polling operation completed, retrieve the final result. .flatMap(AsyncPollResponse::getFinalResult) .subscribe(documentModel -> { System.out.printf("Model ID: %s%n", documentModel.getModelId()); System.out.printf("Model Created on: %s%n", documentModel.getCreatedOn()); documentModel.getDocTypes().forEach((key, docTypeInfo) -> { docTypeInfo.getFieldSchema().forEach((field, documentFieldSchema) -> { System.out.printf("Field: %s", field); System.out.printf("Field type: %s", documentFieldSchema.getType()); System.out.printf("Field confidence: %.2f", docTypeInfo.getFieldConfidence().get(field)); }); }); }); // END: com.azure.ai.formrecognizer.administration.<API key>.<API key>#list-String } /** * Code snippet for {@link <API key>#<API key>(List, String, <API key>)} * with options */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.<API key>#<API key> String modelId1 = "{model_Id_1}"; String modelId2 = "{model_Id_2}"; Map<String, String> attrs = new HashMap<String, String>(); attrs.put("createdBy", "sample"); <API key>.<API key>(Arrays.asList(modelId1, modelId2), "my-composed-model", new <API key>().setDescription("model-desc").setTags(attrs)) // if polling operation completed, retrieve the final result. .flatMap(AsyncPollResponse::getFinalResult) .subscribe(documentModel -> { System.out.printf("Model ID: %s%n", documentModel.getModelId()); System.out.printf("Model Description: %s%n", documentModel.getDescription()); System.out.printf("Model Created on: %s%n", documentModel.getCreatedOn()); System.out.printf("Model assigned tags: %s%n", documentModel.getTags()); documentModel.getDocTypes().forEach((key, docTypeInfo) -> { docTypeInfo.getFieldSchema().forEach((field, documentFieldSchema) -> { System.out.printf("Field: %s", field); System.out.printf("Field type: %s", documentFieldSchema.getType()); System.out.printf("Field confidence: %.2f", docTypeInfo.getFieldConfidence().get(field)); }); }); }); // END: com.azure.ai.formrecognizer.administration.<API key>.<API key>#<API key> } /** * Code snippet for {@link <API key>#beginCopyModel(String, CopyAuthorization)} */ public void beginCopy() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.beginCopyModel#<API key> String copyModelId = "copy-model"; String targetModelId = "my-copied-model-id"; // Get authorization to copy the model to target resource <API key>.<API key>(targetModelId) // Start copy operation from the source client // The ID of the model that needs to be copied to the target resource .subscribe(copyAuthorization -> <API key>.beginCopyModel(copyModelId, copyAuthorization) .filter(pollResponse -> pollResponse.getStatus().isComplete()) .flatMap(AsyncPollResponse::getFinalResult) .subscribe(documentModel -> System.out.printf("Copied model has model ID: %s, was created on: %s.%n,", documentModel.getModelId(), documentModel.getCreatedOn()))); // END: com.azure.ai.formrecognizer.administration.<API key>.beginCopyModel#<API key> } /** * Code snippet for {@link <API key>#listModels()} */ public void listModels() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.listModels <API key>.listModels() .subscribe(documentModelInfo -> System.out.printf("Model ID: %s, Model description: %s, Created on: %s.%n", documentModelInfo.getModelId(), documentModelInfo.getDescription(), documentModelInfo.getCreatedOn())); // END: com.azure.ai.formrecognizer.administration.<API key>.listModels } /** * Code snippet for {@link <API key>#getModel(String)} */ public void getModel() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.getModel#string String modelId = "{model_id}"; <API key>.getModel(modelId).subscribe(documentModel -> { System.out.printf("Model ID: %s%n", documentModel.getModelId()); System.out.printf("Model Description: %s%n", documentModel.getDescription()); System.out.printf("Model Created on: %s%n", documentModel.getCreatedOn()); documentModel.getDocTypes().forEach((key, docTypeInfo) -> { docTypeInfo.getFieldSchema().forEach((field, documentFieldSchema) -> { System.out.printf("Field: %s", field); System.out.printf("Field type: %s", documentFieldSchema.getType()); System.out.printf("Field confidence: %.2f", docTypeInfo.getFieldConfidence().get(field)); }); }); }); // END: com.azure.ai.formrecognizer.administration.<API key>.getModel#string } /** * Code snippet for {@link <API key>#<API key>(String)} */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.<API key>#string String modelId = "{model_id}"; <API key>.<API key>(modelId).subscribe(response -> { System.out.printf("Response Status Code: %d.", response.getStatusCode()); DocumentModel documentModel = response.getValue(); System.out.printf("Model ID: %s%n", documentModel.getModelId()); System.out.printf("Model Description: %s%n", documentModel.getDescription()); System.out.printf("Model Created on: %s%n", documentModel.getCreatedOn()); documentModel.getDocTypes().forEach((key, docTypeInfo) -> { docTypeInfo.getFieldSchema().forEach((field, documentFieldSchema) -> { System.out.printf("Field: %s", field); System.out.printf("Field type: %s", documentFieldSchema.getType()); System.out.printf("Field confidence: %.2f", docTypeInfo.getFieldConfidence().get(field)); }); }); }); // END: com.azure.ai.formrecognizer.administration.<API key>.<API key>#string } /** * Code snippet for {@link <API key>#getModel(String)} */ public void getOperation() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.getOperation#string String operationId = "{operation_Id}"; <API key>.getOperation(operationId).subscribe(modelOperation -> { System.out.printf("Operation ID: %s%n", modelOperation.getOperationId()); System.out.printf("Operation Kind: %s%n", modelOperation.getKind()); System.out.printf("Operation Status: %s%n", modelOperation.getStatus()); System.out.printf("Model ID created with this operation: %s%n", modelOperation.getModelId()); if (<API key>.FAILED.equals(modelOperation.getStatus())) { System.out.printf("Operation fail error: %s%n", modelOperation.getError().getMessage()); } }); // END: com.azure.ai.formrecognizer.administration.<API key>.getOperation#string } /** * Code snippet for {@link <API key>#<API key>(String)} */ public void <API key>() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.<API key>#string String operationId = "{operation_Id}"; <API key>.<API key>(operationId).subscribe(response -> { System.out.printf("Response Status Code: %d.", response.getStatusCode()); ModelOperation modelOperation = response.getValue(); System.out.printf("Operation ID: %s%n", modelOperation.getOperationId()); System.out.printf("Operation Kind: %s%n", modelOperation.getKind()); System.out.printf("Operation Status: %s%n", modelOperation.getStatus()); System.out.printf("Model ID created with this operation: %s%n", modelOperation.getModelId()); if (<API key>.FAILED.equals(modelOperation.getStatus())) { System.out.printf("Operation fail error: %s%n", modelOperation.getError().getMessage()); } }); // END: com.azure.ai.formrecognizer.administration.<API key>.<API key>#string } /** * Code snippet for {@link <API key>#listOperations()} */ public void listOperations() { // BEGIN: com.azure.ai.formrecognizer.administration.<API key>.listOperations <API key>.listOperations() .subscribe(modelOperation -> { System.out.printf("Operation ID: %s%n", modelOperation.getOperationId()); System.out.printf("Operation Status: %s%n", modelOperation.getStatus()); System.out.printf("Operation Created on: %s%n", modelOperation.getCreatedOn()); System.out.printf("Operation Percent completed: %d%n", modelOperation.getPercentCompleted()); System.out.printf("Operation Kind: %s%n", modelOperation.getKind()); System.out.printf("Operation Last updated on: %s%n", modelOperation.getLastUpdatedOn()); System.out.printf("Operation resource location: %s%n", modelOperation.getResourceLocation()); }); // END: com.azure.ai.formrecognizer.administration.<API key>.listOperations } }
package com.highmaps.config import scalajs.js, js.`|` import com.highcharts.CleanJsObject import com.highcharts.HighchartsUtils._ /** * @note JavaScript name: <code>series&lt;variwide&gt;-states-normal</code> */ @js.annotation.ScalaJSDefined class <API key> extends com.highcharts.<API key> { val animation: js.UndefOr[js.Object | Boolean] = js.undefined } object <API key> { /** * @param animation <p>Animation options for the fill color when returning from hover. state to normal state. The animation adds some latency in order. to reduce the effect of flickering when hovering in and out of. for example an uneven coastline.</p> */ def apply(animation: js.UndefOr[js.Object | Boolean] = js.undefined): <API key> = { val animationOuter: js.UndefOr[js.Object | Boolean] = animation com.highcharts.<API key>.toCleanObject(new <API key> { override val animation: js.UndefOr[js.Object | Boolean] = animationOuter }) } }
using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Windows.Forms; namespace <API key> { public partial class MyTreeView : TreeView { public MyTreeView() : base() { } private List<MyTreeView> linkedTreeViews = new List<MyTreeView>(); <summary> Links the specified tree view to this tree view. Whenever either treeview scrolls, the other will scroll too. </summary> <param name="treeView">The TreeView to link.</param> public void AddLinkedTreeView(MyTreeView treeView) { if (treeView == this) throw new ArgumentException("Cannot link a TreeView to itself!", "treeView"); if (!linkedTreeViews.Contains(treeView)) { //add the treeview to our list of linked treeviews linkedTreeViews.Add(treeView); //add this to the treeview's list of linked treeviews treeView.AddLinkedTreeView(this); //make sure the TreeView is linked to all of the other TreeViews that this TreeView is linked to for (int i = 0; i < linkedTreeViews.Count; i++) { //get the linked treeview var linkedTreeView = linkedTreeViews[i]; //link the treeviews together if (linkedTreeView != treeView) linkedTreeView.AddLinkedTreeView(treeView); } } } <summary> Sets the destination's scroll positions to that of the source. </summary> <param name="source">The source of the scroll positions.</param> <param name="dest">The destinations to set the scroll positions for.</param> private void SetScrollPositions(MyTreeView source, MyTreeView dest) { //get the scroll positions of the source int horizontal = User32.GetScrollPos(source.Handle, Orientation.Horizontal); int vertical = User32.GetScrollPos(source.Handle, Orientation.Vertical); //set the scroll positions of the destination User32.SetScrollPos(dest.Handle, Orientation.Horizontal, horizontal, true); User32.SetScrollPos(dest.Handle, Orientation.Vertical, vertical, true); } protected override void WndProc(ref Message m) { //process the message base.WndProc(ref m); //pass scroll messages onto any linked views if (m.Msg == User32.WM_VSCROLL || m.Msg == User32.WM_MOUSEWHEEL) { foreach (var linkedTreeView in linkedTreeViews) { //set the scroll positions of the linked tree view SetScrollPositions(this, linkedTreeView); //copy the windows message Message copy = new Message { HWnd = linkedTreeView.Handle, LParam = m.LParam, Msg = m.Msg, Result = m.Result, WParam = m.WParam }; //pass the message onto the linked tree view linkedTreeView.ReceiveWndProc(ref copy); } } } <summary> Recieves a WndProc message without passing it onto any linked treeviews. This is useful to avoid infinite loops. </summary> <param name="m">The windows message.</param> private void ReceiveWndProc(ref Message m) { base.WndProc(ref m); } <summary> Imported functions from the User32.dll </summary> private class User32 { public const int WM_VSCROLL = 0x115; public const int WM_MOUSEWHEEL = 0x020A; [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern int GetScrollPos(IntPtr hWnd, System.Windows.Forms.Orientation nBar); [DllImport("user32.dll")] public static extern int SetScrollPos(IntPtr hWnd, System.Windows.Forms.Orientation nBar, int nPos, bool bRedraw); } } }