code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // This file exists to aggregate all of the javascript used by the // settings page into a single file which will be flattened and served // as a single resource. <include src="preferences.js"> <include src="controlled_setting.js"> <include src="deletable_item_list.js"> <include src="editable_text_field.js"> <include src="hotword_search_setting_indicator.js"> <include src="inline_editable_list.js"> <include src="options_page.js"> <include src="pref_ui.js"> <include src="settings_dialog.js"> <include src="settings_banner.js"> <if expr="chromeos"> <include src="../chromeos/user_images_grid.js"> <include src="../help/channel_change_page.js"> <include src="../help/help_page.js"> <include src="../../../../ui/webui/resources/js/chromeos/ui_account_tweaks.js"> <include src="chromeos/change_picture_options.js"> <include src="chromeos/internet_detail_ip_address_field.js"> <include src="chromeos/internet_detail.js"> <include src="chromeos/network_list.js"> <include src="chromeos/preferred_networks.js"> <include src="chromeos/bluetooth_device_list.js"> <include src="chromeos/bluetooth_add_device_overlay.js"> <include src="chromeos/bluetooth_pair_device_overlay.js"> <include src="chromeos/accounts_options.js"> <include src="chromeos/proxy_rules_list.js"> <include src="chromeos/accounts_user_list.js"> <include src="chromeos/accounts_user_name_edit.js"> <include src="chromeos/consumer_management_overlay.js"> <include src="chromeos/display_options.js"> <include src="chromeos/display_overscan.js"> <include src="chromeos/keyboard_overlay.js"> <include src="chromeos/pointer_overlay.js"> <include src="chromeos/third_party_ime_confirm_overlay.js"> var AccountsOptions = options.AccountsOptions; var ChangePictureOptions = options.ChangePictureOptions; var ConsumerManagementOverlay = options.ConsumerManagementOverlay; var DetailsInternetPage = options.internet.DetailsInternetPage; var DisplayOptions = options.DisplayOptions; var DisplayOverscan = options.DisplayOverscan; var BluetoothOptions = options.BluetoothOptions; var BluetoothPairing = options.BluetoothPairing; var KeyboardOverlay = options.KeyboardOverlay; var PointerOverlay = options.PointerOverlay; var UIAccountTweaks = uiAccountTweaks.UIAccountTweaks; </if> <if expr="use_nss"> <include src="certificate_tree.js"> <include src="certificate_manager.js"> <include src="certificate_restore_overlay.js"> <include src="certificate_backup_overlay.js"> <include src="certificate_edit_ca_trust_overlay.js"> <include src="certificate_import_error_overlay.js"> var CertificateManager = options.CertificateManager; var CertificateRestoreOverlay = options.CertificateRestoreOverlay; var CertificateBackupOverlay = options.CertificateBackupOverlay; var CertificateEditCaTrustOverlay = options.CertificateEditCaTrustOverlay; var CertificateImportErrorOverlay = options.CertificateImportErrorOverlay; </if> <include src="alert_overlay.js"> <include src="autofill_edit_address_overlay.js"> <include src="autofill_edit_creditcard_overlay.js"> <include src="autofill_options_list.js"> <include src="autofill_options.js"> <include src="automatic_settings_reset_banner.js"> <include src="browser_options.js"> <include src="browser_options_profile_list.js"> <include src="browser_options_startup_page_list.js"> <include src="clear_browser_data_overlay.js"> <include src="confirm_dialog.js"> <include src="content_settings.js"> <include src="content_settings_exceptions_area.js"> <include src="content_settings_ui.js"> <include src="cookies_list.js"> <include src="cookies_view.js"> <include src="easy_unlock_turn_off_overlay.js"> <include src="factory_reset_overlay.js"> <include src="font_settings.js"> <if expr="enable_google_now"> <include src="geolocation_options.js"> </if> <include src="handler_options.js"> <include src="handler_options_list.js"> <include src="home_page_overlay.js"> <include src="hotword_confirm_dialog.js"> <include src="import_data_overlay.js"> <include src="language_add_language_overlay.js"> <if expr="not is_macosx"> <include src="language_dictionary_overlay_word_list.js"> <include src="language_dictionary_overlay.js"> </if> <include src="language_list.js"> <include src="language_options.js"> <include src="manage_profile_overlay.js"> <include src="options_focus_manager.js"> <include src="origin_resources_list.js"> <include src="password_manager.js"> <include src="password_manager_list.js"> <include src="profiles_icon_grid.js"> <include src="reset_profile_settings_overlay.js"> <include src="search_engine_manager.js"> <include src="search_engine_manager_engine_list.js"> <include src="search_page.js"> <include src="startup_overlay.js"> <include src="supervised_user_create_confirm.js"> <include src="supervised_user_import.js"> <include src="supervised_user_learn_more.js"> <include src="supervised_user_list.js"> <include src="supervised_user_list_data.js"> <include src="website_settings.js"> <include src="../sync_setup_overlay.js"> <include src="../uber/uber_page_manager_observer.js"> <include src="../uber/uber_utils.js"> <include src="options.js"> <if expr="enable_settings_app"> <include src="options_settings_app.js"> </if>
sencha/chromium-spacewalk
chrome/browser/resources/options/options_bundle.js
JavaScript
bsd-3-clause
5,299
//@HEADER // *************************************************** // // HPCG: High Performance Conjugate Gradient Benchmark // // Contact: // Michael A. Heroux ( maherou@sandia.gov) // Jack Dongarra (dongarra@eecs.utk.edu) // Piotr Luszczek (luszczek@eecs.utk.edu) // // *************************************************** //@HEADER /*! @file ComputeSYMGS.cpp HPCG routine */ #include "ComputeSYMGS.hpp" #include "ComputeSYMGS_ref.hpp" /*! Routine to one step of symmetrix Gauss-Seidel: Assumption about the structure of matrix A: - Each row 'i' of the matrix has nonzero diagonal value whose address is matrixDiagonal[i] - Entries in row 'i' are ordered such that: - lower triangular terms are stored before the diagonal element. - upper triangular terms are stored after the diagonal element. - No other assumptions are made about entry ordering. Symmetric Gauss-Seidel notes: - We use the input vector x as the RHS and start with an initial guess for y of all zeros. - We perform one forward sweep. Since y is initially zero we can ignore the upper triangular terms of A. - We then perform one back sweep. - For simplicity we include the diagonal contribution in the for-j loop, then correct the sum after @param[in] A the known system matrix @param[in] x the input vector @param[out] y On exit contains the result of one symmetric GS sweep with x as the RHS. @return returns 0 upon success and non-zero otherwise @warning Early versions of this kernel (Version 1.1 and earlier) had the r and x arguments in reverse order, and out of sync with other kernels. @see ComputeSYMGS_ref */ int ComputeSYMGS( const SparseMatrix & A, const Vector & r, Vector & x) { // This line and the next two lines should be removed and your version of ComputeSYMGS should be used. return ComputeSYMGS_ref(A, r, x); }
minyee/sst-macro
skeletons/hpcg-3.0/src/ComputeSYMGS.cpp
C++
bsd-3-clause
1,885
<?php /** * Copyright (c) 2013, Esendex Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Esendex nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category Model * @package Esendex * @author Esendex Support <support@esendex.com> * @copyright 2013 Esendex Ltd. * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause * @link https://github.com/esendex/esendex-php-sdk */ namespace Esendex\Model; class ResultItem { private $id; private $uri; /** * @param $id * @param $uri */ public function __construct($id, $uri) { $this->id = (string)$id; $this->uri = (string)$uri; } /** * @return string */ public function id() { return $this->id; } /** * @return string */ public function uri() { return $this->uri; } }
zazoomauro/esendex-php-sdk
src/Esendex/Model/ResultItem.php
PHP
bsd-3-clause
2,303
<div class="col-15 center pad-l-sm"> <input type="text" name="attr_recharge" class="center"> <div class="small-label" data-i18n="RECHARGE"></div> </div>
senatorhatty/roll20-character-sheets
5eShaped/precompiled/components/actionComponents/recharge.html
HTML
mit
156
package spvwallet // Copyright (c) 2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. /* Copied here from a btcd internal package*/ import ( "github.com/btcsuite/btcd/wire" ) // Worst case script and input/output size estimates. const ( // RedeemP2PKHSigScriptSize is the worst case (largest) serialize size // of a transaction input script that redeems a compressed P2PKH output. // It is calculated as: // // - OP_DATA_73 // - 72 bytes DER signature + 1 byte sighash // - OP_DATA_33 // - 33 bytes serialized compressed pubkey RedeemP2PKHSigScriptSize = 1 + 73 + 1 + 33 // RedeemP2SHMultisigSigScriptSize is the worst case (largest) serialize size // of a transaction input script that redeems a 2 of 3 P2SH multisig output with compressed keys. // It is calculated as: // // - OP_0 // - OP_DATA_72 // - 72 bytes DER signature // - OP_DATA_72 // - 72 bytes DER signature // - OP_PUSHDATA // - OP_2 // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP3 // - OP_CHECKMULTISIG RedeemP2SH2of3MultisigSigScriptSize = 1 + 1 + 72 + 1 + 72 + 1 + 1 + 1 + 33 + 1 + 33 + 1 + 33 + 1 + 1 // RedeemP2SH1of2MultisigSigScriptSize is the worst case (largest) serialize size // of a transaction input script that redeems a 1 of 2 P2SH multisig output with compressed keys. // It is calculated as: // // - OP_0 // - OP_DATA_72 // - 72 bytes DER signature // - OP_PUSHDATA // - OP_1 // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP2 // - OP_CHECKMULTISIG RedeemP2SH1of2MultisigSigScriptSize = 1 + 1 + 72 + 1 + 1 + 1 + 33 + 1 + 33 + 1 + 1 // RedeemP2SHMultisigTimelock1SigScriptSize is the worst case (largest) serialize size // of a transaction input script that redeems a compressed P2SH timelocked multisig using the timeout. // It is calculated as: // // - OP_DATA_72 // - 72 bytes DER signature // - OP_0 // - OP_PUSHDATA // - OP_IF // - OP_2 // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP3 // - OP_CHECKMULTISIG // - OP_ELSE // - OP_PUSHDATA // - 2 byte block height // - OP_CHECKSEQUENCEVERIFY // - OP_DROP // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_CHECKSIG // - OP_ENDIF RedeemP2SHMultisigTimelock1SigScriptSize = 1 + 72 + 1 + 1 + 1 + 1 + 1 + 33 + 1 + 33 + 1 + 33 + 1 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 33 + 1 + 1 // RedeemP2SHMultisigTimelock2SigScriptSize is the worst case (largest) serialize size // of a transaction input script that redeems a compressed P2SH timelocked multisig without using the timeout. // It is calculated as: // // - OP_0 // - OP_DATA_72 // - 72 bytes DER signature // - OP_DATA_72 // - 72 bytes DER signature // - OP_1 // - OP_PUSHDATA // - OP_IF // - OP_2 // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP3 // - OP_CHECKMULTISIG // - OP_ELSE // - OP_PUSHDATA // - 2 byte block height // - OP_CHECKSEQUENCEVERIFY // - OP_DROP // - OP_DATA_33 // - 33 bytes serialized compressed pubkey // - OP_CHECKSIG // - OP_ENDIF RedeemP2SHMultisigTimelock2SigScriptSize = 1 + 1 + 72 + +1 + 72 + 1 + 1 + 1 + 1 + 1 + 33 + 1 + 33 + 1 + 33 + 1 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 33 + 1 + 1 // P2PKHPkScriptSize is the size of a transaction output script that // pays to a compressed pubkey hash. It is calculated as: // // - OP_DUP // - OP_HASH160 // - OP_DATA_20 // - 20 bytes pubkey hash // - OP_EQUALVERIFY // - OP_CHECKSIG P2PKHPkScriptSize = 1 + 1 + 1 + 20 + 1 + 1 // RedeemP2PKHInputSize is the worst case (largest) serialize size of a // transaction input redeeming a compressed P2PKH output. It is // calculated as: // // - 32 bytes previous tx // - 4 bytes output index // - 1 byte script len // - signature script // - 4 bytes sequence RedeemP2PKHInputSize = 32 + 4 + 1 + RedeemP2PKHSigScriptSize + 4 // RedeemP2SH2of3MultisigInputSize is the worst case (largest) serialize size of a // transaction input redeeming a compressed P2SH 2 of 3 multisig output. It is // calculated as: // // - 32 bytes previous tx // - 4 bytes output index // - 1 byte script len // - 4 bytes sequence /// - witness discounted signature script RedeemP2SH2of3MultisigInputSize = 32 + 4 + 1 + 4 + (RedeemP2SH2of3MultisigSigScriptSize / 4) // RedeemP2SH1of2MultisigInputSize is the worst case (largest) serialize size of a // transaction input redeeming a compressed P2SH 2 of 3 multisig output. It is // calculated as: // // - 32 bytes previous tx // - 4 bytes output index // - 1 byte script len // - 4 bytes sequence /// - witness discounted signature script RedeemP2SH1of2MultisigInputSize = 32 + 4 + 1 + 4 + (RedeemP2SH1of2MultisigSigScriptSize / 4) // RedeemP2SHMultisigTimelock1InputSize is the worst case (largest) serialize size of a // transaction input redeeming a compressed p2sh timelocked multig output with using the timeout. It is // calculated as: // // - 32 bytes previous tx // - 4 bytes output index // - 1 byte script len // - 4 bytes sequence /// - witness discounted signature script RedeemP2SHMultisigTimelock1InputSize = 32 + 4 + 1 + 4 + (RedeemP2SHMultisigTimelock1SigScriptSize / 4) // RedeemP2SHMultisigTimelock2InputSize is the worst case (largest) serialize size of a // transaction input redeeming a compressed P2SH timelocked multisig output without using the timeout. It is // calculated as: // // - 32 bytes previous tx // - 4 bytes output index // - 1 byte script len // - 4 bytes sequence /// - witness discounted signature script RedeemP2SHMultisigTimelock2InputSize = 32 + 4 + 1 + 4 + (RedeemP2SHMultisigTimelock2SigScriptSize / 4) // P2PKHOutputSize is the serialize size of a transaction output with a // P2PKH output script. It is calculated as: // // - 8 bytes output value // - 1 byte compact int encoding value 25 // - 25 bytes P2PKH output script P2PKHOutputSize = 8 + 1 + P2PKHPkScriptSize ) type InputType int const ( P2PKH InputType = iota P2SH_1of2_Multisig P2SH_2of3_Multisig P2SH_Multisig_Timelock_1Sig P2SH_Multisig_Timelock_2Sigs ) // EstimateSerializeSize returns a worst case serialize size estimate for a // signed transaction that spends inputCount number of compressed P2PKH outputs // and contains each transaction output from txOuts. The estimated size is // incremented for an additional P2PKH change output if addChangeOutput is true. func EstimateSerializeSize(inputCount int, txOuts []*wire.TxOut, addChangeOutput bool, inputType InputType) int { changeSize := 0 outputCount := len(txOuts) if addChangeOutput { changeSize = P2PKHOutputSize outputCount++ } var redeemScriptSize int switch inputType { case P2PKH: redeemScriptSize = RedeemP2PKHInputSize case P2SH_1of2_Multisig: redeemScriptSize = RedeemP2SH1of2MultisigInputSize case P2SH_2of3_Multisig: redeemScriptSize = RedeemP2SH2of3MultisigInputSize case P2SH_Multisig_Timelock_1Sig: redeemScriptSize = RedeemP2SHMultisigTimelock1InputSize case P2SH_Multisig_Timelock_2Sigs: redeemScriptSize = RedeemP2SHMultisigTimelock2InputSize } // 10 additional bytes are for version, locktime, and segwit flags return 10 + wire.VarIntSerializeSize(uint64(inputCount)) + wire.VarIntSerializeSize(uint64(outputCount)) + inputCount*redeemScriptSize + SumOutputSerializeSizes(txOuts) + changeSize } // SumOutputSerializeSizes sums up the serialized size of the supplied outputs. func SumOutputSerializeSizes(outputs []*wire.TxOut) (serializeSize int) { for _, txOut := range outputs { serializeSize += txOut.SerializeSize() } return serializeSize }
hoffmabc/openbazaar-go
vendor/github.com/OpenBazaar/spvwallet/txsizes.go
GO
mit
8,280
GLOBAL.DEBUG = true; sys = require("sys"); test = require("assert"); var Db = require('../lib/mongodb').Db, Connection = require('../lib/mongodb').Connection, Server = require('../lib/mongodb').Server; var host = process.env['MONGO_NODE_DRIVER_HOST'] != null ? process.env['MONGO_NODE_DRIVER_HOST'] : 'localhost'; var port = process.env['MONGO_NODE_DRIVER_PORT'] != null ? process.env['MONGO_NODE_DRIVER_PORT'] : Connection.DEFAULT_PORT; sys.puts("Connecting to " + host + ":" + port); var db = new Db('node-mongo-examples', new Server(host, port, {}), {native_parser:true}); db.open(function(err, db) { db.collection('test', function(err, collection) { // Erase all records from collection, if any collection.remove(function(err, result) { // Insert 3 records for(var i = 0; i < 3; i++) { collection.insert({'a':i}); } // Cursors don't run their queries until you actually attempt to retrieve data // from them. // Find returns a Cursor, which is Enumerable. You can iterate: collection.find(function(err, cursor) { cursor.each(function(err, item) { if(item != null) sys.puts(sys.inspect(item)); }); }); // You can turn it into an array collection.find(function(err, cursor) { cursor.toArray(function(err, items) { sys.puts("count: " + items.length); }); }); // You can iterate after turning it into an array (the cursor will iterate over // the copy of the array that it saves internally.) collection.find(function(err, cursor) { cursor.toArray(function(err, items) { cursor.each(function(err, item) { if(item != null) sys.puts(sys.inspect(item)); }); }); }); // You can get the next object collection.find(function(err, cursor) { cursor.nextObject(function(err, item) { if(item != null) sys.puts(sys.inspect(item)); }); }); // next_object returns null if there are no more objects that match collection.find(function(err, cursor) { cursor.nextObject(function(err, item) { cursor.nextObject(function(err, item) { cursor.nextObject(function(err, item) { cursor.nextObject(function(err, item) { sys.puts("nextObject returned: " + sys.inspect(item)); db.close(); }); }); }); }); }); }); }); });
zencephalon/deftdraftjs
node_modules/mongoose/node_modules/mongodb/examples/cursor.js
JavaScript
mit
2,622
package spittr; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.hibernate.validator.constraints.Email; public class Spitter { private Long id; @NotNull @Size(min=5, max=16) private String username; @NotNull @Size(min=5, max=25) private String password; @NotNull @Size(min=2, max=30) private String firstName; @NotNull @Size(min=2, max=30) private String lastName; @NotNull @Email private String email; public Spitter() {} public Spitter(String username, String password, String firstName, String lastName, String email) { this(null, username, password, firstName, lastName, email); } public Spitter(Long id, String username, String password, String firstName, String lastName, String email) { this.id = id; this.username = username; this.password = password; this.firstName = firstName; this.lastName = lastName; this.email = email; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @Override public boolean equals(Object that) { return EqualsBuilder.reflectionEquals(this, that, "firstName", "lastName", "username", "password", "email"); } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "firstName", "lastName", "username", "password", "email"); } }
tcnf2008/HelloWorld
springMVC-spittr/spittr.Server/src/main/java/spittr/Spitter.java
Java
mit
2,195
'use strict'; module.exports = { up: function (queryInterface, Sequelize) { return queryInterface.bulkInsert('UserMeetings', [ { user_id: 1, meeting_id: 2 }, { user_id: 2, meeting_id: 2 }, { user_id: 3, meeting_id: 2 }, { user_id: 4, meeting_id: 2 }, { user_id: 1, meeting_id: 4 }, { user_id: 2, meeting_id: 4 }, { user_id: 3, meeting_id: 4 }, { user_id: 4, meeting_id: 4 }, { user_id: 1, meeting_id: 6 }, { user_id: 2, meeting_id: 6 }, { user_id: 3, meeting_id: 6 }, { user_id: 4, meeting_id: 6 }, { user_id: 1, meeting_id: 8 }, { user_id: 2, meeting_id: 8 }, { user_id: 3, meeting_id: 8 }, { user_id: 4, meeting_id: 8 } ], {}); }, down: function (queryInterface, Sequelize) { return queryInterface.bulkDelete('UserMeetings', null, {}); } };
Riski24/interviewer.dc
server/database/old_seeders/usermeeting.js
JavaScript
mit
1,213
<html> <head> <style type="text/css"> p { color: red; } </style> <style> strong { font-weight: bold; } p { text-decoration: underline; } </style> <link rel="stylesheet" href="Test.css"> </head> <body> <p>hello, you are my <strong>favorite</strong> person</p> </body> </html>
proofme/juice
test/html/two_styles.in.html
HTML
mit
367
require_relative '../../../../spec_helper' require 'stringio' require 'zlib' describe :gzipreader_each, shared: true do before :each do @data = "firstline\nsecondline\n\nforthline" @zip = [31, 139, 8, 0, 244, 125, 128, 88, 2, 255, 75, 203, 44, 42, 46, 201, 201, 204, 75, 229, 42, 78, 77, 206, 207, 75, 1, 51, 185, 210,242, 139, 74, 50, 64, 76, 0, 180, 54, 61, 111, 31, 0, 0, 0].pack('C*') @io = StringIO.new @zip @gzreader = Zlib::GzipReader.new @io end after :each do ScratchPad.clear end it "calls the given block for each line in the stream, passing the line as an argument" do ScratchPad.record [] @gzreader.send(@method) { |b| ScratchPad << b } ScratchPad.recorded.should == ["firstline\n", "secondline\n", "\n", "forthline"] end it "returns an enumerator, which yields each byte in the stream, when no block is passed" do enum = @gzreader.send(@method) ScratchPad.record [] while true begin ScratchPad << enum.next rescue StopIteration break end end ScratchPad.recorded.should == ["firstline\n", "secondline\n", "\n", "forthline"] end it "increments position before calling the block" do i = 0 @gzreader.send(@method) do |line| i += line.length @gzreader.pos.should == i end end end
pmq20/ruby-compiler
ruby/spec/ruby/library/zlib/gzipreader/shared/each.rb
Ruby
mit
1,352
--- layout: news title: EGI-Mobrain SLA for 75 millions CPU hours date: 2016-02-25 excerpt: EGI-MoBrain collaboration - a service level agreement for better research tags: [HADDOCK, EGI, WeNMR, grid computing, Utrecht University, Alexandre Bonvin, Docking] image: feature: --- An agreement has been made between a group of [EGI](http://www.egi.eu) resource centres and the [MoBrain](http://mobrain.egi.eu) research collaboration. The main objective of the MoBrain competence centre is to lower barriers for scientists to access modern e-Science solutions from micro to macro scales. MoBrain is represented by Prof. Alexandre Bonvin from the Faculty of Science, Utrecht University. The MoBrain collaboration relies on the existing expertise available within the [WeNMR](http://www.wenmr.eu)/[West-Life](http://www.west-life.eu) and [N4U](http://www.neugrid4you.eu) projects and technology providers (NGIs and other institutions). **Seven resource centres have pledged 75 million hours of computing time and more than 50 TB storage capacity to support the MoBrain community.** Thanks to this agreement, MoBrain will be able to access the High-Throughput Computing and File Storage services they need for their research. The resource centres involved in the agreement that will be valid for at least one year are: * INFN-PADOVA (Italy) * RAL-LCG2 (UK) * TW-NCHC (Taiwan) * SURFsara (The Netherlands) * NCG-INGRID-PT (Portugal) * NIKHEF (The Netherlands) * CESNET-MetaCloud (Czech Republic) Alexandre Bonvin, Professor at Utrecht University and leading the MoBrain consortium, comments on the collaboration: *“It is really nice to see that sites such as NIHKEF, SURFSara and INFN-PADOVA, which have always strongly supported us, are renewing their vows and that news sites are joining in this marriage. Such commitments are key to successfully serving our communities.”* Jan Bot, Senior Consultant at [SURFsara](http://www.surfsara.nl), adds: *“The important thing for us as SURF is that the MoBrain services are of benefit to a great number of researchers, both within the Netherlands and abroad. The user-friendly interface provided by this consortium enables researchers to efficiently use a complex infrastructure. The benefit of this approach has been clearly shown by the growing international community of researchers that regularly use the services. We are therefore extremely pleased that we, together with the other NGIs that have pledged resources to this EGI Competence Centre, can contribute to this area of research.”* Giuseppe la Rocca, Technical Outreach Expert at the EGI Foundation mediated the agreement and says: *“The agreement offers MoBrain the possibility to access several HTC- and cloud-based computing and storage resources which can be used to further exploit EGI services and kick-start the development of a larger and integrated virtual research environment for life and brain scientists worldwide."* Read the original news item on the [EGI website](http://www.egi.eu/news-and-media/newsfeed/news_2016_005.html).
haddocking/haddocking.github.io
news/_posts/2016-02-25-EGI-Mobrain-SLA-for-75-millions-CPU-hours.md
Markdown
mit
3,085
--- seo: title: Track Index description: How to track your email. keywords: title: Track Index weight: 100 layout: page navigation: show: true --- <div class="row"> <div class="col-md-4"> <h2><a href="#Introduction-to-Tracking">Introduction to Tracking</a></h2> <h2><a href="#Collecting-Data">Collecting Data</a></h2> </div> <div class="col-md-4"> <h2><a href="#Tracking-Bounces">Tracking Bounces</a></h2> <h2><a href="#Tracking-Clicks">Tracking Clicks</a></h2> </div> <div class="col-md-4"> <h2><a href="#Tracking-Drops">Tracking Drops</a></h2> <h2><a href="#Tracking-Unsubscribes">Tracking Unsubscribes</a></h2> </div> </div> <div class="row"> <div class="col-md-12"> {% anchor h2 %}Introduction to Tracking{% endanchor %} <ul> <li><a href="{{root_url}}Introduction/how_can_i_tell_if_an_email_was_actually_delivered.html">How can I tell if an email was actually delivered?</a></li> <li><a href="{{root_url}}Introduction/discrepancies_between_requests_and_deliveries.html">Discrepancies Between Requests and Deliveries</a></li> </ul> </div> </div> <div class="row"> <div class="col-md-12"> {% anchor h2 %}Collecting Data{% endanchor %} <ul> <li><a href="{{root_url}}Collecting_Data/can_i_download_a_list_of_click_and_or_open_events.html">Can I download a list of click and/or open events?</a></li> <li><a href="{{root_url}}Collecting_Data/google_analytics_demystified_ga_statistics_vs_sg_statistics.html">Google Analytics Demystified: GA Statistics vs SG Statistics</a></li> <li><a href="{{root_url}}Collecting_Data/new_relic.html">New Relic</a></li> <li><a href="{{root_url}}Collecting_Data/is_there_a_way_to_see_the_content_of_transactional_emails_i_send.html">Is there a way to see the content of transactional emails I send?</a></li> </ul> </div> </div> <div class="row"> <div class="col-md-12"> {% anchor h2 %}Tracking Bounces{% endanchor %} <ul> <li><a href="{{root_url}}Bounces/bounce_forwarding_and_gmail.html">Bounce Forwarding and Gmail</a></li> <li><a href="{{root_url}}Bounces/bounce_reports_how_can_i_be_notified.html">Bounce Reports&#58; How can I be notified?</a></li> <li><a href="{{root_url}}Bounces/common_smtp_server_bounce_responses.html">Common SMTP Server Bounce Responses</a></li> <li><a href="{{root_url}}Bounces/delete_from_bounce_list_option_in_email_activity.html">"Delete From Bounce List" Option in Email Activity</a></li> <li><a href="{{root_url}}Bounces/how_to_set_up_bounce_forwarding_to_go_to_the_emails_from_address.html">How to set up bounce forwarding to go to the email's FROM address</a></li> <li><a href="{{root_url}}Bounces/how_to_set_up_bounce_forwarding.html">How to set up bounce forwarding</a></li> <li><a href="{{root_url}}Bounces/implementing_bounce_notification_for_multiple_from_addresses.html">Implementing Bounce Notification For Multiple From Addresses</a></li> </ul> </div> </div> <div class="row"> <div class="col-md-12"> {% anchor h2 %}Tracking Clicks{% endanchor %} <ul> <li><a href="{{root_url}}Clicks/click_tracking_html_best_practices.html">Click Tracking & HTML Best Practices</a></li> <li><a href="{{root_url}}Clicks/click_tracking_links_have_stopped_working.html">Click tracking links have stopped working</a></li> <li><a href="{{root_url}}Clicks/clicktracking_ssl.html">Setting up SSL for click tracking</a></li> <li><a href="{{root_url}}/Glossary/ctr.html">Click-Through Rate</a></li> </ul> </div> </div> <div class="row"> <div class="col-md-12"> {% anchor h2 %}Tracking Drops{% endanchor %} <ul> <li><a href="{{root_url}}Drops/drop_reason_bounced_address.html">Drop Reason&#58; Bounced Address</a></li> <li><a href="{{root_url}}Drops/drop_reason_unsubscribed_address.html">Drop Reason&#58; Unsubscribed Address</a></li> <li><a href="{{root_url}}Drops/resend_dropped_messages.html">Can I resend messages that were dropped?</a></li> </ul> </div> </div> <div class="row"> <div class="col-md-12"> {% anchor h2 %}Tracking Unsubscribes{% endanchor %} <ul> <li><a href="{{root_url}}Unsubscribes/how_do_i_unsubscribe_a_user.html">How do I unsubscribe a user?</a></li> <li><a href="{{root_url}}Unsubscribes/unsubscribe_via_subscription_tracking.html">Unsubscribe via Subscription Tracking</a></li> <li><a href="{{root_url}}/Classroom/Deliver/Delivery_Introduction/unsubscribes_explained.html">Unsubscribes Explained</a></li> </ul> </div> </div>
hardikjain29/docs
source/Classroom/Track/index.html
HTML
mit
4,858
/* hashids http://www.hashids.org/node-js/ (c) 2013 Ivan Akimov https://github.com/ivanakimov/hashids.node.js hashids may be freely distributed under the MIT license. */ /*jslint node: true, white: true, plusplus: true */ "use strict"; function Hashids(salt, minHashLength, alphabet) { var uniqueAlphabet, i, j, len, sepsLength, diff, guardCount; this.version = "0.3.3"; /* internal settings */ this.minAlphabetLength = 16; this.sepDiv = 3.5; this.guardDiv = 12; /* error messages */ this.errorAlphabetLength = "error: alphabet must contain at least X unique characters"; this.errorAlphabetSpace = "error: alphabet cannot contain spaces"; /* alphabet vars */ this.alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; this.seps = "cfhistuCFHISTU"; this.minHashLength = parseInt(minHashLength, 10) > 0 ? minHashLength : 0; this.salt = (typeof salt === "string") ? salt : ""; if (typeof alphabet === "string") { this.alphabet = alphabet; } for (uniqueAlphabet = "", i = 0, len = this.alphabet.length; i !== len; i++) { if (uniqueAlphabet.indexOf(this.alphabet[i]) === -1) { uniqueAlphabet += this.alphabet[i]; } } this.alphabet = uniqueAlphabet; if (this.alphabet.length < this.minAlphabetLength) { throw this.errorAlphabetLength.replace("X", this.minAlphabetLength); } if (this.alphabet.search(" ") !== -1) { throw this.errorAlphabetSpace; } /* seps should contain only characters present in alphabet; alphabet should not contains seps */ for (i = 0, len = this.seps.length; i !== len; i++) { j = this.alphabet.indexOf(this.seps[i]); if (j === -1) { this.seps = this.seps.substr(0, i) + " " + this.seps.substr(i + 1); } else { this.alphabet = this.alphabet.substr(0, j) + " " + this.alphabet.substr(j + 1); } } this.alphabet = this.alphabet.replace(/ /g, ""); this.seps = this.seps.replace(/ /g, ""); this.seps = this.consistentShuffle(this.seps, this.salt); if (!this.seps.length || (this.alphabet.length / this.seps.length) > this.sepDiv) { sepsLength = Math.ceil(this.alphabet.length / this.sepDiv); if (sepsLength === 1) { sepsLength++; } if (sepsLength > this.seps.length) { diff = sepsLength - this.seps.length; this.seps += this.alphabet.substr(0, diff); this.alphabet = this.alphabet.substr(diff); } else { this.seps = this.seps.substr(0, sepsLength); } } this.alphabet = this.consistentShuffle(this.alphabet, this.salt); guardCount = Math.ceil(this.alphabet.length / this.guardDiv); if (this.alphabet.length < 3) { this.guards = this.seps.substr(0, guardCount); this.seps = this.seps.substr(guardCount); } else { this.guards = this.alphabet.substr(0, guardCount); this.alphabet = this.alphabet.substr(guardCount); } } Hashids.prototype.encrypt = function() { var ret = "", i, len, numbers = Array.prototype.slice.call(arguments); if (!numbers.length) { return ret; } if (numbers[0] instanceof Array) { numbers = numbers[0]; } for (i = 0, len = numbers.length; i !== len; i++) { if (typeof numbers[i] !== "number" || numbers[i] % 1 !== 0 || numbers[i] < 0) { return ret; } } return this.encode(numbers); }; Hashids.prototype.decrypt = function(hash) { var ret = []; if (!hash.length || typeof hash !== "string") { return ret; } return this.decode(hash, this.alphabet); }; Hashids.prototype.encryptHex = function(str) { var i, len, numbers, str = str.toString(); if (!/^[0-9a-fA-F]+$/.test(str)) { return ""; } numbers = str.match(/[\w\W]{1,12}/g); for (i = 0, len = numbers.length; i !== len; i++) { numbers[i] = parseInt("1" + numbers[i], 16); } return this.encrypt.apply(this, numbers); }; Hashids.prototype.decryptHex = function(hash) { var ret = "", i, len, numbers = this.decrypt(hash); for (i = 0, len = numbers.length; i !== len; i++) { ret += (numbers[i]).toString(16).substr(1); } return ret; }; Hashids.prototype.encode = function(numbers) { var ret, lottery, i, len, number, buffer, last, sepsIndex, guardIndex, guard, halfLength, excess, alphabet = this.alphabet, numbersSize = numbers.length, numbersHashInt = 0; for (i = 0, len = numbers.length; i !== len; i++) { numbersHashInt += (numbers[i] % (i + 100)); } lottery = ret = alphabet[numbersHashInt % alphabet.length]; for (i = 0, len = numbers.length; i !== len; i++) { number = numbers[i]; buffer = lottery + this.salt + alphabet; alphabet = this.consistentShuffle(alphabet, buffer.substr(0, alphabet.length)); last = this.hash(number, alphabet); ret += last; if (i + 1 < numbersSize) { number %= (last.charCodeAt(0) + i); sepsIndex = number % this.seps.length; ret += this.seps[sepsIndex]; } } if (ret.length < this.minHashLength) { guardIndex = (numbersHashInt + ret[0].charCodeAt(0)) % this.guards.length; guard = this.guards[guardIndex]; ret = guard + ret; if (ret.length < this.minHashLength) { guardIndex = (numbersHashInt + ret[2].charCodeAt(0)) % this.guards.length; guard = this.guards[guardIndex]; ret += guard; } } halfLength = parseInt(alphabet.length / 2, 10); while (ret.length < this.minHashLength) { alphabet = this.consistentShuffle(alphabet, alphabet); ret = alphabet.substr(halfLength) + ret + alphabet.substr(0, halfLength); excess = ret.length - this.minHashLength; if (excess > 0) { ret = ret.substr(excess / 2, this.minHashLength); } } return ret; }; Hashids.prototype.decode = function(hash, alphabet) { var ret = [], i = 0, lottery, len, subHash, buffer, r = new RegExp("[" + this.guards + "]", "g"), hashBreakdown = hash.replace(r, " "), hashArray = hashBreakdown.split(" "); if (hashArray.length === 3 || hashArray.length === 2) { i = 1; } hashBreakdown = hashArray[i]; if (typeof hashBreakdown[0] !== "undefined") { lottery = hashBreakdown[0]; hashBreakdown = hashBreakdown.substr(1); r = new RegExp("[" + this.seps + "]", "g"); hashBreakdown = hashBreakdown.replace(r, " "); hashArray = hashBreakdown.split(" "); for (i = 0, len = hashArray.length; i !== len; i++) { subHash = hashArray[i]; buffer = lottery + this.salt + alphabet; alphabet = this.consistentShuffle(alphabet, buffer.substr(0, alphabet.length)); ret.push(this.unhash(subHash, alphabet)); } if (this.encode(ret) !== hash) { ret = []; } } return ret; }; Hashids.prototype.consistentShuffle = function(alphabet, salt) { var integer, j, temp, i, v, p; if (!salt.length) { return alphabet; } for (i = alphabet.length - 1, v = 0, p = 0; i > 0; i--, v++) { v %= salt.length; p += integer = salt[v].charCodeAt(0); j = (integer + v + p) % i; temp = alphabet[j]; alphabet = alphabet.substr(0, j) + alphabet[i] + alphabet.substr(j + 1); alphabet = alphabet.substr(0, i) + temp + alphabet.substr(i + 1); } return alphabet; }; Hashids.prototype.hash = function(input, alphabet) { var hash = "", alphabetLength = alphabet.length; do { hash = alphabet[input % alphabetLength] + hash; input = parseInt(input / alphabetLength, 10); } while (input); return hash; }; Hashids.prototype.unhash = function(input, alphabet) { var number = 0, pos, i; for (i = 0; i < input.length; i++) { pos = alphabet.indexOf(input[i]); number += pos * Math.pow(alphabet.length, input.length - i - 1); } return number; }; module.exports = Hashids;
fitosegrera/mfadt_api
node_modules/phant/node_modules/phant-keychain-hex/node_modules/hashids/lib/hashids.js
JavaScript
mit
7,436
#!/usr/bin/env python # # __COPYRIGHT__ # # 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. # __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Look if qt is installed, and try out all builders. """ import os import sys import TestSCons test = TestSCons.TestSCons() if not os.environ.get('QTDIR', None): x ="External environment variable $QTDIR not set; skipping test(s).\n" test.skip_test(x) test.Qt_dummy_installation() QTDIR=os.environ['QTDIR'] test.write('SConstruct', """\ import os dummy_env = Environment() ENV = dummy_env['ENV'] try: PATH=ARGUMENTS['PATH'] if 'PATH' in ENV: ENV_PATH = PATH + os.pathsep + ENV['PATH'] else: Exit(0) # this is certainly a weird system :-) except KeyError: ENV_PATH=ENV.get('PATH', '') env = Environment(tools=['default','qt'], ENV={'PATH':ENV_PATH, 'PATHEXT':os.environ.get('PATHEXT'), 'HOME':os.getcwd(), 'SystemRoot':ENV.get('SystemRoot')}, # moc / uic want to write stuff in ~/.qt CXXFILESUFFIX=".cpp") conf = env.Configure() if not conf.CheckLib(env.subst("$QT_LIB"), autoadd=0): conf.env['QT_LIB'] = 'qt-mt' if not conf.CheckLib(env.subst("$QT_LIB"), autoadd=0): Exit(0) env = conf.Finish() VariantDir('bld', '.') env.Program('bld/test_realqt', ['bld/mocFromCpp.cpp', 'bld/mocFromH.cpp', 'bld/anUiFile.ui', 'bld/main.cpp']) """) test.write('mocFromCpp.h', """\ void mocFromCpp(); """) test.write('mocFromCpp.cpp', """\ #include <qobject.h> #include "mocFromCpp.h" class MyClass1 : public QObject { Q_OBJECT public: MyClass1() : QObject() {}; public slots: void myslot() {}; }; void mocFromCpp() { MyClass1 myclass; } #include "mocFromCpp.moc" """) test.write('mocFromH.h', """\ #include <qobject.h> class MyClass2 : public QObject { Q_OBJECT; public: MyClass2(); public slots: void myslot(); }; void mocFromH(); """) test.write('mocFromH.cpp', """\ #include "mocFromH.h" MyClass2::MyClass2() : QObject() {} void MyClass2::myslot() {} void mocFromH() { MyClass2 myclass; } """) test.write('anUiFile.ui', """\ <!DOCTYPE UI><UI> <class>MyWidget</class> <widget> <class>QWidget</class> <property name="name"> <cstring>MyWidget</cstring> </property> <property name="caption"> <string>MyWidget</string> </property> </widget> <includes> <include location="local" impldecl="in implementation">anUiFile.ui.h</include> </includes> <slots> <slot>testSlot()</slot> </slots> <layoutdefaults spacing="6" margin="11"/> </UI> """) test.write('anUiFile.ui.h', r""" #include <stdio.h> #if QT_VERSION >= 0x030100 void MyWidget::testSlot() { printf("Hello World\n"); } #endif """) test.write('main.cpp', r""" #include <qapp.h> #include "mocFromCpp.h" #include "mocFromH.h" #include "anUiFile.h" #include <stdio.h> int main(int argc, char **argv) { QApplication app(argc, argv); mocFromCpp(); mocFromH(); MyWidget mywidget; #if QT_VERSION >= 0x030100 mywidget.testSlot(); #else printf("Hello World\n"); #endif return 0; } """) test.run(arguments="bld/test_realqt" + TestSCons._exe) test.run(program=test.workpath("bld", "test_realqt"), stdout=None, status=None, stderr=None) if test.stdout() != "Hello World\n" or test.stderr() != '' or test.status: sys.stdout.write(test.stdout()) sys.stderr.write(test.stderr()) # The test might be run on a system that doesn't have an X server # running, or may be run by an ID that can't connect to the server. # If so, then print whatever it showed us (which is in and of itself # an indication that it built correctly) but don't fail the test. expect = 'cannot connect to X server' test.fail_test(test.stdout()) test.fail_test(test.stderr().find(expect) == -1) if test.status != 1 and (test.status>>8) != 1: sys.stdout.write('test_realqt returned status %s\n' % test.status) test.fail_test() QTDIR = os.environ['QTDIR'] PATH = os.environ['PATH'] os.environ['QTDIR']='' os.environ['PATH']='.' test.run(stderr=None, arguments="-c bld/test_realqt" + TestSCons._exe) expect1 = "scons: warning: Could not detect qt, using empty QTDIR" expect2 = "scons: warning: Could not detect qt, using moc executable as a hint" test.fail_test(test.stderr().find(expect1) == -1 and test.stderr().find(expect2) == -1) test.pass_test() # Local Variables: # tab-width:4 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth=4:
timj/scons
test/QT/installed.py
Python
mit
5,726
using System; using System.Collections; using System.Collections.Generic; class LinkedList<T> : IEnumerable<T> { public T Value { get; set; } public LinkedList<T> NextNode { get; private set; } public LinkedList(T value, LinkedList<T> nextNode = null) { this.Value = value; this.NextNode = nextNode; } IEnumerator IEnumerable.GetEnumerator() { // Call the generic version of the method return this.GetEnumerator(); } public IEnumerator<T> GetEnumerator() { LinkedList<T> currentNode = this; while (currentNode != null) { yield return currentNode.Value; currentNode = currentNode.NextNode; } } }
DimitarDKirov/Object-Oriented-Programming-2016
Topics/06. Common-Type-System/demos/ImplementingIEnumerable/LinkedList.cs
C#
mit
635
<?php namespace Oro\Bundle\CalendarBundle\Provider; use Oro\Bundle\CalendarBundle\Entity\Repository\CalendarEventRepository; use Oro\Bundle\CalendarBundle\Entity\Repository\SystemCalendarRepository; use Oro\Bundle\CalendarBundle\Entity\SystemCalendar; use Oro\Bundle\EntityBundle\ORM\DoctrineHelper; use Oro\Bundle\SecurityBundle\SecurityFacade; /** * Represents system wide calendars */ class PublicCalendarProvider implements CalendarProviderInterface { /** @var DoctrineHelper */ protected $doctrineHelper; /** @var AbstractCalendarEventNormalizer */ protected $calendarEventNormalizer; /** @var SystemCalendarConfig */ protected $calendarConfig; /** @var SecurityFacade */ protected $securityFacade; /** * @param DoctrineHelper $doctrineHelper * @param AbstractCalendarEventNormalizer $calendarEventNormalizer * @param SystemCalendarConfig $calendarConfig * @param SecurityFacade $securityFacade */ public function __construct( DoctrineHelper $doctrineHelper, AbstractCalendarEventNormalizer $calendarEventNormalizer, SystemCalendarConfig $calendarConfig, SecurityFacade $securityFacade ) { $this->doctrineHelper = $doctrineHelper; $this->calendarEventNormalizer = $calendarEventNormalizer; $this->calendarConfig = $calendarConfig; $this->securityFacade = $securityFacade; } /** * {@inheritdoc} */ public function getCalendarDefaultValues($organizationId, $userId, $calendarId, array $calendarIds) { $result = []; if (!$this->calendarConfig->isPublicCalendarEnabled()) { foreach ($calendarIds as $id) { $result[$id] = null; } return $result; } /** @var SystemCalendarRepository $repo */ $repo = $this->doctrineHelper->getEntityRepository('OroCalendarBundle:SystemCalendar'); $qb = $repo->getPublicCalendarsQueryBuilder(); /** @var SystemCalendar[] $calendars */ $calendars = $qb->getQuery()->getResult(); $isEventManagementGranted = $this->securityFacade->isGranted('oro_public_calendar_event_management'); foreach ($calendars as $calendar) { $resultItem = [ 'calendarName' => $calendar->getName(), 'backgroundColor' => $calendar->getBackgroundColor(), 'removable' => false, 'position' => -80, ]; if ($isEventManagementGranted) { $resultItem['canAddEvent'] = true; $resultItem['canEditEvent'] = true; $resultItem['canDeleteEvent'] = true; } $result[$calendar->getId()] = $resultItem; } return $result; } /** * {@inheritdoc} */ public function getCalendarEvents( $organizationId, $userId, $calendarId, $start, $end, $connections, $extraFields = [] ) { if (!$this->calendarConfig->isPublicCalendarEnabled()) { return []; } /** @var CalendarEventRepository $repo */ $repo = $this->doctrineHelper->getEntityRepository('OroCalendarBundle:CalendarEvent'); $qb = $repo->getPublicEventListByTimeIntervalQueryBuilder( $start, $end, [], $extraFields ); $invisibleIds = []; foreach ($connections as $id => $visible) { if (!$visible) { $invisibleIds[] = $id; } } if (!empty($invisibleIds)) { $qb ->andWhere('c.id NOT IN (:invisibleIds)') ->setParameter('invisibleIds', $invisibleIds); } return $this->calendarEventNormalizer->getCalendarEvents($calendarId, $qb->getQuery()); } }
northdakota/platform
src/Oro/Bundle/CalendarBundle/Provider/PublicCalendarProvider.php
PHP
mit
3,987
# s = Onetime::Session.load '' class Onetime::Session < Familia::HashKey @values = Familia::SortedSet.new name.to_s.downcase.gsub('::', Familia.delim).to_sym, :db => 1 class << self attr_reader :values def add sess self.values.add OT.now.to_i, sess.identifier self.values.remrangebyscore 0, OT.now.to_i-2.days end def all self.values.revrangeraw(0, -1).collect { |identifier| load(identifier) } end def recent duration=30.days spoint, epoint = OT.now.to_i-duration, OT.now.to_i self.values.rangebyscoreraw(spoint, epoint).collect { |identifier| load(identifier) } end end include Onetime::Models::RedisHash include Onetime::Models::RateLimited attr_reader :entropy def initialize ipaddress=nil, useragent=nil, custid=nil @ipaddress, @custid, @useragent = ipaddress, custid, useragent # must be nil or have values! @entropy = [ipaddress, custid, useragent] # TODO: This calls Entropy every time @sessid = "anon" super name, :db => 1, :ttl => 20.minutes end class << self def exists? sessid sess = new sess.sessid = sessid sess.exists? end def load sessid sess = new sess.sessid = sessid sess.exists? ? (add(sess); sess) : nil end def create ipaddress, custid, useragent=nil sess = new ipaddress, custid, useragent # force the storing of the fields to redis sess.update_sessid sess.ipaddress, sess.custid, sess.useragent = ipaddress, custid, useragent sess.save add sess sess end def generate_id *entropy entropy << OT.entropy input = [OT.instance, OT.now.to_f, :session, *entropy].join(':') # Not using gibbler to make sure it's always SHA512 Digest::SHA512.hexdigest(input).to_i(16).to_s(36) # base-36 encoding end end def sessid= sid @sessid = sid @name = name @sessid end def set_form_fields hsh self.form_fields = hsh.to_json unless hsh.nil? end def get_form_fields! fields_json = self.form_fields! return if fields_json.nil? OT::Utils.indifferent_params Yajl::Parser.parse(fields_json) end def identifier @sessid # Don't call the method end # Used by the limiter to estimate a unique client. We can't use # the session ID b/c they can choose to not send the cookie. def external_identifier elements = [] elements << ipaddress || 'UNKNOWNIP' elements << custid || 'anon' #OT.ld "sess identifier input: #{elements.inspect}" @external_identifier ||= elements.gibbler.base(36) @external_identifier end def stale? self[:stale].to_s == "true" end def update_fields hsh={} hsh[:sessid] ||= sessid super hsh end def update_sessid self.sessid = self.class.generate_id *entropy end def replace! @custid ||= self[:custid] newid = self.class.generate_id @entropy rename name(newid) if exists? @sessid = newid # This update is important b/c it ensures that the # data gets written to redis. update_fields :stale => false sessid end def shrimp? guess shrimp = self[:shrimp].to_s (!shrimp.empty?) && shrimp == guess.to_s end def add_shrimp ret = self.shrimp if ret.to_s.empty? ret = self.shrimp = self.class.generate_id(sessid, custid, :shrimp) end ret end def clear_shrimp! delete :shrimp nil end def authenticated? self.authenticated.to_s == 'true' end def anonymous? sessid.to_s == 'anon' || sessid.to_s.empty? end def load_customer return OT::Customer.anonymous if anonymous? cust = OT::Customer.load custid cust.nil? ? OT::Customer.anonymous : cust end def set_error_message msg self.error_message = msg end def set_info_message msg self.info_message = msg end def session_group groups sessid.to_i(16) % groups.to_i end def opera?() @agent.to_s =~ /opera/i end def firefox?() @agent.to_s =~ /firefox/i end def chrome?() !(@agent.to_s =~ /chrome/i).nil? end def safari?() (@agent.to_s =~ /safari/i && !chrome?) end def konqueror?() @agent.to_s =~ /konqueror/i end def ie?() (@agent.to_s =~ /msie/i && !opera?) end def gecko?() (@agent.to_s =~ /gecko/i && !webkit?) end def webkit?() @agent.to_s =~ /webkit/i end def stella?() @agent.to_s =~ /stella/i end def superfeedr?() @agent.to_s =~ /superfeedr/i end def google?() @agent.to_s =~ /google/i end def yahoo?() @agent.to_s =~ /yahoo/i end def yandex?() @agent.to_s =~ /yandex/i end def baidu?() @agent.to_s =~ /baidu/i end def stella?() @agent.to_s =~ /stella/i end def searchengine?() @agent.to_s =~ /\b(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg|Yahoo|bing|superfeedr)\b/i end def clitool?() @agent.to_s =~ /curl|wget/i || stella? end def human?() !searchengine? && !superfeedr? && !clitool? && !stella? end private end
10xEngineer/onetimesecret
lib/onetime/models/session.rb
Ruby
mit
5,401
class Roda module RodaPlugins # The not_found plugin adds a +not_found+ class method which sets # a block that is called whenever a 404 response with an empty body # would be returned. The usual use case for this is the desire for # nice error pages if the page is not found. # # You can provide the block with the plugin call: # # plugin :not_found do # "Where did it go?" # end # # Or later via a separate call to +not_found+: # # plugin :not_found # # not_found do # "Where did it go?" # end # # Before not_found is called, any existing headers on the response # will be cleared. So if you want to be sure the headers are set # even in a not_found block, you need to reset them in the # not_found block. # # This plugin is now a wrapper around the +status_handler+ plugin and # still exists mainly for backward compatibility. module NotFound # Require the status_handler plugin def self.load_dependencies(app) app.plugin :status_handler end # If a block is given, install the block as the not_found handler. def self.configure(app, &block) if block app.not_found(&block) end end module ClassMethods # Install the given block as the not_found handler. def not_found(&block) status_handler(404, &block) end end end register_plugin(:not_found, NotFound) end end
Freaky/roda
lib/roda/plugins/not_found.rb
Ruby
mit
1,524
// ------------------------------------------------------------------------------ // Copyright (c) 2014 Microsoft Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including 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. // ------------------------------------------------------------------------------ namespace Microsoft.Live { using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Threading; using System.Threading.Tasks; using Microsoft.Live.Phone; using Microsoft.Live.Phone.Operations; using Microsoft.Live.Operations; using Microsoft.Phone.BackgroundTransfer; /// <summary> /// This is the class that applications use to interact with the Api service. /// </summary> public sealed partial class LiveConnectClient { #region Fields private IBackgroundTransferService backgroundTransferService; #endregion #region Properties /// <summary> /// Settings for when Background Transfers are allowed to execute. /// </summary> public BackgroundTransferPreferences BackgroundTransferPreferences { get; set; } internal IBackgroundTransferService BackgroundTransferService { get { return this.backgroundTransferService ?? (this.backgroundTransferService = PhoneBackgroundTransferService.Instance); } set { Debug.Assert(value != null); this.backgroundTransferService = value; } } #endregion #region Public Methods /// <summary> /// Downloads the resource with the given path to the downloadLocation using the Windows Phone /// BackgroundTransferService. /// </summary> /// <param name="path">Path to the resource to download</param> /// <param name="downloadLocation"> /// The path to the file that will contain the download resource. /// The downloadLocation must exist in /shared/transfers. /// </param> /// <returns>A Task object representing the asynchronous operation.</returns> public Task<LiveOperationResult> BackgroundDownloadAsync( string path, Uri downloadLocation) { return this.BackgroundDownloadAsync(path, downloadLocation, new CancellationToken(false), null); } /// <summary> /// Downloads the resource with the given path to the downloadLocation using the Windows Phone /// BackgroundTransferService. /// </summary> /// <param name="path">Path to the resource to download</param> /// <param name="downloadLocation"> /// The path to the file that will contain the download resource. /// The downloadLocation must exist in /shared/transfers. /// </param> /// <param name="ct">a token that is used to cancel the background download operation.</param> /// <param name="progress">an object that is called to report the background download's progress.</param> /// <returns>A Task object representing the asynchronous operation.</returns> public async Task<LiveOperationResult> BackgroundDownloadAsync( string path, Uri downloadLocation, CancellationToken ct, IProgress<LiveOperationProgress> progress) { if (string.IsNullOrWhiteSpace(path)) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("UrlInvalid"), "path"); if (path == null) { throw new ArgumentNullException("path", message); } throw new ArgumentException(message, "path"); } if (downloadLocation == null) { throw new ArgumentNullException("downloadLocation"); } string filename = Path.GetFileName(downloadLocation.OriginalString); if (string.IsNullOrEmpty(filename)) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("UriMissingFileName"), "downloadLocation"); throw new ArgumentException(message, "downloadLocation"); } if (!BackgroundTransferHelper.IsRootedInSharedTransfers(downloadLocation)) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("UriMustBeRootedInSharedTransfers"), "downloadLocation"); throw new ArgumentException(message, "downloadLocation"); } if (this.Session == null) { throw new LiveConnectException(ApiOperation.ApiClientErrorCode, ResourceHelper.GetString("UserNotLoggedIn")); } Uri requestUri = this.GetResourceUri(path, ApiMethod.Download); var builder = new BackgroundDownloadOperation.Builder { RequestUri = requestUri, DownloadLocationOnDevice = downloadLocation, BackgroundTransferService = this.BackgroundTransferService, Progress = progress, BackgroundTransferPreferences = this.BackgroundTransferPreferences }; if (!this.Session.IsValid) { LiveLoginResult result = await this.Session.AuthClient.RefreshTokenAsync(); if (result.Status == LiveConnectSessionStatus.Connected) { this.Session = result.Session; } } builder.AccessToken = this.Session.AccessToken; BackgroundDownloadOperation operation = builder.Build(); ct.Register(operation.Cancel); return await operation.ExecuteAsync(); } /// <summary> /// Uploads a file to the given path using the Windows Phone BackgroundTransferService. /// </summary> /// <param name="path">The path to the folder to upload the file to.</param> /// <param name="uploadLocation">The location of the file on the device to upload.</param> /// <param name="option">an enum to specify the overwrite behavior if a file with the same name already exists.</param> /// <returns>A Task object representing the asynchronous operation.</returns> public Task<LiveOperationResult> BackgroundUploadAsync( string path, Uri uploadLocation, OverwriteOption option) { return this.BackgroundUploadAsync(path, uploadLocation, option, new CancellationToken(false), null); } /// <summary> /// Uploads a file to the given path using the Windows Phone BackgroundTransferService. /// </summary> /// <param name="path">The path to the folder to upload the file to.</param> /// <param name="uploadLocation">The location of the file on the device to upload.</param> /// <param name="option">an enum to specify the overwrite behavior if a file with the same name already exists.</param> /// <param name="ct">a token that is used to cancel the background upload operation.</param> /// <param name="progress">an object that is called to report the background upload's progress.</param> /// <returns>A Task object representing the asynchronous operation.</returns> public Task<LiveOperationResult> BackgroundUploadAsync( string path, Uri uploadLocation, OverwriteOption option, CancellationToken ct, IProgress<LiveOperationProgress> progress) { if (path == null) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("UrlInvalid"), "path"); throw new ArgumentNullException("path", message); } if (uploadLocation == null) { throw new ArgumentNullException("uploadLocation"); } string filename = Path.GetFileName(uploadLocation.OriginalString); if (string.IsNullOrEmpty(filename)) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("UriMissingFileName"), "uploadLocation"); throw new ArgumentException(message, "uploadLocation"); } if (!BackgroundTransferHelper.IsRootedInSharedTransfers(uploadLocation)) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("UriMustBeRootedInSharedTransfers"), "uploadLocation"); throw new ArgumentException(message, "uploadLocation"); } if (this.Session == null) { throw new LiveConnectException(ApiOperation.ApiClientErrorCode, ResourceHelper.GetString("UserNotLoggedIn")); } var builder = new BackgroundUploadOperation.Builder { BackgroundTransferService = this.BackgroundTransferService, Client = this, Path = path, UploadLocationOnDevice = uploadLocation, OverwriteOption = option, Progress = progress, BackgroundTransferPreferences = this.BackgroundTransferPreferences }; BackgroundUploadOperation operation = builder.Build(); ct.Register(operation.Cancel); return operation.ExecuteAsync(); } /// <summary> /// Retrieves all the pending background downloads created by the Live SDK. /// Useful for when the application comes back from a tombstoned or out of memory state. /// </summary> /// <returns>All the pending background downloads created by the Live SDK.</returns> public IEnumerable<LivePendingDownload> GetPendingBackgroundDownloads() { var requests = new List<BackgroundTransferRequest>(); this.BackgroundTransferService.FindAllLiveSdkRequests(requests); var downloads = new List<LivePendingDownload>(); foreach (BackgroundTransferRequest request in requests) { if (BackgroundTransferHelper.IsDownloadRequest(request)) { downloads.Add(new LivePendingDownload(this.BackgroundTransferService, request)); } } return downloads; } /// <summary> /// Retrieves all the pending background uploads created by the Live SDK. /// Useful for when the application comes back from a tombstoned or out of memory state. /// </summary> /// <returns>All the pending background uploads created by the Live SDK.</returns> public IEnumerable<LivePendingUpload> GetPendingBackgroundUploads() { var requests = new List<BackgroundTransferRequest>(); this.BackgroundTransferService.FindAllLiveSdkRequests(requests); var uploads = new List<LivePendingUpload>(); foreach (BackgroundTransferRequest request in requests) { if (BackgroundTransferHelper.IsUploadRequest(request)) { uploads.Add(new LivePendingUpload(this.backgroundTransferService, request)); } } return uploads; } /// <summary> /// Download a file into a stream. /// </summary> /// <param name="path">relative or absolute uri to the file to be downloaded.</param> /// <returns>A Task object representing the asynchronous operation.</returns> public Task<LiveDownloadOperationResult> DownloadAsync(string path) { return this.DownloadAsync(path, new CancellationToken(false), null); } /// <summary> /// Download a file into a stream. /// </summary> /// <param name="path">relative or absolute uri to the file to be downloaded.</param> /// <param name="ct">a token that is used to cancel the download operation.</param> /// <param name="progress">an object that is called to report the download's progress.</param> /// <returns>A Task object representing the asynchronous operation.</returns> public Task<LiveDownloadOperationResult> DownloadAsync( string path, CancellationToken ct, IProgress<LiveOperationProgress> progress) { if (string.IsNullOrEmpty(path)) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("UrlInvalid"), "path"); throw new ArgumentException(message, "path"); } if (this.Session == null) { throw new LiveConnectException(ApiOperation.ApiClientErrorCode, ResourceHelper.GetString("UserNotLoggedIn")); } var tcs = new TaskCompletionSource<LiveDownloadOperationResult>(); var operation = new DownloadOperation( this, this.GetResourceUri(path, ApiMethod.Download), progress != null ? new Action<LiveOperationProgress>(progress.Report) : null, SynchronizationContextWrapper.Current) { OperationCompletedCallback = (LiveDownloadOperationResult result) => { if (result.IsCancelled) { tcs.TrySetCanceled(); } else if (result.Error != null) { tcs.TrySetException(result.Error); } else { tcs.TrySetResult(result); } } }; ct.Register(operation.Cancel); operation.Execute(); return tcs.Task; } /// <summary> /// Upload a file to the server. /// </summary> /// <param name="path">relative or absolute uri to the location where the file should be uploaded to.</param> /// <param name="fileName">name for the uploaded file.</param> /// <param name="inputStream">Stream that contains the file content.</param> /// <param name="option">an enum to specify the overwrite behavior if a file with the same name already exists.</param> /// <returns>A Task object representing the asynchronous operation.</returns> public Task<LiveOperationResult> UploadAsync( string path, string fileName, Stream inputStream, OverwriteOption option) { return this.UploadAsync( path, fileName, inputStream, option, new CancellationToken(false), null); } /// <summary> /// Upload a file to the server. /// </summary> /// <param name="path">relative or absolute uri to the location where the file should be uploaded to.</param> /// <param name="fileName">name for the uploaded file.</param> /// <param name="inputStream">Stream that contains the file content.</param> /// <param name="option">an enum to specify the overwrite behavior if a file with the same name already exists.</param> /// <param name="ct">a token that is used to cancel the upload operation.</param> /// <param name="progress">an object that is called to report the upload's progress.</param> /// <returns>A Task object representing the asynchronous operation.</returns> public Task<LiveOperationResult> UploadAsync( string path, string fileName, Stream inputStream, OverwriteOption option, CancellationToken ct, IProgress<LiveOperationProgress> progress) { if (string.IsNullOrEmpty(path)) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("UrlInvalid"), "path"); throw new ArgumentException(message, "path"); } if (string.IsNullOrEmpty(fileName)) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("InvalidNullOrEmptyParameter"), "fileName"); throw new ArgumentException(message, "fileName"); } if (inputStream == null) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("InvalidNullParameter"), "inputStream"); throw new ArgumentNullException("inputStream", message); } if (!inputStream.CanRead) { string message = String.Format(CultureInfo.CurrentUICulture, ResourceHelper.GetString("StreamNotReadable"), "inputStream"); throw new ArgumentException(message, "inputStream"); } var operation = new UploadOperation( this, this.GetResourceUri(path, ApiMethod.Upload), fileName, inputStream, option, progress != null ? new Action<LiveOperationProgress>(progress.Report) : null, SynchronizationContextWrapper.Current); return this.ExecuteApiOperation(operation, ct); } #endregion } }
arashkeivan/LiveSDK-for-Windows
src/WP8/Source/Public/LiveConnectClient.cs
C#
mit
19,879
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // //=============================================================================// #include "cbase.h" #include "gameinterface.h" #include "mapentities.h" #include "hl2mp_gameinterface.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" // -------------------------------------------------------------------------------------------- // // Mod-specific CServerGameClients implementation. // -------------------------------------------------------------------------------------------- // void CServerGameClients::GetPlayerLimits( int& minplayers, int& maxplayers, int &defaultMaxPlayers ) const { minplayers = defaultMaxPlayers = 2; maxplayers = 16; } // -------------------------------------------------------------------------------------------- // // Mod-specific CServerGameDLL implementation. // -------------------------------------------------------------------------------------------- // void CServerGameDLL::LevelInit_ParseAllEntities( const char *pMapEntities ) { }
scen/ionlib
src/sdk/hl2_ob/game/server/hl2mp/hl2mp_gameinterface.cpp
C++
mit
1,131
<?php namespace Codeception\Util\Connector; use Symfony\Component\BrowserKit\Request; use Symfony\Component\BrowserKit\Response; class Kohana extends \Symfony\Component\BrowserKit\Client { public function setIndex($index) { $this->index = $index; } public function doRequest($request) { $_COOKIE = $request->getCookies(); $_SERVER = $request->getServer(); $_FILES = $request->getFiles(); $uri = str_replace('http://localhost', '', $request->getUri()); $_SERVER['KOHANA_ENV'] = 'testing'; $_SERVER['REQUEST_METHOD'] = strtoupper($request->getMethod()); $_SERVER['REQUEST_URI'] = strtoupper($uri); $this->_initRequest(); $kohanaRequest = \Request::factory($uri); $kohanaRequest->method($_SERVER['REQUEST_METHOD']); if (strtoupper($request->getMethod()) == 'GET') { $kohanaRequest->query($request->getParameters()); } if (strtoupper($request->getMethod()) == 'POST') { $kohanaRequest->post($request->getParameters()); } $kohanaRequest->cookie($_COOKIE); $kohanaRequest::$initial = $kohanaRequest; $content = $kohanaRequest->execute()->render(); $headers = (array)$kohanaRequest->response()->headers(); $headers['Content-type'] = "text/html; charset=UTF-8"; $response = new Response($content, 200, $headers); return $response; } protected function _initRequest() { static $is_first_call; if ($is_first_call === Null) { $is_first_call = true; } if ($is_first_call) { $is_first_call = false; include $this->index; } } }
octopoda/aiga-design-week-2013
vendor/codeception/codeception/src/Codeception/Util/Connector/Kohana.php
PHP
mit
1,511
"""Support functions for working with wheel files. """ from __future__ import absolute_import import logging from email.parser import Parser from zipfile import ZipFile from pip._vendor.packaging.utils import canonicalize_name from pip._vendor.pkg_resources import DistInfoDistribution from pip._vendor.six import PY2, ensure_str from pip._internal.exceptions import UnsupportedWheel from pip._internal.utils.pkg_resources import DictMetadata from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from email.message import Message from typing import Dict, Tuple from pip._vendor.pkg_resources import Distribution if PY2: from zipfile import BadZipfile as BadZipFile else: from zipfile import BadZipFile VERSION_COMPATIBLE = (1, 0) logger = logging.getLogger(__name__) class WheelMetadata(DictMetadata): """Metadata provider that maps metadata decoding exceptions to our internal exception type. """ def __init__(self, metadata, wheel_name): # type: (Dict[str, bytes], str) -> None super(WheelMetadata, self).__init__(metadata) self._wheel_name = wheel_name def get_metadata(self, name): # type: (str) -> str try: return super(WheelMetadata, self).get_metadata(name) except UnicodeDecodeError as e: # Augment the default error with the origin of the file. raise UnsupportedWheel( "Error decoding metadata for {}: {}".format( self._wheel_name, e ) ) def pkg_resources_distribution_for_wheel(wheel_zip, name, location): # type: (ZipFile, str, str) -> Distribution """Get a pkg_resources distribution given a wheel. :raises UnsupportedWheel: on any errors """ info_dir, _ = parse_wheel(wheel_zip, name) metadata_files = [ p for p in wheel_zip.namelist() if p.startswith("{}/".format(info_dir)) ] metadata_text = {} # type: Dict[str, bytes] for path in metadata_files: # If a flag is set, namelist entries may be unicode in Python 2. # We coerce them to native str type to match the types used in the rest # of the code. This cannot fail because unicode can always be encoded # with UTF-8. full_path = ensure_str(path) _, metadata_name = full_path.split("/", 1) try: metadata_text[metadata_name] = read_wheel_metadata_file( wheel_zip, full_path ) except UnsupportedWheel as e: raise UnsupportedWheel( "{} has an invalid wheel, {}".format(name, str(e)) ) metadata = WheelMetadata(metadata_text, location) return DistInfoDistribution( location=location, metadata=metadata, project_name=name ) def parse_wheel(wheel_zip, name): # type: (ZipFile, str) -> Tuple[str, Message] """Extract information from the provided wheel, ensuring it meets basic standards. Returns the name of the .dist-info directory and the parsed WHEEL metadata. """ try: info_dir = wheel_dist_info_dir(wheel_zip, name) metadata = wheel_metadata(wheel_zip, info_dir) version = wheel_version(metadata) except UnsupportedWheel as e: raise UnsupportedWheel( "{} has an invalid wheel, {}".format(name, str(e)) ) check_compatibility(version, name) return info_dir, metadata def wheel_dist_info_dir(source, name): # type: (ZipFile, str) -> str """Returns the name of the contained .dist-info directory. Raises AssertionError or UnsupportedWheel if not found, >1 found, or it doesn't match the provided name. """ # Zip file path separators must be / subdirs = list(set(p.split("/")[0] for p in source.namelist())) info_dirs = [s for s in subdirs if s.endswith('.dist-info')] if not info_dirs: raise UnsupportedWheel(".dist-info directory not found") if len(info_dirs) > 1: raise UnsupportedWheel( "multiple .dist-info directories found: {}".format( ", ".join(info_dirs) ) ) info_dir = info_dirs[0] info_dir_name = canonicalize_name(info_dir) canonical_name = canonicalize_name(name) if not info_dir_name.startswith(canonical_name): raise UnsupportedWheel( ".dist-info directory {!r} does not start with {!r}".format( info_dir, canonical_name ) ) # Zip file paths can be unicode or str depending on the zip entry flags, # so normalize it. return ensure_str(info_dir) def read_wheel_metadata_file(source, path): # type: (ZipFile, str) -> bytes try: return source.read(path) # BadZipFile for general corruption, KeyError for missing entry, # and RuntimeError for password-protected files except (BadZipFile, KeyError, RuntimeError) as e: raise UnsupportedWheel( "could not read {!r} file: {!r}".format(path, e) ) def wheel_metadata(source, dist_info_dir): # type: (ZipFile, str) -> Message """Return the WHEEL metadata of an extracted wheel, if possible. Otherwise, raise UnsupportedWheel. """ path = "{}/WHEEL".format(dist_info_dir) # Zip file path separators must be / wheel_contents = read_wheel_metadata_file(source, path) try: wheel_text = ensure_str(wheel_contents) except UnicodeDecodeError as e: raise UnsupportedWheel("error decoding {!r}: {!r}".format(path, e)) # FeedParser (used by Parser) does not raise any exceptions. The returned # message may have .defects populated, but for backwards-compatibility we # currently ignore them. return Parser().parsestr(wheel_text) def wheel_version(wheel_data): # type: (Message) -> Tuple[int, ...] """Given WHEEL metadata, return the parsed Wheel-Version. Otherwise, raise UnsupportedWheel. """ version_text = wheel_data["Wheel-Version"] if version_text is None: raise UnsupportedWheel("WHEEL is missing Wheel-Version") version = version_text.strip() try: return tuple(map(int, version.split('.'))) except ValueError: raise UnsupportedWheel("invalid Wheel-Version: {!r}".format(version)) def check_compatibility(version, name): # type: (Tuple[int, ...], str) -> None """Raises errors or warns if called with an incompatible Wheel-Version. Pip should refuse to install a Wheel-Version that's a major series ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when installing a version only minor version ahead (e.g 1.2 > 1.1). version: a 2-tuple representing a Wheel-Version (Major, Minor) name: name of wheel or package to raise exception about :raises UnsupportedWheel: when an incompatible Wheel-Version is given """ if version[0] > VERSION_COMPATIBLE[0]: raise UnsupportedWheel( "%s's Wheel-Version (%s) is not compatible with this version " "of pip" % (name, '.'.join(map(str, version))) ) elif version > VERSION_COMPATIBLE: logger.warning( 'Installing from a newer Wheel-Version (%s)', '.'.join(map(str, version)), )
xavfernandez/pip
src/pip/_internal/utils/wheel.py
Python
mit
7,302
//----------------------------------------------------------------------------- // Copyright (c) 2013 GarageGames, LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without 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 "platformEmscripten/platformEmscripten.h" #include "platform/menus/popupMenu.h" #include "memory/safeDelete.h" #include "gui/guiCanvas.h" S32 PopupMenu::insertItem(S32 pos, const char *title, const char* accel) { return 0; } S32 PopupMenu::insertSubMenu(S32 pos, const char *title, PopupMenu *submenu) { return 0; } void PopupMenu::removeItem(S32 itemPos) {} void PopupMenu::enableItem(S32 pos, bool enable) {} void PopupMenu::checkItem(S32 pos, bool checked) {} void PopupMenu::checkRadioItem(S32 firstPos, S32 lastPos, S32 checkPos) {} bool PopupMenu::isItemChecked(S32 pos) { return false; } bool PopupMenu::canHandleID(U32 iD) { return false; } bool PopupMenu::handleSelect(U32 command, const char *text /* = NULL */) { return false; } void PopupMenu::showPopup(S32 x /* = -1 */, S32 y /* = -1 */) {} void PopupMenu::attachToMenuBar(S32 pos, const char *title) {} void PopupMenu::removeFromMenuBar() {} void PopupMenu::createPlatformPopupMenuData() {} void PopupMenu::deletePlatformPopupMenuData() {} void PopupMenu::createPlatformMenu() {}
greenfire27/Torque2D
engine/source/platformEmscripten/menus/popupMenu.cpp
C++
mit
2,419
// // SocketFactory.cs: Creates bound sockets of various types to use. // // Author: // Brian Nickel (brian.nickel@gmail.com) // // Copyright (C) 2007 Brian Nickel // // 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. // using System; using Mono.WebServer.FastCgi.Sockets; namespace Mono.FastCgi { [Obsolete] public static class SocketFactory { public static Socket CreateTcpSocket (System.Net.IPEndPoint localEndPoint) { if (localEndPoint == null) throw new ArgumentNullException ("localEndPoint"); return new TcpSocket (localEndPoint); } public static Socket CreateTcpSocket (System.Net.IPAddress address, int port) { if (address == null) throw new ArgumentNullException ("address"); return new TcpSocket (address, port); } public static Socket CreateUnixSocket (string path) { if (path == null) throw new ArgumentNullException ("path"); return new UnixSocket (path); } public static Socket CreateUnixSocket (string path, ushort? permissions) { if (path == null) throw new ArgumentNullException ("path"); return new UnixSocket (path, permissions); } public static Socket CreatePipeSocket (IntPtr sock) { return new UnmanagedSocket (sock); } } }
directhex/xamarin-xsp
src/Mono.WebServer.FastCgi/Obsolete/SocketFactory.cs
C#
mit
2,345
module Asposebarcodejava module HideCodeText def initialize() data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/' # Instantiate barcode object builder = Rjb::import('com.aspose.barcode.BarCodeBuilder').new builder.setSymbologyType(Rjb::import('com.aspose.barcode.Symbology').DataMatrix) builder.setCodeText("The quick brown fox jumps over the lazy dog\n The quick brown fox jumps over the lazy dog\n"); builder.setCodeLocation(Rjb::import('com.aspose.barcode.CodeLocation').None) font = Rjb::import('java.awt.Font') builder.setCodeTextFont(font.new("Serif", font.BOLD + font.ITALIC, 20)) # Save the image builder.save(data_dir + "HideCodeText.jpg") # Display Status puts "Hide Code Text Successfully." end end end
asposebarcode/Aspose_BarCode_Java
Plugins/Aspose_Barcode_Java_for_Ruby/lib/asposebarcodejava/2DBarcode/hidecodetext.rb
Ruby
mit
888
<?php namespace Oro\Bundle\EntityConfigBundle\Event; use Oro\Bundle\EntityConfigBundle\Entity\ConfigModel; use Oro\Bundle\EntityConfigBundle\Config\ConfigManager; class PostFlushConfigEvent extends Event { /** @var ConfigModel[] */ protected $models; /** * @param ConfigModel[] $models Flushed entity and field config models * @param ConfigManager $configManager The entity config manager */ public function __construct(array $models, ConfigManager $configManager) { $this->models = $models; $this->configManager = $configManager; } /** * @return ConfigModel[] */ public function getModels() { return $this->models; } }
Djamy/platform
src/Oro/Bundle/EntityConfigBundle/Event/PostFlushConfigEvent.php
PHP
mit
728
module VagrantPlugins module Cachier module Cap module Linux module PipCacheDir def self.pip_cache_dir(machine) pip_cache_dir = nil machine.communicate.tap do |comm| return unless comm.test('which pip') comm.execute 'echo $HOME' do |buffer, output| pip_cache_dir = output.chomp if buffer == :stdout end end return "#{pip_cache_dir}/.cache/pip" end end end end end end
aaray/vagrant-cachier
lib/vagrant-cachier/cap/linux/pip_cache_dir.rb
Ruby
mit
534
package ngSpring.demo.exceptions; import ngSpring.demo.errorhandling.ValidationMessage; import java.util.List; /** * Indicate validation errors which are not handled via bean validation, * e.g. during file parsing * * @author hypery2k */ @SuppressWarnings("serial") public class ValidationException extends BusinessException { private List<ValidationMessage> validationMessages; public ValidationException(String message) { super(message); } public ValidationException(String message, List<ValidationMessage> validationMessages) { super(message); this.validationMessages = validationMessages; } public List<ValidationMessage> getValidationMessages() { return validationMessages; } }
holisticon/continous-delivery-demo
angular-spring-boot-webapp/src/main/java/ngSpring/demo/exceptions/ValidationException.java
Java
mit
755
#include "board.h" #include "mw.h" // we unset this on 'exit' extern uint8_t cliMode; static void cliAux(char *cmdline); static void cliCMix(char *cmdline); static void cliDefaults(char *cmdline); static void cliDump(char *cmdLine); static void cliExit(char *cmdline); static void cliFeature(char *cmdline); static void cliGpsPassthrough(char *cmdline); static void cliHelp(char *cmdline); static void cliMap(char *cmdline); static void cliMixer(char *cmdline); static void cliMotor(char *cmdline); static void cliProfile(char *cmdline); static void cliSave(char *cmdline); static void cliSet(char *cmdline); static void cliStatus(char *cmdline); static void cliVersion(char *cmdline); // from sensors.c extern uint8_t batteryCellCount; extern uint8_t accHardware; // from config.c RC Channel mapping extern const char rcChannelLetters[]; // from mixer.c extern int16_t motor_disarmed[MAX_MOTORS]; // buffer static char cliBuffer[48]; static uint32_t bufferIndex = 0; static float _atof(const char *p); static char *ftoa(float x, char *floatString); // sync this with MultiType enum from mw.h static const char * const mixerNames[] = { "TRI", "QUADP", "QUADX", "BI", "GIMBAL", "Y6", "HEX6", "FLYING_WING", "Y4", "HEX6X", "OCTOX8", "OCTOFLATP", "OCTOFLATX", "AIRPLANE", "HELI_120_CCPM", "HELI_90_DEG", "VTAIL4", "HEX6H", "PPM_TO_SERVO", "DUALCOPTER", "SINGLECOPTER", "CUSTOM", NULL }; // sync this with AvailableFeatures enum from board.h static const char * const featureNames[] = { "PPM", "VBAT", "INFLIGHT_ACC_CAL", "SERIALRX", "MOTOR_STOP", "SERVO_TILT", "SOFTSERIAL", "LED_RING", "GPS", "FAILSAFE", "SONAR", "TELEMETRY", "POWERMETER", "VARIO", "3D", NULL }; // sync this with AvailableSensors enum from board.h static const char * const sensorNames[] = { "GYRO", "ACC", "BARO", "MAG", "SONAR", "GPS", "GPS+MAG", NULL }; static const char * const accNames[] = { "", "ADXL345", "MPU6050", "MMA845x", "BMA280", "None", NULL }; typedef struct { const char *name; const char *param; void (*func)(char *cmdline); } clicmd_t; // should be sorted a..z for bsearch() const clicmd_t cmdTable[] = { { "aux", "feature_name auxflag or blank for list", cliAux }, { "cmix", "design custom mixer", cliCMix }, { "defaults", "reset to defaults and reboot", cliDefaults }, { "dump", "print configurable settings in a pastable form", cliDump }, { "exit", "", cliExit }, { "feature", "list or -val or val", cliFeature }, { "gpspassthrough", "passthrough gps to serial", cliGpsPassthrough }, { "help", "", cliHelp }, { "map", "mapping of rc channel order", cliMap }, { "mixer", "mixer name or list", cliMixer }, { "motor", "get/set motor output value", cliMotor }, { "profile", "index (0 to 2)", cliProfile }, { "save", "save and reboot", cliSave }, { "set", "name=value or blank or * for list", cliSet }, { "status", "show system status", cliStatus }, { "version", "", cliVersion }, }; #define CMD_COUNT (sizeof(cmdTable) / sizeof(clicmd_t)) typedef enum { VAR_UINT8, VAR_INT8, VAR_UINT16, VAR_INT16, VAR_UINT32, VAR_FLOAT } vartype_e; typedef struct { const char *name; const uint8_t type; // vartype_e void *ptr; const int32_t min; const int32_t max; } clivalue_t; const clivalue_t valueTable[] = { { "looptime", VAR_UINT16, &mcfg.looptime, 0, 9000 }, { "midrc", VAR_UINT16, &mcfg.midrc, 1200, 1700 }, { "minthrottle", VAR_UINT16, &mcfg.minthrottle, 0, 2000 }, { "maxthrottle", VAR_UINT16, &mcfg.maxthrottle, 0, 2000 }, { "mincommand", VAR_UINT16, &mcfg.mincommand, 0, 2000 }, { "mincheck", VAR_UINT16, &mcfg.mincheck, 0, 2000 }, { "maxcheck", VAR_UINT16, &mcfg.maxcheck, 0, 2000 }, { "deadband3d_low", VAR_UINT16, &mcfg.deadband3d_low, 0, 2000 }, { "deadband3d_high", VAR_UINT16, &mcfg.deadband3d_high, 0, 2000 }, { "neutral3d", VAR_UINT16, &mcfg.neutral3d, 0, 2000 }, { "deadband3d_throttle", VAR_UINT16, &mcfg.deadband3d_throttle, 0, 2000 }, { "motor_pwm_rate", VAR_UINT16, &mcfg.motor_pwm_rate, 50, 32000 }, { "servo_pwm_rate", VAR_UINT16, &mcfg.servo_pwm_rate, 50, 498 }, { "retarded_arm", VAR_UINT8, &mcfg.retarded_arm, 0, 1 }, { "flaps_speed", VAR_UINT8, &mcfg.flaps_speed, 0, 100 }, { "fixedwing_althold_dir", VAR_INT8, &mcfg.fixedwing_althold_dir, -1, 1 }, { "serial_baudrate", VAR_UINT32, &mcfg.serial_baudrate, 1200, 115200 }, { "softserial_baudrate", VAR_UINT32, &mcfg.softserial_baudrate, 9600, 19200 }, { "softserial_inverted", VAR_UINT8, &mcfg.softserial_inverted, 0, 1 }, { "gps_type", VAR_UINT8, &mcfg.gps_type, 0, 3 }, { "gps_baudrate", VAR_INT8, &mcfg.gps_baudrate, -1, 4 }, { "serialrx_type", VAR_UINT8, &mcfg.serialrx_type, 0, 4 }, { "telemetry_softserial", VAR_UINT8, &mcfg.telemetry_softserial, 0, 1 }, { "telemetry_switch", VAR_UINT8, &mcfg.telemetry_switch, 0, 1 }, { "vbatscale", VAR_UINT8, &mcfg.vbatscale, 10, 200 }, { "vbatmaxcellvoltage", VAR_UINT8, &mcfg.vbatmaxcellvoltage, 10, 50 }, { "vbatmincellvoltage", VAR_UINT8, &mcfg.vbatmincellvoltage, 10, 50 }, { "power_adc_channel", VAR_UINT8, &mcfg.power_adc_channel, 0, 9 }, { "align_gyro", VAR_UINT8, &mcfg.gyro_align, 0, 8 }, { "align_acc", VAR_UINT8, &mcfg.acc_align, 0, 8 }, { "align_mag", VAR_UINT8, &mcfg.mag_align, 0, 8 }, { "align_board_roll", VAR_INT16, &mcfg.board_align_roll, -180, 360 }, { "align_board_pitch", VAR_INT16, &mcfg.board_align_pitch, -180, 360 }, { "align_board_yaw", VAR_INT16, &mcfg.board_align_yaw, -180, 360 }, { "yaw_control_direction", VAR_INT8, &mcfg.yaw_control_direction, -1, 1 }, { "acc_hardware", VAR_UINT8, &mcfg.acc_hardware, 0, 5 }, { "max_angle_inclination", VAR_UINT16, &mcfg.max_angle_inclination, 100, 900 }, { "moron_threshold", VAR_UINT8, &mcfg.moron_threshold, 0, 128 }, { "gyro_lpf", VAR_UINT16, &mcfg.gyro_lpf, 0, 256 }, { "gyro_cmpf_factor", VAR_UINT16, &mcfg.gyro_cmpf_factor, 100, 1000 }, { "gyro_cmpfm_factor", VAR_UINT16, &mcfg.gyro_cmpfm_factor, 100, 1000 }, { "pid_controller", VAR_UINT8, &cfg.pidController, 0, 1 }, { "deadband", VAR_UINT8, &cfg.deadband, 0, 32 }, { "yawdeadband", VAR_UINT8, &cfg.yawdeadband, 0, 100 }, { "alt_hold_throttle_neutral", VAR_UINT8, &cfg.alt_hold_throttle_neutral, 1, 250 }, { "alt_hold_fast_change", VAR_UINT8, &cfg.alt_hold_fast_change, 0, 1 }, { "throttle_angle_correction", VAR_UINT8, &cfg.throttle_angle_correction, 0, 100 }, { "rc_rate", VAR_UINT8, &cfg.rcRate8, 0, 250 }, { "rc_expo", VAR_UINT8, &cfg.rcExpo8, 0, 100 }, { "thr_mid", VAR_UINT8, &cfg.thrMid8, 0, 100 }, { "thr_expo", VAR_UINT8, &cfg.thrExpo8, 0, 100 }, { "roll_pitch_rate", VAR_UINT8, &cfg.rollPitchRate, 0, 100 }, { "yawrate", VAR_UINT8, &cfg.yawRate, 0, 100 }, { "failsafe_delay", VAR_UINT8, &cfg.failsafe_delay, 0, 200 }, { "failsafe_off_delay", VAR_UINT8, &cfg.failsafe_off_delay, 0, 200 }, { "failsafe_throttle", VAR_UINT16, &cfg.failsafe_throttle, 1000, 2000 }, { "failsafe_detect_threshold", VAR_UINT16, &cfg.failsafe_detect_threshold, 100, 2000 }, { "rssi_aux_channel", VAR_INT8, &mcfg.rssi_aux_channel, 0, 4 }, { "yaw_direction", VAR_INT8, &cfg.yaw_direction, -1, 1 }, { "tri_unarmed_servo", VAR_INT8, &cfg.tri_unarmed_servo, 0, 1 }, { "gimbal_flags", VAR_UINT8, &cfg.gimbal_flags, 0, 255}, { "acc_lpf_factor", VAR_UINT8, &cfg.acc_lpf_factor, 0, 250 }, { "accxy_deadband", VAR_UINT8, &cfg.accxy_deadband, 0, 100 }, { "accz_deadband", VAR_UINT8, &cfg.accz_deadband, 0, 100 }, { "acc_unarmedcal", VAR_UINT8, &cfg.acc_unarmedcal, 0, 1 }, { "acc_trim_pitch", VAR_INT16, &cfg.angleTrim[PITCH], -300, 300 }, { "acc_trim_roll", VAR_INT16, &cfg.angleTrim[ROLL], -300, 300 }, { "baro_tab_size", VAR_UINT8, &cfg.baro_tab_size, 0, BARO_TAB_SIZE_MAX }, { "baro_noise_lpf", VAR_FLOAT, &cfg.baro_noise_lpf, 0, 1 }, { "baro_cf_vel", VAR_FLOAT, &cfg.baro_cf_vel, 0, 1 }, { "baro_cf_alt", VAR_FLOAT, &cfg.baro_cf_alt, 0, 1 }, { "mag_declination", VAR_INT16, &cfg.mag_declination, -18000, 18000 }, { "gps_pos_p", VAR_UINT8, &cfg.P8[PIDPOS], 0, 200 }, { "gps_pos_i", VAR_UINT8, &cfg.I8[PIDPOS], 0, 200 }, { "gps_pos_d", VAR_UINT8, &cfg.D8[PIDPOS], 0, 200 }, { "gps_posr_p", VAR_UINT8, &cfg.P8[PIDPOSR], 0, 200 }, { "gps_posr_i", VAR_UINT8, &cfg.I8[PIDPOSR], 0, 200 }, { "gps_posr_d", VAR_UINT8, &cfg.D8[PIDPOSR], 0, 200 }, { "gps_nav_p", VAR_UINT8, &cfg.P8[PIDNAVR], 0, 200 }, { "gps_nav_i", VAR_UINT8, &cfg.I8[PIDNAVR], 0, 200 }, { "gps_nav_d", VAR_UINT8, &cfg.D8[PIDNAVR], 0, 200 }, { "gps_wp_radius", VAR_UINT16, &cfg.gps_wp_radius, 0, 2000 }, { "nav_controls_heading", VAR_UINT8, &cfg.nav_controls_heading, 0, 1 }, { "nav_speed_min", VAR_UINT16, &cfg.nav_speed_min, 10, 2000 }, { "nav_speed_max", VAR_UINT16, &cfg.nav_speed_max, 10, 2000 }, { "nav_slew_rate", VAR_UINT8, &cfg.nav_slew_rate, 0, 100 }, { "p_pitch", VAR_UINT8, &cfg.P8[PITCH], 0, 200 }, { "i_pitch", VAR_UINT8, &cfg.I8[PITCH], 0, 200 }, { "d_pitch", VAR_UINT8, &cfg.D8[PITCH], 0, 200 }, { "p_roll", VAR_UINT8, &cfg.P8[ROLL], 0, 200 }, { "i_roll", VAR_UINT8, &cfg.I8[ROLL], 0, 200 }, { "d_roll", VAR_UINT8, &cfg.D8[ROLL], 0, 200 }, { "p_yaw", VAR_UINT8, &cfg.P8[YAW], 0, 200 }, { "i_yaw", VAR_UINT8, &cfg.I8[YAW], 0, 200 }, { "d_yaw", VAR_UINT8, &cfg.D8[YAW], 0, 200 }, { "p_alt", VAR_UINT8, &cfg.P8[PIDALT], 0, 200 }, { "i_alt", VAR_UINT8, &cfg.I8[PIDALT], 0, 200 }, { "d_alt", VAR_UINT8, &cfg.D8[PIDALT], 0, 200 }, { "p_level", VAR_UINT8, &cfg.P8[PIDLEVEL], 0, 200 }, { "i_level", VAR_UINT8, &cfg.I8[PIDLEVEL], 0, 200 }, { "d_level", VAR_UINT8, &cfg.D8[PIDLEVEL], 0, 200 }, { "p_vel", VAR_UINT8, &cfg.P8[PIDVEL], 0, 200 }, { "i_vel", VAR_UINT8, &cfg.I8[PIDVEL], 0, 200 }, { "d_vel", VAR_UINT8, &cfg.D8[PIDVEL], 0, 200 }, }; #define VALUE_COUNT (sizeof(valueTable) / sizeof(clivalue_t)) typedef union { int32_t int_value; float float_value; } int_float_value_t; static void cliSetVar(const clivalue_t *var, const int_float_value_t value); static void cliPrintVar(const clivalue_t *var, uint32_t full); static void cliPrint(const char *str); static void cliWrite(uint8_t ch); #ifndef HAVE_ITOA_FUNCTION /* ** The following two functions together make up an itoa() ** implementation. Function i2a() is a 'private' function ** called by the public itoa() function. ** ** itoa() takes three arguments: ** 1) the integer to be converted, ** 2) a pointer to a character conversion buffer, ** 3) the radix for the conversion ** which can range between 2 and 36 inclusive ** range errors on the radix default it to base10 ** Code from http://groups.google.com/group/comp.lang.c/msg/66552ef8b04fe1ab?pli=1 */ static char *i2a(unsigned i, char *a, unsigned r) { if (i / r > 0) a = i2a(i / r, a, r); *a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i % r]; return a + 1; } char *itoa(int i, char *a, int r) { if ((r < 2) || (r > 36)) r = 10; if (i < 0) { *a = '-'; *i2a(-(unsigned)i, a + 1, r) = 0; } else *i2a(i, a, r) = 0; return a; } #endif //////////////////////////////////////////////////////////////////////////////// // String to Float Conversion /////////////////////////////////////////////////////////////////////////////// // Simple and fast atof (ascii to float) function. // // - Executes about 5x faster than standard MSCRT library atof(). // - An attractive alternative if the number of calls is in the millions. // - Assumes input is a proper integer, fraction, or scientific format. // - Matches library atof() to 15 digits (except at extreme exponents). // - Follows atof() precedent of essentially no error checking. // // 09-May-2009 Tom Van Baak (tvb) www.LeapSecond.com // #define white_space(c) ((c) == ' ' || (c) == '\t') #define valid_digit(c) ((c) >= '0' && (c) <= '9') static float _atof(const char *p) { int frac = 0; float sign, value, scale; // Skip leading white space, if any. while (white_space(*p) ) { p += 1; } // Get sign, if any. sign = 1.0f; if (*p == '-') { sign = -1.0f; p += 1; } else if (*p == '+') { p += 1; } // Get digits before decimal point or exponent, if any. value = 0.0f; while (valid_digit(*p)) { value = value * 10.0f + (*p - '0'); p += 1; } // Get digits after decimal point, if any. if (*p == '.') { float pow10 = 10.0f; p += 1; while (valid_digit(*p)) { value += (*p - '0') / pow10; pow10 *= 10.0f; p += 1; } } // Handle exponent, if any. scale = 1.0f; if ((*p == 'e') || (*p == 'E')) { unsigned int expon; p += 1; // Get sign of exponent, if any. frac = 0; if (*p == '-') { frac = 1; p += 1; } else if (*p == '+') { p += 1; } // Get digits of exponent, if any. expon = 0; while (valid_digit(*p)) { expon = expon * 10 + (*p - '0'); p += 1; } if (expon > 308) expon = 308; // Calculate scaling factor. // while (expon >= 50) { scale *= 1E50f; expon -= 50; } while (expon >= 8) { scale *= 1E8f; expon -= 8; } while (expon > 0) { scale *= 10.0f; expon -= 1; } } // Return signed and scaled floating point result. return sign * (frac ? (value / scale) : (value * scale)); } /////////////////////////////////////////////////////////////////////////////// // FTOA /////////////////////////////////////////////////////////////////////////////// static char *ftoa(float x, char *floatString) { int32_t value; char intString1[12]; char intString2[12] = { 0, }; char *decimalPoint = "."; uint8_t dpLocation; if (x > 0) // Rounding for x.xxx display format x += 0.0005f; else x -= 0.0005f; value = (int32_t) (x * 1000.0f); // Convert float * 1000 to an integer itoa(abs(value), intString1, 10); // Create string from abs of integer value if (value >= 0) intString2[0] = ' '; // Positive number, add a pad space else intString2[0] = '-'; // Negative number, add a negative sign if (strlen(intString1) == 1) { intString2[1] = '0'; intString2[2] = '0'; intString2[3] = '0'; strcat(intString2, intString1); } else if (strlen(intString1) == 2) { intString2[1] = '0'; intString2[2] = '0'; strcat(intString2, intString1); } else if (strlen(intString1) == 3) { intString2[1] = '0'; strcat(intString2, intString1); } else { strcat(intString2, intString1); } dpLocation = strlen(intString2) - 3; strncpy(floatString, intString2, dpLocation); floatString[dpLocation] = '\0'; strcat(floatString, decimalPoint); strcat(floatString, intString2 + dpLocation); return floatString; } static void cliPrompt(void) { cliPrint("\r\n# "); } static int cliCompare(const void *a, const void *b) { const clicmd_t *ca = a, *cb = b; return strncasecmp(ca->name, cb->name, strlen(cb->name)); } static void cliAux(char *cmdline) { int i, val = 0; uint8_t len; char *ptr; len = strlen(cmdline); if (len == 0) { // print out aux channel settings for (i = 0; i < CHECKBOXITEMS; i++) printf("aux %u %u\r\n", i, cfg.activate[i]); } else { ptr = cmdline; i = atoi(ptr); if (i < CHECKBOXITEMS) { ptr = strchr(cmdline, ' '); val = atoi(ptr); cfg.activate[i] = val; } else { printf("Invalid Feature index: must be < %u\r\n", CHECKBOXITEMS); } } } static void cliCMix(char *cmdline) { int i, check = 0; int num_motors = 0; uint8_t len; char buf[16]; float mixsum[3]; char *ptr; len = strlen(cmdline); if (len == 0) { cliPrint("Custom mixer: \r\nMotor\tThr\tRoll\tPitch\tYaw\r\n"); for (i = 0; i < MAX_MOTORS; i++) { if (mcfg.customMixer[i].throttle == 0.0f) break; num_motors++; printf("#%d:\t", i + 1); printf("%s\t", ftoa(mcfg.customMixer[i].throttle, buf)); printf("%s\t", ftoa(mcfg.customMixer[i].roll, buf)); printf("%s\t", ftoa(mcfg.customMixer[i].pitch, buf)); printf("%s\r\n", ftoa(mcfg.customMixer[i].yaw, buf)); } mixsum[0] = mixsum[1] = mixsum[2] = 0.0f; for (i = 0; i < num_motors; i++) { mixsum[0] += mcfg.customMixer[i].roll; mixsum[1] += mcfg.customMixer[i].pitch; mixsum[2] += mcfg.customMixer[i].yaw; } cliPrint("Sanity check:\t"); for (i = 0; i < 3; i++) cliPrint(fabsf(mixsum[i]) > 0.01f ? "NG\t" : "OK\t"); cliPrint("\r\n"); return; } else if (strncasecmp(cmdline, "reset", 5) == 0) { // erase custom mixer for (i = 0; i < MAX_MOTORS; i++) mcfg.customMixer[i].throttle = 0.0f; } else if (strncasecmp(cmdline, "load", 4) == 0) { ptr = strchr(cmdline, ' '); if (ptr) { len = strlen(++ptr); for (i = 0; ; i++) { if (mixerNames[i] == NULL) { cliPrint("Invalid mixer type...\r\n"); break; } if (strncasecmp(ptr, mixerNames[i], len) == 0) { mixerLoadMix(i); printf("Loaded %s mix...\r\n", mixerNames[i]); cliCMix(""); break; } } } } else { ptr = cmdline; i = atoi(ptr); // get motor number if (--i < MAX_MOTORS) { ptr = strchr(ptr, ' '); if (ptr) { mcfg.customMixer[i].throttle = _atof(++ptr); check++; } ptr = strchr(ptr, ' '); if (ptr) { mcfg.customMixer[i].roll = _atof(++ptr); check++; } ptr = strchr(ptr, ' '); if (ptr) { mcfg.customMixer[i].pitch = _atof(++ptr); check++; } ptr = strchr(ptr, ' '); if (ptr) { mcfg.customMixer[i].yaw = _atof(++ptr); check++; } if (check != 4) { cliPrint("Wrong number of arguments, needs idx thr roll pitch yaw\r\n"); } else { cliCMix(""); } } else { printf("Motor number must be between 1 and %d\r\n", MAX_MOTORS); } } } static void cliDefaults(char *cmdline) { cliPrint("Resetting to defaults...\r\n"); checkFirstTime(true); cliPrint("Rebooting..."); delay(10); systemReset(false); } static void cliDump(char *cmdline) { int i; char buf[16]; float thr, roll, pitch, yaw; uint32_t mask; const clivalue_t *setval; printf("Current Config: Copy everything below here...\r\n"); // print out aux switches cliAux(""); // print out current motor mix printf("mixer %s\r\n", mixerNames[mcfg.mixerConfiguration - 1]); // print custom mix if exists if (mcfg.customMixer[0].throttle != 0.0f) { for (i = 0; i < MAX_MOTORS; i++) { if (mcfg.customMixer[i].throttle == 0.0f) break; thr = mcfg.customMixer[i].throttle; roll = mcfg.customMixer[i].roll; pitch = mcfg.customMixer[i].pitch; yaw = mcfg.customMixer[i].yaw; printf("cmix %d", i + 1); if (thr < 0) printf(" "); printf("%s", ftoa(thr, buf)); if (roll < 0) printf(" "); printf("%s", ftoa(roll, buf)); if (pitch < 0) printf(" "); printf("%s", ftoa(pitch, buf)); if (yaw < 0) printf(" "); printf("%s\r\n", ftoa(yaw, buf)); } printf("cmix %d 0 0 0 0\r\n", i + 1); } // print enabled features mask = featureMask(); for (i = 0; ; i++) { // disable all feature first if (featureNames[i] == NULL) break; printf("feature -%s\r\n", featureNames[i]); } for (i = 0; ; i++) { // reenable what we want. if (featureNames[i] == NULL) break; if (mask & (1 << i)) printf("feature %s\r\n", featureNames[i]); } // print RC MAPPING for (i = 0; i < 8; i++) buf[mcfg.rcmap[i]] = rcChannelLetters[i]; buf[i] = '\0'; printf("map %s\r\n", buf); // print settings for (i = 0; i < VALUE_COUNT; i++) { setval = &valueTable[i]; printf("set %s = ", valueTable[i].name); cliPrintVar(setval, 0); cliPrint("\r\n"); } } static void cliExit(char *cmdline) { cliPrint("\r\nLeaving CLI mode...\r\n"); *cliBuffer = '\0'; bufferIndex = 0; cliMode = 0; // incase some idiot leaves a motor running during motortest, clear it here mixerResetMotors(); // save and reboot... I think this makes the most sense cliSave(cmdline); } static void cliFeature(char *cmdline) { uint32_t i; uint32_t len; uint32_t mask; len = strlen(cmdline); mask = featureMask(); if (len == 0) { cliPrint("Enabled features: "); for (i = 0; ; i++) { if (featureNames[i] == NULL) break; if (mask & (1 << i)) printf("%s ", featureNames[i]); } cliPrint("\r\n"); } else if (strncasecmp(cmdline, "list", len) == 0) { cliPrint("Available features: "); for (i = 0; ; i++) { if (featureNames[i] == NULL) break; printf("%s ", featureNames[i]); } cliPrint("\r\n"); return; } else { bool remove = false; if (cmdline[0] == '-') { // remove feature remove = true; cmdline++; // skip over - len--; } for (i = 0; ; i++) { if (featureNames[i] == NULL) { cliPrint("Invalid feature name...\r\n"); break; } if (strncasecmp(cmdline, featureNames[i], len) == 0) { if (remove) { featureClear(1 << i); cliPrint("Disabled "); } else { featureSet(1 << i); cliPrint("Enabled "); } printf("%s\r\n", featureNames[i]); break; } } } } static void cliGpsPassthrough(char *cmdline) { if (gpsSetPassthrough() == -1) cliPrint("Error: Enable and plug in GPS first\r\n"); else cliPrint("Enabling GPS passthrough...\r\n"); } static void cliHelp(char *cmdline) { uint32_t i = 0; cliPrint("Available commands:\r\n"); for (i = 0; i < CMD_COUNT; i++) printf("%s\t%s\r\n", cmdTable[i].name, cmdTable[i].param); } static void cliMap(char *cmdline) { uint32_t len; uint32_t i; char out[9]; len = strlen(cmdline); if (len == 8) { // uppercase it for (i = 0; i < 8; i++) cmdline[i] = toupper((unsigned char)cmdline[i]); for (i = 0; i < 8; i++) { if (strchr(rcChannelLetters, cmdline[i]) && !strchr(cmdline + i + 1, cmdline[i])) continue; cliPrint("Must be any order of AETR1234\r\n"); return; } parseRcChannels(cmdline); } cliPrint("Current assignment: "); for (i = 0; i < 8; i++) out[mcfg.rcmap[i]] = rcChannelLetters[i]; out[i] = '\0'; printf("%s\r\n", out); } static void cliMixer(char *cmdline) { int i; int len; len = strlen(cmdline); if (len == 0) { printf("Current mixer: %s\r\n", mixerNames[mcfg.mixerConfiguration - 1]); return; } else if (strncasecmp(cmdline, "list", len) == 0) { cliPrint("Available mixers: "); for (i = 0; ; i++) { if (mixerNames[i] == NULL) break; printf("%s ", mixerNames[i]); } cliPrint("\r\n"); return; } for (i = 0; ; i++) { if (mixerNames[i] == NULL) { cliPrint("Invalid mixer type...\r\n"); break; } if (strncasecmp(cmdline, mixerNames[i], len) == 0) { mcfg.mixerConfiguration = i + 1; printf("Mixer set to %s\r\n", mixerNames[i]); break; } } } static void cliMotor(char *cmdline) { int motor_index = 0; int motor_value = 0; int len, index = 0; char *pch = NULL; len = strlen(cmdline); if (len == 0) { printf("Usage:\r\nmotor index [value] - show [or set] motor value\r\n"); return; } pch = strtok(cmdline, " "); while (pch != NULL) { switch (index) { case 0: motor_index = atoi(pch); break; case 1: motor_value = atoi(pch); break; } index++; pch = strtok(NULL, " "); } if (motor_index < 0 || motor_index >= MAX_MOTORS) { printf("No such motor, use a number [0, %d]\r\n", MAX_MOTORS); return; } if (index < 2) { printf("Motor %d is set at %d\r\n", motor_index, motor_disarmed[motor_index]); return; } if (motor_value < 1000 || motor_value > 2000) { printf("Invalid motor value, 1000..2000\r\n"); return; } printf("Setting motor %d to %d\r\n", motor_index, motor_value); motor_disarmed[motor_index] = motor_value; } static void cliProfile(char *cmdline) { uint8_t len; int i; len = strlen(cmdline); if (len == 0) { printf("Current profile: %d\r\n", mcfg.current_profile); return; } else { i = atoi(cmdline); if (i >= 0 && i <= 2) { mcfg.current_profile = i; writeEEPROM(0, false); cliProfile(""); } } } static void cliSave(char *cmdline) { cliPrint("Saving..."); writeEEPROM(0, true); cliPrint("\r\nRebooting..."); delay(10); systemReset(false); } static void cliPrint(const char *str) { while (*str) uartWrite(core.mainport, *(str++)); } static void cliWrite(uint8_t ch) { uartWrite(core.mainport, ch); } static void cliPrintVar(const clivalue_t *var, uint32_t full) { int32_t value = 0; char buf[8]; switch (var->type) { case VAR_UINT8: value = *(uint8_t *)var->ptr; break; case VAR_INT8: value = *(int8_t *)var->ptr; break; case VAR_UINT16: value = *(uint16_t *)var->ptr; break; case VAR_INT16: value = *(int16_t *)var->ptr; break; case VAR_UINT32: value = *(uint32_t *)var->ptr; break; case VAR_FLOAT: printf("%s", ftoa(*(float *)var->ptr, buf)); if (full) { printf(" %s", ftoa((float)var->min, buf)); printf(" %s", ftoa((float)var->max, buf)); } return; // return from case for float only } printf("%d", value); if (full) printf(" %d %d", var->min, var->max); } static void cliSetVar(const clivalue_t *var, const int_float_value_t value) { switch (var->type) { case VAR_UINT8: case VAR_INT8: *(char *)var->ptr = (char)value.int_value; break; case VAR_UINT16: case VAR_INT16: *(short *)var->ptr = (short)value.int_value; break; case VAR_UINT32: *(int *)var->ptr = (int)value.int_value; break; case VAR_FLOAT: *(float *)var->ptr = (float)value.float_value; break; } } static void cliSet(char *cmdline) { uint32_t i; uint32_t len; const clivalue_t *val; char *eqptr = NULL; int32_t value = 0; float valuef = 0; len = strlen(cmdline); if (len == 0 || (len == 1 && cmdline[0] == '*')) { cliPrint("Current settings: \r\n"); for (i = 0; i < VALUE_COUNT; i++) { val = &valueTable[i]; printf("%s = ", valueTable[i].name); cliPrintVar(val, len); // when len is 1 (when * is passed as argument), it will print min/max values as well, for gui cliPrint("\r\n"); } } else if ((eqptr = strstr(cmdline, "=")) != NULL) { // has equal, set var eqptr++; len--; value = atoi(eqptr); valuef = _atof(eqptr); for (i = 0; i < VALUE_COUNT; i++) { val = &valueTable[i]; if (strncasecmp(cmdline, valueTable[i].name, strlen(valueTable[i].name)) == 0) { if (valuef >= valueTable[i].min && valuef <= valueTable[i].max) { // here we compare the float value since... it should work, RIGHT? int_float_value_t tmp; if (valueTable[i].type == VAR_FLOAT) tmp.float_value = valuef; else tmp.int_value = value; cliSetVar(val, tmp); printf("%s set to ", valueTable[i].name); cliPrintVar(val, 0); } else { cliPrint("ERR: Value assignment out of range\r\n"); } return; } } cliPrint("ERR: Unknown variable name\r\n"); } else { // no equals, check for matching variables. for (i = 0; i < VALUE_COUNT; i++) { if (strstr(valueTable[i].name, cmdline)) { val = &valueTable[i]; printf("%s = ", valueTable[i].name); cliPrintVar(val, 0); printf("\r\n"); } } } } static void cliStatus(char *cmdline) { uint8_t i; uint32_t mask; printf("System Uptime: %d seconds, Voltage: %d * 0.1V (%dS battery)\r\n", millis() / 1000, vbat, batteryCellCount); mask = sensorsMask(); printf("CPU %dMHz, detected sensors: ", (SystemCoreClock / 1000000)); for (i = 0; ; i++) { if (sensorNames[i] == NULL) break; if (mask & (1 << i)) printf("%s ", sensorNames[i]); } if (sensors(SENSOR_ACC)) { printf("ACCHW: %s", accNames[accHardware]); if (accHardware == ACC_MPU6050) printf(".%c", core.mpu6050_scale ? 'o' : 'n'); } cliPrint("\r\n"); printf("Cycle Time: %d, I2C Errors: %d, config size: %d\r\n", cycleTime, i2cGetErrorCounter(), sizeof(master_t)); } static void cliVersion(char *cmdline) { cliPrint("Afro32 CLI version 2.2 " __DATE__ " / " __TIME__); } void cliProcess(void) { if (!cliMode) { cliMode = 1; cliPrint("\r\nEntering CLI Mode, type 'exit' to return, or 'help'\r\n"); cliPrompt(); } while (serialTotalBytesWaiting(core.mainport)) { uint8_t c = serialRead(core.mainport); if (c == '\t' || c == '?') { // do tab completion const clicmd_t *cmd, *pstart = NULL, *pend = NULL; int i = bufferIndex; for (cmd = cmdTable; cmd < cmdTable + CMD_COUNT; cmd++) { if (bufferIndex && (strncasecmp(cliBuffer, cmd->name, bufferIndex) != 0)) continue; if (!pstart) pstart = cmd; pend = cmd; } if (pstart) { /* Buffer matches one or more commands */ for (; ; bufferIndex++) { if (pstart->name[bufferIndex] != pend->name[bufferIndex]) break; if (!pstart->name[bufferIndex] && bufferIndex < sizeof(cliBuffer) - 2) { /* Unambiguous -- append a space */ cliBuffer[bufferIndex++] = ' '; cliBuffer[bufferIndex] = '\0'; break; } cliBuffer[bufferIndex] = pstart->name[bufferIndex]; } } if (!bufferIndex || pstart != pend) { /* Print list of ambiguous matches */ cliPrint("\r\033[K"); for (cmd = pstart; cmd <= pend; cmd++) { cliPrint(cmd->name); cliWrite('\t'); } cliPrompt(); i = 0; /* Redraw prompt */ } for (; i < bufferIndex; i++) cliWrite(cliBuffer[i]); } else if (!bufferIndex && c == 4) { cliExit(cliBuffer); return; } else if (c == 12) { // clear screen cliPrint("\033[2J\033[1;1H"); cliPrompt(); } else if (bufferIndex && (c == '\n' || c == '\r')) { // enter pressed clicmd_t *cmd = NULL; clicmd_t target; cliPrint("\r\n"); cliBuffer[bufferIndex] = 0; // null terminate target.name = cliBuffer; target.param = NULL; cmd = bsearch(&target, cmdTable, CMD_COUNT, sizeof cmdTable[0], cliCompare); if (cmd) cmd->func(cliBuffer + strlen(cmd->name) + 1); else cliPrint("ERR: Unknown command, try 'help'"); memset(cliBuffer, 0, sizeof(cliBuffer)); bufferIndex = 0; // 'exit' will reset this flag, so we don't need to print prompt again if (!cliMode) return; cliPrompt(); } else if (c == 127) { // backspace if (bufferIndex) { cliBuffer[--bufferIndex] = 0; cliPrint("\010 \010"); } } else if (bufferIndex < sizeof(cliBuffer) && c >= 32 && c <= 126) { if (!bufferIndex && c == 32) continue; cliBuffer[bufferIndex++] = c; cliWrite(c); } } }
whdlgp/Cupdrone_flip_test
src/cli.c
C
mit
34,622
using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using AllReady.Features.Notifications; using AllReady.Models; using MediatR; using Microsoft.EntityFrameworkCore; namespace AllReady.Areas.Admin.Features.Tasks { public class MessageTaskVolunteersCommandHandlerAsync : AsyncRequestHandler<MessageTaskVolunteersCommandAsync> { private AllReadyContext _context; private IMediator _mediator; public MessageTaskVolunteersCommandHandlerAsync(AllReadyContext context, IMediator mediator) { _context = context; _mediator = mediator; } protected override async Task HandleCore(MessageTaskVolunteersCommandAsync message) { var users = await _context.TaskSignups.AsNoTracking() .Include(a => a.User) .Where(a => a.Task.Id == message.Model.TaskId).ToListAsync(); // send all notifications to the queue var smsRecipients = new List<string>(); var emailRecipients = new List<string>(); smsRecipients.AddRange(users.Where(u => u.User.PhoneNumberConfirmed).Select(v => v.User.PhoneNumber)); emailRecipients.AddRange(users.Where(u => u.User.EmailConfirmed).Select(v => v.User.Email)); var command = new NotifyVolunteersCommand { // todo: what information do we add about the task? // todo: should we use a template from the email service provider? // todo: what about non-English volunteers? ViewModel = new NotifyVolunteersViewModel { SmsMessage = message.Model.Message, SmsRecipients = smsRecipients, EmailMessage = message.Model.Message, HtmlMessage = message.Model.Message, EmailRecipients = emailRecipients, Subject = message.Model.Subject } }; await _mediator.SendAsync(command); } } }
auroraocciduusadmin/allReady
AllReadyApp/Web-App/AllReady/Areas/Admin/Features/Tasks/MessageTaskVolunteersCommandHandlerAsync.cs
C#
mit
2,097
using System; using System.Collections.Generic; using Cake.Core.Diagnostics; using Cake.Core.Scripting; using Cake.Scripting.Roslyn.Nightly; using Cake.Scripting.Roslyn.Stable; namespace Cake.Scripting.Roslyn { internal sealed class RoslynScriptEngine : IScriptEngine { private readonly RoslynScriptSessionFactory _stableFactory; private readonly RoslynNightlyScriptSessionFactory _nightlyFactory; private readonly ICakeLog _log; public RoslynScriptEngine( RoslynScriptSessionFactory stableFactory, RoslynNightlyScriptSessionFactory nightlyFactory, ICakeLog log) { _nightlyFactory = nightlyFactory; _stableFactory = stableFactory; _log = log; } public IScriptSession CreateSession(IScriptHost host, IDictionary<string, string> arguments) { if (arguments == null) { throw new ArgumentNullException("arguments"); } // Create the script session. _log.Debug("Creating script session..."); // Are we using the experimental bits? if (arguments.ContainsKey("experimental")) { // Use the nightly build. _log.Debug("Using prerelease build of Roslyn."); return _nightlyFactory.CreateSession(host); } // Use the stable build. return _stableFactory.CreateSession(host); } } }
os-alan/cake
src/Cake/Scripting/Roslyn/RoslynScriptEngine.cs
C#
mit
1,525
<!doctype html> <html> <head> <script src="js/jquery.min.js"></script> <script src="../jspsych.js"></script> <script src="../plugins/jspsych-multi-stim-multi-response.js"></script> <link rel="stylesheet" href="../css/jspsych.css"></link> <style> img { width: 300px; } </style> </head> <body> <div id="jspsych-target"></div> </body> <script> var block_1 = { type: 'multi-stim-multi-response', stimuli: [['img/happy_face_1.jpg', 'img/sad_face_1.jpg']], choices: [[89,78]], // Y or N timing_stim: [1000,-1], prompt: '<p class="center-content">Did the face get happier? Y or N.</p>' } var block_2 = { type: 'multi-stim-multi-response', stimuli: [['img/happy_face_1.jpg']], choices: [[89, 78],[49,50,51,52,53]], // Y or N , 1 - 5 timing_stim: [-1], prompt: '<p class="center-content">Rate the happiness of the person on a scale of 1-5, and press Y or N to indicate if you have seen the face before.</p>' } function start(){ jsPsych.init({ display_element: $('#jspsych-target'), experiment_structure: [block_1, block_2] }); } jsPsych.preloadImages(['img/happy_face_1.jpg','img/sad_face_1.jpg'], start); </script> </html>
Scienthusiast/jsPsych
tests&examples/jspsych-multi-stim-multi-response.html
HTML
mit
1,240
/* TimerManager.js KC3改 Sortie Manager Container object for timers for expedition, construction, and repair */ (function(){ "use strict"; window.KC3TimerManager = { _exped: [], _repair: [], _build: [], init :function(eMap, rMap, bMap){ this._exped = [ new KC3Timer(eMap[0], 0, 0), new KC3Timer(eMap[1], 0, 1), new KC3Timer(eMap[2], 0, 2) ]; this._repair = [ new KC3Timer(rMap[0], 1, 0), new KC3Timer(rMap[1], 1, 1), new KC3Timer(rMap[2], 1, 2), new KC3Timer(rMap[3], 1, 3) ]; this._build = [ new KC3Timer(bMap[0], 2, 0), new KC3Timer(bMap[1], 2, 1), new KC3Timer(bMap[2], 2, 2), new KC3Timer(bMap[3], 2, 3) ]; }, exped :function(num){ return this._exped[num-2]; }, repair :function(num){ return this._repair[num-1]; }, build :function(num){ return this._build[num-1]; }, updateTimerElement : function(eMap, rMap, bMap){ this._exped[0].updateElement(eMap[0]); this._exped[1].updateElement(eMap[1]); this._exped[2].updateElement(eMap[2]); this._repair[0].updateElement(rMap[0]); this._repair[1].updateElement(rMap[1]); this._repair[2].updateElement(rMap[2]); this._repair[3].updateElement(rMap[3]); this._build[0].updateElement(bMap[0]); this._build[1].updateElement(bMap[1]); this._build[2].updateElement(bMap[2]); this._build[3].updateElement(bMap[3]); }, update: function(){ this._exped[0].time(); this._exped[1].time(); this._exped[2].time(); this._repair[0].time(); this._repair[1].time(); this._repair[2].time(); this._repair[3].time(); this._build[0].time(); this._build[1].time(); this._build[2].time(); this._build[3].time(); } }; })();
Slayers148/KC3Kai
src/library/managers/TimerManager.js
JavaScript
mit
1,793
//Copyright (c) Microsoft Corporation. All rights reserved. namespace Microsoft.WindowsAPICodePack.Dialogs { /// <summary> /// Defines a common class for all task dialog bar controls, such as the progress and marquee bars. /// </summary> public class TaskDialogBar : TaskDialogControl { /// <summary> /// Creates a new instance of this class. /// </summary> public TaskDialogBar() { } /// <summary> /// Creates a new instance of this class with the specified name. /// </summary> /// <param name="name">The name for this control.</param> protected TaskDialogBar(string name) : base(name) { } private TaskDialogProgressBarState state; /// <summary> /// Gets or sets the state of the progress bar. /// </summary> public TaskDialogProgressBarState State { get { return state; } set { CheckPropertyChangeAllowed("State"); state = value; ApplyPropertyChange("State"); } } /// <summary> /// Resets the state of the control to normal. /// </summary> protected internal virtual void Reset() { state = TaskDialogProgressBarState.Normal; } } }
xinmyname/pytestmon
src/packages/Microsoft.WindowsAPICodePack.lib.1.1.0.1/src/Dialogs/TaskDialogs/TaskDialogBar.cs
C#
mit
1,346
# Access Control and Page Security There is a fairly comprehensive security mechanism in place for SilverStripe. If you want to add premium content to your site you have to figure this stuff out, and it's not entirely obvious. ## Ways to restrict access There are a number of ways to restrict access in SilverStripe. In the security tab in the CMS you can create groups that have access to certain parts. The options can be found on the [permissions](/reference/permission) documentation. Once you have groups, you can set access for each page for a particular group. This can be: * anyone; * any person who is logged in; * a specific group. It is unclear how this works for data-objects that are not pages. ## The Security Groups in SilverStripe In the security tab you can make groups for security. The way this was intended was as follows (this may be a counter intuitive): * employees * marketing * marketing executive Thus, the further up the hierarchy you go the MORE privileges you can get. Similarly, you could have: * members * coordinators * admins Where members have some privileges, coordinators slightly more and administrators the most; having each group inheriting privileges from its parent group. ## Permission checking is at class level SilverStripe provides a security mechanism via the *Permission::check* method (see `[api:LeftAndMain]` for examples on how the admin screens work). (next step -- go from *Permission::checkMember*...) ### Nuts and bolts -- figuring it out Here are my notes trying to figure this stuff out. Not really useful unless you're VERY interested in how exactly SS works. ### Loading the admin page: looking at security If you go to [your site]/admin *Director.php* maps the 'admin' URL request through a `[api:Director]` rule to the `[api:CMSMain]` controller (see `[api:CMSMain]`, with no arguments). *CMSMain.init()* calls its parent which, of all things is called `[api:LeftAndMain]`. It's in `[api:LeftAndMain]` that the important security checks are made by calling *Permission::check*. `[api:Security::permissionFailure]` is the next utility function you can use to redirect to the login form. ### Customizing Access Checks in CMS Classes see `[api:LeftAndMain]`
jcasner/cyclesmc
php_old/framework/docs/en/02_Developer_Guides/09_Security/01_Access_Control.md
Markdown
mit
2,265
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Implementing Key Creators </title> <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.62.4" /> <link rel="home" href="index.html" title="Getting Started with Berkeley DB" /> <link rel="up" href="indexes.html" title="Chapter 10. Secondary Databases" /> <link rel="previous" href="indexes.html" title="Chapter 10. Secondary Databases" /> <link rel="next" href="secondaryProps.html" title="Secondary Database Properties" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">Implementing Key Creators </th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="indexes.html">Prev</a> </td> <th width="60%" align="center">Chapter 10. Secondary Databases</th> <td width="20%" align="right"> <a accesskey="n" href="secondaryProps.html">Next</a></td> </tr> </table> <hr /> </div> <div class="sect1" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="keyCreator"></a>Implementing Key <span>Creators</span> </h2> </div> </div> <div></div> </div> <p> You must provide every secondary database with a <span>class</span> that creates keys from primary records. You identify this <span>class</span> <span> using the <tt class="methodname">SecondaryConfig.setKeyCreator()</tt> method. </span> </p> <p> You can create keys using whatever data you want. Typically you will base your key on some information found in a record's data, but you can also use information found in the primary record's key. How you build your keys is entirely dependent upon the nature of the index that you want to maintain. </p> <p> You implement a key creator by writing a class that implements the <tt class="classname">SecondaryKeyCreator</tt> interface. This interface requires you to implement the <tt class="methodname">SecondaryKeyCreator.createSecondaryKey()</tt> method. </p> <p> One thing to remember when implementing this method is that you will need a way to extract the necessary information from the data's <tt class="classname">DatabaseEntry</tt> and/or the key's <tt class="classname">DatabaseEntry</tt> that are provided on calls to this method. If you are using complex objects, then you are probably using the Bind APIs to perform this conversion. The easiest thing to do is to instantiate the <tt class="classname">EntryBinding</tt> or <tt class="classname">TupleBinding</tt> that you need to perform the conversion, and then provide this to your key creator's constructor. The Bind APIs are introduced in <a href="bindAPI.html">Using the BIND APIs</a>. </p> <p> <tt class="methodname">SecondaryKeyCreator.createSecondaryKey()</tt> returns a boolean. A return value of <tt class="literal">false</tt> indicates that no secondary key exists, and therefore no record should be added to the secondary database for that primary record. If a record already exists in the secondary database, it is deleted. </p> <p> For example, suppose your primary database uses the following class for its record data: </p> <a id="java_index3"></a> <pre class="programlisting">package db.GettingStarted; public class PersonData { private String userID; private String surname; private String familiarName; public PersonData(String userID, String surname, String familiarName) { this.userID = userID; this.surname = surname; this.familiarName = familiarName; } public String getUserID() { return userID; } public String getSurname() { return surname; } public String getFamiliarName() { return familiarName; } } </pre> <p> Also, suppose that you have created a custom tuple binding, <tt class="classname">PersonDataBinding</tt>, that you use to convert <tt class="classname">PersonData</tt> objects to and from <tt class="classname">DatabaseEntry</tt> objects. (Custom tuple bindings are described in <a href="bindAPI.html#customTuple">Custom Tuple Bindings</a>.) </p> <p> Finally, suppose you want a secondary database that is keyed based on the person's full name. </p> <p> Then in this case you might create a key creator as follows: </p> <a id="java_index4"></a> <pre class="programlisting">package db.GettingStarted; import com.sleepycat.bind.tuple.TupleBinding; import com.sleepycat.db.SecondaryKeyCreator; import com.sleepycat.db.DatabaseEntry; import com.sleepycat.db.DatabaseException; import com.sleepycat.db.SecondaryDatabase; import java.io.IOException; public class FullNameKeyCreator implements SecondaryKeyCreator { private TupleBinding theBinding; public FullNameKeyCreator(TupleBinding theBinding1) { theBinding = theBinding1; } public boolean createSecondaryKey(SecondaryDatabase secDb, DatabaseEntry keyEntry, DatabaseEntry dataEntry, DatabaseEntry resultEntry) { try { PersonData pd = (PersonData) theBinding.entryToObject(dataEntry); String fullName = pd.getFamiliarName() + " " + pd.getSurname(); resultEntry.setData(fullName.getBytes("UTF-8")); } catch (IOException willNeverOccur) {} return true; } } </pre> <p>Finally, you use this key creator as follows:</p> <a id="java_index5"></a> <pre class="programlisting">package db.GettingStarted; import com.sleepycat.bind.tuple.TupleBinding; import com.sleepycat.db.Database; import com.sleepycat.db.DatabaseException; import com.sleepycat.db.DatabaseType; import com.sleepycat.db.SecondaryDatabase; import com.sleepycat.db.SecondaryConfig; import java.io.FileNotFoundException; ... Database myDb = null; SecondaryDatabase mySecDb = null; try { // Primary database open omitted for brevity ... TupleBinding myDataBinding = new MyTupleBinding(); FullNameKeyCreator fnkc = new FullNameKeyCreator(myDataBinding); SecondaryConfig mySecConfig = new SecondaryConfig(); mySecConfig.setKeyCreator(fnkc); mySecConfig.setType(DatabaseType.BTREE); //Perform the actual open String secDbName = "mySecondaryDatabase"; mySecDb = new SecondaryDatabase(secDbName, null, myDb, mySecConfig); } catch (DatabaseException de) { // Exception handling goes here } catch (FileNotFoundException fnfe) { // Exception handling goes here } finally { try { if (mySecDb != null) { mySecDb.close(); } if (myDb != null) { myDb.close(); } } catch (DatabaseException dbe) { // Exception handling goes here } }</pre> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="multikeys"></a>Working with Multiple Keys</h3> </div> </div> <div></div> </div> <p> Until now we have only discussed indexes as if there is a one-to-one relationship between the secondary key and the primary database record. In fact, it is possible to generate multiple keys for any given record, provided that you take appropriate steps in your key creator to do so. </p> <p> For example, suppose you had a database that contained information about books. Suppose further that you sometimes want to look up books by author. Because sometimes books have multiple authors, you may want to return multiple secondary keys for every book that you index. </p> <p> To do this, you write a key creator that implements <tt class="classname">SecondaryMultiKeyCreator</tt> instead of <tt class="classname">SecondaryKeyCreator</tt>. The key difference between the two is that <tt class="classname">SecondaryKeyCreator</tt> uses a single <tt class="classname">DatabaseEntry</tt> object as the result, while <tt class="classname">SecondaryMultiKeyCreator</tt> returns a set of <tt class="classname">DatabaseEntry</tt> objects (using <tt class="classname">java.util.Set</tt>). Also, you assign the <tt class="classname">SecondaryMultiKeyCreator</tt> implementation using <tt class="methodname">SecondaryConfig.setMultiKeyCreator()</tt> instead of <tt class="methodname">SecondaryConfig.setKeyCreator()</tt>. </p> <p> For example: </p> <pre class="programlisting">package db.GettingStarted; import com.sleepycat.db.DatabaseEntry; import com.sleepycat.db.DatabaseException; import com.sleepycat.db.SecondaryDatabase; import com.sleepycat.db.SecondaryMultiKeyCreator; import java.util.HashSet; import java.util.Set; public class MyMultiKeyCreator implements SecondaryMultiKeyCreator { // Constructor not implemented. How this is implemented depends on // how you want to extract the data for your keys. MyMultiKeyCreator() { ... } // Abstract method that we must implement public void createSecondaryKeys(SecondaryDatabase secDb, DatabaseEntry keyEntry, // From the primary DatabaseEntry dataEntry, // From the primary Set results) // Results set throws DatabaseException { try { // Create your keys, adding each to the set // Creation of key 'a' not shown results.add(a) // Creation of key 'b' not shown results.add(b) } catch (IOException willNeverOccur) {} } } </pre> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="indexes.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="indexes.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="secondaryProps.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">Chapter 10. Secondary Databases </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> Secondary Database Properties</td> </tr> </table> </div> </body> </html>
djsedulous/namecoind
libs/db-4.7.25.NC/docs/gsg/JAVA/keyCreator.html
HTML
mit
12,074
import React from 'react'; import TestUtils from 'react-addons-test-utils'; import { expect } from 'chai'; import { Hello } from 'client/components/Hello'; const setup = () => { const props = { message: 'hello' }; const renderer = TestUtils.createRenderer(); renderer.render(<Hello {...props} />); const output = renderer.getRenderOutput(); return { output }; }; describe('tests Hello component', () => { it('renders correctly', () => { const { output } = setup(); expect(output.type).to.eql('div'); expect(output.props.children).to.eql('hello'); }); });
toomastahves/node-red-starter
test/client/components/Hello.spec.js
JavaScript
mit
590
/*! * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */ /* FONT PATH * -------------------------- */ @font-face { font-family: 'FontAwesome'; src: url('../fonts/fontawesome-webfont.eot?v=4.0.3'); src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } .fa { display: inline-block; font-family: FontAwesome; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* makes the font 33% larger relative to the icon container */ .fa-lg { font-size: 1.33333333em; line-height: 0.75em; vertical-align: -15%; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-fw { width: 1.28571429em; text-align: center; } .fa-ul { padding-left: 0; margin-left: 2.14285714em; list-style-type: none; } .fa-ul > li { position: relative; } .fa-li { position: absolute; left: -2.14285714em; width: 2.14285714em; top: 0.14285714em; text-align: center; } .fa-li.fa-lg { left: -1.85714286em; } .fa-border { padding: .2em .25em .15em; border: solid 0.08em #eeeeee; border-radius: .1em; } .pull-right { float: right; } .pull-left { float: left; } .fa.pull-left { margin-right: .3em; } .fa.pull-right { margin-left: .3em; } .fa-spin { -webkit-animation: spin 2s infinite linear; -moz-animation: spin 2s infinite linear; -o-animation: spin 2s infinite linear; animation: spin 2s infinite linear; } @-moz-keyframes spin { 0% { -moz-transform: rotate(0deg); } 100% { -moz-transform: rotate(359deg); } } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); } } @-o-keyframes spin { 0% { -o-transform: rotate(0deg); } 100% { -o-transform: rotate(359deg); } } @keyframes spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } .fa-rotate-90 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -ms-transform: rotate(90deg); -o-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); -webkit-transform: rotate(270deg); -moz-transform: rotate(270deg); -ms-transform: rotate(270deg); -o-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); -webkit-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -o-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); -webkit-transform: scale(1, -1); -moz-transform: scale(1, -1); -ms-transform: scale(1, -1); -o-transform: scale(1, -1); transform: scale(1, -1); } .fa-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle; } .fa-stack-1x, .fa-stack-2x { position: absolute; left: 0; width: 100%; text-align: center; } .fa-stack-1x { line-height: inherit; } .fa-stack-2x { font-size: 2em; } .fa-inverse { color: #ffffff; } /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ .fa-glass:before { content: "\f000"; } .fa-music:before { content: "\f001"; } .fa-search:before { content: "\f002"; } .fa-envelope-o:before { content: "\f003"; } .fa-heart:before { content: "\f004"; } .fa-star:before { content: "\f005"; } .fa-star-o:before { content: "\f006"; } .fa-user:before { content: "\f007"; } .fa-film:before { content: "\f008"; } .fa-th-large:before { content: "\f009"; } .fa-th:before { content: "\f00a"; } .fa-th-list:before { content: "\f00b"; } .fa-check:before { content: "\f00c"; } .fa-times:before { content: "\f00d"; } .fa-search-plus:before { content: "\f00e"; } .fa-search-minus:before { content: "\f010"; } .fa-power-off:before { content: "\f011"; } .fa-signal:before { content: "\f012"; } .fa-gear:before, .fa-cog:before { content: "\f013"; } .fa-trash-o:before { content: "\f014"; } .fa-home:before { content: "\f015"; } .fa-file-o:before { content: "\f016"; } .fa-clock-o:before { content: "\f017"; } .fa-road:before { content: "\f018"; } .fa-download:before { content: "\f019"; } .fa-arrow-circle-o-down:before { content: "\f01a"; } .fa-arrow-circle-o-up:before { content: "\f01b"; } .fa-inbox:before { content: "\f01c"; } .fa-play-circle-o:before { content: "\f01d"; } .fa-rotate-right:before, .fa-repeat:before { content: "\f01e"; } .fa-refresh:before { content: "\f021"; } .fa-list-alt:before { content: "\f022"; } .fa-lock:before { content: "\f023"; } .fa-flag:before { content: "\f024"; } .fa-headphones:before { content: "\f025"; } .fa-volume-off:before { content: "\f026"; } .fa-volume-down:before { content: "\f027"; } .fa-volume-up:before { content: "\f028"; } .fa-qrcode:before { content: "\f029"; } .fa-barcode:before { content: "\f02a"; } .fa-tag:before { content: "\f02b"; } .fa-tags:before { content: "\f02c"; } .fa-book:before { content: "\f02d"; } .fa-bookmark:before { content: "\f02e"; } .fa-print:before { content: "\f02f"; } .fa-camera:before { content: "\f030"; } .fa-font:before { content: "\f031"; } .fa-bold:before { content: "\f032"; } .fa-italic:before { content: "\f033"; } .fa-text-height:before { content: "\f034"; } .fa-text-width:before { content: "\f035"; } .fa-align-left:before { content: "\f036"; } .fa-align-center:before { content: "\f037"; } .fa-align-right:before { content: "\f038"; } .fa-align-justify:before { content: "\f039"; } .fa-list:before { content: "\f03a"; } .fa-dedent:before, .fa-outdent:before { content: "\f03b"; } .fa-indent:before { content: "\f03c"; } .fa-video-camera:before { content: "\f03d"; } .fa-photo:before, .fa-image:before, .fa-picture-o:before { content: "\f03e"; } .fa-pencil:before { content: "\f040"; } .fa-map-marker:before { content: "\f041"; } .fa-adjust:before { content: "\f042"; } .fa-tint:before { content: "\f043"; } .fa-edit:before, .fa-pencil-square-o:before { content: "\f044"; } .fa-share-square-o:before { content: "\f045"; } .fa-check-square-o:before { content: "\f046"; } .fa-arrows:before { content: "\f047"; } .fa-step-backward:before { content: "\f048"; } .fa-fast-backward:before { content: "\f049"; } .fa-backward:before { content: "\f04a"; } .fa-play:before { content: "\f04b"; } .fa-pause:before { content: "\f04c"; } .fa-stop:before { content: "\f04d"; } .fa-forward:before { content: "\f04e"; } .fa-fast-forward:before { content: "\f050"; } .fa-step-forward:before { content: "\f051"; } .fa-eject:before { content: "\f052"; } .fa-chevron-left:before { content: "\f053"; } .fa-chevron-right:before { content: "\f054"; } .fa-plus-circle:before { content: "\f055"; } .fa-minus-circle:before { content: "\f056"; } .fa-times-circle:before { content: "\f057"; } .fa-check-circle:before { content: "\f058"; } .fa-question-circle:before { content: "\f059"; } .fa-info-circle:before { content: "\f05a"; } .fa-crosshairs:before { content: "\f05b"; } .fa-times-circle-o:before { content: "\f05c"; } .fa-check-circle-o:before { content: "\f05d"; } .fa-ban:before { content: "\f05e"; } .fa-arrow-left:before { content: "\f060"; } .fa-arrow-right:before { content: "\f061"; } .fa-arrow-up:before { content: "\f062"; } .fa-arrow-down:before { content: "\f063"; } .fa-mail-forward:before, .fa-share:before { content: "\f064"; } .fa-expand:before { content: "\f065"; } .fa-compress:before { content: "\f066"; } .fa-plus:before { content: "\f067"; } .fa-minus:before { content: "\f068"; } .fa-asterisk:before { content: "\f069"; } .fa-exclamation-circle:before { content: "\f06a"; } .fa-gift:before { content: "\f06b"; } .fa-leaf:before { content: "\f06c"; } .fa-fire:before { content: "\f06d"; } .fa-eye:before { content: "\f06e"; } .fa-eye-slash:before { content: "\f070"; } .fa-warning:before, .fa-exclamation-triangle:before { content: "\f071"; } .fa-plane:before { content: "\f072"; } .fa-calendar:before { content: "\f073"; } .fa-random:before { content: "\f074"; } .fa-comment:before { content: "\f075"; } .fa-magnet:before { content: "\f076"; } .fa-chevron-up:before { content: "\f077"; } .fa-chevron-down:before { content: "\f078"; } .fa-retweet:before { content: "\f079"; } .fa-shopping-cart:before { content: "\f07a"; } .fa-folder:before { content: "\f07b"; } .fa-folder-open:before { content: "\f07c"; } .fa-arrows-v:before { content: "\f07d"; } .fa-arrows-h:before { content: "\f07e"; } .fa-bar-chart-o:before { content: "\f080"; } .fa-twitter-square:before { content: "\f081"; } .fa-facebook-square:before { content: "\f082"; } .fa-camera-retro:before { content: "\f083"; } .fa-key:before { content: "\f084"; } .fa-gears:before, .fa-cogs:before { content: "\f085"; } .fa-comments:before { content: "\f086"; } .fa-thumbs-o-up:before { content: "\f087"; } .fa-thumbs-o-down:before { content: "\f088"; } .fa-star-half:before { content: "\f089"; } .fa-heart-o:before { content: "\f08a"; } .fa-sign-out:before { content: "\f08b"; } .fa-linkedin-square:before { content: "\f08c"; } .fa-thumb-tack:before { content: "\f08d"; } .fa-external-link:before { content: "\f08e"; } .fa-sign-in:before { content: "\f090"; } .fa-trophy:before { content: "\f091"; } .fa-github-square:before { content: "\f092"; } .fa-upload:before { content: "\f093"; } .fa-lemon-o:before { content: "\f094"; } .fa-phone:before { content: "\f095"; } .fa-square-o:before { content: "\f096"; } .fa-bookmark-o:before { content: "\f097"; } .fa-phone-square:before { content: "\f098"; } .fa-twitter:before { content: "\f099"; } .fa-facebook:before { content: "\f09a"; } .fa-github:before { content: "\f09b"; } .fa-unlock:before { content: "\f09c"; } .fa-credit-card:before { content: "\f09d"; } .fa-rss:before { content: "\f09e"; } .fa-hdd-o:before { content: "\f0a0"; } .fa-bullhorn:before { content: "\f0a1"; } .fa-bell:before { content: "\f0f3"; } .fa-certificate:before { content: "\f0a3"; } .fa-hand-o-right:before { content: "\f0a4"; } .fa-hand-o-left:before { content: "\f0a5"; } .fa-hand-o-up:before { content: "\f0a6"; } .fa-hand-o-down:before { content: "\f0a7"; } .fa-arrow-circle-left:before { content: "\f0a8"; } .fa-arrow-circle-right:before { content: "\f0a9"; } .fa-arrow-circle-up:before { content: "\f0aa"; } .fa-arrow-circle-down:before { content: "\f0ab"; } .fa-globe:before { content: "\f0ac"; } .fa-wrench:before { content: "\f0ad"; } .fa-tasks:before { content: "\f0ae"; } .fa-filter:before { content: "\f0b0"; } .fa-briefcase:before { content: "\f0b1"; } .fa-arrows-alt:before { content: "\f0b2"; } .fa-group:before, .fa-users:before { content: "\f0c0"; } .fa-chain:before, .fa-link:before { content: "\f0c1"; } .fa-cloud:before { content: "\f0c2"; } .fa-flask:before { content: "\f0c3"; } .fa-cut:before, .fa-scissors:before { content: "\f0c4"; } .fa-copy:before, .fa-files-o:before { content: "\f0c5"; } .fa-paperclip:before { content: "\f0c6"; } .fa-save:before, .fa-floppy-o:before { content: "\f0c7"; } .fa-square:before { content: "\f0c8"; } .fa-navicon:before, .fa-reorder:before, .fa-bars:before { content: "\f0c9"; } .fa-list-ul:before { content: "\f0ca"; } .fa-list-ol:before { content: "\f0cb"; } .fa-strikethrough:before { content: "\f0cc"; } .fa-underline:before { content: "\f0cd"; } .fa-table:before { content: "\f0ce"; } .fa-magic:before { content: "\f0d0"; } .fa-truck:before { content: "\f0d1"; } .fa-pinterest:before { content: "\f0d2"; } .fa-pinterest-square:before { content: "\f0d3"; } .fa-google-plus-square:before { content: "\f0d4"; } .fa-google-plus:before { content: "\f0d5"; } .fa-money:before { content: "\f0d6"; } .fa-caret-down:before { content: "\f0d7"; } .fa-caret-up:before { content: "\f0d8"; } .fa-caret-left:before { content: "\f0d9"; } .fa-caret-right:before { content: "\f0da"; } .fa-columns:before { content: "\f0db"; } .fa-unsorted:before, .fa-sort:before { content: "\f0dc"; } .fa-sort-down:before, .fa-sort-desc:before { content: "\f0dd"; } .fa-sort-up:before, .fa-sort-asc:before { content: "\f0de"; } .fa-envelope:before { content: "\f0e0"; } .fa-linkedin:before { content: "\f0e1"; } .fa-rotate-left:before, .fa-undo:before { content: "\f0e2"; } .fa-legal:before, .fa-gavel:before { content: "\f0e3"; } .fa-dashboard:before, .fa-tachometer:before { content: "\f0e4"; } .fa-comment-o:before { content: "\f0e5"; } .fa-comments-o:before { content: "\f0e6"; } .fa-flash:before, .fa-bolt:before { content: "\f0e7"; } .fa-sitemap:before { content: "\f0e8"; } .fa-umbrella:before { content: "\f0e9"; } .fa-paste:before, .fa-clipboard:before { content: "\f0ea"; } .fa-lightbulb-o:before { content: "\f0eb"; } .fa-exchange:before { content: "\f0ec"; } .fa-cloud-download:before { content: "\f0ed"; } .fa-cloud-upload:before { content: "\f0ee"; } .fa-user-md:before { content: "\f0f0"; } .fa-stethoscope:before { content: "\f0f1"; } .fa-suitcase:before { content: "\f0f2"; } .fa-bell-o:before { content: "\f0a2"; } .fa-coffee:before { content: "\f0f4"; } .fa-cutlery:before { content: "\f0f5"; } .fa-file-text-o:before { content: "\f0f6"; } .fa-building-o:before { content: "\f0f7"; } .fa-hospital-o:before { content: "\f0f8"; } .fa-ambulance:before { content: "\f0f9"; } .fa-medkit:before { content: "\f0fa"; } .fa-fighter-jet:before { content: "\f0fb"; } .fa-beer:before { content: "\f0fc"; } .fa-h-square:before { content: "\f0fd"; } .fa-plus-square:before { content: "\f0fe"; } .fa-angle-double-left:before { content: "\f100"; } .fa-angle-double-right:before { content: "\f101"; } .fa-angle-double-up:before { content: "\f102"; } .fa-angle-double-down:before { content: "\f103"; } .fa-angle-left:before { content: "\f104"; } .fa-angle-right:before { content: "\f105"; } .fa-angle-up:before { content: "\f106"; } .fa-angle-down:before { content: "\f107"; } .fa-desktop:before { content: "\f108"; } .fa-laptop:before { content: "\f109"; } .fa-tablet:before { content: "\f10a"; } .fa-mobile-phone:before, .fa-mobile:before { content: "\f10b"; } .fa-circle-o:before { content: "\f10c"; } .fa-quote-left:before { content: "\f10d"; } .fa-quote-right:before { content: "\f10e"; } .fa-spinner:before { content: "\f110"; } .fa-circle:before { content: "\f111"; } .fa-mail-reply:before, .fa-reply:before { content: "\f112"; } .fa-github-alt:before { content: "\f113"; } .fa-folder-o:before { content: "\f114"; } .fa-folder-open-o:before { content: "\f115"; } .fa-smile-o:before { content: "\f118"; } .fa-frown-o:before { content: "\f119"; } .fa-meh-o:before { content: "\f11a"; } .fa-gamepad:before { content: "\f11b"; } .fa-keyboard-o:before { content: "\f11c"; } .fa-flag-o:before { content: "\f11d"; } .fa-flag-checkered:before { content: "\f11e"; } .fa-terminal:before { content: "\f120"; } .fa-code:before { content: "\f121"; } .fa-mail-reply-all:before, .fa-reply-all:before { content: "\f122"; } .fa-star-half-empty:before, .fa-star-half-full:before, .fa-star-half-o:before { content: "\f123"; } .fa-location-arrow:before { content: "\f124"; } .fa-crop:before { content: "\f125"; } .fa-code-fork:before { content: "\f126"; } .fa-unlink:before, .fa-chain-broken:before { content: "\f127"; } .fa-question:before { content: "\f128"; } .fa-info:before { content: "\f129"; } .fa-exclamation:before { content: "\f12a"; } .fa-superscript:before { content: "\f12b"; } .fa-subscript:before { content: "\f12c"; } .fa-eraser:before { content: "\f12d"; } .fa-puzzle-piece:before { content: "\f12e"; } .fa-microphone:before { content: "\f130"; } .fa-microphone-slash:before { content: "\f131"; } .fa-shield:before { content: "\f132"; } .fa-calendar-o:before { content: "\f133"; } .fa-fire-extinguisher:before { content: "\f134"; } .fa-rocket:before { content: "\f135"; } .fa-maxcdn:before { content: "\f136"; } .fa-chevron-circle-left:before { content: "\f137"; } .fa-chevron-circle-right:before { content: "\f138"; } .fa-chevron-circle-up:before { content: "\f139"; } .fa-chevron-circle-down:before { content: "\f13a"; } .fa-html5:before { content: "\f13b"; } .fa-css3:before { content: "\f13c"; } .fa-anchor:before { content: "\f13d"; } .fa-unlock-alt:before { content: "\f13e"; } .fa-bullseye:before { content: "\f140"; } .fa-ellipsis-h:before { content: "\f141"; } .fa-ellipsis-v:before { content: "\f142"; } .fa-rss-square:before { content: "\f143"; } .fa-play-circle:before { content: "\f144"; } .fa-ticket:before { content: "\f145"; } .fa-minus-square:before { content: "\f146"; } .fa-minus-square-o:before { content: "\f147"; } .fa-level-up:before { content: "\f148"; } .fa-level-down:before { content: "\f149"; } .fa-check-square:before { content: "\f14a"; } .fa-pencil-square:before { content: "\f14b"; } .fa-external-link-square:before { content: "\f14c"; } .fa-share-square:before { content: "\f14d"; } .fa-compass:before { content: "\f14e"; } .fa-toggle-down:before, .fa-caret-square-o-down:before { content: "\f150"; } .fa-toggle-up:before, .fa-caret-square-o-up:before { content: "\f151"; } .fa-toggle-right:before, .fa-caret-square-o-right:before { content: "\f152"; } .fa-euro:before, .fa-eur:before { content: "\f153"; } .fa-gbp:before { content: "\f154"; } .fa-dollar:before, .fa-usd:before { content: "\f155"; } .fa-rupee:before, .fa-inr:before { content: "\f156"; } .fa-cny:before, .fa-rmb:before, .fa-yen:before, .fa-jpy:before { content: "\f157"; } .fa-ruble:before, .fa-rouble:before, .fa-rub:before { content: "\f158"; } .fa-won:before, .fa-krw:before { content: "\f159"; } .fa-bitcoin:before, .fa-btc:before { content: "\f15a"; } .fa-file:before { content: "\f15b"; } .fa-file-text:before { content: "\f15c"; } .fa-sort-alpha-asc:before { content: "\f15d"; } .fa-sort-alpha-desc:before { content: "\f15e"; } .fa-sort-amount-asc:before { content: "\f160"; } .fa-sort-amount-desc:before { content: "\f161"; } .fa-sort-numeric-asc:before { content: "\f162"; } .fa-sort-numeric-desc:before { content: "\f163"; } .fa-thumbs-up:before { content: "\f164"; } .fa-thumbs-down:before { content: "\f165"; } .fa-youtube-square:before { content: "\f166"; } .fa-youtube:before { content: "\f167"; } .fa-xing:before { content: "\f168"; } .fa-xing-square:before { content: "\f169"; } .fa-youtube-play:before { content: "\f16a"; } .fa-dropbox:before { content: "\f16b"; } .fa-stack-overflow:before { content: "\f16c"; } .fa-instagram:before { content: "\f16d"; } .fa-flickr:before { content: "\f16e"; } .fa-adn:before { content: "\f170"; } .fa-bitbucket:before { content: "\f171"; } .fa-bitbucket-square:before { content: "\f172"; } .fa-tumblr:before { content: "\f173"; } .fa-tumblr-square:before { content: "\f174"; } .fa-long-arrow-down:before { content: "\f175"; } .fa-long-arrow-up:before { content: "\f176"; } .fa-long-arrow-left:before { content: "\f177"; } .fa-long-arrow-right:before { content: "\f178"; } .fa-apple:before { content: "\f179"; } .fa-windows:before { content: "\f17a"; } .fa-android:before { content: "\f17b"; } .fa-linux:before { content: "\f17c"; } .fa-dribbble:before { content: "\f17d"; } .fa-skype:before { content: "\f17e"; } .fa-foursquare:before { content: "\f180"; } .fa-trello:before { content: "\f181"; } .fa-female:before { content: "\f182"; } .fa-male:before { content: "\f183"; } .fa-gittip:before { content: "\f184"; } .fa-sun-o:before { content: "\f185"; } .fa-moon-o:before { content: "\f186"; } .fa-archive:before { content: "\f187"; } .fa-bug:before { content: "\f188"; } .fa-vk:before { content: "\f189"; } .fa-weibo:before { content: "\f18a"; } .fa-renren:before { content: "\f18b"; } .fa-pagelines:before { content: "\f18c"; } .fa-stack-exchange:before { content: "\f18d"; } .fa-arrow-circle-o-right:before { content: "\f18e"; } .fa-arrow-circle-o-left:before { content: "\f190"; } .fa-toggle-left:before, .fa-caret-square-o-left:before { content: "\f191"; } .fa-dot-circle-o:before { content: "\f192"; } .fa-wheelchair:before { content: "\f193"; } .fa-vimeo-square:before { content: "\f194"; } .fa-turkish-lira:before, .fa-try:before { content: "\f195"; } .fa-plus-square-o:before { content: "\f196"; } .fa-space-shuttle:before { content: "\f197"; } .fa-slack:before { content: "\f198"; } .fa-envelope-square:before { content: "\f199"; } .fa-wordpress:before { content: "\f19a"; } .fa-openid:before { content: "\f19b"; } .fa-institution:before, .fa-bank:before, .fa-university:before { content: "\f19c"; } .fa-mortar-board:before, .fa-graduation-cap:before { content: "\f19d"; } .fa-yahoo:before { content: "\f19e"; } .fa-google:before { content: "\f1a0"; } .fa-reddit:before { content: "\f1a1"; } .fa-reddit-square:before { content: "\f1a2"; } .fa-stumbleupon-circle:before { content: "\f1a3"; } .fa-stumbleupon:before { content: "\f1a4"; } .fa-delicious:before { content: "\f1a5"; } .fa-digg:before { content: "\f1a6"; } .fa-pied-piper-square:before, .fa-pied-piper:before { content: "\f1a7"; } .fa-pied-piper-alt:before { content: "\f1a8"; } .fa-drupal:before { content: "\f1a9"; } .fa-joomla:before { content: "\f1aa"; } .fa-language:before { content: "\f1ab"; } .fa-fax:before { content: "\f1ac"; } .fa-building:before { content: "\f1ad"; } .fa-child:before { content: "\f1ae"; } .fa-paw:before { content: "\f1b0"; } .fa-spoon:before { content: "\f1b1"; } .fa-cube:before { content: "\f1b2"; } .fa-cubes:before { content: "\f1b3"; } .fa-behance:before { content: "\f1b4"; } .fa-behance-square:before { content: "\f1b5"; } .fa-steam:before { content: "\f1b6"; } .fa-steam-square:before { content: "\f1b7"; } .fa-recycle:before { content: "\f1b8"; } .fa-automobile:before, .fa-car:before { content: "\f1b9"; } .fa-cab:before, .fa-taxi:before { content: "\f1ba"; } .fa-tree:before { content: "\f1bb"; } .fa-spotify:before { content: "\f1bc"; } .fa-deviantart:before { content: "\f1bd"; } .fa-soundcloud:before { content: "\f1be"; } .fa-database:before { content: "\f1c0"; } .fa-file-pdf-o:before { content: "\f1c1"; } .fa-file-word-o:before { content: "\f1c2"; } .fa-file-excel-o:before { content: "\f1c3"; } .fa-file-powerpoint-o:before { content: "\f1c4"; } .fa-file-photo-o:before, .fa-file-picture-o:before, .fa-file-image-o:before { content: "\f1c5"; } .fa-file-zip-o:before, .fa-file-archive-o:before { content: "\f1c6"; } .fa-file-sound-o:before, .fa-file-audio-o:before { content: "\f1c7"; } .fa-file-movie-o:before, .fa-file-video-o:before { content: "\f1c8"; } .fa-file-code-o:before { content: "\f1c9"; } .fa-vine:before { content: "\f1ca"; } .fa-codepen:before { content: "\f1cb"; } .fa-jsfiddle:before { content: "\f1cc"; } .fa-life-bouy:before, .fa-life-saver:before, .fa-support:before, .fa-life-ring:before { content: "\f1cd"; } .fa-circle-o-notch:before { content: "\f1ce"; } .fa-ra:before, .fa-rebel:before { content: "\f1d0"; } .fa-ge:before, .fa-empire:before { content: "\f1d1"; } .fa-git-square:before { content: "\f1d2"; } .fa-git:before { content: "\f1d3"; } .fa-hacker-news:before { content: "\f1d4"; } .fa-tencent-weibo:before { content: "\f1d5"; } .fa-qq:before { content: "\f1d6"; } .fa-wechat:before, .fa-weixin:before { content: "\f1d7"; } .fa-send:before, .fa-paper-plane:before { content: "\f1d8"; } .fa-send-o:before, .fa-paper-plane-o:before { content: "\f1d9"; } .fa-history:before { content: "\f1da"; } .fa-circle-thin:before { content: "\f1db"; } .fa-header:before { content: "\f1dc"; } .fa-paragraph:before { content: "\f1dd"; } .fa-sliders:before { content: "\f1de"; } .fa-share-alt:before { content: "\f1e0"; } .fa-share-alt-square:before { content: "\f1e1"; } .fa-bomb:before { content: "\f1e2"; }
calebodemus/Movibe
src/Movibe/BackendBundle/Resources/public/css/font-awesome.css
CSS
mit
25,197
# frozen_string_literal: true require 'spec_helper' describe RuboCop::Cop::Performance::CompareWithBlock do subject(:cop) { described_class.new } shared_examples 'compare with block' do |method| it "registers an offense for #{method}" do inspect_source(cop, "array.#{method} { |a, b| a.foo <=> b.foo }") expect(cop.offenses.size).to eq(1) end it "accepts valid #{method} usage" do inspect_source(cop, "array.#{method} { |a, b| b <=> a }") expect(cop.offenses).to be_empty end it "accepts #{method}_by" do inspect_source(cop, "array.#{method}_by { |a| a.baz }") end it "autocorrects array.#{method} { |a, b| a.foo <=> b.foo }" do new_source = autocorrect_source(cop, "array.#{method} { |a, b| a.foo <=> b.foo }") expect(new_source).to eq "array.#{method}_by(&:foo)" end it "autocorrects array.#{method} { |a, b| a.bar <=> b.bar }" do new_source = autocorrect_source(cop, "array.#{method} { |a, b| a.bar <=> b.bar }") expect(new_source).to eq "array.#{method}_by(&:bar)" end it "autocorrects array.#{method} { |x, y| x.foo <=> y.foo }" do new_source = autocorrect_source(cop, "array.#{method} { |x, y| x.foo <=> y.foo }") expect(new_source).to eq "array.#{method}_by(&:foo)" end it "autocorrects array.#{method} do |a, b| a.foo <=> b.foo end" do new_source = autocorrect_source(cop, ["array.#{method} do |a, b|", ' a.foo <=> b.foo', 'end']) expect(new_source).to eq "array.#{method}_by(&:foo)" end it 'formats the error message correctly for ' \ "array.#{method} { |a, b| a.foo <=> b.foo }" do inspect_source(cop, "array.#{method} { |a, b| a.foo <=> b.foo }") expect(cop.messages).to eq(["Use `#{method}_by(&:foo)` instead of " \ "`#{method} { |a, b| a.foo <=> b.foo }`."]) end end include_examples 'compare with block', 'sort' include_examples 'compare with block', 'max' include_examples 'compare with block', 'min' end
alexdowad/rubocop
spec/rubocop/cop/performance/compare_with_block_spec.rb
Ruby
mit
2,150
/*************************************************************************/ /* texture_rect.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* 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. */ /*************************************************************************/ #ifndef TEXTURE_FRAME_H #define TEXTURE_FRAME_H #include "scene/gui/control.h" class TextureRect : public Control { GDCLASS(TextureRect, Control); public: enum StretchMode { STRETCH_SCALE_ON_EXPAND, //default, for backwards compatibility STRETCH_SCALE, STRETCH_TILE, STRETCH_KEEP, STRETCH_KEEP_CENTERED, STRETCH_KEEP_ASPECT, STRETCH_KEEP_ASPECT_CENTERED, STRETCH_KEEP_ASPECT_COVERED, }; private: bool expand; bool hflip; bool vflip; Ref<Texture2D> texture; StretchMode stretch_mode; void _texture_changed(); protected: void _notification(int p_what); virtual Size2 get_minimum_size() const override; static void _bind_methods(); public: void set_texture(const Ref<Texture2D> &p_tex); Ref<Texture2D> get_texture() const; void set_expand(bool p_expand); bool has_expand() const; void set_stretch_mode(StretchMode p_mode); StretchMode get_stretch_mode() const; void set_flip_h(bool p_flip); bool is_flipped_h() const; void set_flip_v(bool p_flip); bool is_flipped_v() const; TextureRect(); ~TextureRect(); }; VARIANT_ENUM_CAST(TextureRect::StretchMode); #endif // TEXTURE_FRAME_H
Paulloz/godot
scene/gui/texture_rect.h
C
mit
3,335
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Propel1\Form\Type; use Symfony\Bridge\Propel1\Form\ChoiceList\ModelChoiceList; use Symfony\Bridge\Propel1\Form\DataTransformer\ModelToIdTransformer; use Symfony\Bridge\Propel1\Form\DataTransformer\ModelsToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilder; /** * ModelType class. * * @author William Durand <william.durand1@gmail.com> */ class ModelType extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { if ($options['multiple']) { $builder->prependClientTransformer(new ModelsToArrayTransformer($options['choice_list'])); } else { $builder->prependClientTransformer(new ModelToIdTransformer($options['choice_list'])); } } public function getDefaultOptions(array $options) { $defaultOptions = array( 'template' => 'choice', 'multiple' => false, 'expanded' => false, 'class' => null, 'property' => null, 'query' => null, 'choices' => array(), 'preferred_choices' => array(), ); $options = array_replace($defaultOptions, $options); if (!isset($options['choice_list'])) { $defaultOptions['choice_list'] = new ModelChoiceList( $options['class'], $options['property'], $options['choices'], $options['query'] ); } return $defaultOptions; } public function getParent(array $options) { return 'choice'; } public function getName() { return 'propel_model'; } }
ttsuru/ecx
vendor/symfony/src/Symfony/Bridge/Propel1/Form/Type/ModelType.php
PHP
mit
2,027
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Dynamic; using System.Linq.Expressions; namespace System.Management.Automation.ComInterop { internal interface IPseudoComObject { DynamicMetaObject GetMetaObject(Expression expression); } }
TravisEz13/PowerShell
src/System.Management.Automation/engine/ComInterop/IPseudoComObject.cs
C#
mit
362
#!/bin/bash -e readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" readonly SERVICE_IMAGE="$2" readonly SERVICE_NAME="$1" readonly REPLICAS=1 export ENV_LIST="" parse_env() { ##TODO: from the file <service name>.env, parse a string in format ## -e key=value -e key1=value1 ... local env_file="$SCRIPT_DIR/$SERVICE_NAME.env" while IFS='' read -r line || [[ -n "$line" ]]; do ENV_LIST="$ENV_LIST -e $line" done < "$env_file" } provision_service() { docker service create \ --with-registry-auth \ --name $SERVICE_NAME \ --replicas $REPLICAS \ $ENV_LIST $SERVICE_IMAGE } main() { parse_env provision_service } main
himanshu0503/base
scripts/remote/provisionService.sh
Shell
mit
674
// // DateTimeFormatter.h // // $Id: //poco/1.4/Foundation/include/Poco/DateTimeFormatter.h#2 $ // // Library: Foundation // Package: DateTime // Module: DateTimeFormatter // // Definition of the DateTimeFormatter class. // // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // Permission is hereby granted, free of charge, to any person or organization // obtaining a copy of the software and accompanying documentation covered by // this license (the "Software") to use, reproduce, display, distribute, // execute, and transmit the Software, and to prepare derivative works of the // Software, and to permit third-parties to whom the Software is furnished to // do so, all subject to the following: // // The copyright notices in the Software and this entire statement, including // the above license grant, this restriction and the following disclaimer, // must be included in all copies of the Software, in whole or in part, and // all derivative works of the Software, unless such copies or derivative // works are solely in the form of machine-executable object code generated by // a source language processor. // // 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // #ifndef Foundation_DateTimeFormatter_INCLUDED #define Foundation_DateTimeFormatter_INCLUDED #include "Poco/Foundation.h" #include "Poco/DateTime.h" #include "Poco/LocalDateTime.h" namespace Poco { class Timestamp; class Timespan; class Foundation_API DateTimeFormatter /// This class converts dates and times into strings, supporting a /// variety of standard and custom formats. /// /// There are two kind of static member functions: /// * format* functions return a std::string containing /// the formatted value. /// * append* functions append the formatted value to /// an existing string. { public: enum { UTC = 0xFFFF /// Special value for timeZoneDifferential denoting UTC. }; static std::string format(const Timestamp& timestamp, const std::string& fmt, int timeZoneDifferential = UTC); /// Formats the given timestamp according to the given format. /// The format string is used as a template to format the date and /// is copied character by character except for the following special characters, /// which are replaced by the corresponding value. /// /// * %w - abbreviated weekday (Mon, Tue, ...) /// * %W - full weekday (Monday, Tuesday, ...) /// * %b - abbreviated month (Jan, Feb, ...) /// * %B - full month (January, February, ...) /// * %d - zero-padded day of month (01 .. 31) /// * %e - day of month (1 .. 31) /// * %f - space-padded day of month ( 1 .. 31) /// * %m - zero-padded month (01 .. 12) /// * %n - month (1 .. 12) /// * %o - space-padded month ( 1 .. 12) /// * %y - year without century (70) /// * %Y - year with century (1970) /// * %H - hour (00 .. 23) /// * %h - hour (00 .. 12) /// * %a - am/pm /// * %A - AM/PM /// * %M - minute (00 .. 59) /// * %S - second (00 .. 59) /// * %s - seconds and microseconds (equivalent to %S.%F) /// * %i - millisecond (000 .. 999) /// * %c - centisecond (0 .. 9) /// * %F - fractional seconds/microseconds (000000 - 999999) /// * %z - time zone differential in ISO 8601 format (Z or +NN.NN) /// * %Z - time zone differential in RFC format (GMT or +NNNN) /// * %% - percent sign /// /// Class DateTimeFormat defines format strings for various standard date/time formats. static std::string format(const DateTime& dateTime, const std::string& fmt, int timeZoneDifferential = UTC); /// Formats the given date and time according to the given format. /// See format(const Timestamp&, const std::string&, int) for more information. static std::string format(const LocalDateTime& dateTime, const std::string& fmt); /// Formats the given local date and time according to the given format. /// See format(const Timestamp&, const std::string&, int) for more information. static std::string format(const Timespan& timespan, const std::string& fmt = "%dd %H:%M:%S.%i"); /// Formats the given timespan according to the given format. /// The format string is used as a template to format the date and /// is copied character by character except for the following special characters, /// which are replaced by the corresponding value. /// /// * %d - days /// * %H - hours (00 .. 23) /// * %h - total hours (0 .. n) /// * %M - minutes (00 .. 59) /// * %m - total minutes (0 .. n) /// * %S - seconds (00 .. 59) /// * %s - total seconds (0 .. n) /// * %i - milliseconds (000 .. 999) /// * %c - centisecond (0 .. 9) /// * %F - fractional seconds/microseconds (000000 - 999999) /// * %% - percent sign static void append(std::string& str, const Timestamp& timestamp, const std::string& fmt, int timeZoneDifferential = UTC); /// Formats the given timestamp according to the given format and appends it to str. /// /// See format() for documentation of the formatting string. static void append(std::string& str, const DateTime& dateTime, const std::string& fmt, int timeZoneDifferential = UTC); /// Formats the given date and time according to the given format and appends it to str. /// /// See format() for documentation of the formatting string. static void append(std::string& str, const LocalDateTime& dateTime, const std::string& fmt); /// Formats the given local date and time according to the given format and appends it to str. /// /// See format() for documentation of the formatting string. static void append(std::string& str, const Timespan& timespan, const std::string& fmt = "%dd %H:%M:%S.%i"); /// Formats the given timespan according to the given format and appends it to str. /// /// See format() for documentation of the formatting string. static std::string tzdISO(int timeZoneDifferential); /// Formats the given timezone differential in ISO format. /// If timeZoneDifferential is UTC, "Z" is returned, /// otherwise, +HH.MM (or -HH.MM) is returned. static std::string tzdRFC(int timeZoneDifferential); /// Formats the given timezone differential in RFC format. /// If timeZoneDifferential is UTC, "GMT" is returned, /// otherwise ++HHMM (or -HHMM) is returned. static void tzdISO(std::string& str, int timeZoneDifferential); /// Formats the given timezone differential in ISO format /// and appends it to the given string. /// If timeZoneDifferential is UTC, "Z" is returned, /// otherwise, +HH.MM (or -HH.MM) is returned. static void tzdRFC(std::string& str, int timeZoneDifferential); /// Formats the given timezone differential in RFC format /// and appends it to the given string. /// If timeZoneDifferential is UTC, "GMT" is returned, /// otherwise ++HHMM (or -HHMM) is returned. }; // // inlines // inline std::string DateTimeFormatter::format(const Timestamp& timestamp, const std::string& fmt, int timeZoneDifferential) { DateTime dateTime(timestamp); return format(dateTime, fmt, timeZoneDifferential); } inline std::string DateTimeFormatter::format(const DateTime& dateTime, const std::string& fmt, int timeZoneDifferential) { std::string result; result.reserve(64); append(result, dateTime, fmt, timeZoneDifferential); return result; } inline std::string DateTimeFormatter::format(const LocalDateTime& dateTime, const std::string& fmt) { return format(dateTime._dateTime, fmt, dateTime._tzd); } inline std::string DateTimeFormatter::format(const Timespan& timespan, const std::string& fmt) { std::string result; result.reserve(32); append(result, timespan, fmt); return result; } inline void DateTimeFormatter::append(std::string& str, const Timestamp& timestamp, const std::string& fmt, int timeZoneDifferential) { DateTime dateTime(timestamp); append(str, dateTime, fmt, timeZoneDifferential); } inline std::string DateTimeFormatter::tzdISO(int timeZoneDifferential) { std::string result; result.reserve(8); tzdISO(result, timeZoneDifferential); return result; } inline std::string DateTimeFormatter::tzdRFC(int timeZoneDifferential) { std::string result; result.reserve(8); tzdRFC(result, timeZoneDifferential); return result; } } // namespace Poco #endif // Foundation_DateTimeFormatter_INCLUDED
Patrick-Bay/SocialCastr
third party/openRTMFP-Cumulus/CumulusServer/sources/Poco/DateTimeFormatter.h
C
mit
9,024
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>_swizzle.hpp Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File&#160;List</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <div class="title">_swizzle.hpp</div> </div> </div> <div class="contents"> <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00002"></a>00002 <span class="comment">// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)</span> <a name="l00004"></a>00004 <span class="comment"></span><span class="comment">// Created : 2006-04-20</span> <a name="l00005"></a>00005 <span class="comment">// Updated : 2008-08-22</span> <a name="l00006"></a>00006 <span class="comment">// Licence : This source is under MIT License</span> <a name="l00007"></a>00007 <span class="comment">// File : glm/core/_swizzle.hpp</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="preprocessor">#ifndef glm_core_swizzle</span> <a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define glm_core_swizzle</span> <a name="l00012"></a>00012 <span class="preprocessor"></span> <a name="l00013"></a>00013 <span class="keyword">namespace </span>glm <a name="l00014"></a>00014 { <a name="l00015"></a>00015 <span class="keyword">enum</span> comp <a name="l00016"></a>00016 { <a name="l00017"></a>00017 X = 0, <a name="l00018"></a>00018 R = 0, <a name="l00019"></a>00019 S = 0, <a name="l00020"></a>00020 Y = 1, <a name="l00021"></a>00021 G = 1, <a name="l00022"></a>00022 T = 1, <a name="l00023"></a>00023 Z = 2, <a name="l00024"></a>00024 B = 2, <a name="l00025"></a>00025 P = 2, <a name="l00026"></a>00026 W = 3, <a name="l00027"></a>00027 A = 3, <a name="l00028"></a>00028 Q = 3 <a name="l00029"></a>00029 }; <a name="l00030"></a>00030 }<span class="comment">//namespace glm</span> <a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="preprocessor">#if(defined(GLM_SWIZZLE_XYZW) || defined(GLM_SWIZZLE))</span> <a name="l00033"></a>00033 <span class="preprocessor"></span> <a name="l00034"></a>00034 <span class="preprocessor">#define xx swizzle(glm::X, glm::X)</span> <a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define yx swizzle(glm::Y, glm::X)</span> <a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define zx swizzle(glm::Z, glm::X)</span> <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define wx swizzle(glm::W, glm::X)</span> <a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define xy swizzle(glm::X, glm::Y)</span> <a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define yy swizzle(glm::Y, glm::Y)</span> <a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define zy swizzle(glm::Z, glm::Y)</span> <a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define wy swizzle(glm::W, glm::Y)</span> <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define xz swizzle(glm::X, glm::Z)</span> <a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define yz swizzle(glm::Y, glm::Z)</span> <a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define zz swizzle(glm::Z, glm::Z)</span> <a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define wz swizzle(glm::W, glm::Z)</span> <a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define xw swizzle(glm::X, glm::W)</span> <a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define yw swizzle(glm::Y, glm::W)</span> <a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define zw swizzle(glm::Z, glm::W)</span> <a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define ww swizzle(glm::W, glm::W)</span> <a name="l00050"></a>00050 <span class="preprocessor"></span> <a name="l00051"></a>00051 <span class="preprocessor">#endif</span> <a name="l00052"></a>00052 <span class="preprocessor"></span> <a name="l00053"></a>00053 <span class="preprocessor">#if(defined(GLM_SWIZZLE_RGBA) || defined(GLM_SWIZZLE))</span> <a name="l00054"></a>00054 <span class="preprocessor"></span> <a name="l00055"></a>00055 <span class="preprocessor">#define rr swizzle(glm::X, glm::X)</span> <a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#define gr swizzle(glm::Y, glm::X)</span> <a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define br swizzle(glm::Z, glm::X)</span> <a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#define ar swizzle(glm::W, glm::X)</span> <a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define rg swizzle(glm::X, glm::Y)</span> <a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define gg swizzle(glm::Y, glm::Y)</span> <a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define bg swizzle(glm::Z, glm::Y)</span> <a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define ag swizzle(glm::W, glm::Y)</span> <a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define rb swizzle(glm::X, glm::Z)</span> <a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define gb swizzle(glm::Y, glm::Z)</span> <a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#define bb swizzle(glm::Z, glm::Z)</span> <a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define ab swizzle(glm::W, glm::Z)</span> <a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#define ra swizzle(glm::X, glm::W)</span> <a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#define ga swizzle(glm::Y, glm::W)</span> <a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#define ba swizzle(glm::Z, glm::W)</span> <a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#define aa swizzle(glm::W, glm::W)</span> <a name="l00071"></a>00071 <span class="preprocessor"></span> <a name="l00072"></a>00072 <span class="preprocessor">#endif</span> <a name="l00073"></a>00073 <span class="preprocessor"></span> <a name="l00074"></a>00074 <span class="preprocessor">#if(defined(GLM_FORCE_SWIZZLE_STPQ) || defined(GLM_SWIZZLE))</span> <a name="l00075"></a>00075 <span class="preprocessor"></span> <a name="l00076"></a>00076 <span class="preprocessor">#define ss swizzle(glm::X, glm::X)</span> <a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define ts swizzle(glm::Y, glm::X)</span> <a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define ps swizzle(glm::Z, glm::X)</span> <a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define qs swizzle(glm::W, glm::X)</span> <a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define st swizzle(glm::X, glm::Y)</span> <a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define tt swizzle(glm::Y, glm::Y)</span> <a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define pt swizzle(glm::Z, glm::Y)</span> <a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define qt swizzle(glm::W, glm::Y)</span> <a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#define sp swizzle(glm::X, glm::Z)</span> <a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define tp swizzle(glm::Y, glm::Z)</span> <a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define pp swizzle(glm::Z, glm::Z)</span> <a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#define qp swizzle(glm::W, glm::Z)</span> <a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define sq swizzle(glm::X, glm::W)</span> <a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#define tq swizzle(glm::Y, glm::W)</span> <a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define pq swizzle(glm::Z, glm::W)</span> <a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define qq swizzle(glm::W, glm::W)</span> <a name="l00092"></a>00092 <span class="preprocessor"></span> <a name="l00093"></a>00093 <span class="preprocessor">#endif</span> <a name="l00094"></a>00094 <span class="preprocessor"></span> <a name="l00095"></a>00095 <span class="preprocessor">#if(defined(GLM_SWIZZLE_XYZW) || defined(GLM_SWIZZLE))</span> <a name="l00096"></a>00096 <span class="preprocessor"></span> <a name="l00097"></a>00097 <span class="preprocessor">#define xxx swizzle(glm::X, glm::X, glm::X)</span> <a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#define yxx swizzle(glm::Y, glm::X, glm::X)</span> <a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#define zxx swizzle(glm::Z, glm::X, glm::X)</span> <a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#define wxx swizzle(glm::W, glm::X, glm::X)</span> <a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define xyx swizzle(glm::X, glm::Y, glm::X)</span> <a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define yyx swizzle(glm::Y, glm::Y, glm::X)</span> <a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#define zyx swizzle(glm::Z, glm::Y, glm::X)</span> <a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#define wyx swizzle(glm::W, glm::Y, glm::X)</span> <a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#define xzx swizzle(glm::X, glm::Z, glm::X)</span> <a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#define yzx swizzle(glm::Y, glm::Z, glm::X)</span> <a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define zzx swizzle(glm::Z, glm::Z, glm::X)</span> <a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#define wzx swizzle(glm::W, glm::Z, glm::X)</span> <a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#define xwx swizzle(glm::X, glm::W, glm::X)</span> <a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#define ywx swizzle(glm::Y, glm::W, glm::X)</span> <a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">#define zwx swizzle(glm::Z, glm::W, glm::X)</span> <a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#define wwx swizzle(glm::W, glm::W, glm::X)</span> <a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#define xxy swizzle(glm::X, glm::X, glm::Y)</span> <a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#define yxy swizzle(glm::Y, glm::X, glm::Y)</span> <a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#define zxy swizzle(glm::Z, glm::X, glm::Y)</span> <a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor">#define wxy swizzle(glm::W, glm::X, glm::Y)</span> <a name="l00117"></a>00117 <span class="preprocessor"></span><span class="preprocessor">#define xyy swizzle(glm::X, glm::Y, glm::Y)</span> <a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define yyy swizzle(glm::Y, glm::Y, glm::Y)</span> <a name="l00119"></a>00119 <span class="preprocessor"></span><span class="preprocessor">#define zyy swizzle(glm::Z, glm::Y, glm::Y)</span> <a name="l00120"></a>00120 <span class="preprocessor"></span><span class="preprocessor">#define wyy swizzle(glm::W, glm::Y, glm::Y)</span> <a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#define xzy swizzle(glm::X, glm::Z, glm::Y)</span> <a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#define yzy swizzle(glm::Y, glm::Z, glm::Y)</span> <a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#define zzy swizzle(glm::Z, glm::Z, glm::Y)</span> <a name="l00124"></a>00124 <span class="preprocessor"></span><span class="preprocessor">#define wzy swizzle(glm::W, glm::Z, glm::Y)</span> <a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#define xwy swizzle(glm::X, glm::W, glm::Y)</span> <a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#define ywy swizzle(glm::Y, glm::W, glm::Y)</span> <a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define zwy swizzle(glm::Z, glm::W, glm::Y)</span> <a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor">#define wwy swizzle(glm::W, glm::W, glm::Y)</span> <a name="l00129"></a>00129 <span class="preprocessor"></span><span class="preprocessor">#define xxz swizzle(glm::X, glm::X, glm::Z)</span> <a name="l00130"></a>00130 <span class="preprocessor"></span><span class="preprocessor">#define yxz swizzle(glm::Y, glm::X, glm::Z)</span> <a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#define zxz swizzle(glm::Z, glm::X, glm::Z)</span> <a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor">#define wxz swizzle(glm::W, glm::X, glm::Z)</span> <a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#define xyz swizzle(glm::X, glm::Y, glm::Z)</span> <a name="l00134"></a>00134 <span class="preprocessor"></span><span class="preprocessor">#define yyz swizzle(glm::Y, glm::Y, glm::Z)</span> <a name="l00135"></a>00135 <span class="preprocessor"></span><span class="preprocessor">#define zyz swizzle(glm::Z, glm::Y, glm::Z)</span> <a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor">#define wyz swizzle(glm::W, glm::Y, glm::Z)</span> <a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor">#define xzz swizzle(glm::X, glm::Z, glm::Z)</span> <a name="l00138"></a>00138 <span class="preprocessor"></span><span class="preprocessor">#define yzz swizzle(glm::Y, glm::Z, glm::Z)</span> <a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#define zzz swizzle(glm::Z, glm::Z, glm::Z)</span> <a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor">#define wzz swizzle(glm::W, glm::Z, glm::Z)</span> <a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#define xwz swizzle(glm::X, glm::W, glm::Z)</span> <a name="l00142"></a>00142 <span class="preprocessor"></span><span class="preprocessor">#define ywz swizzle(glm::Y, glm::W, glm::Z)</span> <a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#define zwz swizzle(glm::Z, glm::W, glm::Z)</span> <a name="l00144"></a>00144 <span class="preprocessor"></span><span class="preprocessor">#define wwz swizzle(glm::W, glm::W, glm::Z)</span> <a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#define xxw swizzle(glm::X, glm::X, glm::W)</span> <a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#define yxw swizzle(glm::Y, glm::X, glm::W)</span> <a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#define zxw swizzle(glm::Z, glm::X, glm::W)</span> <a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">#define wxw swizzle(glm::W, glm::X, glm::W)</span> <a name="l00149"></a>00149 <span class="preprocessor"></span><span class="preprocessor">#define xyw swizzle(glm::X, glm::Y, glm::W)</span> <a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#define yyw swizzle(glm::Y, glm::Y, glm::W)</span> <a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#define zyw swizzle(glm::Z, glm::Y, glm::W)</span> <a name="l00152"></a>00152 <span class="preprocessor"></span><span class="preprocessor">#define wyw swizzle(glm::W, glm::Y, glm::W)</span> <a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor">#define xzw swizzle(glm::X, glm::Z, glm::W)</span> <a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#define yzw swizzle(glm::Y, glm::Z, glm::W)</span> <a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#define zzw swizzle(glm::Z, glm::Z, glm::W)</span> <a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor">#define wzw swizzle(glm::W, glm::Z, glm::W)</span> <a name="l00157"></a>00157 <span class="preprocessor"></span><span class="preprocessor">#define xww swizzle(glm::X, glm::W, glm::W)</span> <a name="l00158"></a>00158 <span class="preprocessor"></span><span class="preprocessor">#define yww swizzle(glm::Y, glm::W, glm::W)</span> <a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">#define zww swizzle(glm::Z, glm::W, glm::W)</span> <a name="l00160"></a>00160 <span class="preprocessor"></span><span class="preprocessor">#define www swizzle(glm::W, glm::W, glm::W)</span> <a name="l00161"></a>00161 <span class="preprocessor"></span> <a name="l00162"></a>00162 <span class="preprocessor">#endif</span> <a name="l00163"></a>00163 <span class="preprocessor"></span> <a name="l00164"></a>00164 <span class="preprocessor">#if(defined(GLM_SWIZZLE_RGBA) || defined(GLM_SWIZZLE))</span> <a name="l00165"></a>00165 <span class="preprocessor"></span> <a name="l00166"></a>00166 <span class="preprocessor">#define rrr swizzle(glm::X, glm::X, glm::X)</span> <a name="l00167"></a>00167 <span class="preprocessor"></span><span class="preprocessor">#define grr swizzle(glm::Y, glm::X, glm::X)</span> <a name="l00168"></a>00168 <span class="preprocessor"></span><span class="preprocessor">#define brr swizzle(glm::Z, glm::X, glm::X)</span> <a name="l00169"></a>00169 <span class="preprocessor"></span><span class="preprocessor">#define arr swizzle(glm::W, glm::X, glm::X)</span> <a name="l00170"></a>00170 <span class="preprocessor"></span><span class="preprocessor">#define rgr swizzle(glm::X, glm::Y, glm::X)</span> <a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor">#define ggr swizzle(glm::Y, glm::Y, glm::X)</span> <a name="l00172"></a>00172 <span class="preprocessor"></span><span class="preprocessor">#define bgr swizzle(glm::Z, glm::Y, glm::X)</span> <a name="l00173"></a>00173 <span class="preprocessor"></span><span class="preprocessor">#define agr swizzle(glm::W, glm::Y, glm::X)</span> <a name="l00174"></a>00174 <span class="preprocessor"></span><span class="preprocessor">#define rbr swizzle(glm::X, glm::Z, glm::X)</span> <a name="l00175"></a>00175 <span class="preprocessor"></span><span class="preprocessor">#define gbr swizzle(glm::Y, glm::Z, glm::X)</span> <a name="l00176"></a>00176 <span class="preprocessor"></span><span class="preprocessor">#define bbr swizzle(glm::Z, glm::Z, glm::X)</span> <a name="l00177"></a>00177 <span class="preprocessor"></span><span class="preprocessor">#define abr swizzle(glm::W, glm::Z, glm::X)</span> <a name="l00178"></a>00178 <span class="preprocessor"></span><span class="preprocessor">#define rar swizzle(glm::X, glm::W, glm::X)</span> <a name="l00179"></a>00179 <span class="preprocessor"></span><span class="preprocessor">#define gar swizzle(glm::Y, glm::W, glm::X)</span> <a name="l00180"></a>00180 <span class="preprocessor"></span><span class="preprocessor">#define bar swizzle(glm::Z, glm::W, glm::X)</span> <a name="l00181"></a>00181 <span class="preprocessor"></span><span class="preprocessor">#define aar swizzle(glm::W, glm::W, glm::X)</span> <a name="l00182"></a>00182 <span class="preprocessor"></span><span class="preprocessor">#define rrg swizzle(glm::X, glm::X, glm::Y)</span> <a name="l00183"></a>00183 <span class="preprocessor"></span><span class="preprocessor">#define grg swizzle(glm::Y, glm::X, glm::Y)</span> <a name="l00184"></a>00184 <span class="preprocessor"></span><span class="preprocessor">#define brg swizzle(glm::Z, glm::X, glm::Y)</span> <a name="l00185"></a>00185 <span class="preprocessor"></span><span class="preprocessor">#define arg swizzle(glm::W, glm::X, glm::Y)</span> <a name="l00186"></a>00186 <span class="preprocessor"></span><span class="preprocessor">#define rgg swizzle(glm::X, glm::Y, glm::Y)</span> <a name="l00187"></a>00187 <span class="preprocessor"></span><span class="preprocessor">#define ggg swizzle(glm::Y, glm::Y, glm::Y)</span> <a name="l00188"></a>00188 <span class="preprocessor"></span><span class="preprocessor">#define bgg swizzle(glm::Z, glm::Y, glm::Y)</span> <a name="l00189"></a>00189 <span class="preprocessor"></span><span class="preprocessor">#define agg swizzle(glm::W, glm::Y, glm::Y)</span> <a name="l00190"></a>00190 <span class="preprocessor"></span><span class="preprocessor">#define rbg swizzle(glm::X, glm::Z, glm::Y)</span> <a name="l00191"></a>00191 <span class="preprocessor"></span><span class="preprocessor">#define gbg swizzle(glm::Y, glm::Z, glm::Y)</span> <a name="l00192"></a>00192 <span class="preprocessor"></span><span class="preprocessor">#define bbg swizzle(glm::Z, glm::Z, glm::Y)</span> <a name="l00193"></a>00193 <span class="preprocessor"></span><span class="preprocessor">#define abg swizzle(glm::W, glm::Z, glm::Y)</span> <a name="l00194"></a>00194 <span class="preprocessor"></span><span class="preprocessor">#define rag swizzle(glm::X, glm::W, glm::Y)</span> <a name="l00195"></a>00195 <span class="preprocessor"></span><span class="preprocessor">#define gag swizzle(glm::Y, glm::W, glm::Y)</span> <a name="l00196"></a>00196 <span class="preprocessor"></span><span class="preprocessor">#define bag swizzle(glm::Z, glm::W, glm::Y)</span> <a name="l00197"></a>00197 <span class="preprocessor"></span><span class="preprocessor">#define aag swizzle(glm::W, glm::W, glm::Y)</span> <a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#define rrb swizzle(glm::X, glm::X, glm::Z)</span> <a name="l00199"></a>00199 <span class="preprocessor"></span><span class="preprocessor">#define grb swizzle(glm::Y, glm::X, glm::Z)</span> <a name="l00200"></a>00200 <span class="preprocessor"></span><span class="preprocessor">#define brb swizzle(glm::Z, glm::X, glm::Z)</span> <a name="l00201"></a>00201 <span class="preprocessor"></span><span class="preprocessor">#define arb swizzle(glm::W, glm::X, glm::Z)</span> <a name="l00202"></a>00202 <span class="preprocessor"></span><span class="preprocessor">#define rgb swizzle(glm::X, glm::Y, glm::Z)</span> <a name="l00203"></a>00203 <span class="preprocessor"></span><span class="preprocessor">#define ggb swizzle(glm::Y, glm::Y, glm::Z)</span> <a name="l00204"></a>00204 <span class="preprocessor"></span><span class="preprocessor">#define bgb swizzle(glm::Z, glm::Y, glm::Z)</span> <a name="l00205"></a>00205 <span class="preprocessor"></span><span class="preprocessor">#define agb swizzle(glm::W, glm::Y, glm::Z)</span> <a name="l00206"></a>00206 <span class="preprocessor"></span><span class="preprocessor">#define rbb swizzle(glm::X, glm::Z, glm::Z)</span> <a name="l00207"></a>00207 <span class="preprocessor"></span><span class="preprocessor">#define gbb swizzle(glm::Y, glm::Z, glm::Z)</span> <a name="l00208"></a>00208 <span class="preprocessor"></span><span class="preprocessor">#define bbb swizzle(glm::Z, glm::Z, glm::Z)</span> <a name="l00209"></a>00209 <span class="preprocessor"></span><span class="preprocessor">#define abb swizzle(glm::W, glm::Z, glm::Z)</span> <a name="l00210"></a>00210 <span class="preprocessor"></span><span class="preprocessor">#define rab swizzle(glm::X, glm::W, glm::Z)</span> <a name="l00211"></a>00211 <span class="preprocessor"></span><span class="preprocessor">#define gab swizzle(glm::Y, glm::W, glm::Z)</span> <a name="l00212"></a>00212 <span class="preprocessor"></span><span class="preprocessor">#define bab swizzle(glm::Z, glm::W, glm::Z)</span> <a name="l00213"></a>00213 <span class="preprocessor"></span><span class="preprocessor">#define aab swizzle(glm::W, glm::W, glm::Z)</span> <a name="l00214"></a>00214 <span class="preprocessor"></span><span class="preprocessor">#define rra swizzle(glm::X, glm::X, glm::W)</span> <a name="l00215"></a>00215 <span class="preprocessor"></span><span class="preprocessor">#define gra swizzle(glm::Y, glm::X, glm::W)</span> <a name="l00216"></a>00216 <span class="preprocessor"></span><span class="preprocessor">#define bra swizzle(glm::Z, glm::X, glm::W)</span> <a name="l00217"></a>00217 <span class="preprocessor"></span><span class="preprocessor">#define ara swizzle(glm::W, glm::X, glm::W)</span> <a name="l00218"></a>00218 <span class="preprocessor"></span><span class="preprocessor">#define rga swizzle(glm::X, glm::Y, glm::W)</span> <a name="l00219"></a>00219 <span class="preprocessor"></span><span class="preprocessor">#define gga swizzle(glm::Y, glm::Y, glm::W)</span> <a name="l00220"></a>00220 <span class="preprocessor"></span><span class="preprocessor">#define bga swizzle(glm::Z, glm::Y, glm::W)</span> <a name="l00221"></a>00221 <span class="preprocessor"></span><span class="preprocessor">#define aga swizzle(glm::W, glm::Y, glm::W)</span> <a name="l00222"></a>00222 <span class="preprocessor"></span><span class="preprocessor">#define rba swizzle(glm::X, glm::Z, glm::W)</span> <a name="l00223"></a>00223 <span class="preprocessor"></span><span class="preprocessor">#define gba swizzle(glm::Y, glm::Z, glm::W)</span> <a name="l00224"></a>00224 <span class="preprocessor"></span><span class="preprocessor">#define bba swizzle(glm::Z, glm::Z, glm::W)</span> <a name="l00225"></a>00225 <span class="preprocessor"></span><span class="preprocessor">#define aba swizzle(glm::W, glm::Z, glm::W)</span> <a name="l00226"></a>00226 <span class="preprocessor"></span><span class="preprocessor">#define raa swizzle(glm::X, glm::W, glm::W)</span> <a name="l00227"></a>00227 <span class="preprocessor"></span><span class="preprocessor">#define gaa swizzle(glm::Y, glm::W, glm::W)</span> <a name="l00228"></a>00228 <span class="preprocessor"></span><span class="preprocessor">#define baa swizzle(glm::Z, glm::W, glm::W)</span> <a name="l00229"></a>00229 <span class="preprocessor"></span><span class="preprocessor">#define aaa swizzle(glm::W, glm::W, glm::W)</span> <a name="l00230"></a>00230 <span class="preprocessor"></span> <a name="l00231"></a>00231 <span class="preprocessor">#endif</span> <a name="l00232"></a>00232 <span class="preprocessor"></span> <a name="l00233"></a>00233 <span class="preprocessor">#if(defined(GLM_FORCE_SWIZZLE_STPQ) || defined(GLM_SWIZZLE))</span> <a name="l00234"></a>00234 <span class="preprocessor"></span> <a name="l00235"></a>00235 <span class="preprocessor">#define sss swizzle(glm::X, glm::X, glm::X)</span> <a name="l00236"></a>00236 <span class="preprocessor"></span><span class="preprocessor">#define tss swizzle(glm::Y, glm::X, glm::X)</span> <a name="l00237"></a>00237 <span class="preprocessor"></span><span class="preprocessor">#define pss swizzle(glm::Z, glm::X, glm::X)</span> <a name="l00238"></a>00238 <span class="preprocessor"></span><span class="preprocessor">#define qss swizzle(glm::W, glm::X, glm::X)</span> <a name="l00239"></a>00239 <span class="preprocessor"></span><span class="preprocessor">#define sts swizzle(glm::X, glm::Y, glm::X)</span> <a name="l00240"></a>00240 <span class="preprocessor"></span><span class="preprocessor">#define tts swizzle(glm::Y, glm::Y, glm::X)</span> <a name="l00241"></a>00241 <span class="preprocessor"></span><span class="preprocessor">#define pts swizzle(glm::Z, glm::Y, glm::X)</span> <a name="l00242"></a>00242 <span class="preprocessor"></span><span class="preprocessor">#define qts swizzle(glm::W, glm::Y, glm::X)</span> <a name="l00243"></a>00243 <span class="preprocessor"></span><span class="preprocessor">#define sps swizzle(glm::X, glm::Z, glm::X)</span> <a name="l00244"></a>00244 <span class="preprocessor"></span><span class="preprocessor">#define tps swizzle(glm::Y, glm::Z, glm::X)</span> <a name="l00245"></a>00245 <span class="preprocessor"></span><span class="preprocessor">#define pps swizzle(glm::Z, glm::Z, glm::X)</span> <a name="l00246"></a>00246 <span class="preprocessor"></span><span class="preprocessor">#define qps swizzle(glm::W, glm::Z, glm::X)</span> <a name="l00247"></a>00247 <span class="preprocessor"></span><span class="preprocessor">#define sqs swizzle(glm::X, glm::W, glm::X)</span> <a name="l00248"></a>00248 <span class="preprocessor"></span><span class="preprocessor">#define tqs swizzle(glm::Y, glm::W, glm::X)</span> <a name="l00249"></a>00249 <span class="preprocessor"></span><span class="preprocessor">#define pqs swizzle(glm::Z, glm::W, glm::X)</span> <a name="l00250"></a>00250 <span class="preprocessor"></span><span class="preprocessor">#define qqs swizzle(glm::W, glm::W, glm::X)</span> <a name="l00251"></a>00251 <span class="preprocessor"></span><span class="preprocessor">#define sst swizzle(glm::X, glm::X, glm::Y)</span> <a name="l00252"></a>00252 <span class="preprocessor"></span><span class="preprocessor">#define tst swizzle(glm::Y, glm::X, glm::Y)</span> <a name="l00253"></a>00253 <span class="preprocessor"></span><span class="preprocessor">#define pst swizzle(glm::Z, glm::X, glm::Y)</span> <a name="l00254"></a>00254 <span class="preprocessor"></span><span class="preprocessor">#define qst swizzle(glm::W, glm::X, glm::Y)</span> <a name="l00255"></a>00255 <span class="preprocessor"></span><span class="preprocessor">#define stt swizzle(glm::X, glm::Y, glm::Y)</span> <a name="l00256"></a>00256 <span class="preprocessor"></span><span class="preprocessor">#define ttt swizzle(glm::Y, glm::Y, glm::Y)</span> <a name="l00257"></a>00257 <span class="preprocessor"></span><span class="preprocessor">#define ptt swizzle(glm::Z, glm::Y, glm::Y)</span> <a name="l00258"></a>00258 <span class="preprocessor"></span><span class="preprocessor">#define qtt swizzle(glm::W, glm::Y, glm::Y)</span> <a name="l00259"></a>00259 <span class="preprocessor"></span><span class="preprocessor">#define spt swizzle(glm::X, glm::Z, glm::Y)</span> <a name="l00260"></a>00260 <span class="preprocessor"></span><span class="preprocessor">#define tpt swizzle(glm::Y, glm::Z, glm::Y)</span> <a name="l00261"></a>00261 <span class="preprocessor"></span><span class="preprocessor">#define ppt swizzle(glm::Z, glm::Z, glm::Y)</span> <a name="l00262"></a>00262 <span class="preprocessor"></span><span class="preprocessor">#define qpt swizzle(glm::W, glm::Z, glm::Y)</span> <a name="l00263"></a>00263 <span class="preprocessor"></span><span class="preprocessor">#define sqt swizzle(glm::X, glm::W, glm::Y)</span> <a name="l00264"></a>00264 <span class="preprocessor"></span><span class="preprocessor">#define tqt swizzle(glm::Y, glm::W, glm::Y)</span> <a name="l00265"></a>00265 <span class="preprocessor"></span><span class="preprocessor">#define pqt swizzle(glm::Z, glm::W, glm::Y)</span> <a name="l00266"></a>00266 <span class="preprocessor"></span><span class="preprocessor">#define qqt swizzle(glm::W, glm::W, glm::Y)</span> <a name="l00267"></a>00267 <span class="preprocessor"></span><span class="preprocessor">#define ssp swizzle(glm::X, glm::X, glm::Z)</span> <a name="l00268"></a>00268 <span class="preprocessor"></span><span class="preprocessor">#define tsp swizzle(glm::Y, glm::X, glm::Z)</span> <a name="l00269"></a>00269 <span class="preprocessor"></span><span class="preprocessor">#define psp swizzle(glm::Z, glm::X, glm::Z)</span> <a name="l00270"></a>00270 <span class="preprocessor"></span><span class="preprocessor">#define qsp swizzle(glm::W, glm::X, glm::Z)</span> <a name="l00271"></a>00271 <span class="preprocessor"></span><span class="preprocessor">#define stp swizzle(glm::X, glm::Y, glm::Z)</span> <a name="l00272"></a>00272 <span class="preprocessor"></span><span class="preprocessor">#define ttp swizzle(glm::Y, glm::Y, glm::Z)</span> <a name="l00273"></a>00273 <span class="preprocessor"></span><span class="preprocessor">#define ptp swizzle(glm::Z, glm::Y, glm::Z)</span> <a name="l00274"></a>00274 <span class="preprocessor"></span><span class="preprocessor">#define qtp swizzle(glm::W, glm::Y, glm::Z)</span> <a name="l00275"></a>00275 <span class="preprocessor"></span><span class="preprocessor">#define spp swizzle(glm::X, glm::Z, glm::Z)</span> <a name="l00276"></a>00276 <span class="preprocessor"></span><span class="preprocessor">#define tpp swizzle(glm::Y, glm::Z, glm::Z)</span> <a name="l00277"></a>00277 <span class="preprocessor"></span><span class="preprocessor">#define ppp swizzle(glm::Z, glm::Z, glm::Z)</span> <a name="l00278"></a>00278 <span class="preprocessor"></span><span class="preprocessor">#define qpp swizzle(glm::W, glm::Z, glm::Z)</span> <a name="l00279"></a>00279 <span class="preprocessor"></span><span class="preprocessor">#define sqp swizzle(glm::X, glm::W, glm::Z)</span> <a name="l00280"></a>00280 <span class="preprocessor"></span><span class="preprocessor">#define tqp swizzle(glm::Y, glm::W, glm::Z)</span> <a name="l00281"></a>00281 <span class="preprocessor"></span><span class="preprocessor">#define pqp swizzle(glm::Z, glm::W, glm::Z)</span> <a name="l00282"></a>00282 <span class="preprocessor"></span><span class="preprocessor">#define qqp swizzle(glm::W, glm::W, glm::Z)</span> <a name="l00283"></a>00283 <span class="preprocessor"></span><span class="preprocessor">#define ssq swizzle(glm::X, glm::X, glm::W)</span> <a name="l00284"></a>00284 <span class="preprocessor"></span><span class="preprocessor">#define tsq swizzle(glm::Y, glm::X, glm::W)</span> <a name="l00285"></a>00285 <span class="preprocessor"></span><span class="preprocessor">#define psq swizzle(glm::Z, glm::X, glm::W)</span> <a name="l00286"></a>00286 <span class="preprocessor"></span><span class="preprocessor">#define qsq swizzle(glm::W, glm::X, glm::W)</span> <a name="l00287"></a>00287 <span class="preprocessor"></span><span class="preprocessor">#define stq swizzle(glm::X, glm::Y, glm::W)</span> <a name="l00288"></a>00288 <span class="preprocessor"></span><span class="preprocessor">#define ttq swizzle(glm::Y, glm::Y, glm::W)</span> <a name="l00289"></a>00289 <span class="preprocessor"></span><span class="preprocessor">#define ptq swizzle(glm::Z, glm::Y, glm::W)</span> <a name="l00290"></a>00290 <span class="preprocessor"></span><span class="preprocessor">#define qtq swizzle(glm::W, glm::Y, glm::W)</span> <a name="l00291"></a>00291 <span class="preprocessor"></span><span class="preprocessor">#define spq swizzle(glm::X, glm::Z, glm::W)</span> <a name="l00292"></a>00292 <span class="preprocessor"></span><span class="preprocessor">#define tpq swizzle(glm::Y, glm::Z, glm::W)</span> <a name="l00293"></a>00293 <span class="preprocessor"></span><span class="preprocessor">#define ppq swizzle(glm::Z, glm::Z, glm::W)</span> <a name="l00294"></a>00294 <span class="preprocessor"></span><span class="preprocessor">#define qpq swizzle(glm::W, glm::Z, glm::W)</span> <a name="l00295"></a>00295 <span class="preprocessor"></span><span class="preprocessor">#define sqq swizzle(glm::X, glm::W, glm::W)</span> <a name="l00296"></a>00296 <span class="preprocessor"></span><span class="preprocessor">#define tqq swizzle(glm::Y, glm::W, glm::W)</span> <a name="l00297"></a>00297 <span class="preprocessor"></span><span class="preprocessor">#define pqq swizzle(glm::Z, glm::W, glm::W)</span> <a name="l00298"></a>00298 <span class="preprocessor"></span><span class="preprocessor">#define qqq swizzle(glm::W, glm::W, glm::W)</span> <a name="l00299"></a>00299 <span class="preprocessor"></span> <a name="l00300"></a>00300 <span class="preprocessor">#endif</span> <a name="l00301"></a>00301 <span class="preprocessor"></span> <a name="l00302"></a>00302 <span class="preprocessor">#if(defined(GLM_SWIZZLE_XYZW) || defined(GLM_SWIZZLE))</span> <a name="l00303"></a>00303 <span class="preprocessor"></span> <a name="l00304"></a>00304 <span class="preprocessor">#define xxxx swizzle(glm::X, glm::X, glm::X, glm::X)</span> <a name="l00305"></a>00305 <span class="preprocessor"></span><span class="preprocessor">#define yxxx swizzle(glm::Y, glm::X, glm::X, glm::X)</span> <a name="l00306"></a>00306 <span class="preprocessor"></span><span class="preprocessor">#define zxxx swizzle(glm::Z, glm::X, glm::X, glm::X)</span> <a name="l00307"></a>00307 <span class="preprocessor"></span><span class="preprocessor">#define wxxx swizzle(glm::W, glm::X, glm::X, glm::X)</span> <a name="l00308"></a>00308 <span class="preprocessor"></span><span class="preprocessor">#define xyxx swizzle(glm::X, glm::Y, glm::X, glm::X)</span> <a name="l00309"></a>00309 <span class="preprocessor"></span><span class="preprocessor">#define yyxx swizzle(glm::Y, glm::Y, glm::X, glm::X)</span> <a name="l00310"></a>00310 <span class="preprocessor"></span><span class="preprocessor">#define zyxx swizzle(glm::Z, glm::Y, glm::X, glm::X)</span> <a name="l00311"></a>00311 <span class="preprocessor"></span><span class="preprocessor">#define wyxx swizzle(glm::W, glm::Y, glm::X, glm::X)</span> <a name="l00312"></a>00312 <span class="preprocessor"></span><span class="preprocessor">#define xzxx swizzle(glm::X, glm::Z, glm::X, glm::X)</span> <a name="l00313"></a>00313 <span class="preprocessor"></span><span class="preprocessor">#define yzxx swizzle(glm::Y, glm::Z, glm::X, glm::X)</span> <a name="l00314"></a>00314 <span class="preprocessor"></span><span class="preprocessor">#define zzxx swizzle(glm::Z, glm::Z, glm::X, glm::X)</span> <a name="l00315"></a>00315 <span class="preprocessor"></span><span class="preprocessor">#define wzxx swizzle(glm::W, glm::Z, glm::X, glm::X)</span> <a name="l00316"></a>00316 <span class="preprocessor"></span><span class="preprocessor">#define xwxx swizzle(glm::X, glm::W, glm::X, glm::X)</span> <a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#define ywxx swizzle(glm::Y, glm::W, glm::X, glm::X)</span> <a name="l00318"></a>00318 <span class="preprocessor"></span><span class="preprocessor">#define zwxx swizzle(glm::Z, glm::W, glm::X, glm::X)</span> <a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#define wwxx swizzle(glm::W, glm::W, glm::X, glm::X)</span> <a name="l00320"></a>00320 <span class="preprocessor"></span><span class="preprocessor">#define xxyx swizzle(glm::X, glm::X, glm::Y, glm::X)</span> <a name="l00321"></a>00321 <span class="preprocessor"></span><span class="preprocessor">#define yxyx swizzle(glm::Y, glm::X, glm::Y, glm::X)</span> <a name="l00322"></a>00322 <span class="preprocessor"></span><span class="preprocessor">#define zxyx swizzle(glm::Z, glm::X, glm::Y, glm::X)</span> <a name="l00323"></a>00323 <span class="preprocessor"></span><span class="preprocessor">#define wxyx swizzle(glm::W, glm::X, glm::Y, glm::X)</span> <a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#define xyyx swizzle(glm::X, glm::Y, glm::Y, glm::X)</span> <a name="l00325"></a>00325 <span class="preprocessor"></span><span class="preprocessor">#define yyyx swizzle(glm::Y, glm::Y, glm::Y, glm::X)</span> <a name="l00326"></a>00326 <span class="preprocessor"></span><span class="preprocessor">#define zyyx swizzle(glm::Z, glm::Y, glm::Y, glm::X)</span> <a name="l00327"></a>00327 <span class="preprocessor"></span><span class="preprocessor">#define wyyx swizzle(glm::W, glm::Y, glm::Y, glm::X)</span> <a name="l00328"></a>00328 <span class="preprocessor"></span><span class="preprocessor">#define xzyx swizzle(glm::X, glm::Z, glm::Y, glm::X)</span> <a name="l00329"></a>00329 <span class="preprocessor"></span><span class="preprocessor">#define yzyx swizzle(glm::Y, glm::Z, glm::Y, glm::X)</span> <a name="l00330"></a>00330 <span class="preprocessor"></span><span class="preprocessor">#define zzyx swizzle(glm::Z, glm::Z, glm::Y, glm::X)</span> <a name="l00331"></a>00331 <span class="preprocessor"></span><span class="preprocessor">#define wzyx swizzle(glm::W, glm::Z, glm::Y, glm::X)</span> <a name="l00332"></a>00332 <span class="preprocessor"></span><span class="preprocessor">#define xwyx swizzle(glm::X, glm::W, glm::Y, glm::X)</span> <a name="l00333"></a>00333 <span class="preprocessor"></span><span class="preprocessor">#define ywyx swizzle(glm::Y, glm::W, glm::Y, glm::X)</span> <a name="l00334"></a>00334 <span class="preprocessor"></span><span class="preprocessor">#define zwyx swizzle(glm::Z, glm::W, glm::Y, glm::X)</span> <a name="l00335"></a>00335 <span class="preprocessor"></span><span class="preprocessor">#define wwyx swizzle(glm::W, glm::W, glm::Y, glm::X)</span> <a name="l00336"></a>00336 <span class="preprocessor"></span><span class="preprocessor">#define xxzx swizzle(glm::X, glm::X, glm::Z, glm::X)</span> <a name="l00337"></a>00337 <span class="preprocessor"></span><span class="preprocessor">#define yxzx swizzle(glm::Y, glm::X, glm::Z, glm::X)</span> <a name="l00338"></a>00338 <span class="preprocessor"></span><span class="preprocessor">#define zxzx swizzle(glm::Z, glm::X, glm::Z, glm::X)</span> <a name="l00339"></a>00339 <span class="preprocessor"></span><span class="preprocessor">#define wxzx swizzle(glm::W, glm::X, glm::Z, glm::X)</span> <a name="l00340"></a>00340 <span class="preprocessor"></span><span class="preprocessor">#define xyzx swizzle(glm::X, glm::Y, glm::Z, glm::X)</span> <a name="l00341"></a>00341 <span class="preprocessor"></span><span class="preprocessor">#define yyzx swizzle(glm::Y, glm::Y, glm::Z, glm::X)</span> <a name="l00342"></a>00342 <span class="preprocessor"></span><span class="preprocessor">#define zyzx swizzle(glm::Z, glm::Y, glm::Z, glm::X)</span> <a name="l00343"></a>00343 <span class="preprocessor"></span><span class="preprocessor">#define wyzx swizzle(glm::W, glm::Y, glm::Z, glm::X)</span> <a name="l00344"></a>00344 <span class="preprocessor"></span><span class="preprocessor">#define xzzx swizzle(glm::X, glm::Z, glm::Z, glm::X)</span> <a name="l00345"></a>00345 <span class="preprocessor"></span><span class="preprocessor">#define yzzx swizzle(glm::Y, glm::Z, glm::Z, glm::X)</span> <a name="l00346"></a>00346 <span class="preprocessor"></span><span class="preprocessor">#define zzzx swizzle(glm::Z, glm::Z, glm::Z, glm::X)</span> <a name="l00347"></a>00347 <span class="preprocessor"></span><span class="preprocessor">#define wzzx swizzle(glm::W, glm::Z, glm::Z, glm::X)</span> <a name="l00348"></a>00348 <span class="preprocessor"></span><span class="preprocessor">#define xwzx swizzle(glm::X, glm::W, glm::Z, glm::X)</span> <a name="l00349"></a>00349 <span class="preprocessor"></span><span class="preprocessor">#define ywzx swizzle(glm::Y, glm::W, glm::Z, glm::X)</span> <a name="l00350"></a>00350 <span class="preprocessor"></span><span class="preprocessor">#define zwzx swizzle(glm::Z, glm::W, glm::Z, glm::X)</span> <a name="l00351"></a>00351 <span class="preprocessor"></span><span class="preprocessor">#define wwzx swizzle(glm::W, glm::W, glm::Z, glm::X)</span> <a name="l00352"></a>00352 <span class="preprocessor"></span><span class="preprocessor">#define xxwx swizzle(glm::X, glm::X, glm::W, glm::X)</span> <a name="l00353"></a>00353 <span class="preprocessor"></span><span class="preprocessor">#define yxwx swizzle(glm::Y, glm::X, glm::W, glm::X)</span> <a name="l00354"></a>00354 <span class="preprocessor"></span><span class="preprocessor">#define zxwx swizzle(glm::Z, glm::X, glm::W, glm::X)</span> <a name="l00355"></a>00355 <span class="preprocessor"></span><span class="preprocessor">#define wxwx swizzle(glm::W, glm::X, glm::W, glm::X)</span> <a name="l00356"></a>00356 <span class="preprocessor"></span><span class="preprocessor">#define xywx swizzle(glm::X, glm::Y, glm::W, glm::X)</span> <a name="l00357"></a>00357 <span class="preprocessor"></span><span class="preprocessor">#define yywx swizzle(glm::Y, glm::Y, glm::W, glm::X)</span> <a name="l00358"></a>00358 <span class="preprocessor"></span><span class="preprocessor">#define zywx swizzle(glm::Z, glm::Y, glm::W, glm::X)</span> <a name="l00359"></a>00359 <span class="preprocessor"></span><span class="preprocessor">#define wywx swizzle(glm::W, glm::Y, glm::W, glm::X)</span> <a name="l00360"></a>00360 <span class="preprocessor"></span><span class="preprocessor">#define xzwx swizzle(glm::X, glm::Z, glm::W, glm::X)</span> <a name="l00361"></a>00361 <span class="preprocessor"></span><span class="preprocessor">#define yzwx swizzle(glm::Y, glm::Z, glm::W, glm::X)</span> <a name="l00362"></a>00362 <span class="preprocessor"></span><span class="preprocessor">#define zzwx swizzle(glm::Z, glm::Z, glm::W, glm::X)</span> <a name="l00363"></a>00363 <span class="preprocessor"></span><span class="preprocessor">#define wzwx swizzle(glm::W, glm::Z, glm::W, glm::X)</span> <a name="l00364"></a>00364 <span class="preprocessor"></span><span class="preprocessor">#define xwwx swizzle(glm::X, glm::W, glm::W, glm::X)</span> <a name="l00365"></a>00365 <span class="preprocessor"></span><span class="preprocessor">#define ywwx swizzle(glm::Y, glm::W, glm::W, glm::X)</span> <a name="l00366"></a>00366 <span class="preprocessor"></span><span class="preprocessor">#define zwwx swizzle(glm::Z, glm::W, glm::W, glm::X)</span> <a name="l00367"></a>00367 <span class="preprocessor"></span><span class="preprocessor">#define wwwx swizzle(glm::W, glm::W, glm::W, glm::X)</span> <a name="l00368"></a>00368 <span class="preprocessor"></span><span class="preprocessor">#define xxxy swizzle(glm::X, glm::X, glm::X, glm::Y)</span> <a name="l00369"></a>00369 <span class="preprocessor"></span><span class="preprocessor">#define yxxy swizzle(glm::Y, glm::X, glm::X, glm::Y)</span> <a name="l00370"></a>00370 <span class="preprocessor"></span><span class="preprocessor">#define zxxy swizzle(glm::Z, glm::X, glm::X, glm::Y)</span> <a name="l00371"></a>00371 <span class="preprocessor"></span><span class="preprocessor">#define wxxy swizzle(glm::W, glm::X, glm::X, glm::Y)</span> <a name="l00372"></a>00372 <span class="preprocessor"></span><span class="preprocessor">#define xyxy swizzle(glm::X, glm::Y, glm::X, glm::Y)</span> <a name="l00373"></a>00373 <span class="preprocessor"></span><span class="preprocessor">#define yyxy swizzle(glm::Y, glm::Y, glm::X, glm::Y)</span> <a name="l00374"></a>00374 <span class="preprocessor"></span><span class="preprocessor">#define zyxy swizzle(glm::Z, glm::Y, glm::X, glm::Y)</span> <a name="l00375"></a>00375 <span class="preprocessor"></span><span class="preprocessor">#define wyxy swizzle(glm::W, glm::Y, glm::X, glm::Y)</span> <a name="l00376"></a>00376 <span class="preprocessor"></span><span class="preprocessor">#define xzxy swizzle(glm::X, glm::Z, glm::X, glm::Y)</span> <a name="l00377"></a>00377 <span class="preprocessor"></span><span class="preprocessor">#define yzxy swizzle(glm::Y, glm::Z, glm::X, glm::Y)</span> <a name="l00378"></a>00378 <span class="preprocessor"></span><span class="preprocessor">#define zzxy swizzle(glm::Z, glm::Z, glm::X, glm::Y)</span> <a name="l00379"></a>00379 <span class="preprocessor"></span><span class="preprocessor">#define wzxy swizzle(glm::W, glm::Z, glm::X, glm::Y)</span> <a name="l00380"></a>00380 <span class="preprocessor"></span><span class="preprocessor">#define xwxy swizzle(glm::X, glm::W, glm::X, glm::Y)</span> <a name="l00381"></a>00381 <span class="preprocessor"></span><span class="preprocessor">#define ywxy swizzle(glm::Y, glm::W, glm::X, glm::Y)</span> <a name="l00382"></a>00382 <span class="preprocessor"></span><span class="preprocessor">#define zwxy swizzle(glm::Z, glm::W, glm::X, glm::Y)</span> <a name="l00383"></a>00383 <span class="preprocessor"></span><span class="preprocessor">#define wwxy swizzle(glm::W, glm::W, glm::X, glm::Y)</span> <a name="l00384"></a>00384 <span class="preprocessor"></span><span class="preprocessor">#define xxyy swizzle(glm::X, glm::X, glm::Y, glm::Y)</span> <a name="l00385"></a>00385 <span class="preprocessor"></span><span class="preprocessor">#define yxyy swizzle(glm::Y, glm::X, glm::Y, glm::Y)</span> <a name="l00386"></a>00386 <span class="preprocessor"></span><span class="preprocessor">#define zxyy swizzle(glm::Z, glm::X, glm::Y, glm::Y)</span> <a name="l00387"></a>00387 <span class="preprocessor"></span><span class="preprocessor">#define wxyy swizzle(glm::W, glm::X, glm::Y, glm::Y)</span> <a name="l00388"></a>00388 <span class="preprocessor"></span><span class="preprocessor">#define xyyy swizzle(glm::X, glm::Y, glm::Y, glm::Y)</span> <a name="l00389"></a>00389 <span class="preprocessor"></span><span class="preprocessor">#define yyyy swizzle(glm::Y, glm::Y, glm::Y, glm::Y)</span> <a name="l00390"></a>00390 <span class="preprocessor"></span><span class="preprocessor">#define zyyy swizzle(glm::Z, glm::Y, glm::Y, glm::Y)</span> <a name="l00391"></a>00391 <span class="preprocessor"></span><span class="preprocessor">#define wyyy swizzle(glm::W, glm::Y, glm::Y, glm::Y)</span> <a name="l00392"></a>00392 <span class="preprocessor"></span><span class="preprocessor">#define xzyy swizzle(glm::X, glm::Z, glm::Y, glm::Y)</span> <a name="l00393"></a>00393 <span class="preprocessor"></span><span class="preprocessor">#define yzyy swizzle(glm::Y, glm::Z, glm::Y, glm::Y)</span> <a name="l00394"></a>00394 <span class="preprocessor"></span><span class="preprocessor">#define zzyy swizzle(glm::Z, glm::Z, glm::Y, glm::Y)</span> <a name="l00395"></a>00395 <span class="preprocessor"></span><span class="preprocessor">#define wzyy swizzle(glm::W, glm::Z, glm::Y, glm::Y)</span> <a name="l00396"></a>00396 <span class="preprocessor"></span><span class="preprocessor">#define xwyy swizzle(glm::X, glm::W, glm::Y, glm::Y)</span> <a name="l00397"></a>00397 <span class="preprocessor"></span><span class="preprocessor">#define ywyy swizzle(glm::Y, glm::W, glm::Y, glm::Y)</span> <a name="l00398"></a>00398 <span class="preprocessor"></span><span class="preprocessor">#define zwyy swizzle(glm::Z, glm::W, glm::Y, glm::Y)</span> <a name="l00399"></a>00399 <span class="preprocessor"></span><span class="preprocessor">#define wwyy swizzle(glm::W, glm::W, glm::Y, glm::Y)</span> <a name="l00400"></a>00400 <span class="preprocessor"></span><span class="preprocessor">#define xxzy swizzle(glm::X, glm::X, glm::Z, glm::Y)</span> <a name="l00401"></a>00401 <span class="preprocessor"></span><span class="preprocessor">#define yxzy swizzle(glm::Y, glm::X, glm::Z, glm::Y)</span> <a name="l00402"></a>00402 <span class="preprocessor"></span><span class="preprocessor">#define zxzy swizzle(glm::Z, glm::X, glm::Z, glm::Y)</span> <a name="l00403"></a>00403 <span class="preprocessor"></span><span class="preprocessor">#define wxzy swizzle(glm::W, glm::X, glm::Z, glm::Y)</span> <a name="l00404"></a>00404 <span class="preprocessor"></span><span class="preprocessor">#define xyzy swizzle(glm::X, glm::Y, glm::Z, glm::Y)</span> <a name="l00405"></a>00405 <span class="preprocessor"></span><span class="preprocessor">#define yyzy swizzle(glm::Y, glm::Y, glm::Z, glm::Y)</span> <a name="l00406"></a>00406 <span class="preprocessor"></span><span class="preprocessor">#define zyzy swizzle(glm::Z, glm::Y, glm::Z, glm::Y)</span> <a name="l00407"></a>00407 <span class="preprocessor"></span><span class="preprocessor">#define wyzy swizzle(glm::W, glm::Y, glm::Z, glm::Y)</span> <a name="l00408"></a>00408 <span class="preprocessor"></span><span class="preprocessor">#define xzzy swizzle(glm::X, glm::Z, glm::Z, glm::Y)</span> <a name="l00409"></a>00409 <span class="preprocessor"></span><span class="preprocessor">#define yzzy swizzle(glm::Y, glm::Z, glm::Z, glm::Y)</span> <a name="l00410"></a>00410 <span class="preprocessor"></span><span class="preprocessor">#define zzzy swizzle(glm::Z, glm::Z, glm::Z, glm::Y)</span> <a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor">#define wzzy swizzle(glm::W, glm::Z, glm::Z, glm::Y)</span> <a name="l00412"></a>00412 <span class="preprocessor"></span><span class="preprocessor">#define xwzy swizzle(glm::X, glm::W, glm::Z, glm::Y)</span> <a name="l00413"></a>00413 <span class="preprocessor"></span><span class="preprocessor">#define ywzy swizzle(glm::Y, glm::W, glm::Z, glm::Y)</span> <a name="l00414"></a>00414 <span class="preprocessor"></span><span class="preprocessor">#define zwzy swizzle(glm::Z, glm::W, glm::Z, glm::Y)</span> <a name="l00415"></a>00415 <span class="preprocessor"></span><span class="preprocessor">#define wwzy swizzle(glm::W, glm::W, glm::Z, glm::Y)</span> <a name="l00416"></a>00416 <span class="preprocessor"></span><span class="preprocessor">#define xxwy swizzle(glm::X, glm::X, glm::W, glm::Y)</span> <a name="l00417"></a>00417 <span class="preprocessor"></span><span class="preprocessor">#define yxwy swizzle(glm::Y, glm::X, glm::W, glm::Y)</span> <a name="l00418"></a>00418 <span class="preprocessor"></span><span class="preprocessor">#define zxwy swizzle(glm::Z, glm::X, glm::W, glm::Y)</span> <a name="l00419"></a>00419 <span class="preprocessor"></span><span class="preprocessor">#define wxwy swizzle(glm::W, glm::X, glm::W, glm::Y)</span> <a name="l00420"></a>00420 <span class="preprocessor"></span><span class="preprocessor">#define xywy swizzle(glm::X, glm::Y, glm::W, glm::Y)</span> <a name="l00421"></a>00421 <span class="preprocessor"></span><span class="preprocessor">#define yywy swizzle(glm::Y, glm::Y, glm::W, glm::Y)</span> <a name="l00422"></a>00422 <span class="preprocessor"></span><span class="preprocessor">#define zywy swizzle(glm::Z, glm::Y, glm::W, glm::Y)</span> <a name="l00423"></a>00423 <span class="preprocessor"></span><span class="preprocessor">#define wywy swizzle(glm::W, glm::Y, glm::W, glm::Y)</span> <a name="l00424"></a>00424 <span class="preprocessor"></span><span class="preprocessor">#define xzwy swizzle(glm::X, glm::Z, glm::W, glm::Y)</span> <a name="l00425"></a>00425 <span class="preprocessor"></span><span class="preprocessor">#define yzwy swizzle(glm::Y, glm::Z, glm::W, glm::Y)</span> <a name="l00426"></a>00426 <span class="preprocessor"></span><span class="preprocessor">#define zzwy swizzle(glm::Z, glm::Z, glm::W, glm::Y)</span> <a name="l00427"></a>00427 <span class="preprocessor"></span><span class="preprocessor">#define wzwy swizzle(glm::W, glm::Z, glm::W, glm::Y)</span> <a name="l00428"></a>00428 <span class="preprocessor"></span><span class="preprocessor">#define xwwy swizzle(glm::X, glm::W, glm::W, glm::Y)</span> <a name="l00429"></a>00429 <span class="preprocessor"></span><span class="preprocessor">#define ywwy swizzle(glm::Y, glm::W, glm::W, glm::Y)</span> <a name="l00430"></a>00430 <span class="preprocessor"></span><span class="preprocessor">#define zwwy swizzle(glm::Z, glm::W, glm::W, glm::Y)</span> <a name="l00431"></a>00431 <span class="preprocessor"></span><span class="preprocessor">#define wwwy swizzle(glm::W, glm::W, glm::W, glm::Y)</span> <a name="l00432"></a>00432 <span class="preprocessor"></span><span class="preprocessor">#define xxxz swizzle(glm::X, glm::X, glm::X, glm::Z)</span> <a name="l00433"></a>00433 <span class="preprocessor"></span><span class="preprocessor">#define yxxz swizzle(glm::Y, glm::X, glm::X, glm::Z)</span> <a name="l00434"></a>00434 <span class="preprocessor"></span><span class="preprocessor">#define zxxz swizzle(glm::Z, glm::X, glm::X, glm::Z)</span> <a name="l00435"></a>00435 <span class="preprocessor"></span><span class="preprocessor">#define wxxz swizzle(glm::W, glm::X, glm::X, glm::Z)</span> <a name="l00436"></a>00436 <span class="preprocessor"></span><span class="preprocessor">#define xyxz swizzle(glm::X, glm::Y, glm::X, glm::Z)</span> <a name="l00437"></a>00437 <span class="preprocessor"></span><span class="preprocessor">#define yyxz swizzle(glm::Y, glm::Y, glm::X, glm::Z)</span> <a name="l00438"></a>00438 <span class="preprocessor"></span><span class="preprocessor">#define zyxz swizzle(glm::Z, glm::Y, glm::X, glm::Z)</span> <a name="l00439"></a>00439 <span class="preprocessor"></span><span class="preprocessor">#define wyxz swizzle(glm::W, glm::Y, glm::X, glm::Z)</span> <a name="l00440"></a>00440 <span class="preprocessor"></span><span class="preprocessor">#define xzxz swizzle(glm::X, glm::Z, glm::X, glm::Z)</span> <a name="l00441"></a>00441 <span class="preprocessor"></span><span class="preprocessor">#define yzxz swizzle(glm::Y, glm::Z, glm::X, glm::Z)</span> <a name="l00442"></a>00442 <span class="preprocessor"></span><span class="preprocessor">#define zzxz swizzle(glm::Z, glm::Z, glm::X, glm::Z)</span> <a name="l00443"></a>00443 <span class="preprocessor"></span><span class="preprocessor">#define wzxz swizzle(glm::W, glm::Z, glm::X, glm::Z)</span> <a name="l00444"></a>00444 <span class="preprocessor"></span><span class="preprocessor">#define xwxz swizzle(glm::X, glm::W, glm::X, glm::Z)</span> <a name="l00445"></a>00445 <span class="preprocessor"></span><span class="preprocessor">#define ywxz swizzle(glm::Y, glm::W, glm::X, glm::Z)</span> <a name="l00446"></a>00446 <span class="preprocessor"></span><span class="preprocessor">#define zwxz swizzle(glm::Z, glm::W, glm::X, glm::Z)</span> <a name="l00447"></a>00447 <span class="preprocessor"></span><span class="preprocessor">#define wwxz swizzle(glm::W, glm::W, glm::X, glm::Z)</span> <a name="l00448"></a>00448 <span class="preprocessor"></span><span class="preprocessor">#define xxyz swizzle(glm::X, glm::X, glm::Y, glm::Z)</span> <a name="l00449"></a>00449 <span class="preprocessor"></span><span class="preprocessor">#define yxyz swizzle(glm::Y, glm::X, glm::Y, glm::Z)</span> <a name="l00450"></a>00450 <span class="preprocessor"></span><span class="preprocessor">#define zxyz swizzle(glm::Z, glm::X, glm::Y, glm::Z)</span> <a name="l00451"></a>00451 <span class="preprocessor"></span><span class="preprocessor">#define wxyz swizzle(glm::W, glm::X, glm::Y, glm::Z)</span> <a name="l00452"></a>00452 <span class="preprocessor"></span><span class="preprocessor">#define xyyz swizzle(glm::X, glm::Y, glm::Y, glm::Z)</span> <a name="l00453"></a>00453 <span class="preprocessor"></span><span class="preprocessor">#define yyyz swizzle(glm::Y, glm::Y, glm::Y, glm::Z)</span> <a name="l00454"></a>00454 <span class="preprocessor"></span><span class="preprocessor">#define zyyz swizzle(glm::Z, glm::Y, glm::Y, glm::Z)</span> <a name="l00455"></a>00455 <span class="preprocessor"></span><span class="preprocessor">#define wyyz swizzle(glm::W, glm::Y, glm::Y, glm::Z)</span> <a name="l00456"></a>00456 <span class="preprocessor"></span><span class="preprocessor">#define xzyz swizzle(glm::X, glm::Z, glm::Y, glm::Z)</span> <a name="l00457"></a>00457 <span class="preprocessor"></span><span class="preprocessor">#define yzyz swizzle(glm::Y, glm::Z, glm::Y, glm::Z)</span> <a name="l00458"></a>00458 <span class="preprocessor"></span><span class="preprocessor">#define zzyz swizzle(glm::Z, glm::Z, glm::Y, glm::Z)</span> <a name="l00459"></a>00459 <span class="preprocessor"></span><span class="preprocessor">#define wzyz swizzle(glm::W, glm::Z, glm::Y, glm::Z)</span> <a name="l00460"></a>00460 <span class="preprocessor"></span><span class="preprocessor">#define xwyz swizzle(glm::X, glm::W, glm::Y, glm::Z)</span> <a name="l00461"></a>00461 <span class="preprocessor"></span><span class="preprocessor">#define ywyz swizzle(glm::Y, glm::W, glm::Y, glm::Z)</span> <a name="l00462"></a>00462 <span class="preprocessor"></span><span class="preprocessor">#define zwyz swizzle(glm::Z, glm::W, glm::Y, glm::Z)</span> <a name="l00463"></a>00463 <span class="preprocessor"></span><span class="preprocessor">#define wwyz swizzle(glm::W, glm::W, glm::Y, glm::Z)</span> <a name="l00464"></a>00464 <span class="preprocessor"></span><span class="preprocessor">#define xxzz swizzle(glm::X, glm::X, glm::Z, glm::Z)</span> <a name="l00465"></a>00465 <span class="preprocessor"></span><span class="preprocessor">#define yxzz swizzle(glm::Y, glm::X, glm::Z, glm::Z)</span> <a name="l00466"></a>00466 <span class="preprocessor"></span><span class="preprocessor">#define zxzz swizzle(glm::Z, glm::X, glm::Z, glm::Z)</span> <a name="l00467"></a>00467 <span class="preprocessor"></span><span class="preprocessor">#define wxzz swizzle(glm::W, glm::X, glm::Z, glm::Z)</span> <a name="l00468"></a>00468 <span class="preprocessor"></span><span class="preprocessor">#define xyzz swizzle(glm::X, glm::Y, glm::Z, glm::Z)</span> <a name="l00469"></a>00469 <span class="preprocessor"></span><span class="preprocessor">#define yyzz swizzle(glm::Y, glm::Y, glm::Z, glm::Z)</span> <a name="l00470"></a>00470 <span class="preprocessor"></span><span class="preprocessor">#define zyzz swizzle(glm::Z, glm::Y, glm::Z, glm::Z)</span> <a name="l00471"></a>00471 <span class="preprocessor"></span><span class="preprocessor">#define wyzz swizzle(glm::W, glm::Y, glm::Z, glm::Z)</span> <a name="l00472"></a>00472 <span class="preprocessor"></span><span class="preprocessor">#define xzzz swizzle(glm::X, glm::Z, glm::Z, glm::Z)</span> <a name="l00473"></a>00473 <span class="preprocessor"></span><span class="preprocessor">#define yzzz swizzle(glm::Y, glm::Z, glm::Z, glm::Z)</span> <a name="l00474"></a>00474 <span class="preprocessor"></span><span class="preprocessor">#define zzzz swizzle(glm::Z, glm::Z, glm::Z, glm::Z)</span> <a name="l00475"></a>00475 <span class="preprocessor"></span><span class="preprocessor">#define wzzz swizzle(glm::W, glm::Z, glm::Z, glm::Z)</span> <a name="l00476"></a>00476 <span class="preprocessor"></span><span class="preprocessor">#define xwzz swizzle(glm::X, glm::W, glm::Z, glm::Z)</span> <a name="l00477"></a>00477 <span class="preprocessor"></span><span class="preprocessor">#define ywzz swizzle(glm::Y, glm::W, glm::Z, glm::Z)</span> <a name="l00478"></a>00478 <span class="preprocessor"></span><span class="preprocessor">#define zwzz swizzle(glm::Z, glm::W, glm::Z, glm::Z)</span> <a name="l00479"></a>00479 <span class="preprocessor"></span><span class="preprocessor">#define wwzz swizzle(glm::W, glm::W, glm::Z, glm::Z)</span> <a name="l00480"></a>00480 <span class="preprocessor"></span><span class="preprocessor">#define xxwz swizzle(glm::X, glm::X, glm::W, glm::Z)</span> <a name="l00481"></a>00481 <span class="preprocessor"></span><span class="preprocessor">#define yxwz swizzle(glm::Y, glm::X, glm::W, glm::Z)</span> <a name="l00482"></a>00482 <span class="preprocessor"></span><span class="preprocessor">#define zxwz swizzle(glm::Z, glm::X, glm::W, glm::Z)</span> <a name="l00483"></a>00483 <span class="preprocessor"></span><span class="preprocessor">#define wxwz swizzle(glm::W, glm::X, glm::W, glm::Z)</span> <a name="l00484"></a>00484 <span class="preprocessor"></span><span class="preprocessor">#define xywz swizzle(glm::X, glm::Y, glm::W, glm::Z)</span> <a name="l00485"></a>00485 <span class="preprocessor"></span><span class="preprocessor">#define yywz swizzle(glm::Y, glm::Y, glm::W, glm::Z)</span> <a name="l00486"></a>00486 <span class="preprocessor"></span><span class="preprocessor">#define zywz swizzle(glm::Z, glm::Y, glm::W, glm::Z)</span> <a name="l00487"></a>00487 <span class="preprocessor"></span><span class="preprocessor">#define wywz swizzle(glm::W, glm::Y, glm::W, glm::Z)</span> <a name="l00488"></a>00488 <span class="preprocessor"></span><span class="preprocessor">#define xzwz swizzle(glm::X, glm::Z, glm::W, glm::Z)</span> <a name="l00489"></a>00489 <span class="preprocessor"></span><span class="preprocessor">#define yzwz swizzle(glm::Y, glm::Z, glm::W, glm::Z)</span> <a name="l00490"></a>00490 <span class="preprocessor"></span><span class="preprocessor">#define zzwz swizzle(glm::Z, glm::Z, glm::W, glm::Z)</span> <a name="l00491"></a>00491 <span class="preprocessor"></span><span class="preprocessor">#define wzwz swizzle(glm::W, glm::Z, glm::W, glm::Z)</span> <a name="l00492"></a>00492 <span class="preprocessor"></span><span class="preprocessor">#define xwwz swizzle(glm::X, glm::W, glm::W, glm::Z)</span> <a name="l00493"></a>00493 <span class="preprocessor"></span><span class="preprocessor">#define ywwz swizzle(glm::Y, glm::W, glm::W, glm::Z)</span> <a name="l00494"></a>00494 <span class="preprocessor"></span><span class="preprocessor">#define zwwz swizzle(glm::Z, glm::W, glm::W, glm::Z)</span> <a name="l00495"></a>00495 <span class="preprocessor"></span><span class="preprocessor">#define wwwz swizzle(glm::W, glm::W, glm::W, glm::Z)</span> <a name="l00496"></a>00496 <span class="preprocessor"></span><span class="preprocessor">#define xxxw swizzle(glm::X, glm::X, glm::X, glm::W)</span> <a name="l00497"></a>00497 <span class="preprocessor"></span><span class="preprocessor">#define yxxw swizzle(glm::Y, glm::X, glm::X, glm::W)</span> <a name="l00498"></a>00498 <span class="preprocessor"></span><span class="preprocessor">#define zxxw swizzle(glm::Z, glm::X, glm::X, glm::W)</span> <a name="l00499"></a>00499 <span class="preprocessor"></span><span class="preprocessor">#define wxxw swizzle(glm::W, glm::X, glm::X, glm::W)</span> <a name="l00500"></a>00500 <span class="preprocessor"></span><span class="preprocessor">#define xyxw swizzle(glm::X, glm::Y, glm::X, glm::W)</span> <a name="l00501"></a>00501 <span class="preprocessor"></span><span class="preprocessor">#define yyxw swizzle(glm::Y, glm::Y, glm::X, glm::W)</span> <a name="l00502"></a>00502 <span class="preprocessor"></span><span class="preprocessor">#define zyxw swizzle(glm::Z, glm::Y, glm::X, glm::W)</span> <a name="l00503"></a>00503 <span class="preprocessor"></span><span class="preprocessor">#define wyxw swizzle(glm::W, glm::Y, glm::X, glm::W)</span> <a name="l00504"></a>00504 <span class="preprocessor"></span><span class="preprocessor">#define xzxw swizzle(glm::X, glm::Z, glm::X, glm::W)</span> <a name="l00505"></a>00505 <span class="preprocessor"></span><span class="preprocessor">#define yzxw swizzle(glm::Y, glm::Z, glm::X, glm::W)</span> <a name="l00506"></a>00506 <span class="preprocessor"></span><span class="preprocessor">#define zzxw swizzle(glm::Z, glm::Z, glm::X, glm::W)</span> <a name="l00507"></a>00507 <span class="preprocessor"></span><span class="preprocessor">#define wzxw swizzle(glm::W, glm::Z, glm::X, glm::W)</span> <a name="l00508"></a>00508 <span class="preprocessor"></span><span class="preprocessor">#define xwxw swizzle(glm::X, glm::W, glm::X, glm::W)</span> <a name="l00509"></a>00509 <span class="preprocessor"></span><span class="preprocessor">#define ywxw swizzle(glm::Y, glm::W, glm::X, glm::W)</span> <a name="l00510"></a>00510 <span class="preprocessor"></span><span class="preprocessor">#define zwxw swizzle(glm::Z, glm::W, glm::X, glm::W)</span> <a name="l00511"></a>00511 <span class="preprocessor"></span><span class="preprocessor">#define wwxw swizzle(glm::W, glm::W, glm::X, glm::W)</span> <a name="l00512"></a>00512 <span class="preprocessor"></span><span class="preprocessor">#define xxyw swizzle(glm::X, glm::X, glm::Y, glm::W)</span> <a name="l00513"></a>00513 <span class="preprocessor"></span><span class="preprocessor">#define yxyw swizzle(glm::Y, glm::X, glm::Y, glm::W)</span> <a name="l00514"></a>00514 <span class="preprocessor"></span><span class="preprocessor">#define zxyw swizzle(glm::Z, glm::X, glm::Y, glm::W)</span> <a name="l00515"></a>00515 <span class="preprocessor"></span><span class="preprocessor">#define wxyw swizzle(glm::W, glm::X, glm::Y, glm::W)</span> <a name="l00516"></a>00516 <span class="preprocessor"></span><span class="preprocessor">#define xyyw swizzle(glm::X, glm::Y, glm::Y, glm::W)</span> <a name="l00517"></a>00517 <span class="preprocessor"></span><span class="preprocessor">#define yyyw swizzle(glm::Y, glm::Y, glm::Y, glm::W)</span> <a name="l00518"></a>00518 <span class="preprocessor"></span><span class="preprocessor">#define zyyw swizzle(glm::Z, glm::Y, glm::Y, glm::W)</span> <a name="l00519"></a>00519 <span class="preprocessor"></span><span class="preprocessor">#define wyyw swizzle(glm::W, glm::Y, glm::Y, glm::W)</span> <a name="l00520"></a>00520 <span class="preprocessor"></span><span class="preprocessor">#define xzyw swizzle(glm::X, glm::Z, glm::Y, glm::W)</span> <a name="l00521"></a>00521 <span class="preprocessor"></span><span class="preprocessor">#define yzyw swizzle(glm::Y, glm::Z, glm::Y, glm::W)</span> <a name="l00522"></a>00522 <span class="preprocessor"></span><span class="preprocessor">#define zzyw swizzle(glm::Z, glm::Z, glm::Y, glm::W)</span> <a name="l00523"></a>00523 <span class="preprocessor"></span><span class="preprocessor">#define wzyw swizzle(glm::W, glm::Z, glm::Y, glm::W)</span> <a name="l00524"></a>00524 <span class="preprocessor"></span><span class="preprocessor">#define xwyw swizzle(glm::X, glm::W, glm::Y, glm::W)</span> <a name="l00525"></a>00525 <span class="preprocessor"></span><span class="preprocessor">#define ywyw swizzle(glm::Y, glm::W, glm::Y, glm::W)</span> <a name="l00526"></a>00526 <span class="preprocessor"></span><span class="preprocessor">#define zwyw swizzle(glm::Z, glm::W, glm::Y, glm::W)</span> <a name="l00527"></a>00527 <span class="preprocessor"></span><span class="preprocessor">#define wwyw swizzle(glm::W, glm::W, glm::Y, glm::W)</span> <a name="l00528"></a>00528 <span class="preprocessor"></span><span class="preprocessor">#define xxzw swizzle(glm::X, glm::X, glm::Z, glm::W)</span> <a name="l00529"></a>00529 <span class="preprocessor"></span><span class="preprocessor">#define yxzw swizzle(glm::Y, glm::X, glm::Z, glm::W)</span> <a name="l00530"></a>00530 <span class="preprocessor"></span><span class="preprocessor">#define zxzw swizzle(glm::Z, glm::X, glm::Z, glm::W)</span> <a name="l00531"></a>00531 <span class="preprocessor"></span><span class="preprocessor">#define wxzw swizzle(glm::W, glm::X, glm::Z, glm::W)</span> <a name="l00532"></a>00532 <span class="preprocessor"></span><span class="preprocessor">#define xyzw swizzle(glm::X, glm::Y, glm::Z, glm::W)</span> <a name="l00533"></a>00533 <span class="preprocessor"></span><span class="preprocessor">#define yyzw swizzle(glm::Y, glm::Y, glm::Z, glm::W)</span> <a name="l00534"></a>00534 <span class="preprocessor"></span><span class="preprocessor">#define zyzw swizzle(glm::Z, glm::Y, glm::Z, glm::W)</span> <a name="l00535"></a>00535 <span class="preprocessor"></span><span class="preprocessor">#define wyzw swizzle(glm::W, glm::Y, glm::Z, glm::W)</span> <a name="l00536"></a>00536 <span class="preprocessor"></span><span class="preprocessor">#define xzzw swizzle(glm::X, glm::Z, glm::Z, glm::W)</span> <a name="l00537"></a>00537 <span class="preprocessor"></span><span class="preprocessor">#define yzzw swizzle(glm::Y, glm::Z, glm::Z, glm::W)</span> <a name="l00538"></a>00538 <span class="preprocessor"></span><span class="preprocessor">#define zzzw swizzle(glm::Z, glm::Z, glm::Z, glm::W)</span> <a name="l00539"></a>00539 <span class="preprocessor"></span><span class="preprocessor">#define wzzw swizzle(glm::W, glm::Z, glm::Z, glm::W)</span> <a name="l00540"></a>00540 <span class="preprocessor"></span><span class="preprocessor">#define xwzw swizzle(glm::X, glm::W, glm::Z, glm::W)</span> <a name="l00541"></a>00541 <span class="preprocessor"></span><span class="preprocessor">#define ywzw swizzle(glm::Y, glm::W, glm::Z, glm::W)</span> <a name="l00542"></a>00542 <span class="preprocessor"></span><span class="preprocessor">#define zwzw swizzle(glm::Z, glm::W, glm::Z, glm::W)</span> <a name="l00543"></a>00543 <span class="preprocessor"></span><span class="preprocessor">#define wwzw swizzle(glm::W, glm::W, glm::Z, glm::W)</span> <a name="l00544"></a>00544 <span class="preprocessor"></span><span class="preprocessor">#define xxww swizzle(glm::X, glm::X, glm::W, glm::W)</span> <a name="l00545"></a>00545 <span class="preprocessor"></span><span class="preprocessor">#define yxww swizzle(glm::Y, glm::X, glm::W, glm::W)</span> <a name="l00546"></a>00546 <span class="preprocessor"></span><span class="preprocessor">#define zxww swizzle(glm::Z, glm::X, glm::W, glm::W)</span> <a name="l00547"></a>00547 <span class="preprocessor"></span><span class="preprocessor">#define wxww swizzle(glm::W, glm::X, glm::W, glm::W)</span> <a name="l00548"></a>00548 <span class="preprocessor"></span><span class="preprocessor">#define xyww swizzle(glm::X, glm::Y, glm::W, glm::W)</span> <a name="l00549"></a>00549 <span class="preprocessor"></span><span class="preprocessor">#define yyww swizzle(glm::Y, glm::Y, glm::W, glm::W)</span> <a name="l00550"></a>00550 <span class="preprocessor"></span><span class="preprocessor">#define zyww swizzle(glm::Z, glm::Y, glm::W, glm::W)</span> <a name="l00551"></a>00551 <span class="preprocessor"></span><span class="preprocessor">#define wyww swizzle(glm::W, glm::Y, glm::W, glm::W)</span> <a name="l00552"></a>00552 <span class="preprocessor"></span><span class="preprocessor">#define xzww swizzle(glm::X, glm::Z, glm::W, glm::W)</span> <a name="l00553"></a>00553 <span class="preprocessor"></span><span class="preprocessor">#define yzww swizzle(glm::Y, glm::Z, glm::W, glm::W)</span> <a name="l00554"></a>00554 <span class="preprocessor"></span><span class="preprocessor">#define zzww swizzle(glm::Z, glm::Z, glm::W, glm::W)</span> <a name="l00555"></a>00555 <span class="preprocessor"></span><span class="preprocessor">#define wzww swizzle(glm::W, glm::Z, glm::W, glm::W)</span> <a name="l00556"></a>00556 <span class="preprocessor"></span><span class="preprocessor">#define xwww swizzle(glm::X, glm::W, glm::W, glm::W)</span> <a name="l00557"></a>00557 <span class="preprocessor"></span><span class="preprocessor">#define ywww swizzle(glm::Y, glm::W, glm::W, glm::W)</span> <a name="l00558"></a>00558 <span class="preprocessor"></span><span class="preprocessor">#define zwww swizzle(glm::Z, glm::W, glm::W, glm::W)</span> <a name="l00559"></a>00559 <span class="preprocessor"></span><span class="preprocessor">#define wwww swizzle(glm::W, glm::W, glm::W, glm::W)</span> <a name="l00560"></a>00560 <span class="preprocessor"></span> <a name="l00561"></a>00561 <span class="preprocessor">#endif</span> <a name="l00562"></a>00562 <span class="preprocessor"></span> <a name="l00563"></a>00563 <span class="preprocessor">#if(defined(GLM_SWIZZLE_RGBA) || defined(GLM_SWIZZLE))</span> <a name="l00564"></a>00564 <span class="preprocessor"></span> <a name="l00565"></a>00565 <span class="preprocessor">#define rrrr swizzle(glm::X, glm::X, glm::X, glm::X)</span> <a name="l00566"></a>00566 <span class="preprocessor"></span><span class="preprocessor">#define grrr swizzle(glm::Y, glm::X, glm::X, glm::X)</span> <a name="l00567"></a>00567 <span class="preprocessor"></span><span class="preprocessor">#define brrr swizzle(glm::Z, glm::X, glm::X, glm::X)</span> <a name="l00568"></a>00568 <span class="preprocessor"></span><span class="preprocessor">#define arrr swizzle(glm::W, glm::X, glm::X, glm::X)</span> <a name="l00569"></a>00569 <span class="preprocessor"></span><span class="preprocessor">#define rgrr swizzle(glm::X, glm::Y, glm::X, glm::X)</span> <a name="l00570"></a>00570 <span class="preprocessor"></span><span class="preprocessor">#define ggrr swizzle(glm::Y, glm::Y, glm::X, glm::X)</span> <a name="l00571"></a>00571 <span class="preprocessor"></span><span class="preprocessor">#define bgrr swizzle(glm::Z, glm::Y, glm::X, glm::X)</span> <a name="l00572"></a>00572 <span class="preprocessor"></span><span class="preprocessor">#define agrr swizzle(glm::W, glm::Y, glm::X, glm::X)</span> <a name="l00573"></a>00573 <span class="preprocessor"></span><span class="preprocessor">#define rbrr swizzle(glm::X, glm::Z, glm::X, glm::X)</span> <a name="l00574"></a>00574 <span class="preprocessor"></span><span class="preprocessor">#define gbrr swizzle(glm::Y, glm::Z, glm::X, glm::X)</span> <a name="l00575"></a>00575 <span class="preprocessor"></span><span class="preprocessor">#define bbrr swizzle(glm::Z, glm::Z, glm::X, glm::X)</span> <a name="l00576"></a>00576 <span class="preprocessor"></span><span class="preprocessor">#define abrr swizzle(glm::W, glm::Z, glm::X, glm::X)</span> <a name="l00577"></a>00577 <span class="preprocessor"></span><span class="preprocessor">#define rarr swizzle(glm::X, glm::W, glm::X, glm::X)</span> <a name="l00578"></a>00578 <span class="preprocessor"></span><span class="preprocessor">#define garr swizzle(glm::Y, glm::W, glm::X, glm::X)</span> <a name="l00579"></a>00579 <span class="preprocessor"></span><span class="preprocessor">#define barr swizzle(glm::Z, glm::W, glm::X, glm::X)</span> <a name="l00580"></a>00580 <span class="preprocessor"></span><span class="preprocessor">#define aarr swizzle(glm::W, glm::W, glm::X, glm::X)</span> <a name="l00581"></a>00581 <span class="preprocessor"></span><span class="preprocessor">#define rrgr swizzle(glm::X, glm::X, glm::Y, glm::X)</span> <a name="l00582"></a>00582 <span class="preprocessor"></span><span class="preprocessor">#define grgr swizzle(glm::Y, glm::X, glm::Y, glm::X)</span> <a name="l00583"></a>00583 <span class="preprocessor"></span><span class="preprocessor">#define brgr swizzle(glm::Z, glm::X, glm::Y, glm::X)</span> <a name="l00584"></a>00584 <span class="preprocessor"></span><span class="preprocessor">#define argr swizzle(glm::W, glm::X, glm::Y, glm::X)</span> <a name="l00585"></a>00585 <span class="preprocessor"></span><span class="preprocessor">#define rggr swizzle(glm::X, glm::Y, glm::Y, glm::X)</span> <a name="l00586"></a>00586 <span class="preprocessor"></span><span class="preprocessor">#define gggr swizzle(glm::Y, glm::Y, glm::Y, glm::X)</span> <a name="l00587"></a>00587 <span class="preprocessor"></span><span class="preprocessor">#define bggr swizzle(glm::Z, glm::Y, glm::Y, glm::X)</span> <a name="l00588"></a>00588 <span class="preprocessor"></span><span class="preprocessor">#define aggr swizzle(glm::W, glm::Y, glm::Y, glm::X)</span> <a name="l00589"></a>00589 <span class="preprocessor"></span><span class="preprocessor">#define rbgr swizzle(glm::X, glm::Z, glm::Y, glm::X)</span> <a name="l00590"></a>00590 <span class="preprocessor"></span><span class="preprocessor">#define gbgr swizzle(glm::Y, glm::Z, glm::Y, glm::X)</span> <a name="l00591"></a>00591 <span class="preprocessor"></span><span class="preprocessor">#define bbgr swizzle(glm::Z, glm::Z, glm::Y, glm::X)</span> <a name="l00592"></a>00592 <span class="preprocessor"></span><span class="preprocessor">#define abgr swizzle(glm::W, glm::Z, glm::Y, glm::X)</span> <a name="l00593"></a>00593 <span class="preprocessor"></span><span class="preprocessor">#define ragr swizzle(glm::X, glm::W, glm::Y, glm::X)</span> <a name="l00594"></a>00594 <span class="preprocessor"></span><span class="preprocessor">#define gagr swizzle(glm::Y, glm::W, glm::Y, glm::X)</span> <a name="l00595"></a>00595 <span class="preprocessor"></span><span class="preprocessor">#define bagr swizzle(glm::Z, glm::W, glm::Y, glm::X)</span> <a name="l00596"></a>00596 <span class="preprocessor"></span><span class="preprocessor">#define aagr swizzle(glm::W, glm::W, glm::Y, glm::X)</span> <a name="l00597"></a>00597 <span class="preprocessor"></span><span class="preprocessor">#define rrbr swizzle(glm::X, glm::X, glm::Z, glm::X)</span> <a name="l00598"></a>00598 <span class="preprocessor"></span><span class="preprocessor">#define grbr swizzle(glm::Y, glm::X, glm::Z, glm::X)</span> <a name="l00599"></a>00599 <span class="preprocessor"></span><span class="preprocessor">#define brbr swizzle(glm::Z, glm::X, glm::Z, glm::X)</span> <a name="l00600"></a>00600 <span class="preprocessor"></span><span class="preprocessor">#define arbr swizzle(glm::W, glm::X, glm::Z, glm::X)</span> <a name="l00601"></a>00601 <span class="preprocessor"></span><span class="preprocessor">#define rgbr swizzle(glm::X, glm::Y, glm::Z, glm::X)</span> <a name="l00602"></a>00602 <span class="preprocessor"></span><span class="preprocessor">#define ggbr swizzle(glm::Y, glm::Y, glm::Z, glm::X)</span> <a name="l00603"></a>00603 <span class="preprocessor"></span><span class="preprocessor">#define bgbr swizzle(glm::Z, glm::Y, glm::Z, glm::X)</span> <a name="l00604"></a>00604 <span class="preprocessor"></span><span class="preprocessor">#define agbr swizzle(glm::W, glm::Y, glm::Z, glm::X)</span> <a name="l00605"></a>00605 <span class="preprocessor"></span><span class="preprocessor">#define rbbr swizzle(glm::X, glm::Z, glm::Z, glm::X)</span> <a name="l00606"></a>00606 <span class="preprocessor"></span><span class="preprocessor">#define gbbr swizzle(glm::Y, glm::Z, glm::Z, glm::X)</span> <a name="l00607"></a>00607 <span class="preprocessor"></span><span class="preprocessor">#define bbbr swizzle(glm::Z, glm::Z, glm::Z, glm::X)</span> <a name="l00608"></a>00608 <span class="preprocessor"></span><span class="preprocessor">#define abbr swizzle(glm::W, glm::Z, glm::Z, glm::X)</span> <a name="l00609"></a>00609 <span class="preprocessor"></span><span class="preprocessor">#define rabr swizzle(glm::X, glm::W, glm::Z, glm::X)</span> <a name="l00610"></a>00610 <span class="preprocessor"></span><span class="preprocessor">#define gabr swizzle(glm::Y, glm::W, glm::Z, glm::X)</span> <a name="l00611"></a>00611 <span class="preprocessor"></span><span class="preprocessor">#define babr swizzle(glm::Z, glm::W, glm::Z, glm::X)</span> <a name="l00612"></a>00612 <span class="preprocessor"></span><span class="preprocessor">#define aabr swizzle(glm::W, glm::W, glm::Z, glm::X)</span> <a name="l00613"></a>00613 <span class="preprocessor"></span><span class="preprocessor">#define rrar swizzle(glm::X, glm::X, glm::W, glm::X)</span> <a name="l00614"></a>00614 <span class="preprocessor"></span><span class="preprocessor">#define grar swizzle(glm::Y, glm::X, glm::W, glm::X)</span> <a name="l00615"></a>00615 <span class="preprocessor"></span><span class="preprocessor">#define brar swizzle(glm::Z, glm::X, glm::W, glm::X)</span> <a name="l00616"></a>00616 <span class="preprocessor"></span><span class="preprocessor">#define arar swizzle(glm::W, glm::X, glm::W, glm::X)</span> <a name="l00617"></a>00617 <span class="preprocessor"></span><span class="preprocessor">#define rgar swizzle(glm::X, glm::Y, glm::W, glm::X)</span> <a name="l00618"></a>00618 <span class="preprocessor"></span><span class="preprocessor">#define ggar swizzle(glm::Y, glm::Y, glm::W, glm::X)</span> <a name="l00619"></a>00619 <span class="preprocessor"></span><span class="preprocessor">#define bgar swizzle(glm::Z, glm::Y, glm::W, glm::X)</span> <a name="l00620"></a>00620 <span class="preprocessor"></span><span class="preprocessor">#define agar swizzle(glm::W, glm::Y, glm::W, glm::X)</span> <a name="l00621"></a>00621 <span class="preprocessor"></span><span class="preprocessor">#define rbar swizzle(glm::X, glm::Z, glm::W, glm::X)</span> <a name="l00622"></a>00622 <span class="preprocessor"></span><span class="preprocessor">#define gbar swizzle(glm::Y, glm::Z, glm::W, glm::X)</span> <a name="l00623"></a>00623 <span class="preprocessor"></span><span class="preprocessor">#define bbar swizzle(glm::Z, glm::Z, glm::W, glm::X)</span> <a name="l00624"></a>00624 <span class="preprocessor"></span><span class="preprocessor">#define abar swizzle(glm::W, glm::Z, glm::W, glm::X)</span> <a name="l00625"></a>00625 <span class="preprocessor"></span><span class="preprocessor">#define raar swizzle(glm::X, glm::W, glm::W, glm::X)</span> <a name="l00626"></a>00626 <span class="preprocessor"></span><span class="preprocessor">#define gaar swizzle(glm::Y, glm::W, glm::W, glm::X)</span> <a name="l00627"></a>00627 <span class="preprocessor"></span><span class="preprocessor">#define baar swizzle(glm::Z, glm::W, glm::W, glm::X)</span> <a name="l00628"></a>00628 <span class="preprocessor"></span><span class="preprocessor">#define aaar swizzle(glm::W, glm::W, glm::W, glm::X)</span> <a name="l00629"></a>00629 <span class="preprocessor"></span><span class="preprocessor">#define rrrg swizzle(glm::X, glm::X, glm::X, glm::Y)</span> <a name="l00630"></a>00630 <span class="preprocessor"></span><span class="preprocessor">#define grrg swizzle(glm::Y, glm::X, glm::X, glm::Y)</span> <a name="l00631"></a>00631 <span class="preprocessor"></span><span class="preprocessor">#define brrg swizzle(glm::Z, glm::X, glm::X, glm::Y)</span> <a name="l00632"></a>00632 <span class="preprocessor"></span><span class="preprocessor">#define arrg swizzle(glm::W, glm::X, glm::X, glm::Y)</span> <a name="l00633"></a>00633 <span class="preprocessor"></span><span class="preprocessor">#define rgrg swizzle(glm::X, glm::Y, glm::X, glm::Y)</span> <a name="l00634"></a>00634 <span class="preprocessor"></span><span class="preprocessor">#define ggrg swizzle(glm::Y, glm::Y, glm::X, glm::Y)</span> <a name="l00635"></a>00635 <span class="preprocessor"></span><span class="preprocessor">#define bgrg swizzle(glm::Z, glm::Y, glm::X, glm::Y)</span> <a name="l00636"></a>00636 <span class="preprocessor"></span><span class="preprocessor">#define agrg swizzle(glm::W, glm::Y, glm::X, glm::Y)</span> <a name="l00637"></a>00637 <span class="preprocessor"></span><span class="preprocessor">#define rbrg swizzle(glm::X, glm::Z, glm::X, glm::Y)</span> <a name="l00638"></a>00638 <span class="preprocessor"></span><span class="preprocessor">#define gbrg swizzle(glm::Y, glm::Z, glm::X, glm::Y)</span> <a name="l00639"></a>00639 <span class="preprocessor"></span><span class="preprocessor">#define bbrg swizzle(glm::Z, glm::Z, glm::X, glm::Y)</span> <a name="l00640"></a>00640 <span class="preprocessor"></span><span class="preprocessor">#define abrg swizzle(glm::W, glm::Z, glm::X, glm::Y)</span> <a name="l00641"></a>00641 <span class="preprocessor"></span><span class="preprocessor">#define rarg swizzle(glm::X, glm::W, glm::X, glm::Y)</span> <a name="l00642"></a>00642 <span class="preprocessor"></span><span class="preprocessor">#define garg swizzle(glm::Y, glm::W, glm::X, glm::Y)</span> <a name="l00643"></a>00643 <span class="preprocessor"></span><span class="preprocessor">#define barg swizzle(glm::Z, glm::W, glm::X, glm::Y)</span> <a name="l00644"></a>00644 <span class="preprocessor"></span><span class="preprocessor">#define aarg swizzle(glm::W, glm::W, glm::X, glm::Y)</span> <a name="l00645"></a>00645 <span class="preprocessor"></span><span class="preprocessor">#define rrgg swizzle(glm::X, glm::X, glm::Y, glm::Y)</span> <a name="l00646"></a>00646 <span class="preprocessor"></span><span class="preprocessor">#define grgg swizzle(glm::Y, glm::X, glm::Y, glm::Y)</span> <a name="l00647"></a>00647 <span class="preprocessor"></span><span class="preprocessor">#define brgg swizzle(glm::Z, glm::X, glm::Y, glm::Y)</span> <a name="l00648"></a>00648 <span class="preprocessor"></span><span class="preprocessor">#define argg swizzle(glm::W, glm::X, glm::Y, glm::Y)</span> <a name="l00649"></a>00649 <span class="preprocessor"></span><span class="preprocessor">#define rggg swizzle(glm::X, glm::Y, glm::Y, glm::Y)</span> <a name="l00650"></a>00650 <span class="preprocessor"></span><span class="preprocessor">#define gggg swizzle(glm::Y, glm::Y, glm::Y, glm::Y)</span> <a name="l00651"></a>00651 <span class="preprocessor"></span><span class="preprocessor">#define bggg swizzle(glm::Z, glm::Y, glm::Y, glm::Y)</span> <a name="l00652"></a>00652 <span class="preprocessor"></span><span class="preprocessor">#define aggg swizzle(glm::W, glm::Y, glm::Y, glm::Y)</span> <a name="l00653"></a>00653 <span class="preprocessor"></span><span class="preprocessor">#define rbgg swizzle(glm::X, glm::Z, glm::Y, glm::Y)</span> <a name="l00654"></a>00654 <span class="preprocessor"></span><span class="preprocessor">#define gbgg swizzle(glm::Y, glm::Z, glm::Y, glm::Y)</span> <a name="l00655"></a>00655 <span class="preprocessor"></span><span class="preprocessor">#define bbgg swizzle(glm::Z, glm::Z, glm::Y, glm::Y)</span> <a name="l00656"></a>00656 <span class="preprocessor"></span><span class="preprocessor">#define abgg swizzle(glm::W, glm::Z, glm::Y, glm::Y)</span> <a name="l00657"></a>00657 <span class="preprocessor"></span><span class="preprocessor">#define ragg swizzle(glm::X, glm::W, glm::Y, glm::Y)</span> <a name="l00658"></a>00658 <span class="preprocessor"></span><span class="preprocessor">#define gagg swizzle(glm::Y, glm::W, glm::Y, glm::Y)</span> <a name="l00659"></a>00659 <span class="preprocessor"></span><span class="preprocessor">#define bagg swizzle(glm::Z, glm::W, glm::Y, glm::Y)</span> <a name="l00660"></a>00660 <span class="preprocessor"></span><span class="preprocessor">#define aagg swizzle(glm::W, glm::W, glm::Y, glm::Y)</span> <a name="l00661"></a>00661 <span class="preprocessor"></span><span class="preprocessor">#define rrbg swizzle(glm::X, glm::X, glm::Z, glm::Y)</span> <a name="l00662"></a>00662 <span class="preprocessor"></span><span class="preprocessor">#define grbg swizzle(glm::Y, glm::X, glm::Z, glm::Y)</span> <a name="l00663"></a>00663 <span class="preprocessor"></span><span class="preprocessor">#define brbg swizzle(glm::Z, glm::X, glm::Z, glm::Y)</span> <a name="l00664"></a>00664 <span class="preprocessor"></span><span class="preprocessor">#define arbg swizzle(glm::W, glm::X, glm::Z, glm::Y)</span> <a name="l00665"></a>00665 <span class="preprocessor"></span><span class="preprocessor">#define rgbg swizzle(glm::X, glm::Y, glm::Z, glm::Y)</span> <a name="l00666"></a>00666 <span class="preprocessor"></span><span class="preprocessor">#define ggbg swizzle(glm::Y, glm::Y, glm::Z, glm::Y)</span> <a name="l00667"></a>00667 <span class="preprocessor"></span><span class="preprocessor">#define bgbg swizzle(glm::Z, glm::Y, glm::Z, glm::Y)</span> <a name="l00668"></a>00668 <span class="preprocessor"></span><span class="preprocessor">#define agbg swizzle(glm::W, glm::Y, glm::Z, glm::Y)</span> <a name="l00669"></a>00669 <span class="preprocessor"></span><span class="preprocessor">#define rbbg swizzle(glm::X, glm::Z, glm::Z, glm::Y)</span> <a name="l00670"></a>00670 <span class="preprocessor"></span><span class="preprocessor">#define gbbg swizzle(glm::Y, glm::Z, glm::Z, glm::Y)</span> <a name="l00671"></a>00671 <span class="preprocessor"></span><span class="preprocessor">#define bbbg swizzle(glm::Z, glm::Z, glm::Z, glm::Y)</span> <a name="l00672"></a>00672 <span class="preprocessor"></span><span class="preprocessor">#define abbg swizzle(glm::W, glm::Z, glm::Z, glm::Y)</span> <a name="l00673"></a>00673 <span class="preprocessor"></span><span class="preprocessor">#define rabg swizzle(glm::X, glm::W, glm::Z, glm::Y)</span> <a name="l00674"></a>00674 <span class="preprocessor"></span><span class="preprocessor">#define gabg swizzle(glm::Y, glm::W, glm::Z, glm::Y)</span> <a name="l00675"></a>00675 <span class="preprocessor"></span><span class="preprocessor">#define babg swizzle(glm::Z, glm::W, glm::Z, glm::Y)</span> <a name="l00676"></a>00676 <span class="preprocessor"></span><span class="preprocessor">#define aabg swizzle(glm::W, glm::W, glm::Z, glm::Y)</span> <a name="l00677"></a>00677 <span class="preprocessor"></span><span class="preprocessor">#define rrag swizzle(glm::X, glm::X, glm::W, glm::Y)</span> <a name="l00678"></a>00678 <span class="preprocessor"></span><span class="preprocessor">#define grag swizzle(glm::Y, glm::X, glm::W, glm::Y)</span> <a name="l00679"></a>00679 <span class="preprocessor"></span><span class="preprocessor">#define brag swizzle(glm::Z, glm::X, glm::W, glm::Y)</span> <a name="l00680"></a>00680 <span class="preprocessor"></span><span class="preprocessor">#define arag swizzle(glm::W, glm::X, glm::W, glm::Y)</span> <a name="l00681"></a>00681 <span class="preprocessor"></span><span class="preprocessor">#define rgag swizzle(glm::X, glm::Y, glm::W, glm::Y)</span> <a name="l00682"></a>00682 <span class="preprocessor"></span><span class="preprocessor">#define ggag swizzle(glm::Y, glm::Y, glm::W, glm::Y)</span> <a name="l00683"></a>00683 <span class="preprocessor"></span><span class="preprocessor">#define bgag swizzle(glm::Z, glm::Y, glm::W, glm::Y)</span> <a name="l00684"></a>00684 <span class="preprocessor"></span><span class="preprocessor">#define agag swizzle(glm::W, glm::Y, glm::W, glm::Y)</span> <a name="l00685"></a>00685 <span class="preprocessor"></span><span class="preprocessor">#define rbag swizzle(glm::X, glm::Z, glm::W, glm::Y)</span> <a name="l00686"></a>00686 <span class="preprocessor"></span><span class="preprocessor">#define gbag swizzle(glm::Y, glm::Z, glm::W, glm::Y)</span> <a name="l00687"></a>00687 <span class="preprocessor"></span><span class="preprocessor">#define bbag swizzle(glm::Z, glm::Z, glm::W, glm::Y)</span> <a name="l00688"></a>00688 <span class="preprocessor"></span><span class="preprocessor">#define abag swizzle(glm::W, glm::Z, glm::W, glm::Y)</span> <a name="l00689"></a>00689 <span class="preprocessor"></span><span class="preprocessor">#define raag swizzle(glm::X, glm::W, glm::W, glm::Y)</span> <a name="l00690"></a>00690 <span class="preprocessor"></span><span class="preprocessor">#define gaag swizzle(glm::Y, glm::W, glm::W, glm::Y)</span> <a name="l00691"></a>00691 <span class="preprocessor"></span><span class="preprocessor">#define baag swizzle(glm::Z, glm::W, glm::W, glm::Y)</span> <a name="l00692"></a>00692 <span class="preprocessor"></span><span class="preprocessor">#define aaag swizzle(glm::W, glm::W, glm::W, glm::Y)</span> <a name="l00693"></a>00693 <span class="preprocessor"></span><span class="preprocessor">#define rrrb swizzle(glm::X, glm::X, glm::X, glm::Z)</span> <a name="l00694"></a>00694 <span class="preprocessor"></span><span class="preprocessor">#define grrb swizzle(glm::Y, glm::X, glm::X, glm::Z)</span> <a name="l00695"></a>00695 <span class="preprocessor"></span><span class="preprocessor">#define brrb swizzle(glm::Z, glm::X, glm::X, glm::Z)</span> <a name="l00696"></a>00696 <span class="preprocessor"></span><span class="preprocessor">#define arrb swizzle(glm::W, glm::X, glm::X, glm::Z)</span> <a name="l00697"></a>00697 <span class="preprocessor"></span><span class="preprocessor">#define rgrb swizzle(glm::X, glm::Y, glm::X, glm::Z)</span> <a name="l00698"></a>00698 <span class="preprocessor"></span><span class="preprocessor">#define ggrb swizzle(glm::Y, glm::Y, glm::X, glm::Z)</span> <a name="l00699"></a>00699 <span class="preprocessor"></span><span class="preprocessor">#define bgrb swizzle(glm::Z, glm::Y, glm::X, glm::Z)</span> <a name="l00700"></a>00700 <span class="preprocessor"></span><span class="preprocessor">#define agrb swizzle(glm::W, glm::Y, glm::X, glm::Z)</span> <a name="l00701"></a>00701 <span class="preprocessor"></span><span class="preprocessor">#define rbrb swizzle(glm::X, glm::Z, glm::X, glm::Z)</span> <a name="l00702"></a>00702 <span class="preprocessor"></span><span class="preprocessor">#define gbrb swizzle(glm::Y, glm::Z, glm::X, glm::Z)</span> <a name="l00703"></a>00703 <span class="preprocessor"></span><span class="preprocessor">#define bbrb swizzle(glm::Z, glm::Z, glm::X, glm::Z)</span> <a name="l00704"></a>00704 <span class="preprocessor"></span><span class="preprocessor">#define abrb swizzle(glm::W, glm::Z, glm::X, glm::Z)</span> <a name="l00705"></a>00705 <span class="preprocessor"></span><span class="preprocessor">#define rarb swizzle(glm::X, glm::W, glm::X, glm::Z)</span> <a name="l00706"></a>00706 <span class="preprocessor"></span><span class="preprocessor">#define garb swizzle(glm::Y, glm::W, glm::X, glm::Z)</span> <a name="l00707"></a>00707 <span class="preprocessor"></span><span class="preprocessor">#define barb swizzle(glm::Z, glm::W, glm::X, glm::Z)</span> <a name="l00708"></a>00708 <span class="preprocessor"></span><span class="preprocessor">#define aarb swizzle(glm::W, glm::W, glm::X, glm::Z)</span> <a name="l00709"></a>00709 <span class="preprocessor"></span><span class="preprocessor">#define rrgb swizzle(glm::X, glm::X, glm::Y, glm::Z)</span> <a name="l00710"></a>00710 <span class="preprocessor"></span><span class="preprocessor">#define grgb swizzle(glm::Y, glm::X, glm::Y, glm::Z)</span> <a name="l00711"></a>00711 <span class="preprocessor"></span><span class="preprocessor">#define brgb swizzle(glm::Z, glm::X, glm::Y, glm::Z)</span> <a name="l00712"></a>00712 <span class="preprocessor"></span><span class="preprocessor">#define argb swizzle(glm::W, glm::X, glm::Y, glm::Z)</span> <a name="l00713"></a>00713 <span class="preprocessor"></span><span class="preprocessor">#define rggb swizzle(glm::X, glm::Y, glm::Y, glm::Z)</span> <a name="l00714"></a>00714 <span class="preprocessor"></span><span class="preprocessor">#define gggb swizzle(glm::Y, glm::Y, glm::Y, glm::Z)</span> <a name="l00715"></a>00715 <span class="preprocessor"></span><span class="preprocessor">#define bggb swizzle(glm::Z, glm::Y, glm::Y, glm::Z)</span> <a name="l00716"></a>00716 <span class="preprocessor"></span><span class="preprocessor">#define aggb swizzle(glm::W, glm::Y, glm::Y, glm::Z)</span> <a name="l00717"></a>00717 <span class="preprocessor"></span><span class="preprocessor">#define rbgb swizzle(glm::X, glm::Z, glm::Y, glm::Z)</span> <a name="l00718"></a>00718 <span class="preprocessor"></span><span class="preprocessor">#define gbgb swizzle(glm::Y, glm::Z, glm::Y, glm::Z)</span> <a name="l00719"></a>00719 <span class="preprocessor"></span><span class="preprocessor">#define bbgb swizzle(glm::Z, glm::Z, glm::Y, glm::Z)</span> <a name="l00720"></a>00720 <span class="preprocessor"></span><span class="preprocessor">#define abgb swizzle(glm::W, glm::Z, glm::Y, glm::Z)</span> <a name="l00721"></a>00721 <span class="preprocessor"></span><span class="preprocessor">#define ragb swizzle(glm::X, glm::W, glm::Y, glm::Z)</span> <a name="l00722"></a>00722 <span class="preprocessor"></span><span class="preprocessor">#define gagb swizzle(glm::Y, glm::W, glm::Y, glm::Z)</span> <a name="l00723"></a>00723 <span class="preprocessor"></span><span class="preprocessor">#define bagb swizzle(glm::Z, glm::W, glm::Y, glm::Z)</span> <a name="l00724"></a>00724 <span class="preprocessor"></span><span class="preprocessor">#define aagb swizzle(glm::W, glm::W, glm::Y, glm::Z)</span> <a name="l00725"></a>00725 <span class="preprocessor"></span><span class="preprocessor">#define rrbb swizzle(glm::X, glm::X, glm::Z, glm::Z)</span> <a name="l00726"></a>00726 <span class="preprocessor"></span><span class="preprocessor">#define grbb swizzle(glm::Y, glm::X, glm::Z, glm::Z)</span> <a name="l00727"></a>00727 <span class="preprocessor"></span><span class="preprocessor">#define brbb swizzle(glm::Z, glm::X, glm::Z, glm::Z)</span> <a name="l00728"></a>00728 <span class="preprocessor"></span><span class="preprocessor">#define arbb swizzle(glm::W, glm::X, glm::Z, glm::Z)</span> <a name="l00729"></a>00729 <span class="preprocessor"></span><span class="preprocessor">#define rgbb swizzle(glm::X, glm::Y, glm::Z, glm::Z)</span> <a name="l00730"></a>00730 <span class="preprocessor"></span><span class="preprocessor">#define ggbb swizzle(glm::Y, glm::Y, glm::Z, glm::Z)</span> <a name="l00731"></a>00731 <span class="preprocessor"></span><span class="preprocessor">#define bgbb swizzle(glm::Z, glm::Y, glm::Z, glm::Z)</span> <a name="l00732"></a>00732 <span class="preprocessor"></span><span class="preprocessor">#define agbb swizzle(glm::W, glm::Y, glm::Z, glm::Z)</span> <a name="l00733"></a>00733 <span class="preprocessor"></span><span class="preprocessor">#define rbbb swizzle(glm::X, glm::Z, glm::Z, glm::Z)</span> <a name="l00734"></a>00734 <span class="preprocessor"></span><span class="preprocessor">#define gbbb swizzle(glm::Y, glm::Z, glm::Z, glm::Z)</span> <a name="l00735"></a>00735 <span class="preprocessor"></span><span class="preprocessor">#define bbbb swizzle(glm::Z, glm::Z, glm::Z, glm::Z)</span> <a name="l00736"></a>00736 <span class="preprocessor"></span><span class="preprocessor">#define abbb swizzle(glm::W, glm::Z, glm::Z, glm::Z)</span> <a name="l00737"></a>00737 <span class="preprocessor"></span><span class="preprocessor">#define rabb swizzle(glm::X, glm::W, glm::Z, glm::Z)</span> <a name="l00738"></a>00738 <span class="preprocessor"></span><span class="preprocessor">#define gabb swizzle(glm::Y, glm::W, glm::Z, glm::Z)</span> <a name="l00739"></a>00739 <span class="preprocessor"></span><span class="preprocessor">#define babb swizzle(glm::Z, glm::W, glm::Z, glm::Z)</span> <a name="l00740"></a>00740 <span class="preprocessor"></span><span class="preprocessor">#define aabb swizzle(glm::W, glm::W, glm::Z, glm::Z)</span> <a name="l00741"></a>00741 <span class="preprocessor"></span><span class="preprocessor">#define rrab swizzle(glm::X, glm::X, glm::W, glm::Z)</span> <a name="l00742"></a>00742 <span class="preprocessor"></span><span class="preprocessor">#define grab swizzle(glm::Y, glm::X, glm::W, glm::Z)</span> <a name="l00743"></a>00743 <span class="preprocessor"></span><span class="preprocessor">#define brab swizzle(glm::Z, glm::X, glm::W, glm::Z)</span> <a name="l00744"></a>00744 <span class="preprocessor"></span><span class="preprocessor">#define arab swizzle(glm::W, glm::X, glm::W, glm::Z)</span> <a name="l00745"></a>00745 <span class="preprocessor"></span><span class="preprocessor">#define rgab swizzle(glm::X, glm::Y, glm::W, glm::Z)</span> <a name="l00746"></a>00746 <span class="preprocessor"></span><span class="preprocessor">#define ggab swizzle(glm::Y, glm::Y, glm::W, glm::Z)</span> <a name="l00747"></a>00747 <span class="preprocessor"></span><span class="preprocessor">#define bgab swizzle(glm::Z, glm::Y, glm::W, glm::Z)</span> <a name="l00748"></a>00748 <span class="preprocessor"></span><span class="preprocessor">#define agab swizzle(glm::W, glm::Y, glm::W, glm::Z)</span> <a name="l00749"></a>00749 <span class="preprocessor"></span><span class="preprocessor">#define rbab swizzle(glm::X, glm::Z, glm::W, glm::Z)</span> <a name="l00750"></a>00750 <span class="preprocessor"></span><span class="preprocessor">#define gbab swizzle(glm::Y, glm::Z, glm::W, glm::Z)</span> <a name="l00751"></a>00751 <span class="preprocessor"></span><span class="preprocessor">#define bbab swizzle(glm::Z, glm::Z, glm::W, glm::Z)</span> <a name="l00752"></a>00752 <span class="preprocessor"></span><span class="preprocessor">#define abab swizzle(glm::W, glm::Z, glm::W, glm::Z)</span> <a name="l00753"></a>00753 <span class="preprocessor"></span><span class="preprocessor">#define raab swizzle(glm::X, glm::W, glm::W, glm::Z)</span> <a name="l00754"></a>00754 <span class="preprocessor"></span><span class="preprocessor">#define gaab swizzle(glm::Y, glm::W, glm::W, glm::Z)</span> <a name="l00755"></a>00755 <span class="preprocessor"></span><span class="preprocessor">#define baab swizzle(glm::Z, glm::W, glm::W, glm::Z)</span> <a name="l00756"></a>00756 <span class="preprocessor"></span><span class="preprocessor">#define aaab swizzle(glm::W, glm::W, glm::W, glm::Z)</span> <a name="l00757"></a>00757 <span class="preprocessor"></span><span class="preprocessor">#define rrra swizzle(glm::X, glm::X, glm::X, glm::W)</span> <a name="l00758"></a>00758 <span class="preprocessor"></span><span class="preprocessor">#define grra swizzle(glm::Y, glm::X, glm::X, glm::W)</span> <a name="l00759"></a>00759 <span class="preprocessor"></span><span class="preprocessor">#define brra swizzle(glm::Z, glm::X, glm::X, glm::W)</span> <a name="l00760"></a>00760 <span class="preprocessor"></span><span class="preprocessor">#define arra swizzle(glm::W, glm::X, glm::X, glm::W)</span> <a name="l00761"></a>00761 <span class="preprocessor"></span><span class="preprocessor">#define rgra swizzle(glm::X, glm::Y, glm::X, glm::W)</span> <a name="l00762"></a>00762 <span class="preprocessor"></span><span class="preprocessor">#define ggra swizzle(glm::Y, glm::Y, glm::X, glm::W)</span> <a name="l00763"></a>00763 <span class="preprocessor"></span><span class="preprocessor">#define bgra swizzle(glm::Z, glm::Y, glm::X, glm::W)</span> <a name="l00764"></a>00764 <span class="preprocessor"></span><span class="preprocessor">#define agra swizzle(glm::W, glm::Y, glm::X, glm::W)</span> <a name="l00765"></a>00765 <span class="preprocessor"></span><span class="preprocessor">#define rbra swizzle(glm::X, glm::Z, glm::X, glm::W)</span> <a name="l00766"></a>00766 <span class="preprocessor"></span><span class="preprocessor">#define gbra swizzle(glm::Y, glm::Z, glm::X, glm::W)</span> <a name="l00767"></a>00767 <span class="preprocessor"></span><span class="preprocessor">#define bbra swizzle(glm::Z, glm::Z, glm::X, glm::W)</span> <a name="l00768"></a>00768 <span class="preprocessor"></span><span class="preprocessor">#define abra swizzle(glm::W, glm::Z, glm::X, glm::W)</span> <a name="l00769"></a>00769 <span class="preprocessor"></span><span class="preprocessor">#define rara swizzle(glm::X, glm::W, glm::X, glm::W)</span> <a name="l00770"></a>00770 <span class="preprocessor"></span><span class="preprocessor">#define gara swizzle(glm::Y, glm::W, glm::X, glm::W)</span> <a name="l00771"></a>00771 <span class="preprocessor"></span><span class="preprocessor">#define bara swizzle(glm::Z, glm::W, glm::X, glm::W)</span> <a name="l00772"></a>00772 <span class="preprocessor"></span><span class="preprocessor">#define aara swizzle(glm::W, glm::W, glm::X, glm::W)</span> <a name="l00773"></a>00773 <span class="preprocessor"></span><span class="preprocessor">#define rrga swizzle(glm::X, glm::X, glm::Y, glm::W)</span> <a name="l00774"></a>00774 <span class="preprocessor"></span><span class="preprocessor">#define grga swizzle(glm::Y, glm::X, glm::Y, glm::W)</span> <a name="l00775"></a>00775 <span class="preprocessor"></span><span class="preprocessor">#define brga swizzle(glm::Z, glm::X, glm::Y, glm::W)</span> <a name="l00776"></a>00776 <span class="preprocessor"></span><span class="preprocessor">#define arga swizzle(glm::W, glm::X, glm::Y, glm::W)</span> <a name="l00777"></a>00777 <span class="preprocessor"></span><span class="preprocessor">#define rgga swizzle(glm::X, glm::Y, glm::Y, glm::W)</span> <a name="l00778"></a>00778 <span class="preprocessor"></span><span class="preprocessor">#define ggga swizzle(glm::Y, glm::Y, glm::Y, glm::W)</span> <a name="l00779"></a>00779 <span class="preprocessor"></span><span class="preprocessor">#define bgga swizzle(glm::Z, glm::Y, glm::Y, glm::W)</span> <a name="l00780"></a>00780 <span class="preprocessor"></span><span class="preprocessor">#define agga swizzle(glm::W, glm::Y, glm::Y, glm::W)</span> <a name="l00781"></a>00781 <span class="preprocessor"></span><span class="preprocessor">#define rbga swizzle(glm::X, glm::Z, glm::Y, glm::W)</span> <a name="l00782"></a>00782 <span class="preprocessor"></span><span class="preprocessor">#define gbga swizzle(glm::Y, glm::Z, glm::Y, glm::W)</span> <a name="l00783"></a>00783 <span class="preprocessor"></span><span class="preprocessor">#define bbga swizzle(glm::Z, glm::Z, glm::Y, glm::W)</span> <a name="l00784"></a>00784 <span class="preprocessor"></span><span class="preprocessor">#define abga swizzle(glm::W, glm::Z, glm::Y, glm::W)</span> <a name="l00785"></a>00785 <span class="preprocessor"></span><span class="preprocessor">#define raga swizzle(glm::X, glm::W, glm::Y, glm::W)</span> <a name="l00786"></a>00786 <span class="preprocessor"></span><span class="preprocessor">#define gaga swizzle(glm::Y, glm::W, glm::Y, glm::W)</span> <a name="l00787"></a>00787 <span class="preprocessor"></span><span class="preprocessor">#define baga swizzle(glm::Z, glm::W, glm::Y, glm::W)</span> <a name="l00788"></a>00788 <span class="preprocessor"></span><span class="preprocessor">#define aaga swizzle(glm::W, glm::W, glm::Y, glm::W)</span> <a name="l00789"></a>00789 <span class="preprocessor"></span><span class="preprocessor">#define rrba swizzle(glm::X, glm::X, glm::Z, glm::W)</span> <a name="l00790"></a>00790 <span class="preprocessor"></span><span class="preprocessor">#define grba swizzle(glm::Y, glm::X, glm::Z, glm::W)</span> <a name="l00791"></a>00791 <span class="preprocessor"></span><span class="preprocessor">#define brba swizzle(glm::Z, glm::X, glm::Z, glm::W)</span> <a name="l00792"></a>00792 <span class="preprocessor"></span><span class="preprocessor">#define arba swizzle(glm::W, glm::X, glm::Z, glm::W)</span> <a name="l00793"></a>00793 <span class="preprocessor"></span><span class="preprocessor">#define rgba swizzle(glm::X, glm::Y, glm::Z, glm::W)</span> <a name="l00794"></a>00794 <span class="preprocessor"></span><span class="preprocessor">#define ggba swizzle(glm::Y, glm::Y, glm::Z, glm::W)</span> <a name="l00795"></a>00795 <span class="preprocessor"></span><span class="preprocessor">#define bgba swizzle(glm::Z, glm::Y, glm::Z, glm::W)</span> <a name="l00796"></a>00796 <span class="preprocessor"></span><span class="preprocessor">#define agba swizzle(glm::W, glm::Y, glm::Z, glm::W)</span> <a name="l00797"></a>00797 <span class="preprocessor"></span><span class="preprocessor">#define rbba swizzle(glm::X, glm::Z, glm::Z, glm::W)</span> <a name="l00798"></a>00798 <span class="preprocessor"></span><span class="preprocessor">#define gbba swizzle(glm::Y, glm::Z, glm::Z, glm::W)</span> <a name="l00799"></a>00799 <span class="preprocessor"></span><span class="preprocessor">#define bbba swizzle(glm::Z, glm::Z, glm::Z, glm::W)</span> <a name="l00800"></a>00800 <span class="preprocessor"></span><span class="preprocessor">#define abba swizzle(glm::W, glm::Z, glm::Z, glm::W)</span> <a name="l00801"></a>00801 <span class="preprocessor"></span><span class="preprocessor">#define raba swizzle(glm::X, glm::W, glm::Z, glm::W)</span> <a name="l00802"></a>00802 <span class="preprocessor"></span><span class="preprocessor">#define gaba swizzle(glm::Y, glm::W, glm::Z, glm::W)</span> <a name="l00803"></a>00803 <span class="preprocessor"></span><span class="preprocessor">#define baba swizzle(glm::Z, glm::W, glm::Z, glm::W)</span> <a name="l00804"></a>00804 <span class="preprocessor"></span><span class="preprocessor">#define aaba swizzle(glm::W, glm::W, glm::Z, glm::W)</span> <a name="l00805"></a>00805 <span class="preprocessor"></span><span class="preprocessor">#define rraa swizzle(glm::X, glm::X, glm::W, glm::W)</span> <a name="l00806"></a>00806 <span class="preprocessor"></span><span class="preprocessor">#define graa swizzle(glm::Y, glm::X, glm::W, glm::W)</span> <a name="l00807"></a>00807 <span class="preprocessor"></span><span class="preprocessor">#define braa swizzle(glm::Z, glm::X, glm::W, glm::W)</span> <a name="l00808"></a>00808 <span class="preprocessor"></span><span class="preprocessor">#define araa swizzle(glm::W, glm::X, glm::W, glm::W)</span> <a name="l00809"></a>00809 <span class="preprocessor"></span><span class="preprocessor">#define rgaa swizzle(glm::X, glm::Y, glm::W, glm::W)</span> <a name="l00810"></a>00810 <span class="preprocessor"></span><span class="preprocessor">#define ggaa swizzle(glm::Y, glm::Y, glm::W, glm::W)</span> <a name="l00811"></a>00811 <span class="preprocessor"></span><span class="preprocessor">#define bgaa swizzle(glm::Z, glm::Y, glm::W, glm::W)</span> <a name="l00812"></a>00812 <span class="preprocessor"></span><span class="preprocessor">#define agaa swizzle(glm::W, glm::Y, glm::W, glm::W)</span> <a name="l00813"></a>00813 <span class="preprocessor"></span><span class="preprocessor">#define rbaa swizzle(glm::X, glm::Z, glm::W, glm::W)</span> <a name="l00814"></a>00814 <span class="preprocessor"></span><span class="preprocessor">#define gbaa swizzle(glm::Y, glm::Z, glm::W, glm::W)</span> <a name="l00815"></a>00815 <span class="preprocessor"></span><span class="preprocessor">#define bbaa swizzle(glm::Z, glm::Z, glm::W, glm::W)</span> <a name="l00816"></a>00816 <span class="preprocessor"></span><span class="preprocessor">#define abaa swizzle(glm::W, glm::Z, glm::W, glm::W)</span> <a name="l00817"></a>00817 <span class="preprocessor"></span><span class="preprocessor">#define raaa swizzle(glm::X, glm::W, glm::W, glm::W)</span> <a name="l00818"></a>00818 <span class="preprocessor"></span><span class="preprocessor">#define gaaa swizzle(glm::Y, glm::W, glm::W, glm::W)</span> <a name="l00819"></a>00819 <span class="preprocessor"></span><span class="preprocessor">#define baaa swizzle(glm::Z, glm::W, glm::W, glm::W)</span> <a name="l00820"></a>00820 <span class="preprocessor"></span><span class="preprocessor">#define aaaa swizzle(glm::W, glm::W, glm::W, glm::W)</span> <a name="l00821"></a>00821 <span class="preprocessor"></span> <a name="l00822"></a>00822 <span class="preprocessor">#endif</span> <a name="l00823"></a>00823 <span class="preprocessor"></span> <a name="l00824"></a>00824 <span class="preprocessor">#if(defined(GLM_FORCE_SWIZZLE_STPQ) || defined(GLM_SWIZZLE))</span> <a name="l00825"></a>00825 <span class="preprocessor"></span> <a name="l00826"></a>00826 <span class="preprocessor">#define ssss swizzle(glm::X, glm::X, glm::X, glm::X)</span> <a name="l00827"></a>00827 <span class="preprocessor"></span><span class="preprocessor">#define tsss swizzle(glm::Y, glm::X, glm::X, glm::X)</span> <a name="l00828"></a>00828 <span class="preprocessor"></span><span class="preprocessor">#define psss swizzle(glm::Z, glm::X, glm::X, glm::X)</span> <a name="l00829"></a>00829 <span class="preprocessor"></span><span class="preprocessor">#define qsss swizzle(glm::W, glm::X, glm::X, glm::X)</span> <a name="l00830"></a>00830 <span class="preprocessor"></span><span class="preprocessor">#define stss swizzle(glm::X, glm::Y, glm::X, glm::X)</span> <a name="l00831"></a>00831 <span class="preprocessor"></span><span class="preprocessor">#define ttss swizzle(glm::Y, glm::Y, glm::X, glm::X)</span> <a name="l00832"></a>00832 <span class="preprocessor"></span><span class="preprocessor">#define ptss swizzle(glm::Z, glm::Y, glm::X, glm::X)</span> <a name="l00833"></a>00833 <span class="preprocessor"></span><span class="preprocessor">#define qtss swizzle(glm::W, glm::Y, glm::X, glm::X)</span> <a name="l00834"></a>00834 <span class="preprocessor"></span><span class="preprocessor">#define spss swizzle(glm::X, glm::Z, glm::X, glm::X)</span> <a name="l00835"></a>00835 <span class="preprocessor"></span><span class="preprocessor">#define tpss swizzle(glm::Y, glm::Z, glm::X, glm::X)</span> <a name="l00836"></a>00836 <span class="preprocessor"></span><span class="preprocessor">#define ppss swizzle(glm::Z, glm::Z, glm::X, glm::X)</span> <a name="l00837"></a>00837 <span class="preprocessor"></span><span class="preprocessor">#define qpss swizzle(glm::W, glm::Z, glm::X, glm::X)</span> <a name="l00838"></a>00838 <span class="preprocessor"></span><span class="preprocessor">#define sqss swizzle(glm::X, glm::W, glm::X, glm::X)</span> <a name="l00839"></a>00839 <span class="preprocessor"></span><span class="preprocessor">#define tqss swizzle(glm::Y, glm::W, glm::X, glm::X)</span> <a name="l00840"></a>00840 <span class="preprocessor"></span><span class="preprocessor">#define pqss swizzle(glm::Z, glm::W, glm::X, glm::X)</span> <a name="l00841"></a>00841 <span class="preprocessor"></span><span class="preprocessor">#define qqss swizzle(glm::W, glm::W, glm::X, glm::X)</span> <a name="l00842"></a>00842 <span class="preprocessor"></span><span class="preprocessor">#define ssts swizzle(glm::X, glm::X, glm::Y, glm::X)</span> <a name="l00843"></a>00843 <span class="preprocessor"></span><span class="preprocessor">#define tsts swizzle(glm::Y, glm::X, glm::Y, glm::X)</span> <a name="l00844"></a>00844 <span class="preprocessor"></span><span class="preprocessor">#define psts swizzle(glm::Z, glm::X, glm::Y, glm::X)</span> <a name="l00845"></a>00845 <span class="preprocessor"></span><span class="preprocessor">#define qsts swizzle(glm::W, glm::X, glm::Y, glm::X)</span> <a name="l00846"></a>00846 <span class="preprocessor"></span><span class="preprocessor">#define stts swizzle(glm::X, glm::Y, glm::Y, glm::X)</span> <a name="l00847"></a>00847 <span class="preprocessor"></span><span class="preprocessor">#define ttts swizzle(glm::Y, glm::Y, glm::Y, glm::X)</span> <a name="l00848"></a>00848 <span class="preprocessor"></span><span class="preprocessor">#define ptts swizzle(glm::Z, glm::Y, glm::Y, glm::X)</span> <a name="l00849"></a>00849 <span class="preprocessor"></span><span class="preprocessor">#define qtts swizzle(glm::W, glm::Y, glm::Y, glm::X)</span> <a name="l00850"></a>00850 <span class="preprocessor"></span><span class="preprocessor">#define spts swizzle(glm::X, glm::Z, glm::Y, glm::X)</span> <a name="l00851"></a>00851 <span class="preprocessor"></span><span class="preprocessor">#define tpts swizzle(glm::Y, glm::Z, glm::Y, glm::X)</span> <a name="l00852"></a>00852 <span class="preprocessor"></span><span class="preprocessor">#define ppts swizzle(glm::Z, glm::Z, glm::Y, glm::X)</span> <a name="l00853"></a>00853 <span class="preprocessor"></span><span class="preprocessor">#define qpts swizzle(glm::W, glm::Z, glm::Y, glm::X)</span> <a name="l00854"></a>00854 <span class="preprocessor"></span><span class="preprocessor">#define sqts swizzle(glm::X, glm::W, glm::Y, glm::X)</span> <a name="l00855"></a>00855 <span class="preprocessor"></span><span class="preprocessor">#define tqts swizzle(glm::Y, glm::W, glm::Y, glm::X)</span> <a name="l00856"></a>00856 <span class="preprocessor"></span><span class="preprocessor">#define pqts swizzle(glm::Z, glm::W, glm::Y, glm::X)</span> <a name="l00857"></a>00857 <span class="preprocessor"></span><span class="preprocessor">#define qqts swizzle(glm::W, glm::W, glm::Y, glm::X)</span> <a name="l00858"></a>00858 <span class="preprocessor"></span><span class="preprocessor">#define ssps swizzle(glm::X, glm::X, glm::Z, glm::X)</span> <a name="l00859"></a>00859 <span class="preprocessor"></span><span class="preprocessor">#define tsps swizzle(glm::Y, glm::X, glm::Z, glm::X)</span> <a name="l00860"></a>00860 <span class="preprocessor"></span><span class="preprocessor">#define psps swizzle(glm::Z, glm::X, glm::Z, glm::X)</span> <a name="l00861"></a>00861 <span class="preprocessor"></span><span class="preprocessor">#define qsps swizzle(glm::W, glm::X, glm::Z, glm::X)</span> <a name="l00862"></a>00862 <span class="preprocessor"></span><span class="preprocessor">#define stps swizzle(glm::X, glm::Y, glm::Z, glm::X)</span> <a name="l00863"></a>00863 <span class="preprocessor"></span><span class="preprocessor">#define ttps swizzle(glm::Y, glm::Y, glm::Z, glm::X)</span> <a name="l00864"></a>00864 <span class="preprocessor"></span><span class="preprocessor">#define ptps swizzle(glm::Z, glm::Y, glm::Z, glm::X)</span> <a name="l00865"></a>00865 <span class="preprocessor"></span><span class="preprocessor">#define qtps swizzle(glm::W, glm::Y, glm::Z, glm::X)</span> <a name="l00866"></a>00866 <span class="preprocessor"></span><span class="preprocessor">#define spps swizzle(glm::X, glm::Z, glm::Z, glm::X)</span> <a name="l00867"></a>00867 <span class="preprocessor"></span><span class="preprocessor">#define tpps swizzle(glm::Y, glm::Z, glm::Z, glm::X)</span> <a name="l00868"></a>00868 <span class="preprocessor"></span><span class="preprocessor">#define ppps swizzle(glm::Z, glm::Z, glm::Z, glm::X)</span> <a name="l00869"></a>00869 <span class="preprocessor"></span><span class="preprocessor">#define qpps swizzle(glm::W, glm::Z, glm::Z, glm::X)</span> <a name="l00870"></a>00870 <span class="preprocessor"></span><span class="preprocessor">#define sqps swizzle(glm::X, glm::W, glm::Z, glm::X)</span> <a name="l00871"></a>00871 <span class="preprocessor"></span><span class="preprocessor">#define tqps swizzle(glm::Y, glm::W, glm::Z, glm::X)</span> <a name="l00872"></a>00872 <span class="preprocessor"></span><span class="preprocessor">#define pqps swizzle(glm::Z, glm::W, glm::Z, glm::X)</span> <a name="l00873"></a>00873 <span class="preprocessor"></span><span class="preprocessor">#define qqps swizzle(glm::W, glm::W, glm::Z, glm::X)</span> <a name="l00874"></a>00874 <span class="preprocessor"></span><span class="preprocessor">#define ssqs swizzle(glm::X, glm::X, glm::W, glm::X)</span> <a name="l00875"></a>00875 <span class="preprocessor"></span><span class="preprocessor">#define tsqs swizzle(glm::Y, glm::X, glm::W, glm::X)</span> <a name="l00876"></a>00876 <span class="preprocessor"></span><span class="preprocessor">#define psqs swizzle(glm::Z, glm::X, glm::W, glm::X)</span> <a name="l00877"></a>00877 <span class="preprocessor"></span><span class="preprocessor">#define qsqs swizzle(glm::W, glm::X, glm::W, glm::X)</span> <a name="l00878"></a>00878 <span class="preprocessor"></span><span class="preprocessor">#define stqs swizzle(glm::X, glm::Y, glm::W, glm::X)</span> <a name="l00879"></a>00879 <span class="preprocessor"></span><span class="preprocessor">#define ttqs swizzle(glm::Y, glm::Y, glm::W, glm::X)</span> <a name="l00880"></a>00880 <span class="preprocessor"></span><span class="preprocessor">#define ptqs swizzle(glm::Z, glm::Y, glm::W, glm::X)</span> <a name="l00881"></a>00881 <span class="preprocessor"></span><span class="preprocessor">#define qtqs swizzle(glm::W, glm::Y, glm::W, glm::X)</span> <a name="l00882"></a>00882 <span class="preprocessor"></span><span class="preprocessor">#define spqs swizzle(glm::X, glm::Z, glm::W, glm::X)</span> <a name="l00883"></a>00883 <span class="preprocessor"></span><span class="preprocessor">#define tpqs swizzle(glm::Y, glm::Z, glm::W, glm::X)</span> <a name="l00884"></a>00884 <span class="preprocessor"></span><span class="preprocessor">#define ppqs swizzle(glm::Z, glm::Z, glm::W, glm::X)</span> <a name="l00885"></a>00885 <span class="preprocessor"></span><span class="preprocessor">#define qpqs swizzle(glm::W, glm::Z, glm::W, glm::X)</span> <a name="l00886"></a>00886 <span class="preprocessor"></span><span class="preprocessor">#define sqqs swizzle(glm::X, glm::W, glm::W, glm::X)</span> <a name="l00887"></a>00887 <span class="preprocessor"></span><span class="preprocessor">#define tqqs swizzle(glm::Y, glm::W, glm::W, glm::X)</span> <a name="l00888"></a>00888 <span class="preprocessor"></span><span class="preprocessor">#define pqqs swizzle(glm::Z, glm::W, glm::W, glm::X)</span> <a name="l00889"></a>00889 <span class="preprocessor"></span><span class="preprocessor">#define qqqs swizzle(glm::W, glm::W, glm::W, glm::X)</span> <a name="l00890"></a>00890 <span class="preprocessor"></span><span class="preprocessor">#define ssst swizzle(glm::X, glm::X, glm::X, glm::Y)</span> <a name="l00891"></a>00891 <span class="preprocessor"></span><span class="preprocessor">#define tsst swizzle(glm::Y, glm::X, glm::X, glm::Y)</span> <a name="l00892"></a>00892 <span class="preprocessor"></span><span class="preprocessor">#define psst swizzle(glm::Z, glm::X, glm::X, glm::Y)</span> <a name="l00893"></a>00893 <span class="preprocessor"></span><span class="preprocessor">#define qsst swizzle(glm::W, glm::X, glm::X, glm::Y)</span> <a name="l00894"></a>00894 <span class="preprocessor"></span><span class="preprocessor">#define stst swizzle(glm::X, glm::Y, glm::X, glm::Y)</span> <a name="l00895"></a>00895 <span class="preprocessor"></span><span class="preprocessor">#define ttst swizzle(glm::Y, glm::Y, glm::X, glm::Y)</span> <a name="l00896"></a>00896 <span class="preprocessor"></span><span class="preprocessor">#define ptst swizzle(glm::Z, glm::Y, glm::X, glm::Y)</span> <a name="l00897"></a>00897 <span class="preprocessor"></span><span class="preprocessor">#define qtst swizzle(glm::W, glm::Y, glm::X, glm::Y)</span> <a name="l00898"></a>00898 <span class="preprocessor"></span><span class="preprocessor">#define spst swizzle(glm::X, glm::Z, glm::X, glm::Y)</span> <a name="l00899"></a>00899 <span class="preprocessor"></span><span class="preprocessor">#define tpst swizzle(glm::Y, glm::Z, glm::X, glm::Y)</span> <a name="l00900"></a>00900 <span class="preprocessor"></span><span class="preprocessor">#define ppst swizzle(glm::Z, glm::Z, glm::X, glm::Y)</span> <a name="l00901"></a>00901 <span class="preprocessor"></span><span class="preprocessor">#define qpst swizzle(glm::W, glm::Z, glm::X, glm::Y)</span> <a name="l00902"></a>00902 <span class="preprocessor"></span><span class="preprocessor">#define sqst swizzle(glm::X, glm::W, glm::X, glm::Y)</span> <a name="l00903"></a>00903 <span class="preprocessor"></span><span class="preprocessor">#define tqst swizzle(glm::Y, glm::W, glm::X, glm::Y)</span> <a name="l00904"></a>00904 <span class="preprocessor"></span><span class="preprocessor">#define pqst swizzle(glm::Z, glm::W, glm::X, glm::Y)</span> <a name="l00905"></a>00905 <span class="preprocessor"></span><span class="preprocessor">#define qqst swizzle(glm::W, glm::W, glm::X, glm::Y)</span> <a name="l00906"></a>00906 <span class="preprocessor"></span><span class="preprocessor">#define sstt swizzle(glm::X, glm::X, glm::Y, glm::Y)</span> <a name="l00907"></a>00907 <span class="preprocessor"></span><span class="preprocessor">#define tstt swizzle(glm::Y, glm::X, glm::Y, glm::Y)</span> <a name="l00908"></a>00908 <span class="preprocessor"></span><span class="preprocessor">#define pstt swizzle(glm::Z, glm::X, glm::Y, glm::Y)</span> <a name="l00909"></a>00909 <span class="preprocessor"></span><span class="preprocessor">#define qstt swizzle(glm::W, glm::X, glm::Y, glm::Y)</span> <a name="l00910"></a>00910 <span class="preprocessor"></span><span class="preprocessor">#define sttt swizzle(glm::X, glm::Y, glm::Y, glm::Y)</span> <a name="l00911"></a>00911 <span class="preprocessor"></span><span class="preprocessor">#define tttt swizzle(glm::Y, glm::Y, glm::Y, glm::Y)</span> <a name="l00912"></a>00912 <span class="preprocessor"></span><span class="preprocessor">#define pttt swizzle(glm::Z, glm::Y, glm::Y, glm::Y)</span> <a name="l00913"></a>00913 <span class="preprocessor"></span><span class="preprocessor">#define qttt swizzle(glm::W, glm::Y, glm::Y, glm::Y)</span> <a name="l00914"></a>00914 <span class="preprocessor"></span><span class="preprocessor">#define sptt swizzle(glm::X, glm::Z, glm::Y, glm::Y)</span> <a name="l00915"></a>00915 <span class="preprocessor"></span><span class="preprocessor">#define tptt swizzle(glm::Y, glm::Z, glm::Y, glm::Y)</span> <a name="l00916"></a>00916 <span class="preprocessor"></span><span class="preprocessor">#define pptt swizzle(glm::Z, glm::Z, glm::Y, glm::Y)</span> <a name="l00917"></a>00917 <span class="preprocessor"></span><span class="preprocessor">#define qptt swizzle(glm::W, glm::Z, glm::Y, glm::Y)</span> <a name="l00918"></a>00918 <span class="preprocessor"></span><span class="preprocessor">#define sqtt swizzle(glm::X, glm::W, glm::Y, glm::Y)</span> <a name="l00919"></a>00919 <span class="preprocessor"></span><span class="preprocessor">#define tqtt swizzle(glm::Y, glm::W, glm::Y, glm::Y)</span> <a name="l00920"></a>00920 <span class="preprocessor"></span><span class="preprocessor">#define pqtt swizzle(glm::Z, glm::W, glm::Y, glm::Y)</span> <a name="l00921"></a>00921 <span class="preprocessor"></span><span class="preprocessor">#define qqtt swizzle(glm::W, glm::W, glm::Y, glm::Y)</span> <a name="l00922"></a>00922 <span class="preprocessor"></span><span class="preprocessor">#define sspt swizzle(glm::X, glm::X, glm::Z, glm::Y)</span> <a name="l00923"></a>00923 <span class="preprocessor"></span><span class="preprocessor">#define tspt swizzle(glm::Y, glm::X, glm::Z, glm::Y)</span> <a name="l00924"></a>00924 <span class="preprocessor"></span><span class="preprocessor">#define pspt swizzle(glm::Z, glm::X, glm::Z, glm::Y)</span> <a name="l00925"></a>00925 <span class="preprocessor"></span><span class="preprocessor">#define qspt swizzle(glm::W, glm::X, glm::Z, glm::Y)</span> <a name="l00926"></a>00926 <span class="preprocessor"></span><span class="preprocessor">#define stpt swizzle(glm::X, glm::Y, glm::Z, glm::Y)</span> <a name="l00927"></a>00927 <span class="preprocessor"></span><span class="preprocessor">#define ttpt swizzle(glm::Y, glm::Y, glm::Z, glm::Y)</span> <a name="l00928"></a>00928 <span class="preprocessor"></span><span class="preprocessor">#define ptpt swizzle(glm::Z, glm::Y, glm::Z, glm::Y)</span> <a name="l00929"></a>00929 <span class="preprocessor"></span><span class="preprocessor">#define qtpt swizzle(glm::W, glm::Y, glm::Z, glm::Y)</span> <a name="l00930"></a>00930 <span class="preprocessor"></span><span class="preprocessor">#define sppt swizzle(glm::X, glm::Z, glm::Z, glm::Y)</span> <a name="l00931"></a>00931 <span class="preprocessor"></span><span class="preprocessor">#define tppt swizzle(glm::Y, glm::Z, glm::Z, glm::Y)</span> <a name="l00932"></a>00932 <span class="preprocessor"></span><span class="preprocessor">#define pppt swizzle(glm::Z, glm::Z, glm::Z, glm::Y)</span> <a name="l00933"></a>00933 <span class="preprocessor"></span><span class="preprocessor">#define qppt swizzle(glm::W, glm::Z, glm::Z, glm::Y)</span> <a name="l00934"></a>00934 <span class="preprocessor"></span><span class="preprocessor">#define sqpt swizzle(glm::X, glm::W, glm::Z, glm::Y)</span> <a name="l00935"></a>00935 <span class="preprocessor"></span><span class="preprocessor">#define tqpt swizzle(glm::Y, glm::W, glm::Z, glm::Y)</span> <a name="l00936"></a>00936 <span class="preprocessor"></span><span class="preprocessor">#define pqpt swizzle(glm::Z, glm::W, glm::Z, glm::Y)</span> <a name="l00937"></a>00937 <span class="preprocessor"></span><span class="preprocessor">#define qqpt swizzle(glm::W, glm::W, glm::Z, glm::Y)</span> <a name="l00938"></a>00938 <span class="preprocessor"></span><span class="preprocessor">#define ssqt swizzle(glm::X, glm::X, glm::W, glm::Y)</span> <a name="l00939"></a>00939 <span class="preprocessor"></span><span class="preprocessor">#define tsqt swizzle(glm::Y, glm::X, glm::W, glm::Y)</span> <a name="l00940"></a>00940 <span class="preprocessor"></span><span class="preprocessor">#define psqt swizzle(glm::Z, glm::X, glm::W, glm::Y)</span> <a name="l00941"></a>00941 <span class="preprocessor"></span><span class="preprocessor">#define qsqt swizzle(glm::W, glm::X, glm::W, glm::Y)</span> <a name="l00942"></a>00942 <span class="preprocessor"></span><span class="preprocessor">#define stqt swizzle(glm::X, glm::Y, glm::W, glm::Y)</span> <a name="l00943"></a>00943 <span class="preprocessor"></span><span class="preprocessor">#define ttqt swizzle(glm::Y, glm::Y, glm::W, glm::Y)</span> <a name="l00944"></a>00944 <span class="preprocessor"></span><span class="preprocessor">#define ptqt swizzle(glm::Z, glm::Y, glm::W, glm::Y)</span> <a name="l00945"></a>00945 <span class="preprocessor"></span><span class="preprocessor">#define qtqt swizzle(glm::W, glm::Y, glm::W, glm::Y)</span> <a name="l00946"></a>00946 <span class="preprocessor"></span><span class="preprocessor">#define spqt swizzle(glm::X, glm::Z, glm::W, glm::Y)</span> <a name="l00947"></a>00947 <span class="preprocessor"></span><span class="preprocessor">#define tpqt swizzle(glm::Y, glm::Z, glm::W, glm::Y)</span> <a name="l00948"></a>00948 <span class="preprocessor"></span><span class="preprocessor">#define ppqt swizzle(glm::Z, glm::Z, glm::W, glm::Y)</span> <a name="l00949"></a>00949 <span class="preprocessor"></span><span class="preprocessor">#define qpqt swizzle(glm::W, glm::Z, glm::W, glm::Y)</span> <a name="l00950"></a>00950 <span class="preprocessor"></span><span class="preprocessor">#define sqqt swizzle(glm::X, glm::W, glm::W, glm::Y)</span> <a name="l00951"></a>00951 <span class="preprocessor"></span><span class="preprocessor">#define tqqt swizzle(glm::Y, glm::W, glm::W, glm::Y)</span> <a name="l00952"></a>00952 <span class="preprocessor"></span><span class="preprocessor">#define pqqt swizzle(glm::Z, glm::W, glm::W, glm::Y)</span> <a name="l00953"></a>00953 <span class="preprocessor"></span><span class="preprocessor">#define qqqt swizzle(glm::W, glm::W, glm::W, glm::Y)</span> <a name="l00954"></a>00954 <span class="preprocessor"></span><span class="preprocessor">#define sssp swizzle(glm::X, glm::X, glm::X, glm::Z)</span> <a name="l00955"></a>00955 <span class="preprocessor"></span><span class="preprocessor">#define tssp swizzle(glm::Y, glm::X, glm::X, glm::Z)</span> <a name="l00956"></a>00956 <span class="preprocessor"></span><span class="preprocessor">#define pssp swizzle(glm::Z, glm::X, glm::X, glm::Z)</span> <a name="l00957"></a>00957 <span class="preprocessor"></span><span class="preprocessor">#define qssp swizzle(glm::W, glm::X, glm::X, glm::Z)</span> <a name="l00958"></a>00958 <span class="preprocessor"></span><span class="preprocessor">#define stsp swizzle(glm::X, glm::Y, glm::X, glm::Z)</span> <a name="l00959"></a>00959 <span class="preprocessor"></span><span class="preprocessor">#define ttsp swizzle(glm::Y, glm::Y, glm::X, glm::Z)</span> <a name="l00960"></a>00960 <span class="preprocessor"></span><span class="preprocessor">#define ptsp swizzle(glm::Z, glm::Y, glm::X, glm::Z)</span> <a name="l00961"></a>00961 <span class="preprocessor"></span><span class="preprocessor">#define qtsp swizzle(glm::W, glm::Y, glm::X, glm::Z)</span> <a name="l00962"></a>00962 <span class="preprocessor"></span><span class="preprocessor">#define spsp swizzle(glm::X, glm::Z, glm::X, glm::Z)</span> <a name="l00963"></a>00963 <span class="preprocessor"></span><span class="preprocessor">#define tpsp swizzle(glm::Y, glm::Z, glm::X, glm::Z)</span> <a name="l00964"></a>00964 <span class="preprocessor"></span><span class="preprocessor">#define ppsp swizzle(glm::Z, glm::Z, glm::X, glm::Z)</span> <a name="l00965"></a>00965 <span class="preprocessor"></span><span class="preprocessor">#define qpsp swizzle(glm::W, glm::Z, glm::X, glm::Z)</span> <a name="l00966"></a>00966 <span class="preprocessor"></span><span class="preprocessor">#define sqsp swizzle(glm::X, glm::W, glm::X, glm::Z)</span> <a name="l00967"></a>00967 <span class="preprocessor"></span><span class="preprocessor">#define tqsp swizzle(glm::Y, glm::W, glm::X, glm::Z)</span> <a name="l00968"></a>00968 <span class="preprocessor"></span><span class="preprocessor">#define pqsp swizzle(glm::Z, glm::W, glm::X, glm::Z)</span> <a name="l00969"></a>00969 <span class="preprocessor"></span><span class="preprocessor">#define qqsp swizzle(glm::W, glm::W, glm::X, glm::Z)</span> <a name="l00970"></a>00970 <span class="preprocessor"></span><span class="preprocessor">#define sstp swizzle(glm::X, glm::X, glm::Y, glm::Z)</span> <a name="l00971"></a>00971 <span class="preprocessor"></span><span class="preprocessor">#define tstp swizzle(glm::Y, glm::X, glm::Y, glm::Z)</span> <a name="l00972"></a>00972 <span class="preprocessor"></span><span class="preprocessor">#define pstp swizzle(glm::Z, glm::X, glm::Y, glm::Z)</span> <a name="l00973"></a>00973 <span class="preprocessor"></span><span class="preprocessor">#define qstp swizzle(glm::W, glm::X, glm::Y, glm::Z)</span> <a name="l00974"></a>00974 <span class="preprocessor"></span><span class="preprocessor">#define sttp swizzle(glm::X, glm::Y, glm::Y, glm::Z)</span> <a name="l00975"></a>00975 <span class="preprocessor"></span><span class="preprocessor">#define tttp swizzle(glm::Y, glm::Y, glm::Y, glm::Z)</span> <a name="l00976"></a>00976 <span class="preprocessor"></span><span class="preprocessor">#define pttp swizzle(glm::Z, glm::Y, glm::Y, glm::Z)</span> <a name="l00977"></a>00977 <span class="preprocessor"></span><span class="preprocessor">#define qttp swizzle(glm::W, glm::Y, glm::Y, glm::Z)</span> <a name="l00978"></a>00978 <span class="preprocessor"></span><span class="preprocessor">#define sptp swizzle(glm::X, glm::Z, glm::Y, glm::Z)</span> <a name="l00979"></a>00979 <span class="preprocessor"></span><span class="preprocessor">#define tptp swizzle(glm::Y, glm::Z, glm::Y, glm::Z)</span> <a name="l00980"></a>00980 <span class="preprocessor"></span><span class="preprocessor">#define pptp swizzle(glm::Z, glm::Z, glm::Y, glm::Z)</span> <a name="l00981"></a>00981 <span class="preprocessor"></span><span class="preprocessor">#define qptp swizzle(glm::W, glm::Z, glm::Y, glm::Z)</span> <a name="l00982"></a>00982 <span class="preprocessor"></span><span class="preprocessor">#define sqtp swizzle(glm::X, glm::W, glm::Y, glm::Z)</span> <a name="l00983"></a>00983 <span class="preprocessor"></span><span class="preprocessor">#define tqtp swizzle(glm::Y, glm::W, glm::Y, glm::Z)</span> <a name="l00984"></a>00984 <span class="preprocessor"></span><span class="preprocessor">#define pqtp swizzle(glm::Z, glm::W, glm::Y, glm::Z)</span> <a name="l00985"></a>00985 <span class="preprocessor"></span><span class="preprocessor">#define qqtp swizzle(glm::W, glm::W, glm::Y, glm::Z)</span> <a name="l00986"></a>00986 <span class="preprocessor"></span><span class="preprocessor">#define sspp swizzle(glm::X, glm::X, glm::Z, glm::Z)</span> <a name="l00987"></a>00987 <span class="preprocessor"></span><span class="preprocessor">#define tspp swizzle(glm::Y, glm::X, glm::Z, glm::Z)</span> <a name="l00988"></a>00988 <span class="preprocessor"></span><span class="preprocessor">#define pspp swizzle(glm::Z, glm::X, glm::Z, glm::Z)</span> <a name="l00989"></a>00989 <span class="preprocessor"></span><span class="preprocessor">#define qspp swizzle(glm::W, glm::X, glm::Z, glm::Z)</span> <a name="l00990"></a>00990 <span class="preprocessor"></span><span class="preprocessor">#define stpp swizzle(glm::X, glm::Y, glm::Z, glm::Z)</span> <a name="l00991"></a>00991 <span class="preprocessor"></span><span class="preprocessor">#define ttpp swizzle(glm::Y, glm::Y, glm::Z, glm::Z)</span> <a name="l00992"></a>00992 <span class="preprocessor"></span><span class="preprocessor">#define ptpp swizzle(glm::Z, glm::Y, glm::Z, glm::Z)</span> <a name="l00993"></a>00993 <span class="preprocessor"></span><span class="preprocessor">#define qtpp swizzle(glm::W, glm::Y, glm::Z, glm::Z)</span> <a name="l00994"></a>00994 <span class="preprocessor"></span><span class="preprocessor">#define sppp swizzle(glm::X, glm::Z, glm::Z, glm::Z)</span> <a name="l00995"></a>00995 <span class="preprocessor"></span><span class="preprocessor">#define tppp swizzle(glm::Y, glm::Z, glm::Z, glm::Z)</span> <a name="l00996"></a>00996 <span class="preprocessor"></span><span class="preprocessor">#define pppp swizzle(glm::Z, glm::Z, glm::Z, glm::Z)</span> <a name="l00997"></a>00997 <span class="preprocessor"></span><span class="preprocessor">#define qppp swizzle(glm::W, glm::Z, glm::Z, glm::Z)</span> <a name="l00998"></a>00998 <span class="preprocessor"></span><span class="preprocessor">#define sqpp swizzle(glm::X, glm::W, glm::Z, glm::Z)</span> <a name="l00999"></a>00999 <span class="preprocessor"></span><span class="preprocessor">#define tqpp swizzle(glm::Y, glm::W, glm::Z, glm::Z)</span> <a name="l01000"></a>01000 <span class="preprocessor"></span><span class="preprocessor">#define pqpp swizzle(glm::Z, glm::W, glm::Z, glm::Z)</span> <a name="l01001"></a>01001 <span class="preprocessor"></span><span class="preprocessor">#define qqpp swizzle(glm::W, glm::W, glm::Z, glm::Z)</span> <a name="l01002"></a>01002 <span class="preprocessor"></span><span class="preprocessor">#define ssqp swizzle(glm::X, glm::X, glm::W, glm::Z)</span> <a name="l01003"></a>01003 <span class="preprocessor"></span><span class="preprocessor">#define tsqp swizzle(glm::Y, glm::X, glm::W, glm::Z)</span> <a name="l01004"></a>01004 <span class="preprocessor"></span><span class="preprocessor">#define psqp swizzle(glm::Z, glm::X, glm::W, glm::Z)</span> <a name="l01005"></a>01005 <span class="preprocessor"></span><span class="preprocessor">#define qsqp swizzle(glm::W, glm::X, glm::W, glm::Z)</span> <a name="l01006"></a>01006 <span class="preprocessor"></span><span class="preprocessor">#define stqp swizzle(glm::X, glm::Y, glm::W, glm::Z)</span> <a name="l01007"></a>01007 <span class="preprocessor"></span><span class="preprocessor">#define ttqp swizzle(glm::Y, glm::Y, glm::W, glm::Z)</span> <a name="l01008"></a>01008 <span class="preprocessor"></span><span class="preprocessor">#define ptqp swizzle(glm::Z, glm::Y, glm::W, glm::Z)</span> <a name="l01009"></a>01009 <span class="preprocessor"></span><span class="preprocessor">#define qtqp swizzle(glm::W, glm::Y, glm::W, glm::Z)</span> <a name="l01010"></a>01010 <span class="preprocessor"></span><span class="preprocessor">#define spqp swizzle(glm::X, glm::Z, glm::W, glm::Z)</span> <a name="l01011"></a>01011 <span class="preprocessor"></span><span class="preprocessor">#define tpqp swizzle(glm::Y, glm::Z, glm::W, glm::Z)</span> <a name="l01012"></a>01012 <span class="preprocessor"></span><span class="preprocessor">#define ppqp swizzle(glm::Z, glm::Z, glm::W, glm::Z)</span> <a name="l01013"></a>01013 <span class="preprocessor"></span><span class="preprocessor">#define qpqp swizzle(glm::W, glm::Z, glm::W, glm::Z)</span> <a name="l01014"></a>01014 <span class="preprocessor"></span><span class="preprocessor">#define sqqp swizzle(glm::X, glm::W, glm::W, glm::Z)</span> <a name="l01015"></a>01015 <span class="preprocessor"></span><span class="preprocessor">#define tqqp swizzle(glm::Y, glm::W, glm::W, glm::Z)</span> <a name="l01016"></a>01016 <span class="preprocessor"></span><span class="preprocessor">#define pqqp swizzle(glm::Z, glm::W, glm::W, glm::Z)</span> <a name="l01017"></a>01017 <span class="preprocessor"></span><span class="preprocessor">#define qqqp swizzle(glm::W, glm::W, glm::W, glm::Z)</span> <a name="l01018"></a>01018 <span class="preprocessor"></span><span class="preprocessor">#define sssq swizzle(glm::X, glm::X, glm::X, glm::W)</span> <a name="l01019"></a>01019 <span class="preprocessor"></span><span class="preprocessor">#define tssq swizzle(glm::Y, glm::X, glm::X, glm::W)</span> <a name="l01020"></a>01020 <span class="preprocessor"></span><span class="preprocessor">#define pssq swizzle(glm::Z, glm::X, glm::X, glm::W)</span> <a name="l01021"></a>01021 <span class="preprocessor"></span><span class="preprocessor">#define qssq swizzle(glm::W, glm::X, glm::X, glm::W)</span> <a name="l01022"></a>01022 <span class="preprocessor"></span><span class="preprocessor">#define stsq swizzle(glm::X, glm::Y, glm::X, glm::W)</span> <a name="l01023"></a>01023 <span class="preprocessor"></span><span class="preprocessor">#define ttsq swizzle(glm::Y, glm::Y, glm::X, glm::W)</span> <a name="l01024"></a>01024 <span class="preprocessor"></span><span class="preprocessor">#define ptsq swizzle(glm::Z, glm::Y, glm::X, glm::W)</span> <a name="l01025"></a>01025 <span class="preprocessor"></span><span class="preprocessor">#define qtsq swizzle(glm::W, glm::Y, glm::X, glm::W)</span> <a name="l01026"></a>01026 <span class="preprocessor"></span><span class="preprocessor">#define spsq swizzle(glm::X, glm::Z, glm::X, glm::W)</span> <a name="l01027"></a>01027 <span class="preprocessor"></span><span class="preprocessor">#define tpsq swizzle(glm::Y, glm::Z, glm::X, glm::W)</span> <a name="l01028"></a>01028 <span class="preprocessor"></span><span class="preprocessor">#define ppsq swizzle(glm::Z, glm::Z, glm::X, glm::W)</span> <a name="l01029"></a>01029 <span class="preprocessor"></span><span class="preprocessor">#define qpsq swizzle(glm::W, glm::Z, glm::X, glm::W)</span> <a name="l01030"></a>01030 <span class="preprocessor"></span><span class="preprocessor">#define sqsq swizzle(glm::X, glm::W, glm::X, glm::W)</span> <a name="l01031"></a>01031 <span class="preprocessor"></span><span class="preprocessor">#define tqsq swizzle(glm::Y, glm::W, glm::X, glm::W)</span> <a name="l01032"></a>01032 <span class="preprocessor"></span><span class="preprocessor">#define pqsq swizzle(glm::Z, glm::W, glm::X, glm::W)</span> <a name="l01033"></a>01033 <span class="preprocessor"></span><span class="preprocessor">#define qqsq swizzle(glm::W, glm::W, glm::X, glm::W)</span> <a name="l01034"></a>01034 <span class="preprocessor"></span><span class="preprocessor">#define sstq swizzle(glm::X, glm::X, glm::Y, glm::W)</span> <a name="l01035"></a>01035 <span class="preprocessor"></span><span class="preprocessor">#define tstq swizzle(glm::Y, glm::X, glm::Y, glm::W)</span> <a name="l01036"></a>01036 <span class="preprocessor"></span><span class="preprocessor">#define pstq swizzle(glm::Z, glm::X, glm::Y, glm::W)</span> <a name="l01037"></a>01037 <span class="preprocessor"></span><span class="preprocessor">#define qstq swizzle(glm::W, glm::X, glm::Y, glm::W)</span> <a name="l01038"></a>01038 <span class="preprocessor"></span><span class="preprocessor">#define sttq swizzle(glm::X, glm::Y, glm::Y, glm::W)</span> <a name="l01039"></a>01039 <span class="preprocessor"></span><span class="preprocessor">#define tttq swizzle(glm::Y, glm::Y, glm::Y, glm::W)</span> <a name="l01040"></a>01040 <span class="preprocessor"></span><span class="preprocessor">#define pttq swizzle(glm::Z, glm::Y, glm::Y, glm::W)</span> <a name="l01041"></a>01041 <span class="preprocessor"></span><span class="preprocessor">#define qttq swizzle(glm::W, glm::Y, glm::Y, glm::W)</span> <a name="l01042"></a>01042 <span class="preprocessor"></span><span class="preprocessor">#define sptq swizzle(glm::X, glm::Z, glm::Y, glm::W)</span> <a name="l01043"></a>01043 <span class="preprocessor"></span><span class="preprocessor">#define tptq swizzle(glm::Y, glm::Z, glm::Y, glm::W)</span> <a name="l01044"></a>01044 <span class="preprocessor"></span><span class="preprocessor">#define pptq swizzle(glm::Z, glm::Z, glm::Y, glm::W)</span> <a name="l01045"></a>01045 <span class="preprocessor"></span><span class="preprocessor">#define qptq swizzle(glm::W, glm::Z, glm::Y, glm::W)</span> <a name="l01046"></a>01046 <span class="preprocessor"></span><span class="preprocessor">#define sqtq swizzle(glm::X, glm::W, glm::Y, glm::W)</span> <a name="l01047"></a>01047 <span class="preprocessor"></span><span class="preprocessor">#define tqtq swizzle(glm::Y, glm::W, glm::Y, glm::W)</span> <a name="l01048"></a>01048 <span class="preprocessor"></span><span class="preprocessor">#define pqtq swizzle(glm::Z, glm::W, glm::Y, glm::W)</span> <a name="l01049"></a>01049 <span class="preprocessor"></span><span class="preprocessor">#define qqtq swizzle(glm::W, glm::W, glm::Y, glm::W)</span> <a name="l01050"></a>01050 <span class="preprocessor"></span><span class="preprocessor">#define sspq swizzle(glm::X, glm::X, glm::Z, glm::W)</span> <a name="l01051"></a>01051 <span class="preprocessor"></span><span class="preprocessor">#define tspq swizzle(glm::Y, glm::X, glm::Z, glm::W)</span> <a name="l01052"></a>01052 <span class="preprocessor"></span><span class="preprocessor">#define pspq swizzle(glm::Z, glm::X, glm::Z, glm::W)</span> <a name="l01053"></a>01053 <span class="preprocessor"></span><span class="preprocessor">#define qspq swizzle(glm::W, glm::X, glm::Z, glm::W)</span> <a name="l01054"></a>01054 <span class="preprocessor"></span><span class="preprocessor">#define stpq swizzle(glm::X, glm::Y, glm::Z, glm::W)</span> <a name="l01055"></a>01055 <span class="preprocessor"></span><span class="preprocessor">#define ttpq swizzle(glm::Y, glm::Y, glm::Z, glm::W)</span> <a name="l01056"></a>01056 <span class="preprocessor"></span><span class="preprocessor">#define ptpq swizzle(glm::Z, glm::Y, glm::Z, glm::W)</span> <a name="l01057"></a>01057 <span class="preprocessor"></span><span class="preprocessor">#define qtpq swizzle(glm::W, glm::Y, glm::Z, glm::W)</span> <a name="l01058"></a>01058 <span class="preprocessor"></span><span class="preprocessor">#define sppq swizzle(glm::X, glm::Z, glm::Z, glm::W)</span> <a name="l01059"></a>01059 <span class="preprocessor"></span><span class="preprocessor">#define tppq swizzle(glm::Y, glm::Z, glm::Z, glm::W)</span> <a name="l01060"></a>01060 <span class="preprocessor"></span><span class="preprocessor">#define pppq swizzle(glm::Z, glm::Z, glm::Z, glm::W)</span> <a name="l01061"></a>01061 <span class="preprocessor"></span><span class="preprocessor">#define qppq swizzle(glm::W, glm::Z, glm::Z, glm::W)</span> <a name="l01062"></a>01062 <span class="preprocessor"></span><span class="preprocessor">#define sqpq swizzle(glm::X, glm::W, glm::Z, glm::W)</span> <a name="l01063"></a>01063 <span class="preprocessor"></span><span class="preprocessor">#define tqpq swizzle(glm::Y, glm::W, glm::Z, glm::W)</span> <a name="l01064"></a>01064 <span class="preprocessor"></span><span class="preprocessor">#define pqpq swizzle(glm::Z, glm::W, glm::Z, glm::W)</span> <a name="l01065"></a>01065 <span class="preprocessor"></span><span class="preprocessor">#define qqpq swizzle(glm::W, glm::W, glm::Z, glm::W)</span> <a name="l01066"></a>01066 <span class="preprocessor"></span><span class="preprocessor">#define ssqq swizzle(glm::X, glm::X, glm::W, glm::W)</span> <a name="l01067"></a>01067 <span class="preprocessor"></span><span class="preprocessor">#define tsqq swizzle(glm::Y, glm::X, glm::W, glm::W)</span> <a name="l01068"></a>01068 <span class="preprocessor"></span><span class="preprocessor">#define psqq swizzle(glm::Z, glm::X, glm::W, glm::W)</span> <a name="l01069"></a>01069 <span class="preprocessor"></span><span class="preprocessor">#define qsqq swizzle(glm::W, glm::X, glm::W, glm::W)</span> <a name="l01070"></a>01070 <span class="preprocessor"></span><span class="preprocessor">#define stqq swizzle(glm::X, glm::Y, glm::W, glm::W)</span> <a name="l01071"></a>01071 <span class="preprocessor"></span><span class="preprocessor">#define ttqq swizzle(glm::Y, glm::Y, glm::W, glm::W)</span> <a name="l01072"></a>01072 <span class="preprocessor"></span><span class="preprocessor">#define ptqq swizzle(glm::Z, glm::Y, glm::W, glm::W)</span> <a name="l01073"></a>01073 <span class="preprocessor"></span><span class="preprocessor">#define qtqq swizzle(glm::W, glm::Y, glm::W, glm::W)</span> <a name="l01074"></a>01074 <span class="preprocessor"></span><span class="preprocessor">#define spqq swizzle(glm::X, glm::Z, glm::W, glm::W)</span> <a name="l01075"></a>01075 <span class="preprocessor"></span><span class="preprocessor">#define tpqq swizzle(glm::Y, glm::Z, glm::W, glm::W)</span> <a name="l01076"></a>01076 <span class="preprocessor"></span><span class="preprocessor">#define ppqq swizzle(glm::Z, glm::Z, glm::W, glm::W)</span> <a name="l01077"></a>01077 <span class="preprocessor"></span><span class="preprocessor">#define qpqq swizzle(glm::W, glm::Z, glm::W, glm::W)</span> <a name="l01078"></a>01078 <span class="preprocessor"></span><span class="preprocessor">#define sqqq swizzle(glm::X, glm::W, glm::W, glm::W)</span> <a name="l01079"></a>01079 <span class="preprocessor"></span><span class="preprocessor">#define tqqq swizzle(glm::Y, glm::W, glm::W, glm::W)</span> <a name="l01080"></a>01080 <span class="preprocessor"></span><span class="preprocessor">#define pqqq swizzle(glm::Z, glm::W, glm::W, glm::W)</span> <a name="l01081"></a>01081 <span class="preprocessor"></span><span class="preprocessor">#define qqqq swizzle(glm::W, glm::W, glm::W, glm::W)</span> <a name="l01082"></a>01082 <span class="preprocessor"></span> <a name="l01083"></a>01083 <span class="preprocessor">#endif</span> <a name="l01084"></a>01084 <span class="preprocessor"></span> <a name="l01085"></a>01085 <span class="preprocessor">#endif//glm_core_swizzle</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated by&#160; <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>
sholloway/Jitterbug
ext/vendor/glm-0.9.2.3/doc/html/a00025_source.html
HTML
mit
153,176
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Sylius\Tests\Api\Shop; use Sylius\Tests\Api\JsonApiTestCase; use Sylius\Tests\Api\Utils\OrderPlacerTrait; use Sylius\Tests\Api\Utils\ShopUserLoginTrait; use Symfony\Component\HttpFoundation\Response; final class PaymentsTest extends JsonApiTestCase { use ShopUserLoginTrait; use OrderPlacerTrait; /** @test */ public function it_gets_payment_from_placed_order(): void { $this->loadFixturesFromFiles(['authentication/customer.yaml', 'channel.yaml', 'cart.yaml', 'country.yaml', 'shipping_method.yaml', 'payment_method.yaml']); $loginData = $this->logInShopUser('oliver@doe.com'); $authorizationHeader = self::$container->getParameter('sylius.api.authorization_header'); $header['HTTP_' . $authorizationHeader] = 'Bearer ' . $loginData; $header = array_merge($header, self::CONTENT_TYPE_HEADER); $tokenValue = 'nAWw2jewpA'; $this->placeOrder($tokenValue, 'oliver@doe.com'); $this->client->request('GET', '/api/v2/shop/orders/nAWw2jewpA', [], [], $header); $orderResponse = json_decode($this->client->getResponse()->getContent(), true); $this->client->request('GET', '/api/v2/shop/payments/' . $orderResponse['payments'][0]['id'], [], [], $header); $response = $this->client->getResponse(); $this->assertResponse($response, 'shop/get_payment_response', Response::HTTP_OK); } }
loic425/Sylius
tests/Api/Shop/PaymentsTest.php
PHP
mit
1,659
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable disable using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Editor; using Microsoft.CodeAnalysis.Editor.Shared.Extensions; using Microsoft.CodeAnalysis.Shared.Extensions; using Microsoft.CodeAnalysis.Text; using Microsoft.CodeAnalysis.Text.Shared.Extensions; using Microsoft.VisualStudio.ComponentModelHost; using Microsoft.VisualStudio.Language.Intellisense; using Microsoft.VisualStudio.LanguageServices.Implementation.Extensions; using Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.Text.Differencing; using Roslyn.Utilities; namespace Microsoft.VisualStudio.LanguageServices.Implementation.Preview { internal class FileChange : AbstractChange { private readonly TextDocument _left; private readonly TextDocument _right; private readonly IComponentModel _componentModel; public readonly DocumentId Id; private readonly ITextBuffer _buffer; private readonly Encoding _encoding; private readonly IVsImageService2 _imageService; public FileChange(TextDocument left, TextDocument right, IComponentModel componentModel, AbstractChange parent, PreviewEngine engine, IVsImageService2 imageService) : base(engine) { Contract.ThrowIfFalse(left != null || right != null); this.Id = left != null ? left.Id : right.Id; _left = left; _right = right; _imageService = imageService; _componentModel = componentModel; var bufferFactory = componentModel.GetService<ITextBufferFactoryService>(); var bufferText = left != null ? left.GetTextSynchronously(CancellationToken.None) : right.GetTextSynchronously(CancellationToken.None); _buffer = bufferFactory.CreateTextBuffer(bufferText.ToString(), bufferFactory.InertContentType); _encoding = bufferText.Encoding; this.Children = ComputeChildren(left, right, CancellationToken.None); this.parent = parent; } private ChangeList ComputeChildren(TextDocument left, TextDocument right, CancellationToken cancellationToken) { if (left == null) { // Added document. return GetEntireDocumentAsSpanChange(right); } else if (right == null) { // Removed document. return GetEntireDocumentAsSpanChange(left); } var oldText = left.GetTextSynchronously(cancellationToken); var newText = right.GetTextSynchronously(cancellationToken); var diffSelector = _componentModel.GetService<ITextDifferencingSelectorService>(); var diffService = diffSelector.GetTextDifferencingService( left.Project.LanguageServices.GetService<IContentTypeLanguageService>().GetDefaultContentType()); diffService ??= diffSelector.DefaultTextDifferencingService; var diff = ComputeDiffSpans(diffService, left, right, cancellationToken); if (diff.Differences.Count == 0) { // There are no changes. return ChangeList.Empty; } return GetChangeList(diff, right.Id, oldText, newText); } private ChangeList GetChangeList(IHierarchicalDifferenceCollection diff, DocumentId id, SourceText oldText, SourceText newText) { var spanChanges = new List<SpanChange>(); foreach (var difference in diff) { var leftSpan = diff.LeftDecomposition.GetSpanInOriginal(difference.Left); var rightSpan = diff.RightDecomposition.GetSpanInOriginal(difference.Right); var leftText = oldText.GetSubText(leftSpan.ToTextSpan()).ToString(); var rightText = newText.GetSubText(rightSpan.ToTextSpan()).ToString(); var trackingSpan = _buffer.CurrentSnapshot.CreateTrackingSpan(leftSpan, SpanTrackingMode.EdgeInclusive); var isDeletion = difference.DifferenceType == DifferenceType.Remove; var displayText = isDeletion ? GetDisplayText(leftText) : GetDisplayText(rightText); var spanChange = new SpanChange(trackingSpan, _buffer, id, displayText, leftText, rightText, isDeletion, this, engine); spanChanges.Add(spanChange); } return new ChangeList(spanChanges.ToArray()); } private ChangeList GetEntireDocumentAsSpanChange(TextDocument document) { // Show the whole document. var entireSpan = _buffer.CurrentSnapshot.CreateTrackingSpan(0, _buffer.CurrentSnapshot.Length, SpanTrackingMode.EdgeInclusive); var text = document.GetTextAsync().Result.ToString(); var displayText = GetDisplayText(text); var entireSpanChild = new SpanChange(entireSpan, _buffer, document.Id, displayText, text, text, isDeletion: false, parent: this, engine: engine); return new ChangeList(new[] { entireSpanChild }); } private static string GetDisplayText(string excerpt) { if (excerpt.Contains("\r\n")) { var split = excerpt.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (split.Length > 1) { return string.Format("{0} ... {1}", split[0].Trim(), split[split.Length - 1].Trim()); } } return excerpt.Trim(); } public override int GetText(out VSTREETEXTOPTIONS tto, out string pbstrText) { if (_left == null) { pbstrText = ServicesVSResources.bracket_plus_bracket + _right.Name; } else if (_right == null) { pbstrText = ServicesVSResources.bracket_bracket + _left.Name; } else { pbstrText = _right.Name; } tto = VSTREETEXTOPTIONS.TTO_DEFAULT; return VSConstants.S_OK; } public override int GetTipText(out VSTREETOOLTIPTYPE eTipType, out string pbstrText) { eTipType = VSTREETOOLTIPTYPE.TIPTYPE_DEFAULT; pbstrText = null; return VSConstants.E_FAIL; } public override int OnRequestSource(object pIUnknownTextView) { if (pIUnknownTextView != null && Children.Changes != null && Children.Changes.Length > 0) { engine.SetTextView(pIUnknownTextView); UpdatePreview(); } return VSConstants.S_OK; } public override void UpdatePreview() => engine.UpdatePreview(this.Id, (SpanChange)Children.Changes[0]); private SourceText UpdateBufferText() { foreach (SpanChange child in Children.Changes) { using var edit = _buffer.CreateEdit(); edit.Replace(child.GetSpan(), child.GetApplicableText()); edit.ApplyAndLogExceptions(); } return SourceText.From(_buffer.CurrentSnapshot.GetText(), _encoding); } public TextDocument GetOldDocument() => _left; public TextDocument GetUpdatedDocument() { if (_left == null || _right == null) { // Added or removed document. return _right; } return _right.WithText(UpdateBufferText()); } // Note that either _left or _right *must* be non-null (we are either adding, removing or changing a file). public TextDocumentKind ChangedDocumentKind => (_left ?? _right).Kind; internal override void GetDisplayData(VSTREEDISPLAYDATA[] pData) { var document = _right ?? _left; // If these are documents from a VS workspace, then attempt to get the right display // data from the underlying VSHierarchy and itemids for the document. var workspace = document.Project.Solution.Workspace; if (workspace is VisualStudioWorkspaceImpl vsWorkspace) { if (vsWorkspace.TryGetImageListAndIndex(_imageService, document.Id, out pData[0].hImageList, out pData[0].Image)) { pData[0].SelectedImage = pData[0].Image; return; } } pData[0].Image = pData[0].SelectedImage = document.Project.Language == LanguageNames.CSharp ? (ushort)StandardGlyphGroup.GlyphCSharpFile : (ushort)StandardGlyphGroup.GlyphGroupClass; } private static IHierarchicalDifferenceCollection ComputeDiffSpans(ITextDifferencingService diffService, TextDocument left, TextDocument right, CancellationToken cancellationToken) { // TODO: it would be nice to have a syntax based differ for presentation here, // current way of just using text differ has its own issue, and using syntax differ in compiler that are for incremental parser // has its own drawbacks. var oldText = left.GetTextSynchronously(cancellationToken); var newText = right.GetTextSynchronously(cancellationToken); var oldString = oldText.ToString(); var newString = newText.ToString(); return diffService.DiffStrings(oldString, newString, new StringDifferenceOptions() { DifferenceType = StringDifferenceTypes.Line, }); } } }
bartdesmet/roslyn
src/VisualStudio/Core/Def/Preview/FileChange.cs
C#
mit
10,260
# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Encoding.default_external = Encoding::UTF_8 Encoding.default_internal = Encoding::UTF_8 City72::Application.initialize!
openoakland/oak72
config/environment.rb
Ruby
mit
238
#region License // Copyright (c) 2007 James Newton-King // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation // files (the "Software"), to deal in the Software without // restriction, including without limitation the rights to use, // copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following // conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. #endregion #if HAVE_REFLECTION_EMIT using System; using System.Collections.Generic; #if !HAVE_LINQ using Newtonsoft.Json.Utilities.LinqBridge; #endif using System.Text; using System.Reflection; using Newtonsoft.Json.Utilities; using System.Globalization; namespace Newtonsoft.Json.Serialization { /// <summary> /// Get and set values for a <see cref="MemberInfo"/> using dynamic methods. /// </summary> public class DynamicValueProvider : IValueProvider { private readonly MemberInfo _memberInfo; private Func<object, object?>? _getter; private Action<object, object?>? _setter; /// <summary> /// Initializes a new instance of the <see cref="DynamicValueProvider"/> class. /// </summary> /// <param name="memberInfo">The member info.</param> public DynamicValueProvider(MemberInfo memberInfo) { ValidationUtils.ArgumentNotNull(memberInfo, nameof(memberInfo)); _memberInfo = memberInfo; } /// <summary> /// Sets the value. /// </summary> /// <param name="target">The target to set the value on.</param> /// <param name="value">The value to set on the target.</param> public void SetValue(object target, object? value) { try { if (_setter == null) { _setter = DynamicReflectionDelegateFactory.Instance.CreateSet<object>(_memberInfo); } #if DEBUG // dynamic method doesn't check whether the type is 'legal' to set // add this check for unit tests if (value == null) { if (!ReflectionUtils.IsNullable(ReflectionUtils.GetMemberUnderlyingType(_memberInfo))) { throw new JsonSerializationException("Incompatible value. Cannot set {0} to null.".FormatWith(CultureInfo.InvariantCulture, _memberInfo)); } } else if (!ReflectionUtils.GetMemberUnderlyingType(_memberInfo).IsAssignableFrom(value.GetType())) { throw new JsonSerializationException("Incompatible value. Cannot set {0} to type {1}.".FormatWith(CultureInfo.InvariantCulture, _memberInfo, value.GetType())); } #endif _setter(target, value); } catch (Exception ex) { throw new JsonSerializationException("Error setting value to '{0}' on '{1}'.".FormatWith(CultureInfo.InvariantCulture, _memberInfo.Name, target.GetType()), ex); } } /// <summary> /// Gets the value. /// </summary> /// <param name="target">The target to get the value from.</param> /// <returns>The value.</returns> public object? GetValue(object target) { try { if (_getter == null) { _getter = DynamicReflectionDelegateFactory.Instance.CreateGet<object>(_memberInfo); } return _getter(target); } catch (Exception ex) { throw new JsonSerializationException("Error getting value from '{0}' on '{1}'.".FormatWith(CultureInfo.InvariantCulture, _memberInfo.Name, target.GetType()), ex); } } } } #endif
PKRoma/Newtonsoft.Json
Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs
C#
mit
4,596
/******************************************************************************* * Copyright (c) 2000, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.ui.actions; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.PlatformUI; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.ui.search.ElementQuerySpecification; import org.eclipse.jdt.ui.search.QuerySpecification; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor; import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory; import org.eclipse.jdt.internal.ui.search.SearchMessages; import org.eclipse.jdt.internal.ui.search.SearchUtil; /** * Finds references of the selected element in working sets. * The action is applicable to selections representing a Java element. * * <p> * This class may be instantiated; it is not intended to be subclassed. * </p> * * @since 2.0 * * @noextend This class is not intended to be subclassed by clients. */ public class FindReferencesInWorkingSetAction extends FindReferencesAction { private IWorkingSet[] fWorkingSets; /** * Creates a new <code>FindReferencesInWorkingSetAction</code>. The action * requires that the selection provided by the site's selection provider is of type * <code>org.eclipse.jface.viewers.IStructuredSelection</code>. The user will * be prompted to select the working sets. * * @param site the site providing context information for this action */ public FindReferencesInWorkingSetAction(IWorkbenchSite site) { this(site, null); } /** * Creates a new <code>FindReferencesInWorkingSetAction</code>. The action * requires that the selection provided by the site's selection provider is of type * <code>org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param site the site providing context information for this action * @param workingSets the working sets to be used in the search */ public FindReferencesInWorkingSetAction(IWorkbenchSite site, IWorkingSet[] workingSets) { super(site); fWorkingSets= workingSets; } /** * Note: This constructor is for internal use only. Clients should not call this constructor. * @param editor the Java editor * * @noreference This constructor is not intended to be referenced by clients. */ public FindReferencesInWorkingSetAction(JavaEditor editor) { this(editor, null); } /** * Note: This constructor is for internal use only. Clients should not call this constructor. * @param editor the Java editor * @param workingSets the working sets to be used in the search * * @noreference This constructor is not intended to be referenced by clients. */ public FindReferencesInWorkingSetAction(JavaEditor editor, IWorkingSet[] workingSets) { super(editor); fWorkingSets= workingSets; } @Override void init() { setText(SearchMessages.Search_FindReferencesInWorkingSetAction_label); setToolTipText(SearchMessages.Search_FindReferencesInWorkingSetAction_tooltip); setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_REFERENCES_IN_WORKING_SET_ACTION); } @Override QuerySpecification createQuery(IJavaElement element) throws JavaModelException, InterruptedException { JavaSearchScopeFactory factory= JavaSearchScopeFactory.getInstance(); IWorkingSet[] workingSets= fWorkingSets; if (fWorkingSets == null) { workingSets= factory.queryWorkingSets(); if (workingSets == null) return super.createQuery(element); // in workspace } SearchUtil.updateLRUWorkingSets(workingSets); IJavaSearchScope scope= factory.createJavaSearchScope(workingSets, JavaSearchScopeFactory.NO_PROJ); String description= factory.getWorkingSetScopeDescription(workingSets, JavaSearchScopeFactory.NO_PROJ); return new ElementQuerySpecification(element, getLimitTo(), scope, description); } }
brunyuriy/quick-fix-scout
org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/ui/actions/FindReferencesInWorkingSetAction.java
Java
mit
4,536
<a href="http://github.com/angular/angular.js/tree/v1.2.0-rc.3/src/ng/directive/input.js#L300" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/directive/input.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">input [radio]</code> <div><span class="hint">directive in module <code ng:non-bindable="">ng</code> </span> </div> </h1> <div><h2 id="description">Description</h2> <div class="description"><div class="ng-directive-page ng-directive-input-radio-page"><p>HTML radio button.</p> </div></div> <h2 id="usage">Usage</h2> <div class="usage"><pre class="prettyprint linenums">&lt;input type="radio" ng-model="{string}" value="{string}" [name="{string}"] [ng-change="{string}"]&gt;</pre> <h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>ngModel</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="ng-directive-page ng-directive-input-radio-page"><p>Assignable angular expression to data-bind to.</p> </div></td></tr><tr><td>value</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="ng-directive-page ng-directive-input-radio-page"><p>The value to which the expression should be set when selected.</p> </div></td></tr><tr><td>name <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="ng-directive-page ng-directive-input-radio-page"><p>Property name of the form under which the control is published.</p> </div></td></tr><tr><td>ngChange <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="ng-directive-page ng-directive-input-radio-page"><p>Angular expression to be executed when input changes due to user interaction with the input element.</p> </div></td></tr></tbody></table></div> <h2 id="example">Example</h2> <div class="example"><div class="ng-directive-page ng-directive-input-radio-page"><h4 id="example_source">Source</h4> <div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-39" source-edit-css="" source-edit-js="script.js-38" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-40"></div> <div class="tabbable"><div class="tab-pane" title="index.html"> <pre class="prettyprint linenums" ng-set-text="index.html-39" ng-html-wrap=" angular.js script.js"></pre> <script type="text/ng-template" id="index.html-39"> <form name="myForm" ng-controller="Ctrl"> <input type="radio" ng-model="color" value="red"> Red <br/> <input type="radio" ng-model="color" value="green"> Green <br/> <input type="radio" ng-model="color" value="blue"> Blue <br/> <tt>color = {{color}}</tt><br/> </form> </script> </div> <div class="tab-pane" title="script.js"> <pre class="prettyprint linenums" ng-set-text="script.js-38"></pre> <script type="text/ng-template" id="script.js-38"> function Ctrl($scope) { $scope.color = 'blue'; } </script> </div> <div class="tab-pane" title="End to end test"> <pre class="prettyprint linenums" ng-set-text="scenario.js-40"></pre> <script type="text/ng-template" id="scenario.js-40"> it('should change state', function() { expect(binding('color')).toEqual('blue'); input('color').select('red'); expect(binding('color')).toEqual('red'); }); </script> </div> </div><h4 id="example_demo">Demo</h4> <div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-39" ng-eval-javascript="script.js-38"></div> </div></div> </div>
lucian303/symfony2-angular-skeleton
web/assets/js/angular/docs/partials/api/ng.directive:input.radio.html
HTML
mit
3,828
def task_compute(): def comp(): return {'x':5,'y':10, 'z': 20} return {'actions': [(comp,)]} def show_getargs(values): print(values) def task_args_dict(): return {'actions': [show_getargs], 'getargs': {'values': ('compute', None)}, 'verbosity': 2, }
agustinhenze/doit.debian
doc/tutorial/getargs_dict.py
Python
mit
301
""" Demo platform for the cover component. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.cover import CoverDevice from homeassistant.helpers.event import track_utc_time_change def setup_platform(hass, config, add_devices, discovery_info=None): """Setup the Demo covers.""" add_devices([ DemoCover(hass, 'Kitchen Window'), DemoCover(hass, 'Hall Window', 10), DemoCover(hass, 'Living Room Window', 70, 50), ]) class DemoCover(CoverDevice): """Representation of a demo cover.""" # pylint: disable=no-self-use, too-many-instance-attributes def __init__(self, hass, name, position=None, tilt_position=None): """Initialize the cover.""" self.hass = hass self._name = name self._position = position self._set_position = None self._set_tilt_position = None self._tilt_position = tilt_position self._closing = True self._closing_tilt = True self._unsub_listener_cover = None self._unsub_listener_cover_tilt = None @property def name(self): """Return the name of the cover.""" return self._name @property def should_poll(self): """No polling needed for a demo cover.""" return False @property def current_cover_position(self): """Return the current position of the cover.""" return self._position @property def current_cover_tilt_position(self): """Return the current tilt position of the cover.""" return self._tilt_position @property def is_closed(self): """Return if the cover is closed.""" if self._position is not None: if self.current_cover_position > 0: return False else: return True else: return None def close_cover(self, **kwargs): """Close the cover.""" if self._position in (0, None): return self._listen_cover() self._closing = True def close_cover_tilt(self, **kwargs): """Close the cover tilt.""" if self._tilt_position in (0, None): return self._listen_cover_tilt() self._closing_tilt = True def open_cover(self, **kwargs): """Open the cover.""" if self._position in (100, None): return self._listen_cover() self._closing = False def open_cover_tilt(self, **kwargs): """Open the cover tilt.""" if self._tilt_position in (100, None): return self._listen_cover_tilt() self._closing_tilt = False def set_cover_position(self, position, **kwargs): """Move the cover to a specific position.""" self._set_position = round(position, -1) if self._position == position: return self._listen_cover() self._closing = position < self._position def set_cover_tilt_position(self, tilt_position, **kwargs): """Move the cover til to a specific position.""" self._set_tilt_position = round(tilt_position, -1) if self._tilt_position == tilt_position: return self._listen_cover_tilt() self._closing_tilt = tilt_position < self._tilt_position def stop_cover(self, **kwargs): """Stop the cover.""" if self._position is None: return if self._unsub_listener_cover is not None: self._unsub_listener_cover() self._unsub_listener_cover = None self._set_position = None def stop_cover_tilt(self, **kwargs): """Stop the cover tilt.""" if self._tilt_position is None: return if self._unsub_listener_cover_tilt is not None: self._unsub_listener_cover_tilt() self._unsub_listener_cover_tilt = None self._set_tilt_position = None def _listen_cover(self): """Listen for changes in cover.""" if self._unsub_listener_cover is None: self._unsub_listener_cover = track_utc_time_change( self.hass, self._time_changed_cover) def _time_changed_cover(self, now): """Track time changes.""" if self._closing: self._position -= 10 else: self._position += 10 if self._position in (100, 0, self._set_position): self.stop_cover() self.update_ha_state() def _listen_cover_tilt(self): """Listen for changes in cover tilt.""" if self._unsub_listener_cover_tilt is None: self._unsub_listener_cover_tilt = track_utc_time_change( self.hass, self._time_changed_cover_tilt) def _time_changed_cover_tilt(self, now): """Track time changes.""" if self._closing_tilt: self._tilt_position -= 10 else: self._tilt_position += 10 if self._tilt_position in (100, 0, self._set_tilt_position): self.stop_cover_tilt() self.update_ha_state()
Smart-Torvy/torvy-home-assistant
homeassistant/components/cover/demo.py
Python
mit
5,159
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Flipsnap Sample</title> <link rel="stylesheet" href="style.css"> <script src="../flipsnap.js"></script> <script src="../test/lib/jquery.js"></script> <script src="demo.js"></script> </head> <body> <h1>Flipsnap Example</h1> <section> <h2>Demo</h2> <section class="demo" id="demo-simple"> <h3>simple</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> </div> </div> </section> <section class="demo" id="demo-threshold"> <h3>threshold</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> </div> </div> </section> <section class="demo" id="demo-img"> <h3>img</h3> <div class="viewport"> <div class="flipsnap"> <div class="item"><img src="img/sample.png" alt="img"></div> <div class="item"><img src="img/sample.png" alt="img"></div> <div class="item"><img src="img/sample.png" alt="img"></div> </div> </div> </section> <section class="demo" id="demo-distance"> <h3>distance</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> <div class="item">4</div> <div class="item">5</div> </div> </div> </section> <section class="demo" id="demo-maxPoint"> <h3>maxPoint</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> <div class="item">4</div> <div class="item">5</div> <div class="item">6</div> <div class="item">7</div> <div class="item">8</div> <div class="item">9</div> <div class="item">10</div> </div> </div> </section> <section class="demo" id="demo-transitionDuration"> <h3>transitionDuration</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> <div class="item">4</div> <div class="item">5</div> </div> </div> </section> <section class="demo" id="demo-pointmove"> <h3>pointmove event</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> <div class="item">4</div> <div class="item">5</div> </div> </div> <div class="pointer"> <span class="current"></span> <span></span> <span></span> <span></span> <span></span> </div> <p class="controls"> <button class="prev" disabled>prev</button> <button class="next">next</button> </p> </section> <section class="demo" id="demo-touchevents"> <h3>touch events</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> </div> </div> <div class="log"> <div class="event">event: <span></span></div> <pre class="detail"></pre> </div> </section> <section class="demo" id="demo-cancelmove"> <h3>cancel move (only next)</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> </div> </div> </section> <section class="demo" id="demo-refresh"> <h3>refresh</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> </div> </div> <p class="controls"> <button class="add">add</button> <button class="remove">remove</button> </p> </section> <section class="demo" id="demo-link"> <h3>link</h3> <div class="viewport"> <div class="flipsnap"> <div class="item"><a href="./">link to index</a></div> <div class="item"><a href="./">click event</a></div> <div class="item"><a href="./">click event<br>and link</a></div> </div> </div> </section> <section class="demo" id="demo-nextprev"> <h3>next, prev</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> </div> </div> <p class="controls"> <button class="prev" disabled>prev</button> <button class="next">next</button> </p> </section> <section class="demo" id="demo-moveToPoint"> <h3>moveToPoint</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> <div class="item">4</div> <div class="item">5</div> <div class="item">6</div> <div class="item">7</div> <div class="item">8</div> <div class="item">9</div> <div class="item">10</div> </div> </div> <p class="controls"> <input type="number" size="3" class="num"> <button class="go">Go</button> </p> </section> <section class="demo" id="demo-disableTouch"> <h3>disableTouch</h3> <div class="viewport"> <div class="flipsnap"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> <div class="item">4</div> <div class="item">5</div> </div> </div> <p class="controls"> <label>disableTouch<input type="checkbox" class="isDisable" checked></label> </p> <p class="controls"> <button class="prev" disabled>prev</button> <button class="next">next</button> </p> <p class="controls"> <input type="number" size="3" class="num"> <button class="go">Go</button> </p> </section> </section> </body> </html>
hokaccha/js-flipsnap
example/index.html
HTML
mit
5,644
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using Moq; using NUnit.Framework; using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Scoping; using Umbraco.Tests.TestHelpers; namespace Umbraco.Tests.IO { [TestFixture] public class ShadowFileSystemTests { // tested: // only 1 instance of this class is created // SetUp and TearDown run before/after each test // SetUp does not start before the previous TearDown returns [SetUp] public void SetUp() { SafeCallContext.Clear(); ClearFiles(); FileSystems.ResetShadowId(); } [TearDown] public void TearDown() { SafeCallContext.Clear(); ClearFiles(); FileSystems.ResetShadowId(); } private static void ClearFiles() { TestHelper.DeleteDirectory(IOHelper.MapPath("FileSysTests")); TestHelper.DeleteDirectory(IOHelper.MapPath(SystemDirectories.TempData.EnsureEndsWith('/') + "ShadowFs")); } private static string NormPath(string path) { return path.ToLowerInvariant().Replace("\\", "/"); } [Test] public void ShadowDeleteDirectory() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); Directory.CreateDirectory(path + "/ShadowTests/d1"); Directory.CreateDirectory(path + "/ShadowTests/d2"); var files = fs.GetFiles(""); Assert.AreEqual(0, files.Count()); var dirs = fs.GetDirectories(""); Assert.AreEqual(2, dirs.Count()); Assert.IsTrue(dirs.Contains("d1")); Assert.IsTrue(dirs.Contains("d2")); ss.DeleteDirectory("d1"); Assert.IsTrue(Directory.Exists(path + "/ShadowTests/d1")); Assert.IsTrue(fs.DirectoryExists("d1")); Assert.IsFalse(ss.DirectoryExists("d1")); dirs = ss.GetDirectories(""); Assert.AreEqual(1, dirs.Count()); Assert.IsTrue(dirs.Contains("d2")); } [Test] public void ShadowDeleteDirectoryInDir() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); Directory.CreateDirectory(path + "/ShadowTests/sub"); Directory.CreateDirectory(path + "/ShadowTests/sub/d1"); Directory.CreateDirectory(path + "/ShadowTests/sub/d2"); var files = fs.GetFiles(""); Assert.AreEqual(0, files.Count()); var dirs = ss.GetDirectories(""); Assert.AreEqual(1, dirs.Count()); Assert.IsTrue(dirs.Contains("sub")); dirs = fs.GetDirectories("sub"); Assert.AreEqual(2, dirs.Count()); Assert.IsTrue(dirs.Contains("sub/d1")); Assert.IsTrue(dirs.Contains("sub/d2")); dirs = ss.GetDirectories("sub"); Assert.AreEqual(2, dirs.Count()); Assert.IsTrue(dirs.Contains("sub/d1")); Assert.IsTrue(dirs.Contains("sub/d2")); ss.DeleteDirectory("sub/d1"); Assert.IsTrue(Directory.Exists(path + "/ShadowTests/sub/d1")); Assert.IsTrue(fs.DirectoryExists("sub/d1")); Assert.IsFalse(ss.DirectoryExists("sub/d1")); dirs = fs.GetDirectories("sub"); Assert.AreEqual(2, dirs.Count()); Assert.IsTrue(dirs.Contains("sub/d1")); Assert.IsTrue(dirs.Contains("sub/d2")); dirs = ss.GetDirectories("sub"); Assert.AreEqual(1, dirs.Count()); Assert.IsTrue(dirs.Contains("sub/d2")); } [Test] public void ShadowDeleteFile() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); File.WriteAllText(path + "/ShadowTests/f1.txt", "foo"); File.WriteAllText(path + "/ShadowTests/f2.txt", "foo"); var files = fs.GetFiles(""); Assert.AreEqual(2, files.Count()); Assert.IsTrue(files.Contains("f1.txt")); Assert.IsTrue(files.Contains("f2.txt")); files = ss.GetFiles(""); Assert.AreEqual(2, files.Count()); Assert.IsTrue(files.Contains("f1.txt")); Assert.IsTrue(files.Contains("f2.txt")); var dirs = ss.GetDirectories(""); Assert.AreEqual(0, dirs.Count()); ss.DeleteFile("f1.txt"); Assert.IsTrue(File.Exists(path + "/ShadowTests/f1.txt")); Assert.IsTrue(fs.FileExists("f1.txt")); Assert.IsFalse(ss.FileExists("f1.txt")); files = ss.GetFiles(""); Assert.AreEqual(1, files.Count()); Assert.IsTrue(files.Contains("f2.txt")); } [Test] public void ShadowDeleteFileInDir() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); Directory.CreateDirectory(path + "/ShadowTests/sub"); File.WriteAllText(path + "/ShadowTests/sub/f1.txt", "foo"); File.WriteAllText(path + "/ShadowTests/sub/f2.txt", "foo"); var files = fs.GetFiles(""); Assert.AreEqual(0, files.Count()); files = fs.GetFiles("sub"); Assert.AreEqual(2, files.Count()); Assert.IsTrue(files.Contains("sub/f1.txt")); Assert.IsTrue(files.Contains("sub/f2.txt")); files = ss.GetFiles(""); Assert.AreEqual(0, files.Count()); var dirs = ss.GetDirectories(""); Assert.AreEqual(1, dirs.Count()); Assert.IsTrue(dirs.Contains("sub")); files = ss.GetFiles("sub"); Assert.AreEqual(2, files.Count()); Assert.IsTrue(files.Contains("sub/f1.txt")); Assert.IsTrue(files.Contains("sub/f2.txt")); dirs = ss.GetDirectories("sub"); Assert.AreEqual(0, dirs.Count()); ss.DeleteFile("sub/f1.txt"); Assert.IsTrue(File.Exists(path + "/ShadowTests/sub/f1.txt")); Assert.IsTrue(fs.FileExists("sub/f1.txt")); Assert.IsFalse(ss.FileExists("sub/f1.txt")); files = fs.GetFiles("sub"); Assert.AreEqual(2, files.Count()); Assert.IsTrue(files.Contains("sub/f1.txt")); Assert.IsTrue(files.Contains("sub/f2.txt")); files = ss.GetFiles("sub"); Assert.AreEqual(1, files.Count()); Assert.IsTrue(files.Contains("sub/f2.txt")); } [Test] public void ShadowCantCreateFile() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); Assert.Throws<UnauthorizedAccessException>(() => { using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("../../f1.txt", ms); }); } [Test] public void ShadowCreateFile() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); File.WriteAllText(path + "/ShadowTests/f2.txt", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.txt", ms); Assert.IsTrue(File.Exists(path + "/ShadowTests/f2.txt")); Assert.IsFalse(File.Exists(path + "/ShadowSystem/f2.txt")); Assert.IsTrue(fs.FileExists("f2.txt")); Assert.IsTrue(ss.FileExists("f2.txt")); Assert.IsFalse(File.Exists(path + "/ShadowTests/f1.txt")); Assert.IsTrue(File.Exists(path + "/ShadowSystem/f1.txt")); Assert.IsFalse(fs.FileExists("f1.txt")); Assert.IsTrue(ss.FileExists("f1.txt")); var files = ss.GetFiles(""); Assert.AreEqual(2, files.Count()); Assert.IsTrue(files.Contains("f1.txt")); Assert.IsTrue(files.Contains("f2.txt")); string content; using (var stream = ss.OpenFile("f1.txt")) content = new StreamReader(stream).ReadToEnd(); Assert.AreEqual("foo", content); } [Test] public void ShadowCreateFileInDir() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("sub/f1.txt", ms); Assert.IsFalse(File.Exists(path + "/ShadowTests/sub/f1.txt")); Assert.IsTrue(File.Exists(path + "/ShadowSystem/sub/f1.txt")); Assert.IsFalse(fs.FileExists("sub/f1.txt")); Assert.IsTrue(ss.FileExists("sub/f1.txt")); Assert.IsFalse(fs.DirectoryExists("sub")); Assert.IsTrue(ss.DirectoryExists("sub")); var dirs = fs.GetDirectories(""); Assert.AreEqual(0, dirs.Count()); dirs = ss.GetDirectories(""); Assert.AreEqual(1, dirs.Count()); Assert.IsTrue(dirs.Contains("sub")); var files = ss.GetFiles("sub"); Assert.AreEqual(1, files.Count()); string content; using (var stream = ss.OpenFile("sub/f1.txt")) content = new StreamReader(stream).ReadToEnd(); Assert.AreEqual("foo", content); } [Test] public void ShadowAbort() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("path/to/some/dir/f1.txt", ms); // file is only written to the shadow fs Assert.IsTrue(File.Exists(path + "/ShadowSystem/path/to/some/dir/f1.txt")); Assert.IsFalse(File.Exists(path + "/ShadowTests/path/to/some/dir/f1.txt")); // let the shadow fs die } [Test] public void ShadowComplete() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); Directory.CreateDirectory(path + "/ShadowTests/sub/sub"); File.WriteAllText(path + "/ShadowTests/sub/sub/f2.txt", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("path/to/some/dir/f1.txt", ms); ss.DeleteFile("sub/sub/f2.txt"); Assert.IsTrue(File.Exists(path + "/ShadowSystem/path/to/some/dir/f1.txt")); ss.Complete(); // yes we are cleaning now //Assert.IsTrue(File.Exists(path + "/ShadowSystem/path/to/some/dir/f1.txt")); // *not* cleaning Assert.IsTrue(File.Exists(path + "/ShadowTests/path/to/some/dir/f1.txt")); Assert.IsFalse(File.Exists(path + "/ShadowTests/sub/sub/f2.txt")); } class FS : FileSystemWrapper { public FS(IFileSystem innerFileSystem) : base(innerFileSystem) { } } [Test] public void ShadowScopeComplete() { var logger = Mock.Of<ILogger>(); var path = IOHelper.MapPath("FileSysTests"); var shadowfs = IOHelper.MapPath(SystemDirectories.TempData.EnsureEndsWith('/') + "ShadowFs"); Directory.CreateDirectory(path); Directory.CreateDirectory(shadowfs); var scopedFileSystems = false; var phy = new PhysicalFileSystem(path, "ignore"); var container = Mock.Of<IFactory>(); var fileSystems = new FileSystems(container, logger) { IsScoped = () => scopedFileSystems }; var fs = fileSystems.GetFileSystem<FS>(phy); var sw = (ShadowWrapper) fs.InnerFileSystem; using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f1.txt", ms); Assert.IsTrue(phy.FileExists("sub/f1.txt")); string id; // explicit shadow without scope does not work sw.Shadow(id = ShadowWrapper.CreateShadowId()); Assert.IsTrue(Directory.Exists(shadowfs + "/" + id)); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f2.txt", ms); Assert.IsTrue(phy.FileExists("sub/f2.txt")); sw.UnShadow(true); Assert.IsTrue(phy.FileExists("sub/f2.txt")); Assert.IsFalse(Directory.Exists(shadowfs + "/" + id)); // shadow with scope but no complete does not complete scopedFileSystems = true; // pretend we have a scope var scope = new ShadowFileSystems(fileSystems, id = ShadowWrapper.CreateShadowId()); Assert.IsTrue(Directory.Exists(shadowfs + "/" + id)); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f3.txt", ms); Assert.IsFalse(phy.FileExists("sub/f3.txt")); var dirs = Directory.GetDirectories(shadowfs); Assert.AreEqual(1, dirs.Length); Assert.AreEqual((shadowfs + "/" + id).Replace('\\', '/'), dirs[0].Replace('\\', '/')); dirs = Directory.GetDirectories(dirs[0]); var typedDir = dirs.FirstOrDefault(x => x.Replace('\\', '/').EndsWith("/x")); Assert.IsNotNull(typedDir); dirs = Directory.GetDirectories(typedDir); var suid = fileSystems.Paths[typeof(FS)]; var scopedDir = dirs.FirstOrDefault(x => x.Replace('\\', '/').EndsWith("/" + suid)); // this is where files go Assert.IsNotNull(scopedDir); scope.Dispose(); scopedFileSystems = false; Assert.IsFalse(phy.FileExists("sub/f3.txt")); TestHelper.TryAssert(() => Assert.IsFalse(Directory.Exists(shadowfs + "/" + id))); // shadow with scope and complete does complete scopedFileSystems = true; // pretend we have a scope scope = new ShadowFileSystems(fileSystems, id = ShadowWrapper.CreateShadowId()); Assert.IsTrue(Directory.Exists(shadowfs + "/" + id)); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f4.txt", ms); Assert.IsFalse(phy.FileExists("sub/f4.txt")); Assert.AreEqual(1, Directory.GetDirectories(shadowfs).Length); scope.Complete(); scope.Dispose(); scopedFileSystems = false; TestHelper.TryAssert(() => Assert.AreEqual(0, Directory.GetDirectories(shadowfs).Length)); Assert.IsTrue(phy.FileExists("sub/f4.txt")); Assert.IsFalse(Directory.Exists(shadowfs + "/" + id)); // test scope for "another thread" scopedFileSystems = true; // pretend we have a scope scope = new ShadowFileSystems(fileSystems, id = ShadowWrapper.CreateShadowId()); Assert.IsTrue(Directory.Exists(shadowfs + "/" + id)); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f5.txt", ms); Assert.IsFalse(phy.FileExists("sub/f5.txt")); // pretend we're another thread w/out scope scopedFileSystems = false; using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f6.txt", ms); scopedFileSystems = true; // pretend we have a scope Assert.IsTrue(phy.FileExists("sub/f6.txt")); // other thread has written out to fs scope.Complete(); scope.Dispose(); scopedFileSystems = false; Assert.IsTrue(phy.FileExists("sub/f5.txt")); TestHelper.TryAssert(() => Assert.IsFalse(Directory.Exists(shadowfs + "/" + id))); } [Test] public void ShadowScopeCompleteWithFileConflict() { var logger = Mock.Of<ILogger>(); var path = IOHelper.MapPath("FileSysTests"); var shadowfs = IOHelper.MapPath(SystemDirectories.TempData.EnsureEndsWith('/') + "ShadowFs"); Directory.CreateDirectory(path); var scopedFileSystems = false; var phy = new PhysicalFileSystem(path, "ignore"); var container = Mock.Of<IFactory>(); var fileSystems = new FileSystems(container, logger) { IsScoped = () => scopedFileSystems }; var fs = fileSystems.GetFileSystem<FS>( phy); var sw = (ShadowWrapper) fs.InnerFileSystem; using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f1.txt", ms); Assert.IsTrue(phy.FileExists("sub/f1.txt")); string id; scopedFileSystems = true; // pretend we have a scope var scope = new ShadowFileSystems(fileSystems, id = ShadowWrapper.CreateShadowId()); Assert.IsTrue(Directory.Exists(shadowfs + "/" + id)); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f2.txt", ms); Assert.IsFalse(phy.FileExists("sub/f2.txt")); // pretend we're another thread w/out scope scopedFileSystems = false; using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("bar"))) sw.AddFile("sub/f2.txt", ms); scopedFileSystems = true; // pretend we have a scope Assert.IsTrue(phy.FileExists("sub/f2.txt")); // other thread has written out to fs scope.Complete(); scope.Dispose(); scopedFileSystems = false; Assert.IsTrue(phy.FileExists("sub/f2.txt")); TestHelper.TryAssert(() => Assert.IsFalse(Directory.Exists(shadowfs + "/" + id))); string text; using (var s = phy.OpenFile("sub/f2.txt")) using (var r = new StreamReader(s)) text = r.ReadToEnd(); // the shadow filesystem will happily overwrite anything it can Assert.AreEqual("foo", text); } [Test] public void ShadowScopeCompleteWithDirectoryConflict() { var logger = Mock.Of<ILogger>(); var path = IOHelper.MapPath("FileSysTests"); var shadowfs = IOHelper.MapPath(SystemDirectories.TempData.EnsureEndsWith('/') + "ShadowFs"); Directory.CreateDirectory(path); var scopedFileSystems = false; var phy = new PhysicalFileSystem(path, "ignore"); var container = Mock.Of<IFactory>(); var fileSystems = new FileSystems(container, logger) { IsScoped = () => scopedFileSystems }; var fs = fileSystems.GetFileSystem<FS>( phy); var sw = (ShadowWrapper)fs.InnerFileSystem; using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f1.txt", ms); Assert.IsTrue(phy.FileExists("sub/f1.txt")); string id; scopedFileSystems = true; // pretend we have a scope var scope = new ShadowFileSystems(fileSystems, id = ShadowWrapper.CreateShadowId()); Assert.IsTrue(Directory.Exists(shadowfs + "/" + id)); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f2.txt", ms); Assert.IsFalse(phy.FileExists("sub/f2.txt")); // pretend we're another thread w/out scope scopedFileSystems = false; using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("bar"))) sw.AddFile("sub/f2.txt/f2.txt", ms); scopedFileSystems = true; // pretend we have a scope Assert.IsTrue(phy.FileExists("sub/f2.txt/f2.txt")); // other thread has written out to fs using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) sw.AddFile("sub/f3.txt", ms); Assert.IsFalse(phy.FileExists("sub/f3.txt")); scope.Complete(); try { // no way this can work since we're trying to write a file // but there's now a directory with the same name on the real fs scope.Dispose(); Assert.Fail("Expected AggregateException."); } catch (AggregateException ae) { Assert.AreEqual(1, ae.InnerExceptions.Count); var e = ae.InnerExceptions[0]; Assert.IsNotNull(e.InnerException); Assert.IsInstanceOf<AggregateException>(e); ae = (AggregateException) e; Assert.AreEqual(1, ae.InnerExceptions.Count); e = ae.InnerExceptions[0]; Assert.IsNotNull(e.InnerException); Assert.IsInstanceOf<Exception>(e.InnerException); } // still, the rest of the changes has been applied ok Assert.IsTrue(phy.FileExists("sub/f3.txt")); } [Test] public void GetFilesReturnsChildrenOnly() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); File.WriteAllText(path + "/f1.txt", "foo"); Directory.CreateDirectory(path + "/test"); File.WriteAllText(path + "/test/f2.txt", "foo"); Directory.CreateDirectory(path + "/test/inner"); File.WriteAllText(path + "/test/inner/f3.txt", "foo"); path = NormPath(path); var files = Directory.GetFiles(path); Assert.AreEqual(1, files.Length); files = Directory.GetFiles(path, "*", SearchOption.AllDirectories); Assert.AreEqual(3, files.Length); var efiles = Directory.EnumerateFiles(path); Assert.AreEqual(1, efiles.Count()); efiles = Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories); Assert.AreEqual(3, efiles.Count()); } [Test] public void DeleteDirectoryAndFiles() { var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); File.WriteAllText(path + "/f1.txt", "foo"); Directory.CreateDirectory(path + "/test"); File.WriteAllText(path + "/test/f2.txt", "foo"); Directory.CreateDirectory(path + "/test/inner"); File.WriteAllText(path + "/test/inner/f3.txt", "foo"); path = NormPath(path); TestHelper.Try(() => Directory.Delete(path, true)); TestHelper.TryAssert(() => Assert.IsFalse(File.Exists(path + "/test/inner/f3.txt"))); } /// <summary> /// Check that GetFiles will return all files on the shadow, while returning /// just one on each of the filesystems used by the shadow. /// </summary> [Test] public void ShadowGetFiles() { // Arrange var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); // Act File.WriteAllText(path + "/ShadowTests/f2.txt", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.txt", ms); // Assert // ensure we get 2 files from the shadow var getFiles = ss.GetFiles(string.Empty); Assert.AreEqual(2, getFiles.Count()); var fsFiles = fs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(1, fsFiles.Length); var sfsFiles = sfs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(1, sfsFiles.Length); } /// <summary> /// Check that GetFiles using the filter function with empty string will return expected results /// </summary> [Test] public void ShadowGetFilesUsingEmptyFilter() { // Arrange var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); // Act File.WriteAllText(path + "/ShadowTests/f2.txt", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.txt", ms); // Assert // ensure we get 2 files from the shadow var getFiles = ss.GetFiles(string.Empty); Assert.AreEqual(2, getFiles.Count()); // ensure we get 0 files when using a empty filter var getFilesWithEmptyFilter = ss.GetFiles(string.Empty, ""); Assert.AreEqual(0, getFilesWithEmptyFilter.Count()); var fsFiles = fs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(1, fsFiles.Length); var sfsFiles = sfs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(1, sfsFiles.Length); } /// <summary> /// Check that GetFiles using the filter function with null will return expected results /// </summary> [Test] public void ShadowGetFilesUsingNullFilter() { // Arrange var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); // Act File.WriteAllText(path + "/ShadowTests/f2.txt", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.txt", ms); // Assert // ensure we get 2 files from the shadow var getFiles = ss.GetFiles(string.Empty); Assert.AreEqual(2, getFiles.Count()); // ensure we get 2 files when using null in filter parameter var getFilesWithNullFilter = ss.GetFiles(string.Empty, null); Assert.AreEqual(2, getFilesWithNullFilter.Count()); var fsFiles = fs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(1, fsFiles.Length); var sfsFiles = sfs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(1, sfsFiles.Length); } [Test] public void ShadowGetFilesUsingWildcardFilter() { // Arrange var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); // Act File.WriteAllText(path + "/ShadowTests/f2.txt", "foo"); File.WriteAllText(path + "/ShadowTests/f2.doc", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.txt", ms); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.doc", ms); // Assert // ensure we get 4 files from the shadow var getFiles = ss.GetFiles(string.Empty); Assert.AreEqual(4, getFiles.Count()); // ensure we get only 2 of 4 files from the shadow when using filter var getFilesWithWildcardFilter = ss.GetFiles(string.Empty, "*.doc"); Assert.AreEqual(2, getFilesWithWildcardFilter.Count()); var fsFiles = fs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(2, fsFiles.Length); var sfsFiles = sfs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(2, sfsFiles.Length); } [Test] public void ShadowGetFilesUsingSingleCharacterFilter() { // Arrange var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); // Act File.WriteAllText(path + "/ShadowTests/f2.txt", "foo"); File.WriteAllText(path + "/ShadowTests/f2.doc", "foo"); File.WriteAllText(path + "/ShadowTests/f2.docx", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.txt", ms); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.doc", ms); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f1.docx", ms); // Assert // ensure we get 6 files from the shadow var getFiles = ss.GetFiles(string.Empty); Assert.AreEqual(6, getFiles.Count()); // ensure we get only 2 of 6 files from the shadow when using filter on shadow var getFilesWithWildcardSinglecharFilter = ss.GetFiles(string.Empty, "f1.d?c"); Assert.AreEqual(1, getFilesWithWildcardSinglecharFilter.Count()); // ensure we get only 2 of 6 files from the shadow when using filter on disk var getFilesWithWildcardSinglecharFilter2 = ss.GetFiles(string.Empty, "f2.d?c"); Assert.AreEqual(1, getFilesWithWildcardSinglecharFilter2.Count()); var fsFiles = fs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(3, fsFiles.Length); var sfsFiles = sfs.GetFiles(string.Empty).ToArray(); Assert.AreEqual(3, sfsFiles.Length); } /// <summary> /// Returns the full paths of the files on the disk. /// Note that this will be the *actual* path of the file, meaning a file existing on the initialized FS /// will be in one location, while a file written after initializing the shadow, will exist at the /// shadow location directory. /// </summary> [Test] public void ShadowGetFullPath() { // Arrange var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); // Act File.WriteAllText(path + "/ShadowTests/f1.txt", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f2.txt", ms); // Assert var f1FullPath = ss.GetFullPath("f1.txt"); var f2FullPath = ss.GetFullPath("f2.txt"); Assert.AreEqual(Path.Combine(path, "ShadowTests", "f1.txt"), f1FullPath); Assert.AreEqual(Path.Combine(path, "ShadowSystem", "f2.txt"), f2FullPath); } /// <summary> /// Returns the path relative to the filesystem root /// </summary> /// <remarks> /// This file stuff in this test is kinda irrelevant with the current implementation. /// We do tests that the files are written to the correct places and the relative path is returned correct, /// but GetRelativePath is currently really just string manipulation so files are not actually hit by the code. /// Leaving the file stuff in here for now in case the method becomes more clever at some point. /// </remarks> [Test] public void ShadowGetRelativePath() { // Arrange var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "ignore"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "ignore"); var ss = new ShadowFileSystem(fs, sfs); // Act File.WriteAllText(path + "/ShadowTests/f1.txt", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f2.txt", ms); // Assert var f1RelativePath = ss.GetRelativePath("f1.txt"); var f2RelativePath = ss.GetRelativePath("f2.txt"); Assert.AreEqual("f1.txt", f1RelativePath); Assert.AreEqual("f2.txt", f2RelativePath); Assert.IsTrue(File.Exists(Path.Combine(path, "ShadowTests", "f1.txt"))); Assert.IsFalse(File.Exists(Path.Combine(path, "ShadowTests", "f2.txt"))); Assert.IsTrue(File.Exists(Path.Combine(path, "ShadowSystem", "f2.txt"))); Assert.IsFalse(File.Exists(Path.Combine(path, "ShadowSystem", "f1.txt"))); } /// <summary> /// Ensure the URL returned contains the path relative to the FS root, /// but including the rootUrl the FS was initialized with. /// </summary> /// <remarks> /// This file stuff in this test is kinda irrelevant with the current implementation. /// We do tests that the files are written to the correct places and the URL is returned correct, /// but GetUrl is currently really just string manipulation so files are not actually hit by the code. /// Leaving the file stuff in here for now in case the method becomes more clever at some point. /// </remarks> [Test] public void ShadowGetUrl() { // Arrange var path = IOHelper.MapPath("FileSysTests"); Directory.CreateDirectory(path); Directory.CreateDirectory(path + "/ShadowTests"); Directory.CreateDirectory(path + "/ShadowSystem"); var fs = new PhysicalFileSystem(path + "/ShadowTests/", "rootUrl"); var sfs = new PhysicalFileSystem(path + "/ShadowSystem/", "rootUrl"); var ss = new ShadowFileSystem(fs, sfs); // Act File.WriteAllText(path + "/ShadowTests/f1.txt", "foo"); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("foo"))) ss.AddFile("f2.txt", ms); // Assert var f1Url = ss.GetUrl("f1.txt"); var f2Url = ss.GetUrl("f2.txt"); Assert.AreEqual("rootUrl/f1.txt", f1Url); Assert.AreEqual("rootUrl/f2.txt", f2Url); Assert.IsTrue(File.Exists(Path.Combine(path, "ShadowTests", "f1.txt"))); Assert.IsFalse(File.Exists(Path.Combine(path, "ShadowTests", "f2.txt"))); Assert.IsTrue(File.Exists(Path.Combine(path, "ShadowSystem", "f2.txt"))); Assert.IsFalse(File.Exists(Path.Combine(path, "ShadowSystem", "f1.txt"))); } } }
hfloyd/Umbraco-CMS
src/Umbraco.Tests/IO/ShadowFileSystemTests.cs
C#
mit
39,371
using System; using System.Collections.Generic; using System.Runtime.InteropServices; using Vlc.DotNet.Core.Interops.Signatures; namespace Vlc.DotNet.Core { public sealed class TrackDescription { public int ID { get; private set; } public string Name { get; private set; } internal TrackDescription(int id, string name) { ID = id; Name = name; } internal static List<TrackDescription> GetSubTrackDescription(TrackDescriptionStructure module) { var result = new List<TrackDescription>(); result.Add(new TrackDescription(module.Id, module.Name)); if (module.NextTrackDescription != IntPtr.Zero) { TrackDescriptionStructure nextModule = (TrackDescriptionStructure)Marshal.PtrToStructure(module.NextTrackDescription, typeof(TrackDescriptionStructure)); var data = GetSubTrackDescription(nextModule); result.AddRange(data); } return result; } } }
raydtang/Vlc.DotNet
src/Vlc.DotNet.Core/TrackDescription.cs
C#
mit
1,069
import { rebind } from '@d3fc/d3fc-rebind'; import _slidingWindow from './slidingWindow'; import exponentialMovingAverage from './exponentialMovingAverage'; import { convertNaN } from './fn'; export default function() { let volumeValue = (d, i) => d.volume; let closeValue = (d, i) => d.close; const emaComputer = exponentialMovingAverage() .period(13); const slidingWindow = _slidingWindow() .period(2) .defined(d => closeValue(d) != null && volumeValue(d) != null) .accumulator(values => values && convertNaN((closeValue(values[1]) - closeValue(values[0])) * volumeValue(values[1]))); const force = data => { const forceIndex = slidingWindow(data); return emaComputer(forceIndex); }; force.volumeValue = (...args) => { if (!args.length) { return volumeValue; } volumeValue = args[0]; return force; }; force.closeValue = (...args) => { if (!args.length) { return closeValue; } closeValue = args[0]; return force; }; rebind(force, emaComputer, 'period'); return force; }
chrisprice/d3fc
packages/d3fc-technical-indicator/src/forceIndex.js
JavaScript
mit
1,175
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web.Mvc; using Umbraco.Core; using Umbraco.Core.Configuration; using Umbraco.Core.IO; using Umbraco.Web.Security; namespace Umbraco.Web.Install.Controllers { /// <summary> /// The MVC Installation controller /// </summary> /// <remarks> /// NOTE: All views must have their full paths as we do not have a custom view engine for the installation views! /// </remarks> [InstallAuthorizeAttribute] public class InstallController : Controller { private readonly UmbracoContext _umbracoContext; public InstallController() : this(UmbracoContext.Current) { } public InstallController(UmbracoContext umbracoContext) { _umbracoContext = umbracoContext; } [HttpGet] public ActionResult Index() { if (ApplicationContext.Current.IsConfigured) { return Redirect(SystemDirectories.Umbraco.EnsureEndsWith('/')); } if (ApplicationContext.Current.IsUpgrading) { // Update ClientDependency version var clientDependencyConfig = new ClientDependencyConfiguration(ApplicationContext.Current.ProfilingLogger.Logger); var clientDependencyUpdated = clientDependencyConfig.IncreaseVersionNumber(); var result = _umbracoContext.Security.ValidateCurrentUser(false); switch (result) { case ValidateRequestAttempt.FailedNoPrivileges: case ValidateRequestAttempt.FailedNoContextId: return Redirect(SystemDirectories.Umbraco + "/AuthorizeUpgrade?redir=" + Server.UrlEncode(Request.RawUrl)); } } //gen the install base url ViewBag.InstallApiBaseUrl = Url.GetUmbracoApiService("GetSetup", "InstallApi", "UmbracoInstall").TrimEnd("GetSetup"); //get the base umbraco folder ViewBag.UmbracoBaseFolder = IOHelper.ResolveUrl(SystemDirectories.Umbraco); InstallHelper ih = new InstallHelper(_umbracoContext); ih.InstallStatus(false, ""); //always ensure full path (see NOTE in the class remarks) return View(GlobalSettings.Path.EnsureEndsWith('/') + "install/views/index.cshtml"); } } }
gavinfaux/Umbraco-CMS
src/Umbraco.Web/Install/Controllers/InstallController.cs
C#
mit
2,483
/* Copyright (c) 2015-2016 topameng(topameng@qq.com) 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. */ using System; using LuaInterface; namespace LuaInterface { public class LuaEvent : IDisposable { protected LuaState luaState; protected bool beDisposed; LuaTable self = null; LuaFunction _add = null; LuaFunction _remove = null; //LuaFunction _call = null; public LuaEvent(LuaTable table) { self = table; luaState = table.GetLuaState(); self.AddRef(); _add = self.GetLuaFunction("Add"); _remove = self.GetLuaFunction("Remove"); //_call = self.GetLuaFunction("__call"); } public void Dispose() { self.Dispose(); _add.Dispose(); _remove.Dispose(); //_call.Dispose(); Clear(); } void Clear() { //_call = null; _add = null; _remove = null; self = null; luaState = null; } public void Dispose(bool disposeManagedResources) { if (!beDisposed) { beDisposed = true; //if (_call != null) //{ // _call.Dispose(disposeManagedResources); // _call = null; //} if (_add != null) { _add.Dispose(disposeManagedResources); _add = null; } if (_remove != null) { _remove.Dispose(disposeManagedResources); _remove = null; } if (self != null) { self.Dispose(disposeManagedResources); } Clear(); } } public void Add(LuaFunction func, LuaTable obj) { if (func == null) { return; } _add.BeginPCall(); _add.Push(self); _add.Push(func); _add.Push(obj); _add.PCall(); _add.EndPCall(); } public void Remove(LuaFunction func, LuaTable obj) { if (func == null) { return; } _remove.BeginPCall(); _remove.Push(self); _remove.Push(func); _remove.Push(obj); _remove.PCall(); _remove.EndPCall(); } //public override int GetReference() //{ // return self.GetReference(); //} } }
GarfieldJiang/UGFWithToLua
Assets/ToLua/ToLua/Core/LuaEvent.cs
C#
mit
3,783
// (C) Copyright Jeremy Siek 1999. Permission to copy, use, modify, // sell and distribute this software is granted provided this // copyright notice appears in all copies. This software is provided // "as is" without express or implied warranty, and with no claim as // to its suitability for any purpose. #ifndef BOOST_INT_ITERATOR_H #define BOOST_INT_ITERATOR_H #include <boost/iterator.hpp> #if !defined BOOST_MSVC #include <boost/operators.hpp> #endif #include <iostream> //using namespace std; #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE namespace boost { #endif // this should use random_access_iterator_helper but I've had // VC++ portablility problems with that. -JGS template <class IntT> class int_iterator { typedef int_iterator self; public: typedef std::random_access_iterator_tag iterator_category; typedef IntT value_type; typedef IntT& reference; typedef IntT* pointer; typedef std::ptrdiff_t difference_type; inline int_iterator() : _i(0) { } inline int_iterator(IntT i) : _i(i) { } inline int_iterator(const self& x) : _i(x._i) { } inline self& operator=(const self& x) { _i = x._i; return *this; } inline IntT operator*() { return _i; } inline IntT operator[](IntT n) { return _i + n; } inline self& operator++() { ++_i; return *this; } inline self operator++(int) { self t = *this; ++_i; return t; } inline self& operator+=(IntT n) { _i += n; return *this; } inline self operator+(IntT n) { self t = *this; t += n; return t; } inline self& operator--() { --_i; return *this; } inline self operator--(int) { self t = *this; --_i; return t; } inline self& operator-=(IntT n) { _i -= n; return *this; } inline IntT operator-(const self& x) const { return _i - x._i; } inline bool operator==(const self& x) const { return _i == x._i; } // vc++ had a problem finding != in random_access_iterator_helper // need to look into this... for now implementing everything here -JGS inline bool operator!=(const self& x) const { return _i != x._i; } inline bool operator<(const self& x) const { return _i < x._i; } inline bool operator<=(const self& x) const { return _i <= x._i; } inline bool operator>(const self& x) const { return _i > x._i; } inline bool operator>=(const self& x) const { return _i >= x._i; } protected: IntT _i; }; template <class IntT> inline int_iterator<IntT> operator+(IntT n, int_iterator<IntT> t) { t += n; return t; } #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE } /* namespace boost */ #endif #ifdef BOOST_NO_OPERATORS_IN_NAMESPACE namespace boost { using ::int_iterator; } #endif #endif /* BOOST_INT_ITERATOR_H */
Ezeer/VegaStrike_win32FR
vegastrike/boost/1_28/boost/pending/detail/int_iterator.hpp
C++
mit
2,618
moves-ios-sdk ============= [Moves App](http://moves-app.com) SDK For iOS. ![Moves App Integration](https://apps.moves-app.com/assets/images/moves-connected-apps-logo-2.png) #Getting Started ##Installing the moves-ios-sdk **Use CocoaPods** - Add the ``pod 'moves-ios-sdk', '~> 0.2.3'`` pod to your **Podfile**. - Run ``pod install``, and the Moves SDK will be available in your project. **Manully way, add the moves-ios-sdk to your project** - Open your existing project. - Drag the **moves-ios-sdk** folder from the example project into your Xcode project. - Make sure the “Copy items into destination group’s folder (if needed)” checkbox is checked. ##Get ClientId and ClientSecret When you register your app with Moves, it will provide you with a **Client ID** and **Client secret**. They identify your app to Moves's API. [Register your app with Moves](https://dev.moves-app.com/apps) ##Add the Moves URL scheme copy and paste the following into the XML Source for the Info.plist: ```Xml <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>com.yourcompany</string> <key>CFBundleURLSchemes</key> <array> <string>[YOUR URL SCHEME]</string> </array> </dict> </array> ``` **[YOUR URL SCHEME]** is setted when you [Register your app with Moves](https://dev.moves-app.com/apps) **Important:** When configure your app [here](https://dev.moves-app.com/apps) you need to set the `Redirect URI` to: `[YOUR URL SCHEME]://authorization-completed` ##Configure your App Delegate At the top of your app delegate source file (and anywhere you call the MovesAPI object), you'll need to include the ``MovesAPI.h``. Simply add this line: ``#import "MovesAPI.h"`` ###Step 1 In AppDelegate. Set Your **[Client ID]**, **[Client Secret]** and **[Redirect URI]**. ```Objc - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[MovesAPI sharedInstance] setShareMovesOauthClientId:@"[YOUR CLIENT ID]" oauthClientSecret:@"[YOUR CLIENT SECRET]" callbackUrlScheme:@"[YOUR URL SCHEME]"]; return YES; } ``` ###Step 2 Give the SDK an opportunity to handle incoming URLs. ```Objc - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { if ([[MovesAPI sharedInstance] canHandleOpenUrl:url]) { return YES; } // Other 3rdParty Apps Handle Url Method... return NO; } ``` #Authorization ```Objc [[MovesAPI sharedInstance] authorizationWithViewController:self success:^{ // Auth successed! Now you can get Moves's data } failure:^(NSError *error) { // Auth failed! }]; ``` #Start get Moves's data Get user profile ```Objc [[MovesAPI sharedInstance] getUserSuccess:^(MVUser *user) { // Get user } failure:^(NSError *error) { // Something wrong }]; ``` More other API see the ``MovesAPI.h`` file #Unit Test You can clone this repo, and test the API. 1. Firstly, you need run the demo app, and authenticate it. 2. `pod install` 3. `command` + `U` #Acknowledgements - [Moves Official API Documents](https://dev.moves-app.com/) #API Terms [Moves API Terms](https://dev.moves-app.com/docs/terms_summary) #License See the [MIT license](https://github.com/vitoziv/moves-ios-sdk/blob/master/LICENSE).
kinra115/MovesSDK-TEST
README.md
Markdown
mit
3,812
package darwin import ( "github.com/currantlabs/ble" "github.com/raff/goble/xpc" ) type msg xpc.Dict func (m msg) id() int { return xpc.Dict(m).MustGetInt("kCBMsgId") } func (m msg) args() xpc.Dict { return xpc.Dict(m).MustGetDict("kCBMsgArgs") } func (m msg) advertisementData() xpc.Dict { return xpc.Dict(m).MustGetDict("kCBMsgArgAdvertisementData") } func (m msg) attMTU() int { return xpc.Dict(m).MustGetInt("kCBMsgArgATTMTU") } func (m msg) attWrites() xpc.Array { return xpc.Dict(m).MustGetArray("kCBMsgArgATTWrites") } func (m msg) attributeID() int { return xpc.Dict(m).MustGetInt("kCBMsgArgAttributeID") } func (m msg) characteristicHandle() int { return xpc.Dict(m).MustGetInt("kCBMsgArgCharacteristicHandle") } func (m msg) data() []byte { // return xpc.Dict(m).MustGetBytes("kCBMsgArgData") v := m["kCBMsgArgData"] switch v.(type) { case string: return []byte(v.(string)) case []byte: return v.([]byte) default: return nil } } func (m msg) deviceUUID() xpc.UUID { return xpc.Dict(m).MustGetUUID("kCBMsgArgDeviceUUID") } func (m msg) ignoreResponse() int { return xpc.Dict(m).MustGetInt("kCBMsgArgIgnoreResponse") } func (m msg) offset() int { return xpc.Dict(m).MustGetInt("kCBMsgArgOffset") } func (m msg) isNotification() int { return xpc.Dict(m).GetInt("kCBMsgArgIsNotification", 0) } func (m msg) result() int { return xpc.Dict(m).MustGetInt("kCBMsgArgResult") } func (m msg) state() int { return xpc.Dict(m).MustGetInt("kCBMsgArgState") } func (m msg) rssi() int { return xpc.Dict(m).MustGetInt("kCBMsgArgData") } func (m msg) transactionID() int { return xpc.Dict(m).MustGetInt("kCBMsgArgTransactionID") } func (m msg) uuid() string { return xpc.Dict(m).MustGetHexBytes("kCBMsgArgUUID") } func (m msg) serviceStartHandle() int { return xpc.Dict(m).MustGetInt("kCBMsgArgServiceStartHandle") } func (m msg) serviceEndHandle() int { return xpc.Dict(m).MustGetInt("kCBMsgArgServiceEndHandle") } func (m msg) services() xpc.Array { return xpc.Dict(m).MustGetArray("kCBMsgArgServices") } func (m msg) characteristics() xpc.Array { return xpc.Dict(m).MustGetArray("kCBMsgArgCharacteristics") } func (m msg) characteristicProperties() int { return xpc.Dict(m).MustGetInt("kCBMsgArgCharacteristicProperties") } func (m msg) characteristicValueHandle() int { return xpc.Dict(m).MustGetInt("kCBMsgArgCharacteristicValueHandle") } func (m msg) descriptors() xpc.Array { return xpc.Dict(m).MustGetArray("kCBMsgArgDescriptors") } func (m msg) descriptorHandle() int { return xpc.Dict(m).MustGetInt("kCBMsgArgDescriptorHandle") } func (m msg) connectionInterval() int { return xpc.Dict(m).MustGetInt("kCBMsgArgConnectionInterval") } func (m msg) connectionLatency() int { return xpc.Dict(m).MustGetInt("kCBMsgArgConnectionLatency") } func (m msg) supervisionTimeout() int { return xpc.Dict(m).MustGetInt("kCBMsgArgSupervisionTimeout") } func (m msg) err() error { if code := m.result(); code != 0 { return ble.ATTError(code) } return nil }
tolleiv/nuimo
vendor/github.com/currantlabs/ble/darwin/msg.go
GO
mit
3,116
class PSD class Renderer class Mask attr_accessor :mask_data def initialize(canvas, mask_layer = nil) @canvas = canvas @layer = canvas.node @mask_layer = mask_layer || @layer @mask_data = @mask_layer.image.mask_data @mask = @mask_layer.mask @mask_width = @mask.width.to_i @mask_height = @mask.height.to_i @mask_left = @mask.left.to_i + @mask_layer.left_offset @mask_top = @mask.top.to_i + @mask_layer.top_offset @doc_width = @layer.header.width.to_i @doc_height = @layer.header.height.to_i end def apply! PSD.logger.debug "Applying mask to #{@layer.name}" @canvas.height.times do |y| @canvas.width.times do |x| doc_x = @canvas.left + x doc_y = @canvas.top + y mask_x = doc_x - @mask_left mask_y = doc_y - @mask_top color = ChunkyPNG::Color.to_truecolor_alpha_bytes(@canvas.get_pixel(x, y)) if doc_x < 0 || doc_x >= @doc_width || doc_y < 0 || doc_y >= @doc_height color[3] = 0 elsif mask_x < 0 || mask_x >= @mask_width || mask_y < 0 || mask_y >= @mask_height color[3] = 0 else color[3] = color[3] * @mask_data[@mask_width * mask_y + mask_x] / 255 end @canvas.set_pixel x, y, ChunkyPNG::Color.rgba(*color) end end end end end end
jamesbeat/psd.rb
lib/psd/renderer/mask.rb
Ruby
mit
1,473
var format = require('util').format; var hl = require('highlight.js'); var escape = function(html) { return html. replace(/</g, '&lt;'). replace(/>/g, '&gt;'). replace(/"/g, '&quot;'). replace(/'/g, '&#39;'); }; try { var rs = require('robotskirt'); escape = rs.houdini.escapeHTML; } catch (e) { } exports.render = function(code, language) { language = exports.language(language); if (!language) { return '<pre>' + escape(code) + '</pre>'; } if (language === 'html') { language = 'xml'; } code = hl.highlight(language, code).value; return format( '<div class="highlight"><pre><code class="%s">%s</code></pre></div>', language, code ); }; exports.language = function(language) { if (!language) { return null; } if (language === 'html') { return 'html'; } var shortcuts = { 'js': 'javascript', 'json': 'javascript', 'py': 'python', 'rb': 'ruby', 'md': 'markdown', 'mkd': 'markdown', 'c++': 'cpp' }; if (language && shortcuts[language]) { language = shortcuts[language]; } if (!language || !hl.LANGUAGES[language]) { return null; } return language; };
jeakey/grunt-markdown-extend
tasks/lib/highlight.js
JavaScript
mit
1,176
<?php namespace Concrete\Core\File\Tracker; use Concrete\Core\Page\Collection\Collection; use Concrete\Core\Statistics\UsageTracker\TrackableInterface; interface FileTrackableInterface extends TrackableInterface { /** * @return array An array of file IDs or file objects */ public function getUsedFiles(); }
mlocati/concrete5
concrete/src/File/Tracker/FileTrackableInterface.php
PHP
mit
331
require 'spec_helper' describe Delayed::Worker do describe "backend=" do before do @clazz = Class.new Delayed::Worker.backend = @clazz end it "should set the Delayed::Job constant to the backend" do Delayed::Job.should == @clazz end it "should set backend with a symbol" do Delayed::Worker.backend = :test Delayed::Worker.backend.should == Delayed::Backend::Test::Job end end end
GrouponRussia/delayed_job
spec/worker_spec.rb
Ruby
mit
441
/* * Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice 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. * */ /*jslint vars: true, plusplus: true, devel: true, browser: true, nomen: true, indent: 4, maxerr: 50 */ /*global define, describe, it, expect, beforeEach, afterEach, waits, waitsFor, waitsForDone, runs, $, brackets, waitsForDone, spyOn */ define(function (require, exports, module) { "use strict"; var main = require("main"), FileUtils = brackets.getModule("file/FileUtils"), StaticServer = require("StaticServer"); var testFolder = FileUtils.getNativeModuleDirectoryPath(module) + "/unittest-files"; var CONNECT_TIMEOUT = 20000; function makeBaseUrl(serverInfo) { return "http://" + serverInfo.address + ":" + serverInfo.port; } function getUrl(serverInfo, path) { return $.get(makeBaseUrl(serverInfo) + path); } describe("StaticServer", function () { // Unit tests for the underlying node server. describe("StaticServerDomain", function () { var nodeConnection, nodeDomain, logs; beforeEach(function () { logs = []; if (!nodeConnection) { runs(function () { // wait for StaticServer/main to connect and load the StaticServerDomain nodeDomain = main._nodeDomain; nodeConnection = nodeDomain.connection; waitsFor(function () { return nodeDomain.ready(); }, "NodeConnection connected", CONNECT_TIMEOUT); }); runs(function () { $(nodeConnection).on("base.log", function (event, level, timestamp, message) { logs.push({level: level, message: message}); }); }); } }); afterEach(function () { runs(function () { // reset StaticServerDomain waitsForDone(nodeConnection.domains.staticServer._setRequestFilterTimeout(), "restore request filter timeout"); }); }); function onRequestFilter(callback) { // only handle the first event $(nodeConnection).one("staticServer.requestFilter", function cb(event, request) { callback(request); }); } it("should start a static server on the given folder", function () { var serverInfo, path = testFolder + "/folder1"; runs(function () { nodeConnection.domains.staticServer.getServer(path, 0) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { expect(serverInfo.address).toBe("127.0.0.1"); expect(Number(serverInfo.port)).toBeGreaterThan(0); waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); it("should start the server on the given port", function () { var serverInfo, path = testFolder + "/folder1"; runs(function () { nodeConnection.domains.staticServer.getServer(path, 54321) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { expect(serverInfo.port).toBe(54321); waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); it("should start a static server using a random port when the given port is already in use", function () { var serverInfo1, serverInfo2, path1 = testFolder + "/folder1", path2 = testFolder + "/folder2"; runs(function () { nodeConnection.domains.staticServer.getServer(path1, 54321) .done(function (info) { serverInfo1 = info; }); nodeConnection.domains.staticServer.getServer(path2, 54321) .done(function (info) { serverInfo2 = info; }); }); waitsFor(function () { return serverInfo1 && serverInfo2; }, "waiting for static servers to start"); runs(function () { expect(serverInfo1.port).toBe(54321); expect(serverInfo2.port).not.toBe(54321); expect(serverInfo2.port).toBeGreaterThan(0); waitsForDone(nodeConnection.domains.staticServer.closeServer(path1), "waiting for static server 1 to close"); waitsForDone(nodeConnection.domains.staticServer.closeServer(path2), "waiting for static server 2 to close"); }); }); it("should serve the text of a file in the given folder", function () { var serverInfo, text, path = testFolder + "/folder1"; runs(function () { nodeConnection.domains.staticServer.getServer(path, 0) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { getUrl(serverInfo, "/index.txt").done(function (data) { text = data; }); }); waitsFor(function () { return text; }, "waiting for text from server"); runs(function () { expect(text).toBe("This is a file in folder 1."); waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); it("should create separate servers for different folders", function () { var serverInfo1, serverInfo2, path1 = testFolder + "/folder1", path2 = testFolder + "/folder2"; runs(function () { nodeConnection.domains.staticServer.getServer(path1, 0) .done(function (info) { serverInfo1 = info; }); nodeConnection.domains.staticServer.getServer(path2, 0) .done(function (info) { serverInfo2 = info; }); }); waitsFor(function () { return serverInfo1 && serverInfo2; }, "waiting for static servers to start"); runs(function () { expect(serverInfo1.port).not.toBe(serverInfo2.port); waitsForDone(nodeConnection.domains.staticServer.closeServer(path1), "waiting for static server 1 to close"); waitsForDone(nodeConnection.domains.staticServer.closeServer(path2), "waiting for static server 2 to close"); }); }); it("should keep a previous server alive after creating a new server", function () { var serverInfo1, serverInfo2, path1 = testFolder + "/folder1", path2 = testFolder + "/folder2", text1, text2; runs(function () { nodeConnection.domains.staticServer.getServer(path1, 0) .done(function (info) { serverInfo1 = info; }); nodeConnection.domains.staticServer.getServer(path2, 0) .done(function (info) { serverInfo2 = info; }); }); waitsFor(function () { return serverInfo1 && serverInfo2; }, "waiting for static servers to start"); runs(function () { getUrl(serverInfo1, "/index.txt").done(function (data) { text1 = data; }); getUrl(serverInfo2, "/index.txt").done(function (data) { text2 = data; }); }); waitsFor(function () { return text1 && text2; }, "waiting for text from servers"); runs(function () { expect(text1).toBe("This is a file in folder 1."); expect(text2).toBe("This is a file in folder 2."); waitsForDone(nodeConnection.domains.staticServer.closeServer(path1), "waiting for static server 1 to close"); waitsForDone(nodeConnection.domains.staticServer.closeServer(path2), "waiting for static server 2 to close"); }); }); it("should trigger an event when a file path is requested", function () { var serverInfo, path = testFolder + "/folder1", text, location, elapsed, requestId, timeout = 500; runs(function () { nodeConnection.domains.staticServer.getServer(path, 0) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { onRequestFilter(function (request) { location = request.location; requestId = request.id; // Do not call writeFilteredResponse in order to hit timeout }); // listen for /index.txt requests waitsForDone(nodeConnection.domains.staticServer.setRequestFilterPaths(path, ["/index.txt"])); // set a custom timeout waitsForDone(nodeConnection.domains.staticServer._setRequestFilterTimeout(timeout)); }); runs(function () { // it should take longer than the StaticServerDomain timeout to get a response elapsed = new Date(); // request /index.txt getUrl(serverInfo, "/index.txt").done(function (data) { elapsed = new Date() - elapsed; text = data; }); }); waitsFor(function () { return location && text; }, "waiting for request event to fire"); runs(function () { expect(requestId).toBeGreaterThan(-1); expect(location.pathname).toBe("/index.txt"); expect(text).toBe("This is a file in folder 1."); // we should hit the timeout since we filtered this path and did not respond expect(elapsed).toBeGreaterThan(timeout); waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); it("should send static file contents after canceling a filter request", function () { var serverInfo, path = testFolder + "/folder1", text, location, requestId; runs(function () { nodeConnection.domains.staticServer.getServer(path, 0) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { // listen for request event onRequestFilter(function (request) { location = request.location; requestId = request.id; nodeConnection.domains.staticServer.writeFilteredResponse(request.root, request.pathname, {id: requestId}); // a second call to send does nothing nodeConnection.domains.staticServer.writeFilteredResponse(request.root, request.pathname, {id : requestId, body: "custom response"}); }); // listen for /index.txt requests waitsForDone(nodeConnection.domains.staticServer.setRequestFilterPaths(path, ["/index.txt"])); }); runs(function () { // request /index.txt getUrl(serverInfo, "/index.txt").done(function (data) { text = data; }); }); waitsFor(function () { return location && text; }, "waiting for request event to fire"); runs(function () { expect(requestId).toBeGreaterThan(-1); expect(location.pathname).toBe("/index.txt"); expect(text).toBe("This is a file in folder 1."); waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); it("should override the static file server response with a new response body", function () { var serverInfo, path = testFolder + "/folder1", text, location, requestId; runs(function () { nodeConnection.domains.staticServer.getServer(path, 0) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { // listen for request event onRequestFilter(function (request) { location = request.location; requestId = request.id; nodeConnection.domains.staticServer.writeFilteredResponse(location.root, location.pathname, {id: requestId, body: "custom response"}); }); // listen for /index.txt requests waitsForDone(nodeConnection.domains.staticServer.setRequestFilterPaths(path, ["/index.txt"])); }); runs(function () { // request /index.txt getUrl(serverInfo, "/index.txt").done(function (data) { text = data; }); }); waitsFor(function () { return location && text; }, "waiting for text from server"); runs(function () { expect(requestId).toBeGreaterThan(-1); expect(location.pathname).toBe("/index.txt"); expect(text).toBe("custom response"); waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); it("should ignore multiple responses for the same request", function () { var serverInfo, path = testFolder + "/folder1", text, location, requestId; runs(function () { nodeConnection.domains.staticServer.getServer(path, 0) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { // listen for request event onRequestFilter(function (request) { location = request.location; requestId = request.id; nodeConnection.domains.staticServer.writeFilteredResponse(location.root, location.pathname, {id: requestId, body: "good response"}); nodeConnection.domains.staticServer.writeFilteredResponse(location.root, location.pathname, {id: requestId, body: "bad response"}); }); // listen for /index.txt requests waitsForDone(nodeConnection.domains.staticServer.setRequestFilterPaths(path, ["/index.txt"])); }); runs(function () { // request /index.txt getUrl(serverInfo, "/index.txt").done(function (data) { text = data; }); }); waitsFor( function () { return location && text && (logs.length > 0); }, "waiting for text from server and warning in log" ); runs(function () { expect(logs.length).toBe(1); expect(logs[0].level).toBe("warn"); expect(logs[0].message.indexOf("writeFilteredResponse")).toBe(0); expect(requestId).toBeGreaterThan(-1); expect(location.pathname).toBe("/index.txt"); expect(text).toBe("good response"); // cleanup waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); it("should log a warning when writing to a non-existant request", function () { var serverInfo, path = testFolder + "/folder1", text, requestId = -1; spyOn(console, "warn").andCallThrough(); onRequestFilter(function (request) { requestId = request.id; }); runs(function () { nodeConnection.domains.staticServer.getServer(path, 0) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { // write response before the request waitsForDone(nodeConnection.domains.staticServer.writeFilteredResponse(path, "/index.txt", {id: requestId, body: "custom response"})); }); runs(function () { // request /index.txt getUrl(serverInfo, "/index.txt").done(function (data) { text = data; }); }); runs(function () { // write response after the request waitsForDone(nodeConnection.domains.staticServer.writeFilteredResponse(path, "/index.txt", {id: requestId, body: "custom response"})); }); waitsFor(function () { return text; }, "waiting for text from server"); runs(function () { // verify console warning expect(logs.length).toBe(2); logs.forEach(function (log) { expect(log.level).toBe("warn"); expect(log.message.indexOf("writeFilteredResponse")).toBe(0); }); // verify original file content expect(text).toBe("This is a file in folder 1."); expect(requestId).toBe(-1); // cleanup waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); it("should should require paths to be filtered for events to fire", function () { var serverInfo, path = testFolder + "/folder1", text = null, location = null, requestId = -1, elapsed, timeout = 500; runs(function () { nodeConnection.domains.staticServer.getServer(path, 0) .done(function (info) { serverInfo = info; }); }); waitsFor(function () { return serverInfo; }, "waiting for static server to start"); runs(function () { onRequestFilter(function (request) { location = request.location; requestId = request.id; }); // set a custom timeout waitsForDone(nodeConnection.domains.staticServer._setRequestFilterTimeout(timeout)); }); runs(function () { // it should take less than the 500ms timeout to get a response elapsed = new Date(); // request /index.txt getUrl(serverInfo, "/index.txt").done(function (data) { elapsed = new Date() - elapsed; text = data; }); }); waits(timeout); runs(function () { // requestFilter should never fire, location is never returned expect(location).toBeNull(); // original content expect(text).toBe("This is a file in folder 1."); // server should respond with original content before the timeout lapses expect(elapsed).toBeLessThan(timeout); expect(requestId).toBe(-1); waitsForDone(nodeConnection.domains.staticServer.closeServer(path), "waiting for static server to close"); }); }); }); // Unit tests for the StaticServerProvider that wraps the underlying node server. describe("StaticServer", function () { var projectPath = testFolder + "/", mockNodeDomain = { ready: function () { return true; } }, pathResolver = function (path) { if (path.indexOf(projectPath) === 0) { return path.slice(projectPath.length); } return path; }, config = { baseUrl: "http://localhost/", nodeDomain: mockNodeDomain, pathResolver: pathResolver, root: projectPath, port: 0 }; it("should translate local paths to server paths", function () { var outsidePath = testFolder.substr(0, testFolder.lastIndexOf("/") + 1), fileProtocol = (brackets.platform === "win") ? "file:///" : "file://", fileRelPath = "subdir/index.html", file1Path = projectPath + fileRelPath, file2Path = outsidePath + fileRelPath, file2FileUrl = encodeURI(fileProtocol + outsidePath + fileRelPath), file1ServerUrl = config.baseUrl + encodeURI(fileRelPath), server = new StaticServer(config); // Should use server url with base url expect(server.pathToUrl(file1Path)).toBe(file1ServerUrl); expect(server.urlToPath(file1ServerUrl)).toBe(file1Path); // File outside project should still use file url expect(server.pathToUrl(file2Path)).toBe(null); expect(server.urlToPath(file2FileUrl)).toBe(null); }); it("should only serve html files that are in the project file hierarchy", function () { var server = new StaticServer(config); // should not serve files outside project hierarchy expect(server.canServe("/foo.html")).toBe(false); // should not serve non-HTML files inside hierarchy expect(server.canServe(testFolder + "/foo.jpg")).toBe(false); // should serve .htm files inside hierarchy expect(server.canServe(testFolder + "/foo.htm")).toBe(true); // should serve .html files inside hierarchy expect(server.canServe(testFolder + "/foo.html")).toBe(true); // should serve .HTML files inside hierarchy expect(server.canServe(testFolder + "/foo.HTML")).toBe(true); // should serve root of hierarchy expect(server.canServe(testFolder + "/")).toBe(true); }); it("should decline serving if not connected to node", function () { // mock NodeConnection state to be disconnected config.nodeDomain = { ready: function () { return false; } }; var server = new StaticServer(config); expect(server.canServe(testFolder + "foo.html")).toBe(false); }); }); }); });
bglassy/brackets
src/extensions/default/StaticServer/unittests.js
JavaScript
mit
28,972
# explicit mock object class due to this issue - https://github.com/btakita/rr/issues/44 class MockObject def to_ary nil end end
bezugen/mongoid_alize
spec/app/models/mock_object.rb
Ruby
mit
137
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Examples of Root-Finding (with and without derivatives)</title> <link rel="stylesheet" href="../math.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../index.html" title="Math Toolkit 2.8.0"> <link rel="up" href="../root_finding.html" title="Chapter&#160;8.&#160;Root Finding &amp; Minimization Algorithms"> <link rel="prev" href="roots_deriv.html" title="Root Finding With Derivatives: Newton-Raphson, Halley &amp; Schr&#246;der"> <link rel="next" href="root_finding_examples/cbrt_eg.html" title="Finding the Cubed Root With and Without Derivatives"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td align="center"><a href="../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="roots_deriv.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../root_finding.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="root_finding_examples/cbrt_eg.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="math_toolkit.root_finding_examples"></a><a class="link" href="root_finding_examples.html" title="Examples of Root-Finding (with and without derivatives)">Examples of Root-Finding (with and without derivatives)</a> </h2></div></div></div> <div class="toc"><dl class="toc"> <dt><span class="section"><a href="root_finding_examples/cbrt_eg.html">Finding the Cubed Root With and Without Derivatives</a></span></dt> <dt><span class="section"><a href="root_finding_examples/lambda.html">Using C++11 Lambda's</a></span></dt> <dt><span class="section"><a href="root_finding_examples/5th_root_eg.html">Computing the Fifth Root</a></span></dt> <dt><span class="section"><a href="root_finding_examples/multiprecision_root.html">Root-finding using Boost.Multiprecision</a></span></dt> <dt><span class="section"><a href="root_finding_examples/nth_root.html">Generalizing to Compute the nth root</a></span></dt> <dt><span class="section"><a href="root_finding_examples/elliptic_eg.html">A More complex example - Inverting the Elliptic Integrals</a></span></dt> </dl></div> <p> The examples demonstrate how to use the various tools for <a href="http://en.wikipedia.org/wiki/Root-finding_algorithm" target="_top">root finding</a>. </p> <p> We start with the simple cube root function <code class="computeroutput"><span class="identifier">cbrt</span></code> ( C++ standard function name <a href="http://en.cppreference.com/w/cpp/numeric/math/cbrt" target="_top">cbrt</a>) showing root finding <a class="link" href="root_finding_examples/cbrt_eg.html#math_toolkit.root_finding_examples.cbrt_eg.cbrt_no_derivatives">without derivatives</a>. </p> <p> We then show how use of derivatives can improve the speed of convergence. </p> <p> (But these examples are only a demonstration and do not try to make the ultimate improvements of an 'industrial-strength' implementation, for example, of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cbrt</span></code>, mainly by using a better computed initial 'guess' at <a href="../../../../../libs/math/include/boost/math/special_functions/cbrt.hpp" target="_top">cbrt.hpp</a>). </p> <p> Then we show how a higher root (<a class="link" href="root_finding_examples/5th_root_eg.html" title="Computing the Fifth Root">fifth root</a>) <sup>5</sup>&#8730; can be computed, and in <a href="../../../example/root_finding_n_example.cpp" target="_top">root_finding_n_example.cpp</a> a generic method for the <a class="link" href="root_finding_examples/nth_root.html" title="Generalizing to Compute the nth root">nth root</a> that constructs the derivatives at compile-time. </p> <p> These methods should be applicable to other functions that can be differentiated easily. </p> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2006-2010, 2012-2014, 2017 Nikhar Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R&#229;de, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="roots_deriv.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../root_finding.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="root_finding_examples/cbrt_eg.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
nawawi/poedit
deps/boost/libs/math/doc/html/math_toolkit/root_finding_examples.html
HTML
mit
6,184
--- layout: default --- <a class="btn" href= "{{ site.url }}/" > Home </a> {% if page.image.feature %} <div class="post-image-feature"> <img class="feature-image" src= {% if page.image.feature contains 'https' or page.image.feature contains 'http' %} "{{ page.image.feature }}" {% else %} "{{ site.url }}/img/{{ page.image.feature }}" {% endif %} alt="{{ page.title | escape }} feature image"> {% if page.image.credit %} <span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span> {% endif %} </div><!-- /.image-wrap --> {% endif %} <div id="post"> <header class="post-header"> <h1 title="{{ page.title | escape }}">{{ page.title }}</h1> <span class="post-meta"> <span class="post-date"> {{ page.date | date: "%-d %b %Y" | upcase }} </span> • {% include read_time.html %} </span> </header> <article class="post-content"> {{ content }} </article> </div> <div class="share-buttons"> <h6>Share on: </h6> <ul> <li> <a href="https://twitter.com/intent/tweet?text={{ site.url }}{{ page.url }}" class="twitter btn" title="Share on Twitter"><i class="fa fa-twitter"></i><span> Twitter</span></a> </li> <li> <a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ page.url }}" class="facebook btn" title="Share on Facebook"><i class="fa fa-facebook"></i><span> Facebook</span></a> </li> <li> <a href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}" class="google-plus btn" title="Share on Google Plus"><i class="fa fa-google-plus"></i><span> Google+</span></a> </li> <li> <a href="https://news.ycombinator.com/submitlink?u={{ site.url }}{{ page.url }}" class="hacker-news btn" title="Share on Hacker News"><i class="fa fa-hacker-news"></i><span> Hacker News</span></a> </li> <li> <a href="https://www.reddit.com/submit?url={{ site.url }}{{ page.url }}" class="reddit btn" title="Share on Reddit"><i class="fa fa-reddit"></i><span> Reddit</span></a> </li> </ul> </div><!-- end share-buttons --> {% if site.owner.disqus-shortname and page.comments == true %} <div id="disqus_thread"></div> {% include disqus.html %} {% endif %}
karan-kapoor90/karankapoor.in
_layouts/post.html
HTML
mit
2,266
import BasePlugin from './../_base'; import {arrayEach} from './../../helpers/array'; import {CommandExecutor} from './commandExecutor'; import {EventManager} from './../../eventManager'; import {hasClass} from './../../helpers/dom/element'; import {ItemsFactory} from './itemsFactory'; import {Menu} from './menu'; import {objectEach, mixin} from './../../helpers/object'; import {registerPlugin} from './../../plugins'; import {stopPropagation, pageX, pageY} from './../../helpers/dom/event'; import {getWindowScrollLeft, getWindowScrollTop} from './../../helpers/dom/element'; import { ROW_ABOVE, ROW_BELOW, COLUMN_LEFT, COLUMN_RIGHT, REMOVE_ROW, REMOVE_COLUMN, UNDO, REDO, READ_ONLY, ALIGNMENT, SEPARATOR, predefinedItems } from './predefinedItems'; /** * @description * This plugin creates the Handsontable Context Menu. It allows to create new row or * column at any place in the grid among [other features](http://docs.handsontable.com/demo-context-menu.html). * Possible values: * * `true` (to enable default options), * * `false` (to disable completely) * * or array of any available strings: * * `["row_above", "row_below", "col_left", "col_right", * "remove_row", "remove_col", "---------", "undo", "redo"]`. * * See [the context menu demo](http://docs.handsontable.com/demo-context-menu.html) for examples. * * @example * ```js * ... * // as a boolean * contextMenu: true * ... * // as a array * contextMenu: ['row_above', 'row_below', '--------', 'undo', 'redo'] * ... * ``` * * @plugin ContextMenu */ class ContextMenu extends BasePlugin { /** * Default menu items order when `contextMenu` is enabled by `true`. * * @returns {Array} */ static get DEFAULT_ITEMS() { return [ ROW_ABOVE, ROW_BELOW, SEPARATOR, COLUMN_LEFT, COLUMN_RIGHT, SEPARATOR, REMOVE_ROW, REMOVE_COLUMN, SEPARATOR, UNDO, REDO, SEPARATOR, READ_ONLY, SEPARATOR, ALIGNMENT, ]; } constructor(hotInstance) { super(hotInstance); /** * Instance of {@link EventManager}. * * @type {EventManager} */ this.eventManager = new EventManager(this); /** * Instance of {@link CommandExecutor}. * * @type {CommandExecutor} */ this.commandExecutor = new CommandExecutor(this.hot); /** * Instance of {@link ItemsFactory}. * * @type {ItemsFactory} */ this.itemsFactory = null; /** * Instance of {@link Menu}. * * @type {Menu} */ this.menu = null; } /** * Check if the plugin is enabled in the Handsontable settings. * * @returns {Boolean} */ isEnabled() { return this.hot.getSettings().contextMenu; } /** * Enable plugin for this Handsontable instance. */ enablePlugin() { if (this.enabled) { return; } this.itemsFactory = new ItemsFactory(this.hot, ContextMenu.DEFAULT_ITEMS); const settings = this.hot.getSettings().contextMenu; let predefinedItems = { items: this.itemsFactory.getVisibleItems(settings) }; this.registerEvents(); if (typeof settings.callback === 'function') { this.commandExecutor.setCommonCallback(settings.callback); } super.enablePlugin(); this.callOnPluginsReady(() => { this.hot.runHooks('afterContextMenuDefaultOptions', predefinedItems); this.itemsFactory.setPredefinedItems(predefinedItems.items); let menuItems = this.itemsFactory.getVisibleItems(settings); this.menu = new Menu(this.hot, {className: 'htContextMenu', keepInViewport: true}); this.menu.setMenuItems(menuItems); this.menu.addLocalHook('afterOpen', () => this.onMenuAfterOpen()); this.menu.addLocalHook('afterClose', () => this.onMenuAfterClose()); this.menu.addLocalHook('executeCommand', (...params) => this.executeCommand.apply(this, params)); // Register all commands. Predefined and added by user or by plugins arrayEach(menuItems, (command) => this.commandExecutor.registerCommand(command.key, command)); }); } /** * Update the plugin according to Handsontable settings. */ updatePlugin() { this.disablePlugin(); this.enablePlugin(); super.updatePlugin(); } /** * Disable plugin for this Handsontable instance. */ disablePlugin() { this.close(); if (this.menu) { this.menu.destroy(); this.menu = null; } super.disablePlugin(); } /** * Register dom listeners. * * @private */ registerEvents() { this.eventManager.addEventListener(this.hot.rootElement, 'contextmenu', (event) => this.onContextMenu(event)); } /** * Open menu and re-position it based on dom event object. * * @param {Event} event The event object. */ open(event) { if (!this.menu) { return; } this.menu.open(); this.menu.setPosition({ top: parseInt(pageY(event), 10) - getWindowScrollTop(), left: parseInt(pageX(event), 10) - getWindowScrollLeft(), }); // ContextMenu is not detected HotTableEnv correctly because is injected outside hot-table this.menu.hotMenu.isHotTableEnv = this.hot.isHotTableEnv; Handsontable.eventManager.isHotTableEnv = this.hot.isHotTableEnv; } /** * Close menu. */ close() { if (!this.menu) { return; } this.menu.close(); } /** * Execute context menu command. * * You can execute all predefined commands: * * `'row_above'` - Insert row above * * `'row_below'` - Insert row below * * `'col_left'` - Insert column on the left * * `'col_right'` - Insert column on the right * * `'clear_column'` - Clear selected column * * `'remove_row'` - Remove row * * `'remove_col'` - Remove column * * `'undo'` - Undo last action * * `'redo'` - Redo last action * * `'make_read_only'` - Make cell read only * * `'alignment:left'` - Alignment to the left * * `'alignment:top'` - Alignment to the top * * `'alignment:right'` - Alignment to the right * * `'alignment:bottom'` - Alignment to the bottom * * `'alignment:middle'` - Alignment to the middle * * `'alignment:center'` - Alignment to the center (justify) * * Or you can execute command registered in settings where `key` is your command name. * * @param {String} commandName * @param {*} params */ executeCommand(...params) { this.commandExecutor.execute.apply(this.commandExecutor, params); } /** * On context menu listener. * * @private * @param {Event} event */ onContextMenu(event) { let settings = this.hot.getSettings(); let showRowHeaders = settings.rowHeaders; let showColHeaders = settings.colHeaders; function isValidElement(element) { return element.nodeName === 'TD' || element.parentNode.nodeName === 'TD'; } // if event is from hot-table we must get web component element not element inside him let element = event.realTarget; this.close(); event.preventDefault(); stopPropagation(event); if (!(showRowHeaders || showColHeaders)) { if (!isValidElement(element) && !(hasClass(element, 'current') && hasClass(element, 'wtBorder'))) { return; } } else if (showRowHeaders && showColHeaders) { // do nothing after right-click on corner header let containsCornerHeader = element.parentNode.querySelectorAll('.cornerHeader').length > 0; if (containsCornerHeader) { return; } } this.open(event); } /** * On menu after open listener. * * @private */ onMenuAfterOpen() { this.hot.runHooks('afterContextMenuShow', this); } /** * On menu after close listener. * * @private */ onMenuAfterClose() { this.hot.listen(); this.hot.runHooks('afterContextMenuHide', this); } /** * Destroy instance. */ destroy() { this.close(); if (this.menu) { this.menu.destroy(); } super.destroy(); } } ContextMenu.SEPARATOR = { name: SEPARATOR }; Handsontable.hooks.register('afterContextMenuDefaultOptions'); Handsontable.hooks.register('afterContextMenuShow'); Handsontable.hooks.register('afterContextMenuHide'); Handsontable.hooks.register('afterContextMenuExecute'); export {ContextMenu}; registerPlugin('contextMenu', ContextMenu);
anandmehrotra/handsontable
src/plugins/contextMenu/contextMenu.js
JavaScript
mit
8,370
/* * The MIT License * * Copyright (c) 2015, Sebastian Sdorra * * 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. */ 'use strict'; angular.module('adf') .directive('adfWidget', function($log, $modal, dashboard, adfTemplatePath) { function preLink($scope) { var definition = $scope.definition; if (definition) { var w = dashboard.widgets[definition.type]; if (w) { // pass title if (!definition.title) { definition.title = w.title; } if (!definition.titleTemplateUrl) { definition.titleTemplateUrl = adfTemplatePath + 'widget-title.html'; if (w.titleTemplateUrl) { definition.titleTemplateUrl = w.titleTemplateUrl; } } if (!definition.titleTemplateUrl) { definition.frameless = w.frameless; } // set id for sortable if (!definition.wid) { definition.wid = dashboard.id(); } // pass copy of widget to scope $scope.widget = angular.copy(w); // create config object var config = definition.config; if (config) { if (angular.isString(config)) { config = angular.fromJson(config); } } else { config = {}; } // pass config to scope $scope.config = config; // collapse exposed $scope.widgetState property if (!$scope.widgetState) { $scope.widgetState = {}; $scope.widgetState.isCollapsed = false; } } else { $log.warn('could not find widget ' + definition.type); } } else { $log.debug('definition not specified, widget was probably removed'); } } function postLink($scope, $element) { var definition = $scope.definition; if (definition) { // bind close function var deleteWidget = function() { var column = $scope.col; if (column) { var index = column.widgets.indexOf(definition); if (index >= 0) { column.widgets.splice(index, 1); } } $element.remove(); }; $scope.remove = function() { if ($scope.options.enableConfirmDelete) { var deleteScope = $scope.$new(); var deleteTemplateUrl = adfTemplatePath + 'widget-delete.html'; if (definition.deleteTemplateUrl) { deleteTemplateUrl = definition.deleteTemplateUrl; } var opts = { scope: deleteScope, templateUrl: deleteTemplateUrl, backdrop: 'static' }; var instance = $modal.open(opts); deleteScope.closeDialog = function() { instance.close(); deleteScope.$destroy(); }; deleteScope.deleteDialog = function() { deleteWidget(); deleteScope.closeDialog(); }; } else { deleteWidget(); } }; // bind reload function $scope.reload = function() { $scope.$broadcast('widgetReload'); }; // bind edit function $scope.edit = function() { var editScope = $scope.$new(); editScope.definition = angular.copy(definition); var adfEditTemplatePath = adfTemplatePath + 'widget-edit.html'; if (definition.editTemplateUrl) { adfEditTemplatePath = definition.editTemplateUrl; } var opts = { scope: editScope, templateUrl: adfEditTemplatePath, backdrop: 'static' }; var instance = $modal.open(opts); editScope.closeDialog = function() { instance.close(); editScope.$destroy(); }; editScope.saveDialog = function() { definition.title = editScope.definition.title; angular.extend(definition.config, editScope.definition.config); var widget = $scope.widget; if (widget.edit && widget.edit.reload) { // reload content after edit dialog is closed $scope.$broadcast('widgetConfigChanged'); } editScope.closeDialog(); }; }; } else { $log.debug('widget not found'); } } return { replace: true, restrict: 'EA', transclude: false, templateUrl: adfTemplatePath + 'widget.html', scope: { definition: '=', col: '=column', editMode: '=', options: '=', widgetState: '=' }, controller: function($scope) { $scope.$on('adfDashboardCollapseExapand', function(event, args) { $scope.widgetState.isCollapsed = args.collapseExpandStatus; }); $scope.openFullScreen = function() { var definition = $scope.definition; var fullScreenScope = $scope.$new(); var opts = { scope: fullScreenScope, templateUrl: adfTemplatePath + 'widget-fullscreen.html', size: definition.modalSize || 'lg', // 'sm', 'lg' backdrop: 'static', windowClass: (definition.fullScreen) ? 'dashboard-modal widget-fullscreen' : 'dashboard-modal' }; var instance = $modal.open(opts); fullScreenScope.closeDialog = function() { instance.close(); fullScreenScope.$destroy(); }; }; }, compile: function() { /** * use pre link, because link of widget-content * is executed before post link widget */ return { pre: preLink, post: postLink }; } }; });
ugbandula/angular-dashboard-framework
src/scripts/widget.js
JavaScript
mit
6,909
.cm-s-eclipse span.cm-meta { color: #FF1717; } .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } .cm-s-eclipse span.cm-atom { color: #219; } .cm-s-eclipse span.cm-number { color: #164; } .cm-s-eclipse span.cm-def { color: #00f; } .cm-s-eclipse span.cm-variable { color: black; } .cm-s-eclipse span.cm-variable-2 { color: #0000C0; } .cm-s-eclipse span.cm-variable-3 { color: #0000C0; } .cm-s-eclipse span.cm-property { color: black; } .cm-s-eclipse span.cm-operator { color: black; } .cm-s-eclipse span.cm-comment { color: #3F7F5F; } .cm-s-eclipse span.cm-string { color: #2A00FF; } .cm-s-eclipse span.cm-string-2 { color: #f50; } .cm-s-eclipse span.cm-qualifier { color: #555; } .cm-s-eclipse span.cm-builtin { color: #30a; } .cm-s-eclipse span.cm-bracket { color: #cc7; } .cm-s-eclipse span.cm-tag { color: #170; } .cm-s-eclipse span.cm-attribute { color: #00c; } .cm-s-eclipse span.cm-link { color: #219; } .cm-s-eclipse span.cm-error { color: #f00; } .cm-s-eclipse .CodeMirror-activeline-background { background: #e8f2ff !important; } .cm-s-eclipse .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
axter/CodeMirror
theme/eclipse.css
CSS
mit
1,170
package org.knowm.xchange.cryptonit2.test; import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import org.junit.Test; import org.knowm.xchange.cryptonit2.CryptonitAdapters; import org.knowm.xchange.cryptonit2.dto.trade.CryptonitOrderStatusResponse; import org.knowm.xchange.cryptonit2.order.dto.CryptonitGenericOrder; import org.knowm.xchange.currency.CurrencyPair; import com.fasterxml.jackson.databind.ObjectMapper; public class CryptonitAdapterTests { @Test public void testAdaptMarketOrder() throws IOException { // Read in the JSON from the example resources InputStream is = CryptonitAdapters.class.getResourceAsStream("/order/example-market-order-filled.json"); // Use Jackson to parse it ObjectMapper mapper = new ObjectMapper(); CryptonitOrderStatusResponse cryptonitQueryOrderResult = mapper.readValue(is, CryptonitOrderStatusResponse.class); CryptonitGenericOrder order = CryptonitAdapters.adaptOrder("123", cryptonitQueryOrderResult); assertThat(order.getId()).isEqualTo("123"); assertThat(order.getAveragePrice()).isEqualTo(new BigDecimal("256.08000000")); assertThat(order.getCumulativeAmount()).isEqualTo(new BigDecimal("0.20236360")); assertThat(order.getCurrencyPair()).isEqualTo(CurrencyPair.LTC_USD); } }
chrisrico/XChange
xchange-cryptonit/test/java/org/knowm/xchange/cryptonit/test/CryptonitAdapterTests.java
Java
mit
1,373
--- title: 第一届中国R语言会议 date: '2009-12-21T09:01:24+00:00' author: COS管理员 forum_id: 418708 --- 时间:2008年12月13日~14日 地点:中国人民大学 会议通知及纪要: * [第一届中国R语言会议将于12月中旬在中国人民大学召开](/2008/11/r-conference-notice/) * [第一届中国R语言会议纪要](/2008/12/1st-chinese-r-conference-summary/) 主办:中国人民大学应用统计科学研究中心、中国人民大学统计学院 协办:统计之都
Lchiffon/cosx.org
content/chinar/chinar-2008.md
Markdown
mit
516
<?php /* * This file is apart of the DiscordPHP project. * * Copyright (c) 2016 David Cole <david@team-reflex.com> * * This source file is subject to the MIT license that is bundled * with this source code in the LICENSE.md file. */ namespace Discord\WebSockets\Events; use Discord\Parts\Channel\Channel; use Discord\WebSockets\Event; use React\Promise\Deferred; class ChannelUpdate extends Event { /** * {@inheritdoc} */ public function handle(Deferred $deferred, $data) { $channel = $this->factory->create(Channel::class, $data, true); if ($channel->is_private) { $old = $this->discord->private_channels->get('id', $channel->id); $this->discord->private_channels->push($channel); } else { $guild = $this->discord->guilds->get('id', $channel->guild_id); $old = $guild->channels->get('id', $channel->id); $guild->channels->push($channel); } $deferred->resolve([$channel, $old]); } }
TrekkerStudios/AnswerBot
vendor/team-reflex/discord-php/src/Discord/WebSockets/Events/ChannelUpdate.php
PHP
mit
1,024
module OpenStack module Image class Connection attr_accessor :connection def initialize(connection) @connection = connection OpenStack::Authentication.init(@connection) end end end end
tiwillia/ruby-openstack
lib/openstack/image/connection.rb
Ruby
mit
220
# The MIT License (MIT) Copyright (c) 2014 [Michael A. Smith](mailto:michael@smith-li.com) 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.
omusico/docker-magento
LICENSE.md
Markdown
mit
1,116
#!/usr/bin/env python3 from python_utility.command_process import CommandProcess def main(): process = CommandProcess( arguments=[ 'flake8', '--exclude', '.git,.idea,.tox', '--verbose', '--max-complexity', '5' ], ) process.print_output() if __name__ == '__main__': main()
FunTimeCoding/jenkins-job-manager
script/python/flake8.py
Python
mit
357
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. The MySQL Connector/C++ is licensed under the terms of the GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors. There are special exceptions to the terms and conditions of the GPLv2 as it is applied to this software, see the FLOSS License Exception <http://www.mysql.com/about/legal/licensing/foss-exception.html>. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _BASE_TEST_FIXTURE_ #define _BASE_TEST_FIXTURE_ #include <math.h> #include "resources.h" #include <driver/mysql_public_iface.h> #include "../framework/framework.h" #include "../common/ccppTypes.h" #include "../common/stringutils.h" #define MESSAGE(msg) TestsListener::messagesLog() << msg << std::endl; /** * Base class for all test cases. Creates connections, statements, etc. and * closes them. * * @author Mark Matthews * @version $Id: BaseTestCase.java 5440 2006-06-27 17:00:53 +0000 (Tue, 27 Jun * 2006) mmatthews $ */ namespace testsuite { typedef std::auto_ptr<sql::Connection> Connection; typedef std::auto_ptr<sql::PreparedStatement> PreparedStatement; typedef std::auto_ptr<sql::Statement> Statement; typedef std::auto_ptr<sql::ResultSet> ResultSet; typedef sql::Driver Driver; typedef sql::ResultSetMetaData * ResultSetMetaData; typedef sql::DatabaseMetaData * DatabaseMetaData; class value_object { private: String asString; bool wasNull; public: enum value_type { vtDouble=0, vtFloat, vtByte, vtLast }; value_object(); value_object(const sql::ResultSet *, int colNum); bool isNull() const; String toString() const { return asString; } int intValue() const; float floatValue() const; long long longValue() const; /** Based on correspondent methods implementation in the mysql_resultset class */ double doubleValue() const { return floatValue(); } bool booleanValue() const { return intValue() != 0; } //Little hack bool instanceof(value_type type); }; typedef std::auto_ptr<value_object> Object; value_object * getObject(sql::ResultSet * rs, int colNum); // TODO: Move everything from TestFixtureCommon to BaseTestFixture struct TestFixtureCommon { TestFixtureCommon(); String extractVal(const String & sTableName , int count , Properties & sqlProps , Connection & conn); static void logMsg(String message); void logErr(String message); static String randomString(); protected: void init(); static const String NO_MULTI_HOST_PROPERTY_NAME; String host; String port; String login; String passwd; String db; static int instanceCount; static int propsLoaded; static Properties sqlProps; static Driver *driver; }; /************************************************************************/ /* */ /************************************************************************/ class BaseTestFixture : public TestSuite, public TestFixtureCommon { typedef TestSuite super; List createdObjects; /** My instance number */ int myInstanceNumber; protected: /** Connection to server, initialized in setUp() Cleaned up in tearDown(). */ Connection conn; /** The driver to use */ String dbClass; /** * PreparedStatement to be used in tests, not initialized. Cleaned up in * tearDown(). */ PreparedStatement pstmt; /** * Statement to be used in tests, initialized in setUp(). Cleaned up in * tearDown(). */ Statement stmt; /** * ResultSet to be used in tests, not initialized. Cleaned up in tearDown(). */ ResultSet rs; bool hasSps; enum standard_tables { TABLE_CTSTABLE1 = 0, TABLE_CTSTABLE2, TABLE_INTEGERTAB, TABLE_BITTAB, TABLE_DOUBLETAB, TABLE_BIGINTTAB, TABLE_CHARTAB, TABLE_VARCHARTAB, TABLE_FLOATTAB, TABLE_SMALLINTTAB, TABLE_LONGVARCHARNULLTAB }; /** * Standard SQL tables shared by many tests */ void createStandardTable(standard_tables table); /* throws SQLException */ void createSchemaObject(String objectType, String objectName, String columnsAndOtherStuff); /* throws SQLException */ void createFunction(String functionName, String functionDefn); /* throws SQLException */ void dropFunction(String functionName); /* throws SQLException */ void createProcedure(String procedureName, String procedureDefn); /* throws SQLException */ void dropProcedure(String procedureName); /* throws SQLException */ void createTable(String tableName, String columnsAndOtherStuff); /* throws SQLException */ void dropTable(String tableName); /* throws SQLException */ void dropSchemaObject(String objectType, String objectName); sql::Connection * getConnection(); /* throws SQLException */ sql::Connection * getAdminConnection(); /* throws SQLException */ sql::Connection * getAdminConnectionWithProps(Properties props); /* throws SQLException */ sql::Connection * getConnectionWithProps(const String & propsList); /* throws SQLException */ sql::Connection * getConnectionWithProps(const String & url, const String & propsList); /** * Returns a new connection with the given properties * * @param props * the properties to use (the URL will come from the standard for * this testcase). * * @return a new connection using the given properties. * * @throws SQLException * DOCUMENT ME! */ /* throws SQLException */ sql::Connection * getConnectionWithProps(const Properties & props); /* throws SQLException */ sql::Connection * getConnectionWithProps(const String & url, const Properties & props); /** * Returns the per-instance counter (for messages when multi-threading * stress tests) * * @return int the instance number */ int getInstanceNumber(); /* throws SQLException */ String getMysqlVariable(Connection & c, const String & variableName); /** * Returns the named MySQL variable from the currently connected server. * * @param variableName * the name of the variable to return * * @return the value of the given variable, or NULL if it doesn't exist * * @throws SQLException * if an error occurs */ /* throws SQLException */ String getMysqlVariable(const String & variableName); /** * Returns the properties that represent the default URL used for * connections for all testcases. * * @return properties parsed from com.mysql.jdbc.testsuite.url * * @throws SQLException * if parsing fails */ /* throws SQLException */ /*Properties getPropertiesFromTestsuiteUrl() ;*/ /* throws SQLException */ int getRowCount(const String & tableName); /* throws SQLException */ value_object getSingleIndexedValueWithQuery(Connection & c, int columnIndex, const String & query); /* throws SQLException */ value_object getSingleIndexedValueWithQuery(int columnIndex, const String & query); /* throws SQLException */ value_object getSingleValue(const String & tableName, const String & columnName, const String & whereClause); /* throws SQLException */ value_object getSingleValueWithQuery(const String & query); bool isAdminConnectionConfigured(); /* throws SQLException */ bool isServerRunningOnWindows(); /* throws IOException */ /*File newTempBinaryFile(String name, long size) ;*/ bool runLongTests(); /** * Checks whether a certain system property is defined, in order to * run/not-run certain tests * * @param propName * the property name to check for * * @return true if the property is defined. */ bool runTestIfSysPropDefined(const String & propName); bool runMultiHostTests(); /** * Checks whether the database we're connected to meets the given version * minimum * * @param major * the major version to meet * @param minor * the minor version to meet * * @return boolean if the major/minor is met * * @throws SQLException * if an error occurs. */ /* throws SQLException */ bool versionMeetsMinimum(unsigned int major , unsigned int minor , unsigned int subminor= 0 ); /*bool isClassAvailable (String classname);*/ /* See comments in cpp file*/ /*void cleanupTempFiles(const File exampleTempFile, const String tempfilePrefix) ;*/ /* throws Exception */ void assertResultSetsEqual(ResultSet & control, ResultSet & test); void initTable(const String & sTableName, Properties & sqlProps , Connection & conn); void clearTable(const String & sTableName, Connection & conn); public: /** * Creates a new BaseTestCase object. * * @param name * The name of the JUnit test case */ BaseTestFixture (const String & name); void logDebug (const String & message); void selectDb ( Statement & st ); /** * Creates resources used by all tests. * * @throws Exception * if an error occurs. */ /* throws Exception */ virtual void setUp(); /** * Destroys resources created during the test case. * * @throws Exception * DOCUMENT ME! */ /* throws Exception */ virtual void tearDown(); }; } /* Macros to use instead of one of junit assertEquals calls */ #define MyAssertEquals(str, a, b) ASSERT_MESSAGE(a==b, str) // Redefining TEST_FIXTURE #ifdef TEST_FIXTURE #undef TEST_FIXTURE #endif #define TEST_FIXTURE( theFixtureClass ) typedef theFixtureClass TestSuiteClass;\ theFixtureClass( const String & name ) \ : BaseTestFixture( name ) #endif // _BASE_TEST_FIXTURE_
cloudpbl-senrigan/combinator
third_party/mysql-connector-c++-1.1.4/test/CJUnitTestsPort/BaseTestFixture.h
C
mit
10,685
<!-- Copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) --> <!-- boost-no-inspect --> <!-- HTML header for doxygen 1.8.9.1--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <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>Boost.Hana: Concepts</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="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </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> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); // Copyright Louis Dionne 2013-2017 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) MathJax.Hub.Config({ "HTML-CSS": { linebreaks: { automatic: true, width: "75% container" } } }); </script><script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <!-- Additional javascript for drawing charts. --> <script type="text/javascript" src="highcharts.js"></script> <script type="text/javascript" src="highcharts-data.js"></script> <script type="text/javascript" src="highcharts-exporting.js"></script> <script type="text/javascript" src="chart.js"></script> <script type="text/javascript" src="hana.js"></script> </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="projectlogo"><img alt="Logo" src="Boost.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">Boost.Hana &#160;<span id="projectnumber">1.5.0</span> </div> <div id="projectbrief">Your standard library for metaprogramming</div> </td> <td> <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> </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><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('group__group-concepts.html','');}); </script> <div id="doc-content"> <!-- 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="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#groups">Modules</a> &#124; <a href="#nested-classes">Classes</a> </div> <div class="headertitle"> <div class="title">Concepts</div> </div> </div><!--header--> <div class="contents"> <a name="details" id="details"></a><h2 class="groupheader">Description</h2> <p>Concepts provided by the library. </p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a> Modules</h2></td></tr> <tr class="memitem:group__group-Applicative"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Applicative.html">Applicative</a></td></tr> <tr class="memdesc:group__group-Applicative"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Applicative</code> concept represents <code>Functor</code>s with the ability to lift values and combine computations. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Comonad"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Comonad.html">Comonad</a></td></tr> <tr class="memdesc:group__group-Comonad"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Comonad</code> concept represents context-sensitive computations and data. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Comparable"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Comparable.html">Comparable</a></td></tr> <tr class="memdesc:group__group-Comparable"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Comparable</code> concept defines equality and inequality. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Constant"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Constant.html">Constant</a></td></tr> <tr class="memdesc:group__group-Constant"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Constant</code> concept represents data that can be manipulated at compile-time. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-EuclideanRing"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-EuclideanRing.html">Euclidean Ring</a></td></tr> <tr class="memdesc:group__group-EuclideanRing"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>EuclideanRing</code> concept represents a commutative <code>Ring</code> that can also be endowed with a division algorithm. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Foldable"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Foldable.html">Foldable</a></td></tr> <tr class="memdesc:group__group-Foldable"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Foldable</code> concept represents data structures that can be reduced to a single value. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Functor"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Functor.html">Functor</a></td></tr> <tr class="memdesc:group__group-Functor"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Functor</code> concept represents types that can be mapped over. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Group.html">Group</a></td></tr> <tr class="memdesc:group__group-Group"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Group</code> concept represents <code>Monoid</code>s where all objects have an inverse w.r.t. the <code>Monoid</code>'s binary operation. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Hashable"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Hashable.html">Hashable</a></td></tr> <tr class="memdesc:group__group-Hashable"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Hashable</code> concept represents objects that can be normalized to a type-level hash. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Iterable"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Iterable.html">Iterable</a></td></tr> <tr class="memdesc:group__group-Iterable"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Iterable</code> concept represents data structures supporting external iteration. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Logical"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Logical.html">Logical</a></td></tr> <tr class="memdesc:group__group-Logical"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Logical</code> concept represents types with a truth value. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Metafunction"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Metafunction.html">Metafunction</a></td></tr> <tr class="memdesc:group__group-Metafunction"><td class="mdescLeft">&#160;</td><td class="mdescRight">A <code>Metafunction</code> is a function that takes <code><a class="el" href="structboost_1_1hana_1_1type.html" title="C++ type in value-level representation. ">hana::type</a></code>s as inputs and returns a <code><a class="el" href="structboost_1_1hana_1_1type.html" title="C++ type in value-level representation. ">hana::type</a></code> as output. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Monad"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Monad.html">Monad</a></td></tr> <tr class="memdesc:group__group-Monad"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Monad</code> concept represents <code>Applicative</code>s with the ability to flatten nested levels of structure. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-MonadPlus"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-MonadPlus.html">MonadPlus</a></td></tr> <tr class="memdesc:group__group-MonadPlus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>MonadPlus</code> concept represents Monads with a monoidal structure. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Monoid"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Monoid.html">Monoid</a></td></tr> <tr class="memdesc:group__group-Monoid"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Monoid</code> concept represents data types with an associative binary operation that has an identity. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Orderable"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Orderable.html">Orderable</a></td></tr> <tr class="memdesc:group__group-Orderable"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Orderable</code> concept represents totally ordered data types. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Product"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Product.html">Product</a></td></tr> <tr class="memdesc:group__group-Product"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents types that are generic containers of two elements. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Ring"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Ring.html">Ring</a></td></tr> <tr class="memdesc:group__group-Ring"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Ring</code> concept represents <code>Group</code>s that also form a <code>Monoid</code> under a second binary operation that distributes over the first. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Searchable"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Searchable.html">Searchable</a></td></tr> <tr class="memdesc:group__group-Searchable"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Searchable</code> concept represents structures that can be searched. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Sequence"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Sequence.html">Sequence</a></td></tr> <tr class="memdesc:group__group-Sequence"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Sequence</code> concept represents generic index-based sequences. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:group__group-Struct"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Struct.html">Struct</a></td></tr> <tr class="memdesc:group__group-Struct"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code>Struct</code> concept represents <code>struct</code>-like user-defined types. <br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1IntegralConstant.html">boost::hana::IntegralConstant&lt; C &gt;</a></td></tr> <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code><a class="el" href="structboost_1_1hana_1_1IntegralConstant.html" title="The IntegralConstant concept represents compile-time integral values. ">IntegralConstant</a></code> concept represents compile-time integral values. <a href="structboost_1_1hana_1_1IntegralConstant.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> </div><!-- contents --> </div><!-- doc-content --> <!-- Copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) --> <!-- boost-no-inspect --> <!-- HTML footer for doxygen 1.8.9.1--> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> </ul> </div> </body> </html>
vslavik/poedit
deps/boost/libs/hana/doc/html/group__group-concepts.html
HTML
mit
17,505
'use strict'; // Check that main thread handles an unknown message type from a worker thread // as expected. require('../common'); const assert = require('assert'); const { spawnSync } = require('child_process'); const { Worker } = require('worker_threads'); if (process.argv[2] !== 'spawned') { const result = spawnSync(process.execPath, [ '--expose-internals', __filename, 'spawned'], { encoding: 'utf8' }); assert.ok(result.stderr.includes('Unknown worker message type FHQWHGADS'), `Expected error not found in: ${result.stderr}`); } else { new Worker(` const { internalBinding } = require('internal/test/binding'); const { getEnvMessagePort } = internalBinding('worker'); const messagePort = getEnvMessagePort(); messagePort.postMessage({ type: 'FHQWHGADS' }); `, { eval: true }); }
enclose-io/compiler
lts/test/parallel/test-worker-message-type-unknown.js
JavaScript
mit
883
package com.laytonsmith.abstraction.bukkit.entities; import com.laytonsmith.abstraction.entities.MCArrow; import org.bukkit.entity.Arrow; import org.bukkit.entity.Entity; import org.bukkit.entity.Projectile; /** * * @author Veyyn */ public class BukkitMCArrow extends BukkitMCProjectile implements MCArrow { private final Arrow _arrow; public BukkitMCArrow(Entity arrow) { super((Projectile) arrow); _arrow = (Arrow) arrow; } @Override public int getKnockbackStrength() { return _arrow.getKnockbackStrength(); } @Override public void setKnockbackStrength(int strength) { _arrow.setKnockbackStrength(strength); } @Override public boolean isCritical() { return _arrow.isCritical(); } @Override public void setCritical(boolean critical) { _arrow.setCritical(critical); } }
dbuxo/CommandHelper
src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCArrow.java
Java
mit
807
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin'); var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); var _svgIcon = require('../../svg-icon'); var _svgIcon2 = _interopRequireDefault(_svgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PlacesSmokingRooms = _react2.default.createClass({ displayName: 'PlacesSmokingRooms', mixins: [_reactAddonsPureRenderMixin2.default], render: function render() { return _react2.default.createElement( _svgIcon2.default, this.props, _react2.default.createElement('path', { d: 'M2 16h15v3H2zm18.5 0H22v3h-1.5zM18 16h1.5v3H18zm.85-8.27c.62-.61 1-1.45 1-2.38C19.85 3.5 18.35 2 16.5 2v1.5c1.02 0 1.85.83 1.85 1.85S17.52 7.2 16.5 7.2v1.5c2.24 0 4 1.83 4 4.07V15H22v-2.24c0-2.22-1.28-4.14-3.15-5.03zm-2.82 2.47H14.5c-1.02 0-1.85-.98-1.85-2s.83-1.75 1.85-1.75v-1.5c-1.85 0-3.35 1.5-3.35 3.35s1.5 3.35 3.35 3.35h1.53c1.05 0 1.97.74 1.97 2.05V15h1.5v-1.64c0-1.81-1.6-3.16-3.47-3.16z' }) ); } }); exports.default = PlacesSmokingRooms; module.exports = exports['default'];
aykutyaman/meteor1.3-react-flowrouter-demo
node_modules/material-ui/lib/svg-icons/places/smoking-rooms.js
JavaScript
mit
1,318
CHANGELOG for 2.8.x =================== This changelog references the relevant changes (bug and security fixes) done in 2.8 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.8.0...v2.8.1 * 2.8.9 (2016-07-30) * bug #19470 undefined offset fix (#19406) (ReenExe) * bug #19300 [HttpKernel] Use flock() for HttpCache's lock files (mpdude) * bug #19428 [Process] Fix write access check for pipes on Windows (nicolas-grekas) * bug #19439 [DependencyInjection] Fixed deprecated default message template with XML (jeremyFreeAgent) * bug #19397 [HttpFoundation] HttpCache refresh stale responses containing an ETag (maennchen) * bug #19426 [Form] Fix the money form type render with Bootstrap3 (Th3Mouk) * bug #19422 [DomCrawler] Inherit the namespace cache in subcrawlers (stof) * bug #19425 [BrowserKit] Uppercase the "GET" method in redirects (jakzal) * bug #19384 Fix PHP 7.1 related failures (nicolas-grekas) * bug #19379 [VarDumper] Fix for PHP 7.1 (nicolas-grekas) * bug #19342 Added class existence check if is_subclass_of() fails in compiler passes (SCIF) * bug #19369 Fix the DBAL session handler version check for Postgresql (stof) * bug #19368 [VarDumper] Fix dumping jsons casted as arrays (nicolas-grekas) * bug #19334 [Security] Fix the retrieval of the last username when using forwarding (stof) * bug #19321 [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods (dunglas) * bug #19317 [BrowserKit] Update Client::getAbsoluteUri() for query string only URIs (georaldc) * bug #19298 [ClassLoader] Fix declared classes being computed when not needed (nicolas-grekas) * bug #19316 [Validator] Added additional MasterCard range to the CardSchemeValidator (Dennis Væversted) * bug #19290 [HttpKernel] fixed internal subrequests having an if-modified-since-header (MalteWunsch) * bug #19307 [Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener (Maxime STEINHAUSSER) * bug #19309 [DoctrineBridge] added missing error code for constraint. (Koc) * bug #19306 [Form] fixed bug - name in ButtonBuilder (cheprasov) * bug #19292 [varDumper] Fix missing usage of ExceptionCaster::$traceArgs (nicolas-grekas) * bug #19288 [VarDumper] Fix indentation trimming in ExceptionCaster (nicolas-grekas) * bug #19267 [Validator] UuidValidator must accept a Uuid constraint. (hhamon) * bug #19186 Fix for #19183 to add support for new PHP MongoDB extension in sessions. (omanizer) * bug #19253 [Console] Fix block() padding formatting after #19189 (chalasr) * bug #19218 [Security][Guard] check if session exist before using it (pasdeloup) * 2.8.8 (2016-06-30) * bug #19217 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel (nicolas-grekas) * bug #18688 [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For (magnusnordlander) * bug #19173 [Console] Decouple SymfonyStyle from TableCell (ro0NL) * bug #19189 [Console] Fix formatting of SymfonyStyle::comment() (chalasr) * bug #19211 [Form] fix post max size translation type extension for >= 2.8 (Tobion) * bug #17822 [WIP] [Form] fix `empty_data` option in expanded `ChoiceType` (HeahDude) * bug #19134 Distinguish between first and subsequent progress bar displays (rquadling) * bug #19061 [FORM] fix post_max_size_message translation (alt. 2) (David Badura) * bug #19100 [Console] Fixed SymfonyQuestionHelper multi-choice with defaults (sstok) * bug #18924 [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure (webmozart) * bug #19138 [DomCrawler] No more exception on field name with strange format (guiled, fabpot) * bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen) * bug #19127 [Form] Add exception to FormRenderer about non-unique block names (enumag) * bug #19118 [Process] Fix pipes cleaning on Windows (nicolas-grekas) * bug #19128 Avoid phpunit 5.4 warnings on getMock (2.7+) (iltar) * bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas) * bug #19101 [Session] fix PDO transaction aborted under PostgreSQL (Tobion) * bug #18501 [HttpFoundation] changed MERGE queries (hjkl) * bug #19062 [HttpFoundation] Fix UPSERT for PgSql >= 9.5 (nicolas-grekas) * bug #18548 [Form] minor fixes in DateTime transformers (HeahDude) * bug #18732 [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't (nykopol) * bug #19048 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 (nicolas-grekas) * bug #19038 Fix feature detection for IE (Alsciende) * bug #18915 [DependencyInjection] force enabling the external XML entity loaders (xabbuh) * bug #19020 [Form] Fixed collapsed choice attributes (HeahDude) * bug #19028 [Yaml] properly count skipped comment lines (xabbuh) * bug #19009 [WebProfilerBundle] Fix invalid CSS style (romainneutron) * bug #17733 [Yaml] Fix wrong line number when comments are inserted in the middle of a block. (paradajozsef) * bug #18911 Fixed singular of committee (peterrehm) * bug #18971 Do not inject web debug toolbar on attachments (peterrehm) * 2.8.7 (2016-06-06) * bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh) * bug #18893 [DependencyInjection] Skip deep reference check for 'service_container' (RobertMe) * bug #18812 Catch \Throwable (fprochazka) * bug #18821 [Form] Removed UTC specification with timestamp (francisbesset) * bug #18861 Fix for #18843 (inso) * bug #18889 [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments (chalasr) * bug #18907 [Routing] Fix the annotation loader taking a class constant as a beginning of a class name (jakzal, nicolas-grekas) * bug #18879 [Console] SymfonyStyle: Align multi-line/very-long-line blocks (chalasr) * bug #18864 [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut (peterrehm) * bug #18883 Fix js comment in profiler (linnaea) * bug #18844 [Yaml] fix exception contexts (xabbuh) * bug #18840 [Yaml] properly handle unindented collections (xabbuh) * bug #18765 Catch \Throwable (fprochazka) * bug #18813 Catch \Throwable (fprochazka) * bug #18839 People - person singularization (Keeo) * bug #18828 [Yaml] chomp newlines only at the end of YAML documents (xabbuh) * bug #18814 Fixed server status command when port has been omitted (peterrehm) * bug #18799 Use levenshtein level for better Bundle matching (j0k3r) * bug #18413 [WebProfilerBundle] Fix CORS ajax security issues (romainneutron) * bug #18774 [console][table] adjust width of colspanned cell. (aitboudad) * bug #18507 [BUG] Delete class 'control-group' in bootstrap 3 (Philippe Degeeter) * bug #18747 [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m) * bug #18635 [Console] Prevent fatal error when calling Command::getHelper without helperSet (chalasr) * bug #18686 [console][table] adjust width of colspanned cell. (aitboudad) * bug #18761 [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m) * bug #18737 [Debug] Fix fatal error handlers on PHP 7 (nicolas-grekas) * 2.8.6 (2016-05-09) * security #18736 Fixed issue with blank password with Ldap (csarrazi) * security #18733 limited the maximum length of a submitted username (fabpot) * bug #18730 [FrameworkBundle] prevent calling get() for service_container service (xabbuh) * bug #18705 added a conflict between Monolog bridge 2.8 and HTTP Kernel 3.0+ (fabpot) * bug #18709 [DependencyInjection] top-level anonymous services must be public (xabbuh) * bug #18388 [EventDispatcher] check for method to exist (xabbuh) * bug #18699 [DependencyInjection] Use the priority of service decoration on service with parent (hason) * bug #18692 add @Event annotation for KernelEvents (Haehnchen) * bug #18246 [DependencyInjection] fix ambiguous services schema (backbone87) * 2.8.5 (2016-04-29) * bug #18180 [Form] fixed BC break with pre selection of choices with `ChoiceType` and its children (HeahDude) * bug #18645 [Console] Fix wrong exceptions being thrown (JhonnyL) * bug #18562 [WebProfilerBunde] Give an absolute url in case the request occured from another domain (romainneutron) * bug #18600 [DI] Fix AutowirePass fatal error with classes that have non-existing parents (hason, nicolas-grekas) * bug #18603 [PropertyAccess] ->getValue() should be read-only (nicolas-grekas) * bug #18593 [VarDumper] Fix dumping type hints for non-existing parent classes (nicolas-grekas) * bug #18596 [DI] Fix internal caching in AutowirePass (nicolas-grekas) * bug #18581 [Console] [TableHelper] make it work with SymfonyStyle. (aitboudad) * bug #18280 [Routing] add query param if value is different from default (Tobion) * bug #18540 Replace iconv_*() uses by mb_*(), add mbstring polyfill when required (nicolas-grekas) * bug #18496 [Console] use ANSI escape sequences in ProgressBar overwrite method (alekitto) * bug #18490 [LDAP] Free the search result after a search to free memory (hiddewie) * bug #18491 [DependencyInjection] anonymous services are always private (xabbuh) * bug #18515 [Filesystem] Better error handling in remove() (nicolas-grekas) * bug #18360 [PropertyInfo] Extract nullable and collection key type for Doctrine associations (teohhanhui) * bug #18449 [PropertyAccess] Fix regression (nicolas-grekas) * bug #18429 [Console] Correct time formatting. (camporter) * bug #18457 [WebProfilerBundle] Fixed error from unset twig variable (simonsargeant) * bug #18467 [DependencyInjection] Resolve aliases before removing abstract services + add tests (nicolas-grekas) * bug #18469 Force profiler toolbar svg display (pyrech) * bug #18460 [DomCrawler] Fix select option with empty value (Matt Wells) * bug #18425 [Security] Fixed SwitchUserListener when exiting an impersonation with AnonymousToken (lyrixx) * bug #18317 [Form] fix "prototype" not required when parent form is not required (HeahDude) * bug #18439 [Logging] Add support for Firefox (43+) in ChromePhpHandler (arjenm) * bug #18385 Detect CLI color support for Windows 10 build 10586 (mlocati) * bug #18426 [EventDispatcher] Try first if the event is Stopped (lyrixx) * bug #18407 Fixed the "hover" state of the profiler sidebar menu (javiereguiluz) * bug #18394 [FrameworkBundle] Return the invokable service if its name is the class name (dunglas) * bug #18347 Fixed the styles of the Symfony icon in the web debug toolbar (javiereguiluz) * bug #18265 Optimize ReplaceAliasByActualDefinitionPass (ajb-in) * bug #18349 [Process] Fix stream_select priority when writing to stdin (nicolas-grekas) * bug #18358 [Form] NumberToLocalizedStringTransformer should return floats when possible (nicolas-grekas) * bug #17926 [DependencyInjection] Enable alias for service_container (hason) * bug #18352 [Debug] Fix case sensitivity checks (nicolas-grekas) * bug #18336 [Debug] Fix handling of php7 throwables (nicolas-grekas) * bug #18354 [FrameworkBundle][TwigBridge] fix high deps tests (xabbuh) * bug #18312 [ClassLoader] Fix storing not-found classes in APC cache (nicolas-grekas) * 2.8.4 (2016-03-27) * bug #18298 [Validator] do not treat payload as callback (xabbuh) * bug #18275 [Form] Fix BC break introduced in #14403 (HeahDude) * bug #18271 [FileSystem] Google app engine filesystem (swordbeta) * bug #18255 [HttpFoundation] Fix support of custom mime types with parameters (Ener-Getick) * bug #18272 [Bridge\PhpUnit] Workaround old phpunit bug, no colors in weak mode, add tests (nicolas-grekas) * bug #18259 [PropertyAccess] Backport fixes from 2.7 (nicolas-grekas) * bug #18261 [PropertyAccess] Fix isPropertyWritable not using the reflection cache (nicolas-grekas) * bug #18224 [PropertyAccess] Remove most ref mismatches to improve perf (nicolas-grekas) * bug #18237 [WebProfilerBundle] Added table-layout property to AJAX toolbar css (kevintweber) * bug #18209 [PropertyInfo] Support Doctrine custom mapping type in DoctrineExtractor (teohhanhui) * bug #18210 [PropertyAccess] Throw an UnexpectedTypeException when the type do not match (dunglas, nicolas-grekas) * bug #18216 [Intl] Fix invalid numeric literal on PHP 7 (nicolas-grekas) * bug #18147 [Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols (natechicago) * bug #18023 [Process] getIncrementalOutput should work without calling getOutput (romainneutron) * bug #18175 [Translation] Add support for fuzzy tags in PoFileLoader (nud) * bug #18179 [Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers (ovrflo, nicolas-grekas) * bug #18164 [HttpKernel] set s-maxage only if all responses are cacheable (xabbuh) * bug #18150 [Process] Wait a bit less on Windows (nicolas-grekas) * bug #18130 [Debug] Replaced logic for detecting filesystem case sensitivity (Dan Blows) * bug #18137 Autowiring the concrete class too - consistent with behavior of other services (weaverryan) * bug #18087 [WebProfiler] Sidebar button padding (rvanlaak) * bug #18080 [HttpFoundation] Set the Content-Range header if the requested Range is unsatisfied (jakzal) * bug #18084 [HttpFoundation] Avoid warnings when checking malicious IPs (jakzal) * bug #18066 [Process] Fix pipes handling (nicolas-grekas) * bug #18078 [Console] Fix an autocompletion question helper issue with non-sequentially indexed choices (jakzal) * bug #18048 [HttpKernel] Fix mem usage when stripping the prod container (nicolas-grekas) * bug #18065 [Finder] Partially revert #17134 to fix a regression (jakzal) * bug #18018 [HttpFoundation] exception when registering bags for started sessions (xabbuh) * bug #18054 [Filesystem] Fix false positive in ->remove() (nicolas-grekas) * bug #18049 [Validator] Fix the locale validator so it treats a locale alias as a valid locale (jakzal) * bug #18019 [Intl] Update ICU to version 55 (jakzal) * bug #18015 [Process] Fix memory issue when using large input streams (romainneutron) * bug #16656 [HttpFoundation] automatically generate safe fallback filename (xabbuh) * bug #15794 [Console] default to stderr in the console helpers (alcohol) * bug #17984 Allow to normalize \Traversable when serializing xml (Ener-Getick) * bug #17434 Improved the error message when a template is not found (rvanginneken, javiereguiluz) * bug #17687 Improved the error message when using "@" in a decorated service (javiereguiluz) * bug #17744 Improve error reporting in router panel of web profiler (javiereguiluz) * bug #17894 [FrameworkBundle] Fix a regression in handling absolute template paths (jakzal) * bug #17990 [DoctrineBridge][Form] Fix performance regression in EntityType (kimlai) * bug #17595 [HttpKernel] Remove _path from query parameters when fragment is a subrequest (cmenning) * bug #17986 [DomCrawler] Dont use LIBXML_PARSEHUGE by default (nicolas-grekas) * bug #17668 add 'guid' to list of exception to filter out (garak) * bug #17615 Ensure backend slashes for symlinks on Windows systems (cpsitgmbh) * bug #17626 Try to delete broken symlinks (IchHabRecht) * bug #17978 [Yaml] ensure dump indentation to be greather than zero (xabbuh) * bug #16886 [Form] [ChoiceType] Prefer placeholder to empty_value (boite) * bug #17976 [WebProfilerBundle] fix debug toolbar rendering by removing inadvertently added links (craue) * bug #17971 Variadic controller params (NiR-, fabpot) * bug #17876 [DependencyInjection] Fixing autowiring bug when some args are set (weaverryan) * bug #17568 Improved Bootstrap form theme for hidden fields (javiereguiluz) * bug #17561 [WebProfilerBundle] Fix design issue in profiler when having errors in forms (Pierstoval) * bug #17925 [Bridge] The WebProcessor now forwards the client IP (magnetik) * 2.8.3 (2016-02-28) * bug #17947 Fix - #17676 (backport #17919 to 2.3) (Ocramius) * bug #17942 Fix bug when using an private aliased factory service (WouterJ) * bug #17798 [Form] Fix BC break by allowing 'choice_label' option to be 'false' in ChoiceType (HeahDude) * bug #17542 ChoiceFormField of type "select" could be "disabled" (bouland) * bug #17602 [HttpFoundation] Fix BinaryFileResponse incorrect behavior with if-range header (bburnichon) * bug #17760 [Form] fix choice value "false" in ChoiceType (HeahDude) * bug #17914 [Console] Fix escaping of trailing backslashes (nicolas-grekas) * bug #17074 Fix constraint validator alias being required (Triiistan) * bug #17866 [DependencyInjection] replace alias in factories (xabbuh) * bug #17867 [DependencyInjection] replace alias in factory services (xabbuh) * bug #17860 Fixed the antialiasing of the toolbar text (javiereguiluz) * bug #17569 [FrameworkBundle] read commands from bundles when accessing list (havvg) * bug #16987 [FileSystem] Windows fix (flip111) * bug #17787 [Form] Fix choice placeholder edge cases (Tobion) * bug #17835 [Yaml] fix default timezone to be UTC (xabbuh) * bug #17823 [DependencyInjection] fix dumped YAML string (xabbuh) * bug #17818 [Console] InvalidArgumentException is thrown under wrong condition (robinkanters) * bug #17819 [HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method (jakzal) * bug #17814 [DependencyInjection] fix dumped YAML snytax (xabbuh) * bug #17099 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path (alekitto) * bug #17694 [DoctrineBridge] [Form] fix choice_value in EntityType (HeahDude) * bug #17790 [Config] Fix EnumNodeDefinition to allow building enum nodes with one element (ogizanagi) * bug #17729 [Yaml] properly parse lists in object maps (xabbuh) * bug #17719 [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder (lukaszmakuch) * bug #17742 [DependencyInjection] Fix #16461 Container::set() replace aliases (mnapoli) * bug #17745 Added more exceptions to singularify method (javiereguiluz) * bug #17691 Fixed (string) catchable fatal error for PHP Incomplete Class instances (yceruto) * bug #17766 Fixed (string) catchable fatal error for PHP Incomplete Class instances (yceruto) * bug #17757 [HttpFoundation] BinaryFileResponse sendContent return as parent. (2.3) (SpacePossum) * bug #17748 [DomCrawler] Remove the overridden getHash() method to prevent problems when cloning the crawler (jakzal) * bug #17725 [WebProfilerBundle] Add width attribute on SVG - Fix toolbar profiler on microsoft edge (AlexandrePavy) * bug #17703 [FrameworkBundle] Support autowiring for TranslationInterface (dunglas) * bug #17613 [WebProfiler] Fixed logo and menu profiler for Microsoft Edge (WhiteEagle88) * bug #17702 [TwigBridge] forward compatibility with Yaml 3.1 (xabbuh) * bug #17673 [Routing] add files used in FileResource objects (xabbuh) * bug #17672 [DependencyInjection][Routing] add files used in FileResource objects (xabbuh) * bug #17669 [Console] remove readline support (xabbuh) * bug #17600 Fixed the Bootstrap form theme for inlined checkbox/radio (javiereguiluz) * bug #17596 [Translation] Add resources from fallback locale to parent catalogue (c960657) * bug #17605 [FrameworkBundle] remove default null value for asset version (xabbuh) * bug #17606 [DependencyInjection] pass triggerDeprecationError arg to parent class (xabbuh) * bug #16956 [DependencyInjection] XmlFileLoader: enforce tags to have a name (xabbuh) * bug #16265 [BrowserKit] Corrected HTTP_HOST logic (Naktibalda) * bug #17559 [SecurityBundle] Fix HTTP Digest auth not being passed user checker (SamFleming) * bug #17554 [DependencyInjection] resolve aliases in factories (xabbuh) * bug #17555 [DependencyInjection] resolve aliases in factory services (xabbuh) * bug #17511 [Form] ArrayChoiceList can now deal with a null in choices (issei-m) * bug #17430 [Serializer] Ensure that groups are strings (dunglas) * bug #15272 [FrameworkBundle] Fix template location for PHP templates (jakzal) * bug #11232 [Routing] Fixes fatal errors with object resources in AnnotationDirectoryLoader::supports (Tischoi) * bug #17526 Escape the delimiter in Glob::toRegex (javiereguiluz) * bug #17527 fixed undefined variable (fabpot) * bug #15706 [framework-bundle] Added support for the `0.0.0.0/0` trusted proxy (zerkms) * bug #16274 [HttpKernel] Lookup the response even if the lock was released after two second wait (jakzal) * bug #16954 [TranslationUpdateCommand] fixed undefined resultMessage var. (aitboudad) * bug #17355 [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument (xavismeh) * bug #17330 Limit the max height/width of icons in the profiler menu (javiereguiluz) * bug #17454 Allow absolute URLs to be displayed in the debug toolbar (javiereguiluz) * bug #16736 [Request] Ignore invalid IP addresses sent by proxies (GromNaN) * bug #17459 [EventDispatcher] TraceableEventDispatcher resets event listener priorities (c960657) * bug #17486 [FrameworkBundle] Throw for missing container extensions (kix) * bug #16961 Overriding profiler position in CSS breaks JS positioning (aschempp) * bug #16873 Able to load big xml files with DomCrawler (zorn-v) * bug #16897 [Form] Fix constraints could be null if not set (DZunke) * bug #16912 [Translation][Writer] avoid calling setBackup if the dumper is not FileDumper (aitboudad) * bug #17505 sort bundles in config:dump-reference command (xabbuh) * bug #17514 [Asset] Add defaultNull to version configuration (ewgRa) * bug #16511 [Asset] Ability to set empty version strategy in packages (ewgRa) * bug #17457 Display Ajax requests from newest to oldest in the toolbar (javiereguiluz) * bug #17503 [Asset] CLI: use request context to generate absolute URLs (xabbuh) * bug #17478 [HttpFoundation] Do not overwrite the Authorization header if it is already set (jakzal) * bug #17461 [Yaml] tag for dumped PHP objects must be a local one (xabbuh) * bug #16822 [FrameworkBundle][Validator] Fix apc cache service deprecation (ogizanagi) * bug #17463 [Form] make tests compatible with Symfony 2.8 and 3.0 (xabbuh) * bug #17456 [DX] Remove default match from AbstractConfigCommand::findExtension (kix) * bug #17424 [Process] Update in 2.7 for stream-based output storage (romainneutron) * bug #17417 Fixed the form profiler when using long form types (javiereguiluz) * bug #17423 [Process] Use stream based storage to avoid memory issues (romainneutron) * bug #17406 [Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced (paradajozsef) * bug #17433 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas) * bug #17418 Fixed Bootstrap form theme form "reset" buttons (javiereguiluz) * bug #17416 [PropertyInfo] PhpDocExtractor: Fix a notice when the property doesn'… (dunglas) * bug #17404 fix merge 2.3 into 2.7 for SecureRandom dependency (Tobion) * bug #17373 [SecurityBundle] fix SecureRandom service constructor args (Tobion) * bug #17382 [TwigBridge] Use label_format option for checkbox and radio labels (enumag) * bug #17380 [TwigBridge] Use label_format option for checkbox and radio labels (enumag) * bug #17377 Fix performance (PHP5) and memory (PHP7) issues when using token_get_all (nicolas-grekas, peteward) * bug #17389 [Routing] Fixed correct class name in thrown exception (fixes #17388) (robinvdvleuten) * bug #17358 [ClassLoader] Use symfony/polyfill-apcu (nicolas-grekas) * bug #17370 [HttpFoundation][Cookie] Cookie DateTimeInterface fix (wildewouter) * 2.8.2 (2016-01-14) * security #17359 do not ship with a custom rng implementation (xabbuh, fabpot) * bug #17253 [Console] HHVM read input stream bug (mbutkereit) * bug #17314 Fix max width for multibyte keys in choice question (mheki) * bug #17326 [Console] Display console application name even when no version set (polc) * bug #17328 [Serializer] Allow to use proxies in object_to_populate (dunglas) * bug #17202 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas) * bug #17347 Workaround https://bugs.php.net/63206 (nicolas-grekas) * bug #17199 [Serializer] Allow context to contain not serializable data (dunglas, nicolas-grekas) * bug #17334 [WebProfiler] Fixed sf-minitoolbar height (yceruto) * bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur) * bug #17320 [Debug] Fixed erroneous deprecation notice for extended Interfaces (peterrehm) * bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase) * bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity) * bug #17298 [FrameworkBundle] Use proper class to fetch $versionStrategy property (dosten) * bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen) * bug #17279 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin) * bug #17278 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin) * bug #17283 [WebProfilerBundle] Remove loading status from AJAX toolbar after error (kucharovic) * bug #17275 [PhpUnitBridge] Re-enable the garbage collector (nicolas-grekas) * bug #17276 [Process] Fix potential race condition (nicolas-grekas) * bug #17261 [FrameworkBundle] Allow to autowire service_container (dunglas) * bug #17183 [FrameworkBundle] Set the kernel.name properly after a cache warmup (jakzal) * bug #17197 [Yaml] cast arrays to objects after parsing has finished (xabbuh) * bug #17247 Fix toolbar display when nvd3 is loaded on page (Seldaek) * bug #17159 [Yaml] recognize when a block scalar is left (xabbuh) * bug #17195 bug #14246 [Filesystem] dumpFile() non atomic (Hidde Boomsma) * feature #16747 [Form] Improved performance of ChoiceType and its subtypes (webmozart) * bug #17179 [WebProfiler] Removed an object as route generator argument (iltar) * bug #17177 [Process] Fix potential race condition leading to transient tests (nicolas-grekas) * bug #17163 [Form] fix Catchable Fatal Error if choices is not an array (Gladhon, nicolas-grekas) * bug #17152 [DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException (dunglas) * bug #17119 [Form] improve deprecation message for "empty_value" and "choice_list" options. (hhamon) * bug #17156 [HttpFoundation] add missing symfony/polyfill-php55 dependency (xabbuh) * bug #17162 [Form] Fix regression on Collection type (hason) * 2.8.1 (2015-12-26) * bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh) * bug #17052 Fixed flatten exception recursion with errors (GrahamCampbell) * bug #16826 Embedded identifier support (mihai-stancu) * bug #17079 Also transform inline mappings to objects (WouterJ) * bug #17129 [Config] Fix array sort on normalization in edge case (romainneutron) * feature #17035 [DomCrawler] Revert previous restriction, allow selection of every DOMNode object (EdgarPE) * bug #17094 [Process] More robustness and deterministic tests (nicolas-grekas) * bug #17112 [PropertyAccess] Reorder elements array after PropertyPathBuilder::replace (alekitto) * bug #17109 Improved the design of the web debug toolbar (javiereguiluz) * bug #16797 [Filesystem] Recursivly widen non-executable directories (Slamdunk) * bug #16926 [DependencyInjection] fixed definition loosing property shared when decorated by a parent definition (wahler) * bug #17040 [Console] Avoid extra blank lines when rendering exceptions (ogizanagi) * bug #17044 [Form] fix BC break introduced with prototype_data option (memphys) * bug #17055 [Security] Verify if a password encoded with bcrypt is no longer than 72 characters (jakzal) * bug #16959 [Form] fix #15544 when a collection type attribute "required" is false, "prototype" should too (HeahDude) * bug #16806 [Validator] BicValidator - fixed raising violations to a maximum of one (mvhirsch) * bug #16842 [Ldap] Escape carriage returns in LDAP DNs. (ChadSikorra) * bug #16860 [Yaml] do not remove "comments" in scalar blocks (xabbuh) * bug #17002 [Console][Table] fixed render row that contains multiple cells. (aitboudad) * bug #16964 CSS min-height and min-width should not be "auto" (aschempp) * bug #16971 [HttpFoundation] Added the ability of using BinaryFileResponse with stream wrappers (jakzal, Sander-Toonen) * bug #17048 Fix the logout path when not using the router (stof) * bug #17049 Fix the logout path when not using the router (stof) * bug #17057 [FrameworkBundle][HttpKernel] the finder is required to discover bundle commands (xabbuh) * bug #17059 [HttpFoundation] fix error level for deprecation (xabbuh) * bug #17006 [Form] Fix casting regression in DoctrineChoiceLoader (bendavies) * bug #16911 [PropertyInfo] Update List Information from ReflectionExtractor (zanderbaldwin) * bug #16955 [FrameworkBundle] ContainerDebugCommand: pass the right object to the descriptors (xabbuh) * feature #16760 Show silenced errors in separate tab (peterrehm) * feature #16937 [PhpUnitBridge] Replace "weak-verbose" by "deprecations upper bound" mode (nicolas-grekas) * bug #16915 [Process] Enhance compatiblity with --enable-sigchild (nicolas-grekas) * bug #16829 [FrameworkBundle] prevent cache:clear creating too long paths (Tobion) * bug #16922 [FrameworkBundle] [Bug] Fixes new InputStyle bug #16920 (AlmogBaku) * bug #16921 Fix short array syntax for php 5.3 (ewgRa) * bug #16450 [Serializer] Fixed `array_unique` on array of objects in `getAllowedAttributes`. (CornyPhoenix) * bug #16757 [FrameworkBundle] [Translation] Fixed translations not written when no translations directory in update command (jeremyFreeAgent) * bug #16902 [Security] Fix a Polyfill import statement in StringUtils (magnetik) * bug #16871 [FrameworkBundle] Disable built-in server commands when Process component is missing (gnugat, xabbuh) * bug #16870 [FrameworkBundle] Disable the server:run command when Process component is missing (gnugat, xabbuh) * feature #16789 [PhpUnitBridge] Add weak-verbose mode and match against message instead of test name (nicolas-grekas) * bug #16796 [Form] Fix choices defined as Traversable (nicolas-grekas) * bug #16742 [Console][ProgressBar] redrawFrequency should never be 0 (dritter) * bug #16846 [MonologBridge] Monolog Bridge 2.8 is incompatible with HttpKernel 3.0 (derrabus) * bug #16799 Improve error message for undefined DIC aliases (mpdude) * bug #16825 [VarDumper] fix .sf-dump z-index (debug bar conflict) (Antoine LA) * bug #16772 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error (weaverryan) * 2.8.0 (2015-11-30) * bug #16758 Fix BC for the default root form name (stof) * bug #16753 [Process] Fix signaling/stopping logic on Windows (nicolas-grekas) * feature #16755 [Security] add subject variable to expression context (xabbuh) * bug #16642 [DI][autowiring] throw exception when many services use the same class. (aitboudad) * bug #16745 [Yaml] look for colon in parsed inline string (xabbuh) * bug #16733 [Console] do not encode backslashes in console default description (Tobion) * feature #16735 [WIP] [Ldap] Marked the Ldap component as internal (csarrazi) * bug #16734 Make sure security.role_hierarchy.roles always exists (WouterJ) * feature #16722 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention (jakzal) * bug #16312 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released (mpdude) * bug #16351 [WIP] [Form] [TwigBridge] Bootstrap horizontal theme missing tests (pieter2627) * bug #16685 [Form] Fixed: Duplicate choice labels are remembered when using "choices_as_values" = false (webmozart) * feature #16709 [Bridge\PhpUnit] Display the stack trace of a deprecation on-demand (nicolas-grekas) * bug #16704 [Form+SecurityBundle] Trigger deprecation for csrf_provider+intention options (nicolas-grekas) * feature #16706 [HttpFoundation] Deprecate $deep parameter on ParameterBag (nicolas-grekas) * bug #16705 [Form] Deprecated setting "choices_as_values" to "false" (webmozart) * feature #16690 [Form] Deprecated ArrayKeyChoiceList (webmozart) * feature #16687 [Form] Deprecated TimezoneType::getTimezones() (webmozart) * bug #16681 [Form] Deprecated setting "choices_as_values" to "false" (webmozart) * bug #16695 [SecurityBundle] disable the init:acl command if ACL is not used (Tobion) * bug #16677 [Form] Fixed wrong usages of the "text" type (webmozart) * bug #16679 [Form] Disabled view data validation if "data_class" is set to null (webmozart) * bug #16621 [Console] Fix bug with $output overloading (WouterJ) * feature #16601 [Security] Deprecate "AbstractVoter" in favor of "Voter" (nicolas-grekas, lyrixx) * bug #16676 [HttpFoundation] Workaround HHVM rewriting HTTP response line (nicolas-grekas) * bug #16668 [ClassLoader] Fix parsing namespace when token_get_all() is missing (nicolas-grekas) * bug #16386 Bug #16343 [Router] Too many Routes ? (jelte) * bug #16498 fix unused variable warning (eventhorizonpl) * feature #16031 [Translation][Form] Do not translate form labels and placeholders when 'translation_domain' is false (Restless-ET) * bug #16651 [Debug] Ensure class declarations are loaded only once (nicolas-grekas) * security #16631 CVE-2015-8124: Session Fixation in the "Remember Me" Login Feature (xabbuh) * security #16630 CVE-2015-8125: Potential Remote Timing Attack Vulnerability in Security Remember-Me Service (xabbuh) * bug #16633 [Filesystem] Fixed failing test due to tempdir symlink (toretto460) * bug #16609 [HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase (nicolas-grekas) * bug #16477 [Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder (weaverryan) * bug #16588 Sent out a status text for unknown HTTP headers. (dawehner) * bug #16295 [DependencyInjection] Unescape parameters for all types of injection (Nicofuma) * bug #16377 [WebProfilerBundle] Fix minitoolbar height (rvanlaak) * bug #16585 Add support for HTTP status code 418 back (dawehner) * bug #16574 [Process] Fix PhpProcess with phpdbg runtime (nicolas-grekas) * bug #16581 Fix call to undefined function json_last_error_message (dawehner) * bug #16573 [FrameworkBundle] Fix PropertyInfo extractor namespace in framework bundle (jvasseur) * bug #16578 [Console] Fix bug in windows detection (kbond) * bug #16546 [Serializer] ObjectNormalizer: don't serialize static methods and props (dunglas) * bug #16352 Fix the server variables in the router_*.php files (leofeyer) * bug #16537 [Validator] Allow an empty path with a non empty fragment or a query (jakzal) * bug #16528 [Translation] Add support for Armenian pluralization. (marcosdsanchez) * bug #16510 [Process] fix Proccess run with pts enabled (ewgRa) * 2.8.0-BETA1 (2015-11-16) * feature #16156 [Filesystem] Changed dumpFile to allow dumping to streams (markchalloner, pierredup) * feature #16502 [Bridge\PhpUnit] Add extra clock-mocked namespaces in phpunit.xml.dist (nicolas-grekas) * feature #16464 [DependencyInjection] Fix some edge cases with autowiring (dunglas) * feature #16433 [Yaml] deprecate unquoted indicator characters (xabbuh) * feature #16419 [FrameworkBundle][Form] Better exception message for private form tagged services (ogizanagi) * feature #15990 added a micro kernel (fabpot) * feature #16459 [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword() (nicolas-grekas) * feature #16409 [Console] Add progress indicator helper (kbond) * feature #16423 [VarDumper] Deprecate VarDumperTestCase in favor of the trait (nicolas-grekas) * feature #16424 [DI] Deprecate ContainerAware in favor of ContainerAwareTrait (nicolas-grekas) * feature #16430 [HttpKernel] PostResponseEvent should extend the KernelEvent (jakzal) * feature #16325 [VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType (nicolas-grekas) * feature #16395 checkCredentials() force it to be an affirmative yes! (weaverryan) * feature #16344 [WebProfilerBundle] Filter links in search results (Rvanlaak) * feature #16285 [Yaml] deprecated usage of @ and ` at the beginning of an unquoted string (fabpot) * feature #16317 Rely on iconv and symfony/polyfill-* (nicolas-grekas) * feature #15966 [FrameworkBundle] PropertyInfo support (dunglas) * feature #16161 [Validator] Add expressionLanguage to ExpressionValidator constructor (enumag) * feature #16263 [FrameworkBundle] Add a new ClassCache cache warmer (tucksaun) * feature #16271 [TwigBundle] added a Twig templates warmer when templating is disabled (fabpot) * feature #16276 Unify URL generator reference type + make linking in php templates consistent with twig (Tobion) * feature #15947 Added UserLoaderInterface for loading users through Doctrine. (mtrojanowski) * feature #16194 [PhpUnit] Mock clock on @group time-sensitive annotations (nicolas-grekas) * feature #16201 [Yaml] deprecated non-escaped \ in double-quoted strings when parsing (fabpot) * feature #16198 [EventDispatcher] added EventDispatcher::getListenerPriority() (fabpot) * feature #15025 [2.8] [Form] Rename CollectionType options for entries (WouterJ) * feature #16189 [PhpUnitBridge] Add SkippedTestsListener to collect and replay skipped tests (nicolas-grekas) * feature #15879 Deprecate the SecureRandom class (pierredup) * feature #16001 [DI] Warn when a definition relies on a deprecated class in ContainerBuilder::createService() (nicolas-grekas) * feature #14044 [Console] [Helper] [Table] Columns styles (MAXakaWIZARD) * feature #14908 Include working directory in ProcessFailedException (Rvanlaak) * feature #16102 Simplify AbstractVoter (Koc) * feature #15613 [DependencyInjection] Add autowiring capabilities (dunglas) * feature #14721 [Security] Configuring a user checker per firewall (iltar) * feature #16069 [WebProfilerBundle] Move AjaxCollector to HttpKernel for use with Silex (glaubinix, fabpot) * feature #16063 [VarDumper] Add $this->getDump($var) when using VarDumperTestTrait (nicolas-grekas) * feature #16058 Prevent adding non-DOMElement elements in DomCrawler (stof) * feature #16057 Deprecate loading multiple documents in the same crawler (stof) * feature #15742 Using a service as a router resource (weaverryan) * feature #15778 Fluid interface for building routes in PHP (weaverryan) * feature #16029 [FrameworkBundle][TwigBridge] do not render empty form action attributes (xabbuh) * feature #15938 [Console] Bind input before executing the COMMAND event (WouterJ) * feature #15503 UI & CSS improvement to new toolbar (WouterJ) * feature #15838 [VarDumper] Dump PHP+Twig code excerpts in backtraces (nicolas-grekas) * feature #16011 [FrameworkBundle] Tag deprecated services (nicolas-grekas) * feature #15944 Remove profiler storages (javiereguiluz) * feature #16007 [HttpFoundation] deprecate finding deep items in request parameters (xabbuh) * feature #15978 Updated the styles of the cache commands (javiereguiluz) * feature #15972 [Console] Updated the styles of the server commands (javiereguiluz) * feature #15964 Symfony Console Style tweaks (javiereguiluz) * feature #15919 [Form] Guess currency field based on validator constraint (enumag) * feature #15934 Add a non-static API for the CssSelector component (stof) * feature #14235 [FrameworkBundle] Refactored assets:install command and apply Symfony styles (1ed) * feature #15963 added logging of unused tags (Marmelatze, fabpot) * feature #15970 [TwigBundle] removed usage of Templating classes (fabpot) * feature #14132 Applied the new styles to the router: commands (javiereguiluz) * feature #15356 [WebProfilerBundle] Profiler View Latest should preserve all the current query parameters (jbafford) * feature #15953 [TwigBridge] is_granted no longer raise an exception if the token storage is empty (lyrixx) * feature #14602 [2.8] [Ldap] Added support for LDAP (New Component + integration in the Security Component). (csarrazi, lyrixx) * feature #15939 Removed the "Delete profiles" action from the web profiler sidebar (javiereguiluz) * feature #15962 [Finder] simplified code (fabpot) * feature #15882 Easier Custom Authentication errors (weaverryan) * feature #15907 [DomCrawler] Deprecate methods inherited from SplObjectStorage (stof) * feature #15301 [Form][Type Date/Time] added choice_translation_domain option. (aitboudad) * feature #15697 [BrowserKit] Added isFollowingRedirects and getMaxRedirects methods (Naktibalda) * feature #15719 Deprecate ResourceInterface::getResource() (mpdude) * feature #15818 [WebProfilerBundle] Add collapsed sidebar on small screens (hason) * feature #15858 [PropertyInfo] Import the component (dunglas) * feature #15892 deprecated the Shell Console class (fabpot) * feature #15519 [Validator] added BIC (SWIFT-BIC) validation constraint (mvhirsch) * feature #12587 [TwigBridge] Foundation form layout integration (totophe) * feature #15151 [Security] Deprecated supportsAttribute and supportsClass methods (WouterJ) * feature #15491 Add support for deprecated definitions (Taluu) * feature #14894 [Console] Add domain exceptions to replace generic exceptions (GromNaN) * feature #15738 Implement service-based Resource (cache) validation (mpdude) * feature #14673 New Guard Authentication System (e.g. putting the joy back into security) (weaverryan) * feature #15870 Updating AbstractVoter so that the method receives the TokenInterface (weaverryan) * feature #15786 [Translation][File dumper] allow get file content without writing in file. (aitboudad) * feature #15805 [Finder] Deprecate adapters and related classes (nicolas-grekas) * feature #15837 [VarDumper] Add EnumStub for dumping virtual collections with casters (nicolas-grekas) * feature #15699 [Translator][FileDumper] deprecated format method in favor of formatCatalogue. (aitboudad) * feature #15717 [Translator][Loader] added XLIFF 2.0 support. (xphere, aitboudad) * feature #15743 Validate the extended type for lazy-loaded type extensions (stof) * feature #13761 Automatically process extensions when they implement CompilerPassInterface (WouterJ) * feature #15787 [VarDumper] Add caster for OuterIterator objects (nicolas-grekas) * feature #13616 [HttpKernel] Add entry point to more easily create/configure the DI extension (egeloen) * feature #14378 [DX] Added a logout link in the security panel of the web debug toolbar (javiereguiluz) * feature #15620 [WIP] #15502 Make template shortcuts be usable without Templating component (Koc) * feature #15523 Redesigned the Symfony Profiler (javiereguiluz) * feature #15773 Make the exception output visible even in quiet mode, fixes #15680 (Seldaek) * feature #15772 Convert Output::write's type to an options arg where verbosity can be passed in as well (Seldaek) * feature #15756 [Translation] added option json_options to JsonFileDumper. (gepo) * feature #15724 [HttpKernel] Move required RequestStack args as first arguments (nicolas-grekas) * feature #15521 [Debug] Add BufferingLogger for errors that happen before a proper logger is configured (nicolas-grekas) * feature #15709 [WebProfilerBundle] deprecated import/export commands (fabpot) * feature #15710 added ExceptionHandler::getHtml() to expose the full HTML of an exception (fabpot) * feature #15562 [translation] Deprecated DiffOperation (zerustech) * feature #15635 [Config] Prototypes info (ogizanagi) * feature #15551 [Translation] added <tool> element metadata to XliffFileDumper (aitboudad) * feature #15555 [VarDumper] Add caster for pgsql resources (nicolas-grekas) * feature #15452 [Translator] [Xliff] Add support for target attributes. (marcosdsanchez) * feature #15416 [DependencyInjection] Added a way to define the priority of service decoration (dosten) * feature #15433 Allow to define Enum nodes with 1 single element (javiereguiluz) * feature #13990 [Form] Add flexibility for EntityType (raziel057) * feature #15382 [Console] Use readline for user input when available #DX (michaelperrin) * feature #15013 [Security] Removed security-acl from the core (iltar) * feature #15079 [Form] Deprecated FormTypeInterface::getName() and passing of type instances (webmozart) * feature #15418 [Debug] Deprecate ExceptionHandler::createResponse (nicolas-grekas) * feature #15123 [2.8][FrameworkBundle] Allow parameter use_cookies in session configuration (derrabus) * feature #14987 [FrameworkBundle] Configurable Serializer name converter (dunglas) * feature #15285 [Config] deprecate cannotBeEmpty() for boolean and numeric nodes (xabbuh) * feature #15372 [FrameworkBundle] Change the default value of cookie_httponly (jderusse) * feature #15160 Redesigned the web debug toolbar (javiereguiluz) * feature #15185 Implement resettable containers (stof) * feature #15131 [Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http (WouterJ) * feature #15290 [DependencyInjection] Forbid container cloning (jakzal) * feature #14264 [WebProfilerBundle] Add link to show profile of latest request (xelaris) * feature #15139 [Translation] Add parameters to DataCollectorTranslator (damienalexandre) * feature #15175 [VarDumper] Ingore PHPUnit and Prophecy object when they are nested (lyrixx) * feature #15141 [DX] [Security] Renamed Token#getKey() to getSecret() (WouterJ) * feature #15154 [Validator] Added missing error codes and turned codes into UUIDs (webmozart) * feature #15096 [DependencyInjection] Allow anonymous DefinitionDecorator resolving (nicolas-grekas) * feature #14764 [TwigBundle] Warmup twig templates in non-standard paths (kbond) * feature #15134 [FrameworkBundle] add option to force web server startup (xabbuh) * feature #14238 [config] added remove option to ignoreExtraKeys (twifty) * feature #15076 [Debug] Allow throwing from __toString() with `return trigger_error($e, E_USER_ERROR);` (nicolas-grekas) * feature #14984 [DependencyInjection] Deprecate scope concept (dosten) * feature #14429 [FrameworkBundle] Add a doctrine cache service definition for validator mapping (jakzal) * feature #14991 [Console][Table] allow multiple render() calls. (jaytaph) * feature #14660 [Form] moved data trimming logic of TrimListener into StringUtil (issei-m) * feature #15019 [Form] Deprecated "cascade_validation" (webmozart) * feature #12314 [Form] Add "prototype_data" option to collection type (kgilden) * feature #12067 [Form] Added the 'range' FormType (jaytaph) * feature #14993 [Profiler][Translation] added filter. (aitboudad) * feature #14912 [HttpFoundation] Postpone setting the date header on a Response (jakzal) * feature #14903 [profiler][request toolbar] Removed route name from the toolbar (MJBGO) * feature #14904 [toolbar] Merged colored icons in toolbar (MJBGO) * feature #14781 [TwigBundle] Reconfigure twig paths when they are updated (chbruyand) * feature #14700 [DependencyInjection] [Routing] [Config] Recursive directory loading (lavoiesl, nicolas-grekas) * feature #14733 [Security] Add setVoters() on AccessDecisionManager (nicolas-grekas) * feature #14756 [Serializer] Support for array denormalization (derrabus) * feature #14630 [Translator] Dump translation constants as tree instead of simple list (gepo) * feature #14403 [Form] deprecate read_only option (Tobion) * feature #13324 [WebProfilerBundle] Improved page for logs (hason) * feature #14561 [FrameworkBundle][DX] Add option to specify additional translation loading paths (Seldaek) * feature #14563 [FrameworkBundle][EventDispatcher] Add priorities to the debug:event-dispatcher command (Seldaek) * feature #14546 [Translator] deprecate getMessages in favor of getCatalogue. (aitboudad) * feature #14320 [Translation] added an --all option to the debug:translation command #14237 (sgehrig) * feature #14473 [DX] Minor improvement for the translation:debug output (nicolasdewez) * feature #14443 [VarDumper] Allow preserving a subset of cut arrays (nicolas-grekas) * feature #14431 [Console] Bind the closure (code) to the Command if possible (lyrixx) * feature #14424 [VarDumper] Added support for SplFileInfo (lyrixx) * feature #14359 [Translation] added FileLoader. (aitboudad) * feature #14383 [FrameworkBundle][Server Command] add address port number option. (aitboudad)
firestorm23/gyrolab-ste
vendor/symfony/symfony/CHANGELOG-2.8.md
Markdown
mit
48,420
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Xunit; using Ploeh.AutoFixture.Dsl; using Ploeh.AutoFixture.Kernel; using Ploeh.AutoFixtureUnitTest.Kernel; using Ploeh.TestTypeFoundation; using Xunit.Extensions; namespace Ploeh.AutoFixtureUnitTest.Dsl { public class NodeComposerTest { [Fact] public void SutIsComposer() { // Fixture setup // Exercise system var sut = SpecimenBuilderNodeFactory.CreateComposer<object>(); // Verify outcome Assert.IsAssignableFrom<ICustomizationComposer<object>>(sut); // Teardown } [Fact] public void SutIsSpecimenBuilderNode() { // Fixture setup // Exercise system var sut = SpecimenBuilderNodeFactory.CreateComposer<string>(); // Verify outcome Assert.IsAssignableFrom<ISpecimenBuilderNode>(sut); // Teardown } [Fact] public void SutYieldsDecoratedBuilder() { // Fixture setup var expected = new DelegatingSpecimenBuilder(); // Exercise system var sut = new NodeComposer<Guid>(expected); // Verify outcome Assert.True(new[] { expected }.SequenceEqual(sut)); Assert.True(new object[] { expected }.SequenceEqual( ((System.Collections.IEnumerable)sut).Cast<object>())); // Teardown } [Fact] public void BuilderIsCorrect() { // Fixture setup var expected = new DelegatingSpecimenBuilder(); var sut = new NodeComposer<Guid>(expected); // Exercise system ISpecimenBuilder actual = sut.Builder; // Verify outcome Assert.Equal(expected, actual); // Teardown } [Fact] public void CreateReturnsCorrectResult() { // Fixture setup var request = new object(); var context = new DelegatingSpecimenContext(); var expected = new object(); var builder = new DelegatingSpecimenBuilder { OnCreate = (r, c) => r == request && c == context ? expected : new NoSpecimen(r) }; var sut = new NodeComposer<object>(builder); // Exercise system var actual = sut.Create(request, context); // Verify outcome Assert.Equal(expected, actual); // Teardown } [Fact] public void SutIsCorrectInitialGraph() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<int>(); // Exercise system // Verify outcome var factory = new MethodInvoker(new ModestConstructorQuery()); var expected = new NodeComposer<int>( SpecimenBuilderNodeFactory.CreateTypedNode(typeof(int), factory)); Assert.True(expected.GraphEquals(sut, new NodeComparer())); // Teardown } [Fact] public void FromSeedReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<decimal>(); Func<decimal, decimal> f = d => d; // Exercise system var actual = sut.FromSeed(f); // Verify outcome var factory = new SeededFactory<decimal>(f); var expected = new NodeComposer<decimal>( SpecimenBuilderNodeFactory.CreateTypedNode(typeof(decimal), factory)); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void FromSpecimenBuilderFactoryReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<Guid>(); var builder = new DelegatingSpecimenBuilder(); // Exercise system var actual = sut.FromFactory(builder); // Verify outcome var expected = new NodeComposer<Guid>( SpecimenBuilderNodeFactory.CreateTypedNode(typeof(Guid), builder)); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void FromNoArgFuncReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<long>(); Func<long> f = () => 0; // Exercise system var actual = sut.FromFactory(f); // Verify outcome var factory = new SpecimenFactory<long>(f); var expected = new NodeComposer<long>( SpecimenBuilderNodeFactory.CreateTypedNode(typeof(long), factory)); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void FromSingleArgFuncReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<float>(); Func<int, float> f = i => i; // Exercise system var actual = sut.FromFactory(f); // Verify outcome var factory = new SpecimenFactory<int, float>(f); var expected = new NodeComposer<float>( SpecimenBuilderNodeFactory.CreateTypedNode(typeof(float), factory)); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void FromDoubleArgFuncReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<string>(); Func<int, Version, string> f = (i, _) => i.ToString(); // Exercise system var actual = sut.FromFactory(f); // Verify outcome var factory = new SpecimenFactory<int, Version, string>(f); var expected = new NodeComposer<string>( SpecimenBuilderNodeFactory.CreateTypedNode(typeof(string), factory)); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void FromTripleArgFuncReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<decimal>(); Func<int, Guid, Version, decimal> f = (i, g, v) => i; // Exercise system var actual = sut.FromFactory(f); // Verify outcome var factory = new SpecimenFactory<int, Guid, Version, decimal>(f); var expected = new NodeComposer<decimal>( SpecimenBuilderNodeFactory.CreateTypedNode(typeof(decimal), factory)); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void FromQuadrupleArgFuncReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<Version>(); Func<int, int, int, int, Version> f = (mj, mn, b, r) => new Version(mj, mn, b, r); // Exercise system var actual = sut.FromFactory(f); // Verify outcome var factory = new SpecimenFactory<int, int, int, int, Version>(f); var expected = new NodeComposer<Version>( SpecimenBuilderNodeFactory.CreateTypedNode(typeof(Version), factory)); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void LegacyComposeReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<UTF8Encoding>(); // Exercise system var actual = sut.Compose(); // Verify outcome Assert.Equal(sut, actual); // Teardown } [Fact] public void ComposeReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<GenericUriParser>(); // Exercise system var expectedBuilders = new[] { new DelegatingSpecimenBuilder(), new DelegatingSpecimenBuilder(), new DelegatingSpecimenBuilder() }; var actual = sut.Compose(expectedBuilders); // Verify outcome var nc = Assert.IsAssignableFrom<NodeComposer<GenericUriParser>>(actual); var composite = Assert.IsAssignableFrom<CompositeSpecimenBuilder>(nc.Builder); Assert.True(expectedBuilders.SequenceEqual(composite)); // Teardown } [Fact] public void ComposeSingleItemReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<GenericUriParser>(); var expected = new DelegatingSpecimenBuilder(); // Exercise system var actual = sut.Compose(new[] { expected }); // Verify outcome var f = Assert.IsAssignableFrom<NodeComposer<GenericUriParser>>(actual); Assert.Equal(expected, f.Builder); // Teardown } [Fact] public void DoReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<AppDomainSetup>(); Action<AppDomainSetup> a = ads => ads.DisallowApplicationBaseProbing = false; // Exercise system var actual = sut.Do(a); // Verify outcome var expected = new NodeComposer<AppDomainSetup>( new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<AppDomainSetup>( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(AppDomainSetup)))), new ActionSpecimenCommand<AppDomainSetup>(a)), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(AppDomainSetup)), new ExactTypeSpecification(typeof(AppDomainSetup))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void SecondDoReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<PropertyHolder<string>>(); Action<PropertyHolder<string>> dummy = _ => { }; Action<PropertyHolder<string>> a = ph => ph.Property = ""; // Exercise system var actual = sut.Do(dummy).Do(a); // Verify outcome var expected = new NodeComposer<PropertyHolder<string>>( new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<PropertyHolder<string>>( new Postprocessor<PropertyHolder<string>>( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(PropertyHolder<string>)))), new ActionSpecimenCommand<PropertyHolder<string>>(dummy)), new ActionSpecimenCommand<PropertyHolder<string>>(a)), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<string>)), new ExactTypeSpecification(typeof(PropertyHolder<string>))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void WithAutoPropertiesReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<Version>(); // Exercise system var actual = sut.WithAutoProperties(); // Verify outcome var expected = new NodeComposer<Version>( new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<Version>( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(Version)))), new AutoPropertiesCommand<Version>(), new OrRequestSpecification( new SeedRequestSpecification(typeof(Version)), new ExactTypeSpecification(typeof(Version)))), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(Version)), new ExactTypeSpecification(typeof(Version))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void OmitAutoPropertiesIsInitiallyANoOp() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<Version>(); // Exercise system var actual = sut.OmitAutoProperties(); // Verify outcome var expected = sut; var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void OmitAutoPropertiesAfterAddingAutoPropertiesReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<Version>(); // Exercise system var actual = sut.WithAutoProperties().OmitAutoProperties(); // Verify outcome var expected = sut; var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void WithAnonymousValueReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<PropertyHolder<int>>(); // Exercise system var actual = sut.With(x => x.Property); // Verify outcome var expected = new NodeComposer<PropertyHolder<int>>( new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<PropertyHolder<int>>( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(PropertyHolder<int>)))), new BindingCommand<PropertyHolder<int>, int>(x => x.Property), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<int>)), new ExactTypeSpecification(typeof(PropertyHolder<int>)))), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<int>)), new ExactTypeSpecification(typeof(PropertyHolder<int>))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Theory] [InlineData("")] [InlineData("foo")] [InlineData("bar")] public void WithExplicitValueReturnsCorrectResult(string value) { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<PropertyHolder<string>>(); var pi = typeof(PropertyHolder<string>).GetProperty("Property"); // Exercise system var actual = sut.With(x => x.Property, value); // Verify outcome var expected = new NodeComposer<PropertyHolder<string>>( new CompositeSpecimenBuilder( new Omitter( new EqualRequestSpecification( pi, new MemberInfoEqualityComparer())), new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<PropertyHolder<string>>( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(PropertyHolder<string>)))), new BindingCommand<PropertyHolder<string>, string>(x => x.Property, value), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<string>)), new ExactTypeSpecification(typeof(PropertyHolder<string>)))), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<string>)), new ExactTypeSpecification(typeof(PropertyHolder<string>)))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Theory] [InlineData("", 1)] [InlineData("bar", 0)] [InlineData("foo", 42)] [InlineData("bar", -1)] public void SuccessiveWithValueReturnsCorrectResult( string value1, int value2) { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<DoublePropertyHolder<string, int>>(); var pi1 = typeof(DoublePropertyHolder<string, int>).GetProperty("Property1"); var pi2 = typeof(DoublePropertyHolder<string, int>).GetProperty("Property2"); // Exercise system var actual = sut .With(x => x.Property1, value1) .With(x => x.Property2, value2); // Verify outcome var expected = new NodeComposer<DoublePropertyHolder<string, int>>( new CompositeSpecimenBuilder( new Omitter( new EqualRequestSpecification( pi2, new MemberInfoEqualityComparer())), new CompositeSpecimenBuilder( new Omitter( new EqualRequestSpecification( pi1, new MemberInfoEqualityComparer())), new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<DoublePropertyHolder<string, int>>( new Postprocessor<DoublePropertyHolder<string, int>>( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(DoublePropertyHolder<string, int>)))), new BindingCommand<DoublePropertyHolder<string, int>, string>(x => x.Property1, value1), new OrRequestSpecification( new SeedRequestSpecification(typeof(DoublePropertyHolder<string, int>)), new ExactTypeSpecification(typeof(DoublePropertyHolder<string, int>)))), new BindingCommand<DoublePropertyHolder<string, int>, int>(x => x.Property2, value2), new OrRequestSpecification( new SeedRequestSpecification(typeof(DoublePropertyHolder<string, int>)), new ExactTypeSpecification(typeof(DoublePropertyHolder<string, int>)))), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(DoublePropertyHolder<string, int>)), new ExactTypeSpecification(typeof(DoublePropertyHolder<string, int>))))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void WithoutReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<FieldHolder<short>>(); var fi = typeof(FieldHolder<short>).GetField("Field"); // Exercise system var actual = sut.Without(x => x.Field); // Verify outcome var expected = new NodeComposer<FieldHolder<short>>( new CompositeSpecimenBuilder( new Omitter( new EqualRequestSpecification( fi, new MemberInfoEqualityComparer())), new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(FieldHolder<short>)))), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(FieldHolder<short>)), new ExactTypeSpecification(typeof(FieldHolder<short>)))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void WithAutoPropertiesTrueReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<Version>(); // Exercise system NodeComposer<Version> actual = sut.WithAutoProperties(true); // Verify outcome var expected = new NodeComposer<Version>( new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<Version>( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(Version)))), new AutoPropertiesCommand<Version>(), new OrRequestSpecification( new SeedRequestSpecification(typeof(Version)), new ExactTypeSpecification(typeof(Version)))), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(Version)), new ExactTypeSpecification(typeof(Version))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void WithAutoPropertiesFalseReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<Version>(); // Exercise system var actual = sut.WithAutoProperties(false); // Verify outcome var expected = sut; var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void TogglingAutoPropertiesOnAndOffReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<Version>(); // Exercise system var actual = sut.WithAutoProperties(true).WithAutoProperties(false); // Verify outcome var expected = sut; var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void WithAutoPropertiesTrueFollowedByFromFactoryReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<PropertyHolder<string>>(); Func<PropertyHolder<string>> f = () => new PropertyHolder<string>(); // Exercise system var actual = sut.WithAutoProperties(true).FromFactory(f); // Verify outcome var expected = new NodeComposer<PropertyHolder<string>>( new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<PropertyHolder<string>>( new NoSpecimenOutputGuard( new SpecimenFactory<PropertyHolder<string>>(f), new InverseRequestSpecification( new SeedRequestSpecification( typeof(PropertyHolder<string>)))), new AutoPropertiesCommand<PropertyHolder<string>>(), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<string>)), new ExactTypeSpecification(typeof(PropertyHolder<string>)))), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<string>)), new ExactTypeSpecification(typeof(PropertyHolder<string>))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } [Fact] public void WithAutoPropertiesTrueFollowedByDoReturnsCorrectResult() { // Fixture setup var sut = SpecimenBuilderNodeFactory.CreateComposer<PropertyHolder<int>>(); Action<PropertyHolder<int>> a = ph => ph.Property = 42; // Exercise system var actual = sut.WithAutoProperties(true).Do(a); // Verify outcome var expected = new NodeComposer<PropertyHolder<int>>( new FilteringSpecimenBuilder( new CompositeSpecimenBuilder( new Postprocessor<PropertyHolder<int>>( new Postprocessor<PropertyHolder<int>>( new NoSpecimenOutputGuard( new MethodInvoker( new ModestConstructorQuery()), new InverseRequestSpecification( new SeedRequestSpecification( typeof(PropertyHolder<int>)))), new ActionSpecimenCommand<PropertyHolder<int>>(a)), new AutoPropertiesCommand<PropertyHolder<int>>(), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<int>)), new ExactTypeSpecification(typeof(PropertyHolder<int>)))), new SeedIgnoringRelay()), new OrRequestSpecification( new SeedRequestSpecification(typeof(PropertyHolder<int>)), new ExactTypeSpecification(typeof(PropertyHolder<int>))))); var n = Assert.IsAssignableFrom<ISpecimenBuilderNode>(actual); Assert.True(expected.GraphEquals(n, new NodeComparer())); // Teardown } } }
StevenJiang2015/AutoFixture
Src/AutoFixtureUnitTest/Dsl/NodeComposerTest.cs
C#
mit
32,001
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <base href="../../../" /> <script src="list.js"></script> <script src="page.js"></script> <link type="text/css" rel="stylesheet" href="page.css" /> </head> <body> [page:Material] &rarr; <h1>[name]</h1> <p class="desc"> TODO </p> <h2>Example</h2> [example:webgl_shadowmap_pointlight WebGL / shadowmap / pointlight] <script> // iOS iframe auto-resize workaround if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) { var scene = document.getElementById( 'scene' ); scene.style.width = getComputedStyle( scene ).width; scene.style.height = getComputedStyle( scene ).height; scene.setAttribute( 'scrolling', 'no' ); } </script> <h2>构造函数(Constructor)</h2> <h3>[name]( [param:Object parameters] )</h3> <p>[page:Object parameters] - (可选)用于定义材质外观的对象,具有一个或多个属性。 材质的任何属性都可以从此处传入(包括从[page:Material]继承的任何属性)。 </p> <h2>属性(Properties)</h2> <p>常用属性请参见基类[page:Material]。</p> <h3>[property:Texture alphaMap]</h3> <p>alpha贴图是一种灰度纹理,用于控制整个表面的不透明度(黑色:完全透明;白色:完全不透明)。默认值为null。<br /><br /> 仅使用纹理的颜色,忽略alpha通道(如果存在)。对于RGB和RGBA纹理,[page:WebGLRenderer WebGL]渲染器在采样此纹理时将使用绿色通道, 因为在DXT压缩和未压缩RGB 565格式中为绿色提供了额外的精度。Luminance-only以及luminance/alpha纹理也仍然有效。 </p> <h3>[property:Texture displacementMap]</h3> <p> 位移贴图会影响网格顶点的位置,与仅影响材质的光照和阴影的其他贴图不同,移位的顶点可以投射阴影,阻挡其他对象,以及充当真实的几何体。 位移纹理是指:网格的所有顶点被映射为图像中每个像素的值(白色是最高的),并且被重定位。 </p> <h3>[property:Float displacementScale]</h3> <p>位移贴图对网格的影响程度(黑色是无位移,白色是最大位移)。如果没有设置位移贴图,则不会应用此值。默认值为1。 </p> <h3>[property:Float displacementBias]</h3> <p> 位移贴图在网格顶点上的偏移量。如果没有设置位移贴图,则不会应用此值。默认值为0。 </p> <h3>[property:Float farDistance]</h3> <p> TODO </p> <h3>[property:Boolean fog]</h3> <p> 材质是否受雾影响。默认值为*false*。</p> <h3>[property:Boolean isMeshDistanceMaterial]</h3> <p> 用于检查此类或派生类是否为深度网格材质。默认值为 *true*。<br /><br /> 因为其通常用在内部优化,所以不应该更改该属性值。 </p> <h3>[property:Boolean lights]</h3> <p>材质是否受到光照的影响。默认值为 *false*。</p> <h3>[property:Texture map]</h3> <p>颜色贴图。默认为null。</p> <h3>[property:boolean morphTargets]</h3> <p>材质是否使用morphTargets。默认值为false。</p> <h3>[property:Float nearDistance]</h3> <p> TODO </p> <h3>[property:Vector3 referencePosition]</h3> <p> TODO </p> <h3>[property:Boolean skinning]</h3> <p>材质是否使用蒙皮。默认值为false。</p> <h2>方法(Methods)</h2> <p>常用方法请参见基类[page:Material]。</p> <h2>源码(Source)</h2> [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] </body> </html>
sherousee/three.js
docs/api/zh/materials/MeshDistanceMaterial.html
HTML
mit
3,587
'use strict'; var angular = require('angular'); angular .module('mwl.calendar') .controller('MwlDragSelectCtrl', function($scope, $element, $parse, $attrs) { function handleMouseEvent(callbackName) { return function(event) { if (callbackName) { $parse(callbackName)($scope); $scope.$apply(); } event.preventDefault(); }; } var onMouseDown = handleMouseEvent($attrs.onDragSelectStart); var onMouseMove = handleMouseEvent($attrs.onDragSelectMove); var onMouseUp = handleMouseEvent($attrs.onDragSelectEnd); function enableMouseListeners() { $element.on('mousedown', onMouseDown); $element.on('mousemove', onMouseMove); $element.on('mouseup', onMouseUp); } function disableMouseListeners() { $element.off('mousedown', onMouseDown); $element.off('mousemove', onMouseMove); $element.off('mouseup', onMouseUp); } $scope.$watch($attrs.mwlDragSelect, function(isEnabled) { if (isEnabled) { enableMouseListeners(); } else { disableMouseListeners(); } }); $scope.$on('$destroy', function() { disableMouseListeners(); }); }) .directive('mwlDragSelect', function() { return { restrict: 'A', controller: 'MwlDragSelectCtrl' }; });
pakino/calendar-viewer-angular
src/directives/mwlDragSelect.js
JavaScript
mit
1,342
package com.laytonsmith.core.functions; import com.laytonsmith.PureUtilities.Common.StringUtils; import com.laytonsmith.PureUtilities.Version; import com.laytonsmith.annotations.api; import com.laytonsmith.annotations.hide; import com.laytonsmith.core.ArgumentValidation; import com.laytonsmith.core.MSVersion; import com.laytonsmith.core.constructs.CArray; import com.laytonsmith.core.constructs.CInt; import com.laytonsmith.core.constructs.CVoid; import com.laytonsmith.core.constructs.Target; import com.laytonsmith.core.environments.Environment; import com.laytonsmith.core.environments.StaticRuntimeEnv; import com.laytonsmith.core.exceptions.CRE.CRECastException; import com.laytonsmith.core.exceptions.CRE.CREThrowable; import com.laytonsmith.core.exceptions.ConfigRuntimeException; import com.laytonsmith.core.natives.interfaces.Mixed; import com.laytonsmith.core.taskmanager.CoreTaskType; import com.laytonsmith.core.taskmanager.TaskHandler; import com.laytonsmith.core.taskmanager.TaskManager; import com.laytonsmith.core.taskmanager.TaskState; /** * */ public class TaskHandling { public static String docs() { return "This class is used to manage various tasks throughout MethodScript. It is a task manager of sorts."; } @api @hide("Only timeouts are added currently, making it mostly useless") public static class tm_get_tasks extends AbstractFunction { @Override public Class<? extends CREThrowable>[] thrown() { return new Class[]{}; } @Override public boolean isRestricted() { return true; } @Override public Boolean runAsync() { return null; } @Override public Mixed exec(Target t, Environment environment, Mixed... args) throws ConfigRuntimeException { TaskManager tm = environment.getEnv(StaticRuntimeEnv.class).GetTaskManager(); CArray ret = new CArray(t); for(TaskHandler task : tm.getTasks()) { CArray tt = CArray.GetAssociativeArray(t); tt.set("id", new CInt(task.getID(), t), t); tt.set("type", task.getType().name()); tt.set("state", task.getState().name()); tt.set("target", task.getDefinedAt().toString()); CArray properties = CArray.GetAssociativeArray(t); for(String prop : task.getProperties()) { properties.set(prop, task.getPropertyData().get(prop).toString()); } tt.set("properties", properties, t); ret.push(tt, t); } return ret; } @Override public String getName() { return "tm_get_tasks"; } @Override public Integer[] numArgs() { return new Integer[]{0}; } @Override public String docs() { return "array {} Returns an array of currently running tasks. ---- Each task will be an associative array with the" + " following properties:\n" + "{| width=\"100%\" cellspacing=\"1\" cellpadding=\"1\" border=\"1\" class=\"wikitable\"\n" + "|-\n" + "! scope=\"col\" | Key\n" + "! scope=\"col\" | Value\n" + "|-\n" + "| id\n" + "| The id of the currently running task. This is not a unique id necessarily, across all tasks, but will be unique" + " across all tasks of this task type.\n" + "|-\n" + "| type\n" + "| The task type. This plus the id are the unique identifiers for a task. Extensions may add new task types, but the" + " builtin tasks are: " + StringUtils.Join(CoreTaskType.values(), ", ", ", and ") + "\n" + "|-\n" + "| state\n" + "| The state of the task. Will be either " + StringUtils.Join(TaskState.values(), ", ", ", or ") + "\n" + "|-" + "| target\n" + "| Where the task was defined in code.\n" + "|-\n" + "| properties\n" + "| An array of additional properties provided by the particular task type. May be empty (but not null).\n" + "|}\n"; } @Override public Version since() { return MSVersion.V3_3_1; } } @api @hide("This doesn't appear to work yet. It will be added once it does.") public static class tm_kill_task extends AbstractFunction { @Override public Class<? extends CREThrowable>[] thrown() { return new Class[]{CRECastException.class}; } @Override public boolean isRestricted() { return true; } @Override public Boolean runAsync() { return null; } @Override public Mixed exec(Target t, Environment environment, Mixed... args) throws ConfigRuntimeException { String type = args[0].val(); int id = ArgumentValidation.getInt32(args[1], t); TaskManager tm = environment.getEnv(StaticRuntimeEnv.class).GetTaskManager(); tm.killTask(type, id); return CVoid.VOID; } @Override public String getName() { return "tm_kill_task"; } @Override public Integer[] numArgs() { return new Integer[]{2}; } @Override public String docs() { return "void {taskType, id} Attempts to kill the specified task. The taskType and id will be listed with the task in the task manager." + " If the task is already finished, doesn't exist, or already in the process of finishing, nothing happens."; } @Override public Version since() { return MSVersion.V3_3_1; } } }
sk89q/CommandHelper
src/main/java/com/laytonsmith/core/functions/TaskHandling.java
Java
mit
5,062
import { BuildContext, ChangedFile } from './util/interfaces'; import * as ts from 'typescript'; export declare function transpile(context: BuildContext): Promise<void>; export declare function transpileUpdate(changedFiles: ChangedFile[], context: BuildContext): Promise<void>; /** * The full TS build for all app files. */ export declare function transpileWorker(context: BuildContext, workerConfig: TranspileWorkerConfig): Promise<{}>; export declare function canRunTranspileUpdate(event: string, filePath: string, context: BuildContext): boolean; export declare function transpileDiagnosticsOnly(context: BuildContext): Promise<{}>; export interface TranspileWorkerMessage { rootDir?: string; buildDir?: string; configFile?: string; transpileSuccess?: boolean; } export declare function getTsConfig(context: BuildContext, tsConfigPath?: string): TsConfig; export declare function getTsConfigPath(context: BuildContext): string; export interface TsConfig { options: ts.CompilerOptions; fileNames: string[]; raw: any; } export interface TranspileWorkerConfig { configFile: string; writeInMemory: boolean; sourceMaps: boolean; cache: boolean; inlineTemplate: boolean; }
fernandofraga109/ionic-2-course
node_modules/@ionic/app-scripts/dist/transpile.d.ts
TypeScript
mit
1,220
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.gwoptics.testing; import org.gwoptics.graphics.GWColour; import org.gwoptics.graphics.graph2D.Graph2D; import org.gwoptics.graphics.graph2D.traces.ILine2DEquation; import org.gwoptics.graphics.graph2D.traces.Line2DTrace; import org.gwoptics.graphics.graph2D.traces.ScatterTrace; import processing.core.PApplet; /** * * @author Daniel */ public class ScatterTraceTest extends PApplet { Graph2D grph; public static void main(final String[] args) { PApplet.main( new String[]{ScatterTraceTest.class.getName()} ); } @Override public void setup(){ size(600,600,OPENGL); // Creating the Graph2D object: // arguments are the parent object, xsize, ysize, cross axes at zero point grph = new Graph2D(this, 450, 450, false); // Defining the main properties of the X and Y-Axis grph.setYAxisMin(-6); grph.setYAxisMax(6); grph.setXAxisMin(-6); grph.setXAxisMax(6); grph.setXAxisLabel("X-Axis"); grph.setYAxisLabel("Y-Axis"); grph.setXAxisTickSpacing(2.5f); grph.setYAxisTickSpacing(2.5f); // Offset of the top left corner of the plotting area // to the sketch origin (should not be zero in order to // see the y-axis label grph.position.x = 80; grph.position.y = 60; // Here we create a new trace and set a colour for // it, along with passing the equation object to it. t = new ScatterTrace(ScatterTrace.Ring); t.setDefaultSize(30f); t.setLablePosition(ScatterTrace.LABELPOSITION.RIGHT); t.setLabelFont(createFont("Arial", 18, true)); for(int i=-5;i<5;i++){ t.addPoint(i, i, "label", String.format("[%.1f, %.1f]", (float)i, (float)i), "labelcolour", new GWColour(255,255,255)); } // Adding the trace to the graph grph.addTrace(t); t.generate(); frameRate(900); } ScatterTrace t; @Override public void draw(){ background(120); grph.draw(); println(frameRate); } }
OpenBCI/OpenBCI_Processing
libraries/gwoptics/src/org/gwoptics/testing/ScatterTraceTest.java
Java
mit
2,067
export default class BatchDeleteController { constructor($scope, $state, WriteQueries, notification, view) { this.$scope = $scope; this.$state = $state; this.WriteQueries = WriteQueries; this.notification = notification; this.view = view; this.entity = view.getEntity(); this.entityIds = $state.params.ids; this.selection = []; // fixme: query db to get selection this.title = view.title(); this.description = view.description(); this.actions = view.actions(); this.loadingPage = false; this.fields = view.fields(); $scope.$on('$destroy', this.destroy.bind(this)); } batchDelete() { var notification = this.notification, $state = this.$state, entityName = this.entity.name(); this.WriteQueries.batchDelete(this.view, this.entityIds).then(function () { $state.go($state.get('list'), angular.extend({ entity: entityName }, $state.params)); notification.log('Elements successfully deleted.', { addnCls: 'humane-flatty-success' }); }, function (response) { // @TODO: share this method when splitting controllers var body = response.data; if (typeof body === 'object') { body = JSON.stringify(body); } notification.log('Oops, an error occured : (code: ' + response.status + ') ' + body, {addnCls: 'humane-flatty-error'}); }); } back() { this.$state.go(this.$state.get('list'), angular.extend({ entity: this.entity.name() }, this.$state.params)); } destroy() { this.$scope = undefined; this.$state = undefined; this.WriteQueries = undefined; } } BatchDeleteController.$inject = ['$scope', '$state', 'WriteQueries', 'notification', 'view'];
vasiakorobkin/ng-admin
src/javascripts/ng-admin/Crud/delete/BatchDeleteController.js
JavaScript
mit
1,922
alias vi='vi -u /usr/share/vim/vimrc'
WideEyeLabs/wel-station
wel_station/templates/default/vim-alias_vi_to_minimal_vim.bash
Shell
mit
38
body { background-color: <color specification>; } .selector { color: <color specification>; background-color: <color specification>; font-weight: bold; /* this is a comment */ font-family: monospace; font-style: italic; text-decoration: underline; }
nilrog/High-Light
externals/source-highlight/doc/css_example.css
CSS
mit
268
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt SVG module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QSVGRENDERER_H #define QSVGRENDERER_H #include <QtGui/qmatrix.h> #ifndef QT_NO_SVGRENDERER #include <QtCore/qobject.h> #include <QtCore/qsize.h> #include <QtCore/qrect.h> #include <QtCore/qxmlstream.h> #include <QtSvg/qtsvgglobal.h> QT_BEGIN_NAMESPACE class QSvgRendererPrivate; class QPainter; class QByteArray; class Q_SVG_EXPORT QSvgRenderer : public QObject { Q_OBJECT Q_PROPERTY(QRectF viewBox READ viewBoxF WRITE setViewBox) Q_PROPERTY(int framesPerSecond READ framesPerSecond WRITE setFramesPerSecond) Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame) public: QSvgRenderer(QObject *parent=0); QSvgRenderer(const QString &filename, QObject *parent=0); QSvgRenderer(const QByteArray &contents, QObject *parent=0); QSvgRenderer(QXmlStreamReader *contents, QObject *parent=0); ~QSvgRenderer(); bool isValid() const; QSize defaultSize() const; QRect viewBox() const; QRectF viewBoxF() const; void setViewBox(const QRect &viewbox); void setViewBox(const QRectF &viewbox); bool animated() const; int framesPerSecond() const; void setFramesPerSecond(int num); int currentFrame() const; void setCurrentFrame(int); int animationDuration() const;//in seconds QRectF boundsOnElement(const QString &id) const; bool elementExists(const QString &id) const; QMatrix matrixForElement(const QString &id) const; public Q_SLOTS: bool load(const QString &filename); bool load(const QByteArray &contents); bool load(QXmlStreamReader *contents); void render(QPainter *p); void render(QPainter *p, const QRectF &bounds); void render(QPainter *p, const QString &elementId, const QRectF &bounds=QRectF()); Q_SIGNALS: void repaintNeeded(); private: Q_DECLARE_PRIVATE(QSvgRenderer) }; QT_END_NAMESPACE #endif // QT_NO_SVGRENDERER #endif // QSVGRENDERER_H
imzcy/JavaScriptExecutable
thirdparty/qt53/include/QtSvg/qsvgrenderer.h
C
mit
3,893
require 'test_helper' module Elasticsearch module Test class SearchShardsTest < ::Test::Unit::TestCase context "Search shards" do subject { FakeClient.new } should "perform correct request" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'GET', method assert_equal '_search_shards', url assert_equal Hash.new, params assert_nil body true end.returns(FakeResponse.new) subject.search_shards end end end end end
aamin005/Firdowsspace
vendor/bundle/ruby/2.3.0/gems/elasticsearch-api-1.0.15/test/unit/search_shards_test.rb
Ruby
mit
594
# encoding: utf-8 # frozen_string_literal: true require 'spec_helper' describe RuboCop::Cop::Lint::StringConversionInInterpolation do subject(:cop) { described_class.new } it 'registers an offense for #to_s in interpolation' do inspect_source(cop, '"this is the #{result.to_s}"') expect(cop.offenses.size).to eq(1) expect(cop.messages) .to eq(['Redundant use of `Object#to_s` in interpolation.']) end it 'detects #to_s in an interpolation with several expressions' do inspect_source(cop, '"this is the #{top; result.to_s}"') expect(cop.offenses.size).to eq(1) end it 'accepts #to_s with arguments in an interpolation' do inspect_source(cop, '"this is a #{result.to_s(8)}"') expect(cop.offenses).to be_empty end it 'accepts interpolation without #to_s' do inspect_source(cop, '"this is the #{result}"') expect(cop.offenses).to be_empty end it 'does not explode on implicit receiver' do inspect_source(cop, '"#{to_s}"') expect(cop.offenses.size).to eq(1) expect(cop.messages) .to eq(['Use `self` instead of `Object#to_s` in interpolation.']) end it 'does not explode on empty interpolation' do inspect_source(cop, '"this is #{} silly"') expect(cop.offenses).to be_empty end it 'autocorrects by removing the redundant to_s' do corrected = autocorrect_source(cop, ['"some #{something.to_s}"']) expect(corrected).to eq '"some #{something}"' end it 'autocorrects implicit receiver by replacing to_s with self' do corrected = autocorrect_source(cop, ['"some #{to_s}"']) expect(corrected).to eq '"some #{self}"' end end
legendetm/rubocop
spec/rubocop/cop/lint/string_conversion_in_interpolation_spec.rb
Ruby
mit
1,640
import com.twitter.finagle.{Http, Service} import com.twitter.util.{Await, Future} import com.twitter.finagle.http.Response import java.net.InetSocketAddress import org.jboss.netty.handler.codec.http._ import util.Properties object Web { def main(args: Array[String]) { val port = Properties.envOrElse("PORT", "8080").toInt println("Starting on port:"+port) val server = Http.serve(":" + port, new Hello) Await.ready(server) } } class Hello extends Service[HttpRequest, HttpResponse] { def apply(req: HttpRequest): Future[HttpResponse] = { val response = Response() response.setStatusCode(200) response.setContentString("scala\n") Future(response) } }
damirv/herokuish
buildpacks/buildpack-scala/tests/scala/src/main/scala/web.scala
Scala
mit
695
<?php // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- // | Copyright (c) 2008 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Author: liu21st <liu21st@gmail.com> // +---------------------------------------------------------------------- // $Id$ // 导入别名定义 alias_import(array( 'Model' => THINK_PATH.'/Lib/Think/Core/Model.class.php', 'Dispatcher' => THINK_PATH.'/Lib/Think/Util/Dispatcher.class.php', 'HtmlCache' => THINK_PATH.'/Lib/Think/Util/HtmlCache.class.php', 'Db' => THINK_PATH.'/Lib/Think/Db/Db.class.php', 'ThinkTemplate' => THINK_PATH.'/Lib/Think/Template/ThinkTemplate.class.php', 'Template' => THINK_PATH.'/Lib/Think/Util/Template.class.php', 'TagLib' => THINK_PATH.'/Lib/Think/Template/TagLib.class.php', 'Cache' => THINK_PATH.'/Lib/Think/Util/Cache.class.php', 'Debug' => THINK_PATH.'/Lib/Think/Util/Debug.class.php', //'Cookie' => THINK_PATH.'/Lib/Think/Util/Cookie.class.php', 'Session' => THINK_PATH.'/Lib/Think/Util/Session.class.php', 'TagLibCx' => THINK_PATH.'/Lib/Think/Template/TagLib/TagLibCx.class.php', 'ViewModel' => THINK_PATH.'/Lib/Think/Core/Model/ViewModel.class.php', 'AdvModel' => THINK_PATH.'/Lib/Think/Core/Model/AdvModel.class.php', 'RelationModel' => THINK_PATH.'/Lib/Think/Core/Model/RelationModel.class.php', ) ); ?>
leoliew/fanwe_p2p
update/ThinkPHP/Common/alias.php
PHP
mit
1,902
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="QuantityExtensions.cs" company="QuantityTypes"> // Copyright (c) 2014 QuantityTypes contributors // </copyright> // <summary> // Provides extension methods for quantities. // </summary> // -------------------------------------------------------------------------------------------------------------------- namespace QuantityTypes { using System; /// <summary> /// Provides extension methods for quantities. /// </summary> public static class QuantityExtensions { /// <summary> /// Converts the input value to the specified unit or returns the converted default value if the input value is null. /// </summary> /// <typeparam name="T"> /// The type of the quantity. /// </typeparam> /// <param name="value"> /// The input quantity value. /// </param> /// <param name="unit"> /// The unit. /// </param> /// <param name="defaultValue"> /// The default value. /// </param> /// <returns> /// The converted quantity. /// </returns> public static double ConvertOrDefault<T>(this T? value, T unit, T defaultValue) where T : struct, IQuantity { if (!value.HasValue) { return defaultValue.ConvertTo(unit); } return value.Value.ConvertTo(unit); } /// <summary> /// Converts the input value to the specified unit or returns the default value if the input value is null. /// </summary> /// <typeparam name="T"> /// The type of the quantity. /// </typeparam> /// <param name="value"> /// The input quantity value. /// </param> /// <param name="unit"> /// The unit. /// </param> /// <param name="defaultValue"> /// The default value. /// </param> /// <returns> /// The converted quantity. /// </returns> public static double ConvertOrDefault<T>(this T? value, T unit, double defaultValue) where T : struct, IQuantity { if (!value.HasValue) { return defaultValue; } return value.Value.ConvertTo(unit); } /// <summary> /// Converts the input value to the specified unit or returns NaN if the input value is null. /// </summary> /// <typeparam name="T"> /// The type of the quantity. /// </typeparam> /// <param name="value"> /// The input quantity value. /// </param> /// <param name="unit"> /// The unit. /// </param> /// <returns> /// The converted quantity. /// </returns> public static double ConvertTo<T>(this T? value, T unit) where T : struct, IQuantity { return ConvertOrDefault(value, unit, double.NaN); } /// <summary> /// Converts the specified value to the specified unit or throws an exception if the input value is null. /// </summary> /// <typeparam name="T"> /// The type of the quantity. /// </typeparam> /// <param name="value"> /// The input quantity value. /// </param> /// <param name="unit"> /// The unit. /// </param> /// <returns> /// The converted quantity. /// </returns> /// <exception cref="Exception"> /// Cannot convert <c>null</c> quantity. /// </exception> public static double ConvertOrThrow<T>(this T? value, T unit) where T : struct, IQuantity { if (!value.HasValue) { throw new Exception("Cannot convert null quantity."); } return value.Value.ConvertTo(unit); } } }
objorke/QuantityTypes
Source/QuantityTypes/Extensions/QuantityExtensions.cs
C#
mit
4,141